static void __exit cmx2xx_pcmcia_exit(void) { if (machine_is_armcore() && cpu_is_pxa25x()) cmx255_pcmcia_exit(); else if (machine_is_armcore() && cpu_is_pxa27x()) cmx270_pcmcia_exit(); }
static int __init cmx2xx_pcmcia_init(void) { int ret = -ENODEV; if (machine_is_armcore() && cpu_is_pxa25x()) ret = cmx255_pcmcia_init(); else if (machine_is_armcore() && cpu_is_pxa27x()) ret = cmx270_pcmcia_init(); return ret; }
static int __init cmx2xx_init_pci(void) { if (machine_is_armcore()) pci_common_init(&cmx2xx_pci); return 0; }
static int __init cmx270_pcmcia_init(void) { int ret; if (!machine_is_armcore()) return -ENODEV; cmx270_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); if (!cmx270_pcmcia_device) return -ENOMEM; ret = platform_device_add_data(cmx270_pcmcia_device, &cmx270_pcmcia_ops, sizeof(cmx270_pcmcia_ops)); if (ret == 0) { printk(KERN_INFO "Registering cm-x270 PCMCIA interface.\n"); ret = platform_device_add(cmx270_pcmcia_device); } if (ret) platform_device_put(cmx270_pcmcia_device); return ret; }
void __init cmx2xx_pci_adjust_zones(int node, unsigned long *zone_size, unsigned long *zhole_size) { unsigned int sz = SZ_64M >> PAGE_SHIFT; if (machine_is_armcore()) { pr_info("Adjusting zones for CM-X2XX\n"); if (node || (zone_size[0] <= sz)) return; zone_size[1] = zone_size[0] - sz; zone_size[0] = sz; zhole_size[1] = zhole_size[0]; zhole_size[0] = 0; } }
/* * Only first 64MB of memory can be accessed via PCI. * We use GFP_DMA to allocate safe buffers to do map/unmap. * This is really ugly and we need a better way of specifying * DMA-capable regions of memory. */ void __init cmx2xx_pci_adjust_zones(unsigned long *zone_size, unsigned long *zhole_size) { unsigned int sz = SZ_64M >> PAGE_SHIFT; if (machine_is_armcore()) { pr_info("Adjusting zones for CM-X2XX\n"); /* * Only adjust if > 64M on current system */ if (zone_size[0] <= sz) return; zone_size[1] = zone_size[0] - sz; zone_size[0] = sz; zhole_size[1] = zhole_size[0]; zhole_size[0] = 0; } }