From: Tom Rini Date: Thu, 24 May 2018 08:39:59 -0400 Subject: [U-Boot] [U-Boot, v3, 1/3] mmc: dwmmc: socfpga: Add reset ctrl to driver In-Reply-To: <1525749566-50769-2-git-send-email-ley.foon.tan@intel.com> References: <1525749566-50769-2-git-send-email-ley.foon.tan@intel.com> Message-ID: <20180524123959.GS21194@bill-the-cat.ec.rr.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > Reviewed-by: Simon Glass > --- > 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 > #include > #include > +#include > > 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: