Skip to contentSkip to conversation

ppc/km/tegr1: support second localbus clock signal

PATCH New Holger Brunck 2 participants 5 messages Nov 26, 2019 – Dec 24, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 ppc/km/tegr1: support second localbus clock signal

On kmtegr1 we have to specify the second localbus clock signal also instead of using the default for our ppc 8309 boards.

CC Priyanka Jain <[email protected]>
CC Valentin Longchamp <[email protected]>
---
 include/configs/km/km-mpc8309.h |  2 ++
 include/configs/kmtegr1.h       | 17 +++++++++++++++++
 2 files changed, 19 insertions(+)
include/configs/km/km-mpc8309.h +2 -0
index 9aaea273e0..e710c04493 100644
@@ -22,6 +22,7 @@
  * System IO Config
  */
 /* 0x14000180 SICR_1 */
+#ifndef CONFIG_SYS_SICRL
 #define CONFIG_SYS_SICRL (0			\
 		| SICR_1_UART1_UART1RTS		\
 		| SICR_1_I2C_CKSTOP		\
@@ -38,6 +39,7 @@
 		| SICR_1_FEC1_FEC1		\
 		| SICR_1_FEC2_FEC2		\
 		)
+#endif
 
 /* 0x00080400 SICR_2 */
 #define CONFIG_SYS_SICRH (0			\
include/configs/kmtegr1.h +17 -0
index e627606222..a441fca121 100644
@@ -30,6 +30,23 @@
 #define CONFIG_SYS_MAX_NAND_DEVICE		1
 #define NAND_MAX_CHIPS				1
 
+#define CONFIG_SYS_SICRL (0     \
+		| SICR_1_UART1_UART1RTS   \
+		| SICR_1_I2C_CKSTOP   \
+		| SICR_1_IRQ_A_IRQ    \
+		| SICR_1_IRQ_B_IRQ    \
+		| SICR_1_GPIO_A_GPIO    \
+		| SICR_1_GPIO_B_GPIO    \
+		| SICR_1_GPIO_C_GPIO    \
+		| SICR_1_GPIO_D_GPIO    \
+		| SICR_1_GPIO_E_LCS    \
+		| SICR_1_GPIO_F_GPIO    \
+		| SICR_1_USB_A_UART2S   \
+		| SICR_1_USB_B_UART2RTS   \
+		| SICR_1_FEC1_FEC1    \
+		| SICR_1_FEC2_FEC2    \
+	)
+
 /* include common defines/options for all Keymile boards */
 #include "km/keymile-common.h"
 #include "km/km-powerpc.h"
Signature · 1 line
2.24.0.rc1
#1 lore raw

PATCH 2/4 ppc/km: convert KM_DEF_NETDEV to Kconfig

Remove this from the board header files and move it to Kconfig. Also use the correct default address for kmtegr1.

CC Priyanka Jain <[email protected]>
CC Valentin Longchamp <[email protected]>
---
 board/keymile/Kconfig               | 6 ++++++
 configs/kmcoge5ne_defconfig         | 1 +
 configs/kmeter1_defconfig           | 1 +
 configs/kmtegr1_defconfig           | 1 +
 include/configs/km/keymile-common.h | 7 +------
 include/configs/kmcoge5ne.h         | 1 -
 include/configs/kmeter1.h           | 1 -
 include/configs/kmp204x.h           | 2 --
 scripts/config_whitelist.txt        | 1 -
 9 files changed, 10 insertions(+), 11 deletions(-)
board/keymile/Kconfig +6 -0
index ba1960f3d0..634dbbe097 100644
@@ -62,6 +62,12 @@ config KM_CONSOLE_TTY
 	help
 	  TTY console to use on board.
 
+config KM_DEF_NETDEV
+	string "Default Netdevice"
+	default "eth0"
+	help
+	  Default netdevice for debug interface
+
 config KM_COMMON_ETH_INIT
 	bool "Common Ethernet Initialization"
 	default y if KIRKWOOD || MPC83xx
configs/kmcoge5ne_defconfig +1 -0
index 472dc88fbf..aa2a344d3d 100644
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_KM_DEF_NETDEV="eth1"
 CONFIG_ENV_SIZE=0x4000
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE011BFF8
 CONFIG_ENV_SECT_SIZE=0x20000
configs/kmeter1_defconfig +1 -0
index 02b17ed624..7e9b8930a9 100644
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_KM_DEF_NETDEV="eth2"
 CONFIG_ENV_SIZE=0x4000
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE011BFF8
 CONFIG_ENV_SECT_SIZE=0x20000
configs/kmtegr1_defconfig +1 -0
index 27a58833f8..f194d605f6 100644
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_KM_DEF_NETDEV="eth1"
 CONFIG_ENV_SIZE=0x4000
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 CONFIG_ENV_SECT_SIZE=0x20000
include/configs/km/keymile-common.h +1 -6
index 8433d8e568..e690d8f39d 100644
@@ -38,11 +38,6 @@
 	"actual_bank=0\0"
 #endif
 
-#ifndef CONFIG_KM_DEF_NETDEV
-#define CONFIG_KM_DEF_NETDEV	\
-	"netdev=eth0\0"
-#endif
-
 #ifndef CONFIG_KM_UBI_PARTITION_NAME_BOOT
 #define CONFIG_KM_UBI_PARTITION_NAME_BOOT	"ubi0"
 #endif /* CONFIG_KM_UBI_PARTITION_NAME_BOOT */
@@ -168,7 +163,7 @@
 #ifndef CONFIG_KM_DEF_ENV
 #define CONFIG_KM_DEF_ENV	\
 	CONFIG_KM_DEF_ENV_BOOTPARAMS					\
-	CONFIG_KM_DEF_NETDEV						\
+	"netdev=" __stringify(CONFIG_KM_DEF_NETDEV) "\0"		\
 	CONFIG_KM_DEF_ENV_CPU						\
 	CONFIG_KM_DEF_ENV_BOOTTARGETS					\
 	CONFIG_KM_DEF_ENV_BOOTARGS					\
include/configs/kmcoge5ne.h +0 -1
index fc78b27cbb..5335034505 100644
@@ -10,7 +10,6 @@
 
 #define CONFIG_HOSTNAME		"kmcoge5ne"
 #define CONFIG_KM_BOARD_NAME	"kmcoge5ne"
-#define CONFIG_KM_DEF_NETDEV	"netdev=eth1\0"
 #define CONFIG_NAND_ECC_BCH
 #define CONFIG_NAND_KMETER1
 #define CONFIG_SYS_MAX_NAND_DEVICE		1
include/configs/kmeter1.h +0 -1
index bfa7ca27c7..7d85a02c68 100644
@@ -10,7 +10,6 @@
 
 #define CONFIG_HOSTNAME		"kmeter1"
 #define CONFIG_KM_BOARD_NAME   "kmeter1"
-#define CONFIG_KM_DEF_NETDEV	"netdev=eth2\0"
 
 /* include common defines/options for all Keymile boards */
 #include "km/keymile-common.h"
include/configs/kmp204x.h +0 -2
index 771d0248f7..9c17044b9b 100644
@@ -17,8 +17,6 @@
 
 #define CONFIG_KMP204X
 
-#define CONFIG_KM_DEF_NETDEV	"netdev=eth0\0"
-
 /* an additionnal option is required for UBI as subpage access is
  * supported in u-boot
  */
scripts/config_whitelist.txt +0 -1
index 08fab0aebf..6413d1f5ac 100644
@@ -939,7 +939,6 @@ CONFIG_KM_DEF_ENV_BOOTTARGETS
 CONFIG_KM_DEF_ENV_CONSTANTS
 CONFIG_KM_DEF_ENV_CPU
 CONFIG_KM_DEF_ENV_FLASH_BOOT
-CONFIG_KM_DEF_NETDEV
 CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI
 CONFIG_KM_DISABLE_PCIE
 CONFIG_KM_ECC_MODE
Signature · 1 line
2.24.0.rc1
#2 lore raw

PATCH 3/4 board/km: remove CONFIG_KM_BOARD_NAME

In reply to Holger Brunck

We can use the existing CONFIG_SYS_CONFIG_NAME define for that and remove the option. Also fix the boot string for all km83xx boards.

CC Priyanka Jain <[email protected]>
CC Valentin Longchamp <[email protected]>
---
 board/keymile/km83xx/km83xx.c   | 2 +-
 board/keymile/kmp204x/kmp204x.c | 2 +-
 include/configs/kmcoge5ne.h     | 1 -
 include/configs/kmeter1.h       | 1 -
 include/configs/kmopti2.h       | 1 -
 include/configs/kmp204x.h       | 1 -
 include/configs/kmsupx5.h       | 1 -
 include/configs/kmtegr1.h       | 1 -
 include/configs/kmtepr2.h       | 1 -
 include/configs/suvd3.h         | 1 -
 include/configs/tuge1.h         | 1 -
 include/configs/tuxx1.h         | 1 -
 scripts/config_whitelist.txt    | 1 -
 13 files changed, 2 insertions(+), 13 deletions(-)
board/keymile/km83xx/km83xx.c +1 -1
index 59347a3990..b17d60f9ff 100644
@@ -277,7 +277,7 @@ int dram_init(void)
 
 int checkboard(void)
 {
-	puts("Board: Keymile " CONFIG_KM_BOARD_NAME);
+	puts("Board: ABB " CONFIG_SYS_CONFIG_NAME);
 
 	if (piggy_present())
 		puts(" with PIGGY.");
board/keymile/kmp204x/kmp204x.c +1 -1
index e7c321c326..76382dbc30 100644
@@ -28,7 +28,7 @@ static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
 
 int checkboard(void)
 {
-	printf("Board: Keymile %s\n", CONFIG_KM_BOARD_NAME);
+	printf("Board: Keymile %s\n", CONFIG_SYS_CONFIG_NAME);
 
 	return 0;
 }
include/configs/kmcoge5ne.h +0 -1
index 5335034505..cdfb280aee 100644
@@ -9,7 +9,6 @@
 #define __CONFIG_H
 
 #define CONFIG_HOSTNAME		"kmcoge5ne"
-#define CONFIG_KM_BOARD_NAME	"kmcoge5ne"
 #define CONFIG_NAND_ECC_BCH
 #define CONFIG_NAND_KMETER1
 #define CONFIG_SYS_MAX_NAND_DEVICE		1
include/configs/kmeter1.h +0 -1
index 7d85a02c68..4129d97505 100644
@@ -9,7 +9,6 @@
 #define __CONFIG_H
 
 #define CONFIG_HOSTNAME		"kmeter1"
-#define CONFIG_KM_BOARD_NAME   "kmeter1"
 
 /* include common defines/options for all Keymile boards */
 #include "km/keymile-common.h"
include/configs/kmopti2.h +0 -1
index 67e864fc98..5050c70303 100644
@@ -23,7 +23,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_KM_BOARD_NAME	"kmopti2"
 #define CONFIG_HOSTNAME		"kmopti2"
 
 /* include common defines/options for all Keymile boards */
include/configs/kmp204x.h +0 -1
index 9c17044b9b..6cee3b47b3 100644
@@ -9,7 +9,6 @@
 
 #if defined(CONFIG_KMCOGE4)
 #define CONFIG_HOSTNAME		"kmcoge4"
-#define CONFIG_KM_BOARD_NAME	"kmcoge4"
 
 #else
 #error ("Board not supported")
include/configs/kmsupx5.h +0 -1
index ba33e6074b..e3de6c61e7 100644
@@ -23,7 +23,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_KM_BOARD_NAME	"kmsupx5"
 #define CONFIG_HOSTNAME		"kmsupx5"
 
 /* include common defines/options for all Keymile boards */
include/configs/kmtegr1.h +0 -1
index a441fca121..bdd35cc7fb 100644
@@ -21,7 +21,6 @@
  */
 
 #define CONFIG_HOSTNAME   "kmtegr1"
-#define CONFIG_KM_BOARD_NAME   "kmtegr1"
 #define CONFIG_KM_UBI_PARTITION_NAME_BOOT	"ubi0"
 #define CONFIG_KM_UBI_PARTITION_NAME_APP	"ubi1"
 
include/configs/kmtepr2.h +0 -1
index e0c907d11a..a4ceb1c50d 100644
@@ -23,7 +23,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_KM_BOARD_NAME    "kmtepr2"
 #define CONFIG_HOSTNAME         "kmtepr2"
 
 /* include common defines/options for all Keymile boards */
include/configs/suvd3.h +0 -1
index 1705f9cafb..d74707971b 100644
@@ -21,7 +21,6 @@
  */
 
 #define CONFIG_HOSTNAME		"suvd3"
-#define CONFIG_KM_BOARD_NAME	"suvd3"
 
 /* include common defines/options for all Keymile boards */
 #include "km/keymile-common.h"
include/configs/tuge1.h +0 -1
index 808538ef9d..d43ccbe8dd 100644
@@ -23,7 +23,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_KM_BOARD_NAME	"tuge1"
 #define CONFIG_HOSTNAME		"tuge1"
 
 /* include common defines/options for all Keymile boards */
include/configs/tuxx1.h +0 -1
index 0eb673a947..f5a9f1284a 100644
@@ -23,7 +23,6 @@
 /*
  * High Level Configuration Options
  */
-#define CONFIG_KM_BOARD_NAME	"tuxx1"
 #define CONFIG_HOSTNAME		"tuxx1"
 
 /* include common defines/options for all Keymile boards */
scripts/config_whitelist.txt +0 -1
index 6413d1f5ac..e84a563c28 100644
@@ -928,7 +928,6 @@ CONFIG_KMCOGE4
 CONFIG_KMP204X
 CONFIG_KMTEGR1
 CONFIG_KM_BOARD_EXTRA_ENV
-CONFIG_KM_BOARD_NAME
 CONFIG_KM_COGE5UN
 CONFIG_KM_DEF_ARCH
 CONFIG_KM_DEF_BOOT_ARGS_CPU
Signature · 1 line
2.24.0.rc1
#3 lore raw

PATCH 4/4 ppc/kmeter1: remove unused define

In reply to Holger Brunck

CONFIG_CONS_INDEX is nowhere used for this board, we can drop it.

CC Priyanka Jain <[email protected]>
CC Valentin Longchamp <[email protected]>
---
 include/configs/kmeter1.h | 5 -----
 1 file changed, 5 deletions(-)
include/configs/kmeter1.h +0 -5
index 4129d97505..4245875e39 100644
@@ -16,11 +16,6 @@
 #include "km/km-mpc83xx.h"
 #include "km/km-mpc8360.h"
 
-/*
- * Serial Port
- */
-#define CONFIG_CONS_INDEX	1
-
 #define CONFIG_SYS_DDR_CS0_CONFIG	(CSCONFIG_EN | CSCONFIG_AP | \
 					 CSCONFIG_ROW_BIT_13 | \
 					 CSCONFIG_COL_BIT_10 | \
Signature · 1 line
2.24.0.rc1
#4 lore raw

PATCH 1/4 ppc/km/tegr1: support second localbus clock signal

In reply to Holger Brunck
Quoted 68 lines

-----Original Message-----
From: Holger Brunck <[email protected]>
Sent: Tuesday, November 26, 2019 11:39 PM
To: u-boot at lists.denx.de
Cc: Holger Brunck <[email protected]>; Priyanka Jain <[email protected]>; Valentin Longchamp <[email protected]>
Subject: [PATCH 1/4] ppc/km/tegr1: support second localbus clock signal

On kmtegr1 we have to specify the second localbus clock signal also instead of using the default for our ppc 8309 boards.

CC Priyanka Jain <[email protected]>
CC Valentin Longchamp <[email protected]>

---
include/configs/km/km-mpc8309.h | 2 ++
include/configs/kmtegr1.h | 17 +++++++++++++++++

2 files changed, 19 insertions(+)
include/configs/km/km- renamed from include/configs/km/km-mpc8309.h +0 -0

mpc8309.h index 9aaea273e0..e710c04493 100644

include/configs/km/km-mpc8309.h +2 -0
@@ -22,6 +22,7 @@
 * System IO Config
 */
 /* 0x14000180 SICR_1 */
+#ifndef CONFIG_SYS_SICRL
 #define CONFIG_SYS_SICRL (0			\
 		| SICR_1_UART1_UART1RTS		\
 		| SICR_1_I2C_CKSTOP		\
@@ -38,6 +39,7 @@
 		| SICR_1_FEC1_FEC1		\
 		| SICR_1_FEC2_FEC2		\
 		)
+#endif
 
 /* 0x00080400 SICR_2 */
 #define CONFIG_SYS_SICRH (0			\
include/configs/kmtegr1.h index renamed from include/configs/kmtegr1.h +0 -0

e627606222..a441fca121 100644

include/configs/kmtegr1.h +17 -0
@@ -30,6 +30,23 @@
 #define CONFIG_SYS_MAX_NAND_DEVICE		1
 #define NAND_MAX_CHIPS				1
 
+#define CONFIG_SYS_SICRL (0     \
+		| SICR_1_UART1_UART1RTS   \
+		| SICR_1_I2C_CKSTOP   \
+		| SICR_1_IRQ_A_IRQ    \
+		| SICR_1_IRQ_B_IRQ    \
+		| SICR_1_GPIO_A_GPIO    \
+		| SICR_1_GPIO_B_GPIO    \
+		| SICR_1_GPIO_C_GPIO    \
+		| SICR_1_GPIO_D_GPIO    \
+		| SICR_1_GPIO_E_LCS    \
+		| SICR_1_GPIO_F_GPIO    \
+		| SICR_1_USB_A_UART2S   \
+		| SICR_1_USB_B_UART2RTS   \
+		| SICR_1_FEC1_FEC1    \
+		| SICR_1_FEC2_FEC2    \
+	)
+
 /* include common defines/options for all Keymile boards */  #include
Quoted 4 lines

"km/keymile-common.h"
#include "km/km-powerpc.h"
--
2.24.0.rc1

Series applied on u-boot-mpc85xx. Awaiting upstream Thanks
Priyanka