From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 20 Aug 2015 01:23:51 +0200 Subject: [U-Boot] [PATCH 1/2] arm: socfpga: mmc: Enable calibration for drvsel and smpsel In-Reply-To: <1439973017.3518.7.camel@clsee-VirtualBox.altera.com> References: <1439963690-2523-1-git-send-email-clsee@altera.com> <201508190934.03300.marex@denx.de> <1439973017.3518.7.camel@clsee-VirtualBox.altera.com> Message-ID: <201508200123.52089.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > > > Cc: Dinh Nguyen > > > > Cc: Pavel Machek > > > > Cc: Marek Vasut > > > > Cc: Wolfgang Denk > > > > 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 > > > > Cc: Tom Rini > > > > --- > > > > 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 > > > > #include > > > > #include > > > > > > > > +#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!