X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-alpha%2Fcore_cia.h;h=9e0516c0ca27b33895082d7ecec6e06a1db72943;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=549550feeee411bbcef1124ae7342696995b7a95;hpb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;p=linux-2.6.git diff --git a/include/asm-alpha/core_cia.h b/include/asm-alpha/core_cia.h index 549550fee..9e0516c0c 100644 --- a/include/asm-alpha/core_cia.h +++ b/include/asm-alpha/core_cia.h @@ -4,7 +4,6 @@ /* Define to experiment with fitting everything into one 512MB HAE window. */ #define CIA_ONE_HAE_WINDOW 1 -#include #include #include @@ -347,14 +346,14 @@ __EXTERN_INLINE unsigned int cia_ioread8(void __iomem *xaddr) unsigned long addr = (unsigned long) xaddr; unsigned long result, base_and_type; - /* We can use CIA_MEM_R1_MASK for io ports too, since it is large - enough to cover all io ports, and smaller than CIA_IO. */ - addr &= CIA_MEM_R1_MASK; if (addr >= CIA_DENSE_MEM) base_and_type = CIA_SPARSE_MEM + 0x00; else base_and_type = CIA_IO + 0x00; + /* We can use CIA_MEM_R1_MASK for io ports too, since it is large + enough to cover all io ports, and smaller than CIA_IO. */ + addr &= CIA_MEM_R1_MASK; result = *(vip) ((addr << 5) + base_and_type); return __kernel_extbl(result, addr & 3); } @@ -364,12 +363,12 @@ __EXTERN_INLINE void cia_iowrite8(u8 b, void __iomem *xaddr) unsigned long addr = (unsigned long) xaddr; unsigned long w, base_and_type; - addr &= CIA_MEM_R1_MASK; if (addr >= CIA_DENSE_MEM) base_and_type = CIA_SPARSE_MEM + 0x00; else base_and_type = CIA_IO + 0x00; + addr &= CIA_MEM_R1_MASK; w = __kernel_insbl(b, addr & 3); *(vuip) ((addr << 5) + base_and_type) = w; } @@ -379,12 +378,12 @@ __EXTERN_INLINE unsigned int cia_ioread16(void __iomem *xaddr) unsigned long addr = (unsigned long) xaddr; unsigned long result, base_and_type; - addr &= CIA_MEM_R1_MASK; if (addr >= CIA_DENSE_MEM) base_and_type = CIA_SPARSE_MEM + 0x08; else base_and_type = CIA_IO + 0x08; + addr &= CIA_MEM_R1_MASK; result = *(vip) ((addr << 5) + base_and_type); return __kernel_extwl(result, addr & 3); } @@ -394,12 +393,12 @@ __EXTERN_INLINE void cia_iowrite16(u16 b, void __iomem *xaddr) unsigned long addr = (unsigned long) xaddr; unsigned long w, base_and_type; - addr &= CIA_MEM_R1_MASK; if (addr >= CIA_DENSE_MEM) base_and_type = CIA_SPARSE_MEM + 0x08; else base_and_type = CIA_IO + 0x08; + addr &= CIA_MEM_R1_MASK; w = __kernel_inswl(b, addr & 3); *(vuip) ((addr << 5) + base_and_type) = w; }