diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-ldp.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 101 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3pandora.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3touchbook.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 28 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-video.c | 109 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock2420_data.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock2430_data.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock3xxx_data.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 58 |
14 files changed, 272 insertions, 51 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index d28e9e5702a0..ea52b034e963 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -119,6 +119,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o | |||
119 | obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ | 119 | obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ |
120 | board-rx51-sdram.o \ | 120 | board-rx51-sdram.o \ |
121 | board-rx51-peripherals.o \ | 121 | board-rx51-peripherals.o \ |
122 | board-rx51-video.o \ | ||
122 | hsmmc.o | 123 | hsmmc.o |
123 | obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom2.o \ | 124 | obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom2.o \ |
124 | board-zoom-peripherals.o \ | 125 | board-zoom-peripherals.o \ |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index e7d629b3c76a..f474a80b8867 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -137,9 +137,7 @@ static void ads7846_dev_init(void) | |||
137 | } | 137 | } |
138 | 138 | ||
139 | gpio_direction_input(ts_gpio); | 139 | gpio_direction_input(ts_gpio); |
140 | 140 | gpio_set_debounce(ts_gpio, 310); | |
141 | omap_set_gpio_debounce(ts_gpio, 1); | ||
142 | omap_set_gpio_debounce_time(ts_gpio, 0xa); | ||
143 | } | 141 | } |
144 | 142 | ||
145 | static int ads7846_get_pendown_state(void) | 143 | static int ads7846_get_pendown_state(void) |
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index 5fcb52e71298..fefd7e6e9779 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -209,8 +209,7 @@ static void ads7846_dev_init(void) | |||
209 | } | 209 | } |
210 | 210 | ||
211 | gpio_direction_input(ts_gpio); | 211 | gpio_direction_input(ts_gpio); |
212 | omap_set_gpio_debounce(ts_gpio, 1); | 212 | gpio_set_debounce(ts_gpio, 310); |
213 | omap_set_gpio_debounce_time(ts_gpio, 0xa); | ||
214 | } | 213 | } |
215 | 214 | ||
216 | static int ads7846_get_pendown_state(void) | 215 | static int ads7846_get_pendown_state(void) |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 962d377970e9..69b154cdc75d 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -39,6 +39,7 @@ | |||
39 | 39 | ||
40 | #include <plat/board.h> | 40 | #include <plat/board.h> |
41 | #include <plat/common.h> | 41 | #include <plat/common.h> |
42 | #include <plat/display.h> | ||
42 | #include <plat/gpmc.h> | 43 | #include <plat/gpmc.h> |
43 | #include <plat/nand.h> | 44 | #include <plat/nand.h> |
44 | #include <plat/usb.h> | 45 | #include <plat/usb.h> |
@@ -106,6 +107,77 @@ static struct platform_device omap3beagle_nand_device = { | |||
106 | .resource = &omap3beagle_nand_resource, | 107 | .resource = &omap3beagle_nand_resource, |
107 | }; | 108 | }; |
108 | 109 | ||
110 | /* DSS */ | ||
111 | |||
112 | static int beagle_enable_dvi(struct omap_dss_device *dssdev) | ||
113 | { | ||
114 | if (gpio_is_valid(dssdev->reset_gpio)) | ||
115 | gpio_set_value(dssdev->reset_gpio, 1); | ||
116 | |||
117 | return 0; | ||
118 | } | ||
119 | |||
120 | static void beagle_disable_dvi(struct omap_dss_device *dssdev) | ||
121 | { | ||
122 | if (gpio_is_valid(dssdev->reset_gpio)) | ||
123 | gpio_set_value(dssdev->reset_gpio, 0); | ||
124 | } | ||
125 | |||
126 | static struct omap_dss_device beagle_dvi_device = { | ||
127 | .type = OMAP_DISPLAY_TYPE_DPI, | ||
128 | .name = "dvi", | ||
129 | .driver_name = "generic_panel", | ||
130 | .phy.dpi.data_lines = 24, | ||
131 | .reset_gpio = 170, | ||
132 | .platform_enable = beagle_enable_dvi, | ||
133 | .platform_disable = beagle_disable_dvi, | ||
134 | }; | ||
135 | |||
136 | static struct omap_dss_device beagle_tv_device = { | ||
137 | .name = "tv", | ||
138 | .driver_name = "venc", | ||
139 | .type = OMAP_DISPLAY_TYPE_VENC, | ||
140 | .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, | ||
141 | }; | ||
142 | |||
143 | static struct omap_dss_device *beagle_dss_devices[] = { | ||
144 | &beagle_dvi_device, | ||
145 | &beagle_tv_device, | ||
146 | }; | ||
147 | |||
148 | static struct omap_dss_board_info beagle_dss_data = { | ||
149 | .num_devices = ARRAY_SIZE(beagle_dss_devices), | ||
150 | .devices = beagle_dss_devices, | ||
151 | .default_device = &beagle_dvi_device, | ||
152 | }; | ||
153 | |||
154 | static struct platform_device beagle_dss_device = { | ||
155 | .name = "omapdss", | ||
156 | .id = -1, | ||
157 | .dev = { | ||
158 | .platform_data = &beagle_dss_data, | ||
159 | }, | ||
160 | }; | ||
161 | |||
162 | static struct regulator_consumer_supply beagle_vdac_supply = | ||
163 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); | ||
164 | |||
165 | static struct regulator_consumer_supply beagle_vdvi_supply = | ||
166 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"); | ||
167 | |||
168 | static void __init beagle_display_init(void) | ||
169 | { | ||
170 | int r; | ||
171 | |||
172 | r = gpio_request(beagle_dvi_device.reset_gpio, "DVI reset"); | ||
173 | if (r < 0) { | ||
174 | printk(KERN_ERR "Unable to get DVI reset GPIO\n"); | ||
175 | return; | ||
176 | } | ||
177 | |||
178 | gpio_direction_output(beagle_dvi_device.reset_gpio, 0); | ||
179 | } | ||
180 | |||
109 | #include "sdram-micron-mt46h32m32lf-6.h" | 181 | #include "sdram-micron-mt46h32m32lf-6.h" |
110 | 182 | ||
111 | static struct omap2_hsmmc_info mmc[] = { | 183 | static struct omap2_hsmmc_info mmc[] = { |
@@ -117,15 +189,6 @@ static struct omap2_hsmmc_info mmc[] = { | |||
117 | {} /* Terminator */ | 189 | {} /* Terminator */ |
118 | }; | 190 | }; |
119 | 191 | ||
120 | static struct platform_device omap3_beagle_lcd_device = { | ||
121 | .name = "omap3beagle_lcd", | ||
122 | .id = -1, | ||
123 | }; | ||
124 | |||
125 | static struct omap_lcd_config omap3_beagle_lcd_config __initdata = { | ||
126 | .ctrl_name = "internal", | ||
127 | }; | ||
128 | |||
129 | static struct regulator_consumer_supply beagle_vmmc1_supply = { | 192 | static struct regulator_consumer_supply beagle_vmmc1_supply = { |
130 | .supply = "vmmc", | 193 | .supply = "vmmc", |
131 | }; | 194 | }; |
@@ -181,16 +244,6 @@ static struct twl4030_gpio_platform_data beagle_gpio_data = { | |||
181 | .setup = beagle_twl_gpio_setup, | 244 | .setup = beagle_twl_gpio_setup, |
182 | }; | 245 | }; |
183 | 246 | ||
184 | static struct regulator_consumer_supply beagle_vdac_supply = { | ||
185 | .supply = "vdac", | ||
186 | .dev = &omap3_beagle_lcd_device.dev, | ||
187 | }; | ||
188 | |||
189 | static struct regulator_consumer_supply beagle_vdvi_supply = { | ||
190 | .supply = "vdvi", | ||
191 | .dev = &omap3_beagle_lcd_device.dev, | ||
192 | }; | ||
193 | |||
194 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 247 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
195 | static struct regulator_init_data beagle_vmmc1 = { | 248 | static struct regulator_init_data beagle_vmmc1 = { |
196 | .constraints = { | 249 | .constraints = { |
@@ -349,14 +402,8 @@ static struct platform_device keys_gpio = { | |||
349 | }, | 402 | }, |
350 | }; | 403 | }; |
351 | 404 | ||
352 | static struct omap_board_config_kernel omap3_beagle_config[] __initdata = { | ||
353 | { OMAP_TAG_LCD, &omap3_beagle_lcd_config }, | ||
354 | }; | ||
355 | |||
356 | static void __init omap3_beagle_init_irq(void) | 405 | static void __init omap3_beagle_init_irq(void) |
357 | { | 406 | { |
358 | omap_board_config = omap3_beagle_config; | ||
359 | omap_board_config_size = ARRAY_SIZE(omap3_beagle_config); | ||
360 | omap2_init_common_hw(mt46h32m32lf6_sdrc_params, | 407 | omap2_init_common_hw(mt46h32m32lf6_sdrc_params, |
361 | mt46h32m32lf6_sdrc_params); | 408 | mt46h32m32lf6_sdrc_params); |
362 | omap_init_irq(); | 409 | omap_init_irq(); |
@@ -367,9 +414,9 @@ static void __init omap3_beagle_init_irq(void) | |||
367 | } | 414 | } |
368 | 415 | ||
369 | static struct platform_device *omap3_beagle_devices[] __initdata = { | 416 | static struct platform_device *omap3_beagle_devices[] __initdata = { |
370 | &omap3_beagle_lcd_device, | ||
371 | &leds_gpio, | 417 | &leds_gpio, |
372 | &keys_gpio, | 418 | &keys_gpio, |
419 | &beagle_dss_device, | ||
373 | }; | 420 | }; |
374 | 421 | ||
375 | static void __init omap3beagle_flash_init(void) | 422 | static void __init omap3beagle_flash_init(void) |
@@ -456,6 +503,8 @@ static void __init omap3_beagle_init(void) | |||
456 | /* Ensure SDRC pins are mux'd for self-refresh */ | 503 | /* Ensure SDRC pins are mux'd for self-refresh */ |
457 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); | 504 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
458 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); | 505 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
506 | |||
507 | beagle_display_init(); | ||
459 | } | 508 | } |
460 | 509 | ||
461 | static void __init omap3_beagle_map_io(void) | 510 | static void __init omap3_beagle_map_io(void) |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 81bba194b030..b95261013812 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -579,9 +579,7 @@ static void ads7846_dev_init(void) | |||
579 | printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); | 579 | printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); |
580 | 580 | ||
581 | gpio_direction_input(OMAP3_EVM_TS_GPIO); | 581 | gpio_direction_input(OMAP3_EVM_TS_GPIO); |
582 | 582 | gpio_set_debounce(OMAP3_EVM_TS_GPIO, 310); | |
583 | omap_set_gpio_debounce(OMAP3_EVM_TS_GPIO, 1); | ||
584 | omap_set_gpio_debounce_time(OMAP3_EVM_TS_GPIO, 0xa); | ||
585 | } | 583 | } |
586 | 584 | ||
587 | static int ads7846_get_pendown_state(void) | 585 | static int ads7846_get_pendown_state(void) |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 395d049bf010..db06dc910ba7 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -130,8 +130,8 @@ static struct platform_device pandora_keys_gpio = { | |||
130 | static void __init pandora_keys_gpio_init(void) | 130 | static void __init pandora_keys_gpio_init(void) |
131 | { | 131 | { |
132 | /* set debounce time for GPIO banks 4 and 6 */ | 132 | /* set debounce time for GPIO banks 4 and 6 */ |
133 | omap_set_gpio_debounce_time(32 * 3, GPIO_DEBOUNCE_TIME); | 133 | gpio_set_debounce(32 * 3, GPIO_DEBOUNCE_TIME); |
134 | omap_set_gpio_debounce_time(32 * 5, GPIO_DEBOUNCE_TIME); | 134 | gpio_set_debounce(32 * 5, GPIO_DEBOUNCE_TIME); |
135 | } | 135 | } |
136 | 136 | ||
137 | static int board_keymap[] = { | 137 | static int board_keymap[] = { |
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 2504d41f923e..2f5f8233dd5b 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -328,8 +328,7 @@ static void __init omap3_ads7846_init(void) | |||
328 | } | 328 | } |
329 | 329 | ||
330 | gpio_direction_input(OMAP3_TS_GPIO); | 330 | gpio_direction_input(OMAP3_TS_GPIO); |
331 | omap_set_gpio_debounce(OMAP3_TS_GPIO, 1); | 331 | gpio_set_debounce(OMAP3_TS_GPIO, 310); |
332 | omap_set_gpio_debounce_time(OMAP3_TS_GPIO, 0xa); | ||
333 | } | 332 | } |
334 | 333 | ||
335 | static struct ads7846_platform_data ads7846_config = { | 334 | static struct ads7846_platform_data ads7846_config = { |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 966f5f84f2bd..abdf321c2d41 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -45,6 +45,8 @@ | |||
45 | /* list all spi devices here */ | 45 | /* list all spi devices here */ |
46 | enum { | 46 | enum { |
47 | RX51_SPI_WL1251, | 47 | RX51_SPI_WL1251, |
48 | RX51_SPI_MIPID, /* LCD panel */ | ||
49 | RX51_SPI_TSC2005, /* Touch Controller */ | ||
48 | }; | 50 | }; |
49 | 51 | ||
50 | static struct wl12xx_platform_data wl1251_pdata; | 52 | static struct wl12xx_platform_data wl1251_pdata; |
@@ -54,6 +56,16 @@ static struct omap2_mcspi_device_config wl1251_mcspi_config = { | |||
54 | .single_channel = 1, | 56 | .single_channel = 1, |
55 | }; | 57 | }; |
56 | 58 | ||
59 | static struct omap2_mcspi_device_config mipid_mcspi_config = { | ||
60 | .turbo_mode = 0, | ||
61 | .single_channel = 1, | ||
62 | }; | ||
63 | |||
64 | static struct omap2_mcspi_device_config tsc2005_mcspi_config = { | ||
65 | .turbo_mode = 0, | ||
66 | .single_channel = 1, | ||
67 | }; | ||
68 | |||
57 | static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { | 69 | static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { |
58 | [RX51_SPI_WL1251] = { | 70 | [RX51_SPI_WL1251] = { |
59 | .modalias = "wl1251", | 71 | .modalias = "wl1251", |
@@ -64,6 +76,22 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { | |||
64 | .controller_data = &wl1251_mcspi_config, | 76 | .controller_data = &wl1251_mcspi_config, |
65 | .platform_data = &wl1251_pdata, | 77 | .platform_data = &wl1251_pdata, |
66 | }, | 78 | }, |
79 | [RX51_SPI_MIPID] = { | ||
80 | .modalias = "acx565akm", | ||
81 | .bus_num = 1, | ||
82 | .chip_select = 2, | ||
83 | .max_speed_hz = 6000000, | ||
84 | .controller_data = &mipid_mcspi_config, | ||
85 | }, | ||
86 | [RX51_SPI_TSC2005] = { | ||
87 | .modalias = "tsc2005", | ||
88 | .bus_num = 1, | ||
89 | .chip_select = 0, | ||
90 | /* .irq = OMAP_GPIO_IRQ(RX51_TSC2005_IRQ_GPIO),*/ | ||
91 | .max_speed_hz = 6000000, | ||
92 | .controller_data = &tsc2005_mcspi_config, | ||
93 | /* .platform_data = &tsc2005_config,*/ | ||
94 | }, | ||
67 | }; | 95 | }; |
68 | 96 | ||
69 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 97 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c new file mode 100644 index 000000000000..b743a4f42649 --- /dev/null +++ b/arch/arm/mach-omap2/board-rx51-video.c | |||
@@ -0,0 +1,109 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap2/board-rx51-video.c | ||
3 | * | ||
4 | * Copyright (C) 2010 Nokia | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/gpio.h> | ||
15 | #include <linux/spi/spi.h> | ||
16 | #include <linux/mm.h> | ||
17 | |||
18 | #include <asm/mach-types.h> | ||
19 | #include <plat/mux.h> | ||
20 | #include <plat/display.h> | ||
21 | #include <plat/vram.h> | ||
22 | #include <plat/mcspi.h> | ||
23 | |||
24 | #include "mux.h" | ||
25 | |||
26 | #define RX51_LCD_RESET_GPIO 90 | ||
27 | |||
28 | #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) | ||
29 | |||
30 | static int rx51_lcd_enable(struct omap_dss_device *dssdev) | ||
31 | { | ||
32 | gpio_set_value(dssdev->reset_gpio, 1); | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | static void rx51_lcd_disable(struct omap_dss_device *dssdev) | ||
37 | { | ||
38 | gpio_set_value(dssdev->reset_gpio, 0); | ||
39 | } | ||
40 | |||
41 | static struct omap_dss_device rx51_lcd_device = { | ||
42 | .name = "lcd", | ||
43 | .driver_name = "panel-acx565akm", | ||
44 | .type = OMAP_DISPLAY_TYPE_SDI, | ||
45 | .phy.sdi.datapairs = 2, | ||
46 | .reset_gpio = RX51_LCD_RESET_GPIO, | ||
47 | .platform_enable = rx51_lcd_enable, | ||
48 | .platform_disable = rx51_lcd_disable, | ||
49 | }; | ||
50 | |||
51 | static struct omap_dss_device *rx51_dss_devices[] = { | ||
52 | &rx51_lcd_device, | ||
53 | }; | ||
54 | |||
55 | static struct omap_dss_board_info rx51_dss_board_info = { | ||
56 | .num_devices = ARRAY_SIZE(rx51_dss_devices), | ||
57 | .devices = rx51_dss_devices, | ||
58 | .default_device = &rx51_lcd_device, | ||
59 | }; | ||
60 | |||
61 | struct platform_device rx51_display_device = { | ||
62 | .name = "omapdss", | ||
63 | .id = -1, | ||
64 | .dev = { | ||
65 | .platform_data = &rx51_dss_board_info, | ||
66 | }, | ||
67 | }; | ||
68 | |||
69 | static struct platform_device *rx51_video_devices[] __initdata = { | ||
70 | &rx51_display_device, | ||
71 | }; | ||
72 | |||
73 | static int __init rx51_video_init(void) | ||
74 | { | ||
75 | if (!machine_is_nokia_rx51()) | ||
76 | return 0; | ||
77 | |||
78 | if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) { | ||
79 | pr_err("%s cannot configure MUX for LCD RESET\n", __func__); | ||
80 | return 0; | ||
81 | } | ||
82 | |||
83 | if (gpio_request(RX51_LCD_RESET_GPIO, "LCD ACX565AKM reset")) { | ||
84 | pr_err("%s failed to get LCD Reset GPIO\n", __func__); | ||
85 | return 0; | ||
86 | } | ||
87 | |||
88 | gpio_direction_output(RX51_LCD_RESET_GPIO, 1); | ||
89 | |||
90 | platform_add_devices(rx51_video_devices, | ||
91 | ARRAY_SIZE(rx51_video_devices)); | ||
92 | return 0; | ||
93 | } | ||
94 | |||
95 | subsys_initcall(rx51_video_init); | ||
96 | |||
97 | void __init rx51_video_mem_init(void) | ||
98 | { | ||
99 | /* | ||
100 | * GFX 864x480x32bpp | ||
101 | * VID1/2 1280x720x32bpp double buffered | ||
102 | */ | ||
103 | omap_vram_set_sdram_vram(PAGE_ALIGN(864 * 480 * 4) + | ||
104 | 2 * PAGE_ALIGN(1280 * 720 * 4 * 2), 0); | ||
105 | } | ||
106 | |||
107 | #else | ||
108 | void __init rx51_video_mem_init(void) { } | ||
109 | #endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */ | ||
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index b155c366c650..1b86b5bb87a2 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #define RX51_GPIO_SLEEP_IND 162 | 36 | #define RX51_GPIO_SLEEP_IND 162 |
37 | 37 | ||
38 | struct omap_sdrc_params *rx51_get_sdram_timings(void); | 38 | struct omap_sdrc_params *rx51_get_sdram_timings(void); |
39 | extern void rx51_video_mem_init(void); | ||
39 | 40 | ||
40 | static struct gpio_led gpio_leds[] = { | 41 | static struct gpio_led gpio_leds[] = { |
41 | { | 42 | { |
@@ -143,6 +144,7 @@ static void __init rx51_init(void) | |||
143 | static void __init rx51_map_io(void) | 144 | static void __init rx51_map_io(void) |
144 | { | 145 | { |
145 | omap2_set_globals_343x(); | 146 | omap2_set_globals_343x(); |
147 | rx51_video_mem_init(); | ||
146 | omap34xx_map_common_io(); | 148 | omap34xx_map_common_io(); |
147 | } | 149 | } |
148 | 150 | ||
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c index 23bc981574f6..37d65d62ed8f 100644 --- a/arch/arm/mach-omap2/clock2420_data.c +++ b/arch/arm/mach-omap2/clock2420_data.c | |||
@@ -1836,7 +1836,7 @@ static struct omap_clk omap2420_clks[] = { | |||
1836 | CLK(NULL, "vlynq_ick", &vlynq_ick, CK_242X), | 1836 | CLK(NULL, "vlynq_ick", &vlynq_ick, CK_242X), |
1837 | CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X), | 1837 | CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X), |
1838 | CLK(NULL, "des_ick", &des_ick, CK_242X), | 1838 | CLK(NULL, "des_ick", &des_ick, CK_242X), |
1839 | CLK(NULL, "sha_ick", &sha_ick, CK_242X), | 1839 | CLK("omap-sham", "ick", &sha_ick, CK_242X), |
1840 | CLK("omap_rng", "ick", &rng_ick, CK_242X), | 1840 | CLK("omap_rng", "ick", &rng_ick, CK_242X), |
1841 | CLK(NULL, "aes_ick", &aes_ick, CK_242X), | 1841 | CLK(NULL, "aes_ick", &aes_ick, CK_242X), |
1842 | CLK(NULL, "pka_ick", &pka_ick, CK_242X), | 1842 | CLK(NULL, "pka_ick", &pka_ick, CK_242X), |
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c index 2df50d97deb2..b33118fb6a87 100644 --- a/arch/arm/mach-omap2/clock2430_data.c +++ b/arch/arm/mach-omap2/clock2430_data.c | |||
@@ -1924,7 +1924,7 @@ static struct omap_clk omap2430_clks[] = { | |||
1924 | CLK(NULL, "sdma_ick", &sdma_ick, CK_243X), | 1924 | CLK(NULL, "sdma_ick", &sdma_ick, CK_243X), |
1925 | CLK(NULL, "sdrc_ick", &sdrc_ick, CK_243X), | 1925 | CLK(NULL, "sdrc_ick", &sdrc_ick, CK_243X), |
1926 | CLK(NULL, "des_ick", &des_ick, CK_243X), | 1926 | CLK(NULL, "des_ick", &des_ick, CK_243X), |
1927 | CLK(NULL, "sha_ick", &sha_ick, CK_243X), | 1927 | CLK("omap-sham", "ick", &sha_ick, CK_243X), |
1928 | CLK("omap_rng", "ick", &rng_ick, CK_243X), | 1928 | CLK("omap_rng", "ick", &rng_ick, CK_243X), |
1929 | CLK(NULL, "aes_ick", &aes_ick, CK_243X), | 1929 | CLK(NULL, "aes_ick", &aes_ick, CK_243X), |
1930 | CLK(NULL, "pka_ick", &pka_ick, CK_243X), | 1930 | CLK(NULL, "pka_ick", &pka_ick, CK_243X), |
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 833be485c89e..41b155acfca7 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -3284,7 +3284,7 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3284 | CLK("mmci-omap-hs.2", "ick", &mmchs3_ick, CK_3430ES2 | CK_AM35XX), | 3284 | CLK("mmci-omap-hs.2", "ick", &mmchs3_ick, CK_3430ES2 | CK_AM35XX), |
3285 | CLK(NULL, "icr_ick", &icr_ick, CK_343X), | 3285 | CLK(NULL, "icr_ick", &icr_ick, CK_343X), |
3286 | CLK(NULL, "aes2_ick", &aes2_ick, CK_343X), | 3286 | CLK(NULL, "aes2_ick", &aes2_ick, CK_343X), |
3287 | CLK(NULL, "sha12_ick", &sha12_ick, CK_343X), | 3287 | CLK("omap-sham", "ick", &sha12_ick, CK_343X), |
3288 | CLK(NULL, "des2_ick", &des2_ick, CK_343X), | 3288 | CLK(NULL, "des2_ick", &des2_ick, CK_343X), |
3289 | CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_3XXX), | 3289 | CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_3XXX), |
3290 | CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_3XXX), | 3290 | CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_3XXX), |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 705a7a30a87f..03e6c9ed82a4 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <plat/mux.h> | 28 | #include <plat/mux.h> |
29 | #include <mach/gpio.h> | 29 | #include <mach/gpio.h> |
30 | #include <plat/mmc.h> | 30 | #include <plat/mmc.h> |
31 | #include <plat/dma.h> | ||
31 | 32 | ||
32 | #include "mux.h" | 33 | #include "mux.h" |
33 | 34 | ||
@@ -486,8 +487,10 @@ static void omap_init_pmu(void) | |||
486 | } | 487 | } |
487 | 488 | ||
488 | 489 | ||
489 | #ifdef CONFIG_OMAP_SHA1_MD5 | 490 | #if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE) |
490 | static struct resource sha1_md5_resources[] = { | 491 | |
492 | #ifdef CONFIG_ARCH_OMAP2 | ||
493 | static struct resource omap2_sham_resources[] = { | ||
491 | { | 494 | { |
492 | .start = OMAP24XX_SEC_SHA1MD5_BASE, | 495 | .start = OMAP24XX_SEC_SHA1MD5_BASE, |
493 | .end = OMAP24XX_SEC_SHA1MD5_BASE + 0x64, | 496 | .end = OMAP24XX_SEC_SHA1MD5_BASE + 0x64, |
@@ -498,20 +501,55 @@ static struct resource sha1_md5_resources[] = { | |||
498 | .flags = IORESOURCE_IRQ, | 501 | .flags = IORESOURCE_IRQ, |
499 | } | 502 | } |
500 | }; | 503 | }; |
504 | static int omap2_sham_resources_sz = ARRAY_SIZE(omap2_sham_resources); | ||
505 | #else | ||
506 | #define omap2_sham_resources NULL | ||
507 | #define omap2_sham_resources_sz 0 | ||
508 | #endif | ||
501 | 509 | ||
502 | static struct platform_device sha1_md5_device = { | 510 | #ifdef CONFIG_ARCH_OMAP3 |
503 | .name = "OMAP SHA1/MD5", | 511 | static struct resource omap3_sham_resources[] = { |
512 | { | ||
513 | .start = OMAP34XX_SEC_SHA1MD5_BASE, | ||
514 | .end = OMAP34XX_SEC_SHA1MD5_BASE + 0x64, | ||
515 | .flags = IORESOURCE_MEM, | ||
516 | }, | ||
517 | { | ||
518 | .start = INT_34XX_SHA1MD52_IRQ, | ||
519 | .flags = IORESOURCE_IRQ, | ||
520 | }, | ||
521 | { | ||
522 | .start = OMAP34XX_DMA_SHA1MD5_RX, | ||
523 | .flags = IORESOURCE_DMA, | ||
524 | } | ||
525 | }; | ||
526 | static int omap3_sham_resources_sz = ARRAY_SIZE(omap3_sham_resources); | ||
527 | #else | ||
528 | #define omap3_sham_resources NULL | ||
529 | #define omap3_sham_resources_sz 0 | ||
530 | #endif | ||
531 | |||
532 | static struct platform_device sham_device = { | ||
533 | .name = "omap-sham", | ||
504 | .id = -1, | 534 | .id = -1, |
505 | .num_resources = ARRAY_SIZE(sha1_md5_resources), | ||
506 | .resource = sha1_md5_resources, | ||
507 | }; | 535 | }; |
508 | 536 | ||
509 | static void omap_init_sha1_md5(void) | 537 | static void omap_init_sham(void) |
510 | { | 538 | { |
511 | platform_device_register(&sha1_md5_device); | 539 | if (cpu_is_omap24xx()) { |
540 | sham_device.resource = omap2_sham_resources; | ||
541 | sham_device.num_resources = omap2_sham_resources_sz; | ||
542 | } else if (cpu_is_omap34xx()) { | ||
543 | sham_device.resource = omap3_sham_resources; | ||
544 | sham_device.num_resources = omap3_sham_resources_sz; | ||
545 | } else { | ||
546 | pr_err("%s: platform not supported\n", __func__); | ||
547 | return; | ||
548 | } | ||
549 | platform_device_register(&sham_device); | ||
512 | } | 550 | } |
513 | #else | 551 | #else |
514 | static inline void omap_init_sha1_md5(void) { } | 552 | static inline void omap_init_sham(void) { } |
515 | #endif | 553 | #endif |
516 | 554 | ||
517 | /*-------------------------------------------------------------------------*/ | 555 | /*-------------------------------------------------------------------------*/ |
@@ -869,7 +907,7 @@ static int __init omap2_init_devices(void) | |||
869 | omap_init_pmu(); | 907 | omap_init_pmu(); |
870 | omap_hdq_init(); | 908 | omap_hdq_init(); |
871 | omap_init_sti(); | 909 | omap_init_sti(); |
872 | omap_init_sha1_md5(); | 910 | omap_init_sham(); |
873 | omap_init_vout(); | 911 | omap_init_vout(); |
874 | 912 | ||
875 | return 0; | 913 | return 0; |