[PATCH v2 3/3][MTD] P4080/mtd: Fix the freescale lbc issue with 36bit mode

Zang Roy-R61911 r61911 at freescale.com
Mon Sep 13 17:22:10 EST 2010



> -----Original Message-----
> From: geert.uytterhoeven at gmail.com [mailto:geert.uytterhoeven at gmail.com] On
> Behalf Of Geert Uytterhoeven
> Sent: Thursday, September 09, 2010 19:06 PM
> To: Zang Roy-R61911
> Cc: linux-mtd at lists.infradead.org; Wood Scott-B07421; dedekind1 at gmail.com; Lan
> Chunhe-B25806; linuxppc-dev at ozlabs.org; akpm at linux-foundation.org;
> dwmw2 at infradead.org; Gala Kumar-B11780
> Subject: Re: [PATCH v2 3/3][MTD] P4080/mtd: Fix the freescale lbc issue with
> 36bit mode
> 
> On Thu, Sep 9, 2010 at 12:20, Roy Zang <tie-fei.zang at freescale.com> wrote:
> > From: Lan Chunhe-B25806 <b25806 at freescale.com>
> >
> > When system uses 36bit physical address, res.start is 36bit
> > physical address. But the function of in_be32 returns 32bit
> > physical address. Then both of them compared each other is
> > wrong. So by converting the address of res.start into
> > the right format fixes this issue.
> 
> >  /**
> > + * fsl_lbc_addr - convert the base address
> > + * @addr_base: base address of the memory bank
> > + *
> > + * This function converts a base address of lbc into the right format for
> the BR
> > + * registers. If the SOC has eLBC then it returns 32bit physical address
> else
> > + * it returns 34bit physical address for local bus(Example: MPC8641).
> > + */
> > +unsigned int fsl_lbc_addr(phys_addr_t addr_base)
>     ^^^^^^^^^^^^
> Shouldn't this be u32 or __be32, for consistency with the actual
> comparisons below?
__be32 is better.
Thanks.
Roy


More information about the Linuxppc-dev mailing list