[PATCH 3/7] ddr: altera: arria10: Change to use reset DM function

Tan, Ley Foon ley.foon.tan at intel.com
Thu Apr 16 03:42:40 CEST 2020



> -----Original Message-----
> From: Marek Vasut <marex at denx.de>
> Sent: Wednesday, April 15, 2020 8:43 PM
> To: Tan, Ley Foon <ley.foon.tan at intel.com>; u-boot at lists.denx.de
> Cc: Ley Foon Tan <lftan.linux at gmail.com>; See, Chin Liang
> <chin.liang.see at intel.com>; Simon Goldschmidt
> <simon.k.r.goldschmidt at gmail.com>; Chee, Tien Fong
> <tien.fong.chee at intel.com>
> Subject: Re: [PATCH 3/7] ddr: altera: arria10: Change to use reset DM
> function
> 
> On 4/15/20 11:00 AM, Ley Foon Tan wrote:
> > Change to use reset DM function and remove unused
> > socfpga_reset_deassert_noc_ddr_scheduler().
> >
> > Signed-off-by: Ley Foon Tan <ley.foon.tan at intel.com>
> > ---
> >  .../include/mach/reset_manager_arria10.h      |  1 -
> >  arch/arm/mach-socfpga/reset_manager_arria10.c |  7 ------
> >  drivers/ddr/altera/sdram_arria10.c            | 25 ++++++++++---------
> >  3 files changed, 13 insertions(+), 20 deletions(-)
> >
> > diff --git
> > a/arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h
> > b/arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h
> > index 22e4eb33de88..a0fad7c1e2fc 100644
> > --- a/arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h
> > +++ b/arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h
> > @@ -9,7 +9,6 @@
> > static int altera_sdram_ofdata_to_platdata(struct udevice *dev)
> >
> >  static int altera_sdram_probe(struct udevice *dev)  {
> > +	int ret;
> >  	struct altera_sdram_priv *priv = dev_get_priv(dev);
> >
> > +	ret = reset_get_bulk(dev, &priv->resets);
> > +	if (ret) {
> > +		dev_err(dev, "Can't get reset: %d\n", ret);
> > +		return -ENODEV;
> > +	}
> > +
> > +	reset_deassert_bulk(&priv->resets);
> > +
> >  	if (ddr_calibration_sequence(dev->platdata) != 0) {
> >  		puts("SDRAM init failed.\n");
> >  		goto failed;
> >
> 
> I think you need to re-assert the reset in the failed: fail path.

Okay.

Thanks.
Regards
Ley Foon


More information about the U-Boot mailing list