From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcel Ziswiler Date: Wed, 5 Aug 2015 22:12:40 +0000 Subject: [U-Boot] [PATCH v2 09/16] mtd/nand/tegra: alignment workaround In-Reply-To: <050699AD-D04F-45D7-9BAF-B03A7FA97652@ziswiler.com> References: <1438027034.2993.303.camel@freescale.com> <050699AD-D04F-45D7-9BAF-B03A7FA97652@ziswiler.com> Message-ID: <1438812758.2747.22.camel@toradex.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, 2015-07-28 at 03:55 +0200, Marcel Ziswiler wrote: > > On 27 July 2015 21:57:14 CEST, Scott Wood > wrote: > > > - writel(virt_to_phys(buf), &info->reg->data_block_ptr); > > > + writel((u32)bbstate.bounce_buffer, &info->reg > > > ->data_block_ptr); > > > > Why are you converting usage of virt_to_phys() into a u32 cast? > > Good question. I believe this I took straight from the MMC driver but > will double check it again for a v3. Yes, the MMC driver actually even does a double cast. Don't knowexactly what that should bring but that's how it looks there: writel((u32)(unsigned long)bbstate->bounce_buffer, &host->reg->sysad); http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mmc/tegra_mmc.c;hb=HEAD#l70 Nonetheless I changed it back to using virt_to_phys() for the v3 to beposted soon.