11da177e4SLinus Torvalds /* 21da177e4SLinus Torvalds * linux/arch/arm/mach-pxa/generic.c 31da177e4SLinus Torvalds * 41da177e4SLinus Torvalds * Author: Nicolas Pitre 51da177e4SLinus Torvalds * Created: Jun 15, 2001 61da177e4SLinus Torvalds * Copyright: MontaVista Software Inc. 71da177e4SLinus Torvalds * 81da177e4SLinus Torvalds * Code common to all PXA machines. 91da177e4SLinus Torvalds * 101da177e4SLinus Torvalds * This program is free software; you can redistribute it and/or modify 111da177e4SLinus Torvalds * it under the terms of the GNU General Public License version 2 as 121da177e4SLinus Torvalds * published by the Free Software Foundation. 131da177e4SLinus Torvalds * 141da177e4SLinus Torvalds * Since this file should be linked before any other machine specific file, 151da177e4SLinus Torvalds * the __initcall() here will be executed first. This serves as default 161da177e4SLinus Torvalds * initialization stuff for PXA machines which can be overridden later if 171da177e4SLinus Torvalds * need be. 181da177e4SLinus Torvalds */ 191da177e4SLinus Torvalds #include <linux/module.h> 201da177e4SLinus Torvalds #include <linux/kernel.h> 211da177e4SLinus Torvalds #include <linux/init.h> 221da177e4SLinus Torvalds #include <linux/delay.h> 23d052d1beSRussell King #include <linux/platform_device.h> 241da177e4SLinus Torvalds #include <linux/ioport.h> 251da177e4SLinus Torvalds #include <linux/pm.h> 264e57b681STim Schmielau #include <linux/string.h> 271da177e4SLinus Torvalds 282dc20a51SNicolas Pitre #include <linux/sched.h> 292dc20a51SNicolas Pitre #include <asm/cnt32_to_63.h> 302dc20a51SNicolas Pitre #include <asm/div64.h> 312dc20a51SNicolas Pitre 321da177e4SLinus Torvalds #include <asm/hardware.h> 331da177e4SLinus Torvalds #include <asm/irq.h> 341da177e4SLinus Torvalds #include <asm/system.h> 351da177e4SLinus Torvalds #include <asm/pgtable.h> 361da177e4SLinus Torvalds #include <asm/mach/map.h> 371da177e4SLinus Torvalds 381da177e4SLinus Torvalds #include <asm/arch/pxa-regs.h> 393deac046SPhilipp Zabel #include <asm/arch/gpio.h> 401da177e4SLinus Torvalds #include <asm/arch/udc.h> 411da177e4SLinus Torvalds #include <asm/arch/pxafb.h> 421da177e4SLinus Torvalds #include <asm/arch/mmc.h> 436f475c01SNicolas Pitre #include <asm/arch/irda.h> 44eb9181a2SRussell King #include <asm/arch/i2c.h> 451da177e4SLinus Torvalds 46*46c41e62SRussell King #include "devices.h" 471da177e4SLinus Torvalds #include "generic.h" 481da177e4SLinus Torvalds 491da177e4SLinus Torvalds /* 502dc20a51SNicolas Pitre * This is the PXA2xx sched_clock implementation. This has a resolution 512dc20a51SNicolas Pitre * of at least 308ns and a maximum value that depends on the value of 522dc20a51SNicolas Pitre * CLOCK_TICK_RATE. 532dc20a51SNicolas Pitre * 542dc20a51SNicolas Pitre * The return value is guaranteed to be monotonic in that range as 552dc20a51SNicolas Pitre * long as there is always less than 582 seconds between successive 562dc20a51SNicolas Pitre * calls to this function. 572dc20a51SNicolas Pitre */ 582dc20a51SNicolas Pitre unsigned long long sched_clock(void) 592dc20a51SNicolas Pitre { 602dc20a51SNicolas Pitre unsigned long long v = cnt32_to_63(OSCR); 612dc20a51SNicolas Pitre /* Note: top bit ov v needs cleared unless multiplier is even. */ 622dc20a51SNicolas Pitre 632dc20a51SNicolas Pitre #if CLOCK_TICK_RATE == 3686400 642dc20a51SNicolas Pitre /* 1E9 / 3686400 => 78125 / 288, max value = 32025597s (370 days). */ 652dc20a51SNicolas Pitre /* The <<1 is used to get rid of tick.hi top bit */ 662dc20a51SNicolas Pitre v *= 78125<<1; 672dc20a51SNicolas Pitre do_div(v, 288<<1); 682dc20a51SNicolas Pitre #elif CLOCK_TICK_RATE == 3250000 692dc20a51SNicolas Pitre /* 1E9 / 3250000 => 4000 / 13, max value = 709490156s (8211 days) */ 702dc20a51SNicolas Pitre v *= 4000; 712dc20a51SNicolas Pitre do_div(v, 13); 722dc20a51SNicolas Pitre #elif CLOCK_TICK_RATE == 3249600 732dc20a51SNicolas Pitre /* 1E9 / 3249600 => 625000 / 2031, max value = 4541295s (52 days) */ 742dc20a51SNicolas Pitre v *= 625000; 752dc20a51SNicolas Pitre do_div(v, 2031); 762dc20a51SNicolas Pitre #else 772dc20a51SNicolas Pitre #warning "consider fixing sched_clock for your value of CLOCK_TICK_RATE" 782dc20a51SNicolas Pitre /* 792dc20a51SNicolas Pitre * 96-bit math to perform tick * NSEC_PER_SEC / CLOCK_TICK_RATE for 802dc20a51SNicolas Pitre * any value of CLOCK_TICK_RATE. Max value is in the 80 thousand 810c48d314SNicolas Pitre * years range and truncation to unsigned long long limits it to 820c48d314SNicolas Pitre * sched_clock's max range of ~584 years. This is nice but with 830c48d314SNicolas Pitre * higher computation cost. 842dc20a51SNicolas Pitre */ 852dc20a51SNicolas Pitre { 862dc20a51SNicolas Pitre union { 872dc20a51SNicolas Pitre unsigned long long val; 882dc20a51SNicolas Pitre struct { unsigned long lo, hi; }; 892dc20a51SNicolas Pitre } x; 902dc20a51SNicolas Pitre unsigned long long y; 912dc20a51SNicolas Pitre 922dc20a51SNicolas Pitre x.val = v; 932dc20a51SNicolas Pitre x.hi &= 0x7fffffff; 942dc20a51SNicolas Pitre y = (unsigned long long)x.lo * NSEC_PER_SEC; 952dc20a51SNicolas Pitre x.lo = y; 962dc20a51SNicolas Pitre y = (y >> 32) + (unsigned long long)x.hi * NSEC_PER_SEC; 972dc20a51SNicolas Pitre x.hi = do_div(y, CLOCK_TICK_RATE); 982dc20a51SNicolas Pitre do_div(x.val, CLOCK_TICK_RATE); 992dc20a51SNicolas Pitre x.hi += y; 1002dc20a51SNicolas Pitre v = x.val; 1012dc20a51SNicolas Pitre } 1022dc20a51SNicolas Pitre #endif 1032dc20a51SNicolas Pitre 1042dc20a51SNicolas Pitre return v; 1052dc20a51SNicolas Pitre } 1062dc20a51SNicolas Pitre 1072dc20a51SNicolas Pitre /* 1081da177e4SLinus Torvalds * Handy function to set GPIO alternate functions 1091da177e4SLinus Torvalds */ 1101da177e4SLinus Torvalds 1113deac046SPhilipp Zabel int pxa_gpio_mode(int gpio_mode) 1121da177e4SLinus Torvalds { 1131da177e4SLinus Torvalds unsigned long flags; 1141da177e4SLinus Torvalds int gpio = gpio_mode & GPIO_MD_MASK_NR; 1151da177e4SLinus Torvalds int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8; 1161da177e4SLinus Torvalds int gafr; 1171da177e4SLinus Torvalds 1183deac046SPhilipp Zabel if (gpio > PXA_LAST_GPIO) 1193deac046SPhilipp Zabel return -EINVAL; 1203deac046SPhilipp Zabel 1211da177e4SLinus Torvalds local_irq_save(flags); 1221da177e4SLinus Torvalds if (gpio_mode & GPIO_DFLT_LOW) 1231da177e4SLinus Torvalds GPCR(gpio) = GPIO_bit(gpio); 1241da177e4SLinus Torvalds else if (gpio_mode & GPIO_DFLT_HIGH) 1251da177e4SLinus Torvalds GPSR(gpio) = GPIO_bit(gpio); 1261da177e4SLinus Torvalds if (gpio_mode & GPIO_MD_MASK_DIR) 1271da177e4SLinus Torvalds GPDR(gpio) |= GPIO_bit(gpio); 1281da177e4SLinus Torvalds else 1291da177e4SLinus Torvalds GPDR(gpio) &= ~GPIO_bit(gpio); 1301da177e4SLinus Torvalds gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2)); 1311da177e4SLinus Torvalds GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2)); 1321da177e4SLinus Torvalds local_irq_restore(flags); 1333deac046SPhilipp Zabel 1343deac046SPhilipp Zabel return 0; 1351da177e4SLinus Torvalds } 1361da177e4SLinus Torvalds 1371da177e4SLinus Torvalds EXPORT_SYMBOL(pxa_gpio_mode); 1381da177e4SLinus Torvalds 1391da177e4SLinus Torvalds /* 1403deac046SPhilipp Zabel * Return GPIO level 1413deac046SPhilipp Zabel */ 1423deac046SPhilipp Zabel int pxa_gpio_get_value(unsigned gpio) 1433deac046SPhilipp Zabel { 1443deac046SPhilipp Zabel return __gpio_get_value(gpio); 1453deac046SPhilipp Zabel } 1463deac046SPhilipp Zabel 1473deac046SPhilipp Zabel EXPORT_SYMBOL(pxa_gpio_get_value); 1483deac046SPhilipp Zabel 1493deac046SPhilipp Zabel /* 1503deac046SPhilipp Zabel * Set output GPIO level 1513deac046SPhilipp Zabel */ 1523deac046SPhilipp Zabel void pxa_gpio_set_value(unsigned gpio, int value) 1533deac046SPhilipp Zabel { 1543deac046SPhilipp Zabel __gpio_set_value(gpio, value); 1553deac046SPhilipp Zabel } 1563deac046SPhilipp Zabel 1573deac046SPhilipp Zabel EXPORT_SYMBOL(pxa_gpio_set_value); 1583deac046SPhilipp Zabel 1593deac046SPhilipp Zabel /* 1601da177e4SLinus Torvalds * Routine to safely enable or disable a clock in the CKEN 1611da177e4SLinus Torvalds */ 1621da177e4SLinus Torvalds void pxa_set_cken(int clock, int enable) 1631da177e4SLinus Torvalds { 1641da177e4SLinus Torvalds unsigned long flags; 1651da177e4SLinus Torvalds local_irq_save(flags); 1661da177e4SLinus Torvalds 1671da177e4SLinus Torvalds if (enable) 1687053acbdSEric Miao CKEN |= (1 << clock); 1691da177e4SLinus Torvalds else 1707053acbdSEric Miao CKEN &= ~(1 << clock); 1711da177e4SLinus Torvalds 1721da177e4SLinus Torvalds local_irq_restore(flags); 1731da177e4SLinus Torvalds } 1741da177e4SLinus Torvalds 1751da177e4SLinus Torvalds EXPORT_SYMBOL(pxa_set_cken); 1761da177e4SLinus Torvalds 1771da177e4SLinus Torvalds /* 1781da177e4SLinus Torvalds * Intel PXA2xx internal register mapping. 1791da177e4SLinus Torvalds * 1801da177e4SLinus Torvalds * Note 1: not all PXA2xx variants implement all those addresses. 1811da177e4SLinus Torvalds * 1821da177e4SLinus Torvalds * Note 2: virtual 0xfffe0000-0xffffffff is reserved for the vector table 1831da177e4SLinus Torvalds * and cache flush area. 1841da177e4SLinus Torvalds */ 1851da177e4SLinus Torvalds static struct map_desc standard_io_desc[] __initdata = { 1866f9182ebSDeepak Saxena { /* Devs */ 1876f9182ebSDeepak Saxena .virtual = 0xf2000000, 1886f9182ebSDeepak Saxena .pfn = __phys_to_pfn(0x40000000), 1896f9182ebSDeepak Saxena .length = 0x02000000, 1906f9182ebSDeepak Saxena .type = MT_DEVICE 1916f9182ebSDeepak Saxena }, { /* LCD */ 1926f9182ebSDeepak Saxena .virtual = 0xf4000000, 1936f9182ebSDeepak Saxena .pfn = __phys_to_pfn(0x44000000), 1946f9182ebSDeepak Saxena .length = 0x00100000, 1956f9182ebSDeepak Saxena .type = MT_DEVICE 1966f9182ebSDeepak Saxena }, { /* Mem Ctl */ 1976f9182ebSDeepak Saxena .virtual = 0xf6000000, 1986f9182ebSDeepak Saxena .pfn = __phys_to_pfn(0x48000000), 1996f9182ebSDeepak Saxena .length = 0x00100000, 2006f9182ebSDeepak Saxena .type = MT_DEVICE 2016f9182ebSDeepak Saxena }, { /* USB host */ 2026f9182ebSDeepak Saxena .virtual = 0xf8000000, 2036f9182ebSDeepak Saxena .pfn = __phys_to_pfn(0x4c000000), 2046f9182ebSDeepak Saxena .length = 0x00100000, 2056f9182ebSDeepak Saxena .type = MT_DEVICE 2066f9182ebSDeepak Saxena }, { /* Camera */ 2076f9182ebSDeepak Saxena .virtual = 0xfa000000, 2086f9182ebSDeepak Saxena .pfn = __phys_to_pfn(0x50000000), 2096f9182ebSDeepak Saxena .length = 0x00100000, 2106f9182ebSDeepak Saxena .type = MT_DEVICE 2116f9182ebSDeepak Saxena }, { /* IMem ctl */ 2126f9182ebSDeepak Saxena .virtual = 0xfe000000, 2136f9182ebSDeepak Saxena .pfn = __phys_to_pfn(0x58000000), 2146f9182ebSDeepak Saxena .length = 0x00100000, 2156f9182ebSDeepak Saxena .type = MT_DEVICE 2166f9182ebSDeepak Saxena }, { /* UNCACHED_PHYS_0 */ 2176f9182ebSDeepak Saxena .virtual = 0xff000000, 2186f9182ebSDeepak Saxena .pfn = __phys_to_pfn(0x00000000), 2196f9182ebSDeepak Saxena .length = 0x00100000, 2206f9182ebSDeepak Saxena .type = MT_DEVICE 2216f9182ebSDeepak Saxena } 2221da177e4SLinus Torvalds }; 2231da177e4SLinus Torvalds 2241da177e4SLinus Torvalds void __init pxa_map_io(void) 2251da177e4SLinus Torvalds { 2261da177e4SLinus Torvalds iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); 2271da177e4SLinus Torvalds get_clk_frequency_khz(1); 2281da177e4SLinus Torvalds } 2291da177e4SLinus Torvalds 2301da177e4SLinus Torvalds 2311da177e4SLinus Torvalds static struct resource pxamci_resources[] = { 2321da177e4SLinus Torvalds [0] = { 2331da177e4SLinus Torvalds .start = 0x41100000, 2341da177e4SLinus Torvalds .end = 0x41100fff, 2351da177e4SLinus Torvalds .flags = IORESOURCE_MEM, 2361da177e4SLinus Torvalds }, 2371da177e4SLinus Torvalds [1] = { 2381da177e4SLinus Torvalds .start = IRQ_MMC, 2391da177e4SLinus Torvalds .end = IRQ_MMC, 2401da177e4SLinus Torvalds .flags = IORESOURCE_IRQ, 2411da177e4SLinus Torvalds }, 2421da177e4SLinus Torvalds }; 2431da177e4SLinus Torvalds 2441da177e4SLinus Torvalds static u64 pxamci_dmamask = 0xffffffffUL; 2451da177e4SLinus Torvalds 24634f3231fSRussell King struct platform_device pxamci_device = { 2471da177e4SLinus Torvalds .name = "pxa2xx-mci", 2481da177e4SLinus Torvalds .id = -1, 2491da177e4SLinus Torvalds .dev = { 2501da177e4SLinus Torvalds .dma_mask = &pxamci_dmamask, 2511da177e4SLinus Torvalds .coherent_dma_mask = 0xffffffff, 2521da177e4SLinus Torvalds }, 2531da177e4SLinus Torvalds .num_resources = ARRAY_SIZE(pxamci_resources), 2541da177e4SLinus Torvalds .resource = pxamci_resources, 2551da177e4SLinus Torvalds }; 2561da177e4SLinus Torvalds 2571da177e4SLinus Torvalds void __init pxa_set_mci_info(struct pxamci_platform_data *info) 2581da177e4SLinus Torvalds { 2591da177e4SLinus Torvalds pxamci_device.dev.platform_data = info; 2601da177e4SLinus Torvalds } 2611da177e4SLinus Torvalds 2621da177e4SLinus Torvalds 2631da177e4SLinus Torvalds static struct pxa2xx_udc_mach_info pxa_udc_info; 2641da177e4SLinus Torvalds 2651da177e4SLinus Torvalds void __init pxa_set_udc_info(struct pxa2xx_udc_mach_info *info) 2661da177e4SLinus Torvalds { 2671da177e4SLinus Torvalds memcpy(&pxa_udc_info, info, sizeof *info); 2681da177e4SLinus Torvalds } 2691da177e4SLinus Torvalds 2701da177e4SLinus Torvalds static struct resource pxa2xx_udc_resources[] = { 2711da177e4SLinus Torvalds [0] = { 2721da177e4SLinus Torvalds .start = 0x40600000, 2731da177e4SLinus Torvalds .end = 0x4060ffff, 2741da177e4SLinus Torvalds .flags = IORESOURCE_MEM, 2751da177e4SLinus Torvalds }, 2761da177e4SLinus Torvalds [1] = { 2771da177e4SLinus Torvalds .start = IRQ_USB, 2781da177e4SLinus Torvalds .end = IRQ_USB, 2791da177e4SLinus Torvalds .flags = IORESOURCE_IRQ, 2801da177e4SLinus Torvalds }, 2811da177e4SLinus Torvalds }; 2821da177e4SLinus Torvalds 2831da177e4SLinus Torvalds static u64 udc_dma_mask = ~(u32)0; 2841da177e4SLinus Torvalds 28534f3231fSRussell King struct platform_device pxaudc_device = { 2861da177e4SLinus Torvalds .name = "pxa2xx-udc", 2871da177e4SLinus Torvalds .id = -1, 2881da177e4SLinus Torvalds .resource = pxa2xx_udc_resources, 2891da177e4SLinus Torvalds .num_resources = ARRAY_SIZE(pxa2xx_udc_resources), 2901da177e4SLinus Torvalds .dev = { 2911da177e4SLinus Torvalds .platform_data = &pxa_udc_info, 2921da177e4SLinus Torvalds .dma_mask = &udc_dma_mask, 2931da177e4SLinus Torvalds } 2941da177e4SLinus Torvalds }; 2951da177e4SLinus Torvalds 2961da177e4SLinus Torvalds static struct resource pxafb_resources[] = { 2971da177e4SLinus Torvalds [0] = { 2981da177e4SLinus Torvalds .start = 0x44000000, 2991da177e4SLinus Torvalds .end = 0x4400ffff, 3001da177e4SLinus Torvalds .flags = IORESOURCE_MEM, 3011da177e4SLinus Torvalds }, 3021da177e4SLinus Torvalds [1] = { 3031da177e4SLinus Torvalds .start = IRQ_LCD, 3041da177e4SLinus Torvalds .end = IRQ_LCD, 3051da177e4SLinus Torvalds .flags = IORESOURCE_IRQ, 3061da177e4SLinus Torvalds }, 3071da177e4SLinus Torvalds }; 3081da177e4SLinus Torvalds 3091da177e4SLinus Torvalds static u64 fb_dma_mask = ~(u64)0; 3101da177e4SLinus Torvalds 31134f3231fSRussell King struct platform_device pxafb_device = { 3121da177e4SLinus Torvalds .name = "pxa2xx-fb", 3131da177e4SLinus Torvalds .id = -1, 3141da177e4SLinus Torvalds .dev = { 3151da177e4SLinus Torvalds .dma_mask = &fb_dma_mask, 3161da177e4SLinus Torvalds .coherent_dma_mask = 0xffffffff, 3171da177e4SLinus Torvalds }, 3181da177e4SLinus Torvalds .num_resources = ARRAY_SIZE(pxafb_resources), 3191da177e4SLinus Torvalds .resource = pxafb_resources, 3201da177e4SLinus Torvalds }; 3211da177e4SLinus Torvalds 322d14b272bSRichard Purdie void __init set_pxa_fb_info(struct pxafb_mach_info *info) 323d14b272bSRichard Purdie { 324d14b272bSRichard Purdie pxafb_device.dev.platform_data = info; 325d14b272bSRichard Purdie } 326d14b272bSRichard Purdie 327cb38c569SRichard Purdie void __init set_pxa_fb_parent(struct device *parent_dev) 328cb38c569SRichard Purdie { 329cb38c569SRichard Purdie pxafb_device.dev.parent = parent_dev; 330cb38c569SRichard Purdie } 331cb38c569SRichard Purdie 33234f3231fSRussell King struct platform_device ffuart_device = { 3331da177e4SLinus Torvalds .name = "pxa2xx-uart", 3341da177e4SLinus Torvalds .id = 0, 3351da177e4SLinus Torvalds }; 33634f3231fSRussell King struct platform_device btuart_device = { 3371da177e4SLinus Torvalds .name = "pxa2xx-uart", 3381da177e4SLinus Torvalds .id = 1, 3391da177e4SLinus Torvalds }; 34034f3231fSRussell King struct platform_device stuart_device = { 3411da177e4SLinus Torvalds .name = "pxa2xx-uart", 3421da177e4SLinus Torvalds .id = 2, 3431da177e4SLinus Torvalds }; 34434f3231fSRussell King struct platform_device hwuart_device = { 345d9e29649SMatt Reimer .name = "pxa2xx-uart", 346d9e29649SMatt Reimer .id = 3, 347d9e29649SMatt Reimer }; 3481da177e4SLinus Torvalds 34934f3231fSRussell King static struct resource pxai2c_resources[] = { 350bb9bffcbSRussell King { 351bb9bffcbSRussell King .start = 0x40301680, 352bb9bffcbSRussell King .end = 0x403016a3, 353bb9bffcbSRussell King .flags = IORESOURCE_MEM, 354bb9bffcbSRussell King }, { 355bb9bffcbSRussell King .start = IRQ_I2C, 356bb9bffcbSRussell King .end = IRQ_I2C, 357bb9bffcbSRussell King .flags = IORESOURCE_IRQ, 358bb9bffcbSRussell King }, 359bb9bffcbSRussell King }; 360bb9bffcbSRussell King 36134f3231fSRussell King struct platform_device pxai2c_device = { 362bb9bffcbSRussell King .name = "pxa2xx-i2c", 363bb9bffcbSRussell King .id = 0, 36434f3231fSRussell King .resource = pxai2c_resources, 36534f3231fSRussell King .num_resources = ARRAY_SIZE(pxai2c_resources), 366bb9bffcbSRussell King }; 367bb9bffcbSRussell King 368bb9bffcbSRussell King void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) 369bb9bffcbSRussell King { 37034f3231fSRussell King pxai2c_device.dev.platform_data = info; 371bb9bffcbSRussell King } 372bb9bffcbSRussell King 37334f3231fSRussell King static struct resource pxai2s_resources[] = { 374b2640b42SMatt Reimer { 375b2640b42SMatt Reimer .start = 0x40400000, 376b2640b42SMatt Reimer .end = 0x40400083, 377b2640b42SMatt Reimer .flags = IORESOURCE_MEM, 378b2640b42SMatt Reimer }, { 379b2640b42SMatt Reimer .start = IRQ_I2S, 380b2640b42SMatt Reimer .end = IRQ_I2S, 381b2640b42SMatt Reimer .flags = IORESOURCE_IRQ, 382b2640b42SMatt Reimer }, 383b2640b42SMatt Reimer }; 384b2640b42SMatt Reimer 38534f3231fSRussell King struct platform_device pxai2s_device = { 386b2640b42SMatt Reimer .name = "pxa2xx-i2s", 387b2640b42SMatt Reimer .id = -1, 38834f3231fSRussell King .resource = pxai2s_resources, 38934f3231fSRussell King .num_resources = ARRAY_SIZE(pxai2s_resources), 390b2640b42SMatt Reimer }; 391b2640b42SMatt Reimer 3926f475c01SNicolas Pitre static u64 pxaficp_dmamask = ~(u32)0; 3936f475c01SNicolas Pitre 39434f3231fSRussell King struct platform_device pxaficp_device = { 3956f475c01SNicolas Pitre .name = "pxa2xx-ir", 3966f475c01SNicolas Pitre .id = -1, 3976f475c01SNicolas Pitre .dev = { 3986f475c01SNicolas Pitre .dma_mask = &pxaficp_dmamask, 3996f475c01SNicolas Pitre .coherent_dma_mask = 0xffffffff, 4006f475c01SNicolas Pitre }, 4016f475c01SNicolas Pitre }; 4026f475c01SNicolas Pitre 4036f475c01SNicolas Pitre void __init pxa_set_ficp_info(struct pxaficp_platform_data *info) 4046f475c01SNicolas Pitre { 4056f475c01SNicolas Pitre pxaficp_device.dev.platform_data = info; 4066f475c01SNicolas Pitre } 4076f475c01SNicolas Pitre 40834f3231fSRussell King struct platform_device pxartc_device = { 409e842f1c8SRichard Purdie .name = "sa1100-rtc", 410e842f1c8SRichard Purdie .id = -1, 411e842f1c8SRichard Purdie }; 412