public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 3/3] sunxi:Added difference MMC SLOT for booting
@ 2015-06-29  9:48 =?gb18030?B?vNPM2Ly8tcTQpMzYu/k=?=
  2015-07-05 19:17 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: =?gb18030?B?vNPM2Ly8tcTQpMzYu/k=?= @ 2015-06-29  9:48 UTC (permalink / raw)
  To: u-boot



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

* [U-Boot] [PATCH 3/3] sunxi:Added difference MMC SLOT for booting
  2015-06-29  9:48 [U-Boot] [PATCH 3/3] sunxi:Added difference MMC SLOT for booting =?gb18030?B?vNPM2Ly8tcTQpMzYu/k=?=
@ 2015-07-05 19:17 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2015-07-05 19:17 UTC (permalink / raw)
  To: u-boot

Hi,

On 29-06-15 11:48, ??????? wrote:
>  From 94a30632fb9db555b8dbfac4e46c922c73371960 Mon Sep 17 00:00:00 2001
> From: Zhi Yuan Wan <dv.xw@qq.com>
> Date: Thu, 25 Jun 2015 20:03:58 +0800
> Subject: [PATCH 3/3] sunxi:Added difference MMC SLOT for booting
>   Signed-off-by: Zhi Yuan Wan <dv.xw@qq.com>
>

There is a much simpler / easier way to do this, simply add a:

CONFIG_MMC_SUNXI_SLOT_EXTRA=2

Line to the defconfig, then an u-boot will be build which supports
booting from both the external sdcard slot as well as from the
emmc, and it will figure out where it is booting from and use
that as bootdevice itself.

Regards,

Hans


> ---
>   board/sunxi/Kconfig            |    6 ++++++
>   configs/Mele_I7_SD2_defconfig  |   16 ++++++++++++++++
>   include/configs/sunxi-common.h |    2 ++
>   3 files changed, 24 insertions(+)
>   create mode 100644 configs/Mele_I7_SD2_defconfig
>
> diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
> index b2eca51..b711542 100644
> --- a/board/sunxi/Kconfig
> +++ b/board/sunxi/Kconfig
> @@ -280,6 +280,12 @@ config MMC_SUNXI_SLOT_EXTRA
>       slot or emmc on mmc1 - mmc3. Setting this to 1, 2 or 3 will enable
>       support for this.
>
> +config MMC_SUNXI_SLOT
> +    int "default boot mmc slot number"
> +    default 0
> +    ---help---
> +    sunxi always boot from slot 0, but you still can modify the default setting of mmc slot number.
> +
>   config SPL_NAND_SUPPORT
>       bool "SPL/NAND mode support"
>       depends on SPL
> diff --git a/configs/Mele_I7_SD2_defconfig b/configs/Mele_I7_SD2_defconfig
> new file mode 100644
> index 0000000..7fab694
> --- /dev/null
> +++ b/configs/Mele_I7_SD2_defconfig
> @@ -0,0 +1,16 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_SUNXI=y
> +CONFIG_MACH_SUN6I=y
> +CONFIG_MMC_SUNXI_SLOT=2
> +CONFIG_MMC_SUNXI_SLOT_EXTRA=0
> +CONFIG_DRAM_ZQ=120
> +CONFIG_USB1_VBUS_PIN="PC27"
> +CONFIG_USB2_VBUS_PIN=""
> +CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-i7"
> +CONFIG_SPL=y
> +CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI,SUNXI_GMAC"
> +CONFIG_ETH_DESIGNWARE=y
> +CONFIG_AXP221_DCDC1_VOLT=3300
> +CONFIG_AXP221_DLDO1_VOLT=3300
> +CONFIG_AXP221_DLDO4_VOLT=3300
> +CONFIG_AXP221_ALDO1_VOLT=3300
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index 07db736..b32c1bf 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -146,7 +146,9 @@
>   #define CONFIG_GENERIC_MMC
>   #define CONFIG_CMD_MMC
>   #define CONFIG_MMC_SUNXI
> +#ifndef CONFIG_MMC_SUNXI_SLOT
>   #define CONFIG_MMC_SUNXI_SLOT        0
> +#endif
>   #if !defined(CONFIG_SPL_NAND_SUPPORT)
>   #define CONFIG_ENV_IS_IN_MMC
>   #define CONFIG_SYS_MMC_ENV_DEV        0    /* first detected MMC controller */
>

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

end of thread, other threads:[~2015-07-05 19:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-29  9:48 [U-Boot] [PATCH 3/3] sunxi:Added difference MMC SLOT for booting =?gb18030?B?vNPM2Ly8tcTQpMzYu/k=?=
2015-07-05 19:17 ` 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