[U-Boot] [U-Boot, v3, 1/3] mmc: dwmmc: socfpga: Add reset ctrl to driver

Dinh Nguyen dinguyen at kernel.org
Tue May 29 13:30:04 UTC 2018


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



On 05/25/2018 06:16 AM, Tom Rini wrote:
> On Fri, May 25, 2018 at 10:45:53AM +0800, Ley Foon Tan wrote:
>> On Thu, May 24, 2018 at 8:39 PM, Tom Rini <trini at konsulko.com>
>> wrote:
>>> On Tue, May 08, 2018 at 11:19:24AM +0800, Ley Foon Tan wrote:
>>> 
>>>> Add code to reset all reset signals as in mmc DT node. A
>>>> reset property is an optional feature, so only print out a
>>>> warning and do not fail if a reset property is not present.
>>>> 
>>>> If a reset property is discovered, then use it to deassert,
>>>> thus bringing the IP out of reset.
>>>> 
>>>> Signed-off-by: Ley Foon Tan <ley.foon.tan at intel.com> 
>>>> Reviewed-by: Simon Glass <sjg at chromium.org> --- 
>>>> drivers/mmc/socfpga_dw_mmc.c |   17 +++++++++++++++++ 1 files
>>>> changed, 17 insertions(+), 0 deletions(-)
>>>> 
>>>> diff --git a/drivers/mmc/socfpga_dw_mmc.c
>>>> b/drivers/mmc/socfpga_dw_mmc.c index fa0e449..eb7e64e 100644 
>>>> --- a/drivers/mmc/socfpga_dw_mmc.c +++
>>>> b/drivers/mmc/socfpga_dw_mmc.c @@ -13,6 +13,7 @@ #include
>>>> <linux/libfdt.h> #include <linux/err.h> #include <malloc.h> 
>>>> +#include <reset.h>
>>>> 
>>>> DECLARE_GLOBAL_DATA_PTR;
>>>> 
>>>> @@ -33,6 +34,20 @@ struct dwmci_socfpga_priv_data { unsigned
>>>> int            smplsel; };
>>>> 
>>>> +static void socfpga_dwmci_reset(struct udevice *dev) +{ +
>>>> struct reset_ctl_bulk reset_bulk; +     int ret; + +     ret
>>>> = reset_get_bulk(dev, &reset_bulk); +     if (ret) { +
>>>> dev_warn(dev, "Can't get reset: %d\n", ret); +
>>>> return; +     } + +     reset_deassert_bulk(&reset_bulk); +}
>>> 
>>> The driver doesn't depend on DM_RESET and this code hunk
>>> doesn't either so it fails to build on a number of platforms.
>>> This type of comment applies to the whole series, and may be
>>> fixed differently in different cases (it might be OK to enforce
>>> DM_RESET for this driver, but not for the ns16550 driver).
>>> 
>>> -- Tom
>>> 
>> include/reset.h has the DM_RESET wrapper, so it will not cause
>> the compilation error if the CONFIG_DM_RESET is disabled.
>> 
>> I have tried compile the uboot with CONFIG_DM_RESET disabled, 
>> compilation is fine.

The case is fine when CONFIG_DM_RESET is disabled, but it fails when
CONFIG_DM_RESET is enabled.

You need:

CONFIG_SPL_RESET_SUPPORT=y

Dinh
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJbDVXVAAoJEBmUBAuBoyj0GrwP/1UAMiFWllpyq/19Lktr8yDa
hZxl4Ynj6HHOSSUWorZeAdaAE0r79lPMR037G7XLV1EiVfe7XkKgVXp8EUusNbMA
nYY+TOe321MoSF+agXoVr6QbwTwH67lAJO5uZ+sbStlElkH1ATTbbsNE092P6Gp9
WgwK8fT1p78BJQ4djTUwDnxIFe9hW3O4VhIeKEte0Ny7cgxsoYH0a6eXd1ozjOp/
H7j31vgjemPUYQI7gf+2JEz/38DaFOMvF4n5eofftIV44Nx8yE/VzgM+9ry+QxNn
h+7/VM2LYbTTwDA+9YuRyleLrv8hcIgbcd/TFnxkBr8Yw4N3JSQjhyjeK/LkTGge
hyixyy132bng89GcGZn3oXxKLTdUi3v9pwBI5payjZ/sKuH8nySM3OAas3nrPWI3
g62t8/x3ufD+ZegaVWL66Sp2kLt3xamJe+WrLtcGgXzOLJDC9lsE8/iV+d2Jrat6
4x6gvcxPJvd0WieEapzsP6SqU/J0yA/RrMAtTwASQrXd9yH5CH6+FD/Yw+ShyEiO
FiIz/p80NL3yqkFOBASm422r8RKPZ84hOeHNbV79rWNrBaQHAlK/mKwPrNjhao7l
j3izAGOi75/aQO8QBnD2uCDXHRDL0+mCPPcwBzX90/HtubIjB/ZHiZuDuwCa+JrN
wwbHCJO6WDj3sqv0iErz
=JhCN
-----END PGP SIGNATURE-----


More information about the U-Boot mailing list