diff options
author | Andy Fleming <afleming@freescale.com> | 2008-05-07 14:19:44 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-07-16 18:57:45 -0400 |
commit | 7e1cc9c55a2a4af62f30fade62fb612a243def39 (patch) | |
tree | 68e0d0812543a83d3b611dd9aaade13cca952353 /arch/powerpc | |
parent | 4cd7e1cbd43bb67927af2b8b4e0ffd43fd5ed6b4 (diff) |
powerpc: Fix a bunch of sparse warnings in the qe_lib
Mostly having to do with not marking things __iomem. And some failure
to use appropriate accessors to read MMIO regs.
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/qe.c | 6 | ||||
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/ucc.c | 6 | ||||
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/ucc_fast.c | 16 |
3 files changed, 14 insertions, 14 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 9e82d7e725a5..b3b73ae57d6d 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c | |||
@@ -64,7 +64,7 @@ static phys_addr_t qebase = -1; | |||
64 | phys_addr_t get_qe_base(void) | 64 | phys_addr_t get_qe_base(void) |
65 | { | 65 | { |
66 | struct device_node *qe; | 66 | struct device_node *qe; |
67 | unsigned int size; | 67 | int size; |
68 | const u32 *prop; | 68 | const u32 *prop; |
69 | 69 | ||
70 | if (qebase != -1) | 70 | if (qebase != -1) |
@@ -158,7 +158,7 @@ static unsigned int brg_clk = 0; | |||
158 | unsigned int qe_get_brg_clk(void) | 158 | unsigned int qe_get_brg_clk(void) |
159 | { | 159 | { |
160 | struct device_node *qe; | 160 | struct device_node *qe; |
161 | unsigned int size; | 161 | int size; |
162 | const u32 *prop; | 162 | const u32 *prop; |
163 | 163 | ||
164 | if (brg_clk) | 164 | if (brg_clk) |
@@ -305,7 +305,7 @@ EXPORT_SYMBOL(qe_put_snum); | |||
305 | 305 | ||
306 | static int qe_sdma_init(void) | 306 | static int qe_sdma_init(void) |
307 | { | 307 | { |
308 | struct sdma *sdma = &qe_immr->sdma; | 308 | struct sdma __iomem *sdma = &qe_immr->sdma; |
309 | unsigned long sdma_buf_offset; | 309 | unsigned long sdma_buf_offset; |
310 | 310 | ||
311 | if (!sdma) | 311 | if (!sdma) |
diff --git a/arch/powerpc/sysdev/qe_lib/ucc.c b/arch/powerpc/sysdev/qe_lib/ucc.c index d3c7f5af9bc8..1d78071aad7d 100644 --- a/arch/powerpc/sysdev/qe_lib/ucc.c +++ b/arch/powerpc/sysdev/qe_lib/ucc.c | |||
@@ -88,7 +88,7 @@ int ucc_set_type(unsigned int ucc_num, enum ucc_speed_type speed) | |||
88 | return 0; | 88 | return 0; |
89 | } | 89 | } |
90 | 90 | ||
91 | static void get_cmxucr_reg(unsigned int ucc_num, __be32 **cmxucr, | 91 | static void get_cmxucr_reg(unsigned int ucc_num, __be32 __iomem **cmxucr, |
92 | unsigned int *reg_num, unsigned int *shift) | 92 | unsigned int *reg_num, unsigned int *shift) |
93 | { | 93 | { |
94 | unsigned int cmx = ((ucc_num & 1) << 1) + (ucc_num > 3); | 94 | unsigned int cmx = ((ucc_num & 1) << 1) + (ucc_num > 3); |
@@ -100,7 +100,7 @@ static void get_cmxucr_reg(unsigned int ucc_num, __be32 **cmxucr, | |||
100 | 100 | ||
101 | int ucc_mux_set_grant_tsa_bkpt(unsigned int ucc_num, int set, u32 mask) | 101 | int ucc_mux_set_grant_tsa_bkpt(unsigned int ucc_num, int set, u32 mask) |
102 | { | 102 | { |
103 | __be32 *cmxucr; | 103 | __be32 __iomem *cmxucr; |
104 | unsigned int reg_num; | 104 | unsigned int reg_num; |
105 | unsigned int shift; | 105 | unsigned int shift; |
106 | 106 | ||
@@ -121,7 +121,7 @@ int ucc_mux_set_grant_tsa_bkpt(unsigned int ucc_num, int set, u32 mask) | |||
121 | int ucc_set_qe_mux_rxtx(unsigned int ucc_num, enum qe_clock clock, | 121 | int ucc_set_qe_mux_rxtx(unsigned int ucc_num, enum qe_clock clock, |
122 | enum comm_dir mode) | 122 | enum comm_dir mode) |
123 | { | 123 | { |
124 | __be32 *cmxucr; | 124 | __be32 __iomem *cmxucr; |
125 | unsigned int reg_num; | 125 | unsigned int reg_num; |
126 | unsigned int shift; | 126 | unsigned int shift; |
127 | u32 clock_bits = 0; | 127 | u32 clock_bits = 0; |
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/arch/powerpc/sysdev/qe_lib/ucc_fast.c index bcf88e6ce962..1aecb075a72e 100644 --- a/arch/powerpc/sysdev/qe_lib/ucc_fast.c +++ b/arch/powerpc/sysdev/qe_lib/ucc_fast.c | |||
@@ -46,7 +46,7 @@ void ucc_fast_dump_regs(struct ucc_fast_private * uccf) | |||
46 | printk(KERN_INFO "uccm : addr=0x%p, val=0x%08x\n", | 46 | printk(KERN_INFO "uccm : addr=0x%p, val=0x%08x\n", |
47 | &uccf->uf_regs->uccm, in_be32(&uccf->uf_regs->uccm)); | 47 | &uccf->uf_regs->uccm, in_be32(&uccf->uf_regs->uccm)); |
48 | printk(KERN_INFO "uccs : addr=0x%p, val=0x%02x\n", | 48 | printk(KERN_INFO "uccs : addr=0x%p, val=0x%02x\n", |
49 | &uccf->uf_regs->uccs, uccf->uf_regs->uccs); | 49 | &uccf->uf_regs->uccs, in_8(&uccf->uf_regs->uccs)); |
50 | printk(KERN_INFO "urfb : addr=0x%p, val=0x%08x\n", | 50 | printk(KERN_INFO "urfb : addr=0x%p, val=0x%08x\n", |
51 | &uccf->uf_regs->urfb, in_be32(&uccf->uf_regs->urfb)); | 51 | &uccf->uf_regs->urfb, in_be32(&uccf->uf_regs->urfb)); |
52 | printk(KERN_INFO "urfs : addr=0x%p, val=0x%04x\n", | 52 | printk(KERN_INFO "urfs : addr=0x%p, val=0x%04x\n", |
@@ -68,7 +68,7 @@ void ucc_fast_dump_regs(struct ucc_fast_private * uccf) | |||
68 | printk(KERN_INFO "urtry : addr=0x%p, val=0x%08x\n", | 68 | printk(KERN_INFO "urtry : addr=0x%p, val=0x%08x\n", |
69 | &uccf->uf_regs->urtry, in_be32(&uccf->uf_regs->urtry)); | 69 | &uccf->uf_regs->urtry, in_be32(&uccf->uf_regs->urtry)); |
70 | printk(KERN_INFO "guemr : addr=0x%p, val=0x%02x\n", | 70 | printk(KERN_INFO "guemr : addr=0x%p, val=0x%02x\n", |
71 | &uccf->uf_regs->guemr, uccf->uf_regs->guemr); | 71 | &uccf->uf_regs->guemr, in_8(&uccf->uf_regs->guemr)); |
72 | } | 72 | } |
73 | EXPORT_SYMBOL(ucc_fast_dump_regs); | 73 | EXPORT_SYMBOL(ucc_fast_dump_regs); |
74 | 74 | ||
@@ -96,7 +96,7 @@ EXPORT_SYMBOL(ucc_fast_transmit_on_demand); | |||
96 | 96 | ||
97 | void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode) | 97 | void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode) |
98 | { | 98 | { |
99 | struct ucc_fast *uf_regs; | 99 | struct ucc_fast __iomem *uf_regs; |
100 | u32 gumr; | 100 | u32 gumr; |
101 | 101 | ||
102 | uf_regs = uccf->uf_regs; | 102 | uf_regs = uccf->uf_regs; |
@@ -117,7 +117,7 @@ EXPORT_SYMBOL(ucc_fast_enable); | |||
117 | 117 | ||
118 | void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode) | 118 | void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode) |
119 | { | 119 | { |
120 | struct ucc_fast *uf_regs; | 120 | struct ucc_fast __iomem *uf_regs; |
121 | u32 gumr; | 121 | u32 gumr; |
122 | 122 | ||
123 | uf_regs = uccf->uf_regs; | 123 | uf_regs = uccf->uf_regs; |
@@ -139,7 +139,7 @@ EXPORT_SYMBOL(ucc_fast_disable); | |||
139 | int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** uccf_ret) | 139 | int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** uccf_ret) |
140 | { | 140 | { |
141 | struct ucc_fast_private *uccf; | 141 | struct ucc_fast_private *uccf; |
142 | struct ucc_fast *uf_regs; | 142 | struct ucc_fast __iomem *uf_regs; |
143 | u32 gumr; | 143 | u32 gumr; |
144 | int ret; | 144 | int ret; |
145 | 145 | ||
@@ -216,10 +216,10 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc | |||
216 | uccf->stopped_tx = 0; | 216 | uccf->stopped_tx = 0; |
217 | uccf->stopped_rx = 0; | 217 | uccf->stopped_rx = 0; |
218 | uf_regs = uccf->uf_regs; | 218 | uf_regs = uccf->uf_regs; |
219 | uccf->p_ucce = (u32 *) & (uf_regs->ucce); | 219 | uccf->p_ucce = &uf_regs->ucce; |
220 | uccf->p_uccm = (u32 *) & (uf_regs->uccm); | 220 | uccf->p_uccm = &uf_regs->uccm; |
221 | #ifdef CONFIG_UGETH_TX_ON_DEMAND | 221 | #ifdef CONFIG_UGETH_TX_ON_DEMAND |
222 | uccf->p_utodr = (u16 *) & (uf_regs->utodr); | 222 | uccf->p_utodr = &uf_regs->utodr; |
223 | #endif | 223 | #endif |
224 | #ifdef STATISTICS | 224 | #ifdef STATISTICS |
225 | uccf->tx_frames = 0; | 225 | uccf->tx_frames = 0; |