Re: [PATCH] powerpc/usb: use ioremap instead of base plus offset to access regs

2011-11-23 Thread Kumar Gala
vger.kernel.org >> Subject: RE: [PATCH] powerpc/usb: use ioremap instead of base plus offset >> to access regs >> >> >>> #ifndef CONFIG_ARCH_MXC >>> if (pdata->have_sysif_regs) >>> - usb_sys_regs = (struct us

RE: [PATCH] powerpc/usb: use ioremap instead of base plus offset to access regs

2011-11-02 Thread Xie Shaohui-B21989
>-Original Message- >From: David Laight [mailto:david.lai...@aculab.com] >Sent: Wednesday, November 02, 2011 5:07 PM >To: Xie Shaohui-B21989; linuxppc-dev@lists.ozlabs.org >Cc: linux-...@vger.kernel.org >Subject: RE: [PATCH] powerpc/usb: use ioremap instead of base plus

RE: [PATCH] powerpc/usb: use ioremap instead of base plus offset to access regs

2011-11-02 Thread David Laight
> #ifndef CONFIG_ARCH_MXC > if (pdata->have_sysif_regs) > - usb_sys_regs = (struct usb_sys_interface *) > - ((u32)dr_regs + USB_DR_SYS_OFFSET); > + usb_sys_regs = ioremap(res->start + USB_DR_SYS_OFFSET, > + siz

[PATCH] powerpc/usb: use ioremap instead of base plus offset to access regs

2011-11-02 Thread Shaohui Xie
Below are codes for accessing usb sysif_regs in driver: usb_sys_regs = (struct usb_sys_interface *) ((u32)dr_regs + USB_DR_SYS_OFFSET); these codes work in 32-bit, but in 64-bit, accessing members of 'usb_sys_regs' will cause call trace like below: Unable to handle kernel