From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] odroid: adjust get_dfu_alt_*() functions to new declarations
Date: Thu, 19 Feb 2015 10:26:18 +0100 [thread overview]
Message-ID: <20150219102618.59e0505b@amdc2363> (raw)
In-Reply-To: <1424172252-14059-3-git-send-email-p.marczak@samsung.com>
Hi Przemyslaw, Minkyu
> From: Inha Song <ideal.song@samsung.com>
>
> This change is required after updated dfu_alt_system/boot
> declarations.
>
> Signed-off-by: Inha Song <ideal.song@samsung.com>
> Cc: Lukasz Majewski <l.majewski@samsung.com>
> Cc: Stephen Warren <swarren@nvidia.com>
> Cc: Marek Vasut <marex@denx.de>
> ---
> board/samsung/odroid/odroid.c | 31 +++++++++++++++++--------------
> 1 file changed, 17 insertions(+), 14 deletions(-)
>
> diff --git a/board/samsung/odroid/odroid.c
> b/board/samsung/odroid/odroid.c index b7d2381..e3f90bd 100644
> --- a/board/samsung/odroid/odroid.c
> +++ b/board/samsung/odroid/odroid.c
> @@ -15,6 +15,7 @@
> #include <power/pmic.h>
> #include <power/max77686_pmic.h>
> #include <errno.h>
> +#include <mmc.h>
> #include <usb.h>
> #include <usb/s3c_udc.h>
> #include <samsung/misc.h>
> @@ -61,27 +62,29 @@ const char *get_board_type(void)
> #endif
>
> #ifdef CONFIG_SET_DFU_ALT_INFO
> -char *get_dfu_alt_system(void)
> +char *get_dfu_alt_system(char *interface, char *devstr)
> {
> return getenv("dfu_alt_system");
> }
>
> -char *get_dfu_alt_boot(void)
> +char *get_dfu_alt_boot(char *interface, char *devstr)
> {
> + struct mmc *mmc;
> char *alt_boot;
> + int dev_num;
> +
> + dev_num = simple_strtoul(devstr, NULL, 10);
> +
> + mmc = find_mmc_device(dev_num);
> + if (!mmc)
> + return NULL;
> +
> + if (mmc_init(mmc))
> + return NULL;
> +
> + alt_boot = IS_SD(mmc) ? CONFIG_DFU_ALT_BOOT_SD :
> + CONFIG_DFU_ALT_BOOT_EMMC;
>
> - switch (get_boot_mode()) {
> - case BOOT_MODE_SD:
> - alt_boot = CONFIG_DFU_ALT_BOOT_SD;
> - break;
> - case BOOT_MODE_EMMC:
> - case BOOT_MODE_EMMC_SD:
> - alt_boot = CONFIG_DFU_ALT_BOOT_EMMC;
> - break;
> - default:
> - alt_boot = NULL;
> - break;
> - }
> return alt_boot;
> }
> #endif
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Test HW: Odroid U3 (Exynos 4412)
Minkyu - I would prefer to take this patch to -dfu tree since it deals
with dfu_alt_info env variable. Do you mind if I take it?
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
next prev parent reply other threads:[~2015-02-19 9:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-17 11:24 [U-Boot] [PATCH 0/2] dfu: allow to autoset configuration Przemyslaw Marczak
2015-02-17 11:24 ` [U-Boot] [PATCH 1/2] dfu: samsung: move call to set_dfu_alt_info() to dfu common code Przemyslaw Marczak
2015-02-19 9:22 ` Lukasz Majewski
2015-02-17 11:24 ` [U-Boot] [PATCH 2/2] odroid: adjust get_dfu_alt_*() functions to new declarations Przemyslaw Marczak
2015-02-19 9:26 ` Lukasz Majewski [this message]
2015-02-23 0:16 ` Minkyu Kang
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=20150219102618.59e0505b@amdc2363 \
--to=l.majewski@samsung.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 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.