[U-Boot] [PATCH 1/2] arm: socfpga: mmc: Enable calibration for drvsel and smpsel

Marek Vasut marex at denx.de
Thu Aug 20 01:23:51 CEST 2015


On Wednesday, August 19, 2015 at 10:30:17 AM, Chin Liang See wrote:
> Him

Her

> On Wed, 2015-08-19 at 09:34 +0200, marex at denx.de wrote:
> > On Wednesday, August 19, 2015 at 09:26:55 AM, Pavel Machek wrote:
> > > On Wed 2015-08-19 00:54:50, Chin Liang See wrote:
> > > > Enable SDMMC calibration to determine the best setting for
> > > > drvsel and smpsel. It will be triggered whenever there is
> > > > a change of card frequency and bus width. This is to ensure
> > > > reliable transmission between the controller and the card.
> > > > 
> > > > Signed-off-by: Chin Liang See <clsee at altera.com>
> > > > Cc: Dinh Nguyen <dinguyen at opensource.altera.com>
> > > > Cc: Pavel Machek <pavel at denx.de>
> > > > Cc: Marek Vasut <marex at denx.de>
> > > > Cc: Wolfgang Denk <wd at denx.de>
> > 
> > I guess there's no need to CC Wolfgang and Tom on SoCFPGA-specific stuff.
> 
> Sure, I was referring to the previous patch for the mailing list :)

No problem.

> > > > Cc: Stefan Roese <sr at denx.de>
> > > > Cc: Tom Rini <trini at konsulko.com>
> > > > ---
> > 
> > Hi!
> > 
> > > >  drivers/mmc/socfpga_dw_mmc.c |  187
> > > >  ++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 180
> > > >  insertions(+), 7 deletions(-)
> > > > 
> > > > diff --git a/drivers/mmc/socfpga_dw_mmc.c
> > > > b/drivers/mmc/socfpga_dw_mmc.c index eb69aed..15e537c 100644
> > > > --- a/drivers/mmc/socfpga_dw_mmc.c
> > > > +++ b/drivers/mmc/socfpga_dw_mmc.c
> > > > @@ -11,25 +11,140 @@
> > > > 
> > > >  #include <asm/arch/dwmmc.h>
> > > >  #include <asm/arch/clock_manager.h>
> > > >  #include <asm/arch/system_manager.h>
> > > > 
> > > > +#include "mmc_private.h"
> > > > 
> > > >  static const struct socfpga_clock_manager *clock_manager_base =
> > > >  
> > > >  		(void *)SOCFPGA_CLKMGR_ADDRESS;
> > > >  
> > > >  static const struct socfpga_system_manager *system_manager_base =
> > > >  
> > > >  		(void *)SOCFPGA_SYSMGR_ADDRESS;
> > > > 
> > > > -static void socfpga_dwmci_clksel(struct dwmci_host *host)
> > > > +#define CAL_ROWS     7
> > > > +#define CAL_COLS     8
> > 
> > What is this ugliness needed for ?
> 
> Actually this is used to create the rectangle based on the result.
> We are doing the shmoo test for the parameter smpsel and drvsel.
> 
> > btw. Please rebase on top of u-boot-socfpga/master .
> 
> Sure, just saw new changes has been added for last few hours.

I just got a few acks from Dinh, so I applied the stuff onto master. I'm
trying to keep the code up-to-date there. The repository is certainly a
bit overly active now, but that should calm down in the upcoming release.
Afterall, we got most of the nice stuff into mainline in this MW.

[...]


> > > Create separate functions to make it easier to read and less indented.
> > 
> > Right.
> 
> Let me crank my head on this :)
> Thanks

Thanks!


More information about the U-Boot mailing list