diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-05-22 22:35:33 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-05-22 22:35:33 -0400 |
commit | 8ace5c4698ec8da53e69095596718d5a936433de (patch) | |
tree | 1f5959b3ac289e3bde420cc14109be0cc518a75a /arch/arm/plat-omap | |
parent | a375b15164dd9264f724ad941825e52c90145151 (diff) | |
parent | 71a8638480eb8fb6cfabe2ee9ca3fbc6e3453a14 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-latest
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 35 | ||||
-rw-r--r-- | arch/arm/plat-omap/iommu.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/omap_device.c | 23 |
3 files changed, 34 insertions, 26 deletions
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index d2adcdda23cf..bd9e32187eab 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> |
@@ -1372,9 +1372,7 @@ static const struct dev_pm_ops omap_mpuio_dev_pm_ops = { | |||
1372 | .resume_noirq = omap_mpuio_resume_noirq, | 1372 | .resume_noirq = omap_mpuio_resume_noirq, |
1373 | }; | 1373 | }; |
1374 | 1374 | ||
1375 | /* use platform_driver for this, now that there's no longer any | 1375 | /* 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 = { | 1376 | static struct platform_driver omap_mpuio_driver = { |
1379 | .driver = { | 1377 | .driver = { |
1380 | .name = "mpuio", | 1378 | .name = "mpuio", |
@@ -1745,7 +1743,7 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev) | |||
1745 | } | 1743 | } |
1746 | 1744 | ||
1747 | #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS) | 1745 | #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS) |
1748 | static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg) | 1746 | static int omap_gpio_suspend(void) |
1749 | { | 1747 | { |
1750 | int i; | 1748 | int i; |
1751 | 1749 | ||
@@ -1795,12 +1793,12 @@ static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg) | |||
1795 | return 0; | 1793 | return 0; |
1796 | } | 1794 | } |
1797 | 1795 | ||
1798 | static int omap_gpio_resume(struct sys_device *dev) | 1796 | static void omap_gpio_resume(void) |
1799 | { | 1797 | { |
1800 | int i; | 1798 | int i; |
1801 | 1799 | ||
1802 | if (!cpu_class_is_omap2() && !cpu_is_omap16xx()) | 1800 | if (!cpu_class_is_omap2() && !cpu_is_omap16xx()) |
1803 | return 0; | 1801 | return; |
1804 | 1802 | ||
1805 | for (i = 0; i < gpio_bank_count; i++) { | 1803 | for (i = 0; i < gpio_bank_count; i++) { |
1806 | struct gpio_bank *bank = &gpio_bank[i]; | 1804 | struct gpio_bank *bank = &gpio_bank[i]; |
@@ -1836,21 +1834,13 @@ static int omap_gpio_resume(struct sys_device *dev) | |||
1836 | __raw_writel(bank->saved_wakeup, wake_set); | 1834 | __raw_writel(bank->saved_wakeup, wake_set); |
1837 | spin_unlock_irqrestore(&bank->lock, flags); | 1835 | spin_unlock_irqrestore(&bank->lock, flags); |
1838 | } | 1836 | } |
1839 | |||
1840 | return 0; | ||
1841 | } | 1837 | } |
1842 | 1838 | ||
1843 | static struct sysdev_class omap_gpio_sysclass = { | 1839 | static struct syscore_ops omap_gpio_syscore_ops = { |
1844 | .name = "gpio", | ||
1845 | .suspend = omap_gpio_suspend, | 1840 | .suspend = omap_gpio_suspend, |
1846 | .resume = omap_gpio_resume, | 1841 | .resume = omap_gpio_resume, |
1847 | }; | 1842 | }; |
1848 | 1843 | ||
1849 | static struct sys_device omap_gpio_device = { | ||
1850 | .id = 0, | ||
1851 | .cls = &omap_gpio_sysclass, | ||
1852 | }; | ||
1853 | |||
1854 | #endif | 1844 | #endif |
1855 | 1845 | ||
1856 | #ifdef CONFIG_ARCH_OMAP2PLUS | 1846 | #ifdef CONFIG_ARCH_OMAP2PLUS |
@@ -2108,21 +2098,14 @@ postcore_initcall(omap_gpio_drv_reg); | |||
2108 | 2098 | ||
2109 | static int __init omap_gpio_sysinit(void) | 2099 | static int __init omap_gpio_sysinit(void) |
2110 | { | 2100 | { |
2111 | int ret = 0; | ||
2112 | |||
2113 | mpuio_init(); | 2101 | mpuio_init(); |
2114 | 2102 | ||
2115 | #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS) | 2103 | #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2PLUS) |
2116 | if (cpu_is_omap16xx() || cpu_class_is_omap2()) { | 2104 | if (cpu_is_omap16xx() || cpu_class_is_omap2()) |
2117 | if (ret == 0) { | 2105 | 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 | 2106 | #endif |
2124 | 2107 | ||
2125 | return ret; | 2108 | return 0; |
2126 | } | 2109 | } |
2127 | 2110 | ||
2128 | arch_initcall(omap_gpio_sysinit); | 2111 | arch_initcall(omap_gpio_sysinit); |
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 | ||