Skip to contentSkip to conversation

km/common: remove unneeded ifdefs for I2C

PATCH New Holger Brunck 3 participants 19 messages Jan 21, 2013 – Feb 18, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/16 km/common: remove unneeded ifdefs for I2C

All boards from this serie use i2c. There is no need to #ifdef the header.

---
Changes for v2:
- fix typo in commit message

 board/keymile/common/common.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
board/keymile/common/common.c +0 -2
index 6f407b7..468c755 100644
@@ -38,9 +38,7 @@
 #include "post.h"
 #endif
 #include "common.h"
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
 #include <i2c.h>
-#endif
 
 #if !defined(CONFIG_MPC83xx)
 static void i2c_write_start_seq(void);
Signature · 1 line
1.7.1
#1 lore raw

PATCH v2 2/16 km/common/ivm: remove obsolete code

EEprom_ivm_addr isn't set in our environment, so remove the usage of this.

---
Changes for v2:
- none

 board/keymile/common/ivm.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
board/keymile/common/ivm.c +0 -8
index eaa924f..7fe3b0f 100644
@@ -325,14 +325,6 @@ int ivm_read_eeprom(void)
 	}
 	i2c_set_bus_num(dev->busid);
 #endif
-
-	buf = (unsigned char *) getenv("EEprom_ivm_addr");
-	if (buf != NULL) {
-		ret = strict_strtoul((char *)buf, 16, &dev_addr);
-		if (ret != 0)
-			return -3;
-	}
-
 	/* add deblocking here */
 	i2c_make_abort();
 
Signature · 1 line
1.7.1
#2 lore raw

PATCH v2 3/16 km/common/ivm: remove CONFIG_SYS_I2C_IVM_BUS related code

In reply to Holger Brunck

This define isn't set within our setup files. So we can safely remove the affected code.

---
Changes for v2:
- none

 board/keymile/common/ivm.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
board/keymile/common/ivm.c +0 -4
index 7fe3b0f..607daa6 100644
@@ -312,13 +312,9 @@ int ivm_read_eeprom(void)
 
 #if defined(CONFIG_I2C_MUX)
 	/* First init the Bus, select the Bus */
-#if defined(CONFIG_SYS_I2C_IVM_BUS)
-	dev = i2c_mux_ident_muxstring((uchar *)CONFIG_SYS_I2C_IVM_BUS);
-#else
 	buf = (unsigned char *) getenv("EEprom_ivm");
 	if (buf != NULL)
 		dev = i2c_mux_ident_muxstring(buf);
-#endif
 	if (dev == NULL) {
 		printf("Error couldnt add Bus for IVM\n");
 		return -1;
Signature · 1 line
1.7.1
#3 lore raw

PATCH v2 4/16 km82xx, km83xx: move ethernet_present() from common to cpu specific

In reply to Holger Brunck

From: Karlheinz Jerg <[email protected]>

For kmvect1 we need a special solution and for km_arm boards we already have. So move the common code to the architectur specific file.

---
Changes for v2:
- make piggy_present() static
- add __iomem macro

 board/keymile/common/common.c |   11 -----------
 board/keymile/km82xx/km82xx.c |    8 ++++++++
 board/keymile/km83xx/km83xx.c |   24 +++++++++++++++++++++++-
 3 files changed, 31 insertions(+), 12 deletions(-)
board/keymile/common/common.c +0 -11
index 468c755..ef93ed3 100644
@@ -183,17 +183,6 @@ void i2c_init_board(void)
 }
 #endif
 
-
-#if !defined(MACH_TYPE_KM_KIRKWOOD)
-int ethernet_present(void)
-{
-	struct km_bec_fpga *base =
-		(struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE;
-
-	return in_8(&base->bprth) & PIGGY_PRESENT;
-}
-#endif
-
 int board_eth_init(bd_t *bis)
 {
 	if (ethernet_present())
board/keymile/km82xx/km82xx.c +8 -0
index 67b69f6..defc885 100644
@@ -385,6 +385,14 @@ void handle_mgcoge3un_reset(void)
 }
 #endif
 
+int ethernet_present(void)
+{
+	struct km_bec_fpga *base =
+		(struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE;
+
+	return in_8(&base->bprth) & PIGGY_PRESENT;
+}
+
 /*
  * Early board initalization.
  */
board/keymile/km83xx/km83xx.c +23 -1
index 83a8753..b027173 100644
@@ -133,6 +133,28 @@ const uint upma_table[] = {
 };
 #endif
 
+static int piggy_present(void)
+{
+	struct km_bec_fpga __iomem *base =
+		(struct km_bec_fpga __iomem *)CONFIG_SYS_KMBEC_FPGA_BASE;
+
+	return in_8(&base->bprth) & PIGGY_PRESENT;
+}
+
+#if defined(CONFIG_KMVECT1)
+int ethernet_present(void)
+{
+	/* ethernet port connected to simple switch without piggy */
+	return 1;
+}
+#else
+int ethernet_present(void)
+{
+	return piggy_present();
+}
+#endif
+
+
 int board_early_init_r(void)
 {
 	struct km_bec_fpga *base =
@@ -280,7 +302,7 @@ int checkboard(void)
 {
 	puts("Board: Keymile " CONFIG_KM_BOARD_NAME);
 
-	if (ethernet_present())
+	if (piggy_present())
 		puts(" with PIGGY.");
 	puts("\n");
 	return 0;
Signature · 1 line
1.7.1
#4 lore raw

PATCH v2 5/16 km/common/ivm: rework piggy mac adress offset generation

In reply to Holger Brunck

For the the kmvect1 board we will also need a functionality to add an offset to the IVMs MAC address, because these board will have two valid ethernet ports for debugging purpose. So move the code to an own function.

---
Changes for v2:
- new in this serie, needed as preparation for fixes in the next patch as requested on the ML

 board/keymile/common/ivm.c |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)
board/keymile/common/ivm.c +17 -11
index 607daa6..d568fd9 100644
@@ -201,6 +201,22 @@ static int ivm_check_crc(unsigned char *buf, int block)
 	return 0;
 }
 
+static int calculate_mac_offset(unsigned char *valbuf, unsigned char *buf,
+				int offset)
+{
+	unsigned long val = (buf[4] << 16) + (buf[5] << 8) + buf[6];
+
+	if (offset == 0)
+		return 0;
+
+	val += offset;
+	buf[4] = (val >> 16) & 0xff;
+	buf[5] = (val >> 8) & 0xff;
+	buf[6] = val & 0xff;
+	sprintf((char *)valbuf, "%pM", buf + 1);
+	return 0;
+}
+
 static int ivm_analyze_block2(unsigned char *buf, int len)
 {
 	unsigned char	valbuf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN];
@@ -210,17 +226,7 @@ static int ivm_analyze_block2(unsigned char *buf, int len)
 	sprintf((char *)valbuf, "%pM", buf + 1);
 	ivm_set_value("IVM_MacAddress", (char *)valbuf);
 	/* if an offset is defined, add it */
-#if defined(CONFIG_PIGGY_MAC_ADRESS_OFFSET)
-	if (CONFIG_PIGGY_MAC_ADRESS_OFFSET > 0) {
-		unsigned long val = (buf[4] << 16) + (buf[5] << 8) + buf[6];
-
-		val += CONFIG_PIGGY_MAC_ADRESS_OFFSET;
-		buf[4] = (val >> 16) & 0xff;
-		buf[5] = (val >> 8) & 0xff;
-		buf[6] = val & 0xff;
-		sprintf((char *)valbuf, "%pM", buf + 1);
-	}
-#endif
+	calculate_mac_offset(buf, valbuf, CONFIG_PIGGY_MAC_ADRESS_OFFSET);
 #ifdef MACH_TYPE_KM_KIRKWOOD
 	setenv((char *)"ethaddr", (char *)valbuf);
 #else
Signature · 1 line
1.7.1
#5 lore raw

PATCH v2 6/16 powerpc/83xx/km: add MV88E6122 switch support for kmvect1

In reply to Holger Brunck

From: Karlheinz Jerg <[email protected]>

kmvect1 has a UEC2 connection to the piggy board and a UEC0 connection to the switch MV88E6122. This switch has a connection to a frontport ethernet interface. The ethernet port used for network booting is automatically selected by u-boot. If a Piggy is plugged, the Piggy port is selected (UEC2, eth1). If the Piggy isn't present, the Frontport is selected (UEC0, eth0).

The switch reset is connected to a GPIO on the PRIO3 board FPGA (GPIO28) and released at startup.

---
Changes for v2:
- set eth1addr directly after reading out the inventory
- make extsw_conf static
- add __iomen macro

 board/keymile/common/ivm.c         |    8 ++++-
 board/keymile/km83xx/km83xx.c      |   67 ++++++++++++++++++++++++++++++++++++
 include/configs/km/km83xx-common.h |    8 +---
 include/configs/suvd3.h            |   37 ++++++++++++++++++++
 4 files changed, 113 insertions(+), 7 deletions(-)
board/keymile/common/ivm.c +7 -1
index d568fd9..22d5256 100644
@@ -233,7 +233,13 @@ static int ivm_analyze_block2(unsigned char *buf, int len)
 	if (getenv("ethaddr") == NULL)
 		setenv((char *)"ethaddr", (char *)valbuf);
 #endif
-
+#ifdef CONFIG_KMVECT1
+/* KMVECT1 has two ethernet interfaces */
+	if (getenv("eth1addr") == NULL) {
+		calculate_mac_offset(buf, valbuf, 1);
+		setenv((char *)"eth1addr", (char *)valbuf);
+	}
+#endif
 	/* IVM_MacCount */
 	count = (buf[10] << 24) +
 		   (buf[11] << 16) +
board/keymile/km83xx/km83xx.c +67 -0

75 lines not on this page · raw message

include/configs/km/km83xx-common.h +2 -6
index a9823d6..1e596c8 100644
@@ -165,19 +165,15 @@
 #define CONFIG_UEC_ETH
 #define CONFIG_ETHPRIME		"UEC0"
 
+#if !defined(CONFIG_MPC8309)
 #define CONFIG_UEC_ETH1		/* GETH1 */
 #define UEC_VERBOSE_DEBUG	1
+#endif
 
 #ifdef CONFIG_UEC_ETH1
-#if defined(CONFIG_MPC8309)
-#define CONFIG_SYS_UEC1_UCC_NUM	2	/* UCC3 */
-#define CONFIG_SYS_UEC1_RX_CLK		QE_CLK_NONE /* not used in RMII Mode */
-#define CONFIG_SYS_UEC1_TX_CLK		QE_CLK12
-#else
 #define CONFIG_SYS_UEC1_UCC_NUM	3	/* UCC4 */
 #define CONFIG_SYS_UEC1_RX_CLK		QE_CLK_NONE /* not used in RMII Mode */
 #define CONFIG_SYS_UEC1_TX_CLK		QE_CLK17
-#endif
 #define CONFIG_SYS_UEC1_ETH_TYPE	FAST_ETH
 #define CONFIG_SYS_UEC1_PHY_ADDR	0
 #define CONFIG_SYS_UEC1_INTERFACE_TYPE	PHY_INTERFACE_MODE_RMII
include/configs/suvd3.h +37 -0
index c50832c..bbf9da5 100644
@@ -110,4 +110,41 @@
 				 BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
 #define CONFIG_SYS_DBAT6U	CONFIG_SYS_IBAT6U
 
+/*
+ * QE UEC ethernet configuration
+ */
+#if defined(CONFIG_KMVECT1)
+#define CONFIG_MV88E6352_SWITCH
+#define CONFIG_KM_MVEXTSW_ADDR		0x10
+
+/* ethernet port connected to simple switch 88e6122 (UEC0) */
+#define CONFIG_UEC_ETH1
+#define CONFIG_SYS_UEC1_UCC_NUM		0	/* UCC1 */
+#define CONFIG_SYS_UEC1_RX_CLK		QE_CLK9
+#define CONFIG_SYS_UEC1_TX_CLK		QE_CLK10
+
+#define CONFIG_FIXED_PHY		0xFFFFFFFF
+#define CONFIG_SYS_FIXED_PHY_ADDR	0x1E	/* unused address */
+#define CONFIG_SYS_FIXED_PHY_PORT(devnum, speed, duplex) \
+		{devnum, speed, duplex}
+#define CONFIG_SYS_FIXED_PHY_PORTS \
+		CONFIG_SYS_FIXED_PHY_PORT("UEC0", SPEED_100, DUPLEX_FULL)
+
+#define CONFIG_SYS_UEC1_ETH_TYPE	FAST_ETH
+#define CONFIG_SYS_UEC1_PHY_ADDR	CONFIG_SYS_FIXED_PHY_ADDR
+#define CONFIG_SYS_UEC1_INTERFACE_TYPE	PHY_INTERFACE_MODE_MII
+#define CONFIG_SYS_UEC1_INTERFACE_SPEED	100
+
+/* ethernet port connected to piggy (UEC2) */
+#define CONFIG_HAS_ETH1
+#define CONFIG_UEC_ETH2
+#define CONFIG_SYS_UEC2_UCC_NUM		2       /* UCC3 */
+#define CONFIG_SYS_UEC2_RX_CLK		QE_CLK_NONE /* not used in RMII Mode */
+#define CONFIG_SYS_UEC2_TX_CLK		QE_CLK12
+#define CONFIG_SYS_UEC2_ETH_TYPE	FAST_ETH
+#define CONFIG_SYS_UEC2_PHY_ADDR	0
+#define CONFIG_SYS_UEC2_INTERFACE_TYPE	PHY_INTERFACE_MODE_RMII
+#define CONFIG_SYS_UEC2_INTERFACE_SPEED	100
+#endif /* CONFIG_KMVECT1 */
+
 #endif /* __CONFIG_H */
Signature · 1 line
1.7.1
#6 lore raw

PATCH v2 7/16 powerpc/83xx: use ppc_6xx as arch variable for kmvect1

In reply to Holger Brunck

On this board we are using hard floating point, so select the correct toolchain.

---
Changes for v2:
- none

 include/configs/km/km8309-common.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/km/km8309-common.h +1 -1
index b36e892..7bd1e92 100644
@@ -22,7 +22,7 @@
 #define CONFIG_MPC830x		1	/* MPC830x family */
 #define CONFIG_MPC8309		1	/* MPC8309 CPU specific */
 
-#define CONFIG_KM_DEF_ARCH	"arch=ppc_8xx\0"
+#define CONFIG_KM_DEF_ARCH	"arch=ppc_82xx\0"
 #define CONFIG_CMD_DIAG		1
 
 /* include common defines/options for all 83xx Keymile boards */
Signature · 1 line
1.7.1
#7 lore raw

PATCH v2 8/16 km/common: introduce $uimage variable

In reply to Holger Brunck

From: Andreas Huber <[email protected]>

Replace the hardcoded string with a variable. If CONFIG_NAND_ECC_BCH is set we use a specific name for the uImage (ecc_bch_uImage).

---
Changes for v2:
- none

 include/configs/km/keymile-common.h |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
include/configs/km/keymile-common.h +8 -1
index f64748e..ae88759 100644
@@ -148,6 +148,12 @@
 	"ubi part " CONFIG_KM_UBI_PARTITION_NAME_APP "; fi\0"
 #endif /* CONFIG_KM_UBI_PARTITION_NAME_APP */
 
+#ifdef CONFIG_NAND_ECC_BCH
+#define CONFIG_KM_UIMAGE_NAME "ecc_bch_uImage\0"
+#else
+#define CONFIG_KM_UIMAGE_NAME "uImage\0"
+#endif
+
 /*
  * boottargets
  * - set 'subbootcmds'
@@ -210,9 +216,10 @@
  */
 #define CONFIG_KM_DEF_ENV_FLASH_BOOT					\
 	"cramfsaddr=" __stringify(CONFIG_KM_CRAMFS_ADDR) "\0"		\
-	"cramfsloadkernel=cramfsload ${load_addr_r} uImage\0"		\
+	"cramfsloadkernel=cramfsload ${load_addr_r} ${uimage}\0"	\
 	"ubicopy=ubi read "__stringify(CONFIG_KM_CRAMFS_ADDR)		\
 			" bootfs${boot_bank}\0"				\
+	"uimage=" CONFIG_KM_UIMAGE_NAME					\
 	CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI
 
 /*
Signature · 1 line
1.7.1
#8 lore raw

PATCH v2 9/16 km/scripts: replace hardcoded uImage

In reply to Holger Brunck

From: Andreas Huber <[email protected]>

Replace uImage with ${uimage}.
If uimage is not set, default it to uImage.

---
Changes for v2:
- none

 board/keymile/scripts/develop-common.txt |    5 +++--
 board/keymile/scripts/ramfs-common.txt   |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
board/keymile/scripts/develop-common.txt +3 -2
index aa3d659..a6bb1b1 100644
@@ -1,8 +1,9 @@
 altbootcmd=run ${subbootcmds}
 bootcmd=run ${subbootcmds}
-configure=km_setboardid && saveenv && reset
+configure=run set_uimage; km_setboardid && saveenv && reset
 subbootcmds=tftpfdt tftpkernel nfsargs add_default boot
 nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${toolchain}/${arch}
-tftpkernel=tftpboot ${load_addr_r} ${hostname}/uImage
+tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage}
 toolchain=/opt/eldk
 rootfssize=0
+set_uimage=printenv uimage || setenv uimage uImage
board/keymile/scripts/ramfs-common.txt +3 -2
index c1b45ab..8a8d287 100644
@@ -4,8 +4,9 @@ altbootcmd=run ${subbootcmds}
 bootcmd=run ${subbootcmds}
 subbootcmds=tftpfdt tftpkernel setrootfsaddr tftpramfs flashargs add_default addpanic addramfs boot
 nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}
-configure=km_setboardid && saveenv && reset
+configure=run set_uimage; km_setboardid && saveenv && reset
 rootfsfile=${hostname}/rootfsImage
 setrootfsaddr=setexpr value ${pnvramaddr} - ${rootfssize} && setenv rootfsaddr 0x${value}
-tftpkernel=tftpboot ${load_addr_r} ${hostname}/uImage
+tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage}
 tftpramfs=tftpboot ${rootfsaddr} ${hostname}/rootfsImage
+set_uimage=printenv uimage || setenv uimage uImage
Signature · 1 line
1.7.1
#9 lore raw

PATCH v2 10/16 kmeter1_nand: allow uasge of NAND_ECC_SOFT_BCH

In reply to Holger Brunck

If CONFIG_NAND_ECC_BCH is set we use 4-bit error corretion code instead of the 1-bit error correction code on the NAND device within this driver.

---
Changes for v2:
- add Acked-by: Scott Wood

 drivers/mtd/nand/kmeter1_nand.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/mtd/nand/kmeter1_nand.c +4 -0
index e8e5b7b..f044597 100644
@@ -119,7 +119,11 @@ static int kpn_nand_dev_ready(struct mtd_info *mtd)
 
 int board_nand_init(struct nand_chip *nand)
 {
+#if defined(CONFIG_NAND_ECC_BCH)
+	nand->ecc.mode = NAND_ECC_SOFT_BCH;
+#else
 	nand->ecc.mode = NAND_ECC_SOFT;
+#endif
 
 	/* Reference hardware control function */
 	nand->cmd_ctrl  = kpn_nand_hwcontrol;
Signature · 1 line
1.7.1
#10 lore raw

PATCH v2 11/16 powerpc/83xx: use NAND_ECC_BCH for kmcoge5ne

In reply to Holger Brunck

Switch from 1-bit ecc to 4-bit ecc.

---
Changes for v2:
- none

 include/configs/km8360.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/configs/km8360.h +2 -0
index 7631ab6..5b191bc 100644
@@ -25,6 +25,8 @@
 #define CONFIG_KM_BOARD_NAME	"kmcoge5ne"
 #define CONFIG_KM_DEF_NETDEV	"netdev=eth1\0"
 #define CONFIG_CMD_NAND
+#define CONFIG_NAND_ECC_BCH
+#define CONFIG_BCH
 #define CONFIG_NAND_KMETER1
 #define CONFIG_SYS_MAX_NAND_DEVICE		1
 #define NAND_MAX_CHIPS				1
Signature · 1 line
1.7.1
#11 lore raw

PATCH v2 12/16 km/common: add eccmode to kernel commandline

In reply to Holger Brunck

If CONFIG_NAND_ECC_BCH is chosen from in the board configuration we add an ecc mode to the kernel commandline.

---
Changes for v2:
- none

 include/configs/km/keymile-common.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
include/configs/km/keymile-common.h +3 -0
index ae88759..796f330 100644
@@ -150,8 +150,10 @@
 
 #ifdef CONFIG_NAND_ECC_BCH
 #define CONFIG_KM_UIMAGE_NAME "ecc_bch_uImage\0"
+#define CONFIG_KM_ECC_MODE    " eccmode=bch"
 #else
 #define CONFIG_KM_UIMAGE_NAME "uImage\0"
+#define CONFIG_KM_ECC_MODE
 #endif
 
 /*
@@ -190,6 +192,7 @@
 		":${hostname}:${netdev}:off3"				\
 		" console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}"	\
 		" mem=${kernelmem} init=${init}"			\
+		CONFIG_KM_ECC_MODE					\
 		" phram.phram=phvar,${varaddr}," __stringify(CONFIG_KM_PHRAM)\
 		" " CONFIG_KM_UBI_LINUX_MTD " "				\
 		CONFIG_KM_DEF_BOOT_ARGS_CPU				\
Signature · 1 line
1.7.1
#12 lore raw

PATCH v2 13/16 powerpc/83xx/km: cleanup tuxx1 support

In reply to Holger Brunck

This is a preparation for the upcoming kmopti2 board. This board has also a second fpga on board which is different to the tuxx1 target. But we want to use the same header file. So remove the config option KM_DISABLE_APP2 and simply use the board names to distinguish the features.

---
Changes for v2:
- none

 boards.cfg              |    6 +++---
 include/configs/tuxx1.h |   17 +++++++++--------
 2 files changed, 12 insertions(+), 11 deletions(-)
boards.cfg +3 -3
index e4b0d44..1c78991 100644
@@ -700,9 +700,9 @@ SIMPC8313_SP                 powerpc     mpc83xx     simpc8313           sheldon
 TQM834x                      powerpc     mpc83xx     tqm834x             tqc
 suvd3                        powerpc     mpc83xx     km83xx              keymile        -           suvd3:SUVD3
 kmvect1                      powerpc     mpc83xx     km83xx              keymile        -           suvd3:KMVECT1
-tuge1                        powerpc     mpc83xx     km83xx              keymile        -           tuxx1:KM_DISABLE_APP2,TUGE1
-tuxx1                        powerpc     mpc83xx     km83xx              keymile
-kmsupx5                      powerpc     mpc83xx     km83xx              keymile        -           tuxx1:KM_DISABLE_APP2,KMSUPX5
+tuge1                        powerpc     mpc83xx     km83xx              keymile        -           tuxx1:TUGE1
+tuxx1                        powerpc     mpc83xx     km83xx              keymile        -           tuxx1:TUXX1
+kmsupx5                      powerpc     mpc83xx     km83xx              keymile        -           tuxx1:KMSUPX5
 sbc8548                      powerpc     mpc85xx     sbc8548             -              -           sbc8548
 sbc8548_PCI_33               powerpc     mpc85xx     sbc8548             -              -           sbc8548:PCI,33
 sbc8548_PCI_33_PCIE          powerpc     mpc85xx     sbc8548             -              -           sbc8548:PCI,33,PCIE
include/configs/tuxx1.h +9 -8
index 90d2e61..3997717 100644
@@ -11,7 +11,7 @@
  * (C) Copyright 2008
  * Heiko Schocher, DENX Software Engineering, hs at denx.de.
  *
- * (C) Copyright 2010-2012
+ * (C) Copyright 2010-2013
  * Lukas Roggli, KEYMILE Ltd, lukas.roggli at keymile.com
  * Holger Brunck,  Keymile GmbH, holger.bruncl at keymile.com
  *
@@ -27,16 +27,17 @@
 /*
  * High Level Configuration Options
  */
-#ifdef CONFIG_KMSUPX5
+#if defined(CONFIG_KMSUPX5)
 #define CONFIG_KM_BOARD_NAME	"kmsupx5"
 #define CONFIG_HOSTNAME		kmsupx5
-#elif defined CONFIG_TUGE1
+#elif defined(CONFIG_TUGE1)
 #define CONFIG_KM_BOARD_NAME	"tuge1"
 #define CONFIG_HOSTNAME		tuge1
-#else
-#define CONFIG_TUXXX		/* TUXX1 board (tuxa1/tuda1) specific */
+#elif defined(CONFIG_TUXX1)	/* TUXX1 board (tuxa1/tuda1) specific */
 #define CONFIG_KM_BOARD_NAME	"tuxx1"
 #define CONFIG_HOSTNAME		tuxx1
+#else
+#error ("Board not supported")
 #endif
 
 #define	CONFIG_SYS_TEXT_BASE	0xF0000000
@@ -46,7 +47,7 @@
 
 #define CONFIG_SYS_APP1_BASE	0xA0000000    /* PAXG */
 #define	CONFIG_SYS_APP1_SIZE	256 /* Megabytes */
-#ifndef CONFIG_KM_DISABLE_APP2
+#if defined(CONFIG_TUXX1)
 #define CONFIG_SYS_APP2_BASE	0xB0000000    /* PINC3 */
 #define	CONFIG_SYS_APP2_SIZE	256 /* Megabytes */
 #endif
@@ -81,7 +82,7 @@
 				 OR_GPCM_TRLX_SET | \
 				 OR_GPCM_EHTR_CLEAR | \
 				 OR_GPCM_EAD)
-#ifndef CONFIG_KM_DISABLE_APP2
+#if defined(CONFIG_TUXX1)
 /*
  * Configuration for C3 on the local bus
  */
@@ -125,7 +126,7 @@
 				 BATL_GUARDEDSTORAGE)
 #define CONFIG_SYS_DBAT5U	CONFIG_SYS_IBAT5U
 
-#ifdef CONFIG_KM_DISABLE_APP2
+#if defined(CONFIG_TUGE1) || defined(CONFIG_KMSUPX5)
 #define CONFIG_SYS_IBAT6L	(0)
 #define CONFIG_SYS_IBAT6U	(0)
 #define CONFIG_SYS_DBAT6L	CONFIG_SYS_IBAT6L
Signature · 1 line
1.7.1
#13 lore raw

PATCH v2 14/16 powerpc/83xx/km: add support for kmopti2 board

In reply to Holger Brunck

This board is similar to TUXX1 but it has a different sized second FPGA. Therefore the configuration for the third chipselect is different.

---
Changes for v2:
- none

 boards.cfg              |    1 +
 include/configs/tuxx1.h |   31 +++++++++++++++++++++++++------
 2 files changed, 26 insertions(+), 6 deletions(-)
boards.cfg +1 -0
index 1c78991..01acf19 100644
@@ -702,6 +702,7 @@ suvd3                        powerpc     mpc83xx     km83xx              keymile
 kmvect1                      powerpc     mpc83xx     km83xx              keymile        -           suvd3:KMVECT1
 tuge1                        powerpc     mpc83xx     km83xx              keymile        -           tuxx1:TUGE1
 tuxx1                        powerpc     mpc83xx     km83xx              keymile        -           tuxx1:TUXX1
+kmopti2                      powerpc     mpc83xx     km83xx              keymile        -           tuxx1:KMOPTI2
 kmsupx5                      powerpc     mpc83xx     km83xx              keymile        -           tuxx1:KMSUPX5
 sbc8548                      powerpc     mpc85xx     sbc8548             -              -           sbc8548
 sbc8548_PCI_33               powerpc     mpc85xx     sbc8548             -              -           sbc8548:PCI,33
include/configs/tuxx1.h +25 -6
index 3997717..6caf23a 100644
@@ -36,6 +36,9 @@
 #elif defined(CONFIG_TUXX1)	/* TUXX1 board (tuxa1/tuda1) specific */
 #define CONFIG_KM_BOARD_NAME	"tuxx1"
 #define CONFIG_HOSTNAME		tuxx1
+#elif defined(CONFIG_KMOPTI2)
+#define CONFIG_KM_BOARD_NAME	"kmopti2"
+#define CONFIG_HOSTNAME		kmopti2
 #else
 #error ("Board not supported")
 #endif
@@ -47,18 +50,18 @@
 
 #define CONFIG_SYS_APP1_BASE	0xA0000000    /* PAXG */
 #define	CONFIG_SYS_APP1_SIZE	256 /* Megabytes */
-#if defined(CONFIG_TUXX1)
+#if defined(CONFIG_TUXX1) || defined(CONFIG_KMOPTI2)
 #define CONFIG_SYS_APP2_BASE	0xB0000000    /* PINC3 */
 #define	CONFIG_SYS_APP2_SIZE	256 /* Megabytes */
 #endif
 
 /*
  * Init Local Bus Memory Controller:
- *
- * Bank Bus     Machine PortSz  Size  Device on TUDA1  TUXA1  TUGE1   KMSUPX4
- * ---- ---     ------- ------  -----  ---------------------------------------
- *  2   Local   GPCM    8 bit  256MB	         PAXG  LPXF   PAXI     LPXF
- *  3   Local   GPCM    8 bit  256MB	         PINC3 PINC2  unused   unused
+ *				      Device on
+ * Bank Bus     Machine PortSz  Size  TUDA1  TUXA1  TUGE1  KMSUPX4 KMOPTI2
+ * ---- ---     ------- ------  ----- ---------------------------------------
+ *  2   Local   GPCM    8 bit  256MB  PAXG  LPXF   PAXI     LPXF   PAXE
+ *  3   Local   GPCM    8 bit  256MB  PINC3 PINC2  unused  unused  OPI2(16 bit)
  *
  */
 
@@ -108,6 +111,22 @@
 				 MxMR_WLFx_2X)
 #endif
 
+#if defined(CONFIG_KMOPTI2)
+/*
+ * Configuration for C3 on the local bus
+ */
+#define CONFIG_SYS_LBLAWBAR3_PRELIM	CONFIG_SYS_APP2_BASE
+#define CONFIG_SYS_LBLAWAR3_PRELIM	(LBLAWAR_EN | LBLAWAR_256MB)
+#define CONFIG_SYS_BR3_PRELIM	(CONFIG_SYS_APP2_BASE | \
+				 BR_PS_16 |		\
+				 BR_MS_GPCM |		\
+				 BR_V)
+#define CONFIG_SYS_OR3_PRELIM	(MEG_TO_AM(CONFIG_SYS_APP2_SIZE) | \
+				 OR_GPCM_SCY_4 | \
+				 OR_GPCM_TRLX_CLEAR | \
+				 OR_GPCM_EHTR_CLEAR)
+#endif
+
 /*
  * MMU Setup
  */
Signature · 1 line
1.7.1
#14 lore raw

PATCH v2 15/16 powerpc/83xx/km: remove uneeded CONFIG_MISC_INIT_R

In reply to Holger Brunck

Remove it from the processor specific headers. This is already defined in the common header km83xx.h.

---
Changes for v2:
- fix typo in commit message

 include/configs/km/km8309-common.h |    2 --
 include/configs/km/km8321-common.h |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)
include/configs/km/km8309-common.h +0 -2
index 7bd1e92..7f9cffa 100644
@@ -33,8 +33,6 @@
 /* at end of uboot partition, before env */
 #define CONFIG_SYS_QE_FMAN_FW_ADDR   0xF00B0000
 
-#define CONFIG_MISC_INIT_R
-
 /*
  * System IO Config
  */
include/configs/km/km8321-common.h +0 -2
index 8ad6fc3..abb9081 100644
@@ -38,8 +38,6 @@
 /* include common defines/options for all 83xx Keymile boards */
 #include "km83xx-common.h"
 
-#define CONFIG_MISC_INIT_R
-
 /*
  * System IO Config
  */
Signature · 1 line
1.7.1
#15 lore raw

PATCH v2 16/16 powerpc/83xx/km: drop uneeded dtt_bus environment var

In reply to Holger Brunck

There is no need for a environment variable to configure the dtt bus.

---
Changes for v2:
- change commit message

 board/keymile/km83xx/km83xx.c      |   12 ++++--------
 include/configs/km/km83xx-common.h |    1 -
 2 files changed, 4 insertions(+), 9 deletions(-)
board/keymile/km83xx/km83xx.c +4 -8
index 1e8e2cc..faaa39b 100644
@@ -98,17 +98,13 @@ const qe_iop_conf_t qe_iop_conf_tab[] = {
 static int board_init_i2c_busses(void)
 {
 	I2C_MUX_DEVICE *dev = NULL;
-	uchar	*buf;
+	uchar *dtt_bus = (uchar *)"pca9547:70:a";
 
 	/* Set up the Bus for the DTTs */
-	buf = (unsigned char *) getenv("dtt_bus");
-	if (buf != NULL)
-		dev = i2c_mux_ident_muxstring(buf);
-	if (dev == NULL) {
+	dev = i2c_mux_ident_muxstring(dtt_bus);
+	if (dev == NULL)
 		printf("Error couldn't add Bus for DTT\n");
-		printf("please setup dtt_bus to where your\n");
-		printf("DTT is found.\n");
-	}
+
 	return 0;
 }
 
include/configs/km/km83xx-common.h +0 -1
index 1e596c8..eb0e5b6 100644
@@ -312,7 +312,6 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	CONFIG_KM_DEF_ENV						\
 	CONFIG_KM_DEF_ARCH						\
-	"dtt_bus=pca9547:70:a\0"					\
 	"EEprom_ivm=pca9547:70:9\0"					\
 	"newenv="							\
 		"prot off 0xF00C0000 +0x40000 && "			\
Signature · 1 line
1.7.1
#17 lore raw

[U-Boot] [GIT PULL] u-boot-mpc83xx: keymile board updates

Hi Tom,

Please pull the latest set of keymile 83xx board updates:

The following changes since commit 9a82b10c6657c5744802971036bb564ebc660291:

Merge branch 'master' of git://git.denx.de/u-boot (2013-02-15 17:46:50 -0600)

are available in the git repository at:

git://git.denx.de/u-boot-mpc83xx.git master

for you to fetch changes up to 411190cb16b63e39345a608b68b3d1be5168117a:

powerpc/83xx/km: drop uneeded dtt_bus environment var (2013-02-15 17:47:21 -0600)

----------------------------------------------------------------
Andreas Huber (2):
km/common: introduce $uimage variable
km/scripts: replace hardcoded uImage

Holger Brunck (12):
km/common: remove unneeded ifdefs for I2C km/common/ivm: remove obsolete code km/common/ivm: remove CONFIG_SYS_I2C_IVM_BUS related code km/common/ivm: rework piggy mac adress offset generation powerpc/83xx: use ppc_6xx as arch variable for kmvect1
kmeter1_nand: allow uasge of NAND_ECC_SOFT_BCH powerpc/83xx: use NAND_ECC_BCH for kmcoge5ne km/common: add eccmode to kernel commandline powerpc/83xx/km: cleanup tuxx1 support powerpc/83xx/km: add support for kmopti2 board powerpc/83xx/km: remove uneeded CONFIG_MISC_INIT_R powerpc/83xx/km: drop uneeded dtt_bus environment var

Karlheinz Jerg (2):
km82xx, km83xx: move ethernet_present() from common to cpu specific powerpc/83xx/km: add MV88E6122 switch support for kmvect1

 board/keymile/common/common.c            |  13 ----
 board/keymile/common/ivm.c               |  48 +++++++-------
 board/keymile/km82xx/km82xx.c            |   8 +++
 board/keymile/km83xx/km83xx.c            | 103 ++++++++++++++++++++++++++++---
 board/keymile/scripts/develop-common.txt |   5 +-
 board/keymile/scripts/ramfs-common.txt   |   5 +-
 boards.cfg                               |   7 ++-
 drivers/mtd/nand/kmeter1_nand.c          |   4 ++
 include/configs/km/keymile-common.h      |  12 +++-
 include/configs/km/km8309-common.h       |   4 +-
 include/configs/km/km8321-common.h       |   2 -
 include/configs/km/km83xx-common.h       |   9 +--
 include/configs/km8360.h                 |   2 +
 include/configs/suvd3.h                  |  37 +++++++++++
 include/configs/tuxx1.h                  |  46 ++++++++++----
 15 files changed, 226 insertions(+), 79 deletions(-)

Thanks,

Kim

#18 lore raw

[U-Boot] [GIT PULL] u-boot-mpc83xx: keymile board updates

Quoted 40 lines · Kim Phillips

Hi Tom,

Please pull the latest set of keymile 83xx board updates:

The following changes since commit 9a82b10c6657c5744802971036bb564ebc660291:

Merge branch 'master' of git://git.denx.de/u-boot (2013-02-15 17:46:50 -0600)

are available in the git repository at:

git://git.denx.de/u-boot-mpc83xx.git master

for you to fetch changes up to 411190cb16b63e39345a608b68b3d1be5168117a:

powerpc/83xx/km: drop uneeded dtt_bus environment var (2013-02-15 17:47:21 -0600)

----------------------------------------------------------------
Andreas Huber (2):
km/common: introduce $uimage variable
km/scripts: replace hardcoded uImage

Holger Brunck (12):
km/common: remove unneeded ifdefs for I2C km/common/ivm: remove obsolete code km/common/ivm: remove CONFIG_SYS_I2C_IVM_BUS related code km/common/ivm: rework piggy mac adress offset generation powerpc/83xx: use ppc_6xx as arch variable for kmvect1
kmeter1_nand: allow uasge of NAND_ECC_SOFT_BCH powerpc/83xx: use NAND_ECC_BCH for kmcoge5ne km/common: add eccmode to kernel commandline powerpc/83xx/km: cleanup tuxx1 support powerpc/83xx/km: add support for kmopti2 board powerpc/83xx/km: remove uneeded CONFIG_MISC_INIT_R powerpc/83xx/km: drop uneeded dtt_bus environment var

Karlheinz Jerg (2):
km82xx, km83xx: move ethernet_present() from common to cpu specific powerpc/83xx/km: add MV88E6122 switch support for kmvect1

Quoted 16 lines
 board/keymile/common/common.c            |  13 ----
 board/keymile/common/ivm.c               |  48 +++++++-------
 board/keymile/km82xx/km82xx.c            |   8 +++
 board/keymile/km83xx/km83xx.c            | 103 ++++++++++++++++++++++++++++---
 board/keymile/scripts/develop-common.txt |   5 +-
 board/keymile/scripts/ramfs-common.txt   |   5 +-
 boards.cfg                               |   7 ++-
 drivers/mtd/nand/kmeter1_nand.c          |   4 ++
 include/configs/km/keymile-common.h      |  12 +++-
 include/configs/km/km8309-common.h       |   4 +-
 include/configs/km/km8321-common.h       |   2 -
 include/configs/km/km83xx-common.h       |   9 +--
 include/configs/km8360.h                 |   2 +
 include/configs/suvd3.h                  |  37 +++++++++++
 include/configs/tuxx1.h                  |  46 ++++++++++----
 15 files changed, 226 insertions(+), 79 deletions(-)

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130218/2123e7ba/attachment.pgp>