public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V2 0/2] sunxi: support for a second SD card socket
@ 2015-12-16 19:59 Karsten Merker
  2015-12-16 19:59 ` [U-Boot] [PATCH V2 1/2] sunxi: A20-Olimex-SOM-EVB defconfig: enable mmc3 Karsten Merker
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Karsten Merker @ 2015-12-16 19:59 UTC (permalink / raw)
  To: u-boot

Hello,

this patchset enables the full-size SD card socket on the
A20-Olimex-SOM-EVB baseboard in u-boot and adds support for
including this kind of secondary socket into the boot environment
provided by config_distro_bootcmd.h on sunxi-based systems.

The latter is particularly useful on the A20-Olimex-SOM-EVB as
changing the card in the primary micro-SD socket is kind of
fiddly when the SOM is plugged into the baseboard.

Changes since V1:
I had botched the patch generation for V1 so that the posted
patch was incomplete. This is now the complete patch.

Regards,
Karsten

Karsten Merker (2):
  sunxi: A20-Olimex-SOM-EVB defconfig: enable mmc3
  sunxi: Enable a second mmc socket as boot target in the environment

 configs/A20-Olimex-SOM-EVB_defconfig | 3 +++
 include/configs/sunxi-common.h       | 7 +++++++
 2 files changed, 10 insertions(+)

-- 
2.1.4

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

* [U-Boot] [PATCH V2 1/2] sunxi: A20-Olimex-SOM-EVB defconfig: enable mmc3
  2015-12-16 19:59 [U-Boot] [PATCH V2 0/2] sunxi: support for a second SD card socket Karsten Merker
@ 2015-12-16 19:59 ` Karsten Merker
  2015-12-16 19:59 ` [U-Boot] [PATCH V2 2/2] sunxi: Enable a second mmc socket as boot target in the environment Karsten Merker
  2015-12-20 15:42 ` [U-Boot] [linux-sunxi] [PATCH V2 0/2] sunxi: support for a second SD card socket Hans de Goede
  2 siblings, 0 replies; 4+ messages in thread
From: Karsten Merker @ 2015-12-16 19:59 UTC (permalink / raw)
  To: u-boot

The Olimex A20-SOM-EVB is an evaluation board for the Olimex
A20-SOM system-on-module. The baseboard provides a full-size SD
socket (connected to mmc3) in addition to the micro-SD socket on
the SOM itself (which is connected to mmc0).

Enable the mmc3 controller in the board defconfig.

Signed-off-by: Karsten Merker <merker@debian.org>
---
 configs/A20-Olimex-SOM-EVB_defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configs/A20-Olimex-SOM-EVB_defconfig b/configs/A20-Olimex-SOM-EVB_defconfig
index 5166c06..34b3f36 100644
--- a/configs/A20-Olimex-SOM-EVB_defconfig
+++ b/configs/A20-Olimex-SOM-EVB_defconfig
@@ -3,6 +3,9 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=480
 CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_MMC3_CD_PIN="PH0"
+CONFIG_MMC3_PINS="PH"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 CONFIG_USB0_VBUS_PIN="PB9"
 CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb"
-- 
2.1.4

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

* [U-Boot] [PATCH V2 2/2] sunxi: Enable a second mmc socket as boot target in the environment
  2015-12-16 19:59 [U-Boot] [PATCH V2 0/2] sunxi: support for a second SD card socket Karsten Merker
  2015-12-16 19:59 ` [U-Boot] [PATCH V2 1/2] sunxi: A20-Olimex-SOM-EVB defconfig: enable mmc3 Karsten Merker
@ 2015-12-16 19:59 ` Karsten Merker
  2015-12-20 15:42 ` [U-Boot] [linux-sunxi] [PATCH V2 0/2] sunxi: support for a second SD card socket Hans de Goede
  2 siblings, 0 replies; 4+ messages in thread
From: Karsten Merker @ 2015-12-16 19:59 UTC (permalink / raw)
  To: u-boot

Some sunxi-based boards (such as the Olimex A20-SOM-EVB) have a
second MMC socket. This socket is not bootable hardware-wise,
i.e. u-boot itself cannot be loaded from it, but once u-boot has
started, the second socket can be used in the boot process
provided by config_distro_bootcmd.h.

If a second MMC socket is present, place it in the boot order
after the first MMC socket.

Signed-off-by: Karsten Merker <merker@debian.org>
---
 include/configs/sunxi-common.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 98a2c74..33f765c 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -418,8 +418,14 @@ extern int soft_i2c_gpio_scl;
 
 #ifdef CONFIG_MMC
 #define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0)
+#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
+#define BOOT_TARGET_DEVICES_MMC_EXTRA(func) func(MMC, mmc, 1)
+#else
+#define BOOT_TARGET_DEVICES_MMC_EXTRA(func)
+#endif
 #else
 #define BOOT_TARGET_DEVICES_MMC(func)
+#define BOOT_TARGET_DEVICES_MMC_EXTRA(func)
 #endif
 
 #ifdef CONFIG_AHCI
@@ -447,6 +453,7 @@ extern int soft_i2c_gpio_scl;
 #define BOOT_TARGET_DEVICES(func) \
 	func(FEL, fel, na) \
 	BOOT_TARGET_DEVICES_MMC(func) \
+	BOOT_TARGET_DEVICES_MMC_EXTRA(func) \
 	BOOT_TARGET_DEVICES_SCSI(func) \
 	BOOT_TARGET_DEVICES_USB(func) \
 	func(PXE, pxe, na) \
-- 
2.1.4

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

* [U-Boot] [linux-sunxi] [PATCH V2 0/2] sunxi: support for a second SD card socket
  2015-12-16 19:59 [U-Boot] [PATCH V2 0/2] sunxi: support for a second SD card socket Karsten Merker
  2015-12-16 19:59 ` [U-Boot] [PATCH V2 1/2] sunxi: A20-Olimex-SOM-EVB defconfig: enable mmc3 Karsten Merker
  2015-12-16 19:59 ` [U-Boot] [PATCH V2 2/2] sunxi: Enable a second mmc socket as boot target in the environment Karsten Merker
@ 2015-12-20 15:42 ` Hans de Goede
  2 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2015-12-20 15:42 UTC (permalink / raw)
  To: u-boot

Hi,

On 16-12-15 20:59, Karsten Merker wrote:
> Hello,
>
> this patchset enables the full-size SD card socket on the
> A20-Olimex-SOM-EVB baseboard in u-boot and adds support for
> including this kind of secondary socket into the boot environment
> provided by config_distro_bootcmd.h on sunxi-based systems.
>
> The latter is particularly useful on the A20-Olimex-SOM-EVB as
> changing the card in the primary micro-SD socket is kind of
> fiddly when the SOM is plugged into the baseboard.
>
> Changes since V1:
> I had botched the patch generation for V1 so that the posted
> patch was incomplete. This is now the complete patch.

Thanks, both patches look good to me. I've added them to my sunxi-wip
tree (for now) and I will include them in the next sunxi pull-req.

Regards,

Hans

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

end of thread, other threads:[~2015-12-20 15:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-16 19:59 [U-Boot] [PATCH V2 0/2] sunxi: support for a second SD card socket Karsten Merker
2015-12-16 19:59 ` [U-Boot] [PATCH V2 1/2] sunxi: A20-Olimex-SOM-EVB defconfig: enable mmc3 Karsten Merker
2015-12-16 19:59 ` [U-Boot] [PATCH V2 2/2] sunxi: Enable a second mmc socket as boot target in the environment Karsten Merker
2015-12-20 15:42 ` [U-Boot] [linux-sunxi] [PATCH V2 0/2] sunxi: support for a second SD card socket Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox