From f2af3eb55ec53f4c050fcf10653a8df450ca7298 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 26 Sep 2005 00:29:53 +0200 Subject: Fixes to the Lubbock (PXA 25x) support: - Resolve the FIXME with respect to saving the u-boot environment. - Make the default load address land in real memory. - Fix lan91c96 SMC_{in,out}{b,w,l}() macros Patch by David Brownell, 10 Mar 2005 --- drivers/lan91c96.h | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'drivers') diff --git a/drivers/lan91c96.h b/drivers/lan91c96.h index 5c2afcef23..b7d7455b9d 100644 --- a/drivers/lan91c96.h +++ b/drivers/lan91c96.h @@ -78,17 +78,27 @@ typedef unsigned long int dword; #ifdef CONFIG_PXA250 -#define SMC_inl(r) (*((volatile dword *)(SMC_BASE_ADDRESS+( r * 4 )))) -#define SMC_inw(r) (*((volatile word *)(SMC_BASE_ADDRESS+( r * 4 )))) -#define SMC_inb(p) ({ \ - unsigned int __p = (unsigned int)(SMC_BASE_ADDRESS + (p * 4)); \ - unsigned int __v = *(volatile unsigned short *)((__p) & ~1); \ +#ifdef CONFIG_LUBBOCK +#define SMC_IO_SHIFT 2 +#undef USE_32_BIT + +#else +#define SMC_IO_SHIFT 0 +#endif + +#define SMCREG(r) (SMC_BASE_ADDRESS+((r)<>= 8; \ else __v &= 0xff; \ __v; }) -#define SMC_outl(d,r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r * 4))) = d) -#define SMC_outw(d,r) (*((volatile word *)(SMC_BASE_ADDRESS+(r * 4))) = d) +#define SMC_outl(d,r) (*((volatile dword *)SMCREG(r)) = d) +#define SMC_outw(d,r) (*((volatile word *)SMCREG(r)) = d) #define SMC_outb(d,r) ({ word __d = (byte)(d); \ word __w = SMC_inw((r)&~1); \ __w &= ((r)&1) ? 0x00FF : 0xFF00; \ -- cgit v1.2.1