All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C
@ 2013-01-21 13:55 Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 02/16] km/common/ivm: remove obsolete code Holger Brunck
                   ` (15 more replies)
  0 siblings, 16 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
Changes for v2:
    - fix typo in commit message

 board/keymile/common/common.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index 6f407b7..468c755 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -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);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 02/16] km/common/ivm: remove obsolete code
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 03/16] km/common/ivm: remove CONFIG_SYS_I2C_IVM_BUS related code Holger Brunck
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
Changes for v2:
    - none

 board/keymile/common/ivm.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c
index eaa924f..7fe3b0f 100644
--- a/board/keymile/common/ivm.c
+++ b/board/keymile/common/ivm.c
@@ -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();
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 03/16] km/common/ivm: remove CONFIG_SYS_I2C_IVM_BUS related code
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 02/16] km/common/ivm: remove obsolete code Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 04/16] km82xx, km83xx: move ethernet_present() from common to cpu specific Holger Brunck
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
Changes for v2:
    - none

 board/keymile/common/ivm.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c
index 7fe3b0f..607daa6 100644
--- a/board/keymile/common/ivm.c
+++ b/board/keymile/common/ivm.c
@@ -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;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 04/16] km82xx, km83xx: move ethernet_present() from common to cpu specific
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 02/16] km/common/ivm: remove obsolete code Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 03/16] km/common/ivm: remove CONFIG_SYS_I2C_IVM_BUS related code Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 05/16] km/common/ivm: rework piggy mac adress offset generation Holger Brunck
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

From: Karlheinz Jerg <karlheinz.jerg@keymile.com>

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.

Signed-off-by: Karlheinz Jerg <karlheinz.jerg@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
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(-)

diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index 468c755..ef93ed3 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -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())
diff --git a/board/keymile/km82xx/km82xx.c b/board/keymile/km82xx/km82xx.c
index 67b69f6..defc885 100644
--- a/board/keymile/km82xx/km82xx.c
+++ b/board/keymile/km82xx/km82xx.c
@@ -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.
  */
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index 83a8753..b027173 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -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;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 05/16] km/common/ivm: rework piggy mac adress offset generation
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
                   ` (2 preceding siblings ...)
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 04/16] km82xx, km83xx: move ethernet_present() from common to cpu specific Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 06/16] powerpc/83xx/km: add MV88E6122 switch support for kmvect1 Holger Brunck
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
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(-)

diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c
index 607daa6..d568fd9 100644
--- a/board/keymile/common/ivm.c
+++ b/board/keymile/common/ivm.c
@@ -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
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 06/16] powerpc/83xx/km: add MV88E6122 switch support for kmvect1
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
                   ` (3 preceding siblings ...)
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 05/16] km/common/ivm: rework piggy mac adress offset generation Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 07/16] powerpc/83xx: use ppc_6xx as arch variable " Holger Brunck
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

From: Karlheinz Jerg <karlheinz.jerg@keymile.com>

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.

Signed-off-by: Karlheinz Jerg <karlheinz.jerg@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
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(-)

diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c
index d568fd9..22d5256 100644
--- a/board/keymile/common/ivm.c
+++ b/board/keymile/common/ivm.c
@@ -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) +
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index b027173..1e8e2cc 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -215,8 +215,75 @@ int misc_init_r(void)
 	return 0;
 }
 
+#if defined(CONFIG_KMVECT1)
+#include <mv88e6352.h>
+/* Marvell MV88E6122 switch configuration */
+static struct mv88e_sw_reg extsw_conf[] = {
+	/* port 1, FRONT_MDI, autoneg */
+	{ PORT(1), PORT_PHY, NO_SPEED_FOR },
+	{ PORT(1), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+	{ PHY(1), PHY_1000_CTRL, NO_ADV },
+	{ PHY(1), PHY_SPEC_CTRL, AUTO_MDIX_EN },
+	{ PHY(1), PHY_CTRL, PHY_100_MBPS | AUTONEG_EN | AUTONEG_RST |
+		FULL_DUPLEX },
+	/* port 2, unused */
+	{ PORT(2), PORT_CTRL, PORT_DIS },
+	{ PHY(2), PHY_CTRL, PHY_PWR_DOWN },
+	{ PHY(2), PHY_SPEC_CTRL, SPEC_PWR_DOWN },
+	/* port 3, BP_MII (CPU), PHY mode, 100BASE */
+	{ PORT(3), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+	/* port 4, ESTAR to slot 11, SerDes, 1000BASE-X */
+	{ PORT(4), PORT_STATUS, NO_PHY_DETECT },
+	{ PORT(4), PORT_PHY, SPEED_1000_FOR },
+	{ PORT(4), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+	/* port 5, ESTAR to slot 13, SerDes, 1000BASE-X */
+	{ PORT(5), PORT_STATUS, NO_PHY_DETECT },
+	{ PORT(5), PORT_PHY, SPEED_1000_FOR },
+	{ PORT(5), PORT_CTRL, FORWARDING | EGRS_FLD_ALL },
+	/*
+	 * Errata Fix: 1.9V Output from Internal 1.8V Regulator,
+	 * acc . MV-S300889-00D.pdf , clause 4.5
+	 */
+	{ PORT(5), 0x1A, 0xADB1 },
+	/* port 6, unused, this port has no phy */
+	{ PORT(6), PORT_CTRL, PORT_DIS },
+};
+#endif
+
 int last_stage_init(void)
 {
+#if defined(CONFIG_KMVECT1)
+	struct km_bec_fpga __iomem *base =
+		(struct km_bec_fpga __iomem *)CONFIG_SYS_KMBEC_FPGA_BASE;
+	u8 tmp_reg;
+
+	/* Release mv88e6122 from reset */
+	tmp_reg = in_8(&base->res1[0]) | 0x10; /* DIRECT3 register */
+	out_8(&base->res1[0], tmp_reg);	       /* GP28 as output */
+	tmp_reg = in_8(&base->gprt3) | 0x10;   /* GP28 to high */
+	out_8(&base->gprt3, tmp_reg);
+
+	/* configure MV88E6122 switch */
+	char *name = "UEC2";
+
+	if (miiphy_set_current_dev(name))
+		return 0;
+
+	mv88e_sw_program(name, CONFIG_KM_MVEXTSW_ADDR, extsw_conf,
+		ARRAY_SIZE(extsw_conf));
+
+	mv88e_sw_reset(name, CONFIG_KM_MVEXTSW_ADDR);
+
+	if (piggy_present()) {
+		setenv("ethact", "UEC2");
+		setenv("netdev", "eth1");
+		puts("using PIGGY for network boot\n");
+	} else {
+		setenv("netdev", "eth0");
+		puts("using frontport for network boot\n");
+	}
+#endif
+
 #if defined(CONFIG_KMCOGE5NE)
 	struct bfticu_iomap *base =
 		(struct bfticu_iomap *)CONFIG_SYS_BFTIC3_BASE;
diff --git a/include/configs/km/km83xx-common.h b/include/configs/km/km83xx-common.h
index a9823d6..1e596c8 100644
--- a/include/configs/km/km83xx-common.h
+++ b/include/configs/km/km83xx-common.h
@@ -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
diff --git a/include/configs/suvd3.h b/include/configs/suvd3.h
index c50832c..bbf9da5 100644
--- a/include/configs/suvd3.h
+++ b/include/configs/suvd3.h
@@ -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 */
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 07/16] powerpc/83xx: use ppc_6xx as arch variable for kmvect1
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
                   ` (4 preceding siblings ...)
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 06/16] powerpc/83xx/km: add MV88E6122 switch support for kmvect1 Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 08/16] km/common: introduce $uimage variable Holger Brunck
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
Changes for v2:
    - none

 include/configs/km/km8309-common.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/configs/km/km8309-common.h b/include/configs/km/km8309-common.h
index b36e892..7bd1e92 100644
--- a/include/configs/km/km8309-common.h
+++ b/include/configs/km/km8309-common.h
@@ -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 */
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 08/16] km/common: introduce $uimage variable
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
                   ` (5 preceding siblings ...)
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 07/16] powerpc/83xx: use ppc_6xx as arch variable " Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 09/16] km/scripts: replace hardcoded uImage Holger Brunck
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

From: Andreas Huber <andreas.huber@keymile.com>

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).

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
Changes for v2:
    - none

 include/configs/km/keymile-common.h |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index f64748e..ae88759 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -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
 
 /*
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 09/16] km/scripts: replace hardcoded uImage
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
                   ` (6 preceding siblings ...)
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 08/16] km/common: introduce $uimage variable Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 10/16] kmeter1_nand: allow uasge of NAND_ECC_SOFT_BCH Holger Brunck
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

From: Andreas Huber <andreas.huber@keymile.com>

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

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
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(-)

diff --git a/board/keymile/scripts/develop-common.txt b/board/keymile/scripts/develop-common.txt
index aa3d659..a6bb1b1 100644
--- a/board/keymile/scripts/develop-common.txt
+++ b/board/keymile/scripts/develop-common.txt
@@ -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
diff --git a/board/keymile/scripts/ramfs-common.txt b/board/keymile/scripts/ramfs-common.txt
index c1b45ab..8a8d287 100644
--- a/board/keymile/scripts/ramfs-common.txt
+++ b/board/keymile/scripts/ramfs-common.txt
@@ -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
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 10/16] kmeter1_nand: allow uasge of NAND_ECC_SOFT_BCH
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
                   ` (7 preceding siblings ...)
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 09/16] km/scripts: replace hardcoded uImage Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 11/16] powerpc/83xx: use NAND_ECC_BCH for kmcoge5ne Holger Brunck
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Scott Wood <scottwood@freescale.com>
---
Changes for v2:
    - add Acked-by: Scott Wood

 drivers/mtd/nand/kmeter1_nand.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/kmeter1_nand.c b/drivers/mtd/nand/kmeter1_nand.c
index e8e5b7b..f044597 100644
--- a/drivers/mtd/nand/kmeter1_nand.c
+++ b/drivers/mtd/nand/kmeter1_nand.c
@@ -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;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 11/16] powerpc/83xx: use NAND_ECC_BCH for kmcoge5ne
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
                   ` (8 preceding siblings ...)
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 10/16] kmeter1_nand: allow uasge of NAND_ECC_SOFT_BCH Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 12/16] km/common: add eccmode to kernel commandline Holger Brunck
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
Changes for v2:
    - none

 include/configs/km8360.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/configs/km8360.h b/include/configs/km8360.h
index 7631ab6..5b191bc 100644
--- a/include/configs/km8360.h
+++ b/include/configs/km8360.h
@@ -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
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 12/16] km/common: add eccmode to kernel commandline
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
                   ` (9 preceding siblings ...)
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 11/16] powerpc/83xx: use NAND_ECC_BCH for kmcoge5ne Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 13/16] powerpc/83xx/km: cleanup tuxx1 support Holger Brunck
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
Changes for v2:
    - none

 include/configs/km/keymile-common.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index ae88759..796f330 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -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				\
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 13/16] powerpc/83xx/km: cleanup tuxx1 support
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
                   ` (10 preceding siblings ...)
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 12/16] km/common: add eccmode to kernel commandline Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 14/16] powerpc/83xx/km: add support for kmopti2 board Holger Brunck
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
Changes for v2:
    - none

 boards.cfg              |    6 +++---
 include/configs/tuxx1.h |   17 +++++++++--------
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/boards.cfg b/boards.cfg
index e4b0d44..1c78991 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -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
diff --git a/include/configs/tuxx1.h b/include/configs/tuxx1.h
index 90d2e61..3997717 100644
--- a/include/configs/tuxx1.h
+++ b/include/configs/tuxx1.h
@@ -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
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 14/16] powerpc/83xx/km: add support for kmopti2 board
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
                   ` (11 preceding siblings ...)
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 13/16] powerpc/83xx/km: cleanup tuxx1 support Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 15/16] powerpc/83xx/km: remove uneeded CONFIG_MISC_INIT_R Holger Brunck
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
Changes for v2:
    - none

 boards.cfg              |    1 +
 include/configs/tuxx1.h |   31 +++++++++++++++++++++++++------
 2 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/boards.cfg b/boards.cfg
index 1c78991..01acf19 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -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
diff --git a/include/configs/tuxx1.h b/include/configs/tuxx1.h
index 3997717..6caf23a 100644
--- a/include/configs/tuxx1.h
+++ b/include/configs/tuxx1.h
@@ -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
  */
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 15/16] powerpc/83xx/km: remove uneeded CONFIG_MISC_INIT_R
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
                   ` (12 preceding siblings ...)
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 14/16] powerpc/83xx/km: add support for kmopti2 board Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 16/16] powerpc/83xx/km: drop uneeded dtt_bus environment var Holger Brunck
  2013-02-15 23:53 ` [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Kim Phillips
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
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(-)

diff --git a/include/configs/km/km8309-common.h b/include/configs/km/km8309-common.h
index 7bd1e92..7f9cffa 100644
--- a/include/configs/km/km8309-common.h
+++ b/include/configs/km/km8309-common.h
@@ -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
  */
diff --git a/include/configs/km/km8321-common.h b/include/configs/km/km8321-common.h
index 8ad6fc3..abb9081 100644
--- a/include/configs/km/km8321-common.h
+++ b/include/configs/km/km8321-common.h
@@ -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
  */
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 16/16] powerpc/83xx/km: drop uneeded dtt_bus environment var
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
                   ` (13 preceding siblings ...)
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 15/16] powerpc/83xx/km: remove uneeded CONFIG_MISC_INIT_R Holger Brunck
@ 2013-01-21 13:55 ` Holger Brunck
  2013-02-15 23:53 ` [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Kim Phillips
  15 siblings, 0 replies; 19+ messages in thread
From: Holger Brunck @ 2013-01-21 13:55 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
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(-)

diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index 1e8e2cc..faaa39b 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -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;
 }
 
diff --git a/include/configs/km/km83xx-common.h b/include/configs/km/km83xx-common.h
index 1e596c8..eb0e5b6 100644
--- a/include/configs/km/km83xx-common.h
+++ b/include/configs/km/km83xx-common.h
@@ -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 && "			\
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C
  2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
                   ` (14 preceding siblings ...)
  2013-01-21 13:55 ` [U-Boot] [PATCH v2 16/16] powerpc/83xx/km: drop uneeded dtt_bus environment var Holger Brunck
@ 2013-02-15 23:53 ` Kim Phillips
  2013-02-15 23:59   ` [U-Boot] [GIT PULL] u-boot-mpc83xx: keymile board updates Kim Phillips
  15 siblings, 1 reply; 19+ messages in thread
From: Kim Phillips @ 2013-02-15 23:53 UTC (permalink / raw)
  To: u-boot

On Mon, 21 Jan 2013 14:55:13 +0100
Holger Brunck <holger.brunck@keymile.com> wrote:

> All boards from this serie use i2c. There is no need to #ifdef the
> header.
> 
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> ---

applied 16 out of 16 patches.

Thanks,

Kim

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [GIT PULL] u-boot-mpc83xx: keymile board updates
  2013-02-15 23:53 ` [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Kim Phillips
@ 2013-02-15 23:59   ` Kim Phillips
  2013-02-18 23:52     ` Tom Rini
  0 siblings, 1 reply; 19+ messages in thread
From: Kim Phillips @ 2013-02-15 23:59 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [GIT PULL] u-boot-mpc83xx: keymile board updates
  2013-02-15 23:59   ` [U-Boot] [GIT PULL] u-boot-mpc83xx: keymile board updates Kim Phillips
@ 2013-02-18 23:52     ` Tom Rini
  0 siblings, 0 replies; 19+ messages in thread
From: Tom Rini @ 2013-02-18 23:52 UTC (permalink / raw)
  To: u-boot

On Fri, Feb 15, 2013 at 05:59:44PM -0600, Kim Phillips wrote:

> 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(-)

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-02-18 23:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-21 13:55 [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 02/16] km/common/ivm: remove obsolete code Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 03/16] km/common/ivm: remove CONFIG_SYS_I2C_IVM_BUS related code Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 04/16] km82xx, km83xx: move ethernet_present() from common to cpu specific Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 05/16] km/common/ivm: rework piggy mac adress offset generation Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 06/16] powerpc/83xx/km: add MV88E6122 switch support for kmvect1 Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 07/16] powerpc/83xx: use ppc_6xx as arch variable " Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 08/16] km/common: introduce $uimage variable Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 09/16] km/scripts: replace hardcoded uImage Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 10/16] kmeter1_nand: allow uasge of NAND_ECC_SOFT_BCH Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 11/16] powerpc/83xx: use NAND_ECC_BCH for kmcoge5ne Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 12/16] km/common: add eccmode to kernel commandline Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 13/16] powerpc/83xx/km: cleanup tuxx1 support Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 14/16] powerpc/83xx/km: add support for kmopti2 board Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 15/16] powerpc/83xx/km: remove uneeded CONFIG_MISC_INIT_R Holger Brunck
2013-01-21 13:55 ` [U-Boot] [PATCH v2 16/16] powerpc/83xx/km: drop uneeded dtt_bus environment var Holger Brunck
2013-02-15 23:53 ` [U-Boot] [PATCH v2 01/16] km/common: remove unneeded ifdefs for I2C Kim Phillips
2013-02-15 23:59   ` [U-Boot] [GIT PULL] u-boot-mpc83xx: keymile board updates Kim Phillips
2013-02-18 23:52     ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.