Commit f3ac9fbf7a0b9493377ee88d9b5b2933ff3f7ade
Committed by
Linus Torvalds
1 parent
1343f776c5
Exists in
master
and in
4 other branches
[PATCH] m32r: SMC91x driver update
Update SMC91x driver for m32r. - Remove needless NONCACHE_OFFSET adjustment. > [PATCH 2.6.14-rc4] m32r: NONCACHE_OFFSET in _port2addr > Change _port2addr() not to add NONCACHE_OFFSET. > Adding NONCACHE_OFFSET requires needless address adjusting by a driver > using ioremap() like a SMC91x driver. - Fix lots of warnings as following: /usr/src/ctest/git/kernel/drivers/net/smc91x.c: In function `smc_reset': /usr/src/ctest/git/kernel/drivers/net/smc91x.c:324: warning: passing arg 2 of `_outw' makes integer from pointer without a cast /usr/src/ctest/git/kernel/drivers/net/smc91x.c:325: warning: passing arg 2 of `_outw' makes integer from pointer without a cast /usr/src/ctest/git/kernel/drivers/net/smc91x.c:341: warning: passing arg 2 of `_outw' makes integer from pointer without a cast /usr/src/ctest/git/kernel/drivers/net/smc91x.c:342: warning: passing arg 2 of `_outw' makes integer from pointer without a cast : /usr/src/ctest/git/kernel/drivers/net/smc91x.c:1915: warning: passing arg 1 of `_inw' makes integer from pointer without a cast /usr/src/ctest/git/kernel/drivers/net/smc91x.c:1915: warning: passing arg 1 of `_inw' makes integer from pointer without a cast Signed-off-by: Hayato Fujiwara <fujiwara@linux-m32r.org> Signed-off-by: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 5 changed files with 19 additions and 21 deletions Side-by-side Diff
arch/m32r/kernel/io_m32700ut.c
| ... | ... | @@ -64,11 +64,11 @@ |
| 64 | 64 | * from 0x10000000 to 0x13ffffff on physical address. |
| 65 | 65 | * The base address of LAN controller(LAN91C111) is 0x300. |
| 66 | 66 | */ |
| 67 | -#define LAN_IOSTART 0x300 | |
| 68 | -#define LAN_IOEND 0x320 | |
| 67 | +#define LAN_IOSTART 0xa0000300 | |
| 68 | +#define LAN_IOEND 0xa0000320 | |
| 69 | 69 | static inline void *_port2addr_ne(unsigned long port) |
| 70 | 70 | { |
| 71 | - return (void *)(port + NONCACHE_OFFSET + 0x10000000); | |
| 71 | + return (void *)(port + 0x10000000); | |
| 72 | 72 | } |
| 73 | 73 | static inline void *_port2addr_usb(unsigned long port) |
| 74 | 74 | { |
arch/m32r/kernel/io_mappi2.c
| ... | ... | @@ -36,9 +36,6 @@ |
| 36 | 36 | return (void *)(port | (NONCACHE_OFFSET)); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | -#define LAN_IOSTART 0x300 | |
| 40 | -#define LAN_IOEND 0x320 | |
| 41 | - | |
| 42 | 39 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) |
| 43 | 40 | static inline void *__port2addr_ata(unsigned long port) |
| 44 | 41 | { |
| 45 | 42 | |
| 46 | 43 | |
| ... | ... | @@ -59,15 +56,17 @@ |
| 59 | 56 | } |
| 60 | 57 | #endif |
| 61 | 58 | |
| 59 | +#define LAN_IOSTART 0xa0000300 | |
| 60 | +#define LAN_IOEND 0xa0000320 | |
| 62 | 61 | #ifdef CONFIG_CHIP_OPSP |
| 63 | 62 | static inline void *_port2addr_ne(unsigned long port) |
| 64 | 63 | { |
| 65 | - return (void *)(port + NONCACHE_OFFSET + 0x10000000); | |
| 64 | + return (void *)(port + 0x10000000); | |
| 66 | 65 | } |
| 67 | 66 | #else |
| 68 | 67 | static inline void *_port2addr_ne(unsigned long port) |
| 69 | 68 | { |
| 70 | - return (void *)(port + NONCACHE_OFFSET + 0x04000000); | |
| 69 | + return (void *)(port + 0x04000000); | |
| 71 | 70 | } |
| 72 | 71 | #endif |
| 73 | 72 | static inline void *_port2addr_usb(unsigned long port) |
arch/m32r/kernel/io_mappi3.c
| ... | ... | @@ -36,9 +36,6 @@ |
| 36 | 36 | return (void *)(port + NONCACHE_OFFSET); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | -#define LAN_IOSTART 0x300 | |
| 40 | -#define LAN_IOEND 0x320 | |
| 41 | - | |
| 42 | 39 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) |
| 43 | 40 | static inline void *__port2addr_ata(unsigned long port) |
| 44 | 41 | { |
| 45 | 42 | |
| ... | ... | @@ -59,9 +56,11 @@ |
| 59 | 56 | } |
| 60 | 57 | #endif |
| 61 | 58 | |
| 59 | +#define LAN_IOSTART 0xa0000300 | |
| 60 | +#define LAN_IOEND 0xa0000320 | |
| 62 | 61 | static inline void *_port2addr_ne(unsigned long port) |
| 63 | 62 | { |
| 64 | - return (void *)(port + NONCACHE_OFFSET + 0x10000000); | |
| 63 | + return (void *)(port + 0x10000000); | |
| 65 | 64 | } |
| 66 | 65 | |
| 67 | 66 | static inline void *_port2addr_usb(unsigned long port) |
arch/m32r/kernel/io_opsput.c
| ... | ... | @@ -44,11 +44,11 @@ |
| 44 | 44 | * from 0x10000000 to 0x13ffffff on physical address. |
| 45 | 45 | * The base address of LAN controller(LAN91C111) is 0x300. |
| 46 | 46 | */ |
| 47 | -#define LAN_IOSTART 0x300 | |
| 48 | -#define LAN_IOEND 0x320 | |
| 47 | +#define LAN_IOSTART 0xa0000300 | |
| 48 | +#define LAN_IOEND 0xa0000320 | |
| 49 | 49 | static inline void *_port2addr_ne(unsigned long port) |
| 50 | 50 | { |
| 51 | - return (void *)(port + NONCACHE_OFFSET + 0x10000000); | |
| 51 | + return (void *)(port + 0x10000000); | |
| 52 | 52 | } |
| 53 | 53 | static inline void *_port2addr_usb(unsigned long port) |
| 54 | 54 | { |
drivers/net/smc91x.h
| ... | ... | @@ -230,12 +230,12 @@ |
| 230 | 230 | #define SMC_CAN_USE_16BIT 1 |
| 231 | 231 | #define SMC_CAN_USE_32BIT 0 |
| 232 | 232 | |
| 233 | -#define SMC_inb(a, r) inb((a) + (r) - 0xa0000000) | |
| 234 | -#define SMC_inw(a, r) inw((a) + (r) - 0xa0000000) | |
| 235 | -#define SMC_outb(v, a, r) outb(v, (a) + (r) - 0xa0000000) | |
| 236 | -#define SMC_outw(v, a, r) outw(v, (a) + (r) - 0xa0000000) | |
| 237 | -#define SMC_insw(a, r, p, l) insw((a) + (r) - 0xa0000000, p, l) | |
| 238 | -#define SMC_outsw(a, r, p, l) outsw((a) + (r) - 0xa0000000, p, l) | |
| 233 | +#define SMC_inb(a, r) inb((u32)a) + (r)) | |
| 234 | +#define SMC_inw(a, r) inw(((u32)a) + (r)) | |
| 235 | +#define SMC_outb(v, a, r) outb(v, ((u32)a) + (r)) | |
| 236 | +#define SMC_outw(v, a, r) outw(v, ((u32)a) + (r)) | |
| 237 | +#define SMC_insw(a, r, p, l) insw(((u32)a) + (r), p, l) | |
| 238 | +#define SMC_outsw(a, r, p, l) outsw(((u32)a) + (r), p, l) | |
| 239 | 239 | |
| 240 | 240 | #define set_irq_type(irq, type) do {} while(0) |
| 241 | 241 |