aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa3xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/pxa3xx.c')
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index dffb7e813d9..656a1bb16d1 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -19,6 +19,7 @@
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/of.h>
22#include <linux/syscore_ops.h> 23#include <linux/syscore_ops.h>
23#include <linux/i2c/pxa-i2c.h> 24#include <linux/i2c/pxa-i2c.h>
24 25
@@ -27,7 +28,7 @@
27#include <mach/hardware.h> 28#include <mach/hardware.h>
28#include <mach/pxa3xx-regs.h> 29#include <mach/pxa3xx-regs.h>
29#include <mach/reset.h> 30#include <mach/reset.h>
30#include <mach/ohci.h> 31#include <linux/platform_data/usb-ohci-pxa27x.h>
31#include <mach/pm.h> 32#include <mach/pm.h>
32#include <mach/dma.h> 33#include <mach/dma.h>
33#include <mach/smemc.h> 34#include <mach/smemc.h>
@@ -40,6 +41,8 @@
40#define PECR_IE(n) ((1 << ((n) * 2)) << 28) 41#define PECR_IE(n) ((1 << ((n) * 2)) << 28)
41#define PECR_IS(n) ((1 << ((n) * 2)) << 29) 42#define PECR_IS(n) ((1 << ((n) * 2)) << 29)
42 43
44extern void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, unsigned int));
45
43static DEFINE_PXA3_CKEN(pxa3xx_ffuart, FFUART, 14857000, 1); 46static DEFINE_PXA3_CKEN(pxa3xx_ffuart, FFUART, 14857000, 1);
44static DEFINE_PXA3_CKEN(pxa3xx_btuart, BTUART, 14857000, 1); 47static DEFINE_PXA3_CKEN(pxa3xx_btuart, BTUART, 14857000, 1);
45static DEFINE_PXA3_CKEN(pxa3xx_stuart, STUART, 14857000, 1); 48static DEFINE_PXA3_CKEN(pxa3xx_stuart, STUART, 14857000, 1);
@@ -382,7 +385,7 @@ static void __init pxa_init_ext_wakeup_irq(int (*fn)(struct irq_data *,
382 pxa_ext_wakeup_chip.irq_set_wake = fn; 385 pxa_ext_wakeup_chip.irq_set_wake = fn;
383} 386}
384 387
385void __init pxa3xx_init_irq(void) 388static void __init __pxa3xx_init_irq(void)
386{ 389{
387 /* enable CP6 access */ 390 /* enable CP6 access */
388 u32 value; 391 u32 value;
@@ -390,10 +393,23 @@ void __init pxa3xx_init_irq(void)
390 value |= (1 << 6); 393 value |= (1 << 6);
391 __asm__ __volatile__("mcr p15, 0, %0, c15, c1, 0\n": :"r"(value)); 394 __asm__ __volatile__("mcr p15, 0, %0, c15, c1, 0\n": :"r"(value));
392 395
393 pxa_init_irq(56, pxa3xx_set_wake);
394 pxa_init_ext_wakeup_irq(pxa3xx_set_wake); 396 pxa_init_ext_wakeup_irq(pxa3xx_set_wake);
395} 397}
396 398
399void __init pxa3xx_init_irq(void)
400{
401 __pxa3xx_init_irq();
402 pxa_init_irq(56, pxa3xx_set_wake);
403}
404
405#ifdef CONFIG_OF
406void __init pxa3xx_dt_init_irq(void)
407{
408 __pxa3xx_init_irq();
409 pxa_dt_irq_init(pxa3xx_set_wake);
410}
411#endif /* CONFIG_OF */
412
397static struct map_desc pxa3xx_io_desc[] __initdata = { 413static struct map_desc pxa3xx_io_desc[] __initdata = {
398 { /* Mem Ctl */ 414 { /* Mem Ctl */
399 .virtual = (unsigned long)SMEMC_VIRT, 415 .virtual = (unsigned long)SMEMC_VIRT,
@@ -466,7 +482,8 @@ static int __init pxa3xx_init(void)
466 register_syscore_ops(&pxa3xx_mfp_syscore_ops); 482 register_syscore_ops(&pxa3xx_mfp_syscore_ops);
467 register_syscore_ops(&pxa3xx_clock_syscore_ops); 483 register_syscore_ops(&pxa3xx_clock_syscore_ops);
468 484
469 ret = platform_add_devices(devices, ARRAY_SIZE(devices)); 485 if (!of_have_populated_dt())
486 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
470 } 487 }
471 488
472 return ret; 489 return ret;