All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards
@ 2014-10-12 18:07 Hans de Goede
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 1/6] sunxi: Add mmc card-detect functionality Hans de Goede
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Hans de Goede @ 2014-10-12 18:07 UTC (permalink / raw)
  To: u-boot

Hi Ian,

Here is v3 of my second sdcard slot patch-set.

Changes since v2:
- Rebased on top of latest u-boot-sunxi-next
- Fixed Kconfig help text for : "sunxi: Turn MMC_SUNXI_SLOT_EXTRA into a
  proper Kconfig option" to also mention mmc1
- Added checks for sunxi_mmc_init failing to: "sunxi: When we've both mmc0
  and mmc2, detect from which one we're booting"
- Added a 6th patch with my version of the Kconfig unification, to avoid
  you needing to rebase yours.

I believe this patch is ready to go upstream now, so if I can have your
Acked-by for patches 3 and 6, then I'll push this to next, or you can push
this to next yourself.

Regards,

Hans

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

* [U-Boot] [PATCH v3 1/6] sunxi: Add mmc card-detect functionality
  2014-10-12 18:07 [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards Hans de Goede
@ 2014-10-12 18:07 ` Hans de Goede
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 2/6] sunxi: Turn MMC_SUNXI_SLOT_EXTRA into a proper Kconfig option Hans de Goede
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Hans de Goede @ 2014-10-12 18:07 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
---
 board/sunxi/Kconfig            | 26 ++++++++++++++++++++++++++
 drivers/mmc/sunxi_mmc.c        | 21 +++++++++++++++++++++
 include/configs/sunxi-common.h |  1 +
 3 files changed, 48 insertions(+)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 05defac..63188dd 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -41,4 +41,30 @@ config SYS_SOC
 config FDTFILE
 	string "Default fdtfile env setting for this board"
 
+config MMC0_CD_PIN
+	string "Card detect pin for mmc0"
+	default ""
+	---help---
+	Set the card detect pin for mmc0, leave empty to not use cd. This
+	takes a string in the format understood by sunxi_name_to_gpio, e.g.
+	PH1 for pin 1 of port H.
+
+config MMC1_CD_PIN
+	string "Card detect pin for mmc1"
+	default ""
+	---help---
+	See MMC0_CD_PIN help text.
+
+config MMC2_CD_PIN
+	string "Card detect pin for mmc2"
+	default ""
+	---help---
+	See MMC0_CD_PIN help text.
+
+config MMC3_CD_PIN
+	string "Card detect pin for mmc3"
+	default ""
+	---help---
+	See MMC0_CD_PIN help text.
+
 endif
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index 8f4b50b..b47376a 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -14,7 +14,9 @@
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/cpu.h>
+#include <asm/arch/gpio.h>
 #include <asm/arch/mmc.h>
+#include <asm-generic/gpio.h>
 
 struct sunxi_mmc_host {
 	unsigned mmc_no;
@@ -346,10 +348,29 @@ out:
 	return error;
 }
 
+static int sunxi_mmc_getcd(struct mmc *mmc)
+{
+	struct sunxi_mmc_host *mmchost = mmc->priv;
+	int cd_pin = -1;
+
+	switch (mmchost->mmc_no) {
+	case 0: cd_pin = sunxi_name_to_gpio(CONFIG_MMC0_CD_PIN); break;
+	case 1: cd_pin = sunxi_name_to_gpio(CONFIG_MMC1_CD_PIN); break;
+	case 2: cd_pin = sunxi_name_to_gpio(CONFIG_MMC2_CD_PIN); break;
+	case 3: cd_pin = sunxi_name_to_gpio(CONFIG_MMC3_CD_PIN); break;
+	}
+
+	if (cd_pin == -1)
+		return 1;
+
+	return !gpio_direction_input(cd_pin);
+}
+
 static const struct mmc_ops sunxi_mmc_ops = {
 	.send_cmd	= mmc_send_cmd,
 	.set_ios	= mmc_set_ios,
 	.init		= mmc_core_init,
+	.getcd		= sunxi_mmc_getcd,
 };
 
 int sunxi_mmc_init(int sdc_no)
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index a31656e..24bd22a 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -183,6 +183,7 @@
 
 /* GPIO */
 #define CONFIG_SUNXI_GPIO
+#define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_CMD_GPIO
 
 /* Ethernet support */
-- 
2.1.0

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

* [U-Boot] [PATCH v3 2/6] sunxi: Turn MMC_SUNXI_SLOT_EXTRA into a proper Kconfig option
  2014-10-12 18:07 [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards Hans de Goede
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 1/6] sunxi: Add mmc card-detect functionality Hans de Goede
@ 2014-10-12 18:07 ` Hans de Goede
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 3/6] sunxi: When we've both mmc0 and mmc2, detect from which one we're booting Hans de Goede
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Hans de Goede @ 2014-10-12 18:07 UTC (permalink / raw)
  To: u-boot

Note we also drop the SPL check for initializing the 2nd mmc slot, the SPL
check is not necessary with Kconfig, because only options explicitly marked
as also being for the SPL get set during SPL builds.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
---
 board/sunxi/Kconfig | 8 ++++++++
 board/sunxi/board.c | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 63188dd..552fce8 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -67,4 +67,12 @@ config MMC3_CD_PIN
 	---help---
 	See MMC0_CD_PIN help text.
 
+config MMC_SUNXI_SLOT_EXTRA
+	int "mmc extra slot number"
+	default -1
+	---help---
+	sunxi builds always enable mmc0, some boards also have a second sdcard
+	slot or emmc on mmc1 - mmc3. Setting this to 1, 2 or 3 will enable
+	support for this.
+
 endif
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 2179e23..cfe22b6 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -106,7 +106,7 @@ int board_mmc_init(bd_t *bis)
 {
 	mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT);
 	sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT);
-#if !defined (CONFIG_SPL_BUILD) && defined (CONFIG_MMC_SUNXI_SLOT_EXTRA)
+#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
 	mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT_EXTRA);
 	sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT_EXTRA);
 #endif
-- 
2.1.0

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

* [U-Boot] [PATCH v3 3/6] sunxi: When we've both mmc0 and mmc2, detect from which one we're booting
  2014-10-12 18:07 [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards Hans de Goede
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 1/6] sunxi: Add mmc card-detect functionality Hans de Goede
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 2/6] sunxi: Turn MMC_SUNXI_SLOT_EXTRA into a proper Kconfig option Hans de Goede
@ 2014-10-12 18:07 ` Hans de Goede
  2014-10-12 21:16   ` Ian Campbell
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 4/6] sunxi: Use PG3 - PG8 as io-pins for mmc1 Hans de Goede
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Hans de Goede @ 2014-10-12 18:07 UTC (permalink / raw)
  To: u-boot

sunxi SOCs can boot from both mmc0 and mmc2, detect from which one we're
booting, and make that one "mmc dev 0" so that a single u-boot binary can
be used for both the onboard eMMC and for external sdcards.

When we're booting from mmc2, we make it dev 0 because that is where the SPL
will load the tertiary payload (the actual u-boot binary in our case) from,
see: common/spl/spl_mmc.c, which has dev 0 hardcoded everywhere.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/include/asm/arch-sunxi/mmc.h |  2 +-
 board/sunxi/board.c                   | 30 ++++++++++++++++++++++++++++--
 drivers/mmc/sunxi_mmc.c               |  7 ++-----
 3 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/arch/arm/include/asm/arch-sunxi/mmc.h b/arch/arm/include/asm/arch-sunxi/mmc.h
index 6a31184..70d7875 100644
--- a/arch/arm/include/asm/arch-sunxi/mmc.h
+++ b/arch/arm/include/asm/arch-sunxi/mmc.h
@@ -123,5 +123,5 @@ struct sunxi_mmc {
 #define SUNXI_MMC_IDIE_TXIRQ		(0x1 << 0)
 #define SUNXI_MMC_IDIE_RXIRQ		(0x1 << 1)
 
-int sunxi_mmc_init(int sdc_no);
+struct mmc *sunxi_mmc_init(int sdc_no);
 #endif /* _SUNXI_MMC_H */
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index cfe22b6..f310e8d 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -12,6 +12,7 @@
  */
 
 #include <common.h>
+#include <mmc.h>
 #ifdef CONFIG_AXP152_POWER
 #include <axp152.h>
 #endif
@@ -104,11 +105,36 @@ static void mmc_pinmux_setup(int sdc)
 
 int board_mmc_init(bd_t *bis)
 {
+	__maybe_unused struct mmc *mmc0, *mmc1;
+	__maybe_unused char buf[512];
+
 	mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT);
-	sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT);
+	mmc0 = sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT);
+	if (!mmc0)
+		return -1;
+
 #if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
 	mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT_EXTRA);
-	sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT_EXTRA);
+	mmc1 = sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT_EXTRA);
+	if (!mmc1)
+		return -1;
+#endif
+
+#if CONFIG_MMC_SUNXI_SLOT == 0 && CONFIG_MMC_SUNXI_SLOT_EXTRA == 2
+	/*
+	 * Both mmc0 and mmc2 are bootable, figure out where we're booting
+	 * from. Try mmc0 first, just like the brom does.
+	 */
+	if (mmc_getcd(mmc0) && mmc_init(mmc0) == 0 &&
+	    mmc0->block_dev.block_read(0, 16, 1, buf) == 1) {
+		buf[12] = 0;
+		if (strcmp(&buf[4], "eGON.BT0") == 0)
+			return 0;
+	}
+
+	/* no bootable card in mmc0, so we must be booting from mmc2, swap */
+	mmc0->block_dev.dev = 1;
+	mmc1->block_dev.dev = 0;
 #endif
 
 	return 0;
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index b47376a..d3b1039 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -373,7 +373,7 @@ static const struct mmc_ops sunxi_mmc_ops = {
 	.getcd		= sunxi_mmc_getcd,
 };
 
-int sunxi_mmc_init(int sdc_no)
+struct mmc *sunxi_mmc_init(int sdc_no)
 {
 	struct mmc_config *cfg = &mmc_host[sdc_no].cfg;
 
@@ -396,8 +396,5 @@ int sunxi_mmc_init(int sdc_no)
 	mmc_resource_init(sdc_no);
 	mmc_clk_io_on(sdc_no);
 
-	if (mmc_create(cfg, &mmc_host[sdc_no]) == NULL)
-		return -1;
-
-	return 0;
+	return mmc_create(cfg, &mmc_host[sdc_no]);
 }
-- 
2.1.0

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

* [U-Boot] [PATCH v3 4/6] sunxi: Use PG3 - PG8 as io-pins for mmc1
  2014-10-12 18:07 [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards Hans de Goede
                   ` (2 preceding siblings ...)
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 3/6] sunxi: When we've both mmc0 and mmc2, detect from which one we're booting Hans de Goede
@ 2014-10-12 18:07 ` Hans de Goede
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 5/6] sunxi: Enable second sdcard slot found on some boards Hans de Goede
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Hans de Goede @ 2014-10-12 18:07 UTC (permalink / raw)
  To: u-boot

None of the known sunxi devices actually use mmc1 routed through PH, where
as some devices do actually use mmc1 routed through PG, so change the routing
of mmc1 to PG. If in the future we encounter devices with mmc1 routed through
PH, we will need to change things to be a bit more flexible.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
---
 arch/arm/include/asm/arch-sunxi/gpio.h | 2 ++
 board/sunxi/board.c                    | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h
index ba7e69b..59122db 100644
--- a/arch/arm/include/asm/arch-sunxi/gpio.h
+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
@@ -117,6 +117,8 @@ enum sunxi_gpio_number {
 #define SUN5I_GPB19_UART0_TX	2
 #define SUN5I_GPB20_UART0_RX	2
 
+#define SUN5I_GPG3_SDC1		2
+
 #define SUN5I_GPG3_UART1_TX	4
 #define SUN5I_GPG4_UART1_RX	4
 
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index f310e8d..03890c8 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -71,9 +71,9 @@ static void mmc_pinmux_setup(int sdc)
 		break;
 
 	case 1:
-		/* CMD-PH22, CLK-PH23, D0~D3-PH24~27 : 5 */
-		for (pin = SUNXI_GPH(22); pin <= SUNXI_GPH(27); pin++) {
-			sunxi_gpio_set_cfgpin(pin, SUN4I_GPH22_SDC1);
+		/* CMD-PG3, CLK-PG4, D0~D3-PG5-8 */
+		for (pin = SUNXI_GPG(3); pin <= SUNXI_GPG(8); pin++) {
+			sunxi_gpio_set_cfgpin(pin, SUN5I_GPG3_SDC1);
 			sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);
 			sunxi_gpio_set_drv(pin, 2);
 		}
-- 
2.1.0

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

* [U-Boot] [PATCH v3 5/6] sunxi: Enable second sdcard slot found on some boards
  2014-10-12 18:07 [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards Hans de Goede
                   ` (3 preceding siblings ...)
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 4/6] sunxi: Use PG3 - PG8 as io-pins for mmc1 Hans de Goede
@ 2014-10-12 18:07 ` Hans de Goede
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 6/6] sunxi: Kconfig: Unify sunxi Kconfig code Hans de Goede
  2014-10-12 21:19 ` [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards Ian Campbell
  6 siblings, 0 replies; 15+ messages in thread
From: Hans de Goede @ 2014-10-12 18:07 UTC (permalink / raw)
  To: u-boot

Enable the second sdcard slot found on some boards. Note that we do not
set CONFIG_MMC_SUNXI_SLOT_EXTRA for the SPL, as having it there is not useful,

Except for on the Mele-M3 where the second sdcard is an eMMC, from which the
device can also boot, and there we want to have both in the SPL, so that
a single u-boot binary can both from both. So for the M3 we do prefix the
defconfig setting with the special "+S:" syntax so that it applies to the
SPL too.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
---
 configs/A10s-OLinuXino-M_defconfig    | 3 +++
 configs/A20-OLinuXino_MICRO_defconfig | 3 +++
 configs/Mele_M3_defconfig             | 2 ++
 3 files changed, 8 insertions(+)

diff --git a/configs/A10s-OLinuXino-M_defconfig b/configs/A10s-OLinuXino-M_defconfig
index a578c06..2aad834 100644
--- a/configs/A10s-OLinuXino-M_defconfig
+++ b/configs/A10s-OLinuXino-M_defconfig
@@ -1,5 +1,8 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A10S_OLINUXINO_M,AXP152_POWER,SUNXI_EMAC,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPB(10)"
 CONFIG_FDTFILE="sun5i-a10s-olinuxino-micro.dtb"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=1
++S:CONFIG_MMC0_CD_PIN="PG1"
++S:CONFIG_MMC1_CD_PIN="PG13"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN5I=y
diff --git a/configs/A20-OLinuXino_MICRO_defconfig b/configs/A20-OLinuXino_MICRO_defconfig
index 20a947c..0e0a7de 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -1,5 +1,8 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A20_OLINUXINO_M,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-olinuxino-micro.dtb"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=3
++S:CONFIG_MMC0_CD_PIN="PH1"
++S:CONFIG_MMC3_CD_PIN="PH11"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN7I=y
diff --git a/configs/Mele_M3_defconfig b/configs/Mele_M3_defconfig
index 645b236..a043ad2 100644
--- a/configs/Mele_M3_defconfig
+++ b/configs/Mele_M3_defconfig
@@ -1,5 +1,7 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="MELE_M3,AXP209_POWER,SUNXI_GMAC,USB_EHCI"
 CONFIG_FDTFILE="sun7i-a20-m3.dtb"
++S:CONFIG_MMC_SUNXI_SLOT_EXTRA=2
++S:CONFIG_MMC0_CD_PIN="PH1"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN7I=y
-- 
2.1.0

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

* [U-Boot] [PATCH v3 6/6] sunxi: Kconfig: Unify sunxi Kconfig code
  2014-10-12 18:07 [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards Hans de Goede
                   ` (4 preceding siblings ...)
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 5/6] sunxi: Enable second sdcard slot found on some boards Hans de Goede
@ 2014-10-12 18:07 ` Hans de Goede
  2014-10-12 21:17   ` Ian Campbell
  2014-10-12 21:19 ` [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards Ian Campbell
  6 siblings, 1 reply; 15+ messages in thread
From: Hans de Goede @ 2014-10-12 18:07 UTC (permalink / raw)
  To: u-boot

Unify the sunxi Kconfig code, instead of having seperate code blocks for
each of sun4i, sun5i and sun7i.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 board/sunxi/Kconfig | 32 +++++---------------------------
 1 file changed, 5 insertions(+), 27 deletions(-)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 552fce8..4ac562c 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -1,33 +1,11 @@
-if TARGET_SUN4I
-
-config SYS_CONFIG_NAME
-	default "sun4i"
-
-endif
-
-if TARGET_SUN5I
-
-config SYS_CONFIG_NAME
-	default "sun5i"
-
-endif
-
-if TARGET_SUN6I
+if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
 
 config SYS_CONFIG_NAME
 	string
-	default "sun6i"
-
-endif
-
-if TARGET_SUN7I
-
-config SYS_CONFIG_NAME
-	default "sun7i"
-
-endif
-
-if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
+	default "sun4i" if TARGET_SUN4I
+	default "sun5i" if TARGET_SUN5I
+	default "sun6i" if TARGET_SUN5I
+	default "sun7i" if TARGET_SUN7I
 
 config SYS_CPU
 	default "armv7"
-- 
2.1.0

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

* [U-Boot] [PATCH v3 3/6] sunxi: When we've both mmc0 and mmc2, detect from which one we're booting
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 3/6] sunxi: When we've both mmc0 and mmc2, detect from which one we're booting Hans de Goede
@ 2014-10-12 21:16   ` Ian Campbell
  0 siblings, 0 replies; 15+ messages in thread
From: Ian Campbell @ 2014-10-12 21:16 UTC (permalink / raw)
  To: u-boot

On Sun, 2014-10-12 at 20:07 +0200, Hans de Goede wrote:
> sunxi SOCs can boot from both mmc0 and mmc2, detect from which one we're
> booting, and make that one "mmc dev 0" so that a single u-boot binary can
> be used for both the onboard eMMC and for external sdcards.
> 
> When we're booting from mmc2, we make it dev 0 because that is where the SPL
> will load the tertiary payload (the actual u-boot binary in our case) from,
> see: common/spl/spl_mmc.c, which has dev 0 hardcoded everywhere.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Ian Campbell <ijc@hellion.org.uk>

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

* [U-Boot] [PATCH v3 6/6] sunxi: Kconfig: Unify sunxi Kconfig code
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 6/6] sunxi: Kconfig: Unify sunxi Kconfig code Hans de Goede
@ 2014-10-12 21:17   ` Ian Campbell
  2014-10-21 19:03     ` Ian Campbell
  0 siblings, 1 reply; 15+ messages in thread
From: Ian Campbell @ 2014-10-12 21:17 UTC (permalink / raw)
  To: u-boot

On Sun, 2014-10-12 at 20:07 +0200, Hans de Goede wrote:
> Unify the sunxi Kconfig code, instead of having seperate code blocks for

"separate"

> each of sun4i, sun5i and sun7i.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Looks pretty familiar ;-)

Acked-by: Ian Campbell <ijc@hellion.org.uk>

> ---
>  board/sunxi/Kconfig | 32 +++++---------------------------
>  1 file changed, 5 insertions(+), 27 deletions(-)
> 
> diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
> index 552fce8..4ac562c 100644
> --- a/board/sunxi/Kconfig
> +++ b/board/sunxi/Kconfig
> @@ -1,33 +1,11 @@
> -if TARGET_SUN4I
> -
> -config SYS_CONFIG_NAME
> -	default "sun4i"
> -
> -endif
> -
> -if TARGET_SUN5I
> -
> -config SYS_CONFIG_NAME
> -	default "sun5i"
> -
> -endif
> -
> -if TARGET_SUN6I
> +if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
>  
>  config SYS_CONFIG_NAME
>  	string
> -	default "sun6i"
> -
> -endif
> -
> -if TARGET_SUN7I
> -
> -config SYS_CONFIG_NAME
> -	default "sun7i"
> -
> -endif
> -
> -if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
> +	default "sun4i" if TARGET_SUN4I
> +	default "sun5i" if TARGET_SUN5I
> +	default "sun6i" if TARGET_SUN5I
> +	default "sun7i" if TARGET_SUN7I
>  
>  config SYS_CPU
>  	default "armv7"

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

* [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards
  2014-10-12 18:07 [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards Hans de Goede
                   ` (5 preceding siblings ...)
  2014-10-12 18:07 ` [U-Boot] [PATCH v3 6/6] sunxi: Kconfig: Unify sunxi Kconfig code Hans de Goede
@ 2014-10-12 21:19 ` Ian Campbell
  2014-10-13  4:48   ` Hans de Goede
  6 siblings, 1 reply; 15+ messages in thread
From: Ian Campbell @ 2014-10-12 21:19 UTC (permalink / raw)
  To: u-boot

On Sun, 2014-10-12 at 20:07 +0200, Hans de Goede wrote:
> Hi Ian,
> 
> Here is v3 of my second sdcard slot patch-set.
> 
> Changes since v2:
> - Rebased on top of latest u-boot-sunxi-next
> - Fixed Kconfig help text for : "sunxi: Turn MMC_SUNXI_SLOT_EXTRA into a
>   proper Kconfig option" to also mention mmc1
> - Added checks for sunxi_mmc_init failing to: "sunxi: When we've both mmc0
>   and mmc2, detect from which one we're booting"
> - Added a 6th patch with my version of the Kconfig unification, to avoid
>   you needing to rebase yours.
> 
> I believe this patch is ready to go upstream now, so if I can have your
> Acked-by for patches 3 and 6, then I'll push this to next, or you can push
> this to next yourself.

All Acked. I'm not going to commit tonight and I'm on trains all day
tomorrow (heading to D?sseldorf), unless I hear otherwise I'll assume
you are doing it.

Ian.

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

* [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards
  2014-10-12 21:19 ` [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards Ian Campbell
@ 2014-10-13  4:48   ` Hans de Goede
  2014-10-13  7:00     ` Ian Campbell
  0 siblings, 1 reply; 15+ messages in thread
From: Hans de Goede @ 2014-10-13  4:48 UTC (permalink / raw)
  To: u-boot

Hi,

On 10/12/2014 11:19 PM, Ian Campbell wrote:
> On Sun, 2014-10-12 at 20:07 +0200, Hans de Goede wrote:
>> Hi Ian,
>>
>> Here is v3 of my second sdcard slot patch-set.
>>
>> Changes since v2:
>> - Rebased on top of latest u-boot-sunxi-next
>> - Fixed Kconfig help text for : "sunxi: Turn MMC_SUNXI_SLOT_EXTRA into a
>>   proper Kconfig option" to also mention mmc1
>> - Added checks for sunxi_mmc_init failing to: "sunxi: When we've both mmc0
>>   and mmc2, detect from which one we're booting"
>> - Added a 6th patch with my version of the Kconfig unification, to avoid
>>   you needing to rebase yours.
>>
>> I believe this patch is ready to go upstream now, so if I can have your
>> Acked-by for patches 3 and 6, then I'll push this to next, or you can push
>> this to next yourself.
> 
> All Acked. I'm not going to commit tonight and I'm on trains all day
> tomorrow (heading to D?sseldorf), unless I hear otherwise I'll assume
> you are doing it.

Done.

And good to hear that you're heading over to Dusseldorf too. I'll be at the
u-boot mini-summit the entire day today (currently in the train towards
Dusseldorf). We definitely should get together, even if just to say hi :)

Maybe I'll see you at the u-boot mini-summit ? If you cannot make it,
maybe you can make the u-boot dinner tonight ?  :

http://www.denx.de/wiki/U-Boot/MiniSummitELCE2014

Regards,

Hans

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

* [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards
  2014-10-13  4:48   ` Hans de Goede
@ 2014-10-13  7:00     ` Ian Campbell
  0 siblings, 0 replies; 15+ messages in thread
From: Ian Campbell @ 2014-10-13  7:00 UTC (permalink / raw)
  To: u-boot

On Mon, 2014-10-13 at 06:48 +0200, Hans de Goede wrote:
> Hi,
> 
> On 10/12/2014 11:19 PM, Ian Campbell wrote:
> > On Sun, 2014-10-12 at 20:07 +0200, Hans de Goede wrote:
> >> Hi Ian,
> >>
> >> Here is v3 of my second sdcard slot patch-set.
> >>
> >> Changes since v2:
> >> - Rebased on top of latest u-boot-sunxi-next
> >> - Fixed Kconfig help text for : "sunxi: Turn MMC_SUNXI_SLOT_EXTRA into a
> >>   proper Kconfig option" to also mention mmc1
> >> - Added checks for sunxi_mmc_init failing to: "sunxi: When we've both mmc0
> >>   and mmc2, detect from which one we're booting"
> >> - Added a 6th patch with my version of the Kconfig unification, to avoid
> >>   you needing to rebase yours.
> >>
> >> I believe this patch is ready to go upstream now, so if I can have your
> >> Acked-by for patches 3 and 6, then I'll push this to next, or you can push
> >> this to next yourself.
> > 
> > All Acked. I'm not going to commit tonight and I'm on trains all day
> > tomorrow (heading to D?sseldorf), unless I hear otherwise I'll assume
> > you are doing it.
> 
> Done.
> 
> And good to hear that you're heading over to Dusseldorf too. I'll be at the
> u-boot mini-summit the entire day today (currently in the train towards
> Dusseldorf). We definitely should get together, even if just to say hi :)

Absolutely. I'm in town all week for LPC and plumbers.

> Maybe I'll see you at the u-boot mini-summit ? If you cannot make it,
> maybe you can make the u-boot dinner tonight ?  :

I should be arriving not long after 5, so I think it's doubtful I'll
make the mini-summit, with finding my hotel etc. I didn't know about the
evening bit, now that I do I'll try and make it down.

Ian.
> 
> http://www.denx.de/wiki/U-Boot/MiniSummitELCE2014
> 
> Regards,
> 
> Hans
> 

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

* [U-Boot] [PATCH v3 6/6] sunxi: Kconfig: Unify sunxi Kconfig code
  2014-10-12 21:17   ` Ian Campbell
@ 2014-10-21 19:03     ` Ian Campbell
  2014-10-21 19:25       ` Tom Rini
  2014-10-22 12:18       ` Hans de Goede
  0 siblings, 2 replies; 15+ messages in thread
From: Ian Campbell @ 2014-10-21 19:03 UTC (permalink / raw)
  To: u-boot

On Sun, 2014-10-12 at 22:17 +0100, Ian Campbell wrote:
> > -if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
> > +	default "sun4i" if TARGET_SUN4I
> > +	default "sun5i" if TARGET_SUN5I
> > +	default "sun6i" if TARGET_SUN5I

There is a typo here which is apparent with "MAKEALL -s sunxi", since it
causes Colombus_defconfig not to build.

Patch is below but given the breakage is only in u-boot-sunxi.git#next
right now I think it would be better to fold it into the original patch.

Ian.

8<----------------------------

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

* [U-Boot] [PATCH v3 6/6] sunxi: Kconfig: Unify sunxi Kconfig code
  2014-10-21 19:03     ` Ian Campbell
@ 2014-10-21 19:25       ` Tom Rini
  2014-10-22 12:18       ` Hans de Goede
  1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2014-10-21 19:25 UTC (permalink / raw)
  To: u-boot

On Tue, Oct 21, 2014 at 08:03:59PM +0100, Ian Campbell wrote:
> On Sun, 2014-10-12 at 22:17 +0100, Ian Campbell wrote:
> > > -if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
> > > +	default "sun4i" if TARGET_SUN4I
> > > +	default "sun5i" if TARGET_SUN5I
> > > +	default "sun6i" if TARGET_SUN5I
> 
> There is a typo here which is apparent with "MAKEALL -s sunxi", since it
> causes Colombus_defconfig not to build.
> 
> Patch is below but given the breakage is only in u-boot-sunxi.git#next
> right now I think it would be better to fold it into the original patch.

Yes, fold it in, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141021/d5698803/attachment.pgp>

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

* [U-Boot] [PATCH v3 6/6] sunxi: Kconfig: Unify sunxi Kconfig code
  2014-10-21 19:03     ` Ian Campbell
  2014-10-21 19:25       ` Tom Rini
@ 2014-10-22 12:18       ` Hans de Goede
  1 sibling, 0 replies; 15+ messages in thread
From: Hans de Goede @ 2014-10-22 12:18 UTC (permalink / raw)
  To: u-boot

Hi,

On 10/21/2014 09:03 PM, Ian Campbell wrote:
> On Sun, 2014-10-12 at 22:17 +0100, Ian Campbell wrote:
>>> -if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
>>> +	default "sun4i" if TARGET_SUN4I
>>> +	default "sun5i" if TARGET_SUN5I
>>> +	default "sun6i" if TARGET_SUN5I
> 
> There is a typo here which is apparent with "MAKEALL -s sunxi", since it
> causes Colombus_defconfig not to build.
> 
> Patch is below but given the breakage is only in u-boot-sunxi.git#next
> right now I think it would be better to fold it into the original patch.

Good catch thanks, I've squashed this into the original commit and
done a forced push to u-boot-sunxi/next with this.

Regards,

Hans

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

end of thread, other threads:[~2014-10-22 12:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-12 18:07 [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards Hans de Goede
2014-10-12 18:07 ` [U-Boot] [PATCH v3 1/6] sunxi: Add mmc card-detect functionality Hans de Goede
2014-10-12 18:07 ` [U-Boot] [PATCH v3 2/6] sunxi: Turn MMC_SUNXI_SLOT_EXTRA into a proper Kconfig option Hans de Goede
2014-10-12 18:07 ` [U-Boot] [PATCH v3 3/6] sunxi: When we've both mmc0 and mmc2, detect from which one we're booting Hans de Goede
2014-10-12 21:16   ` Ian Campbell
2014-10-12 18:07 ` [U-Boot] [PATCH v3 4/6] sunxi: Use PG3 - PG8 as io-pins for mmc1 Hans de Goede
2014-10-12 18:07 ` [U-Boot] [PATCH v3 5/6] sunxi: Enable second sdcard slot found on some boards Hans de Goede
2014-10-12 18:07 ` [U-Boot] [PATCH v3 6/6] sunxi: Kconfig: Unify sunxi Kconfig code Hans de Goede
2014-10-12 21:17   ` Ian Campbell
2014-10-21 19:03     ` Ian Campbell
2014-10-21 19:25       ` Tom Rini
2014-10-22 12:18       ` Hans de Goede
2014-10-12 21:19 ` [U-Boot] [PATCH v3 0/6] sunxi: Enable second sdcard slot found on some boards Ian Campbell
2014-10-13  4:48   ` Hans de Goede
2014-10-13  7:00     ` Ian Campbell

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.