Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: Board updates for I/O routine rework.

This updates the various boards for some of the recent I/O routine
updates.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

+261 -731
-3
arch/sh/Makefile
··· 111 111 112 112 incdir-y := $(notdir $(machdir-y)) 113 113 114 - incdir-$(CONFIG_SH_SOLUTION_ENGINE) := se 115 114 incdir-$(CONFIG_SH_7751_SOLUTION_ENGINE) := se7751 116 - incdir-$(CONFIG_SH_7300_SOLUTION_ENGINE) := se7300 117 - incdir-$(CONFIG_SH_73180_SOLUTION_ENGINE) := se73180 118 115 incdir-$(CONFIG_SH_HP6XX) := hp6xx 119 116 120 117 ifneq ($(machdir-y),)
+93 -70
arch/sh/boards/renesas/hs7751rvoip/io.c
··· 21 21 #include <linux/pci.h> 22 22 #include "../../../drivers/pci/pci-sh7751.h" 23 23 24 - extern void *area5_io8_base; /* Area 5 8bit I/O Base address */ 25 24 extern void *area6_io8_base; /* Area 6 8bit I/O Base address */ 26 25 extern void *area5_io16_base; /* Area 5 16bit I/O Base address */ 27 - extern void *area6_io16_base; /* Area 6 16bit I/O Base address */ 28 26 29 27 /* 30 28 * The 7751R HS7751RVoIP uses the built-in PCI controller (PCIC) ··· 35 37 #define PCIMBR (volatile long *)PCI_REG(SH7751_PCIMBR) 36 38 #define PCI_IO_AREA SH7751_PCI_IO_BASE 37 39 #define PCI_MEM_AREA SH7751_PCI_CONFIG_BASE 38 - 39 40 #define PCI_IOMAP(adr) (PCI_IO_AREA + (adr & ~SH7751_PCIIOBR_MASK)) 40 41 41 - #if defined(CONFIG_HS7751RVOIP_CODEC) 42 42 #define CODEC_IO_BASE 0x1000 43 - #endif 44 - 45 - #define maybebadio(name,port) \ 46 - printk("bad PC-like io %s for port 0x%lx at 0x%08x\n", \ 47 - #name, (port), (__u32) __builtin_return_address(0)) 43 + #define CODEC_IOMAP(a) ((unsigned long)area6_io8_base + ((a) - CODEC_IO_BASE)) 48 44 49 45 static inline void delay(void) 50 46 { ··· 53 61 else 54 62 return ((unsigned long)area5_io16_base + 0x800 + ((port-0x1f0) << 1)); 55 63 else 56 - maybebadio(port2adr, (unsigned long)port); 64 + maybebadio((unsigned long)port); 57 65 return port; 58 66 } 59 67 ··· 101 109 unsigned char hs7751rvoip_inb(unsigned long port) 102 110 { 103 111 if (PXSEG(port)) 104 - return *(volatile unsigned char *)port; 112 + return ctrl_inb(port); 105 113 #if defined(CONFIG_HS7751RVOIP_CODEC) 106 114 else if (codec_port(port)) 107 - return *(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)); 115 + return ctrl_inb(CODEC_IOMAP(port)); 108 116 #endif 109 117 else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) 110 - return *(volatile unsigned char *)PCI_IOMAP(port); 118 + return ctrl_inb(PCI_IOMAP(port)); 111 119 else 112 - return (*(volatile unsigned short *)port2adr(port) & 0xff); 120 + return ctrl_inw(port2adr(port)) & 0xff; 113 121 } 114 122 115 123 unsigned char hs7751rvoip_inb_p(unsigned long port) ··· 117 125 unsigned char v; 118 126 119 127 if (PXSEG(port)) 120 - v = *(volatile unsigned char *)port; 128 + v = ctrl_inb(port); 121 129 #if defined(CONFIG_HS7751RVOIP_CODEC) 122 130 else if (codec_port(port)) 123 - v = *(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)); 131 + v = ctrl_inb(CODEC_IOMAP(port)); 124 132 #endif 125 133 else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) 126 - v = *(volatile unsigned char *)PCI_IOMAP(port); 134 + v = ctrl_inb(PCI_IOMAP(port)); 127 135 else 128 - v = (*(volatile unsigned short *)port2adr(port) & 0xff); 136 + v = ctrl_inw(port2adr(port)) & 0xff; 129 137 delay(); 130 138 return v; 131 139 } ··· 133 141 unsigned short hs7751rvoip_inw(unsigned long port) 134 142 { 135 143 if (PXSEG(port)) 136 - return *(volatile unsigned short *)port; 144 + return ctrl_inw(port); 137 145 else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) 138 - return *(volatile unsigned short *)PCI_IOMAP(port); 146 + return ctrl_inw(PCI_IOMAP(port)); 139 147 else 140 - maybebadio(inw, port); 148 + maybebadio(port); 141 149 return 0; 142 150 } 143 151 144 152 unsigned int hs7751rvoip_inl(unsigned long port) 145 153 { 146 154 if (PXSEG(port)) 147 - return *(volatile unsigned long *)port; 155 + return ctrl_inl(port); 148 156 else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) 149 - return *(volatile unsigned long *)PCI_IOMAP(port); 157 + return ctrl_inl(PCI_IOMAP(port)); 150 158 else 151 - maybebadio(inl, port); 159 + maybebadio(port); 152 160 return 0; 153 161 } 154 162 ··· 156 164 { 157 165 158 166 if (PXSEG(port)) 159 - *(volatile unsigned char *)port = value; 167 + ctrl_outb(value, port); 160 168 #if defined(CONFIG_HS7751RVOIP_CODEC) 161 169 else if (codec_port(port)) 162 - *(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value; 170 + ctrl_outb(value, CODEC_IOMAP(port)); 163 171 #endif 164 172 else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) 165 - *(unsigned char *)PCI_IOMAP(port) = value; 173 + ctrl_outb(value, PCI_IOMAP(port)); 166 174 else 167 - *(volatile unsigned short *)port2adr(port) = value; 175 + ctrl_outb(value, port2adr(port)); 168 176 } 169 177 170 178 void hs7751rvoip_outb_p(unsigned char value, unsigned long port) 171 179 { 172 180 if (PXSEG(port)) 173 - *(volatile unsigned char *)port = value; 181 + ctrl_outb(value, port); 174 182 #if defined(CONFIG_HS7751RVOIP_CODEC) 175 183 else if (codec_port(port)) 176 - *(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = value; 184 + ctrl_outb(value, CODEC_IOMAP(port)); 177 185 #endif 178 186 else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) 179 - *(unsigned char *)PCI_IOMAP(port) = value; 187 + ctrl_outb(value, PCI_IOMAP(port)); 180 188 else 181 - *(volatile unsigned short *)port2adr(port) = value; 189 + ctrl_outw(value, port2adr(port)); 190 + 182 191 delay(); 183 192 } 184 193 185 194 void hs7751rvoip_outw(unsigned short value, unsigned long port) 186 195 { 187 196 if (PXSEG(port)) 188 - *(volatile unsigned short *)port = value; 197 + ctrl_outw(value, port); 189 198 else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) 190 - *(unsigned short *)PCI_IOMAP(port) = value; 199 + ctrl_outw(value, PCI_IOMAP(port)); 191 200 else 192 - maybebadio(outw, port); 201 + maybebadio(port); 193 202 } 194 203 195 204 void hs7751rvoip_outl(unsigned int value, unsigned long port) 196 205 { 197 206 if (PXSEG(port)) 198 - *(volatile unsigned long *)port = value; 207 + ctrl_outl(value, port); 199 208 else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) 200 - *((unsigned long *)PCI_IOMAP(port)) = value; 209 + ctrl_outl(value, PCI_IOMAP(port)); 201 210 else 202 - maybebadio(outl, port); 211 + maybebadio(port); 203 212 } 204 213 205 214 void hs7751rvoip_insb(unsigned long port, void *addr, unsigned long count) 206 215 { 216 + u8 *buf = addr; 217 + 207 218 if (PXSEG(port)) 208 - while (count--) *((unsigned char *) addr)++ = *(volatile unsigned char *)port; 219 + while (count--) 220 + *buf++ = ctrl_inb(port); 209 221 #if defined(CONFIG_HS7751RVOIP_CODEC) 210 222 else if (codec_port(port)) 211 - while (count--) *((unsigned char *) addr)++ = *(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)); 223 + while (count--) 224 + *buf++ = ctrl_inb(CODEC_IOMAP(port)); 212 225 #endif 213 226 else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { 214 - volatile __u8 *bp = (__u8 *)PCI_IOMAP(port); 227 + volatile u8 *bp = (volatile u8 *)PCI_IOMAP(port); 215 228 216 - while (count--) *((volatile unsigned char *) addr)++ = *bp; 229 + while (count--) 230 + *buf++ = *bp; 217 231 } else { 218 - volatile __u16 *p = (volatile unsigned short *)port2adr(port); 232 + volatile u16 *p = (volatile u16 *)port2adr(port); 219 233 220 - while (count--) *((unsigned char *) addr)++ = *p & 0xff; 234 + while (count--) 235 + *buf++ = *p & 0xff; 221 236 } 222 237 } 223 238 224 239 void hs7751rvoip_insw(unsigned long port, void *addr, unsigned long count) 225 240 { 226 - volatile __u16 *p; 241 + volatile u16 *p; 242 + u16 *buf = addr; 227 243 228 244 if (PXSEG(port)) 229 - p = (volatile unsigned short *)port; 245 + p = (volatile u16 *)port; 230 246 else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) 231 - p = (volatile unsigned short *)PCI_IOMAP(port); 247 + p = (volatile u16 *)PCI_IOMAP(port); 232 248 else 233 - p = (volatile unsigned short *)port2adr(port); 234 - while (count--) *((__u16 *) addr)++ = *p; 249 + p = (volatile u16 *)port2adr(port); 250 + while (count--) 251 + *buf++ = *p; 235 252 } 236 253 237 254 void hs7751rvoip_insl(unsigned long port, void *addr, unsigned long count) 238 255 { 239 - if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { 240 - volatile __u32 *p = (__u32 *)PCI_IOMAP(port); 241 256 242 - while (count--) *((__u32 *) addr)++ = *p; 257 + if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { 258 + volatile u32 *p = (volatile u32 *)PCI_IOMAP(port); 259 + u32 *buf = addr; 260 + 261 + while (count--) 262 + *buf++ = *p; 243 263 } else 244 - maybebadio(insl, port); 264 + maybebadio(port); 245 265 } 246 266 247 267 void hs7751rvoip_outsb(unsigned long port, const void *addr, unsigned long count) 248 268 { 269 + const u8 *buf = addr; 270 + 249 271 if (PXSEG(port)) 250 - while (count--) *(volatile unsigned char *)port = *((unsigned char *) addr)++; 272 + while (count--) 273 + ctrl_outb(*buf++, port); 251 274 #if defined(CONFIG_HS7751RVOIP_CODEC) 252 275 else if (codec_port(port)) 253 - while (count--) *(volatile unsigned char *)((unsigned long)area6_io8_base+(port-CODEC_IO_BASE)) = *((unsigned char *) addr)++; 276 + while (count--) 277 + ctrl_outb(*buf++, CODEC_IOMAP(port)); 254 278 #endif 255 279 else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { 256 - volatile __u8 *bp = (__u8 *)PCI_IOMAP(port); 280 + volatile u8 *bp = (volatile u8 *)PCI_IOMAP(port); 257 281 258 - while (count--) *bp = *((volatile unsigned char *) addr)++; 282 + while (count--) 283 + *bp = *buf++; 259 284 } else { 260 - volatile __u16 *p = (volatile unsigned short *)port2adr(port); 285 + volatile u16 *p = (volatile u16 *)port2adr(port); 261 286 262 - while (count--) *p = *((unsigned char *) addr)++; 287 + while (count--) 288 + *p = *buf++; 263 289 } 264 290 } 265 291 266 292 void hs7751rvoip_outsw(unsigned long port, const void *addr, unsigned long count) 267 293 { 268 - volatile __u16 *p; 294 + volatile u16 *p; 295 + const u16 *buf = addr; 269 296 270 297 if (PXSEG(port)) 271 - p = (volatile unsigned short *)port; 298 + p = (volatile u16 *)port; 272 299 else if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) 273 - p = (volatile unsigned short *)PCI_IOMAP(port); 300 + p = (volatile u16 *)PCI_IOMAP(port); 274 301 else 275 - p = (volatile unsigned short *)port2adr(port); 276 - while (count--) *p = *((__u16 *) addr)++; 302 + p = (volatile u16 *)port2adr(port); 303 + 304 + while (count--) 305 + *p = *buf++; 277 306 } 278 307 279 308 void hs7751rvoip_outsl(unsigned long port, const void *addr, unsigned long count) 280 309 { 281 - if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { 282 - volatile __u32 *p = (__u32 *)PCI_IOMAP(port); 310 + const u32 *buf = addr; 283 311 284 - while (count--) *p = *((__u32 *) addr)++; 312 + if (CHECK_SH7751_PCIIO(port) || shifted_port(port)) { 313 + volatile u32 *p = (volatile u32 *)PCI_IOMAP(port); 314 + 315 + while (count--) 316 + *p = *buf++; 285 317 } else 286 - maybebadio(outsl, port); 318 + maybebadio(port); 287 319 } 288 320 289 - unsigned long hs7751rvoip_isa_port2addr(unsigned long offset) 321 + void __iomem *hs7751rvoip_ioport_map(unsigned long port, unsigned int size) 290 322 { 291 - return port2adr(offset); 323 + if (PXSEG(port)) 324 + return (void __iomem *)port; 325 + else if (unlikely(codec_port(port) && (size == 1))) 326 + return (void __iomem *)CODEC_IOMAP(port); 327 + else if (CHECK_SH7751_PCIIO(port)) 328 + return (void __iomem *)PCI_IOMAP(port); 329 + 330 + return (void __iomem *)port2adr(port); 292 331 }
+2 -3
arch/sh/boards/renesas/hs7751rvoip/setup.c
··· 17 17 #include <linux/hdreg.h> 18 18 #include <linux/ide.h> 19 19 #include <linux/pm.h> 20 - #include <asm/hs7751rvoip/hs7751rvoip.h> 21 - #include <asm/hs7751rvoip/io.h> 22 20 #include <asm/io.h> 21 + #include <asm/hs7751rvoip/hs7751rvoip.h> 23 22 #include <asm/machvec.h> 24 23 #include <asm/rtc.h> 25 24 #include <asm/irq.h> ··· 59 60 .mv_outsw = hs7751rvoip_outsw, 60 61 .mv_outsl = hs7751rvoip_outsl, 61 62 62 - .mv_isa_port2addr = hs7751rvoip_isa_port2addr, 63 63 .mv_init_irq = hs7751rvoip_init_irq, 64 + .mv_ioport_map = hs7751rvoip_ioport_map, 64 65 }; 65 66 ALIAS_MV(hs7751rvoip) 66 67
+9 -87
arch/sh/boards/renesas/systemh/io.c
··· 10 10 11 11 #include <linux/kernel.h> 12 12 #include <linux/types.h> 13 - #include <asm/systemh/7751systemh.h> 13 + #include <linux/pci.h> 14 + #include <asm/systemh7751.h> 14 15 #include <asm/addrspace.h> 15 16 #include <asm/io.h> 16 - 17 - #include <linux/pci.h> 18 17 #include "../../../drivers/pci/pci-sh7751.h" 19 18 20 19 /* ··· 30 31 #define PCI_IOMAP(adr) (PCI_IO_AREA + (adr & ~SH7751_PCIIOBR_MASK)) 31 32 #define ETHER_IOMAP(adr) (0xB3000000 + (adr)) /*map to 16bits access area 32 33 of smc lan chip*/ 33 - 34 - #define maybebadio(name,port) \ 35 - printk("bad PC-like io %s for port 0x%lx at 0x%08x\n", \ 36 - #name, (port), (__u32) __builtin_return_address(0)) 37 - 38 34 static inline void delay(void) 39 35 { 40 36 ctrl_inw(0xa0000000); ··· 40 46 { 41 47 if (port >= 0x2000) 42 48 return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000)); 43 - #if 0 44 - else 45 - return (volatile __u16 *) (PA_SUPERIO + (port << 1)); 46 - #endif 47 - maybebadio(name,(unsigned long)port); 49 + maybebadio((unsigned long)port); 48 50 return (volatile __u16*)port; 49 51 } 50 52 ··· 101 111 else if (port <= 0x3F1) 102 112 return *(volatile unsigned int *)ETHER_IOMAP(port); 103 113 else 104 - maybebadio(inw, port); 114 + maybebadio(port); 105 115 return 0; 106 116 } 107 117 ··· 116 126 else if (port <= 0x3F1) 117 127 return *(volatile unsigned int *)ETHER_IOMAP(port); 118 128 else 119 - maybebadio(inl, port); 129 + maybebadio(port); 120 130 return 0; 121 131 } 122 132 ··· 157 167 else if (port <= 0x3F1) 158 168 *(volatile unsigned short *)ETHER_IOMAP(port) = value; 159 169 else 160 - maybebadio(outw, port); 170 + maybebadio(port); 161 171 } 162 172 163 173 void sh7751systemh_outl(unsigned int value, unsigned long port) ··· 167 177 else if (CHECK_SH7751_PCIIO(port)) 168 178 *((unsigned long*)PCI_IOMAP(port)) = value; 169 179 else 170 - maybebadio(outl, port); 180 + maybebadio(port); 171 181 } 172 182 173 183 void sh7751systemh_insb(unsigned long port, void *addr, unsigned long count) ··· 184 194 185 195 void sh7751systemh_insl(unsigned long port, void *addr, unsigned long count) 186 196 { 187 - maybebadio(insl, port); 197 + maybebadio(port); 188 198 } 189 199 190 200 void sh7751systemh_outsb(unsigned long port, const void *addr, unsigned long count) ··· 201 211 202 212 void sh7751systemh_outsl(unsigned long port, const void *addr, unsigned long count) 203 213 { 204 - maybebadio(outsw, port); 205 - } 206 - 207 - /* For read/write calls, just copy generic (pass-thru); PCIMBR is */ 208 - /* already set up. For a larger memory space, these would need to */ 209 - /* reset PCIMBR as needed on a per-call basis... */ 210 - 211 - unsigned char sh7751systemh_readb(unsigned long addr) 212 - { 213 - return *(volatile unsigned char*)addr; 214 - } 215 - 216 - unsigned short sh7751systemh_readw(unsigned long addr) 217 - { 218 - return *(volatile unsigned short*)addr; 219 - } 220 - 221 - unsigned int sh7751systemh_readl(unsigned long addr) 222 - { 223 - return *(volatile unsigned long*)addr; 224 - } 225 - 226 - void sh7751systemh_writeb(unsigned char b, unsigned long addr) 227 - { 228 - *(volatile unsigned char*)addr = b; 229 - } 230 - 231 - void sh7751systemh_writew(unsigned short b, unsigned long addr) 232 - { 233 - *(volatile unsigned short*)addr = b; 234 - } 235 - 236 - void sh7751systemh_writel(unsigned int b, unsigned long addr) 237 - { 238 - *(volatile unsigned long*)addr = b; 239 - } 240 - 241 - 242 - 243 - /* Map ISA bus address to the real address. Only for PCMCIA. */ 244 - 245 - /* ISA page descriptor. */ 246 - static __u32 sh_isa_memmap[256]; 247 - 248 - #if 0 249 - static int 250 - sh_isa_mmap(__u32 start, __u32 length, __u32 offset) 251 - { 252 - int idx; 253 - 254 - if (start >= 0x100000 || (start & 0xfff) || (length != 0x1000)) 255 - return -1; 256 - 257 - idx = start >> 12; 258 - sh_isa_memmap[idx] = 0xb8000000 + (offset &~ 0xfff); 259 - printk("sh_isa_mmap: start %x len %x offset %x (idx %x paddr %x)\n", 260 - start, length, offset, idx, sh_isa_memmap[idx]); 261 - return 0; 262 - } 263 - #endif 264 - 265 - unsigned long 266 - sh7751systemh_isa_port2addr(unsigned long offset) 267 - { 268 - int idx; 269 - 270 - idx = (offset >> 12) & 0xff; 271 - offset &= 0xfff; 272 - return sh_isa_memmap[idx] + offset; 214 + maybebadio(port); 273 215 }
+1 -1
arch/sh/boards/renesas/systemh/irq.c
··· 15 15 #include <linux/hdreg.h> 16 16 #include <linux/ide.h> 17 17 #include <asm/io.h> 18 - #include <asm/mach/7751systemh.h> 18 + #include <asm/systemh7751.h> 19 19 #include <asm/smc37c93x.h> 20 20 21 21 /* address of external interrupt mask register
+1 -13
arch/sh/boards/renesas/systemh/setup.c
··· 15 15 * for more details. 16 16 */ 17 17 #include <linux/init.h> 18 - #include <asm/mach/7751systemh.h> 19 - #include <asm/mach/io.h> 20 18 #include <asm/machvec.h> 19 + #include <asm/systemh7751.h> 21 20 22 21 extern void make_systemh_irq(unsigned int irq); 23 22 ··· 30 31 */ 31 32 void __init init_7751systemh_IRQ(void) 32 33 { 33 - /* make_ipr_irq(10, BCR_ILCRD, 1, 0x0f-10); LAN */ 34 - /* make_ipr_irq(14, BCR_ILCRA, 2, 0x0f-4); */ 35 34 make_systemh_irq(0xb); /* Ethernet interrupt */ 36 35 } 37 36 ··· 56 59 .mv_outsb = sh7751systemh_outsb, 57 60 .mv_outsw = sh7751systemh_outsw, 58 61 .mv_outsl = sh7751systemh_outsl, 59 - 60 - .mv_readb = sh7751systemh_readb, 61 - .mv_readw = sh7751systemh_readw, 62 - .mv_readl = sh7751systemh_readl, 63 - .mv_writeb = sh7751systemh_writeb, 64 - .mv_writew = sh7751systemh_writew, 65 - .mv_writel = sh7751systemh_writel, 66 - 67 - .mv_isa_port2addr = sh7751systemh_isa_port2addr, 68 62 69 63 .mv_init_irq = init_7751systemh_IRQ, 70 64 };
+6 -2
arch/sh/boards/se/7300/io.c
··· 9 9 */ 10 10 11 11 #include <linux/kernel.h> 12 - #include <asm/mach/se7300.h> 13 12 #include <asm/io.h> 13 + #include <asm/se7300.h> 14 14 15 15 #define badio(fn, a) panic("bad i/o operation %s for %08lx.", #fn, a) 16 16 ··· 99 99 badio(inw, port); 100 100 } 101 101 102 + #ifdef CONFIG_SMC91X 102 103 /* MSTLANEX01 LAN at 0xb400:0000 */ 103 104 static struct iop laniop = { 104 105 .start = 0x300, ··· 111 110 .outb = simple_outb, 112 111 .outw = simple_outw, 113 112 }; 113 + #endif 114 114 115 115 /* NE2000 pc card NIC */ 116 116 static struct iop neiop = { ··· 125 123 .outw = simple_outw, 126 124 }; 127 125 126 + #ifdef CONFIG_IDE 128 127 /* CF in CF slot */ 129 128 static struct iop cfiop = { 130 129 .base = 0xb0600000, ··· 135 132 .outb = pcc_outb, 136 133 .outw = simple_outw, 137 134 }; 135 + #endif 138 136 139 137 static __inline__ struct iop * 140 138 port2iop(unsigned long port) 141 139 { 142 140 if (0) ; 143 - #if defined(CONFIG_SMC91111) 141 + #if defined(CONFIG_SMC91X) 144 142 else if (laniop.check(&laniop, port)) 145 143 return &laniop; 146 144 #endif
+1 -1
arch/sh/boards/se/7300/irq.c
··· 11 11 #include <linux/irq.h> 12 12 #include <asm/irq.h> 13 13 #include <asm/io.h> 14 - #include <asm/mach/se7300.h> 14 + #include <asm/se7300.h> 15 15 16 16 /* 17 17 * Initialize IRQ setting
+2 -16
arch/sh/boards/se/7300/led.c
··· 12 12 */ 13 13 14 14 #include <linux/sched.h> 15 - #include <asm/mach/se7300.h> 16 - 17 - static void 18 - mach_led(int position, int value) 19 - { 20 - volatile unsigned short *p = (volatile unsigned short *) PA_LED; 21 - 22 - if (value) { 23 - *p |= (1 << 8); 24 - } else { 25 - *p &= ~(1 << 8); 26 - } 27 - } 28 - 15 + #include <asm/se7300.h> 29 16 30 17 /* Cycle the LED's in the clasic Knightrider/Sun pattern */ 31 - void 32 - heartbeat_7300se(void) 18 + void heartbeat_7300se(void) 33 19 { 34 20 static unsigned int cnt = 0, period = 0; 35 21 volatile unsigned short *p = (volatile unsigned short *) PA_LED;
+1 -2
arch/sh/boards/se/7300/setup.c
··· 9 9 10 10 #include <linux/init.h> 11 11 #include <asm/machvec.h> 12 - #include <asm/machvec_init.h> 13 - #include <asm/mach/io.h> 12 + #include <asm/se7300.h> 14 13 15 14 void heartbeat_7300se(void); 16 15 void init_7300se_IRQ(void);
+1 -2
arch/sh/boards/se/73180/setup.c
··· 11 11 12 12 #include <linux/init.h> 13 13 #include <asm/machvec.h> 14 - #include <asm/machvec_init.h> 15 - #include <asm/mach/io.h> 14 + #include <asm/se73180.h> 16 15 17 16 void heartbeat_73180se(void); 18 17 void init_73180se_IRQ(void);
+8 -44
arch/sh/boards/se/770x/io.c
··· 1 - /* $Id: io.c,v 1.5 2004/02/22 23:08:43 kkojima Exp $ 1 + /* $Id: io.c,v 1.6 2006/01/04 17:53:54 lethal Exp $ 2 2 * 3 3 * linux/arch/sh/kernel/io_se.c 4 4 * ··· 11 11 #include <linux/kernel.h> 12 12 #include <linux/types.h> 13 13 #include <asm/io.h> 14 - #include <asm/se/se.h> 14 + #include <asm/se.h> 15 15 16 16 /* SH pcmcia io window base, start and end. */ 17 17 int sh_pcic_io_wbase = 0xb8400000; ··· 52 52 return 1; 53 53 } 54 54 55 - #define maybebadio(name,port) \ 56 - printk("bad PC-like io %s for port 0x%lx at 0x%08x\n", \ 57 - #name, (port), (__u32) __builtin_return_address(0)) 58 - 59 55 unsigned char se_inb(unsigned long port) 60 56 { 61 57 if (sh_pcic_io_start <= port && port <= sh_pcic_io_stop) ··· 82 86 (sh_pcic_io_start <= port && port <= sh_pcic_io_stop)) 83 87 return *port2adr(port); 84 88 else 85 - maybebadio(inw, port); 89 + maybebadio(port); 86 90 return 0; 87 91 } 88 92 89 93 unsigned int se_inl(unsigned long port) 90 94 { 91 - maybebadio(inl, port); 95 + maybebadio(port); 92 96 return 0; 93 97 } 94 98 ··· 119 123 (sh_pcic_io_start <= port && port <= sh_pcic_io_stop)) 120 124 *port2adr(port) = value; 121 125 else 122 - maybebadio(outw, port); 126 + maybebadio(port); 123 127 } 124 128 125 129 void se_outl(unsigned int value, unsigned long port) 126 130 { 127 - maybebadio(outl, port); 131 + maybebadio(port); 128 132 } 129 133 130 134 void se_insb(unsigned long port, void *addr, unsigned long count) ··· 155 159 156 160 void se_insl(unsigned long port, void *addr, unsigned long count) 157 161 { 158 - maybebadio(insl, port); 162 + maybebadio(port); 159 163 } 160 164 161 165 void se_outsb(unsigned long port, const void *addr, unsigned long count) ··· 186 190 187 191 void se_outsl(unsigned long port, const void *addr, unsigned long count) 188 192 { 189 - maybebadio(outsw, port); 190 - } 191 - 192 - /* Map ISA bus address to the real address. Only for PCMCIA. */ 193 - 194 - /* ISA page descriptor. */ 195 - static __u32 sh_isa_memmap[256]; 196 - 197 - static int 198 - sh_isa_mmap(__u32 start, __u32 length, __u32 offset) 199 - { 200 - int idx; 201 - 202 - if (start >= 0x100000 || (start & 0xfff) || (length != 0x1000)) 203 - return -1; 204 - 205 - idx = start >> 12; 206 - sh_isa_memmap[idx] = 0xb8000000 + (offset &~ 0xfff); 207 - #if 0 208 - printk("sh_isa_mmap: start %x len %x offset %x (idx %x paddr %x)\n", 209 - start, length, offset, idx, sh_isa_memmap[idx]); 210 - #endif 211 - return 0; 212 - } 213 - 214 - unsigned long 215 - se_isa_port2addr(unsigned long offset) 216 - { 217 - int idx; 218 - 219 - idx = (offset >> 12) & 0xff; 220 - offset &= 0xfff; 221 - return sh_isa_memmap[idx] + offset; 193 + maybebadio(port); 222 194 }
+1 -1
arch/sh/boards/se/770x/irq.c
··· 11 11 #include <linux/irq.h> 12 12 #include <asm/irq.h> 13 13 #include <asm/io.h> 14 - #include <asm/se/se.h> 14 + #include <asm/se.h> 15 15 16 16 /* 17 17 * Initialize IRQ setting
+1 -1
arch/sh/boards/se/770x/led.c
··· 10 10 */ 11 11 12 12 #include <linux/sched.h> 13 - #include <asm/se/se.h> 13 + #include <asm/se.h> 14 14 15 15 /* Cycle the LED's in the clasic Knightrider/Sun pattern */ 16 16 void heartbeat_se(void)
+1 -6
arch/sh/boards/se/770x/mach.c
··· 13 13 14 14 #include <asm/machvec.h> 15 15 #include <asm/rtc.h> 16 - #include <asm/machvec_init.h> 17 - 18 - #include <asm/se/io.h> 16 + #include <asm/se.h> 19 17 20 18 void heartbeat_se(void); 21 - void setup_se(void); 22 19 void init_se_IRQ(void); 23 20 24 21 /* ··· 53 56 .mv_outsb = se_outsb, 54 57 .mv_outsw = se_outsw, 55 58 .mv_outsl = se_outsl, 56 - 57 - .mv_isa_port2addr = se_isa_port2addr, 58 59 59 60 .mv_init_irq = init_se_IRQ, 60 61 #ifdef CONFIG_HEARTBEAT
+1 -1
arch/sh/boards/se/770x/setup.c
··· 14 14 #include <linux/hdreg.h> 15 15 #include <linux/ide.h> 16 16 #include <asm/io.h> 17 - #include <asm/se/se.h> 17 + #include <asm/se.h> 18 18 #include <asm/smc37c93x.h> 19 19 20 20 /*
+9 -17
arch/sh/boards/se/7751/io.c
··· 1 - /* 1 + /* 2 2 * linux/arch/sh/kernel/io_7751se.c 3 3 * 4 4 * Copyright (C) 2001 Ian da Silva, Jeremy Siegel ··· 14 14 #include <linux/kernel.h> 15 15 #include <linux/types.h> 16 16 #include <asm/io.h> 17 - #include <asm/se7751/se7751.h> 17 + #include <asm/se7751.h> 18 18 #include <asm/addrspace.h> 19 19 20 20 #include <linux/pci.h> ··· 52 52 53 53 #define PCI_IOMAP(adr) (PCI_IO_AREA + (adr & ~SH7751_PCIIOBR_MASK)) 54 54 55 - #define maybebadio(name,port) \ 56 - printk("bad PC-like io %s for port 0x%lx at 0x%08x\n", \ 57 - #name, (port), (__u32) __builtin_return_address(0)) 58 - 59 55 static inline void delay(void) 60 56 { 61 57 ctrl_inw(0xa0000000); ··· 62 66 { 63 67 if (port >= 0x2000) 64 68 return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000)); 65 - #if 0 66 - else 67 - return (volatile __u16 *) (PA_SUPERIO + (port << 1)); 68 - #endif 69 - maybebadio(name,(unsigned long)port); 69 + maybebadio((unsigned long)port); 70 70 return (volatile __u16*)port; 71 71 } 72 72 ··· 132 140 else if (port >= 0x2000) 133 141 return *port2adr(port); 134 142 else 135 - maybebadio(inw, port); 143 + maybebadio(port); 136 144 return 0; 137 145 } 138 146 ··· 145 153 else if (port >= 0x2000) 146 154 return *port2adr(port); 147 155 else 148 - maybebadio(inl, port); 156 + maybebadio(port); 149 157 return 0; 150 158 } 151 159 ··· 180 188 else if (port >= 0x2000) 181 189 *port2adr(port) = value; 182 190 else 183 - maybebadio(outw, port); 191 + maybebadio(port); 184 192 } 185 193 186 194 void sh7751se_outl(unsigned int value, unsigned long port) ··· 190 198 else if (CHECK_SH7751_PCIIO(port)) 191 199 *((unsigned long*)PCI_IOMAP(port)) = value; 192 200 else 193 - maybebadio(outl, port); 201 + maybebadio(port); 194 202 } 195 203 196 204 void sh7751se_insl(unsigned long port, void *addr, unsigned long count) 197 205 { 198 - maybebadio(insl, port); 206 + maybebadio(port); 199 207 } 200 208 201 209 void sh7751se_outsl(unsigned long port, const void *addr, unsigned long count) 202 210 { 203 - maybebadio(outsw, port); 211 + maybebadio(port); 204 212 } 205 213 206 214 /* Map ISA bus address to the real address. Only for PCMCIA. */
+1 -1
arch/sh/boards/se/7751/irq.c
··· 12 12 #include <linux/init.h> 13 13 #include <linux/irq.h> 14 14 #include <asm/irq.h> 15 - #include <asm/se7751/se7751.h> 15 + #include <asm/se7751.h> 16 16 17 17 /* 18 18 * Initialize IRQ setting
+1 -2
arch/sh/boards/se/7751/led.c
··· 8 8 * 9 9 * This file contains Solution Engine specific LED code. 10 10 */ 11 - 12 - #include <asm/se7751/se7751.h> 13 11 #include <linux/sched.h> 12 + #include <asm/se7751.h> 14 13 15 14 /* Cycle the LED's in the clasic Knightrider/Sun pattern */ 16 15 void heartbeat_7751se(void)
+1 -7
arch/sh/boards/se/7751/mach.c
··· 10 10 */ 11 11 12 12 #include <linux/init.h> 13 - 14 13 #include <asm/machvec.h> 15 - #include <asm/rtc.h> 16 - #include <asm/machvec_init.h> 17 - 18 - #include <asm/se7751/io.h> 14 + #include <asm/se7751.h> 19 15 20 16 void heartbeat_7751se(void); 21 17 void init_7751se_IRQ(void); ··· 39 43 40 44 .mv_insl = sh7751se_insl, 41 45 .mv_outsl = sh7751se_outsl, 42 - 43 - .mv_isa_port2addr = sh7751se_isa_port2addr, 44 46 45 47 .mv_init_irq = init_7751se_IRQ, 46 48 #ifdef CONFIG_HEARTBEAT
+2 -4
arch/sh/boards/se/7751/setup.c
··· 1 - /* 1 + /* 2 2 * linux/arch/sh/kernel/setup_7751se.c 3 3 * 4 4 * Copyright (C) 2000 Kazumoto Kojima ··· 11 11 12 12 #include <linux/init.h> 13 13 #include <linux/irq.h> 14 - 15 - #include <linux/hdreg.h> 16 14 #include <linux/ide.h> 17 15 #include <asm/io.h> 18 - #include <asm/se7751/se7751.h> 16 + #include <asm/se7751.h> 19 17 20 18 #ifdef CONFIG_SH_KGDB 21 19 #include <asm/kgdb.h>
+9 -16
arch/sh/boards/sh03/setup.c
··· 7 7 8 8 #include <linux/init.h> 9 9 #include <linux/irq.h> 10 - #include <linux/hdreg.h> 11 - #include <linux/ide.h> 12 10 #include <asm/io.h> 11 + #include <asm/rtc.h> 13 12 #include <asm/sh03/io.h> 14 13 #include <asm/sh03/sh03.h> 15 14 #include <asm/addrspace.h> 16 15 #include "../../drivers/pci/pci-sh7751.h" 17 - 18 - extern void (*board_time_init)(void); 19 16 20 17 const char *get_system_type(void) 21 18 { 22 19 return "Interface CTP/PCI-SH03)"; 23 20 } 24 21 25 - void init_sh03_IRQ(void) 22 + static void init_sh03_IRQ(void) 26 23 { 27 24 ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); 28 25 ··· 31 34 32 35 extern void *cf_io_base; 33 36 34 - unsigned long sh03_isa_port2addr(unsigned long port) 37 + static void __iomem *sh03_ioport_map(unsigned long port, unsigned int size) 35 38 { 36 39 if (PXSEG(port)) 37 - return port; 40 + return (void __iomem *)port; 38 41 /* CompactFlash (IDE) */ 39 - if (((port >= 0x1f0) && (port <= 0x1f7)) || (port == 0x3f6)) { 40 - return (unsigned long)cf_io_base + port; 41 - } 42 - return port + SH7751_PCI_IO_BASE; 43 - } 42 + if (((port >= 0x1f0) && (port <= 0x1f7)) || (port == 0x3f6)) 43 + return (void __iomem *)((unsigned long)cf_io_base + port); 44 44 45 - /* 46 - * The Machine Vector 47 - */ 45 + return (void __iomem *)(port + SH7751_PCI_IO_BASE); 46 + } 48 47 49 48 struct sh_machine_vector mv_sh03 __initmv = { 50 49 .mv_nr_irqs = 48, 51 - .mv_isa_port2addr = sh03_isa_port2addr, 50 + .mv_ioport_map = sh03_ioport_map, 52 51 .mv_init_irq = init_sh03_IRQ, 53 52 54 53 #ifdef CONFIG_HEARTBEAT
+8 -55
arch/sh/boards/snapgear/io.c
··· 28 28 /* 29 29 * The SnapGear uses the built-in PCI controller (PCIC) 30 30 * of the 7751 processor 31 - */ 31 + */ 32 32 33 33 #define PCIIOBR (volatile long *)PCI_REG(SH7751_PCIIOBR) 34 34 #define PCIMBR (volatile long *)PCI_REG(SH7751_PCIMBR) 35 35 #define PCI_IO_AREA SH7751_PCI_IO_BASE 36 36 #define PCI_MEM_AREA SH7751_PCI_CONFIG_BASE 37 37 38 - 39 38 #define PCI_IOMAP(adr) (PCI_IO_AREA + (adr & ~SH7751_PCIIOBR_MASK)) 40 - 41 - 42 - #define maybebadio(name,port) \ 43 - printk("bad PC-like io %s for port 0x%lx at 0x%08x\n", \ 44 - #name, (port), (__u32) __builtin_return_address(0)) 45 - 46 39 47 40 static inline void delay(void) 48 41 { 49 42 ctrl_inw(0xa0000000); 50 43 } 51 44 52 - 53 45 static inline volatile __u16 *port2adr(unsigned int port) 54 46 { 55 - #if 0 56 - if (port >= 0x2000) 57 - return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000)); 58 - #endif 59 - maybebadio(name,(unsigned long)port); 47 + maybebadio((unsigned long)port); 60 48 return (volatile __u16*)port; 61 49 } 62 - 63 50 64 51 /* In case someone configures the kernel w/o PCI support: in that */ 65 52 /* scenario, don't ever bother to check for PCI-window addresses */ ··· 102 115 else if (port >= 0x2000) 103 116 return *port2adr(port); 104 117 else 105 - maybebadio(inw, port); 118 + maybebadio(port); 106 119 return 0; 107 120 } 108 121 ··· 116 129 else if (port >= 0x2000) 117 130 return *port2adr(port); 118 131 else 119 - maybebadio(inl, port); 132 + maybebadio(port); 120 133 return 0; 121 134 } 122 135 ··· 154 167 else if (port >= 0x2000) 155 168 *port2adr(port) = value; 156 169 else 157 - maybebadio(outw, port); 170 + maybebadio(port); 158 171 } 159 172 160 173 ··· 165 178 else if (CHECK_SH7751_PCIIO(port)) 166 179 *((unsigned long*)PCI_IOMAP(port)) = value; 167 180 else 168 - maybebadio(outl, port); 181 + maybebadio(port); 169 182 } 170 183 171 184 void snapgear_insl(unsigned long port, void *addr, unsigned long count) 172 185 { 173 - maybebadio(insl, port); 186 + maybebadio(port); 174 187 } 175 188 176 189 void snapgear_outsl(unsigned long port, const void *addr, unsigned long count) 177 190 { 178 - maybebadio(outsw, port); 179 - } 180 - 181 - /* Map ISA bus address to the real address. Only for PCMCIA. */ 182 - 183 - 184 - /* ISA page descriptor. */ 185 - static __u32 sh_isa_memmap[256]; 186 - 187 - 188 - #if 0 189 - static int sh_isa_mmap(__u32 start, __u32 length, __u32 offset) 190 - { 191 - int idx; 192 - 193 - if (start >= 0x100000 || (start & 0xfff) || (length != 0x1000)) 194 - return -1; 195 - 196 - idx = start >> 12; 197 - sh_isa_memmap[idx] = 0xb8000000 + (offset &~ 0xfff); 198 - #if 0 199 - printk("sh_isa_mmap: start %x len %x offset %x (idx %x paddr %x)\n", 200 - start, length, offset, idx, sh_isa_memmap[idx]); 201 - #endif 202 - return 0; 203 - } 204 - #endif 205 - 206 - unsigned long snapgear_isa_port2addr(unsigned long offset) 207 - { 208 - int idx; 209 - 210 - idx = (offset >> 12) & 0xff; 211 - offset &= 0xfff; 212 - return sh_isa_memmap[idx] + offset; 191 + maybebadio(port); 213 192 }
-3
arch/sh/boards/snapgear/rtc.c
··· 17 17 #include <linux/time.h> 18 18 #include <linux/rtc.h> 19 19 #include <linux/mc146818rtc.h> 20 - 21 20 #include <asm/io.h> 22 - #include <asm/rtc.h> 23 - #include <asm/mc146818rtc.h> 24 21 25 22 /****************************************************************************/ 26 23
+3 -94
arch/sh/boards/snapgear/setup.c
··· 1 - /****************************************************************************/ 2 - /* 1 + /* 3 2 * linux/arch/sh/boards/snapgear/setup.c 4 3 * 5 4 * Copyright (C) 2002 David McCullough <davidm@snapgear.com> ··· 11 12 * Modified for 7751 Solution Engine by 12 13 * Ian da Silva and Jeremy Siegel, 2001. 13 14 */ 14 - /****************************************************************************/ 15 - 16 15 #include <linux/init.h> 17 16 #include <linux/irq.h> 18 17 #include <linux/interrupt.h> ··· 18 21 #include <linux/delay.h> 19 22 #include <linux/module.h> 20 23 #include <linux/sched.h> 21 - 22 24 #include <asm/machvec.h> 23 - #include <asm/mach/io.h> 25 + #include <asm/snapgear.h> 24 26 #include <asm/irq.h> 25 27 #include <asm/io.h> 28 + #include <asm/rtc.h> 26 29 #include <asm/cpu/timer.h> 27 30 28 - extern void (*board_time_init)(void); 29 31 extern void secureedge5410_rtc_init(void); 30 32 extern void pcibios_init(void); 31 33 ··· 81 85 make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); 82 86 } 83 87 84 - /****************************************************************************/ 85 - /* 86 - * Fast poll interrupt simulator. 87 - */ 88 - 89 - /* 90 - * Leave all of the fast timer/fast poll stuff commented out for now, since 91 - * it's not clear whether it actually works or not. Since it wasn't being used 92 - * at all in 2.4, we'll assume it's not sane for 2.6 either.. -- PFM 93 - */ 94 - #if 0 95 - #define FAST_POLL 1000 96 - //#define FAST_POLL_INTR 97 - 98 - #define FASTTIMER_IRQ 17 99 - #define FASTTIMER_IPR_ADDR INTC_IPRA 100 - #define FASTTIMER_IPR_POS 2 101 - #define FASTTIMER_PRIORITY 3 102 - 103 - #ifdef FAST_POLL_INTR 104 - #define TMU1_TCR_INIT 0x0020 105 - #else 106 - #define TMU1_TCR_INIT 0 107 - #endif 108 - #define TMU_TSTR_INIT 1 109 - #define TMU1_TCR_CALIB 0x0000 110 - 111 - 112 - #ifdef FAST_POLL_INTR 113 - static void fast_timer_irq(int irq, void *dev_instance, struct pt_regs *regs) 114 - { 115 - unsigned long timer_status; 116 - timer_status = ctrl_inw(TMU1_TCR); 117 - timer_status &= ~0x100; 118 - ctrl_outw(timer_status, TMU1_TCR); 119 - } 120 - #endif 121 - 122 - /* 123 - * return the current ticks on the fast timer 124 - */ 125 - 126 - unsigned long fast_timer_count(void) 127 - { 128 - return(ctrl_inl(TMU1_TCNT)); 129 - } 130 - 131 - /* 132 - * setup a fast timer for profiling etc etc 133 - */ 134 - 135 - static void setup_fast_timer() 136 - { 137 - unsigned long interval; 138 - 139 - #ifdef FAST_POLL_INTR 140 - interval = (current_cpu_data.module_clock/4 + FAST_POLL/2) / FAST_POLL; 141 - 142 - make_ipr_irq(FASTTIMER_IRQ, FASTTIMER_IPR_ADDR, FASTTIMER_IPR_POS, 143 - FASTTIMER_PRIORITY); 144 - 145 - printk("SnapGear: %dHz fast timer on IRQ %d\n",FAST_POLL,FASTTIMER_IRQ); 146 - 147 - if (request_irq(FASTTIMER_IRQ, fast_timer_irq, 0, "SnapGear fast timer", 148 - NULL) != 0) 149 - printk("%s(%d): request_irq() failed?\n", __FILE__, __LINE__); 150 - #else 151 - printk("SnapGear: fast timer running\n",FAST_POLL,FASTTIMER_IRQ); 152 - interval = 0xffffffff; 153 - #endif 154 - 155 - ctrl_outb(ctrl_inb(TMU_TSTR) & ~0x2, TMU_TSTR); /* disable timer 1 */ 156 - ctrl_outw(TMU1_TCR_INIT, TMU1_TCR); 157 - ctrl_outl(interval, TMU1_TCOR); 158 - ctrl_outl(interval, TMU1_TCNT); 159 - ctrl_outb(ctrl_inb(TMU_TSTR) | 0x2, TMU_TSTR); /* enable timer 1 */ 160 - 161 - printk("Timer count 1 = 0x%x\n", fast_timer_count()); 162 - udelay(1000); 163 - printk("Timer count 2 = 0x%x\n", fast_timer_count()); 164 - } 165 - #endif 166 - 167 - /****************************************************************************/ 168 - 169 88 const char *get_system_type(void) 170 89 { 171 90 return "SnapGear SecureEdge5410"; ··· 106 195 .mv_outb_p = snapgear_outb_p, 107 196 .mv_outw_p = snapgear_outw, 108 197 .mv_outl_p = snapgear_outl, 109 - 110 - .mv_isa_port2addr = snapgear_isa_port2addr, 111 198 112 199 .mv_init_irq = init_snapgear_IRQ, 113 200 };
+2 -2
arch/sh/boards/titan/io.c
··· 30 30 ctrl_inw(0xa0000000); 31 31 } 32 32 33 - static inline volatile u16 *port2adr(unsigned int port) 33 + static inline unsigned int port2adr(unsigned int port) 34 34 { 35 35 maybebadio((unsigned long)port); 36 - return (volatile u16*)port; 36 + return port; 37 37 } 38 38 39 39 u8 titan_inb(unsigned long port)
+5 -1
arch/sh/cchips/Kconfig
··· 65 65 66 66 Do not change this unless you know what you are doing. 67 67 68 + config HD64461_IOBASE 69 + hex "HD64461 start address" 70 + depends on HD64461 71 + default "0xb0000000" 72 + 68 73 config HD64461_ENABLER 69 74 bool "HD64461 PCMCIA enabler" 70 75 depends on HD64461 ··· 77 72 Say Y here if you want to enable PCMCIA support 78 73 via the HD64461 companion chip. 79 74 Otherwise, say N. 80 - 81 75 82 76 config HD64465_IOBASE 83 77 hex "HD64465 start address"
+3 -4
arch/sh/kernel/cf-enabler.c
··· 10 10 */ 11 11 12 12 #include <linux/init.h> 13 - 13 + #include <linux/mm.h> 14 + #include <linux/vmalloc.h> 14 15 #include <asm/io.h> 15 16 #include <asm/irq.h> 16 17 ··· 33 32 /* SH4 can't access PCMCIA interface through P2 area. 34 33 * we must remap it with appropreate attribute bit of the page set. 35 34 * this part is based on Greg Banks' hd64465_ss.c implementation - Masahiro Abe */ 36 - #include <linux/mm.h> 37 - #include <linux/vmalloc.h> 38 35 39 36 #if defined(CONFIG_CF_AREA6) 40 37 #define slot_no 0 ··· 83 84 } 84 85 85 86 #if defined(CONFIG_SH_SOLUTION_ENGINE) 86 - #include <asm/se/se.h> 87 + #include <asm/se.h> 87 88 88 89 /* 89 90 * SolutionEngine
+1 -1
drivers/net/stnic.c
··· 19 19 20 20 #include <asm/system.h> 21 21 #include <asm/io.h> 22 - #include <asm/se/se.h> 22 + #include <asm/se.h> 23 23 #include <asm/machvec.h> 24 24 #ifdef CONFIG_SH_STANDARD_BIOS 25 25 #include <asm/sh_bios.h>
+3
include/asm-sh/hs7751rvoip/hs7751rvoip.h
··· 44 44 #define IRQ_RINGING 4 /* Ringing IRQ */ 45 45 #define IRQ_CODEC 5 /* CODEC IRQ */ 46 46 47 + #define __IO_PREFIX hs7751rvoip 48 + #include <asm/io_generic.h> 49 + 47 50 /* arch/sh/boards/renesas/hs7751rvoip/irq.c */ 48 51 void init_hs7751rvoip_IRQ(void); 49 52
+1 -1
include/asm-sh/mc146818rtc.h
··· 24 24 #define CMOS_WRITE(val,addr) __CMOS_WRITE(val,addr,b) 25 25 26 26 #elif defined(CONFIG_SH_SECUREEDGE5410) 27 - #include <asm/snapgear/io.h> 27 + #include <asm/snapgear.h> 28 28 29 29 #define RTC_PORT(n) SECUREEDGE_IOPORT_ADDR 30 30 #define CMOS_READ(addr) secureedge5410_cmos_read(addr)
-35
include/asm-sh/se/io.h
··· 1 - /* 2 - * include/asm-sh/io_se.h 3 - * 4 - * Copyright 2000 Stuart Menefy (stuart.menefy@st.com) 5 - * 6 - * May be copied or modified under the terms of the GNU General Public 7 - * License. See linux/COPYING for more information. 8 - * 9 - * IO functions for an Hitachi SolutionEngine 10 - */ 11 - 12 - #ifndef _ASM_SH_IO_SE_H 13 - #define _ASM_SH_IO_SE_H 14 - 15 - extern unsigned char se_inb(unsigned long port); 16 - extern unsigned short se_inw(unsigned long port); 17 - extern unsigned int se_inl(unsigned long port); 18 - 19 - extern void se_outb(unsigned char value, unsigned long port); 20 - extern void se_outw(unsigned short value, unsigned long port); 21 - extern void se_outl(unsigned int value, unsigned long port); 22 - 23 - extern unsigned char se_inb_p(unsigned long port); 24 - extern void se_outb_p(unsigned char value, unsigned long port); 25 - 26 - extern void se_insb(unsigned long port, void *addr, unsigned long count); 27 - extern void se_insw(unsigned long port, void *addr, unsigned long count); 28 - extern void se_insl(unsigned long port, void *addr, unsigned long count); 29 - extern void se_outsb(unsigned long port, const void *addr, unsigned long count); 30 - extern void se_outsw(unsigned long port, const void *addr, unsigned long count); 31 - extern void se_outsl(unsigned long port, const void *addr, unsigned long count); 32 - 33 - extern unsigned long se_isa_port2addr(unsigned long offset); 34 - 35 - #endif /* _ASM_SH_IO_SE_H */
+18 -24
include/asm-sh/se/se.h include/asm-sh/systemh7751.h
··· 1 - #ifndef __ASM_SH_HITACHI_SE_H 2 - #define __ASM_SH_HITACHI_SE_H 1 + #ifndef __ASM_SH_SYSTEMH_7751SYSTEMH_H 2 + #define __ASM_SH_SYSTEMH_7751SYSTEMH_H 3 3 4 4 /* 5 - * linux/include/asm-sh/hitachi_se.h 5 + * linux/include/asm-sh/systemh/7751systemh.h 6 6 * 7 7 * Copyright (C) 2000 Kazumoto Kojima 8 8 * 9 - * Hitachi SolutionEngine support 9 + * Hitachi SystemH support 10 + 11 + * Modified for 7751 SystemH by 12 + * Jonathan Short, 2002. 10 13 */ 11 14 12 15 /* Box specific addresses. */ ··· 31 28 #define PA_EXT5_SIZE 0x04000000 32 29 #define PA_PCIC 0x18000000 /* MR-SHPC-01 PCMCIA */ 33 30 34 - #define PA_83902 0xb0000000 /* DP83902A */ 35 - #define PA_83902_IF 0xb0040000 /* DP83902A remote io port */ 36 - #define PA_83902_RST 0xb0080000 /* DP83902A reset port */ 31 + #define PA_DIPSW0 0xb9000000 /* Dip switch 5,6 */ 32 + #define PA_DIPSW1 0xb9000002 /* Dip switch 7,8 */ 33 + #define PA_LED 0xba000000 /* LED */ 34 + #define PA_BCR 0xbb000000 /* FPGA on the MS7751SE01 */ 37 35 38 - #define PA_SUPERIO 0xb0400000 /* SMC37C935A super io chip */ 39 - #define PA_DIPSW0 0xb0800000 /* Dip switch 5,6 */ 40 - #define PA_DIPSW1 0xb0800002 /* Dip switch 7,8 */ 41 - #define PA_LED 0xb0c00000 /* LED */ 42 - #if defined(CONFIG_CPU_SUBTYPE_SH7705) 43 - #define PA_BCR 0xb0e00000 44 - #else 45 - #define PA_BCR 0xb1400000 /* FPGA */ 46 - #endif 47 - 48 - #define PA_MRSHPC 0xb83fffe0 /* MR-SHPC-01 PCMCIA controller */ 36 + #define PA_MRSHPC 0xb83fffe0 /* MR-SHPC-01 PCMCIA controler */ 49 37 #define PA_MRSHPC_MW1 0xb8400000 /* MR-SHPC-01 memory window base */ 50 38 #define PA_MRSHPC_MW2 0xb8500000 /* MR-SHPC-01 attribute window base */ 51 39 #define PA_MRSHPC_IO 0xb8600000 /* MR-SHPC-01 I/O window base */ 40 + #define MRSHPC_MODE (PA_MRSHPC + 4) 52 41 #define MRSHPC_OPTION (PA_MRSHPC + 6) 53 42 #define MRSHPC_CSR (PA_MRSHPC + 8) 54 43 #define MRSHPC_ISR (PA_MRSHPC + 10) ··· 63 68 #define BCR_ILCRF (PA_BCR + 10) 64 69 #define BCR_ILCRG (PA_BCR + 12) 65 70 66 - #if defined(CONFIG_CPU_SUBTYPE_SH7705) 67 - #define IRQ_STNIC 12 68 - #else 69 - #define IRQ_STNIC 10 70 - #endif 71 + #define IRQ_79C973 13 71 72 72 - #endif /* __ASM_SH_HITACHI_SE_H */ 73 + #define __IO_PREFIX sh7751systemh 74 + #include <asm/io_generic.h> 75 + 76 + #endif /* __ASM_SH_SYSTEMH_7751SYSTEMH_H */
-29
include/asm-sh/se7300/io.h
··· 1 - /* 2 - * include/asm-sh/se7300/io.h 3 - * 4 - * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp> 5 - * IO functions for SH-Mobile(SH7300) SolutionEngine 6 - */ 7 - 8 - #ifndef _ASM_SH_IO_7300SE_H 9 - #define _ASM_SH_IO_7300SE_H 10 - 11 - extern unsigned char sh7300se_inb(unsigned long port); 12 - extern unsigned short sh7300se_inw(unsigned long port); 13 - extern unsigned int sh7300se_inl(unsigned long port); 14 - 15 - extern void sh7300se_outb(unsigned char value, unsigned long port); 16 - extern void sh7300se_outw(unsigned short value, unsigned long port); 17 - extern void sh7300se_outl(unsigned int value, unsigned long port); 18 - 19 - extern unsigned char sh7300se_inb_p(unsigned long port); 20 - extern void sh7300se_outb_p(unsigned char value, unsigned long port); 21 - 22 - extern void sh7300se_insb(unsigned long port, void *addr, unsigned long count); 23 - extern void sh7300se_insw(unsigned long port, void *addr, unsigned long count); 24 - extern void sh7300se_insl(unsigned long port, void *addr, unsigned long count); 25 - extern void sh7300se_outsb(unsigned long port, const void *addr, unsigned long count); 26 - extern void sh7300se_outsw(unsigned long port, const void *addr, unsigned long count); 27 - extern void sh7300se_outsl(unsigned long port, const void *addr, unsigned long count); 28 - 29 - #endif /* _ASM_SH_IO_7300SE_H */
+10 -6
include/asm-sh/se7300/se7300.h include/asm-sh/se73180.h
··· 1 - #ifndef __ASM_SH_HITACHI_SE7300_H 2 - #define __ASM_SH_HITACHI_SE7300_H 1 + #ifndef __ASM_SH_HITACHI_SE73180_H 2 + #define __ASM_SH_HITACHI_SE73180_H 3 3 4 4 /* 5 - * linux/include/asm-sh/se/se7300.h 5 + * include/asm-sh/se/se73180.h 6 6 * 7 7 * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp> 8 8 * 9 - * SH-Mobile SolutionEngine 7300 support 9 + * SH-Mobile SolutionEngine 73180 support 10 10 */ 11 11 12 12 /* Box specific addresses. */ ··· 46 46 #define MRSHPC_IOWCR2 (PA_MRSHPC + 26) 47 47 #define MRSHPC_CDCR (PA_MRSHPC + 28) 48 48 #define MRSHPC_PCIC_INFO (PA_MRSHPC + 30) 49 - #define PA_LED 0xb0800000 /* LED */ 49 + #define PA_LED 0xb0C00000 /* LED */ 50 + #define LED_SHIFT 0 50 51 #define PA_DIPSW 0xb0900000 /* Dip switch 31 */ 51 52 #define PA_EPLD_MODESET 0xb0a00000 /* FPGA Mode set register */ 52 53 #define PA_EPLD_ST1 0xb0a80000 /* FPGA Interrupt status register1 */ ··· 59 58 #define PA_LCD1 0xb8000000 60 59 #define PA_LCD2 0xb8800000 61 60 62 - #endif /* __ASM_SH_HITACHI_SE7300_H */ 61 + #define __IO_PREFIX sh73180se 62 + #include <asm/io_generic.h> 63 + 64 + #endif /* __ASM_SH_HITACHI_SE73180_H */
-32
include/asm-sh/se73180/io.h
··· 1 - /* 2 - * include/asm-sh/se73180/io.h 3 - * 4 - * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp> 5 - * Based on include/asm-sh/se7300/io.h 6 - * 7 - * IO functions for SH-Mobile3(SH73180) SolutionEngine 8 - * 9 - */ 10 - 11 - #ifndef _ASM_SH_IO_73180SE_H 12 - #define _ASM_SH_IO_73180SE_H 13 - 14 - extern unsigned char sh73180se_inb(unsigned long port); 15 - extern unsigned short sh73180se_inw(unsigned long port); 16 - extern unsigned int sh73180se_inl(unsigned long port); 17 - 18 - extern void sh73180se_outb(unsigned char value, unsigned long port); 19 - extern void sh73180se_outw(unsigned short value, unsigned long port); 20 - extern void sh73180se_outl(unsigned int value, unsigned long port); 21 - 22 - extern unsigned char sh73180se_inb_p(unsigned long port); 23 - extern void sh73180se_outb_p(unsigned char value, unsigned long port); 24 - 25 - extern void sh73180se_insb(unsigned long port, void *addr, unsigned long count); 26 - extern void sh73180se_insw(unsigned long port, void *addr, unsigned long count); 27 - extern void sh73180se_insl(unsigned long port, void *addr, unsigned long count); 28 - extern void sh73180se_outsb(unsigned long port, const void *addr, unsigned long count); 29 - extern void sh73180se_outsw(unsigned long port, const void *addr, unsigned long count); 30 - extern void sh73180se_outsl(unsigned long port, const void *addr, unsigned long count); 31 - 32 - #endif /* _ASM_SH_IO_73180SE_H */
+9 -7
include/asm-sh/se73180/se73180.h include/asm-sh/se7300.h
··· 1 - #ifndef __ASM_SH_HITACHI_SE73180_H 2 - #define __ASM_SH_HITACHI_SE73180_H 1 + #ifndef __ASM_SH_HITACHI_SE7300_H 2 + #define __ASM_SH_HITACHI_SE7300_H 3 3 4 4 /* 5 - * include/asm-sh/se/se73180.h 5 + * linux/include/asm-sh/se/se7300.h 6 6 * 7 7 * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp> 8 8 * 9 - * SH-Mobile SolutionEngine 73180 support 9 + * SH-Mobile SolutionEngine 7300 support 10 10 */ 11 11 12 12 /* Box specific addresses. */ ··· 46 46 #define MRSHPC_IOWCR2 (PA_MRSHPC + 26) 47 47 #define MRSHPC_CDCR (PA_MRSHPC + 28) 48 48 #define MRSHPC_PCIC_INFO (PA_MRSHPC + 30) 49 - #define PA_LED 0xb0C00000 /* LED */ 50 - #define LED_SHIFT 0 49 + #define PA_LED 0xb0800000 /* LED */ 51 50 #define PA_DIPSW 0xb0900000 /* Dip switch 31 */ 52 51 #define PA_EPLD_MODESET 0xb0a00000 /* FPGA Mode set register */ 53 52 #define PA_EPLD_ST1 0xb0a80000 /* FPGA Interrupt status register1 */ ··· 58 59 #define PA_LCD1 0xb8000000 59 60 #define PA_LCD2 0xb8800000 60 61 61 - #endif /* __ASM_SH_HITACHI_SE73180_H */ 62 + #define __IO_PREFIX sh7300se 63 + #include <asm/io_generic.h> 64 + 65 + #endif /* __ASM_SH_HITACHI_SE7300_H */
-42
include/asm-sh/se7751/io.h
··· 1 - /* 2 - * include/asm-sh/io_7751se.h 3 - * 4 - * Modified version of io_se.h for the 7751se-specific functions. 5 - * 6 - * May be copied or modified under the terms of the GNU General Public 7 - * License. See linux/COPYING for more information. 8 - * 9 - * IO functions for an Hitachi SolutionEngine 10 - */ 11 - 12 - #ifndef _ASM_SH_IO_7751SE_H 13 - #define _ASM_SH_IO_7751SE_H 14 - 15 - extern unsigned char sh7751se_inb(unsigned long port); 16 - extern unsigned short sh7751se_inw(unsigned long port); 17 - extern unsigned int sh7751se_inl(unsigned long port); 18 - 19 - extern void sh7751se_outb(unsigned char value, unsigned long port); 20 - extern void sh7751se_outw(unsigned short value, unsigned long port); 21 - extern void sh7751se_outl(unsigned int value, unsigned long port); 22 - 23 - extern unsigned char sh7751se_inb_p(unsigned long port); 24 - extern void sh7751se_outb_p(unsigned char value, unsigned long port); 25 - 26 - extern void sh7751se_insb(unsigned long port, void *addr, unsigned long count); 27 - extern void sh7751se_insw(unsigned long port, void *addr, unsigned long count); 28 - extern void sh7751se_insl(unsigned long port, void *addr, unsigned long count); 29 - extern void sh7751se_outsb(unsigned long port, const void *addr, unsigned long count); 30 - extern void sh7751se_outsw(unsigned long port, const void *addr, unsigned long count); 31 - extern void sh7751se_outsl(unsigned long port, const void *addr, unsigned long count); 32 - 33 - extern unsigned char sh7751se_readb(unsigned long addr); 34 - extern unsigned short sh7751se_readw(unsigned long addr); 35 - extern unsigned int sh7751se_readl(unsigned long addr); 36 - extern void sh7751se_writeb(unsigned char b, unsigned long addr); 37 - extern void sh7751se_writew(unsigned short b, unsigned long addr); 38 - extern void sh7751se_writel(unsigned int b, unsigned long addr); 39 - 40 - extern unsigned long sh7751se_isa_port2addr(unsigned long offset); 41 - 42 - #endif /* _ASM_SH_IO_7751SE_H */
+26 -14
include/asm-sh/se7751/se7751.h include/asm-sh/se.h
··· 1 - #ifndef __ASM_SH_HITACHI_7751SE_H 2 - #define __ASM_SH_HITACHI_7751SE_H 1 + #ifndef __ASM_SH_HITACHI_SE_H 2 + #define __ASM_SH_HITACHI_SE_H 3 3 4 4 /* 5 - * linux/include/asm-sh/hitachi_7751se.h 5 + * linux/include/asm-sh/hitachi_se.h 6 6 * 7 7 * Copyright (C) 2000 Kazumoto Kojima 8 8 * 9 9 * Hitachi SolutionEngine support 10 - 11 - * Modified for 7751 Solution Engine by 12 - * Ian da Silva and Jeremy Siegel, 2001. 13 10 */ 14 11 15 12 /* Box specific addresses. */ ··· 28 31 #define PA_EXT5_SIZE 0x04000000 29 32 #define PA_PCIC 0x18000000 /* MR-SHPC-01 PCMCIA */ 30 33 31 - #define PA_DIPSW0 0xb9000000 /* Dip switch 5,6 */ 32 - #define PA_DIPSW1 0xb9000002 /* Dip switch 7,8 */ 33 - #define PA_LED 0xba000000 /* LED */ 34 - #define PA_BCR 0xbb000000 /* FPGA on the MS7751SE01 */ 34 + #define PA_83902 0xb0000000 /* DP83902A */ 35 + #define PA_83902_IF 0xb0040000 /* DP83902A remote io port */ 36 + #define PA_83902_RST 0xb0080000 /* DP83902A reset port */ 35 37 36 - #define PA_MRSHPC 0xb83fffe0 /* MR-SHPC-01 PCMCIA controler */ 38 + #define PA_SUPERIO 0xb0400000 /* SMC37C935A super io chip */ 39 + #define PA_DIPSW0 0xb0800000 /* Dip switch 5,6 */ 40 + #define PA_DIPSW1 0xb0800002 /* Dip switch 7,8 */ 41 + #define PA_LED 0xb0c00000 /* LED */ 42 + #if defined(CONFIG_CPU_SUBTYPE_SH7705) 43 + #define PA_BCR 0xb0e00000 44 + #else 45 + #define PA_BCR 0xb1400000 /* FPGA */ 46 + #endif 47 + 48 + #define PA_MRSHPC 0xb83fffe0 /* MR-SHPC-01 PCMCIA controller */ 37 49 #define PA_MRSHPC_MW1 0xb8400000 /* MR-SHPC-01 memory window base */ 38 50 #define PA_MRSHPC_MW2 0xb8500000 /* MR-SHPC-01 attribute window base */ 39 51 #define PA_MRSHPC_IO 0xb8600000 /* MR-SHPC-01 I/O window base */ 40 - #define MRSHPC_MODE (PA_MRSHPC + 4) 41 52 #define MRSHPC_OPTION (PA_MRSHPC + 6) 42 53 #define MRSHPC_CSR (PA_MRSHPC + 8) 43 54 #define MRSHPC_ISR (PA_MRSHPC + 10) ··· 68 63 #define BCR_ILCRF (PA_BCR + 10) 69 64 #define BCR_ILCRG (PA_BCR + 12) 70 65 71 - #define IRQ_79C973 13 66 + #if defined(CONFIG_CPU_SUBTYPE_SH7705) 67 + #define IRQ_STNIC 12 68 + #else 69 + #define IRQ_STNIC 10 70 + #endif 72 71 73 - #endif /* __ASM_SH_HITACHI_7751SE_H */ 72 + #define __IO_PREFIX se 73 + #include <asm/io_generic.h> 74 + 75 + #endif /* __ASM_SH_HITACHI_SE_H */
+1 -9
include/asm-sh/sh03/io.h
··· 33 33 #define IRL3_IPR_POS 0 34 34 #define IRL3_PRIORITY 4 35 35 36 - 37 - extern unsigned long sh03_isa_port2addr(unsigned long offset); 38 - 39 - extern void setup_sh03(void); 40 - extern void init_sh03_IRQ(void); 41 - extern void heartbeat_sh03(void); 42 - 43 - extern void sh03_rtc_gettimeofday(struct timeval *tv); 44 - extern int sh03_rtc_settimeofday(const struct timeval *tv); 36 + void heartbeat_sh03(void); 45 37 46 38 #endif /* _ASM_SH_IO_SH03_H */
+9 -22
include/asm-sh/snapgear/io.h include/asm-sh/snapgear.h
··· 40 40 #define IRL3_PRIORITY 4 41 41 #endif 42 42 43 - extern unsigned char snapgear_inb(unsigned long port); 44 - extern unsigned short snapgear_inw(unsigned long port); 45 - extern unsigned int snapgear_inl(unsigned long port); 46 - 47 - extern void snapgear_outb(unsigned char value, unsigned long port); 48 - extern void snapgear_outw(unsigned short value, unsigned long port); 49 - extern void snapgear_outl(unsigned int value, unsigned long port); 50 - 51 - extern unsigned char snapgear_inb_p(unsigned long port); 52 - extern void snapgear_outb_p(unsigned char value, unsigned long port); 53 - 54 - extern void snapgear_insl(unsigned long port, void *addr, unsigned long count); 55 - extern void snapgear_outsl(unsigned long port, const void *addr, unsigned long count); 56 - 57 - extern unsigned long snapgear_isa_port2addr(unsigned long offset); 43 + #define __IO_PREFIX snapgear 44 + #include <asm/io_generic.h> 58 45 59 46 #ifdef CONFIG_SH_SECUREEDGE5410 60 47 /* ··· 66 79 * D12 - RTS RESET 67 80 */ 68 81 69 - #define SECUREEDGE_IOPORT_ADDR ((volatile short *) 0xb0000000) 70 - extern unsigned short secureedge5410_ioport; 82 + #define SECUREEDGE_IOPORT_ADDR ((volatile short *) 0xb0000000) 83 + extern unsigned short secureedge5410_ioport; 71 84 72 - #define SECUREEDGE_WRITE_IOPORT(val, mask) (*SECUREEDGE_IOPORT_ADDR = \ 73 - (secureedge5410_ioport = \ 74 - ((secureedge5410_ioport & ~(mask)) | ((val) & (mask))))) 75 - #define SECUREEDGE_READ_IOPORT() \ 76 - ((*SECUREEDGE_IOPORT_ADDR&0x0817) | (secureedge5410_ioport&~0x0817)) 85 + #define SECUREEDGE_WRITE_IOPORT(val, mask) (*SECUREEDGE_IOPORT_ADDR = \ 86 + (secureedge5410_ioport = \ 87 + ((secureedge5410_ioport & ~(mask)) | ((val) & (mask))))) 88 + #define SECUREEDGE_READ_IOPORT() \ 89 + ((*SECUREEDGE_IOPORT_ADDR&0x0817) | (secureedge5410_ioport&~0x0817)) 77 90 #endif 78 91 79 92 #endif /* _ASM_SH_IO_SNAPGEAR_H */
+10 -7
include/asm-sh/systemh/7751systemh.h include/asm-sh/se7751.h
··· 1 - #ifndef __ASM_SH_SYSTEMH_7751SYSTEMH_H 2 - #define __ASM_SH_SYSTEMH_7751SYSTEMH_H 1 + #ifndef __ASM_SH_HITACHI_7751SE_H 2 + #define __ASM_SH_HITACHI_7751SE_H 3 3 4 4 /* 5 - * linux/include/asm-sh/systemh/7751systemh.h 5 + * linux/include/asm-sh/hitachi_7751se.h 6 6 * 7 7 * Copyright (C) 2000 Kazumoto Kojima 8 8 * 9 - * Hitachi SystemH support 9 + * Hitachi SolutionEngine support 10 10 11 - * Modified for 7751 SystemH by 12 - * Jonathan Short, 2002. 11 + * Modified for 7751 Solution Engine by 12 + * Ian da Silva and Jeremy Siegel, 2001. 13 13 */ 14 14 15 15 /* Box specific addresses. */ ··· 65 65 66 66 #define IRQ_79C973 13 67 67 68 - #endif /* __ASM_SH_SYSTEMH_7751SYSTEMH_H */ 68 + #define __IO_PREFIX sh7751se 69 + #include <asm/io_generic.h> 70 + 71 + #endif /* __ASM_SH_HITACHI_7751SE_H */
-43
include/asm-sh/systemh/io.h
··· 1 - /* 2 - * include/asm-sh/systemh/io.h 3 - * 4 - * Stupid I/O definitions for SystemH, cloned from SE7751. 5 - * 6 - * Copyright (C) 2003 Paul Mundt 7 - * 8 - * This file is subject to the terms and conditions of the GNU General Public 9 - * License. See the file "COPYING" in the main directory of this archive 10 - * for more details. 11 - */ 12 - #ifndef __ASM_SH_SYSTEMH_IO_H 13 - #define __ASM_SH_SYSTEMH_IO_H 14 - 15 - extern unsigned char sh7751systemh_inb(unsigned long port); 16 - extern unsigned short sh7751systemh_inw(unsigned long port); 17 - extern unsigned int sh7751systemh_inl(unsigned long port); 18 - 19 - extern void sh7751systemh_outb(unsigned char value, unsigned long port); 20 - extern void sh7751systemh_outw(unsigned short value, unsigned long port); 21 - extern void sh7751systemh_outl(unsigned int value, unsigned long port); 22 - 23 - extern unsigned char sh7751systemh_inb_p(unsigned long port); 24 - extern void sh7751systemh_outb_p(unsigned char value, unsigned long port); 25 - 26 - extern void sh7751systemh_insb(unsigned long port, void *addr, unsigned long count); 27 - extern void sh7751systemh_insw(unsigned long port, void *addr, unsigned long count); 28 - extern void sh7751systemh_insl(unsigned long port, void *addr, unsigned long count); 29 - extern void sh7751systemh_outsb(unsigned long port, const void *addr, unsigned long count); 30 - extern void sh7751systemh_outsw(unsigned long port, const void *addr, unsigned long count); 31 - extern void sh7751systemh_outsl(unsigned long port, const void *addr, unsigned long count); 32 - 33 - extern unsigned char sh7751systemh_readb(unsigned long addr); 34 - extern unsigned short sh7751systemh_readw(unsigned long addr); 35 - extern unsigned int sh7751systemh_readl(unsigned long addr); 36 - extern void sh7751systemh_writeb(unsigned char b, unsigned long addr); 37 - extern void sh7751systemh_writew(unsigned short b, unsigned long addr); 38 - extern void sh7751systemh_writel(unsigned int b, unsigned long addr); 39 - 40 - extern unsigned long sh7751systemh_isa_port2addr(unsigned long offset); 41 - 42 - #endif /* __ASM_SH_SYSTEMH_IO_H */ 43 -