diff options
Diffstat (limited to 'arch/arm')
88 files changed, 767 insertions, 1385 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f88fce5e9772..a920f2c422e9 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1159,7 +1159,7 @@ config ARM_NR_BANKS | |||
1159 | config IWMMXT | 1159 | config IWMMXT |
1160 | bool "Enable iWMMXt support" | 1160 | bool "Enable iWMMXt support" |
1161 | depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4 | 1161 | depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4 |
1162 | default y if PXA27x || PXA3xx || PXA95x || ARCH_MMP | 1162 | default y if PXA27x || PXA3xx || ARCH_MMP |
1163 | help | 1163 | help |
1164 | Enable support for iWMMXt context switching at run time if | 1164 | Enable support for iWMMXt context switching at run time if |
1165 | running on a CPU that supports it. | 1165 | running on a CPU that supports it. |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index a517153a13ea..537208f22e56 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -54,10 +54,6 @@ ifeq ($(CONFIG_ARCH_SA1100),y) | |||
54 | OBJS += head-sa1100.o | 54 | OBJS += head-sa1100.o |
55 | endif | 55 | endif |
56 | 56 | ||
57 | ifeq ($(CONFIG_ARCH_VT8500),y) | ||
58 | OBJS += head-vt8500.o | ||
59 | endif | ||
60 | |||
61 | ifeq ($(CONFIG_CPU_XSCALE),y) | 57 | ifeq ($(CONFIG_CPU_XSCALE),y) |
62 | OBJS += head-xscale.o | 58 | OBJS += head-xscale.o |
63 | endif | 59 | endif |
diff --git a/arch/arm/boot/compressed/head-vt8500.S b/arch/arm/boot/compressed/head-vt8500.S deleted file mode 100644 index 1dc1e21a3be3..000000000000 --- a/arch/arm/boot/compressed/head-vt8500.S +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/boot/compressed/head-vt8500.S | ||
3 | * | ||
4 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
5 | * | ||
6 | * VIA VT8500 specific tweaks. This is merged into head.S by the linker. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #include <linux/linkage.h> | ||
11 | #include <asm/mach-types.h> | ||
12 | |||
13 | .section ".start", "ax" | ||
14 | |||
15 | __VT8500_start: | ||
16 | @ Compare the SCC ID register against a list of known values | ||
17 | ldr r1, .SCCID | ||
18 | ldr r3, [r1] | ||
19 | |||
20 | @ VT8500 override | ||
21 | ldr r4, .VT8500SCC | ||
22 | cmp r3, r4 | ||
23 | ldreq r7, .ID_BV07 | ||
24 | beq .Lendvt8500 | ||
25 | |||
26 | @ WM8505 override | ||
27 | ldr r4, .WM8505SCC | ||
28 | cmp r3, r4 | ||
29 | ldreq r7, .ID_8505 | ||
30 | beq .Lendvt8500 | ||
31 | |||
32 | @ Otherwise, leave the bootloader's machine id untouched | ||
33 | |||
34 | .SCCID: | ||
35 | .word 0xd8120000 | ||
36 | .VT8500SCC: | ||
37 | .word 0x34000102 | ||
38 | .WM8505SCC: | ||
39 | .word 0x34260103 | ||
40 | |||
41 | .ID_BV07: | ||
42 | .word MACH_TYPE_BV07 | ||
43 | .ID_8505: | ||
44 | .word MACH_TYPE_WM8505_7IN_NETBOOK | ||
45 | |||
46 | .Lendvt8500: | ||
diff --git a/arch/arm/boot/dts/integratorap.dts b/arch/arm/boot/dts/integratorap.dts index 61767757b50a..c9c3fa344647 100644 --- a/arch/arm/boot/dts/integratorap.dts +++ b/arch/arm/boot/dts/integratorap.dts | |||
@@ -18,6 +18,11 @@ | |||
18 | bootargs = "root=/dev/ram0 console=ttyAM0,38400n8 earlyprintk"; | 18 | bootargs = "root=/dev/ram0 console=ttyAM0,38400n8 earlyprintk"; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | syscon { | ||
22 | /* AP system controller registers */ | ||
23 | reg = <0x11000000 0x100>; | ||
24 | }; | ||
25 | |||
21 | timer0: timer@13000000 { | 26 | timer0: timer@13000000 { |
22 | compatible = "arm,integrator-timer"; | 27 | compatible = "arm,integrator-timer"; |
23 | }; | 28 | }; |
diff --git a/arch/arm/boot/dts/integratorcp.dts b/arch/arm/boot/dts/integratorcp.dts index 2dd5e4e48481..8b119399025a 100644 --- a/arch/arm/boot/dts/integratorcp.dts +++ b/arch/arm/boot/dts/integratorcp.dts | |||
@@ -18,6 +18,11 @@ | |||
18 | bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk"; | 18 | bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk"; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | cpcon { | ||
22 | /* CP controller registers */ | ||
23 | reg = <0xcb000000 0x100>; | ||
24 | }; | ||
25 | |||
21 | timer0: timer@13000000 { | 26 | timer0: timer@13000000 { |
22 | compatible = "arm,sp804", "arm,primecell"; | 27 | compatible = "arm,sp804", "arm,primecell"; |
23 | }; | 28 | }; |
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 23004847bb05..8ea02ac3ec1a 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -211,13 +211,6 @@ static inline void dma_free_writecombine(struct device *dev, size_t size, | |||
211 | extern void __init init_dma_coherent_pool_size(unsigned long size); | 211 | extern void __init init_dma_coherent_pool_size(unsigned long size); |
212 | 212 | ||
213 | /* | 213 | /* |
214 | * This can be called during boot to increase the size of the consistent | ||
215 | * DMA region above it's default value of 2MB. It must be called before the | ||
216 | * memory allocator is initialised, i.e. before any core_initcall. | ||
217 | */ | ||
218 | static inline void init_consistent_dma_size(unsigned long size) { } | ||
219 | |||
220 | /* | ||
221 | * For SA-1111, IXP425, and ADI systems the dma-mapping functions are "magic" | 214 | * For SA-1111, IXP425, and ADI systems the dma-mapping functions are "magic" |
222 | * and utilize bounce buffers as needed to work around limited DMA windows. | 215 | * and utilize bounce buffers as needed to work around limited DMA windows. |
223 | * | 216 | * |
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index 84af1b506d92..b7ae124c16e5 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -343,7 +343,6 @@ static struct at91_gpio_bank at91sam9g45_gpio[] __initdata = { | |||
343 | static void __init at91sam9g45_map_io(void) | 343 | static void __init at91sam9g45_map_io(void) |
344 | { | 344 | { |
345 | at91_init_sram(0, AT91SAM9G45_SRAM_BASE, AT91SAM9G45_SRAM_SIZE); | 345 | at91_init_sram(0, AT91SAM9G45_SRAM_BASE, AT91SAM9G45_SRAM_SIZE); |
346 | init_consistent_dma_size(SZ_4M); | ||
347 | } | 346 | } |
348 | 347 | ||
349 | static void __init at91sam9g45_ioremap_registers(void) | 348 | static void __init at91sam9g45_ioremap_registers(void) |
diff --git a/arch/arm/mach-at91/include/mach/atmel-mci.h b/arch/arm/mach-at91/include/mach/atmel-mci.h index cd580a12e904..3069e4135573 100644 --- a/arch/arm/mach-at91/include/mach/atmel-mci.h +++ b/arch/arm/mach-at91/include/mach/atmel-mci.h | |||
@@ -14,11 +14,4 @@ struct mci_dma_data { | |||
14 | #define slave_data_ptr(s) (&(s)->sdata) | 14 | #define slave_data_ptr(s) (&(s)->sdata) |
15 | #define find_slave_dev(s) ((s)->sdata.dma_dev) | 15 | #define find_slave_dev(s) ((s)->sdata.dma_dev) |
16 | 16 | ||
17 | #define setup_dma_addr(s, t, r) do { \ | ||
18 | if (s) { \ | ||
19 | (s)->sdata.tx_reg = (t); \ | ||
20 | (s)->sdata.rx_reg = (r); \ | ||
21 | } \ | ||
22 | } while (0) | ||
23 | |||
24 | #endif /* __MACH_ATMEL_MCI_H */ | 17 | #endif /* __MACH_ATMEL_MCI_H */ |
diff --git a/arch/arm/mach-bcm2835/Makefile.boot b/arch/arm/mach-bcm2835/Makefile.boot index 2d30e17f5b69..b3271754e9fd 100644 --- a/arch/arm/mach-bcm2835/Makefile.boot +++ b/arch/arm/mach-bcm2835/Makefile.boot | |||
@@ -1,3 +1 @@ | |||
1 | zreladdr-y := 0x00008000 | zreladdr-y := 0x00008000 | |
2 | params_phys-y := 0x00000100 | ||
3 | initrd_phys-y := 0x00800000 | ||
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c index f6fea4933571..53e3842c9330 100644 --- a/arch/arm/mach-bcm2835/bcm2835.c +++ b/arch/arm/mach-bcm2835/bcm2835.c | |||
@@ -30,12 +30,12 @@ static struct map_desc io_map __initdata = { | |||
30 | .type = MT_DEVICE | 30 | .type = MT_DEVICE |
31 | }; | 31 | }; |
32 | 32 | ||
33 | void __init bcm2835_map_io(void) | 33 | static void __init bcm2835_map_io(void) |
34 | { | 34 | { |
35 | iotable_init(&io_map, 1); | 35 | iotable_init(&io_map, 1); |
36 | } | 36 | } |
37 | 37 | ||
38 | void __init bcm2835_init(void) | 38 | static void __init bcm2835_init(void) |
39 | { | 39 | { |
40 | int ret; | 40 | int ret; |
41 | 41 | ||
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 1dbf85beed1b..9211e8800c79 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
@@ -194,7 +194,7 @@ static int evm_led_setup(struct i2c_client *client, int gpio, | |||
194 | while (ngpio--) { | 194 | while (ngpio--) { |
195 | leds->gpio = gpio++; | 195 | leds->gpio = gpio++; |
196 | leds++; | 196 | leds++; |
197 | }; | 197 | } |
198 | 198 | ||
199 | evm_led_dev = platform_device_alloc("leds-gpio", 0); | 199 | evm_led_dev = platform_device_alloc("leds-gpio", 0); |
200 | platform_device_add_data(evm_led_dev, &evm_led_data, | 200 | platform_device_add_data(evm_led_dev, &evm_led_data, |
diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c index 64b0f65a8639..a794f6d9d444 100644 --- a/arch/arm/mach-davinci/common.c +++ b/arch/arm/mach-davinci/common.c | |||
@@ -87,8 +87,6 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info) | |||
87 | iotable_init(davinci_soc_info.io_desc, | 87 | iotable_init(davinci_soc_info.io_desc, |
88 | davinci_soc_info.io_desc_num); | 88 | davinci_soc_info.io_desc_num); |
89 | 89 | ||
90 | init_consistent_dma_size(14 << 20); | ||
91 | |||
92 | /* | 90 | /* |
93 | * Normally devicemaps_init() would flush caches and tlb after | 91 | * Normally devicemaps_init() would flush caches and tlb after |
94 | * mdesc->map_io(), but we must also do it here because of the CPU | 92 | * mdesc->map_io(), but we must also do it here because of the CPU |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 9ab1f105cf00..11c79a3362ef 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -713,8 +713,7 @@ static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type, | |||
713 | break; | 713 | break; |
714 | case VPBE_ENC_CUSTOM_TIMINGS: | 714 | case VPBE_ENC_CUSTOM_TIMINGS: |
715 | if (pclock <= 27000000) { | 715 | if (pclock <= 27000000) { |
716 | v |= DM644X_VPSS_MUXSEL_PLL2_MODE | | 716 | v |= DM644X_VPSS_DACCLKEN; |
717 | DM644X_VPSS_DACCLKEN; | ||
718 | writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); | 717 | writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL)); |
719 | } else { | 718 | } else { |
720 | /* | 719 | /* |
diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c index f77b95336e2b..34509ffba221 100644 --- a/arch/arm/mach-davinci/usb.c +++ b/arch/arm/mach-davinci/usb.c | |||
@@ -42,14 +42,8 @@ static struct musb_hdrc_config musb_config = { | |||
42 | }; | 42 | }; |
43 | 43 | ||
44 | static struct musb_hdrc_platform_data usb_data = { | 44 | static struct musb_hdrc_platform_data usb_data = { |
45 | #if defined(CONFIG_USB_MUSB_OTG) | ||
46 | /* OTG requires a Mini-AB connector */ | 45 | /* OTG requires a Mini-AB connector */ |
47 | .mode = MUSB_OTG, | 46 | .mode = MUSB_OTG, |
48 | #elif defined(CONFIG_USB_MUSB_PERIPHERAL) | ||
49 | .mode = MUSB_PERIPHERAL, | ||
50 | #elif defined(CONFIG_USB_MUSB_HOST) | ||
51 | .mode = MUSB_HOST, | ||
52 | #endif | ||
53 | .clock = "usb", | 47 | .clock = "usb", |
54 | .config = &musb_config, | 48 | .config = &musb_config, |
55 | }; | 49 | }; |
diff --git a/arch/arm/mach-exynos/clock-exynos4.c b/arch/arm/mach-exynos/clock-exynos4.c index 1870bee991b6..efead60b9436 100644 --- a/arch/arm/mach-exynos/clock-exynos4.c +++ b/arch/arm/mach-exynos/clock-exynos4.c | |||
@@ -617,11 +617,6 @@ static struct clk exynos4_init_clocks_off[] = { | |||
617 | .ctrlbit = (1 << 18), | 617 | .ctrlbit = (1 << 18), |
618 | }, { | 618 | }, { |
619 | .name = "iis", | 619 | .name = "iis", |
620 | .devname = "samsung-i2s.0", | ||
621 | .enable = exynos4_clk_ip_peril_ctrl, | ||
622 | .ctrlbit = (1 << 19), | ||
623 | }, { | ||
624 | .name = "iis", | ||
625 | .devname = "samsung-i2s.1", | 620 | .devname = "samsung-i2s.1", |
626 | .enable = exynos4_clk_ip_peril_ctrl, | 621 | .enable = exynos4_clk_ip_peril_ctrl, |
627 | .ctrlbit = (1 << 20), | 622 | .ctrlbit = (1 << 20), |
diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c index f1e0386262a8..7652f5d78a56 100644 --- a/arch/arm/mach-exynos/clock-exynos5.c +++ b/arch/arm/mach-exynos/clock-exynos5.c | |||
@@ -297,7 +297,7 @@ static struct clksrc_sources exynos5_clk_src_mpll = { | |||
297 | .nr_sources = ARRAY_SIZE(exynos5_clk_src_mpll_list), | 297 | .nr_sources = ARRAY_SIZE(exynos5_clk_src_mpll_list), |
298 | }; | 298 | }; |
299 | 299 | ||
300 | struct clksrc_clk exynos5_clk_mout_mpll = { | 300 | static struct clksrc_clk exynos5_clk_mout_mpll = { |
301 | .clk = { | 301 | .clk = { |
302 | .name = "mout_mpll", | 302 | .name = "mout_mpll", |
303 | }, | 303 | }, |
@@ -472,12 +472,12 @@ static struct clksrc_clk exynos5_clk_pclk_acp = { | |||
472 | 472 | ||
473 | /* Core list of CMU_TOP side */ | 473 | /* Core list of CMU_TOP side */ |
474 | 474 | ||
475 | struct clk *exynos5_clkset_aclk_top_list[] = { | 475 | static struct clk *exynos5_clkset_aclk_top_list[] = { |
476 | [0] = &exynos5_clk_mout_mpll_user.clk, | 476 | [0] = &exynos5_clk_mout_mpll_user.clk, |
477 | [1] = &exynos5_clk_mout_bpll_user.clk, | 477 | [1] = &exynos5_clk_mout_bpll_user.clk, |
478 | }; | 478 | }; |
479 | 479 | ||
480 | struct clksrc_sources exynos5_clkset_aclk = { | 480 | static struct clksrc_sources exynos5_clkset_aclk = { |
481 | .sources = exynos5_clkset_aclk_top_list, | 481 | .sources = exynos5_clkset_aclk_top_list, |
482 | .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_top_list), | 482 | .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_top_list), |
483 | }; | 483 | }; |
@@ -491,12 +491,12 @@ static struct clksrc_clk exynos5_clk_aclk_400 = { | |||
491 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 24, .size = 3 }, | 491 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 24, .size = 3 }, |
492 | }; | 492 | }; |
493 | 493 | ||
494 | struct clk *exynos5_clkset_aclk_333_166_list[] = { | 494 | static struct clk *exynos5_clkset_aclk_333_166_list[] = { |
495 | [0] = &exynos5_clk_mout_cpll.clk, | 495 | [0] = &exynos5_clk_mout_cpll.clk, |
496 | [1] = &exynos5_clk_mout_mpll_user.clk, | 496 | [1] = &exynos5_clk_mout_mpll_user.clk, |
497 | }; | 497 | }; |
498 | 498 | ||
499 | struct clksrc_sources exynos5_clkset_aclk_333_166 = { | 499 | static struct clksrc_sources exynos5_clkset_aclk_333_166 = { |
500 | .sources = exynos5_clkset_aclk_333_166_list, | 500 | .sources = exynos5_clkset_aclk_333_166_list, |
501 | .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_333_166_list), | 501 | .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_333_166_list), |
502 | }; | 502 | }; |
@@ -981,7 +981,7 @@ static struct clk exynos5_clk_fimd1 = { | |||
981 | .ctrlbit = (1 << 0), | 981 | .ctrlbit = (1 << 0), |
982 | }; | 982 | }; |
983 | 983 | ||
984 | struct clk *exynos5_clkset_group_list[] = { | 984 | static struct clk *exynos5_clkset_group_list[] = { |
985 | [0] = &clk_ext_xtal_mux, | 985 | [0] = &clk_ext_xtal_mux, |
986 | [1] = NULL, | 986 | [1] = NULL, |
987 | [2] = &exynos5_clk_sclk_hdmi24m, | 987 | [2] = &exynos5_clk_sclk_hdmi24m, |
@@ -994,7 +994,7 @@ struct clk *exynos5_clkset_group_list[] = { | |||
994 | [9] = &exynos5_clk_mout_cpll.clk, | 994 | [9] = &exynos5_clk_mout_cpll.clk, |
995 | }; | 995 | }; |
996 | 996 | ||
997 | struct clksrc_sources exynos5_clkset_group = { | 997 | static struct clksrc_sources exynos5_clkset_group = { |
998 | .sources = exynos5_clkset_group_list, | 998 | .sources = exynos5_clkset_group_list, |
999 | .nr_sources = ARRAY_SIZE(exynos5_clkset_group_list), | 999 | .nr_sources = ARRAY_SIZE(exynos5_clkset_group_list), |
1000 | }; | 1000 | }; |
@@ -1210,7 +1210,7 @@ static struct clksrc_clk exynos5_clk_sclk_spi2 = { | |||
1210 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC2, .shift = 8, .size = 8 }, | 1210 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC2, .shift = 8, .size = 8 }, |
1211 | }; | 1211 | }; |
1212 | 1212 | ||
1213 | struct clksrc_clk exynos5_clk_sclk_fimd1 = { | 1213 | static struct clksrc_clk exynos5_clk_sclk_fimd1 = { |
1214 | .clk = { | 1214 | .clk = { |
1215 | .name = "sclk_fimd", | 1215 | .name = "sclk_fimd", |
1216 | .devname = "exynos5-fb.1", | 1216 | .devname = "exynos5-fb.1", |
@@ -1491,7 +1491,7 @@ static void exynos5_clock_resume(void) | |||
1491 | #define exynos5_clock_resume NULL | 1491 | #define exynos5_clock_resume NULL |
1492 | #endif | 1492 | #endif |
1493 | 1493 | ||
1494 | struct syscore_ops exynos5_clock_syscore_ops = { | 1494 | static struct syscore_ops exynos5_clock_syscore_ops = { |
1495 | .suspend = exynos5_clock_suspend, | 1495 | .suspend = exynos5_clock_suspend, |
1496 | .resume = exynos5_clock_resume, | 1496 | .resume = exynos5_clock_resume, |
1497 | }; | 1497 | }; |
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 4af8284f3597..4e1dd8d1eda8 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -63,7 +63,7 @@ static void exynos4_map_io(void); | |||
63 | static void exynos5_map_io(void); | 63 | static void exynos5_map_io(void); |
64 | static void exynos4_init_clocks(int xtal); | 64 | static void exynos4_init_clocks(int xtal); |
65 | static void exynos5_init_clocks(int xtal); | 65 | static void exynos5_init_clocks(int xtal); |
66 | static void exynos_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 66 | static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
67 | static int exynos_init(void); | 67 | static int exynos_init(void); |
68 | 68 | ||
69 | static struct cpu_table cpu_ids[] __initdata = { | 69 | static struct cpu_table cpu_ids[] __initdata = { |
@@ -72,7 +72,7 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
72 | .idmask = EXYNOS4_CPU_MASK, | 72 | .idmask = EXYNOS4_CPU_MASK, |
73 | .map_io = exynos4_map_io, | 73 | .map_io = exynos4_map_io, |
74 | .init_clocks = exynos4_init_clocks, | 74 | .init_clocks = exynos4_init_clocks, |
75 | .init_uarts = exynos_init_uarts, | 75 | .init_uarts = exynos4_init_uarts, |
76 | .init = exynos_init, | 76 | .init = exynos_init, |
77 | .name = name_exynos4210, | 77 | .name = name_exynos4210, |
78 | }, { | 78 | }, { |
@@ -80,7 +80,7 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
80 | .idmask = EXYNOS4_CPU_MASK, | 80 | .idmask = EXYNOS4_CPU_MASK, |
81 | .map_io = exynos4_map_io, | 81 | .map_io = exynos4_map_io, |
82 | .init_clocks = exynos4_init_clocks, | 82 | .init_clocks = exynos4_init_clocks, |
83 | .init_uarts = exynos_init_uarts, | 83 | .init_uarts = exynos4_init_uarts, |
84 | .init = exynos_init, | 84 | .init = exynos_init, |
85 | .name = name_exynos4212, | 85 | .name = name_exynos4212, |
86 | }, { | 86 | }, { |
@@ -88,7 +88,7 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
88 | .idmask = EXYNOS4_CPU_MASK, | 88 | .idmask = EXYNOS4_CPU_MASK, |
89 | .map_io = exynos4_map_io, | 89 | .map_io = exynos4_map_io, |
90 | .init_clocks = exynos4_init_clocks, | 90 | .init_clocks = exynos4_init_clocks, |
91 | .init_uarts = exynos_init_uarts, | 91 | .init_uarts = exynos4_init_uarts, |
92 | .init = exynos_init, | 92 | .init = exynos_init, |
93 | .name = name_exynos4412, | 93 | .name = name_exynos4412, |
94 | }, { | 94 | }, { |
@@ -96,7 +96,6 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
96 | .idmask = EXYNOS5_SOC_MASK, | 96 | .idmask = EXYNOS5_SOC_MASK, |
97 | .map_io = exynos5_map_io, | 97 | .map_io = exynos5_map_io, |
98 | .init_clocks = exynos5_init_clocks, | 98 | .init_clocks = exynos5_init_clocks, |
99 | .init_uarts = exynos_init_uarts, | ||
100 | .init = exynos_init, | 99 | .init = exynos_init, |
101 | .name = name_exynos5250, | 100 | .name = name_exynos5250, |
102 | }, | 101 | }, |
@@ -257,25 +256,10 @@ static struct map_desc exynos5_iodesc[] __initdata = { | |||
257 | .length = SZ_64K, | 256 | .length = SZ_64K, |
258 | .type = MT_DEVICE, | 257 | .type = MT_DEVICE, |
259 | }, { | 258 | }, { |
260 | .virtual = (unsigned long)S5P_VA_COMBINER_BASE, | ||
261 | .pfn = __phys_to_pfn(EXYNOS5_PA_COMBINER), | ||
262 | .length = SZ_4K, | ||
263 | .type = MT_DEVICE, | ||
264 | }, { | ||
265 | .virtual = (unsigned long)S3C_VA_UART, | 259 | .virtual = (unsigned long)S3C_VA_UART, |
266 | .pfn = __phys_to_pfn(EXYNOS5_PA_UART), | 260 | .pfn = __phys_to_pfn(EXYNOS5_PA_UART), |
267 | .length = SZ_512K, | 261 | .length = SZ_512K, |
268 | .type = MT_DEVICE, | 262 | .type = MT_DEVICE, |
269 | }, { | ||
270 | .virtual = (unsigned long)S5P_VA_GIC_CPU, | ||
271 | .pfn = __phys_to_pfn(EXYNOS5_PA_GIC_CPU), | ||
272 | .length = SZ_8K, | ||
273 | .type = MT_DEVICE, | ||
274 | }, { | ||
275 | .virtual = (unsigned long)S5P_VA_GIC_DIST, | ||
276 | .pfn = __phys_to_pfn(EXYNOS5_PA_GIC_DIST), | ||
277 | .length = SZ_4K, | ||
278 | .type = MT_DEVICE, | ||
279 | }, | 263 | }, |
280 | }; | 264 | }; |
281 | 265 | ||
@@ -354,23 +338,6 @@ static void __init exynos4_map_io(void) | |||
354 | static void __init exynos5_map_io(void) | 338 | static void __init exynos5_map_io(void) |
355 | { | 339 | { |
356 | iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); | 340 | iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); |
357 | |||
358 | s3c_device_i2c0.resource[0].start = EXYNOS5_PA_IIC(0); | ||
359 | s3c_device_i2c0.resource[0].end = EXYNOS5_PA_IIC(0) + SZ_4K - 1; | ||
360 | s3c_device_i2c0.resource[1].start = EXYNOS5_IRQ_IIC; | ||
361 | s3c_device_i2c0.resource[1].end = EXYNOS5_IRQ_IIC; | ||
362 | |||
363 | s3c_sdhci_setname(0, "exynos4-sdhci"); | ||
364 | s3c_sdhci_setname(1, "exynos4-sdhci"); | ||
365 | s3c_sdhci_setname(2, "exynos4-sdhci"); | ||
366 | s3c_sdhci_setname(3, "exynos4-sdhci"); | ||
367 | |||
368 | /* The I2C bus controllers are directly compatible with s3c2440 */ | ||
369 | s3c_i2c0_setname("s3c2440-i2c"); | ||
370 | s3c_i2c1_setname("s3c2440-i2c"); | ||
371 | s3c_i2c2_setname("s3c2440-i2c"); | ||
372 | |||
373 | s3c64xx_spi_setname("exynos4210-spi"); | ||
374 | } | 341 | } |
375 | 342 | ||
376 | static void __init exynos4_init_clocks(int xtal) | 343 | static void __init exynos4_init_clocks(int xtal) |
@@ -589,7 +556,8 @@ static void __init combiner_init(void __iomem *combiner_base, | |||
589 | } | 556 | } |
590 | 557 | ||
591 | #ifdef CONFIG_OF | 558 | #ifdef CONFIG_OF |
592 | int __init combiner_of_init(struct device_node *np, struct device_node *parent) | 559 | static int __init combiner_of_init(struct device_node *np, |
560 | struct device_node *parent) | ||
593 | { | 561 | { |
594 | void __iomem *combiner_base; | 562 | void __iomem *combiner_base; |
595 | 563 | ||
@@ -727,7 +695,7 @@ static int __init exynos_init(void) | |||
727 | 695 | ||
728 | /* uart registration process */ | 696 | /* uart registration process */ |
729 | 697 | ||
730 | static void __init exynos_init_uarts(struct s3c2410_uartcfg *cfg, int no) | 698 | static void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no) |
731 | { | 699 | { |
732 | struct s3c2410_uartcfg *tcfg = cfg; | 700 | struct s3c2410_uartcfg *tcfg = cfg; |
733 | u32 ucnt; | 701 | u32 ucnt; |
@@ -735,10 +703,7 @@ static void __init exynos_init_uarts(struct s3c2410_uartcfg *cfg, int no) | |||
735 | for (ucnt = 0; ucnt < no; ucnt++, tcfg++) | 703 | for (ucnt = 0; ucnt < no; ucnt++, tcfg++) |
736 | tcfg->has_fracval = 1; | 704 | tcfg->has_fracval = 1; |
737 | 705 | ||
738 | if (soc_is_exynos5250()) | 706 | s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no); |
739 | s3c24xx_init_uartdevs("exynos4210-uart", exynos5_uart_resources, cfg, no); | ||
740 | else | ||
741 | s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no); | ||
742 | } | 707 | } |
743 | 708 | ||
744 | static void __iomem *exynos_eint_base; | 709 | static void __iomem *exynos_eint_base; |
@@ -970,14 +935,7 @@ static void exynos_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | |||
970 | struct irq_chip *chip = irq_get_chip(irq); | 935 | struct irq_chip *chip = irq_get_chip(irq); |
971 | 936 | ||
972 | chained_irq_enter(chip, desc); | 937 | chained_irq_enter(chip, desc); |
973 | chip->irq_mask(&desc->irq_data); | ||
974 | |||
975 | if (chip->irq_ack) | ||
976 | chip->irq_ack(&desc->irq_data); | ||
977 | |||
978 | generic_handle_irq(*irq_data); | 938 | generic_handle_irq(*irq_data); |
979 | |||
980 | chip->irq_unmask(&desc->irq_data); | ||
981 | chained_irq_exit(chip, desc); | 939 | chained_irq_exit(chip, desc); |
982 | } | 940 | } |
983 | 941 | ||
diff --git a/arch/arm/mach-exynos/dev-audio.c b/arch/arm/mach-exynos/dev-audio.c index ae321c7cb15f..a1cb42c39590 100644 --- a/arch/arm/mach-exynos/dev-audio.c +++ b/arch/arm/mach-exynos/dev-audio.c | |||
@@ -14,9 +14,9 @@ | |||
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/dma-mapping.h> | 15 | #include <linux/dma-mapping.h> |
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | #include <linux/platform_data/asoc-s3c.h> | ||
17 | 18 | ||
18 | #include <plat/gpio-cfg.h> | 19 | #include <plat/gpio-cfg.h> |
19 | #include <linux/platform_data/asoc-s3c.h> | ||
20 | 20 | ||
21 | #include <mach/map.h> | 21 | #include <mach/map.h> |
22 | #include <mach/dma.h> | 22 | #include <mach/dma.h> |
diff --git a/arch/arm/mach-exynos/dev-ohci.c b/arch/arm/mach-exynos/dev-ohci.c index 14ed7951a2c6..4244d02dafbd 100644 --- a/arch/arm/mach-exynos/dev-ohci.c +++ b/arch/arm/mach-exynos/dev-ohci.c | |||
@@ -12,10 +12,10 @@ | |||
12 | 12 | ||
13 | #include <linux/dma-mapping.h> | 13 | #include <linux/dma-mapping.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/platform_data/usb-exynos.h> | ||
15 | 16 | ||
16 | #include <mach/irqs.h> | 17 | #include <mach/irqs.h> |
17 | #include <mach/map.h> | 18 | #include <mach/map.h> |
18 | #include <linux/platform_data/usb-exynos.h> | ||
19 | 19 | ||
20 | #include <plat/devs.h> | 20 | #include <plat/devs.h> |
21 | #include <plat/usb-phy.h> | 21 | #include <plat/usb-phy.h> |
diff --git a/arch/arm/mach-exynos/dev-uart.c b/arch/arm/mach-exynos/dev-uart.c index 2e85c022fd16..7c42f4b7c8be 100644 --- a/arch/arm/mach-exynos/dev-uart.c +++ b/arch/arm/mach-exynos/dev-uart.c | |||
@@ -52,27 +52,3 @@ struct s3c24xx_uart_resources exynos4_uart_resources[] __initdata = { | |||
52 | .nr_resources = ARRAY_SIZE(exynos4_uart3_resource), | 52 | .nr_resources = ARRAY_SIZE(exynos4_uart3_resource), |
53 | }, | 53 | }, |
54 | }; | 54 | }; |
55 | |||
56 | EXYNOS_UART_RESOURCE(5, 0) | ||
57 | EXYNOS_UART_RESOURCE(5, 1) | ||
58 | EXYNOS_UART_RESOURCE(5, 2) | ||
59 | EXYNOS_UART_RESOURCE(5, 3) | ||
60 | |||
61 | struct s3c24xx_uart_resources exynos5_uart_resources[] __initdata = { | ||
62 | [0] = { | ||
63 | .resources = exynos5_uart0_resource, | ||
64 | .nr_resources = ARRAY_SIZE(exynos5_uart0_resource), | ||
65 | }, | ||
66 | [1] = { | ||
67 | .resources = exynos5_uart1_resource, | ||
68 | .nr_resources = ARRAY_SIZE(exynos5_uart0_resource), | ||
69 | }, | ||
70 | [2] = { | ||
71 | .resources = exynos5_uart2_resource, | ||
72 | .nr_resources = ARRAY_SIZE(exynos5_uart2_resource), | ||
73 | }, | ||
74 | [3] = { | ||
75 | .resources = exynos5_uart3_resource, | ||
76 | .nr_resources = ARRAY_SIZE(exynos5_uart3_resource), | ||
77 | }, | ||
78 | }; | ||
diff --git a/arch/arm/mach-exynos/dma.c b/arch/arm/mach-exynos/dma.c index 21d568b3b149..87e07d6fc615 100644 --- a/arch/arm/mach-exynos/dma.c +++ b/arch/arm/mach-exynos/dma.c | |||
@@ -275,6 +275,9 @@ static int __init exynos_dma_init(void) | |||
275 | exynos_pdma1_pdata.nr_valid_peri = | 275 | exynos_pdma1_pdata.nr_valid_peri = |
276 | ARRAY_SIZE(exynos4210_pdma1_peri); | 276 | ARRAY_SIZE(exynos4210_pdma1_peri); |
277 | exynos_pdma1_pdata.peri_id = exynos4210_pdma1_peri; | 277 | exynos_pdma1_pdata.peri_id = exynos4210_pdma1_peri; |
278 | |||
279 | if (samsung_rev() == EXYNOS4210_REV_0) | ||
280 | exynos_mdma1_device.res.start = EXYNOS4_PA_S_MDMA1; | ||
278 | } else if (soc_is_exynos4212() || soc_is_exynos4412()) { | 281 | } else if (soc_is_exynos4212() || soc_is_exynos4412()) { |
279 | exynos_pdma0_pdata.nr_valid_peri = | 282 | exynos_pdma0_pdata.nr_valid_peri = |
280 | ARRAY_SIZE(exynos4212_pdma0_peri); | 283 | ARRAY_SIZE(exynos4212_pdma0_peri); |
diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h index 5adacd12e43b..5d44616c2014 100644 --- a/arch/arm/mach-exynos/include/mach/irqs.h +++ b/arch/arm/mach-exynos/include/mach/irqs.h | |||
@@ -262,11 +262,6 @@ | |||
262 | #define EXYNOS5_IRQ_IEM_IEC IRQ_SPI(48) | 262 | #define EXYNOS5_IRQ_IEM_IEC IRQ_SPI(48) |
263 | #define EXYNOS5_IRQ_IEM_APC IRQ_SPI(49) | 263 | #define EXYNOS5_IRQ_IEM_APC IRQ_SPI(49) |
264 | #define EXYNOS5_IRQ_GPIO_C2C IRQ_SPI(50) | 264 | #define EXYNOS5_IRQ_GPIO_C2C IRQ_SPI(50) |
265 | #define EXYNOS5_IRQ_UART0 IRQ_SPI(51) | ||
266 | #define EXYNOS5_IRQ_UART1 IRQ_SPI(52) | ||
267 | #define EXYNOS5_IRQ_UART2 IRQ_SPI(53) | ||
268 | #define EXYNOS5_IRQ_UART3 IRQ_SPI(54) | ||
269 | #define EXYNOS5_IRQ_UART4 IRQ_SPI(55) | ||
270 | #define EXYNOS5_IRQ_IIC IRQ_SPI(56) | 265 | #define EXYNOS5_IRQ_IIC IRQ_SPI(56) |
271 | #define EXYNOS5_IRQ_IIC1 IRQ_SPI(57) | 266 | #define EXYNOS5_IRQ_IIC1 IRQ_SPI(57) |
272 | #define EXYNOS5_IRQ_IIC2 IRQ_SPI(58) | 267 | #define EXYNOS5_IRQ_IIC2 IRQ_SPI(58) |
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 772acd344cbd..9f180aa3a848 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h | |||
@@ -92,6 +92,7 @@ | |||
92 | 92 | ||
93 | #define EXYNOS4_PA_MDMA0 0x10810000 | 93 | #define EXYNOS4_PA_MDMA0 0x10810000 |
94 | #define EXYNOS4_PA_MDMA1 0x12850000 | 94 | #define EXYNOS4_PA_MDMA1 0x12850000 |
95 | #define EXYNOS4_PA_S_MDMA1 0x12840000 | ||
95 | #define EXYNOS4_PA_PDMA0 0x12680000 | 96 | #define EXYNOS4_PA_PDMA0 0x12680000 |
96 | #define EXYNOS4_PA_PDMA1 0x12690000 | 97 | #define EXYNOS4_PA_PDMA1 0x12690000 |
97 | #define EXYNOS5_PA_MDMA0 0x10800000 | 98 | #define EXYNOS5_PA_MDMA0 0x10800000 |
@@ -281,7 +282,6 @@ | |||
281 | #define EXYNOS5_PA_UART1 0x12C10000 | 282 | #define EXYNOS5_PA_UART1 0x12C10000 |
282 | #define EXYNOS5_PA_UART2 0x12C20000 | 283 | #define EXYNOS5_PA_UART2 0x12C20000 |
283 | #define EXYNOS5_PA_UART3 0x12C30000 | 284 | #define EXYNOS5_PA_UART3 0x12C30000 |
284 | #define EXYNOS5_SZ_UART SZ_256 | ||
285 | 285 | ||
286 | #define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) | 286 | #define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) |
287 | 287 | ||
diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h b/arch/arm/mach-exynos/include/mach/regs-pmu.h index d4e392b811a3..70b2795f5283 100644 --- a/arch/arm/mach-exynos/include/mach/regs-pmu.h +++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h | |||
@@ -230,8 +230,6 @@ | |||
230 | 230 | ||
231 | /* For EXYNOS5 */ | 231 | /* For EXYNOS5 */ |
232 | 232 | ||
233 | #define EXYNOS5_USB_CFG S5P_PMUREG(0x0230) | ||
234 | |||
235 | #define EXYNOS5_AUTO_WDTRESET_DISABLE S5P_PMUREG(0x0408) | 233 | #define EXYNOS5_AUTO_WDTRESET_DISABLE S5P_PMUREG(0x0408) |
236 | #define EXYNOS5_MASK_WDTRESET_REQUEST S5P_PMUREG(0x040C) | 234 | #define EXYNOS5_MASK_WDTRESET_REQUEST S5P_PMUREG(0x040C) |
237 | 235 | ||
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index 94970602df61..27d4ed8b116e 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c | |||
@@ -25,7 +25,10 @@ | |||
25 | #include <linux/mmc/host.h> | 25 | #include <linux/mmc/host.h> |
26 | #include <linux/fb.h> | 26 | #include <linux/fb.h> |
27 | #include <linux/pwm_backlight.h> | 27 | #include <linux/pwm_backlight.h> |
28 | #include <linux/platform_data/i2c-s3c2410.h> | ||
29 | #include <linux/platform_data/mipi-csis.h> | ||
28 | #include <linux/platform_data/s3c-hsotg.h> | 30 | #include <linux/platform_data/s3c-hsotg.h> |
31 | #include <linux/platform_data/usb-ehci-s5p.h> | ||
29 | #include <drm/exynos_drm.h> | 32 | #include <drm/exynos_drm.h> |
30 | 33 | ||
31 | #include <video/platform_lcd.h> | 34 | #include <video/platform_lcd.h> |
@@ -45,14 +48,11 @@ | |||
45 | #include <plat/devs.h> | 48 | #include <plat/devs.h> |
46 | #include <plat/fb.h> | 49 | #include <plat/fb.h> |
47 | #include <plat/sdhci.h> | 50 | #include <plat/sdhci.h> |
48 | #include <linux/platform_data/usb-ehci-s5p.h> | ||
49 | #include <plat/clock.h> | 51 | #include <plat/clock.h> |
50 | #include <plat/gpio-cfg.h> | 52 | #include <plat/gpio-cfg.h> |
51 | #include <linux/platform_data/i2c-s3c2410.h> | ||
52 | #include <plat/mfc.h> | 53 | #include <plat/mfc.h> |
53 | #include <plat/fimc-core.h> | 54 | #include <plat/fimc-core.h> |
54 | #include <plat/camport.h> | 55 | #include <plat/camport.h> |
55 | #include <linux/platform_data/mipi-csis.h> | ||
56 | 56 | ||
57 | #include <mach/map.h> | 57 | #include <mach/map.h> |
58 | 58 | ||
@@ -113,7 +113,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc0_data __initdata = { | |||
113 | .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA | | 113 | .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA | |
114 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | | 114 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | |
115 | MMC_CAP_ERASE), | 115 | MMC_CAP_ERASE), |
116 | .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE, | ||
117 | .cd_type = S3C_SDHCI_CD_PERMANENT, | 116 | .cd_type = S3C_SDHCI_CD_PERMANENT, |
118 | }; | 117 | }; |
119 | 118 | ||
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index d8dc6d7f0c00..c931ce15a966 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c | |||
@@ -23,7 +23,10 @@ | |||
23 | #include <linux/mfd/max8997.h> | 23 | #include <linux/mfd/max8997.h> |
24 | #include <linux/lcd.h> | 24 | #include <linux/lcd.h> |
25 | #include <linux/rfkill-gpio.h> | 25 | #include <linux/rfkill-gpio.h> |
26 | #include <linux/platform_data/i2c-s3c2410.h> | ||
26 | #include <linux/platform_data/s3c-hsotg.h> | 27 | #include <linux/platform_data/s3c-hsotg.h> |
28 | #include <linux/platform_data/usb-ehci-s5p.h> | ||
29 | #include <linux/platform_data/usb-exynos.h> | ||
27 | 30 | ||
28 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
29 | #include <asm/hardware/gic.h> | 32 | #include <asm/hardware/gic.h> |
@@ -36,8 +39,6 @@ | |||
36 | #include <plat/cpu.h> | 39 | #include <plat/cpu.h> |
37 | #include <plat/devs.h> | 40 | #include <plat/devs.h> |
38 | #include <plat/sdhci.h> | 41 | #include <plat/sdhci.h> |
39 | #include <linux/platform_data/i2c-s3c2410.h> | ||
40 | #include <linux/platform_data/usb-ehci-s5p.h> | ||
41 | #include <plat/clock.h> | 42 | #include <plat/clock.h> |
42 | #include <plat/gpio-cfg.h> | 43 | #include <plat/gpio-cfg.h> |
43 | #include <plat/backlight.h> | 44 | #include <plat/backlight.h> |
@@ -45,7 +46,6 @@ | |||
45 | #include <plat/mfc.h> | 46 | #include <plat/mfc.h> |
46 | #include <plat/hdmi.h> | 47 | #include <plat/hdmi.h> |
47 | 48 | ||
48 | #include <linux/platform_data/usb-exynos.h> | ||
49 | #include <mach/map.h> | 49 | #include <mach/map.h> |
50 | 50 | ||
51 | #include <drm/exynos_drm.h> | 51 | #include <drm/exynos_drm.h> |
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index 17b9ca48722e..a1555a73c7af 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/pwm_backlight.h> | 21 | #include <linux/pwm_backlight.h> |
22 | #include <linux/regulator/machine.h> | 22 | #include <linux/regulator/machine.h> |
23 | #include <linux/serial_core.h> | 23 | #include <linux/serial_core.h> |
24 | #include <linux/platform_data/i2c-s3c2410.h> | ||
24 | #include <linux/platform_data/s3c-hsotg.h> | 25 | #include <linux/platform_data/s3c-hsotg.h> |
25 | 26 | ||
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
@@ -34,7 +35,6 @@ | |||
34 | #include <plat/devs.h> | 35 | #include <plat/devs.h> |
35 | #include <plat/fb.h> | 36 | #include <plat/fb.h> |
36 | #include <plat/gpio-cfg.h> | 37 | #include <plat/gpio-cfg.h> |
37 | #include <linux/platform_data/i2c-s3c2410.h> | ||
38 | #include <plat/keypad.h> | 38 | #include <plat/keypad.h> |
39 | #include <plat/mfc.h> | 39 | #include <plat/mfc.h> |
40 | #include <plat/regs-serial.h> | 40 | #include <plat/regs-serial.h> |
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index 4f0ac5397ba3..063cb94b934d 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c | |||
@@ -20,7 +20,10 @@ | |||
20 | #include <linux/input.h> | 20 | #include <linux/input.h> |
21 | #include <linux/pwm.h> | 21 | #include <linux/pwm.h> |
22 | #include <linux/pwm_backlight.h> | 22 | #include <linux/pwm_backlight.h> |
23 | #include <linux/platform_data/i2c-s3c2410.h> | ||
23 | #include <linux/platform_data/s3c-hsotg.h> | 24 | #include <linux/platform_data/s3c-hsotg.h> |
25 | #include <linux/platform_data/usb-ehci-s5p.h> | ||
26 | #include <linux/platform_data/usb-exynos.h> | ||
24 | 27 | ||
25 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
26 | #include <asm/hardware/gic.h> | 29 | #include <asm/hardware/gic.h> |
@@ -35,16 +38,13 @@ | |||
35 | #include <plat/fb.h> | 38 | #include <plat/fb.h> |
36 | #include <plat/keypad.h> | 39 | #include <plat/keypad.h> |
37 | #include <plat/sdhci.h> | 40 | #include <plat/sdhci.h> |
38 | #include <linux/platform_data/i2c-s3c2410.h> | ||
39 | #include <plat/gpio-cfg.h> | 41 | #include <plat/gpio-cfg.h> |
40 | #include <plat/backlight.h> | 42 | #include <plat/backlight.h> |
41 | #include <plat/mfc.h> | 43 | #include <plat/mfc.h> |
42 | #include <linux/platform_data/usb-ehci-s5p.h> | ||
43 | #include <plat/clock.h> | 44 | #include <plat/clock.h> |
44 | #include <plat/hdmi.h> | 45 | #include <plat/hdmi.h> |
45 | 46 | ||
46 | #include <mach/map.h> | 47 | #include <mach/map.h> |
47 | #include <linux/platform_data/usb-exynos.h> | ||
48 | 48 | ||
49 | #include <drm/exynos_drm.h> | 49 | #include <drm/exynos_drm.h> |
50 | #include "common.h" | 50 | #include "common.h" |
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index cfdf876a8626..9e3340f18950 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/i2c-gpio.h> | 23 | #include <linux/i2c-gpio.h> |
24 | #include <linux/i2c/mcs.h> | 24 | #include <linux/i2c/mcs.h> |
25 | #include <linux/i2c/atmel_mxt_ts.h> | 25 | #include <linux/i2c/atmel_mxt_ts.h> |
26 | #include <linux/platform_data/i2c-s3c2410.h> | ||
27 | #include <linux/platform_data/mipi-csis.h> | ||
26 | #include <linux/platform_data/s3c-hsotg.h> | 28 | #include <linux/platform_data/s3c-hsotg.h> |
27 | #include <drm/exynos_drm.h> | 29 | #include <drm/exynos_drm.h> |
28 | 30 | ||
@@ -35,7 +37,6 @@ | |||
35 | #include <plat/clock.h> | 37 | #include <plat/clock.h> |
36 | #include <plat/cpu.h> | 38 | #include <plat/cpu.h> |
37 | #include <plat/devs.h> | 39 | #include <plat/devs.h> |
38 | #include <linux/platform_data/i2c-s3c2410.h> | ||
39 | #include <plat/gpio-cfg.h> | 40 | #include <plat/gpio-cfg.h> |
40 | #include <plat/fb.h> | 41 | #include <plat/fb.h> |
41 | #include <plat/mfc.h> | 42 | #include <plat/mfc.h> |
@@ -43,7 +44,6 @@ | |||
43 | #include <plat/fimc-core.h> | 44 | #include <plat/fimc-core.h> |
44 | #include <plat/s5p-time.h> | 45 | #include <plat/s5p-time.h> |
45 | #include <plat/camport.h> | 46 | #include <plat/camport.h> |
46 | #include <linux/platform_data/mipi-csis.h> | ||
47 | 47 | ||
48 | #include <mach/map.h> | 48 | #include <mach/map.h> |
49 | 49 | ||
@@ -754,7 +754,6 @@ static struct s3c_sdhci_platdata universal_hsmmc0_data __initdata = { | |||
754 | .max_width = 8, | 754 | .max_width = 8, |
755 | .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA | | 755 | .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA | |
756 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), | 756 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), |
757 | .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE, | ||
758 | .cd_type = S3C_SDHCI_CD_PERMANENT, | 757 | .cd_type = S3C_SDHCI_CD_PERMANENT, |
759 | }; | 758 | }; |
760 | 759 | ||
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig index 350e26636a06..abeff25532ab 100644 --- a/arch/arm/mach-integrator/Kconfig +++ b/arch/arm/mach-integrator/Kconfig | |||
@@ -8,6 +8,7 @@ config ARCH_INTEGRATOR_AP | |||
8 | select MIGHT_HAVE_PCI | 8 | select MIGHT_HAVE_PCI |
9 | select SERIAL_AMBA_PL010 | 9 | select SERIAL_AMBA_PL010 |
10 | select SERIAL_AMBA_PL010_CONSOLE | 10 | select SERIAL_AMBA_PL010_CONSOLE |
11 | select SOC_BUS | ||
11 | help | 12 | help |
12 | Include support for the ARM(R) Integrator/AP and | 13 | Include support for the ARM(R) Integrator/AP and |
13 | Integrator/PP2 platforms. | 14 | Integrator/PP2 platforms. |
@@ -19,6 +20,7 @@ config ARCH_INTEGRATOR_CP | |||
19 | select PLAT_VERSATILE_CLCD | 20 | select PLAT_VERSATILE_CLCD |
20 | select SERIAL_AMBA_PL011 | 21 | select SERIAL_AMBA_PL011 |
21 | select SERIAL_AMBA_PL011_CONSOLE | 22 | select SERIAL_AMBA_PL011_CONSOLE |
23 | select SOC_BUS | ||
22 | help | 24 | help |
23 | Include support for the ARM(R) Integrator CP platform. | 25 | Include support for the ARM(R) Integrator CP platform. |
24 | 26 | ||
diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-integrator/common.h index c3ff21b5ea24..79197d8b34aa 100644 --- a/arch/arm/mach-integrator/common.h +++ b/arch/arm/mach-integrator/common.h | |||
@@ -1,6 +1,12 @@ | |||
1 | #include <linux/amba/serial.h> | 1 | #include <linux/amba/serial.h> |
2 | extern struct amba_pl010_data integrator_uart_data; | 2 | #ifdef CONFIG_ARCH_INTEGRATOR_AP |
3 | extern struct amba_pl010_data ap_uart_data; | ||
4 | #else | ||
5 | /* Not used without Integrator/AP support anyway */ | ||
6 | struct amba_pl010_data ap_uart_data {}; | ||
7 | #endif | ||
3 | void integrator_init_early(void); | 8 | void integrator_init_early(void); |
4 | int integrator_init(bool is_cp); | 9 | int integrator_init(bool is_cp); |
5 | void integrator_reserve(void); | 10 | void integrator_reserve(void); |
6 | void integrator_restart(char, const char *); | 11 | void integrator_restart(char, const char *); |
12 | void integrator_init_sysfs(struct device *parent, u32 id); | ||
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index ea22a17246d7..39c060f75e47 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -18,10 +18,10 @@ | |||
18 | #include <linux/memblock.h> | 18 | #include <linux/memblock.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
21 | #include <linux/termios.h> | ||
22 | #include <linux/amba/bus.h> | 21 | #include <linux/amba/bus.h> |
23 | #include <linux/amba/serial.h> | 22 | #include <linux/amba/serial.h> |
24 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/stat.h> | ||
25 | 25 | ||
26 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
27 | #include <mach/platform.h> | 27 | #include <mach/platform.h> |
@@ -46,10 +46,10 @@ static AMBA_APB_DEVICE(rtc, "rtc", 0, | |||
46 | INTEGRATOR_RTC_BASE, INTEGRATOR_RTC_IRQ, NULL); | 46 | INTEGRATOR_RTC_BASE, INTEGRATOR_RTC_IRQ, NULL); |
47 | 47 | ||
48 | static AMBA_APB_DEVICE(uart0, "uart0", 0, | 48 | static AMBA_APB_DEVICE(uart0, "uart0", 0, |
49 | INTEGRATOR_UART0_BASE, INTEGRATOR_UART0_IRQ, &integrator_uart_data); | 49 | INTEGRATOR_UART0_BASE, INTEGRATOR_UART0_IRQ, NULL); |
50 | 50 | ||
51 | static AMBA_APB_DEVICE(uart1, "uart1", 0, | 51 | static AMBA_APB_DEVICE(uart1, "uart1", 0, |
52 | INTEGRATOR_UART1_BASE, INTEGRATOR_UART1_IRQ, &integrator_uart_data); | 52 | INTEGRATOR_UART1_BASE, INTEGRATOR_UART1_IRQ, NULL); |
53 | 53 | ||
54 | static AMBA_APB_DEVICE(kmi0, "kmi0", 0, KMI0_BASE, KMI0_IRQ, NULL); | 54 | static AMBA_APB_DEVICE(kmi0, "kmi0", 0, KMI0_BASE, KMI0_IRQ, NULL); |
55 | static AMBA_APB_DEVICE(kmi1, "kmi1", 0, KMI1_BASE, KMI1_IRQ, NULL); | 55 | static AMBA_APB_DEVICE(kmi1, "kmi1", 0, KMI1_BASE, KMI1_IRQ, NULL); |
@@ -77,6 +77,8 @@ int __init integrator_init(bool is_cp) | |||
77 | uart1_device.periphid = 0x00041010; | 77 | uart1_device.periphid = 0x00041010; |
78 | kmi0_device.periphid = 0x00041050; | 78 | kmi0_device.periphid = 0x00041050; |
79 | kmi1_device.periphid = 0x00041050; | 79 | kmi1_device.periphid = 0x00041050; |
80 | uart0_device.dev.platform_data = &ap_uart_data; | ||
81 | uart1_device.dev.platform_data = &ap_uart_data; | ||
80 | } | 82 | } |
81 | 83 | ||
82 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 84 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
@@ -89,49 +91,6 @@ int __init integrator_init(bool is_cp) | |||
89 | 91 | ||
90 | #endif | 92 | #endif |
91 | 93 | ||
92 | /* | ||
93 | * On the Integrator platform, the port RTS and DTR are provided by | ||
94 | * bits in the following SC_CTRLS register bits: | ||
95 | * RTS DTR | ||
96 | * UART0 7 6 | ||
97 | * UART1 5 4 | ||
98 | */ | ||
99 | #define SC_CTRLC __io_address(INTEGRATOR_SC_CTRLC) | ||
100 | #define SC_CTRLS __io_address(INTEGRATOR_SC_CTRLS) | ||
101 | |||
102 | static void integrator_uart_set_mctrl(struct amba_device *dev, void __iomem *base, unsigned int mctrl) | ||
103 | { | ||
104 | unsigned int ctrls = 0, ctrlc = 0, rts_mask, dtr_mask; | ||
105 | u32 phybase = dev->res.start; | ||
106 | |||
107 | if (phybase == INTEGRATOR_UART0_BASE) { | ||
108 | /* UART0 */ | ||
109 | rts_mask = 1 << 4; | ||
110 | dtr_mask = 1 << 5; | ||
111 | } else { | ||
112 | /* UART1 */ | ||
113 | rts_mask = 1 << 6; | ||
114 | dtr_mask = 1 << 7; | ||
115 | } | ||
116 | |||
117 | if (mctrl & TIOCM_RTS) | ||
118 | ctrlc |= rts_mask; | ||
119 | else | ||
120 | ctrls |= rts_mask; | ||
121 | |||
122 | if (mctrl & TIOCM_DTR) | ||
123 | ctrlc |= dtr_mask; | ||
124 | else | ||
125 | ctrls |= dtr_mask; | ||
126 | |||
127 | __raw_writel(ctrls, SC_CTRLS); | ||
128 | __raw_writel(ctrlc, SC_CTRLC); | ||
129 | } | ||
130 | |||
131 | struct amba_pl010_data integrator_uart_data = { | ||
132 | .set_mctrl = integrator_uart_set_mctrl, | ||
133 | }; | ||
134 | |||
135 | static DEFINE_RAW_SPINLOCK(cm_lock); | 94 | static DEFINE_RAW_SPINLOCK(cm_lock); |
136 | 95 | ||
137 | /** | 96 | /** |
@@ -169,3 +128,93 @@ void integrator_restart(char mode, const char *cmd) | |||
169 | { | 128 | { |
170 | cm_control(CM_CTRL_RESET, CM_CTRL_RESET); | 129 | cm_control(CM_CTRL_RESET, CM_CTRL_RESET); |
171 | } | 130 | } |
131 | |||
132 | static u32 integrator_id; | ||
133 | |||
134 | static ssize_t intcp_get_manf(struct device *dev, | ||
135 | struct device_attribute *attr, | ||
136 | char *buf) | ||
137 | { | ||
138 | return sprintf(buf, "%02x\n", integrator_id >> 24); | ||
139 | } | ||
140 | |||
141 | static struct device_attribute intcp_manf_attr = | ||
142 | __ATTR(manufacturer, S_IRUGO, intcp_get_manf, NULL); | ||
143 | |||
144 | static ssize_t intcp_get_arch(struct device *dev, | ||
145 | struct device_attribute *attr, | ||
146 | char *buf) | ||
147 | { | ||
148 | const char *arch; | ||
149 | |||
150 | switch ((integrator_id >> 16) & 0xff) { | ||
151 | case 0x00: | ||
152 | arch = "ASB little-endian"; | ||
153 | break; | ||
154 | case 0x01: | ||
155 | arch = "AHB little-endian"; | ||
156 | break; | ||
157 | case 0x03: | ||
158 | arch = "AHB-Lite system bus, bi-endian"; | ||
159 | break; | ||
160 | case 0x04: | ||
161 | arch = "AHB"; | ||
162 | break; | ||
163 | default: | ||
164 | arch = "Unknown"; | ||
165 | break; | ||
166 | } | ||
167 | |||
168 | return sprintf(buf, "%s\n", arch); | ||
169 | } | ||
170 | |||
171 | static struct device_attribute intcp_arch_attr = | ||
172 | __ATTR(architecture, S_IRUGO, intcp_get_arch, NULL); | ||
173 | |||
174 | static ssize_t intcp_get_fpga(struct device *dev, | ||
175 | struct device_attribute *attr, | ||
176 | char *buf) | ||
177 | { | ||
178 | const char *fpga; | ||
179 | |||
180 | switch ((integrator_id >> 12) & 0xf) { | ||
181 | case 0x01: | ||
182 | fpga = "XC4062"; | ||
183 | break; | ||
184 | case 0x02: | ||
185 | fpga = "XC4085"; | ||
186 | break; | ||
187 | case 0x04: | ||
188 | fpga = "EPM7256AE (Altera PLD)"; | ||
189 | break; | ||
190 | default: | ||
191 | fpga = "Unknown"; | ||
192 | break; | ||
193 | } | ||
194 | |||
195 | return sprintf(buf, "%s\n", fpga); | ||
196 | } | ||
197 | |||
198 | static struct device_attribute intcp_fpga_attr = | ||
199 | __ATTR(fpga, S_IRUGO, intcp_get_fpga, NULL); | ||
200 | |||
201 | static ssize_t intcp_get_build(struct device *dev, | ||
202 | struct device_attribute *attr, | ||
203 | char *buf) | ||
204 | { | ||
205 | return sprintf(buf, "%02x\n", (integrator_id >> 4) & 0xFF); | ||
206 | } | ||
207 | |||
208 | static struct device_attribute intcp_build_attr = | ||
209 | __ATTR(build, S_IRUGO, intcp_get_build, NULL); | ||
210 | |||
211 | |||
212 | |||
213 | void integrator_init_sysfs(struct device *parent, u32 id) | ||
214 | { | ||
215 | integrator_id = id; | ||
216 | device_create_file(parent, &intcp_manf_attr); | ||
217 | device_create_file(parent, &intcp_arch_attr); | ||
218 | device_create_file(parent, &intcp_fpga_attr); | ||
219 | device_create_file(parent, &intcp_build_attr); | ||
220 | } | ||
diff --git a/arch/arm/mach-integrator/include/mach/platform.h b/arch/arm/mach-integrator/include/mach/platform.h index efeac5d0bc9e..be5859efe10e 100644 --- a/arch/arm/mach-integrator/include/mach/platform.h +++ b/arch/arm/mach-integrator/include/mach/platform.h | |||
@@ -190,7 +190,6 @@ | |||
190 | #define INTEGRATOR_SC_CTRLC_OFFSET 0x0C | 190 | #define INTEGRATOR_SC_CTRLC_OFFSET 0x0C |
191 | #define INTEGRATOR_SC_DEC_OFFSET 0x10 | 191 | #define INTEGRATOR_SC_DEC_OFFSET 0x10 |
192 | #define INTEGRATOR_SC_ARB_OFFSET 0x14 | 192 | #define INTEGRATOR_SC_ARB_OFFSET 0x14 |
193 | #define INTEGRATOR_SC_PCIENABLE_OFFSET 0x18 | ||
194 | #define INTEGRATOR_SC_LOCK_OFFSET 0x1C | 193 | #define INTEGRATOR_SC_LOCK_OFFSET 0x1C |
195 | 194 | ||
196 | #define INTEGRATOR_SC_BASE 0x11000000 | 195 | #define INTEGRATOR_SC_BASE 0x11000000 |
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index e6617c134faf..a0a7cbbb7a70 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -37,6 +37,9 @@ | |||
37 | #include <linux/of_irq.h> | 37 | #include <linux/of_irq.h> |
38 | #include <linux/of_address.h> | 38 | #include <linux/of_address.h> |
39 | #include <linux/of_platform.h> | 39 | #include <linux/of_platform.h> |
40 | #include <linux/stat.h> | ||
41 | #include <linux/sys_soc.h> | ||
42 | #include <linux/termios.h> | ||
40 | #include <video/vga.h> | 43 | #include <video/vga.h> |
41 | 44 | ||
42 | #include <mach/hardware.h> | 45 | #include <mach/hardware.h> |
@@ -60,7 +63,10 @@ | |||
60 | 63 | ||
61 | #include "common.h" | 64 | #include "common.h" |
62 | 65 | ||
63 | /* | 66 | /* Base address to the AP system controller */ |
67 | void __iomem *ap_syscon_base; | ||
68 | |||
69 | /* | ||
64 | * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx | 70 | * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx |
65 | * is the (PA >> 12). | 71 | * is the (PA >> 12). |
66 | * | 72 | * |
@@ -68,7 +74,6 @@ | |||
68 | * just for now). | 74 | * just for now). |
69 | */ | 75 | */ |
70 | #define VA_IC_BASE __io_address(INTEGRATOR_IC_BASE) | 76 | #define VA_IC_BASE __io_address(INTEGRATOR_IC_BASE) |
71 | #define VA_SC_BASE __io_address(INTEGRATOR_SC_BASE) | ||
72 | #define VA_EBI_BASE __io_address(INTEGRATOR_EBI_BASE) | 77 | #define VA_EBI_BASE __io_address(INTEGRATOR_EBI_BASE) |
73 | #define VA_CMIC_BASE __io_address(INTEGRATOR_HDR_IC) | 78 | #define VA_CMIC_BASE __io_address(INTEGRATOR_HDR_IC) |
74 | 79 | ||
@@ -97,11 +102,6 @@ static struct map_desc ap_io_desc[] __initdata = { | |||
97 | .length = SZ_4K, | 102 | .length = SZ_4K, |
98 | .type = MT_DEVICE | 103 | .type = MT_DEVICE |
99 | }, { | 104 | }, { |
100 | .virtual = IO_ADDRESS(INTEGRATOR_SC_BASE), | ||
101 | .pfn = __phys_to_pfn(INTEGRATOR_SC_BASE), | ||
102 | .length = SZ_4K, | ||
103 | .type = MT_DEVICE | ||
104 | }, { | ||
105 | .virtual = IO_ADDRESS(INTEGRATOR_EBI_BASE), | 105 | .virtual = IO_ADDRESS(INTEGRATOR_EBI_BASE), |
106 | .pfn = __phys_to_pfn(INTEGRATOR_EBI_BASE), | 106 | .pfn = __phys_to_pfn(INTEGRATOR_EBI_BASE), |
107 | .length = SZ_4K, | 107 | .length = SZ_4K, |
@@ -122,11 +122,6 @@ static struct map_desc ap_io_desc[] __initdata = { | |||
122 | .length = SZ_4K, | 122 | .length = SZ_4K, |
123 | .type = MT_DEVICE | 123 | .type = MT_DEVICE |
124 | }, { | 124 | }, { |
125 | .virtual = IO_ADDRESS(INTEGRATOR_UART1_BASE), | ||
126 | .pfn = __phys_to_pfn(INTEGRATOR_UART1_BASE), | ||
127 | .length = SZ_4K, | ||
128 | .type = MT_DEVICE | ||
129 | }, { | ||
130 | .virtual = IO_ADDRESS(INTEGRATOR_DBG_BASE), | 125 | .virtual = IO_ADDRESS(INTEGRATOR_DBG_BASE), |
131 | .pfn = __phys_to_pfn(INTEGRATOR_DBG_BASE), | 126 | .pfn = __phys_to_pfn(INTEGRATOR_DBG_BASE), |
132 | .length = SZ_4K, | 127 | .length = SZ_4K, |
@@ -201,8 +196,6 @@ device_initcall(irq_syscore_init); | |||
201 | /* | 196 | /* |
202 | * Flash handling. | 197 | * Flash handling. |
203 | */ | 198 | */ |
204 | #define SC_CTRLC (VA_SC_BASE + INTEGRATOR_SC_CTRLC_OFFSET) | ||
205 | #define SC_CTRLS (VA_SC_BASE + INTEGRATOR_SC_CTRLS_OFFSET) | ||
206 | #define EBI_CSR1 (VA_EBI_BASE + INTEGRATOR_EBI_CSR1_OFFSET) | 199 | #define EBI_CSR1 (VA_EBI_BASE + INTEGRATOR_EBI_CSR1_OFFSET) |
207 | #define EBI_LOCK (VA_EBI_BASE + INTEGRATOR_EBI_LOCK_OFFSET) | 200 | #define EBI_LOCK (VA_EBI_BASE + INTEGRATOR_EBI_LOCK_OFFSET) |
208 | 201 | ||
@@ -210,7 +203,8 @@ static int ap_flash_init(struct platform_device *dev) | |||
210 | { | 203 | { |
211 | u32 tmp; | 204 | u32 tmp; |
212 | 205 | ||
213 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, SC_CTRLC); | 206 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, |
207 | ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); | ||
214 | 208 | ||
215 | tmp = readl(EBI_CSR1) | INTEGRATOR_EBI_WRITE_ENABLE; | 209 | tmp = readl(EBI_CSR1) | INTEGRATOR_EBI_WRITE_ENABLE; |
216 | writel(tmp, EBI_CSR1); | 210 | writel(tmp, EBI_CSR1); |
@@ -227,7 +221,8 @@ static void ap_flash_exit(struct platform_device *dev) | |||
227 | { | 221 | { |
228 | u32 tmp; | 222 | u32 tmp; |
229 | 223 | ||
230 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, SC_CTRLC); | 224 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN | INTEGRATOR_SC_CTRL_nFLWP, |
225 | ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); | ||
231 | 226 | ||
232 | tmp = readl(EBI_CSR1) & ~INTEGRATOR_EBI_WRITE_ENABLE; | 227 | tmp = readl(EBI_CSR1) & ~INTEGRATOR_EBI_WRITE_ENABLE; |
233 | writel(tmp, EBI_CSR1); | 228 | writel(tmp, EBI_CSR1); |
@@ -241,9 +236,12 @@ static void ap_flash_exit(struct platform_device *dev) | |||
241 | 236 | ||
242 | static void ap_flash_set_vpp(struct platform_device *pdev, int on) | 237 | static void ap_flash_set_vpp(struct platform_device *pdev, int on) |
243 | { | 238 | { |
244 | void __iomem *reg = on ? SC_CTRLS : SC_CTRLC; | 239 | if (on) |
245 | 240 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN, | |
246 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN, reg); | 241 | ap_syscon_base + INTEGRATOR_SC_CTRLS_OFFSET); |
242 | else | ||
243 | writel(INTEGRATOR_SC_CTRL_nFLVPPEN, | ||
244 | ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); | ||
247 | } | 245 | } |
248 | 246 | ||
249 | static struct physmap_flash_data ap_flash_data = { | 247 | static struct physmap_flash_data ap_flash_data = { |
@@ -254,6 +252,45 @@ static struct physmap_flash_data ap_flash_data = { | |||
254 | }; | 252 | }; |
255 | 253 | ||
256 | /* | 254 | /* |
255 | * For the PL010 found in the Integrator/AP some of the UART control is | ||
256 | * implemented in the system controller and accessed using a callback | ||
257 | * from the driver. | ||
258 | */ | ||
259 | static void integrator_uart_set_mctrl(struct amba_device *dev, | ||
260 | void __iomem *base, unsigned int mctrl) | ||
261 | { | ||
262 | unsigned int ctrls = 0, ctrlc = 0, rts_mask, dtr_mask; | ||
263 | u32 phybase = dev->res.start; | ||
264 | |||
265 | if (phybase == INTEGRATOR_UART0_BASE) { | ||
266 | /* UART0 */ | ||
267 | rts_mask = 1 << 4; | ||
268 | dtr_mask = 1 << 5; | ||
269 | } else { | ||
270 | /* UART1 */ | ||
271 | rts_mask = 1 << 6; | ||
272 | dtr_mask = 1 << 7; | ||
273 | } | ||
274 | |||
275 | if (mctrl & TIOCM_RTS) | ||
276 | ctrlc |= rts_mask; | ||
277 | else | ||
278 | ctrls |= rts_mask; | ||
279 | |||
280 | if (mctrl & TIOCM_DTR) | ||
281 | ctrlc |= dtr_mask; | ||
282 | else | ||
283 | ctrls |= dtr_mask; | ||
284 | |||
285 | __raw_writel(ctrls, ap_syscon_base + INTEGRATOR_SC_CTRLS_OFFSET); | ||
286 | __raw_writel(ctrlc, ap_syscon_base + INTEGRATOR_SC_CTRLC_OFFSET); | ||
287 | } | ||
288 | |||
289 | struct amba_pl010_data ap_uart_data = { | ||
290 | .set_mctrl = integrator_uart_set_mctrl, | ||
291 | }; | ||
292 | |||
293 | /* | ||
257 | * Where is the timer (VA)? | 294 | * Where is the timer (VA)? |
258 | */ | 295 | */ |
259 | #define TIMER0_VA_BASE __io_address(INTEGRATOR_TIMER0_BASE) | 296 | #define TIMER0_VA_BASE __io_address(INTEGRATOR_TIMER0_BASE) |
@@ -450,9 +487,9 @@ static struct of_dev_auxdata ap_auxdata_lookup[] __initdata = { | |||
450 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_RTC_BASE, | 487 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_RTC_BASE, |
451 | "rtc", NULL), | 488 | "rtc", NULL), |
452 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART0_BASE, | 489 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART0_BASE, |
453 | "uart0", &integrator_uart_data), | 490 | "uart0", &ap_uart_data), |
454 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART1_BASE, | 491 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART1_BASE, |
455 | "uart1", &integrator_uart_data), | 492 | "uart1", &ap_uart_data), |
456 | OF_DEV_AUXDATA("arm,primecell", KMI0_BASE, | 493 | OF_DEV_AUXDATA("arm,primecell", KMI0_BASE, |
457 | "kmi0", NULL), | 494 | "kmi0", NULL), |
458 | OF_DEV_AUXDATA("arm,primecell", KMI1_BASE, | 495 | OF_DEV_AUXDATA("arm,primecell", KMI1_BASE, |
@@ -465,12 +502,60 @@ static struct of_dev_auxdata ap_auxdata_lookup[] __initdata = { | |||
465 | static void __init ap_init_of(void) | 502 | static void __init ap_init_of(void) |
466 | { | 503 | { |
467 | unsigned long sc_dec; | 504 | unsigned long sc_dec; |
505 | struct device_node *root; | ||
506 | struct device_node *syscon; | ||
507 | struct device *parent; | ||
508 | struct soc_device *soc_dev; | ||
509 | struct soc_device_attribute *soc_dev_attr; | ||
510 | u32 ap_sc_id; | ||
511 | int err; | ||
468 | int i; | 512 | int i; |
469 | 513 | ||
470 | of_platform_populate(NULL, of_default_bus_match_table, | 514 | /* Here we create an SoC device for the root node */ |
471 | ap_auxdata_lookup, NULL); | 515 | root = of_find_node_by_path("/"); |
516 | if (!root) | ||
517 | return; | ||
518 | syscon = of_find_node_by_path("/syscon"); | ||
519 | if (!syscon) | ||
520 | return; | ||
521 | |||
522 | ap_syscon_base = of_iomap(syscon, 0); | ||
523 | if (!ap_syscon_base) | ||
524 | return; | ||
472 | 525 | ||
473 | sc_dec = readl(VA_SC_BASE + INTEGRATOR_SC_DEC_OFFSET); | 526 | ap_sc_id = readl(ap_syscon_base); |
527 | |||
528 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); | ||
529 | if (!soc_dev_attr) | ||
530 | return; | ||
531 | |||
532 | err = of_property_read_string(root, "compatible", | ||
533 | &soc_dev_attr->soc_id); | ||
534 | if (err) | ||
535 | return; | ||
536 | err = of_property_read_string(root, "model", &soc_dev_attr->machine); | ||
537 | if (err) | ||
538 | return; | ||
539 | soc_dev_attr->family = "Integrator"; | ||
540 | soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%c", | ||
541 | 'A' + (ap_sc_id & 0x0f)); | ||
542 | |||
543 | soc_dev = soc_device_register(soc_dev_attr); | ||
544 | if (IS_ERR_OR_NULL(soc_dev)) { | ||
545 | kfree(soc_dev_attr->revision); | ||
546 | kfree(soc_dev_attr); | ||
547 | return; | ||
548 | } | ||
549 | |||
550 | parent = soc_device_to_device(soc_dev); | ||
551 | |||
552 | if (!IS_ERR_OR_NULL(parent)) | ||
553 | integrator_init_sysfs(parent, ap_sc_id); | ||
554 | |||
555 | of_platform_populate(root, of_default_bus_match_table, | ||
556 | ap_auxdata_lookup, parent); | ||
557 | |||
558 | sc_dec = readl(ap_syscon_base + INTEGRATOR_SC_DEC_OFFSET); | ||
474 | for (i = 0; i < 4; i++) { | 559 | for (i = 0; i < 4; i++) { |
475 | struct lm_device *lmdev; | 560 | struct lm_device *lmdev; |
476 | 561 | ||
@@ -514,6 +599,27 @@ MACHINE_END | |||
514 | #ifdef CONFIG_ATAGS | 599 | #ifdef CONFIG_ATAGS |
515 | 600 | ||
516 | /* | 601 | /* |
602 | * For the ATAG boot some static mappings are needed. This will | ||
603 | * go away with the ATAG support down the road. | ||
604 | */ | ||
605 | |||
606 | static struct map_desc ap_io_desc_atag[] __initdata = { | ||
607 | { | ||
608 | .virtual = IO_ADDRESS(INTEGRATOR_SC_BASE), | ||
609 | .pfn = __phys_to_pfn(INTEGRATOR_SC_BASE), | ||
610 | .length = SZ_4K, | ||
611 | .type = MT_DEVICE | ||
612 | }, | ||
613 | }; | ||
614 | |||
615 | static void __init ap_map_io_atag(void) | ||
616 | { | ||
617 | iotable_init(ap_io_desc_atag, ARRAY_SIZE(ap_io_desc_atag)); | ||
618 | ap_syscon_base = __io_address(INTEGRATOR_SC_BASE); | ||
619 | ap_map_io(); | ||
620 | } | ||
621 | |||
622 | /* | ||
517 | * This is where non-devicetree initialization code is collected and stashed | 623 | * This is where non-devicetree initialization code is collected and stashed |
518 | * for eventual deletion. | 624 | * for eventual deletion. |
519 | */ | 625 | */ |
@@ -581,7 +687,7 @@ static void __init ap_init(void) | |||
581 | 687 | ||
582 | platform_device_register(&cfi_flash_device); | 688 | platform_device_register(&cfi_flash_device); |
583 | 689 | ||
584 | sc_dec = readl(VA_SC_BASE + INTEGRATOR_SC_DEC_OFFSET); | 690 | sc_dec = readl(ap_syscon_base + INTEGRATOR_SC_DEC_OFFSET); |
585 | for (i = 0; i < 4; i++) { | 691 | for (i = 0; i < 4; i++) { |
586 | struct lm_device *lmdev; | 692 | struct lm_device *lmdev; |
587 | 693 | ||
@@ -608,7 +714,7 @@ MACHINE_START(INTEGRATOR, "ARM-Integrator") | |||
608 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 714 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
609 | .atag_offset = 0x100, | 715 | .atag_offset = 0x100, |
610 | .reserve = integrator_reserve, | 716 | .reserve = integrator_reserve, |
611 | .map_io = ap_map_io, | 717 | .map_io = ap_map_io_atag, |
612 | .nr_irqs = NR_IRQS_INTEGRATOR_AP, | 718 | .nr_irqs = NR_IRQS_INTEGRATOR_AP, |
613 | .init_early = ap_init_early, | 719 | .init_early = ap_init_early, |
614 | .init_irq = ap_init_irq, | 720 | .init_irq = ap_init_irq, |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 5b08e8e4cc83..29df06b35d0d 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/of_irq.h> | 26 | #include <linux/of_irq.h> |
27 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
28 | #include <linux/of_platform.h> | 28 | #include <linux/of_platform.h> |
29 | #include <linux/sys_soc.h> | ||
29 | 30 | ||
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
31 | #include <mach/platform.h> | 32 | #include <mach/platform.h> |
@@ -51,11 +52,13 @@ | |||
51 | 52 | ||
52 | #include "common.h" | 53 | #include "common.h" |
53 | 54 | ||
55 | /* Base address to the CP controller */ | ||
56 | static void __iomem *intcp_con_base; | ||
57 | |||
54 | #define INTCP_PA_FLASH_BASE 0x24000000 | 58 | #define INTCP_PA_FLASH_BASE 0x24000000 |
55 | 59 | ||
56 | #define INTCP_PA_CLCD_BASE 0xc0000000 | 60 | #define INTCP_PA_CLCD_BASE 0xc0000000 |
57 | 61 | ||
58 | #define INTCP_VA_CTRL_BASE __io_address(INTEGRATOR_CP_CTL_BASE) | ||
59 | #define INTCP_FLASHPROG 0x04 | 62 | #define INTCP_FLASHPROG 0x04 |
60 | #define CINTEGRATOR_FLASHPROG_FLVPPEN (1 << 0) | 63 | #define CINTEGRATOR_FLASHPROG_FLVPPEN (1 << 0) |
61 | #define CINTEGRATOR_FLASHPROG_FLWREN (1 << 1) | 64 | #define CINTEGRATOR_FLASHPROG_FLWREN (1 << 1) |
@@ -82,11 +85,6 @@ static struct map_desc intcp_io_desc[] __initdata = { | |||
82 | .length = SZ_4K, | 85 | .length = SZ_4K, |
83 | .type = MT_DEVICE | 86 | .type = MT_DEVICE |
84 | }, { | 87 | }, { |
85 | .virtual = IO_ADDRESS(INTEGRATOR_SC_BASE), | ||
86 | .pfn = __phys_to_pfn(INTEGRATOR_SC_BASE), | ||
87 | .length = SZ_4K, | ||
88 | .type = MT_DEVICE | ||
89 | }, { | ||
90 | .virtual = IO_ADDRESS(INTEGRATOR_EBI_BASE), | 88 | .virtual = IO_ADDRESS(INTEGRATOR_EBI_BASE), |
91 | .pfn = __phys_to_pfn(INTEGRATOR_EBI_BASE), | 89 | .pfn = __phys_to_pfn(INTEGRATOR_EBI_BASE), |
92 | .length = SZ_4K, | 90 | .length = SZ_4K, |
@@ -107,11 +105,6 @@ static struct map_desc intcp_io_desc[] __initdata = { | |||
107 | .length = SZ_4K, | 105 | .length = SZ_4K, |
108 | .type = MT_DEVICE | 106 | .type = MT_DEVICE |
109 | }, { | 107 | }, { |
110 | .virtual = IO_ADDRESS(INTEGRATOR_UART1_BASE), | ||
111 | .pfn = __phys_to_pfn(INTEGRATOR_UART1_BASE), | ||
112 | .length = SZ_4K, | ||
113 | .type = MT_DEVICE | ||
114 | }, { | ||
115 | .virtual = IO_ADDRESS(INTEGRATOR_DBG_BASE), | 108 | .virtual = IO_ADDRESS(INTEGRATOR_DBG_BASE), |
116 | .pfn = __phys_to_pfn(INTEGRATOR_DBG_BASE), | 109 | .pfn = __phys_to_pfn(INTEGRATOR_DBG_BASE), |
117 | .length = SZ_4K, | 110 | .length = SZ_4K, |
@@ -126,11 +119,6 @@ static struct map_desc intcp_io_desc[] __initdata = { | |||
126 | .pfn = __phys_to_pfn(INTEGRATOR_CP_SIC_BASE), | 119 | .pfn = __phys_to_pfn(INTEGRATOR_CP_SIC_BASE), |
127 | .length = SZ_4K, | 120 | .length = SZ_4K, |
128 | .type = MT_DEVICE | 121 | .type = MT_DEVICE |
129 | }, { | ||
130 | .virtual = IO_ADDRESS(INTEGRATOR_CP_CTL_BASE), | ||
131 | .pfn = __phys_to_pfn(INTEGRATOR_CP_CTL_BASE), | ||
132 | .length = SZ_4K, | ||
133 | .type = MT_DEVICE | ||
134 | } | 122 | } |
135 | }; | 123 | }; |
136 | 124 | ||
@@ -146,9 +134,9 @@ static int intcp_flash_init(struct platform_device *dev) | |||
146 | { | 134 | { |
147 | u32 val; | 135 | u32 val; |
148 | 136 | ||
149 | val = readl(INTCP_VA_CTRL_BASE + INTCP_FLASHPROG); | 137 | val = readl(intcp_con_base + INTCP_FLASHPROG); |
150 | val |= CINTEGRATOR_FLASHPROG_FLWREN; | 138 | val |= CINTEGRATOR_FLASHPROG_FLWREN; |
151 | writel(val, INTCP_VA_CTRL_BASE + INTCP_FLASHPROG); | 139 | writel(val, intcp_con_base + INTCP_FLASHPROG); |
152 | 140 | ||
153 | return 0; | 141 | return 0; |
154 | } | 142 | } |
@@ -157,21 +145,21 @@ static void intcp_flash_exit(struct platform_device *dev) | |||
157 | { | 145 | { |
158 | u32 val; | 146 | u32 val; |
159 | 147 | ||
160 | val = readl(INTCP_VA_CTRL_BASE + INTCP_FLASHPROG); | 148 | val = readl(intcp_con_base + INTCP_FLASHPROG); |
161 | val &= ~(CINTEGRATOR_FLASHPROG_FLVPPEN|CINTEGRATOR_FLASHPROG_FLWREN); | 149 | val &= ~(CINTEGRATOR_FLASHPROG_FLVPPEN|CINTEGRATOR_FLASHPROG_FLWREN); |
162 | writel(val, INTCP_VA_CTRL_BASE + INTCP_FLASHPROG); | 150 | writel(val, intcp_con_base + INTCP_FLASHPROG); |
163 | } | 151 | } |
164 | 152 | ||
165 | static void intcp_flash_set_vpp(struct platform_device *pdev, int on) | 153 | static void intcp_flash_set_vpp(struct platform_device *pdev, int on) |
166 | { | 154 | { |
167 | u32 val; | 155 | u32 val; |
168 | 156 | ||
169 | val = readl(INTCP_VA_CTRL_BASE + INTCP_FLASHPROG); | 157 | val = readl(intcp_con_base + INTCP_FLASHPROG); |
170 | if (on) | 158 | if (on) |
171 | val |= CINTEGRATOR_FLASHPROG_FLVPPEN; | 159 | val |= CINTEGRATOR_FLASHPROG_FLVPPEN; |
172 | else | 160 | else |
173 | val &= ~CINTEGRATOR_FLASHPROG_FLVPPEN; | 161 | val &= ~CINTEGRATOR_FLASHPROG_FLVPPEN; |
174 | writel(val, INTCP_VA_CTRL_BASE + INTCP_FLASHPROG); | 162 | writel(val, intcp_con_base + INTCP_FLASHPROG); |
175 | } | 163 | } |
176 | 164 | ||
177 | static struct physmap_flash_data intcp_flash_data = { | 165 | static struct physmap_flash_data intcp_flash_data = { |
@@ -190,7 +178,7 @@ static struct physmap_flash_data intcp_flash_data = { | |||
190 | static unsigned int mmc_status(struct device *dev) | 178 | static unsigned int mmc_status(struct device *dev) |
191 | { | 179 | { |
192 | unsigned int status = readl(__io_address(0xca000000 + 4)); | 180 | unsigned int status = readl(__io_address(0xca000000 + 4)); |
193 | writel(8, __io_address(INTEGRATOR_CP_CTL_BASE + 8)); | 181 | writel(8, intcp_con_base + 8); |
194 | 182 | ||
195 | return status & 8; | 183 | return status & 8; |
196 | } | 184 | } |
@@ -318,9 +306,9 @@ static struct of_dev_auxdata intcp_auxdata_lookup[] __initdata = { | |||
318 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_RTC_BASE, | 306 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_RTC_BASE, |
319 | "rtc", NULL), | 307 | "rtc", NULL), |
320 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART0_BASE, | 308 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART0_BASE, |
321 | "uart0", &integrator_uart_data), | 309 | "uart0", NULL), |
322 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART1_BASE, | 310 | OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_UART1_BASE, |
323 | "uart1", &integrator_uart_data), | 311 | "uart1", NULL), |
324 | OF_DEV_AUXDATA("arm,primecell", KMI0_BASE, | 312 | OF_DEV_AUXDATA("arm,primecell", KMI0_BASE, |
325 | "kmi0", NULL), | 313 | "kmi0", NULL), |
326 | OF_DEV_AUXDATA("arm,primecell", KMI1_BASE, | 314 | OF_DEV_AUXDATA("arm,primecell", KMI1_BASE, |
@@ -338,8 +326,57 @@ static struct of_dev_auxdata intcp_auxdata_lookup[] __initdata = { | |||
338 | 326 | ||
339 | static void __init intcp_init_of(void) | 327 | static void __init intcp_init_of(void) |
340 | { | 328 | { |
341 | of_platform_populate(NULL, of_default_bus_match_table, | 329 | struct device_node *root; |
342 | intcp_auxdata_lookup, NULL); | 330 | struct device_node *cpcon; |
331 | struct device *parent; | ||
332 | struct soc_device *soc_dev; | ||
333 | struct soc_device_attribute *soc_dev_attr; | ||
334 | u32 intcp_sc_id; | ||
335 | int err; | ||
336 | |||
337 | /* Here we create an SoC device for the root node */ | ||
338 | root = of_find_node_by_path("/"); | ||
339 | if (!root) | ||
340 | return; | ||
341 | cpcon = of_find_node_by_path("/cpcon"); | ||
342 | if (!cpcon) | ||
343 | return; | ||
344 | |||
345 | intcp_con_base = of_iomap(cpcon, 0); | ||
346 | if (!intcp_con_base) | ||
347 | return; | ||
348 | |||
349 | intcp_sc_id = readl(intcp_con_base); | ||
350 | |||
351 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); | ||
352 | if (!soc_dev_attr) | ||
353 | return; | ||
354 | |||
355 | err = of_property_read_string(root, "compatible", | ||
356 | &soc_dev_attr->soc_id); | ||
357 | if (err) | ||
358 | return; | ||
359 | err = of_property_read_string(root, "model", &soc_dev_attr->machine); | ||
360 | if (err) | ||
361 | return; | ||
362 | soc_dev_attr->family = "Integrator"; | ||
363 | soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%c", | ||
364 | 'A' + (intcp_sc_id & 0x0f)); | ||
365 | |||
366 | soc_dev = soc_device_register(soc_dev_attr); | ||
367 | if (IS_ERR_OR_NULL(soc_dev)) { | ||
368 | kfree(soc_dev_attr->revision); | ||
369 | kfree(soc_dev_attr); | ||
370 | return; | ||
371 | } | ||
372 | |||
373 | parent = soc_device_to_device(soc_dev); | ||
374 | |||
375 | if (!IS_ERR_OR_NULL(parent)) | ||
376 | integrator_init_sysfs(parent, intcp_sc_id); | ||
377 | |||
378 | of_platform_populate(root, of_default_bus_match_table, | ||
379 | intcp_auxdata_lookup, parent); | ||
343 | } | 380 | } |
344 | 381 | ||
345 | static const char * intcp_dt_board_compat[] = { | 382 | static const char * intcp_dt_board_compat[] = { |
@@ -365,6 +402,28 @@ MACHINE_END | |||
365 | #ifdef CONFIG_ATAGS | 402 | #ifdef CONFIG_ATAGS |
366 | 403 | ||
367 | /* | 404 | /* |
405 | * For the ATAG boot some static mappings are needed. This will | ||
406 | * go away with the ATAG support down the road. | ||
407 | */ | ||
408 | |||
409 | static struct map_desc intcp_io_desc_atag[] __initdata = { | ||
410 | { | ||
411 | .virtual = IO_ADDRESS(INTEGRATOR_CP_CTL_BASE), | ||
412 | .pfn = __phys_to_pfn(INTEGRATOR_CP_CTL_BASE), | ||
413 | .length = SZ_4K, | ||
414 | .type = MT_DEVICE | ||
415 | }, | ||
416 | }; | ||
417 | |||
418 | static void __init intcp_map_io_atag(void) | ||
419 | { | ||
420 | iotable_init(intcp_io_desc_atag, ARRAY_SIZE(intcp_io_desc_atag)); | ||
421 | intcp_con_base = __io_address(INTEGRATOR_CP_CTL_BASE); | ||
422 | intcp_map_io(); | ||
423 | } | ||
424 | |||
425 | |||
426 | /* | ||
368 | * This is where non-devicetree initialization code is collected and stashed | 427 | * This is where non-devicetree initialization code is collected and stashed |
369 | * for eventual deletion. | 428 | * for eventual deletion. |
370 | */ | 429 | */ |
@@ -503,7 +562,7 @@ MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") | |||
503 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 562 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
504 | .atag_offset = 0x100, | 563 | .atag_offset = 0x100, |
505 | .reserve = integrator_reserve, | 564 | .reserve = integrator_reserve, |
506 | .map_io = intcp_map_io, | 565 | .map_io = intcp_map_io_atag, |
507 | .nr_irqs = NR_IRQS_INTEGRATOR_CP, | 566 | .nr_irqs = NR_IRQS_INTEGRATOR_CP, |
508 | .init_early = intcp_init_early, | 567 | .init_early = intcp_init_early, |
509 | .init_irq = intcp_init_irq, | 568 | .init_irq = intcp_init_irq, |
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index bbeca59df66b..be50e795536d 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -191,12 +191,9 @@ static void __iomem *v3_open_config_window(struct pci_bus *bus, | |||
191 | /* | 191 | /* |
192 | * Trap out illegal values | 192 | * Trap out illegal values |
193 | */ | 193 | */ |
194 | if (offset > 255) | 194 | BUG_ON(offset > 255); |
195 | BUG(); | 195 | BUG_ON(busnr > 255); |
196 | if (busnr > 255) | 196 | BUG_ON(devfn > 255); |
197 | BUG(); | ||
198 | if (devfn > 255) | ||
199 | BUG(); | ||
200 | 197 | ||
201 | if (busnr == 0) { | 198 | if (busnr == 0) { |
202 | int slot = PCI_SLOT(devfn); | 199 | int slot = PCI_SLOT(devfn); |
@@ -388,9 +385,10 @@ static int __init pci_v3_setup_resources(struct pci_sys_data *sys) | |||
388 | * means I can't get additional information on the reason for the pm2fb | 385 | * means I can't get additional information on the reason for the pm2fb |
389 | * problems. I suppose I'll just have to mind-meld with the machine. ;) | 386 | * problems. I suppose I'll just have to mind-meld with the machine. ;) |
390 | */ | 387 | */ |
391 | #define SC_PCI __io_address(INTEGRATOR_SC_PCIENABLE) | 388 | static void __iomem *ap_syscon_base; |
392 | #define SC_LBFADDR __io_address(INTEGRATOR_SC_BASE + 0x20) | 389 | #define INTEGRATOR_SC_PCIENABLE_OFFSET 0x18 |
393 | #define SC_LBFCODE __io_address(INTEGRATOR_SC_BASE + 0x24) | 390 | #define INTEGRATOR_SC_LBFADDR_OFFSET 0x20 |
391 | #define INTEGRATOR_SC_LBFCODE_OFFSET 0x24 | ||
394 | 392 | ||
395 | static int | 393 | static int |
396 | v3_pci_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | 394 | v3_pci_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) |
@@ -401,13 +399,13 @@ v3_pci_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
401 | char buf[128]; | 399 | char buf[128]; |
402 | 400 | ||
403 | sprintf(buf, "V3 fault: addr 0x%08lx, FSR 0x%03x, PC 0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x ISTAT=%02x\n", | 401 | sprintf(buf, "V3 fault: addr 0x%08lx, FSR 0x%03x, PC 0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x ISTAT=%02x\n", |
404 | addr, fsr, pc, instr, __raw_readl(SC_LBFADDR), __raw_readl(SC_LBFCODE) & 255, | 402 | addr, fsr, pc, instr, __raw_readl(ap_syscon_base + INTEGRATOR_SC_LBFADDR_OFFSET), __raw_readl(ap_syscon_base + INTEGRATOR_SC_LBFCODE_OFFSET) & 255, |
405 | v3_readb(V3_LB_ISTAT)); | 403 | v3_readb(V3_LB_ISTAT)); |
406 | printk(KERN_DEBUG "%s", buf); | 404 | printk(KERN_DEBUG "%s", buf); |
407 | #endif | 405 | #endif |
408 | 406 | ||
409 | v3_writeb(V3_LB_ISTAT, 0); | 407 | v3_writeb(V3_LB_ISTAT, 0); |
410 | __raw_writel(3, SC_PCI); | 408 | __raw_writel(3, ap_syscon_base + INTEGRATOR_SC_PCIENABLE_OFFSET); |
411 | 409 | ||
412 | /* | 410 | /* |
413 | * If the instruction being executed was a read, | 411 | * If the instruction being executed was a read, |
@@ -449,15 +447,15 @@ static irqreturn_t v3_irq(int dummy, void *devid) | |||
449 | 447 | ||
450 | sprintf(buf, "V3 int %d: pc=0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x " | 448 | sprintf(buf, "V3 int %d: pc=0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x " |
451 | "ISTAT=%02x\n", IRQ_AP_V3INT, pc, instr, | 449 | "ISTAT=%02x\n", IRQ_AP_V3INT, pc, instr, |
452 | __raw_readl(SC_LBFADDR), | 450 | __raw_readl(ap_syscon_base + INTEGRATOR_SC_LBFADDR_OFFSET), |
453 | __raw_readl(SC_LBFCODE) & 255, | 451 | __raw_readl(ap_syscon_base + INTEGRATOR_SC_LBFCODE_OFFSET) & 255, |
454 | v3_readb(V3_LB_ISTAT)); | 452 | v3_readb(V3_LB_ISTAT)); |
455 | printascii(buf); | 453 | printascii(buf); |
456 | #endif | 454 | #endif |
457 | 455 | ||
458 | v3_writew(V3_PCI_STAT, 0xf000); | 456 | v3_writew(V3_PCI_STAT, 0xf000); |
459 | v3_writeb(V3_LB_ISTAT, 0); | 457 | v3_writeb(V3_LB_ISTAT, 0); |
460 | __raw_writel(3, SC_PCI); | 458 | __raw_writel(3, ap_syscon_base + INTEGRATOR_SC_PCIENABLE_OFFSET); |
461 | 459 | ||
462 | #ifdef CONFIG_DEBUG_LL | 460 | #ifdef CONFIG_DEBUG_LL |
463 | /* | 461 | /* |
@@ -480,6 +478,10 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys) | |||
480 | if (nr == 0) { | 478 | if (nr == 0) { |
481 | sys->mem_offset = PHYS_PCI_MEM_BASE; | 479 | sys->mem_offset = PHYS_PCI_MEM_BASE; |
482 | ret = pci_v3_setup_resources(sys); | 480 | ret = pci_v3_setup_resources(sys); |
481 | /* Remap the Integrator system controller */ | ||
482 | ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100); | ||
483 | if (!ap_syscon_base) | ||
484 | return -EINVAL; | ||
483 | } | 485 | } |
484 | 486 | ||
485 | return ret; | 487 | return ret; |
@@ -568,7 +570,7 @@ void __init pci_v3_preinit(void) | |||
568 | v3_writeb(V3_LB_ISTAT, 0); | 570 | v3_writeb(V3_LB_ISTAT, 0); |
569 | v3_writew(V3_LB_CFG, v3_readw(V3_LB_CFG) | (1 << 10)); | 571 | v3_writew(V3_LB_CFG, v3_readw(V3_LB_CFG) | (1 << 10)); |
570 | v3_writeb(V3_LB_IMASK, 0x28); | 572 | v3_writeb(V3_LB_IMASK, 0x28); |
571 | __raw_writel(3, SC_PCI); | 573 | __raw_writel(3, ap_syscon_base + INTEGRATOR_SC_PCIENABLE_OFFSET); |
572 | 574 | ||
573 | /* | 575 | /* |
574 | * Grab the PCI error interrupt. | 576 | * Grab the PCI error interrupt. |
diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c index cdeb9d3ef640..bde7a35e5000 100644 --- a/arch/arm/mach-omap1/timer.c +++ b/arch/arm/mach-omap1/timer.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/platform_data/dmtimer-omap.h> | ||
28 | 29 | ||
29 | #include <mach/irqs.h> | 30 | #include <mach/irqs.h> |
30 | 31 | ||
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c index 89368195bf08..41152fadd4c0 100644 --- a/arch/arm/mach-omap1/timer32k.c +++ b/arch/arm/mach-omap1/timer32k.c | |||
@@ -51,7 +51,6 @@ | |||
51 | #include <asm/mach/time.h> | 51 | #include <asm/mach/time.h> |
52 | 52 | ||
53 | #include <plat/counter-32k.h> | 53 | #include <plat/counter-32k.h> |
54 | #include <plat/dmtimer.h> | ||
55 | 54 | ||
56 | #include <mach/hardware.h> | 55 | #include <mach/hardware.h> |
57 | 56 | ||
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 78cbb8c5992e..dd76ff77760b 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -73,6 +73,8 @@ obj-$(CONFIG_ARCH_OMAP4) += opp4xxx_data.o | |||
73 | endif | 73 | endif |
74 | 74 | ||
75 | # Power Management | 75 | # Power Management |
76 | obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o | ||
77 | |||
76 | ifeq ($(CONFIG_PM),y) | 78 | ifeq ($(CONFIG_PM),y) |
77 | obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o | 79 | obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o |
78 | obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o | 80 | obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o |
@@ -80,7 +82,6 @@ obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o | |||
80 | obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o | 82 | obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o |
81 | obj-$(CONFIG_SOC_OMAP5) += omap-mpuss-lowpower.o | 83 | obj-$(CONFIG_SOC_OMAP5) += omap-mpuss-lowpower.o |
82 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o | 84 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o |
83 | obj-$(CONFIG_OMAP_PM_NOOP) += omap-pm-noop.o | ||
84 | 85 | ||
85 | obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o | 86 | obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o |
86 | obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o | 87 | obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o |
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index 699caec8f9e2..ebbc2adb499e 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
@@ -297,6 +297,6 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517") | |||
297 | .handle_irq = omap3_intc_handle_irq, | 297 | .handle_irq = omap3_intc_handle_irq, |
298 | .init_machine = cm_t3517_init, | 298 | .init_machine = cm_t3517_init, |
299 | .init_late = am35xx_init_late, | 299 | .init_late = am35xx_init_late, |
300 | .timer = &omap3_timer, | 300 | .timer = &omap3_gp_timer, |
301 | .restart = omap3xxx_restart, | 301 | .restart = omap3xxx_restart, |
302 | MACHINE_END | 302 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index cea5d5292628..0f24cb84ba5a 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -579,6 +579,11 @@ static void __init igep_wlan_bt_init(void) | |||
579 | } else | 579 | } else |
580 | return; | 580 | return; |
581 | 581 | ||
582 | /* Make sure that the GPIO pins are muxed correctly */ | ||
583 | omap_mux_init_gpio(igep_wlan_bt_gpios[0].gpio, OMAP_PIN_OUTPUT); | ||
584 | omap_mux_init_gpio(igep_wlan_bt_gpios[1].gpio, OMAP_PIN_OUTPUT); | ||
585 | omap_mux_init_gpio(igep_wlan_bt_gpios[2].gpio, OMAP_PIN_OUTPUT); | ||
586 | |||
582 | err = gpio_request_array(igep_wlan_bt_gpios, | 587 | err = gpio_request_array(igep_wlan_bt_gpios, |
583 | ARRAY_SIZE(igep_wlan_bt_gpios)); | 588 | ARRAY_SIZE(igep_wlan_bt_gpios)); |
584 | if (err) { | 589 | if (err) { |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 140b73094aff..c8fde3e56441 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #include <asm/mach/flash.h> | 45 | #include <asm/mach/flash.h> |
46 | #include <asm/mach/map.h> | 46 | #include <asm/mach/map.h> |
47 | 47 | ||
48 | #include "common.h" | ||
49 | #include <video/omapdss.h> | 48 | #include <video/omapdss.h> |
50 | #include <video/omap-panel-generic-dpi.h> | 49 | #include <video/omap-panel-generic-dpi.h> |
51 | #include <video/omap-panel-tfp410.h> | 50 | #include <video/omap-panel-tfp410.h> |
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c index ad856092c06a..d246efd9f734 100644 --- a/arch/arm/mach-omap2/common-board-devices.c +++ b/arch/arm/mach-omap2/common-board-devices.c | |||
@@ -63,30 +63,36 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce, | |||
63 | struct spi_board_info *spi_bi = &ads7846_spi_board_info; | 63 | struct spi_board_info *spi_bi = &ads7846_spi_board_info; |
64 | int err; | 64 | int err; |
65 | 65 | ||
66 | err = gpio_request_one(gpio_pendown, GPIOF_IN, "TSPenDown"); | 66 | /* |
67 | if (err) { | 67 | * If a board defines get_pendown_state() function, request the pendown |
68 | pr_err("Couldn't obtain gpio for TSPenDown: %d\n", err); | 68 | * GPIO and set the GPIO debounce time. |
69 | return; | 69 | * If a board does not define the get_pendown_state() function, then |
70 | } | 70 | * the ads7846 driver will setup the pendown GPIO itself. |
71 | */ | ||
72 | if (board_pdata && board_pdata->get_pendown_state) { | ||
73 | err = gpio_request_one(gpio_pendown, GPIOF_IN, "TSPenDown"); | ||
74 | if (err) { | ||
75 | pr_err("Couldn't obtain gpio for TSPenDown: %d\n", err); | ||
76 | return; | ||
77 | } | ||
78 | |||
79 | if (gpio_debounce) | ||
80 | gpio_set_debounce(gpio_pendown, gpio_debounce); | ||
71 | 81 | ||
72 | if (gpio_debounce) | 82 | gpio_export(gpio_pendown, 0); |
73 | gpio_set_debounce(gpio_pendown, gpio_debounce); | 83 | } |
74 | 84 | ||
75 | spi_bi->bus_num = bus_num; | 85 | spi_bi->bus_num = bus_num; |
76 | spi_bi->irq = gpio_to_irq(gpio_pendown); | 86 | spi_bi->irq = gpio_to_irq(gpio_pendown); |
77 | 87 | ||
88 | ads7846_config.gpio_pendown = gpio_pendown; | ||
89 | |||
78 | if (board_pdata) { | 90 | if (board_pdata) { |
79 | board_pdata->gpio_pendown = gpio_pendown; | 91 | board_pdata->gpio_pendown = gpio_pendown; |
92 | board_pdata->gpio_pendown_debounce = gpio_debounce; | ||
80 | spi_bi->platform_data = board_pdata; | 93 | spi_bi->platform_data = board_pdata; |
81 | if (board_pdata->get_pendown_state) | ||
82 | gpio_export(gpio_pendown, 0); | ||
83 | } else { | ||
84 | ads7846_config.gpio_pendown = gpio_pendown; | ||
85 | } | 94 | } |
86 | 95 | ||
87 | if (!board_pdata || (board_pdata && !board_pdata->get_pendown_state)) | ||
88 | gpio_free(gpio_pendown); | ||
89 | |||
90 | spi_register_board_info(&ads7846_spi_board_info, 1); | 96 | spi_register_board_info(&ads7846_spi_board_info, 1); |
91 | } | 97 | } |
92 | #else | 98 | #else |
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 08c586451f93..3bbcde87dead 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -82,6 +82,7 @@ extern void omap2_init_common_infrastructure(void); | |||
82 | extern struct sys_timer omap2_timer; | 82 | extern struct sys_timer omap2_timer; |
83 | extern struct sys_timer omap3_timer; | 83 | extern struct sys_timer omap3_timer; |
84 | extern struct sys_timer omap3_secure_timer; | 84 | extern struct sys_timer omap3_secure_timer; |
85 | extern struct sys_timer omap3_gp_timer; | ||
85 | extern struct sys_timer omap3_am33xx_timer; | 86 | extern struct sys_timer omap3_am33xx_timer; |
86 | extern struct sys_timer omap4_timer; | 87 | extern struct sys_timer omap4_timer; |
87 | extern struct sys_timer omap5_timer; | 88 | extern struct sys_timer omap5_timer; |
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index f1e121502789..45cc7ed4dd58 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -28,6 +28,9 @@ | |||
28 | #include "soc.h" | 28 | #include "soc.h" |
29 | #include "control.h" | 29 | #include "control.h" |
30 | 30 | ||
31 | #define OMAP4_SILICON_TYPE_STANDARD 0x01 | ||
32 | #define OMAP4_SILICON_TYPE_PERFORMANCE 0x02 | ||
33 | |||
31 | static unsigned int omap_revision; | 34 | static unsigned int omap_revision; |
32 | static const char *cpu_rev; | 35 | static const char *cpu_rev; |
33 | u32 omap_features; | 36 | u32 omap_features; |
@@ -273,25 +276,11 @@ void __init omap4xxx_check_features(void) | |||
273 | { | 276 | { |
274 | u32 si_type; | 277 | u32 si_type; |
275 | 278 | ||
276 | if (cpu_is_omap443x()) | 279 | si_type = |
277 | omap_features |= OMAP4_HAS_MPU_1GHZ; | 280 | (read_tap_reg(OMAP4_CTRL_MODULE_CORE_STD_FUSE_PROD_ID_1) >> 16) & 0x03; |
278 | |||
279 | 281 | ||
280 | if (cpu_is_omap446x()) { | 282 | if (si_type == OMAP4_SILICON_TYPE_PERFORMANCE) |
281 | si_type = | 283 | omap_features = OMAP4_HAS_PERF_SILICON; |
282 | read_tap_reg(OMAP4_CTRL_MODULE_CORE_STD_FUSE_PROD_ID_1); | ||
283 | switch ((si_type & (3 << 16)) >> 16) { | ||
284 | case 2: | ||
285 | /* High performance device */ | ||
286 | omap_features |= OMAP4_HAS_MPU_1_5GHZ; | ||
287 | break; | ||
288 | case 1: | ||
289 | default: | ||
290 | /* Standard device */ | ||
291 | omap_features |= OMAP4_HAS_MPU_1_2GHZ; | ||
292 | break; | ||
293 | } | ||
294 | } | ||
295 | } | 284 | } |
296 | 285 | ||
297 | void __init ti81xx_check_features(void) | 286 | void __init ti81xx_check_features(void) |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index a8b3368dca3d..e8efe3d1da6c 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/platform_data/spi-omap2-mcspi.h> | 17 | #include <linux/platform_data/spi-omap2-mcspi.h> |
18 | 18 | ||
19 | #include <plat-omap/dma-omap.h> | 19 | #include <plat-omap/dma-omap.h> |
20 | #include <plat/dmtimer.h> | ||
21 | 20 | ||
22 | #include "omap_hwmod.h" | 21 | #include "omap_hwmod.h" |
23 | #include "l3_2xxx.h" | 22 | #include "l3_2xxx.h" |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index dc768c50e523..32d17e3fd727 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/platform_data/spi-omap2-mcspi.h> | 18 | #include <linux/platform_data/spi-omap2-mcspi.h> |
19 | 19 | ||
20 | #include <plat-omap/dma-omap.h> | 20 | #include <plat-omap/dma-omap.h> |
21 | #include <plat/dmtimer.h> | ||
22 | 21 | ||
23 | #include "omap_hwmod.h" | 22 | #include "omap_hwmod.h" |
24 | #include "mmc.h" | 23 | #include "mmc.h" |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c index a0116d08cf45..0db8f450bad9 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | |||
@@ -58,8 +58,9 @@ static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = { | |||
58 | .syss_offs = 0x0014, | 58 | .syss_offs = 0x0014, |
59 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | 59 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | |
60 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | 60 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
61 | SYSC_HAS_AUTOIDLE), | 61 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), |
62 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | 62 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
63 | .clockact = CLOCKACT_TEST_ICLK, | ||
63 | .sysc_fields = &omap_hwmod_sysc_type1, | 64 | .sysc_fields = &omap_hwmod_sysc_type1, |
64 | }; | 65 | }; |
65 | 66 | ||
@@ -268,6 +269,7 @@ struct omap_hwmod omap2xxx_timer1_hwmod = { | |||
268 | }, | 269 | }, |
269 | .dev_attr = &capability_alwon_dev_attr, | 270 | .dev_attr = &capability_alwon_dev_attr, |
270 | .class = &omap2xxx_timer_hwmod_class, | 271 | .class = &omap2xxx_timer_hwmod_class, |
272 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
271 | }; | 273 | }; |
272 | 274 | ||
273 | /* timer2 */ | 275 | /* timer2 */ |
@@ -286,6 +288,7 @@ struct omap_hwmod omap2xxx_timer2_hwmod = { | |||
286 | }, | 288 | }, |
287 | }, | 289 | }, |
288 | .class = &omap2xxx_timer_hwmod_class, | 290 | .class = &omap2xxx_timer_hwmod_class, |
291 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
289 | }; | 292 | }; |
290 | 293 | ||
291 | /* timer3 */ | 294 | /* timer3 */ |
@@ -304,6 +307,7 @@ struct omap_hwmod omap2xxx_timer3_hwmod = { | |||
304 | }, | 307 | }, |
305 | }, | 308 | }, |
306 | .class = &omap2xxx_timer_hwmod_class, | 309 | .class = &omap2xxx_timer_hwmod_class, |
310 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
307 | }; | 311 | }; |
308 | 312 | ||
309 | /* timer4 */ | 313 | /* timer4 */ |
@@ -322,6 +326,7 @@ struct omap_hwmod omap2xxx_timer4_hwmod = { | |||
322 | }, | 326 | }, |
323 | }, | 327 | }, |
324 | .class = &omap2xxx_timer_hwmod_class, | 328 | .class = &omap2xxx_timer_hwmod_class, |
329 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
325 | }; | 330 | }; |
326 | 331 | ||
327 | /* timer5 */ | 332 | /* timer5 */ |
@@ -341,6 +346,7 @@ struct omap_hwmod omap2xxx_timer5_hwmod = { | |||
341 | }, | 346 | }, |
342 | .dev_attr = &capability_dsp_dev_attr, | 347 | .dev_attr = &capability_dsp_dev_attr, |
343 | .class = &omap2xxx_timer_hwmod_class, | 348 | .class = &omap2xxx_timer_hwmod_class, |
349 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
344 | }; | 350 | }; |
345 | 351 | ||
346 | /* timer6 */ | 352 | /* timer6 */ |
@@ -360,6 +366,7 @@ struct omap_hwmod omap2xxx_timer6_hwmod = { | |||
360 | }, | 366 | }, |
361 | .dev_attr = &capability_dsp_dev_attr, | 367 | .dev_attr = &capability_dsp_dev_attr, |
362 | .class = &omap2xxx_timer_hwmod_class, | 368 | .class = &omap2xxx_timer_hwmod_class, |
369 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
363 | }; | 370 | }; |
364 | 371 | ||
365 | /* timer7 */ | 372 | /* timer7 */ |
@@ -379,6 +386,7 @@ struct omap_hwmod omap2xxx_timer7_hwmod = { | |||
379 | }, | 386 | }, |
380 | .dev_attr = &capability_dsp_dev_attr, | 387 | .dev_attr = &capability_dsp_dev_attr, |
381 | .class = &omap2xxx_timer_hwmod_class, | 388 | .class = &omap2xxx_timer_hwmod_class, |
389 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
382 | }; | 390 | }; |
383 | 391 | ||
384 | /* timer8 */ | 392 | /* timer8 */ |
@@ -398,6 +406,7 @@ struct omap_hwmod omap2xxx_timer8_hwmod = { | |||
398 | }, | 406 | }, |
399 | .dev_attr = &capability_dsp_dev_attr, | 407 | .dev_attr = &capability_dsp_dev_attr, |
400 | .class = &omap2xxx_timer_hwmod_class, | 408 | .class = &omap2xxx_timer_hwmod_class, |
409 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
401 | }; | 410 | }; |
402 | 411 | ||
403 | /* timer9 */ | 412 | /* timer9 */ |
@@ -417,6 +426,7 @@ struct omap_hwmod omap2xxx_timer9_hwmod = { | |||
417 | }, | 426 | }, |
418 | .dev_attr = &capability_pwm_dev_attr, | 427 | .dev_attr = &capability_pwm_dev_attr, |
419 | .class = &omap2xxx_timer_hwmod_class, | 428 | .class = &omap2xxx_timer_hwmod_class, |
429 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
420 | }; | 430 | }; |
421 | 431 | ||
422 | /* timer10 */ | 432 | /* timer10 */ |
@@ -436,6 +446,7 @@ struct omap_hwmod omap2xxx_timer10_hwmod = { | |||
436 | }, | 446 | }, |
437 | .dev_attr = &capability_pwm_dev_attr, | 447 | .dev_attr = &capability_pwm_dev_attr, |
438 | .class = &omap2xxx_timer_hwmod_class, | 448 | .class = &omap2xxx_timer_hwmod_class, |
449 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
439 | }; | 450 | }; |
440 | 451 | ||
441 | /* timer11 */ | 452 | /* timer11 */ |
@@ -455,6 +466,7 @@ struct omap_hwmod omap2xxx_timer11_hwmod = { | |||
455 | }, | 466 | }, |
456 | .dev_attr = &capability_pwm_dev_attr, | 467 | .dev_attr = &capability_pwm_dev_attr, |
457 | .class = &omap2xxx_timer_hwmod_class, | 468 | .class = &omap2xxx_timer_hwmod_class, |
469 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
458 | }; | 470 | }; |
459 | 471 | ||
460 | /* timer12 */ | 472 | /* timer12 */ |
@@ -474,6 +486,7 @@ struct omap_hwmod omap2xxx_timer12_hwmod = { | |||
474 | }, | 486 | }, |
475 | .dev_attr = &capability_pwm_dev_attr, | 487 | .dev_attr = &capability_pwm_dev_attr, |
476 | .class = &omap2xxx_timer_hwmod_class, | 488 | .class = &omap2xxx_timer_hwmod_class, |
489 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
477 | }; | 490 | }; |
478 | 491 | ||
479 | /* wd_timer2 */ | 492 | /* wd_timer2 */ |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index abe66ced903f..addc1c24ca2e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -153,29 +153,16 @@ static struct omap_hwmod omap3xxx_debugss_hwmod = { | |||
153 | }; | 153 | }; |
154 | 154 | ||
155 | /* timer class */ | 155 | /* timer class */ |
156 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = { | ||
157 | .rev_offs = 0x0000, | ||
158 | .sysc_offs = 0x0010, | ||
159 | .syss_offs = 0x0014, | ||
160 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | ||
161 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
162 | SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE), | ||
163 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
164 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
165 | }; | ||
166 | |||
167 | static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = { | ||
168 | .name = "timer", | ||
169 | .sysc = &omap3xxx_timer_1ms_sysc, | ||
170 | }; | ||
171 | |||
172 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = { | 156 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = { |
173 | .rev_offs = 0x0000, | 157 | .rev_offs = 0x0000, |
174 | .sysc_offs = 0x0010, | 158 | .sysc_offs = 0x0010, |
175 | .syss_offs = 0x0014, | 159 | .syss_offs = 0x0014, |
176 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP | | 160 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | |
177 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | 161 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
162 | SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE | | ||
163 | SYSS_HAS_RESET_STATUS), | ||
178 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | 164 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
165 | .clockact = CLOCKACT_TEST_ICLK, | ||
179 | .sysc_fields = &omap_hwmod_sysc_type1, | 166 | .sysc_fields = &omap_hwmod_sysc_type1, |
180 | }; | 167 | }; |
181 | 168 | ||
@@ -224,7 +211,8 @@ static struct omap_hwmod omap3xxx_timer1_hwmod = { | |||
224 | }, | 211 | }, |
225 | }, | 212 | }, |
226 | .dev_attr = &capability_alwon_dev_attr, | 213 | .dev_attr = &capability_alwon_dev_attr, |
227 | .class = &omap3xxx_timer_1ms_hwmod_class, | 214 | .class = &omap3xxx_timer_hwmod_class, |
215 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
228 | }; | 216 | }; |
229 | 217 | ||
230 | /* timer2 */ | 218 | /* timer2 */ |
@@ -241,7 +229,8 @@ static struct omap_hwmod omap3xxx_timer2_hwmod = { | |||
241 | .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT, | 229 | .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT, |
242 | }, | 230 | }, |
243 | }, | 231 | }, |
244 | .class = &omap3xxx_timer_1ms_hwmod_class, | 232 | .class = &omap3xxx_timer_hwmod_class, |
233 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
245 | }; | 234 | }; |
246 | 235 | ||
247 | /* timer3 */ | 236 | /* timer3 */ |
@@ -259,6 +248,7 @@ static struct omap_hwmod omap3xxx_timer3_hwmod = { | |||
259 | }, | 248 | }, |
260 | }, | 249 | }, |
261 | .class = &omap3xxx_timer_hwmod_class, | 250 | .class = &omap3xxx_timer_hwmod_class, |
251 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
262 | }; | 252 | }; |
263 | 253 | ||
264 | /* timer4 */ | 254 | /* timer4 */ |
@@ -276,6 +266,7 @@ static struct omap_hwmod omap3xxx_timer4_hwmod = { | |||
276 | }, | 266 | }, |
277 | }, | 267 | }, |
278 | .class = &omap3xxx_timer_hwmod_class, | 268 | .class = &omap3xxx_timer_hwmod_class, |
269 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
279 | }; | 270 | }; |
280 | 271 | ||
281 | /* timer5 */ | 272 | /* timer5 */ |
@@ -294,6 +285,7 @@ static struct omap_hwmod omap3xxx_timer5_hwmod = { | |||
294 | }, | 285 | }, |
295 | .dev_attr = &capability_dsp_dev_attr, | 286 | .dev_attr = &capability_dsp_dev_attr, |
296 | .class = &omap3xxx_timer_hwmod_class, | 287 | .class = &omap3xxx_timer_hwmod_class, |
288 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
297 | }; | 289 | }; |
298 | 290 | ||
299 | /* timer6 */ | 291 | /* timer6 */ |
@@ -312,6 +304,7 @@ static struct omap_hwmod omap3xxx_timer6_hwmod = { | |||
312 | }, | 304 | }, |
313 | .dev_attr = &capability_dsp_dev_attr, | 305 | .dev_attr = &capability_dsp_dev_attr, |
314 | .class = &omap3xxx_timer_hwmod_class, | 306 | .class = &omap3xxx_timer_hwmod_class, |
307 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
315 | }; | 308 | }; |
316 | 309 | ||
317 | /* timer7 */ | 310 | /* timer7 */ |
@@ -330,6 +323,7 @@ static struct omap_hwmod omap3xxx_timer7_hwmod = { | |||
330 | }, | 323 | }, |
331 | .dev_attr = &capability_dsp_dev_attr, | 324 | .dev_attr = &capability_dsp_dev_attr, |
332 | .class = &omap3xxx_timer_hwmod_class, | 325 | .class = &omap3xxx_timer_hwmod_class, |
326 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
333 | }; | 327 | }; |
334 | 328 | ||
335 | /* timer8 */ | 329 | /* timer8 */ |
@@ -348,6 +342,7 @@ static struct omap_hwmod omap3xxx_timer8_hwmod = { | |||
348 | }, | 342 | }, |
349 | .dev_attr = &capability_dsp_pwm_dev_attr, | 343 | .dev_attr = &capability_dsp_pwm_dev_attr, |
350 | .class = &omap3xxx_timer_hwmod_class, | 344 | .class = &omap3xxx_timer_hwmod_class, |
345 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
351 | }; | 346 | }; |
352 | 347 | ||
353 | /* timer9 */ | 348 | /* timer9 */ |
@@ -366,6 +361,7 @@ static struct omap_hwmod omap3xxx_timer9_hwmod = { | |||
366 | }, | 361 | }, |
367 | .dev_attr = &capability_pwm_dev_attr, | 362 | .dev_attr = &capability_pwm_dev_attr, |
368 | .class = &omap3xxx_timer_hwmod_class, | 363 | .class = &omap3xxx_timer_hwmod_class, |
364 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
369 | }; | 365 | }; |
370 | 366 | ||
371 | /* timer10 */ | 367 | /* timer10 */ |
@@ -383,7 +379,8 @@ static struct omap_hwmod omap3xxx_timer10_hwmod = { | |||
383 | }, | 379 | }, |
384 | }, | 380 | }, |
385 | .dev_attr = &capability_pwm_dev_attr, | 381 | .dev_attr = &capability_pwm_dev_attr, |
386 | .class = &omap3xxx_timer_1ms_hwmod_class, | 382 | .class = &omap3xxx_timer_hwmod_class, |
383 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
387 | }; | 384 | }; |
388 | 385 | ||
389 | /* timer11 */ | 386 | /* timer11 */ |
@@ -402,6 +399,7 @@ static struct omap_hwmod omap3xxx_timer11_hwmod = { | |||
402 | }, | 399 | }, |
403 | .dev_attr = &capability_pwm_dev_attr, | 400 | .dev_attr = &capability_pwm_dev_attr, |
404 | .class = &omap3xxx_timer_hwmod_class, | 401 | .class = &omap3xxx_timer_hwmod_class, |
402 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
405 | }; | 403 | }; |
406 | 404 | ||
407 | /* timer12 */ | 405 | /* timer12 */ |
@@ -425,6 +423,7 @@ static struct omap_hwmod omap3xxx_timer12_hwmod = { | |||
425 | }, | 423 | }, |
426 | .dev_attr = &capability_secure_dev_attr, | 424 | .dev_attr = &capability_secure_dev_attr, |
427 | .class = &omap3xxx_timer_hwmod_class, | 425 | .class = &omap3xxx_timer_hwmod_class, |
426 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
428 | }; | 427 | }; |
429 | 428 | ||
430 | /* | 429 | /* |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index b80bbf607ef8..f5b55a78a5f0 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -3103,6 +3103,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_timer_1ms_sysc = { | |||
3103 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | 3103 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | |
3104 | SYSS_HAS_RESET_STATUS), | 3104 | SYSS_HAS_RESET_STATUS), |
3105 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | 3105 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
3106 | .clockact = CLOCKACT_TEST_ICLK, | ||
3106 | .sysc_fields = &omap_hwmod_sysc_type1, | 3107 | .sysc_fields = &omap_hwmod_sysc_type1, |
3107 | }; | 3108 | }; |
3108 | 3109 | ||
@@ -3156,6 +3157,7 @@ static struct omap_hwmod omap44xx_timer1_hwmod = { | |||
3156 | .name = "timer1", | 3157 | .name = "timer1", |
3157 | .class = &omap44xx_timer_1ms_hwmod_class, | 3158 | .class = &omap44xx_timer_1ms_hwmod_class, |
3158 | .clkdm_name = "l4_wkup_clkdm", | 3159 | .clkdm_name = "l4_wkup_clkdm", |
3160 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
3159 | .mpu_irqs = omap44xx_timer1_irqs, | 3161 | .mpu_irqs = omap44xx_timer1_irqs, |
3160 | .main_clk = "timer1_fck", | 3162 | .main_clk = "timer1_fck", |
3161 | .prcm = { | 3163 | .prcm = { |
@@ -3178,6 +3180,7 @@ static struct omap_hwmod omap44xx_timer2_hwmod = { | |||
3178 | .name = "timer2", | 3180 | .name = "timer2", |
3179 | .class = &omap44xx_timer_1ms_hwmod_class, | 3181 | .class = &omap44xx_timer_1ms_hwmod_class, |
3180 | .clkdm_name = "l4_per_clkdm", | 3182 | .clkdm_name = "l4_per_clkdm", |
3183 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
3181 | .mpu_irqs = omap44xx_timer2_irqs, | 3184 | .mpu_irqs = omap44xx_timer2_irqs, |
3182 | .main_clk = "timer2_fck", | 3185 | .main_clk = "timer2_fck", |
3183 | .prcm = { | 3186 | .prcm = { |
@@ -3352,6 +3355,7 @@ static struct omap_hwmod omap44xx_timer10_hwmod = { | |||
3352 | .name = "timer10", | 3355 | .name = "timer10", |
3353 | .class = &omap44xx_timer_1ms_hwmod_class, | 3356 | .class = &omap44xx_timer_1ms_hwmod_class, |
3354 | .clkdm_name = "l4_per_clkdm", | 3357 | .clkdm_name = "l4_per_clkdm", |
3358 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | ||
3355 | .mpu_irqs = omap44xx_timer10_irqs, | 3359 | .mpu_irqs = omap44xx_timer10_irqs, |
3356 | .main_clk = "timer10_fck", | 3360 | .main_clk = "timer10_fck", |
3357 | .prcm = { | 3361 | .prcm = { |
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 3cf4fdfd7ab0..e2c291f52f92 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include "clock.h" | 30 | #include "clock.h" |
31 | #include "powerdomain.h" | 31 | #include "powerdomain.h" |
32 | #include "clockdomain.h" | 32 | #include "clockdomain.h" |
33 | #include <plat/dmtimer.h> | ||
34 | #include "omap-pm.h" | 33 | #include "omap-pm.h" |
35 | 34 | ||
36 | #include "soc.h" | 35 | #include "soc.h" |
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h index 070096496e20..f31d90774de0 100644 --- a/arch/arm/mach-omap2/soc.h +++ b/arch/arm/mach-omap2/soc.h | |||
@@ -435,9 +435,7 @@ extern u32 omap_features; | |||
435 | #define OMAP3_HAS_IO_WAKEUP BIT(6) | 435 | #define OMAP3_HAS_IO_WAKEUP BIT(6) |
436 | #define OMAP3_HAS_SDRC BIT(7) | 436 | #define OMAP3_HAS_SDRC BIT(7) |
437 | #define OMAP3_HAS_IO_CHAIN_CTRL BIT(8) | 437 | #define OMAP3_HAS_IO_CHAIN_CTRL BIT(8) |
438 | #define OMAP4_HAS_MPU_1GHZ BIT(9) | 438 | #define OMAP4_HAS_PERF_SILICON BIT(9) |
439 | #define OMAP4_HAS_MPU_1_2GHZ BIT(10) | ||
440 | #define OMAP4_HAS_MPU_1_5GHZ BIT(11) | ||
441 | 439 | ||
442 | 440 | ||
443 | #define OMAP3_HAS_FEATURE(feat,flag) \ | 441 | #define OMAP3_HAS_FEATURE(feat,flag) \ |
@@ -465,9 +463,7 @@ static inline unsigned int omap4_has_ ##feat(void) \ | |||
465 | return omap_features & OMAP4_HAS_ ##flag; \ | 463 | return omap_features & OMAP4_HAS_ ##flag; \ |
466 | } \ | 464 | } \ |
467 | 465 | ||
468 | OMAP4_HAS_FEATURE(mpu_1ghz, MPU_1GHZ) | 466 | OMAP4_HAS_FEATURE(perf_silicon, PERF_SILICON) |
469 | OMAP4_HAS_FEATURE(mpu_1_2ghz, MPU_1_2GHZ) | ||
470 | OMAP4_HAS_FEATURE(mpu_1_5ghz, MPU_1_5GHZ) | ||
471 | 467 | ||
472 | #endif /* __ASSEMBLY__ */ | 468 | #endif /* __ASSEMBLY__ */ |
473 | 469 | ||
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 684d2fc3d485..b9cff72ceaec 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -39,6 +39,8 @@ | |||
39 | #include <linux/of.h> | 39 | #include <linux/of.h> |
40 | #include <linux/of_address.h> | 40 | #include <linux/of_address.h> |
41 | #include <linux/of_irq.h> | 41 | #include <linux/of_irq.h> |
42 | #include <linux/platform_device.h> | ||
43 | #include <linux/platform_data/dmtimer-omap.h> | ||
42 | 44 | ||
43 | #include <asm/mach/time.h> | 45 | #include <asm/mach/time.h> |
44 | #include <asm/smp_twd.h> | 46 | #include <asm/smp_twd.h> |
@@ -64,20 +66,6 @@ | |||
64 | #define OMAP3_32K_SOURCE "omap_32k_fck" | 66 | #define OMAP3_32K_SOURCE "omap_32k_fck" |
65 | #define OMAP4_32K_SOURCE "sys_32k_ck" | 67 | #define OMAP4_32K_SOURCE "sys_32k_ck" |
66 | 68 | ||
67 | #ifdef CONFIG_OMAP_32K_TIMER | ||
68 | #define OMAP2_CLKEV_SOURCE OMAP2_32K_SOURCE | ||
69 | #define OMAP3_CLKEV_SOURCE OMAP3_32K_SOURCE | ||
70 | #define OMAP4_CLKEV_SOURCE OMAP4_32K_SOURCE | ||
71 | #define OMAP3_SECURE_TIMER 12 | ||
72 | #define TIMER_PROP_SECURE "ti,timer-secure" | ||
73 | #else | ||
74 | #define OMAP2_CLKEV_SOURCE OMAP2_MPU_SOURCE | ||
75 | #define OMAP3_CLKEV_SOURCE OMAP3_MPU_SOURCE | ||
76 | #define OMAP4_CLKEV_SOURCE OMAP4_MPU_SOURCE | ||
77 | #define OMAP3_SECURE_TIMER 1 | ||
78 | #define TIMER_PROP_SECURE "ti,timer-alwon" | ||
79 | #endif | ||
80 | |||
81 | #define REALTIME_COUNTER_BASE 0x48243200 | 69 | #define REALTIME_COUNTER_BASE 0x48243200 |
82 | #define INCREMENTER_NUMERATOR_OFFSET 0x10 | 70 | #define INCREMENTER_NUMERATOR_OFFSET 0x10 |
83 | #define INCREMENTER_DENUMERATOR_RELOAD_OFFSET 0x14 | 71 | #define INCREMENTER_DENUMERATOR_RELOAD_OFFSET 0x14 |
@@ -108,7 +96,7 @@ static int omap2_gp_timer_set_next_event(unsigned long cycles, | |||
108 | struct clock_event_device *evt) | 96 | struct clock_event_device *evt) |
109 | { | 97 | { |
110 | __omap_dm_timer_load_start(&clkev, OMAP_TIMER_CTRL_ST, | 98 | __omap_dm_timer_load_start(&clkev, OMAP_TIMER_CTRL_ST, |
111 | 0xffffffff - cycles, 1); | 99 | 0xffffffff - cycles, OMAP_TIMER_POSTED); |
112 | 100 | ||
113 | return 0; | 101 | return 0; |
114 | } | 102 | } |
@@ -118,7 +106,7 @@ static void omap2_gp_timer_set_mode(enum clock_event_mode mode, | |||
118 | { | 106 | { |
119 | u32 period; | 107 | u32 period; |
120 | 108 | ||
121 | __omap_dm_timer_stop(&clkev, 1, clkev.rate); | 109 | __omap_dm_timer_stop(&clkev, OMAP_TIMER_POSTED, clkev.rate); |
122 | 110 | ||
123 | switch (mode) { | 111 | switch (mode) { |
124 | case CLOCK_EVT_MODE_PERIODIC: | 112 | case CLOCK_EVT_MODE_PERIODIC: |
@@ -126,10 +114,10 @@ static void omap2_gp_timer_set_mode(enum clock_event_mode mode, | |||
126 | period -= 1; | 114 | period -= 1; |
127 | /* Looks like we need to first set the load value separately */ | 115 | /* Looks like we need to first set the load value separately */ |
128 | __omap_dm_timer_write(&clkev, OMAP_TIMER_LOAD_REG, | 116 | __omap_dm_timer_write(&clkev, OMAP_TIMER_LOAD_REG, |
129 | 0xffffffff - period, 1); | 117 | 0xffffffff - period, OMAP_TIMER_POSTED); |
130 | __omap_dm_timer_load_start(&clkev, | 118 | __omap_dm_timer_load_start(&clkev, |
131 | OMAP_TIMER_CTRL_AR | OMAP_TIMER_CTRL_ST, | 119 | OMAP_TIMER_CTRL_AR | OMAP_TIMER_CTRL_ST, |
132 | 0xffffffff - period, 1); | 120 | 0xffffffff - period, OMAP_TIMER_POSTED); |
133 | break; | 121 | break; |
134 | case CLOCK_EVT_MODE_ONESHOT: | 122 | case CLOCK_EVT_MODE_ONESHOT: |
135 | break; | 123 | break; |
@@ -160,11 +148,6 @@ static struct of_device_id omap_timer_match[] __initdata = { | |||
160 | { } | 148 | { } |
161 | }; | 149 | }; |
162 | 150 | ||
163 | static struct of_device_id omap_counter_match[] __initdata = { | ||
164 | { .compatible = "ti,omap-counter32k", }, | ||
165 | { } | ||
166 | }; | ||
167 | |||
168 | /** | 151 | /** |
169 | * omap_get_timer_dt - get a timer using device-tree | 152 | * omap_get_timer_dt - get a timer using device-tree |
170 | * @match - device-tree match structure for matching a device type | 153 | * @match - device-tree match structure for matching a device type |
@@ -222,19 +205,31 @@ void __init omap_dmtimer_init(void) | |||
222 | } | 205 | } |
223 | } | 206 | } |
224 | 207 | ||
208 | /** | ||
209 | * omap_dm_timer_get_errata - get errata flags for a timer | ||
210 | * | ||
211 | * Get the timer errata flags that are specific to the OMAP device being used. | ||
212 | */ | ||
213 | u32 __init omap_dm_timer_get_errata(void) | ||
214 | { | ||
215 | if (cpu_is_omap24xx()) | ||
216 | return 0; | ||
217 | |||
218 | return OMAP_TIMER_ERRATA_I103_I767; | ||
219 | } | ||
220 | |||
225 | static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, | 221 | static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, |
226 | int gptimer_id, | 222 | int gptimer_id, |
227 | const char *fck_source, | 223 | const char *fck_source, |
228 | const char *property) | 224 | const char *property, |
225 | int posted) | ||
229 | { | 226 | { |
230 | char name[10]; /* 10 = sizeof("gptXX_Xck0") */ | 227 | char name[10]; /* 10 = sizeof("gptXX_Xck0") */ |
231 | const char *oh_name; | 228 | const char *oh_name; |
232 | struct device_node *np; | 229 | struct device_node *np; |
233 | struct omap_hwmod *oh; | 230 | struct omap_hwmod *oh; |
234 | struct resource irq_rsrc, mem_rsrc; | 231 | struct resource irq, mem; |
235 | size_t size; | 232 | int r = 0; |
236 | int res = 0; | ||
237 | int r; | ||
238 | 233 | ||
239 | if (of_have_populated_dt()) { | 234 | if (of_have_populated_dt()) { |
240 | np = omap_get_timer_dt(omap_timer_match, NULL); | 235 | np = omap_get_timer_dt(omap_timer_match, NULL); |
@@ -260,28 +255,24 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, | |||
260 | oh_name = name; | 255 | oh_name = name; |
261 | } | 256 | } |
262 | 257 | ||
263 | omap_hwmod_setup_one(oh_name); | ||
264 | oh = omap_hwmod_lookup(oh_name); | 258 | oh = omap_hwmod_lookup(oh_name); |
265 | |||
266 | if (!oh) | 259 | if (!oh) |
267 | return -ENODEV; | 260 | return -ENODEV; |
268 | 261 | ||
269 | if (!of_have_populated_dt()) { | 262 | if (!of_have_populated_dt()) { |
270 | r = omap_hwmod_get_resource_byname(oh, IORESOURCE_IRQ, NULL, | 263 | r = omap_hwmod_get_resource_byname(oh, IORESOURCE_IRQ, NULL, |
271 | &irq_rsrc); | 264 | &irq); |
272 | if (r) | 265 | if (r) |
273 | return -ENXIO; | 266 | return -ENXIO; |
274 | timer->irq = irq_rsrc.start; | 267 | timer->irq = irq.start; |
275 | 268 | ||
276 | r = omap_hwmod_get_resource_byname(oh, IORESOURCE_MEM, NULL, | 269 | r = omap_hwmod_get_resource_byname(oh, IORESOURCE_MEM, NULL, |
277 | &mem_rsrc); | 270 | &mem); |
278 | if (r) | 271 | if (r) |
279 | return -ENXIO; | 272 | return -ENXIO; |
280 | timer->phys_base = mem_rsrc.start; | ||
281 | size = mem_rsrc.end - mem_rsrc.start; | ||
282 | 273 | ||
283 | /* Static mapping, never released */ | 274 | /* Static mapping, never released */ |
284 | timer->io_base = ioremap(timer->phys_base, size); | 275 | timer->io_base = ioremap(mem.start, mem.end - mem.start); |
285 | } | 276 | } |
286 | 277 | ||
287 | if (!timer->io_base) | 278 | if (!timer->io_base) |
@@ -292,32 +283,37 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, | |||
292 | if (IS_ERR(timer->fclk)) | 283 | if (IS_ERR(timer->fclk)) |
293 | return -ENODEV; | 284 | return -ENODEV; |
294 | 285 | ||
295 | omap_hwmod_enable(oh); | ||
296 | |||
297 | /* FIXME: Need to remove hard-coded test on timer ID */ | 286 | /* FIXME: Need to remove hard-coded test on timer ID */ |
298 | if (gptimer_id != 12) { | 287 | if (gptimer_id != 12) { |
299 | struct clk *src; | 288 | struct clk *src; |
300 | 289 | ||
301 | src = clk_get(NULL, fck_source); | 290 | src = clk_get(NULL, fck_source); |
302 | if (IS_ERR(src)) { | 291 | if (IS_ERR(src)) { |
303 | res = -EINVAL; | 292 | r = -EINVAL; |
304 | } else { | 293 | } else { |
305 | res = __omap_dm_timer_set_source(timer->fclk, src); | 294 | r = clk_set_parent(timer->fclk, src); |
306 | if (IS_ERR_VALUE(res)) | 295 | if (IS_ERR_VALUE(r)) |
307 | pr_warn("%s: %s cannot set source\n", | 296 | pr_warn("%s: %s cannot set source\n", |
308 | __func__, oh->name); | 297 | __func__, oh->name); |
309 | clk_put(src); | 298 | clk_put(src); |
310 | } | 299 | } |
311 | } | 300 | } |
301 | |||
302 | omap_hwmod_setup_one(oh_name); | ||
303 | omap_hwmod_enable(oh); | ||
312 | __omap_dm_timer_init_regs(timer); | 304 | __omap_dm_timer_init_regs(timer); |
313 | __omap_dm_timer_reset(timer, 1, 1); | ||
314 | timer->posted = 1; | ||
315 | 305 | ||
316 | timer->rate = clk_get_rate(timer->fclk); | 306 | if (posted) |
307 | __omap_dm_timer_enable_posted(timer); | ||
308 | |||
309 | /* Check that the intended posted configuration matches the actual */ | ||
310 | if (posted != timer->posted) | ||
311 | return -EINVAL; | ||
317 | 312 | ||
313 | timer->rate = clk_get_rate(timer->fclk); | ||
318 | timer->reserved = 1; | 314 | timer->reserved = 1; |
319 | 315 | ||
320 | return res; | 316 | return r; |
321 | } | 317 | } |
322 | 318 | ||
323 | static void __init omap2_gp_clockevent_init(int gptimer_id, | 319 | static void __init omap2_gp_clockevent_init(int gptimer_id, |
@@ -326,7 +322,17 @@ static void __init omap2_gp_clockevent_init(int gptimer_id, | |||
326 | { | 322 | { |
327 | int res; | 323 | int res; |
328 | 324 | ||
329 | res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source, property); | 325 | clkev.errata = omap_dm_timer_get_errata(); |
326 | |||
327 | /* | ||
328 | * For clock-event timers we never read the timer counter and | ||
329 | * so we are not impacted by errata i103 and i767. Therefore, | ||
330 | * we can safely ignore this errata for clock-event timers. | ||
331 | */ | ||
332 | __omap_dm_timer_override_errata(&clkev, OMAP_TIMER_ERRATA_I103_I767); | ||
333 | |||
334 | res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source, property, | ||
335 | OMAP_TIMER_POSTED); | ||
330 | BUG_ON(res); | 336 | BUG_ON(res); |
331 | 337 | ||
332 | omap2_gp_timer_irq.dev_id = &clkev; | 338 | omap2_gp_timer_irq.dev_id = &clkev; |
@@ -359,7 +365,8 @@ static bool use_gptimer_clksrc; | |||
359 | */ | 365 | */ |
360 | static cycle_t clocksource_read_cycles(struct clocksource *cs) | 366 | static cycle_t clocksource_read_cycles(struct clocksource *cs) |
361 | { | 367 | { |
362 | return (cycle_t)__omap_dm_timer_read_counter(&clksrc, 1); | 368 | return (cycle_t)__omap_dm_timer_read_counter(&clksrc, |
369 | OMAP_TIMER_NONPOSTED); | ||
363 | } | 370 | } |
364 | 371 | ||
365 | static struct clocksource clocksource_gpt = { | 372 | static struct clocksource clocksource_gpt = { |
@@ -373,12 +380,17 @@ static struct clocksource clocksource_gpt = { | |||
373 | static u32 notrace dmtimer_read_sched_clock(void) | 380 | static u32 notrace dmtimer_read_sched_clock(void) |
374 | { | 381 | { |
375 | if (clksrc.reserved) | 382 | if (clksrc.reserved) |
376 | return __omap_dm_timer_read_counter(&clksrc, 1); | 383 | return __omap_dm_timer_read_counter(&clksrc, |
384 | OMAP_TIMER_NONPOSTED); | ||
377 | 385 | ||
378 | return 0; | 386 | return 0; |
379 | } | 387 | } |
380 | 388 | ||
381 | #ifdef CONFIG_OMAP_32K_TIMER | 389 | static struct of_device_id omap_counter_match[] __initdata = { |
390 | { .compatible = "ti,omap-counter32k", }, | ||
391 | { } | ||
392 | }; | ||
393 | |||
382 | /* Setup free-running counter for clocksource */ | 394 | /* Setup free-running counter for clocksource */ |
383 | static int __init omap2_sync32k_clocksource_init(void) | 395 | static int __init omap2_sync32k_clocksource_init(void) |
384 | { | 396 | { |
@@ -439,23 +451,21 @@ static int __init omap2_sync32k_clocksource_init(void) | |||
439 | 451 | ||
440 | return ret; | 452 | return ret; |
441 | } | 453 | } |
442 | #else | ||
443 | static inline int omap2_sync32k_clocksource_init(void) | ||
444 | { | ||
445 | return -ENODEV; | ||
446 | } | ||
447 | #endif | ||
448 | 454 | ||
449 | static void __init omap2_gptimer_clocksource_init(int gptimer_id, | 455 | static void __init omap2_gptimer_clocksource_init(int gptimer_id, |
450 | const char *fck_source) | 456 | const char *fck_source) |
451 | { | 457 | { |
452 | int res; | 458 | int res; |
453 | 459 | ||
454 | res = omap_dm_timer_init_one(&clksrc, gptimer_id, fck_source, NULL); | 460 | clksrc.errata = omap_dm_timer_get_errata(); |
461 | |||
462 | res = omap_dm_timer_init_one(&clksrc, gptimer_id, fck_source, NULL, | ||
463 | OMAP_TIMER_NONPOSTED); | ||
455 | BUG_ON(res); | 464 | BUG_ON(res); |
456 | 465 | ||
457 | __omap_dm_timer_load_start(&clksrc, | 466 | __omap_dm_timer_load_start(&clksrc, |
458 | OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR, 0, 1); | 467 | OMAP_TIMER_CTRL_ST | OMAP_TIMER_CTRL_AR, 0, |
468 | OMAP_TIMER_NONPOSTED); | ||
459 | setup_sched_clock(dmtimer_read_sched_clock, 32, clksrc.rate); | 469 | setup_sched_clock(dmtimer_read_sched_clock, 32, clksrc.rate); |
460 | 470 | ||
461 | if (clocksource_register_hz(&clocksource_gpt, clksrc.rate)) | 471 | if (clocksource_register_hz(&clocksource_gpt, clksrc.rate)) |
@@ -466,25 +476,6 @@ static void __init omap2_gptimer_clocksource_init(int gptimer_id, | |||
466 | gptimer_id, clksrc.rate); | 476 | gptimer_id, clksrc.rate); |
467 | } | 477 | } |
468 | 478 | ||
469 | static void __init omap2_clocksource_init(int gptimer_id, | ||
470 | const char *fck_source) | ||
471 | { | ||
472 | /* | ||
473 | * First give preference to kernel parameter configuration | ||
474 | * by user (clocksource="gp_timer"). | ||
475 | * | ||
476 | * In case of missing kernel parameter for clocksource, | ||
477 | * first check for availability for 32k-sync timer, in case | ||
478 | * of failure in finding 32k_counter module or registering | ||
479 | * it as clocksource, execution will fallback to gp-timer. | ||
480 | */ | ||
481 | if (use_gptimer_clksrc == true) | ||
482 | omap2_gptimer_clocksource_init(gptimer_id, fck_source); | ||
483 | else if (omap2_sync32k_clocksource_init()) | ||
484 | /* Fall back to gp-timer code */ | ||
485 | omap2_gptimer_clocksource_init(gptimer_id, fck_source); | ||
486 | } | ||
487 | |||
488 | #ifdef CONFIG_SOC_HAS_REALTIME_COUNTER | 479 | #ifdef CONFIG_SOC_HAS_REALTIME_COUNTER |
489 | /* | 480 | /* |
490 | * The realtime counter also called master counter, is a free-running | 481 | * The realtime counter also called master counter, is a free-running |
@@ -563,52 +554,65 @@ static inline void __init realtime_counter_init(void) | |||
563 | {} | 554 | {} |
564 | #endif | 555 | #endif |
565 | 556 | ||
566 | #define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ | 557 | #define OMAP_SYS_GP_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ |
558 | clksrc_nr, clksrc_src) \ | ||
559 | static void __init omap##name##_gptimer_timer_init(void) \ | ||
560 | { \ | ||
561 | omap_dmtimer_init(); \ | ||
562 | omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ | ||
563 | omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src); \ | ||
564 | } | ||
565 | |||
566 | #define OMAP_SYS_32K_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ | ||
567 | clksrc_nr, clksrc_src) \ | 567 | clksrc_nr, clksrc_src) \ |
568 | static void __init omap##name##_timer_init(void) \ | 568 | static void __init omap##name##_sync32k_timer_init(void) \ |
569 | { \ | 569 | { \ |
570 | omap_dmtimer_init(); \ | 570 | omap_dmtimer_init(); \ |
571 | omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ | 571 | omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ |
572 | omap2_clocksource_init((clksrc_nr), clksrc_src); \ | 572 | /* Enable the use of clocksource="gp_timer" kernel parameter */ \ |
573 | if (use_gptimer_clksrc) \ | ||
574 | omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src);\ | ||
575 | else \ | ||
576 | omap2_sync32k_clocksource_init(); \ | ||
573 | } | 577 | } |
574 | 578 | ||
575 | #define OMAP_SYS_TIMER(name) \ | 579 | #define OMAP_SYS_TIMER(name, clksrc) \ |
576 | struct sys_timer omap##name##_timer = { \ | 580 | struct sys_timer omap##name##_timer = { \ |
577 | .init = omap##name##_timer_init, \ | 581 | .init = omap##name##_##clksrc##_timer_init, \ |
578 | }; | 582 | }; |
579 | 583 | ||
580 | #ifdef CONFIG_ARCH_OMAP2 | 584 | #ifdef CONFIG_ARCH_OMAP2 |
581 | OMAP_SYS_TIMER_INIT(2, 1, OMAP2_CLKEV_SOURCE, "ti,timer-alwon", | 585 | OMAP_SYS_32K_TIMER_INIT(2, 1, OMAP2_32K_SOURCE, "ti,timer-alwon", |
582 | 2, OMAP2_MPU_SOURCE) | 586 | 2, OMAP2_MPU_SOURCE); |
583 | OMAP_SYS_TIMER(2) | 587 | OMAP_SYS_TIMER(2, sync32k); |
584 | #endif | 588 | #endif /* CONFIG_ARCH_OMAP2 */ |
585 | 589 | ||
586 | #ifdef CONFIG_ARCH_OMAP3 | 590 | #ifdef CONFIG_ARCH_OMAP3 |
587 | OMAP_SYS_TIMER_INIT(3, 1, OMAP3_CLKEV_SOURCE, "ti,timer-alwon", | 591 | OMAP_SYS_32K_TIMER_INIT(3, 1, OMAP3_32K_SOURCE, "ti,timer-alwon", |
588 | 2, OMAP3_MPU_SOURCE) | 592 | 2, OMAP3_MPU_SOURCE); |
589 | OMAP_SYS_TIMER(3) | 593 | OMAP_SYS_TIMER(3, sync32k); |
590 | OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE, | 594 | OMAP_SYS_32K_TIMER_INIT(3_secure, 12, OMAP3_32K_SOURCE, "ti,timer-secure", |
591 | TIMER_PROP_SECURE, 2, OMAP3_MPU_SOURCE) | 595 | 2, OMAP3_MPU_SOURCE); |
592 | OMAP_SYS_TIMER(3_secure) | 596 | OMAP_SYS_TIMER(3_secure, sync32k); |
593 | #endif | 597 | OMAP_SYS_GP_TIMER_INIT(3_gp, 1, OMAP3_MPU_SOURCE, "ti,timer-alwon", |
598 | 2, OMAP3_MPU_SOURCE); | ||
599 | OMAP_SYS_TIMER(3_gp, gptimer); | ||
600 | #endif /* CONFIG_ARCH_OMAP3 */ | ||
594 | 601 | ||
595 | #ifdef CONFIG_SOC_AM33XX | 602 | #ifdef CONFIG_SOC_AM33XX |
596 | OMAP_SYS_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon", | 603 | OMAP_SYS_GP_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon", |
597 | 2, OMAP4_MPU_SOURCE) | 604 | 2, OMAP4_MPU_SOURCE); |
598 | OMAP_SYS_TIMER(3_am33xx) | 605 | OMAP_SYS_TIMER(3_am33xx, gptimer); |
599 | #endif | 606 | #endif /* CONFIG_SOC_AM33XX */ |
600 | 607 | ||
601 | #ifdef CONFIG_ARCH_OMAP4 | 608 | #ifdef CONFIG_ARCH_OMAP4 |
609 | OMAP_SYS_32K_TIMER_INIT(4, 1, OMAP4_32K_SOURCE, "ti,timer-alwon", | ||
610 | 2, OMAP4_MPU_SOURCE); | ||
602 | #ifdef CONFIG_LOCAL_TIMERS | 611 | #ifdef CONFIG_LOCAL_TIMERS |
603 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, | 612 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29); |
604 | OMAP44XX_LOCAL_TWD_BASE, 29); | 613 | static void __init omap4_local_timer_init(void) |
605 | #endif | ||
606 | |||
607 | static void __init omap4_timer_init(void) | ||
608 | { | 614 | { |
609 | omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE, "ti,timer-alwon"); | 615 | omap4_sync32k_timer_init(); |
610 | omap2_clocksource_init(2, OMAP4_MPU_SOURCE); | ||
611 | #ifdef CONFIG_LOCAL_TIMERS | ||
612 | /* Local timers are not supprted on OMAP4430 ES1.0 */ | 616 | /* Local timers are not supprted on OMAP4430 ES1.0 */ |
613 | if (omap_rev() != OMAP4430_REV_ES1_0) { | 617 | if (omap_rev() != OMAP4430_REV_ES1_0) { |
614 | int err; | 618 | int err; |
@@ -622,26 +626,32 @@ static void __init omap4_timer_init(void) | |||
622 | if (err) | 626 | if (err) |
623 | pr_err("twd_local_timer_register failed %d\n", err); | 627 | pr_err("twd_local_timer_register failed %d\n", err); |
624 | } | 628 | } |
625 | #endif | ||
626 | } | 629 | } |
627 | OMAP_SYS_TIMER(4) | 630 | #else /* CONFIG_LOCAL_TIMERS */ |
628 | #endif | 631 | static inline void omap4_local_timer_init(void) |
632 | { | ||
633 | omap4_sync32_timer_init(); | ||
634 | } | ||
635 | #endif /* CONFIG_LOCAL_TIMERS */ | ||
636 | OMAP_SYS_TIMER(4, local); | ||
637 | #endif /* CONFIG_ARCH_OMAP4 */ | ||
629 | 638 | ||
630 | #ifdef CONFIG_SOC_OMAP5 | 639 | #ifdef CONFIG_SOC_OMAP5 |
631 | static void __init omap5_timer_init(void) | 640 | OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon", |
641 | 2, OMAP4_MPU_SOURCE); | ||
642 | static void __init omap5_realtime_timer_init(void) | ||
632 | { | 643 | { |
633 | int err; | 644 | int err; |
634 | 645 | ||
635 | omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE, "ti,timer-alwon"); | 646 | omap5_sync32k_timer_init(); |
636 | omap2_clocksource_init(2, OMAP4_MPU_SOURCE); | ||
637 | realtime_counter_init(); | 647 | realtime_counter_init(); |
638 | 648 | ||
639 | err = arch_timer_of_register(); | 649 | err = arch_timer_of_register(); |
640 | if (err) | 650 | if (err) |
641 | pr_err("%s: arch_timer_register failed %d\n", __func__, err); | 651 | pr_err("%s: arch_timer_register failed %d\n", __func__, err); |
642 | } | 652 | } |
643 | OMAP_SYS_TIMER(5) | 653 | OMAP_SYS_TIMER(5, realtime); |
644 | #endif | 654 | #endif /* CONFIG_SOC_OMAP5 */ |
645 | 655 | ||
646 | /** | 656 | /** |
647 | * omap_timer_init - build and register timer device with an | 657 | * omap_timer_init - build and register timer device with an |
@@ -693,6 +703,7 @@ static int __init omap_timer_init(struct omap_hwmod *oh, void *unused) | |||
693 | if (timer_dev_attr) | 703 | if (timer_dev_attr) |
694 | pdata->timer_capability = timer_dev_attr->timer_capability; | 704 | pdata->timer_capability = timer_dev_attr->timer_capability; |
695 | 705 | ||
706 | pdata->timer_errata = omap_dm_timer_get_errata(); | ||
696 | pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count; | 707 | pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count; |
697 | 708 | ||
698 | pdev = omap_device_build(name, id, oh, pdata, sizeof(*pdata), | 709 | pdev = omap_device_build(name, id, oh, pdata, sizeof(*pdata), |
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index 3fa2bdb44106..e49b40b4c90a 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c | |||
@@ -70,6 +70,7 @@ void __init omap4_pmic_init(const char *pmic_type, | |||
70 | { | 70 | { |
71 | /* PMIC part*/ | 71 | /* PMIC part*/ |
72 | omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE); | 72 | omap_mux_init_signal("sys_nirq1", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE); |
73 | omap_mux_init_signal("fref_clk0_out.sys_drm_msecure", OMAP_PIN_OUTPUT); | ||
73 | omap_pmic_init(1, 400, pmic_type, 7 + OMAP44XX_IRQ_GIC_START, pmic_data); | 74 | omap_pmic_init(1, 400, pmic_type, 7 + OMAP44XX_IRQ_GIC_START, pmic_data); |
74 | 75 | ||
75 | /* Register additional devices on i2c1 bus if needed */ | 76 | /* Register additional devices on i2c1 bus if needed */ |
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 11aa7399dc09..86eec4159cbc 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -2,27 +2,6 @@ if ARCH_PXA | |||
2 | 2 | ||
3 | menu "Intel PXA2xx/PXA3xx Implementations" | 3 | menu "Intel PXA2xx/PXA3xx Implementations" |
4 | 4 | ||
5 | config ARCH_PXA_V7 | ||
6 | bool "ARMv7 (PXA95x) based systems" | ||
7 | |||
8 | if ARCH_PXA_V7 | ||
9 | comment "Marvell Dev Platforms (sorted by hardware release time)" | ||
10 | config MACH_TAVOREVB3 | ||
11 | bool "PXA95x Development Platform (aka TavorEVB III)" | ||
12 | select CPU_PXA955 | ||
13 | |||
14 | config MACH_SAARB | ||
15 | bool "PXA955 Handheld Platform (aka SAARB)" | ||
16 | select CPU_PXA955 | ||
17 | endif | ||
18 | |||
19 | config PXA_V7_MACH_AUTO | ||
20 | def_bool y | ||
21 | depends on ARCH_PXA_V7 | ||
22 | depends on !MACH_SAARB | ||
23 | select MACH_TAVOREVB3 | ||
24 | |||
25 | if !ARCH_PXA_V7 | ||
26 | comment "Intel/Marvell Dev Platforms (sorted by hardware release time)" | 5 | comment "Intel/Marvell Dev Platforms (sorted by hardware release time)" |
27 | 6 | ||
28 | config MACH_PXA3XX_DT | 7 | config MACH_PXA3XX_DT |
@@ -630,7 +609,6 @@ config MACH_ZIPIT2 | |||
630 | bool "Zipit Z2 Handheld" | 609 | bool "Zipit Z2 Handheld" |
631 | select HAVE_PWM | 610 | select HAVE_PWM |
632 | select PXA27x | 611 | select PXA27x |
633 | endif | ||
634 | endmenu | 612 | endmenu |
635 | 613 | ||
636 | config PXA25x | 614 | config PXA25x |
@@ -688,18 +666,6 @@ config CPU_PXA935 | |||
688 | help | 666 | help |
689 | PXA935 (codename Tavor-P65) | 667 | PXA935 (codename Tavor-P65) |
690 | 668 | ||
691 | config PXA95x | ||
692 | bool | ||
693 | select CPU_PJ4 | ||
694 | help | ||
695 | Select code specific to PXA95x variants | ||
696 | |||
697 | config CPU_PXA955 | ||
698 | bool | ||
699 | select PXA95x | ||
700 | help | ||
701 | PXA950 (codename MG1) | ||
702 | |||
703 | config PXA_SHARP_C7xx | 669 | config PXA_SHARP_C7xx |
704 | bool | 670 | bool |
705 | select SHARPSL_PM | 671 | select SHARPSL_PM |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index ee88d6eae648..12c500558387 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
@@ -19,7 +19,6 @@ endif | |||
19 | obj-$(CONFIG_PXA25x) += mfp-pxa2xx.o clock-pxa2xx.o pxa2xx.o pxa25x.o | 19 | obj-$(CONFIG_PXA25x) += mfp-pxa2xx.o clock-pxa2xx.o pxa2xx.o pxa25x.o |
20 | obj-$(CONFIG_PXA27x) += mfp-pxa2xx.o clock-pxa2xx.o pxa2xx.o pxa27x.o | 20 | obj-$(CONFIG_PXA27x) += mfp-pxa2xx.o clock-pxa2xx.o pxa2xx.o pxa27x.o |
21 | obj-$(CONFIG_PXA3xx) += mfp-pxa3xx.o clock-pxa3xx.o pxa3xx.o smemc.o pxa3xx-ulpi.o | 21 | obj-$(CONFIG_PXA3xx) += mfp-pxa3xx.o clock-pxa3xx.o pxa3xx.o smemc.o pxa3xx-ulpi.o |
22 | obj-$(CONFIG_PXA95x) += mfp-pxa3xx.o clock-pxa3xx.o pxa3xx.o pxa95x.o smemc.o | ||
23 | obj-$(CONFIG_CPU_PXA300) += pxa300.o | 22 | obj-$(CONFIG_CPU_PXA300) += pxa300.o |
24 | obj-$(CONFIG_CPU_PXA320) += pxa320.o | 23 | obj-$(CONFIG_CPU_PXA320) += pxa320.o |
25 | obj-$(CONFIG_CPU_PXA930) += pxa930.o | 24 | obj-$(CONFIG_CPU_PXA930) += pxa930.o |
@@ -36,9 +35,7 @@ obj-$(CONFIG_MACH_ZYLONITE300) += zylonite.o zylonite_pxa300.o | |||
36 | obj-$(CONFIG_MACH_ZYLONITE320) += zylonite.o zylonite_pxa320.o | 35 | obj-$(CONFIG_MACH_ZYLONITE320) += zylonite.o zylonite_pxa320.o |
37 | obj-$(CONFIG_MACH_LITTLETON) += littleton.o | 36 | obj-$(CONFIG_MACH_LITTLETON) += littleton.o |
38 | obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o | 37 | obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o |
39 | obj-$(CONFIG_MACH_TAVOREVB3) += tavorevb3.o | ||
40 | obj-$(CONFIG_MACH_SAAR) += saar.o | 38 | obj-$(CONFIG_MACH_SAAR) += saar.o |
41 | obj-$(CONFIG_MACH_SAARB) += saarb.o | ||
42 | 39 | ||
43 | # 3rd Party Dev Platforms | 40 | # 3rd Party Dev Platforms |
44 | obj-$(CONFIG_ARCH_PXA_IDP) += idp.o | 41 | obj-$(CONFIG_ARCH_PXA_IDP) += idp.o |
diff --git a/arch/arm/mach-pxa/clock.h b/arch/arm/mach-pxa/clock.h index 3a258b1bf1aa..1f65d32c8d5e 100644 --- a/arch/arm/mach-pxa/clock.h +++ b/arch/arm/mach-pxa/clock.h | |||
@@ -57,7 +57,7 @@ void clk_pxa2xx_cken_disable(struct clk *clk); | |||
57 | 57 | ||
58 | extern struct syscore_ops pxa2xx_clock_syscore_ops; | 58 | extern struct syscore_ops pxa2xx_clock_syscore_ops; |
59 | 59 | ||
60 | #if defined(CONFIG_PXA3xx) || defined(CONFIG_PXA95x) | 60 | #if defined(CONFIG_PXA3xx) |
61 | #define DEFINE_PXA3_CKEN(_name, _cken, _rate, _delay) \ | 61 | #define DEFINE_PXA3_CKEN(_name, _cken, _rate, _delay) \ |
62 | struct clk clk_##_name = { \ | 62 | struct clk clk_##_name = { \ |
63 | .ops = &clk_pxa3xx_cken_ops, \ | 63 | .ops = &clk_pxa3xx_cken_ops, \ |
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index ddaa04de8e22..daa86d39ed9e 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c | |||
@@ -703,7 +703,7 @@ void __init pxa_set_ohci_info(struct pxaohci_platform_data *info) | |||
703 | } | 703 | } |
704 | #endif /* CONFIG_PXA27x || CONFIG_PXA3xx */ | 704 | #endif /* CONFIG_PXA27x || CONFIG_PXA3xx */ |
705 | 705 | ||
706 | #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) || defined(CONFIG_PXA95x) | 706 | #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) |
707 | static struct resource pxa27x_resource_keypad[] = { | 707 | static struct resource pxa27x_resource_keypad[] = { |
708 | [0] = { | 708 | [0] = { |
709 | .start = 0x41500000, | 709 | .start = 0x41500000, |
@@ -872,7 +872,7 @@ struct platform_device pxa27x_device_pwm1 = { | |||
872 | .resource = pxa27x_resource_pwm1, | 872 | .resource = pxa27x_resource_pwm1, |
873 | .num_resources = ARRAY_SIZE(pxa27x_resource_pwm1), | 873 | .num_resources = ARRAY_SIZE(pxa27x_resource_pwm1), |
874 | }; | 874 | }; |
875 | #endif /* CONFIG_PXA27x || CONFIG_PXA3xx || CONFIG_PXA95x*/ | 875 | #endif /* CONFIG_PXA27x || CONFIG_PXA3xx */ |
876 | 876 | ||
877 | #ifdef CONFIG_PXA3xx | 877 | #ifdef CONFIG_PXA3xx |
878 | static struct resource pxa3xx_resources_mci2[] = { | 878 | static struct resource pxa3xx_resources_mci2[] = { |
@@ -981,7 +981,7 @@ struct platform_device pxa3xx_device_gcu = { | |||
981 | 981 | ||
982 | #endif /* CONFIG_PXA3xx */ | 982 | #endif /* CONFIG_PXA3xx */ |
983 | 983 | ||
984 | #if defined(CONFIG_PXA3xx) || defined(CONFIG_PXA95x) | 984 | #if defined(CONFIG_PXA3xx) |
985 | static struct resource pxa3xx_resources_i2c_power[] = { | 985 | static struct resource pxa3xx_resources_i2c_power[] = { |
986 | { | 986 | { |
987 | .start = 0x40f500c0, | 987 | .start = 0x40f500c0, |
@@ -1082,7 +1082,7 @@ struct platform_device pxa3xx_device_ssp4 = { | |||
1082 | .resource = pxa3xx_resource_ssp4, | 1082 | .resource = pxa3xx_resource_ssp4, |
1083 | .num_resources = ARRAY_SIZE(pxa3xx_resource_ssp4), | 1083 | .num_resources = ARRAY_SIZE(pxa3xx_resource_ssp4), |
1084 | }; | 1084 | }; |
1085 | #endif /* CONFIG_PXA3xx || CONFIG_PXA95x */ | 1085 | #endif /* CONFIG_PXA3xx */ |
1086 | 1086 | ||
1087 | struct resource pxa_resource_gpio[] = { | 1087 | struct resource pxa_resource_gpio[] = { |
1088 | { | 1088 | { |
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h index 56d92e5cad85..ccb06e485520 100644 --- a/arch/arm/mach-pxa/include/mach/hardware.h +++ b/arch/arm/mach-pxa/include/mach/hardware.h | |||
@@ -194,17 +194,6 @@ | |||
194 | #define __cpu_is_pxa935(id) (0) | 194 | #define __cpu_is_pxa935(id) (0) |
195 | #endif | 195 | #endif |
196 | 196 | ||
197 | #ifdef CONFIG_CPU_PXA955 | ||
198 | #define __cpu_is_pxa955(id) \ | ||
199 | ({ \ | ||
200 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
201 | _id == 0x581 || _id == 0xc08 \ | ||
202 | || _id == 0xb76; \ | ||
203 | }) | ||
204 | #else | ||
205 | #define __cpu_is_pxa955(id) (0) | ||
206 | #endif | ||
207 | |||
208 | #define cpu_is_pxa210() \ | 197 | #define cpu_is_pxa210() \ |
209 | ({ \ | 198 | ({ \ |
210 | __cpu_is_pxa210(read_cpuid_id()); \ | 199 | __cpu_is_pxa210(read_cpuid_id()); \ |
@@ -255,10 +244,6 @@ | |||
255 | __cpu_is_pxa935(read_cpuid_id()); \ | 244 | __cpu_is_pxa935(read_cpuid_id()); \ |
256 | }) | 245 | }) |
257 | 246 | ||
258 | #define cpu_is_pxa955() \ | ||
259 | ({ \ | ||
260 | __cpu_is_pxa955(read_cpuid_id()); \ | ||
261 | }) | ||
262 | 247 | ||
263 | 248 | ||
264 | /* | 249 | /* |
@@ -297,15 +282,6 @@ | |||
297 | #define __cpu_is_pxa93x(id) (0) | 282 | #define __cpu_is_pxa93x(id) (0) |
298 | #endif | 283 | #endif |
299 | 284 | ||
300 | #ifdef CONFIG_PXA95x | ||
301 | #define __cpu_is_pxa95x(id) \ | ||
302 | ({ \ | ||
303 | __cpu_is_pxa955(id); \ | ||
304 | }) | ||
305 | #else | ||
306 | #define __cpu_is_pxa95x(id) (0) | ||
307 | #endif | ||
308 | |||
309 | #define cpu_is_pxa2xx() \ | 285 | #define cpu_is_pxa2xx() \ |
310 | ({ \ | 286 | ({ \ |
311 | __cpu_is_pxa2xx(read_cpuid_id()); \ | 287 | __cpu_is_pxa2xx(read_cpuid_id()); \ |
@@ -321,10 +297,6 @@ | |||
321 | __cpu_is_pxa93x(read_cpuid_id()); \ | 297 | __cpu_is_pxa93x(read_cpuid_id()); \ |
322 | }) | 298 | }) |
323 | 299 | ||
324 | #define cpu_is_pxa95x() \ | ||
325 | ({ \ | ||
326 | __cpu_is_pxa95x(read_cpuid_id()); \ | ||
327 | }) | ||
328 | 300 | ||
329 | /* | 301 | /* |
330 | * return current memory and LCD clock frequency in units of 10kHz | 302 | * return current memory and LCD clock frequency in units of 10kHz |
diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h index 8765782dd955..48c2fd851686 100644 --- a/arch/arm/mach-pxa/include/mach/irqs.h +++ b/arch/arm/mach-pxa/include/mach/irqs.h | |||
@@ -84,7 +84,6 @@ | |||
84 | #define IRQ_PXA935_MMC0 PXA_IRQ(72) /* MMC0 Controller (PXA935) */ | 84 | #define IRQ_PXA935_MMC0 PXA_IRQ(72) /* MMC0 Controller (PXA935) */ |
85 | #define IRQ_PXA935_MMC1 PXA_IRQ(73) /* MMC1 Controller (PXA935) */ | 85 | #define IRQ_PXA935_MMC1 PXA_IRQ(73) /* MMC1 Controller (PXA935) */ |
86 | #define IRQ_PXA935_MMC2 PXA_IRQ(74) /* MMC2 Controller (PXA935) */ | 86 | #define IRQ_PXA935_MMC2 PXA_IRQ(74) /* MMC2 Controller (PXA935) */ |
87 | #define IRQ_PXA955_MMC3 PXA_IRQ(75) /* MMC3 Controller (PXA955) */ | ||
88 | #define IRQ_U2P PXA_IRQ(93) /* USB PHY D+/D- Lines (PXA935) */ | 87 | #define IRQ_U2P PXA_IRQ(93) /* USB PHY D+/D- Lines (PXA935) */ |
89 | 88 | ||
90 | #define PXA_GPIO_IRQ_BASE PXA_IRQ(96) | 89 | #define PXA_GPIO_IRQ_BASE PXA_IRQ(96) |
diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx.h b/arch/arm/mach-pxa/include/mach/pxa3xx.h index cd3e57f42688..6dd7fa163e29 100644 --- a/arch/arm/mach-pxa/include/mach/pxa3xx.h +++ b/arch/arm/mach-pxa/include/mach/pxa3xx.h | |||
@@ -7,7 +7,6 @@ | |||
7 | 7 | ||
8 | extern void __init pxa3xx_map_io(void); | 8 | extern void __init pxa3xx_map_io(void); |
9 | extern void __init pxa3xx_init_irq(void); | 9 | extern void __init pxa3xx_init_irq(void); |
10 | extern void __init pxa95x_init_irq(void); | ||
11 | 10 | ||
12 | #define pxa3xx_handle_irq ichp_handle_irq | 11 | #define pxa3xx_handle_irq ichp_handle_irq |
13 | 12 | ||
diff --git a/arch/arm/mach-pxa/include/mach/pxa95x.h b/arch/arm/mach-pxa/include/mach/pxa95x.h deleted file mode 100644 index cbb097c4cb1f..000000000000 --- a/arch/arm/mach-pxa/include/mach/pxa95x.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef __MACH_PXA95X_H | ||
2 | #define __MACH_PXA95X_H | ||
3 | |||
4 | #include <mach/pxa3xx.h> | ||
5 | #include <mach/mfp-pxa930.h> | ||
6 | |||
7 | #endif /* __MACH_PXA95X_H */ | ||
diff --git a/arch/arm/mach-pxa/pxa3xx-ulpi.c b/arch/arm/mach-pxa/pxa3xx-ulpi.c index 7dbe3ccf1993..e329ccefd364 100644 --- a/arch/arm/mach-pxa/pxa3xx-ulpi.c +++ b/arch/arm/mach-pxa/pxa3xx-ulpi.c | |||
@@ -384,18 +384,7 @@ static struct platform_driver pxa3xx_u2d_ulpi_driver = { | |||
384 | .probe = pxa3xx_u2d_probe, | 384 | .probe = pxa3xx_u2d_probe, |
385 | .remove = pxa3xx_u2d_remove, | 385 | .remove = pxa3xx_u2d_remove, |
386 | }; | 386 | }; |
387 | 387 | module_platform_driver(pxa3xx_u2d_ulpi_driver); | |
388 | static int pxa3xx_u2d_ulpi_init(void) | ||
389 | { | ||
390 | return platform_driver_register(&pxa3xx_u2d_ulpi_driver); | ||
391 | } | ||
392 | module_init(pxa3xx_u2d_ulpi_init); | ||
393 | |||
394 | static void __exit pxa3xx_u2d_ulpi_exit(void) | ||
395 | { | ||
396 | platform_driver_unregister(&pxa3xx_u2d_ulpi_driver); | ||
397 | } | ||
398 | module_exit(pxa3xx_u2d_ulpi_exit); | ||
399 | 388 | ||
400 | MODULE_DESCRIPTION("PXA3xx U2D ULPI driver"); | 389 | MODULE_DESCRIPTION("PXA3xx U2D ULPI driver"); |
401 | MODULE_AUTHOR("Igor Grinberg"); | 390 | MODULE_AUTHOR("Igor Grinberg"); |
diff --git a/arch/arm/mach-pxa/pxa95x.c b/arch/arm/mach-pxa/pxa95x.c deleted file mode 100644 index 47601f80e6e7..000000000000 --- a/arch/arm/mach-pxa/pxa95x.c +++ /dev/null | |||
@@ -1,295 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pxa/pxa95x.c | ||
3 | * | ||
4 | * code specific to PXA95x aka MGx | ||
5 | * | ||
6 | * Copyright (C) 2009-2010 Marvell International Ltd. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/pm.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/i2c/pxa-i2c.h> | ||
18 | #include <linux/irq.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <linux/syscore_ops.h> | ||
21 | |||
22 | #include <mach/hardware.h> | ||
23 | #include <mach/pxa3xx-regs.h> | ||
24 | #include <mach/pxa930.h> | ||
25 | #include <mach/reset.h> | ||
26 | #include <mach/pm.h> | ||
27 | #include <mach/dma.h> | ||
28 | |||
29 | #include "generic.h" | ||
30 | #include "devices.h" | ||
31 | #include "clock.h" | ||
32 | |||
33 | static struct mfp_addr_map pxa95x_mfp_addr_map[] __initdata = { | ||
34 | |||
35 | MFP_ADDR(GPIO0, 0x02e0), | ||
36 | MFP_ADDR(GPIO1, 0x02dc), | ||
37 | MFP_ADDR(GPIO2, 0x02e8), | ||
38 | MFP_ADDR(GPIO3, 0x02d8), | ||
39 | MFP_ADDR(GPIO4, 0x02e4), | ||
40 | MFP_ADDR(GPIO5, 0x02ec), | ||
41 | MFP_ADDR(GPIO6, 0x02f8), | ||
42 | MFP_ADDR(GPIO7, 0x02fc), | ||
43 | MFP_ADDR(GPIO8, 0x0300), | ||
44 | MFP_ADDR(GPIO9, 0x02d4), | ||
45 | MFP_ADDR(GPIO10, 0x02f4), | ||
46 | MFP_ADDR(GPIO11, 0x02f0), | ||
47 | MFP_ADDR(GPIO12, 0x0304), | ||
48 | MFP_ADDR(GPIO13, 0x0310), | ||
49 | MFP_ADDR(GPIO14, 0x0308), | ||
50 | MFP_ADDR(GPIO15, 0x030c), | ||
51 | MFP_ADDR(GPIO16, 0x04e8), | ||
52 | MFP_ADDR(GPIO17, 0x04f4), | ||
53 | MFP_ADDR(GPIO18, 0x04f8), | ||
54 | MFP_ADDR(GPIO19, 0x04fc), | ||
55 | MFP_ADDR(GPIO20, 0x0518), | ||
56 | MFP_ADDR(GPIO21, 0x051c), | ||
57 | MFP_ADDR(GPIO22, 0x04ec), | ||
58 | MFP_ADDR(GPIO23, 0x0500), | ||
59 | MFP_ADDR(GPIO24, 0x04f0), | ||
60 | MFP_ADDR(GPIO25, 0x0504), | ||
61 | MFP_ADDR(GPIO26, 0x0510), | ||
62 | MFP_ADDR(GPIO27, 0x0514), | ||
63 | MFP_ADDR(GPIO28, 0x0520), | ||
64 | MFP_ADDR(GPIO29, 0x0600), | ||
65 | MFP_ADDR(GPIO30, 0x0618), | ||
66 | MFP_ADDR(GPIO31, 0x0610), | ||
67 | MFP_ADDR(GPIO32, 0x060c), | ||
68 | MFP_ADDR(GPIO33, 0x061c), | ||
69 | MFP_ADDR(GPIO34, 0x0620), | ||
70 | MFP_ADDR(GPIO35, 0x0628), | ||
71 | MFP_ADDR(GPIO36, 0x062c), | ||
72 | MFP_ADDR(GPIO37, 0x0630), | ||
73 | MFP_ADDR(GPIO38, 0x0634), | ||
74 | MFP_ADDR(GPIO39, 0x0638), | ||
75 | MFP_ADDR(GPIO40, 0x063c), | ||
76 | MFP_ADDR(GPIO41, 0x0614), | ||
77 | MFP_ADDR(GPIO42, 0x0624), | ||
78 | MFP_ADDR(GPIO43, 0x0608), | ||
79 | MFP_ADDR(GPIO44, 0x0604), | ||
80 | MFP_ADDR(GPIO45, 0x050c), | ||
81 | MFP_ADDR(GPIO46, 0x0508), | ||
82 | MFP_ADDR(GPIO47, 0x02bc), | ||
83 | MFP_ADDR(GPIO48, 0x02b4), | ||
84 | MFP_ADDR(GPIO49, 0x02b8), | ||
85 | MFP_ADDR(GPIO50, 0x02c8), | ||
86 | MFP_ADDR(GPIO51, 0x02c0), | ||
87 | MFP_ADDR(GPIO52, 0x02c4), | ||
88 | MFP_ADDR(GPIO53, 0x02d0), | ||
89 | MFP_ADDR(GPIO54, 0x02cc), | ||
90 | MFP_ADDR(GPIO55, 0x029c), | ||
91 | MFP_ADDR(GPIO56, 0x02a0), | ||
92 | MFP_ADDR(GPIO57, 0x0294), | ||
93 | MFP_ADDR(GPIO58, 0x0298), | ||
94 | MFP_ADDR(GPIO59, 0x02a4), | ||
95 | MFP_ADDR(GPIO60, 0x02a8), | ||
96 | MFP_ADDR(GPIO61, 0x02b0), | ||
97 | MFP_ADDR(GPIO62, 0x02ac), | ||
98 | MFP_ADDR(GPIO63, 0x0640), | ||
99 | MFP_ADDR(GPIO64, 0x065c), | ||
100 | MFP_ADDR(GPIO65, 0x0648), | ||
101 | MFP_ADDR(GPIO66, 0x0644), | ||
102 | MFP_ADDR(GPIO67, 0x0674), | ||
103 | MFP_ADDR(GPIO68, 0x0658), | ||
104 | MFP_ADDR(GPIO69, 0x0654), | ||
105 | MFP_ADDR(GPIO70, 0x0660), | ||
106 | MFP_ADDR(GPIO71, 0x0668), | ||
107 | MFP_ADDR(GPIO72, 0x0664), | ||
108 | MFP_ADDR(GPIO73, 0x0650), | ||
109 | MFP_ADDR(GPIO74, 0x066c), | ||
110 | MFP_ADDR(GPIO75, 0x064c), | ||
111 | MFP_ADDR(GPIO76, 0x0670), | ||
112 | MFP_ADDR(GPIO77, 0x0678), | ||
113 | MFP_ADDR(GPIO78, 0x067c), | ||
114 | MFP_ADDR(GPIO79, 0x0694), | ||
115 | MFP_ADDR(GPIO80, 0x069c), | ||
116 | MFP_ADDR(GPIO81, 0x06a0), | ||
117 | MFP_ADDR(GPIO82, 0x06a4), | ||
118 | MFP_ADDR(GPIO83, 0x0698), | ||
119 | MFP_ADDR(GPIO84, 0x06bc), | ||
120 | MFP_ADDR(GPIO85, 0x06b4), | ||
121 | MFP_ADDR(GPIO86, 0x06b0), | ||
122 | MFP_ADDR(GPIO87, 0x06c0), | ||
123 | MFP_ADDR(GPIO88, 0x06c4), | ||
124 | MFP_ADDR(GPIO89, 0x06ac), | ||
125 | MFP_ADDR(GPIO90, 0x0680), | ||
126 | MFP_ADDR(GPIO91, 0x0684), | ||
127 | MFP_ADDR(GPIO92, 0x0688), | ||
128 | MFP_ADDR(GPIO93, 0x0690), | ||
129 | MFP_ADDR(GPIO94, 0x068c), | ||
130 | MFP_ADDR(GPIO95, 0x06a8), | ||
131 | MFP_ADDR(GPIO96, 0x06b8), | ||
132 | MFP_ADDR(GPIO97, 0x0410), | ||
133 | MFP_ADDR(GPIO98, 0x0418), | ||
134 | MFP_ADDR(GPIO99, 0x041c), | ||
135 | MFP_ADDR(GPIO100, 0x0414), | ||
136 | MFP_ADDR(GPIO101, 0x0408), | ||
137 | MFP_ADDR(GPIO102, 0x0324), | ||
138 | MFP_ADDR(GPIO103, 0x040c), | ||
139 | MFP_ADDR(GPIO104, 0x0400), | ||
140 | MFP_ADDR(GPIO105, 0x0328), | ||
141 | MFP_ADDR(GPIO106, 0x0404), | ||
142 | |||
143 | MFP_ADDR(GPIO159, 0x0524), | ||
144 | MFP_ADDR(GPIO163, 0x0534), | ||
145 | MFP_ADDR(GPIO167, 0x0544), | ||
146 | MFP_ADDR(GPIO168, 0x0548), | ||
147 | MFP_ADDR(GPIO169, 0x054c), | ||
148 | MFP_ADDR(GPIO170, 0x0550), | ||
149 | MFP_ADDR(GPIO171, 0x0554), | ||
150 | MFP_ADDR(GPIO172, 0x0558), | ||
151 | MFP_ADDR(GPIO173, 0x055c), | ||
152 | |||
153 | MFP_ADDR(nXCVREN, 0x0204), | ||
154 | MFP_ADDR(DF_CLE_nOE, 0x020c), | ||
155 | MFP_ADDR(DF_nADV1_ALE, 0x0218), | ||
156 | MFP_ADDR(DF_SCLK_E, 0x0214), | ||
157 | MFP_ADDR(DF_SCLK_S, 0x0210), | ||
158 | MFP_ADDR(nBE0, 0x021c), | ||
159 | MFP_ADDR(nBE1, 0x0220), | ||
160 | MFP_ADDR(DF_nADV2_ALE, 0x0224), | ||
161 | MFP_ADDR(DF_INT_RnB, 0x0228), | ||
162 | MFP_ADDR(DF_nCS0, 0x022c), | ||
163 | MFP_ADDR(DF_nCS1, 0x0230), | ||
164 | MFP_ADDR(nLUA, 0x0254), | ||
165 | MFP_ADDR(nLLA, 0x0258), | ||
166 | MFP_ADDR(DF_nWE, 0x0234), | ||
167 | MFP_ADDR(DF_nRE_nOE, 0x0238), | ||
168 | MFP_ADDR(DF_ADDR0, 0x024c), | ||
169 | MFP_ADDR(DF_ADDR1, 0x0250), | ||
170 | MFP_ADDR(DF_ADDR2, 0x025c), | ||
171 | MFP_ADDR(DF_ADDR3, 0x0260), | ||
172 | MFP_ADDR(DF_IO0, 0x023c), | ||
173 | MFP_ADDR(DF_IO1, 0x0240), | ||
174 | MFP_ADDR(DF_IO2, 0x0244), | ||
175 | MFP_ADDR(DF_IO3, 0x0248), | ||
176 | MFP_ADDR(DF_IO4, 0x0264), | ||
177 | MFP_ADDR(DF_IO5, 0x0268), | ||
178 | MFP_ADDR(DF_IO6, 0x026c), | ||
179 | MFP_ADDR(DF_IO7, 0x0270), | ||
180 | MFP_ADDR(DF_IO8, 0x0274), | ||
181 | MFP_ADDR(DF_IO9, 0x0278), | ||
182 | MFP_ADDR(DF_IO10, 0x027c), | ||
183 | MFP_ADDR(DF_IO11, 0x0280), | ||
184 | MFP_ADDR(DF_IO12, 0x0284), | ||
185 | MFP_ADDR(DF_IO13, 0x0288), | ||
186 | MFP_ADDR(DF_IO14, 0x028c), | ||
187 | MFP_ADDR(DF_IO15, 0x0290), | ||
188 | |||
189 | MFP_ADDR(GSIM_UIO, 0x0314), | ||
190 | MFP_ADDR(GSIM_UCLK, 0x0318), | ||
191 | MFP_ADDR(GSIM_UDET, 0x031c), | ||
192 | MFP_ADDR(GSIM_nURST, 0x0320), | ||
193 | |||
194 | MFP_ADDR(PMIC_INT, 0x06c8), | ||
195 | |||
196 | MFP_ADDR(RDY, 0x0200), | ||
197 | |||
198 | MFP_ADDR_END, | ||
199 | }; | ||
200 | |||
201 | static DEFINE_CK(pxa95x_lcd, LCD, &clk_pxa3xx_hsio_ops); | ||
202 | static DEFINE_CLK(pxa95x_pout, &clk_pxa3xx_pout_ops, 13000000, 70); | ||
203 | static DEFINE_PXA3_CKEN(pxa95x_ffuart, FFUART, 14857000, 1); | ||
204 | static DEFINE_PXA3_CKEN(pxa95x_btuart, BTUART, 14857000, 1); | ||
205 | static DEFINE_PXA3_CKEN(pxa95x_stuart, STUART, 14857000, 1); | ||
206 | static DEFINE_PXA3_CKEN(pxa95x_i2c, I2C, 32842000, 0); | ||
207 | static DEFINE_PXA3_CKEN(pxa95x_keypad, KEYPAD, 32768, 0); | ||
208 | static DEFINE_PXA3_CKEN(pxa95x_ssp1, SSP1, 13000000, 0); | ||
209 | static DEFINE_PXA3_CKEN(pxa95x_ssp2, SSP2, 13000000, 0); | ||
210 | static DEFINE_PXA3_CKEN(pxa95x_ssp3, SSP3, 13000000, 0); | ||
211 | static DEFINE_PXA3_CKEN(pxa95x_ssp4, SSP4, 13000000, 0); | ||
212 | static DEFINE_PXA3_CKEN(pxa95x_pwm0, PWM0, 13000000, 0); | ||
213 | static DEFINE_PXA3_CKEN(pxa95x_pwm1, PWM1, 13000000, 0); | ||
214 | static DEFINE_PXA3_CKEN(pxa95x_gpio, GPIO, 13000000, 0); | ||
215 | |||
216 | static struct clk_lookup pxa95x_clkregs[] = { | ||
217 | INIT_CLKREG(&clk_pxa95x_pout, NULL, "CLK_POUT"), | ||
218 | /* Power I2C clock is always on */ | ||
219 | INIT_CLKREG(&clk_dummy, "pxa3xx-pwri2c.1", NULL), | ||
220 | INIT_CLKREG(&clk_pxa95x_lcd, "pxa2xx-fb", NULL), | ||
221 | INIT_CLKREG(&clk_pxa95x_ffuart, "pxa2xx-uart.0", NULL), | ||
222 | INIT_CLKREG(&clk_pxa95x_btuart, "pxa2xx-uart.1", NULL), | ||
223 | INIT_CLKREG(&clk_pxa95x_stuart, "pxa2xx-uart.2", NULL), | ||
224 | INIT_CLKREG(&clk_pxa95x_stuart, "pxa2xx-ir", "UARTCLK"), | ||
225 | INIT_CLKREG(&clk_pxa95x_i2c, "pxa2xx-i2c.0", NULL), | ||
226 | INIT_CLKREG(&clk_pxa95x_keypad, "pxa27x-keypad", NULL), | ||
227 | INIT_CLKREG(&clk_pxa95x_ssp1, "pxa27x-ssp.0", NULL), | ||
228 | INIT_CLKREG(&clk_pxa95x_ssp2, "pxa27x-ssp.1", NULL), | ||
229 | INIT_CLKREG(&clk_pxa95x_ssp3, "pxa27x-ssp.2", NULL), | ||
230 | INIT_CLKREG(&clk_pxa95x_ssp4, "pxa27x-ssp.3", NULL), | ||
231 | INIT_CLKREG(&clk_pxa95x_pwm0, "pxa27x-pwm.0", NULL), | ||
232 | INIT_CLKREG(&clk_pxa95x_pwm1, "pxa27x-pwm.1", NULL), | ||
233 | INIT_CLKREG(&clk_pxa95x_gpio, "pxa-gpio", NULL), | ||
234 | INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL), | ||
235 | }; | ||
236 | |||
237 | void __init pxa95x_init_irq(void) | ||
238 | { | ||
239 | pxa_init_irq(96, NULL); | ||
240 | } | ||
241 | |||
242 | /* | ||
243 | * device registration specific to PXA93x. | ||
244 | */ | ||
245 | |||
246 | void __init pxa95x_set_i2c_power_info(struct i2c_pxa_platform_data *info) | ||
247 | { | ||
248 | pxa_register_device(&pxa3xx_device_i2c_power, info); | ||
249 | } | ||
250 | |||
251 | static struct platform_device *devices[] __initdata = { | ||
252 | &pxa_device_gpio, | ||
253 | &sa1100_device_rtc, | ||
254 | &pxa_device_rtc, | ||
255 | &pxa27x_device_ssp1, | ||
256 | &pxa27x_device_ssp2, | ||
257 | &pxa27x_device_ssp3, | ||
258 | &pxa3xx_device_ssp4, | ||
259 | &pxa27x_device_pwm0, | ||
260 | &pxa27x_device_pwm1, | ||
261 | }; | ||
262 | |||
263 | static int __init pxa95x_init(void) | ||
264 | { | ||
265 | int ret = 0, i; | ||
266 | |||
267 | if (cpu_is_pxa95x()) { | ||
268 | mfp_init_base(io_p2v(MFPR_BASE)); | ||
269 | mfp_init_addr(pxa95x_mfp_addr_map); | ||
270 | |||
271 | reset_status = ARSR; | ||
272 | |||
273 | /* | ||
274 | * clear RDH bit every time after reset | ||
275 | * | ||
276 | * Note: the last 3 bits DxS are write-1-to-clear so carefully | ||
277 | * preserve them here in case they will be referenced later | ||
278 | */ | ||
279 | ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S); | ||
280 | |||
281 | clkdev_add_table(pxa95x_clkregs, ARRAY_SIZE(pxa95x_clkregs)); | ||
282 | |||
283 | if ((ret = pxa_init_dma(IRQ_DMA, 32))) | ||
284 | return ret; | ||
285 | |||
286 | register_syscore_ops(&pxa_irq_syscore_ops); | ||
287 | register_syscore_ops(&pxa3xx_clock_syscore_ops); | ||
288 | |||
289 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
290 | } | ||
291 | |||
292 | return ret; | ||
293 | } | ||
294 | |||
295 | postcore_initcall(pxa95x_init); | ||
diff --git a/arch/arm/mach-pxa/saarb.c b/arch/arm/mach-pxa/saarb.c deleted file mode 100644 index 5aded5e6148f..000000000000 --- a/arch/arm/mach-pxa/saarb.c +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pxa/saarb.c | ||
3 | * | ||
4 | * Support for the Marvell Handheld Platform (aka SAARB) | ||
5 | * | ||
6 | * Copyright (C) 2007-2010 Marvell International Ltd. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * publishhed by the Free Software Foundation. | ||
11 | */ | ||
12 | #include <linux/gpio.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/i2c.h> | ||
16 | #include <linux/i2c/pxa-i2c.h> | ||
17 | #include <linux/mfd/88pm860x.h> | ||
18 | |||
19 | #include <asm/mach-types.h> | ||
20 | #include <asm/mach/arch.h> | ||
21 | |||
22 | #include <mach/irqs.h> | ||
23 | #include <mach/hardware.h> | ||
24 | #include <mach/mfp.h> | ||
25 | #include <mach/mfp-pxa930.h> | ||
26 | #include <mach/pxa95x.h> | ||
27 | |||
28 | #include "generic.h" | ||
29 | |||
30 | #define SAARB_NR_IRQS (IRQ_BOARD_START + 40) | ||
31 | |||
32 | static struct pm860x_touch_pdata saarb_touch = { | ||
33 | .gpadc_prebias = 1, | ||
34 | .slot_cycle = 1, | ||
35 | .tsi_prebias = 6, | ||
36 | .pen_prebias = 16, | ||
37 | .pen_prechg = 2, | ||
38 | .res_x = 300, | ||
39 | }; | ||
40 | |||
41 | static struct pm860x_backlight_pdata saarb_backlight[] = { | ||
42 | { | ||
43 | .id = PM8606_ID_BACKLIGHT, | ||
44 | .iset = PM8606_WLED_CURRENT(24), | ||
45 | .flags = PM8606_BACKLIGHT1, | ||
46 | }, | ||
47 | {}, | ||
48 | }; | ||
49 | |||
50 | static struct pm860x_led_pdata saarb_led[] = { | ||
51 | { | ||
52 | .id = PM8606_ID_LED, | ||
53 | .iset = PM8606_LED_CURRENT(12), | ||
54 | .flags = PM8606_LED1_RED, | ||
55 | }, { | ||
56 | .id = PM8606_ID_LED, | ||
57 | .iset = PM8606_LED_CURRENT(12), | ||
58 | .flags = PM8606_LED1_GREEN, | ||
59 | }, { | ||
60 | .id = PM8606_ID_LED, | ||
61 | .iset = PM8606_LED_CURRENT(12), | ||
62 | .flags = PM8606_LED1_BLUE, | ||
63 | }, { | ||
64 | .id = PM8606_ID_LED, | ||
65 | .iset = PM8606_LED_CURRENT(12), | ||
66 | .flags = PM8606_LED2_RED, | ||
67 | }, { | ||
68 | .id = PM8606_ID_LED, | ||
69 | .iset = PM8606_LED_CURRENT(12), | ||
70 | .flags = PM8606_LED2_GREEN, | ||
71 | }, { | ||
72 | .id = PM8606_ID_LED, | ||
73 | .iset = PM8606_LED_CURRENT(12), | ||
74 | .flags = PM8606_LED2_BLUE, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | static struct pm860x_platform_data saarb_pm8607_info = { | ||
79 | .touch = &saarb_touch, | ||
80 | .backlight = &saarb_backlight[0], | ||
81 | .led = &saarb_led[0], | ||
82 | .companion_addr = 0x10, | ||
83 | .irq_mode = 0, | ||
84 | .irq_base = IRQ_BOARD_START, | ||
85 | |||
86 | .i2c_port = GI2C_PORT, | ||
87 | }; | ||
88 | |||
89 | static struct i2c_board_info saarb_i2c_info[] = { | ||
90 | { | ||
91 | .type = "88PM860x", | ||
92 | .addr = 0x34, | ||
93 | .platform_data = &saarb_pm8607_info, | ||
94 | .irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO83)), | ||
95 | }, | ||
96 | }; | ||
97 | |||
98 | static void __init saarb_init(void) | ||
99 | { | ||
100 | pxa_set_ffuart_info(NULL); | ||
101 | pxa_set_i2c_info(NULL); | ||
102 | i2c_register_board_info(0, ARRAY_AND_SIZE(saarb_i2c_info)); | ||
103 | } | ||
104 | |||
105 | MACHINE_START(SAARB, "PXA955 Handheld Platform (aka SAARB)") | ||
106 | .atag_offset = 0x100, | ||
107 | .map_io = pxa3xx_map_io, | ||
108 | .nr_irqs = SAARB_NR_IRQS, | ||
109 | .init_irq = pxa95x_init_irq, | ||
110 | .handle_irq = pxa3xx_handle_irq, | ||
111 | .timer = &pxa_timer, | ||
112 | .init_machine = saarb_init, | ||
113 | .restart = pxa_restart, | ||
114 | MACHINE_END | ||
115 | |||
diff --git a/arch/arm/mach-pxa/tavorevb3.c b/arch/arm/mach-pxa/tavorevb3.c deleted file mode 100644 index f7d9305cfd77..000000000000 --- a/arch/arm/mach-pxa/tavorevb3.c +++ /dev/null | |||
@@ -1,136 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pxa/tavorevb3.c | ||
3 | * | ||
4 | * Support for the Marvell EVB3 Development Platform. | ||
5 | * | ||
6 | * Copyright: (C) Copyright 2008-2010 Marvell International Ltd. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * publishhed by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/i2c.h> | ||
18 | #include <linux/i2c/pxa-i2c.h> | ||
19 | #include <linux/gpio.h> | ||
20 | #include <linux/mfd/88pm860x.h> | ||
21 | |||
22 | #include <asm/mach-types.h> | ||
23 | #include <asm/mach/arch.h> | ||
24 | |||
25 | #include <mach/pxa930.h> | ||
26 | |||
27 | #include "devices.h" | ||
28 | #include "generic.h" | ||
29 | |||
30 | #define TAVOREVB3_NR_IRQS (IRQ_BOARD_START + 24) | ||
31 | |||
32 | static mfp_cfg_t evb3_mfp_cfg[] __initdata = { | ||
33 | /* UART */ | ||
34 | GPIO53_UART1_TXD, | ||
35 | GPIO54_UART1_RXD, | ||
36 | |||
37 | /* PMIC */ | ||
38 | PMIC_INT_GPIO83, | ||
39 | }; | ||
40 | |||
41 | #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) | ||
42 | static struct pm860x_touch_pdata evb3_touch = { | ||
43 | .gpadc_prebias = 1, | ||
44 | .slot_cycle = 1, | ||
45 | .tsi_prebias = 6, | ||
46 | .pen_prebias = 16, | ||
47 | .pen_prechg = 2, | ||
48 | .res_x = 300, | ||
49 | }; | ||
50 | |||
51 | static struct pm860x_backlight_pdata evb3_backlight[] = { | ||
52 | { | ||
53 | .id = PM8606_ID_BACKLIGHT, | ||
54 | .iset = PM8606_WLED_CURRENT(24), | ||
55 | .flags = PM8606_BACKLIGHT1, | ||
56 | }, | ||
57 | {}, | ||
58 | }; | ||
59 | |||
60 | static struct pm860x_led_pdata evb3_led[] = { | ||
61 | { | ||
62 | .id = PM8606_ID_LED, | ||
63 | .iset = PM8606_LED_CURRENT(12), | ||
64 | .flags = PM8606_LED1_RED, | ||
65 | }, { | ||
66 | .id = PM8606_ID_LED, | ||
67 | .iset = PM8606_LED_CURRENT(12), | ||
68 | .flags = PM8606_LED1_GREEN, | ||
69 | }, { | ||
70 | .id = PM8606_ID_LED, | ||
71 | .iset = PM8606_LED_CURRENT(12), | ||
72 | .flags = PM8606_LED1_BLUE, | ||
73 | }, { | ||
74 | .id = PM8606_ID_LED, | ||
75 | .iset = PM8606_LED_CURRENT(12), | ||
76 | .flags = PM8606_LED2_RED, | ||
77 | }, { | ||
78 | .id = PM8606_ID_LED, | ||
79 | .iset = PM8606_LED_CURRENT(12), | ||
80 | .flags = PM8606_LED2_GREEN, | ||
81 | }, { | ||
82 | .id = PM8606_ID_LED, | ||
83 | .iset = PM8606_LED_CURRENT(12), | ||
84 | .flags = PM8606_LED2_BLUE, | ||
85 | }, | ||
86 | }; | ||
87 | |||
88 | static struct pm860x_platform_data evb3_pm8607_info = { | ||
89 | .touch = &evb3_touch, | ||
90 | .backlight = &evb3_backlight[0], | ||
91 | .led = &evb3_led[0], | ||
92 | .companion_addr = 0x10, | ||
93 | .irq_mode = 0, | ||
94 | .irq_base = IRQ_BOARD_START, | ||
95 | |||
96 | .i2c_port = GI2C_PORT, | ||
97 | }; | ||
98 | |||
99 | static struct i2c_board_info evb3_i2c_info[] = { | ||
100 | { | ||
101 | .type = "88PM860x", | ||
102 | .addr = 0x34, | ||
103 | .platform_data = &evb3_pm8607_info, | ||
104 | .irq = PXA_GPIO_TO_IRQ(mfp_to_gpio(MFP_PIN_GPIO83)), | ||
105 | }, | ||
106 | }; | ||
107 | |||
108 | static void __init evb3_init_i2c(void) | ||
109 | { | ||
110 | pxa_set_i2c_info(NULL); | ||
111 | i2c_register_board_info(0, ARRAY_AND_SIZE(evb3_i2c_info)); | ||
112 | } | ||
113 | #else | ||
114 | static inline void evb3_init_i2c(void) {} | ||
115 | #endif | ||
116 | |||
117 | static void __init evb3_init(void) | ||
118 | { | ||
119 | /* initialize MFP configurations */ | ||
120 | pxa3xx_mfp_config(ARRAY_AND_SIZE(evb3_mfp_cfg)); | ||
121 | |||
122 | pxa_set_ffuart_info(NULL); | ||
123 | |||
124 | evb3_init_i2c(); | ||
125 | } | ||
126 | |||
127 | MACHINE_START(TAVOREVB3, "PXA950 Evaluation Board (aka TavorEVB3)") | ||
128 | .atag_offset = 0x100, | ||
129 | .map_io = pxa3xx_map_io, | ||
130 | .nr_irqs = TAVOREVB3_NR_IRQS, | ||
131 | .init_irq = pxa3xx_init_irq, | ||
132 | .handle_irq = pxa3xx_handle_irq, | ||
133 | .timer = &pxa_timer, | ||
134 | .init_machine = evb3_init, | ||
135 | .restart = pxa_restart, | ||
136 | MACHINE_END | ||
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c b/arch/arm/mach-s3c24xx/clock-s3c2443.c index 7f689ce1be61..bdaba59b42dc 100644 --- a/arch/arm/mach-s3c24xx/clock-s3c2443.c +++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c | |||
@@ -158,12 +158,6 @@ static struct clk init_clocks_off[] = { | |||
158 | .devname = "s3c2410-spi.0", | 158 | .devname = "s3c2410-spi.0", |
159 | .parent = &clk_p, | 159 | .parent = &clk_p, |
160 | .enable = s3c2443_clkcon_enable_p, | 160 | .enable = s3c2443_clkcon_enable_p, |
161 | .ctrlbit = S3C2443_PCLKCON_SPI0, | ||
162 | }, { | ||
163 | .name = "spi", | ||
164 | .devname = "s3c2410-spi.1", | ||
165 | .parent = &clk_p, | ||
166 | .enable = s3c2443_clkcon_enable_p, | ||
167 | .ctrlbit = S3C2443_PCLKCON_SPI1, | 161 | .ctrlbit = S3C2443_PCLKCON_SPI1, |
168 | } | 162 | } |
169 | }; | 163 | }; |
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c index 28041e83dc82..1a6f85777449 100644 --- a/arch/arm/mach-s3c64xx/clock.c +++ b/arch/arm/mach-s3c64xx/clock.c | |||
@@ -138,11 +138,7 @@ static struct clk init_clocks_off[] = { | |||
138 | .ctrlbit = S3C_CLKCON_PCLK_TSADC, | 138 | .ctrlbit = S3C_CLKCON_PCLK_TSADC, |
139 | }, { | 139 | }, { |
140 | .name = "i2c", | 140 | .name = "i2c", |
141 | #ifdef CONFIG_S3C_DEV_I2C1 | ||
142 | .devname = "s3c2440-i2c.0", | 141 | .devname = "s3c2440-i2c.0", |
143 | #else | ||
144 | .devname = "s3c2440-i2c", | ||
145 | #endif | ||
146 | .parent = &clk_p, | 142 | .parent = &clk_p, |
147 | .enable = s3c64xx_pclk_ctrl, | 143 | .enable = s3c64xx_pclk_ctrl, |
148 | .ctrlbit = S3C_CLKCON_PCLK_IIC, | 144 | .ctrlbit = S3C_CLKCON_PCLK_IIC, |
@@ -319,10 +315,6 @@ static struct clk init_clocks_off[] = { | |||
319 | .enable = s3c64xx_sclk_ctrl, | 315 | .enable = s3c64xx_sclk_ctrl, |
320 | .ctrlbit = S3C_CLKCON_SCLK_MFC, | 316 | .ctrlbit = S3C_CLKCON_SCLK_MFC, |
321 | }, { | 317 | }, { |
322 | .name = "cam", | ||
323 | .enable = s3c64xx_sclk_ctrl, | ||
324 | .ctrlbit = S3C_CLKCON_SCLK_CAM, | ||
325 | }, { | ||
326 | .name = "sclk_jpeg", | 318 | .name = "sclk_jpeg", |
327 | .enable = s3c64xx_sclk_ctrl, | 319 | .enable = s3c64xx_sclk_ctrl, |
328 | .ctrlbit = S3C_CLKCON_SCLK_JPEG, | 320 | .ctrlbit = S3C_CLKCON_SCLK_JPEG, |
@@ -681,15 +673,6 @@ static struct clksrc_sources clkset_audio2 = { | |||
681 | .nr_sources = ARRAY_SIZE(clkset_audio2_list), | 673 | .nr_sources = ARRAY_SIZE(clkset_audio2_list), |
682 | }; | 674 | }; |
683 | 675 | ||
684 | static struct clk *clkset_camif_list[] = { | ||
685 | &clk_h2, | ||
686 | }; | ||
687 | |||
688 | static struct clksrc_sources clkset_camif = { | ||
689 | .sources = clkset_camif_list, | ||
690 | .nr_sources = ARRAY_SIZE(clkset_camif_list), | ||
691 | }; | ||
692 | |||
693 | static struct clksrc_clk clksrcs[] = { | 676 | static struct clksrc_clk clksrcs[] = { |
694 | { | 677 | { |
695 | .clk = { | 678 | .clk = { |
@@ -744,10 +727,9 @@ static struct clksrc_clk clksrcs[] = { | |||
744 | .name = "camera", | 727 | .name = "camera", |
745 | .ctrlbit = S3C_CLKCON_SCLK_CAM, | 728 | .ctrlbit = S3C_CLKCON_SCLK_CAM, |
746 | .enable = s3c64xx_sclk_ctrl, | 729 | .enable = s3c64xx_sclk_ctrl, |
730 | .parent = &clk_h2, | ||
747 | }, | 731 | }, |
748 | .reg_div = { .reg = S3C_CLK_DIV0, .shift = 20, .size = 4 }, | 732 | .reg_div = { .reg = S3C_CLK_DIV0, .shift = 20, .size = 4 }, |
749 | .reg_src = { .reg = NULL, .shift = 0, .size = 0 }, | ||
750 | .sources = &clkset_camif, | ||
751 | }, | 733 | }, |
752 | }; | 734 | }; |
753 | 735 | ||
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index be746e33e86c..aef303b8997e 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c | |||
@@ -155,7 +155,6 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) | |||
155 | /* initialise the io descriptors we need for initialisation */ | 155 | /* initialise the io descriptors we need for initialisation */ |
156 | iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); | 156 | iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); |
157 | iotable_init(mach_desc, size); | 157 | iotable_init(mach_desc, size); |
158 | init_consistent_dma_size(SZ_8M); | ||
159 | 158 | ||
160 | /* detect cpu id */ | 159 | /* detect cpu id */ |
161 | s3c64xx_init_cpu(); | 160 | s3c64xx_init_cpu(); |
diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c index 111e404a81fd..8ae5800e807f 100644 --- a/arch/arm/mach-s5p64x0/common.c +++ b/arch/arm/mach-s5p64x0/common.c | |||
@@ -187,7 +187,6 @@ void __init s5p6440_map_io(void) | |||
187 | s5p6440_default_sdhci2(); | 187 | s5p6440_default_sdhci2(); |
188 | 188 | ||
189 | iotable_init(s5p6440_iodesc, ARRAY_SIZE(s5p6440_iodesc)); | 189 | iotable_init(s5p6440_iodesc, ARRAY_SIZE(s5p6440_iodesc)); |
190 | init_consistent_dma_size(SZ_8M); | ||
191 | } | 190 | } |
192 | 191 | ||
193 | void __init s5p6450_map_io(void) | 192 | void __init s5p6450_map_io(void) |
@@ -202,7 +201,6 @@ void __init s5p6450_map_io(void) | |||
202 | s5p6450_default_sdhci2(); | 201 | s5p6450_default_sdhci2(); |
203 | 202 | ||
204 | iotable_init(s5p6450_iodesc, ARRAY_SIZE(s5p6450_iodesc)); | 203 | iotable_init(s5p6450_iodesc, ARRAY_SIZE(s5p6450_iodesc)); |
205 | init_consistent_dma_size(SZ_8M); | ||
206 | } | 204 | } |
207 | 205 | ||
208 | /* | 206 | /* |
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c index a0c50efe8145..9dfe93e2624d 100644 --- a/arch/arm/mach-s5pv210/common.c +++ b/arch/arm/mach-s5pv210/common.c | |||
@@ -169,8 +169,6 @@ void __init s5pv210_init_io(struct map_desc *mach_desc, int size) | |||
169 | 169 | ||
170 | void __init s5pv210_map_io(void) | 170 | void __init s5pv210_map_io(void) |
171 | { | 171 | { |
172 | init_consistent_dma_size(14 << 20); | ||
173 | |||
174 | /* initialise device information early */ | 172 | /* initialise device information early */ |
175 | s5pv210_default_sdhci0(); | 173 | s5pv210_default_sdhci0(); |
176 | s5pv210_default_sdhci1(); | 174 | s5pv210_default_sdhci1(); |
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index 55e1dba4ffde..c72b31078c99 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c | |||
@@ -774,7 +774,6 @@ static void __init goni_pmic_init(void) | |||
774 | /* MoviNAND */ | 774 | /* MoviNAND */ |
775 | static struct s3c_sdhci_platdata goni_hsmmc0_data __initdata = { | 775 | static struct s3c_sdhci_platdata goni_hsmmc0_data __initdata = { |
776 | .max_width = 4, | 776 | .max_width = 4, |
777 | .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE, | ||
778 | .cd_type = S3C_SDHCI_CD_PERMANENT, | 777 | .cd_type = S3C_SDHCI_CD_PERMANENT, |
779 | }; | 778 | }; |
780 | 779 | ||
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 11bb1d984197..96f11394c7c0 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -66,12 +66,6 @@ static struct map_desc r8a7740_io_desc[] __initdata = { | |||
66 | void __init r8a7740_map_io(void) | 66 | void __init r8a7740_map_io(void) |
67 | { | 67 | { |
68 | iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc)); | 68 | iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc)); |
69 | |||
70 | /* | ||
71 | * DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't | ||
72 | * enough to allocate the frame buffer memory. | ||
73 | */ | ||
74 | init_consistent_dma_size(12 << 20); | ||
75 | } | 69 | } |
76 | 70 | ||
77 | /* SCIFA0 */ | 71 | /* SCIFA0 */ |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index a07954fbcd22..be6f746c97fa 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -58,12 +58,6 @@ static struct map_desc sh7372_io_desc[] __initdata = { | |||
58 | void __init sh7372_map_io(void) | 58 | void __init sh7372_map_io(void) |
59 | { | 59 | { |
60 | iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc)); | 60 | iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc)); |
61 | |||
62 | /* | ||
63 | * DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't | ||
64 | * enough to allocate the frame buffer memory. | ||
65 | */ | ||
66 | init_consistent_dma_size(12 << 20); | ||
67 | } | 61 | } |
68 | 62 | ||
69 | /* SCIFA0 */ | 63 | /* SCIFA0 */ |
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index b8efac4daed8..d8632ebb1eaf 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
@@ -82,8 +82,6 @@ static struct map_desc u300_io_desc[] __initdata = { | |||
82 | static void __init u300_map_io(void) | 82 | static void __init u300_map_io(void) |
83 | { | 83 | { |
84 | iotable_init(u300_io_desc, ARRAY_SIZE(u300_io_desc)); | 84 | iotable_init(u300_io_desc, ARRAY_SIZE(u300_io_desc)); |
85 | /* We enable a real big DMA buffer if need be. */ | ||
86 | init_consistent_dma_size(SZ_4M); | ||
87 | } | 85 | } |
88 | 86 | ||
89 | /* | 87 | /* |
diff --git a/arch/arm/mach-vt8500/include/mach/hardware.h b/arch/arm/mach-vt8500/include/mach/hardware.h deleted file mode 100644 index db4163f72c39..000000000000 --- a/arch/arm/mach-vt8500/include/mach/hardware.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | /* arch/arm/mach-vt8500/include/mach/hardware.h | ||
2 | * | ||
3 | * This software is licensed under the terms of the GNU General Public | ||
4 | * License version 2, as published by the Free Software Foundation, and | ||
5 | * may be copied, distributed, and modified under those terms. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | */ | ||
diff --git a/arch/arm/mach-vt8500/include/mach/i8042.h b/arch/arm/mach-vt8500/include/mach/i8042.h deleted file mode 100644 index cd7143cad6f3..000000000000 --- a/arch/arm/mach-vt8500/include/mach/i8042.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* arch/arm/mach-vt8500/include/mach/i8042.h | ||
2 | * | ||
3 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | extern unsigned long wmt_i8042_base __initdata; | ||
17 | extern int wmt_i8042_kbd_irq; | ||
18 | extern int wmt_i8042_aux_irq; | ||
diff --git a/arch/arm/mach-vt8500/include/mach/restart.h b/arch/arm/mach-vt8500/include/mach/restart.h deleted file mode 100644 index 738979518acb..000000000000 --- a/arch/arm/mach-vt8500/include/mach/restart.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-vt8500/restart.h | ||
2 | * | ||
3 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | void vt8500_setup_restart(void); | ||
17 | void vt8500_restart(char mode, const char *cmd); | ||
diff --git a/arch/arm/mach-vt8500/timer.c b/arch/arm/mach-vt8500/timer.c index 050e1833f2d0..3dd21a47881f 100644 --- a/arch/arm/mach-vt8500/timer.c +++ b/arch/arm/mach-vt8500/timer.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-vt8500/timer_dt.c | 2 | * arch/arm/mach-vt8500/timer.c |
3 | * | 3 | * |
4 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> | 4 | * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz> |
5 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | 5 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> |
diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c index 8d3871f110a5..a5bd28692b06 100644 --- a/arch/arm/mach-vt8500/vt8500.c +++ b/arch/arm/mach-vt8500/vt8500.c | |||
@@ -31,8 +31,6 @@ | |||
31 | #include <linux/of_irq.h> | 31 | #include <linux/of_irq.h> |
32 | #include <linux/of_platform.h> | 32 | #include <linux/of_platform.h> |
33 | 33 | ||
34 | #include <mach/restart.h> | ||
35 | |||
36 | #include "common.h" | 34 | #include "common.h" |
37 | 35 | ||
38 | #define LEGACY_GPIO_BASE 0xD8110000 | 36 | #define LEGACY_GPIO_BASE 0xD8110000 |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index 82fcb206b5b2..665870dce3c8 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -154,6 +154,12 @@ config OMAP_32K_TIMER | |||
154 | intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is | 154 | intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is |
155 | currently only available for OMAP16XX, 24XX, 34XX and OMAP4/5. | 155 | currently only available for OMAP16XX, 24XX, 34XX and OMAP4/5. |
156 | 156 | ||
157 | On OMAP2PLUS this value is only used for CONFIG_HZ and | ||
158 | CLOCK_TICK_RATE compile time calculation. | ||
159 | The actual timer selection is done in the board file | ||
160 | through the (DT_)MACHINE_START structure. | ||
161 | |||
162 | |||
157 | config OMAP3_L2_AUX_SECURE_SAVE_RESTORE | 163 | config OMAP3_L2_AUX_SECURE_SAVE_RESTORE |
158 | bool "OMAP3 HS/EMU save and restore for L2 AUX control register" | 164 | bool "OMAP3 HS/EMU save and restore for L2 AUX control register" |
159 | depends on ARCH_OMAP3 && PM | 165 | depends on ARCH_OMAP3 && PM |
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c index c43ea21f33b4..aa7ebc6bcd65 100644 --- a/arch/arm/plat-omap/debug-leds.c +++ b/arch/arm/plat-omap/debug-leds.c | |||
@@ -111,7 +111,7 @@ static int fpga_probe(struct platform_device *pdev) | |||
111 | if (!iomem) | 111 | if (!iomem) |
112 | return -ENODEV; | 112 | return -ENODEV; |
113 | 113 | ||
114 | fpga = ioremap(iomem->start, H2P2_DBG_FPGA_SIZE); | 114 | fpga = ioremap(iomem->start, resource_size(iomem)); |
115 | __raw_writew(0xff, &fpga->leds); | 115 | __raw_writew(0xff, &fpga->leds); |
116 | 116 | ||
117 | for (i = 0; i < ARRAY_SIZE(dbg_leds); i++) { | 117 | for (i = 0; i < ARRAY_SIZE(dbg_leds); i++) { |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 9dca23e4d6b0..89585c293554 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -35,6 +35,7 @@ | |||
35 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 35 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/clk.h> | ||
38 | #include <linux/module.h> | 39 | #include <linux/module.h> |
39 | #include <linux/io.h> | 40 | #include <linux/io.h> |
40 | #include <linux/device.h> | 41 | #include <linux/device.h> |
@@ -42,6 +43,8 @@ | |||
42 | #include <linux/pm_runtime.h> | 43 | #include <linux/pm_runtime.h> |
43 | #include <linux/of.h> | 44 | #include <linux/of.h> |
44 | #include <linux/of_device.h> | 45 | #include <linux/of_device.h> |
46 | #include <linux/platform_device.h> | ||
47 | #include <linux/platform_data/dmtimer-omap.h> | ||
45 | 48 | ||
46 | #include <plat/dmtimer.h> | 49 | #include <plat/dmtimer.h> |
47 | 50 | ||
@@ -83,10 +86,6 @@ static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg, | |||
83 | 86 | ||
84 | static void omap_timer_restore_context(struct omap_dm_timer *timer) | 87 | static void omap_timer_restore_context(struct omap_dm_timer *timer) |
85 | { | 88 | { |
86 | if (timer->revision == 1) | ||
87 | __raw_writel(timer->context.tistat, timer->sys_stat); | ||
88 | |||
89 | __raw_writel(timer->context.tisr, timer->irq_stat); | ||
90 | omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, | 89 | omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, |
91 | timer->context.twer); | 90 | timer->context.twer); |
92 | omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, | 91 | omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, |
@@ -102,39 +101,38 @@ static void omap_timer_restore_context(struct omap_dm_timer *timer) | |||
102 | timer->context.tclr); | 101 | timer->context.tclr); |
103 | } | 102 | } |
104 | 103 | ||
105 | static void omap_dm_timer_wait_for_reset(struct omap_dm_timer *timer) | 104 | static int omap_dm_timer_reset(struct omap_dm_timer *timer) |
106 | { | 105 | { |
107 | int c; | 106 | u32 l, timeout = 100000; |
108 | 107 | ||
109 | if (!timer->sys_stat) | 108 | if (timer->revision != 1) |
110 | return; | 109 | return -EINVAL; |
111 | 110 | ||
112 | c = 0; | 111 | omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06); |
113 | while (!(__raw_readl(timer->sys_stat) & 1)) { | ||
114 | c++; | ||
115 | if (c > 100000) { | ||
116 | printk(KERN_ERR "Timer failed to reset\n"); | ||
117 | return; | ||
118 | } | ||
119 | } | ||
120 | } | ||
121 | 112 | ||
122 | static void omap_dm_timer_reset(struct omap_dm_timer *timer) | 113 | do { |
123 | { | 114 | l = __omap_dm_timer_read(timer, |
124 | omap_dm_timer_enable(timer); | 115 | OMAP_TIMER_V1_SYS_STAT_OFFSET, 0); |
125 | if (timer->pdev->id != 1) { | 116 | } while (!l && timeout--); |
126 | omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06); | 117 | |
127 | omap_dm_timer_wait_for_reset(timer); | 118 | if (!timeout) { |
119 | dev_err(&timer->pdev->dev, "Timer failed to reset\n"); | ||
120 | return -ETIMEDOUT; | ||
128 | } | 121 | } |
129 | 122 | ||
130 | __omap_dm_timer_reset(timer, 0, 0); | 123 | /* Configure timer for smart-idle mode */ |
131 | omap_dm_timer_disable(timer); | 124 | l = __omap_dm_timer_read(timer, OMAP_TIMER_OCP_CFG_OFFSET, 0); |
132 | timer->posted = 1; | 125 | l |= 0x2 << 0x3; |
126 | __omap_dm_timer_write(timer, OMAP_TIMER_OCP_CFG_OFFSET, l, 0); | ||
127 | |||
128 | timer->posted = 0; | ||
129 | |||
130 | return 0; | ||
133 | } | 131 | } |
134 | 132 | ||
135 | int omap_dm_timer_prepare(struct omap_dm_timer *timer) | 133 | static int omap_dm_timer_prepare(struct omap_dm_timer *timer) |
136 | { | 134 | { |
137 | int ret; | 135 | int rc; |
138 | 136 | ||
139 | /* | 137 | /* |
140 | * FIXME: OMAP1 devices do not use the clock framework for dmtimers so | 138 | * FIXME: OMAP1 devices do not use the clock framework for dmtimers so |
@@ -149,13 +147,20 @@ int omap_dm_timer_prepare(struct omap_dm_timer *timer) | |||
149 | } | 147 | } |
150 | } | 148 | } |
151 | 149 | ||
152 | if (timer->capability & OMAP_TIMER_NEEDS_RESET) | 150 | omap_dm_timer_enable(timer); |
153 | omap_dm_timer_reset(timer); | ||
154 | 151 | ||
155 | ret = omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ); | 152 | if (timer->capability & OMAP_TIMER_NEEDS_RESET) { |
153 | rc = omap_dm_timer_reset(timer); | ||
154 | if (rc) { | ||
155 | omap_dm_timer_disable(timer); | ||
156 | return rc; | ||
157 | } | ||
158 | } | ||
156 | 159 | ||
157 | timer->posted = 1; | 160 | __omap_dm_timer_enable_posted(timer); |
158 | return ret; | 161 | omap_dm_timer_disable(timer); |
162 | |||
163 | return omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ); | ||
159 | } | 164 | } |
160 | 165 | ||
161 | static inline u32 omap_dm_timer_reserved_systimer(int id) | 166 | static inline u32 omap_dm_timer_reserved_systimer(int id) |
@@ -449,7 +454,6 @@ int omap_dm_timer_stop(struct omap_dm_timer *timer) | |||
449 | */ | 454 | */ |
450 | timer->context.tclr = | 455 | timer->context.tclr = |
451 | omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); | 456 | omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); |
452 | timer->context.tisr = __raw_readl(timer->irq_stat); | ||
453 | omap_dm_timer_disable(timer); | 457 | omap_dm_timer_disable(timer); |
454 | return 0; | 458 | return 0; |
455 | } | 459 | } |
@@ -459,7 +463,7 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) | |||
459 | { | 463 | { |
460 | int ret; | 464 | int ret; |
461 | char *parent_name = NULL; | 465 | char *parent_name = NULL; |
462 | struct clk *fclk, *parent; | 466 | struct clk *parent; |
463 | struct dmtimer_platform_data *pdata; | 467 | struct dmtimer_platform_data *pdata; |
464 | 468 | ||
465 | if (unlikely(!timer)) | 469 | if (unlikely(!timer)) |
@@ -478,11 +482,8 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) | |||
478 | if (pdata && pdata->set_timer_src) | 482 | if (pdata && pdata->set_timer_src) |
479 | return pdata->set_timer_src(timer->pdev, source); | 483 | return pdata->set_timer_src(timer->pdev, source); |
480 | 484 | ||
481 | fclk = clk_get(&timer->pdev->dev, "fck"); | 485 | if (!timer->fclk) |
482 | if (IS_ERR_OR_NULL(fclk)) { | ||
483 | pr_err("%s: fck not found\n", __func__); | ||
484 | return -EINVAL; | 486 | return -EINVAL; |
485 | } | ||
486 | 487 | ||
487 | switch (source) { | 488 | switch (source) { |
488 | case OMAP_TIMER_SRC_SYS_CLK: | 489 | case OMAP_TIMER_SRC_SYS_CLK: |
@@ -501,18 +502,15 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) | |||
501 | parent = clk_get(&timer->pdev->dev, parent_name); | 502 | parent = clk_get(&timer->pdev->dev, parent_name); |
502 | if (IS_ERR_OR_NULL(parent)) { | 503 | if (IS_ERR_OR_NULL(parent)) { |
503 | pr_err("%s: %s not found\n", __func__, parent_name); | 504 | pr_err("%s: %s not found\n", __func__, parent_name); |
504 | ret = -EINVAL; | 505 | return -EINVAL; |
505 | goto out; | ||
506 | } | 506 | } |
507 | 507 | ||
508 | ret = clk_set_parent(fclk, parent); | 508 | ret = clk_set_parent(timer->fclk, parent); |
509 | if (IS_ERR_VALUE(ret)) | 509 | if (IS_ERR_VALUE(ret)) |
510 | pr_err("%s: failed to set %s as parent\n", __func__, | 510 | pr_err("%s: failed to set %s as parent\n", __func__, |
511 | parent_name); | 511 | parent_name); |
512 | 512 | ||
513 | clk_put(parent); | 513 | clk_put(parent); |
514 | out: | ||
515 | clk_put(fclk); | ||
516 | 514 | ||
517 | return ret; | 515 | return ret; |
518 | } | 516 | } |
@@ -595,8 +593,8 @@ int omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, | |||
595 | l |= OMAP_TIMER_CTRL_CE; | 593 | l |= OMAP_TIMER_CTRL_CE; |
596 | else | 594 | else |
597 | l &= ~OMAP_TIMER_CTRL_CE; | 595 | l &= ~OMAP_TIMER_CTRL_CE; |
598 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | ||
599 | omap_dm_timer_write_reg(timer, OMAP_TIMER_MATCH_REG, match); | 596 | omap_dm_timer_write_reg(timer, OMAP_TIMER_MATCH_REG, match); |
597 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | ||
600 | 598 | ||
601 | /* Save the context */ | 599 | /* Save the context */ |
602 | timer->context.tclr = l; | 600 | timer->context.tclr = l; |
@@ -672,6 +670,37 @@ int omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, | |||
672 | } | 670 | } |
673 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_enable); | 671 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_enable); |
674 | 672 | ||
673 | /** | ||
674 | * omap_dm_timer_set_int_disable - disable timer interrupts | ||
675 | * @timer: pointer to timer handle | ||
676 | * @mask: bit mask of interrupts to be disabled | ||
677 | * | ||
678 | * Disables the specified timer interrupts for a timer. | ||
679 | */ | ||
680 | int omap_dm_timer_set_int_disable(struct omap_dm_timer *timer, u32 mask) | ||
681 | { | ||
682 | u32 l = mask; | ||
683 | |||
684 | if (unlikely(!timer)) | ||
685 | return -EINVAL; | ||
686 | |||
687 | omap_dm_timer_enable(timer); | ||
688 | |||
689 | if (timer->revision == 1) | ||
690 | l = __raw_readl(timer->irq_ena) & ~mask; | ||
691 | |||
692 | __raw_writel(l, timer->irq_dis); | ||
693 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_WAKEUP_EN_REG) & ~mask; | ||
694 | omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, l); | ||
695 | |||
696 | /* Save the context */ | ||
697 | timer->context.tier &= ~mask; | ||
698 | timer->context.twer &= ~mask; | ||
699 | omap_dm_timer_disable(timer); | ||
700 | return 0; | ||
701 | } | ||
702 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_disable); | ||
703 | |||
675 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) | 704 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) |
676 | { | 705 | { |
677 | unsigned int l; | 706 | unsigned int l; |
@@ -693,8 +722,7 @@ int omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value) | |||
693 | return -EINVAL; | 722 | return -EINVAL; |
694 | 723 | ||
695 | __omap_dm_timer_write_status(timer, value); | 724 | __omap_dm_timer_write_status(timer, value); |
696 | /* Save the context */ | 725 | |
697 | timer->context.tisr = value; | ||
698 | return 0; | 726 | return 0; |
699 | } | 727 | } |
700 | EXPORT_SYMBOL_GPL(omap_dm_timer_write_status); | 728 | EXPORT_SYMBOL_GPL(omap_dm_timer_write_status); |
@@ -797,6 +825,7 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev) | |||
797 | timer->capability |= OMAP_TIMER_SECURE; | 825 | timer->capability |= OMAP_TIMER_SECURE; |
798 | } else { | 826 | } else { |
799 | timer->id = pdev->id; | 827 | timer->id = pdev->id; |
828 | timer->errata = pdata->timer_errata; | ||
800 | timer->capability = pdata->timer_capability; | 829 | timer->capability = pdata->timer_capability; |
801 | timer->reserved = omap_dm_timer_reserved_systimer(timer->id); | 830 | timer->reserved = omap_dm_timer_reserved_systimer(timer->id); |
802 | timer->get_context_loss_count = pdata->get_context_loss_count; | 831 | timer->get_context_loss_count = pdata->get_context_loss_count; |
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h index f8943c8f9dbf..a3fbc48c332e 100644 --- a/arch/arm/plat-omap/include/plat/dmtimer.h +++ b/arch/arm/plat-omap/include/plat/dmtimer.h | |||
@@ -32,7 +32,6 @@ | |||
32 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 32 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/clk.h> | ||
36 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
37 | #include <linux/io.h> | 36 | #include <linux/io.h> |
38 | #include <linux/platform_device.h> | 37 | #include <linux/platform_device.h> |
@@ -55,6 +54,10 @@ | |||
55 | #define OMAP_TIMER_TRIGGER_OVERFLOW 0x01 | 54 | #define OMAP_TIMER_TRIGGER_OVERFLOW 0x01 |
56 | #define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02 | 55 | #define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02 |
57 | 56 | ||
57 | /* posted mode types */ | ||
58 | #define OMAP_TIMER_NONPOSTED 0x00 | ||
59 | #define OMAP_TIMER_POSTED 0x01 | ||
60 | |||
58 | /* timer capabilities used in hwmod database */ | 61 | /* timer capabilities used in hwmod database */ |
59 | #define OMAP_TIMER_SECURE 0x80000000 | 62 | #define OMAP_TIMER_SECURE 0x80000000 |
60 | #define OMAP_TIMER_ALWON 0x40000000 | 63 | #define OMAP_TIMER_ALWON 0x40000000 |
@@ -62,16 +65,22 @@ | |||
62 | #define OMAP_TIMER_NEEDS_RESET 0x10000000 | 65 | #define OMAP_TIMER_NEEDS_RESET 0x10000000 |
63 | #define OMAP_TIMER_HAS_DSP_IRQ 0x08000000 | 66 | #define OMAP_TIMER_HAS_DSP_IRQ 0x08000000 |
64 | 67 | ||
68 | /* | ||
69 | * timer errata flags | ||
70 | * | ||
71 | * Errata i103/i767 impacts all OMAP3/4/5 devices including AM33xx. This | ||
72 | * errata prevents us from using posted mode on these devices, unless the | ||
73 | * timer counter register is never read. For more details please refer to | ||
74 | * the OMAP3/4/5 errata documents. | ||
75 | */ | ||
76 | #define OMAP_TIMER_ERRATA_I103_I767 0x80000000 | ||
77 | |||
65 | struct omap_timer_capability_dev_attr { | 78 | struct omap_timer_capability_dev_attr { |
66 | u32 timer_capability; | 79 | u32 timer_capability; |
67 | }; | 80 | }; |
68 | 81 | ||
69 | struct omap_dm_timer; | ||
70 | |||
71 | struct timer_regs { | 82 | struct timer_regs { |
72 | u32 tidr; | 83 | u32 tidr; |
73 | u32 tistat; | ||
74 | u32 tisr; | ||
75 | u32 tier; | 84 | u32 tier; |
76 | u32 twer; | 85 | u32 twer; |
77 | u32 tclr; | 86 | u32 tclr; |
@@ -90,11 +99,29 @@ struct timer_regs { | |||
90 | u32 towr; | 99 | u32 towr; |
91 | }; | 100 | }; |
92 | 101 | ||
93 | struct dmtimer_platform_data { | 102 | struct omap_dm_timer { |
94 | /* set_timer_src - Only used for OMAP1 devices */ | 103 | int id; |
95 | int (*set_timer_src)(struct platform_device *pdev, int source); | 104 | int irq; |
96 | u32 timer_capability; | 105 | struct clk *fclk; |
106 | |||
107 | void __iomem *io_base; | ||
108 | void __iomem *irq_stat; /* TISR/IRQSTATUS interrupt status */ | ||
109 | void __iomem *irq_ena; /* irq enable */ | ||
110 | void __iomem *irq_dis; /* irq disable, only on v2 ip */ | ||
111 | void __iomem *pend; /* write pending */ | ||
112 | void __iomem *func_base; /* function register base */ | ||
113 | |||
114 | unsigned long rate; | ||
115 | unsigned reserved:1; | ||
116 | unsigned posted:1; | ||
117 | struct timer_regs context; | ||
97 | int (*get_context_loss_count)(struct device *); | 118 | int (*get_context_loss_count)(struct device *); |
119 | int ctx_loss_count; | ||
120 | int revision; | ||
121 | u32 capability; | ||
122 | u32 errata; | ||
123 | struct platform_device *pdev; | ||
124 | struct list_head node; | ||
98 | }; | 125 | }; |
99 | 126 | ||
100 | int omap_dm_timer_reserve_systimer(int id); | 127 | int omap_dm_timer_reserve_systimer(int id); |
@@ -122,6 +149,7 @@ int omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, int toggle, i | |||
122 | int omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler); | 149 | int omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler); |
123 | 150 | ||
124 | int omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value); | 151 | int omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value); |
152 | int omap_dm_timer_set_int_disable(struct omap_dm_timer *timer, u32 mask); | ||
125 | 153 | ||
126 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer); | 154 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer); |
127 | int omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value); | 155 | int omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value); |
@@ -247,34 +275,6 @@ int omap_dm_timers_active(void); | |||
247 | #define OMAP_TIMER_TICK_INT_MASK_COUNT_REG \ | 275 | #define OMAP_TIMER_TICK_INT_MASK_COUNT_REG \ |
248 | (_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT)) | 276 | (_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT)) |
249 | 277 | ||
250 | struct omap_dm_timer { | ||
251 | unsigned long phys_base; | ||
252 | int id; | ||
253 | int irq; | ||
254 | struct clk *fclk; | ||
255 | |||
256 | void __iomem *io_base; | ||
257 | void __iomem *sys_stat; /* TISTAT timer status */ | ||
258 | void __iomem *irq_stat; /* TISR/IRQSTATUS interrupt status */ | ||
259 | void __iomem *irq_ena; /* irq enable */ | ||
260 | void __iomem *irq_dis; /* irq disable, only on v2 ip */ | ||
261 | void __iomem *pend; /* write pending */ | ||
262 | void __iomem *func_base; /* function register base */ | ||
263 | |||
264 | unsigned long rate; | ||
265 | unsigned reserved:1; | ||
266 | unsigned posted:1; | ||
267 | struct timer_regs context; | ||
268 | int (*get_context_loss_count)(struct device *); | ||
269 | int ctx_loss_count; | ||
270 | int revision; | ||
271 | u32 capability; | ||
272 | struct platform_device *pdev; | ||
273 | struct list_head node; | ||
274 | }; | ||
275 | |||
276 | int omap_dm_timer_prepare(struct omap_dm_timer *timer); | ||
277 | |||
278 | static inline u32 __omap_dm_timer_read(struct omap_dm_timer *timer, u32 reg, | 278 | static inline u32 __omap_dm_timer_read(struct omap_dm_timer *timer, u32 reg, |
279 | int posted) | 279 | int posted) |
280 | { | 280 | { |
@@ -303,16 +303,13 @@ static inline void __omap_dm_timer_init_regs(struct omap_dm_timer *timer) | |||
303 | tidr = __raw_readl(timer->io_base); | 303 | tidr = __raw_readl(timer->io_base); |
304 | if (!(tidr >> 16)) { | 304 | if (!(tidr >> 16)) { |
305 | timer->revision = 1; | 305 | timer->revision = 1; |
306 | timer->sys_stat = timer->io_base + | ||
307 | OMAP_TIMER_V1_SYS_STAT_OFFSET; | ||
308 | timer->irq_stat = timer->io_base + OMAP_TIMER_V1_STAT_OFFSET; | 306 | timer->irq_stat = timer->io_base + OMAP_TIMER_V1_STAT_OFFSET; |
309 | timer->irq_ena = timer->io_base + OMAP_TIMER_V1_INT_EN_OFFSET; | 307 | timer->irq_ena = timer->io_base + OMAP_TIMER_V1_INT_EN_OFFSET; |
310 | timer->irq_dis = NULL; | 308 | timer->irq_dis = timer->io_base + OMAP_TIMER_V1_INT_EN_OFFSET; |
311 | timer->pend = timer->io_base + _OMAP_TIMER_WRITE_PEND_OFFSET; | 309 | timer->pend = timer->io_base + _OMAP_TIMER_WRITE_PEND_OFFSET; |
312 | timer->func_base = timer->io_base; | 310 | timer->func_base = timer->io_base; |
313 | } else { | 311 | } else { |
314 | timer->revision = 2; | 312 | timer->revision = 2; |
315 | timer->sys_stat = NULL; | ||
316 | timer->irq_stat = timer->io_base + OMAP_TIMER_V2_IRQSTATUS; | 313 | timer->irq_stat = timer->io_base + OMAP_TIMER_V2_IRQSTATUS; |
317 | timer->irq_ena = timer->io_base + OMAP_TIMER_V2_IRQENABLE_SET; | 314 | timer->irq_ena = timer->io_base + OMAP_TIMER_V2_IRQENABLE_SET; |
318 | timer->irq_dis = timer->io_base + OMAP_TIMER_V2_IRQENABLE_CLR; | 315 | timer->irq_dis = timer->io_base + OMAP_TIMER_V2_IRQENABLE_CLR; |
@@ -323,45 +320,44 @@ static inline void __omap_dm_timer_init_regs(struct omap_dm_timer *timer) | |||
323 | } | 320 | } |
324 | } | 321 | } |
325 | 322 | ||
326 | /* Assumes the source clock has been set by caller */ | 323 | /* |
327 | static inline void __omap_dm_timer_reset(struct omap_dm_timer *timer, | 324 | * __omap_dm_timer_enable_posted - enables write posted mode |
328 | int autoidle, int wakeup) | 325 | * @timer: pointer to timer instance handle |
326 | * | ||
327 | * Enables the write posted mode for the timer. When posted mode is enabled | ||
328 | * writes to certain timer registers are immediately acknowledged by the | ||
329 | * internal bus and hence prevents stalling the CPU waiting for the write to | ||
330 | * complete. Enabling this feature can improve performance for writing to the | ||
331 | * timer registers. | ||
332 | */ | ||
333 | static inline void __omap_dm_timer_enable_posted(struct omap_dm_timer *timer) | ||
329 | { | 334 | { |
330 | u32 l; | 335 | if (timer->posted) |
336 | return; | ||
331 | 337 | ||
332 | l = __raw_readl(timer->io_base + OMAP_TIMER_OCP_CFG_OFFSET); | 338 | if (timer->errata & OMAP_TIMER_ERRATA_I103_I767) |
333 | l |= 0x02 << 3; /* Set to smart-idle mode */ | 339 | return; |
334 | l |= 0x2 << 8; /* Set clock activity to perserve f-clock on idle */ | ||
335 | 340 | ||
336 | if (autoidle) | ||
337 | l |= 0x1 << 0; | ||
338 | |||
339 | if (wakeup) | ||
340 | l |= 1 << 2; | ||
341 | |||
342 | __raw_writel(l, timer->io_base + OMAP_TIMER_OCP_CFG_OFFSET); | ||
343 | |||
344 | /* Match hardware reset default of posted mode */ | ||
345 | __omap_dm_timer_write(timer, OMAP_TIMER_IF_CTRL_REG, | 341 | __omap_dm_timer_write(timer, OMAP_TIMER_IF_CTRL_REG, |
346 | OMAP_TIMER_CTRL_POSTED, 0); | 342 | OMAP_TIMER_CTRL_POSTED, 0); |
343 | timer->context.tsicr = OMAP_TIMER_CTRL_POSTED; | ||
344 | timer->posted = OMAP_TIMER_POSTED; | ||
347 | } | 345 | } |
348 | 346 | ||
349 | static inline int __omap_dm_timer_set_source(struct clk *timer_fck, | 347 | /** |
350 | struct clk *parent) | 348 | * __omap_dm_timer_override_errata - override errata flags for a timer |
349 | * @timer: pointer to timer handle | ||
350 | * @errata: errata flags to be ignored | ||
351 | * | ||
352 | * For a given timer, override a timer errata by clearing the flags | ||
353 | * specified by the errata argument. A specific erratum should only be | ||
354 | * overridden for a timer if the timer is used in such a way the erratum | ||
355 | * has no impact. | ||
356 | */ | ||
357 | static inline void __omap_dm_timer_override_errata(struct omap_dm_timer *timer, | ||
358 | u32 errata) | ||
351 | { | 359 | { |
352 | int ret; | 360 | timer->errata &= ~errata; |
353 | |||
354 | clk_disable(timer_fck); | ||
355 | ret = clk_set_parent(timer_fck, parent); | ||
356 | clk_enable(timer_fck); | ||
357 | |||
358 | /* | ||
359 | * When the functional clock disappears, too quick writes seem | ||
360 | * to cause an abort. XXX Is this still necessary? | ||
361 | */ | ||
362 | __delay(300000); | ||
363 | |||
364 | return ret; | ||
365 | } | 361 | } |
366 | 362 | ||
367 | static inline void __omap_dm_timer_stop(struct omap_dm_timer *timer, | 363 | static inline void __omap_dm_timer_stop(struct omap_dm_timer *timer, |
diff --git a/arch/arm/plat-pxa/Makefile b/arch/arm/plat-pxa/Makefile index af8e484001e5..1fc941944912 100644 --- a/arch/arm/plat-pxa/Makefile +++ b/arch/arm/plat-pxa/Makefile | |||
@@ -5,7 +5,6 @@ | |||
5 | obj-y := dma.o | 5 | obj-y := dma.o |
6 | 6 | ||
7 | obj-$(CONFIG_PXA3xx) += mfp.o | 7 | obj-$(CONFIG_PXA3xx) += mfp.o |
8 | obj-$(CONFIG_PXA95x) += mfp.o | ||
9 | obj-$(CONFIG_ARCH_MMP) += mfp.o | 8 | obj-$(CONFIG_ARCH_MMP) += mfp.o |
10 | 9 | ||
11 | obj-$(CONFIG_PXA_SSP) += ssp.o | 10 | obj-$(CONFIG_PXA_SSP) += ssp.o |
diff --git a/arch/arm/plat-pxa/include/plat/mfp.h b/arch/arm/plat-pxa/include/plat/mfp.h index 5c79c29f2833..10bc4f3757d1 100644 --- a/arch/arm/plat-pxa/include/plat/mfp.h +++ b/arch/arm/plat-pxa/include/plat/mfp.h | |||
@@ -423,7 +423,7 @@ typedef unsigned long mfp_cfg_t; | |||
423 | ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK | MFP_LPM_STATE_MASK)) |\ | 423 | ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK | MFP_LPM_STATE_MASK)) |\ |
424 | (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv | MFP_LPM_##lpm)) | 424 | (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv | MFP_LPM_##lpm)) |
425 | 425 | ||
426 | #if defined(CONFIG_PXA3xx) || defined(CONFIG_PXA95x) || defined(CONFIG_ARCH_MMP) | 426 | #if defined(CONFIG_PXA3xx) || defined(CONFIG_ARCH_MMP) |
427 | /* | 427 | /* |
428 | * each MFP pin will have a MFPR register, since the offset of the | 428 | * each MFP pin will have a MFPR register, since the offset of the |
429 | * register varies between processors, the processor specific code | 429 | * register varies between processors, the processor specific code |
@@ -470,6 +470,6 @@ void mfp_write(int mfp, unsigned long mfpr_val); | |||
470 | void mfp_config(unsigned long *mfp_cfgs, int num); | 470 | void mfp_config(unsigned long *mfp_cfgs, int num); |
471 | void mfp_config_run(void); | 471 | void mfp_config_run(void); |
472 | void mfp_config_lpm(void); | 472 | void mfp_config_lpm(void); |
473 | #endif /* CONFIG_PXA3xx || CONFIG_PXA95x || CONFIG_ARCH_MMP */ | 473 | #endif /* CONFIG_PXA3xx || CONFIG_ARCH_MMP */ |
474 | 474 | ||
475 | #endif /* __ASM_PLAT_MFP_H */ | 475 | #endif /* __ASM_PLAT_MFP_H */ |
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index b1e05ccff3ac..37542c2689a2 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c | |||
@@ -344,7 +344,7 @@ static int s3c_adc_probe(struct platform_device *pdev) | |||
344 | int ret; | 344 | int ret; |
345 | unsigned tmp; | 345 | unsigned tmp; |
346 | 346 | ||
347 | adc = kzalloc(sizeof(struct adc_device), GFP_KERNEL); | 347 | adc = devm_kzalloc(dev, sizeof(struct adc_device), GFP_KERNEL); |
348 | if (adc == NULL) { | 348 | if (adc == NULL) { |
349 | dev_err(dev, "failed to allocate adc_device\n"); | 349 | dev_err(dev, "failed to allocate adc_device\n"); |
350 | return -ENOMEM; | 350 | return -ENOMEM; |
@@ -355,50 +355,46 @@ static int s3c_adc_probe(struct platform_device *pdev) | |||
355 | adc->pdev = pdev; | 355 | adc->pdev = pdev; |
356 | adc->prescale = S3C2410_ADCCON_PRSCVL(49); | 356 | adc->prescale = S3C2410_ADCCON_PRSCVL(49); |
357 | 357 | ||
358 | adc->vdd = regulator_get(dev, "vdd"); | 358 | adc->vdd = devm_regulator_get(dev, "vdd"); |
359 | if (IS_ERR(adc->vdd)) { | 359 | if (IS_ERR(adc->vdd)) { |
360 | dev_err(dev, "operating without regulator \"vdd\" .\n"); | 360 | dev_err(dev, "operating without regulator \"vdd\" .\n"); |
361 | ret = PTR_ERR(adc->vdd); | 361 | return PTR_ERR(adc->vdd); |
362 | goto err_alloc; | ||
363 | } | 362 | } |
364 | 363 | ||
365 | adc->irq = platform_get_irq(pdev, 1); | 364 | adc->irq = platform_get_irq(pdev, 1); |
366 | if (adc->irq <= 0) { | 365 | if (adc->irq <= 0) { |
367 | dev_err(dev, "failed to get adc irq\n"); | 366 | dev_err(dev, "failed to get adc irq\n"); |
368 | ret = -ENOENT; | 367 | return -ENOENT; |
369 | goto err_reg; | ||
370 | } | 368 | } |
371 | 369 | ||
372 | ret = request_irq(adc->irq, s3c_adc_irq, 0, dev_name(dev), adc); | 370 | ret = devm_request_irq(dev, adc->irq, s3c_adc_irq, 0, dev_name(dev), |
371 | adc); | ||
373 | if (ret < 0) { | 372 | if (ret < 0) { |
374 | dev_err(dev, "failed to attach adc irq\n"); | 373 | dev_err(dev, "failed to attach adc irq\n"); |
375 | goto err_reg; | 374 | return ret; |
376 | } | 375 | } |
377 | 376 | ||
378 | adc->clk = clk_get(dev, "adc"); | 377 | adc->clk = devm_clk_get(dev, "adc"); |
379 | if (IS_ERR(adc->clk)) { | 378 | if (IS_ERR(adc->clk)) { |
380 | dev_err(dev, "failed to get adc clock\n"); | 379 | dev_err(dev, "failed to get adc clock\n"); |
381 | ret = PTR_ERR(adc->clk); | 380 | return PTR_ERR(adc->clk); |
382 | goto err_irq; | ||
383 | } | 381 | } |
384 | 382 | ||
385 | regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 383 | regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
386 | if (!regs) { | 384 | if (!regs) { |
387 | dev_err(dev, "failed to find registers\n"); | 385 | dev_err(dev, "failed to find registers\n"); |
388 | ret = -ENXIO; | 386 | return -ENXIO; |
389 | goto err_clk; | ||
390 | } | 387 | } |
391 | 388 | ||
392 | adc->regs = ioremap(regs->start, resource_size(regs)); | 389 | adc->regs = devm_request_and_ioremap(dev, regs); |
393 | if (!adc->regs) { | 390 | if (!adc->regs) { |
394 | dev_err(dev, "failed to map registers\n"); | 391 | dev_err(dev, "failed to map registers\n"); |
395 | ret = -ENXIO; | 392 | return -ENXIO; |
396 | goto err_clk; | ||
397 | } | 393 | } |
398 | 394 | ||
399 | ret = regulator_enable(adc->vdd); | 395 | ret = regulator_enable(adc->vdd); |
400 | if (ret) | 396 | if (ret) |
401 | goto err_ioremap; | 397 | return ret; |
402 | 398 | ||
403 | clk_enable(adc->clk); | 399 | clk_enable(adc->clk); |
404 | 400 | ||
@@ -418,32 +414,14 @@ static int s3c_adc_probe(struct platform_device *pdev) | |||
418 | adc_dev = adc; | 414 | adc_dev = adc; |
419 | 415 | ||
420 | return 0; | 416 | return 0; |
421 | |||
422 | err_ioremap: | ||
423 | iounmap(adc->regs); | ||
424 | err_clk: | ||
425 | clk_put(adc->clk); | ||
426 | |||
427 | err_irq: | ||
428 | free_irq(adc->irq, adc); | ||
429 | err_reg: | ||
430 | regulator_put(adc->vdd); | ||
431 | err_alloc: | ||
432 | kfree(adc); | ||
433 | return ret; | ||
434 | } | 417 | } |
435 | 418 | ||
436 | static int __devexit s3c_adc_remove(struct platform_device *pdev) | 419 | static int __devexit s3c_adc_remove(struct platform_device *pdev) |
437 | { | 420 | { |
438 | struct adc_device *adc = platform_get_drvdata(pdev); | 421 | struct adc_device *adc = platform_get_drvdata(pdev); |
439 | 422 | ||
440 | iounmap(adc->regs); | ||
441 | free_irq(adc->irq, adc); | ||
442 | clk_disable(adc->clk); | 423 | clk_disable(adc->clk); |
443 | regulator_disable(adc->vdd); | 424 | regulator_disable(adc->vdd); |
444 | regulator_put(adc->vdd); | ||
445 | clk_put(adc->clk); | ||
446 | kfree(adc); | ||
447 | 425 | ||
448 | return 0; | 426 | return 0; |
449 | } | 427 | } |
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 52dfa8f914c7..bc50b20a8ffc 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c | |||
@@ -486,11 +486,7 @@ static struct resource s3c_i2c0_resource[] = { | |||
486 | 486 | ||
487 | struct platform_device s3c_device_i2c0 = { | 487 | struct platform_device s3c_device_i2c0 = { |
488 | .name = "s3c2410-i2c", | 488 | .name = "s3c2410-i2c", |
489 | #ifdef CONFIG_S3C_DEV_I2C1 | ||
490 | .id = 0, | 489 | .id = 0, |
491 | #else | ||
492 | .id = -1, | ||
493 | #endif | ||
494 | .num_resources = ARRAY_SIZE(s3c_i2c0_resource), | 490 | .num_resources = ARRAY_SIZE(s3c_i2c0_resource), |
495 | .resource = s3c_i2c0_resource, | 491 | .resource = s3c_i2c0_resource, |
496 | }; | 492 | }; |