aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2007-03-15 10:48:53 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-03-26 18:06:22 -0400
commitde74f70360353929009f8611f3bb8fbb4f030527 (patch)
tree57e85e2dc75862d6fd64f963674c4ccfe4a5c3ba /arch
parent8b03336752e664880182a8f50e1807edc7fe93d4 (diff)
[POWERPC] QE: fix invalid pointer usage in ucc_slow_init()
In two places, ucc_slow_init() passes a physical address instead of the virtual address to functions that were expecting the latter, causing a kernel panic. us_info->regs contains the physical address of the UCC register set. The registers are ioremap'd to kernel space, and the virtual pointers are stored in us_regs. The code was using us_info->regs when it should have been using us_regs. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc_slow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_slow.c b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
index 817df73ecf56..b930d686a4d1 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_slow.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
@@ -187,7 +187,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
187 uccs->us_pram = qe_muram_addr(uccs->us_pram_offset); 187 uccs->us_pram = qe_muram_addr(uccs->us_pram_offset);
188 188
189 /* Init Guemr register */ 189 /* Init Guemr register */
190 if ((ret = ucc_init_guemr((struct ucc_common *) (us_info->regs)))) { 190 if ((ret = ucc_init_guemr((struct ucc_common *) us_regs))) {
191 printk(KERN_ERR "%s: cannot init GUEMR", __FUNCTION__); 191 printk(KERN_ERR "%s: cannot init GUEMR", __FUNCTION__);
192 ucc_slow_free(uccs); 192 ucc_slow_free(uccs);
193 return ret; 193 return ret;
@@ -195,7 +195,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
195 195
196 /* Set UCC to slow type */ 196 /* Set UCC to slow type */
197 if ((ret = ucc_set_type(us_info->ucc_num, 197 if ((ret = ucc_set_type(us_info->ucc_num,
198 (struct ucc_common *) (us_info->regs), 198 (struct ucc_common *) us_regs,
199 UCC_SPEED_TYPE_SLOW))) { 199 UCC_SPEED_TYPE_SLOW))) {
200 printk(KERN_ERR "%s: cannot set UCC type", __FUNCTION__); 200 printk(KERN_ERR "%s: cannot set UCC type", __FUNCTION__);
201 ucc_slow_free(uccs); 201 ucc_slow_free(uccs);