mpc52xx_psc.h

2 messages, 2 authors, 2008-06-12 · open the first message on its own page

mpc52xx_psc.h

From: Jon Smirl <hidden>
Date: 2008-06-11 21:05:06

Why was the fifo struct separated from the psc struct for the 5200?

I see comments like this now:
        /* On the 5200, fifo regs are immediately adjacent to the psc regs */
        mps->fifo = ((void __iomem *)mps->psc) + sizeof(struct mpc52xx_psc);

Couldn't the fifo struct be a member at the end of the psc struct?

/* Structure of the hardware registers */
struct mpc52xx_psc {
	u8		mode;		/* PSC + 0x00 */
	u8		reserved0[3];
......
	u8		irmdr;		/* PSC + 0x50 */
	u8		reserved16[3];
	u8		irfdr;		/* PSC + 0x54 */
	u8		reserved17[3];
	struct mpc52xx_psc_fifo fifo; /* like this? */
};


-- 
Jon Smirl
jonsmirl@gmail.com

Re: mpc52xx_psc.h

From: Grant Likely <hidden>
Date: 2008-06-12 01:35:59

On Wed, Jun 11, 2008 at 3:05 PM, Jon Smirl [off-list ref] wrote:
Why was the fifo struct separated from the psc struct for the 5200?

I see comments like this now:
       /* On the 5200, fifo regs are immediately adjacent to the psc regs */
       mps->fifo = ((void __iomem *)mps->psc) + sizeof(struct mpc52xx_psc);

Couldn't the fifo struct be a member at the end of the psc struct?
The mpc5121 uses the same PSC register structure, but the fifo regs
are no longer adjacent.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help