diff options
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 42 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/flash.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/smp.h | 36 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/uncompress.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/iommu.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/omap_device.c | 23 |
7 files changed, 43 insertions, 68 deletions
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index cd5f993612fd..49a4c75243fc 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -12,12 +12,14 @@ choice | |||
12 | config ARCH_OMAP1 | 12 | config ARCH_OMAP1 |
13 | bool "TI OMAP1" | 13 | bool "TI OMAP1" |
14 | select CLKDEV_LOOKUP | 14 | select CLKDEV_LOOKUP |
15 | select CLKSRC_MMIO | ||
15 | help | 16 | help |
16 | "Systems based on omap7xx, omap15xx or omap16xx" | 17 | "Systems based on omap7xx, omap15xx or omap16xx" |
17 | 18 | ||
18 | config ARCH_OMAP2PLUS | 19 | config ARCH_OMAP2PLUS |
19 | bool "TI OMAP2/3/4" | 20 | bool "TI OMAP2/3/4" |
20 | select CLKDEV_LOOKUP | 21 | select CLKDEV_LOOKUP |
22 | select GENERIC_IRQ_CHIP | ||
21 | select OMAP_DM_TIMER | 23 | select OMAP_DM_TIMER |
22 | help | 24 | help |
23 | "Systems based on OMAP2, OMAP3 or OMAP4" | 25 | "Systems based on OMAP2, OMAP3 or OMAP4" |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index d2adcdda23cf..efb869390199 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/sysdev.h> | 20 | #include <linux/syscore_ops.h> |
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
@@ -1137,8 +1137,9 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
1137 | struct gpio_bank *bank; | 1137 | struct gpio_bank *bank; |
1138 | u32 retrigger = 0; | 1138 | u32 retrigger = 0; |
1139 | int unmasked = 0; | 1139 | int unmasked = 0; |
1140 | struct irq_chip *chip = irq_desc_get_chip(desc); | ||
1140 | 1141 | ||
1141 | desc->irq_data.chip->irq_ack(&desc->irq_data); | 1142 | chained_irq_enter(chip, desc); |
1142 | 1143 | ||
1143 | bank = irq_get_handler_data(irq); | 1144 | bank = irq_get_handler_data(irq); |
1144 | #ifdef CONFIG_ARCH_OMAP1 | 1145 | #ifdef CONFIG_ARCH_OMAP1 |
@@ -1195,7 +1196,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
1195 | configured, we could unmask GPIO bank interrupt immediately */ | 1196 | configured, we could unmask GPIO bank interrupt immediately */ |
1196 | if (!level_mask && !unmasked) { | 1197 | if (!level_mask && !unmasked) { |
1197 | unmasked = 1; | 1198 | unmasked = 1; |
1198 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | 1199 | chained_irq_exit(chip, desc); |
1199 | } | 1200 | } |
1200 | 1201 | ||
1201 | isr |= retrigger; | 1202 | isr |= retrigger; |
@@ -1231,7 +1232,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
1231 | interrupt */ | 1232 | interrupt */ |
1232 | exit: | 1233 | exit: |
1233 | if (!unmasked) | 1234 | if (!unmasked) |
1234 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | 1235 | chained_irq_exit(chip, desc); |
1235 | } | 1236 | } |
1236 | 1237 | ||
1237 | static void gpio_irq_shutdown(struct irq_data *d) | 1238 | static void gpio_irq_shutdown(struct irq_data *d) |
@@ -1372,9 +1373,7 @@ static const struct dev_pm_ops omap_mpuio_dev_pm_ops = { | |||
1372 | .resume_noirq = omap_mpuio_resume_noirq, | 1373 | .resume_noirq = omap_mpuio_resume_noirq, |
1373 | }; | 1374 | }; |
1374 | 1375 | ||
1375 | /* use platform_driver for this, now that there's no longer any | 1376 | /* use platform_driver for this. */ |
1376 | * point to sys_device (other than not disturbing old code). | ||
1377 | */ | ||
1378 | static struct platform_driver omap_mpuio_driver = { | 1377 | static struct platform_driver omap_mpuio_driver = { |
1379 | .driver = { | 1378 | .driver = { |
1380 | .name = "mpuio", | 1379 | .name = "mpuio", |
@@ -1745,7 +1744,7 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev) | |||
1745 | } | 1744 | } |
1746 | 1745 | ||
1747 | #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS) | 1746 | #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS) |
1748 | static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg) | 1747 | static int omap_gpio_suspend(void) |
1749 | { | 1748 | { |
1750 | int i; | 1749 | int i; |
1751 | 1750 | ||
@@ -1795,12 +1794,12 @@ static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg) | |||
1795 | return 0; | 1794 | return 0; |
1796 | } | 1795 | } |
1797 | 1796 | ||
1798 | static int omap_gpio_resume(struct sys_device *dev) | 1797 | static void omap_gpio_resume(void) |
1799 | { | 1798 | { |
1800 | int i; | 1799 | int i; |
1801 | 1800 | ||
1802 | if (!cpu_class_is_omap2() && !cpu_is_omap16xx()) | 1801 | if (!cpu_class_is_omap2() && !cpu_is_omap16xx()) |
1803 | return 0; | 1802 | return; |
1804 | 1803 | ||
1805 | for (i = 0; i < gpio_bank_count; i++) { | 1804 | for (i = 0; i < gpio_bank_count; i++) { |
1806 | struct gpio_bank *bank = &gpio_bank[i]; | 1805 | struct gpio_bank *bank = &gpio_bank[i]; |
@@ -1836,21 +1835,13 @@ static int omap_gpio_resume(struct sys_device *dev) | |||
1836 | __raw_writel(bank->saved_wakeup, wake_set); | 1835 | __raw_writel(bank->saved_wakeup, wake_set); |
1837 | spin_unlock_irqrestore(&bank->lock, flags); | 1836 | spin_unlock_irqrestore(&bank->lock, flags); |
1838 | } | 1837 | } |
1839 | |||
1840 | return 0; | ||
1841 | } | 1838 | } |
1842 | 1839 | ||
1843 | static struct sysdev_class omap_gpio_sysclass = { | 1840 | static struct syscore_ops omap_gpio_syscore_ops = { |
1844 | .name = "gpio", | ||
1845 | .suspend = omap_gpio_suspend, | 1841 | .suspend = omap_gpio_suspend, |
1846 | .resume = omap_gpio_resume, | 1842 | .resume = omap_gpio_resume, |
1847 | }; | 1843 | }; |
1848 | 1844 | ||
1849 | static struct sys_device omap_gpio_device = { | ||
1850 | .id = 0, | ||
1851 | .cls = &omap_gpio_sysclass, | ||
1852 | }; | ||
1853 | |||
1854 | #endif | 1845 | #endif |
1855 | 1846 | ||
1856 | #ifdef CONFIG_ARCH_OMAP2PLUS | 1847 | #ifdef CONFIG_ARCH_OMAP2PLUS |
@@ -2108,21 +2099,14 @@ postcore_initcall(omap_gpio_drv_reg); | |||
2108 | 2099 | ||
2109 | static int __init omap_gpio_sysinit(void) | 2100 | static int __init omap_gpio_sysinit(void) |
2110 | { | 2101 | { |
2111 | int ret = 0; | ||
2112 | |||
2113 | mpuio_init(); | 2102 | mpuio_init(); |
2114 | 2103 | ||
2115 | #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS) | 2104 | #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS) |
2116 | if (cpu_is_omap16xx() || cpu_class_is_omap2()) { | 2105 | if (cpu_is_omap16xx() || cpu_class_is_omap2()) |
2117 | if (ret == 0) { | 2106 | register_syscore_ops(&omap_gpio_syscore_ops); |
2118 | ret = sysdev_class_register(&omap_gpio_sysclass); | ||
2119 | if (ret == 0) | ||
2120 | ret = sysdev_register(&omap_gpio_device); | ||
2121 | } | ||
2122 | } | ||
2123 | #endif | 2107 | #endif |
2124 | 2108 | ||
2125 | return ret; | 2109 | return 0; |
2126 | } | 2110 | } |
2127 | 2111 | ||
2128 | arch_initcall(omap_gpio_sysinit); | 2112 | arch_initcall(omap_gpio_sysinit); |
diff --git a/arch/arm/plat-omap/include/plat/flash.h b/arch/arm/plat-omap/include/plat/flash.h index 3e6327016b40..3083195123ea 100644 --- a/arch/arm/plat-omap/include/plat/flash.h +++ b/arch/arm/plat-omap/include/plat/flash.h | |||
@@ -11,6 +11,6 @@ | |||
11 | 11 | ||
12 | #include <linux/mtd/map.h> | 12 | #include <linux/mtd/map.h> |
13 | 13 | ||
14 | extern void omap1_set_vpp(struct map_info *map, int enable); | 14 | extern void omap1_set_vpp(struct platform_device *pdev, int enable); |
15 | 15 | ||
16 | #endif | 16 | #endif |
diff --git a/arch/arm/plat-omap/include/plat/smp.h b/arch/arm/plat-omap/include/plat/smp.h deleted file mode 100644 index 7a10257909ef..000000000000 --- a/arch/arm/plat-omap/include/plat/smp.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * OMAP4 machine specific smp.h | ||
3 | * | ||
4 | * Copyright (C) 2009 Texas Instruments, Inc. | ||
5 | * | ||
6 | * Author: | ||
7 | * Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
8 | * | ||
9 | * Interface functions needed for the SMP. This file is based on arm | ||
10 | * realview smp platform. | ||
11 | * Copyright (c) 2003 ARM Limited. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License version 2 as | ||
15 | * published by the Free Software Foundation. | ||
16 | */ | ||
17 | #ifndef OMAP_ARCH_SMP_H | ||
18 | #define OMAP_ARCH_SMP_H | ||
19 | |||
20 | #include <asm/hardware/gic.h> | ||
21 | |||
22 | /* Needed for secondary core boot */ | ||
23 | extern void omap_secondary_startup(void); | ||
24 | extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask); | ||
25 | extern void omap_auxcoreboot_addr(u32 cpu_addr); | ||
26 | extern u32 omap_read_auxcoreboot0(void); | ||
27 | |||
28 | /* | ||
29 | * We use Soft IRQ1 as the IPI | ||
30 | */ | ||
31 | static inline void smp_cross_call(const struct cpumask *mask, int ipi) | ||
32 | { | ||
33 | gic_raise_softirq(mask, ipi); | ||
34 | } | ||
35 | |||
36 | #endif | ||
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h index 30b891c4a93f..565d2664f5a7 100644 --- a/arch/arm/plat-omap/include/plat/uncompress.h +++ b/arch/arm/plat-omap/include/plat/uncompress.h | |||
@@ -27,8 +27,8 @@ | |||
27 | 27 | ||
28 | #define MDR1_MODE_MASK 0x07 | 28 | #define MDR1_MODE_MASK 0x07 |
29 | 29 | ||
30 | static volatile u8 *uart_base; | 30 | volatile u8 *uart_base; |
31 | static int uart_shift; | 31 | int uart_shift; |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Store the DEBUG_LL uart number into memory. | 34 | * Store the DEBUG_LL uart number into memory. |
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c index 8a51fd58f656..34fc31ee9081 100644 --- a/arch/arm/plat-omap/iommu.c +++ b/arch/arm/plat-omap/iommu.c | |||
@@ -793,6 +793,8 @@ static irqreturn_t iommu_fault_handler(int irq, void *data) | |||
793 | clk_enable(obj->clk); | 793 | clk_enable(obj->clk); |
794 | errs = iommu_report_fault(obj, &da); | 794 | errs = iommu_report_fault(obj, &da); |
795 | clk_disable(obj->clk); | 795 | clk_disable(obj->clk); |
796 | if (errs == 0) | ||
797 | return IRQ_HANDLED; | ||
796 | 798 | ||
797 | /* Fault callback or TLB/PTE Dynamic loading */ | 799 | /* Fault callback or TLB/PTE Dynamic loading */ |
798 | if (obj->isr && !obj->isr(obj, da, errs, obj->isr_priv)) | 800 | if (obj->isr && !obj->isr(obj, da, errs, obj->isr_priv)) |
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index 9bbda9acb73b..a37b8eb65b76 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -536,6 +536,28 @@ int omap_early_device_register(struct omap_device *od) | |||
536 | return 0; | 536 | return 0; |
537 | } | 537 | } |
538 | 538 | ||
539 | static int _od_runtime_suspend(struct device *dev) | ||
540 | { | ||
541 | struct platform_device *pdev = to_platform_device(dev); | ||
542 | |||
543 | return omap_device_idle(pdev); | ||
544 | } | ||
545 | |||
546 | static int _od_runtime_resume(struct device *dev) | ||
547 | { | ||
548 | struct platform_device *pdev = to_platform_device(dev); | ||
549 | |||
550 | return omap_device_enable(pdev); | ||
551 | } | ||
552 | |||
553 | static struct dev_power_domain omap_device_power_domain = { | ||
554 | .ops = { | ||
555 | .runtime_suspend = _od_runtime_suspend, | ||
556 | .runtime_resume = _od_runtime_resume, | ||
557 | USE_PLATFORM_PM_SLEEP_OPS | ||
558 | } | ||
559 | }; | ||
560 | |||
539 | /** | 561 | /** |
540 | * omap_device_register - register an omap_device with one omap_hwmod | 562 | * omap_device_register - register an omap_device with one omap_hwmod |
541 | * @od: struct omap_device * to register | 563 | * @od: struct omap_device * to register |
@@ -549,6 +571,7 @@ int omap_device_register(struct omap_device *od) | |||
549 | pr_debug("omap_device: %s: registering\n", od->pdev.name); | 571 | pr_debug("omap_device: %s: registering\n", od->pdev.name); |
550 | 572 | ||
551 | od->pdev.dev.parent = &omap_device_parent; | 573 | od->pdev.dev.parent = &omap_device_parent; |
574 | od->pdev.dev.pwr_domain = &omap_device_power_domain; | ||
552 | return platform_device_register(&od->pdev); | 575 | return platform_device_register(&od->pdev); |
553 | } | 576 | } |
554 | 577 | ||