public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] sunxi:Added difference MMC SLOT for booting
Date: Sun, 5 Jul 2015 21:17:06 +0200	[thread overview]
Message-ID: <559982B2.7070709@redhat.com> (raw)
In-Reply-To: <tencent_481304696085F4D83ECE137F@qq.com>

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

      reply	other threads:[~2015-07-05 19:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=559982B2.7070709@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox