[U-Boot] [PATCH v2 09/16] mtd/nand/tegra: alignment workaround
Marcel Ziswiler
marcel.ziswiler at toradex.com
Thu Aug 6 00:12:40 CEST 2015
On Tue, 2015-07-28 at 03:55 +0200, Marcel Ziswiler wrote:
>
> On 27 July 2015 21:57:14 CEST, Scott Wood <scottwood at freescale.com>
> 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.
More information about the U-Boot
mailing list