diff mbox

[U-Boot,v1] mmc: rockchip: the non-removable property must point to emmc

Message ID 1452233209-23310-1-git-send-email-hl@rock-chips.com
State Accepted
Commit 6579385b468b642596d18fc0716681b76e1d0799
Delegated to: Simon Glass
Headers show

Commit Message

Lin Huang Jan. 8, 2016, 6:06 a.m. UTC
the non-removable property point to sdcard before, it is wrong,
it must point to emmc, correct it.

Signed-off-by: Lin Huang <hl@rock-chips.com>
---
 drivers/mmc/rockchip_dw_mmc.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Simon Glass Jan. 15, 2016, 12:43 a.m. UTC | #1
On 7 January 2016 at 23:06, Lin Huang <hl@rock-chips.com> wrote:
> the non-removable property point to sdcard before, it is wrong,
> it must point to emmc, correct it.
>
> Signed-off-by: Lin Huang <hl@rock-chips.com>
> ---
>  drivers/mmc/rockchip_dw_mmc.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
> index aeaec6c..9b4268e 100644
> --- a/drivers/mmc/rockchip_dw_mmc.c
> +++ b/drivers/mmc/rockchip_dw_mmc.c
> @@ -52,6 +52,8 @@ static int rockchip_dwmmc_ofdata_to_platdata(struct udevice *dev)
>
>         /* use non-removeable as sdcard and emmc as judgement */
>         if (fdtdec_get_bool(gd->fdt_blob, dev->of_offset, "non-removable"))
> +               host->dev_index = 0;
> +       else
>                 host->dev_index = 1;
>
>         return 0;
> --
> 1.9.1
>

Acked-by: Simon Glass <sjg@chromium.org>
Tested on firefly-rk3288:
Tested-by: Simon Glass <sjg@chromium.org>
Simon Glass Jan. 15, 2016, 12:47 a.m. UTC | #2
On 14 January 2016 at 17:43, Simon Glass <sjg@chromium.org> wrote:
> On 7 January 2016 at 23:06, Lin Huang <hl@rock-chips.com> wrote:
>> the non-removable property point to sdcard before, it is wrong,
>> it must point to emmc, correct it.
>>
>> Signed-off-by: Lin Huang <hl@rock-chips.com>
>> ---
>>  drivers/mmc/rockchip_dw_mmc.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
>> index aeaec6c..9b4268e 100644
>> --- a/drivers/mmc/rockchip_dw_mmc.c
>> +++ b/drivers/mmc/rockchip_dw_mmc.c
>> @@ -52,6 +52,8 @@ static int rockchip_dwmmc_ofdata_to_platdata(struct udevice *dev)
>>
>>         /* use non-removeable as sdcard and emmc as judgement */
>>         if (fdtdec_get_bool(gd->fdt_blob, dev->of_offset, "non-removable"))
>> +               host->dev_index = 0;
>> +       else
>>                 host->dev_index = 1;
>>
>>         return 0;
>> --
>> 1.9.1
>>
>
> Acked-by: Simon Glass <sjg@chromium.org>
> Tested on firefly-rk3288:
> Tested-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-rockchip, thanks!
diff mbox

Patch

diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index aeaec6c..9b4268e 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -52,6 +52,8 @@  static int rockchip_dwmmc_ofdata_to_platdata(struct udevice *dev)
 
 	/* use non-removeable as sdcard and emmc as judgement */
 	if (fdtdec_get_bool(gd->fdt_blob, dev->of_offset, "non-removable"))
+		host->dev_index = 0;
+	else
 		host->dev_index = 1;
 
 	return 0;