Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: pxa: armcore: fix PCI PIO warnings

The it8152 PCI host used on the pxa/cm_x2xx machines
uses the old-style I/O window registration. This should
eventually get converted to pci_ioremap_io() but for
now, let's cast the IT8152_IO_BASE constant to an integer
type to get rid of the warnings.

Without this patch, building cm_x2xx_defconfig results in:

arch/arm/common/it8152.c: In function 'it8152_pci_setup':
arch/arm/common/it8152.c:287:18: warning: assignment makes integer from pointer without a cast [enabled by default]
arch/arm/common/it8152.c:288:16: warning: assignment makes integer from pointer without a cast [enabled by default]
arch/arm/common/it8152.c:291:17: warning: assignment makes integer from pointer without a cast [enabled by default]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>

+9 -3
+9 -3
arch/arm/common/it8152.c
··· 284 284 285 285 int __init it8152_pci_setup(int nr, struct pci_sys_data *sys) 286 286 { 287 - it8152_io.start = IT8152_IO_BASE + 0x12000; 288 - it8152_io.end = IT8152_IO_BASE + 0x12000 + 0x100000; 287 + /* 288 + * FIXME: use pci_ioremap_io to remap the IO space here and 289 + * move over to the generic io.h implementation. 290 + * This requires solving the same problem for PXA PCMCIA 291 + * support. 292 + */ 293 + it8152_io.start = (unsigned long)IT8152_IO_BASE + 0x12000; 294 + it8152_io.end = (unsigned long)IT8152_IO_BASE + 0x12000 + 0x100000; 289 295 290 296 sys->mem_offset = 0x10000000; 291 - sys->io_offset = IT8152_IO_BASE; 297 + sys->io_offset = (unsigned long)IT8152_IO_BASE; 292 298 293 299 if (request_resource(&ioport_resource, &it8152_io)) { 294 300 printk(KERN_ERR "PCI: unable to allocate IO region\n");