From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chin Liang See Date: Wed, 2 Dec 2015 23:10:19 +0800 Subject: [U-Boot] [PATCH v4] mmc: socfpga_dw_mmc: Enable calibration for drvsel and smplsel In-Reply-To: <201512021539.55680.marex@denx.de> References: <1448608923-2809-1-git-send-email-clsee@altera.com> <201512011638.15547.marex@denx.de> <1449035537.2029.8.camel@altera.com> <201512021539.55680.marex@denx.de> Message-ID: <1449069019.2091.1.camel@altera.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 Wed, 2015-12-02 at 15:39 +0100, Marek Vasut wrote: > On Wednesday, December 02, 2015 at 06:52:17 AM, Chin Liang See wrote: > > [...] > > > > OK, this is bad. Originally, if we didn't specify these in the > > > DT, we > > > would > > > use the default values of 0x3 and 0x0 , but now we do the > > > calibration. I wonder, > > > do we care about DT ABI compatibility on the U-Boot level or not > > > ? > > > > If the compatibility failed, it will still invoke the calibration > > to > > get the correct value. Just that its in the cost of boot time. > > Hopefully the calibration does it's job then. > > > At same time, I am rethinking another email thread on suggesting to > > put > > this into common dw_mmc code. Here are my proposal > > Having this in common code would make sense. > > > 1. Put back the correct default value for DT ABI compatiblity > > 2. Adding a node to enable calibration. If node not exist, > > calibration > > will disabled as default. > > But "enable calibration" is not really a hardware property, so it > shouldn't > be in the DT. The DT is purely a hardware description and only the > smplsel > and drvsel fit into this, some "enable-calibration" does not. > Sound reasonable. In this case, I can put this into KConfig where user can configure this easily through menuconfig. Thanks Chin Liang > > 3. Some common calibration algo will go into dw_mmc.c > > 4. platform specific such as on configuring the clksel and smplsel > > will > > be part of platform specific dw_mmc file such as socfpga_dw_mmc.c > > OK > > > This hope will work for both everyone especially for socfpga and > > exynos > > platform. Any thoughts? > > > > Thanks > > Chin Liang > > Best regards, > Marek Vasut