diff options
Diffstat (limited to 'arch/arm')
126 files changed, 590 insertions, 651 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index f9da41921c52..942fad97e447 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -691,9 +691,9 @@ proc_types: | |||
691 | 691 | ||
692 | .word 0x41069260 @ ARM926EJ-S (v5TEJ) | 692 | .word 0x41069260 @ ARM926EJ-S (v5TEJ) |
693 | .word 0xff0ffff0 | 693 | .word 0xff0ffff0 |
694 | b __arm926ejs_mmu_cache_on | 694 | W(b) __arm926ejs_mmu_cache_on |
695 | b __armv4_mmu_cache_off | 695 | W(b) __armv4_mmu_cache_off |
696 | b __armv5tej_mmu_cache_flush | 696 | W(b) __armv5tej_mmu_cache_flush |
697 | 697 | ||
698 | .word 0x00007000 @ ARM7 IDs | 698 | .word 0x00007000 @ ARM7 IDs |
699 | .word 0x0000f000 | 699 | .word 0x0000f000 |
diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig index 889922ad229c..67b5abb6f857 100644 --- a/arch/arm/configs/davinci_all_defconfig +++ b/arch/arm/configs/davinci_all_defconfig | |||
@@ -157,7 +157,7 @@ CONFIG_LEDS_GPIO=m | |||
157 | CONFIG_LEDS_TRIGGERS=y | 157 | CONFIG_LEDS_TRIGGERS=y |
158 | CONFIG_LEDS_TRIGGER_TIMER=m | 158 | CONFIG_LEDS_TRIGGER_TIMER=m |
159 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m | 159 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m |
160 | CONFIG_RTC_CLASS=m | 160 | CONFIG_RTC_CLASS=y |
161 | CONFIG_EXT2_FS=y | 161 | CONFIG_EXT2_FS=y |
162 | CONFIG_EXT3_FS=y | 162 | CONFIG_EXT3_FS=y |
163 | CONFIG_XFS_FS=m | 163 | CONFIG_XFS_FS=m |
diff --git a/arch/arm/configs/mx51_defconfig b/arch/arm/configs/mx51_defconfig index 0ace16cba9b5..88c5802a2351 100644 --- a/arch/arm/configs/mx51_defconfig +++ b/arch/arm/configs/mx51_defconfig | |||
@@ -106,6 +106,7 @@ CONFIG_GPIO_SYSFS=y | |||
106 | CONFIG_USB=y | 106 | CONFIG_USB=y |
107 | CONFIG_USB_EHCI_HCD=y | 107 | CONFIG_USB_EHCI_HCD=y |
108 | CONFIG_USB_EHCI_MXC=y | 108 | CONFIG_USB_EHCI_MXC=y |
109 | CONFIG_USB_STORAGE=y | ||
109 | CONFIG_MMC=y | 110 | CONFIG_MMC=y |
110 | CONFIG_MMC_BLOCK=m | 111 | CONFIG_MMC_BLOCK=m |
111 | CONFIG_MMC_SDHCI=m | 112 | CONFIG_MMC_SDHCI=m |
@@ -145,7 +146,7 @@ CONFIG_ROOT_NFS=y | |||
145 | CONFIG_NLS_DEFAULT="cp437" | 146 | CONFIG_NLS_DEFAULT="cp437" |
146 | CONFIG_NLS_CODEPAGE_437=y | 147 | CONFIG_NLS_CODEPAGE_437=y |
147 | CONFIG_NLS_ASCII=y | 148 | CONFIG_NLS_ASCII=y |
148 | CONFIG_NLS_ISO8859_1=m | 149 | CONFIG_NLS_ISO8859_1=y |
149 | CONFIG_NLS_ISO8859_15=m | 150 | CONFIG_NLS_ISO8859_15=m |
150 | CONFIG_NLS_UTF8=y | 151 | CONFIG_NLS_UTF8=y |
151 | CONFIG_MAGIC_SYSRQ=y | 152 | CONFIG_MAGIC_SYSRQ=y |
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig index 2bf224310fb4..5a6ff7c605df 100644 --- a/arch/arm/configs/mxs_defconfig +++ b/arch/arm/configs/mxs_defconfig | |||
@@ -89,7 +89,7 @@ CONFIG_DISPLAY_SUPPORT=m | |||
89 | # CONFIG_USB_SUPPORT is not set | 89 | # CONFIG_USB_SUPPORT is not set |
90 | CONFIG_MMC=y | 90 | CONFIG_MMC=y |
91 | CONFIG_MMC_MXS=y | 91 | CONFIG_MMC_MXS=y |
92 | CONFIG_RTC_CLASS=m | 92 | CONFIG_RTC_CLASS=y |
93 | CONFIG_RTC_DRV_DS1307=m | 93 | CONFIG_RTC_DRV_DS1307=m |
94 | CONFIG_DMADEVICES=y | 94 | CONFIG_DMADEVICES=y |
95 | CONFIG_MXS_DMA=y | 95 | CONFIG_MXS_DMA=y |
diff --git a/arch/arm/configs/netx_defconfig b/arch/arm/configs/netx_defconfig index 316af5479d90..9c0ad7993986 100644 --- a/arch/arm/configs/netx_defconfig +++ b/arch/arm/configs/netx_defconfig | |||
@@ -60,7 +60,7 @@ CONFIG_FB_ARMCLCD=y | |||
60 | # CONFIG_VGA_CONSOLE is not set | 60 | # CONFIG_VGA_CONSOLE is not set |
61 | CONFIG_FRAMEBUFFER_CONSOLE=y | 61 | CONFIG_FRAMEBUFFER_CONSOLE=y |
62 | CONFIG_LOGO=y | 62 | CONFIG_LOGO=y |
63 | CONFIG_RTC_CLASS=m | 63 | CONFIG_RTC_CLASS=y |
64 | CONFIG_INOTIFY=y | 64 | CONFIG_INOTIFY=y |
65 | CONFIG_TMPFS=y | 65 | CONFIG_TMPFS=y |
66 | CONFIG_JFFS2_FS=y | 66 | CONFIG_JFFS2_FS=y |
diff --git a/arch/arm/configs/viper_defconfig b/arch/arm/configs/viper_defconfig index 8b0c717378fa..1d01ddd33122 100644 --- a/arch/arm/configs/viper_defconfig +++ b/arch/arm/configs/viper_defconfig | |||
@@ -142,7 +142,7 @@ CONFIG_USB_GADGETFS=m | |||
142 | CONFIG_USB_FILE_STORAGE=m | 142 | CONFIG_USB_FILE_STORAGE=m |
143 | CONFIG_USB_G_SERIAL=m | 143 | CONFIG_USB_G_SERIAL=m |
144 | CONFIG_USB_G_PRINTER=m | 144 | CONFIG_USB_G_PRINTER=m |
145 | CONFIG_RTC_CLASS=m | 145 | CONFIG_RTC_CLASS=y |
146 | CONFIG_RTC_DRV_DS1307=m | 146 | CONFIG_RTC_DRV_DS1307=m |
147 | CONFIG_RTC_DRV_SA1100=m | 147 | CONFIG_RTC_DRV_SA1100=m |
148 | CONFIG_EXT2_FS=m | 148 | CONFIG_EXT2_FS=m |
diff --git a/arch/arm/configs/xcep_defconfig b/arch/arm/configs/xcep_defconfig index 5b5504143647..721832ffe2d7 100644 --- a/arch/arm/configs/xcep_defconfig +++ b/arch/arm/configs/xcep_defconfig | |||
@@ -73,7 +73,7 @@ CONFIG_SENSORS_MAX6650=m | |||
73 | # CONFIG_VGA_CONSOLE is not set | 73 | # CONFIG_VGA_CONSOLE is not set |
74 | # CONFIG_HID_SUPPORT is not set | 74 | # CONFIG_HID_SUPPORT is not set |
75 | # CONFIG_USB_SUPPORT is not set | 75 | # CONFIG_USB_SUPPORT is not set |
76 | CONFIG_RTC_CLASS=m | 76 | CONFIG_RTC_CLASS=y |
77 | CONFIG_RTC_DRV_SA1100=m | 77 | CONFIG_RTC_DRV_SA1100=m |
78 | CONFIG_DMADEVICES=y | 78 | CONFIG_DMADEVICES=y |
79 | # CONFIG_DNOTIFY is not set | 79 | # CONFIG_DNOTIFY is not set |
diff --git a/arch/arm/configs/zeus_defconfig b/arch/arm/configs/zeus_defconfig index 960f65514d88..59577ad3f4ef 100644 --- a/arch/arm/configs/zeus_defconfig +++ b/arch/arm/configs/zeus_defconfig | |||
@@ -158,7 +158,7 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=m | |||
158 | CONFIG_LEDS_TRIGGER_BACKLIGHT=m | 158 | CONFIG_LEDS_TRIGGER_BACKLIGHT=m |
159 | CONFIG_LEDS_TRIGGER_GPIO=m | 159 | CONFIG_LEDS_TRIGGER_GPIO=m |
160 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=m | 160 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=m |
161 | CONFIG_RTC_CLASS=m | 161 | CONFIG_RTC_CLASS=y |
162 | CONFIG_RTC_DRV_ISL1208=m | 162 | CONFIG_RTC_DRV_ISL1208=m |
163 | CONFIG_RTC_DRV_PXA=m | 163 | CONFIG_RTC_DRV_PXA=m |
164 | CONFIG_EXT2_FS=y | 164 | CONFIG_EXT2_FS=y |
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c index a701e4226a6c..0cdd7b456cb2 100644 --- a/arch/arm/kernel/devtree.c +++ b/arch/arm/kernel/devtree.c | |||
@@ -76,6 +76,9 @@ struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys) | |||
76 | unsigned long dt_root; | 76 | unsigned long dt_root; |
77 | const char *model; | 77 | const char *model; |
78 | 78 | ||
79 | if (!dt_phys) | ||
80 | return NULL; | ||
81 | |||
79 | devtree = phys_to_virt(dt_phys); | 82 | devtree = phys_to_virt(dt_phys); |
80 | 83 | ||
81 | /* check device tree validity */ | 84 | /* check device tree validity */ |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index e8d885676807..90c62cd51ca9 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -435,6 +435,10 @@ __irq_usr: | |||
435 | usr_entry | 435 | usr_entry |
436 | kuser_cmpxchg_check | 436 | kuser_cmpxchg_check |
437 | 437 | ||
438 | #ifdef CONFIG_IRQSOFF_TRACER | ||
439 | bl trace_hardirqs_off | ||
440 | #endif | ||
441 | |||
438 | get_thread_info tsk | 442 | get_thread_info tsk |
439 | #ifdef CONFIG_PREEMPT | 443 | #ifdef CONFIG_PREEMPT |
440 | ldr r8, [tsk, #TI_PREEMPT] @ get preempt count | 444 | ldr r8, [tsk, #TI_PREEMPT] @ get preempt count |
@@ -453,7 +457,7 @@ __irq_usr: | |||
453 | #endif | 457 | #endif |
454 | 458 | ||
455 | mov why, #0 | 459 | mov why, #0 |
456 | b ret_to_user | 460 | b ret_to_user_from_irq |
457 | UNWIND(.fnend ) | 461 | UNWIND(.fnend ) |
458 | ENDPROC(__irq_usr) | 462 | ENDPROC(__irq_usr) |
459 | 463 | ||
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 1e7b04a40a31..b2a27b6b0046 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -64,6 +64,7 @@ work_resched: | |||
64 | ENTRY(ret_to_user) | 64 | ENTRY(ret_to_user) |
65 | ret_slow_syscall: | 65 | ret_slow_syscall: |
66 | disable_irq @ disable interrupts | 66 | disable_irq @ disable interrupts |
67 | ENTRY(ret_to_user_from_irq) | ||
67 | ldr r1, [tsk, #TI_FLAGS] | 68 | ldr r1, [tsk, #TI_FLAGS] |
68 | tst r1, #_TIF_WORK_MASK | 69 | tst r1, #_TIF_WORK_MASK |
69 | bne work_pending | 70 | bne work_pending |
@@ -75,6 +76,7 @@ no_work_pending: | |||
75 | arch_ret_to_user r1, lr | 76 | arch_ret_to_user r1, lr |
76 | 77 | ||
77 | restore_user_regs fast = 0, offset = 0 | 78 | restore_user_regs fast = 0, offset = 0 |
79 | ENDPROC(ret_to_user_from_irq) | ||
78 | ENDPROC(ret_to_user) | 80 | ENDPROC(ret_to_user) |
79 | 81 | ||
80 | /* | 82 | /* |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index d52eec268b47..6807cb1e76dd 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -139,7 +139,7 @@ static void dump_instr(const char *lvl, struct pt_regs *regs) | |||
139 | fs = get_fs(); | 139 | fs = get_fs(); |
140 | set_fs(KERNEL_DS); | 140 | set_fs(KERNEL_DS); |
141 | 141 | ||
142 | for (i = -4; i < 1; i++) { | 142 | for (i = -4; i < 1 + !!thumb; i++) { |
143 | unsigned int val, bad; | 143 | unsigned int val, bad; |
144 | 144 | ||
145 | if (thumb) | 145 | if (thumb) |
@@ -563,7 +563,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) | |||
563 | if (!pmd_present(*pmd)) | 563 | if (!pmd_present(*pmd)) |
564 | goto bad_access; | 564 | goto bad_access; |
565 | pte = pte_offset_map_lock(mm, pmd, addr, &ptl); | 565 | pte = pte_offset_map_lock(mm, pmd, addr, &ptl); |
566 | if (!pte_present(*pte) || !pte_dirty(*pte)) { | 566 | if (!pte_present(*pte) || !pte_write(*pte) || !pte_dirty(*pte)) { |
567 | pte_unmap_unlock(pte, ptl); | 567 | pte_unmap_unlock(pte, ptl); |
568 | goto bad_access; | 568 | goto bad_access; |
569 | } | 569 | } |
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index 4e66881c7aee..fc4e98ea7543 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -494,7 +494,7 @@ static struct platform_device da850_mcasp_device = { | |||
494 | .resource = da850_mcasp_resources, | 494 | .resource = da850_mcasp_resources, |
495 | }; | 495 | }; |
496 | 496 | ||
497 | struct platform_device davinci_pcm_device = { | 497 | static struct platform_device davinci_pcm_device = { |
498 | .name = "davinci-pcm-audio", | 498 | .name = "davinci-pcm-audio", |
499 | .id = -1, | 499 | .id = -1, |
500 | }; | 500 | }; |
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c index 8f4f736aa267..806a2f02b980 100644 --- a/arch/arm/mach-davinci/devices.c +++ b/arch/arm/mach-davinci/devices.c | |||
@@ -298,7 +298,7 @@ static void davinci_init_wdt(void) | |||
298 | 298 | ||
299 | /*-------------------------------------------------------------------------*/ | 299 | /*-------------------------------------------------------------------------*/ |
300 | 300 | ||
301 | struct platform_device davinci_pcm_device = { | 301 | static struct platform_device davinci_pcm_device = { |
302 | .name = "davinci-pcm-audio", | 302 | .name = "davinci-pcm-audio", |
303 | .id = -1, | 303 | .id = -1, |
304 | }; | 304 | }; |
diff --git a/arch/arm/mach-davinci/gpio.c b/arch/arm/mach-davinci/gpio.c index a0b838894ac9..e7221398e5af 100644 --- a/arch/arm/mach-davinci/gpio.c +++ b/arch/arm/mach-davinci/gpio.c | |||
@@ -252,9 +252,11 @@ static struct irq_chip gpio_irqchip = { | |||
252 | static void | 252 | static void |
253 | gpio_irq_handler(unsigned irq, struct irq_desc *desc) | 253 | gpio_irq_handler(unsigned irq, struct irq_desc *desc) |
254 | { | 254 | { |
255 | struct davinci_gpio_regs __iomem *g = irq2regs(irq); | 255 | struct davinci_gpio_regs __iomem *g; |
256 | u32 mask = 0xffff; | 256 | u32 mask = 0xffff; |
257 | 257 | ||
258 | g = (__force struct davinci_gpio_regs __iomem *) irq_desc_get_handler_data(desc); | ||
259 | |||
258 | /* we only care about one bank */ | 260 | /* we only care about one bank */ |
259 | if (irq & 1) | 261 | if (irq & 1) |
260 | mask <<= 16; | 262 | mask <<= 16; |
@@ -422,8 +424,7 @@ static int __init davinci_gpio_irq_setup(void) | |||
422 | 424 | ||
423 | /* set up all irqs in this bank */ | 425 | /* set up all irqs in this bank */ |
424 | irq_set_chained_handler(bank_irq, gpio_irq_handler); | 426 | irq_set_chained_handler(bank_irq, gpio_irq_handler); |
425 | irq_set_chip_data(bank_irq, (__force void *)g); | 427 | irq_set_handler_data(bank_irq, (__force void *)g); |
426 | irq_set_handler_data(bank_irq, (void *)irq); | ||
427 | 428 | ||
428 | for (i = 0; i < 16 && gpio < ngpio; i++, irq++, gpio++) { | 429 | for (i = 0; i < 16 && gpio < ngpio; i++, irq++, gpio++) { |
429 | irq_set_chip(irq, &gpio_irqchip); | 430 | irq_set_chip(irq, &gpio_irqchip); |
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 82079545adc4..1d4b65fd673e 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -402,11 +402,15 @@ static struct resource ep93xx_eth_resource[] = { | |||
402 | } | 402 | } |
403 | }; | 403 | }; |
404 | 404 | ||
405 | static u64 ep93xx_eth_dma_mask = DMA_BIT_MASK(32); | ||
406 | |||
405 | static struct platform_device ep93xx_eth_device = { | 407 | static struct platform_device ep93xx_eth_device = { |
406 | .name = "ep93xx-eth", | 408 | .name = "ep93xx-eth", |
407 | .id = -1, | 409 | .id = -1, |
408 | .dev = { | 410 | .dev = { |
409 | .platform_data = &ep93xx_eth_data, | 411 | .platform_data = &ep93xx_eth_data, |
412 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
413 | .dma_mask = &ep93xx_eth_dma_mask, | ||
410 | }, | 414 | }, |
411 | .num_resources = ARRAY_SIZE(ep93xx_eth_resource), | 415 | .num_resources = ARRAY_SIZE(ep93xx_eth_resource), |
412 | .resource = ep93xx_eth_resource, | 416 | .resource = ep93xx_eth_resource, |
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index b92c1e557145..1435fc31c4b2 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig | |||
@@ -91,6 +91,11 @@ config EXYNOS4_SETUP_FIMC | |||
91 | help | 91 | help |
92 | Common setup code for the camera interfaces. | 92 | Common setup code for the camera interfaces. |
93 | 93 | ||
94 | config EXYNOS4_SETUP_USB_PHY | ||
95 | bool | ||
96 | help | ||
97 | Common setup code for USB PHY controller | ||
98 | |||
94 | # machine support | 99 | # machine support |
95 | 100 | ||
96 | menu "EXYNOS4 Machines" | 101 | menu "EXYNOS4 Machines" |
@@ -176,6 +181,7 @@ config MACH_NURI | |||
176 | select EXYNOS4_SETUP_I2C3 | 181 | select EXYNOS4_SETUP_I2C3 |
177 | select EXYNOS4_SETUP_I2C5 | 182 | select EXYNOS4_SETUP_I2C5 |
178 | select EXYNOS4_SETUP_SDHCI | 183 | select EXYNOS4_SETUP_SDHCI |
184 | select EXYNOS4_SETUP_USB_PHY | ||
179 | select SAMSUNG_DEV_PWM | 185 | select SAMSUNG_DEV_PWM |
180 | help | 186 | help |
181 | Machine support for Samsung Mobile NURI Board. | 187 | Machine support for Samsung Mobile NURI Board. |
diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile index a9bb94fabaa7..60fe5ecf3599 100644 --- a/arch/arm/mach-exynos4/Makefile +++ b/arch/arm/mach-exynos4/Makefile | |||
@@ -56,4 +56,4 @@ obj-$(CONFIG_EXYNOS4_SETUP_KEYPAD) += setup-keypad.o | |||
56 | obj-$(CONFIG_EXYNOS4_SETUP_SDHCI) += setup-sdhci.o | 56 | obj-$(CONFIG_EXYNOS4_SETUP_SDHCI) += setup-sdhci.o |
57 | obj-$(CONFIG_EXYNOS4_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o | 57 | obj-$(CONFIG_EXYNOS4_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o |
58 | 58 | ||
59 | obj-$(CONFIG_USB_SUPPORT) += usb-phy.o | 59 | obj-$(CONFIG_EXYNOS4_SETUP_USB_PHY) += setup-usb-phy.o |
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c index 08813a6f66b1..9babe4473e88 100644 --- a/arch/arm/mach-exynos4/cpu.c +++ b/arch/arm/mach-exynos4/cpu.c | |||
@@ -98,7 +98,7 @@ static struct map_desc exynos4_iodesc[] __initdata = { | |||
98 | .length = SZ_4K, | 98 | .length = SZ_4K, |
99 | .type = MT_DEVICE, | 99 | .type = MT_DEVICE, |
100 | }, { | 100 | }, { |
101 | .virtual = (unsigned long)S5P_VA_USB_HSPHY, | 101 | .virtual = (unsigned long)S3C_VA_USB_HSPHY, |
102 | .pfn = __phys_to_pfn(EXYNOS4_PA_HSPHY), | 102 | .pfn = __phys_to_pfn(EXYNOS4_PA_HSPHY), |
103 | .length = SZ_4K, | 103 | .length = SZ_4K, |
104 | .type = MT_DEVICE, | 104 | .type = MT_DEVICE, |
diff --git a/arch/arm/mach-exynos4/include/mach/regs-usb-phy.h b/arch/arm/mach-exynos4/include/mach/regs-usb-phy.h index 703118d5173c..c337cf3a71bf 100644 --- a/arch/arm/mach-exynos4/include/mach/regs-usb-phy.h +++ b/arch/arm/mach-exynos4/include/mach/regs-usb-phy.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef __PLAT_S5P_REGS_USB_PHY_H | 11 | #ifndef __PLAT_S5P_REGS_USB_PHY_H |
12 | #define __PLAT_S5P_REGS_USB_PHY_H | 12 | #define __PLAT_S5P_REGS_USB_PHY_H |
13 | 13 | ||
14 | #define EXYNOS4_HSOTG_PHYREG(x) ((x) + S5P_VA_USB_HSPHY) | 14 | #define EXYNOS4_HSOTG_PHYREG(x) ((x) + S3C_VA_USB_HSPHY) |
15 | 15 | ||
16 | #define EXYNOS4_PHYPWR EXYNOS4_HSOTG_PHYREG(0x00) | 16 | #define EXYNOS4_PHYPWR EXYNOS4_HSOTG_PHYREG(0x00) |
17 | #define PHY1_HSIC_NORMAL_MASK (0xf << 9) | 17 | #define PHY1_HSIC_NORMAL_MASK (0xf << 9) |
diff --git a/arch/arm/mach-exynos4/usb-phy.c b/arch/arm/mach-exynos4/setup-usb-phy.c index 0883c1b824b9..0883c1b824b9 100644 --- a/arch/arm/mach-exynos4/usb-phy.c +++ b/arch/arm/mach-exynos4/setup-usb-phy.c | |||
diff --git a/arch/arm/mach-exynos4/time.c b/arch/arm/mach-exynos4/time.c index 86b9fa0d3639..ebb8f38d5405 100644 --- a/arch/arm/mach-exynos4/time.c +++ b/arch/arm/mach-exynos4/time.c | |||
@@ -206,6 +206,7 @@ static cycle_t exynos4_pwm4_read(struct clocksource *cs) | |||
206 | return (cycle_t) ~__raw_readl(S3C_TIMERREG(0x40)); | 206 | return (cycle_t) ~__raw_readl(S3C_TIMERREG(0x40)); |
207 | } | 207 | } |
208 | 208 | ||
209 | #ifdef CONFIG_PM | ||
209 | static void exynos4_pwm4_resume(struct clocksource *cs) | 210 | static void exynos4_pwm4_resume(struct clocksource *cs) |
210 | { | 211 | { |
211 | unsigned long pclk; | 212 | unsigned long pclk; |
@@ -218,6 +219,7 @@ static void exynos4_pwm4_resume(struct clocksource *cs) | |||
218 | exynos4_pwm_init(4, ~0); | 219 | exynos4_pwm_init(4, ~0); |
219 | exynos4_pwm_start(4, 1); | 220 | exynos4_pwm_start(4, 1); |
220 | } | 221 | } |
222 | #endif | ||
221 | 223 | ||
222 | struct clocksource pwm_clocksource = { | 224 | struct clocksource pwm_clocksource = { |
223 | .name = "pwm_timer4", | 225 | .name = "pwm_timer4", |
diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c index 5f1f9867fc70..121ad1d4fa39 100644 --- a/arch/arm/mach-footbridge/dc21285-timer.c +++ b/arch/arm/mach-footbridge/dc21285-timer.c | |||
@@ -103,6 +103,7 @@ static void __init footbridge_timer_init(void) | |||
103 | clockevents_calc_mult_shift(ce, mem_fclk_21285, 5); | 103 | clockevents_calc_mult_shift(ce, mem_fclk_21285, 5); |
104 | ce->max_delta_ns = clockevent_delta2ns(0xffffff, ce); | 104 | ce->max_delta_ns = clockevent_delta2ns(0xffffff, ce); |
105 | ce->min_delta_ns = clockevent_delta2ns(0x000004, ce); | 105 | ce->min_delta_ns = clockevent_delta2ns(0x000004, ce); |
106 | ce->cpumask = cpumask_of(smp_processor_id()); | ||
106 | 107 | ||
107 | clockevents_register_device(ce); | 108 | clockevents_register_device(ce); |
108 | } | 109 | } |
diff --git a/arch/arm/mach-footbridge/include/mach/debug-macro.S b/arch/arm/mach-footbridge/include/mach/debug-macro.S index 30b971d65815..1be2eeb7a0a0 100644 --- a/arch/arm/mach-footbridge/include/mach/debug-macro.S +++ b/arch/arm/mach-footbridge/include/mach/debug-macro.S | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/hardware/debug-8250.S> | 26 | #include <asm/hardware/debug-8250.S> |
27 | 27 | ||
28 | #else | 28 | #else |
29 | #include <mach/hardware.h> | ||
29 | /* For EBSA285 debugging */ | 30 | /* For EBSA285 debugging */ |
30 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 | 31 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 |
31 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff | 32 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff |
@@ -36,8 +37,8 @@ | |||
36 | .else | 37 | .else |
37 | mov \rp, #0 | 38 | mov \rp, #0 |
38 | .endif | 39 | .endif |
39 | orr \rv, \rp, #0x42000000 | 40 | orr \rv, \rp, #dc21285_high |
40 | orr \rp, \rp, #dc21285_high | 41 | orr \rp, \rp, #0x42000000 |
41 | .endm | 42 | .endm |
42 | 43 | ||
43 | .macro senduart,rd,rx | 44 | .macro senduart,rd,rx |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 59c97a331136..e8dd22fa7d61 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -167,6 +167,7 @@ config MACH_EUKREA_MBIMXSD25_BASEBOARD | |||
167 | bool "Eukrea MBIMXSD development board" | 167 | bool "Eukrea MBIMXSD development board" |
168 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 168 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
169 | select IMX_HAVE_PLATFORM_IMX_SSI | 169 | select IMX_HAVE_PLATFORM_IMX_SSI |
170 | select LEDS_GPIO_REGISTER | ||
170 | help | 171 | help |
171 | This adds board specific devices that can be found on Eukrea's | 172 | This adds board specific devices that can be found on Eukrea's |
172 | MBIMXSD evaluation board. | 173 | MBIMXSD evaluation board. |
@@ -265,6 +266,7 @@ config MACH_EUKREA_MBIMX27_BASEBOARD | |||
265 | select IMX_HAVE_PLATFORM_IMX_UART | 266 | select IMX_HAVE_PLATFORM_IMX_UART |
266 | select IMX_HAVE_PLATFORM_MXC_MMC | 267 | select IMX_HAVE_PLATFORM_MXC_MMC |
267 | select IMX_HAVE_PLATFORM_SPI_IMX | 268 | select IMX_HAVE_PLATFORM_SPI_IMX |
269 | select LEDS_GPIO_REGISTER | ||
268 | help | 270 | help |
269 | This adds board specific devices that can be found on Eukrea's | 271 | This adds board specific devices that can be found on Eukrea's |
270 | MBIMX27 evaluation board. | 272 | MBIMX27 evaluation board. |
@@ -403,6 +405,7 @@ config MACH_MX31LITE | |||
403 | select IMX_HAVE_PLATFORM_MXC_NAND | 405 | select IMX_HAVE_PLATFORM_MXC_NAND |
404 | select IMX_HAVE_PLATFORM_MXC_RTC | 406 | select IMX_HAVE_PLATFORM_MXC_RTC |
405 | select IMX_HAVE_PLATFORM_SPI_IMX | 407 | select IMX_HAVE_PLATFORM_SPI_IMX |
408 | select LEDS_GPIO_REGISTER | ||
406 | help | 409 | help |
407 | Include support for MX31 LITEKIT platform. This includes specific | 410 | Include support for MX31 LITEKIT platform. This includes specific |
408 | configurations for the board and its peripherals. | 411 | configurations for the board and its peripherals. |
@@ -471,6 +474,7 @@ config MACH_MX31MOBOARD | |||
471 | select IMX_HAVE_PLATFORM_MXC_EHCI | 474 | select IMX_HAVE_PLATFORM_MXC_EHCI |
472 | select IMX_HAVE_PLATFORM_MXC_MMC | 475 | select IMX_HAVE_PLATFORM_MXC_MMC |
473 | select IMX_HAVE_PLATFORM_SPI_IMX | 476 | select IMX_HAVE_PLATFORM_SPI_IMX |
477 | select LEDS_GPIO_REGISTER | ||
474 | select MXC_ULPI if USB_ULPI | 478 | select MXC_ULPI if USB_ULPI |
475 | help | 479 | help |
476 | Include support for mx31moboard platform. This includes specific | 480 | Include support for mx31moboard platform. This includes specific |
@@ -577,6 +581,7 @@ config MACH_EUKREA_MBIMXSD35_BASEBOARD | |||
577 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 581 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
578 | select IMX_HAVE_PLATFORM_IMX_SSI | 582 | select IMX_HAVE_PLATFORM_IMX_SSI |
579 | select IMX_HAVE_PLATFORM_IPU_CORE | 583 | select IMX_HAVE_PLATFORM_IPU_CORE |
584 | select LEDS_GPIO_REGISTER | ||
580 | help | 585 | help |
581 | This adds board specific devices that can be found on Eukrea's | 586 | This adds board specific devices that can be found on Eukrea's |
582 | MBIMXSD evaluation board. | 587 | MBIMXSD evaluation board. |
diff --git a/arch/arm/mach-imx/dma-v1.c b/arch/arm/mach-imx/dma-v1.c index 236f1495efad..4d76f67f270f 100644 --- a/arch/arm/mach-imx/dma-v1.c +++ b/arch/arm/mach-imx/dma-v1.c | |||
@@ -475,7 +475,6 @@ void imx_dma_enable(int channel) | |||
475 | imx_dmav1_writel(imx_dmav1_readl(DMA_CCR(channel)) | CCR_CEN | | 475 | imx_dmav1_writel(imx_dmav1_readl(DMA_CCR(channel)) | CCR_CEN | |
476 | CCR_ACRPT, DMA_CCR(channel)); | 476 | CCR_ACRPT, DMA_CCR(channel)); |
477 | 477 | ||
478 | #ifdef CONFIG_ARCH_MX2 | ||
479 | if ((cpu_is_mx21() || cpu_is_mx27()) && | 478 | if ((cpu_is_mx21() || cpu_is_mx27()) && |
480 | imxdma->sg && imx_dma_hw_chain(imxdma)) { | 479 | imxdma->sg && imx_dma_hw_chain(imxdma)) { |
481 | imxdma->sg = sg_next(imxdma->sg); | 480 | imxdma->sg = sg_next(imxdma->sg); |
@@ -487,7 +486,6 @@ void imx_dma_enable(int channel) | |||
487 | DMA_CCR(channel)); | 486 | DMA_CCR(channel)); |
488 | } | 487 | } |
489 | } | 488 | } |
490 | #endif | ||
491 | imxdma->in_use = 1; | 489 | imxdma->in_use = 1; |
492 | 490 | ||
493 | local_irq_restore(flags); | 491 | local_irq_restore(flags); |
@@ -518,7 +516,6 @@ void imx_dma_disable(int channel) | |||
518 | } | 516 | } |
519 | EXPORT_SYMBOL(imx_dma_disable); | 517 | EXPORT_SYMBOL(imx_dma_disable); |
520 | 518 | ||
521 | #ifdef CONFIG_ARCH_MX2 | ||
522 | static void imx_dma_watchdog(unsigned long chno) | 519 | static void imx_dma_watchdog(unsigned long chno) |
523 | { | 520 | { |
524 | struct imx_dma_channel *imxdma = &imx_dma_channels[chno]; | 521 | struct imx_dma_channel *imxdma = &imx_dma_channels[chno]; |
@@ -530,7 +527,6 @@ static void imx_dma_watchdog(unsigned long chno) | |||
530 | if (imxdma->err_handler) | 527 | if (imxdma->err_handler) |
531 | imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT); | 528 | imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT); |
532 | } | 529 | } |
533 | #endif | ||
534 | 530 | ||
535 | static irqreturn_t dma_err_handler(int irq, void *dev_id) | 531 | static irqreturn_t dma_err_handler(int irq, void *dev_id) |
536 | { | 532 | { |
@@ -654,10 +650,8 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id) | |||
654 | { | 650 | { |
655 | int i, disr; | 651 | int i, disr; |
656 | 652 | ||
657 | #ifdef CONFIG_ARCH_MX2 | ||
658 | if (cpu_is_mx21() || cpu_is_mx27()) | 653 | if (cpu_is_mx21() || cpu_is_mx27()) |
659 | dma_err_handler(irq, dev_id); | 654 | dma_err_handler(irq, dev_id); |
660 | #endif | ||
661 | 655 | ||
662 | disr = imx_dmav1_readl(DMA_DISR); | 656 | disr = imx_dmav1_readl(DMA_DISR); |
663 | 657 | ||
@@ -703,7 +697,6 @@ int imx_dma_request(int channel, const char *name) | |||
703 | imxdma->name = name; | 697 | imxdma->name = name; |
704 | local_irq_restore(flags); /* request_irq() can block */ | 698 | local_irq_restore(flags); /* request_irq() can block */ |
705 | 699 | ||
706 | #ifdef CONFIG_ARCH_MX2 | ||
707 | if (cpu_is_mx21() || cpu_is_mx27()) { | 700 | if (cpu_is_mx21() || cpu_is_mx27()) { |
708 | ret = request_irq(MX2x_INT_DMACH0 + channel, | 701 | ret = request_irq(MX2x_INT_DMACH0 + channel, |
709 | dma_irq_handler, 0, "DMA", NULL); | 702 | dma_irq_handler, 0, "DMA", NULL); |
@@ -717,7 +710,6 @@ int imx_dma_request(int channel, const char *name) | |||
717 | imxdma->watchdog.function = &imx_dma_watchdog; | 710 | imxdma->watchdog.function = &imx_dma_watchdog; |
718 | imxdma->watchdog.data = channel; | 711 | imxdma->watchdog.data = channel; |
719 | } | 712 | } |
720 | #endif | ||
721 | 713 | ||
722 | return ret; | 714 | return ret; |
723 | } | 715 | } |
@@ -744,10 +736,8 @@ void imx_dma_free(int channel) | |||
744 | imx_dma_disable(channel); | 736 | imx_dma_disable(channel); |
745 | imxdma->name = NULL; | 737 | imxdma->name = NULL; |
746 | 738 | ||
747 | #ifdef CONFIG_ARCH_MX2 | ||
748 | if (cpu_is_mx21() || cpu_is_mx27()) | 739 | if (cpu_is_mx21() || cpu_is_mx27()) |
749 | free_irq(MX2x_INT_DMACH0 + channel, NULL); | 740 | free_irq(MX2x_INT_DMACH0 + channel, NULL); |
750 | #endif | ||
751 | 741 | ||
752 | local_irq_restore(flags); | 742 | local_irq_restore(flags); |
753 | } | 743 | } |
@@ -803,21 +793,13 @@ static int __init imx_dma_init(void) | |||
803 | int ret = 0; | 793 | int ret = 0; |
804 | int i; | 794 | int i; |
805 | 795 | ||
806 | #ifdef CONFIG_ARCH_MX1 | ||
807 | if (cpu_is_mx1()) | 796 | if (cpu_is_mx1()) |
808 | imx_dmav1_baseaddr = MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR); | 797 | imx_dmav1_baseaddr = MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR); |
809 | else | 798 | else if (cpu_is_mx21()) |
810 | #endif | ||
811 | #ifdef CONFIG_MACH_MX21 | ||
812 | if (cpu_is_mx21()) | ||
813 | imx_dmav1_baseaddr = MX21_IO_ADDRESS(MX21_DMA_BASE_ADDR); | 799 | imx_dmav1_baseaddr = MX21_IO_ADDRESS(MX21_DMA_BASE_ADDR); |
814 | else | 800 | else if (cpu_is_mx27()) |
815 | #endif | ||
816 | #ifdef CONFIG_MACH_MX27 | ||
817 | if (cpu_is_mx27()) | ||
818 | imx_dmav1_baseaddr = MX27_IO_ADDRESS(MX27_DMA_BASE_ADDR); | 801 | imx_dmav1_baseaddr = MX27_IO_ADDRESS(MX27_DMA_BASE_ADDR); |
819 | else | 802 | else |
820 | #endif | ||
821 | return 0; | 803 | return 0; |
822 | 804 | ||
823 | dma_clk = clk_get(NULL, "dma"); | 805 | dma_clk = clk_get(NULL, "dma"); |
@@ -828,7 +810,6 @@ static int __init imx_dma_init(void) | |||
828 | /* reset DMA module */ | 810 | /* reset DMA module */ |
829 | imx_dmav1_writel(DCR_DRST, DMA_DCR); | 811 | imx_dmav1_writel(DCR_DRST, DMA_DCR); |
830 | 812 | ||
831 | #ifdef CONFIG_ARCH_MX1 | ||
832 | if (cpu_is_mx1()) { | 813 | if (cpu_is_mx1()) { |
833 | ret = request_irq(MX1_DMA_INT, dma_irq_handler, 0, "DMA", NULL); | 814 | ret = request_irq(MX1_DMA_INT, dma_irq_handler, 0, "DMA", NULL); |
834 | if (ret) { | 815 | if (ret) { |
@@ -843,7 +824,7 @@ static int __init imx_dma_init(void) | |||
843 | return ret; | 824 | return ret; |
844 | } | 825 | } |
845 | } | 826 | } |
846 | #endif | 827 | |
847 | /* enable DMA module */ | 828 | /* enable DMA module */ |
848 | imx_dmav1_writel(DCR_DEN, DMA_DCR); | 829 | imx_dmav1_writel(DCR_DEN, DMA_DCR); |
849 | 830 | ||
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c index 5911281da5f5..5db3e1463af7 100644 --- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c | |||
@@ -112,7 +112,7 @@ eukrea_mbimx27_keymap_data __initconst = { | |||
112 | .keymap_size = ARRAY_SIZE(eukrea_mbimx27_keymap), | 112 | .keymap_size = ARRAY_SIZE(eukrea_mbimx27_keymap), |
113 | }; | 113 | }; |
114 | 114 | ||
115 | static struct gpio_led gpio_leds[] = { | 115 | static const struct gpio_led eukrea_mbimx27_gpio_leds[] __initconst = { |
116 | { | 116 | { |
117 | .name = "led1", | 117 | .name = "led1", |
118 | .default_trigger = "heartbeat", | 118 | .default_trigger = "heartbeat", |
@@ -127,17 +127,10 @@ static struct gpio_led gpio_leds[] = { | |||
127 | }, | 127 | }, |
128 | }; | 128 | }; |
129 | 129 | ||
130 | static struct gpio_led_platform_data gpio_led_info = { | 130 | static const struct gpio_led_platform_data |
131 | .leds = gpio_leds, | 131 | eukrea_mbimx27_gpio_led_info __initconst = { |
132 | .num_leds = ARRAY_SIZE(gpio_leds), | 132 | .leds = eukrea_mbimx27_gpio_leds, |
133 | }; | 133 | .num_leds = ARRAY_SIZE(eukrea_mbimx27_gpio_leds), |
134 | |||
135 | static struct platform_device leds_gpio = { | ||
136 | .name = "leds-gpio", | ||
137 | .id = -1, | ||
138 | .dev = { | ||
139 | .platform_data = &gpio_led_info, | ||
140 | }, | ||
141 | }; | 134 | }; |
142 | 135 | ||
143 | static struct imx_fb_videomode eukrea_mbimx27_modes[] = { | 136 | static struct imx_fb_videomode eukrea_mbimx27_modes[] = { |
@@ -293,10 +286,6 @@ static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = { | |||
293 | }, | 286 | }, |
294 | }; | 287 | }; |
295 | 288 | ||
296 | static struct platform_device *platform_devices[] __initdata = { | ||
297 | &leds_gpio, | ||
298 | }; | ||
299 | |||
300 | static const struct imxmmc_platform_data sdhc_pdata __initconst = { | 289 | static const struct imxmmc_platform_data sdhc_pdata __initconst = { |
301 | .dat3_card_detect = 1, | 290 | .dat3_card_detect = 1, |
302 | }; | 291 | }; |
@@ -377,5 +366,5 @@ void __init eukrea_mbimx27_baseboard_init(void) | |||
377 | 366 | ||
378 | imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data); | 367 | imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data); |
379 | 368 | ||
380 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 369 | gpio_led_register_device(-1, &eukrea_mbimx27_gpio_led_info); |
381 | } | 370 | } |
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c index f9ef04acdab1..01ebcb31e482 100644 --- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c | |||
@@ -173,7 +173,7 @@ static struct platform_device eukrea_mbimxsd_lcd_powerdev = { | |||
173 | .dev.platform_data = &eukrea_mbimxsd_lcd_power_data, | 173 | .dev.platform_data = &eukrea_mbimxsd_lcd_power_data, |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static struct gpio_led eukrea_mbimxsd_leds[] = { | 176 | static const struct gpio_led eukrea_mbimxsd_leds[] __initconst = { |
177 | { | 177 | { |
178 | .name = "led1", | 178 | .name = "led1", |
179 | .default_trigger = "heartbeat", | 179 | .default_trigger = "heartbeat", |
@@ -182,19 +182,12 @@ static struct gpio_led eukrea_mbimxsd_leds[] = { | |||
182 | }, | 182 | }, |
183 | }; | 183 | }; |
184 | 184 | ||
185 | static struct gpio_led_platform_data eukrea_mbimxsd_led_info = { | 185 | static const struct gpio_led_platform_data |
186 | eukrea_mbimxsd_led_info __initconst = { | ||
186 | .leds = eukrea_mbimxsd_leds, | 187 | .leds = eukrea_mbimxsd_leds, |
187 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), | 188 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), |
188 | }; | 189 | }; |
189 | 190 | ||
190 | static struct platform_device eukrea_mbimxsd_leds_gpio = { | ||
191 | .name = "leds-gpio", | ||
192 | .id = -1, | ||
193 | .dev = { | ||
194 | .platform_data = &eukrea_mbimxsd_led_info, | ||
195 | }, | ||
196 | }; | ||
197 | |||
198 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { | 191 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { |
199 | { | 192 | { |
200 | .gpio = GPIO_SWITCH1, | 193 | .gpio = GPIO_SWITCH1, |
@@ -212,7 +205,6 @@ static const struct gpio_keys_platform_data | |||
212 | }; | 205 | }; |
213 | 206 | ||
214 | static struct platform_device *platform_devices[] __initdata = { | 207 | static struct platform_device *platform_devices[] __initdata = { |
215 | &eukrea_mbimxsd_leds_gpio, | ||
216 | &eukrea_mbimxsd_lcd_powerdev, | 208 | &eukrea_mbimxsd_lcd_powerdev, |
217 | }; | 209 | }; |
218 | 210 | ||
@@ -287,5 +279,6 @@ void __init eukrea_mbimxsd25_baseboard_init(void) | |||
287 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | 279 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); |
288 | 280 | ||
289 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 281 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
282 | gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); | ||
290 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); | 283 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); |
291 | } | 284 | } |
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c index 4909ea05855a..558eb526ba56 100644 --- a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c | |||
@@ -193,19 +193,12 @@ static struct gpio_led eukrea_mbimxsd_leds[] = { | |||
193 | }, | 193 | }, |
194 | }; | 194 | }; |
195 | 195 | ||
196 | static struct gpio_led_platform_data eukrea_mbimxsd_led_info = { | 196 | static const struct gpio_led_platform_data |
197 | eukrea_mbimxsd_led_info __initconst = { | ||
197 | .leds = eukrea_mbimxsd_leds, | 198 | .leds = eukrea_mbimxsd_leds, |
198 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), | 199 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), |
199 | }; | 200 | }; |
200 | 201 | ||
201 | static struct platform_device eukrea_mbimxsd_leds_gpio = { | ||
202 | .name = "leds-gpio", | ||
203 | .id = -1, | ||
204 | .dev = { | ||
205 | .platform_data = &eukrea_mbimxsd_led_info, | ||
206 | }, | ||
207 | }; | ||
208 | |||
209 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { | 202 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { |
210 | { | 203 | { |
211 | .gpio = GPIO_SWITCH1, | 204 | .gpio = GPIO_SWITCH1, |
@@ -223,7 +216,6 @@ static const struct gpio_keys_platform_data | |||
223 | }; | 216 | }; |
224 | 217 | ||
225 | static struct platform_device *platform_devices[] __initdata = { | 218 | static struct platform_device *platform_devices[] __initdata = { |
226 | &eukrea_mbimxsd_leds_gpio, | ||
227 | &eukrea_mbimxsd_lcd_powerdev, | 219 | &eukrea_mbimxsd_lcd_powerdev, |
228 | }; | 220 | }; |
229 | 221 | ||
@@ -299,5 +291,6 @@ void __init eukrea_mbimxsd35_baseboard_init(void) | |||
299 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | 291 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); |
300 | 292 | ||
301 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 293 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
294 | gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); | ||
302 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); | 295 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); |
303 | } | 296 | } |
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c index 59d2a3b137d9..a404c89485ca 100644 --- a/arch/arm/mach-imx/mach-apf9328.c +++ b/arch/arm/mach-imx/mach-apf9328.c | |||
@@ -99,11 +99,6 @@ static struct platform_device dm9000x_device = { | |||
99 | } | 99 | } |
100 | }; | 100 | }; |
101 | 101 | ||
102 | /* --- SERIAL RESSOURCE --- */ | ||
103 | static const struct imxuart_platform_data uart0_pdata __initconst = { | ||
104 | .flags = 0, | ||
105 | }; | ||
106 | |||
107 | static const struct imxuart_platform_data uart1_pdata __initconst = { | 102 | static const struct imxuart_platform_data uart1_pdata __initconst = { |
108 | .flags = IMXUART_HAVE_RTSCTS, | 103 | .flags = IMXUART_HAVE_RTSCTS, |
109 | }; | 104 | }; |
@@ -121,7 +116,7 @@ static void __init apf9328_init(void) | |||
121 | ARRAY_SIZE(apf9328_pins), | 116 | ARRAY_SIZE(apf9328_pins), |
122 | "APF9328"); | 117 | "APF9328"); |
123 | 118 | ||
124 | imx1_add_imx_uart0(&uart0_pdata); | 119 | imx1_add_imx_uart0(NULL); |
125 | imx1_add_imx_uart1(&uart1_pdata); | 120 | imx1_add_imx_uart1(&uart1_pdata); |
126 | 121 | ||
127 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 122 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index c6269d60ddbc..6707de0ab716 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
35 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
36 | #include <mach/common.h> | 36 | #include <mach/common.h> |
37 | #include <mach/iomux.h> | 37 | #include <mach/iomux-mx27.h> |
38 | 38 | ||
39 | #include "devices-imx27.h" | 39 | #include "devices-imx27.h" |
40 | 40 | ||
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index 117ce0a50f4e..b31d4129e10e 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -42,10 +42,12 @@ | |||
42 | 42 | ||
43 | #include "devices-imx27.h" | 43 | #include "devices-imx27.h" |
44 | 44 | ||
45 | #define SD1_EN_GPIO (GPIO_PORTB + 25) | 45 | #define SD1_EN_GPIO IMX_GPIO_NR(2, 25) |
46 | #define OTG_PHY_RESET_GPIO (GPIO_PORTB + 23) | 46 | #define OTG_PHY_RESET_GPIO IMX_GPIO_NR(2, 23) |
47 | #define SPI2_SS0 (GPIO_PORTD + 21) | 47 | #define SPI2_SS0 IMX_GPIO_NR(4, 21) |
48 | #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTC + 28) | 48 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(3, 28)) |
49 | #define PMIC_INT IMX_GPIO_NR(3, 14) | ||
50 | #define SD1_CD IMX_GPIO_NR(2, 26) | ||
49 | 51 | ||
50 | static const int mx27pdk_pins[] __initconst = { | 52 | static const int mx27pdk_pins[] __initconst = { |
51 | /* UART1 */ | 53 | /* UART1 */ |
@@ -98,9 +100,12 @@ static const int mx27pdk_pins[] __initconst = { | |||
98 | PD22_PF_CSPI2_SCLK, | 100 | PD22_PF_CSPI2_SCLK, |
99 | PD23_PF_CSPI2_MISO, | 101 | PD23_PF_CSPI2_MISO, |
100 | PD24_PF_CSPI2_MOSI, | 102 | PD24_PF_CSPI2_MOSI, |
103 | SPI2_SS0 | GPIO_GPIO | GPIO_OUT, | ||
101 | /* I2C1 */ | 104 | /* I2C1 */ |
102 | PD17_PF_I2C_DATA, | 105 | PD17_PF_I2C_DATA, |
103 | PD18_PF_I2C_CLK, | 106 | PD18_PF_I2C_CLK, |
107 | /* PMIC INT */ | ||
108 | PMIC_INT | GPIO_GPIO | GPIO_IN, | ||
104 | }; | 109 | }; |
105 | 110 | ||
106 | static const struct imxuart_platform_data uart_pdata __initconst = { | 111 | static const struct imxuart_platform_data uart_pdata __initconst = { |
@@ -131,13 +136,13 @@ static const struct matrix_keymap_data mx27_3ds_keymap_data __initconst = { | |||
131 | static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq, | 136 | static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq, |
132 | void *data) | 137 | void *data) |
133 | { | 138 | { |
134 | return request_irq(IRQ_GPIOB(26), detect_irq, IRQF_TRIGGER_FALLING | | 139 | return request_irq(gpio_to_irq(SD1_CD), detect_irq, |
135 | IRQF_TRIGGER_RISING, "sdhc1-card-detect", data); | 140 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, "sdhc1-card-detect", data); |
136 | } | 141 | } |
137 | 142 | ||
138 | static void mx27_3ds_sdhc1_exit(struct device *dev, void *data) | 143 | static void mx27_3ds_sdhc1_exit(struct device *dev, void *data) |
139 | { | 144 | { |
140 | free_irq(IRQ_GPIOB(26), data); | 145 | free_irq(gpio_to_irq(SD1_CD), data); |
141 | } | 146 | } |
142 | 147 | ||
143 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { | 148 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { |
@@ -193,6 +198,13 @@ static int __init mx27_3ds_otg_mode(char *options) | |||
193 | __setup("otg_mode=", mx27_3ds_otg_mode); | 198 | __setup("otg_mode=", mx27_3ds_otg_mode); |
194 | 199 | ||
195 | /* Regulators */ | 200 | /* Regulators */ |
201 | static struct regulator_init_data gpo_init = { | ||
202 | .constraints = { | ||
203 | .boot_on = 1, | ||
204 | .always_on = 1, | ||
205 | } | ||
206 | }; | ||
207 | |||
196 | static struct regulator_consumer_supply vmmc1_consumers[] = { | 208 | static struct regulator_consumer_supply vmmc1_consumers[] = { |
197 | REGULATOR_SUPPLY("lcd_2v8", NULL), | 209 | REGULATOR_SUPPLY("lcd_2v8", NULL), |
198 | }; | 210 | }; |
@@ -201,7 +213,9 @@ static struct regulator_init_data vmmc1_init = { | |||
201 | .constraints = { | 213 | .constraints = { |
202 | .min_uV = 2800000, | 214 | .min_uV = 2800000, |
203 | .max_uV = 2800000, | 215 | .max_uV = 2800000, |
204 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | 216 | .apply_uV = 1, |
217 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | ||
218 | REGULATOR_CHANGE_STATUS, | ||
205 | }, | 219 | }, |
206 | .num_consumer_supplies = ARRAY_SIZE(vmmc1_consumers), | 220 | .num_consumer_supplies = ARRAY_SIZE(vmmc1_consumers), |
207 | .consumer_supplies = vmmc1_consumers, | 221 | .consumer_supplies = vmmc1_consumers, |
@@ -228,6 +242,12 @@ static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = { | |||
228 | }, { | 242 | }, { |
229 | .id = MC13783_REG_VGEN, | 243 | .id = MC13783_REG_VGEN, |
230 | .init_data = &vgen_init, | 244 | .init_data = &vgen_init, |
245 | }, { | ||
246 | .id = MC13783_REG_GPO1, /* Turn on 1.8V */ | ||
247 | .init_data = &gpo_init, | ||
248 | }, { | ||
249 | .id = MC13783_REG_GPO3, /* Turn on 3.3V */ | ||
250 | .init_data = &gpo_init, | ||
231 | }, | 251 | }, |
232 | }; | 252 | }; |
233 | 253 | ||
@@ -242,11 +262,11 @@ static struct mc13xxx_platform_data mc13783_pdata = { | |||
242 | }; | 262 | }; |
243 | 263 | ||
244 | /* SPI */ | 264 | /* SPI */ |
245 | static int spi2_internal_chipselect[] = {SPI2_SS0}; | 265 | static int spi2_chipselect[] = {SPI2_SS0}; |
246 | 266 | ||
247 | static const struct spi_imx_master spi2_pdata __initconst = { | 267 | static const struct spi_imx_master spi2_pdata __initconst = { |
248 | .chipselect = spi2_internal_chipselect, | 268 | .chipselect = spi2_chipselect, |
249 | .num_chipselect = ARRAY_SIZE(spi2_internal_chipselect), | 269 | .num_chipselect = ARRAY_SIZE(spi2_chipselect), |
250 | }; | 270 | }; |
251 | 271 | ||
252 | static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | 272 | static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { |
@@ -256,7 +276,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | |||
256 | .bus_num = 1, | 276 | .bus_num = 1, |
257 | .chip_select = 0, /* SS0 */ | 277 | .chip_select = 0, /* SS0 */ |
258 | .platform_data = &mc13783_pdata, | 278 | .platform_data = &mc13783_pdata, |
259 | .irq = IRQ_GPIOC(14), | 279 | .irq = gpio_to_irq(PMIC_INT), |
260 | .mode = SPI_CS_HIGH, | 280 | .mode = SPI_CS_HIGH, |
261 | }, | 281 | }, |
262 | }; | 282 | }; |
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index ab2a6268b50b..1446b353af05 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -53,11 +53,8 @@ static int mx31_3ds_pins[] = { | |||
53 | MX31_PIN_RXD1__RXD1, | 53 | MX31_PIN_RXD1__RXD1, |
54 | IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), | 54 | IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), |
55 | /*SPI0*/ | 55 | /*SPI0*/ |
56 | MX31_PIN_CSPI1_SCLK__SCLK, | 56 | IOMUX_MODE(MX31_PIN_DSR_DCE1, IOMUX_CONFIG_ALT1), |
57 | MX31_PIN_CSPI1_MOSI__MOSI, | 57 | IOMUX_MODE(MX31_PIN_RI_DCE1, IOMUX_CONFIG_ALT1), |
58 | MX31_PIN_CSPI1_MISO__MISO, | ||
59 | MX31_PIN_CSPI1_SPI_RDY__SPI_RDY, | ||
60 | MX31_PIN_CSPI1_SS2__SS2, /* CS for LCD */ | ||
61 | /* SPI 1 */ | 58 | /* SPI 1 */ |
62 | MX31_PIN_CSPI2_SCLK__SCLK, | 59 | MX31_PIN_CSPI2_SCLK__SCLK, |
63 | MX31_PIN_CSPI2_MOSI__MOSI, | 60 | MX31_PIN_CSPI2_MOSI__MOSI, |
@@ -691,6 +688,9 @@ static void __init mx31_3ds_init(void) | |||
691 | 688 | ||
692 | imx31_soc_init(); | 689 | imx31_soc_init(); |
693 | 690 | ||
691 | /* Configure SPI1 IOMUX */ | ||
692 | mxc_iomux_set_gpr(MUX_PGP_CSPI_BB, true); | ||
693 | |||
694 | mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins), | 694 | mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins), |
695 | "mx31_3ds"); | 695 | "mx31_3ds"); |
696 | 696 | ||
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index a52fd36e2b52..b358383120e7 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c | |||
@@ -425,7 +425,7 @@ static int __init moboard_usbh2_init(void) | |||
425 | return 0; | 425 | return 0; |
426 | } | 426 | } |
427 | 427 | ||
428 | static struct gpio_led mx31moboard_leds[] = { | 428 | static const struct gpio_led mx31moboard_leds[] __initconst = { |
429 | { | 429 | { |
430 | .name = "coreboard-led-0:red:running", | 430 | .name = "coreboard-led-0:red:running", |
431 | .default_trigger = "heartbeat", | 431 | .default_trigger = "heartbeat", |
@@ -442,26 +442,17 @@ static struct gpio_led mx31moboard_leds[] = { | |||
442 | }, | 442 | }, |
443 | }; | 443 | }; |
444 | 444 | ||
445 | static struct gpio_led_platform_data mx31moboard_led_pdata = { | 445 | static const struct gpio_led_platform_data mx31moboard_led_pdata __initconst = { |
446 | .num_leds = ARRAY_SIZE(mx31moboard_leds), | 446 | .num_leds = ARRAY_SIZE(mx31moboard_leds), |
447 | .leds = mx31moboard_leds, | 447 | .leds = mx31moboard_leds, |
448 | }; | 448 | }; |
449 | 449 | ||
450 | static struct platform_device mx31moboard_leds_device = { | ||
451 | .name = "leds-gpio", | ||
452 | .id = -1, | ||
453 | .dev = { | ||
454 | .platform_data = &mx31moboard_led_pdata, | ||
455 | }, | ||
456 | }; | ||
457 | |||
458 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | 450 | static const struct ipu_platform_data mx3_ipu_data __initconst = { |
459 | .irq_base = MXC_IPU_IRQ_START, | 451 | .irq_base = MXC_IPU_IRQ_START, |
460 | }; | 452 | }; |
461 | 453 | ||
462 | static struct platform_device *devices[] __initdata = { | 454 | static struct platform_device *devices[] __initdata = { |
463 | &mx31moboard_flash, | 455 | &mx31moboard_flash, |
464 | &mx31moboard_leds_device, | ||
465 | }; | 456 | }; |
466 | 457 | ||
467 | static struct mx3_camera_pdata camera_pdata __initdata = { | 458 | static struct mx3_camera_pdata camera_pdata __initdata = { |
@@ -513,6 +504,7 @@ static void __init mx31moboard_init(void) | |||
513 | "moboard"); | 504 | "moboard"); |
514 | 505 | ||
515 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 506 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
507 | gpio_led_register_device(-1, &mx31moboard_led_pdata); | ||
516 | 508 | ||
517 | imx31_add_imx_uart0(&uart0_pdata); | 509 | imx31_add_imx_uart0(&uart0_pdata); |
518 | imx31_add_imx_uart4(&uart4_pdata); | 510 | imx31_add_imx_uart4(&uart4_pdata); |
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index 48b3c6fd5cf0..b3b9bd8ac2a3 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c | |||
@@ -43,7 +43,7 @@ | |||
43 | 43 | ||
44 | #include "devices-imx35.h" | 44 | #include "devices-imx35.h" |
45 | 45 | ||
46 | #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 1) | 46 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 1)) |
47 | 47 | ||
48 | static const struct imxuart_platform_data uart_pdata __initconst = { | 48 | static const struct imxuart_platform_data uart_pdata __initconst = { |
49 | .flags = IMXUART_HAVE_RTSCTS, | 49 | .flags = IMXUART_HAVE_RTSCTS, |
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c index 82805260e19c..db2d60470e15 100644 --- a/arch/arm/mach-imx/mach-scb9328.c +++ b/arch/arm/mach-imx/mach-scb9328.c | |||
@@ -101,21 +101,7 @@ static const int mxc_uart1_pins[] = { | |||
101 | PC12_PF_UART1_RXD, | 101 | PC12_PF_UART1_RXD, |
102 | }; | 102 | }; |
103 | 103 | ||
104 | static int uart1_mxc_init(struct platform_device *pdev) | ||
105 | { | ||
106 | return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, | ||
107 | ARRAY_SIZE(mxc_uart1_pins), "UART1"); | ||
108 | } | ||
109 | |||
110 | static void uart1_mxc_exit(struct platform_device *pdev) | ||
111 | { | ||
112 | mxc_gpio_release_multiple_pins(mxc_uart1_pins, | ||
113 | ARRAY_SIZE(mxc_uart1_pins)); | ||
114 | } | ||
115 | |||
116 | static const struct imxuart_platform_data uart_pdata __initconst = { | 104 | static const struct imxuart_platform_data uart_pdata __initconst = { |
117 | .init = uart1_mxc_init, | ||
118 | .exit = uart1_mxc_exit, | ||
119 | .flags = IMXUART_HAVE_RTSCTS, | 105 | .flags = IMXUART_HAVE_RTSCTS, |
120 | }; | 106 | }; |
121 | 107 | ||
@@ -131,6 +117,9 @@ static void __init scb9328_init(void) | |||
131 | { | 117 | { |
132 | imx1_soc_init(); | 118 | imx1_soc_init(); |
133 | 119 | ||
120 | mxc_gpio_setup_multiple_pins(mxc_uart1_pins, | ||
121 | ARRAY_SIZE(mxc_uart1_pins), "UART1"); | ||
122 | |||
134 | imx1_add_imx_uart0(&uart_pdata); | 123 | imx1_add_imx_uart0(&uart_pdata); |
135 | 124 | ||
136 | printk(KERN_INFO"Scb9328: Adding devices\n"); | 125 | printk(KERN_INFO"Scb9328: Adding devices\n"); |
diff --git a/arch/arm/mach-imx/mx31lite-db.c b/arch/arm/mach-imx/mx31lite-db.c index 5aa053edc17c..bf0fb87946ba 100644 --- a/arch/arm/mach-imx/mx31lite-db.c +++ b/arch/arm/mach-imx/mx31lite-db.c | |||
@@ -161,7 +161,7 @@ static const struct spi_imx_master spi0_pdata __initconst = { | |||
161 | 161 | ||
162 | /* GPIO LEDs */ | 162 | /* GPIO LEDs */ |
163 | 163 | ||
164 | static struct gpio_led litekit_leds[] = { | 164 | static const struct gpio_led litekit_leds[] __initconst = { |
165 | { | 165 | { |
166 | .name = "GPIO0", | 166 | .name = "GPIO0", |
167 | .gpio = IOMUX_TO_GPIO(MX31_PIN_COMPARE), | 167 | .gpio = IOMUX_TO_GPIO(MX31_PIN_COMPARE), |
@@ -176,19 +176,12 @@ static struct gpio_led litekit_leds[] = { | |||
176 | } | 176 | } |
177 | }; | 177 | }; |
178 | 178 | ||
179 | static struct gpio_led_platform_data litekit_led_platform_data = { | 179 | static const struct gpio_led_platform_data |
180 | litekit_led_platform_data __initconst = { | ||
180 | .leds = litekit_leds, | 181 | .leds = litekit_leds, |
181 | .num_leds = ARRAY_SIZE(litekit_leds), | 182 | .num_leds = ARRAY_SIZE(litekit_leds), |
182 | }; | 183 | }; |
183 | 184 | ||
184 | static struct platform_device litekit_led_device = { | ||
185 | .name = "leds-gpio", | ||
186 | .id = -1, | ||
187 | .dev = { | ||
188 | .platform_data = &litekit_led_platform_data, | ||
189 | }, | ||
190 | }; | ||
191 | |||
192 | void __init mx31lite_db_init(void) | 185 | void __init mx31lite_db_init(void) |
193 | { | 186 | { |
194 | mxc_iomux_setup_multiple_pins(litekit_db_board_pins, | 187 | mxc_iomux_setup_multiple_pins(litekit_db_board_pins, |
@@ -197,7 +190,7 @@ void __init mx31lite_db_init(void) | |||
197 | imx31_add_imx_uart0(&uart_pdata); | 190 | imx31_add_imx_uart0(&uart_pdata); |
198 | imx31_add_mxc_mmc(0, &mmc_pdata); | 191 | imx31_add_mxc_mmc(0, &mmc_pdata); |
199 | imx31_add_spi_imx0(&spi0_pdata); | 192 | imx31_add_spi_imx0(&spi0_pdata); |
200 | platform_device_register(&litekit_led_device); | 193 | gpio_led_register_device(-1, &litekit_led_platform_data); |
201 | imx31_add_imx2_wdt(NULL); | 194 | imx31_add_imx2_wdt(NULL); |
202 | imx31_add_mxc_rtc(NULL); | 195 | imx31_add_mxc_rtc(NULL); |
203 | } | 196 | } |
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c index 38b95e949d13..63621f152c98 100644 --- a/arch/arm/mach-msm/timer.c +++ b/arch/arm/mach-msm/timer.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | 24 | ||
25 | #include <asm/mach/time.h> | 25 | #include <asm/mach/time.h> |
26 | #include <asm/hardware/gic.h> | ||
27 | |||
26 | #include <mach/msm_iomap.h> | 28 | #include <mach/msm_iomap.h> |
27 | #include <mach/cpu.h> | 29 | #include <mach/cpu.h> |
28 | 30 | ||
@@ -55,10 +57,12 @@ enum timer_location { | |||
55 | #if defined(CONFIG_ARCH_QSD8X50) | 57 | #if defined(CONFIG_ARCH_QSD8X50) |
56 | #define DGT_HZ (19200000 / 4) /* 19.2 MHz / 4 by default */ | 58 | #define DGT_HZ (19200000 / 4) /* 19.2 MHz / 4 by default */ |
57 | #define MSM_DGT_SHIFT (0) | 59 | #define MSM_DGT_SHIFT (0) |
58 | #elif defined(CONFIG_ARCH_MSM7X30) || defined(CONFIG_ARCH_MSM8X60) || \ | 60 | #elif defined(CONFIG_ARCH_MSM7X30) |
59 | defined(CONFIG_ARCH_MSM8960) | ||
60 | #define DGT_HZ (24576000 / 4) /* 24.576 MHz (LPXO) / 4 by default */ | 61 | #define DGT_HZ (24576000 / 4) /* 24.576 MHz (LPXO) / 4 by default */ |
61 | #define MSM_DGT_SHIFT (0) | 62 | #define MSM_DGT_SHIFT (0) |
63 | #elif defined(CONFIG_ARCH_MSM8X60) || defined(CONFIG_ARCH_MSM8960) | ||
64 | #define DGT_HZ (27000000 / 4) /* 27 MHz (PXO) / 4 by default */ | ||
65 | #define MSM_DGT_SHIFT (0) | ||
62 | #else | 66 | #else |
63 | #define DGT_HZ 19200000 /* 19.2 MHz or 600 KHz after shift */ | 67 | #define DGT_HZ 19200000 /* 19.2 MHz or 600 KHz after shift */ |
64 | #define MSM_DGT_SHIFT (5) | 68 | #define MSM_DGT_SHIFT (5) |
@@ -100,7 +104,11 @@ static cycle_t msm_read_timer_count(struct clocksource *cs) | |||
100 | { | 104 | { |
101 | struct msm_clock *clk = container_of(cs, struct msm_clock, clocksource); | 105 | struct msm_clock *clk = container_of(cs, struct msm_clock, clocksource); |
102 | 106 | ||
103 | return readl(clk->global_counter); | 107 | /* |
108 | * Shift timer count down by a constant due to unreliable lower bits | ||
109 | * on some targets. | ||
110 | */ | ||
111 | return readl(clk->global_counter) >> clk->shift; | ||
104 | } | 112 | } |
105 | 113 | ||
106 | static struct msm_clock *clockevent_to_clock(struct clock_event_device *evt) | 114 | static struct msm_clock *clockevent_to_clock(struct clock_event_device *evt) |
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index 799fbc40e53c..f25e9d7bf0f5 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -109,6 +109,7 @@ config MACH_EUKREA_MBIMX51_BASEBOARD | |||
109 | bool | 109 | bool |
110 | select IMX_HAVE_PLATFORM_IMX_KEYPAD | 110 | select IMX_HAVE_PLATFORM_IMX_KEYPAD |
111 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 111 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
112 | select LEDS_GPIO_REGISTER | ||
112 | help | 113 | help |
113 | This adds board specific devices that can be found on Eukrea's | 114 | This adds board specific devices that can be found on Eukrea's |
114 | MBIMX51 evaluation board. | 115 | MBIMX51 evaluation board. |
@@ -135,6 +136,7 @@ config MACH_EUKREA_MBIMXSD51_BASEBOARD | |||
135 | prompt "Eukrea MBIMXSD development board" | 136 | prompt "Eukrea MBIMXSD development board" |
136 | bool | 137 | bool |
137 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 138 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
139 | select LEDS_GPIO_REGISTER | ||
138 | help | 140 | help |
139 | This adds board specific devices that can be found on Eukrea's | 141 | This adds board specific devices that can be found on Eukrea's |
140 | MBIMXSD evaluation board. | 142 | MBIMXSD evaluation board. |
@@ -151,6 +153,7 @@ config MX51_EFIKA_COMMON | |||
151 | 153 | ||
152 | config MACH_MX51_EFIKAMX | 154 | config MACH_MX51_EFIKAMX |
153 | bool "Support MX51 Genesi Efika MX nettop" | 155 | bool "Support MX51 Genesi Efika MX nettop" |
156 | select LEDS_GPIO_REGISTER | ||
154 | select MX51_EFIKA_COMMON | 157 | select MX51_EFIKA_COMMON |
155 | help | 158 | help |
156 | Include support for Genesi Efika MX nettop. This includes specific | 159 | Include support for Genesi Efika MX nettop. This includes specific |
@@ -158,6 +161,7 @@ config MACH_MX51_EFIKAMX | |||
158 | 161 | ||
159 | config MACH_MX51_EFIKASB | 162 | config MACH_MX51_EFIKASB |
160 | bool "Support MX51 Genesi Efika Smartbook" | 163 | bool "Support MX51 Genesi Efika Smartbook" |
164 | select LEDS_GPIO_REGISTER | ||
161 | select MX51_EFIKA_COMMON | 165 | select MX51_EFIKA_COMMON |
162 | help | 166 | help |
163 | Include support for Genesi Efika Smartbook. This includes specific | 167 | Include support for Genesi Efika Smartbook. This includes specific |
diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c index add0d42de7af..7c893fa70266 100644 --- a/arch/arm/mach-mx5/board-cpuimx51.c +++ b/arch/arm/mach-mx5/board-cpuimx51.c | |||
@@ -43,10 +43,6 @@ | |||
43 | #define CPUIMX51_QUARTB_GPIO IMX_GPIO_NR(3, 25) | 43 | #define CPUIMX51_QUARTB_GPIO IMX_GPIO_NR(3, 25) |
44 | #define CPUIMX51_QUARTC_GPIO IMX_GPIO_NR(3, 26) | 44 | #define CPUIMX51_QUARTC_GPIO IMX_GPIO_NR(3, 26) |
45 | #define CPUIMX51_QUARTD_GPIO IMX_GPIO_NR(3, 27) | 45 | #define CPUIMX51_QUARTD_GPIO IMX_GPIO_NR(3, 27) |
46 | #define CPUIMX51_QUARTA_IRQ (MXC_INTERNAL_IRQS + CPUIMX51_QUARTA_GPIO) | ||
47 | #define CPUIMX51_QUARTB_IRQ (MXC_INTERNAL_IRQS + CPUIMX51_QUARTB_GPIO) | ||
48 | #define CPUIMX51_QUARTC_IRQ (MXC_INTERNAL_IRQS + CPUIMX51_QUARTC_GPIO) | ||
49 | #define CPUIMX51_QUARTD_IRQ (MXC_INTERNAL_IRQS + CPUIMX51_QUARTD_GPIO) | ||
50 | #define CPUIMX51_QUART_XTAL 14745600 | 46 | #define CPUIMX51_QUART_XTAL 14745600 |
51 | #define CPUIMX51_QUART_REGSHIFT 17 | 47 | #define CPUIMX51_QUART_REGSHIFT 17 |
52 | 48 | ||
@@ -61,7 +57,7 @@ | |||
61 | static struct plat_serial8250_port serial_platform_data[] = { | 57 | static struct plat_serial8250_port serial_platform_data[] = { |
62 | { | 58 | { |
63 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000), | 59 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000), |
64 | .irq = CPUIMX51_QUARTA_IRQ, | 60 | .irq = gpio_to_irq(CPUIMX51_QUARTA_GPIO), |
65 | .irqflags = IRQF_TRIGGER_HIGH, | 61 | .irqflags = IRQF_TRIGGER_HIGH, |
66 | .uartclk = CPUIMX51_QUART_XTAL, | 62 | .uartclk = CPUIMX51_QUART_XTAL, |
67 | .regshift = CPUIMX51_QUART_REGSHIFT, | 63 | .regshift = CPUIMX51_QUART_REGSHIFT, |
@@ -69,7 +65,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
69 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 65 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
70 | }, { | 66 | }, { |
71 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000), | 67 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000), |
72 | .irq = CPUIMX51_QUARTB_IRQ, | 68 | .irq = gpio_to_irq(CPUIMX51_QUARTB_GPIO), |
73 | .irqflags = IRQF_TRIGGER_HIGH, | 69 | .irqflags = IRQF_TRIGGER_HIGH, |
74 | .uartclk = CPUIMX51_QUART_XTAL, | 70 | .uartclk = CPUIMX51_QUART_XTAL, |
75 | .regshift = CPUIMX51_QUART_REGSHIFT, | 71 | .regshift = CPUIMX51_QUART_REGSHIFT, |
@@ -77,7 +73,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
77 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 73 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
78 | }, { | 74 | }, { |
79 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000), | 75 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000), |
80 | .irq = CPUIMX51_QUARTC_IRQ, | 76 | .irq = gpio_to_irq(CPUIMX51_QUARTC_GPIO), |
81 | .irqflags = IRQF_TRIGGER_HIGH, | 77 | .irqflags = IRQF_TRIGGER_HIGH, |
82 | .uartclk = CPUIMX51_QUART_XTAL, | 78 | .uartclk = CPUIMX51_QUART_XTAL, |
83 | .regshift = CPUIMX51_QUART_REGSHIFT, | 79 | .regshift = CPUIMX51_QUART_REGSHIFT, |
@@ -85,7 +81,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
85 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 81 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
86 | }, { | 82 | }, { |
87 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), | 83 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), |
88 | .irq = CPUIMX51_QUARTD_IRQ, | 84 | .irq = irq_to_gpio(CPUIMX51_QUARTD_GPIO), |
89 | .irqflags = IRQF_TRIGGER_HIGH, | 85 | .irqflags = IRQF_TRIGGER_HIGH, |
90 | .uartclk = CPUIMX51_QUART_XTAL, | 86 | .uartclk = CPUIMX51_QUART_XTAL, |
91 | .regshift = CPUIMX51_QUART_REGSHIFT, | 87 | .regshift = CPUIMX51_QUART_REGSHIFT, |
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c index 3112d15feebc..07a38154da21 100644 --- a/arch/arm/mach-mx5/board-mx51_3ds.c +++ b/arch/arm/mach-mx5/board-mx51_3ds.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/spi/spi.h> | 15 | #include <linux/spi/spi.h> |
16 | #include <linux/gpio.h> | ||
16 | 17 | ||
17 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
18 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
@@ -26,7 +27,7 @@ | |||
26 | #include "devices-imx51.h" | 27 | #include "devices-imx51.h" |
27 | #include "devices.h" | 28 | #include "devices.h" |
28 | 29 | ||
29 | #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 6) | 30 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 6)) |
30 | #define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) | 31 | #define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) |
31 | 32 | ||
32 | static iomux_v3_cfg_t mx51_3ds_pads[] = { | 33 | static iomux_v3_cfg_t mx51_3ds_pads[] = { |
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index 6021dd00ec75..e54e4bf61cfd 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) | 37 | #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) |
38 | #define BABBAGE_USBH1_STP IMX_GPIO_NR(1, 27) | 38 | #define BABBAGE_USBH1_STP IMX_GPIO_NR(1, 27) |
39 | #define BABBAGE_PHY_RESET IMX_GPIO_NR(2, 5) | 39 | #define BABBAGE_USB_PHY_RESET IMX_GPIO_NR(2, 5) |
40 | #define BABBAGE_FEC_PHY_RESET IMX_GPIO_NR(2, 14) | 40 | #define BABBAGE_FEC_PHY_RESET IMX_GPIO_NR(2, 14) |
41 | #define BABBAGE_POWER_KEY IMX_GPIO_NR(2, 21) | 41 | #define BABBAGE_POWER_KEY IMX_GPIO_NR(2, 21) |
42 | #define BABBAGE_ECSPI1_CS0 IMX_GPIO_NR(4, 24) | 42 | #define BABBAGE_ECSPI1_CS0 IMX_GPIO_NR(4, 24) |
@@ -110,6 +110,9 @@ static iomux_v3_cfg_t mx51babbage_pads[] = { | |||
110 | /* USB HUB reset line*/ | 110 | /* USB HUB reset line*/ |
111 | MX51_PAD_GPIO1_7__GPIO1_7, | 111 | MX51_PAD_GPIO1_7__GPIO1_7, |
112 | 112 | ||
113 | /* USB PHY reset line */ | ||
114 | MX51_PAD_EIM_D21__GPIO2_5, | ||
115 | |||
113 | /* FEC */ | 116 | /* FEC */ |
114 | MX51_PAD_EIM_EB2__FEC_MDIO, | 117 | MX51_PAD_EIM_EB2__FEC_MDIO, |
115 | MX51_PAD_EIM_EB3__FEC_RDATA1, | 118 | MX51_PAD_EIM_EB3__FEC_RDATA1, |
@@ -169,34 +172,31 @@ static struct imxi2c_platform_data babbage_hsi2c_data = { | |||
169 | .bitrate = 400000, | 172 | .bitrate = 400000, |
170 | }; | 173 | }; |
171 | 174 | ||
175 | static struct gpio mx51_babbage_usbh1_gpios[] = { | ||
176 | { BABBAGE_USBH1_STP, GPIOF_OUT_INIT_LOW, "usbh1_stp" }, | ||
177 | { BABBAGE_USB_PHY_RESET, GPIOF_OUT_INIT_LOW, "usbh1_phy_reset" }, | ||
178 | }; | ||
179 | |||
172 | static int gpio_usbh1_active(void) | 180 | static int gpio_usbh1_active(void) |
173 | { | 181 | { |
174 | iomux_v3_cfg_t usbh1stp_gpio = MX51_PAD_USBH1_STP__GPIO1_27; | 182 | iomux_v3_cfg_t usbh1stp_gpio = MX51_PAD_USBH1_STP__GPIO1_27; |
175 | iomux_v3_cfg_t phyreset_gpio = MX51_PAD_EIM_D21__GPIO2_5; | ||
176 | int ret; | 183 | int ret; |
177 | 184 | ||
178 | /* Set USBH1_STP to GPIO and toggle it */ | 185 | /* Set USBH1_STP to GPIO and toggle it */ |
179 | mxc_iomux_v3_setup_pad(usbh1stp_gpio); | 186 | mxc_iomux_v3_setup_pad(usbh1stp_gpio); |
180 | ret = gpio_request(BABBAGE_USBH1_STP, "usbh1_stp"); | 187 | ret = gpio_request_array(mx51_babbage_usbh1_gpios, |
188 | ARRAY_SIZE(mx51_babbage_usbh1_gpios)); | ||
181 | 189 | ||
182 | if (ret) { | 190 | if (ret) { |
183 | pr_debug("failed to get MX51_PAD_USBH1_STP__GPIO_1_27: %d\n", ret); | 191 | pr_debug("failed to get USBH1 pins: %d\n", ret); |
184 | return ret; | 192 | return ret; |
185 | } | 193 | } |
186 | gpio_direction_output(BABBAGE_USBH1_STP, 0); | ||
187 | gpio_set_value(BABBAGE_USBH1_STP, 1); | ||
188 | msleep(100); | ||
189 | gpio_free(BABBAGE_USBH1_STP); | ||
190 | |||
191 | /* De-assert USB PHY RESETB */ | ||
192 | mxc_iomux_v3_setup_pad(phyreset_gpio); | ||
193 | ret = gpio_request(BABBAGE_PHY_RESET, "phy_reset"); | ||
194 | 194 | ||
195 | if (ret) { | 195 | msleep(100); |
196 | pr_debug("failed to get MX51_PAD_EIM_D21__GPIO_2_5: %d\n", ret); | 196 | gpio_set_value(BABBAGE_USBH1_STP, 1); |
197 | return ret; | 197 | gpio_set_value(BABBAGE_USB_PHY_RESET, 1); |
198 | } | 198 | gpio_free_array(mx51_babbage_usbh1_gpios, |
199 | gpio_direction_output(BABBAGE_PHY_RESET, 1); | 199 | ARRAY_SIZE(mx51_babbage_usbh1_gpios)); |
200 | return 0; | 200 | return 0; |
201 | } | 201 | } |
202 | 202 | ||
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c index 3be603b9075a..f70700dc0ec1 100644 --- a/arch/arm/mach-mx5/board-mx51_efikamx.c +++ b/arch/arm/mach-mx5/board-mx51_efikamx.c | |||
@@ -139,7 +139,7 @@ static void __init mx51_efikamx_board_id(void) | |||
139 | } | 139 | } |
140 | } | 140 | } |
141 | 141 | ||
142 | static struct gpio_led mx51_efikamx_leds[] = { | 142 | static struct gpio_led mx51_efikamx_leds[] __initdata = { |
143 | { | 143 | { |
144 | .name = "efikamx:green", | 144 | .name = "efikamx:green", |
145 | .default_trigger = "default-on", | 145 | .default_trigger = "default-on", |
@@ -157,19 +157,12 @@ static struct gpio_led mx51_efikamx_leds[] = { | |||
157 | }, | 157 | }, |
158 | }; | 158 | }; |
159 | 159 | ||
160 | static struct gpio_led_platform_data mx51_efikamx_leds_data = { | 160 | static const struct gpio_led_platform_data |
161 | mx51_efikamx_leds_data __initconst = { | ||
161 | .leds = mx51_efikamx_leds, | 162 | .leds = mx51_efikamx_leds, |
162 | .num_leds = ARRAY_SIZE(mx51_efikamx_leds), | 163 | .num_leds = ARRAY_SIZE(mx51_efikamx_leds), |
163 | }; | 164 | }; |
164 | 165 | ||
165 | static struct platform_device mx51_efikamx_leds_device = { | ||
166 | .name = "leds-gpio", | ||
167 | .id = -1, | ||
168 | .dev = { | ||
169 | .platform_data = &mx51_efikamx_leds_data, | ||
170 | }, | ||
171 | }; | ||
172 | |||
173 | static struct gpio_keys_button mx51_efikamx_powerkey[] = { | 166 | static struct gpio_keys_button mx51_efikamx_powerkey[] = { |
174 | { | 167 | { |
175 | .code = KEY_POWER, | 168 | .code = KEY_POWER, |
@@ -250,7 +243,7 @@ static void __init mx51_efikamx_init(void) | |||
250 | mx51_efikamx_leds[2].default_trigger = "mmc1"; | 243 | mx51_efikamx_leds[2].default_trigger = "mmc1"; |
251 | } | 244 | } |
252 | 245 | ||
253 | platform_device_register(&mx51_efikamx_leds_device); | 246 | gpio_led_register_device(-1, &mx51_efikamx_leds_data); |
254 | imx_add_gpio_keys(&mx51_efikamx_powerkey_data); | 247 | imx_add_gpio_keys(&mx51_efikamx_powerkey_data); |
255 | 248 | ||
256 | if (system_rev == 0x11) { | 249 | if (system_rev == 0x11) { |
diff --git a/arch/arm/mach-mx5/board-mx51_efikasb.c b/arch/arm/mach-mx5/board-mx51_efikasb.c index 4b2e522de0f8..2e4d9d32a87c 100644 --- a/arch/arm/mach-mx5/board-mx51_efikasb.c +++ b/arch/arm/mach-mx5/board-mx51_efikasb.c | |||
@@ -132,7 +132,7 @@ static void __init mx51_efikasb_usb(void) | |||
132 | mxc_register_device(&mxc_usbh2_device, &usbh2_config); | 132 | mxc_register_device(&mxc_usbh2_device, &usbh2_config); |
133 | } | 133 | } |
134 | 134 | ||
135 | static struct gpio_led mx51_efikasb_leds[] = { | 135 | static const struct gpio_led mx51_efikasb_leds[] __initconst = { |
136 | { | 136 | { |
137 | .name = "efikasb:green", | 137 | .name = "efikasb:green", |
138 | .default_trigger = "default-on", | 138 | .default_trigger = "default-on", |
@@ -146,19 +146,12 @@ static struct gpio_led mx51_efikasb_leds[] = { | |||
146 | }, | 146 | }, |
147 | }; | 147 | }; |
148 | 148 | ||
149 | static struct gpio_led_platform_data mx51_efikasb_leds_data = { | 149 | static const struct gpio_led_platform_data |
150 | mx51_efikasb_leds_data __initconst = { | ||
150 | .leds = mx51_efikasb_leds, | 151 | .leds = mx51_efikasb_leds, |
151 | .num_leds = ARRAY_SIZE(mx51_efikasb_leds), | 152 | .num_leds = ARRAY_SIZE(mx51_efikasb_leds), |
152 | }; | 153 | }; |
153 | 154 | ||
154 | static struct platform_device mx51_efikasb_leds_device = { | ||
155 | .name = "leds-gpio", | ||
156 | .id = -1, | ||
157 | .dev = { | ||
158 | .platform_data = &mx51_efikasb_leds_data, | ||
159 | }, | ||
160 | }; | ||
161 | |||
162 | static struct gpio_keys_button mx51_efikasb_keys[] = { | 155 | static struct gpio_keys_button mx51_efikasb_keys[] = { |
163 | { | 156 | { |
164 | .code = KEY_POWER, | 157 | .code = KEY_POWER, |
@@ -258,9 +251,8 @@ static void __init efikasb_board_init(void) | |||
258 | mx51_efikasb_usb(); | 251 | mx51_efikasb_usb(); |
259 | imx51_add_sdhci_esdhc_imx(1, NULL); | 252 | imx51_add_sdhci_esdhc_imx(1, NULL); |
260 | 253 | ||
261 | platform_device_register(&mx51_efikasb_leds_device); | 254 | gpio_led_register_device(-1, &mx51_efikasb_leds_data); |
262 | imx_add_gpio_keys(&mx51_efikasb_keys_data); | 255 | imx_add_gpio_keys(&mx51_efikasb_keys_data); |
263 | |||
264 | } | 256 | } |
265 | 257 | ||
266 | static void __init mx51_efikasb_timer_init(void) | 258 | static void __init mx51_efikasb_timer_init(void) |
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c index 6b89c1bf4eb2..cea2bba06d0b 100644 --- a/arch/arm/mach-mx5/clock-mx51-mx53.c +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c | |||
@@ -1274,9 +1274,9 @@ DEFINE_CLOCK(pwm2_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG8_OFFSET, | |||
1274 | 1274 | ||
1275 | /* I2C */ | 1275 | /* I2C */ |
1276 | DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET, | 1276 | DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET, |
1277 | NULL, NULL, &ipg_clk, NULL); | 1277 | NULL, NULL, &ipg_perclk, NULL); |
1278 | DEFINE_CLOCK(i2c2_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG10_OFFSET, | 1278 | DEFINE_CLOCK(i2c2_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG10_OFFSET, |
1279 | NULL, NULL, &ipg_clk, NULL); | 1279 | NULL, NULL, &ipg_perclk, NULL); |
1280 | DEFINE_CLOCK(hsi2c_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG11_OFFSET, | 1280 | DEFINE_CLOCK(hsi2c_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG11_OFFSET, |
1281 | NULL, NULL, &ipg_clk, NULL); | 1281 | NULL, NULL, &ipg_clk, NULL); |
1282 | 1282 | ||
diff --git a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c index 97292d20f1f3..bbf4564bd050 100644 --- a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c | |||
@@ -31,13 +31,12 @@ | |||
31 | #include "devices.h" | 31 | #include "devices.h" |
32 | 32 | ||
33 | #define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30) | 33 | #define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30) |
34 | #define MBIMX51_TSC2007_IRQ (MXC_INTERNAL_IRQS + MBIMX51_TSC2007_GPIO) | ||
35 | #define MBIMX51_LED0 IMX_GPIO_NR(3, 5) | 34 | #define MBIMX51_LED0 IMX_GPIO_NR(3, 5) |
36 | #define MBIMX51_LED1 IMX_GPIO_NR(3, 6) | 35 | #define MBIMX51_LED1 IMX_GPIO_NR(3, 6) |
37 | #define MBIMX51_LED2 IMX_GPIO_NR(3, 7) | 36 | #define MBIMX51_LED2 IMX_GPIO_NR(3, 7) |
38 | #define MBIMX51_LED3 IMX_GPIO_NR(3, 8) | 37 | #define MBIMX51_LED3 IMX_GPIO_NR(3, 8) |
39 | 38 | ||
40 | static struct gpio_led mbimx51_leds[] = { | 39 | static const struct gpio_led mbimx51_leds[] __initconst = { |
41 | { | 40 | { |
42 | .name = "led0", | 41 | .name = "led0", |
43 | .default_trigger = "heartbeat", | 42 | .default_trigger = "heartbeat", |
@@ -64,23 +63,11 @@ static struct gpio_led mbimx51_leds[] = { | |||
64 | }, | 63 | }, |
65 | }; | 64 | }; |
66 | 65 | ||
67 | static struct gpio_led_platform_data mbimx51_leds_info = { | 66 | static const struct gpio_led_platform_data mbimx51_leds_info __initconst = { |
68 | .leds = mbimx51_leds, | 67 | .leds = mbimx51_leds, |
69 | .num_leds = ARRAY_SIZE(mbimx51_leds), | 68 | .num_leds = ARRAY_SIZE(mbimx51_leds), |
70 | }; | 69 | }; |
71 | 70 | ||
72 | static struct platform_device mbimx51_leds_gpio = { | ||
73 | .name = "leds-gpio", | ||
74 | .id = -1, | ||
75 | .dev = { | ||
76 | .platform_data = &mbimx51_leds_info, | ||
77 | }, | ||
78 | }; | ||
79 | |||
80 | static struct platform_device *devices[] __initdata = { | ||
81 | &mbimx51_leds_gpio, | ||
82 | }; | ||
83 | |||
84 | static iomux_v3_cfg_t mbimx51_pads[] = { | 71 | static iomux_v3_cfg_t mbimx51_pads[] = { |
85 | /* UART2 */ | 72 | /* UART2 */ |
86 | MX51_PAD_UART2_RXD__UART2_RXD, | 73 | MX51_PAD_UART2_RXD__UART2_RXD, |
@@ -173,7 +160,7 @@ struct tsc2007_platform_data tsc2007_data = { | |||
173 | static struct i2c_board_info mbimx51_i2c_devices[] = { | 160 | static struct i2c_board_info mbimx51_i2c_devices[] = { |
174 | { | 161 | { |
175 | I2C_BOARD_INFO("tsc2007", 0x49), | 162 | I2C_BOARD_INFO("tsc2007", 0x49), |
176 | .irq = MBIMX51_TSC2007_IRQ, | 163 | .irq = gpio_to_irq(MBIMX51_TSC2007_GPIO), |
177 | .platform_data = &tsc2007_data, | 164 | .platform_data = &tsc2007_data, |
178 | }, { | 165 | }, { |
179 | I2C_BOARD_INFO("tlv320aic23", 0x1a), | 166 | I2C_BOARD_INFO("tlv320aic23", 0x1a), |
@@ -204,13 +191,14 @@ void __init eukrea_mbimx51_baseboard_init(void) | |||
204 | gpio_direction_output(MBIMX51_LED3, 1); | 191 | gpio_direction_output(MBIMX51_LED3, 1); |
205 | gpio_free(MBIMX51_LED3); | 192 | gpio_free(MBIMX51_LED3); |
206 | 193 | ||
207 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 194 | gpio_led_register_device(-1, &mbimx51_leds_info); |
208 | 195 | ||
209 | imx51_add_imx_keypad(&mbimx51_map_data); | 196 | imx51_add_imx_keypad(&mbimx51_map_data); |
210 | 197 | ||
211 | gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq"); | 198 | gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq"); |
212 | gpio_direction_input(MBIMX51_TSC2007_GPIO); | 199 | gpio_direction_input(MBIMX51_TSC2007_GPIO); |
213 | irq_set_irq_type(MBIMX51_TSC2007_IRQ, IRQF_TRIGGER_FALLING); | 200 | irq_set_irq_type(gpio_to_irq(MBIMX51_TSC2007_GPIO), |
201 | IRQF_TRIGGER_FALLING); | ||
214 | i2c_register_board_info(1, mbimx51_i2c_devices, | 202 | i2c_register_board_info(1, mbimx51_i2c_devices, |
215 | ARRAY_SIZE(mbimx51_i2c_devices)); | 203 | ARRAY_SIZE(mbimx51_i2c_devices)); |
216 | 204 | ||
diff --git a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c index 31c871ec46a6..261923997643 100644 --- a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c | |||
@@ -74,7 +74,7 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { | |||
74 | #define GPIO_LED1 IMX_GPIO_NR(3, 30) | 74 | #define GPIO_LED1 IMX_GPIO_NR(3, 30) |
75 | #define GPIO_SWITCH1 IMX_GPIO_NR(3, 31) | 75 | #define GPIO_SWITCH1 IMX_GPIO_NR(3, 31) |
76 | 76 | ||
77 | static struct gpio_led eukrea_mbimxsd_leds[] = { | 77 | static const struct gpio_led eukrea_mbimxsd_leds[] __initconst = { |
78 | { | 78 | { |
79 | .name = "led1", | 79 | .name = "led1", |
80 | .default_trigger = "heartbeat", | 80 | .default_trigger = "heartbeat", |
@@ -83,19 +83,12 @@ static struct gpio_led eukrea_mbimxsd_leds[] = { | |||
83 | }, | 83 | }, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static struct gpio_led_platform_data eukrea_mbimxsd_led_info = { | 86 | static const struct gpio_led_platform_data |
87 | eukrea_mbimxsd_led_info __initconst = { | ||
87 | .leds = eukrea_mbimxsd_leds, | 88 | .leds = eukrea_mbimxsd_leds, |
88 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), | 89 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), |
89 | }; | 90 | }; |
90 | 91 | ||
91 | static struct platform_device eukrea_mbimxsd_leds_gpio = { | ||
92 | .name = "leds-gpio", | ||
93 | .id = -1, | ||
94 | .dev = { | ||
95 | .platform_data = &eukrea_mbimxsd_led_info, | ||
96 | }, | ||
97 | }; | ||
98 | |||
99 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { | 92 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { |
100 | { | 93 | { |
101 | .gpio = GPIO_SWITCH1, | 94 | .gpio = GPIO_SWITCH1, |
@@ -112,10 +105,6 @@ static const struct gpio_keys_platform_data | |||
112 | .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons), | 105 | .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons), |
113 | }; | 106 | }; |
114 | 107 | ||
115 | static struct platform_device *platform_devices[] __initdata = { | ||
116 | &eukrea_mbimxsd_leds_gpio, | ||
117 | }; | ||
118 | |||
119 | static const struct imxuart_platform_data uart_pdata __initconst = { | 108 | static const struct imxuart_platform_data uart_pdata __initconst = { |
120 | .flags = IMXUART_HAVE_RTSCTS, | 109 | .flags = IMXUART_HAVE_RTSCTS, |
121 | }; | 110 | }; |
@@ -154,6 +143,6 @@ void __init eukrea_mbimxsd51_baseboard_init(void) | |||
154 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, | 143 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, |
155 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | 144 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); |
156 | 145 | ||
157 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 146 | gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); |
158 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); | 147 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); |
159 | } | 148 | } |
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index f114960622e0..162b0b0bc356 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig | |||
@@ -55,6 +55,7 @@ config MACH_MX28EVK | |||
55 | config MODULE_TX28 | 55 | config MODULE_TX28 |
56 | bool | 56 | bool |
57 | select SOC_IMX28 | 57 | select SOC_IMX28 |
58 | select LEDS_GPIO_REGISTER | ||
58 | select MXS_HAVE_AMBA_DUART | 59 | select MXS_HAVE_AMBA_DUART |
59 | select MXS_HAVE_PLATFORM_AUART | 60 | select MXS_HAVE_PLATFORM_AUART |
60 | select MXS_HAVE_PLATFORM_FEC | 61 | select MXS_HAVE_PLATFORM_FEC |
diff --git a/arch/arm/mach-mxs/devices/platform-mxsfb.c b/arch/arm/mach-mxs/devices/platform-mxsfb.c index bf72c9b8dbdd..5a75b7180f74 100644 --- a/arch/arm/mach-mxs/devices/platform-mxsfb.c +++ b/arch/arm/mach-mxs/devices/platform-mxsfb.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * the terms of the GNU General Public License version 2 as published by the | 5 | * the terms of the GNU General Public License version 2 as published by the |
6 | * Free Software Foundation. | 6 | * Free Software Foundation. |
7 | */ | 7 | */ |
8 | #include <linux/dma-mapping.h> | ||
8 | #include <asm/sizes.h> | 9 | #include <asm/sizes.h> |
9 | #include <mach/mx23.h> | 10 | #include <mach/mx23.h> |
10 | #include <mach/mx28.h> | 11 | #include <mach/mx28.h> |
diff --git a/arch/arm/mach-mxs/mach-tx28.c b/arch/arm/mach-mxs/mach-tx28.c index b65e3719cbc4..6766a12cca7f 100644 --- a/arch/arm/mach-mxs/mach-tx28.c +++ b/arch/arm/mach-mxs/mach-tx28.c | |||
@@ -101,14 +101,6 @@ static const iomux_cfg_t tx28_stk5v3_pads[] __initconst = { | |||
101 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | 101 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), |
102 | MX28_PAD_SSP0_DATA3__SSP0_D3 | | 102 | MX28_PAD_SSP0_DATA3__SSP0_D3 | |
103 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | 103 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), |
104 | MX28_PAD_SSP0_DATA4__SSP0_D4 | | ||
105 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
106 | MX28_PAD_SSP0_DATA5__SSP0_D5 | | ||
107 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
108 | MX28_PAD_SSP0_DATA6__SSP0_D6 | | ||
109 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
110 | MX28_PAD_SSP0_DATA7__SSP0_D7 | | ||
111 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
112 | MX28_PAD_SSP0_CMD__SSP0_CMD | | 104 | MX28_PAD_SSP0_CMD__SSP0_CMD | |
113 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | 105 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), |
114 | MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT | | 106 | MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT | |
@@ -117,7 +109,7 @@ static const iomux_cfg_t tx28_stk5v3_pads[] __initconst = { | |||
117 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | 109 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), |
118 | }; | 110 | }; |
119 | 111 | ||
120 | static struct gpio_led tx28_stk5v3_leds[] = { | 112 | static const struct gpio_led tx28_stk5v3_leds[] __initconst = { |
121 | { | 113 | { |
122 | .name = "GPIO-LED", | 114 | .name = "GPIO-LED", |
123 | .default_trigger = "heartbeat", | 115 | .default_trigger = "heartbeat", |
@@ -159,8 +151,7 @@ static void __init tx28_stk5v3_init(void) | |||
159 | /* spi via ssp will be added when available */ | 151 | /* spi via ssp will be added when available */ |
160 | spi_register_board_info(tx28_spi_board_info, | 152 | spi_register_board_info(tx28_spi_board_info, |
161 | ARRAY_SIZE(tx28_spi_board_info)); | 153 | ARRAY_SIZE(tx28_spi_board_info)); |
162 | mxs_add_platform_device("leds-gpio", 0, NULL, 0, | 154 | gpio_led_register_device(0, &tx28_stk5v3_led_data); |
163 | &tx28_stk5v3_led_data, sizeof(tx28_stk5v3_led_data)); | ||
164 | mx28_add_mxs_i2c(0); | 155 | mx28_add_mxs_i2c(0); |
165 | i2c_register_board_info(0, tx28_stk5v3_i2c_boardinfo, | 156 | i2c_register_board_info(0, tx28_stk5v3_i2c_boardinfo, |
166 | ARRAY_SIZE(tx28_stk5v3_i2c_boardinfo)); | 157 | ARRAY_SIZE(tx28_stk5v3_i2c_boardinfo)); |
diff --git a/arch/arm/mach-mxs/ocotp.c b/arch/arm/mach-mxs/ocotp.c index 65157a35dbba..54add60f94c9 100644 --- a/arch/arm/mach-mxs/ocotp.c +++ b/arch/arm/mach-mxs/ocotp.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | 18 | ||
19 | #include <asm/processor.h> /* for cpu_relax() */ | ||
20 | |||
19 | #include <mach/mxs.h> | 21 | #include <mach/mxs.h> |
20 | 22 | ||
21 | #define OCOTP_WORD_OFFSET 0x20 | 23 | #define OCOTP_WORD_OFFSET 0x20 |
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile index af98117043d2..5b114d1558c8 100644 --- a/arch/arm/mach-omap1/Makefile +++ b/arch/arm/mach-omap1/Makefile | |||
@@ -4,14 +4,14 @@ | |||
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o | 6 | obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o |
7 | obj-y += clock.o clock_data.o opp_data.o reset.o | 7 | obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o |
8 | 8 | ||
9 | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o | 9 | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o |
10 | 10 | ||
11 | obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o | 11 | obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o |
12 | 12 | ||
13 | # Power Management | 13 | # Power Management |
14 | obj-$(CONFIG_PM) += pm.o sleep.o pm_bus.o | 14 | obj-$(CONFIG_PM) += pm.o sleep.o |
15 | 15 | ||
16 | # DSP | 16 | # DSP |
17 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o | 17 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o |
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c index d8559344c6e2..f5a52204b89f 100644 --- a/arch/arm/mach-omap1/dma.c +++ b/arch/arm/mach-omap1/dma.c | |||
@@ -284,14 +284,15 @@ static int __init omap1_system_dma_init(void) | |||
284 | dma_base = ioremap(res[0].start, resource_size(&res[0])); | 284 | dma_base = ioremap(res[0].start, resource_size(&res[0])); |
285 | if (!dma_base) { | 285 | if (!dma_base) { |
286 | pr_err("%s: Unable to ioremap\n", __func__); | 286 | pr_err("%s: Unable to ioremap\n", __func__); |
287 | return -ENODEV; | 287 | ret = -ENODEV; |
288 | goto exit_device_put; | ||
288 | } | 289 | } |
289 | 290 | ||
290 | ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res)); | 291 | ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res)); |
291 | if (ret) { | 292 | if (ret) { |
292 | dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n", | 293 | dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n", |
293 | __func__, pdev->name, pdev->id); | 294 | __func__, pdev->name, pdev->id); |
294 | goto exit_device_del; | 295 | goto exit_device_put; |
295 | } | 296 | } |
296 | 297 | ||
297 | p = kzalloc(sizeof(struct omap_system_dma_plat_info), GFP_KERNEL); | 298 | p = kzalloc(sizeof(struct omap_system_dma_plat_info), GFP_KERNEL); |
@@ -299,7 +300,7 @@ static int __init omap1_system_dma_init(void) | |||
299 | dev_err(&pdev->dev, "%s: Unable to allocate 'p' for %s\n", | 300 | dev_err(&pdev->dev, "%s: Unable to allocate 'p' for %s\n", |
300 | __func__, pdev->name); | 301 | __func__, pdev->name); |
301 | ret = -ENOMEM; | 302 | ret = -ENOMEM; |
302 | goto exit_device_put; | 303 | goto exit_device_del; |
303 | } | 304 | } |
304 | 305 | ||
305 | d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL); | 306 | d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL); |
@@ -380,10 +381,10 @@ exit_release_d: | |||
380 | kfree(d); | 381 | kfree(d); |
381 | exit_release_p: | 382 | exit_release_p: |
382 | kfree(p); | 383 | kfree(p); |
383 | exit_device_put: | ||
384 | platform_device_put(pdev); | ||
385 | exit_device_del: | 384 | exit_device_del: |
386 | platform_device_del(pdev); | 385 | platform_device_del(pdev); |
386 | exit_device_put: | ||
387 | platform_device_put(pdev); | ||
387 | 388 | ||
388 | return ret; | 389 | return ret; |
389 | } | 390 | } |
diff --git a/arch/arm/mach-omap1/pm_bus.c b/arch/arm/mach-omap1/pm_bus.c index fe31d933f0ed..334fb8871bc3 100644 --- a/arch/arm/mach-omap1/pm_bus.c +++ b/arch/arm/mach-omap1/pm_bus.c | |||
@@ -56,9 +56,13 @@ static struct dev_power_domain default_power_domain = { | |||
56 | USE_PLATFORM_PM_SLEEP_OPS | 56 | USE_PLATFORM_PM_SLEEP_OPS |
57 | }, | 57 | }, |
58 | }; | 58 | }; |
59 | #define OMAP1_PWR_DOMAIN (&default_power_domain) | ||
60 | #else | ||
61 | #define OMAP1_PWR_DOMAIN NULL | ||
62 | #endif /* CONFIG_PM_RUNTIME */ | ||
59 | 63 | ||
60 | static struct pm_clk_notifier_block platform_bus_notifier = { | 64 | static struct pm_clk_notifier_block platform_bus_notifier = { |
61 | .pwr_domain = &default_power_domain, | 65 | .pwr_domain = OMAP1_PWR_DOMAIN, |
62 | .con_ids = { "ick", "fck", NULL, }, | 66 | .con_ids = { "ick", "fck", NULL, }, |
63 | }; | 67 | }; |
64 | 68 | ||
@@ -72,4 +76,4 @@ static int __init omap1_pm_runtime_init(void) | |||
72 | return 0; | 76 | return 0; |
73 | } | 77 | } |
74 | core_initcall(omap1_pm_runtime_init); | 78 | core_initcall(omap1_pm_runtime_init); |
75 | #endif /* CONFIG_PM_RUNTIME */ | 79 | |
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index d54969be0a54..5de6eac0a725 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -26,13 +26,13 @@ | |||
26 | #include <linux/err.h> | 26 | #include <linux/err.h> |
27 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/gpio.h> | ||
29 | 30 | ||
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
31 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
33 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
34 | 35 | ||
35 | #include <mach/gpio.h> | ||
36 | #include <plat/board.h> | 36 | #include <plat/board.h> |
37 | #include <plat/common.h> | 37 | #include <plat/common.h> |
38 | #include <plat/gpmc.h> | 38 | #include <plat/gpmc.h> |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index ae2963a98041..5dac974be625 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -622,19 +622,19 @@ static struct omap_device_pad serial3_pads[] __initdata = { | |||
622 | OMAP_MUX_MODE0), | 622 | OMAP_MUX_MODE0), |
623 | }; | 623 | }; |
624 | 624 | ||
625 | static struct omap_board_data serial1_data = { | 625 | static struct omap_board_data serial1_data __initdata = { |
626 | .id = 0, | 626 | .id = 0, |
627 | .pads = serial1_pads, | 627 | .pads = serial1_pads, |
628 | .pads_cnt = ARRAY_SIZE(serial1_pads), | 628 | .pads_cnt = ARRAY_SIZE(serial1_pads), |
629 | }; | 629 | }; |
630 | 630 | ||
631 | static struct omap_board_data serial2_data = { | 631 | static struct omap_board_data serial2_data __initdata = { |
632 | .id = 1, | 632 | .id = 1, |
633 | .pads = serial2_pads, | 633 | .pads = serial2_pads, |
634 | .pads_cnt = ARRAY_SIZE(serial2_pads), | 634 | .pads_cnt = ARRAY_SIZE(serial2_pads), |
635 | }; | 635 | }; |
636 | 636 | ||
637 | static struct omap_board_data serial3_data = { | 637 | static struct omap_board_data serial3_data __initdata = { |
638 | .id = 2, | 638 | .id = 2, |
639 | .pads = serial3_pads, | 639 | .pads = serial3_pads, |
640 | .pads_cnt = ARRAY_SIZE(serial3_pads), | 640 | .pads_cnt = ARRAY_SIZE(serial3_pads), |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 73fa90bb6953..63de2d396e2d 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -258,7 +258,7 @@ static struct gpio sdp4430_eth_gpios[] __initdata = { | |||
258 | { ETH_KS8851_IRQ, GPIOF_IN, "eth_irq" }, | 258 | { ETH_KS8851_IRQ, GPIOF_IN, "eth_irq" }, |
259 | }; | 259 | }; |
260 | 260 | ||
261 | static int omap_ethernet_init(void) | 261 | static int __init omap_ethernet_init(void) |
262 | { | 262 | { |
263 | int status; | 263 | int status; |
264 | 264 | ||
@@ -322,6 +322,7 @@ static struct omap2_hsmmc_info mmc[] = { | |||
322 | .gpio_wp = -EINVAL, | 322 | .gpio_wp = -EINVAL, |
323 | .nonremovable = true, | 323 | .nonremovable = true, |
324 | .ocr_mask = MMC_VDD_29_30, | 324 | .ocr_mask = MMC_VDD_29_30, |
325 | .no_off_init = true, | ||
325 | }, | 326 | }, |
326 | { | 327 | { |
327 | .mmc = 1, | 328 | .mmc = 1, |
@@ -681,19 +682,19 @@ static struct omap_device_pad serial4_pads[] __initdata = { | |||
681 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), | 682 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), |
682 | }; | 683 | }; |
683 | 684 | ||
684 | static struct omap_board_data serial2_data = { | 685 | static struct omap_board_data serial2_data __initdata = { |
685 | .id = 1, | 686 | .id = 1, |
686 | .pads = serial2_pads, | 687 | .pads = serial2_pads, |
687 | .pads_cnt = ARRAY_SIZE(serial2_pads), | 688 | .pads_cnt = ARRAY_SIZE(serial2_pads), |
688 | }; | 689 | }; |
689 | 690 | ||
690 | static struct omap_board_data serial3_data = { | 691 | static struct omap_board_data serial3_data __initdata = { |
691 | .id = 2, | 692 | .id = 2, |
692 | .pads = serial3_pads, | 693 | .pads = serial3_pads, |
693 | .pads_cnt = ARRAY_SIZE(serial3_pads), | 694 | .pads_cnt = ARRAY_SIZE(serial3_pads), |
694 | }; | 695 | }; |
695 | 696 | ||
696 | static struct omap_board_data serial4_data = { | 697 | static struct omap_board_data serial4_data __initdata = { |
697 | .id = 3, | 698 | .id = 3, |
698 | .pads = serial4_pads, | 699 | .pads = serial4_pads, |
699 | .pads_cnt = ARRAY_SIZE(serial4_pads), | 700 | .pads_cnt = ARRAY_SIZE(serial4_pads), |
@@ -729,7 +730,7 @@ static void __init omap_4430sdp_init(void) | |||
729 | 730 | ||
730 | if (omap_rev() == OMAP4430_REV_ES1_0) | 731 | if (omap_rev() == OMAP4430_REV_ES1_0) |
731 | package = OMAP_PACKAGE_CBL; | 732 | package = OMAP_PACKAGE_CBL; |
732 | omap4_mux_init(board_mux, package); | 733 | omap4_mux_init(board_mux, NULL, package); |
733 | 734 | ||
734 | omap_board_config = sdp4430_config; | 735 | omap_board_config = sdp4430_config; |
735 | omap_board_config_size = ARRAY_SIZE(sdp4430_config); | 736 | omap_board_config_size = ARRAY_SIZE(sdp4430_config); |
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index f3beb8eeef77..b124bdfb4239 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c | |||
@@ -27,13 +27,13 @@ | |||
27 | #include <linux/err.h> | 27 | #include <linux/err.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/smc91x.h> | 29 | #include <linux/smc91x.h> |
30 | #include <linux/gpio.h> | ||
30 | 31 | ||
31 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/flash.h> | 35 | #include <asm/mach/flash.h> |
35 | 36 | ||
36 | #include <mach/gpio.h> | ||
37 | #include <plat/led.h> | 37 | #include <plat/led.h> |
38 | #include <plat/usb.h> | 38 | #include <plat/usb.h> |
39 | #include <plat/board.h> | 39 | #include <plat/board.h> |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index c63115bc1536..77456dec93ea 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -63,8 +63,6 @@ | |||
63 | #define SB_T35_SMSC911X_CS 4 | 63 | #define SB_T35_SMSC911X_CS 4 |
64 | #define SB_T35_SMSC911X_GPIO 65 | 64 | #define SB_T35_SMSC911X_GPIO 65 |
65 | 65 | ||
66 | #define NAND_BLOCK_SIZE SZ_128K | ||
67 | |||
68 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) | 66 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) |
69 | #include <linux/smsc911x.h> | 67 | #include <linux/smsc911x.h> |
70 | #include <plat/gpmc-smsc911x.h> | 68 | #include <plat/gpmc-smsc911x.h> |
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index 08f08e812492..c3a9fd35034a 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
@@ -48,6 +48,7 @@ | |||
48 | 48 | ||
49 | #include "mux.h" | 49 | #include "mux.h" |
50 | #include "control.h" | 50 | #include "control.h" |
51 | #include "common-board-devices.h" | ||
51 | 52 | ||
52 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | 53 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) |
53 | static struct gpio_led cm_t3517_leds[] = { | 54 | static struct gpio_led cm_t3517_leds[] = { |
@@ -177,7 +178,7 @@ static struct usbhs_omap_board_data cm_t3517_ehci_pdata __initdata = { | |||
177 | .reset_gpio_port[2] = -EINVAL, | 178 | .reset_gpio_port[2] = -EINVAL, |
178 | }; | 179 | }; |
179 | 180 | ||
180 | static int cm_t3517_init_usbh(void) | 181 | static int __init cm_t3517_init_usbh(void) |
181 | { | 182 | { |
182 | int err; | 183 | int err; |
183 | 184 | ||
@@ -203,8 +204,6 @@ static inline int cm_t3517_init_usbh(void) | |||
203 | #endif | 204 | #endif |
204 | 205 | ||
205 | #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE) | 206 | #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE) |
206 | #define NAND_BLOCK_SIZE SZ_128K | ||
207 | |||
208 | static struct mtd_partition cm_t3517_nand_partitions[] = { | 207 | static struct mtd_partition cm_t3517_nand_partitions[] = { |
209 | { | 208 | { |
210 | .name = "xloader", | 209 | .name = "xloader", |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index cf520d7dd614..34956ec83296 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -61,8 +61,6 @@ | |||
61 | #include "timer-gp.h" | 61 | #include "timer-gp.h" |
62 | #include "common-board-devices.h" | 62 | #include "common-board-devices.h" |
63 | 63 | ||
64 | #define NAND_BLOCK_SIZE SZ_128K | ||
65 | |||
66 | #define OMAP_DM9000_GPIO_IRQ 25 | 64 | #define OMAP_DM9000_GPIO_IRQ 25 |
67 | #define OMAP3_DEVKIT_TS_GPIO 27 | 65 | #define OMAP3_DEVKIT_TS_GPIO 27 |
68 | 66 | ||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index be71426359f2..7f21d24bd437 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -54,8 +54,6 @@ | |||
54 | #include "pm.h" | 54 | #include "pm.h" |
55 | #include "common-board-devices.h" | 55 | #include "common-board-devices.h" |
56 | 56 | ||
57 | #define NAND_BLOCK_SIZE SZ_128K | ||
58 | |||
59 | /* | 57 | /* |
60 | * OMAP3 Beagle revision | 58 | * OMAP3 Beagle revision |
61 | * Run time detection of Beagle revision is done by reading GPIO. | 59 | * Run time detection of Beagle revision is done by reading GPIO. |
@@ -106,6 +104,9 @@ static void __init omap3_beagle_init_rev(void) | |||
106 | beagle_rev = gpio_get_value(171) | (gpio_get_value(172) << 1) | 104 | beagle_rev = gpio_get_value(171) | (gpio_get_value(172) << 1) |
107 | | (gpio_get_value(173) << 2); | 105 | | (gpio_get_value(173) << 2); |
108 | 106 | ||
107 | gpio_free_array(omap3_beagle_rev_gpios, | ||
108 | ARRAY_SIZE(omap3_beagle_rev_gpios)); | ||
109 | |||
109 | switch (beagle_rev) { | 110 | switch (beagle_rev) { |
110 | case 7: | 111 | case 7: |
111 | printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n"); | 112 | printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n"); |
@@ -579,6 +580,9 @@ static void __init omap3_beagle_init(void) | |||
579 | omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions, | 580 | omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions, |
580 | ARRAY_SIZE(omap3beagle_nand_partitions)); | 581 | ARRAY_SIZE(omap3beagle_nand_partitions)); |
581 | 582 | ||
583 | /* Ensure msecure is mux'd to be able to set the RTC. */ | ||
584 | omap_mux_init_signal("sys_drm_msecure", OMAP_PIN_OFF_OUTPUT_HIGH); | ||
585 | |||
582 | /* Ensure SDRC pins are mux'd for self-refresh */ | 586 | /* Ensure SDRC pins are mux'd for self-refresh */ |
583 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); | 587 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
584 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); | 588 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 1d10736c6d3c..23f71d40883e 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/leds.h> | 30 | #include <linux/leds.h> |
31 | #include <linux/input.h> | 31 | #include <linux/input.h> |
32 | #include <linux/input/matrix_keypad.h> | 32 | #include <linux/input/matrix_keypad.h> |
33 | #include <linux/gpio.h> | ||
33 | #include <linux/gpio_keys.h> | 34 | #include <linux/gpio_keys.h> |
34 | #include <linux/mmc/host.h> | 35 | #include <linux/mmc/host.h> |
35 | #include <linux/mmc/card.h> | 36 | #include <linux/mmc/card.h> |
@@ -41,7 +42,6 @@ | |||
41 | 42 | ||
42 | #include <plat/board.h> | 43 | #include <plat/board.h> |
43 | #include <plat/common.h> | 44 | #include <plat/common.h> |
44 | #include <mach/gpio.h> | ||
45 | #include <mach/hardware.h> | 45 | #include <mach/hardware.h> |
46 | #include <plat/mcspi.h> | 46 | #include <plat/mcspi.h> |
47 | #include <plat/usb.h> | 47 | #include <plat/usb.h> |
@@ -57,8 +57,6 @@ | |||
57 | #define PANDORA_WIFI_NRESET_GPIO 23 | 57 | #define PANDORA_WIFI_NRESET_GPIO 23 |
58 | #define OMAP3_PANDORA_TS_GPIO 94 | 58 | #define OMAP3_PANDORA_TS_GPIO 94 |
59 | 59 | ||
60 | #define NAND_BLOCK_SIZE SZ_128K | ||
61 | |||
62 | static struct mtd_partition omap3pandora_nand_partitions[] = { | 60 | static struct mtd_partition omap3pandora_nand_partitions[] = { |
63 | { | 61 | { |
64 | .name = "xloader", | 62 | .name = "xloader", |
@@ -86,7 +84,8 @@ static struct mtd_partition omap3pandora_nand_partitions[] = { | |||
86 | 84 | ||
87 | static struct omap_nand_platform_data pandora_nand_data = { | 85 | static struct omap_nand_platform_data pandora_nand_data = { |
88 | .cs = 0, | 86 | .cs = 0, |
89 | .devsize = 1, /* '0' for 8-bit, '1' for 16-bit device */ | 87 | .devsize = NAND_BUSWIDTH_16, |
88 | .xfer_type = NAND_OMAP_PREFETCH_DMA, | ||
90 | .parts = omap3pandora_nand_partitions, | 89 | .parts = omap3pandora_nand_partitions, |
91 | .nr_parts = ARRAY_SIZE(omap3pandora_nand_partitions), | 90 | .nr_parts = ARRAY_SIZE(omap3pandora_nand_partitions), |
92 | }; | 91 | }; |
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 82872d7d313b..5f649faf7377 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -56,8 +56,6 @@ | |||
56 | 56 | ||
57 | #include <asm/setup.h> | 57 | #include <asm/setup.h> |
58 | 58 | ||
59 | #define NAND_BLOCK_SIZE SZ_128K | ||
60 | |||
61 | #define OMAP3_AC_GPIO 136 | 59 | #define OMAP3_AC_GPIO 136 |
62 | #define OMAP3_TS_GPIO 162 | 60 | #define OMAP3_TS_GPIO 162 |
63 | #define TB_BL_PWM_TIMER 9 | 61 | #define TB_BL_PWM_TIMER 9 |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 90485fced973..0cfe2005cb50 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -526,19 +526,19 @@ static struct omap_device_pad serial4_pads[] __initdata = { | |||
526 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), | 526 | OMAP_PIN_OUTPUT | OMAP_MUX_MODE0), |
527 | }; | 527 | }; |
528 | 528 | ||
529 | static struct omap_board_data serial2_data = { | 529 | static struct omap_board_data serial2_data __initdata = { |
530 | .id = 1, | 530 | .id = 1, |
531 | .pads = serial2_pads, | 531 | .pads = serial2_pads, |
532 | .pads_cnt = ARRAY_SIZE(serial2_pads), | 532 | .pads_cnt = ARRAY_SIZE(serial2_pads), |
533 | }; | 533 | }; |
534 | 534 | ||
535 | static struct omap_board_data serial3_data = { | 535 | static struct omap_board_data serial3_data __initdata = { |
536 | .id = 2, | 536 | .id = 2, |
537 | .pads = serial3_pads, | 537 | .pads = serial3_pads, |
538 | .pads_cnt = ARRAY_SIZE(serial3_pads), | 538 | .pads_cnt = ARRAY_SIZE(serial3_pads), |
539 | }; | 539 | }; |
540 | 540 | ||
541 | static struct omap_board_data serial4_data = { | 541 | static struct omap_board_data serial4_data __initdata = { |
542 | .id = 3, | 542 | .id = 3, |
543 | .pads = serial4_pads, | 543 | .pads = serial4_pads, |
544 | .pads_cnt = ARRAY_SIZE(serial4_pads), | 544 | .pads_cnt = ARRAY_SIZE(serial4_pads), |
@@ -687,7 +687,7 @@ static void __init omap4_panda_init(void) | |||
687 | 687 | ||
688 | if (omap_rev() == OMAP4430_REV_ES1_0) | 688 | if (omap_rev() == OMAP4430_REV_ES1_0) |
689 | package = OMAP_PACKAGE_CBL; | 689 | package = OMAP_PACKAGE_CBL; |
690 | omap4_mux_init(board_mux, package); | 690 | omap4_mux_init(board_mux, NULL, package); |
691 | 691 | ||
692 | if (wl12xx_set_platform_data(&omap_panda_wlan_data)) | 692 | if (wl12xx_set_platform_data(&omap_panda_wlan_data)) |
693 | pr_err("error setting wl12xx data\n"); | 693 | pr_err("error setting wl12xx data\n"); |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 1555918e3ffa..175e1ab2b04d 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/err.h> | 24 | #include <linux/err.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/gpio.h> | ||
27 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
28 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
29 | #include <linux/i2c/twl.h> | 30 | #include <linux/i2c/twl.h> |
@@ -45,7 +46,6 @@ | |||
45 | #include <plat/common.h> | 46 | #include <plat/common.h> |
46 | #include <video/omapdss.h> | 47 | #include <video/omapdss.h> |
47 | #include <video/omap-panel-generic-dpi.h> | 48 | #include <video/omap-panel-generic-dpi.h> |
48 | #include <mach/gpio.h> | ||
49 | #include <plat/gpmc.h> | 49 | #include <plat/gpmc.h> |
50 | #include <mach/hardware.h> | 50 | #include <mach/hardware.h> |
51 | #include <plat/nand.h> | 51 | #include <plat/nand.h> |
@@ -65,8 +65,6 @@ | |||
65 | #define OVERO_GPIO_USBH_CPEN 168 | 65 | #define OVERO_GPIO_USBH_CPEN 168 |
66 | #define OVERO_GPIO_USBH_NRESET 183 | 66 | #define OVERO_GPIO_USBH_NRESET 183 |
67 | 67 | ||
68 | #define NAND_BLOCK_SIZE SZ_128K | ||
69 | |||
70 | #define OVERO_SMSC911X_CS 5 | 68 | #define OVERO_SMSC911X_CS 5 |
71 | #define OVERO_SMSC911X_GPIO 176 | 69 | #define OVERO_SMSC911X_GPIO 176 |
72 | #define OVERO_SMSC911X2_CS 4 | 70 | #define OVERO_SMSC911X2_CS 4 |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index f6247e71a194..990366726c58 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -488,6 +488,7 @@ static struct regulator_init_data rx51_vmmc2 = { | |||
488 | .name = "V28_A", | 488 | .name = "V28_A", |
489 | .min_uV = 2800000, | 489 | .min_uV = 2800000, |
490 | .max_uV = 3000000, | 490 | .max_uV = 3000000, |
491 | .always_on = true, /* due VIO leak to AIC34 VDDs */ | ||
491 | .apply_uV = true, | 492 | .apply_uV = true, |
492 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 493 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
493 | | REGULATOR_MODE_STANDBY, | 494 | | REGULATOR_MODE_STANDBY, |
@@ -582,7 +583,7 @@ static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) | |||
582 | { | 583 | { |
583 | /* FIXME this gpio setup is just a placeholder for now */ | 584 | /* FIXME this gpio setup is just a placeholder for now */ |
584 | gpio_request_one(gpio + 6, GPIOF_OUT_INIT_LOW, "backlight_pwm"); | 585 | gpio_request_one(gpio + 6, GPIOF_OUT_INIT_LOW, "backlight_pwm"); |
585 | gpio_request_one(gpio + 7, GPIOF_OUT_INIT_HIGH, "speaker_en"); | 586 | gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "speaker_en"); |
586 | 587 | ||
587 | return 0; | 588 | return 0; |
588 | } | 589 | } |
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c index c7c6beb1ec24..d4683ba5f721 100644 --- a/arch/arm/mach-omap2/board-zoom-display.c +++ b/arch/arm/mach-omap2/board-zoom-display.c | |||
@@ -26,7 +26,7 @@ static struct gpio zoom_lcd_gpios[] __initdata = { | |||
26 | { LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "lcd qvga" }, | 26 | { LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "lcd qvga" }, |
27 | }; | 27 | }; |
28 | 28 | ||
29 | static void zoom_lcd_panel_init(void) | 29 | static void __init zoom_lcd_panel_init(void) |
30 | { | 30 | { |
31 | zoom_lcd_gpios[0].gpio = (omap_rev() > OMAP3430_REV_ES3_0) ? | 31 | zoom_lcd_gpios[0].gpio = (omap_rev() > OMAP3430_REV_ES3_0) ? |
32 | LCD_PANEL_RESET_GPIO_PROD : | 32 | LCD_PANEL_RESET_GPIO_PROD : |
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c index e94903b2c65b..94ccf464677b 100644 --- a/arch/arm/mach-omap2/common-board-devices.c +++ b/arch/arm/mach-omap2/common-board-devices.c | |||
@@ -85,17 +85,17 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce, | |||
85 | struct spi_board_info *spi_bi = &ads7846_spi_board_info; | 85 | struct spi_board_info *spi_bi = &ads7846_spi_board_info; |
86 | int err; | 86 | int err; |
87 | 87 | ||
88 | err = gpio_request(gpio_pendown, "TS PenDown"); | 88 | if (board_pdata && board_pdata->get_pendown_state) { |
89 | if (err) { | 89 | err = gpio_request_one(gpio_pendown, GPIOF_IN, "TSPenDown"); |
90 | pr_err("Could not obtain gpio for TS PenDown: %d\n", err); | 90 | if (err) { |
91 | return; | 91 | pr_err("Couldn't obtain gpio for TSPenDown: %d\n", err); |
92 | } | 92 | return; |
93 | 93 | } | |
94 | gpio_direction_input(gpio_pendown); | 94 | gpio_export(gpio_pendown, 0); |
95 | gpio_export(gpio_pendown, 0); | ||
96 | 95 | ||
97 | if (gpio_debounce) | 96 | if (gpio_debounce) |
98 | gpio_set_debounce(gpio_pendown, gpio_debounce); | 97 | gpio_set_debounce(gpio_pendown, gpio_debounce); |
98 | } | ||
99 | 99 | ||
100 | ads7846_config.gpio_pendown = gpio_pendown; | 100 | ads7846_config.gpio_pendown = gpio_pendown; |
101 | 101 | ||
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h index eb80b3b0ef47..679719051df5 100644 --- a/arch/arm/mach-omap2/common-board-devices.h +++ b/arch/arm/mach-omap2/common-board-devices.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __OMAP_COMMON_BOARD_DEVICES__ | 1 | #ifndef __OMAP_COMMON_BOARD_DEVICES__ |
2 | #define __OMAP_COMMON_BOARD_DEVICES__ | 2 | #define __OMAP_COMMON_BOARD_DEVICES__ |
3 | 3 | ||
4 | #define NAND_BLOCK_SIZE SZ_128K | ||
5 | |||
4 | struct twl4030_platform_data; | 6 | struct twl4030_platform_data; |
5 | struct mtd_partition; | 7 | struct mtd_partition; |
6 | 8 | ||
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 7b8558564591..5b8ca680ed93 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -97,7 +97,7 @@ static int __init omap4_l3_init(void) | |||
97 | 97 | ||
98 | WARN(IS_ERR(od), "could not build omap_device for %s\n", oh_name); | 98 | WARN(IS_ERR(od), "could not build omap_device for %s\n", oh_name); |
99 | 99 | ||
100 | return PTR_ERR(od); | 100 | return IS_ERR(od) ? PTR_ERR(od) : 0; |
101 | } | 101 | } |
102 | postcore_initcall(omap4_l3_init); | 102 | postcore_initcall(omap4_l3_init); |
103 | 103 | ||
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index b2f30bed5a20..66868c5d5a29 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -145,6 +145,7 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, | |||
145 | int power_on, int vdd) | 145 | int power_on, int vdd) |
146 | { | 146 | { |
147 | u32 reg; | 147 | u32 reg; |
148 | unsigned long timeout; | ||
148 | 149 | ||
149 | if (power_on) { | 150 | if (power_on) { |
150 | reg = omap4_ctrl_pad_readl(control_pbias_offset); | 151 | reg = omap4_ctrl_pad_readl(control_pbias_offset); |
@@ -157,9 +158,15 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, | |||
157 | OMAP4_MMC1_PWRDNZ_MASK | | 158 | OMAP4_MMC1_PWRDNZ_MASK | |
158 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); | 159 | OMAP4_USBC1_ICUSB_PWRDNZ_MASK); |
159 | omap4_ctrl_pad_writel(reg, control_pbias_offset); | 160 | omap4_ctrl_pad_writel(reg, control_pbias_offset); |
160 | /* 4 microsec delay for comparator to generate an error*/ | 161 | |
161 | udelay(4); | 162 | timeout = jiffies + msecs_to_jiffies(5); |
162 | reg = omap4_ctrl_pad_readl(control_pbias_offset); | 163 | do { |
164 | reg = omap4_ctrl_pad_readl(control_pbias_offset); | ||
165 | if (!(reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK)) | ||
166 | break; | ||
167 | usleep_range(100, 200); | ||
168 | } while (!time_after(jiffies, timeout)); | ||
169 | |||
163 | if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK) { | 170 | if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK) { |
164 | pr_err("Pbias Voltage is not same as LDO\n"); | 171 | pr_err("Pbias Voltage is not same as LDO\n"); |
165 | /* Caution : On VMODE_ERROR Power Down MMC IO */ | 172 | /* Caution : On VMODE_ERROR Power Down MMC IO */ |
@@ -331,6 +338,9 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | |||
331 | if (c->no_off) | 338 | if (c->no_off) |
332 | mmc->slots[0].no_off = 1; | 339 | mmc->slots[0].no_off = 1; |
333 | 340 | ||
341 | if (c->no_off_init) | ||
342 | mmc->slots[0].no_regulator_off_init = c->no_off_init; | ||
343 | |||
334 | if (c->vcc_aux_disable_is_sleep) | 344 | if (c->vcc_aux_disable_is_sleep) |
335 | mmc->slots[0].vcc_aux_disable_is_sleep = 1; | 345 | mmc->slots[0].vcc_aux_disable_is_sleep = 1; |
336 | 346 | ||
diff --git a/arch/arm/mach-omap2/hsmmc.h b/arch/arm/mach-omap2/hsmmc.h index f119348827d4..f757e78d4d4f 100644 --- a/arch/arm/mach-omap2/hsmmc.h +++ b/arch/arm/mach-omap2/hsmmc.h | |||
@@ -18,6 +18,7 @@ struct omap2_hsmmc_info { | |||
18 | bool nonremovable; /* Nonremovable e.g. eMMC */ | 18 | bool nonremovable; /* Nonremovable e.g. eMMC */ |
19 | bool power_saving; /* Try to sleep or power off when possible */ | 19 | bool power_saving; /* Try to sleep or power off when possible */ |
20 | bool no_off; /* power_saving and power is not to go off */ | 20 | bool no_off; /* power_saving and power is not to go off */ |
21 | bool no_off_init; /* no power off when not in MMC sleep state */ | ||
21 | bool vcc_aux_disable_is_sleep; /* Regulator off remapped to sleep */ | 22 | bool vcc_aux_disable_is_sleep; /* Regulator off remapped to sleep */ |
22 | int gpio_cd; /* or -EINVAL */ | 23 | int gpio_cd; /* or -EINVAL */ |
23 | int gpio_wp; /* or -EINVAL */ | 24 | int gpio_wp; /* or -EINVAL */ |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index a4ab1e364313..c7fb22abc219 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -83,6 +83,9 @@ void omap_mux_write(struct omap_mux_partition *partition, u16 val, | |||
83 | void omap_mux_write_array(struct omap_mux_partition *partition, | 83 | void omap_mux_write_array(struct omap_mux_partition *partition, |
84 | struct omap_board_mux *board_mux) | 84 | struct omap_board_mux *board_mux) |
85 | { | 85 | { |
86 | if (!board_mux) | ||
87 | return; | ||
88 | |||
86 | while (board_mux->reg_offset != OMAP_MUX_TERMINATOR) { | 89 | while (board_mux->reg_offset != OMAP_MUX_TERMINATOR) { |
87 | omap_mux_write(partition, board_mux->value, | 90 | omap_mux_write(partition, board_mux->value, |
88 | board_mux->reg_offset); | 91 | board_mux->reg_offset); |
@@ -906,7 +909,7 @@ static struct omap_mux *omap_mux_get_by_gpio( | |||
906 | u16 omap_mux_get_gpio(int gpio) | 909 | u16 omap_mux_get_gpio(int gpio) |
907 | { | 910 | { |
908 | struct omap_mux_partition *partition; | 911 | struct omap_mux_partition *partition; |
909 | struct omap_mux *m; | 912 | struct omap_mux *m = NULL; |
910 | 913 | ||
911 | list_for_each_entry(partition, &mux_partitions, node) { | 914 | list_for_each_entry(partition, &mux_partitions, node) { |
912 | m = omap_mux_get_by_gpio(partition, gpio); | 915 | m = omap_mux_get_by_gpio(partition, gpio); |
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index 137f321c029f..2132308ad1e4 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h | |||
@@ -323,10 +323,12 @@ int omap3_mux_init(struct omap_board_mux *board_mux, int flags); | |||
323 | 323 | ||
324 | /** | 324 | /** |
325 | * omap4_mux_init() - initialize mux system with board specific set | 325 | * omap4_mux_init() - initialize mux system with board specific set |
326 | * @board_mux: Board specific mux table | 326 | * @board_subset: Board specific mux table |
327 | * @board_wkup_subset: Board specific mux table for wakeup instance | ||
327 | * @flags: OMAP package type used for the board | 328 | * @flags: OMAP package type used for the board |
328 | */ | 329 | */ |
329 | int omap4_mux_init(struct omap_board_mux *board_mux, int flags); | 330 | int omap4_mux_init(struct omap_board_mux *board_subset, |
331 | struct omap_board_mux *board_wkup_subset, int flags); | ||
330 | 332 | ||
331 | /** | 333 | /** |
332 | * omap_mux_init - private mux init function, do not call | 334 | * omap_mux_init - private mux init function, do not call |
diff --git a/arch/arm/mach-omap2/mux44xx.c b/arch/arm/mach-omap2/mux44xx.c index 9a66445112ae..f5a74daab2ff 100644 --- a/arch/arm/mach-omap2/mux44xx.c +++ b/arch/arm/mach-omap2/mux44xx.c | |||
@@ -1309,7 +1309,8 @@ static struct omap_ball __initdata omap4_wkup_cbl_cbs_ball[] = { | |||
1309 | #define omap4_wkup_cbl_cbs_ball NULL | 1309 | #define omap4_wkup_cbl_cbs_ball NULL |
1310 | #endif | 1310 | #endif |
1311 | 1311 | ||
1312 | int __init omap4_mux_init(struct omap_board_mux *board_subset, int flags) | 1312 | int __init omap4_mux_init(struct omap_board_mux *board_subset, |
1313 | struct omap_board_mux *board_wkup_subset, int flags) | ||
1313 | { | 1314 | { |
1314 | struct omap_ball *package_balls_core; | 1315 | struct omap_ball *package_balls_core; |
1315 | struct omap_ball *package_balls_wkup = omap4_wkup_cbl_cbs_ball; | 1316 | struct omap_ball *package_balls_wkup = omap4_wkup_cbl_cbs_ball; |
@@ -1347,7 +1348,7 @@ int __init omap4_mux_init(struct omap_board_mux *board_subset, int flags) | |||
1347 | OMAP_MUX_GPIO_IN_MODE3, | 1348 | OMAP_MUX_GPIO_IN_MODE3, |
1348 | OMAP4_CTRL_MODULE_PAD_WKUP_MUX_PBASE, | 1349 | OMAP4_CTRL_MODULE_PAD_WKUP_MUX_PBASE, |
1349 | OMAP4_CTRL_MODULE_PAD_WKUP_MUX_SIZE, | 1350 | OMAP4_CTRL_MODULE_PAD_WKUP_MUX_SIZE, |
1350 | omap4_wkup_muxmodes, NULL, board_subset, | 1351 | omap4_wkup_muxmodes, NULL, board_wkup_subset, |
1351 | package_balls_wkup); | 1352 | package_balls_wkup); |
1352 | 1353 | ||
1353 | return ret; | 1354 | return ret; |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index e03429453ce7..293fa6cd50e1 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -1628,7 +1628,7 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), | |||
1628 | void *data) | 1628 | void *data) |
1629 | { | 1629 | { |
1630 | struct omap_hwmod *temp_oh; | 1630 | struct omap_hwmod *temp_oh; |
1631 | int ret; | 1631 | int ret = 0; |
1632 | 1632 | ||
1633 | if (!fn) | 1633 | if (!fn) |
1634 | return -EINVAL; | 1634 | return -EINVAL; |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index abc548a0c98d..e1c69ffe0f69 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -5109,7 +5109,7 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | |||
5109 | &omap44xx_iva_seq1_hwmod, | 5109 | &omap44xx_iva_seq1_hwmod, |
5110 | 5110 | ||
5111 | /* kbd class */ | 5111 | /* kbd class */ |
5112 | /* &omap44xx_kbd_hwmod, */ | 5112 | &omap44xx_kbd_hwmod, |
5113 | 5113 | ||
5114 | /* mailbox class */ | 5114 | /* mailbox class */ |
5115 | &omap44xx_mailbox_hwmod, | 5115 | &omap44xx_mailbox_hwmod, |
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c index f47813edd951..58775e3c8476 100644 --- a/arch/arm/mach-omap2/omap_phy_internal.c +++ b/arch/arm/mach-omap2/omap_phy_internal.c | |||
@@ -56,8 +56,10 @@ int omap4430_phy_init(struct device *dev) | |||
56 | /* Power down the phy */ | 56 | /* Power down the phy */ |
57 | __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF); | 57 | __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF); |
58 | 58 | ||
59 | if (!dev) | 59 | if (!dev) { |
60 | iounmap(ctrl_base); | ||
60 | return 0; | 61 | return 0; |
62 | } | ||
61 | 63 | ||
62 | phyclk = clk_get(dev, "ocp2scp_usb_phy_ick"); | 64 | phyclk = clk_get(dev, "ocp2scp_usb_phy_ick"); |
63 | if (IS_ERR(phyclk)) { | 65 | if (IS_ERR(phyclk)) { |
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index a5a83b358ddd..e01da45c0537 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -189,7 +189,7 @@ static struct dentry *pm_dbg_dir; | |||
189 | 189 | ||
190 | static int pm_dbg_init_done; | 190 | static int pm_dbg_init_done; |
191 | 191 | ||
192 | static int __init pm_dbg_init(void); | 192 | static int pm_dbg_init(void); |
193 | 193 | ||
194 | enum { | 194 | enum { |
195 | DEBUG_FILE_COUNTERS = 0, | 195 | DEBUG_FILE_COUNTERS = 0, |
@@ -595,7 +595,7 @@ static int option_set(void *data, u64 val) | |||
595 | 595 | ||
596 | DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n"); | 596 | DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n"); |
597 | 597 | ||
598 | static int __init pm_dbg_init(void) | 598 | static int pm_dbg_init(void) |
599 | { | 599 | { |
600 | int i; | 600 | int i; |
601 | struct dentry *d; | 601 | struct dentry *d; |
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 7fe74067d85f..094279aefe9c 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/gpio.h> | ||
17 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
18 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
19 | #include <linux/apm-emulation.h> | 20 | #include <linux/apm-emulation.h> |
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile index 0d468e96e83e..81695353d8f4 100644 --- a/arch/arm/mach-s3c2410/Makefile +++ b/arch/arm/mach-s3c2410/Makefile | |||
@@ -10,7 +10,6 @@ obj-n := | |||
10 | obj- := | 10 | obj- := |
11 | 11 | ||
12 | obj-$(CONFIG_CPU_S3C2410) += s3c2410.o | 12 | obj-$(CONFIG_CPU_S3C2410) += s3c2410.o |
13 | obj-$(CONFIG_CPU_S3C2410) += irq.o | ||
14 | obj-$(CONFIG_CPU_S3C2410_DMA) += dma.o | 13 | obj-$(CONFIG_CPU_S3C2410_DMA) += dma.o |
15 | obj-$(CONFIG_CPU_S3C2410_DMA) += dma.o | 14 | obj-$(CONFIG_CPU_S3C2410_DMA) += dma.o |
16 | obj-$(CONFIG_S3C2410_PM) += pm.o sleep.o | 15 | obj-$(CONFIG_S3C2410_PM) += pm.o sleep.o |
diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c deleted file mode 100644 index 2854129f8cc7..000000000000 --- a/arch/arm/mach-s3c2410/irq.c +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s3c2410/irq.c | ||
2 | * | ||
3 | * Copyright (c) 2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | #include <linux/init.h> | ||
23 | #include <linux/module.h> | ||
24 | #include <linux/interrupt.h> | ||
25 | #include <linux/ioport.h> | ||
26 | #include <linux/syscore_ops.h> | ||
27 | |||
28 | #include <plat/cpu.h> | ||
29 | #include <plat/pm.h> | ||
30 | |||
31 | struct syscore_ops s3c24xx_irq_syscore_ops = { | ||
32 | .suspend = s3c24xx_irq_suspend, | ||
33 | .resume = s3c24xx_irq_resume, | ||
34 | }; | ||
diff --git a/arch/arm/mach-s5pv210/cpufreq.c b/arch/arm/mach-s5pv210/cpufreq.c index 22046e2f53c2..153af8b359ec 100644 --- a/arch/arm/mach-s5pv210/cpufreq.c +++ b/arch/arm/mach-s5pv210/cpufreq.c | |||
@@ -101,12 +101,14 @@ static void s5pv210_set_refresh(enum s5pv210_dmc_port ch, unsigned long freq) | |||
101 | unsigned long tmp, tmp1; | 101 | unsigned long tmp, tmp1; |
102 | void __iomem *reg = NULL; | 102 | void __iomem *reg = NULL; |
103 | 103 | ||
104 | if (ch == DMC0) | 104 | if (ch == DMC0) { |
105 | reg = (S5P_VA_DMC0 + 0x30); | 105 | reg = (S5P_VA_DMC0 + 0x30); |
106 | else if (ch == DMC1) | 106 | } else if (ch == DMC1) { |
107 | reg = (S5P_VA_DMC1 + 0x30); | 107 | reg = (S5P_VA_DMC1 + 0x30); |
108 | else | 108 | } else { |
109 | printk(KERN_ERR "Cannot find DMC port\n"); | 109 | printk(KERN_ERR "Cannot find DMC port\n"); |
110 | return; | ||
111 | } | ||
110 | 112 | ||
111 | /* Find current DRAM frequency */ | 113 | /* Find current DRAM frequency */ |
112 | tmp = s5pv210_dram_conf[ch].freq; | 114 | tmp = s5pv210_dram_conf[ch].freq; |
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index c95258c274c1..1e2aba23e0d6 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -382,10 +382,8 @@ void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state) | |||
382 | } | 382 | } |
383 | 383 | ||
384 | static struct sh_mobile_sdhi_info sh_sdhi1_platdata = { | 384 | static struct sh_mobile_sdhi_info sh_sdhi1_platdata = { |
385 | .dma_slave_tx = SHDMA_SLAVE_SDHI1_TX, | ||
386 | .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX, | ||
387 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, | 385 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, |
388 | .tmio_caps = MMC_CAP_NONREMOVABLE, | 386 | .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, |
389 | .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 387 | .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
390 | .set_pwr = ag5evm_sdhi1_set_pwr, | 388 | .set_pwr = ag5evm_sdhi1_set_pwr, |
391 | }; | 389 | }; |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 776f20560e72..7e1d37584321 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -126,7 +126,7 @@ | |||
126 | * ------+--------------------+--------------------+------- | 126 | * ------+--------------------+--------------------+------- |
127 | * IRQ0 | ICR1A.IRQ0SA=0010 | SDHI2 card detect | Low | 127 | * IRQ0 | ICR1A.IRQ0SA=0010 | SDHI2 card detect | Low |
128 | * IRQ6 | ICR1A.IRQ6SA=0011 | Ether(LAN9220) | High | 128 | * IRQ6 | ICR1A.IRQ6SA=0011 | Ether(LAN9220) | High |
129 | * IRQ7 | ICR1A.IRQ7SA=0010 | LCD Tuch Panel | Low | 129 | * IRQ7 | ICR1A.IRQ7SA=0010 | LCD Touch Panel | Low |
130 | * IRQ8 | ICR2A.IRQ8SA=0010 | MMC/SD card detect | Low | 130 | * IRQ8 | ICR2A.IRQ8SA=0010 | MMC/SD card detect | Low |
131 | * IRQ9 | ICR2A.IRQ9SA=0010 | KEY(TCA6408) | Low | 131 | * IRQ9 | ICR2A.IRQ9SA=0010 | KEY(TCA6408) | Low |
132 | * IRQ21 | ICR4A.IRQ21SA=0011 | Sensor(ADXL345) | High | 132 | * IRQ21 | ICR4A.IRQ21SA=0011 | Sensor(ADXL345) | High |
@@ -165,10 +165,10 @@ | |||
165 | * USB1 can become Host by r8a66597, and become Function by renesas_usbhs. | 165 | * USB1 can become Host by r8a66597, and become Function by renesas_usbhs. |
166 | * But don't select both drivers in same time. | 166 | * But don't select both drivers in same time. |
167 | * These uses same IRQ number for request_irq(), and aren't supporting | 167 | * These uses same IRQ number for request_irq(), and aren't supporting |
168 | * IRQF_SHARD / IORESOURCE_IRQ_SHAREABLE. | 168 | * IRQF_SHARED / IORESOURCE_IRQ_SHAREABLE. |
169 | * | 169 | * |
170 | * Actually these are old/new version of USB driver. | 170 | * Actually these are old/new version of USB driver. |
171 | * This mean its register will be broken if it supports SHARD IRQ, | 171 | * This mean its register will be broken if it supports shared IRQ, |
172 | */ | 172 | */ |
173 | 173 | ||
174 | /* | 174 | /* |
@@ -562,7 +562,121 @@ out: | |||
562 | clk_put(hdmi_ick); | 562 | clk_put(hdmi_ick); |
563 | } | 563 | } |
564 | 564 | ||
565 | /* USB1 (Host) */ | 565 | /* USBHS0 is connected to CN22 which takes a USB Mini-B plug |
566 | * | ||
567 | * The sh7372 SoC has IRQ7 set aside for USBHS0 hotplug, | ||
568 | * but on this particular board IRQ7 is already used by | ||
569 | * the touch screen. This leaves us with software polling. | ||
570 | */ | ||
571 | #define USBHS0_POLL_INTERVAL (HZ * 5) | ||
572 | |||
573 | struct usbhs_private { | ||
574 | unsigned int usbphyaddr; | ||
575 | unsigned int usbcrcaddr; | ||
576 | struct renesas_usbhs_platform_info info; | ||
577 | struct delayed_work work; | ||
578 | struct platform_device *pdev; | ||
579 | }; | ||
580 | |||
581 | #define usbhs_get_priv(pdev) \ | ||
582 | container_of(renesas_usbhs_get_info(pdev), \ | ||
583 | struct usbhs_private, info) | ||
584 | |||
585 | #define usbhs_is_connected(priv) \ | ||
586 | (!((1 << 7) & __raw_readw(priv->usbcrcaddr))) | ||
587 | |||
588 | static int usbhs_get_vbus(struct platform_device *pdev) | ||
589 | { | ||
590 | return usbhs_is_connected(usbhs_get_priv(pdev)); | ||
591 | } | ||
592 | |||
593 | static void usbhs_phy_reset(struct platform_device *pdev) | ||
594 | { | ||
595 | struct usbhs_private *priv = usbhs_get_priv(pdev); | ||
596 | |||
597 | /* init phy */ | ||
598 | __raw_writew(0x8a0a, priv->usbcrcaddr); | ||
599 | } | ||
600 | |||
601 | static int usbhs0_get_id(struct platform_device *pdev) | ||
602 | { | ||
603 | return USBHS_GADGET; | ||
604 | } | ||
605 | |||
606 | static void usbhs0_work_function(struct work_struct *work) | ||
607 | { | ||
608 | struct usbhs_private *priv = container_of(work, struct usbhs_private, | ||
609 | work.work); | ||
610 | |||
611 | renesas_usbhs_call_notify_hotplug(priv->pdev); | ||
612 | schedule_delayed_work(&priv->work, USBHS0_POLL_INTERVAL); | ||
613 | } | ||
614 | |||
615 | static int usbhs0_hardware_init(struct platform_device *pdev) | ||
616 | { | ||
617 | struct usbhs_private *priv = usbhs_get_priv(pdev); | ||
618 | |||
619 | priv->pdev = pdev; | ||
620 | INIT_DELAYED_WORK(&priv->work, usbhs0_work_function); | ||
621 | schedule_delayed_work(&priv->work, USBHS0_POLL_INTERVAL); | ||
622 | return 0; | ||
623 | } | ||
624 | |||
625 | static void usbhs0_hardware_exit(struct platform_device *pdev) | ||
626 | { | ||
627 | struct usbhs_private *priv = usbhs_get_priv(pdev); | ||
628 | |||
629 | cancel_delayed_work_sync(&priv->work); | ||
630 | } | ||
631 | |||
632 | static struct usbhs_private usbhs0_private = { | ||
633 | .usbcrcaddr = 0xe605810c, /* USBCR2 */ | ||
634 | .info = { | ||
635 | .platform_callback = { | ||
636 | .hardware_init = usbhs0_hardware_init, | ||
637 | .hardware_exit = usbhs0_hardware_exit, | ||
638 | .phy_reset = usbhs_phy_reset, | ||
639 | .get_id = usbhs0_get_id, | ||
640 | .get_vbus = usbhs_get_vbus, | ||
641 | }, | ||
642 | .driver_param = { | ||
643 | .buswait_bwait = 4, | ||
644 | }, | ||
645 | }, | ||
646 | }; | ||
647 | |||
648 | static struct resource usbhs0_resources[] = { | ||
649 | [0] = { | ||
650 | .name = "USBHS0", | ||
651 | .start = 0xe6890000, | ||
652 | .end = 0xe68900e6 - 1, | ||
653 | .flags = IORESOURCE_MEM, | ||
654 | }, | ||
655 | [1] = { | ||
656 | .start = evt2irq(0x1ca0) /* USB0_USB0I0 */, | ||
657 | .flags = IORESOURCE_IRQ, | ||
658 | }, | ||
659 | }; | ||
660 | |||
661 | static struct platform_device usbhs0_device = { | ||
662 | .name = "renesas_usbhs", | ||
663 | .id = 0, | ||
664 | .dev = { | ||
665 | .platform_data = &usbhs0_private.info, | ||
666 | }, | ||
667 | .num_resources = ARRAY_SIZE(usbhs0_resources), | ||
668 | .resource = usbhs0_resources, | ||
669 | }; | ||
670 | |||
671 | /* USBHS1 is connected to CN31 which takes a USB Mini-AB plug | ||
672 | * | ||
673 | * Use J30 to select between Host and Function. This setting | ||
674 | * can however not be detected by software. Hotplug of USBHS1 | ||
675 | * is provided via IRQ8. | ||
676 | */ | ||
677 | #define IRQ8 evt2irq(0x0300) | ||
678 | |||
679 | /* USBHS1 USB Host support via r8a66597_hcd */ | ||
566 | static void usb1_host_port_power(int port, int power) | 680 | static void usb1_host_port_power(int port, int power) |
567 | { | 681 | { |
568 | if (!power) /* only power-on is supported for now */ | 682 | if (!power) /* only power-on is supported for now */ |
@@ -579,9 +693,9 @@ static struct r8a66597_platdata usb1_host_data = { | |||
579 | 693 | ||
580 | static struct resource usb1_host_resources[] = { | 694 | static struct resource usb1_host_resources[] = { |
581 | [0] = { | 695 | [0] = { |
582 | .name = "USBHS", | 696 | .name = "USBHS1", |
583 | .start = 0xE68B0000, | 697 | .start = 0xe68b0000, |
584 | .end = 0xE68B00E6 - 1, | 698 | .end = 0xe68b00e6 - 1, |
585 | .flags = IORESOURCE_MEM, | 699 | .flags = IORESOURCE_MEM, |
586 | }, | 700 | }, |
587 | [1] = { | 701 | [1] = { |
@@ -602,37 +716,14 @@ static struct platform_device usb1_host_device = { | |||
602 | .resource = usb1_host_resources, | 716 | .resource = usb1_host_resources, |
603 | }; | 717 | }; |
604 | 718 | ||
605 | /* USB1 (Function) */ | 719 | /* USBHS1 USB Function support via renesas_usbhs */ |
720 | |||
606 | #define USB_PHY_MODE (1 << 4) | 721 | #define USB_PHY_MODE (1 << 4) |
607 | #define USB_PHY_INT_EN ((1 << 3) | (1 << 2)) | 722 | #define USB_PHY_INT_EN ((1 << 3) | (1 << 2)) |
608 | #define USB_PHY_ON (1 << 1) | 723 | #define USB_PHY_ON (1 << 1) |
609 | #define USB_PHY_OFF (1 << 0) | 724 | #define USB_PHY_OFF (1 << 0) |
610 | #define USB_PHY_INT_CLR (USB_PHY_ON | USB_PHY_OFF) | 725 | #define USB_PHY_INT_CLR (USB_PHY_ON | USB_PHY_OFF) |
611 | 726 | ||
612 | struct usbhs_private { | ||
613 | unsigned int irq; | ||
614 | unsigned int usbphyaddr; | ||
615 | unsigned int usbcrcaddr; | ||
616 | struct renesas_usbhs_platform_info info; | ||
617 | }; | ||
618 | |||
619 | #define usbhs_get_priv(pdev) \ | ||
620 | container_of(renesas_usbhs_get_info(pdev), \ | ||
621 | struct usbhs_private, info) | ||
622 | |||
623 | #define usbhs_is_connected(priv) \ | ||
624 | (!((1 << 7) & __raw_readw(priv->usbcrcaddr))) | ||
625 | |||
626 | static int usbhs1_get_id(struct platform_device *pdev) | ||
627 | { | ||
628 | return USBHS_GADGET; | ||
629 | } | ||
630 | |||
631 | static int usbhs1_get_vbus(struct platform_device *pdev) | ||
632 | { | ||
633 | return usbhs_is_connected(usbhs_get_priv(pdev)); | ||
634 | } | ||
635 | |||
636 | static irqreturn_t usbhs1_interrupt(int irq, void *data) | 727 | static irqreturn_t usbhs1_interrupt(int irq, void *data) |
637 | { | 728 | { |
638 | struct platform_device *pdev = data; | 729 | struct platform_device *pdev = data; |
@@ -654,12 +745,10 @@ static int usbhs1_hardware_init(struct platform_device *pdev) | |||
654 | struct usbhs_private *priv = usbhs_get_priv(pdev); | 745 | struct usbhs_private *priv = usbhs_get_priv(pdev); |
655 | int ret; | 746 | int ret; |
656 | 747 | ||
657 | irq_set_irq_type(priv->irq, IRQ_TYPE_LEVEL_HIGH); | ||
658 | |||
659 | /* clear interrupt status */ | 748 | /* clear interrupt status */ |
660 | __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr); | 749 | __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr); |
661 | 750 | ||
662 | ret = request_irq(priv->irq, usbhs1_interrupt, 0, | 751 | ret = request_irq(IRQ8, usbhs1_interrupt, IRQF_TRIGGER_HIGH, |
663 | dev_name(&pdev->dev), pdev); | 752 | dev_name(&pdev->dev), pdev); |
664 | if (ret) { | 753 | if (ret) { |
665 | dev_err(&pdev->dev, "request_irq err\n"); | 754 | dev_err(&pdev->dev, "request_irq err\n"); |
@@ -679,15 +768,12 @@ static void usbhs1_hardware_exit(struct platform_device *pdev) | |||
679 | /* clear interrupt status */ | 768 | /* clear interrupt status */ |
680 | __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr); | 769 | __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr); |
681 | 770 | ||
682 | free_irq(priv->irq, pdev); | 771 | free_irq(IRQ8, pdev); |
683 | } | 772 | } |
684 | 773 | ||
685 | static void usbhs1_phy_reset(struct platform_device *pdev) | 774 | static int usbhs1_get_id(struct platform_device *pdev) |
686 | { | 775 | { |
687 | struct usbhs_private *priv = usbhs_get_priv(pdev); | 776 | return USBHS_GADGET; |
688 | |||
689 | /* init phy */ | ||
690 | __raw_writew(0x8a0a, priv->usbcrcaddr); | ||
691 | } | 777 | } |
692 | 778 | ||
693 | static u32 usbhs1_pipe_cfg[] = { | 779 | static u32 usbhs1_pipe_cfg[] = { |
@@ -710,16 +796,15 @@ static u32 usbhs1_pipe_cfg[] = { | |||
710 | }; | 796 | }; |
711 | 797 | ||
712 | static struct usbhs_private usbhs1_private = { | 798 | static struct usbhs_private usbhs1_private = { |
713 | .irq = evt2irq(0x0300), /* IRQ8 */ | 799 | .usbphyaddr = 0xe60581e2, /* USBPHY1INTAP */ |
714 | .usbphyaddr = 0xE60581E2, /* USBPHY1INTAP */ | 800 | .usbcrcaddr = 0xe6058130, /* USBCR4 */ |
715 | .usbcrcaddr = 0xE6058130, /* USBCR4 */ | ||
716 | .info = { | 801 | .info = { |
717 | .platform_callback = { | 802 | .platform_callback = { |
718 | .hardware_init = usbhs1_hardware_init, | 803 | .hardware_init = usbhs1_hardware_init, |
719 | .hardware_exit = usbhs1_hardware_exit, | 804 | .hardware_exit = usbhs1_hardware_exit, |
720 | .phy_reset = usbhs1_phy_reset, | ||
721 | .get_id = usbhs1_get_id, | 805 | .get_id = usbhs1_get_id, |
722 | .get_vbus = usbhs1_get_vbus, | 806 | .phy_reset = usbhs_phy_reset, |
807 | .get_vbus = usbhs_get_vbus, | ||
723 | }, | 808 | }, |
724 | .driver_param = { | 809 | .driver_param = { |
725 | .buswait_bwait = 4, | 810 | .buswait_bwait = 4, |
@@ -731,9 +816,9 @@ static struct usbhs_private usbhs1_private = { | |||
731 | 816 | ||
732 | static struct resource usbhs1_resources[] = { | 817 | static struct resource usbhs1_resources[] = { |
733 | [0] = { | 818 | [0] = { |
734 | .name = "USBHS", | 819 | .name = "USBHS1", |
735 | .start = 0xE68B0000, | 820 | .start = 0xe68b0000, |
736 | .end = 0xE68B00E6 - 1, | 821 | .end = 0xe68b00e6 - 1, |
737 | .flags = IORESOURCE_MEM, | 822 | .flags = IORESOURCE_MEM, |
738 | }, | 823 | }, |
739 | [1] = { | 824 | [1] = { |
@@ -752,7 +837,6 @@ static struct platform_device usbhs1_device = { | |||
752 | .resource = usbhs1_resources, | 837 | .resource = usbhs1_resources, |
753 | }; | 838 | }; |
754 | 839 | ||
755 | |||
756 | /* LED */ | 840 | /* LED */ |
757 | static struct gpio_led mackerel_leds[] = { | 841 | static struct gpio_led mackerel_leds[] = { |
758 | { | 842 | { |
@@ -1203,6 +1287,7 @@ static struct platform_device *mackerel_devices[] __initdata = { | |||
1203 | &nor_flash_device, | 1287 | &nor_flash_device, |
1204 | &smc911x_device, | 1288 | &smc911x_device, |
1205 | &lcdc_device, | 1289 | &lcdc_device, |
1290 | &usbhs0_device, | ||
1206 | &usb1_host_device, | 1291 | &usb1_host_device, |
1207 | &usbhs1_device, | 1292 | &usbhs1_device, |
1208 | &leds_device, | 1293 | &leds_device, |
@@ -1301,6 +1386,7 @@ static void __init mackerel_map_io(void) | |||
1301 | 1386 | ||
1302 | #define GPIO_PORT9CR 0xE6051009 | 1387 | #define GPIO_PORT9CR 0xE6051009 |
1303 | #define GPIO_PORT10CR 0xE605100A | 1388 | #define GPIO_PORT10CR 0xE605100A |
1389 | #define GPIO_PORT167CR 0xE60520A7 | ||
1304 | #define GPIO_PORT168CR 0xE60520A8 | 1390 | #define GPIO_PORT168CR 0xE60520A8 |
1305 | #define SRCR4 0xe61580bc | 1391 | #define SRCR4 0xe61580bc |
1306 | #define USCCR1 0xE6058144 | 1392 | #define USCCR1 0xE6058144 |
@@ -1354,17 +1440,17 @@ static void __init mackerel_init(void) | |||
1354 | gpio_request(GPIO_PORT151, NULL); /* LCDDON */ | 1440 | gpio_request(GPIO_PORT151, NULL); /* LCDDON */ |
1355 | gpio_direction_output(GPIO_PORT151, 1); | 1441 | gpio_direction_output(GPIO_PORT151, 1); |
1356 | 1442 | ||
1357 | /* USB enable */ | 1443 | /* USBHS0 */ |
1358 | gpio_request(GPIO_FN_VBUS0_1, NULL); | 1444 | gpio_request(GPIO_FN_VBUS0_0, NULL); |
1359 | gpio_request(GPIO_FN_IDIN_1_18, NULL); | 1445 | gpio_pull_down(GPIO_PORT168CR); /* VBUS0_0 pull down */ |
1360 | gpio_request(GPIO_FN_PWEN_1_115, NULL); | 1446 | |
1361 | gpio_request(GPIO_FN_OVCN_1_114, NULL); | 1447 | /* USBHS1 */ |
1362 | gpio_request(GPIO_FN_EXTLP_1, NULL); | 1448 | gpio_request(GPIO_FN_VBUS0_1, NULL); |
1363 | gpio_request(GPIO_FN_OVCN2_1, NULL); | 1449 | gpio_pull_down(GPIO_PORT167CR); /* VBUS0_1 pull down */ |
1364 | gpio_pull_down(GPIO_PORT168CR); | 1450 | gpio_request(GPIO_FN_IDIN_1_113, NULL); |
1365 | 1451 | ||
1366 | /* setup USB phy */ | 1452 | /* USB phy tweak to make the r8a66597_hcd host driver work */ |
1367 | __raw_writew(0x8a0a, 0xE6058130); /* USBCR4 */ | 1453 | __raw_writew(0x8a0a, 0xe6058130); /* USBCR4 */ |
1368 | 1454 | ||
1369 | /* enable FSI2 port A (ak4643) */ | 1455 | /* enable FSI2 port A (ak4643) */ |
1370 | gpio_request(GPIO_FN_FSIAIBT, NULL); | 1456 | gpio_request(GPIO_FN_FSIAIBT, NULL); |
diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c index 5d0e1503ece6..a911a60e7719 100644 --- a/arch/arm/mach-shmobile/intc-sh73a0.c +++ b/arch/arm/mach-shmobile/intc-sh73a0.c | |||
@@ -250,6 +250,11 @@ static irqreturn_t sh73a0_intcs_demux(int irq, void *dev_id) | |||
250 | return IRQ_HANDLED; | 250 | return IRQ_HANDLED; |
251 | } | 251 | } |
252 | 252 | ||
253 | static int sh73a0_set_wake(struct irq_data *data, unsigned int on) | ||
254 | { | ||
255 | return 0; /* always allow wakeup */ | ||
256 | } | ||
257 | |||
253 | void __init sh73a0_init_irq(void) | 258 | void __init sh73a0_init_irq(void) |
254 | { | 259 | { |
255 | void __iomem *gic_dist_base = __io(0xf0001000); | 260 | void __iomem *gic_dist_base = __io(0xf0001000); |
@@ -257,6 +262,7 @@ void __init sh73a0_init_irq(void) | |||
257 | void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE); | 262 | void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE); |
258 | 263 | ||
259 | gic_init(0, 29, gic_dist_base, gic_cpu_base); | 264 | gic_init(0, 29, gic_dist_base, gic_cpu_base); |
265 | gic_arch_extn.irq_set_wake = sh73a0_set_wake; | ||
260 | 266 | ||
261 | register_intc_controller(&intcs_desc); | 267 | register_intc_controller(&intcs_desc); |
262 | 268 | ||
diff --git a/arch/arm/mach-shmobile/setup-sh7367.c b/arch/arm/mach-shmobile/setup-sh7367.c index 2c10190dbb55..e546017f15de 100644 --- a/arch/arm/mach-shmobile/setup-sh7367.c +++ b/arch/arm/mach-shmobile/setup-sh7367.c | |||
@@ -38,7 +38,7 @@ static struct plat_sci_port scif0_platform_data = { | |||
38 | .flags = UPF_BOOT_AUTOCONF, | 38 | .flags = UPF_BOOT_AUTOCONF, |
39 | .scscr = SCSCR_RE | SCSCR_TE, | 39 | .scscr = SCSCR_RE | SCSCR_TE, |
40 | .scbrr_algo_id = SCBRR_ALGO_4, | 40 | .scbrr_algo_id = SCBRR_ALGO_4, |
41 | .type = PORT_SCIF, | 41 | .type = PORT_SCIFA, |
42 | .irqs = { evt2irq(0xc00), evt2irq(0xc00), | 42 | .irqs = { evt2irq(0xc00), evt2irq(0xc00), |
43 | evt2irq(0xc00), evt2irq(0xc00) }, | 43 | evt2irq(0xc00), evt2irq(0xc00) }, |
44 | }; | 44 | }; |
@@ -57,7 +57,7 @@ static struct plat_sci_port scif1_platform_data = { | |||
57 | .flags = UPF_BOOT_AUTOCONF, | 57 | .flags = UPF_BOOT_AUTOCONF, |
58 | .scscr = SCSCR_RE | SCSCR_TE, | 58 | .scscr = SCSCR_RE | SCSCR_TE, |
59 | .scbrr_algo_id = SCBRR_ALGO_4, | 59 | .scbrr_algo_id = SCBRR_ALGO_4, |
60 | .type = PORT_SCIF, | 60 | .type = PORT_SCIFA, |
61 | .irqs = { evt2irq(0xc20), evt2irq(0xc20), | 61 | .irqs = { evt2irq(0xc20), evt2irq(0xc20), |
62 | evt2irq(0xc20), evt2irq(0xc20) }, | 62 | evt2irq(0xc20), evt2irq(0xc20) }, |
63 | }; | 63 | }; |
@@ -76,7 +76,7 @@ static struct plat_sci_port scif2_platform_data = { | |||
76 | .flags = UPF_BOOT_AUTOCONF, | 76 | .flags = UPF_BOOT_AUTOCONF, |
77 | .scscr = SCSCR_RE | SCSCR_TE, | 77 | .scscr = SCSCR_RE | SCSCR_TE, |
78 | .scbrr_algo_id = SCBRR_ALGO_4, | 78 | .scbrr_algo_id = SCBRR_ALGO_4, |
79 | .type = PORT_SCIF, | 79 | .type = PORT_SCIFA, |
80 | .irqs = { evt2irq(0xc40), evt2irq(0xc40), | 80 | .irqs = { evt2irq(0xc40), evt2irq(0xc40), |
81 | evt2irq(0xc40), evt2irq(0xc40) }, | 81 | evt2irq(0xc40), evt2irq(0xc40) }, |
82 | }; | 82 | }; |
@@ -95,7 +95,7 @@ static struct plat_sci_port scif3_platform_data = { | |||
95 | .flags = UPF_BOOT_AUTOCONF, | 95 | .flags = UPF_BOOT_AUTOCONF, |
96 | .scscr = SCSCR_RE | SCSCR_TE, | 96 | .scscr = SCSCR_RE | SCSCR_TE, |
97 | .scbrr_algo_id = SCBRR_ALGO_4, | 97 | .scbrr_algo_id = SCBRR_ALGO_4, |
98 | .type = PORT_SCIF, | 98 | .type = PORT_SCIFA, |
99 | .irqs = { evt2irq(0xc60), evt2irq(0xc60), | 99 | .irqs = { evt2irq(0xc60), evt2irq(0xc60), |
100 | evt2irq(0xc60), evt2irq(0xc60) }, | 100 | evt2irq(0xc60), evt2irq(0xc60) }, |
101 | }; | 101 | }; |
@@ -114,7 +114,7 @@ static struct plat_sci_port scif4_platform_data = { | |||
114 | .flags = UPF_BOOT_AUTOCONF, | 114 | .flags = UPF_BOOT_AUTOCONF, |
115 | .scscr = SCSCR_RE | SCSCR_TE, | 115 | .scscr = SCSCR_RE | SCSCR_TE, |
116 | .scbrr_algo_id = SCBRR_ALGO_4, | 116 | .scbrr_algo_id = SCBRR_ALGO_4, |
117 | .type = PORT_SCIF, | 117 | .type = PORT_SCIFA, |
118 | .irqs = { evt2irq(0xd20), evt2irq(0xd20), | 118 | .irqs = { evt2irq(0xd20), evt2irq(0xd20), |
119 | evt2irq(0xd20), evt2irq(0xd20) }, | 119 | evt2irq(0xd20), evt2irq(0xd20) }, |
120 | }; | 120 | }; |
@@ -133,7 +133,7 @@ static struct plat_sci_port scif5_platform_data = { | |||
133 | .flags = UPF_BOOT_AUTOCONF, | 133 | .flags = UPF_BOOT_AUTOCONF, |
134 | .scscr = SCSCR_RE | SCSCR_TE, | 134 | .scscr = SCSCR_RE | SCSCR_TE, |
135 | .scbrr_algo_id = SCBRR_ALGO_4, | 135 | .scbrr_algo_id = SCBRR_ALGO_4, |
136 | .type = PORT_SCIF, | 136 | .type = PORT_SCIFA, |
137 | .irqs = { evt2irq(0xd40), evt2irq(0xd40), | 137 | .irqs = { evt2irq(0xd40), evt2irq(0xd40), |
138 | evt2irq(0xd40), evt2irq(0xd40) }, | 138 | evt2irq(0xd40), evt2irq(0xd40) }, |
139 | }; | 139 | }; |
@@ -152,7 +152,7 @@ static struct plat_sci_port scif6_platform_data = { | |||
152 | .flags = UPF_BOOT_AUTOCONF, | 152 | .flags = UPF_BOOT_AUTOCONF, |
153 | .scscr = SCSCR_RE | SCSCR_TE, | 153 | .scscr = SCSCR_RE | SCSCR_TE, |
154 | .scbrr_algo_id = SCBRR_ALGO_4, | 154 | .scbrr_algo_id = SCBRR_ALGO_4, |
155 | .type = PORT_SCIF, | 155 | .type = PORT_SCIFB, |
156 | .irqs = { evt2irq(0xd60), evt2irq(0xd60), | 156 | .irqs = { evt2irq(0xd60), evt2irq(0xd60), |
157 | evt2irq(0xd60), evt2irq(0xd60) }, | 157 | evt2irq(0xd60), evt2irq(0xd60) }, |
158 | }; | 158 | }; |
diff --git a/arch/arm/mach-u300/clock.h b/arch/arm/mach-u300/clock.h index c34f3ea3017c..4f50ca8f901e 100644 --- a/arch/arm/mach-u300/clock.h +++ b/arch/arm/mach-u300/clock.h | |||
@@ -31,7 +31,7 @@ struct clk { | |||
31 | bool reset; | 31 | bool reset; |
32 | __u16 clk_val; | 32 | __u16 clk_val; |
33 | __s8 usecount; | 33 | __s8 usecount; |
34 | __u32 res_reg; | 34 | void __iomem * res_reg; |
35 | __u16 res_mask; | 35 | __u16 res_mask; |
36 | 36 | ||
37 | bool hw_ctrld; | 37 | bool hw_ctrld; |
diff --git a/arch/arm/mach-u300/include/mach/u300-regs.h b/arch/arm/mach-u300/include/mach/u300-regs.h index 8b85df4c8d8f..035fdc9dbdb0 100644 --- a/arch/arm/mach-u300/include/mach/u300-regs.h +++ b/arch/arm/mach-u300/include/mach/u300-regs.h | |||
@@ -18,6 +18,12 @@ | |||
18 | * the defines are used for setting up the I/O memory mapping. | 18 | * the defines are used for setting up the I/O memory mapping. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifdef __ASSEMBLER__ | ||
22 | #define IOMEM(a) (a) | ||
23 | #else | ||
24 | #define IOMEM(a) (void __iomem *) a | ||
25 | #endif | ||
26 | |||
21 | /* NAND Flash CS0 */ | 27 | /* NAND Flash CS0 */ |
22 | #define U300_NAND_CS0_PHYS_BASE 0x80000000 | 28 | #define U300_NAND_CS0_PHYS_BASE 0x80000000 |
23 | 29 | ||
@@ -48,13 +54,6 @@ | |||
48 | #endif | 54 | #endif |
49 | 55 | ||
50 | /* | 56 | /* |
51 | * All the following peripherals are specified at their PHYSICAL address, | ||
52 | * so if you need to access them (in the kernel), you MUST use the macros | ||
53 | * defined in <asm/io.h> to map to the IO_ADDRESS_AHB() IO_ADDRESS_FAST() | ||
54 | * etc. | ||
55 | */ | ||
56 | |||
57 | /* | ||
58 | * AHB peripherals | 57 | * AHB peripherals |
59 | */ | 58 | */ |
60 | 59 | ||
@@ -63,11 +62,11 @@ | |||
63 | 62 | ||
64 | /* Vectored Interrupt Controller 0, servicing 32 interrupts */ | 63 | /* Vectored Interrupt Controller 0, servicing 32 interrupts */ |
65 | #define U300_INTCON0_BASE (U300_AHB_PER_PHYS_BASE+0x1000) | 64 | #define U300_INTCON0_BASE (U300_AHB_PER_PHYS_BASE+0x1000) |
66 | #define U300_INTCON0_VBASE (U300_AHB_PER_VIRT_BASE+0x1000) | 65 | #define U300_INTCON0_VBASE IOMEM(U300_AHB_PER_VIRT_BASE+0x1000) |
67 | 66 | ||
68 | /* Vectored Interrupt Controller 1, servicing 32 interrupts */ | 67 | /* Vectored Interrupt Controller 1, servicing 32 interrupts */ |
69 | #define U300_INTCON1_BASE (U300_AHB_PER_PHYS_BASE+0x2000) | 68 | #define U300_INTCON1_BASE (U300_AHB_PER_PHYS_BASE+0x2000) |
70 | #define U300_INTCON1_VBASE (U300_AHB_PER_VIRT_BASE+0x2000) | 69 | #define U300_INTCON1_VBASE IOMEM(U300_AHB_PER_VIRT_BASE+0x2000) |
71 | 70 | ||
72 | /* Memory Stick Pro (MSPRO) controller */ | 71 | /* Memory Stick Pro (MSPRO) controller */ |
73 | #define U300_MSPRO_BASE (U300_AHB_PER_PHYS_BASE+0x3000) | 72 | #define U300_MSPRO_BASE (U300_AHB_PER_PHYS_BASE+0x3000) |
@@ -115,7 +114,7 @@ | |||
115 | 114 | ||
116 | /* SYSCON */ | 115 | /* SYSCON */ |
117 | #define U300_SYSCON_BASE (U300_SLOW_PER_PHYS_BASE+0x1000) | 116 | #define U300_SYSCON_BASE (U300_SLOW_PER_PHYS_BASE+0x1000) |
118 | #define U300_SYSCON_VBASE (U300_SLOW_PER_VIRT_BASE+0x1000) | 117 | #define U300_SYSCON_VBASE IOMEM(U300_SLOW_PER_VIRT_BASE+0x1000) |
119 | 118 | ||
120 | /* Watchdog */ | 119 | /* Watchdog */ |
121 | #define U300_WDOG_BASE (U300_SLOW_PER_PHYS_BASE+0x2000) | 120 | #define U300_WDOG_BASE (U300_SLOW_PER_PHYS_BASE+0x2000) |
@@ -125,7 +124,7 @@ | |||
125 | 124 | ||
126 | /* APP side special timer */ | 125 | /* APP side special timer */ |
127 | #define U300_TIMER_APP_BASE (U300_SLOW_PER_PHYS_BASE+0x4000) | 126 | #define U300_TIMER_APP_BASE (U300_SLOW_PER_PHYS_BASE+0x4000) |
128 | #define U300_TIMER_APP_VBASE (U300_SLOW_PER_VIRT_BASE+0x4000) | 127 | #define U300_TIMER_APP_VBASE IOMEM(U300_SLOW_PER_VIRT_BASE+0x4000) |
129 | 128 | ||
130 | /* Keypad */ | 129 | /* Keypad */ |
131 | #define U300_KEYPAD_BASE (U300_SLOW_PER_PHYS_BASE+0x5000) | 130 | #define U300_KEYPAD_BASE (U300_SLOW_PER_PHYS_BASE+0x5000) |
@@ -181,5 +180,4 @@ | |||
181 | * Virtual accessor macros for static devices | 180 | * Virtual accessor macros for static devices |
182 | */ | 181 | */ |
183 | 182 | ||
184 | |||
185 | #endif | 183 | #endif |
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index 891cf44591e0..18d7fa0603c2 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c | |||
@@ -411,8 +411,7 @@ static void __init u300_timer_init(void) | |||
411 | /* Use general purpose timer 2 as clock source */ | 411 | /* Use general purpose timer 2 as clock source */ |
412 | if (clocksource_mmio_init(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC, | 412 | if (clocksource_mmio_init(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC, |
413 | "GPT2", rate, 300, 32, clocksource_mmio_readl_up)) | 413 | "GPT2", rate, 300, 32, clocksource_mmio_readl_up)) |
414 | printk(KERN_ERR "timer: failed to initialize clock " | 414 | pr_err("timer: failed to initialize U300 clock source\n"); |
415 | "source %s\n", clocksource_u300_1mhz.name); | ||
416 | 415 | ||
417 | clockevents_calc_mult_shift(&clockevent_u300_1mhz, | 416 | clockevents_calc_mult_shift(&clockevent_u300_1mhz, |
418 | rate, APPTIMER_MIN_RANGE); | 417 | rate, APPTIMER_MIN_RANGE); |
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index c3c417656bd9..4598b06c8c55 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -159,6 +159,9 @@ static void __init db8500_add_gpios(void) | |||
159 | /* No custom data yet */ | 159 | /* No custom data yet */ |
160 | }; | 160 | }; |
161 | 161 | ||
162 | if (cpu_is_u8500v2()) | ||
163 | pdata.supports_sleepmode = true; | ||
164 | |||
162 | dbx500_add_gpios(ARRAY_AND_SIZE(db8500_gpio_base), | 165 | dbx500_add_gpios(ARRAY_AND_SIZE(db8500_gpio_base), |
163 | IRQ_DB8500_GPIO0, &pdata); | 166 | IRQ_DB8500_GPIO0, &pdata); |
164 | } | 167 | } |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 285edcd2da2a..9e6b93b1a043 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -46,12 +46,6 @@ static struct map_desc v2m_io_desc[] __initdata = { | |||
46 | }, | 46 | }, |
47 | }; | 47 | }; |
48 | 48 | ||
49 | static void __init v2m_init_early(void) | ||
50 | { | ||
51 | ct_desc->init_early(); | ||
52 | versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000); | ||
53 | } | ||
54 | |||
55 | static void __init v2m_timer_init(void) | 49 | static void __init v2m_timer_init(void) |
56 | { | 50 | { |
57 | u32 scctrl; | 51 | u32 scctrl; |
@@ -365,6 +359,13 @@ static struct clk_lookup v2m_lookups[] = { | |||
365 | }, | 359 | }, |
366 | }; | 360 | }; |
367 | 361 | ||
362 | static void __init v2m_init_early(void) | ||
363 | { | ||
364 | ct_desc->init_early(); | ||
365 | clkdev_add_table(v2m_lookups, ARRAY_SIZE(v2m_lookups)); | ||
366 | versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000); | ||
367 | } | ||
368 | |||
368 | static void v2m_power_off(void) | 369 | static void v2m_power_off(void) |
369 | { | 370 | { |
370 | if (v2m_cfg_write(SYS_CFG_SHUTDOWN | SYS_CFG_SITE_MB, 0)) | 371 | if (v2m_cfg_write(SYS_CFG_SHUTDOWN | SYS_CFG_SITE_MB, 0)) |
@@ -418,8 +419,6 @@ static void __init v2m_init(void) | |||
418 | { | 419 | { |
419 | int i; | 420 | int i; |
420 | 421 | ||
421 | clkdev_add_table(v2m_lookups, ARRAY_SIZE(v2m_lookups)); | ||
422 | |||
423 | platform_device_register(&v2m_pcie_i2c_device); | 422 | platform_device_register(&v2m_pcie_i2c_device); |
424 | platform_device_register(&v2m_ddc_i2c_device); | 423 | platform_device_register(&v2m_ddc_i2c_device); |
425 | platform_device_register(&v2m_flash_device); | 424 | platform_device_register(&v2m_flash_device); |
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index 8bfae964b133..b0ee9ba3cfab 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -24,7 +24,9 @@ DEFINE_PER_CPU(struct mm_struct *, current_mm); | |||
24 | 24 | ||
25 | /* | 25 | /* |
26 | * We fork()ed a process, and we need a new context for the child | 26 | * We fork()ed a process, and we need a new context for the child |
27 | * to run in. | 27 | * to run in. We reserve version 0 for initial tasks so we will |
28 | * always allocate an ASID. The ASID 0 is reserved for the TTBR | ||
29 | * register changing sequence. | ||
28 | */ | 30 | */ |
29 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 31 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
30 | { | 32 | { |
@@ -34,11 +36,8 @@ void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | |||
34 | 36 | ||
35 | static void flush_context(void) | 37 | static void flush_context(void) |
36 | { | 38 | { |
37 | u32 ttb; | 39 | /* set the reserved ASID before flushing the TLB */ |
38 | /* Copy TTBR1 into TTBR0 */ | 40 | asm("mcr p15, 0, %0, c13, c0, 1\n" : : "r" (0)); |
39 | asm volatile("mrc p15, 0, %0, c2, c0, 1\n" | ||
40 | "mcr p15, 0, %0, c2, c0, 0" | ||
41 | : "=r" (ttb)); | ||
42 | isb(); | 41 | isb(); |
43 | local_flush_tlb_all(); | 42 | local_flush_tlb_all(); |
44 | if (icache_is_vivt_asid_tagged()) { | 43 | if (icache_is_vivt_asid_tagged()) { |
@@ -94,7 +93,7 @@ static void reset_context(void *info) | |||
94 | return; | 93 | return; |
95 | 94 | ||
96 | smp_rmb(); | 95 | smp_rmb(); |
97 | asid = cpu_last_asid + cpu; | 96 | asid = cpu_last_asid + cpu + 1; |
98 | 97 | ||
99 | flush_context(); | 98 | flush_context(); |
100 | set_mm_context(mm, asid); | 99 | set_mm_context(mm, asid); |
@@ -144,13 +143,13 @@ void __new_context(struct mm_struct *mm) | |||
144 | * to start a new version and flush the TLB. | 143 | * to start a new version and flush the TLB. |
145 | */ | 144 | */ |
146 | if (unlikely((asid & ~ASID_MASK) == 0)) { | 145 | if (unlikely((asid & ~ASID_MASK) == 0)) { |
147 | asid = cpu_last_asid + smp_processor_id(); | 146 | asid = cpu_last_asid + smp_processor_id() + 1; |
148 | flush_context(); | 147 | flush_context(); |
149 | #ifdef CONFIG_SMP | 148 | #ifdef CONFIG_SMP |
150 | smp_wmb(); | 149 | smp_wmb(); |
151 | smp_call_function(reset_context, NULL, 1); | 150 | smp_call_function(reset_context, NULL, 1); |
152 | #endif | 151 | #endif |
153 | cpu_last_asid += NR_CPUS - 1; | 152 | cpu_last_asid += NR_CPUS; |
154 | } | 153 | } |
155 | 154 | ||
156 | set_mm_context(mm, asid); | 155 | set_mm_context(mm, asid); |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 2c2cce9cd8c8..c19571c40a21 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -331,6 +331,12 @@ void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) | |||
331 | #endif | 331 | #endif |
332 | #ifdef CONFIG_BLK_DEV_INITRD | 332 | #ifdef CONFIG_BLK_DEV_INITRD |
333 | if (phys_initrd_size && | 333 | if (phys_initrd_size && |
334 | !memblock_is_region_memory(phys_initrd_start, phys_initrd_size)) { | ||
335 | pr_err("INITRD: 0x%08lx+0x%08lx is not a memory region - disabling initrd\n", | ||
336 | phys_initrd_start, phys_initrd_size); | ||
337 | phys_initrd_start = phys_initrd_size = 0; | ||
338 | } | ||
339 | if (phys_initrd_size && | ||
334 | memblock_is_region_reserved(phys_initrd_start, phys_initrd_size)) { | 340 | memblock_is_region_reserved(phys_initrd_start, phys_initrd_size)) { |
335 | pr_err("INITRD: 0x%08lx+0x%08lx overlaps in-use memory region - disabling initrd\n", | 341 | pr_err("INITRD: 0x%08lx+0x%08lx overlaps in-use memory region - disabling initrd\n", |
336 | phys_initrd_start, phys_initrd_size); | 342 | phys_initrd_start, phys_initrd_size); |
@@ -635,7 +641,8 @@ void __init mem_init(void) | |||
635 | " modules : 0x%08lx - 0x%08lx (%4ld MB)\n" | 641 | " modules : 0x%08lx - 0x%08lx (%4ld MB)\n" |
636 | " .init : 0x%p" " - 0x%p" " (%4d kB)\n" | 642 | " .init : 0x%p" " - 0x%p" " (%4d kB)\n" |
637 | " .text : 0x%p" " - 0x%p" " (%4d kB)\n" | 643 | " .text : 0x%p" " - 0x%p" " (%4d kB)\n" |
638 | " .data : 0x%p" " - 0x%p" " (%4d kB)\n", | 644 | " .data : 0x%p" " - 0x%p" " (%4d kB)\n" |
645 | " .bss : 0x%p" " - 0x%p" " (%4d kB)\n", | ||
639 | 646 | ||
640 | MLK(UL(CONFIG_VECTORS_BASE), UL(CONFIG_VECTORS_BASE) + | 647 | MLK(UL(CONFIG_VECTORS_BASE), UL(CONFIG_VECTORS_BASE) + |
641 | (PAGE_SIZE)), | 648 | (PAGE_SIZE)), |
@@ -657,7 +664,8 @@ void __init mem_init(void) | |||
657 | 664 | ||
658 | MLK_ROUNDUP(__init_begin, __init_end), | 665 | MLK_ROUNDUP(__init_begin, __init_end), |
659 | MLK_ROUNDUP(_text, _etext), | 666 | MLK_ROUNDUP(_text, _etext), |
660 | MLK_ROUNDUP(_sdata, _edata)); | 667 | MLK_ROUNDUP(_sdata, _edata), |
668 | MLK_ROUNDUP(__bss_start, __bss_stop)); | ||
661 | 669 | ||
662 | #undef MLK | 670 | #undef MLK |
663 | #undef MLM | 671 | #undef MLM |
diff --git a/arch/arm/mm/proc-arm7tdmi.S b/arch/arm/mm/proc-arm7tdmi.S index e4c165ca6696..537ffcb0646d 100644 --- a/arch/arm/mm/proc-arm7tdmi.S +++ b/arch/arm/mm/proc-arm7tdmi.S | |||
@@ -146,7 +146,7 @@ __arm7tdmi_proc_info: | |||
146 | .long 0 | 146 | .long 0 |
147 | .long 0 | 147 | .long 0 |
148 | .long v4_cache_fns | 148 | .long v4_cache_fns |
149 | .size __arm7tdmi_proc_info, . - __arm7dmi_proc_info | 149 | .size __arm7tdmi_proc_info, . - __arm7tdmi_proc_info |
150 | 150 | ||
151 | .type __triscenda7_proc_info, #object | 151 | .type __triscenda7_proc_info, #object |
152 | __triscenda7_proc_info: | 152 | __triscenda7_proc_info: |
diff --git a/arch/arm/mm/proc-arm9tdmi.S b/arch/arm/mm/proc-arm9tdmi.S index 7b7ebd4d096d..546b54da1005 100644 --- a/arch/arm/mm/proc-arm9tdmi.S +++ b/arch/arm/mm/proc-arm9tdmi.S | |||
@@ -116,7 +116,7 @@ __arm9tdmi_proc_info: | |||
116 | .long 0 | 116 | .long 0 |
117 | .long 0 | 117 | .long 0 |
118 | .long v4_cache_fns | 118 | .long v4_cache_fns |
119 | .size __arm9tdmi_proc_info, . - __arm9dmi_proc_info | 119 | .size __arm9tdmi_proc_info, . - __arm9tdmi_proc_info |
120 | 120 | ||
121 | .type __p2001_proc_info, #object | 121 | .type __p2001_proc_info, #object |
122 | __p2001_proc_info: | 122 | __p2001_proc_info: |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index b3b566ec83d3..3c3867850a30 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -108,16 +108,18 @@ ENTRY(cpu_v7_switch_mm) | |||
108 | #ifdef CONFIG_ARM_ERRATA_430973 | 108 | #ifdef CONFIG_ARM_ERRATA_430973 |
109 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB | 109 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB |
110 | #endif | 110 | #endif |
111 | mrc p15, 0, r2, c2, c0, 1 @ load TTB 1 | 111 | #ifdef CONFIG_ARM_ERRATA_754322 |
112 | mcr p15, 0, r2, c2, c0, 0 @ into TTB 0 | 112 | dsb |
113 | #endif | ||
114 | mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID | ||
115 | isb | ||
116 | 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | ||
113 | isb | 117 | isb |
114 | #ifdef CONFIG_ARM_ERRATA_754322 | 118 | #ifdef CONFIG_ARM_ERRATA_754322 |
115 | dsb | 119 | dsb |
116 | #endif | 120 | #endif |
117 | mcr p15, 0, r1, c13, c0, 1 @ set context ID | 121 | mcr p15, 0, r1, c13, c0, 1 @ set context ID |
118 | isb | 122 | isb |
119 | mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | ||
120 | isb | ||
121 | #endif | 123 | #endif |
122 | mov pc, lr | 124 | mov pc, lr |
123 | ENDPROC(cpu_v7_switch_mm) | 125 | ENDPROC(cpu_v7_switch_mm) |
diff --git a/arch/arm/plat-mxc/avic.c b/arch/arm/plat-mxc/avic.c index 09e2bd0fcdca..55d2534ec727 100644 --- a/arch/arm/plat-mxc/avic.c +++ b/arch/arm/plat-mxc/avic.c | |||
@@ -46,6 +46,8 @@ | |||
46 | #define AVIC_FIPNDH 0x60 /* fast int pending high */ | 46 | #define AVIC_FIPNDH 0x60 /* fast int pending high */ |
47 | #define AVIC_FIPNDL 0x64 /* fast int pending low */ | 47 | #define AVIC_FIPNDL 0x64 /* fast int pending low */ |
48 | 48 | ||
49 | #define AVIC_NUM_IRQS 64 | ||
50 | |||
49 | void __iomem *avic_base; | 51 | void __iomem *avic_base; |
50 | 52 | ||
51 | #ifdef CONFIG_MXC_IRQ_PRIOR | 53 | #ifdef CONFIG_MXC_IRQ_PRIOR |
@@ -54,7 +56,7 @@ static int avic_irq_set_priority(unsigned char irq, unsigned char prio) | |||
54 | unsigned int temp; | 56 | unsigned int temp; |
55 | unsigned int mask = 0x0F << irq % 8 * 4; | 57 | unsigned int mask = 0x0F << irq % 8 * 4; |
56 | 58 | ||
57 | if (irq >= MXC_INTERNAL_IRQS) | 59 | if (irq >= AVIC_NUM_IRQS) |
58 | return -EINVAL;; | 60 | return -EINVAL;; |
59 | 61 | ||
60 | temp = __raw_readl(avic_base + AVIC_NIPRIORITY(irq / 8)); | 62 | temp = __raw_readl(avic_base + AVIC_NIPRIORITY(irq / 8)); |
@@ -72,14 +74,14 @@ static int avic_set_irq_fiq(unsigned int irq, unsigned int type) | |||
72 | { | 74 | { |
73 | unsigned int irqt; | 75 | unsigned int irqt; |
74 | 76 | ||
75 | if (irq >= MXC_INTERNAL_IRQS) | 77 | if (irq >= AVIC_NUM_IRQS) |
76 | return -EINVAL; | 78 | return -EINVAL; |
77 | 79 | ||
78 | if (irq < MXC_INTERNAL_IRQS / 2) { | 80 | if (irq < AVIC_NUM_IRQS / 2) { |
79 | irqt = __raw_readl(avic_base + AVIC_INTTYPEL) & ~(1 << irq); | 81 | irqt = __raw_readl(avic_base + AVIC_INTTYPEL) & ~(1 << irq); |
80 | __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEL); | 82 | __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEL); |
81 | } else { | 83 | } else { |
82 | irq -= MXC_INTERNAL_IRQS / 2; | 84 | irq -= AVIC_NUM_IRQS / 2; |
83 | irqt = __raw_readl(avic_base + AVIC_INTTYPEH) & ~(1 << irq); | 85 | irqt = __raw_readl(avic_base + AVIC_INTTYPEH) & ~(1 << irq); |
84 | __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEH); | 86 | __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEH); |
85 | } | 87 | } |
@@ -138,7 +140,7 @@ void __init mxc_init_irq(void __iomem *irqbase) | |||
138 | /* all IRQ no FIQ */ | 140 | /* all IRQ no FIQ */ |
139 | __raw_writel(0, avic_base + AVIC_INTTYPEH); | 141 | __raw_writel(0, avic_base + AVIC_INTTYPEH); |
140 | __raw_writel(0, avic_base + AVIC_INTTYPEL); | 142 | __raw_writel(0, avic_base + AVIC_INTTYPEL); |
141 | for (i = 0; i < MXC_INTERNAL_IRQS; i++) { | 143 | for (i = 0; i < AVIC_NUM_IRQS; i++) { |
142 | irq_set_chip_and_handler(i, &mxc_avic_chip.base, | 144 | irq_set_chip_and_handler(i, &mxc_avic_chip.base, |
143 | handle_level_irq); | 145 | handle_level_irq); |
144 | set_irq_flags(i, IRQF_VALID); | 146 | set_irq_flags(i, IRQF_VALID); |
diff --git a/arch/arm/plat-mxc/devices/platform-imx-dma.c b/arch/arm/plat-mxc/devices/platform-imx-dma.c index 3538b85ede91..c64f015e031b 100644 --- a/arch/arm/plat-mxc/devices/platform-imx-dma.c +++ b/arch/arm/plat-mxc/devices/platform-imx-dma.c | |||
@@ -33,22 +33,22 @@ struct imx_imx_sdma_data { | |||
33 | 33 | ||
34 | #ifdef CONFIG_SOC_IMX25 | 34 | #ifdef CONFIG_SOC_IMX25 |
35 | struct imx_imx_sdma_data imx25_imx_sdma_data __initconst = | 35 | struct imx_imx_sdma_data imx25_imx_sdma_data __initconst = |
36 | imx_imx_sdma_data_entry_single(MX25, 1, "imx25", 0); | 36 | imx_imx_sdma_data_entry_single(MX25, 2, "imx25", 1); |
37 | #endif /* ifdef CONFIG_SOC_IMX25 */ | 37 | #endif /* ifdef CONFIG_SOC_IMX25 */ |
38 | 38 | ||
39 | #ifdef CONFIG_SOC_IMX31 | 39 | #ifdef CONFIG_SOC_IMX31 |
40 | struct imx_imx_sdma_data imx31_imx_sdma_data __initdata = | 40 | struct imx_imx_sdma_data imx31_imx_sdma_data __initdata = |
41 | imx_imx_sdma_data_entry_single(MX31, 1, "imx31", 0); | 41 | imx_imx_sdma_data_entry_single(MX31, 1, "imx31", 1); |
42 | #endif /* ifdef CONFIG_SOC_IMX31 */ | 42 | #endif /* ifdef CONFIG_SOC_IMX31 */ |
43 | 43 | ||
44 | #ifdef CONFIG_SOC_IMX35 | 44 | #ifdef CONFIG_SOC_IMX35 |
45 | struct imx_imx_sdma_data imx35_imx_sdma_data __initdata = | 45 | struct imx_imx_sdma_data imx35_imx_sdma_data __initdata = |
46 | imx_imx_sdma_data_entry_single(MX35, 2, "imx35", 0); | 46 | imx_imx_sdma_data_entry_single(MX35, 2, "imx35", 1); |
47 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 47 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
48 | 48 | ||
49 | #ifdef CONFIG_SOC_IMX51 | 49 | #ifdef CONFIG_SOC_IMX51 |
50 | struct imx_imx_sdma_data imx51_imx_sdma_data __initconst = | 50 | struct imx_imx_sdma_data imx51_imx_sdma_data __initconst = |
51 | imx_imx_sdma_data_entry_single(MX51, 2, "imx51", 0); | 51 | imx_imx_sdma_data_entry_single(MX51, 2, "imx51", 1); |
52 | #endif /* ifdef CONFIG_SOC_IMX51 */ | 52 | #endif /* ifdef CONFIG_SOC_IMX51 */ |
53 | 53 | ||
54 | static struct platform_device __init __maybe_unused *imx_add_imx_sdma( | 54 | static struct platform_device __init __maybe_unused *imx_add_imx_sdma( |
@@ -57,7 +57,7 @@ static struct platform_device __init __maybe_unused *imx_add_imx_sdma( | |||
57 | struct resource res[] = { | 57 | struct resource res[] = { |
58 | { | 58 | { |
59 | .start = data->iobase, | 59 | .start = data->iobase, |
60 | .end = data->iobase + SZ_4K - 1, | 60 | .end = data->iobase + SZ_16K - 1, |
61 | .flags = IORESOURCE_MEM, | 61 | .flags = IORESOURCE_MEM, |
62 | }, { | 62 | }, { |
63 | .start = data->irq, | 63 | .start = data->irq, |
@@ -77,7 +77,7 @@ static struct platform_device __init __maybe_unused *imx_add_imx_dma(void) | |||
77 | } | 77 | } |
78 | 78 | ||
79 | #ifdef CONFIG_ARCH_MX25 | 79 | #ifdef CONFIG_ARCH_MX25 |
80 | static struct sdma_script_start_addrs addr_imx25_to1 = { | 80 | static struct sdma_script_start_addrs addr_imx25 = { |
81 | .ap_2_ap_addr = 729, | 81 | .ap_2_ap_addr = 729, |
82 | .uart_2_mcu_addr = 904, | 82 | .uart_2_mcu_addr = 904, |
83 | .per_2_app_addr = 1255, | 83 | .per_2_app_addr = 1255, |
@@ -139,7 +139,7 @@ static struct sdma_script_start_addrs addr_imx35_to2 = { | |||
139 | #endif | 139 | #endif |
140 | 140 | ||
141 | #ifdef CONFIG_SOC_IMX51 | 141 | #ifdef CONFIG_SOC_IMX51 |
142 | static struct sdma_script_start_addrs addr_imx51_to1 = { | 142 | static struct sdma_script_start_addrs addr_imx51 = { |
143 | .ap_2_ap_addr = 642, | 143 | .ap_2_ap_addr = 642, |
144 | .uart_2_mcu_addr = 817, | 144 | .uart_2_mcu_addr = 817, |
145 | .mcu_2_app_addr = 747, | 145 | .mcu_2_app_addr = 747, |
@@ -165,7 +165,7 @@ static int __init imxXX_add_imx_dma(void) | |||
165 | 165 | ||
166 | #if defined(CONFIG_SOC_IMX25) | 166 | #if defined(CONFIG_SOC_IMX25) |
167 | if (cpu_is_mx25()) { | 167 | if (cpu_is_mx25()) { |
168 | imx25_imx_sdma_data.pdata.script_addrs = &addr_imx25_to1; | 168 | imx25_imx_sdma_data.pdata.script_addrs = &addr_imx25; |
169 | ret = imx_add_imx_sdma(&imx25_imx_sdma_data); | 169 | ret = imx_add_imx_sdma(&imx25_imx_sdma_data); |
170 | } else | 170 | } else |
171 | #endif | 171 | #endif |
@@ -196,7 +196,9 @@ static int __init imxXX_add_imx_dma(void) | |||
196 | 196 | ||
197 | #if defined(CONFIG_SOC_IMX51) | 197 | #if defined(CONFIG_SOC_IMX51) |
198 | if (cpu_is_mx51()) { | 198 | if (cpu_is_mx51()) { |
199 | imx51_imx_sdma_data.pdata.script_addrs = &addr_imx51_to1; | 199 | int to_version = mx51_revision() >> 4; |
200 | imx51_imx_sdma_data.pdata.to_version = to_version; | ||
201 | imx51_imx_sdma_data.pdata.script_addrs = &addr_imx51; | ||
200 | ret = imx_add_imx_sdma(&imx51_imx_sdma_data); | 202 | ret = imx_add_imx_sdma(&imx51_imx_sdma_data); |
201 | } else | 203 | } else |
202 | #endif | 204 | #endif |
diff --git a/arch/arm/plat-mxc/devices/platform-imx-ssi.c b/arch/arm/plat-mxc/devices/platform-imx-ssi.c index 2569c8d8a2ef..66b8593e9b69 100644 --- a/arch/arm/plat-mxc/devices/platform-imx-ssi.c +++ b/arch/arm/plat-mxc/devices/platform-imx-ssi.c | |||
@@ -69,7 +69,7 @@ const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst = { | |||
69 | #ifdef CONFIG_SOC_IMX51 | 69 | #ifdef CONFIG_SOC_IMX51 |
70 | const struct imx_imx_ssi_data imx51_imx_ssi_data[] __initconst = { | 70 | const struct imx_imx_ssi_data imx51_imx_ssi_data[] __initconst = { |
71 | #define imx51_imx_ssi_data_entry(_id, _hwid) \ | 71 | #define imx51_imx_ssi_data_entry(_id, _hwid) \ |
72 | imx_imx_ssi_data_entry(MX51, _id, _hwid, SZ_4K) | 72 | imx_imx_ssi_data_entry(MX51, _id, _hwid, SZ_16K) |
73 | imx51_imx_ssi_data_entry(0, 1), | 73 | imx51_imx_ssi_data_entry(0, 1), |
74 | imx51_imx_ssi_data_entry(1, 2), | 74 | imx51_imx_ssi_data_entry(1, 2), |
75 | imx51_imx_ssi_data_entry(2, 3), | 75 | imx51_imx_ssi_data_entry(2, 3), |
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S index 8e8d175e5077..91fc7cdb5dc9 100644 --- a/arch/arm/plat-mxc/include/mach/debug-macro.S +++ b/arch/arm/plat-mxc/include/mach/debug-macro.S | |||
@@ -12,32 +12,32 @@ | |||
12 | */ | 12 | */ |
13 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
14 | 14 | ||
15 | #ifdef CONFIG_ARCH_MX1 | 15 | #ifdef CONFIG_SOC_IMX1 |
16 | #define UART_PADDR MX1_UART1_BASE_ADDR | 16 | #define UART_PADDR MX1_UART1_BASE_ADDR |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | #ifdef CONFIG_ARCH_MX25 | 19 | #ifdef CONFIG_SOC_IMX25 |
20 | #ifdef UART_PADDR | 20 | #ifdef UART_PADDR |
21 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | 21 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" |
22 | #endif | 22 | #endif |
23 | #define UART_PADDR MX25_UART1_BASE_ADDR | 23 | #define UART_PADDR MX25_UART1_BASE_ADDR |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #ifdef CONFIG_ARCH_MX2 | 26 | #if defined(CONFIG_SOC_IMX21) || defined (CONFIG_SOC_IMX27) |
27 | #ifdef UART_PADDR | 27 | #ifdef UART_PADDR |
28 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | 28 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" |
29 | #endif | 29 | #endif |
30 | #define UART_PADDR MX2x_UART1_BASE_ADDR | 30 | #define UART_PADDR MX2x_UART1_BASE_ADDR |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #ifdef CONFIG_ARCH_MX3 | 33 | #if defined(CONFIG_SOC_IMX31) || defined(CONFIG_SOC_IMX35) |
34 | #ifdef UART_PADDR | 34 | #ifdef UART_PADDR |
35 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | 35 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" |
36 | #endif | 36 | #endif |
37 | #define UART_PADDR MX3x_UART1_BASE_ADDR | 37 | #define UART_PADDR MX3x_UART1_BASE_ADDR |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #ifdef CONFIG_ARCH_MX5 | 40 | #ifdef CONFIG_SOC_IMX51 |
41 | #ifdef UART_PADDR | 41 | #ifdef UART_PADDR |
42 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | 42 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" |
43 | #endif | 43 | #endif |
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h index 67d3e2bed065..a8bfd565dcad 100644 --- a/arch/arm/plat-mxc/include/mach/hardware.h +++ b/arch/arm/plat-mxc/include/mach/hardware.h | |||
@@ -97,35 +97,17 @@ | |||
97 | 97 | ||
98 | #include <mach/mxc.h> | 98 | #include <mach/mxc.h> |
99 | 99 | ||
100 | #ifdef CONFIG_ARCH_MX5 | ||
101 | #include <mach/mx50.h> | 100 | #include <mach/mx50.h> |
102 | #include <mach/mx51.h> | 101 | #include <mach/mx51.h> |
103 | #include <mach/mx53.h> | 102 | #include <mach/mx53.h> |
104 | #endif | ||
105 | |||
106 | #ifdef CONFIG_ARCH_MX3 | ||
107 | #include <mach/mx3x.h> | 103 | #include <mach/mx3x.h> |
108 | #include <mach/mx31.h> | 104 | #include <mach/mx31.h> |
109 | #include <mach/mx35.h> | 105 | #include <mach/mx35.h> |
110 | #endif | 106 | #include <mach/mx2x.h> |
111 | 107 | #include <mach/mx21.h> | |
112 | #ifdef CONFIG_ARCH_MX2 | 108 | #include <mach/mx27.h> |
113 | # include <mach/mx2x.h> | 109 | #include <mach/mx1.h> |
114 | # ifdef CONFIG_MACH_MX21 | 110 | #include <mach/mx25.h> |
115 | # include <mach/mx21.h> | ||
116 | # endif | ||
117 | # ifdef CONFIG_MACH_MX27 | ||
118 | # include <mach/mx27.h> | ||
119 | # endif | ||
120 | #endif | ||
121 | |||
122 | #ifdef CONFIG_ARCH_MX1 | ||
123 | # include <mach/mx1.h> | ||
124 | #endif | ||
125 | |||
126 | #ifdef CONFIG_ARCH_MX25 | ||
127 | # include <mach/mx25.h> | ||
128 | #endif | ||
129 | 111 | ||
130 | #define imx_map_entry(soc, name, _type) { \ | 112 | #define imx_map_entry(soc, name, _type) { \ |
131 | .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \ | 113 | .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \ |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx53.h b/arch/arm/plat-mxc/include/mach/iomux-mx53.h index e95d9cb8aeb7..e11dd5f09c34 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx53.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx53.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #define _MX53_PAD_GPIO_19__ECSPI1_RDY IOMUX_PAD(0x348, 0x20, 5, 0x0, 0, 0) | 39 | #define _MX53_PAD_GPIO_19__ECSPI1_RDY IOMUX_PAD(0x348, 0x20, 5, 0x0, 0, 0) |
40 | #define _MX53_PAD_GPIO_19__FEC_TDATA_3 IOMUX_PAD(0x348, 0x20, 6, 0x0, 0, 0) | 40 | #define _MX53_PAD_GPIO_19__FEC_TDATA_3 IOMUX_PAD(0x348, 0x20, 6, 0x0, 0, 0) |
41 | #define _MX53_PAD_GPIO_19__SRC_INT_BOOT IOMUX_PAD(0x348, 0x20,7, 0x0, 0, 0) | 41 | #define _MX53_PAD_GPIO_19__SRC_INT_BOOT IOMUX_PAD(0x348, 0x20,7, 0x0, 0, 0) |
42 | #define _MX53_PAD_KEY_COL0__KPP_COL_0 IOMUX_PAD(0x34C, 0x24, o, 0x0, 0, 0) | 42 | #define _MX53_PAD_KEY_COL0__KPP_COL_0 IOMUX_PAD(0x34C, 0x24, 0, 0x0, 0, 0) |
43 | #define _MX53_PAD_KEY_COL0__GPIO4_6 IOMUX_PAD(0x34C, 0x24, 1, 0x0, 0, 0) | 43 | #define _MX53_PAD_KEY_COL0__GPIO4_6 IOMUX_PAD(0x34C, 0x24, 1, 0x0, 0, 0) |
44 | #define _MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC IOMUX_PAD(0x34C, 0x24, 2, 0x758, 0, 0) | 44 | #define _MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC IOMUX_PAD(0x34C, 0x24, 2, 0x758, 0, 0) |
45 | #define _MX53_PAD_KEY_COL0__UART4_TXD_MUX IOMUX_PAD(0x34C, 0x24, 4, 0x890, 0, 0) | 45 | #define _MX53_PAD_KEY_COL0__UART4_TXD_MUX IOMUX_PAD(0x34C, 0x24, 4, 0x890, 0, 0) |
@@ -697,7 +697,7 @@ | |||
697 | #define _MX53_PAD_EIM_DA5__GPIO3_5 IOMUX_PAD(0x500, 0x1B0, 1, 0x0, 0, 0) | 697 | #define _MX53_PAD_EIM_DA5__GPIO3_5 IOMUX_PAD(0x500, 0x1B0, 1, 0x0, 0, 0) |
698 | #define _MX53_PAD_EIM_DA5__IPU_DISP1_DAT_4 IOMUX_PAD(0x500, 0x1B0, 3, 0x0, 0, 0) | 698 | #define _MX53_PAD_EIM_DA5__IPU_DISP1_DAT_4 IOMUX_PAD(0x500, 0x1B0, 3, 0x0, 0, 0) |
699 | #define _MX53_PAD_EIM_DA5__IPU_CSI1_D_4 IOMUX_PAD(0x500, 0x1B0, 4, 0x0, 0, 0) | 699 | #define _MX53_PAD_EIM_DA5__IPU_CSI1_D_4 IOMUX_PAD(0x500, 0x1B0, 4, 0x0, 0, 0) |
700 | #define _MX53_PAD_EIM_DA5__SRC_BT_CFG3_6 IOMUX_PAD(0x500, 0x1B0, 17, 0x0, 0, 0) | 700 | #define _MX53_PAD_EIM_DA5__SRC_BT_CFG3_6 IOMUX_PAD(0x500, 0x1B0, 7 | IOMUX_CONFIG_SION, 0x0, 0, 0) |
701 | #define _MX53_PAD_EIM_DA6__EMI_NAND_WEIM_DA_6 IOMUX_PAD(0x504, 0x1B4, 0, 0x0, 0, 0) | 701 | #define _MX53_PAD_EIM_DA6__EMI_NAND_WEIM_DA_6 IOMUX_PAD(0x504, 0x1B4, 0, 0x0, 0, 0) |
702 | #define _MX53_PAD_EIM_DA6__GPIO3_6 IOMUX_PAD(0x504, 0x1B4, 1, 0x0, 0, 0) | 702 | #define _MX53_PAD_EIM_DA6__GPIO3_6 IOMUX_PAD(0x504, 0x1B4, 1, 0x0, 0, 0) |
703 | #define _MX53_PAD_EIM_DA6__IPU_DISP1_DAT_3 IOMUX_PAD(0x504, 0x1B4, 3, 0x0, 0, 0) | 703 | #define _MX53_PAD_EIM_DA6__IPU_DISP1_DAT_3 IOMUX_PAD(0x504, 0x1B4, 3, 0x0, 0, 0) |
@@ -958,12 +958,12 @@ | |||
958 | #define _MX53_PAD_PATA_DATA5__ESDHC4_DAT5 IOMUX_PAD(0x63C, 0x2B8, 4, 0x0, 0, 0) | 958 | #define _MX53_PAD_PATA_DATA5__ESDHC4_DAT5 IOMUX_PAD(0x63C, 0x2B8, 4, 0x0, 0, 0) |
959 | #define _MX53_PAD_PATA_DATA5__GPU3d_GPU_DEBUG_OUT_5 IOMUX_PAD(0x63C, 0x2B8, 5, 0x0, 0, 0) | 959 | #define _MX53_PAD_PATA_DATA5__GPU3d_GPU_DEBUG_OUT_5 IOMUX_PAD(0x63C, 0x2B8, 5, 0x0, 0, 0) |
960 | #define _MX53_PAD_PATA_DATA5__IPU_DIAG_BUS_5 IOMUX_PAD(0x63C, 0x2B8, 6, 0x0, 0, 0) | 960 | #define _MX53_PAD_PATA_DATA5__IPU_DIAG_BUS_5 IOMUX_PAD(0x63C, 0x2B8, 6, 0x0, 0, 0) |
961 | #define _MX53_PAD_PATA_DATA6__PATA_DATA_6 IOMUX_PAD(0x640, 0x2BC, 1, 0x0, 0, 0) | 961 | #define _MX53_PAD_PATA_DATA6__PATA_DATA_6 IOMUX_PAD(0x640, 0x2BC, 0, 0x0, 0, 0) |
962 | #define _MX53_PAD_PATA_DATA6__GPIO2_6 IOMUX_PAD(0x640, 0x2BC, 1, 0x0, 0, 0) | 962 | #define _MX53_PAD_PATA_DATA6__GPIO2_6 IOMUX_PAD(0x640, 0x2BC, 1, 0x0, 0, 0) |
963 | #define _MX53_PAD_PATA_DATA6__EMI_NANDF_D_6 IOMUX_PAD(0x640, 0x2BC, 1, 0x0, 0, 0) | 963 | #define _MX53_PAD_PATA_DATA6__EMI_NANDF_D_6 IOMUX_PAD(0x640, 0x2BC, 3, 0x0, 0, 0) |
964 | #define _MX53_PAD_PATA_DATA6__ESDHC4_DAT6 IOMUX_PAD(0x640, 0x2BC, 1, 0x0, 0, 0) | 964 | #define _MX53_PAD_PATA_DATA6__ESDHC4_DAT6 IOMUX_PAD(0x640, 0x2BC, 4, 0x0, 0, 0) |
965 | #define _MX53_PAD_PATA_DATA6__GPU3d_GPU_DEBUG_OUT_6 IOMUX_PAD(0x640, 0x2BC, 1, 0x0, 0, 0) | 965 | #define _MX53_PAD_PATA_DATA6__GPU3d_GPU_DEBUG_OUT_6 IOMUX_PAD(0x640, 0x2BC, 5, 0x0, 0, 0) |
966 | #define _MX53_PAD_PATA_DATA6__IPU_DIAG_BUS_6 IOMUX_PAD(0x640, 0x2BC, 1, 0x0, 0, 0) | 966 | #define _MX53_PAD_PATA_DATA6__IPU_DIAG_BUS_6 IOMUX_PAD(0x640, 0x2BC, 6, 0x0, 0, 0) |
967 | #define _MX53_PAD_PATA_DATA7__PATA_DATA_7 IOMUX_PAD(0x644, 0x2C0, 0, 0x0, 0, 0) | 967 | #define _MX53_PAD_PATA_DATA7__PATA_DATA_7 IOMUX_PAD(0x644, 0x2C0, 0, 0x0, 0, 0) |
968 | #define _MX53_PAD_PATA_DATA7__GPIO2_7 IOMUX_PAD(0x644, 0x2C0, 1, 0x0, 0, 0) | 968 | #define _MX53_PAD_PATA_DATA7__GPIO2_7 IOMUX_PAD(0x644, 0x2C0, 1, 0x0, 0, 0) |
969 | #define _MX53_PAD_PATA_DATA7__EMI_NANDF_D_7 IOMUX_PAD(0x644, 0x2C0, 3, 0x0, 0, 0) | 969 | #define _MX53_PAD_PATA_DATA7__EMI_NANDF_D_7 IOMUX_PAD(0x644, 0x2C0, 3, 0x0, 0, 0) |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v1.h b/arch/arm/plat-mxc/include/mach/iomux-v1.h index c07d30210c57..6fa8a707b9a0 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-v1.h +++ b/arch/arm/plat-mxc/include/mach/iomux-v1.h | |||
@@ -85,9 +85,6 @@ | |||
85 | #define GPIO_BOUT_0 (2 << GPIO_BOUT_SHIFT) | 85 | #define GPIO_BOUT_0 (2 << GPIO_BOUT_SHIFT) |
86 | #define GPIO_BOUT_1 (3 << GPIO_BOUT_SHIFT) | 86 | #define GPIO_BOUT_1 (3 << GPIO_BOUT_SHIFT) |
87 | 87 | ||
88 | /* decode irq number to use with IMR(x), ISR(x) and friends */ | ||
89 | #define IRQ_TO_REG(irq) ((irq - MXC_INTERNAL_IRQS) >> 5) | ||
90 | |||
91 | #define IRQ_GPIOA(x) (MXC_GPIO_IRQ_START + x) | 88 | #define IRQ_GPIOA(x) (MXC_GPIO_IRQ_START + x) |
92 | #define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x) | 89 | #define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x) |
93 | #define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x) | 90 | #define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x) |
@@ -98,7 +95,6 @@ | |||
98 | extern int mxc_gpio_mode(int gpio_mode); | 95 | extern int mxc_gpio_mode(int gpio_mode); |
99 | extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | 96 | extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, |
100 | const char *label); | 97 | const char *label); |
101 | extern void mxc_gpio_release_multiple_pins(const int *pin_list, int count); | ||
102 | 98 | ||
103 | extern int __init imx_iomuxv1_init(void __iomem *base, int numports); | 99 | extern int __init imx_iomuxv1_init(void __iomem *base, int numports); |
104 | 100 | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h index 82620af1922f..ebbce33097a7 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-v3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h | |||
@@ -66,7 +66,6 @@ typedef u64 iomux_v3_cfg_t; | |||
66 | #define MUX_MODE_MASK ((iomux_v3_cfg_t)0x1f << MUX_MODE_SHIFT) | 66 | #define MUX_MODE_MASK ((iomux_v3_cfg_t)0x1f << MUX_MODE_SHIFT) |
67 | #define MUX_PAD_CTRL_SHIFT 41 | 67 | #define MUX_PAD_CTRL_SHIFT 41 |
68 | #define MUX_PAD_CTRL_MASK ((iomux_v3_cfg_t)0x1ffff << MUX_PAD_CTRL_SHIFT) | 68 | #define MUX_PAD_CTRL_MASK ((iomux_v3_cfg_t)0x1ffff << MUX_PAD_CTRL_SHIFT) |
69 | #define NO_PAD_CTRL ((iomux_v3_cfg_t)1 << (MUX_PAD_CTRL_SHIFT + 16)) | ||
70 | #define MUX_SEL_INPUT_SHIFT 58 | 69 | #define MUX_SEL_INPUT_SHIFT 58 |
71 | #define MUX_SEL_INPUT_MASK ((iomux_v3_cfg_t)0xf << MUX_SEL_INPUT_SHIFT) | 70 | #define MUX_SEL_INPUT_MASK ((iomux_v3_cfg_t)0xf << MUX_SEL_INPUT_SHIFT) |
72 | 71 | ||
@@ -85,6 +84,7 @@ typedef u64 iomux_v3_cfg_t; | |||
85 | * Use to set PAD control | 84 | * Use to set PAD control |
86 | */ | 85 | */ |
87 | 86 | ||
87 | #define NO_PAD_CTRL (1 << 16) | ||
88 | #define PAD_CTL_DVS (1 << 13) | 88 | #define PAD_CTL_DVS (1 << 13) |
89 | #define PAD_CTL_HYS (1 << 8) | 89 | #define PAD_CTL_HYS (1 << 8) |
90 | 90 | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux.h b/arch/arm/plat-mxc/include/mach/iomux.h deleted file mode 100644 index 3d226d7e7be2..000000000000 --- a/arch/arm/plat-mxc/include/mach/iomux.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Uwe Kleine-Koenig, Pengutronix | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License version 2 as published by | ||
6 | * the Free Software Foundation. | ||
7 | */ | ||
8 | #ifndef __MACH_IOMUX_H__ | ||
9 | #define __MACH_IOMUX_H__ | ||
10 | |||
11 | /* This file will go away, please include mach/iomux-mx... directly */ | ||
12 | |||
13 | #ifdef CONFIG_ARCH_MX1 | ||
14 | #include <mach/iomux-mx1.h> | ||
15 | #endif | ||
16 | #ifdef CONFIG_ARCH_MX2 | ||
17 | #include <mach/iomux-mx2x.h> | ||
18 | #ifdef CONFIG_MACH_MX21 | ||
19 | #include <mach/iomux-mx21.h> | ||
20 | #endif | ||
21 | #ifdef CONFIG_MACH_MX27 | ||
22 | #include <mach/iomux-mx27.h> | ||
23 | #endif | ||
24 | #endif | ||
25 | |||
26 | #endif /* __MACH_IOMUX_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/mx53.h b/arch/arm/plat-mxc/include/mach/mx53.h index 9d2a1ef84de2..74cd093203e0 100644 --- a/arch/arm/plat-mxc/include/mach/mx53.h +++ b/arch/arm/plat-mxc/include/mach/mx53.h | |||
@@ -145,14 +145,14 @@ | |||
145 | /* | 145 | /* |
146 | * Memory regions and CS | 146 | * Memory regions and CS |
147 | */ | 147 | */ |
148 | #define MX53_CSD0_BASE_ADDR 0x90000000 | 148 | #define MX53_CSD0_BASE_ADDR 0x70000000 |
149 | #define MX53_CSD1_BASE_ADDR 0xA0000000 | 149 | #define MX53_CSD1_BASE_ADDR 0xB0000000 |
150 | #define MX53_CS0_BASE_ADDR 0xB0000000 | 150 | #define MX53_CS0_BASE_ADDR 0xF0000000 |
151 | #define MX53_CS1_BASE_ADDR 0xB8000000 | 151 | #define MX53_CS1_32MB_BASE_ADDR 0xF2000000 |
152 | #define MX53_CS2_BASE_ADDR 0xC0000000 | 152 | #define MX53_CS1_64MB_BASE_ADDR 0xF4000000 |
153 | #define MX53_CS3_BASE_ADDR 0xC8000000 | 153 | #define MX53_CS2_64MB_BASE_ADDR 0xF4000000 |
154 | #define MX53_CS4_BASE_ADDR 0xCC000000 | 154 | #define MX53_CS2_96MB_BASE_ADDR 0xF6000000 |
155 | #define MX53_CS5_BASE_ADDR 0xCE000000 | 155 | #define MX53_CS3_BASE_ADDR 0xF6000000 |
156 | 156 | ||
157 | #define MX53_IO_P2V(x) IMX_IO_P2V(x) | 157 | #define MX53_IO_P2V(x) IMX_IO_P2V(x) |
158 | #define MX53_IO_ADDRESS(x) IOMEM(MX53_IO_P2V(x)) | 158 | #define MX53_IO_ADDRESS(x) IOMEM(MX53_IO_P2V(x)) |
@@ -233,7 +233,7 @@ | |||
233 | #define MX53_INT_ESDHC2 2 | 233 | #define MX53_INT_ESDHC2 2 |
234 | #define MX53_INT_ESDHC3 3 | 234 | #define MX53_INT_ESDHC3 3 |
235 | #define MX53_INT_ESDHC4 4 | 235 | #define MX53_INT_ESDHC4 4 |
236 | #define MX53_INT_RESV5 5 | 236 | #define MX53_INT_DAP 5 |
237 | #define MX53_INT_SDMA 6 | 237 | #define MX53_INT_SDMA 6 |
238 | #define MX53_INT_IOMUX 7 | 238 | #define MX53_INT_IOMUX 7 |
239 | #define MX53_INT_NFC 8 | 239 | #define MX53_INT_NFC 8 |
@@ -262,8 +262,8 @@ | |||
262 | #define MX53_INT_UART1 31 | 262 | #define MX53_INT_UART1 31 |
263 | #define MX53_INT_UART2 32 | 263 | #define MX53_INT_UART2 32 |
264 | #define MX53_INT_UART3 33 | 264 | #define MX53_INT_UART3 33 |
265 | #define MX53_INT_RESV34 34 | 265 | #define MX53_INT_RTC 34 |
266 | #define MX53_INT_RESV35 35 | 266 | #define MX53_INT_PTP 35 |
267 | #define MX53_INT_ECSPI1 36 | 267 | #define MX53_INT_ECSPI1 36 |
268 | #define MX53_INT_ECSPI2 37 | 268 | #define MX53_INT_ECSPI2 37 |
269 | #define MX53_INT_CSPI 38 | 269 | #define MX53_INT_CSPI 38 |
@@ -293,8 +293,8 @@ | |||
293 | #define MX53_INT_I2C1 62 | 293 | #define MX53_INT_I2C1 62 |
294 | #define MX53_INT_I2C2 63 | 294 | #define MX53_INT_I2C2 63 |
295 | #define MX53_INT_I2C3 64 | 295 | #define MX53_INT_I2C3 64 |
296 | #define MX53_INT_RESV65 65 | 296 | #define MX53_INT_MLB 65 |
297 | #define MX53_INT_RESV66 66 | 297 | #define MX53_INT_ASRC 66 |
298 | #define MX53_INT_SPDIF 67 | 298 | #define MX53_INT_SPDIF 67 |
299 | #define MX53_INT_SIM_DAT 68 | 299 | #define MX53_INT_SIM_DAT 68 |
300 | #define MX53_INT_IIM 69 | 300 | #define MX53_INT_IIM 69 |
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h index 4ac53ce97c24..09879235a9f5 100644 --- a/arch/arm/plat-mxc/include/mach/mxc.h +++ b/arch/arm/plat-mxc/include/mach/mxc.h | |||
@@ -68,7 +68,7 @@ | |||
68 | extern unsigned int __mxc_cpu_type; | 68 | extern unsigned int __mxc_cpu_type; |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | #ifdef CONFIG_ARCH_MX1 | 71 | #ifdef CONFIG_SOC_IMX1 |
72 | # ifdef mxc_cpu_type | 72 | # ifdef mxc_cpu_type |
73 | # undef mxc_cpu_type | 73 | # undef mxc_cpu_type |
74 | # define mxc_cpu_type __mxc_cpu_type | 74 | # define mxc_cpu_type __mxc_cpu_type |
@@ -80,7 +80,7 @@ extern unsigned int __mxc_cpu_type; | |||
80 | # define cpu_is_mx1() (0) | 80 | # define cpu_is_mx1() (0) |
81 | #endif | 81 | #endif |
82 | 82 | ||
83 | #ifdef CONFIG_MACH_MX21 | 83 | #ifdef CONFIG_SOC_IMX21 |
84 | # ifdef mxc_cpu_type | 84 | # ifdef mxc_cpu_type |
85 | # undef mxc_cpu_type | 85 | # undef mxc_cpu_type |
86 | # define mxc_cpu_type __mxc_cpu_type | 86 | # define mxc_cpu_type __mxc_cpu_type |
@@ -92,7 +92,7 @@ extern unsigned int __mxc_cpu_type; | |||
92 | # define cpu_is_mx21() (0) | 92 | # define cpu_is_mx21() (0) |
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | #ifdef CONFIG_ARCH_MX25 | 95 | #ifdef CONFIG_SOC_IMX25 |
96 | # ifdef mxc_cpu_type | 96 | # ifdef mxc_cpu_type |
97 | # undef mxc_cpu_type | 97 | # undef mxc_cpu_type |
98 | # define mxc_cpu_type __mxc_cpu_type | 98 | # define mxc_cpu_type __mxc_cpu_type |
@@ -104,7 +104,7 @@ extern unsigned int __mxc_cpu_type; | |||
104 | # define cpu_is_mx25() (0) | 104 | # define cpu_is_mx25() (0) |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | #ifdef CONFIG_MACH_MX27 | 107 | #ifdef CONFIG_SOC_IMX27 |
108 | # ifdef mxc_cpu_type | 108 | # ifdef mxc_cpu_type |
109 | # undef mxc_cpu_type | 109 | # undef mxc_cpu_type |
110 | # define mxc_cpu_type __mxc_cpu_type | 110 | # define mxc_cpu_type __mxc_cpu_type |
diff --git a/arch/arm/plat-mxc/include/mach/timex.h b/arch/arm/plat-mxc/include/mach/timex.h index d61d5c74817c..10343d1f87e1 100644 --- a/arch/arm/plat-mxc/include/mach/timex.h +++ b/arch/arm/plat-mxc/include/mach/timex.h | |||
@@ -16,16 +16,7 @@ | |||
16 | #ifndef __ASM_ARCH_MXC_TIMEX_H__ | 16 | #ifndef __ASM_ARCH_MXC_TIMEX_H__ |
17 | #define __ASM_ARCH_MXC_TIMEX_H__ | 17 | #define __ASM_ARCH_MXC_TIMEX_H__ |
18 | 18 | ||
19 | #if defined CONFIG_ARCH_MX1 | 19 | /* Bogus value */ |
20 | #define CLOCK_TICK_RATE 16000000 | 20 | #define CLOCK_TICK_RATE 12345678 |
21 | #elif defined CONFIG_ARCH_MX2 | ||
22 | #define CLOCK_TICK_RATE 13300000 | ||
23 | #elif defined CONFIG_ARCH_MX3 | ||
24 | #define CLOCK_TICK_RATE 16625000 | ||
25 | #elif defined CONFIG_ARCH_MX25 | ||
26 | #define CLOCK_TICK_RATE 16000000 | ||
27 | #elif defined CONFIG_ARCH_MX5 | ||
28 | #define CLOCK_TICK_RATE 8000000 | ||
29 | #endif | ||
30 | 21 | ||
31 | #endif /* __ASM_ARCH_MXC_TIMEX_H__ */ | 22 | #endif /* __ASM_ARCH_MXC_TIMEX_H__ */ |
diff --git a/arch/arm/plat-mxc/iomux-v1.c b/arch/arm/plat-mxc/iomux-v1.c index 3238c10d4e02..1f73963bc13e 100644 --- a/arch/arm/plat-mxc/iomux-v1.c +++ b/arch/arm/plat-mxc/iomux-v1.c | |||
@@ -157,7 +157,7 @@ EXPORT_SYMBOL(mxc_gpio_mode); | |||
157 | static int imx_iomuxv1_setup_multiple(const int *list, unsigned count) | 157 | static int imx_iomuxv1_setup_multiple(const int *list, unsigned count) |
158 | { | 158 | { |
159 | size_t i; | 159 | size_t i; |
160 | int ret; | 160 | int ret = 0; |
161 | 161 | ||
162 | for (i = 0; i < count; ++i) { | 162 | for (i = 0; i < count; ++i) { |
163 | ret = mxc_gpio_mode(list[i]); | 163 | ret = mxc_gpio_mode(list[i]); |
@@ -172,45 +172,13 @@ static int imx_iomuxv1_setup_multiple(const int *list, unsigned count) | |||
172 | int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | 172 | int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, |
173 | const char *label) | 173 | const char *label) |
174 | { | 174 | { |
175 | size_t i; | ||
176 | int ret; | 175 | int ret; |
177 | 176 | ||
178 | for (i = 0; i < count; ++i) { | ||
179 | unsigned gpio = pin_list[i] & (GPIO_PIN_MASK | GPIO_PORT_MASK); | ||
180 | |||
181 | ret = gpio_request(gpio, label); | ||
182 | if (ret) | ||
183 | goto err_gpio_request; | ||
184 | } | ||
185 | |||
186 | ret = imx_iomuxv1_setup_multiple(pin_list, count); | 177 | ret = imx_iomuxv1_setup_multiple(pin_list, count); |
187 | if (ret) | ||
188 | goto err_setup; | ||
189 | |||
190 | return 0; | ||
191 | |||
192 | err_setup: | ||
193 | BUG_ON(i != count); | ||
194 | |||
195 | err_gpio_request: | ||
196 | mxc_gpio_release_multiple_pins(pin_list, i); | ||
197 | |||
198 | return ret; | 178 | return ret; |
199 | } | 179 | } |
200 | EXPORT_SYMBOL(mxc_gpio_setup_multiple_pins); | 180 | EXPORT_SYMBOL(mxc_gpio_setup_multiple_pins); |
201 | 181 | ||
202 | void mxc_gpio_release_multiple_pins(const int *pin_list, int count) | ||
203 | { | ||
204 | size_t i; | ||
205 | |||
206 | for (i = 0; i < count; ++i) { | ||
207 | unsigned gpio = pin_list[i] & (GPIO_PIN_MASK | GPIO_PORT_MASK); | ||
208 | |||
209 | gpio_free(gpio); | ||
210 | } | ||
211 | } | ||
212 | EXPORT_SYMBOL(mxc_gpio_release_multiple_pins); | ||
213 | |||
214 | int __init imx_iomuxv1_init(void __iomem *base, int numports) | 182 | int __init imx_iomuxv1_init(void __iomem *base, int numports) |
215 | { | 183 | { |
216 | imx_iomuxv1_baseaddr = base; | 184 | imx_iomuxv1_baseaddr = base; |
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c index 7a61ef8f471a..761c3c940a68 100644 --- a/arch/arm/plat-mxc/pwm.c +++ b/arch/arm/plat-mxc/pwm.c | |||
@@ -214,14 +214,14 @@ static int __devinit mxc_pwm_probe(struct platform_device *pdev) | |||
214 | goto err_free_clk; | 214 | goto err_free_clk; |
215 | } | 215 | } |
216 | 216 | ||
217 | r = request_mem_region(r->start, r->end - r->start + 1, pdev->name); | 217 | r = request_mem_region(r->start, resource_size(r), pdev->name); |
218 | if (r == NULL) { | 218 | if (r == NULL) { |
219 | dev_err(&pdev->dev, "failed to request memory resource\n"); | 219 | dev_err(&pdev->dev, "failed to request memory resource\n"); |
220 | ret = -EBUSY; | 220 | ret = -EBUSY; |
221 | goto err_free_clk; | 221 | goto err_free_clk; |
222 | } | 222 | } |
223 | 223 | ||
224 | pwm->mmio_base = ioremap(r->start, r->end - r->start + 1); | 224 | pwm->mmio_base = ioremap(r->start, resource_size(r)); |
225 | if (pwm->mmio_base == NULL) { | 225 | if (pwm->mmio_base == NULL) { |
226 | dev_err(&pdev->dev, "failed to ioremap() registers\n"); | 226 | dev_err(&pdev->dev, "failed to ioremap() registers\n"); |
227 | ret = -ENODEV; | 227 | ret = -ENODEV; |
@@ -236,7 +236,7 @@ static int __devinit mxc_pwm_probe(struct platform_device *pdev) | |||
236 | return 0; | 236 | return 0; |
237 | 237 | ||
238 | err_free_mem: | 238 | err_free_mem: |
239 | release_mem_region(r->start, r->end - r->start + 1); | 239 | release_mem_region(r->start, resource_size(r)); |
240 | err_free_clk: | 240 | err_free_clk: |
241 | clk_put(pwm->clk); | 241 | clk_put(pwm->clk); |
242 | err_free: | 242 | err_free: |
@@ -260,7 +260,7 @@ static int __devexit mxc_pwm_remove(struct platform_device *pdev) | |||
260 | iounmap(pwm->mmio_base); | 260 | iounmap(pwm->mmio_base); |
261 | 261 | ||
262 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 262 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
263 | release_mem_region(r->start, r->end - r->start + 1); | 263 | release_mem_region(r->start, resource_size(r)); |
264 | 264 | ||
265 | clk_put(pwm->clk); | 265 | clk_put(pwm->clk); |
266 | 266 | ||
diff --git a/arch/arm/plat-mxc/tzic.c b/arch/arm/plat-mxc/tzic.c index 57f9395f87ce..710f2e7da4ce 100644 --- a/arch/arm/plat-mxc/tzic.c +++ b/arch/arm/plat-mxc/tzic.c | |||
@@ -49,6 +49,8 @@ | |||
49 | 49 | ||
50 | void __iomem *tzic_base; /* Used as irq controller base in entry-macro.S */ | 50 | void __iomem *tzic_base; /* Used as irq controller base in entry-macro.S */ |
51 | 51 | ||
52 | #define TZIC_NUM_IRQS 128 | ||
53 | |||
52 | #ifdef CONFIG_FIQ | 54 | #ifdef CONFIG_FIQ |
53 | static int tzic_set_irq_fiq(unsigned int irq, unsigned int type) | 55 | static int tzic_set_irq_fiq(unsigned int irq, unsigned int type) |
54 | { | 56 | { |
@@ -166,7 +168,7 @@ void __init tzic_init_irq(void __iomem *irqbase) | |||
166 | 168 | ||
167 | /* all IRQ no FIQ Warning :: No selection */ | 169 | /* all IRQ no FIQ Warning :: No selection */ |
168 | 170 | ||
169 | for (i = 0; i < MXC_INTERNAL_IRQS; i++) { | 171 | for (i = 0; i < TZIC_NUM_IRQS; i++) { |
170 | irq_set_chip_and_handler(i, &mxc_tzic_chip.base, | 172 | irq_set_chip_and_handler(i, &mxc_tzic_chip.base, |
171 | handle_level_irq); | 173 | handle_level_irq); |
172 | set_irq_flags(i, IRQF_VALID); | 174 | set_irq_flags(i, IRQF_VALID); |
diff --git a/arch/arm/plat-nomadik/include/plat/gpio.h b/arch/arm/plat-nomadik/include/plat/gpio.h index ea19a5b2f227..d5d7e651269c 100644 --- a/arch/arm/plat-nomadik/include/plat/gpio.h +++ b/arch/arm/plat-nomadik/include/plat/gpio.h | |||
@@ -90,6 +90,7 @@ struct nmk_gpio_platform_data { | |||
90 | int num_gpio; | 90 | int num_gpio; |
91 | u32 (*get_secondary_status)(unsigned int bank); | 91 | u32 (*get_secondary_status)(unsigned int bank); |
92 | void (*set_ioforce)(bool enable); | 92 | void (*set_ioforce)(bool enable); |
93 | bool supports_sleepmode; | ||
93 | }; | 94 | }; |
94 | 95 | ||
95 | #endif /* __ASM_PLAT_GPIO_H */ | 96 | #endif /* __ASM_PLAT_GPIO_H */ |
diff --git a/arch/arm/plat-omap/include/plat/flash.h b/arch/arm/plat-omap/include/plat/flash.h index 3083195123ea..0d88499b79e9 100644 --- a/arch/arm/plat-omap/include/plat/flash.h +++ b/arch/arm/plat-omap/include/plat/flash.h | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/mtd/map.h> | 12 | #include <linux/mtd/map.h> |
13 | 13 | ||
14 | struct platform_device; | ||
14 | extern void omap1_set_vpp(struct platform_device *pdev, int enable); | 15 | extern void omap1_set_vpp(struct platform_device *pdev, int enable); |
15 | 16 | ||
16 | #endif | 17 | #endif |
diff --git a/arch/arm/plat-omap/include/plat/iovmm.h b/arch/arm/plat-omap/include/plat/iovmm.h index 32a2f6c4d39e..e992b9655fbc 100644 --- a/arch/arm/plat-omap/include/plat/iovmm.h +++ b/arch/arm/plat-omap/include/plat/iovmm.h | |||
@@ -29,9 +29,6 @@ struct iovm_struct { | |||
29 | * lower 16 bit is used for h/w and upper 16 bit is for s/w. | 29 | * lower 16 bit is used for h/w and upper 16 bit is for s/w. |
30 | */ | 30 | */ |
31 | #define IOVMF_SW_SHIFT 16 | 31 | #define IOVMF_SW_SHIFT 16 |
32 | #define IOVMF_HW_SIZE (1 << IOVMF_SW_SHIFT) | ||
33 | #define IOVMF_HW_MASK (IOVMF_HW_SIZE - 1) | ||
34 | #define IOVMF_SW_MASK (~IOVMF_HW_MASK)UL | ||
35 | 32 | ||
36 | /* | 33 | /* |
37 | * iovma: h/w flags derived from cam and ram attribute | 34 | * iovma: h/w flags derived from cam and ram attribute |
diff --git a/arch/arm/plat-omap/include/plat/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h index f38fef9f1310..c7b874186c27 100644 --- a/arch/arm/plat-omap/include/plat/mmc.h +++ b/arch/arm/plat-omap/include/plat/mmc.h | |||
@@ -101,6 +101,9 @@ struct omap_mmc_platform_data { | |||
101 | /* If using power_saving and the MMC power is not to go off */ | 101 | /* If using power_saving and the MMC power is not to go off */ |
102 | unsigned no_off:1; | 102 | unsigned no_off:1; |
103 | 103 | ||
104 | /* eMMC does not handle power off when not in sleep state */ | ||
105 | unsigned no_regulator_off_init:1; | ||
106 | |||
104 | /* Regulator off remapped to sleep */ | 107 | /* Regulator off remapped to sleep */ |
105 | unsigned vcc_aux_disable_is_sleep:1; | 108 | unsigned vcc_aux_disable_is_sleep:1; |
106 | 109 | ||
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c index 51ef43e8def6..83a37c54342f 100644 --- a/arch/arm/plat-omap/iovmm.c +++ b/arch/arm/plat-omap/iovmm.c | |||
@@ -648,7 +648,6 @@ u32 iommu_vmap(struct iommu *obj, u32 da, const struct sg_table *sgt, | |||
648 | return PTR_ERR(va); | 648 | return PTR_ERR(va); |
649 | } | 649 | } |
650 | 650 | ||
651 | flags &= IOVMF_HW_MASK; | ||
652 | flags |= IOVMF_DISCONT; | 651 | flags |= IOVMF_DISCONT; |
653 | flags |= IOVMF_MMIO; | 652 | flags |= IOVMF_MMIO; |
654 | 653 | ||
@@ -706,7 +705,6 @@ u32 iommu_vmalloc(struct iommu *obj, u32 da, size_t bytes, u32 flags) | |||
706 | if (!va) | 705 | if (!va) |
707 | return -ENOMEM; | 706 | return -ENOMEM; |
708 | 707 | ||
709 | flags &= IOVMF_HW_MASK; | ||
710 | flags |= IOVMF_DISCONT; | 708 | flags |= IOVMF_DISCONT; |
711 | flags |= IOVMF_ALLOC; | 709 | flags |= IOVMF_ALLOC; |
712 | 710 | ||
@@ -795,7 +793,6 @@ u32 iommu_kmap(struct iommu *obj, u32 da, u32 pa, size_t bytes, | |||
795 | if (!va) | 793 | if (!va) |
796 | return -ENOMEM; | 794 | return -ENOMEM; |
797 | 795 | ||
798 | flags &= IOVMF_HW_MASK; | ||
799 | flags |= IOVMF_LINEAR; | 796 | flags |= IOVMF_LINEAR; |
800 | flags |= IOVMF_MMIO; | 797 | flags |= IOVMF_MMIO; |
801 | 798 | ||
@@ -853,7 +850,6 @@ u32 iommu_kmalloc(struct iommu *obj, u32 da, size_t bytes, u32 flags) | |||
853 | return -ENOMEM; | 850 | return -ENOMEM; |
854 | pa = virt_to_phys(va); | 851 | pa = virt_to_phys(va); |
855 | 852 | ||
856 | flags &= IOVMF_HW_MASK; | ||
857 | flags |= IOVMF_LINEAR; | 853 | flags |= IOVMF_LINEAR; |
858 | flags |= IOVMF_ALLOC; | 854 | flags |= IOVMF_ALLOC; |
859 | 855 | ||
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index a37b8eb65b76..49fc0df0c21f 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -84,6 +84,7 @@ | |||
84 | #include <linux/io.h> | 84 | #include <linux/io.h> |
85 | #include <linux/clk.h> | 85 | #include <linux/clk.h> |
86 | #include <linux/clkdev.h> | 86 | #include <linux/clkdev.h> |
87 | #include <linux/pm_runtime.h> | ||
87 | 88 | ||
88 | #include <plat/omap_device.h> | 89 | #include <plat/omap_device.h> |
89 | #include <plat/omap_hwmod.h> | 90 | #include <plat/omap_hwmod.h> |
@@ -539,20 +540,34 @@ int omap_early_device_register(struct omap_device *od) | |||
539 | static int _od_runtime_suspend(struct device *dev) | 540 | static int _od_runtime_suspend(struct device *dev) |
540 | { | 541 | { |
541 | struct platform_device *pdev = to_platform_device(dev); | 542 | struct platform_device *pdev = to_platform_device(dev); |
543 | int ret; | ||
544 | |||
545 | ret = pm_generic_runtime_suspend(dev); | ||
546 | |||
547 | if (!ret) | ||
548 | omap_device_idle(pdev); | ||
549 | |||
550 | return ret; | ||
551 | } | ||
542 | 552 | ||
543 | return omap_device_idle(pdev); | 553 | static int _od_runtime_idle(struct device *dev) |
554 | { | ||
555 | return pm_generic_runtime_idle(dev); | ||
544 | } | 556 | } |
545 | 557 | ||
546 | static int _od_runtime_resume(struct device *dev) | 558 | static int _od_runtime_resume(struct device *dev) |
547 | { | 559 | { |
548 | struct platform_device *pdev = to_platform_device(dev); | 560 | struct platform_device *pdev = to_platform_device(dev); |
549 | 561 | ||
550 | return omap_device_enable(pdev); | 562 | omap_device_enable(pdev); |
563 | |||
564 | return pm_generic_runtime_resume(dev); | ||
551 | } | 565 | } |
552 | 566 | ||
553 | static struct dev_power_domain omap_device_power_domain = { | 567 | static struct dev_power_domain omap_device_power_domain = { |
554 | .ops = { | 568 | .ops = { |
555 | .runtime_suspend = _od_runtime_suspend, | 569 | .runtime_suspend = _od_runtime_suspend, |
570 | .runtime_idle = _od_runtime_idle, | ||
556 | .runtime_resume = _od_runtime_resume, | 571 | .runtime_resume = _od_runtime_resume, |
557 | USE_PLATFORM_PM_SLEEP_OPS | 572 | USE_PLATFORM_PM_SLEEP_OPS |
558 | } | 573 | } |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index a3f50b34a90d..6af3d0b1f8d0 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -166,7 +166,7 @@ static void __init omap_detect_sram(void) | |||
166 | else if (cpu_is_omap1611()) | 166 | else if (cpu_is_omap1611()) |
167 | omap_sram_size = SZ_256K; | 167 | omap_sram_size = SZ_256K; |
168 | else { | 168 | else { |
169 | printk(KERN_ERR "Could not detect SRAM size\n"); | 169 | pr_err("Could not detect SRAM size\n"); |
170 | omap_sram_size = 0x4000; | 170 | omap_sram_size = 0x4000; |
171 | } | 171 | } |
172 | } | 172 | } |
@@ -221,10 +221,10 @@ static void __init omap_map_sram(void) | |||
221 | omap_sram_io_desc[0].length = ROUND_DOWN(omap_sram_size, PAGE_SIZE); | 221 | omap_sram_io_desc[0].length = ROUND_DOWN(omap_sram_size, PAGE_SIZE); |
222 | iotable_init(omap_sram_io_desc, ARRAY_SIZE(omap_sram_io_desc)); | 222 | iotable_init(omap_sram_io_desc, ARRAY_SIZE(omap_sram_io_desc)); |
223 | 223 | ||
224 | printk(KERN_INFO "SRAM: Mapped pa 0x%08lx to va 0x%08lx size: 0x%lx\n", | 224 | pr_info("SRAM: Mapped pa 0x%08llx to va 0x%08lx size: 0x%lx\n", |
225 | __pfn_to_phys(omap_sram_io_desc[0].pfn), | 225 | (long long) __pfn_to_phys(omap_sram_io_desc[0].pfn), |
226 | omap_sram_io_desc[0].virtual, | 226 | omap_sram_io_desc[0].virtual, |
227 | omap_sram_io_desc[0].length); | 227 | omap_sram_io_desc[0].length); |
228 | 228 | ||
229 | /* | 229 | /* |
230 | * Normally devicemaps_init() would flush caches and tlb after | 230 | * Normally devicemaps_init() would flush caches and tlb after |
@@ -252,7 +252,7 @@ static void __init omap_map_sram(void) | |||
252 | void *omap_sram_push_address(unsigned long size) | 252 | void *omap_sram_push_address(unsigned long size) |
253 | { | 253 | { |
254 | if (size > (omap_sram_ceil - (omap_sram_base + SRAM_BOOTLOADER_SZ))) { | 254 | if (size > (omap_sram_ceil - (omap_sram_base + SRAM_BOOTLOADER_SZ))) { |
255 | printk(KERN_ERR "Not enough space in SRAM\n"); | 255 | pr_err("Not enough space in SRAM\n"); |
256 | return NULL; | 256 | return NULL; |
257 | } | 257 | } |
258 | 258 | ||
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index c10d10c56e2e..2abf9660bc6c 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -1199,7 +1199,7 @@ EXPORT_SYMBOL(s3c2410_dma_getposition); | |||
1199 | 1199 | ||
1200 | #ifdef CONFIG_PM | 1200 | #ifdef CONFIG_PM |
1201 | 1201 | ||
1202 | static void s3c2410_dma_suspend_chan(s3c2410_dma_chan *cp) | 1202 | static void s3c2410_dma_suspend_chan(struct s3c2410_dma_chan *cp) |
1203 | { | 1203 | { |
1204 | printk(KERN_DEBUG "suspending dma channel %d\n", cp->number); | 1204 | printk(KERN_DEBUG "suspending dma channel %d\n", cp->number); |
1205 | 1205 | ||
diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c index 9aee7e1668b1..fc8c5f89954d 100644 --- a/arch/arm/plat-s3c24xx/irq.c +++ b/arch/arm/plat-s3c24xx/irq.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
25 | #include <linux/sysdev.h> | 25 | #include <linux/sysdev.h> |
26 | #include <linux/syscore_ops.h> | ||
26 | 27 | ||
27 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
28 | #include <asm/mach/irq.h> | 29 | #include <asm/mach/irq.h> |
@@ -668,3 +669,8 @@ void __init s3c24xx_init_irq(void) | |||
668 | 669 | ||
669 | irqdbf("s3c2410: registered interrupt handlers\n"); | 670 | irqdbf("s3c2410: registered interrupt handlers\n"); |
670 | } | 671 | } |
672 | |||
673 | struct syscore_ops s3c24xx_irq_syscore_ops = { | ||
674 | .suspend = s3c24xx_irq_suspend, | ||
675 | .resume = s3c24xx_irq_resume, | ||
676 | }; | ||
diff --git a/arch/arm/plat-s5p/dev-onenand.c b/arch/arm/plat-s5p/dev-onenand.c index 6db926202caa..20336c8f2479 100644 --- a/arch/arm/plat-s5p/dev-onenand.c +++ b/arch/arm/plat-s5p/dev-onenand.c | |||
@@ -15,8 +15,6 @@ | |||
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/mtd/mtd.h> | ||
19 | #include <linux/mtd/onenand.h> | ||
20 | 18 | ||
21 | #include <mach/irqs.h> | 19 | #include <mach/irqs.h> |
22 | #include <mach/map.h> | 20 | #include <mach/map.h> |
@@ -45,13 +43,3 @@ struct platform_device s5p_device_onenand = { | |||
45 | .num_resources = ARRAY_SIZE(s5p_onenand_resources), | 43 | .num_resources = ARRAY_SIZE(s5p_onenand_resources), |
46 | .resource = s5p_onenand_resources, | 44 | .resource = s5p_onenand_resources, |
47 | }; | 45 | }; |
48 | |||
49 | void s5p_onenand_set_platdata(struct onenand_platform_data *pdata) | ||
50 | { | ||
51 | struct onenand_platform_data *pd; | ||
52 | |||
53 | pd = kmemdup(pdata, sizeof(struct onenand_platform_data), GFP_KERNEL); | ||
54 | if (!pd) | ||
55 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
56 | s5p_device_onenand.dev.platform_data = pd; | ||
57 | } | ||
diff --git a/arch/arm/plat-s5p/include/plat/map-s5p.h b/arch/arm/plat-s5p/include/plat/map-s5p.h index a6c3d327ce72..d973d39666a3 100644 --- a/arch/arm/plat-s5p/include/plat/map-s5p.h +++ b/arch/arm/plat-s5p/include/plat/map-s5p.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #define S5P_VA_TWD S5P_VA_COREPERI(0x600) | 39 | #define S5P_VA_TWD S5P_VA_COREPERI(0x600) |
40 | #define S5P_VA_GIC_DIST S5P_VA_COREPERI(0x1000) | 40 | #define S5P_VA_GIC_DIST S5P_VA_COREPERI(0x1000) |
41 | 41 | ||
42 | #define S5P_VA_USB_HSPHY S3C_ADDR(0x02900000) | 42 | #define S3C_VA_USB_HSPHY S3C_ADDR(0x02900000) |
43 | 43 | ||
44 | #define VA_VIC(x) (S3C_VA_IRQ + ((x) * 0x10000)) | 44 | #define VA_VIC(x) (S3C_VA_IRQ + ((x) * 0x10000)) |
45 | #define VA_VIC0 VA_VIC(0) | 45 | #define VA_VIC0 VA_VIC(0) |
diff --git a/arch/arm/plat-samsung/dev-onenand.c b/arch/arm/plat-samsung/dev-onenand.c index 45ec73287d8c..f54ae71f0cd2 100644 --- a/arch/arm/plat-samsung/dev-onenand.c +++ b/arch/arm/plat-samsung/dev-onenand.c | |||
@@ -13,8 +13,6 @@ | |||
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/mtd/mtd.h> | ||
17 | #include <linux/mtd/onenand.h> | ||
18 | 16 | ||
19 | #include <mach/irqs.h> | 17 | #include <mach/irqs.h> |
20 | #include <mach/map.h> | 18 | #include <mach/map.h> |
@@ -43,13 +41,3 @@ struct platform_device s3c_device_onenand = { | |||
43 | .num_resources = ARRAY_SIZE(s3c_onenand_resources), | 41 | .num_resources = ARRAY_SIZE(s3c_onenand_resources), |
44 | .resource = s3c_onenand_resources, | 42 | .resource = s3c_onenand_resources, |
45 | }; | 43 | }; |
46 | |||
47 | void s3c_onenand_set_platdata(struct onenand_platform_data *pdata) | ||
48 | { | ||
49 | struct onenand_platform_data *pd; | ||
50 | |||
51 | pd = kmemdup(pdata, sizeof(struct onenand_platform_data), GFP_KERNEL); | ||
52 | if (!pd) | ||
53 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
54 | s3c_device_onenand.dev.platform_data = pd; | ||
55 | } | ||
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index b61b8ee7cc52..4af108ff4112 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h | |||
@@ -75,10 +75,8 @@ extern struct platform_device s5pc100_device_spi1; | |||
75 | extern struct platform_device s5pc100_device_spi2; | 75 | extern struct platform_device s5pc100_device_spi2; |
76 | extern struct platform_device s5pv210_device_spi0; | 76 | extern struct platform_device s5pv210_device_spi0; |
77 | extern struct platform_device s5pv210_device_spi1; | 77 | extern struct platform_device s5pv210_device_spi1; |
78 | extern struct platform_device s5p6440_device_spi0; | 78 | extern struct platform_device s5p64x0_device_spi0; |
79 | extern struct platform_device s5p6440_device_spi1; | 79 | extern struct platform_device s5p64x0_device_spi1; |
80 | extern struct platform_device s5p6450_device_spi0; | ||
81 | extern struct platform_device s5p6450_device_spi1; | ||
82 | 80 | ||
83 | extern struct platform_device s3c_device_hwmon; | 81 | extern struct platform_device s3c_device_hwmon; |
84 | 82 | ||