diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2008-04-14 08:49:07 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-04-28 12:14:31 -0400 |
commit | 66140c8e9f0d978bd26c58f236d0d86aa666d8fc (patch) | |
tree | c23657f4c761e09b48bf64a64e95cf8798b8169d /include/asm-mips | |
parent | 1bd0962e3d5bc66ee0ee207a61485c6a436cfac2 (diff) |
[MIPS] rbtx4938: misc cleanups
* Do not use non-standard I/O accessors, such as reg_rd08, etc.
* Kill unnecessary wbflush()
* Kill tx4938_mips.h
* Kill unnecessary includes
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/tx4938/rbtx4938.h | 58 | ||||
-rw-r--r-- | include/asm-mips/tx4938/tx4938.h | 24 | ||||
-rw-r--r-- | include/asm-mips/tx4938/tx4938_mips.h | 54 |
3 files changed, 20 insertions, 116 deletions
diff --git a/include/asm-mips/tx4938/rbtx4938.h b/include/asm-mips/tx4938/rbtx4938.h index b180488dcdc4..dfed7beb533f 100644 --- a/include/asm-mips/tx4938/rbtx4938.h +++ b/include/asm-mips/tx4938/rbtx4938.h | |||
@@ -67,44 +67,26 @@ | |||
67 | #define RBTX4938_INTF_MODEM (1 << RBTX4938_INTB_MODEM) | 67 | #define RBTX4938_INTF_MODEM (1 << RBTX4938_INTB_MODEM) |
68 | #define RBTX4938_INTF_SWINT (1 << RBTX4938_INTB_SWINT) | 68 | #define RBTX4938_INTF_SWINT (1 << RBTX4938_INTB_SWINT) |
69 | 69 | ||
70 | #define rbtx4938_fpga_rev_ptr \ | 70 | #define rbtx4938_fpga_rev_addr ((__u8 __iomem *)RBTX4938_FPGA_REV_ADDR) |
71 | ((volatile unsigned char *)RBTX4938_FPGA_REV_ADDR) | 71 | #define rbtx4938_led_addr ((__u8 __iomem *)RBTX4938_LED_ADDR) |
72 | #define rbtx4938_led_ptr \ | 72 | #define rbtx4938_dipsw_addr ((__u8 __iomem *)RBTX4938_DIPSW_ADDR) |
73 | ((volatile unsigned char *)RBTX4938_LED_ADDR) | 73 | #define rbtx4938_bdipsw_addr ((__u8 __iomem *)RBTX4938_BDIPSW_ADDR) |
74 | #define rbtx4938_dipsw_ptr \ | 74 | #define rbtx4938_imask_addr ((__u8 __iomem *)RBTX4938_IMASK_ADDR) |
75 | ((volatile unsigned char *)RBTX4938_DIPSW_ADDR) | 75 | #define rbtx4938_imask2_addr ((__u8 __iomem *)RBTX4938_IMASK2_ADDR) |
76 | #define rbtx4938_bdipsw_ptr \ | 76 | #define rbtx4938_intpol_addr ((__u8 __iomem *)RBTX4938_INTPOL_ADDR) |
77 | ((volatile unsigned char *)RBTX4938_BDIPSW_ADDR) | 77 | #define rbtx4938_istat_addr ((__u8 __iomem *)RBTX4938_ISTAT_ADDR) |
78 | #define rbtx4938_imask_ptr \ | 78 | #define rbtx4938_istat2_addr ((__u8 __iomem *)RBTX4938_ISTAT2_ADDR) |
79 | ((volatile unsigned char *)RBTX4938_IMASK_ADDR) | 79 | #define rbtx4938_imstat_addr ((__u8 __iomem *)RBTX4938_IMSTAT_ADDR) |
80 | #define rbtx4938_imask2_ptr \ | 80 | #define rbtx4938_imstat2_addr ((__u8 __iomem *)RBTX4938_IMSTAT2_ADDR) |
81 | ((volatile unsigned char *)RBTX4938_IMASK2_ADDR) | 81 | #define rbtx4938_softint_addr ((__u8 __iomem *)RBTX4938_SOFTINT_ADDR) |
82 | #define rbtx4938_intpol_ptr \ | 82 | #define rbtx4938_piosel_addr ((__u8 __iomem *)RBTX4938_PIOSEL_ADDR) |
83 | ((volatile unsigned char *)RBTX4938_INTPOL_ADDR) | 83 | #define rbtx4938_spics_addr ((__u8 __iomem *)RBTX4938_SPICS_ADDR) |
84 | #define rbtx4938_istat_ptr \ | 84 | #define rbtx4938_sfpwr_addr ((__u8 __iomem *)RBTX4938_SFPWR_ADDR) |
85 | ((volatile unsigned char *)RBTX4938_ISTAT_ADDR) | 85 | #define rbtx4938_sfvol_addr ((__u8 __iomem *)RBTX4938_SFVOL_ADDR) |
86 | #define rbtx4938_istat2_ptr \ | 86 | #define rbtx4938_softreset_addr ((__u8 __iomem *)RBTX4938_SOFTRESET_ADDR) |
87 | ((volatile unsigned char *)RBTX4938_ISTAT2_ADDR) | 87 | #define rbtx4938_softresetlock_addr \ |
88 | #define rbtx4938_imstat_ptr \ | 88 | ((__u8 __iomem *)RBTX4938_SOFTRESETLOCK_ADDR) |
89 | ((volatile unsigned char *)RBTX4938_IMSTAT_ADDR) | 89 | #define rbtx4938_pcireset_addr ((__u8 __iomem *)RBTX4938_PCIRESET_ADDR) |
90 | #define rbtx4938_imstat2_ptr \ | ||
91 | ((volatile unsigned char *)RBTX4938_IMSTAT2_ADDR) | ||
92 | #define rbtx4938_softint_ptr \ | ||
93 | ((volatile unsigned char *)RBTX4938_SOFTINT_ADDR) | ||
94 | #define rbtx4938_piosel_ptr \ | ||
95 | ((volatile unsigned char *)RBTX4938_PIOSEL_ADDR) | ||
96 | #define rbtx4938_spics_ptr \ | ||
97 | ((volatile unsigned char *)RBTX4938_SPICS_ADDR) | ||
98 | #define rbtx4938_sfpwr_ptr \ | ||
99 | ((volatile unsigned char *)RBTX4938_SFPWR_ADDR) | ||
100 | #define rbtx4938_sfvol_ptr \ | ||
101 | ((volatile unsigned char *)RBTX4938_SFVOL_ADDR) | ||
102 | #define rbtx4938_softreset_ptr \ | ||
103 | ((volatile unsigned char *)RBTX4938_SOFTRESET_ADDR) | ||
104 | #define rbtx4938_softresetlock_ptr \ | ||
105 | ((volatile unsigned char *)RBTX4938_SOFTRESETLOCK_ADDR) | ||
106 | #define rbtx4938_pcireset_ptr \ | ||
107 | ((volatile unsigned char *)RBTX4938_PCIRESET_ADDR) | ||
108 | 90 | ||
109 | /* | 91 | /* |
110 | * IRQ mappings | 92 | * IRQ mappings |
diff --git a/include/asm-mips/tx4938/tx4938.h b/include/asm-mips/tx4938/tx4938.h index a05f031cfdf5..e8807f5c61e9 100644 --- a/include/asm-mips/tx4938/tx4938.h +++ b/include/asm-mips/tx4938/tx4938.h | |||
@@ -13,8 +13,6 @@ | |||
13 | #ifndef __ASM_TX_BOARDS_TX4938_H | 13 | #ifndef __ASM_TX_BOARDS_TX4938_H |
14 | #define __ASM_TX_BOARDS_TX4938_H | 14 | #define __ASM_TX_BOARDS_TX4938_H |
15 | 15 | ||
16 | #include <asm/tx4938/tx4938_mips.h> | ||
17 | |||
18 | #define tx4938_read_nfmc(addr) (*(volatile unsigned int *)(addr)) | 16 | #define tx4938_read_nfmc(addr) (*(volatile unsigned int *)(addr)) |
19 | #define tx4938_write_nfmc(b, addr) (*(volatile unsigned int *)(addr)) = (b) | 17 | #define tx4938_write_nfmc(b, addr) (*(volatile unsigned int *)(addr)) = (b) |
20 | 18 | ||
@@ -54,28 +52,6 @@ | |||
54 | #define TX4938_ACLC_REG (TX4938_REG_BASE + 0xf700) | 52 | #define TX4938_ACLC_REG (TX4938_REG_BASE + 0xf700) |
55 | #define TX4938_SPI_REG (TX4938_REG_BASE + 0xf800) | 53 | #define TX4938_SPI_REG (TX4938_REG_BASE + 0xf800) |
56 | 54 | ||
57 | #ifndef _LANGUAGE_ASSEMBLY | ||
58 | #include <asm/byteorder.h> | ||
59 | |||
60 | #define TX4938_MKA(x) ((u32)( ((u32)(TX4938_REG_BASE)) | ((u32)(x)) )) | ||
61 | |||
62 | #define TX4938_RD08( reg ) (*(vu08*)(reg)) | ||
63 | #define TX4938_WR08( reg, val ) ((*(vu08*)(reg))=(val)) | ||
64 | |||
65 | #define TX4938_RD16( reg ) (*(vu16*)(reg)) | ||
66 | #define TX4938_WR16( reg, val ) ((*(vu16*)(reg))=(val)) | ||
67 | |||
68 | #define TX4938_RD32( reg ) (*(vu32*)(reg)) | ||
69 | #define TX4938_WR32( reg, val ) ((*(vu32*)(reg))=(val)) | ||
70 | |||
71 | #define TX4938_RD64( reg ) (*(vu64*)(reg)) | ||
72 | #define TX4938_WR64( reg, val ) ((*(vu64*)(reg))=(val)) | ||
73 | |||
74 | #define TX4938_RD( reg ) TX4938_RD32( reg ) | ||
75 | #define TX4938_WR( reg, val ) TX4938_WR32( reg, val ) | ||
76 | |||
77 | #endif /* !__ASSEMBLY__ */ | ||
78 | |||
79 | #ifdef __ASSEMBLY__ | 55 | #ifdef __ASSEMBLY__ |
80 | #define _CONST64(c) c | 56 | #define _CONST64(c) c |
81 | #else | 57 | #else |
diff --git a/include/asm-mips/tx4938/tx4938_mips.h b/include/asm-mips/tx4938/tx4938_mips.h deleted file mode 100644 index f346ff58b947..000000000000 --- a/include/asm-mips/tx4938/tx4938_mips.h +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-mips/tx4938/tx4938_mips.h | ||
3 | * Generic bitmask definitions | ||
4 | * | ||
5 | * 2003-2005 (c) MontaVista Software, Inc. This file is licensed under the | ||
6 | * terms of the GNU General Public License version 2. This program is | ||
7 | * licensed "as is" without any warranty of any kind, whether express | ||
8 | * or implied. | ||
9 | * | ||
10 | * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) | ||
11 | */ | ||
12 | |||
13 | #ifndef TX4938_TX4938_MIPS_H | ||
14 | #define TX4938_TX4938_MIPS_H | ||
15 | #ifndef __ASSEMBLY__ | ||
16 | |||
17 | #define reg_rd08(r) ((u8 )(*((vu8 *)(r)))) | ||
18 | #define reg_rd16(r) ((u16)(*((vu16*)(r)))) | ||
19 | #define reg_rd32(r) ((u32)(*((vu32*)(r)))) | ||
20 | #define reg_rd64(r) ((u64)(*((vu64*)(r)))) | ||
21 | |||
22 | #define reg_wr08(r, v) ((*((vu8 *)(r)))=((u8 )(v))) | ||
23 | #define reg_wr16(r, v) ((*((vu16*)(r)))=((u16)(v))) | ||
24 | #define reg_wr32(r, v) ((*((vu32*)(r)))=((u32)(v))) | ||
25 | #define reg_wr64(r, v) ((*((vu64*)(r)))=((u64)(v))) | ||
26 | |||
27 | typedef volatile __signed char vs8; | ||
28 | typedef volatile unsigned char vu8; | ||
29 | |||
30 | typedef volatile __signed short vs16; | ||
31 | typedef volatile unsigned short vu16; | ||
32 | |||
33 | typedef volatile __signed int vs32; | ||
34 | typedef volatile unsigned int vu32; | ||
35 | |||
36 | typedef s8 s08; | ||
37 | typedef vs8 vs08; | ||
38 | |||
39 | typedef u8 u08; | ||
40 | typedef vu8 vu08; | ||
41 | |||
42 | #if (_MIPS_SZLONG == 64) | ||
43 | |||
44 | typedef volatile __signed__ long vs64; | ||
45 | typedef volatile unsigned long vu64; | ||
46 | |||
47 | #else | ||
48 | |||
49 | typedef volatile __signed__ long long vs64; | ||
50 | typedef volatile unsigned long long vu64; | ||
51 | |||
52 | #endif | ||
53 | #endif | ||
54 | #endif | ||