diff options
Diffstat (limited to 'arch/arm/mach-omap2')
111 files changed, 13811 insertions, 2759 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 1a2cf6226a55..b9d8a7b2a862 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
| @@ -53,25 +53,30 @@ config ARCH_OMAP4 | |||
| 53 | comment "OMAP Core Type" | 53 | comment "OMAP Core Type" |
| 54 | depends on ARCH_OMAP2 | 54 | depends on ARCH_OMAP2 |
| 55 | 55 | ||
| 56 | config ARCH_OMAP2420 | 56 | config SOC_OMAP2420 |
| 57 | bool "OMAP2420 support" | 57 | bool "OMAP2420 support" |
| 58 | depends on ARCH_OMAP2 | 58 | depends on ARCH_OMAP2 |
| 59 | default y | 59 | default y |
| 60 | select OMAP_DM_TIMER | 60 | select OMAP_DM_TIMER |
| 61 | select ARCH_OMAP_OTG | 61 | select ARCH_OMAP_OTG |
| 62 | 62 | ||
| 63 | config ARCH_OMAP2430 | 63 | config SOC_OMAP2430 |
| 64 | bool "OMAP2430 support" | 64 | bool "OMAP2430 support" |
| 65 | depends on ARCH_OMAP2 | 65 | depends on ARCH_OMAP2 |
| 66 | default y | 66 | default y |
| 67 | select ARCH_OMAP_OTG | 67 | select ARCH_OMAP_OTG |
| 68 | 68 | ||
| 69 | config ARCH_OMAP3430 | 69 | config SOC_OMAP3430 |
| 70 | bool "OMAP3430 support" | 70 | bool "OMAP3430 support" |
| 71 | depends on ARCH_OMAP3 | 71 | depends on ARCH_OMAP3 |
| 72 | default y | 72 | default y |
| 73 | select ARCH_OMAP_OTG | 73 | select ARCH_OMAP_OTG |
| 74 | 74 | ||
| 75 | config SOC_OMAPTI816X | ||
| 76 | bool "TI816X support" | ||
| 77 | depends on ARCH_OMAP3 | ||
| 78 | default y | ||
| 79 | |||
| 75 | config OMAP_PACKAGE_ZAF | 80 | config OMAP_PACKAGE_ZAF |
| 76 | bool | 81 | bool |
| 77 | 82 | ||
| @@ -106,25 +111,25 @@ config MACH_OMAP_GENERIC | |||
| 106 | 111 | ||
| 107 | config MACH_OMAP2_TUSB6010 | 112 | config MACH_OMAP2_TUSB6010 |
| 108 | bool | 113 | bool |
| 109 | depends on ARCH_OMAP2 && ARCH_OMAP2420 | 114 | depends on ARCH_OMAP2 && SOC_OMAP2420 |
| 110 | default y if MACH_NOKIA_N8X0 | 115 | default y if MACH_NOKIA_N8X0 |
| 111 | 116 | ||
| 112 | config MACH_OMAP_H4 | 117 | config MACH_OMAP_H4 |
| 113 | bool "OMAP 2420 H4 board" | 118 | bool "OMAP 2420 H4 board" |
| 114 | depends on ARCH_OMAP2420 | 119 | depends on SOC_OMAP2420 |
| 115 | default y | 120 | default y |
| 116 | select OMAP_PACKAGE_ZAF | 121 | select OMAP_PACKAGE_ZAF |
| 117 | select OMAP_DEBUG_DEVICES | 122 | select OMAP_DEBUG_DEVICES |
| 118 | 123 | ||
| 119 | config MACH_OMAP_APOLLON | 124 | config MACH_OMAP_APOLLON |
| 120 | bool "OMAP 2420 Apollon board" | 125 | bool "OMAP 2420 Apollon board" |
| 121 | depends on ARCH_OMAP2420 | 126 | depends on SOC_OMAP2420 |
| 122 | default y | 127 | default y |
| 123 | select OMAP_PACKAGE_ZAC | 128 | select OMAP_PACKAGE_ZAC |
| 124 | 129 | ||
| 125 | config MACH_OMAP_2430SDP | 130 | config MACH_OMAP_2430SDP |
| 126 | bool "OMAP 2430 SDP board" | 131 | bool "OMAP 2430 SDP board" |
| 127 | depends on ARCH_OMAP2430 | 132 | depends on SOC_OMAP2430 |
| 128 | default y | 133 | default y |
| 129 | select OMAP_PACKAGE_ZAC | 134 | select OMAP_PACKAGE_ZAC |
| 130 | 135 | ||
| @@ -219,7 +224,7 @@ config MACH_NOKIA_N810_WIMAX | |||
| 219 | 224 | ||
| 220 | config MACH_NOKIA_N8X0 | 225 | config MACH_NOKIA_N8X0 |
| 221 | bool "Nokia N800/N810" | 226 | bool "Nokia N800/N810" |
| 222 | depends on ARCH_OMAP2420 | 227 | depends on SOC_OMAP2420 |
| 223 | default y | 228 | default y |
| 224 | select OMAP_PACKAGE_ZAC | 229 | select OMAP_PACKAGE_ZAC |
| 225 | select MACH_NOKIA_N800 | 230 | select MACH_NOKIA_N800 |
| @@ -294,12 +299,18 @@ config MACH_OMAP_3630SDP | |||
| 294 | default y | 299 | default y |
| 295 | select OMAP_PACKAGE_CBP | 300 | select OMAP_PACKAGE_CBP |
| 296 | 301 | ||
| 302 | config MACH_TI8168EVM | ||
| 303 | bool "TI8168 Evaluation Module" | ||
| 304 | depends on SOC_OMAPTI816X | ||
| 305 | default y | ||
| 306 | |||
| 297 | config MACH_OMAP_4430SDP | 307 | config MACH_OMAP_4430SDP |
| 298 | bool "OMAP 4430 SDP board" | 308 | bool "OMAP 4430 SDP board" |
| 299 | default y | 309 | default y |
| 300 | depends on ARCH_OMAP4 | 310 | depends on ARCH_OMAP4 |
| 301 | select OMAP_PACKAGE_CBL | 311 | select OMAP_PACKAGE_CBL |
| 302 | select OMAP_PACKAGE_CBS | 312 | select OMAP_PACKAGE_CBS |
| 313 | select REGULATOR_FIXED_VOLTAGE | ||
| 303 | 314 | ||
| 304 | config MACH_OMAP4_PANDA | 315 | config MACH_OMAP4_PANDA |
| 305 | bool "OMAP4 Panda Board" | 316 | bool "OMAP4 Panda Board" |
| @@ -307,6 +318,7 @@ config MACH_OMAP4_PANDA | |||
| 307 | depends on ARCH_OMAP4 | 318 | depends on ARCH_OMAP4 |
| 308 | select OMAP_PACKAGE_CBL | 319 | select OMAP_PACKAGE_CBL |
| 309 | select OMAP_PACKAGE_CBS | 320 | select OMAP_PACKAGE_CBS |
| 321 | select REGULATOR_FIXED_VOLTAGE | ||
| 310 | 322 | ||
| 311 | config OMAP3_EMU | 323 | config OMAP3_EMU |
| 312 | bool "OMAP3 debugging peripherals" | 324 | bool "OMAP3 debugging peripherals" |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 1c0c2b02d870..534d89a60dd9 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
| @@ -31,8 +31,8 @@ AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec) | |||
| 31 | AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a$(plus_sec) | 31 | AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a$(plus_sec) |
| 32 | 32 | ||
| 33 | # Functions loaded to SRAM | 33 | # Functions loaded to SRAM |
| 34 | obj-$(CONFIG_ARCH_OMAP2420) += sram242x.o | 34 | obj-$(CONFIG_SOC_OMAP2420) += sram242x.o |
| 35 | obj-$(CONFIG_ARCH_OMAP2430) += sram243x.o | 35 | obj-$(CONFIG_SOC_OMAP2430) += sram243x.o |
| 36 | obj-$(CONFIG_ARCH_OMAP3) += sram34xx.o | 36 | obj-$(CONFIG_ARCH_OMAP3) += sram34xx.o |
| 37 | 37 | ||
| 38 | AFLAGS_sram242x.o :=-Wa,-march=armv6 | 38 | AFLAGS_sram242x.o :=-Wa,-march=armv6 |
| @@ -40,8 +40,8 @@ AFLAGS_sram243x.o :=-Wa,-march=armv6 | |||
| 40 | AFLAGS_sram34xx.o :=-Wa,-march=armv7-a | 40 | AFLAGS_sram34xx.o :=-Wa,-march=armv7-a |
| 41 | 41 | ||
| 42 | # Pin multiplexing | 42 | # Pin multiplexing |
| 43 | obj-$(CONFIG_ARCH_OMAP2420) += mux2420.o | 43 | obj-$(CONFIG_SOC_OMAP2420) += mux2420.o |
| 44 | obj-$(CONFIG_ARCH_OMAP2430) += mux2430.o | 44 | obj-$(CONFIG_SOC_OMAP2430) += mux2430.o |
| 45 | obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o | 45 | obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o |
| 46 | obj-$(CONFIG_ARCH_OMAP4) += mux44xx.o | 46 | obj-$(CONFIG_ARCH_OMAP4) += mux44xx.o |
| 47 | 47 | ||
| @@ -102,39 +102,49 @@ obj-$(CONFIG_ARCH_OMAP4) += $(powerdomain-common) \ | |||
| 102 | 102 | ||
| 103 | # PRCM clockdomain control | 103 | # PRCM clockdomain control |
| 104 | obj-$(CONFIG_ARCH_OMAP2) += clockdomain.o \ | 104 | obj-$(CONFIG_ARCH_OMAP2) += clockdomain.o \ |
| 105 | clockdomain2xxx_3xxx.o \ | ||
| 105 | clockdomains2xxx_3xxx_data.o | 106 | clockdomains2xxx_3xxx_data.o |
| 106 | obj-$(CONFIG_ARCH_OMAP3) += clockdomain.o \ | 107 | obj-$(CONFIG_ARCH_OMAP3) += clockdomain.o \ |
| 108 | clockdomain2xxx_3xxx.o \ | ||
| 107 | clockdomains2xxx_3xxx_data.o | 109 | clockdomains2xxx_3xxx_data.o |
| 108 | obj-$(CONFIG_ARCH_OMAP4) += clockdomain.o \ | 110 | obj-$(CONFIG_ARCH_OMAP4) += clockdomain.o \ |
| 111 | clockdomain44xx.o \ | ||
| 109 | clockdomains44xx_data.o | 112 | clockdomains44xx_data.o |
| 113 | |||
| 110 | # Clock framework | 114 | # Clock framework |
| 111 | obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o \ | 115 | obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o \ |
| 112 | clkt2xxx_sys.o \ | 116 | clkt2xxx_sys.o \ |
| 113 | clkt2xxx_dpllcore.o \ | 117 | clkt2xxx_dpllcore.o \ |
| 114 | clkt2xxx_virt_prcm_set.o \ | 118 | clkt2xxx_virt_prcm_set.o \ |
| 115 | clkt2xxx_apll.o clkt2xxx_osc.o | 119 | clkt2xxx_apll.o clkt2xxx_osc.o \ |
| 116 | obj-$(CONFIG_ARCH_OMAP2420) += clock2420_data.o | 120 | clkt2xxx_dpll.o clkt_iclk.o |
| 117 | obj-$(CONFIG_ARCH_OMAP2430) += clock2430.o clock2430_data.o | 121 | obj-$(CONFIG_SOC_OMAP2420) += clock2420_data.o |
| 122 | obj-$(CONFIG_SOC_OMAP2430) += clock2430.o clock2430_data.o | ||
| 118 | obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o \ | 123 | obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o \ |
| 119 | clock34xx.o clkt34xx_dpll3m2.o \ | 124 | clock34xx.o clkt34xx_dpll3m2.o \ |
| 120 | clock3517.o clock36xx.o \ | 125 | clock3517.o clock36xx.o \ |
| 121 | dpll3xxx.o clock3xxx_data.o | 126 | dpll3xxx.o clock3xxx_data.o \ |
| 127 | clkt_iclk.o | ||
| 122 | obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) clock44xx_data.o \ | 128 | obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) clock44xx_data.o \ |
| 123 | dpll3xxx.o | 129 | dpll3xxx.o dpll44xx.o |
| 124 | 130 | ||
| 125 | # OMAP2 clock rate set data (old "OPP" data) | 131 | # OMAP2 clock rate set data (old "OPP" data) |
| 126 | obj-$(CONFIG_ARCH_OMAP2420) += opp2420_data.o | 132 | obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o |
| 127 | obj-$(CONFIG_ARCH_OMAP2430) += opp2430_data.o | 133 | obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o |
| 128 | 134 | ||
| 129 | # hwmod data | 135 | # hwmod data |
| 130 | obj-$(CONFIG_ARCH_OMAP2420) += omap_hwmod_2420_data.o | 136 | obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2420_data.o |
| 131 | obj-$(CONFIG_ARCH_OMAP2430) += omap_hwmod_2430_data.o | 137 | obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2430_data.o |
| 132 | obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o | 138 | obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o |
| 133 | obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o | 139 | obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o |
| 134 | 140 | ||
| 135 | # EMU peripherals | 141 | # EMU peripherals |
| 136 | obj-$(CONFIG_OMAP3_EMU) += emu.o | 142 | obj-$(CONFIG_OMAP3_EMU) += emu.o |
| 137 | 143 | ||
| 144 | # L3 interconnect | ||
| 145 | obj-$(CONFIG_ARCH_OMAP3) += omap_l3_smx.o | ||
| 146 | obj-$(CONFIG_ARCH_OMAP4) += omap_l3_noc.o | ||
| 147 | |||
| 138 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o | 148 | obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox_mach.o |
| 139 | mailbox_mach-objs := mailbox.o | 149 | mailbox_mach-objs := mailbox.o |
| 140 | 150 | ||
| @@ -218,12 +228,14 @@ obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o \ | |||
| 218 | hsmmc.o \ | 228 | hsmmc.o \ |
| 219 | omap_phy_internal.o | 229 | omap_phy_internal.o |
| 220 | 230 | ||
| 221 | obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o | 231 | obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o \ |
| 232 | omap_phy_internal.o \ | ||
| 222 | 233 | ||
| 223 | obj-$(CONFIG_MACH_CRANEBOARD) += board-am3517crane.o | 234 | obj-$(CONFIG_MACH_CRANEBOARD) += board-am3517crane.o |
| 224 | 235 | ||
| 225 | obj-$(CONFIG_MACH_SBC3530) += board-omap3stalker.o \ | 236 | obj-$(CONFIG_MACH_SBC3530) += board-omap3stalker.o \ |
| 226 | hsmmc.o | 237 | hsmmc.o |
| 238 | obj-$(CONFIG_MACH_TI8168EVM) += board-ti8168evm.o | ||
| 227 | # Platform specific device init code | 239 | # Platform specific device init code |
| 228 | usbfs-$(CONFIG_ARCH_OMAP_OTG) := usb-fs.o | 240 | usbfs-$(CONFIG_ARCH_OMAP_OTG) := usb-fs.o |
| 229 | obj-y += $(usbfs-m) $(usbfs-y) | 241 | obj-y += $(usbfs-m) $(usbfs-y) |
| @@ -242,3 +254,7 @@ obj-y += $(smc91x-m) $(smc91x-y) | |||
| 242 | 254 | ||
| 243 | smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o | 255 | smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o |
| 244 | obj-y += $(smsc911x-m) $(smsc911x-y) | 256 | obj-y += $(smsc911x-m) $(smsc911x-y) |
| 257 | obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o | ||
| 258 | |||
| 259 | disp-$(CONFIG_OMAP2_DSS) := display.o | ||
| 260 | obj-y += $(disp-m) $(disp-y) | ||
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index e0661777f599..1fa6bb896f41 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/mmc/host.h> | 22 | #include <linux/mmc/host.h> |
| 23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
| 24 | #include <linux/i2c/twl.h> | 24 | #include <linux/i2c/twl.h> |
| 25 | #include <linux/regulator/machine.h> | ||
| 25 | #include <linux/err.h> | 26 | #include <linux/err.h> |
| 26 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
| 27 | #include <linux/io.h> | 28 | #include <linux/io.h> |
| @@ -139,15 +140,31 @@ static struct omap_board_config_kernel sdp2430_config[] __initdata = { | |||
| 139 | {OMAP_TAG_LCD, &sdp2430_lcd_config}, | 140 | {OMAP_TAG_LCD, &sdp2430_lcd_config}, |
| 140 | }; | 141 | }; |
| 141 | 142 | ||
| 142 | static void __init omap_2430sdp_init_irq(void) | 143 | static void __init omap_2430sdp_init_early(void) |
| 143 | { | 144 | { |
| 144 | omap_board_config = sdp2430_config; | ||
| 145 | omap_board_config_size = ARRAY_SIZE(sdp2430_config); | ||
| 146 | omap2_init_common_infrastructure(); | 145 | omap2_init_common_infrastructure(); |
| 147 | omap2_init_common_devices(NULL, NULL); | 146 | omap2_init_common_devices(NULL, NULL); |
| 148 | omap_init_irq(); | ||
| 149 | } | 147 | } |
| 150 | 148 | ||
| 149 | static struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = { | ||
| 150 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | ||
| 151 | }; | ||
| 152 | |||
| 153 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | ||
| 154 | static struct regulator_init_data sdp2430_vmmc1 = { | ||
| 155 | .constraints = { | ||
| 156 | .min_uV = 1850000, | ||
| 157 | .max_uV = 3150000, | ||
| 158 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
| 159 | | REGULATOR_MODE_STANDBY, | ||
| 160 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
| 161 | | REGULATOR_CHANGE_MODE | ||
| 162 | | REGULATOR_CHANGE_STATUS, | ||
| 163 | }, | ||
| 164 | .num_consumer_supplies = ARRAY_SIZE(sdp2430_vmmc1_supplies), | ||
| 165 | .consumer_supplies = &sdp2430_vmmc1_supplies[0], | ||
| 166 | }; | ||
| 167 | |||
| 151 | static struct twl4030_gpio_platform_data sdp2430_gpio_data = { | 168 | static struct twl4030_gpio_platform_data sdp2430_gpio_data = { |
| 152 | .gpio_base = OMAP_MAX_GPIO_LINES, | 169 | .gpio_base = OMAP_MAX_GPIO_LINES, |
| 153 | .irq_base = TWL4030_GPIO_IRQ_BASE, | 170 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
| @@ -160,6 +177,7 @@ static struct twl4030_platform_data sdp2430_twldata = { | |||
| 160 | 177 | ||
| 161 | /* platform_data for children goes here */ | 178 | /* platform_data for children goes here */ |
| 162 | .gpio = &sdp2430_gpio_data, | 179 | .gpio = &sdp2430_gpio_data, |
| 180 | .vmmc1 = &sdp2430_vmmc1, | ||
| 163 | }; | 181 | }; |
| 164 | 182 | ||
| 165 | static struct i2c_board_info __initdata sdp2430_i2c_boardinfo[] = { | 183 | static struct i2c_board_info __initdata sdp2430_i2c_boardinfo[] = { |
| @@ -226,6 +244,9 @@ static void __init omap_2430sdp_init(void) | |||
| 226 | 244 | ||
| 227 | omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC); | 245 | omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC); |
| 228 | 246 | ||
| 247 | omap_board_config = sdp2430_config; | ||
| 248 | omap_board_config_size = ARRAY_SIZE(sdp2430_config); | ||
| 249 | |||
| 229 | omap2430_i2c_init(); | 250 | omap2430_i2c_init(); |
| 230 | 251 | ||
| 231 | platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); | 252 | platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); |
| @@ -253,9 +274,10 @@ static void __init omap_2430sdp_map_io(void) | |||
| 253 | MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") | 274 | MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") |
| 254 | /* Maintainer: Syed Khasim - Texas Instruments Inc */ | 275 | /* Maintainer: Syed Khasim - Texas Instruments Inc */ |
| 255 | .boot_params = 0x80000100, | 276 | .boot_params = 0x80000100, |
| 256 | .map_io = omap_2430sdp_map_io, | ||
| 257 | .reserve = omap_reserve, | 277 | .reserve = omap_reserve, |
| 258 | .init_irq = omap_2430sdp_init_irq, | 278 | .map_io = omap_2430sdp_map_io, |
| 279 | .init_early = omap_2430sdp_init_early, | ||
| 280 | .init_irq = omap_init_irq, | ||
| 259 | .init_machine = omap_2430sdp_init, | 281 | .init_machine = omap_2430sdp_init, |
| 260 | .timer = &omap_timer, | 282 | .timer = &omap_timer, |
| 261 | MACHINE_END | 283 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index d4e41ef86aa5..5464bec156ad 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
| @@ -307,34 +307,16 @@ static struct omap_dss_board_info sdp3430_dss_data = { | |||
| 307 | .default_device = &sdp3430_lcd_device, | 307 | .default_device = &sdp3430_lcd_device, |
| 308 | }; | 308 | }; |
| 309 | 309 | ||
| 310 | static struct platform_device sdp3430_dss_device = { | 310 | static struct regulator_consumer_supply sdp3430_vdda_dac_supply = |
| 311 | .name = "omapdss", | 311 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
| 312 | .id = -1, | ||
| 313 | .dev = { | ||
| 314 | .platform_data = &sdp3430_dss_data, | ||
| 315 | }, | ||
| 316 | }; | ||
| 317 | |||
| 318 | static struct regulator_consumer_supply sdp3430_vdda_dac_supply = { | ||
| 319 | .supply = "vdda_dac", | ||
| 320 | .dev = &sdp3430_dss_device.dev, | ||
| 321 | }; | ||
| 322 | |||
| 323 | static struct platform_device *sdp3430_devices[] __initdata = { | ||
| 324 | &sdp3430_dss_device, | ||
| 325 | }; | ||
| 326 | 312 | ||
| 327 | static struct omap_board_config_kernel sdp3430_config[] __initdata = { | 313 | static struct omap_board_config_kernel sdp3430_config[] __initdata = { |
| 328 | }; | 314 | }; |
| 329 | 315 | ||
| 330 | static void __init omap_3430sdp_init_irq(void) | 316 | static void __init omap_3430sdp_init_early(void) |
| 331 | { | 317 | { |
| 332 | omap_board_config = sdp3430_config; | ||
| 333 | omap_board_config_size = ARRAY_SIZE(sdp3430_config); | ||
| 334 | omap3_pm_init_cpuidle(omap3_cpuidle_params_table); | ||
| 335 | omap2_init_common_infrastructure(); | 318 | omap2_init_common_infrastructure(); |
| 336 | omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL); | 319 | omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL); |
| 337 | omap_init_irq(); | ||
| 338 | } | 320 | } |
| 339 | 321 | ||
| 340 | static int sdp3430_batt_table[] = { | 322 | static int sdp3430_batt_table[] = { |
| @@ -370,18 +352,6 @@ static struct omap2_hsmmc_info mmc[] = { | |||
| 370 | {} /* Terminator */ | 352 | {} /* Terminator */ |
| 371 | }; | 353 | }; |
| 372 | 354 | ||
| 373 | static struct regulator_consumer_supply sdp3430_vmmc1_supply = { | ||
| 374 | .supply = "vmmc", | ||
| 375 | }; | ||
| 376 | |||
| 377 | static struct regulator_consumer_supply sdp3430_vsim_supply = { | ||
| 378 | .supply = "vmmc_aux", | ||
| 379 | }; | ||
| 380 | |||
| 381 | static struct regulator_consumer_supply sdp3430_vmmc2_supply = { | ||
| 382 | .supply = "vmmc", | ||
| 383 | }; | ||
| 384 | |||
| 385 | static int sdp3430_twl_gpio_setup(struct device *dev, | 355 | static int sdp3430_twl_gpio_setup(struct device *dev, |
| 386 | unsigned gpio, unsigned ngpio) | 356 | unsigned gpio, unsigned ngpio) |
| 387 | { | 357 | { |
| @@ -392,13 +362,6 @@ static int sdp3430_twl_gpio_setup(struct device *dev, | |||
| 392 | mmc[1].gpio_cd = gpio + 1; | 362 | mmc[1].gpio_cd = gpio + 1; |
| 393 | omap2_hsmmc_init(mmc); | 363 | omap2_hsmmc_init(mmc); |
| 394 | 364 | ||
| 395 | /* link regulators to MMC adapters ... we "know" the | ||
| 396 | * regulators will be set up only *after* we return. | ||
| 397 | */ | ||
| 398 | sdp3430_vmmc1_supply.dev = mmc[0].dev; | ||
| 399 | sdp3430_vsim_supply.dev = mmc[0].dev; | ||
| 400 | sdp3430_vmmc2_supply.dev = mmc[1].dev; | ||
| 401 | |||
| 402 | /* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */ | 365 | /* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */ |
| 403 | gpio_request(gpio + 7, "sub_lcd_en_bkl"); | 366 | gpio_request(gpio + 7, "sub_lcd_en_bkl"); |
| 404 | gpio_direction_output(gpio + 7, 0); | 367 | gpio_direction_output(gpio + 7, 0); |
| @@ -427,6 +390,34 @@ static struct twl4030_madc_platform_data sdp3430_madc_data = { | |||
| 427 | .irq_line = 1, | 390 | .irq_line = 1, |
| 428 | }; | 391 | }; |
| 429 | 392 | ||
| 393 | /* regulator consumer mappings */ | ||
| 394 | |||
| 395 | /* ads7846 on SPI */ | ||
| 396 | static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = { | ||
| 397 | REGULATOR_SUPPLY("vcc", "spi1.0"), | ||
| 398 | }; | ||
| 399 | |||
| 400 | static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = { | ||
| 401 | REGULATOR_SUPPLY("vdda_dac", "omapdss"), | ||
| 402 | }; | ||
| 403 | |||
| 404 | /* VPLL2 for digital video outputs */ | ||
| 405 | static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = { | ||
| 406 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
| 407 | }; | ||
| 408 | |||
| 409 | static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = { | ||
| 410 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | ||
| 411 | }; | ||
| 412 | |||
| 413 | static struct regulator_consumer_supply sdp3430_vsim_supplies[] = { | ||
| 414 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), | ||
| 415 | }; | ||
| 416 | |||
| 417 | static struct regulator_consumer_supply sdp3430_vmmc2_supplies[] = { | ||
| 418 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), | ||
| 419 | }; | ||
| 420 | |||
| 430 | /* | 421 | /* |
| 431 | * Apply all the fixed voltages since most versions of U-Boot | 422 | * Apply all the fixed voltages since most versions of U-Boot |
| 432 | * don't bother with that initialization. | 423 | * don't bother with that initialization. |
| @@ -469,6 +460,8 @@ static struct regulator_init_data sdp3430_vaux3 = { | |||
| 469 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 460 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 470 | | REGULATOR_CHANGE_STATUS, | 461 | | REGULATOR_CHANGE_STATUS, |
| 471 | }, | 462 | }, |
| 463 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vaux3_supplies), | ||
| 464 | .consumer_supplies = sdp3430_vaux3_supplies, | ||
| 472 | }; | 465 | }; |
| 473 | 466 | ||
| 474 | /* VAUX4 for OMAP VDD_CSI2 (camera) */ | 467 | /* VAUX4 for OMAP VDD_CSI2 (camera) */ |
| @@ -495,8 +488,8 @@ static struct regulator_init_data sdp3430_vmmc1 = { | |||
| 495 | | REGULATOR_CHANGE_MODE | 488 | | REGULATOR_CHANGE_MODE |
| 496 | | REGULATOR_CHANGE_STATUS, | 489 | | REGULATOR_CHANGE_STATUS, |
| 497 | }, | 490 | }, |
| 498 | .num_consumer_supplies = 1, | 491 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vmmc1_supplies), |
| 499 | .consumer_supplies = &sdp3430_vmmc1_supply, | 492 | .consumer_supplies = sdp3430_vmmc1_supplies, |
| 500 | }; | 493 | }; |
| 501 | 494 | ||
| 502 | /* VMMC2 for MMC2 card */ | 495 | /* VMMC2 for MMC2 card */ |
| @@ -510,8 +503,8 @@ static struct regulator_init_data sdp3430_vmmc2 = { | |||
| 510 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 503 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 511 | | REGULATOR_CHANGE_STATUS, | 504 | | REGULATOR_CHANGE_STATUS, |
| 512 | }, | 505 | }, |
| 513 | .num_consumer_supplies = 1, | 506 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vmmc2_supplies), |
| 514 | .consumer_supplies = &sdp3430_vmmc2_supply, | 507 | .consumer_supplies = sdp3430_vmmc2_supplies, |
| 515 | }; | 508 | }; |
| 516 | 509 | ||
| 517 | /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ | 510 | /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ |
| @@ -525,8 +518,8 @@ static struct regulator_init_data sdp3430_vsim = { | |||
| 525 | | REGULATOR_CHANGE_MODE | 518 | | REGULATOR_CHANGE_MODE |
| 526 | | REGULATOR_CHANGE_STATUS, | 519 | | REGULATOR_CHANGE_STATUS, |
| 527 | }, | 520 | }, |
| 528 | .num_consumer_supplies = 1, | 521 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vsim_supplies), |
| 529 | .consumer_supplies = &sdp3430_vsim_supply, | 522 | .consumer_supplies = sdp3430_vsim_supplies, |
| 530 | }; | 523 | }; |
| 531 | 524 | ||
| 532 | /* VDAC for DSS driving S-Video */ | 525 | /* VDAC for DSS driving S-Video */ |
| @@ -540,16 +533,8 @@ static struct regulator_init_data sdp3430_vdac = { | |||
| 540 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 533 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 541 | | REGULATOR_CHANGE_STATUS, | 534 | | REGULATOR_CHANGE_STATUS, |
| 542 | }, | 535 | }, |
| 543 | .num_consumer_supplies = 1, | 536 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vdda_dac_supplies), |
| 544 | .consumer_supplies = &sdp3430_vdda_dac_supply, | 537 | .consumer_supplies = sdp3430_vdda_dac_supplies, |
| 545 | }; | ||
| 546 | |||
| 547 | /* VPLL2 for digital video outputs */ | ||
| 548 | static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = { | ||
| 549 | { | ||
| 550 | .supply = "vdds_dsi", | ||
| 551 | .dev = &sdp3430_dss_device.dev, | ||
| 552 | } | ||
| 553 | }; | 538 | }; |
| 554 | 539 | ||
| 555 | static struct regulator_init_data sdp3430_vpll2 = { | 540 | static struct regulator_init_data sdp3430_vpll2 = { |
| @@ -567,9 +552,7 @@ static struct regulator_init_data sdp3430_vpll2 = { | |||
| 567 | .consumer_supplies = sdp3430_vpll2_supplies, | 552 | .consumer_supplies = sdp3430_vpll2_supplies, |
| 568 | }; | 553 | }; |
| 569 | 554 | ||
| 570 | static struct twl4030_codec_audio_data sdp3430_audio = { | 555 | static struct twl4030_codec_audio_data sdp3430_audio; |
| 571 | .audio_mclk = 26000000, | ||
| 572 | }; | ||
| 573 | 556 | ||
| 574 | static struct twl4030_codec_data sdp3430_codec = { | 557 | static struct twl4030_codec_data sdp3430_codec = { |
| 575 | .audio_mclk = 26000000, | 558 | .audio_mclk = 26000000, |
| @@ -800,8 +783,11 @@ static struct omap_musb_board_data musb_board_data = { | |||
| 800 | static void __init omap_3430sdp_init(void) | 783 | static void __init omap_3430sdp_init(void) |
| 801 | { | 784 | { |
| 802 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 785 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
| 786 | omap_board_config = sdp3430_config; | ||
| 787 | omap_board_config_size = ARRAY_SIZE(sdp3430_config); | ||
| 788 | omap3_pm_init_cpuidle(omap3_cpuidle_params_table); | ||
| 803 | omap3430_i2c_init(); | 789 | omap3430_i2c_init(); |
| 804 | platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices)); | 790 | omap_display_init(&sdp3430_dss_data); |
| 805 | if (omap_rev() > OMAP3430_REV_ES1_0) | 791 | if (omap_rev() > OMAP3430_REV_ES1_0) |
| 806 | ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2; | 792 | ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2; |
| 807 | else | 793 | else |
| @@ -813,7 +799,7 @@ static void __init omap_3430sdp_init(void) | |||
| 813 | omap_serial_init(); | 799 | omap_serial_init(); |
| 814 | usb_musb_init(&musb_board_data); | 800 | usb_musb_init(&musb_board_data); |
| 815 | board_smc91x_init(); | 801 | board_smc91x_init(); |
| 816 | board_flash_init(sdp_flash_partitions, chip_sel_3430); | 802 | board_flash_init(sdp_flash_partitions, chip_sel_3430, 0); |
| 817 | sdp3430_display_init(); | 803 | sdp3430_display_init(); |
| 818 | enable_board_wakeup_source(); | 804 | enable_board_wakeup_source(); |
| 819 | usb_ehci_init(&ehci_pdata); | 805 | usb_ehci_init(&ehci_pdata); |
| @@ -822,9 +808,10 @@ static void __init omap_3430sdp_init(void) | |||
| 822 | MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") | 808 | MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") |
| 823 | /* Maintainer: Syed Khasim - Texas Instruments Inc */ | 809 | /* Maintainer: Syed Khasim - Texas Instruments Inc */ |
| 824 | .boot_params = 0x80000100, | 810 | .boot_params = 0x80000100, |
| 825 | .map_io = omap3_map_io, | ||
| 826 | .reserve = omap_reserve, | 811 | .reserve = omap_reserve, |
| 827 | .init_irq = omap_3430sdp_init_irq, | 812 | .map_io = omap3_map_io, |
| 813 | .init_early = omap_3430sdp_init_early, | ||
| 814 | .init_irq = omap_init_irq, | ||
| 828 | .init_machine = omap_3430sdp_init, | 815 | .init_machine = omap_3430sdp_init, |
| 829 | .timer = &omap_timer, | 816 | .timer = &omap_timer, |
| 830 | MACHINE_END | 817 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index 62645640f5e4..c4e22b32e47f 100644 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
| 12 | #include <linux/input.h> | 12 | #include <linux/input.h> |
| 13 | #include <linux/gpio.h> | 13 | #include <linux/gpio.h> |
| 14 | #include <linux/mtd/nand.h> | ||
| 14 | 15 | ||
| 15 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
| 16 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
| @@ -69,14 +70,11 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | |||
| 69 | static struct omap_board_config_kernel sdp_config[] __initdata = { | 70 | static struct omap_board_config_kernel sdp_config[] __initdata = { |
| 70 | }; | 71 | }; |
| 71 | 72 | ||
| 72 | static void __init omap_sdp_init_irq(void) | 73 | static void __init omap_sdp_init_early(void) |
| 73 | { | 74 | { |
| 74 | omap_board_config = sdp_config; | ||
| 75 | omap_board_config_size = ARRAY_SIZE(sdp_config); | ||
| 76 | omap2_init_common_infrastructure(); | 75 | omap2_init_common_infrastructure(); |
| 77 | omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params, | 76 | omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params, |
| 78 | h8mbx00u0mer0em_sdrc_params); | 77 | h8mbx00u0mer0em_sdrc_params); |
| 79 | omap_init_irq(); | ||
| 80 | } | 78 | } |
| 81 | 79 | ||
| 82 | #ifdef CONFIG_OMAP_MUX | 80 | #ifdef CONFIG_OMAP_MUX |
| @@ -206,19 +204,22 @@ static struct flash_partitions sdp_flash_partitions[] = { | |||
| 206 | static void __init omap_sdp_init(void) | 204 | static void __init omap_sdp_init(void) |
| 207 | { | 205 | { |
| 208 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); | 206 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); |
| 207 | omap_board_config = sdp_config; | ||
| 208 | omap_board_config_size = ARRAY_SIZE(sdp_config); | ||
| 209 | zoom_peripherals_init(); | 209 | zoom_peripherals_init(); |
| 210 | zoom_display_init(); | 210 | zoom_display_init(); |
| 211 | board_smc91x_init(); | 211 | board_smc91x_init(); |
| 212 | board_flash_init(sdp_flash_partitions, chip_sel_sdp); | 212 | board_flash_init(sdp_flash_partitions, chip_sel_sdp, NAND_BUSWIDTH_16); |
| 213 | enable_board_wakeup_source(); | 213 | enable_board_wakeup_source(); |
| 214 | usb_ehci_init(&ehci_pdata); | 214 | usb_ehci_init(&ehci_pdata); |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") | 217 | MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") |
| 218 | .boot_params = 0x80000100, | 218 | .boot_params = 0x80000100, |
| 219 | .map_io = omap3_map_io, | ||
| 220 | .reserve = omap_reserve, | 219 | .reserve = omap_reserve, |
| 221 | .init_irq = omap_sdp_init_irq, | 220 | .map_io = omap3_map_io, |
| 221 | .init_early = omap_sdp_init_early, | ||
| 222 | .init_irq = omap_init_irq, | ||
| 222 | .init_machine = omap_sdp_init, | 223 | .init_machine = omap_sdp_init, |
| 223 | .timer = &omap_timer, | 224 | .timer = &omap_timer, |
| 224 | MACHINE_END | 225 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 07d1b20b1148..85805d432e38 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <plat/common.h> | 35 | #include <plat/common.h> |
| 36 | #include <plat/usb.h> | 36 | #include <plat/usb.h> |
| 37 | #include <plat/mmc.h> | 37 | #include <plat/mmc.h> |
| 38 | #include <plat/omap4-keypad.h> | ||
| 38 | 39 | ||
| 39 | #include "mux.h" | 40 | #include "mux.h" |
| 40 | #include "hsmmc.h" | 41 | #include "hsmmc.h" |
| @@ -44,10 +45,93 @@ | |||
| 44 | #define ETH_KS8851_IRQ 34 | 45 | #define ETH_KS8851_IRQ 34 |
| 45 | #define ETH_KS8851_POWER_ON 48 | 46 | #define ETH_KS8851_POWER_ON 48 |
| 46 | #define ETH_KS8851_QUART 138 | 47 | #define ETH_KS8851_QUART 138 |
| 47 | #define OMAP4SDP_MDM_PWR_EN_GPIO 157 | ||
| 48 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 | 48 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 |
| 49 | #define OMAP4_SFH7741_ENABLE_GPIO 188 | 49 | #define OMAP4_SFH7741_ENABLE_GPIO 188 |
| 50 | 50 | ||
| 51 | static const int sdp4430_keymap[] = { | ||
| 52 | KEY(0, 0, KEY_E), | ||
| 53 | KEY(0, 1, KEY_R), | ||
| 54 | KEY(0, 2, KEY_T), | ||
| 55 | KEY(0, 3, KEY_HOME), | ||
| 56 | KEY(0, 4, KEY_F5), | ||
| 57 | KEY(0, 5, KEY_UNKNOWN), | ||
| 58 | KEY(0, 6, KEY_I), | ||
| 59 | KEY(0, 7, KEY_LEFTSHIFT), | ||
| 60 | |||
| 61 | KEY(1, 0, KEY_D), | ||
| 62 | KEY(1, 1, KEY_F), | ||
| 63 | KEY(1, 2, KEY_G), | ||
| 64 | KEY(1, 3, KEY_SEND), | ||
| 65 | KEY(1, 4, KEY_F6), | ||
| 66 | KEY(1, 5, KEY_UNKNOWN), | ||
| 67 | KEY(1, 6, KEY_K), | ||
| 68 | KEY(1, 7, KEY_ENTER), | ||
| 69 | |||
| 70 | KEY(2, 0, KEY_X), | ||
| 71 | KEY(2, 1, KEY_C), | ||
| 72 | KEY(2, 2, KEY_V), | ||
| 73 | KEY(2, 3, KEY_END), | ||
| 74 | KEY(2, 4, KEY_F7), | ||
| 75 | KEY(2, 5, KEY_UNKNOWN), | ||
| 76 | KEY(2, 6, KEY_DOT), | ||
| 77 | KEY(2, 7, KEY_CAPSLOCK), | ||
| 78 | |||
| 79 | KEY(3, 0, KEY_Z), | ||
| 80 | KEY(3, 1, KEY_KPPLUS), | ||
| 81 | KEY(3, 2, KEY_B), | ||
| 82 | KEY(3, 3, KEY_F1), | ||
| 83 | KEY(3, 4, KEY_F8), | ||
| 84 | KEY(3, 5, KEY_UNKNOWN), | ||
| 85 | KEY(3, 6, KEY_O), | ||
| 86 | KEY(3, 7, KEY_SPACE), | ||
| 87 | |||
| 88 | KEY(4, 0, KEY_W), | ||
| 89 | KEY(4, 1, KEY_Y), | ||
| 90 | KEY(4, 2, KEY_U), | ||
| 91 | KEY(4, 3, KEY_F2), | ||
| 92 | KEY(4, 4, KEY_VOLUMEUP), | ||
| 93 | KEY(4, 5, KEY_UNKNOWN), | ||
| 94 | KEY(4, 6, KEY_L), | ||
| 95 | KEY(4, 7, KEY_LEFT), | ||
| 96 | |||
| 97 | KEY(5, 0, KEY_S), | ||
| 98 | KEY(5, 1, KEY_H), | ||
| 99 | KEY(5, 2, KEY_J), | ||
| 100 | KEY(5, 3, KEY_F3), | ||
| 101 | KEY(5, 4, KEY_F9), | ||
| 102 | KEY(5, 5, KEY_VOLUMEDOWN), | ||
| 103 | KEY(5, 6, KEY_M), | ||
| 104 | KEY(5, 7, KEY_RIGHT), | ||
| 105 | |||
| 106 | KEY(6, 0, KEY_Q), | ||
| 107 | KEY(6, 1, KEY_A), | ||
| 108 | KEY(6, 2, KEY_N), | ||
| 109 | KEY(6, 3, KEY_BACK), | ||
| 110 | KEY(6, 4, KEY_BACKSPACE), | ||
| 111 | KEY(6, 5, KEY_UNKNOWN), | ||
| 112 | KEY(6, 6, KEY_P), | ||
| 113 | KEY(6, 7, KEY_UP), | ||
| 114 | |||
| 115 | KEY(7, 0, KEY_PROG1), | ||
| 116 | KEY(7, 1, KEY_PROG2), | ||
| 117 | KEY(7, 2, KEY_PROG3), | ||
| 118 | KEY(7, 3, KEY_PROG4), | ||
| 119 | KEY(7, 4, KEY_F4), | ||
| 120 | KEY(7, 5, KEY_UNKNOWN), | ||
| 121 | KEY(7, 6, KEY_OK), | ||
| 122 | KEY(7, 7, KEY_DOWN), | ||
| 123 | }; | ||
| 124 | |||
| 125 | static struct matrix_keymap_data sdp4430_keymap_data = { | ||
| 126 | .keymap = sdp4430_keymap, | ||
| 127 | .keymap_size = ARRAY_SIZE(sdp4430_keymap), | ||
| 128 | }; | ||
| 129 | |||
| 130 | static struct omap4_keypad_platform_data sdp4430_keypad_data = { | ||
| 131 | .keymap_data = &sdp4430_keymap_data, | ||
| 132 | .rows = 8, | ||
| 133 | .cols = 8, | ||
| 134 | }; | ||
| 51 | static struct gpio_led sdp4430_gpio_leds[] = { | 135 | static struct gpio_led sdp4430_gpio_leds[] = { |
| 52 | { | 136 | { |
| 53 | .name = "omap4:green:debug0", | 137 | .name = "omap4:green:debug0", |
| @@ -239,28 +323,15 @@ static struct omap_board_config_kernel sdp4430_config[] __initdata = { | |||
| 239 | { OMAP_TAG_LCD, &sdp4430_lcd_config }, | 323 | { OMAP_TAG_LCD, &sdp4430_lcd_config }, |
| 240 | }; | 324 | }; |
| 241 | 325 | ||
| 242 | static void __init omap_4430sdp_init_irq(void) | 326 | static void __init omap_4430sdp_init_early(void) |
| 243 | { | 327 | { |
| 244 | omap_board_config = sdp4430_config; | ||
| 245 | omap_board_config_size = ARRAY_SIZE(sdp4430_config); | ||
| 246 | omap2_init_common_infrastructure(); | 328 | omap2_init_common_infrastructure(); |
| 247 | omap2_init_common_devices(NULL, NULL); | 329 | omap2_init_common_devices(NULL, NULL); |
| 248 | #ifdef CONFIG_OMAP_32K_TIMER | 330 | #ifdef CONFIG_OMAP_32K_TIMER |
| 249 | omap2_gp_clockevent_set_gptimer(1); | 331 | omap2_gp_clockevent_set_gptimer(1); |
| 250 | #endif | 332 | #endif |
| 251 | gic_init_irq(); | ||
| 252 | } | 333 | } |
| 253 | 334 | ||
| 254 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | ||
| 255 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | ||
| 256 | .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
| 257 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
| 258 | .phy_reset = false, | ||
| 259 | .reset_gpio_port[0] = -EINVAL, | ||
| 260 | .reset_gpio_port[1] = -EINVAL, | ||
| 261 | .reset_gpio_port[2] = -EINVAL, | ||
| 262 | }; | ||
| 263 | |||
| 264 | static struct omap_musb_board_data musb_board_data = { | 335 | static struct omap_musb_board_data musb_board_data = { |
| 265 | .interface_type = MUSB_INTERFACE_UTMI, | 336 | .interface_type = MUSB_INTERFACE_UTMI, |
| 266 | .mode = MUSB_OTG, | 337 | .mode = MUSB_OTG, |
| @@ -276,11 +347,6 @@ static struct twl4030_usb_data omap4_usbphy_data = { | |||
| 276 | 347 | ||
| 277 | static struct omap2_hsmmc_info mmc[] = { | 348 | static struct omap2_hsmmc_info mmc[] = { |
| 278 | { | 349 | { |
| 279 | .mmc = 1, | ||
| 280 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, | ||
| 281 | .gpio_wp = -EINVAL, | ||
| 282 | }, | ||
| 283 | { | ||
| 284 | .mmc = 2, | 350 | .mmc = 2, |
| 285 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, | 351 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, |
| 286 | .gpio_cd = -EINVAL, | 352 | .gpio_cd = -EINVAL, |
| @@ -288,19 +354,24 @@ static struct omap2_hsmmc_info mmc[] = { | |||
| 288 | .nonremovable = true, | 354 | .nonremovable = true, |
| 289 | .ocr_mask = MMC_VDD_29_30, | 355 | .ocr_mask = MMC_VDD_29_30, |
| 290 | }, | 356 | }, |
| 357 | { | ||
| 358 | .mmc = 1, | ||
| 359 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, | ||
| 360 | .gpio_wp = -EINVAL, | ||
| 361 | }, | ||
| 291 | {} /* Terminator */ | 362 | {} /* Terminator */ |
| 292 | }; | 363 | }; |
| 293 | 364 | ||
| 294 | static struct regulator_consumer_supply sdp4430_vaux_supply[] = { | 365 | static struct regulator_consumer_supply sdp4430_vaux_supply[] = { |
| 295 | { | 366 | { |
| 296 | .supply = "vmmc", | 367 | .supply = "vmmc", |
| 297 | .dev_name = "mmci-omap-hs.1", | 368 | .dev_name = "omap_hsmmc.1", |
| 298 | }, | 369 | }, |
| 299 | }; | 370 | }; |
| 300 | static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { | 371 | static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { |
| 301 | { | 372 | { |
| 302 | .supply = "vmmc", | 373 | .supply = "vmmc", |
| 303 | .dev_name = "mmci-omap-hs.0", | 374 | .dev_name = "omap_hsmmc.0", |
| 304 | }, | 375 | }, |
| 305 | }; | 376 | }; |
| 306 | 377 | ||
| @@ -434,7 +505,6 @@ static struct regulator_init_data sdp4430_vana = { | |||
| 434 | .constraints = { | 505 | .constraints = { |
| 435 | .min_uV = 2100000, | 506 | .min_uV = 2100000, |
| 436 | .max_uV = 2100000, | 507 | .max_uV = 2100000, |
| 437 | .apply_uV = true, | ||
| 438 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 508 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 439 | | REGULATOR_MODE_STANDBY, | 509 | | REGULATOR_MODE_STANDBY, |
| 440 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 510 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| @@ -446,7 +516,6 @@ static struct regulator_init_data sdp4430_vcxio = { | |||
| 446 | .constraints = { | 516 | .constraints = { |
| 447 | .min_uV = 1800000, | 517 | .min_uV = 1800000, |
| 448 | .max_uV = 1800000, | 518 | .max_uV = 1800000, |
| 449 | .apply_uV = true, | ||
| 450 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 519 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 451 | | REGULATOR_MODE_STANDBY, | 520 | | REGULATOR_MODE_STANDBY, |
| 452 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 521 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| @@ -458,7 +527,6 @@ static struct regulator_init_data sdp4430_vdac = { | |||
| 458 | .constraints = { | 527 | .constraints = { |
| 459 | .min_uV = 1800000, | 528 | .min_uV = 1800000, |
| 460 | .max_uV = 1800000, | 529 | .max_uV = 1800000, |
| 461 | .apply_uV = true, | ||
| 462 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 530 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 463 | | REGULATOR_MODE_STANDBY, | 531 | | REGULATOR_MODE_STANDBY, |
| 464 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 532 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| @@ -570,20 +638,15 @@ static void __init omap_4430sdp_init(void) | |||
| 570 | package = OMAP_PACKAGE_CBL; | 638 | package = OMAP_PACKAGE_CBL; |
| 571 | omap4_mux_init(board_mux, package); | 639 | omap4_mux_init(board_mux, package); |
| 572 | 640 | ||
| 641 | omap_board_config = sdp4430_config; | ||
| 642 | omap_board_config_size = ARRAY_SIZE(sdp4430_config); | ||
| 643 | |||
| 573 | omap4_i2c_init(); | 644 | omap4_i2c_init(); |
| 574 | omap_sfh7741prox_init(); | 645 | omap_sfh7741prox_init(); |
| 575 | platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); | 646 | platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); |
| 576 | omap_serial_init(); | 647 | omap_serial_init(); |
| 577 | omap4_twl6030_hsmmc_init(mmc); | 648 | omap4_twl6030_hsmmc_init(mmc); |
| 578 | 649 | ||
| 579 | /* Power on the ULPI PHY */ | ||
| 580 | status = gpio_request(OMAP4SDP_MDM_PWR_EN_GPIO, "USBB1 PHY VMDM_3V3"); | ||
| 581 | if (status) | ||
| 582 | pr_err("%s: Could not get USBB1 PHY GPIO\n", __func__); | ||
| 583 | else | ||
| 584 | gpio_direction_output(OMAP4SDP_MDM_PWR_EN_GPIO, 1); | ||
| 585 | |||
| 586 | usb_ehci_init(&ehci_pdata); | ||
| 587 | usb_musb_init(&musb_board_data); | 650 | usb_musb_init(&musb_board_data); |
| 588 | 651 | ||
| 589 | status = omap_ethernet_init(); | 652 | status = omap_ethernet_init(); |
| @@ -594,6 +657,10 @@ static void __init omap_4430sdp_init(void) | |||
| 594 | spi_register_board_info(sdp4430_spi_board_info, | 657 | spi_register_board_info(sdp4430_spi_board_info, |
| 595 | ARRAY_SIZE(sdp4430_spi_board_info)); | 658 | ARRAY_SIZE(sdp4430_spi_board_info)); |
| 596 | } | 659 | } |
| 660 | |||
| 661 | status = omap4_keyboard_init(&sdp4430_keypad_data); | ||
| 662 | if (status) | ||
| 663 | pr_err("Keypad initialization failed: %d\n", status); | ||
| 597 | } | 664 | } |
| 598 | 665 | ||
| 599 | static void __init omap_4430sdp_map_io(void) | 666 | static void __init omap_4430sdp_map_io(void) |
| @@ -605,9 +672,10 @@ static void __init omap_4430sdp_map_io(void) | |||
| 605 | MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") | 672 | MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") |
| 606 | /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ | 673 | /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ |
| 607 | .boot_params = 0x80000100, | 674 | .boot_params = 0x80000100, |
| 608 | .map_io = omap_4430sdp_map_io, | ||
| 609 | .reserve = omap_reserve, | 675 | .reserve = omap_reserve, |
| 610 | .init_irq = omap_4430sdp_init_irq, | 676 | .map_io = omap_4430sdp_map_io, |
| 677 | .init_early = omap_4430sdp_init_early, | ||
| 678 | .init_irq = gic_init_irq, | ||
| 611 | .init_machine = omap_4430sdp_init, | 679 | .init_machine = omap_4430sdp_init, |
| 612 | .timer = &omap_timer, | 680 | .timer = &omap_timer, |
| 613 | MACHINE_END | 681 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c index 71acb5ab281c..f53bbb2c3478 100644 --- a/arch/arm/mach-omap2/board-am3517crane.c +++ b/arch/arm/mach-omap2/board-am3517crane.c | |||
| @@ -49,14 +49,10 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
| 49 | #define board_mux NULL | 49 | #define board_mux NULL |
| 50 | #endif | 50 | #endif |
| 51 | 51 | ||
| 52 | static void __init am3517_crane_init_irq(void) | 52 | static void __init am3517_crane_init_early(void) |
| 53 | { | 53 | { |
| 54 | omap_board_config = am3517_crane_config; | ||
| 55 | omap_board_config_size = ARRAY_SIZE(am3517_crane_config); | ||
| 56 | |||
| 57 | omap2_init_common_infrastructure(); | 54 | omap2_init_common_infrastructure(); |
| 58 | omap2_init_common_devices(NULL, NULL); | 55 | omap2_init_common_devices(NULL, NULL); |
| 59 | omap_init_irq(); | ||
| 60 | } | 56 | } |
| 61 | 57 | ||
| 62 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { | 58 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { |
| @@ -77,6 +73,9 @@ static void __init am3517_crane_init(void) | |||
| 77 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 73 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
| 78 | omap_serial_init(); | 74 | omap_serial_init(); |
| 79 | 75 | ||
| 76 | omap_board_config = am3517_crane_config; | ||
| 77 | omap_board_config_size = ARRAY_SIZE(am3517_crane_config); | ||
| 78 | |||
| 80 | /* Configure GPIO for EHCI port */ | 79 | /* Configure GPIO for EHCI port */ |
| 81 | if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) { | 80 | if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) { |
| 82 | pr_err("Can not configure mux for GPIO_USB_NRESET %d\n", | 81 | pr_err("Can not configure mux for GPIO_USB_NRESET %d\n", |
| @@ -108,9 +107,10 @@ static void __init am3517_crane_init(void) | |||
| 108 | 107 | ||
| 109 | MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD") | 108 | MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD") |
| 110 | .boot_params = 0x80000100, | 109 | .boot_params = 0x80000100, |
| 111 | .map_io = omap3_map_io, | ||
| 112 | .reserve = omap_reserve, | 110 | .reserve = omap_reserve, |
| 113 | .init_irq = am3517_crane_init_irq, | 111 | .map_io = omap3_map_io, |
| 112 | .init_early = am3517_crane_init_early, | ||
| 113 | .init_irq = omap_init_irq, | ||
| 114 | .init_machine = am3517_crane_init, | 114 | .init_machine = am3517_crane_init, |
| 115 | .timer = &omap_timer, | 115 | .timer = &omap_timer, |
| 116 | MACHINE_END | 116 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 10d60b7743cf..77541cf59bd4 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
| @@ -200,6 +200,9 @@ static struct pca953x_platform_data am3517evm_gpio_expander_info_0 = { | |||
| 200 | }; | 200 | }; |
| 201 | static struct i2c_board_info __initdata am3517evm_i2c2_boardinfo[] = { | 201 | static struct i2c_board_info __initdata am3517evm_i2c2_boardinfo[] = { |
| 202 | { | 202 | { |
| 203 | I2C_BOARD_INFO("tlv320aic23", 0x1A), | ||
| 204 | }, | ||
| 205 | { | ||
| 203 | I2C_BOARD_INFO("tca6416", 0x21), | 206 | I2C_BOARD_INFO("tca6416", 0x21), |
| 204 | .platform_data = &am3517evm_gpio_expander_info_0, | 207 | .platform_data = &am3517evm_gpio_expander_info_0, |
| 205 | }, | 208 | }, |
| @@ -378,37 +381,23 @@ static struct omap_dss_board_info am3517_evm_dss_data = { | |||
| 378 | .default_device = &am3517_evm_lcd_device, | 381 | .default_device = &am3517_evm_lcd_device, |
| 379 | }; | 382 | }; |
| 380 | 383 | ||
| 381 | static struct platform_device am3517_evm_dss_device = { | ||
| 382 | .name = "omapdss", | ||
| 383 | .id = -1, | ||
| 384 | .dev = { | ||
| 385 | .platform_data = &am3517_evm_dss_data, | ||
| 386 | }, | ||
| 387 | }; | ||
| 388 | |||
| 389 | /* | 384 | /* |
| 390 | * Board initialization | 385 | * Board initialization |
| 391 | */ | 386 | */ |
| 392 | static struct omap_board_config_kernel am3517_evm_config[] __initdata = { | 387 | static void __init am3517_evm_init_early(void) |
| 393 | }; | ||
| 394 | |||
| 395 | static struct platform_device *am3517_evm_devices[] __initdata = { | ||
| 396 | &am3517_evm_dss_device, | ||
| 397 | }; | ||
| 398 | |||
| 399 | static void __init am3517_evm_init_irq(void) | ||
| 400 | { | 388 | { |
| 401 | omap_board_config = am3517_evm_config; | ||
| 402 | omap_board_config_size = ARRAY_SIZE(am3517_evm_config); | ||
| 403 | omap2_init_common_infrastructure(); | 389 | omap2_init_common_infrastructure(); |
| 404 | omap2_init_common_devices(NULL, NULL); | 390 | omap2_init_common_devices(NULL, NULL); |
| 405 | omap_init_irq(); | ||
| 406 | } | 391 | } |
| 407 | 392 | ||
| 408 | static struct omap_musb_board_data musb_board_data = { | 393 | static struct omap_musb_board_data musb_board_data = { |
| 409 | .interface_type = MUSB_INTERFACE_ULPI, | 394 | .interface_type = MUSB_INTERFACE_ULPI, |
| 410 | .mode = MUSB_OTG, | 395 | .mode = MUSB_OTG, |
| 411 | .power = 500, | 396 | .power = 500, |
| 397 | .set_phy_power = am35x_musb_phy_power, | ||
| 398 | .clear_irq = am35x_musb_clear_irq, | ||
| 399 | .set_mode = am35x_musb_set_mode, | ||
| 400 | .reset = am35x_musb_reset, | ||
| 412 | }; | 401 | }; |
| 413 | 402 | ||
| 414 | static __init void am3517_evm_musb_init(void) | 403 | static __init void am3517_evm_musb_init(void) |
| @@ -490,14 +479,17 @@ static void am3517_evm_hecc_init(struct ti_hecc_platform_data *pdata) | |||
| 490 | platform_device_register(&am3517_hecc_device); | 479 | platform_device_register(&am3517_hecc_device); |
| 491 | } | 480 | } |
| 492 | 481 | ||
| 482 | static struct omap_board_config_kernel am3517_evm_config[] __initdata = { | ||
| 483 | }; | ||
| 484 | |||
| 493 | static void __init am3517_evm_init(void) | 485 | static void __init am3517_evm_init(void) |
| 494 | { | 486 | { |
| 487 | omap_board_config = am3517_evm_config; | ||
| 488 | omap_board_config_size = ARRAY_SIZE(am3517_evm_config); | ||
| 495 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 489 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
| 496 | 490 | ||
| 497 | am3517_evm_i2c_init(); | 491 | am3517_evm_i2c_init(); |
| 498 | platform_add_devices(am3517_evm_devices, | 492 | omap_display_init(&am3517_evm_dss_data); |
| 499 | ARRAY_SIZE(am3517_evm_devices)); | ||
| 500 | |||
| 501 | omap_serial_init(); | 493 | omap_serial_init(); |
| 502 | 494 | ||
| 503 | /* Configure GPIO for EHCI port */ | 495 | /* Configure GPIO for EHCI port */ |
| @@ -521,9 +513,10 @@ static void __init am3517_evm_init(void) | |||
| 521 | 513 | ||
| 522 | MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") | 514 | MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") |
| 523 | .boot_params = 0x80000100, | 515 | .boot_params = 0x80000100, |
| 524 | .map_io = omap3_map_io, | ||
| 525 | .reserve = omap_reserve, | 516 | .reserve = omap_reserve, |
| 526 | .init_irq = am3517_evm_init_irq, | 517 | .map_io = omap3_map_io, |
| 518 | .init_early = am3517_evm_init_early, | ||
| 519 | .init_irq = omap_init_irq, | ||
| 527 | .init_machine = am3517_evm_init, | 520 | .init_machine = am3517_evm_init, |
| 528 | .timer = &omap_timer, | 521 | .timer = &omap_timer, |
| 529 | MACHINE_END | 522 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index 9f55b68687f7..f4f8374a0298 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c | |||
| @@ -274,13 +274,10 @@ static struct omap_board_config_kernel apollon_config[] __initdata = { | |||
| 274 | { OMAP_TAG_LCD, &apollon_lcd_config }, | 274 | { OMAP_TAG_LCD, &apollon_lcd_config }, |
| 275 | }; | 275 | }; |
| 276 | 276 | ||
| 277 | static void __init omap_apollon_init_irq(void) | 277 | static void __init omap_apollon_init_early(void) |
| 278 | { | 278 | { |
| 279 | omap_board_config = apollon_config; | ||
| 280 | omap_board_config_size = ARRAY_SIZE(apollon_config); | ||
| 281 | omap2_init_common_infrastructure(); | 279 | omap2_init_common_infrastructure(); |
| 282 | omap2_init_common_devices(NULL, NULL); | 280 | omap2_init_common_devices(NULL, NULL); |
| 283 | omap_init_irq(); | ||
| 284 | } | 281 | } |
| 285 | 282 | ||
| 286 | static void __init apollon_led_init(void) | 283 | static void __init apollon_led_init(void) |
| @@ -320,6 +317,8 @@ static void __init omap_apollon_init(void) | |||
| 320 | u32 v; | 317 | u32 v; |
| 321 | 318 | ||
| 322 | omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC); | 319 | omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC); |
| 320 | omap_board_config = apollon_config; | ||
| 321 | omap_board_config_size = ARRAY_SIZE(apollon_config); | ||
| 323 | 322 | ||
| 324 | apollon_init_smc91x(); | 323 | apollon_init_smc91x(); |
| 325 | apollon_led_init(); | 324 | apollon_led_init(); |
| @@ -355,9 +354,10 @@ static void __init omap_apollon_map_io(void) | |||
| 355 | MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") | 354 | MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") |
| 356 | /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */ | 355 | /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */ |
| 357 | .boot_params = 0x80000100, | 356 | .boot_params = 0x80000100, |
| 358 | .map_io = omap_apollon_map_io, | ||
| 359 | .reserve = omap_reserve, | 357 | .reserve = omap_reserve, |
| 360 | .init_irq = omap_apollon_init_irq, | 358 | .map_io = omap_apollon_map_io, |
| 359 | .init_early = omap_apollon_init_early, | ||
| 360 | .init_irq = omap_init_irq, | ||
| 361 | .init_machine = omap_apollon_init, | 361 | .init_machine = omap_apollon_init, |
| 362 | .timer = &omap_timer, | 362 | .timer = &omap_timer, |
| 363 | MACHINE_END | 363 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index dac141610666..27bea540ccbb 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
| @@ -401,14 +401,6 @@ static struct omap_dss_board_info cm_t35_dss_data = { | |||
| 401 | .default_device = &cm_t35_dvi_device, | 401 | .default_device = &cm_t35_dvi_device, |
| 402 | }; | 402 | }; |
| 403 | 403 | ||
| 404 | static struct platform_device cm_t35_dss_device = { | ||
| 405 | .name = "omapdss", | ||
| 406 | .id = -1, | ||
| 407 | .dev = { | ||
| 408 | .platform_data = &cm_t35_dss_data, | ||
| 409 | }, | ||
| 410 | }; | ||
| 411 | |||
| 412 | static struct omap2_mcspi_device_config tdo24m_mcspi_config = { | 404 | static struct omap2_mcspi_device_config tdo24m_mcspi_config = { |
| 413 | .turbo_mode = 0, | 405 | .turbo_mode = 0, |
| 414 | .single_channel = 1, /* 0: slave, 1: master */ | 406 | .single_channel = 1, /* 0: slave, 1: master */ |
| @@ -468,7 +460,7 @@ static void __init cm_t35_init_display(void) | |||
| 468 | msleep(50); | 460 | msleep(50); |
| 469 | gpio_set_value(lcd_en_gpio, 1); | 461 | gpio_set_value(lcd_en_gpio, 1); |
| 470 | 462 | ||
| 471 | err = platform_device_register(&cm_t35_dss_device); | 463 | err = omap_display_init(&cm_t35_dss_data); |
| 472 | if (err) { | 464 | if (err) { |
| 473 | pr_err("CM-T35: failed to register DSS device\n"); | 465 | pr_err("CM-T35: failed to register DSS device\n"); |
| 474 | goto err_dev_reg; | 466 | goto err_dev_reg; |
| @@ -495,15 +487,11 @@ static struct regulator_consumer_supply cm_t35_vsim_supply = { | |||
| 495 | .supply = "vmmc_aux", | 487 | .supply = "vmmc_aux", |
| 496 | }; | 488 | }; |
| 497 | 489 | ||
| 498 | static struct regulator_consumer_supply cm_t35_vdac_supply = { | 490 | static struct regulator_consumer_supply cm_t35_vdac_supply = |
| 499 | .supply = "vdda_dac", | 491 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
| 500 | .dev = &cm_t35_dss_device.dev, | ||
| 501 | }; | ||
| 502 | 492 | ||
| 503 | static struct regulator_consumer_supply cm_t35_vdvi_supply = { | 493 | static struct regulator_consumer_supply cm_t35_vdvi_supply = |
| 504 | .supply = "vdvi", | 494 | REGULATOR_SUPPLY("vdvi", "omapdss"); |
| 505 | .dev = &cm_t35_dss_device.dev, | ||
| 506 | }; | ||
| 507 | 495 | ||
| 508 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 496 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
| 509 | static struct regulator_init_data cm_t35_vmmc1 = { | 497 | static struct regulator_init_data cm_t35_vmmc1 = { |
| @@ -680,18 +668,11 @@ static void __init cm_t35_init_i2c(void) | |||
| 680 | ARRAY_SIZE(cm_t35_i2c_boardinfo)); | 668 | ARRAY_SIZE(cm_t35_i2c_boardinfo)); |
| 681 | } | 669 | } |
| 682 | 670 | ||
| 683 | static struct omap_board_config_kernel cm_t35_config[] __initdata = { | 671 | static void __init cm_t35_init_early(void) |
| 684 | }; | ||
| 685 | |||
| 686 | static void __init cm_t35_init_irq(void) | ||
| 687 | { | 672 | { |
| 688 | omap_board_config = cm_t35_config; | ||
| 689 | omap_board_config_size = ARRAY_SIZE(cm_t35_config); | ||
| 690 | |||
| 691 | omap2_init_common_infrastructure(); | 673 | omap2_init_common_infrastructure(); |
| 692 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, | 674 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, |
| 693 | mt46h32m32lf6_sdrc_params); | 675 | mt46h32m32lf6_sdrc_params); |
| 694 | omap_init_irq(); | ||
| 695 | } | 676 | } |
| 696 | 677 | ||
| 697 | static struct omap_board_mux board_mux[] __initdata = { | 678 | static struct omap_board_mux board_mux[] __initdata = { |
| @@ -798,8 +779,13 @@ static struct omap_musb_board_data musb_board_data = { | |||
| 798 | .power = 100, | 779 | .power = 100, |
| 799 | }; | 780 | }; |
| 800 | 781 | ||
| 782 | static struct omap_board_config_kernel cm_t35_config[] __initdata = { | ||
| 783 | }; | ||
| 784 | |||
| 801 | static void __init cm_t35_init(void) | 785 | static void __init cm_t35_init(void) |
| 802 | { | 786 | { |
| 787 | omap_board_config = cm_t35_config; | ||
| 788 | omap_board_config_size = ARRAY_SIZE(cm_t35_config); | ||
| 803 | omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); | 789 | omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); |
| 804 | omap_serial_init(); | 790 | omap_serial_init(); |
| 805 | cm_t35_init_i2c(); | 791 | cm_t35_init_i2c(); |
| @@ -815,9 +801,10 @@ static void __init cm_t35_init(void) | |||
| 815 | 801 | ||
| 816 | MACHINE_START(CM_T35, "Compulab CM-T35") | 802 | MACHINE_START(CM_T35, "Compulab CM-T35") |
| 817 | .boot_params = 0x80000100, | 803 | .boot_params = 0x80000100, |
| 818 | .map_io = omap3_map_io, | ||
| 819 | .reserve = omap_reserve, | 804 | .reserve = omap_reserve, |
| 820 | .init_irq = cm_t35_init_irq, | 805 | .map_io = omap3_map_io, |
| 806 | .init_early = cm_t35_init_early, | ||
| 807 | .init_irq = omap_init_irq, | ||
| 821 | .init_machine = cm_t35_init, | 808 | .init_machine = cm_t35_init, |
| 822 | .timer = &omap_timer, | 809 | .timer = &omap_timer, |
| 823 | MACHINE_END | 810 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index 8f9a64d650ee..9da6e8240e8b 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
| @@ -254,14 +254,10 @@ static inline void cm_t3517_init_nand(void) {} | |||
| 254 | static struct omap_board_config_kernel cm_t3517_config[] __initdata = { | 254 | static struct omap_board_config_kernel cm_t3517_config[] __initdata = { |
| 255 | }; | 255 | }; |
| 256 | 256 | ||
| 257 | static void __init cm_t3517_init_irq(void) | 257 | static void __init cm_t3517_init_early(void) |
| 258 | { | 258 | { |
| 259 | omap_board_config = cm_t3517_config; | ||
| 260 | omap_board_config_size = ARRAY_SIZE(cm_t3517_config); | ||
| 261 | |||
| 262 | omap2_init_common_infrastructure(); | 259 | omap2_init_common_infrastructure(); |
| 263 | omap2_init_common_devices(NULL, NULL); | 260 | omap2_init_common_devices(NULL, NULL); |
| 264 | omap_init_irq(); | ||
| 265 | } | 261 | } |
| 266 | 262 | ||
| 267 | static struct omap_board_mux board_mux[] __initdata = { | 263 | static struct omap_board_mux board_mux[] __initdata = { |
| @@ -294,6 +290,8 @@ static void __init cm_t3517_init(void) | |||
| 294 | { | 290 | { |
| 295 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 291 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
| 296 | omap_serial_init(); | 292 | omap_serial_init(); |
| 293 | omap_board_config = cm_t3517_config; | ||
| 294 | omap_board_config_size = ARRAY_SIZE(cm_t3517_config); | ||
| 297 | cm_t3517_init_leds(); | 295 | cm_t3517_init_leds(); |
| 298 | cm_t3517_init_nand(); | 296 | cm_t3517_init_nand(); |
| 299 | cm_t3517_init_rtc(); | 297 | cm_t3517_init_rtc(); |
| @@ -303,9 +301,10 @@ static void __init cm_t3517_init(void) | |||
| 303 | 301 | ||
| 304 | MACHINE_START(CM_T3517, "Compulab CM-T3517") | 302 | MACHINE_START(CM_T3517, "Compulab CM-T3517") |
| 305 | .boot_params = 0x80000100, | 303 | .boot_params = 0x80000100, |
| 306 | .map_io = omap3_map_io, | ||
| 307 | .reserve = omap_reserve, | 304 | .reserve = omap_reserve, |
| 308 | .init_irq = cm_t3517_init_irq, | 305 | .map_io = omap3_map_io, |
| 306 | .init_early = cm_t3517_init_early, | ||
| 307 | .init_irq = omap_init_irq, | ||
| 309 | .init_machine = cm_t3517_init, | 308 | .init_machine = cm_t3517_init, |
| 310 | .timer = &omap_timer, | 309 | .timer = &omap_timer, |
| 311 | MACHINE_END | 310 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 9a2a31e011ce..728f27c5bcb1 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
| @@ -140,7 +140,7 @@ static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev) | |||
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | static struct regulator_consumer_supply devkit8000_vmmc1_supply = | 142 | static struct regulator_consumer_supply devkit8000_vmmc1_supply = |
| 143 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); | 143 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); |
| 144 | 144 | ||
| 145 | 145 | ||
| 146 | /* ads7846 on SPI */ | 146 | /* ads7846 on SPI */ |
| @@ -195,14 +195,6 @@ static struct omap_dss_board_info devkit8000_dss_data = { | |||
| 195 | .default_device = &devkit8000_lcd_device, | 195 | .default_device = &devkit8000_lcd_device, |
| 196 | }; | 196 | }; |
| 197 | 197 | ||
| 198 | static struct platform_device devkit8000_dss_device = { | ||
| 199 | .name = "omapdss", | ||
| 200 | .id = -1, | ||
| 201 | .dev = { | ||
| 202 | .platform_data = &devkit8000_dss_data, | ||
| 203 | }, | ||
| 204 | }; | ||
| 205 | |||
| 206 | static struct regulator_consumer_supply devkit8000_vdda_dac_supply = | 198 | static struct regulator_consumer_supply devkit8000_vdda_dac_supply = |
| 207 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); | 199 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
| 208 | 200 | ||
| @@ -350,9 +342,7 @@ static struct twl4030_usb_data devkit8000_usb_data = { | |||
| 350 | .usb_mode = T2_USB_MODE_ULPI, | 342 | .usb_mode = T2_USB_MODE_ULPI, |
| 351 | }; | 343 | }; |
| 352 | 344 | ||
| 353 | static struct twl4030_codec_audio_data devkit8000_audio_data = { | 345 | static struct twl4030_codec_audio_data devkit8000_audio_data; |
| 354 | .audio_mclk = 26000000, | ||
| 355 | }; | ||
| 356 | 346 | ||
| 357 | static struct twl4030_codec_data devkit8000_codec_data = { | 347 | static struct twl4030_codec_data devkit8000_codec_data = { |
| 358 | .audio_mclk = 26000000, | 348 | .audio_mclk = 26000000, |
| @@ -456,11 +446,15 @@ static struct platform_device keys_gpio = { | |||
| 456 | }; | 446 | }; |
| 457 | 447 | ||
| 458 | 448 | ||
| 459 | static void __init devkit8000_init_irq(void) | 449 | static void __init devkit8000_init_early(void) |
| 460 | { | 450 | { |
| 461 | omap2_init_common_infrastructure(); | 451 | omap2_init_common_infrastructure(); |
| 462 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, | 452 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, |
| 463 | mt46h32m32lf6_sdrc_params); | 453 | mt46h32m32lf6_sdrc_params); |
| 454 | } | ||
| 455 | |||
| 456 | static void __init devkit8000_init_irq(void) | ||
| 457 | { | ||
| 464 | omap_init_irq(); | 458 | omap_init_irq(); |
| 465 | #ifdef CONFIG_OMAP_32K_TIMER | 459 | #ifdef CONFIG_OMAP_32K_TIMER |
| 466 | omap2_gp_clockevent_set_gptimer(12); | 460 | omap2_gp_clockevent_set_gptimer(12); |
| @@ -575,7 +569,6 @@ static void __init omap_dm9000_init(void) | |||
| 575 | } | 569 | } |
| 576 | 570 | ||
| 577 | static struct platform_device *devkit8000_devices[] __initdata = { | 571 | static struct platform_device *devkit8000_devices[] __initdata = { |
| 578 | &devkit8000_dss_device, | ||
| 579 | &leds_gpio, | 572 | &leds_gpio, |
| 580 | &keys_gpio, | 573 | &keys_gpio, |
| 581 | &omap_dm9000_dev, | 574 | &omap_dm9000_dev, |
| @@ -797,6 +790,7 @@ static void __init devkit8000_init(void) | |||
| 797 | platform_add_devices(devkit8000_devices, | 790 | platform_add_devices(devkit8000_devices, |
| 798 | ARRAY_SIZE(devkit8000_devices)); | 791 | ARRAY_SIZE(devkit8000_devices)); |
| 799 | 792 | ||
| 793 | omap_display_init(&devkit8000_dss_data); | ||
| 800 | spi_register_board_info(devkit8000_spi_board_info, | 794 | spi_register_board_info(devkit8000_spi_board_info, |
| 801 | ARRAY_SIZE(devkit8000_spi_board_info)); | 795 | ARRAY_SIZE(devkit8000_spi_board_info)); |
| 802 | 796 | ||
| @@ -813,8 +807,9 @@ static void __init devkit8000_init(void) | |||
| 813 | 807 | ||
| 814 | MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000") | 808 | MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000") |
| 815 | .boot_params = 0x80000100, | 809 | .boot_params = 0x80000100, |
| 816 | .map_io = omap3_map_io, | ||
| 817 | .reserve = omap_reserve, | 810 | .reserve = omap_reserve, |
| 811 | .map_io = omap3_map_io, | ||
| 812 | .init_early = devkit8000_init_early, | ||
| 818 | .init_irq = devkit8000_init_irq, | 813 | .init_irq = devkit8000_init_irq, |
| 819 | .init_machine = devkit8000_init, | 814 | .init_machine = devkit8000_init, |
| 820 | .timer = &omap_timer, | 815 | .timer = &omap_timer, |
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c index fd38c05bb47f..729892fdcf2e 100644 --- a/arch/arm/mach-omap2/board-flash.c +++ b/arch/arm/mach-omap2/board-flash.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * board-sdp-flash.c | 2 | * board-flash.c |
| 3 | * Modified from mach-omap2/board-3430sdp-flash.c | 3 | * Modified from mach-omap2/board-3430sdp-flash.c |
| 4 | * | 4 | * |
| 5 | * Copyright (C) 2009 Nokia Corporation | 5 | * Copyright (C) 2009 Nokia Corporation |
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/mtd/physmap.h> | 17 | #include <linux/mtd/physmap.h> |
| 18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
| 19 | #include <plat/irqs.h> | ||
| 19 | 20 | ||
| 20 | #include <plat/gpmc.h> | 21 | #include <plat/gpmc.h> |
| 21 | #include <plat/nand.h> | 22 | #include <plat/nand.h> |
| @@ -73,11 +74,11 @@ __init board_nor_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs) | |||
| 73 | + FLASH_SIZE_SDPV1 - 1; | 74 | + FLASH_SIZE_SDPV1 - 1; |
| 74 | } | 75 | } |
| 75 | if (err < 0) { | 76 | if (err < 0) { |
| 76 | printk(KERN_ERR "NOR: Can't request GPMC CS\n"); | 77 | pr_err("NOR: Can't request GPMC CS\n"); |
| 77 | return; | 78 | return; |
| 78 | } | 79 | } |
| 79 | if (platform_device_register(&board_nor_device) < 0) | 80 | if (platform_device_register(&board_nor_device) < 0) |
| 80 | printk(KERN_ERR "Unable to register NOR device\n"); | 81 | pr_err("Unable to register NOR device\n"); |
| 81 | } | 82 | } |
| 82 | 83 | ||
| 83 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | 84 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ |
| @@ -139,17 +140,21 @@ static struct omap_nand_platform_data board_nand_data = { | |||
| 139 | }; | 140 | }; |
| 140 | 141 | ||
| 141 | void | 142 | void |
| 142 | __init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs) | 143 | __init board_nand_init(struct mtd_partition *nand_parts, |
| 144 | u8 nr_parts, u8 cs, int nand_type) | ||
| 143 | { | 145 | { |
| 144 | board_nand_data.cs = cs; | 146 | board_nand_data.cs = cs; |
| 145 | board_nand_data.parts = nand_parts; | 147 | board_nand_data.parts = nand_parts; |
| 146 | board_nand_data.nr_parts = nr_parts; | 148 | board_nand_data.nr_parts = nr_parts; |
| 149 | board_nand_data.devsize = nand_type; | ||
| 147 | 150 | ||
| 151 | board_nand_data.ecc_opt = OMAP_ECC_HAMMING_CODE_DEFAULT; | ||
| 152 | board_nand_data.gpmc_irq = OMAP_GPMC_IRQ_BASE + cs; | ||
| 148 | gpmc_nand_init(&board_nand_data); | 153 | gpmc_nand_init(&board_nand_data); |
| 149 | } | 154 | } |
| 150 | #else | 155 | #else |
| 151 | void | 156 | void |
| 152 | __init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs) | 157 | __init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs, int nand_type) |
| 153 | { | 158 | { |
| 154 | } | 159 | } |
| 155 | #endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */ | 160 | #endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */ |
| @@ -189,12 +194,12 @@ unmap: | |||
| 189 | } | 194 | } |
| 190 | 195 | ||
| 191 | /** | 196 | /** |
| 192 | * sdp3430_flash_init - Identify devices connected to GPMC and register. | 197 | * board_flash_init - Identify devices connected to GPMC and register. |
| 193 | * | 198 | * |
| 194 | * @return - void. | 199 | * @return - void. |
| 195 | */ | 200 | */ |
| 196 | void board_flash_init(struct flash_partitions partition_info[], | 201 | void board_flash_init(struct flash_partitions partition_info[], |
| 197 | char chip_sel_board[][GPMC_CS_NUM]) | 202 | char chip_sel_board[][GPMC_CS_NUM], int nand_type) |
| 198 | { | 203 | { |
| 199 | u8 cs = 0; | 204 | u8 cs = 0; |
| 200 | u8 norcs = GPMC_CS_NUM + 1; | 205 | u8 norcs = GPMC_CS_NUM + 1; |
| @@ -208,7 +213,7 @@ void board_flash_init(struct flash_partitions partition_info[], | |||
| 208 | */ | 213 | */ |
| 209 | idx = get_gpmc0_type(); | 214 | idx = get_gpmc0_type(); |
| 210 | if (idx >= MAX_SUPPORTED_GPMC_CONFIG) { | 215 | if (idx >= MAX_SUPPORTED_GPMC_CONFIG) { |
| 211 | printk(KERN_ERR "%s: Invalid chip select: %d\n", __func__, cs); | 216 | pr_err("%s: Invalid chip select: %d\n", __func__, cs); |
| 212 | return; | 217 | return; |
| 213 | } | 218 | } |
| 214 | config_sel = (unsigned char *)(chip_sel_board[idx]); | 219 | config_sel = (unsigned char *)(chip_sel_board[idx]); |
| @@ -232,23 +237,20 @@ void board_flash_init(struct flash_partitions partition_info[], | |||
| 232 | } | 237 | } |
| 233 | 238 | ||
| 234 | if (norcs > GPMC_CS_NUM) | 239 | if (norcs > GPMC_CS_NUM) |
| 235 | printk(KERN_INFO "NOR: Unable to find configuration " | 240 | pr_err("NOR: Unable to find configuration in GPMC\n"); |
| 236 | "in GPMC\n"); | ||
| 237 | else | 241 | else |
| 238 | board_nor_init(partition_info[0].parts, | 242 | board_nor_init(partition_info[0].parts, |
| 239 | partition_info[0].nr_parts, norcs); | 243 | partition_info[0].nr_parts, norcs); |
| 240 | 244 | ||
| 241 | if (onenandcs > GPMC_CS_NUM) | 245 | if (onenandcs > GPMC_CS_NUM) |
| 242 | printk(KERN_INFO "OneNAND: Unable to find configuration " | 246 | pr_err("OneNAND: Unable to find configuration in GPMC\n"); |
| 243 | "in GPMC\n"); | ||
| 244 | else | 247 | else |
| 245 | board_onenand_init(partition_info[1].parts, | 248 | board_onenand_init(partition_info[1].parts, |
| 246 | partition_info[1].nr_parts, onenandcs); | 249 | partition_info[1].nr_parts, onenandcs); |
| 247 | 250 | ||
| 248 | if (nandcs > GPMC_CS_NUM) | 251 | if (nandcs > GPMC_CS_NUM) |
| 249 | printk(KERN_INFO "NAND: Unable to find configuration " | 252 | pr_err("NAND: Unable to find configuration in GPMC\n"); |
| 250 | "in GPMC\n"); | ||
| 251 | else | 253 | else |
| 252 | board_nand_init(partition_info[2].parts, | 254 | board_nand_init(partition_info[2].parts, |
| 253 | partition_info[2].nr_parts, nandcs); | 255 | partition_info[2].nr_parts, nandcs, nand_type); |
| 254 | } | 256 | } |
diff --git a/arch/arm/mach-omap2/board-flash.h b/arch/arm/mach-omap2/board-flash.h index 69befe00dd2f..c240a3f8d163 100644 --- a/arch/arm/mach-omap2/board-flash.h +++ b/arch/arm/mach-omap2/board-flash.h | |||
| @@ -25,6 +25,6 @@ struct flash_partitions { | |||
| 25 | }; | 25 | }; |
| 26 | 26 | ||
| 27 | extern void board_flash_init(struct flash_partitions [], | 27 | extern void board_flash_init(struct flash_partitions [], |
| 28 | char chip_sel[][GPMC_CS_NUM]); | 28 | char chip_sel[][GPMC_CS_NUM], int nand_type); |
| 29 | extern void board_nand_init(struct mtd_partition *nand_parts, | 29 | extern void board_nand_init(struct mtd_partition *nand_parts, |
| 30 | u8 nr_parts, u8 cs); | 30 | u8 nr_parts, u8 cs, int nand_type); |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 0e3d81e09f89..73e3c31e8508 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
| @@ -33,18 +33,17 @@ | |||
| 33 | static struct omap_board_config_kernel generic_config[] = { | 33 | static struct omap_board_config_kernel generic_config[] = { |
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | static void __init omap_generic_init_irq(void) | 36 | static void __init omap_generic_init_early(void) |
| 37 | { | 37 | { |
| 38 | omap_board_config = generic_config; | ||
| 39 | omap_board_config_size = ARRAY_SIZE(generic_config); | ||
| 40 | omap2_init_common_infrastructure(); | 38 | omap2_init_common_infrastructure(); |
| 41 | omap2_init_common_devices(NULL, NULL); | 39 | omap2_init_common_devices(NULL, NULL); |
| 42 | omap_init_irq(); | ||
| 43 | } | 40 | } |
| 44 | 41 | ||
| 45 | static void __init omap_generic_init(void) | 42 | static void __init omap_generic_init(void) |
| 46 | { | 43 | { |
| 47 | omap_serial_init(); | 44 | omap_serial_init(); |
| 45 | omap_board_config = generic_config; | ||
| 46 | omap_board_config_size = ARRAY_SIZE(generic_config); | ||
| 48 | } | 47 | } |
| 49 | 48 | ||
| 50 | static void __init omap_generic_map_io(void) | 49 | static void __init omap_generic_map_io(void) |
| @@ -68,9 +67,10 @@ static void __init omap_generic_map_io(void) | |||
| 68 | MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") | 67 | MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") |
| 69 | /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ | 68 | /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ |
| 70 | .boot_params = 0x80000100, | 69 | .boot_params = 0x80000100, |
| 71 | .map_io = omap_generic_map_io, | ||
| 72 | .reserve = omap_reserve, | 70 | .reserve = omap_reserve, |
| 73 | .init_irq = omap_generic_init_irq, | 71 | .map_io = omap_generic_map_io, |
| 72 | .init_early = omap_generic_init_early, | ||
| 73 | .init_irq = omap_init_irq, | ||
| 74 | .init_machine = omap_generic_init, | 74 | .init_machine = omap_generic_init, |
| 75 | .timer = &omap_timer, | 75 | .timer = &omap_timer, |
| 76 | MACHINE_END | 76 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 25cc9dad4b02..7e6bf4fa1535 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
| @@ -290,12 +290,14 @@ static struct omap_board_config_kernel h4_config[] __initdata = { | |||
| 290 | { OMAP_TAG_LCD, &h4_lcd_config }, | 290 | { OMAP_TAG_LCD, &h4_lcd_config }, |
| 291 | }; | 291 | }; |
| 292 | 292 | ||
| 293 | static void __init omap_h4_init_irq(void) | 293 | static void __init omap_h4_init_early(void) |
| 294 | { | 294 | { |
| 295 | omap_board_config = h4_config; | ||
| 296 | omap_board_config_size = ARRAY_SIZE(h4_config); | ||
| 297 | omap2_init_common_infrastructure(); | 295 | omap2_init_common_infrastructure(); |
| 298 | omap2_init_common_devices(NULL, NULL); | 296 | omap2_init_common_devices(NULL, NULL); |
| 297 | } | ||
| 298 | |||
| 299 | static void __init omap_h4_init_irq(void) | ||
| 300 | { | ||
| 299 | omap_init_irq(); | 301 | omap_init_irq(); |
| 300 | h4_init_flash(); | 302 | h4_init_flash(); |
| 301 | } | 303 | } |
| @@ -330,6 +332,9 @@ static void __init omap_h4_init(void) | |||
| 330 | { | 332 | { |
| 331 | omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF); | 333 | omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF); |
| 332 | 334 | ||
| 335 | omap_board_config = h4_config; | ||
| 336 | omap_board_config_size = ARRAY_SIZE(h4_config); | ||
| 337 | |||
| 333 | /* | 338 | /* |
| 334 | * Make sure the serial ports are muxed on at this point. | 339 | * Make sure the serial ports are muxed on at this point. |
| 335 | * You have to mux them off in device drivers later on | 340 | * You have to mux them off in device drivers later on |
| @@ -378,8 +383,9 @@ static void __init omap_h4_map_io(void) | |||
| 378 | MACHINE_START(OMAP_H4, "OMAP2420 H4 board") | 383 | MACHINE_START(OMAP_H4, "OMAP2420 H4 board") |
| 379 | /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ | 384 | /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ |
| 380 | .boot_params = 0x80000100, | 385 | .boot_params = 0x80000100, |
| 381 | .map_io = omap_h4_map_io, | ||
| 382 | .reserve = omap_reserve, | 386 | .reserve = omap_reserve, |
| 387 | .map_io = omap_h4_map_io, | ||
| 388 | .init_early = omap_h4_init_early, | ||
| 383 | .init_irq = omap_h4_init_irq, | 389 | .init_irq = omap_h4_init_irq, |
| 384 | .init_machine = omap_h4_init, | 390 | .init_machine = omap_h4_init, |
| 385 | .timer = &omap_timer, | 391 | .timer = &omap_timer, |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 3be85a1f55f4..c4b3c1c47ec6 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
| @@ -250,7 +250,7 @@ static inline void __init igep2_init_smsc911x(void) { } | |||
| 250 | #endif | 250 | #endif |
| 251 | 251 | ||
| 252 | static struct regulator_consumer_supply igep2_vmmc1_supply = | 252 | static struct regulator_consumer_supply igep2_vmmc1_supply = |
| 253 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); | 253 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); |
| 254 | 254 | ||
| 255 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | 255 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ |
| 256 | static struct regulator_init_data igep2_vmmc1 = { | 256 | static struct regulator_init_data igep2_vmmc1 = { |
| @@ -268,7 +268,7 @@ static struct regulator_init_data igep2_vmmc1 = { | |||
| 268 | }; | 268 | }; |
| 269 | 269 | ||
| 270 | static struct regulator_consumer_supply igep2_vio_supply = | 270 | static struct regulator_consumer_supply igep2_vio_supply = |
| 271 | REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1"); | 271 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"); |
| 272 | 272 | ||
| 273 | static struct regulator_init_data igep2_vio = { | 273 | static struct regulator_init_data igep2_vio = { |
| 274 | .constraints = { | 274 | .constraints = { |
| @@ -286,7 +286,7 @@ static struct regulator_init_data igep2_vio = { | |||
| 286 | }; | 286 | }; |
| 287 | 287 | ||
| 288 | static struct regulator_consumer_supply igep2_vmmc2_supply = | 288 | static struct regulator_consumer_supply igep2_vmmc2_supply = |
| 289 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); | 289 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); |
| 290 | 290 | ||
| 291 | static struct regulator_init_data igep2_vmmc2 = { | 291 | static struct regulator_init_data igep2_vmmc2 = { |
| 292 | .constraints = { | 292 | .constraints = { |
| @@ -485,18 +485,8 @@ static struct omap_dss_board_info igep2_dss_data = { | |||
| 485 | .default_device = &igep2_dvi_device, | 485 | .default_device = &igep2_dvi_device, |
| 486 | }; | 486 | }; |
| 487 | 487 | ||
| 488 | static struct platform_device igep2_dss_device = { | 488 | static struct regulator_consumer_supply igep2_vpll2_supply = |
| 489 | .name = "omapdss", | 489 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"); |
| 490 | .id = -1, | ||
| 491 | .dev = { | ||
| 492 | .platform_data = &igep2_dss_data, | ||
| 493 | }, | ||
| 494 | }; | ||
| 495 | |||
| 496 | static struct regulator_consumer_supply igep2_vpll2_supply = { | ||
| 497 | .supply = "vdds_dsi", | ||
| 498 | .dev = &igep2_dss_device.dev, | ||
| 499 | }; | ||
| 500 | 490 | ||
| 501 | static struct regulator_init_data igep2_vpll2 = { | 491 | static struct regulator_init_data igep2_vpll2 = { |
| 502 | .constraints = { | 492 | .constraints = { |
| @@ -521,21 +511,17 @@ static void __init igep2_display_init(void) | |||
| 521 | } | 511 | } |
| 522 | 512 | ||
| 523 | static struct platform_device *igep2_devices[] __initdata = { | 513 | static struct platform_device *igep2_devices[] __initdata = { |
| 524 | &igep2_dss_device, | ||
| 525 | &igep2_vwlan_device, | 514 | &igep2_vwlan_device, |
| 526 | }; | 515 | }; |
| 527 | 516 | ||
| 528 | static void __init igep2_init_irq(void) | 517 | static void __init igep2_init_early(void) |
| 529 | { | 518 | { |
| 530 | omap2_init_common_infrastructure(); | 519 | omap2_init_common_infrastructure(); |
| 531 | omap2_init_common_devices(m65kxxxxam_sdrc_params, | 520 | omap2_init_common_devices(m65kxxxxam_sdrc_params, |
| 532 | m65kxxxxam_sdrc_params); | 521 | m65kxxxxam_sdrc_params); |
| 533 | omap_init_irq(); | ||
| 534 | } | 522 | } |
| 535 | 523 | ||
| 536 | static struct twl4030_codec_audio_data igep2_audio_data = { | 524 | static struct twl4030_codec_audio_data igep2_audio_data; |
| 537 | .audio_mclk = 26000000, | ||
| 538 | }; | ||
| 539 | 525 | ||
| 540 | static struct twl4030_codec_data igep2_codec_data = { | 526 | static struct twl4030_codec_data igep2_codec_data = { |
| 541 | .audio_mclk = 26000000, | 527 | .audio_mclk = 26000000, |
| @@ -697,6 +683,7 @@ static void __init igep2_init(void) | |||
| 697 | /* Register I2C busses and drivers */ | 683 | /* Register I2C busses and drivers */ |
| 698 | igep2_i2c_init(); | 684 | igep2_i2c_init(); |
| 699 | platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices)); | 685 | platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices)); |
| 686 | omap_display_init(&igep2_dss_data); | ||
| 700 | omap_serial_init(); | 687 | omap_serial_init(); |
| 701 | usb_musb_init(&musb_board_data); | 688 | usb_musb_init(&musb_board_data); |
| 702 | usb_ehci_init(&ehci_pdata); | 689 | usb_ehci_init(&ehci_pdata); |
| @@ -716,9 +703,10 @@ static void __init igep2_init(void) | |||
| 716 | 703 | ||
| 717 | MACHINE_START(IGEP0020, "IGEP v2 board") | 704 | MACHINE_START(IGEP0020, "IGEP v2 board") |
| 718 | .boot_params = 0x80000100, | 705 | .boot_params = 0x80000100, |
| 719 | .map_io = omap3_map_io, | ||
| 720 | .reserve = omap_reserve, | 706 | .reserve = omap_reserve, |
| 721 | .init_irq = igep2_init_irq, | 707 | .map_io = omap3_map_io, |
| 708 | .init_early = igep2_init_early, | ||
| 709 | .init_irq = omap_init_irq, | ||
| 722 | .init_machine = igep2_init, | 710 | .init_machine = igep2_init, |
| 723 | .timer = &omap_timer, | 711 | .timer = &omap_timer, |
| 724 | MACHINE_END | 712 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c index 4dc62a9b9cb2..4273d0672ef6 100644 --- a/arch/arm/mach-omap2/board-igep0030.c +++ b/arch/arm/mach-omap2/board-igep0030.c | |||
| @@ -142,7 +142,7 @@ static void __init igep3_flash_init(void) {} | |||
| 142 | #endif | 142 | #endif |
| 143 | 143 | ||
| 144 | static struct regulator_consumer_supply igep3_vmmc1_supply = | 144 | static struct regulator_consumer_supply igep3_vmmc1_supply = |
| 145 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); | 145 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); |
| 146 | 146 | ||
| 147 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | 147 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ |
| 148 | static struct regulator_init_data igep3_vmmc1 = { | 148 | static struct regulator_init_data igep3_vmmc1 = { |
| @@ -160,7 +160,7 @@ static struct regulator_init_data igep3_vmmc1 = { | |||
| 160 | }; | 160 | }; |
| 161 | 161 | ||
| 162 | static struct regulator_consumer_supply igep3_vio_supply = | 162 | static struct regulator_consumer_supply igep3_vio_supply = |
| 163 | REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1"); | 163 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"); |
| 164 | 164 | ||
| 165 | static struct regulator_init_data igep3_vio = { | 165 | static struct regulator_init_data igep3_vio = { |
| 166 | .constraints = { | 166 | .constraints = { |
| @@ -178,7 +178,7 @@ static struct regulator_init_data igep3_vio = { | |||
| 178 | }; | 178 | }; |
| 179 | 179 | ||
| 180 | static struct regulator_consumer_supply igep3_vmmc2_supply = | 180 | static struct regulator_consumer_supply igep3_vmmc2_supply = |
| 181 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); | 181 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); |
| 182 | 182 | ||
| 183 | static struct regulator_init_data igep3_vmmc2 = { | 183 | static struct regulator_init_data igep3_vmmc2 = { |
| 184 | .constraints = { | 184 | .constraints = { |
| @@ -331,12 +331,11 @@ static struct platform_device *igep3_devices[] __initdata = { | |||
| 331 | &igep3_vwlan_device, | 331 | &igep3_vwlan_device, |
| 332 | }; | 332 | }; |
| 333 | 333 | ||
| 334 | static void __init igep3_init_irq(void) | 334 | static void __init igep3_init_early(void) |
| 335 | { | 335 | { |
| 336 | omap2_init_common_infrastructure(); | 336 | omap2_init_common_infrastructure(); |
| 337 | omap2_init_common_devices(m65kxxxxam_sdrc_params, | 337 | omap2_init_common_devices(m65kxxxxam_sdrc_params, |
| 338 | m65kxxxxam_sdrc_params); | 338 | m65kxxxxam_sdrc_params); |
| 339 | omap_init_irq(); | ||
| 340 | } | 339 | } |
| 341 | 340 | ||
| 342 | static struct twl4030_platform_data igep3_twl4030_pdata = { | 341 | static struct twl4030_platform_data igep3_twl4030_pdata = { |
| @@ -452,7 +451,8 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module") | |||
| 452 | .boot_params = 0x80000100, | 451 | .boot_params = 0x80000100, |
| 453 | .reserve = omap_reserve, | 452 | .reserve = omap_reserve, |
| 454 | .map_io = omap3_map_io, | 453 | .map_io = omap3_map_io, |
| 455 | .init_irq = igep3_init_irq, | 454 | .init_early = igep3_init_early, |
| 455 | .init_irq = omap_init_irq, | ||
| 456 | .init_machine = igep3_init, | 456 | .init_machine = igep3_init, |
| 457 | .timer = &omap_timer, | 457 | .timer = &omap_timer, |
| 458 | MACHINE_END | 458 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index e5dc74875f9d..e2ba77957a8c 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
| @@ -288,13 +288,10 @@ static struct omap_board_config_kernel ldp_config[] __initdata = { | |||
| 288 | { OMAP_TAG_LCD, &ldp_lcd_config }, | 288 | { OMAP_TAG_LCD, &ldp_lcd_config }, |
| 289 | }; | 289 | }; |
| 290 | 290 | ||
| 291 | static void __init omap_ldp_init_irq(void) | 291 | static void __init omap_ldp_init_early(void) |
| 292 | { | 292 | { |
| 293 | omap_board_config = ldp_config; | ||
| 294 | omap_board_config_size = ARRAY_SIZE(ldp_config); | ||
| 295 | omap2_init_common_infrastructure(); | 293 | omap2_init_common_infrastructure(); |
| 296 | omap2_init_common_devices(NULL, NULL); | 294 | omap2_init_common_devices(NULL, NULL); |
| 297 | omap_init_irq(); | ||
| 298 | } | 295 | } |
| 299 | 296 | ||
| 300 | static struct twl4030_usb_data ldp_usb_data = { | 297 | static struct twl4030_usb_data ldp_usb_data = { |
| @@ -330,6 +327,26 @@ static struct regulator_init_data ldp_vmmc1 = { | |||
| 330 | .consumer_supplies = &ldp_vmmc1_supply, | 327 | .consumer_supplies = &ldp_vmmc1_supply, |
| 331 | }; | 328 | }; |
| 332 | 329 | ||
| 330 | /* ads7846 on SPI */ | ||
| 331 | static struct regulator_consumer_supply ldp_vaux1_supplies[] = { | ||
| 332 | REGULATOR_SUPPLY("vcc", "spi1.0"), | ||
| 333 | }; | ||
| 334 | |||
| 335 | /* VAUX1 */ | ||
| 336 | static struct regulator_init_data ldp_vaux1 = { | ||
| 337 | .constraints = { | ||
| 338 | .min_uV = 3000000, | ||
| 339 | .max_uV = 3000000, | ||
| 340 | .apply_uV = true, | ||
| 341 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
| 342 | | REGULATOR_MODE_STANDBY, | ||
| 343 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
| 344 | | REGULATOR_CHANGE_STATUS, | ||
| 345 | }, | ||
| 346 | .num_consumer_supplies = ARRAY_SIZE(ldp_vaux1_supplies), | ||
| 347 | .consumer_supplies = ldp_vaux1_supplies, | ||
| 348 | }; | ||
| 349 | |||
| 333 | static struct twl4030_platform_data ldp_twldata = { | 350 | static struct twl4030_platform_data ldp_twldata = { |
| 334 | .irq_base = TWL4030_IRQ_BASE, | 351 | .irq_base = TWL4030_IRQ_BASE, |
| 335 | .irq_end = TWL4030_IRQ_END, | 352 | .irq_end = TWL4030_IRQ_END, |
| @@ -338,6 +355,7 @@ static struct twl4030_platform_data ldp_twldata = { | |||
| 338 | .madc = &ldp_madc_data, | 355 | .madc = &ldp_madc_data, |
| 339 | .usb = &ldp_usb_data, | 356 | .usb = &ldp_usb_data, |
| 340 | .vmmc1 = &ldp_vmmc1, | 357 | .vmmc1 = &ldp_vmmc1, |
| 358 | .vaux1 = &ldp_vaux1, | ||
| 341 | .gpio = &ldp_gpio_data, | 359 | .gpio = &ldp_gpio_data, |
| 342 | .keypad = &ldp_kp_twl4030_data, | 360 | .keypad = &ldp_kp_twl4030_data, |
| 343 | }; | 361 | }; |
| @@ -423,6 +441,8 @@ static struct mtd_partition ldp_nand_partitions[] = { | |||
| 423 | static void __init omap_ldp_init(void) | 441 | static void __init omap_ldp_init(void) |
| 424 | { | 442 | { |
| 425 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 443 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
| 444 | omap_board_config = ldp_config; | ||
| 445 | omap_board_config_size = ARRAY_SIZE(ldp_config); | ||
| 426 | ldp_init_smsc911x(); | 446 | ldp_init_smsc911x(); |
| 427 | omap_i2c_init(); | 447 | omap_i2c_init(); |
| 428 | platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); | 448 | platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); |
| @@ -434,7 +454,7 @@ static void __init omap_ldp_init(void) | |||
| 434 | omap_serial_init(); | 454 | omap_serial_init(); |
| 435 | usb_musb_init(&musb_board_data); | 455 | usb_musb_init(&musb_board_data); |
| 436 | board_nand_init(ldp_nand_partitions, | 456 | board_nand_init(ldp_nand_partitions, |
| 437 | ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS); | 457 | ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); |
| 438 | 458 | ||
| 439 | omap2_hsmmc_init(mmc); | 459 | omap2_hsmmc_init(mmc); |
| 440 | /* link regulators to MMC adapters */ | 460 | /* link regulators to MMC adapters */ |
| @@ -443,9 +463,10 @@ static void __init omap_ldp_init(void) | |||
| 443 | 463 | ||
| 444 | MACHINE_START(OMAP_LDP, "OMAP LDP board") | 464 | MACHINE_START(OMAP_LDP, "OMAP LDP board") |
| 445 | .boot_params = 0x80000100, | 465 | .boot_params = 0x80000100, |
| 446 | .map_io = omap3_map_io, | ||
| 447 | .reserve = omap_reserve, | 466 | .reserve = omap_reserve, |
| 448 | .init_irq = omap_ldp_init_irq, | 467 | .map_io = omap3_map_io, |
| 468 | .init_early = omap_ldp_init_early, | ||
| 469 | .init_irq = omap_init_irq, | ||
| 449 | .init_machine = omap_ldp_init, | 470 | .init_machine = omap_ldp_init, |
| 450 | .timer = &omap_timer, | 471 | .timer = &omap_timer, |
| 451 | MACHINE_END | 472 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index f396756872b7..e710cd9e079b 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
| @@ -536,7 +536,7 @@ static void __init n8x0_mmc_init(void) | |||
| 536 | } | 536 | } |
| 537 | 537 | ||
| 538 | mmc_data[0] = &mmc1_data; | 538 | mmc_data[0] = &mmc1_data; |
| 539 | omap2_init_mmc(mmc_data, OMAP24XX_NR_MMC); | 539 | omap242x_init_mmc(mmc_data); |
| 540 | } | 540 | } |
| 541 | #else | 541 | #else |
| 542 | 542 | ||
| @@ -628,11 +628,10 @@ static void __init n8x0_map_io(void) | |||
| 628 | omap242x_map_common_io(); | 628 | omap242x_map_common_io(); |
| 629 | } | 629 | } |
| 630 | 630 | ||
| 631 | static void __init n8x0_init_irq(void) | 631 | static void __init n8x0_init_early(void) |
| 632 | { | 632 | { |
| 633 | omap2_init_common_infrastructure(); | 633 | omap2_init_common_infrastructure(); |
| 634 | omap2_init_common_devices(NULL, NULL); | 634 | omap2_init_common_devices(NULL, NULL); |
| 635 | omap_init_irq(); | ||
| 636 | } | 635 | } |
| 637 | 636 | ||
| 638 | #ifdef CONFIG_OMAP_MUX | 637 | #ifdef CONFIG_OMAP_MUX |
| @@ -703,27 +702,30 @@ static void __init n8x0_init_machine(void) | |||
| 703 | 702 | ||
| 704 | MACHINE_START(NOKIA_N800, "Nokia N800") | 703 | MACHINE_START(NOKIA_N800, "Nokia N800") |
| 705 | .boot_params = 0x80000100, | 704 | .boot_params = 0x80000100, |
| 706 | .map_io = n8x0_map_io, | ||
| 707 | .reserve = omap_reserve, | 705 | .reserve = omap_reserve, |
| 708 | .init_irq = n8x0_init_irq, | 706 | .map_io = n8x0_map_io, |
| 707 | .init_early = n8x0_init_early, | ||
| 708 | .init_irq = omap_init_irq, | ||
| 709 | .init_machine = n8x0_init_machine, | 709 | .init_machine = n8x0_init_machine, |
| 710 | .timer = &omap_timer, | 710 | .timer = &omap_timer, |
| 711 | MACHINE_END | 711 | MACHINE_END |
| 712 | 712 | ||
| 713 | MACHINE_START(NOKIA_N810, "Nokia N810") | 713 | MACHINE_START(NOKIA_N810, "Nokia N810") |
| 714 | .boot_params = 0x80000100, | 714 | .boot_params = 0x80000100, |
| 715 | .map_io = n8x0_map_io, | ||
| 716 | .reserve = omap_reserve, | 715 | .reserve = omap_reserve, |
| 717 | .init_irq = n8x0_init_irq, | 716 | .map_io = n8x0_map_io, |
| 717 | .init_early = n8x0_init_early, | ||
| 718 | .init_irq = omap_init_irq, | ||
| 718 | .init_machine = n8x0_init_machine, | 719 | .init_machine = n8x0_init_machine, |
| 719 | .timer = &omap_timer, | 720 | .timer = &omap_timer, |
| 720 | MACHINE_END | 721 | MACHINE_END |
| 721 | 722 | ||
| 722 | MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") | 723 | MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") |
| 723 | .boot_params = 0x80000100, | 724 | .boot_params = 0x80000100, |
| 724 | .map_io = n8x0_map_io, | ||
| 725 | .reserve = omap_reserve, | 725 | .reserve = omap_reserve, |
| 726 | .init_irq = n8x0_init_irq, | 726 | .map_io = n8x0_map_io, |
| 727 | .init_early = n8x0_init_early, | ||
| 728 | .init_irq = omap_init_irq, | ||
| 727 | .init_machine = n8x0_init_machine, | 729 | .init_machine = n8x0_init_machine, |
| 728 | .timer = &omap_timer, | 730 | .timer = &omap_timer, |
| 729 | MACHINE_END | 731 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 46d814ab5656..b6752ac5b97e 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
| @@ -228,14 +228,6 @@ static struct omap_dss_board_info beagle_dss_data = { | |||
| 228 | .default_device = &beagle_dvi_device, | 228 | .default_device = &beagle_dvi_device, |
| 229 | }; | 229 | }; |
| 230 | 230 | ||
| 231 | static struct platform_device beagle_dss_device = { | ||
| 232 | .name = "omapdss", | ||
| 233 | .id = -1, | ||
| 234 | .dev = { | ||
| 235 | .platform_data = &beagle_dss_data, | ||
| 236 | }, | ||
| 237 | }; | ||
| 238 | |||
| 239 | static struct regulator_consumer_supply beagle_vdac_supply = | 231 | static struct regulator_consumer_supply beagle_vdac_supply = |
| 240 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); | 232 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
| 241 | 233 | ||
| @@ -435,9 +427,7 @@ static struct twl4030_usb_data beagle_usb_data = { | |||
| 435 | .usb_mode = T2_USB_MODE_ULPI, | 427 | .usb_mode = T2_USB_MODE_ULPI, |
| 436 | }; | 428 | }; |
| 437 | 429 | ||
| 438 | static struct twl4030_codec_audio_data beagle_audio_data = { | 430 | static struct twl4030_codec_audio_data beagle_audio_data; |
| 439 | .audio_mclk = 26000000, | ||
| 440 | }; | ||
| 441 | 431 | ||
| 442 | static struct twl4030_codec_data beagle_codec_data = { | 432 | static struct twl4030_codec_data beagle_codec_data = { |
| 443 | .audio_mclk = 26000000, | 433 | .audio_mclk = 26000000, |
| @@ -536,11 +526,15 @@ static struct platform_device keys_gpio = { | |||
| 536 | }, | 526 | }, |
| 537 | }; | 527 | }; |
| 538 | 528 | ||
| 539 | static void __init omap3_beagle_init_irq(void) | 529 | static void __init omap3_beagle_init_early(void) |
| 540 | { | 530 | { |
| 541 | omap2_init_common_infrastructure(); | 531 | omap2_init_common_infrastructure(); |
| 542 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, | 532 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, |
| 543 | mt46h32m32lf6_sdrc_params); | 533 | mt46h32m32lf6_sdrc_params); |
| 534 | } | ||
| 535 | |||
| 536 | static void __init omap3_beagle_init_irq(void) | ||
| 537 | { | ||
| 544 | omap_init_irq(); | 538 | omap_init_irq(); |
| 545 | #ifdef CONFIG_OMAP_32K_TIMER | 539 | #ifdef CONFIG_OMAP_32K_TIMER |
| 546 | omap2_gp_clockevent_set_gptimer(12); | 540 | omap2_gp_clockevent_set_gptimer(12); |
| @@ -550,7 +544,6 @@ static void __init omap3_beagle_init_irq(void) | |||
| 550 | static struct platform_device *omap3_beagle_devices[] __initdata = { | 544 | static struct platform_device *omap3_beagle_devices[] __initdata = { |
| 551 | &leds_gpio, | 545 | &leds_gpio, |
| 552 | &keys_gpio, | 546 | &keys_gpio, |
| 553 | &beagle_dss_device, | ||
| 554 | }; | 547 | }; |
| 555 | 548 | ||
| 556 | static void __init omap3beagle_flash_init(void) | 549 | static void __init omap3beagle_flash_init(void) |
| @@ -617,6 +610,7 @@ static void __init omap3_beagle_init(void) | |||
| 617 | omap3_beagle_i2c_init(); | 610 | omap3_beagle_i2c_init(); |
| 618 | platform_add_devices(omap3_beagle_devices, | 611 | platform_add_devices(omap3_beagle_devices, |
| 619 | ARRAY_SIZE(omap3_beagle_devices)); | 612 | ARRAY_SIZE(omap3_beagle_devices)); |
| 613 | omap_display_init(&beagle_dss_data); | ||
| 620 | omap_serial_init(); | 614 | omap_serial_init(); |
| 621 | 615 | ||
| 622 | omap_mux_init_gpio(170, OMAP_PIN_INPUT); | 616 | omap_mux_init_gpio(170, OMAP_PIN_INPUT); |
| @@ -638,8 +632,9 @@ static void __init omap3_beagle_init(void) | |||
| 638 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") | 632 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") |
| 639 | /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ | 633 | /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ |
| 640 | .boot_params = 0x80000100, | 634 | .boot_params = 0x80000100, |
| 641 | .map_io = omap3_map_io, | ||
| 642 | .reserve = omap_reserve, | 635 | .reserve = omap_reserve, |
| 636 | .map_io = omap3_map_io, | ||
| 637 | .init_early = omap3_beagle_init_early, | ||
| 643 | .init_irq = omap3_beagle_init_irq, | 638 | .init_irq = omap3_beagle_init_irq, |
| 644 | .init_machine = omap3_beagle_init, | 639 | .init_machine = omap3_beagle_init, |
| 645 | .timer = &omap_timer, | 640 | .timer = &omap_timer, |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 323c3809ce39..b65848c59e1d 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
| @@ -30,6 +30,8 @@ | |||
| 30 | #include <linux/usb/otg.h> | 30 | #include <linux/usb/otg.h> |
| 31 | #include <linux/smsc911x.h> | 31 | #include <linux/smsc911x.h> |
| 32 | 32 | ||
| 33 | #include <linux/wl12xx.h> | ||
| 34 | #include <linux/regulator/fixed.h> | ||
| 33 | #include <linux/regulator/machine.h> | 35 | #include <linux/regulator/machine.h> |
| 34 | #include <linux/mmc/host.h> | 36 | #include <linux/mmc/host.h> |
| 35 | 37 | ||
| @@ -58,6 +60,13 @@ | |||
| 58 | #define OMAP3EVM_ETHR_ID_REV 0x50 | 60 | #define OMAP3EVM_ETHR_ID_REV 0x50 |
| 59 | #define OMAP3EVM_ETHR_GPIO_IRQ 176 | 61 | #define OMAP3EVM_ETHR_GPIO_IRQ 176 |
| 60 | #define OMAP3EVM_SMSC911X_CS 5 | 62 | #define OMAP3EVM_SMSC911X_CS 5 |
| 63 | /* | ||
| 64 | * Eth Reset signal | ||
| 65 | * 64 = Generation 1 (<=RevD) | ||
| 66 | * 7 = Generation 2 (>=RevE) | ||
| 67 | */ | ||
| 68 | #define OMAP3EVM_GEN1_ETHR_GPIO_RST 64 | ||
| 69 | #define OMAP3EVM_GEN2_ETHR_GPIO_RST 7 | ||
| 61 | 70 | ||
| 62 | static u8 omap3_evm_version; | 71 | static u8 omap3_evm_version; |
| 63 | 72 | ||
| @@ -124,10 +133,15 @@ static struct platform_device omap3evm_smsc911x_device = { | |||
| 124 | 133 | ||
| 125 | static inline void __init omap3evm_init_smsc911x(void) | 134 | static inline void __init omap3evm_init_smsc911x(void) |
| 126 | { | 135 | { |
| 127 | int eth_cs; | 136 | int eth_cs, eth_rst; |
| 128 | struct clk *l3ck; | 137 | struct clk *l3ck; |
| 129 | unsigned int rate; | 138 | unsigned int rate; |
| 130 | 139 | ||
| 140 | if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1) | ||
| 141 | eth_rst = OMAP3EVM_GEN1_ETHR_GPIO_RST; | ||
| 142 | else | ||
| 143 | eth_rst = OMAP3EVM_GEN2_ETHR_GPIO_RST; | ||
| 144 | |||
| 131 | eth_cs = OMAP3EVM_SMSC911X_CS; | 145 | eth_cs = OMAP3EVM_SMSC911X_CS; |
| 132 | 146 | ||
| 133 | l3ck = clk_get(NULL, "l3_ck"); | 147 | l3ck = clk_get(NULL, "l3_ck"); |
| @@ -136,6 +150,27 @@ static inline void __init omap3evm_init_smsc911x(void) | |||
| 136 | else | 150 | else |
| 137 | rate = clk_get_rate(l3ck); | 151 | rate = clk_get_rate(l3ck); |
| 138 | 152 | ||
| 153 | /* Configure ethernet controller reset gpio */ | ||
| 154 | if (cpu_is_omap3430()) { | ||
| 155 | if (gpio_request(eth_rst, "SMSC911x gpio") < 0) { | ||
| 156 | pr_err(KERN_ERR "Failed to request %d for smsc911x\n", | ||
| 157 | eth_rst); | ||
| 158 | return; | ||
| 159 | } | ||
| 160 | |||
| 161 | if (gpio_direction_output(eth_rst, 1) < 0) { | ||
| 162 | pr_err(KERN_ERR "Failed to set direction of %d for" \ | ||
| 163 | " smsc911x\n", eth_rst); | ||
| 164 | return; | ||
| 165 | } | ||
| 166 | /* reset pulse to ethernet controller*/ | ||
| 167 | usleep_range(150, 220); | ||
| 168 | gpio_set_value(eth_rst, 0); | ||
| 169 | usleep_range(150, 220); | ||
| 170 | gpio_set_value(eth_rst, 1); | ||
| 171 | usleep_range(1, 2); | ||
| 172 | } | ||
| 173 | |||
| 139 | if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) { | 174 | if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) { |
| 140 | printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", | 175 | printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", |
| 141 | OMAP3EVM_ETHR_GPIO_IRQ); | 176 | OMAP3EVM_ETHR_GPIO_IRQ); |
| @@ -235,9 +270,9 @@ static int omap3_evm_enable_lcd(struct omap_dss_device *dssdev) | |||
| 235 | gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 0); | 270 | gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 0); |
| 236 | 271 | ||
| 237 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) | 272 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) |
| 238 | gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0); | 273 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0); |
| 239 | else | 274 | else |
| 240 | gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); | 275 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); |
| 241 | 276 | ||
| 242 | lcd_enabled = 1; | 277 | lcd_enabled = 1; |
| 243 | return 0; | 278 | return 0; |
| @@ -248,9 +283,9 @@ static void omap3_evm_disable_lcd(struct omap_dss_device *dssdev) | |||
| 248 | gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 1); | 283 | gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 1); |
| 249 | 284 | ||
| 250 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) | 285 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) |
| 251 | gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); | 286 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); |
| 252 | else | 287 | else |
| 253 | gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0); | 288 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0); |
| 254 | 289 | ||
| 255 | lcd_enabled = 0; | 290 | lcd_enabled = 0; |
| 256 | } | 291 | } |
| @@ -289,7 +324,7 @@ static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev) | |||
| 289 | return -EINVAL; | 324 | return -EINVAL; |
| 290 | } | 325 | } |
| 291 | 326 | ||
| 292 | gpio_set_value(OMAP3EVM_DVI_PANEL_EN_GPIO, 1); | 327 | gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1); |
| 293 | 328 | ||
| 294 | dvi_enabled = 1; | 329 | dvi_enabled = 1; |
| 295 | return 0; | 330 | return 0; |
| @@ -297,7 +332,7 @@ static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev) | |||
| 297 | 332 | ||
| 298 | static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev) | 333 | static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev) |
| 299 | { | 334 | { |
| 300 | gpio_set_value(OMAP3EVM_DVI_PANEL_EN_GPIO, 0); | 335 | gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0); |
| 301 | 336 | ||
| 302 | dvi_enabled = 0; | 337 | dvi_enabled = 0; |
| 303 | } | 338 | } |
| @@ -328,14 +363,6 @@ static struct omap_dss_board_info omap3_evm_dss_data = { | |||
| 328 | .default_device = &omap3_evm_lcd_device, | 363 | .default_device = &omap3_evm_lcd_device, |
| 329 | }; | 364 | }; |
| 330 | 365 | ||
| 331 | static struct platform_device omap3_evm_dss_device = { | ||
| 332 | .name = "omapdss", | ||
| 333 | .id = -1, | ||
| 334 | .dev = { | ||
| 335 | .platform_data = &omap3_evm_dss_data, | ||
| 336 | }, | ||
| 337 | }; | ||
| 338 | |||
| 339 | static struct regulator_consumer_supply omap3evm_vmmc1_supply = { | 366 | static struct regulator_consumer_supply omap3evm_vmmc1_supply = { |
| 340 | .supply = "vmmc", | 367 | .supply = "vmmc", |
| 341 | }; | 368 | }; |
| @@ -381,6 +408,16 @@ static struct omap2_hsmmc_info mmc[] = { | |||
| 381 | .gpio_cd = -EINVAL, | 408 | .gpio_cd = -EINVAL, |
| 382 | .gpio_wp = 63, | 409 | .gpio_wp = 63, |
| 383 | }, | 410 | }, |
| 411 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
| 412 | { | ||
| 413 | .name = "wl1271", | ||
| 414 | .mmc = 2, | ||
| 415 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | ||
| 416 | .gpio_wp = -EINVAL, | ||
| 417 | .gpio_cd = -EINVAL, | ||
| 418 | .nonremovable = true, | ||
| 419 | }, | ||
| 420 | #endif | ||
| 384 | {} /* Terminator */ | 421 | {} /* Terminator */ |
| 385 | }; | 422 | }; |
| 386 | 423 | ||
| @@ -411,6 +448,8 @@ static struct platform_device leds_gpio = { | |||
| 411 | static int omap3evm_twl_gpio_setup(struct device *dev, | 448 | static int omap3evm_twl_gpio_setup(struct device *dev, |
| 412 | unsigned gpio, unsigned ngpio) | 449 | unsigned gpio, unsigned ngpio) |
| 413 | { | 450 | { |
| 451 | int r; | ||
| 452 | |||
| 414 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 453 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
| 415 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); | 454 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); |
| 416 | mmc[0].gpio_cd = gpio + 0; | 455 | mmc[0].gpio_cd = gpio + 0; |
| @@ -426,8 +465,12 @@ static int omap3evm_twl_gpio_setup(struct device *dev, | |||
| 426 | */ | 465 | */ |
| 427 | 466 | ||
| 428 | /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */ | 467 | /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */ |
| 429 | gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL"); | 468 | r = gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL"); |
| 430 | gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); | 469 | if (!r) |
| 470 | r = gpio_direction_output(gpio + TWL4030_GPIO_MAX, | ||
| 471 | (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) ? 1 : 0); | ||
| 472 | if (r) | ||
| 473 | printk(KERN_ERR "failed to get/set lcd_bkl gpio\n"); | ||
| 431 | 474 | ||
| 432 | /* gpio + 7 == DVI Enable */ | 475 | /* gpio + 7 == DVI Enable */ |
| 433 | gpio_request(gpio + 7, "EN_DVI"); | 476 | gpio_request(gpio + 7, "EN_DVI"); |
| @@ -491,19 +534,15 @@ static struct twl4030_madc_platform_data omap3evm_madc_data = { | |||
| 491 | .irq_line = 1, | 534 | .irq_line = 1, |
| 492 | }; | 535 | }; |
| 493 | 536 | ||
| 494 | static struct twl4030_codec_audio_data omap3evm_audio_data = { | 537 | static struct twl4030_codec_audio_data omap3evm_audio_data; |
| 495 | .audio_mclk = 26000000, | ||
| 496 | }; | ||
| 497 | 538 | ||
| 498 | static struct twl4030_codec_data omap3evm_codec_data = { | 539 | static struct twl4030_codec_data omap3evm_codec_data = { |
| 499 | .audio_mclk = 26000000, | 540 | .audio_mclk = 26000000, |
| 500 | .audio = &omap3evm_audio_data, | 541 | .audio = &omap3evm_audio_data, |
| 501 | }; | 542 | }; |
| 502 | 543 | ||
| 503 | static struct regulator_consumer_supply omap3_evm_vdda_dac_supply = { | 544 | static struct regulator_consumer_supply omap3_evm_vdda_dac_supply = |
| 504 | .supply = "vdda_dac", | 545 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
| 505 | .dev = &omap3_evm_dss_device.dev, | ||
| 506 | }; | ||
| 507 | 546 | ||
| 508 | /* VDAC for DSS driving S-Video */ | 547 | /* VDAC for DSS driving S-Video */ |
| 509 | static struct regulator_init_data omap3_evm_vdac = { | 548 | static struct regulator_init_data omap3_evm_vdac = { |
| @@ -538,6 +577,66 @@ static struct regulator_init_data omap3_evm_vpll2 = { | |||
| 538 | .consumer_supplies = &omap3_evm_vpll2_supply, | 577 | .consumer_supplies = &omap3_evm_vpll2_supply, |
| 539 | }; | 578 | }; |
| 540 | 579 | ||
| 580 | /* ads7846 on SPI */ | ||
| 581 | static struct regulator_consumer_supply omap3evm_vio_supply = | ||
| 582 | REGULATOR_SUPPLY("vcc", "spi1.0"); | ||
| 583 | |||
| 584 | /* VIO for ads7846 */ | ||
| 585 | static struct regulator_init_data omap3evm_vio = { | ||
| 586 | .constraints = { | ||
| 587 | .min_uV = 1800000, | ||
| 588 | .max_uV = 1800000, | ||
| 589 | .apply_uV = true, | ||
| 590 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
| 591 | | REGULATOR_MODE_STANDBY, | ||
| 592 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
| 593 | | REGULATOR_CHANGE_STATUS, | ||
| 594 | }, | ||
| 595 | .num_consumer_supplies = 1, | ||
| 596 | .consumer_supplies = &omap3evm_vio_supply, | ||
| 597 | }; | ||
| 598 | |||
| 599 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
| 600 | |||
| 601 | #define OMAP3EVM_WLAN_PMENA_GPIO (150) | ||
| 602 | #define OMAP3EVM_WLAN_IRQ_GPIO (149) | ||
| 603 | |||
| 604 | static struct regulator_consumer_supply omap3evm_vmmc2_supply = | ||
| 605 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); | ||
| 606 | |||
| 607 | /* VMMC2 for driving the WL12xx module */ | ||
| 608 | static struct regulator_init_data omap3evm_vmmc2 = { | ||
| 609 | .constraints = { | ||
| 610 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
| 611 | }, | ||
| 612 | .num_consumer_supplies = 1, | ||
| 613 | .consumer_supplies = &omap3evm_vmmc2_supply, | ||
| 614 | }; | ||
| 615 | |||
| 616 | static struct fixed_voltage_config omap3evm_vwlan = { | ||
| 617 | .supply_name = "vwl1271", | ||
| 618 | .microvolts = 1800000, /* 1.80V */ | ||
| 619 | .gpio = OMAP3EVM_WLAN_PMENA_GPIO, | ||
| 620 | .startup_delay = 70000, /* 70ms */ | ||
| 621 | .enable_high = 1, | ||
| 622 | .enabled_at_boot = 0, | ||
| 623 | .init_data = &omap3evm_vmmc2, | ||
| 624 | }; | ||
| 625 | |||
| 626 | static struct platform_device omap3evm_wlan_regulator = { | ||
| 627 | .name = "reg-fixed-voltage", | ||
| 628 | .id = 1, | ||
| 629 | .dev = { | ||
| 630 | .platform_data = &omap3evm_vwlan, | ||
| 631 | }, | ||
| 632 | }; | ||
| 633 | |||
| 634 | struct wl12xx_platform_data omap3evm_wlan_data __initdata = { | ||
| 635 | .irq = OMAP_GPIO_IRQ(OMAP3EVM_WLAN_IRQ_GPIO), | ||
| 636 | .board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */ | ||
| 637 | }; | ||
| 638 | #endif | ||
| 639 | |||
| 541 | static struct twl4030_platform_data omap3evm_twldata = { | 640 | static struct twl4030_platform_data omap3evm_twldata = { |
| 542 | .irq_base = TWL4030_IRQ_BASE, | 641 | .irq_base = TWL4030_IRQ_BASE, |
| 543 | .irq_end = TWL4030_IRQ_END, | 642 | .irq_end = TWL4030_IRQ_END, |
| @@ -550,6 +649,7 @@ static struct twl4030_platform_data omap3evm_twldata = { | |||
| 550 | .codec = &omap3evm_codec_data, | 649 | .codec = &omap3evm_codec_data, |
| 551 | .vdac = &omap3_evm_vdac, | 650 | .vdac = &omap3_evm_vdac, |
| 552 | .vpll2 = &omap3_evm_vpll2, | 651 | .vpll2 = &omap3_evm_vpll2, |
| 652 | .vio = &omap3evm_vio, | ||
| 553 | }; | 653 | }; |
| 554 | 654 | ||
| 555 | static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = { | 655 | static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = { |
| @@ -625,19 +725,12 @@ static struct spi_board_info omap3evm_spi_board_info[] = { | |||
| 625 | static struct omap_board_config_kernel omap3_evm_config[] __initdata = { | 725 | static struct omap_board_config_kernel omap3_evm_config[] __initdata = { |
| 626 | }; | 726 | }; |
| 627 | 727 | ||
| 628 | static void __init omap3_evm_init_irq(void) | 728 | static void __init omap3_evm_init_early(void) |
| 629 | { | 729 | { |
| 630 | omap_board_config = omap3_evm_config; | ||
| 631 | omap_board_config_size = ARRAY_SIZE(omap3_evm_config); | ||
| 632 | omap2_init_common_infrastructure(); | 730 | omap2_init_common_infrastructure(); |
| 633 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL); | 731 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL); |
| 634 | omap_init_irq(); | ||
| 635 | } | 732 | } |
| 636 | 733 | ||
| 637 | static struct platform_device *omap3_evm_devices[] __initdata = { | ||
| 638 | &omap3_evm_dss_device, | ||
| 639 | }; | ||
| 640 | |||
| 641 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { | 734 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { |
| 642 | 735 | ||
| 643 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 736 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
| @@ -652,14 +745,76 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { | |||
| 652 | }; | 745 | }; |
| 653 | 746 | ||
| 654 | #ifdef CONFIG_OMAP_MUX | 747 | #ifdef CONFIG_OMAP_MUX |
| 655 | static struct omap_board_mux board_mux[] __initdata = { | 748 | static struct omap_board_mux omap35x_board_mux[] __initdata = { |
| 749 | OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP | | ||
| 750 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | | ||
| 751 | OMAP_PIN_OFF_WAKEUPENABLE), | ||
| 752 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | ||
| 753 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | | ||
| 754 | OMAP_PIN_OFF_WAKEUPENABLE), | ||
| 755 | OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | ||
| 756 | OMAP_PIN_OFF_NONE), | ||
| 757 | OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | ||
| 758 | OMAP_PIN_OFF_NONE), | ||
| 759 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
| 760 | /* WLAN IRQ - GPIO 149 */ | ||
| 761 | OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
| 762 | |||
| 763 | /* WLAN POWER ENABLE - GPIO 150 */ | ||
| 764 | OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
| 765 | |||
| 766 | /* MMC2 SDIO pin muxes for WL12xx */ | ||
| 767 | OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 768 | OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 769 | OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 770 | OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 771 | OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 772 | OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 773 | #endif | ||
| 774 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
| 775 | }; | ||
| 776 | |||
| 777 | static struct omap_board_mux omap36x_board_mux[] __initdata = { | ||
| 656 | OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP | | 778 | OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP | |
| 657 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | | 779 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | |
| 658 | OMAP_PIN_OFF_WAKEUPENABLE), | 780 | OMAP_PIN_OFF_WAKEUPENABLE), |
| 659 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | 781 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | |
| 660 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW), | 782 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | |
| 783 | OMAP_PIN_OFF_WAKEUPENABLE), | ||
| 784 | /* AM/DM37x EVM: DSS data bus muxed with sys_boot */ | ||
| 785 | OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 786 | OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 787 | OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 788 | OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 789 | OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 790 | OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 791 | OMAP3_MUX(SYS_BOOT0, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 792 | OMAP3_MUX(SYS_BOOT1, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 793 | OMAP3_MUX(SYS_BOOT3, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 794 | OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 795 | OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 796 | OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
| 797 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
| 798 | /* WLAN IRQ - GPIO 149 */ | ||
| 799 | OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
| 800 | |||
| 801 | /* WLAN POWER ENABLE - GPIO 150 */ | ||
| 802 | OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
| 803 | |||
| 804 | /* MMC2 SDIO pin muxes for WL12xx */ | ||
| 805 | OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 806 | OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 807 | OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 808 | OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 809 | OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 810 | OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 811 | #endif | ||
| 812 | |||
| 661 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 813 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
| 662 | }; | 814 | }; |
| 815 | #else | ||
| 816 | #define omap35x_board_mux NULL | ||
| 817 | #define omap36x_board_mux NULL | ||
| 663 | #endif | 818 | #endif |
| 664 | 819 | ||
| 665 | static struct omap_musb_board_data musb_board_data = { | 820 | static struct omap_musb_board_data musb_board_data = { |
| @@ -671,11 +826,18 @@ static struct omap_musb_board_data musb_board_data = { | |||
| 671 | static void __init omap3_evm_init(void) | 826 | static void __init omap3_evm_init(void) |
| 672 | { | 827 | { |
| 673 | omap3_evm_get_revision(); | 828 | omap3_evm_get_revision(); |
| 674 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 829 | |
| 830 | if (cpu_is_omap3630()) | ||
| 831 | omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB); | ||
| 832 | else | ||
| 833 | omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB); | ||
| 834 | |||
| 835 | omap_board_config = omap3_evm_config; | ||
| 836 | omap_board_config_size = ARRAY_SIZE(omap3_evm_config); | ||
| 675 | 837 | ||
| 676 | omap3_evm_i2c_init(); | 838 | omap3_evm_i2c_init(); |
| 677 | 839 | ||
| 678 | platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices)); | 840 | omap_display_init(&omap3_evm_dss_data); |
| 679 | 841 | ||
| 680 | spi_register_board_info(omap3evm_spi_board_info, | 842 | spi_register_board_info(omap3evm_spi_board_info, |
| 681 | ARRAY_SIZE(omap3evm_spi_board_info)); | 843 | ARRAY_SIZE(omap3evm_spi_board_info)); |
| @@ -715,14 +877,22 @@ static void __init omap3_evm_init(void) | |||
| 715 | ads7846_dev_init(); | 877 | ads7846_dev_init(); |
| 716 | omap3evm_init_smsc911x(); | 878 | omap3evm_init_smsc911x(); |
| 717 | omap3_evm_display_init(); | 879 | omap3_evm_display_init(); |
| 880 | |||
| 881 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
| 882 | /* WL12xx WLAN Init */ | ||
| 883 | if (wl12xx_set_platform_data(&omap3evm_wlan_data)) | ||
| 884 | pr_err("error setting wl12xx data\n"); | ||
| 885 | platform_device_register(&omap3evm_wlan_regulator); | ||
| 886 | #endif | ||
| 718 | } | 887 | } |
| 719 | 888 | ||
| 720 | MACHINE_START(OMAP3EVM, "OMAP3 EVM") | 889 | MACHINE_START(OMAP3EVM, "OMAP3 EVM") |
| 721 | /* Maintainer: Syed Mohammed Khasim - Texas Instruments */ | 890 | /* Maintainer: Syed Mohammed Khasim - Texas Instruments */ |
| 722 | .boot_params = 0x80000100, | 891 | .boot_params = 0x80000100, |
| 723 | .map_io = omap3_map_io, | ||
| 724 | .reserve = omap_reserve, | 892 | .reserve = omap_reserve, |
| 725 | .init_irq = omap3_evm_init_irq, | 893 | .map_io = omap3_map_io, |
| 894 | .init_early = omap3_evm_init_early, | ||
| 895 | .init_irq = omap_init_irq, | ||
| 726 | .init_machine = omap3_evm_init, | 896 | .init_machine = omap3_evm_init, |
| 727 | .timer = &omap_timer, | 897 | .timer = &omap_timer, |
| 728 | MACHINE_END | 898 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c index 15e4b08e99ba..b726943d7c93 100644 --- a/arch/arm/mach-omap2/board-omap3logic.c +++ b/arch/arm/mach-omap2/board-omap3logic.c | |||
| @@ -195,11 +195,10 @@ static inline void __init board_smsc911x_init(void) | |||
| 195 | gpmc_smsc911x_init(&board_smsc911x_data); | 195 | gpmc_smsc911x_init(&board_smsc911x_data); |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | static void __init omap3logic_init_irq(void) | 198 | static void __init omap3logic_init_early(void) |
| 199 | { | 199 | { |
| 200 | omap2_init_common_infrastructure(); | 200 | omap2_init_common_infrastructure(); |
| 201 | omap2_init_common_devices(NULL, NULL); | 201 | omap2_init_common_devices(NULL, NULL); |
| 202 | omap_init_irq(); | ||
| 203 | } | 202 | } |
| 204 | 203 | ||
| 205 | #ifdef CONFIG_OMAP_MUX | 204 | #ifdef CONFIG_OMAP_MUX |
| @@ -225,7 +224,8 @@ static void __init omap3logic_init(void) | |||
| 225 | MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") | 224 | MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") |
| 226 | .boot_params = 0x80000100, | 225 | .boot_params = 0x80000100, |
| 227 | .map_io = omap3_map_io, | 226 | .map_io = omap3_map_io, |
| 228 | .init_irq = omap3logic_init_irq, | 227 | .init_early = omap3logic_init_early, |
| 228 | .init_irq = omap_init_irq, | ||
| 229 | .init_machine = omap3logic_init, | 229 | .init_machine = omap3logic_init, |
| 230 | .timer = &omap_timer, | 230 | .timer = &omap_timer, |
| 231 | MACHINE_END | 231 | MACHINE_END |
| @@ -233,7 +233,8 @@ MACHINE_END | |||
| 233 | MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") | 233 | MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") |
| 234 | .boot_params = 0x80000100, | 234 | .boot_params = 0x80000100, |
| 235 | .map_io = omap3_map_io, | 235 | .map_io = omap3_map_io, |
| 236 | .init_irq = omap3logic_init_irq, | 236 | .init_early = omap3logic_init_early, |
| 237 | .init_irq = omap_init_irq, | ||
| 237 | .init_machine = omap3logic_init, | 238 | .init_machine = omap3logic_init, |
| 238 | .timer = &omap_timer, | 239 | .timer = &omap_timer, |
| 239 | MACHINE_END | 240 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 0b34beded11f..5386a8190ea1 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
| @@ -253,14 +253,6 @@ static struct omap_dss_board_info pandora_dss_data = { | |||
| 253 | .default_device = &pandora_lcd_device, | 253 | .default_device = &pandora_lcd_device, |
| 254 | }; | 254 | }; |
| 255 | 255 | ||
| 256 | static struct platform_device pandora_dss_device = { | ||
| 257 | .name = "omapdss", | ||
| 258 | .id = -1, | ||
| 259 | .dev = { | ||
| 260 | .platform_data = &pandora_dss_data, | ||
| 261 | }, | ||
| 262 | }; | ||
| 263 | |||
| 264 | static void pandora_wl1251_init_card(struct mmc_card *card) | 256 | static void pandora_wl1251_init_card(struct mmc_card *card) |
| 265 | { | 257 | { |
| 266 | /* | 258 | /* |
| @@ -341,13 +333,13 @@ static struct twl4030_gpio_platform_data omap3pandora_gpio_data = { | |||
| 341 | }; | 333 | }; |
| 342 | 334 | ||
| 343 | static struct regulator_consumer_supply pandora_vmmc1_supply = | 335 | static struct regulator_consumer_supply pandora_vmmc1_supply = |
| 344 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); | 336 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); |
| 345 | 337 | ||
| 346 | static struct regulator_consumer_supply pandora_vmmc2_supply = | 338 | static struct regulator_consumer_supply pandora_vmmc2_supply = |
| 347 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); | 339 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); |
| 348 | 340 | ||
| 349 | static struct regulator_consumer_supply pandora_vmmc3_supply = | 341 | static struct regulator_consumer_supply pandora_vmmc3_supply = |
| 350 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.2"); | 342 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"); |
| 351 | 343 | ||
| 352 | static struct regulator_consumer_supply pandora_vdda_dac_supply = | 344 | static struct regulator_consumer_supply pandora_vdda_dac_supply = |
| 353 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); | 345 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
| @@ -524,9 +516,7 @@ static struct twl4030_usb_data omap3pandora_usb_data = { | |||
| 524 | .usb_mode = T2_USB_MODE_ULPI, | 516 | .usb_mode = T2_USB_MODE_ULPI, |
| 525 | }; | 517 | }; |
| 526 | 518 | ||
| 527 | static struct twl4030_codec_audio_data omap3pandora_audio_data = { | 519 | static struct twl4030_codec_audio_data omap3pandora_audio_data; |
| 528 | .audio_mclk = 26000000, | ||
| 529 | }; | ||
| 530 | 520 | ||
| 531 | static struct twl4030_codec_data omap3pandora_codec_data = { | 521 | static struct twl4030_codec_data omap3pandora_codec_data = { |
| 532 | .audio_mclk = 26000000, | 522 | .audio_mclk = 26000000, |
| @@ -634,12 +624,11 @@ static struct spi_board_info omap3pandora_spi_board_info[] __initdata = { | |||
| 634 | } | 624 | } |
| 635 | }; | 625 | }; |
| 636 | 626 | ||
| 637 | static void __init omap3pandora_init_irq(void) | 627 | static void __init omap3pandora_init_early(void) |
| 638 | { | 628 | { |
| 639 | omap2_init_common_infrastructure(); | 629 | omap2_init_common_infrastructure(); |
| 640 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, | 630 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, |
| 641 | mt46h32m32lf6_sdrc_params); | 631 | mt46h32m32lf6_sdrc_params); |
| 642 | omap_init_irq(); | ||
| 643 | } | 632 | } |
| 644 | 633 | ||
| 645 | static void __init pandora_wl1251_init(void) | 634 | static void __init pandora_wl1251_init(void) |
| @@ -677,7 +666,6 @@ fail: | |||
| 677 | static struct platform_device *omap3pandora_devices[] __initdata = { | 666 | static struct platform_device *omap3pandora_devices[] __initdata = { |
| 678 | &pandora_leds_gpio, | 667 | &pandora_leds_gpio, |
| 679 | &pandora_keys_gpio, | 668 | &pandora_keys_gpio, |
| 680 | &pandora_dss_device, | ||
| 681 | &pandora_vwlan_device, | 669 | &pandora_vwlan_device, |
| 682 | }; | 670 | }; |
| 683 | 671 | ||
| @@ -712,6 +700,7 @@ static void __init omap3pandora_init(void) | |||
| 712 | pandora_wl1251_init(); | 700 | pandora_wl1251_init(); |
| 713 | platform_add_devices(omap3pandora_devices, | 701 | platform_add_devices(omap3pandora_devices, |
| 714 | ARRAY_SIZE(omap3pandora_devices)); | 702 | ARRAY_SIZE(omap3pandora_devices)); |
| 703 | omap_display_init(&pandora_dss_data); | ||
| 715 | omap_serial_init(); | 704 | omap_serial_init(); |
| 716 | spi_register_board_info(omap3pandora_spi_board_info, | 705 | spi_register_board_info(omap3pandora_spi_board_info, |
| 717 | ARRAY_SIZE(omap3pandora_spi_board_info)); | 706 | ARRAY_SIZE(omap3pandora_spi_board_info)); |
| @@ -727,9 +716,10 @@ static void __init omap3pandora_init(void) | |||
| 727 | 716 | ||
| 728 | MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") | 717 | MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") |
| 729 | .boot_params = 0x80000100, | 718 | .boot_params = 0x80000100, |
| 730 | .map_io = omap3_map_io, | ||
| 731 | .reserve = omap_reserve, | 719 | .reserve = omap_reserve, |
| 732 | .init_irq = omap3pandora_init_irq, | 720 | .map_io = omap3_map_io, |
| 721 | .init_early = omap3pandora_init_early, | ||
| 722 | .init_irq = omap_init_irq, | ||
| 733 | .init_machine = omap3pandora_init, | 723 | .init_machine = omap3pandora_init, |
| 734 | .timer = &omap_timer, | 724 | .timer = &omap_timer, |
| 735 | MACHINE_END | 725 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index 2a2dad447e86..15ede8b49815 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
| @@ -240,14 +240,6 @@ static struct omap_dss_board_info omap3_stalker_dss_data = { | |||
| 240 | .default_device = &omap3_stalker_dvi_device, | 240 | .default_device = &omap3_stalker_dvi_device, |
| 241 | }; | 241 | }; |
| 242 | 242 | ||
| 243 | static struct platform_device omap3_stalker_dss_device = { | ||
| 244 | .name = "omapdss", | ||
| 245 | .id = -1, | ||
| 246 | .dev = { | ||
| 247 | .platform_data = &omap3_stalker_dss_data, | ||
| 248 | }, | ||
| 249 | }; | ||
| 250 | |||
| 251 | static struct regulator_consumer_supply omap3stalker_vmmc1_supply = { | 243 | static struct regulator_consumer_supply omap3stalker_vmmc1_supply = { |
| 252 | .supply = "vmmc", | 244 | .supply = "vmmc", |
| 253 | }; | 245 | }; |
| @@ -439,19 +431,15 @@ static struct twl4030_madc_platform_data omap3stalker_madc_data = { | |||
| 439 | .irq_line = 1, | 431 | .irq_line = 1, |
| 440 | }; | 432 | }; |
| 441 | 433 | ||
| 442 | static struct twl4030_codec_audio_data omap3stalker_audio_data = { | 434 | static struct twl4030_codec_audio_data omap3stalker_audio_data; |
| 443 | .audio_mclk = 26000000, | ||
| 444 | }; | ||
| 445 | 435 | ||
| 446 | static struct twl4030_codec_data omap3stalker_codec_data = { | 436 | static struct twl4030_codec_data omap3stalker_codec_data = { |
| 447 | .audio_mclk = 26000000, | 437 | .audio_mclk = 26000000, |
| 448 | .audio = &omap3stalker_audio_data, | 438 | .audio = &omap3stalker_audio_data, |
| 449 | }; | 439 | }; |
| 450 | 440 | ||
| 451 | static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply = { | 441 | static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply = |
| 452 | .supply = "vdda_dac", | 442 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
| 453 | .dev = &omap3_stalker_dss_device.dev, | ||
| 454 | }; | ||
| 455 | 443 | ||
| 456 | /* VDAC for DSS driving S-Video */ | 444 | /* VDAC for DSS driving S-Video */ |
| 457 | static struct regulator_init_data omap3_stalker_vdac = { | 445 | static struct regulator_init_data omap3_stalker_vdac = { |
| @@ -469,10 +457,8 @@ static struct regulator_init_data omap3_stalker_vdac = { | |||
| 469 | }; | 457 | }; |
| 470 | 458 | ||
| 471 | /* VPLL2 for digital video outputs */ | 459 | /* VPLL2 for digital video outputs */ |
| 472 | static struct regulator_consumer_supply omap3_stalker_vpll2_supply = { | 460 | static struct regulator_consumer_supply omap3_stalker_vpll2_supply = |
| 473 | .supply = "vdds_dsi", | 461 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"); |
| 474 | .dev = &omap3_stalker_lcd_device.dev, | ||
| 475 | }; | ||
| 476 | 462 | ||
| 477 | static struct regulator_init_data omap3_stalker_vpll2 = { | 463 | static struct regulator_init_data omap3_stalker_vpll2 = { |
| 478 | .constraints = { | 464 | .constraints = { |
| @@ -591,12 +577,14 @@ static struct spi_board_info omap3stalker_spi_board_info[] = { | |||
| 591 | static struct omap_board_config_kernel omap3_stalker_config[] __initdata = { | 577 | static struct omap_board_config_kernel omap3_stalker_config[] __initdata = { |
| 592 | }; | 578 | }; |
| 593 | 579 | ||
| 594 | static void __init omap3_stalker_init_irq(void) | 580 | static void __init omap3_stalker_init_early(void) |
| 595 | { | 581 | { |
| 596 | omap_board_config = omap3_stalker_config; | ||
| 597 | omap_board_config_size = ARRAY_SIZE(omap3_stalker_config); | ||
| 598 | omap2_init_common_infrastructure(); | 582 | omap2_init_common_infrastructure(); |
| 599 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL); | 583 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL); |
| 584 | } | ||
| 585 | |||
| 586 | static void __init omap3_stalker_init_irq(void) | ||
| 587 | { | ||
| 600 | omap_init_irq(); | 588 | omap_init_irq(); |
| 601 | #ifdef CONFIG_OMAP_32K_TIMER | 589 | #ifdef CONFIG_OMAP_32K_TIMER |
| 602 | omap2_gp_clockevent_set_gptimer(12); | 590 | omap2_gp_clockevent_set_gptimer(12); |
| @@ -604,7 +592,6 @@ static void __init omap3_stalker_init_irq(void) | |||
| 604 | } | 592 | } |
| 605 | 593 | ||
| 606 | static struct platform_device *omap3_stalker_devices[] __initdata = { | 594 | static struct platform_device *omap3_stalker_devices[] __initdata = { |
| 607 | &omap3_stalker_dss_device, | ||
| 608 | &keys_gpio, | 595 | &keys_gpio, |
| 609 | }; | 596 | }; |
| 610 | 597 | ||
| @@ -638,12 +625,15 @@ static struct omap_musb_board_data musb_board_data = { | |||
| 638 | static void __init omap3_stalker_init(void) | 625 | static void __init omap3_stalker_init(void) |
| 639 | { | 626 | { |
| 640 | omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); | 627 | omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); |
| 628 | omap_board_config = omap3_stalker_config; | ||
| 629 | omap_board_config_size = ARRAY_SIZE(omap3_stalker_config); | ||
| 641 | 630 | ||
| 642 | omap3_stalker_i2c_init(); | 631 | omap3_stalker_i2c_init(); |
| 643 | 632 | ||
| 644 | platform_add_devices(omap3_stalker_devices, | 633 | platform_add_devices(omap3_stalker_devices, |
| 645 | ARRAY_SIZE(omap3_stalker_devices)); | 634 | ARRAY_SIZE(omap3_stalker_devices)); |
| 646 | 635 | ||
| 636 | omap_display_init(&omap3_stalker_dss_data); | ||
| 647 | spi_register_board_info(omap3stalker_spi_board_info, | 637 | spi_register_board_info(omap3stalker_spi_board_info, |
| 648 | ARRAY_SIZE(omap3stalker_spi_board_info)); | 638 | ARRAY_SIZE(omap3stalker_spi_board_info)); |
| 649 | 639 | ||
| @@ -666,6 +656,7 @@ MACHINE_START(SBC3530, "OMAP3 STALKER") | |||
| 666 | /* Maintainer: Jason Lam -lzg@ema-tech.com */ | 656 | /* Maintainer: Jason Lam -lzg@ema-tech.com */ |
| 667 | .boot_params = 0x80000100, | 657 | .boot_params = 0x80000100, |
| 668 | .map_io = omap3_map_io, | 658 | .map_io = omap3_map_io, |
| 659 | .init_early = omap3_stalker_init_early, | ||
| 669 | .init_irq = omap3_stalker_init_irq, | 660 | .init_irq = omap3_stalker_init_irq, |
| 670 | .init_machine = omap3_stalker_init, | 661 | .init_machine = omap3_stalker_init, |
| 671 | .timer = &omap_timer, | 662 | .timer = &omap_timer, |
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index db1f74fe6c4f..5554f5814aa4 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
| @@ -252,9 +252,7 @@ static struct twl4030_usb_data touchbook_usb_data = { | |||
| 252 | .usb_mode = T2_USB_MODE_ULPI, | 252 | .usb_mode = T2_USB_MODE_ULPI, |
| 253 | }; | 253 | }; |
| 254 | 254 | ||
| 255 | static struct twl4030_codec_audio_data touchbook_audio_data = { | 255 | static struct twl4030_codec_audio_data touchbook_audio_data; |
| 256 | .audio_mclk = 26000000, | ||
| 257 | }; | ||
| 258 | 256 | ||
| 259 | static struct twl4030_codec_data touchbook_codec_data = { | 257 | static struct twl4030_codec_data touchbook_codec_data = { |
| 260 | .audio_mclk = 26000000, | 258 | .audio_mclk = 26000000, |
| @@ -415,14 +413,15 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
| 415 | }; | 413 | }; |
| 416 | #endif | 414 | #endif |
| 417 | 415 | ||
| 418 | static void __init omap3_touchbook_init_irq(void) | 416 | static void __init omap3_touchbook_init_early(void) |
| 419 | { | 417 | { |
| 420 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | ||
| 421 | omap_board_config = omap3_touchbook_config; | ||
| 422 | omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config); | ||
| 423 | omap2_init_common_infrastructure(); | 418 | omap2_init_common_infrastructure(); |
| 424 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, | 419 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, |
| 425 | mt46h32m32lf6_sdrc_params); | 420 | mt46h32m32lf6_sdrc_params); |
| 421 | } | ||
| 422 | |||
| 423 | static void __init omap3_touchbook_init_irq(void) | ||
| 424 | { | ||
| 426 | omap_init_irq(); | 425 | omap_init_irq(); |
| 427 | #ifdef CONFIG_OMAP_32K_TIMER | 426 | #ifdef CONFIG_OMAP_32K_TIMER |
| 428 | omap2_gp_clockevent_set_gptimer(12); | 427 | omap2_gp_clockevent_set_gptimer(12); |
| @@ -510,6 +509,10 @@ static struct omap_musb_board_data musb_board_data = { | |||
| 510 | 509 | ||
| 511 | static void __init omap3_touchbook_init(void) | 510 | static void __init omap3_touchbook_init(void) |
| 512 | { | 511 | { |
| 512 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | ||
| 513 | omap_board_config = omap3_touchbook_config; | ||
| 514 | omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config); | ||
| 515 | |||
| 513 | pm_power_off = omap3_touchbook_poweroff; | 516 | pm_power_off = omap3_touchbook_poweroff; |
| 514 | 517 | ||
| 515 | omap3_touchbook_i2c_init(); | 518 | omap3_touchbook_i2c_init(); |
| @@ -538,8 +541,9 @@ static void __init omap3_touchbook_init(void) | |||
| 538 | MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") | 541 | MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") |
| 539 | /* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */ | 542 | /* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */ |
| 540 | .boot_params = 0x80000100, | 543 | .boot_params = 0x80000100, |
| 541 | .map_io = omap3_map_io, | ||
| 542 | .reserve = omap_reserve, | 544 | .reserve = omap_reserve, |
| 545 | .map_io = omap3_map_io, | ||
| 546 | .init_early = omap3_touchbook_init_early, | ||
| 543 | .init_irq = omap3_touchbook_init_irq, | 547 | .init_irq = omap3_touchbook_init_irq, |
| 544 | .init_machine = omap3_touchbook_init, | 548 | .init_machine = omap3_touchbook_init, |
| 545 | .timer = &omap_timer, | 549 | .timer = &omap_timer, |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index e944025d5ef8..a94ce07be72f 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | #include <linux/usb/otg.h> | 26 | #include <linux/usb/otg.h> |
| 27 | #include <linux/i2c/twl.h> | 27 | #include <linux/i2c/twl.h> |
| 28 | #include <linux/regulator/machine.h> | 28 | #include <linux/regulator/machine.h> |
| 29 | #include <linux/regulator/fixed.h> | ||
| 30 | #include <linux/wl12xx.h> | ||
| 29 | 31 | ||
| 30 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
| 31 | #include <mach/omap4-common.h> | 33 | #include <mach/omap4-common.h> |
| @@ -45,6 +47,18 @@ | |||
| 45 | 47 | ||
| 46 | #define GPIO_HUB_POWER 1 | 48 | #define GPIO_HUB_POWER 1 |
| 47 | #define GPIO_HUB_NRESET 62 | 49 | #define GPIO_HUB_NRESET 62 |
| 50 | #define GPIO_WIFI_PMENA 43 | ||
| 51 | #define GPIO_WIFI_IRQ 53 | ||
| 52 | |||
| 53 | /* wl127x BT, FM, GPS connectivity chip */ | ||
| 54 | static int wl1271_gpios[] = {46, -1, -1}; | ||
| 55 | static struct platform_device wl1271_device = { | ||
| 56 | .name = "kim", | ||
| 57 | .id = -1, | ||
| 58 | .dev = { | ||
| 59 | .platform_data = &wl1271_gpios, | ||
| 60 | }, | ||
| 61 | }; | ||
| 48 | 62 | ||
| 49 | static struct gpio_led gpio_leds[] = { | 63 | static struct gpio_led gpio_leds[] = { |
| 50 | { | 64 | { |
| @@ -74,13 +88,13 @@ static struct platform_device leds_gpio = { | |||
| 74 | 88 | ||
| 75 | static struct platform_device *panda_devices[] __initdata = { | 89 | static struct platform_device *panda_devices[] __initdata = { |
| 76 | &leds_gpio, | 90 | &leds_gpio, |
| 91 | &wl1271_device, | ||
| 77 | }; | 92 | }; |
| 78 | 93 | ||
| 79 | static void __init omap4_panda_init_irq(void) | 94 | static void __init omap4_panda_init_early(void) |
| 80 | { | 95 | { |
| 81 | omap2_init_common_infrastructure(); | 96 | omap2_init_common_infrastructure(); |
| 82 | omap2_init_common_devices(NULL, NULL); | 97 | omap2_init_common_devices(NULL, NULL); |
| 83 | gic_init_irq(); | ||
| 84 | } | 98 | } |
| 85 | 99 | ||
| 86 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 100 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
| @@ -162,16 +176,62 @@ static struct omap2_hsmmc_info mmc[] = { | |||
| 162 | .gpio_wp = -EINVAL, | 176 | .gpio_wp = -EINVAL, |
| 163 | .gpio_cd = -EINVAL, | 177 | .gpio_cd = -EINVAL, |
| 164 | }, | 178 | }, |
| 179 | { | ||
| 180 | .name = "wl1271", | ||
| 181 | .mmc = 5, | ||
| 182 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | ||
| 183 | .gpio_wp = -EINVAL, | ||
| 184 | .gpio_cd = -EINVAL, | ||
| 185 | .ocr_mask = MMC_VDD_165_195, | ||
| 186 | .nonremovable = true, | ||
| 187 | }, | ||
| 165 | {} /* Terminator */ | 188 | {} /* Terminator */ |
| 166 | }; | 189 | }; |
| 167 | 190 | ||
| 168 | static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { | 191 | static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { |
| 169 | { | 192 | { |
| 170 | .supply = "vmmc", | 193 | .supply = "vmmc", |
| 171 | .dev_name = "mmci-omap-hs.0", | 194 | .dev_name = "omap_hsmmc.0", |
| 195 | }, | ||
| 196 | }; | ||
| 197 | |||
| 198 | static struct regulator_consumer_supply omap4_panda_vmmc5_supply = { | ||
| 199 | .supply = "vmmc", | ||
| 200 | .dev_name = "omap_hsmmc.4", | ||
| 201 | }; | ||
| 202 | |||
| 203 | static struct regulator_init_data panda_vmmc5 = { | ||
| 204 | .constraints = { | ||
| 205 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
| 206 | }, | ||
| 207 | .num_consumer_supplies = 1, | ||
| 208 | .consumer_supplies = &omap4_panda_vmmc5_supply, | ||
| 209 | }; | ||
| 210 | |||
| 211 | static struct fixed_voltage_config panda_vwlan = { | ||
| 212 | .supply_name = "vwl1271", | ||
| 213 | .microvolts = 1800000, /* 1.8V */ | ||
| 214 | .gpio = GPIO_WIFI_PMENA, | ||
| 215 | .startup_delay = 70000, /* 70msec */ | ||
| 216 | .enable_high = 1, | ||
| 217 | .enabled_at_boot = 0, | ||
| 218 | .init_data = &panda_vmmc5, | ||
| 219 | }; | ||
| 220 | |||
| 221 | static struct platform_device omap_vwlan_device = { | ||
| 222 | .name = "reg-fixed-voltage", | ||
| 223 | .id = 1, | ||
| 224 | .dev = { | ||
| 225 | .platform_data = &panda_vwlan, | ||
| 172 | }, | 226 | }, |
| 173 | }; | 227 | }; |
| 174 | 228 | ||
| 229 | struct wl12xx_platform_data omap_panda_wlan_data __initdata = { | ||
| 230 | .irq = OMAP_GPIO_IRQ(GPIO_WIFI_IRQ), | ||
| 231 | /* PANDA ref clock is 38.4 MHz */ | ||
| 232 | .board_ref_clock = 2, | ||
| 233 | }; | ||
| 234 | |||
| 175 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) | 235 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) |
| 176 | { | 236 | { |
| 177 | int ret = 0; | 237 | int ret = 0; |
| @@ -305,7 +365,6 @@ static struct regulator_init_data omap4_panda_vana = { | |||
| 305 | .constraints = { | 365 | .constraints = { |
| 306 | .min_uV = 2100000, | 366 | .min_uV = 2100000, |
| 307 | .max_uV = 2100000, | 367 | .max_uV = 2100000, |
| 308 | .apply_uV = true, | ||
| 309 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 368 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 310 | | REGULATOR_MODE_STANDBY, | 369 | | REGULATOR_MODE_STANDBY, |
| 311 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 370 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| @@ -317,7 +376,6 @@ static struct regulator_init_data omap4_panda_vcxio = { | |||
| 317 | .constraints = { | 376 | .constraints = { |
| 318 | .min_uV = 1800000, | 377 | .min_uV = 1800000, |
| 319 | .max_uV = 1800000, | 378 | .max_uV = 1800000, |
| 320 | .apply_uV = true, | ||
| 321 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 379 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 322 | | REGULATOR_MODE_STANDBY, | 380 | | REGULATOR_MODE_STANDBY, |
| 323 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 381 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| @@ -329,7 +387,6 @@ static struct regulator_init_data omap4_panda_vdac = { | |||
| 329 | .constraints = { | 387 | .constraints = { |
| 330 | .min_uV = 1800000, | 388 | .min_uV = 1800000, |
| 331 | .max_uV = 1800000, | 389 | .max_uV = 1800000, |
| 332 | .apply_uV = true, | ||
| 333 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 390 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
| 334 | | REGULATOR_MODE_STANDBY, | 391 | | REGULATOR_MODE_STANDBY, |
| 335 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 392 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| @@ -391,6 +448,19 @@ static int __init omap4_panda_i2c_init(void) | |||
| 391 | 448 | ||
| 392 | #ifdef CONFIG_OMAP_MUX | 449 | #ifdef CONFIG_OMAP_MUX |
| 393 | static struct omap_board_mux board_mux[] __initdata = { | 450 | static struct omap_board_mux board_mux[] __initdata = { |
| 451 | /* WLAN IRQ - GPIO 53 */ | ||
| 452 | OMAP4_MUX(GPMC_NCS3, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), | ||
| 453 | /* WLAN POWER ENABLE - GPIO 43 */ | ||
| 454 | OMAP4_MUX(GPMC_A19, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT), | ||
| 455 | /* WLAN SDIO: MMC5 CMD */ | ||
| 456 | OMAP4_MUX(SDMMC5_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 457 | /* WLAN SDIO: MMC5 CLK */ | ||
| 458 | OMAP4_MUX(SDMMC5_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 459 | /* WLAN SDIO: MMC5 DAT[0-3] */ | ||
| 460 | OMAP4_MUX(SDMMC5_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 461 | OMAP4_MUX(SDMMC5_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 462 | OMAP4_MUX(SDMMC5_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 463 | OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
| 394 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 464 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
| 395 | }; | 465 | }; |
| 396 | #else | 466 | #else |
| @@ -405,8 +475,12 @@ static void __init omap4_panda_init(void) | |||
| 405 | package = OMAP_PACKAGE_CBL; | 475 | package = OMAP_PACKAGE_CBL; |
| 406 | omap4_mux_init(board_mux, package); | 476 | omap4_mux_init(board_mux, package); |
| 407 | 477 | ||
| 478 | if (wl12xx_set_platform_data(&omap_panda_wlan_data)) | ||
| 479 | pr_err("error setting wl12xx data\n"); | ||
| 480 | |||
| 408 | omap4_panda_i2c_init(); | 481 | omap4_panda_i2c_init(); |
| 409 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); | 482 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); |
| 483 | platform_device_register(&omap_vwlan_device); | ||
| 410 | omap_serial_init(); | 484 | omap_serial_init(); |
| 411 | omap4_twl6030_hsmmc_init(mmc); | 485 | omap4_twl6030_hsmmc_init(mmc); |
| 412 | omap4_ehci_init(); | 486 | omap4_ehci_init(); |
| @@ -424,7 +498,8 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board") | |||
| 424 | .boot_params = 0x80000100, | 498 | .boot_params = 0x80000100, |
| 425 | .reserve = omap_reserve, | 499 | .reserve = omap_reserve, |
| 426 | .map_io = omap4_panda_map_io, | 500 | .map_io = omap4_panda_map_io, |
| 427 | .init_irq = omap4_panda_init_irq, | 501 | .init_early = omap4_panda_init_early, |
| 502 | .init_irq = gic_init_irq, | ||
| 428 | .init_machine = omap4_panda_init, | 503 | .init_machine = omap4_panda_init, |
| 429 | .timer = &omap_timer, | 504 | .timer = &omap_timer, |
| 430 | MACHINE_END | 505 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index cb26e5d8268d..60f8db31763c 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
| @@ -358,9 +358,7 @@ static struct regulator_init_data overo_vmmc1 = { | |||
| 358 | .consumer_supplies = &overo_vmmc1_supply, | 358 | .consumer_supplies = &overo_vmmc1_supply, |
| 359 | }; | 359 | }; |
| 360 | 360 | ||
| 361 | static struct twl4030_codec_audio_data overo_audio_data = { | 361 | static struct twl4030_codec_audio_data overo_audio_data; |
| 362 | .audio_mclk = 26000000, | ||
| 363 | }; | ||
| 364 | 362 | ||
| 365 | static struct twl4030_codec_data overo_codec_data = { | 363 | static struct twl4030_codec_data overo_codec_data = { |
| 366 | .audio_mclk = 26000000, | 364 | .audio_mclk = 26000000, |
| @@ -409,14 +407,11 @@ static struct omap_board_config_kernel overo_config[] __initdata = { | |||
| 409 | { OMAP_TAG_LCD, &overo_lcd_config }, | 407 | { OMAP_TAG_LCD, &overo_lcd_config }, |
| 410 | }; | 408 | }; |
| 411 | 409 | ||
| 412 | static void __init overo_init_irq(void) | 410 | static void __init overo_init_early(void) |
| 413 | { | 411 | { |
| 414 | omap_board_config = overo_config; | ||
| 415 | omap_board_config_size = ARRAY_SIZE(overo_config); | ||
| 416 | omap2_init_common_infrastructure(); | 412 | omap2_init_common_infrastructure(); |
| 417 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, | 413 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, |
| 418 | mt46h32m32lf6_sdrc_params); | 414 | mt46h32m32lf6_sdrc_params); |
| 419 | omap_init_irq(); | ||
| 420 | } | 415 | } |
| 421 | 416 | ||
| 422 | static struct platform_device *overo_devices[] __initdata = { | 417 | static struct platform_device *overo_devices[] __initdata = { |
| @@ -449,6 +444,8 @@ static struct omap_musb_board_data musb_board_data = { | |||
| 449 | static void __init overo_init(void) | 444 | static void __init overo_init(void) |
| 450 | { | 445 | { |
| 451 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 446 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
| 447 | omap_board_config = overo_config; | ||
| 448 | omap_board_config_size = ARRAY_SIZE(overo_config); | ||
| 452 | overo_i2c_init(); | 449 | overo_i2c_init(); |
| 453 | platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices)); | 450 | platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices)); |
| 454 | omap_serial_init(); | 451 | omap_serial_init(); |
| @@ -501,9 +498,10 @@ static void __init overo_init(void) | |||
| 501 | 498 | ||
| 502 | MACHINE_START(OVERO, "Gumstix Overo") | 499 | MACHINE_START(OVERO, "Gumstix Overo") |
| 503 | .boot_params = 0x80000100, | 500 | .boot_params = 0x80000100, |
| 504 | .map_io = omap3_map_io, | ||
| 505 | .reserve = omap_reserve, | 501 | .reserve = omap_reserve, |
| 506 | .init_irq = overo_init_irq, | 502 | .map_io = omap3_map_io, |
| 503 | .init_early = overo_init_early, | ||
| 504 | .init_irq = omap_init_irq, | ||
| 507 | .init_machine = overo_init, | 505 | .init_machine = overo_init, |
| 508 | .timer = &omap_timer, | 506 | .timer = &omap_timer, |
| 509 | MACHINE_END | 507 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c index 39a71bb8a308..2af8b05e786d 100644 --- a/arch/arm/mach-omap2/board-rm680.c +++ b/arch/arm/mach-omap2/board-rm680.c | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | #include "sdram-nokia.h" | 33 | #include "sdram-nokia.h" |
| 34 | 34 | ||
| 35 | static struct regulator_consumer_supply rm680_vemmc_consumers[] = { | 35 | static struct regulator_consumer_supply rm680_vemmc_consumers[] = { |
| 36 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"), | 36 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | /* Fixed regulator for internal eMMC */ | 39 | /* Fixed regulator for internal eMMC */ |
| @@ -138,14 +138,13 @@ static void __init rm680_peripherals_init(void) | |||
| 138 | omap2_hsmmc_init(mmc); | 138 | omap2_hsmmc_init(mmc); |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | static void __init rm680_init_irq(void) | 141 | static void __init rm680_init_early(void) |
| 142 | { | 142 | { |
| 143 | struct omap_sdrc_params *sdrc_params; | 143 | struct omap_sdrc_params *sdrc_params; |
| 144 | 144 | ||
| 145 | omap2_init_common_infrastructure(); | 145 | omap2_init_common_infrastructure(); |
| 146 | sdrc_params = nokia_get_sdram_timings(); | 146 | sdrc_params = nokia_get_sdram_timings(); |
| 147 | omap2_init_common_devices(sdrc_params, sdrc_params); | 147 | omap2_init_common_devices(sdrc_params, sdrc_params); |
| 148 | omap_init_irq(); | ||
| 149 | } | 148 | } |
| 150 | 149 | ||
| 151 | #ifdef CONFIG_OMAP_MUX | 150 | #ifdef CONFIG_OMAP_MUX |
| @@ -176,9 +175,10 @@ static void __init rm680_map_io(void) | |||
| 176 | 175 | ||
| 177 | MACHINE_START(NOKIA_RM680, "Nokia RM-680 board") | 176 | MACHINE_START(NOKIA_RM680, "Nokia RM-680 board") |
| 178 | .boot_params = 0x80000100, | 177 | .boot_params = 0x80000100, |
| 179 | .map_io = rm680_map_io, | ||
| 180 | .reserve = omap_reserve, | 178 | .reserve = omap_reserve, |
| 181 | .init_irq = rm680_init_irq, | 179 | .map_io = rm680_map_io, |
| 180 | .init_early = rm680_init_early, | ||
| 181 | .init_irq = omap_init_irq, | ||
| 182 | .init_machine = rm680_init, | 182 | .init_machine = rm680_init, |
| 183 | .timer = &omap_timer, | 183 | .timer = &omap_timer, |
| 184 | MACHINE_END | 184 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index e75e240cad67..5f1900c532ec 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
| @@ -36,6 +36,8 @@ | |||
| 36 | 36 | ||
| 37 | #include <sound/tlv320aic3x.h> | 37 | #include <sound/tlv320aic3x.h> |
| 38 | #include <sound/tpa6130a2-plat.h> | 38 | #include <sound/tpa6130a2-plat.h> |
| 39 | #include <media/radio-si4713.h> | ||
| 40 | #include <media/si4713.h> | ||
| 39 | 41 | ||
| 40 | #include <../drivers/staging/iio/light/tsl2563.h> | 42 | #include <../drivers/staging/iio/light/tsl2563.h> |
| 41 | 43 | ||
| @@ -47,6 +49,8 @@ | |||
| 47 | 49 | ||
| 48 | #define RX51_WL1251_POWER_GPIO 87 | 50 | #define RX51_WL1251_POWER_GPIO 87 |
| 49 | #define RX51_WL1251_IRQ_GPIO 42 | 51 | #define RX51_WL1251_IRQ_GPIO 42 |
| 52 | #define RX51_FMTX_RESET_GPIO 163 | ||
| 53 | #define RX51_FMTX_IRQ 53 | ||
| 50 | 54 | ||
| 51 | /* list all spi devices here */ | 55 | /* list all spi devices here */ |
| 52 | enum { | 56 | enum { |
| @@ -331,13 +335,13 @@ static struct omap2_hsmmc_info mmc[] __initdata = { | |||
| 331 | }; | 335 | }; |
| 332 | 336 | ||
| 333 | static struct regulator_consumer_supply rx51_vmmc1_supply = | 337 | static struct regulator_consumer_supply rx51_vmmc1_supply = |
| 334 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); | 338 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); |
| 335 | 339 | ||
| 336 | static struct regulator_consumer_supply rx51_vaux3_supply = | 340 | static struct regulator_consumer_supply rx51_vaux3_supply = |
| 337 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); | 341 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); |
| 338 | 342 | ||
| 339 | static struct regulator_consumer_supply rx51_vsim_supply = | 343 | static struct regulator_consumer_supply rx51_vsim_supply = |
| 340 | REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1"); | 344 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"); |
| 341 | 345 | ||
| 342 | static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { | 346 | static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { |
| 343 | /* tlv320aic3x analog supplies */ | 347 | /* tlv320aic3x analog supplies */ |
| @@ -348,7 +352,7 @@ static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { | |||
| 348 | /* tpa6130a2 */ | 352 | /* tpa6130a2 */ |
| 349 | REGULATOR_SUPPLY("Vdd", "2-0060"), | 353 | REGULATOR_SUPPLY("Vdd", "2-0060"), |
| 350 | /* Keep vmmc as last item. It is not iterated for newer boards */ | 354 | /* Keep vmmc as last item. It is not iterated for newer boards */ |
| 351 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"), | 355 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
| 352 | }; | 356 | }; |
| 353 | 357 | ||
| 354 | static struct regulator_consumer_supply rx51_vio_supplies[] = { | 358 | static struct regulator_consumer_supply rx51_vio_supplies[] = { |
| @@ -357,10 +361,14 @@ static struct regulator_consumer_supply rx51_vio_supplies[] = { | |||
| 357 | REGULATOR_SUPPLY("DVDD", "2-0018"), | 361 | REGULATOR_SUPPLY("DVDD", "2-0018"), |
| 358 | REGULATOR_SUPPLY("IOVDD", "2-0019"), | 362 | REGULATOR_SUPPLY("IOVDD", "2-0019"), |
| 359 | REGULATOR_SUPPLY("DVDD", "2-0019"), | 363 | REGULATOR_SUPPLY("DVDD", "2-0019"), |
| 364 | /* Si4713 IO supply */ | ||
| 365 | REGULATOR_SUPPLY("vio", "2-0063"), | ||
| 360 | }; | 366 | }; |
| 361 | 367 | ||
| 362 | static struct regulator_consumer_supply rx51_vaux1_consumers[] = { | 368 | static struct regulator_consumer_supply rx51_vaux1_consumers[] = { |
| 363 | REGULATOR_SUPPLY("vdds_sdi", "omapdss"), | 369 | REGULATOR_SUPPLY("vdds_sdi", "omapdss"), |
| 370 | /* Si4713 supply */ | ||
| 371 | REGULATOR_SUPPLY("vdd", "2-0063"), | ||
| 364 | }; | 372 | }; |
| 365 | 373 | ||
| 366 | static struct regulator_consumer_supply rx51_vdac_supply[] = { | 374 | static struct regulator_consumer_supply rx51_vdac_supply[] = { |
| @@ -511,6 +519,41 @@ static struct regulator_init_data rx51_vio = { | |||
| 511 | .consumer_supplies = rx51_vio_supplies, | 519 | .consumer_supplies = rx51_vio_supplies, |
| 512 | }; | 520 | }; |
| 513 | 521 | ||
| 522 | static struct si4713_platform_data rx51_si4713_i2c_data __initdata_or_module = { | ||
| 523 | .gpio_reset = RX51_FMTX_RESET_GPIO, | ||
| 524 | }; | ||
| 525 | |||
| 526 | static struct i2c_board_info rx51_si4713_board_info __initdata_or_module = { | ||
| 527 | I2C_BOARD_INFO("si4713", SI4713_I2C_ADDR_BUSEN_HIGH), | ||
| 528 | .platform_data = &rx51_si4713_i2c_data, | ||
| 529 | }; | ||
| 530 | |||
| 531 | static struct radio_si4713_platform_data rx51_si4713_data __initdata_or_module = { | ||
| 532 | .i2c_bus = 2, | ||
| 533 | .subdev_board_info = &rx51_si4713_board_info, | ||
| 534 | }; | ||
| 535 | |||
| 536 | static struct platform_device rx51_si4713_dev __initdata_or_module = { | ||
| 537 | .name = "radio-si4713", | ||
| 538 | .id = -1, | ||
| 539 | .dev = { | ||
| 540 | .platform_data = &rx51_si4713_data, | ||
| 541 | }, | ||
| 542 | }; | ||
| 543 | |||
| 544 | static __init void rx51_init_si4713(void) | ||
| 545 | { | ||
| 546 | int err; | ||
| 547 | |||
| 548 | err = gpio_request_one(RX51_FMTX_IRQ, GPIOF_DIR_IN, "si4713 irq"); | ||
| 549 | if (err) { | ||
| 550 | printk(KERN_ERR "Cannot request si4713 irq gpio. %d\n", err); | ||
| 551 | return; | ||
| 552 | } | ||
| 553 | rx51_si4713_board_info.irq = gpio_to_irq(RX51_FMTX_IRQ); | ||
| 554 | platform_device_register(&rx51_si4713_dev); | ||
| 555 | } | ||
| 556 | |||
| 514 | static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) | 557 | static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) |
| 515 | { | 558 | { |
| 516 | /* FIXME this gpio setup is just a placeholder for now */ | 559 | /* FIXME this gpio setup is just a placeholder for now */ |
| @@ -699,6 +742,14 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = { | |||
| 699 | .resource_config = twl4030_rconfig, | 742 | .resource_config = twl4030_rconfig, |
| 700 | }; | 743 | }; |
| 701 | 744 | ||
| 745 | struct twl4030_codec_vibra_data rx51_vibra_data __initdata = { | ||
| 746 | .coexist = 0, | ||
| 747 | }; | ||
| 748 | |||
| 749 | struct twl4030_codec_data rx51_codec_data __initdata = { | ||
| 750 | .audio_mclk = 26000000, | ||
| 751 | .vibra = &rx51_vibra_data, | ||
| 752 | }; | ||
| 702 | 753 | ||
| 703 | static struct twl4030_platform_data rx51_twldata __initdata = { | 754 | static struct twl4030_platform_data rx51_twldata __initdata = { |
| 704 | .irq_base = TWL4030_IRQ_BASE, | 755 | .irq_base = TWL4030_IRQ_BASE, |
| @@ -710,6 +761,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = { | |||
| 710 | .madc = &rx51_madc_data, | 761 | .madc = &rx51_madc_data, |
| 711 | .usb = &rx51_usb_data, | 762 | .usb = &rx51_usb_data, |
| 712 | .power = &rx51_t2scripts_data, | 763 | .power = &rx51_t2scripts_data, |
| 764 | .codec = &rx51_codec_data, | ||
| 713 | 765 | ||
| 714 | .vaux1 = &rx51_vaux1, | 766 | .vaux1 = &rx51_vaux1, |
| 715 | .vaux2 = &rx51_vaux2, | 767 | .vaux2 = &rx51_vaux2, |
| @@ -921,6 +973,7 @@ void __init rx51_peripherals_init(void) | |||
| 921 | board_smc91x_init(); | 973 | board_smc91x_init(); |
| 922 | rx51_add_gpio_keys(); | 974 | rx51_add_gpio_keys(); |
| 923 | rx51_init_wl1251(); | 975 | rx51_init_wl1251(); |
| 976 | rx51_init_si4713(); | ||
| 924 | spi_register_board_info(rx51_peripherals_spi_board_info, | 977 | spi_register_board_info(rx51_peripherals_spi_board_info, |
| 925 | ARRAY_SIZE(rx51_peripherals_spi_board_info)); | 978 | ARRAY_SIZE(rx51_peripherals_spi_board_info)); |
| 926 | 979 | ||
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c index acd670054d9a..89a66db8b77d 100644 --- a/arch/arm/mach-omap2/board-rx51-video.c +++ b/arch/arm/mach-omap2/board-rx51-video.c | |||
| @@ -66,18 +66,6 @@ static struct omap_dss_board_info rx51_dss_board_info = { | |||
| 66 | .default_device = &rx51_lcd_device, | 66 | .default_device = &rx51_lcd_device, |
| 67 | }; | 67 | }; |
| 68 | 68 | ||
| 69 | struct platform_device rx51_display_device = { | ||
| 70 | .name = "omapdss", | ||
| 71 | .id = -1, | ||
| 72 | .dev = { | ||
| 73 | .platform_data = &rx51_dss_board_info, | ||
| 74 | }, | ||
| 75 | }; | ||
| 76 | |||
| 77 | static struct platform_device *rx51_video_devices[] __initdata = { | ||
| 78 | &rx51_display_device, | ||
| 79 | }; | ||
| 80 | |||
| 81 | static int __init rx51_video_init(void) | 69 | static int __init rx51_video_init(void) |
| 82 | { | 70 | { |
| 83 | if (!machine_is_nokia_rx51()) | 71 | if (!machine_is_nokia_rx51()) |
| @@ -95,8 +83,7 @@ static int __init rx51_video_init(void) | |||
| 95 | 83 | ||
| 96 | gpio_direction_output(RX51_LCD_RESET_GPIO, 1); | 84 | gpio_direction_output(RX51_LCD_RESET_GPIO, 1); |
| 97 | 85 | ||
| 98 | platform_add_devices(rx51_video_devices, | 86 | omap_display_init(&rx51_dss_board_info); |
| 99 | ARRAY_SIZE(rx51_video_devices)); | ||
| 100 | return 0; | 87 | return 0; |
| 101 | } | 88 | } |
| 102 | 89 | ||
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index f53fc551c58f..e964895b80e8 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
| @@ -98,17 +98,13 @@ static struct omap_board_config_kernel rx51_config[] = { | |||
| 98 | { OMAP_TAG_LCD, &rx51_lcd_config }, | 98 | { OMAP_TAG_LCD, &rx51_lcd_config }, |
| 99 | }; | 99 | }; |
| 100 | 100 | ||
| 101 | static void __init rx51_init_irq(void) | 101 | static void __init rx51_init_early(void) |
| 102 | { | 102 | { |
| 103 | struct omap_sdrc_params *sdrc_params; | 103 | struct omap_sdrc_params *sdrc_params; |
| 104 | 104 | ||
| 105 | omap_board_config = rx51_config; | ||
| 106 | omap_board_config_size = ARRAY_SIZE(rx51_config); | ||
| 107 | omap3_pm_init_cpuidle(rx51_cpuidle_params); | ||
| 108 | omap2_init_common_infrastructure(); | 105 | omap2_init_common_infrastructure(); |
| 109 | sdrc_params = nokia_get_sdram_timings(); | 106 | sdrc_params = nokia_get_sdram_timings(); |
| 110 | omap2_init_common_devices(sdrc_params, sdrc_params); | 107 | omap2_init_common_devices(sdrc_params, sdrc_params); |
| 111 | omap_init_irq(); | ||
| 112 | } | 108 | } |
| 113 | 109 | ||
| 114 | extern void __init rx51_peripherals_init(void); | 110 | extern void __init rx51_peripherals_init(void); |
| @@ -128,6 +124,9 @@ static struct omap_musb_board_data musb_board_data = { | |||
| 128 | static void __init rx51_init(void) | 124 | static void __init rx51_init(void) |
| 129 | { | 125 | { |
| 130 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 126 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
| 127 | omap_board_config = rx51_config; | ||
| 128 | omap_board_config_size = ARRAY_SIZE(rx51_config); | ||
| 129 | omap3_pm_init_cpuidle(rx51_cpuidle_params); | ||
| 131 | omap_serial_init(); | 130 | omap_serial_init(); |
| 132 | usb_musb_init(&musb_board_data); | 131 | usb_musb_init(&musb_board_data); |
| 133 | rx51_peripherals_init(); | 132 | rx51_peripherals_init(); |
| @@ -149,9 +148,10 @@ static void __init rx51_map_io(void) | |||
| 149 | MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") | 148 | MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") |
| 150 | /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */ | 149 | /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */ |
| 151 | .boot_params = 0x80000100, | 150 | .boot_params = 0x80000100, |
| 152 | .map_io = rx51_map_io, | ||
| 153 | .reserve = omap_reserve, | 151 | .reserve = omap_reserve, |
| 154 | .init_irq = rx51_init_irq, | 152 | .map_io = rx51_map_io, |
| 153 | .init_early = rx51_init_early, | ||
| 154 | .init_irq = omap_init_irq, | ||
| 155 | .init_machine = rx51_init, | 155 | .init_machine = rx51_init, |
| 156 | .timer = &omap_timer, | 156 | .timer = &omap_timer, |
| 157 | MACHINE_END | 157 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c new file mode 100644 index 000000000000..09fa7bfff8d6 --- /dev/null +++ b/arch/arm/mach-omap2/board-ti8168evm.c | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | /* | ||
| 2 | * Code for TI8168 EVM. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/ | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public License as | ||
| 8 | * published by the Free Software Foundation version 2. | ||
| 9 | * | ||
| 10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
| 11 | * kind, whether express or implied; without even the implied warranty | ||
| 12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | */ | ||
| 15 | #include <linux/kernel.h> | ||
| 16 | #include <linux/init.h> | ||
| 17 | |||
| 18 | #include <mach/hardware.h> | ||
| 19 | #include <asm/mach-types.h> | ||
| 20 | #include <asm/mach/arch.h> | ||
| 21 | #include <asm/mach/map.h> | ||
| 22 | |||
| 23 | #include <plat/irqs.h> | ||
| 24 | #include <plat/board.h> | ||
| 25 | #include <plat/common.h> | ||
| 26 | |||
| 27 | static struct omap_board_config_kernel ti8168_evm_config[] __initdata = { | ||
| 28 | }; | ||
| 29 | |||
| 30 | static void __init ti8168_init_early(void) | ||
| 31 | { | ||
| 32 | omap2_init_common_infrastructure(); | ||
| 33 | omap2_init_common_devices(NULL, NULL); | ||
| 34 | } | ||
| 35 | |||
| 36 | static void __init ti8168_evm_init_irq(void) | ||
| 37 | { | ||
| 38 | omap_init_irq(); | ||
| 39 | } | ||
| 40 | |||
| 41 | static void __init ti8168_evm_init(void) | ||
| 42 | { | ||
| 43 | omap_serial_init(); | ||
| 44 | omap_board_config = ti8168_evm_config; | ||
| 45 | omap_board_config_size = ARRAY_SIZE(ti8168_evm_config); | ||
| 46 | } | ||
| 47 | |||
| 48 | static void __init ti8168_evm_map_io(void) | ||
| 49 | { | ||
| 50 | omap2_set_globals_ti816x(); | ||
| 51 | omapti816x_map_common_io(); | ||
| 52 | } | ||
| 53 | |||
| 54 | MACHINE_START(TI8168EVM, "ti8168evm") | ||
| 55 | /* Maintainer: Texas Instruments */ | ||
| 56 | .boot_params = 0x80000100, | ||
| 57 | .map_io = ti8168_evm_map_io, | ||
| 58 | .init_early = ti8168_init_early, | ||
| 59 | .init_irq = ti8168_evm_init_irq, | ||
| 60 | .timer = &omap_timer, | ||
| 61 | .init_machine = ti8168_evm_init, | ||
| 62 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c index 6bcd43657aed..37b84c2b850f 100644 --- a/arch/arm/mach-omap2/board-zoom-display.c +++ b/arch/arm/mach-omap2/board-zoom-display.c | |||
| @@ -130,14 +130,6 @@ static struct omap_dss_board_info zoom_dss_data = { | |||
| 130 | .default_device = &zoom_lcd_device, | 130 | .default_device = &zoom_lcd_device, |
| 131 | }; | 131 | }; |
| 132 | 132 | ||
| 133 | static struct platform_device zoom_dss_device = { | ||
| 134 | .name = "omapdss", | ||
| 135 | .id = -1, | ||
| 136 | .dev = { | ||
| 137 | .platform_data = &zoom_dss_data, | ||
| 138 | }, | ||
| 139 | }; | ||
| 140 | |||
| 141 | static struct omap2_mcspi_device_config dss_lcd_mcspi_config = { | 133 | static struct omap2_mcspi_device_config dss_lcd_mcspi_config = { |
| 142 | .turbo_mode = 1, | 134 | .turbo_mode = 1, |
| 143 | .single_channel = 1, /* 0: slave, 1: master */ | 135 | .single_channel = 1, /* 0: slave, 1: master */ |
| @@ -153,14 +145,9 @@ static struct spi_board_info nec_8048_spi_board_info[] __initdata = { | |||
| 153 | }, | 145 | }, |
| 154 | }; | 146 | }; |
| 155 | 147 | ||
| 156 | static struct platform_device *zoom_display_devices[] __initdata = { | ||
| 157 | &zoom_dss_device, | ||
| 158 | }; | ||
| 159 | |||
| 160 | void __init zoom_display_init(void) | 148 | void __init zoom_display_init(void) |
| 161 | { | 149 | { |
| 162 | platform_add_devices(zoom_display_devices, | 150 | omap_display_init(&zoom_dss_data); |
| 163 | ARRAY_SIZE(zoom_display_devices)); | ||
| 164 | spi_register_board_info(nec_8048_spi_board_info, | 151 | spi_register_board_info(nec_8048_spi_board_info, |
| 165 | ARRAY_SIZE(nec_8048_spi_board_info)); | 152 | ARRAY_SIZE(nec_8048_spi_board_info)); |
| 166 | zoom_lcd_panel_init(); | 153 | zoom_lcd_panel_init(); |
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index e0e040f34c68..448ab60195d5 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c | |||
| @@ -118,7 +118,7 @@ static struct regulator_consumer_supply zoom_vmmc2_supply = { | |||
| 118 | 118 | ||
| 119 | static struct regulator_consumer_supply zoom_vmmc3_supply = { | 119 | static struct regulator_consumer_supply zoom_vmmc3_supply = { |
| 120 | .supply = "vmmc", | 120 | .supply = "vmmc", |
| 121 | .dev_name = "mmci-omap-hs.2", | 121 | .dev_name = "omap_hsmmc.2", |
| 122 | }; | 122 | }; |
| 123 | 123 | ||
| 124 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | 124 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ |
| @@ -322,9 +322,7 @@ static struct twl4030_madc_platform_data zoom_madc_data = { | |||
| 322 | .irq_line = 1, | 322 | .irq_line = 1, |
| 323 | }; | 323 | }; |
| 324 | 324 | ||
| 325 | static struct twl4030_codec_audio_data zoom_audio_data = { | 325 | static struct twl4030_codec_audio_data zoom_audio_data; |
| 326 | .audio_mclk = 26000000, | ||
| 327 | }; | ||
| 328 | 326 | ||
| 329 | static struct twl4030_codec_data zoom_codec_data = { | 327 | static struct twl4030_codec_data zoom_codec_data = { |
| 330 | .audio_mclk = 26000000, | 328 | .audio_mclk = 26000000, |
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c index e26754c24ee8..7e3f1595d77b 100644 --- a/arch/arm/mach-omap2/board-zoom.c +++ b/arch/arm/mach-omap2/board-zoom.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/input.h> | 16 | #include <linux/input.h> |
| 17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
| 18 | #include <linux/i2c/twl.h> | 18 | #include <linux/i2c/twl.h> |
| 19 | #include <linux/mtd/nand.h> | ||
| 19 | 20 | ||
| 20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
| 21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
| @@ -33,7 +34,7 @@ | |||
| 33 | 34 | ||
| 34 | #define ZOOM3_EHCI_RESET_GPIO 64 | 35 | #define ZOOM3_EHCI_RESET_GPIO 64 |
| 35 | 36 | ||
| 36 | static void __init omap_zoom_init_irq(void) | 37 | static void __init omap_zoom_init_early(void) |
| 37 | { | 38 | { |
| 38 | omap2_init_common_infrastructure(); | 39 | omap2_init_common_infrastructure(); |
| 39 | if (machine_is_omap_zoom2()) | 40 | if (machine_is_omap_zoom2()) |
| @@ -42,8 +43,6 @@ static void __init omap_zoom_init_irq(void) | |||
| 42 | else if (machine_is_omap_zoom3()) | 43 | else if (machine_is_omap_zoom3()) |
| 43 | omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params, | 44 | omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params, |
| 44 | h8mbx00u0mer0em_sdrc_params); | 45 | h8mbx00u0mer0em_sdrc_params); |
| 45 | |||
| 46 | omap_init_irq(); | ||
| 47 | } | 46 | } |
| 48 | 47 | ||
| 49 | #ifdef CONFIG_OMAP_MUX | 48 | #ifdef CONFIG_OMAP_MUX |
| @@ -126,8 +125,8 @@ static void __init omap_zoom_init(void) | |||
| 126 | usb_ehci_init(&ehci_pdata); | 125 | usb_ehci_init(&ehci_pdata); |
| 127 | } | 126 | } |
| 128 | 127 | ||
| 129 | board_nand_init(zoom_nand_partitions, | 128 | board_nand_init(zoom_nand_partitions, ARRAY_SIZE(zoom_nand_partitions), |
| 130 | ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS); | 129 | ZOOM_NAND_CS, NAND_BUSWIDTH_16); |
| 131 | zoom_debugboard_init(); | 130 | zoom_debugboard_init(); |
| 132 | zoom_peripherals_init(); | 131 | zoom_peripherals_init(); |
| 133 | zoom_display_init(); | 132 | zoom_display_init(); |
| @@ -135,18 +134,20 @@ static void __init omap_zoom_init(void) | |||
| 135 | 134 | ||
| 136 | MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") | 135 | MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") |
| 137 | .boot_params = 0x80000100, | 136 | .boot_params = 0x80000100, |
| 138 | .map_io = omap3_map_io, | ||
| 139 | .reserve = omap_reserve, | 137 | .reserve = omap_reserve, |
| 140 | .init_irq = omap_zoom_init_irq, | 138 | .map_io = omap3_map_io, |
| 139 | .init_early = omap_zoom_init_early, | ||
| 140 | .init_irq = omap_init_irq, | ||
| 141 | .init_machine = omap_zoom_init, | 141 | .init_machine = omap_zoom_init, |
| 142 | .timer = &omap_timer, | 142 | .timer = &omap_timer, |
| 143 | MACHINE_END | 143 | MACHINE_END |
| 144 | 144 | ||
| 145 | MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") | 145 | MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") |
| 146 | .boot_params = 0x80000100, | 146 | .boot_params = 0x80000100, |
| 147 | .map_io = omap3_map_io, | ||
| 148 | .reserve = omap_reserve, | 147 | .reserve = omap_reserve, |
| 149 | .init_irq = omap_zoom_init_irq, | 148 | .map_io = omap3_map_io, |
| 149 | .init_early = omap_zoom_init_early, | ||
| 150 | .init_irq = omap_init_irq, | ||
| 150 | .init_machine = omap_zoom_init, | 151 | .init_machine = omap_zoom_init, |
| 151 | .timer = &omap_timer, | 152 | .timer = &omap_timer, |
| 152 | MACHINE_END | 153 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/clkt2xxx_apll.c b/arch/arm/mach-omap2/clkt2xxx_apll.c index f51cffd1fc53..b19a1f7234ae 100644 --- a/arch/arm/mach-omap2/clkt2xxx_apll.c +++ b/arch/arm/mach-omap2/clkt2xxx_apll.c | |||
| @@ -78,6 +78,26 @@ static int omap2_clk_apll54_enable(struct clk *clk) | |||
| 78 | return omap2_clk_apll_enable(clk, OMAP24XX_ST_54M_APLL_MASK); | 78 | return omap2_clk_apll_enable(clk, OMAP24XX_ST_54M_APLL_MASK); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | static void _apll96_allow_idle(struct clk *clk) | ||
| 82 | { | ||
| 83 | omap2xxx_cm_set_apll96_auto_low_power_stop(); | ||
| 84 | } | ||
| 85 | |||
| 86 | static void _apll96_deny_idle(struct clk *clk) | ||
| 87 | { | ||
| 88 | omap2xxx_cm_set_apll96_disable_autoidle(); | ||
| 89 | } | ||
| 90 | |||
| 91 | static void _apll54_allow_idle(struct clk *clk) | ||
| 92 | { | ||
| 93 | omap2xxx_cm_set_apll54_auto_low_power_stop(); | ||
| 94 | } | ||
| 95 | |||
| 96 | static void _apll54_deny_idle(struct clk *clk) | ||
| 97 | { | ||
| 98 | omap2xxx_cm_set_apll54_disable_autoidle(); | ||
| 99 | } | ||
| 100 | |||
| 81 | /* Stop APLL */ | 101 | /* Stop APLL */ |
| 82 | static void omap2_clk_apll_disable(struct clk *clk) | 102 | static void omap2_clk_apll_disable(struct clk *clk) |
| 83 | { | 103 | { |
| @@ -93,11 +113,15 @@ static void omap2_clk_apll_disable(struct clk *clk) | |||
| 93 | const struct clkops clkops_apll96 = { | 113 | const struct clkops clkops_apll96 = { |
| 94 | .enable = omap2_clk_apll96_enable, | 114 | .enable = omap2_clk_apll96_enable, |
| 95 | .disable = omap2_clk_apll_disable, | 115 | .disable = omap2_clk_apll_disable, |
| 116 | .allow_idle = _apll96_allow_idle, | ||
| 117 | .deny_idle = _apll96_deny_idle, | ||
| 96 | }; | 118 | }; |
| 97 | 119 | ||
| 98 | const struct clkops clkops_apll54 = { | 120 | const struct clkops clkops_apll54 = { |
| 99 | .enable = omap2_clk_apll54_enable, | 121 | .enable = omap2_clk_apll54_enable, |
| 100 | .disable = omap2_clk_apll_disable, | 122 | .disable = omap2_clk_apll_disable, |
| 123 | .allow_idle = _apll54_allow_idle, | ||
| 124 | .deny_idle = _apll54_deny_idle, | ||
| 101 | }; | 125 | }; |
| 102 | 126 | ||
| 103 | /* Public functions */ | 127 | /* Public functions */ |
diff --git a/arch/arm/mach-omap2/clkt2xxx_dpll.c b/arch/arm/mach-omap2/clkt2xxx_dpll.c new file mode 100644 index 000000000000..1502a7bc20bb --- /dev/null +++ b/arch/arm/mach-omap2/clkt2xxx_dpll.c | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* | ||
| 2 | * OMAP2-specific DPLL control functions | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Nokia Corporation | ||
| 5 | * Paul Walmsley | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/kernel.h> | ||
| 13 | #include <linux/errno.h> | ||
| 14 | #include <linux/clk.h> | ||
| 15 | #include <linux/io.h> | ||
| 16 | |||
| 17 | #include <plat/clock.h> | ||
| 18 | |||
| 19 | #include "clock.h" | ||
| 20 | #include "cm2xxx_3xxx.h" | ||
| 21 | #include "cm-regbits-24xx.h" | ||
| 22 | |||
| 23 | /* Private functions */ | ||
| 24 | |||
| 25 | /** | ||
| 26 | * _allow_idle - enable DPLL autoidle bits | ||
| 27 | * @clk: struct clk * of the DPLL to operate on | ||
| 28 | * | ||
| 29 | * Enable DPLL automatic idle control. The DPLL will enter low-power | ||
| 30 | * stop when its downstream clocks are gated. No return value. | ||
| 31 | * REVISIT: DPLL can optionally enter low-power bypass by writing 0x1 | ||
| 32 | * instead. Add some mechanism to optionally enter this mode. | ||
| 33 | */ | ||
| 34 | static void _allow_idle(struct clk *clk) | ||
| 35 | { | ||
| 36 | if (!clk || !clk->dpll_data) | ||
| 37 | return; | ||
| 38 | |||
| 39 | omap2xxx_cm_set_dpll_auto_low_power_stop(); | ||
| 40 | } | ||
| 41 | |||
| 42 | /** | ||
| 43 | * _deny_idle - prevent DPLL from automatically idling | ||
| 44 | * @clk: struct clk * of the DPLL to operate on | ||
| 45 | * | ||
| 46 | * Disable DPLL automatic idle control. No return value. | ||
| 47 | */ | ||
| 48 | static void _deny_idle(struct clk *clk) | ||
| 49 | { | ||
| 50 | if (!clk || !clk->dpll_data) | ||
| 51 | return; | ||
| 52 | |||
| 53 | omap2xxx_cm_set_dpll_disable_autoidle(); | ||
| 54 | } | ||
| 55 | |||
| 56 | |||
| 57 | /* Public data */ | ||
| 58 | |||
| 59 | const struct clkops clkops_omap2xxx_dpll_ops = { | ||
| 60 | .allow_idle = _allow_idle, | ||
| 61 | .deny_idle = _deny_idle, | ||
| 62 | }; | ||
| 63 | |||
diff --git a/arch/arm/mach-omap2/clkt2xxx_osc.c b/arch/arm/mach-omap2/clkt2xxx_osc.c index df7b80506483..c3460928b5e0 100644 --- a/arch/arm/mach-omap2/clkt2xxx_osc.c +++ b/arch/arm/mach-omap2/clkt2xxx_osc.c | |||
| @@ -30,6 +30,13 @@ | |||
| 30 | #include "prm2xxx_3xxx.h" | 30 | #include "prm2xxx_3xxx.h" |
| 31 | #include "prm-regbits-24xx.h" | 31 | #include "prm-regbits-24xx.h" |
| 32 | 32 | ||
| 33 | /* | ||
| 34 | * XXX This does not actually enable the osc_ck, since the osc_ck must | ||
| 35 | * be running for this function to be called. Instead, this function | ||
| 36 | * is used to disable an autoidle mode on the osc_ck. The existing | ||
| 37 | * clk_enable/clk_disable()-based usecounting for osc_ck should be | ||
| 38 | * replaced with autoidle-based usecounting. | ||
| 39 | */ | ||
| 33 | static int omap2_enable_osc_ck(struct clk *clk) | 40 | static int omap2_enable_osc_ck(struct clk *clk) |
| 34 | { | 41 | { |
| 35 | u32 pcc; | 42 | u32 pcc; |
| @@ -41,6 +48,13 @@ static int omap2_enable_osc_ck(struct clk *clk) | |||
| 41 | return 0; | 48 | return 0; |
| 42 | } | 49 | } |
| 43 | 50 | ||
| 51 | /* | ||
| 52 | * XXX This does not actually disable the osc_ck, since doing so would | ||
| 53 | * immediately halt the system. Instead, this function is used to | ||
| 54 | * enable an autoidle mode on the osc_ck. The existing | ||
| 55 | * clk_enable/clk_disable()-based usecounting for osc_ck should be | ||
| 56 | * replaced with autoidle-based usecounting. | ||
| 57 | */ | ||
| 44 | static void omap2_disable_osc_ck(struct clk *clk) | 58 | static void omap2_disable_osc_ck(struct clk *clk) |
| 45 | { | 59 | { |
| 46 | u32 pcc; | 60 | u32 pcc; |
diff --git a/arch/arm/mach-omap2/clkt_clksel.c b/arch/arm/mach-omap2/clkt_clksel.c index a781cd6795a4..e25364de028a 100644 --- a/arch/arm/mach-omap2/clkt_clksel.c +++ b/arch/arm/mach-omap2/clkt_clksel.c | |||
| @@ -97,7 +97,7 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk, | |||
| 97 | u32 *field_val) | 97 | u32 *field_val) |
| 98 | { | 98 | { |
| 99 | const struct clksel *clks; | 99 | const struct clksel *clks; |
| 100 | const struct clksel_rate *clkr, *max_clkr; | 100 | const struct clksel_rate *clkr, *max_clkr = NULL; |
| 101 | u8 max_div = 0; | 101 | u8 max_div = 0; |
| 102 | 102 | ||
| 103 | clks = _get_clksel_by_parent(clk, src_clk); | 103 | clks = _get_clksel_by_parent(clk, src_clk); |
diff --git a/arch/arm/mach-omap2/clkt_dpll.c b/arch/arm/mach-omap2/clkt_dpll.c index acb7ae5b0a25..bcffee001bfa 100644 --- a/arch/arm/mach-omap2/clkt_dpll.c +++ b/arch/arm/mach-omap2/clkt_dpll.c | |||
| @@ -178,12 +178,11 @@ void omap2_init_dpll_parent(struct clk *clk) | |||
| 178 | if (!dd) | 178 | if (!dd) |
| 179 | return; | 179 | return; |
| 180 | 180 | ||
| 181 | /* Return bypass rate if DPLL is bypassed */ | ||
| 182 | v = __raw_readl(dd->control_reg); | 181 | v = __raw_readl(dd->control_reg); |
| 183 | v &= dd->enable_mask; | 182 | v &= dd->enable_mask; |
| 184 | v >>= __ffs(dd->enable_mask); | 183 | v >>= __ffs(dd->enable_mask); |
| 185 | 184 | ||
| 186 | /* Reparent in case the dpll is in bypass */ | 185 | /* Reparent the struct clk in case the dpll is in bypass */ |
| 187 | if (cpu_is_omap24xx()) { | 186 | if (cpu_is_omap24xx()) { |
| 188 | if (v == OMAP2XXX_EN_DPLL_LPBYPASS || | 187 | if (v == OMAP2XXX_EN_DPLL_LPBYPASS || |
| 189 | v == OMAP2XXX_EN_DPLL_FRBYPASS) | 188 | v == OMAP2XXX_EN_DPLL_FRBYPASS) |
| @@ -260,50 +259,22 @@ u32 omap2_get_dpll_rate(struct clk *clk) | |||
| 260 | /* DPLL rate rounding code */ | 259 | /* DPLL rate rounding code */ |
| 261 | 260 | ||
| 262 | /** | 261 | /** |
| 263 | * omap2_dpll_set_rate_tolerance: set the error tolerance during rate rounding | ||
| 264 | * @clk: struct clk * of the DPLL | ||
| 265 | * @tolerance: maximum rate error tolerance | ||
| 266 | * | ||
| 267 | * Set the maximum DPLL rate error tolerance for the rate rounding | ||
| 268 | * algorithm. The rate tolerance is an attempt to balance DPLL power | ||
| 269 | * saving (the least divider value "n") vs. rate fidelity (the least | ||
| 270 | * difference between the desired DPLL target rate and the rounded | ||
| 271 | * rate out of the algorithm). So, increasing the tolerance is likely | ||
| 272 | * to decrease DPLL power consumption and increase DPLL rate error. | ||
| 273 | * Returns -EINVAL if provided a null clock ptr or a clk that is not a | ||
| 274 | * DPLL; or 0 upon success. | ||
| 275 | */ | ||
| 276 | int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance) | ||
| 277 | { | ||
| 278 | if (!clk || !clk->dpll_data) | ||
| 279 | return -EINVAL; | ||
| 280 | |||
| 281 | clk->dpll_data->rate_tolerance = tolerance; | ||
| 282 | |||
| 283 | return 0; | ||
| 284 | } | ||
| 285 | |||
| 286 | /** | ||
| 287 | * omap2_dpll_round_rate - round a target rate for an OMAP DPLL | 262 | * omap2_dpll_round_rate - round a target rate for an OMAP DPLL |
| 288 | * @clk: struct clk * for a DPLL | 263 | * @clk: struct clk * for a DPLL |
| 289 | * @target_rate: desired DPLL clock rate | 264 | * @target_rate: desired DPLL clock rate |
| 290 | * | 265 | * |
| 291 | * Given a DPLL, a desired target rate, and a rate tolerance, round | 266 | * Given a DPLL and a desired target rate, round the target rate to a |
| 292 | * the target rate to a possible, programmable rate for this DPLL. | 267 | * possible, programmable rate for this DPLL. Attempts to select the |
| 293 | * Rate tolerance is assumed to be set by the caller before this | 268 | * minimum possible n. Stores the computed (m, n) in the DPLL's |
| 294 | * function is called. Attempts to select the minimum possible n | 269 | * dpll_data structure so set_rate() will not need to call this |
| 295 | * within the tolerance to reduce power consumption. Stores the | 270 | * (expensive) function again. Returns ~0 if the target rate cannot |
| 296 | * computed (m, n) in the DPLL's dpll_data structure so set_rate() | 271 | * be rounded, or the rounded rate upon success. |
| 297 | * will not need to call this (expensive) function again. Returns ~0 | ||
| 298 | * if the target rate cannot be rounded, either because the rate is | ||
| 299 | * too low or because the rate tolerance is set too tightly; or the | ||
| 300 | * rounded rate upon success. | ||
| 301 | */ | 272 | */ |
| 302 | long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate) | 273 | long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate) |
| 303 | { | 274 | { |
| 304 | int m, n, r, e, scaled_max_m; | 275 | int m, n, r, scaled_max_m; |
| 305 | unsigned long scaled_rt_rp, new_rate; | 276 | unsigned long scaled_rt_rp; |
| 306 | int min_e = -1, min_e_m = -1, min_e_n = -1; | 277 | unsigned long new_rate = 0; |
| 307 | struct dpll_data *dd; | 278 | struct dpll_data *dd; |
| 308 | 279 | ||
| 309 | if (!clk || !clk->dpll_data) | 280 | if (!clk || !clk->dpll_data) |
| @@ -311,8 +282,8 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate) | |||
| 311 | 282 | ||
| 312 | dd = clk->dpll_data; | 283 | dd = clk->dpll_data; |
| 313 | 284 | ||
| 314 | pr_debug("clock: starting DPLL round_rate for clock %s, target rate " | 285 | pr_debug("clock: %s: starting DPLL round_rate, target rate %ld\n", |
| 315 | "%ld\n", clk->name, target_rate); | 286 | clk->name, target_rate); |
| 316 | 287 | ||
| 317 | scaled_rt_rp = target_rate / (dd->clk_ref->rate / DPLL_SCALE_FACTOR); | 288 | scaled_rt_rp = target_rate / (dd->clk_ref->rate / DPLL_SCALE_FACTOR); |
| 318 | scaled_max_m = dd->max_multiplier * DPLL_SCALE_FACTOR; | 289 | scaled_max_m = dd->max_multiplier * DPLL_SCALE_FACTOR; |
| @@ -347,39 +318,23 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate) | |||
| 347 | if (r == DPLL_MULT_UNDERFLOW) | 318 | if (r == DPLL_MULT_UNDERFLOW) |
| 348 | continue; | 319 | continue; |
| 349 | 320 | ||
| 350 | e = target_rate - new_rate; | 321 | pr_debug("clock: %s: m = %d: n = %d: new_rate = %ld\n", |
| 351 | pr_debug("clock: n = %d: m = %d: rate error is %d " | 322 | clk->name, m, n, new_rate); |
| 352 | "(new_rate = %ld)\n", n, m, e, new_rate); | ||
| 353 | |||
| 354 | if (min_e == -1 || | ||
| 355 | min_e >= (int)(abs(e) - dd->rate_tolerance)) { | ||
| 356 | min_e = e; | ||
| 357 | min_e_m = m; | ||
| 358 | min_e_n = n; | ||
| 359 | |||
| 360 | pr_debug("clock: found new least error %d\n", min_e); | ||
| 361 | 323 | ||
| 362 | /* We found good settings -- bail out now */ | 324 | if (target_rate == new_rate) { |
| 363 | if (min_e <= dd->rate_tolerance) | 325 | dd->last_rounded_m = m; |
| 364 | break; | 326 | dd->last_rounded_n = n; |
| 327 | dd->last_rounded_rate = target_rate; | ||
| 328 | break; | ||
| 365 | } | 329 | } |
| 366 | } | 330 | } |
| 367 | 331 | ||
| 368 | if (min_e < 0) { | 332 | if (target_rate != new_rate) { |
| 369 | pr_debug("clock: error: target rate or tolerance too low\n"); | 333 | pr_debug("clock: %s: cannot round to rate %ld\n", clk->name, |
| 334 | target_rate); | ||
| 370 | return ~0; | 335 | return ~0; |
| 371 | } | 336 | } |
| 372 | 337 | ||
| 373 | dd->last_rounded_m = min_e_m; | 338 | return target_rate; |
| 374 | dd->last_rounded_n = min_e_n; | ||
| 375 | dd->last_rounded_rate = _dpll_compute_new_rate(dd->clk_ref->rate, | ||
| 376 | min_e_m, min_e_n); | ||
| 377 | |||
| 378 | pr_debug("clock: final least error: e = %d, m = %d, n = %d\n", | ||
| 379 | min_e, min_e_m, min_e_n); | ||
| 380 | pr_debug("clock: final rate: %ld (target rate: %ld)\n", | ||
| 381 | dd->last_rounded_rate, target_rate); | ||
| 382 | |||
| 383 | return dd->last_rounded_rate; | ||
| 384 | } | 339 | } |
| 385 | 340 | ||
diff --git a/arch/arm/mach-omap2/clkt_iclk.c b/arch/arm/mach-omap2/clkt_iclk.c new file mode 100644 index 000000000000..3d43fba2542f --- /dev/null +++ b/arch/arm/mach-omap2/clkt_iclk.c | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | /* | ||
| 2 | * OMAP2/3 interface clock control | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Nokia Corporation | ||
| 5 | * Paul Walmsley | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | #undef DEBUG | ||
| 12 | |||
| 13 | #include <linux/kernel.h> | ||
| 14 | #include <linux/clk.h> | ||
| 15 | #include <linux/io.h> | ||
| 16 | |||
| 17 | #include <plat/clock.h> | ||
| 18 | #include <plat/prcm.h> | ||
| 19 | |||
| 20 | #include "clock.h" | ||
| 21 | #include "clock2xxx.h" | ||
| 22 | #include "cm2xxx_3xxx.h" | ||
| 23 | #include "cm-regbits-24xx.h" | ||
| 24 | |||
| 25 | /* Private functions */ | ||
| 26 | |||
| 27 | /* XXX */ | ||
| 28 | void omap2_clkt_iclk_allow_idle(struct clk *clk) | ||
| 29 | { | ||
| 30 | u32 v, r; | ||
| 31 | |||
| 32 | r = ((__force u32)clk->enable_reg ^ (CM_AUTOIDLE ^ CM_ICLKEN)); | ||
| 33 | |||
| 34 | v = __raw_readl((__force void __iomem *)r); | ||
| 35 | v |= (1 << clk->enable_bit); | ||
| 36 | __raw_writel(v, (__force void __iomem *)r); | ||
| 37 | } | ||
| 38 | |||
| 39 | /* XXX */ | ||
| 40 | void omap2_clkt_iclk_deny_idle(struct clk *clk) | ||
| 41 | { | ||
| 42 | u32 v, r; | ||
| 43 | |||
| 44 | r = ((__force u32)clk->enable_reg ^ (CM_AUTOIDLE ^ CM_ICLKEN)); | ||
| 45 | |||
| 46 | v = __raw_readl((__force void __iomem *)r); | ||
| 47 | v &= ~(1 << clk->enable_bit); | ||
| 48 | __raw_writel(v, (__force void __iomem *)r); | ||
| 49 | } | ||
| 50 | |||
| 51 | /* Public data */ | ||
| 52 | |||
| 53 | const struct clkops clkops_omap2_iclk_dflt_wait = { | ||
| 54 | .enable = omap2_dflt_clk_enable, | ||
| 55 | .disable = omap2_dflt_clk_disable, | ||
| 56 | .find_companion = omap2_clk_dflt_find_companion, | ||
| 57 | .find_idlest = omap2_clk_dflt_find_idlest, | ||
| 58 | .allow_idle = omap2_clkt_iclk_allow_idle, | ||
| 59 | .deny_idle = omap2_clkt_iclk_deny_idle, | ||
| 60 | }; | ||
| 61 | |||
| 62 | const struct clkops clkops_omap2_iclk_dflt = { | ||
| 63 | .enable = omap2_dflt_clk_enable, | ||
| 64 | .disable = omap2_dflt_clk_disable, | ||
| 65 | .allow_idle = omap2_clkt_iclk_allow_idle, | ||
| 66 | .deny_idle = omap2_clkt_iclk_deny_idle, | ||
| 67 | }; | ||
| 68 | |||
| 69 | const struct clkops clkops_omap2_iclk_idle_only = { | ||
| 70 | .allow_idle = omap2_clkt_iclk_allow_idle, | ||
| 71 | .deny_idle = omap2_clkt_iclk_deny_idle, | ||
| 72 | }; | ||
| 73 | |||
| 74 | const struct clkops clkops_omap2_mdmclk_dflt_wait = { | ||
| 75 | .enable = omap2_dflt_clk_enable, | ||
| 76 | .disable = omap2_dflt_clk_disable, | ||
| 77 | .find_companion = omap2_clk_dflt_find_companion, | ||
| 78 | .find_idlest = omap2_clk_dflt_find_idlest, | ||
| 79 | .allow_idle = omap2_clkt_iclk_allow_idle, | ||
| 80 | .deny_idle = omap2_clkt_iclk_deny_idle, | ||
| 81 | }; | ||
| 82 | |||
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 2a2f15213add..46d03ccc2806 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
| @@ -261,10 +261,11 @@ void omap2_clk_disable(struct clk *clk) | |||
| 261 | 261 | ||
| 262 | pr_debug("clock: %s: disabling in hardware\n", clk->name); | 262 | pr_debug("clock: %s: disabling in hardware\n", clk->name); |
| 263 | 263 | ||
| 264 | clk->ops->disable(clk); | 264 | if (clk->ops && clk->ops->disable) |
| 265 | clk->ops->disable(clk); | ||
| 265 | 266 | ||
| 266 | if (clk->clkdm) | 267 | if (clk->clkdm) |
| 267 | omap2_clkdm_clk_disable(clk->clkdm, clk); | 268 | clkdm_clk_disable(clk->clkdm, clk); |
| 268 | 269 | ||
| 269 | if (clk->parent) | 270 | if (clk->parent) |
| 270 | omap2_clk_disable(clk->parent); | 271 | omap2_clk_disable(clk->parent); |
| @@ -304,7 +305,7 @@ int omap2_clk_enable(struct clk *clk) | |||
| 304 | } | 305 | } |
| 305 | 306 | ||
| 306 | if (clk->clkdm) { | 307 | if (clk->clkdm) { |
| 307 | ret = omap2_clkdm_clk_enable(clk->clkdm, clk); | 308 | ret = clkdm_clk_enable(clk->clkdm, clk); |
| 308 | if (ret) { | 309 | if (ret) { |
| 309 | WARN(1, "clock: %s: could not enable clockdomain %s: " | 310 | WARN(1, "clock: %s: could not enable clockdomain %s: " |
| 310 | "%d\n", clk->name, clk->clkdm->name, ret); | 311 | "%d\n", clk->name, clk->clkdm->name, ret); |
| @@ -312,17 +313,20 @@ int omap2_clk_enable(struct clk *clk) | |||
| 312 | } | 313 | } |
| 313 | } | 314 | } |
| 314 | 315 | ||
| 315 | ret = clk->ops->enable(clk); | 316 | if (clk->ops && clk->ops->enable) { |
| 316 | if (ret) { | 317 | ret = clk->ops->enable(clk); |
| 317 | WARN(1, "clock: %s: could not enable: %d\n", clk->name, ret); | 318 | if (ret) { |
| 318 | goto oce_err3; | 319 | WARN(1, "clock: %s: could not enable: %d\n", |
| 320 | clk->name, ret); | ||
| 321 | goto oce_err3; | ||
| 322 | } | ||
| 319 | } | 323 | } |
| 320 | 324 | ||
| 321 | return 0; | 325 | return 0; |
| 322 | 326 | ||
| 323 | oce_err3: | 327 | oce_err3: |
| 324 | if (clk->clkdm) | 328 | if (clk->clkdm) |
| 325 | omap2_clkdm_clk_disable(clk->clkdm, clk); | 329 | clkdm_clk_disable(clk->clkdm, clk); |
| 326 | oce_err2: | 330 | oce_err2: |
| 327 | if (clk->parent) | 331 | if (clk->parent) |
| 328 | omap2_clk_disable(clk->parent); | 332 | omap2_clk_disable(clk->parent); |
| @@ -373,10 +377,16 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) | |||
| 373 | const struct clkops clkops_omap3_noncore_dpll_ops = { | 377 | const struct clkops clkops_omap3_noncore_dpll_ops = { |
| 374 | .enable = omap3_noncore_dpll_enable, | 378 | .enable = omap3_noncore_dpll_enable, |
| 375 | .disable = omap3_noncore_dpll_disable, | 379 | .disable = omap3_noncore_dpll_disable, |
| 380 | .allow_idle = omap3_dpll_allow_idle, | ||
| 381 | .deny_idle = omap3_dpll_deny_idle, | ||
| 376 | }; | 382 | }; |
| 377 | 383 | ||
| 378 | #endif | 384 | const struct clkops clkops_omap3_core_dpll_ops = { |
| 385 | .allow_idle = omap3_dpll_allow_idle, | ||
| 386 | .deny_idle = omap3_dpll_deny_idle, | ||
| 387 | }; | ||
| 379 | 388 | ||
| 389 | #endif | ||
| 380 | 390 | ||
| 381 | /* | 391 | /* |
| 382 | * OMAP2+ clock reset and init functions | 392 | * OMAP2+ clock reset and init functions |
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 896584e3c4ab..e10ff2b54844 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * linux/arch/arm/mach-omap2/clock.h | 2 | * linux/arch/arm/mach-omap2/clock.h |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2005-2009 Texas Instruments, Inc. | 4 | * Copyright (C) 2005-2009 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2004-2009 Nokia Corporation | 5 | * Copyright (C) 2004-2011 Nokia Corporation |
| 6 | * | 6 | * |
| 7 | * Contacts: | 7 | * Contacts: |
| 8 | * Richard Woodruff <r-woodruff2@ti.com> | 8 | * Richard Woodruff <r-woodruff2@ti.com> |
| @@ -18,9 +18,6 @@ | |||
| 18 | 18 | ||
| 19 | #include <plat/clock.h> | 19 | #include <plat/clock.h> |
| 20 | 20 | ||
| 21 | /* The maximum error between a target DPLL rate and the rounded rate in Hz */ | ||
| 22 | #define DEFAULT_DPLL_RATE_TOLERANCE 50000 | ||
| 23 | |||
| 24 | /* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */ | 21 | /* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */ |
| 25 | #define CORE_CLK_SRC_32K 0x0 | 22 | #define CORE_CLK_SRC_32K 0x0 |
| 26 | #define CORE_CLK_SRC_DPLL 0x1 | 23 | #define CORE_CLK_SRC_DPLL 0x1 |
| @@ -55,7 +52,6 @@ void omap2_clk_disable(struct clk *clk); | |||
| 55 | long omap2_clk_round_rate(struct clk *clk, unsigned long rate); | 52 | long omap2_clk_round_rate(struct clk *clk, unsigned long rate); |
| 56 | int omap2_clk_set_rate(struct clk *clk, unsigned long rate); | 53 | int omap2_clk_set_rate(struct clk *clk, unsigned long rate); |
| 57 | int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent); | 54 | int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent); |
| 58 | int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance); | ||
| 59 | long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate); | 55 | long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate); |
| 60 | unsigned long omap3_dpll_recalc(struct clk *clk); | 56 | unsigned long omap3_dpll_recalc(struct clk *clk); |
| 61 | unsigned long omap3_clkoutx2_recalc(struct clk *clk); | 57 | unsigned long omap3_clkoutx2_recalc(struct clk *clk); |
| @@ -65,6 +61,9 @@ u32 omap3_dpll_autoidle_read(struct clk *clk); | |||
| 65 | int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate); | 61 | int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate); |
| 66 | int omap3_noncore_dpll_enable(struct clk *clk); | 62 | int omap3_noncore_dpll_enable(struct clk *clk); |
| 67 | void omap3_noncore_dpll_disable(struct clk *clk); | 63 | void omap3_noncore_dpll_disable(struct clk *clk); |
| 64 | int omap4_dpllmx_gatectrl_read(struct clk *clk); | ||
| 65 | void omap4_dpllmx_allow_gatectrl(struct clk *clk); | ||
| 66 | void omap4_dpllmx_deny_gatectrl(struct clk *clk); | ||
| 68 | 67 | ||
| 69 | #ifdef CONFIG_OMAP_RESET_CLOCKS | 68 | #ifdef CONFIG_OMAP_RESET_CLOCKS |
| 70 | void omap2_clk_disable_unused(struct clk *clk); | 69 | void omap2_clk_disable_unused(struct clk *clk); |
| @@ -83,6 +82,10 @@ long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate); | |||
| 83 | int omap2_clksel_set_rate(struct clk *clk, unsigned long rate); | 82 | int omap2_clksel_set_rate(struct clk *clk, unsigned long rate); |
| 84 | int omap2_clksel_set_parent(struct clk *clk, struct clk *new_parent); | 83 | int omap2_clksel_set_parent(struct clk *clk, struct clk *new_parent); |
| 85 | 84 | ||
| 85 | /* clkt_iclk.c public functions */ | ||
| 86 | extern void omap2_clkt_iclk_allow_idle(struct clk *clk); | ||
| 87 | extern void omap2_clkt_iclk_deny_idle(struct clk *clk); | ||
| 88 | |||
| 86 | u32 omap2_get_dpll_rate(struct clk *clk); | 89 | u32 omap2_get_dpll_rate(struct clk *clk); |
| 87 | void omap2_init_dpll_parent(struct clk *clk); | 90 | void omap2_init_dpll_parent(struct clk *clk); |
| 88 | 91 | ||
| @@ -136,6 +139,7 @@ extern struct clk *vclk, *sclk; | |||
| 136 | extern const struct clksel_rate gpt_32k_rates[]; | 139 | extern const struct clksel_rate gpt_32k_rates[]; |
| 137 | extern const struct clksel_rate gpt_sys_rates[]; | 140 | extern const struct clksel_rate gpt_sys_rates[]; |
| 138 | extern const struct clksel_rate gfx_l3_rates[]; | 141 | extern const struct clksel_rate gfx_l3_rates[]; |
| 142 | extern const struct clksel_rate dsp_ick_rates[]; | ||
| 139 | 143 | ||
| 140 | #if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_CPU_FREQ) | 144 | #if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_CPU_FREQ) |
| 141 | extern void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table); | 145 | extern void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table); |
| @@ -145,6 +149,13 @@ extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table) | |||
| 145 | #define omap2_clk_exit_cpufreq_table 0 | 149 | #define omap2_clk_exit_cpufreq_table 0 |
| 146 | #endif | 150 | #endif |
| 147 | 151 | ||
| 152 | extern const struct clkops clkops_omap2_iclk_dflt_wait; | ||
| 153 | extern const struct clkops clkops_omap2_iclk_dflt; | ||
| 154 | extern const struct clkops clkops_omap2_iclk_idle_only; | ||
| 155 | extern const struct clkops clkops_omap2_mdmclk_dflt_wait; | ||
| 156 | extern const struct clkops clkops_omap2xxx_dpll_ops; | ||
| 148 | extern const struct clkops clkops_omap3_noncore_dpll_ops; | 157 | extern const struct clkops clkops_omap3_noncore_dpll_ops; |
| 158 | extern const struct clkops clkops_omap3_core_dpll_ops; | ||
| 159 | extern const struct clkops clkops_omap4_dpllmx_ops; | ||
| 149 | 160 | ||
| 150 | #endif | 161 | #endif |
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c index 0a992bc8d0d8..b6f65d4ac97d 100644 --- a/arch/arm/mach-omap2/clock2420_data.c +++ b/arch/arm/mach-omap2/clock2420_data.c | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * linux/arch/arm/mach-omap2/clock2420_data.c | 2 | * OMAP2420 clock data |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2005-2009 Texas Instruments, Inc. | 4 | * Copyright (C) 2005-2009 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2004-2010 Nokia Corporation | 5 | * Copyright (C) 2004-2011 Nokia Corporation |
| 6 | * | 6 | * |
| 7 | * Contacts: | 7 | * Contacts: |
| 8 | * Richard Woodruff <r-woodruff2@ti.com> | 8 | * Richard Woodruff <r-woodruff2@ti.com> |
| 9 | * Paul Walmsley | 9 | * Paul Walmsley |
| 10 | * | 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
| @@ -34,18 +34,15 @@ | |||
| 34 | /* | 34 | /* |
| 35 | * 2420 clock tree. | 35 | * 2420 clock tree. |
| 36 | * | 36 | * |
| 37 | * NOTE:In many cases here we are assigning a 'default' parent. In many | 37 | * NOTE:In many cases here we are assigning a 'default' parent. In |
| 38 | * cases the parent is selectable. The get/set parent calls will also | 38 | * many cases the parent is selectable. The set parent calls will |
| 39 | * switch sources. | 39 | * also switch sources. |
| 40 | * | ||
| 41 | * Many some clocks say always_enabled, but they can be auto idled for | ||
| 42 | * power savings. They will always be available upon clock request. | ||
| 43 | * | 40 | * |
| 44 | * Several sources are given initial rates which may be wrong, this will | 41 | * Several sources are given initial rates which may be wrong, this will |
| 45 | * be fixed up in the init func. | 42 | * be fixed up in the init func. |
| 46 | * | 43 | * |
| 47 | * Things are broadly separated below by clock domains. It is | 44 | * Things are broadly separated below by clock domains. It is |
| 48 | * noteworthy that most periferals have dependencies on multiple clock | 45 | * noteworthy that most peripherals have dependencies on multiple clock |
| 49 | * domains. Many get their interface clocks from the L4 domain, but get | 46 | * domains. Many get their interface clocks from the L4 domain, but get |
| 50 | * functional clocks from fixed sources or other core domain derived | 47 | * functional clocks from fixed sources or other core domain derived |
| 51 | * clocks. | 48 | * clocks. |
| @@ -55,7 +52,7 @@ | |||
| 55 | static struct clk func_32k_ck = { | 52 | static struct clk func_32k_ck = { |
| 56 | .name = "func_32k_ck", | 53 | .name = "func_32k_ck", |
| 57 | .ops = &clkops_null, | 54 | .ops = &clkops_null, |
| 58 | .rate = 32000, | 55 | .rate = 32768, |
| 59 | .clkdm_name = "wkup_clkdm", | 56 | .clkdm_name = "wkup_clkdm", |
| 60 | }; | 57 | }; |
| 61 | 58 | ||
| @@ -116,7 +113,6 @@ static struct dpll_data dpll_dd = { | |||
| 116 | .max_multiplier = 1023, | 113 | .max_multiplier = 1023, |
| 117 | .min_divider = 1, | 114 | .min_divider = 1, |
| 118 | .max_divider = 16, | 115 | .max_divider = 16, |
| 119 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE | ||
| 120 | }; | 116 | }; |
| 121 | 117 | ||
| 122 | /* | 118 | /* |
| @@ -125,7 +121,7 @@ static struct dpll_data dpll_dd = { | |||
| 125 | */ | 121 | */ |
| 126 | static struct clk dpll_ck = { | 122 | static struct clk dpll_ck = { |
| 127 | .name = "dpll_ck", | 123 | .name = "dpll_ck", |
| 128 | .ops = &clkops_null, | 124 | .ops = &clkops_omap2xxx_dpll_ops, |
| 129 | .parent = &sys_ck, /* Can be func_32k also */ | 125 | .parent = &sys_ck, /* Can be func_32k also */ |
| 130 | .dpll_data = &dpll_dd, | 126 | .dpll_data = &dpll_dd, |
| 131 | .clkdm_name = "wkup_clkdm", | 127 | .clkdm_name = "wkup_clkdm", |
| @@ -455,36 +451,22 @@ static struct clk dsp_fck = { | |||
| 455 | .recalc = &omap2_clksel_recalc, | 451 | .recalc = &omap2_clksel_recalc, |
| 456 | }; | 452 | }; |
| 457 | 453 | ||
| 458 | /* DSP interface clock */ | 454 | static const struct clksel dsp_ick_clksel[] = { |
| 459 | static const struct clksel_rate dsp_irate_ick_rates[] = { | 455 | { .parent = &dsp_fck, .rates = dsp_ick_rates }, |
| 460 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, | ||
| 461 | { .div = 2, .val = 2, .flags = RATE_IN_24XX }, | ||
| 462 | { .div = 0 }, | ||
| 463 | }; | ||
| 464 | |||
| 465 | static const struct clksel dsp_irate_ick_clksel[] = { | ||
| 466 | { .parent = &dsp_fck, .rates = dsp_irate_ick_rates }, | ||
| 467 | { .parent = NULL } | 456 | { .parent = NULL } |
| 468 | }; | 457 | }; |
| 469 | 458 | ||
| 470 | /* This clock does not exist as such in the TRM. */ | ||
| 471 | static struct clk dsp_irate_ick = { | ||
| 472 | .name = "dsp_irate_ick", | ||
| 473 | .ops = &clkops_null, | ||
| 474 | .parent = &dsp_fck, | ||
| 475 | .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL), | ||
| 476 | .clksel_mask = OMAP24XX_CLKSEL_DSP_IF_MASK, | ||
| 477 | .clksel = dsp_irate_ick_clksel, | ||
| 478 | .recalc = &omap2_clksel_recalc, | ||
| 479 | }; | ||
| 480 | |||
| 481 | /* 2420 only */ | ||
| 482 | static struct clk dsp_ick = { | 459 | static struct clk dsp_ick = { |
| 483 | .name = "dsp_ick", /* apparently ipi and isp */ | 460 | .name = "dsp_ick", /* apparently ipi and isp */ |
| 484 | .ops = &clkops_omap2_dflt_wait, | 461 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 485 | .parent = &dsp_irate_ick, | 462 | .parent = &dsp_fck, |
| 463 | .clkdm_name = "dsp_clkdm", | ||
| 486 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_ICLKEN), | 464 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_ICLKEN), |
| 487 | .enable_bit = OMAP2420_EN_DSP_IPI_SHIFT, /* for ipi */ | 465 | .enable_bit = OMAP2420_EN_DSP_IPI_SHIFT, /* for ipi */ |
| 466 | .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL), | ||
| 467 | .clksel_mask = OMAP24XX_CLKSEL_DSP_IF_MASK, | ||
| 468 | .clksel = dsp_ick_clksel, | ||
| 469 | .recalc = &omap2_clksel_recalc, | ||
| 488 | }; | 470 | }; |
| 489 | 471 | ||
| 490 | /* | 472 | /* |
| @@ -579,7 +561,7 @@ static const struct clksel usb_l4_ick_clksel[] = { | |||
| 579 | /* It is unclear from TRM whether usb_l4_ick is really in L3 or L4 clkdm */ | 561 | /* It is unclear from TRM whether usb_l4_ick is really in L3 or L4 clkdm */ |
| 580 | static struct clk usb_l4_ick = { /* FS-USB interface clock */ | 562 | static struct clk usb_l4_ick = { /* FS-USB interface clock */ |
| 581 | .name = "usb_l4_ick", | 563 | .name = "usb_l4_ick", |
| 582 | .ops = &clkops_omap2_dflt_wait, | 564 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 583 | .parent = &core_l3_ck, | 565 | .parent = &core_l3_ck, |
| 584 | .clkdm_name = "core_l4_clkdm", | 566 | .clkdm_name = "core_l4_clkdm", |
| 585 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 567 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -661,7 +643,7 @@ static struct clk ssi_ssr_sst_fck = { | |||
| 661 | */ | 643 | */ |
| 662 | static struct clk ssi_l4_ick = { | 644 | static struct clk ssi_l4_ick = { |
| 663 | .name = "ssi_l4_ick", | 645 | .name = "ssi_l4_ick", |
| 664 | .ops = &clkops_omap2_dflt_wait, | 646 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 665 | .parent = &l4_ck, | 647 | .parent = &l4_ck, |
| 666 | .clkdm_name = "core_l4_clkdm", | 648 | .clkdm_name = "core_l4_clkdm", |
| 667 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 649 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -716,6 +698,7 @@ static struct clk gfx_2d_fck = { | |||
| 716 | .recalc = &omap2_clksel_recalc, | 698 | .recalc = &omap2_clksel_recalc, |
| 717 | }; | 699 | }; |
| 718 | 700 | ||
| 701 | /* This interface clock does not have a CM_AUTOIDLE bit */ | ||
| 719 | static struct clk gfx_ick = { | 702 | static struct clk gfx_ick = { |
| 720 | .name = "gfx_ick", /* From l3 */ | 703 | .name = "gfx_ick", /* From l3 */ |
| 721 | .ops = &clkops_omap2_dflt_wait, | 704 | .ops = &clkops_omap2_dflt_wait, |
| @@ -763,7 +746,7 @@ static const struct clksel dss1_fck_clksel[] = { | |||
| 763 | 746 | ||
| 764 | static struct clk dss_ick = { /* Enables both L3,L4 ICLK's */ | 747 | static struct clk dss_ick = { /* Enables both L3,L4 ICLK's */ |
| 765 | .name = "dss_ick", | 748 | .name = "dss_ick", |
| 766 | .ops = &clkops_omap2_dflt, | 749 | .ops = &clkops_omap2_iclk_dflt, |
| 767 | .parent = &l4_ck, /* really both l3 and l4 */ | 750 | .parent = &l4_ck, /* really both l3 and l4 */ |
| 768 | .clkdm_name = "dss_clkdm", | 751 | .clkdm_name = "dss_clkdm", |
| 769 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 752 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -825,6 +808,14 @@ static struct clk dss_54m_fck = { /* Alt clk used in power management */ | |||
| 825 | .recalc = &followparent_recalc, | 808 | .recalc = &followparent_recalc, |
| 826 | }; | 809 | }; |
| 827 | 810 | ||
| 811 | static struct clk wu_l4_ick = { | ||
| 812 | .name = "wu_l4_ick", | ||
| 813 | .ops = &clkops_null, | ||
| 814 | .parent = &sys_ck, | ||
| 815 | .clkdm_name = "wkup_clkdm", | ||
| 816 | .recalc = &followparent_recalc, | ||
| 817 | }; | ||
| 818 | |||
| 828 | /* | 819 | /* |
| 829 | * CORE power domain ICLK & FCLK defines. | 820 | * CORE power domain ICLK & FCLK defines. |
| 830 | * Many of the these can have more than one possible parent. Entries | 821 | * Many of the these can have more than one possible parent. Entries |
| @@ -845,9 +836,9 @@ static const struct clksel omap24xx_gpt_clksel[] = { | |||
| 845 | 836 | ||
| 846 | static struct clk gpt1_ick = { | 837 | static struct clk gpt1_ick = { |
| 847 | .name = "gpt1_ick", | 838 | .name = "gpt1_ick", |
| 848 | .ops = &clkops_omap2_dflt_wait, | 839 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 849 | .parent = &l4_ck, | 840 | .parent = &wu_l4_ick, |
| 850 | .clkdm_name = "core_l4_clkdm", | 841 | .clkdm_name = "wkup_clkdm", |
| 851 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 842 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 852 | .enable_bit = OMAP24XX_EN_GPT1_SHIFT, | 843 | .enable_bit = OMAP24XX_EN_GPT1_SHIFT, |
| 853 | .recalc = &followparent_recalc, | 844 | .recalc = &followparent_recalc, |
| @@ -871,7 +862,7 @@ static struct clk gpt1_fck = { | |||
| 871 | 862 | ||
| 872 | static struct clk gpt2_ick = { | 863 | static struct clk gpt2_ick = { |
| 873 | .name = "gpt2_ick", | 864 | .name = "gpt2_ick", |
| 874 | .ops = &clkops_omap2_dflt_wait, | 865 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 875 | .parent = &l4_ck, | 866 | .parent = &l4_ck, |
| 876 | .clkdm_name = "core_l4_clkdm", | 867 | .clkdm_name = "core_l4_clkdm", |
| 877 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 868 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -895,7 +886,7 @@ static struct clk gpt2_fck = { | |||
| 895 | 886 | ||
| 896 | static struct clk gpt3_ick = { | 887 | static struct clk gpt3_ick = { |
| 897 | .name = "gpt3_ick", | 888 | .name = "gpt3_ick", |
| 898 | .ops = &clkops_omap2_dflt_wait, | 889 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 899 | .parent = &l4_ck, | 890 | .parent = &l4_ck, |
| 900 | .clkdm_name = "core_l4_clkdm", | 891 | .clkdm_name = "core_l4_clkdm", |
| 901 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 892 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -919,7 +910,7 @@ static struct clk gpt3_fck = { | |||
| 919 | 910 | ||
| 920 | static struct clk gpt4_ick = { | 911 | static struct clk gpt4_ick = { |
| 921 | .name = "gpt4_ick", | 912 | .name = "gpt4_ick", |
| 922 | .ops = &clkops_omap2_dflt_wait, | 913 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 923 | .parent = &l4_ck, | 914 | .parent = &l4_ck, |
| 924 | .clkdm_name = "core_l4_clkdm", | 915 | .clkdm_name = "core_l4_clkdm", |
| 925 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 916 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -943,7 +934,7 @@ static struct clk gpt4_fck = { | |||
| 943 | 934 | ||
| 944 | static struct clk gpt5_ick = { | 935 | static struct clk gpt5_ick = { |
| 945 | .name = "gpt5_ick", | 936 | .name = "gpt5_ick", |
| 946 | .ops = &clkops_omap2_dflt_wait, | 937 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 947 | .parent = &l4_ck, | 938 | .parent = &l4_ck, |
| 948 | .clkdm_name = "core_l4_clkdm", | 939 | .clkdm_name = "core_l4_clkdm", |
| 949 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 940 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -967,7 +958,7 @@ static struct clk gpt5_fck = { | |||
| 967 | 958 | ||
| 968 | static struct clk gpt6_ick = { | 959 | static struct clk gpt6_ick = { |
| 969 | .name = "gpt6_ick", | 960 | .name = "gpt6_ick", |
| 970 | .ops = &clkops_omap2_dflt_wait, | 961 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 971 | .parent = &l4_ck, | 962 | .parent = &l4_ck, |
| 972 | .clkdm_name = "core_l4_clkdm", | 963 | .clkdm_name = "core_l4_clkdm", |
| 973 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 964 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -991,8 +982,9 @@ static struct clk gpt6_fck = { | |||
| 991 | 982 | ||
| 992 | static struct clk gpt7_ick = { | 983 | static struct clk gpt7_ick = { |
| 993 | .name = "gpt7_ick", | 984 | .name = "gpt7_ick", |
| 994 | .ops = &clkops_omap2_dflt_wait, | 985 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 995 | .parent = &l4_ck, | 986 | .parent = &l4_ck, |
| 987 | .clkdm_name = "core_l4_clkdm", | ||
| 996 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 988 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 997 | .enable_bit = OMAP24XX_EN_GPT7_SHIFT, | 989 | .enable_bit = OMAP24XX_EN_GPT7_SHIFT, |
| 998 | .recalc = &followparent_recalc, | 990 | .recalc = &followparent_recalc, |
| @@ -1014,7 +1006,7 @@ static struct clk gpt7_fck = { | |||
| 1014 | 1006 | ||
| 1015 | static struct clk gpt8_ick = { | 1007 | static struct clk gpt8_ick = { |
| 1016 | .name = "gpt8_ick", | 1008 | .name = "gpt8_ick", |
| 1017 | .ops = &clkops_omap2_dflt_wait, | 1009 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1018 | .parent = &l4_ck, | 1010 | .parent = &l4_ck, |
| 1019 | .clkdm_name = "core_l4_clkdm", | 1011 | .clkdm_name = "core_l4_clkdm", |
| 1020 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1012 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1038,7 +1030,7 @@ static struct clk gpt8_fck = { | |||
| 1038 | 1030 | ||
| 1039 | static struct clk gpt9_ick = { | 1031 | static struct clk gpt9_ick = { |
| 1040 | .name = "gpt9_ick", | 1032 | .name = "gpt9_ick", |
| 1041 | .ops = &clkops_omap2_dflt_wait, | 1033 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1042 | .parent = &l4_ck, | 1034 | .parent = &l4_ck, |
| 1043 | .clkdm_name = "core_l4_clkdm", | 1035 | .clkdm_name = "core_l4_clkdm", |
| 1044 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1036 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1062,7 +1054,7 @@ static struct clk gpt9_fck = { | |||
| 1062 | 1054 | ||
| 1063 | static struct clk gpt10_ick = { | 1055 | static struct clk gpt10_ick = { |
| 1064 | .name = "gpt10_ick", | 1056 | .name = "gpt10_ick", |
| 1065 | .ops = &clkops_omap2_dflt_wait, | 1057 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1066 | .parent = &l4_ck, | 1058 | .parent = &l4_ck, |
| 1067 | .clkdm_name = "core_l4_clkdm", | 1059 | .clkdm_name = "core_l4_clkdm", |
| 1068 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1060 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1086,7 +1078,7 @@ static struct clk gpt10_fck = { | |||
| 1086 | 1078 | ||
| 1087 | static struct clk gpt11_ick = { | 1079 | static struct clk gpt11_ick = { |
| 1088 | .name = "gpt11_ick", | 1080 | .name = "gpt11_ick", |
| 1089 | .ops = &clkops_omap2_dflt_wait, | 1081 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1090 | .parent = &l4_ck, | 1082 | .parent = &l4_ck, |
| 1091 | .clkdm_name = "core_l4_clkdm", | 1083 | .clkdm_name = "core_l4_clkdm", |
| 1092 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1084 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1110,7 +1102,7 @@ static struct clk gpt11_fck = { | |||
| 1110 | 1102 | ||
| 1111 | static struct clk gpt12_ick = { | 1103 | static struct clk gpt12_ick = { |
| 1112 | .name = "gpt12_ick", | 1104 | .name = "gpt12_ick", |
| 1113 | .ops = &clkops_omap2_dflt_wait, | 1105 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1114 | .parent = &l4_ck, | 1106 | .parent = &l4_ck, |
| 1115 | .clkdm_name = "core_l4_clkdm", | 1107 | .clkdm_name = "core_l4_clkdm", |
| 1116 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1108 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1134,7 +1126,7 @@ static struct clk gpt12_fck = { | |||
| 1134 | 1126 | ||
| 1135 | static struct clk mcbsp1_ick = { | 1127 | static struct clk mcbsp1_ick = { |
| 1136 | .name = "mcbsp1_ick", | 1128 | .name = "mcbsp1_ick", |
| 1137 | .ops = &clkops_omap2_dflt_wait, | 1129 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1138 | .parent = &l4_ck, | 1130 | .parent = &l4_ck, |
| 1139 | .clkdm_name = "core_l4_clkdm", | 1131 | .clkdm_name = "core_l4_clkdm", |
| 1140 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1132 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1174,7 +1166,7 @@ static struct clk mcbsp1_fck = { | |||
| 1174 | 1166 | ||
| 1175 | static struct clk mcbsp2_ick = { | 1167 | static struct clk mcbsp2_ick = { |
| 1176 | .name = "mcbsp2_ick", | 1168 | .name = "mcbsp2_ick", |
| 1177 | .ops = &clkops_omap2_dflt_wait, | 1169 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1178 | .parent = &l4_ck, | 1170 | .parent = &l4_ck, |
| 1179 | .clkdm_name = "core_l4_clkdm", | 1171 | .clkdm_name = "core_l4_clkdm", |
| 1180 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1172 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1198,7 +1190,7 @@ static struct clk mcbsp2_fck = { | |||
| 1198 | 1190 | ||
| 1199 | static struct clk mcspi1_ick = { | 1191 | static struct clk mcspi1_ick = { |
| 1200 | .name = "mcspi1_ick", | 1192 | .name = "mcspi1_ick", |
| 1201 | .ops = &clkops_omap2_dflt_wait, | 1193 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1202 | .parent = &l4_ck, | 1194 | .parent = &l4_ck, |
| 1203 | .clkdm_name = "core_l4_clkdm", | 1195 | .clkdm_name = "core_l4_clkdm", |
| 1204 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1196 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1218,7 +1210,7 @@ static struct clk mcspi1_fck = { | |||
| 1218 | 1210 | ||
| 1219 | static struct clk mcspi2_ick = { | 1211 | static struct clk mcspi2_ick = { |
| 1220 | .name = "mcspi2_ick", | 1212 | .name = "mcspi2_ick", |
| 1221 | .ops = &clkops_omap2_dflt_wait, | 1213 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1222 | .parent = &l4_ck, | 1214 | .parent = &l4_ck, |
| 1223 | .clkdm_name = "core_l4_clkdm", | 1215 | .clkdm_name = "core_l4_clkdm", |
| 1224 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1216 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1238,7 +1230,7 @@ static struct clk mcspi2_fck = { | |||
| 1238 | 1230 | ||
| 1239 | static struct clk uart1_ick = { | 1231 | static struct clk uart1_ick = { |
| 1240 | .name = "uart1_ick", | 1232 | .name = "uart1_ick", |
| 1241 | .ops = &clkops_omap2_dflt_wait, | 1233 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1242 | .parent = &l4_ck, | 1234 | .parent = &l4_ck, |
| 1243 | .clkdm_name = "core_l4_clkdm", | 1235 | .clkdm_name = "core_l4_clkdm", |
| 1244 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1236 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1258,7 +1250,7 @@ static struct clk uart1_fck = { | |||
| 1258 | 1250 | ||
| 1259 | static struct clk uart2_ick = { | 1251 | static struct clk uart2_ick = { |
| 1260 | .name = "uart2_ick", | 1252 | .name = "uart2_ick", |
| 1261 | .ops = &clkops_omap2_dflt_wait, | 1253 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1262 | .parent = &l4_ck, | 1254 | .parent = &l4_ck, |
| 1263 | .clkdm_name = "core_l4_clkdm", | 1255 | .clkdm_name = "core_l4_clkdm", |
| 1264 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1256 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1278,7 +1270,7 @@ static struct clk uart2_fck = { | |||
| 1278 | 1270 | ||
| 1279 | static struct clk uart3_ick = { | 1271 | static struct clk uart3_ick = { |
| 1280 | .name = "uart3_ick", | 1272 | .name = "uart3_ick", |
| 1281 | .ops = &clkops_omap2_dflt_wait, | 1273 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1282 | .parent = &l4_ck, | 1274 | .parent = &l4_ck, |
| 1283 | .clkdm_name = "core_l4_clkdm", | 1275 | .clkdm_name = "core_l4_clkdm", |
| 1284 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 1276 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -1298,9 +1290,9 @@ static struct clk uart3_fck = { | |||
| 1298 | 1290 | ||
| 1299 | static struct clk gpios_ick = { | 1291 | static struct clk gpios_ick = { |
| 1300 | .name = "gpios_ick", | 1292 | .name = "gpios_ick", |
| 1301 | .ops = &clkops_omap2_dflt_wait, | 1293 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1302 | .parent = &l4_ck, | 1294 | .parent = &wu_l4_ick, |
| 1303 | .clkdm_name = "core_l4_clkdm", | 1295 | .clkdm_name = "wkup_clkdm", |
| 1304 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 1296 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1305 | .enable_bit = OMAP24XX_EN_GPIOS_SHIFT, | 1297 | .enable_bit = OMAP24XX_EN_GPIOS_SHIFT, |
| 1306 | .recalc = &followparent_recalc, | 1298 | .recalc = &followparent_recalc, |
| @@ -1318,9 +1310,9 @@ static struct clk gpios_fck = { | |||
| 1318 | 1310 | ||
| 1319 | static struct clk mpu_wdt_ick = { | 1311 | static struct clk mpu_wdt_ick = { |
| 1320 | .name = "mpu_wdt_ick", | 1312 | .name = "mpu_wdt_ick", |
| 1321 | .ops = &clkops_omap2_dflt_wait, | 1313 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1322 | .parent = &l4_ck, | 1314 | .parent = &wu_l4_ick, |
| 1323 | .clkdm_name = "core_l4_clkdm", | 1315 | .clkdm_name = "wkup_clkdm", |
| 1324 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 1316 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1325 | .enable_bit = OMAP24XX_EN_MPU_WDT_SHIFT, | 1317 | .enable_bit = OMAP24XX_EN_MPU_WDT_SHIFT, |
| 1326 | .recalc = &followparent_recalc, | 1318 | .recalc = &followparent_recalc, |
| @@ -1338,10 +1330,10 @@ static struct clk mpu_wdt_fck = { | |||
| 1338 | 1330 | ||
| 1339 | static struct clk sync_32k_ick = { | 1331 | static struct clk sync_32k_ick = { |
| 1340 | .name = "sync_32k_ick", | 1332 | .name = "sync_32k_ick", |
| 1341 | .ops = &clkops_omap2_dflt_wait, | 1333 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1342 | .parent = &l4_ck, | 1334 | .parent = &wu_l4_ick, |
| 1335 | .clkdm_name = "wkup_clkdm", | ||
| 1343 | .flags = ENABLE_ON_INIT, | 1336 | .flags = ENABLE_ON_INIT, |
| 1344 | .clkdm_name = "core_l4_clkdm", | ||
| 1345 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 1337 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1346 | .enable_bit = OMAP24XX_EN_32KSYNC_SHIFT, | 1338 | .enable_bit = OMAP24XX_EN_32KSYNC_SHIFT, |
| 1347 | .recalc = &followparent_recalc, | 1339 | .recalc = &followparent_recalc, |
| @@ -1349,9 +1341,9 @@ static struct clk sync_32k_ick = { | |||
| 1349 | 1341 | ||
| 1350 | static struct clk wdt1_ick = { | 1342 | static struct clk wdt1_ick = { |
| 1351 | .name = "wdt1_ick", | 1343 | .name = "wdt1_ick", |
| 1352 | .ops = &clkops_omap2_dflt_wait, | 1344 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1353 | .parent = &l4_ck, | 1345 | .parent = &wu_l4_ick, |
| 1354 | .clkdm_name = "core_l4_clkdm", | 1346 | .clkdm_name = "wkup_clkdm", |
| 1355 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 1347 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1356 | .enable_bit = OMAP24XX_EN_WDT1_SHIFT, | 1348 | .enable_bit = OMAP24XX_EN_WDT1_SHIFT, |
| 1357 | .recalc = &followparent_recalc, | 1349 | .recalc = &followparent_recalc, |
| @@ -1359,10 +1351,10 @@ static struct clk wdt1_ick = { | |||
| 1359 | 1351 | ||
| 1360 | static struct clk omapctrl_ick = { | 1352 | static struct clk omapctrl_ick = { |
| 1361 | .name = "omapctrl_ick", | 1353 | .name = "omapctrl_ick", |
| 1362 | .ops = &clkops_omap2_dflt_wait, | 1354 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1363 | .parent = &l4_ck, | 1355 | .parent = &wu_l4_ick, |
| 1356 | .clkdm_name = "wkup_clkdm", | ||
| 1364 | .flags = ENABLE_ON_INIT, | 1357 | .flags = ENABLE_ON_INIT, |
| 1365 | .clkdm_name = "core_l4_clkdm", | ||
| 1366 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 1358 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1367 | .enable_bit = OMAP24XX_EN_OMAPCTRL_SHIFT, | 1359 | .enable_bit = OMAP24XX_EN_OMAPCTRL_SHIFT, |
| 1368 | .recalc = &followparent_recalc, | 1360 | .recalc = &followparent_recalc, |
| @@ -1370,7 +1362,7 @@ static struct clk omapctrl_ick = { | |||
| 1370 | 1362 | ||
| 1371 | static struct clk cam_ick = { | 1363 | static struct clk cam_ick = { |
| 1372 | .name = "cam_ick", | 1364 | .name = "cam_ick", |
| 1373 | .ops = &clkops_omap2_dflt, | 1365 | .ops = &clkops_omap2_iclk_dflt, |
| 1374 | .parent = &l4_ck, | 1366 | .parent = &l4_ck, |
| 1375 | .clkdm_name = "core_l4_clkdm", | 1367 | .clkdm_name = "core_l4_clkdm", |
| 1376 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1368 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1395,7 +1387,7 @@ static struct clk cam_fck = { | |||
| 1395 | 1387 | ||
| 1396 | static struct clk mailboxes_ick = { | 1388 | static struct clk mailboxes_ick = { |
| 1397 | .name = "mailboxes_ick", | 1389 | .name = "mailboxes_ick", |
| 1398 | .ops = &clkops_omap2_dflt_wait, | 1390 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1399 | .parent = &l4_ck, | 1391 | .parent = &l4_ck, |
| 1400 | .clkdm_name = "core_l4_clkdm", | 1392 | .clkdm_name = "core_l4_clkdm", |
| 1401 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1393 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1405,7 +1397,7 @@ static struct clk mailboxes_ick = { | |||
| 1405 | 1397 | ||
| 1406 | static struct clk wdt4_ick = { | 1398 | static struct clk wdt4_ick = { |
| 1407 | .name = "wdt4_ick", | 1399 | .name = "wdt4_ick", |
| 1408 | .ops = &clkops_omap2_dflt_wait, | 1400 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1409 | .parent = &l4_ck, | 1401 | .parent = &l4_ck, |
| 1410 | .clkdm_name = "core_l4_clkdm", | 1402 | .clkdm_name = "core_l4_clkdm", |
| 1411 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1403 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1425,7 +1417,7 @@ static struct clk wdt4_fck = { | |||
| 1425 | 1417 | ||
| 1426 | static struct clk wdt3_ick = { | 1418 | static struct clk wdt3_ick = { |
| 1427 | .name = "wdt3_ick", | 1419 | .name = "wdt3_ick", |
| 1428 | .ops = &clkops_omap2_dflt_wait, | 1420 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1429 | .parent = &l4_ck, | 1421 | .parent = &l4_ck, |
| 1430 | .clkdm_name = "core_l4_clkdm", | 1422 | .clkdm_name = "core_l4_clkdm", |
| 1431 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1423 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1445,7 +1437,7 @@ static struct clk wdt3_fck = { | |||
| 1445 | 1437 | ||
| 1446 | static struct clk mspro_ick = { | 1438 | static struct clk mspro_ick = { |
| 1447 | .name = "mspro_ick", | 1439 | .name = "mspro_ick", |
| 1448 | .ops = &clkops_omap2_dflt_wait, | 1440 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1449 | .parent = &l4_ck, | 1441 | .parent = &l4_ck, |
| 1450 | .clkdm_name = "core_l4_clkdm", | 1442 | .clkdm_name = "core_l4_clkdm", |
| 1451 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1443 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1465,7 +1457,7 @@ static struct clk mspro_fck = { | |||
| 1465 | 1457 | ||
| 1466 | static struct clk mmc_ick = { | 1458 | static struct clk mmc_ick = { |
| 1467 | .name = "mmc_ick", | 1459 | .name = "mmc_ick", |
| 1468 | .ops = &clkops_omap2_dflt_wait, | 1460 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1469 | .parent = &l4_ck, | 1461 | .parent = &l4_ck, |
| 1470 | .clkdm_name = "core_l4_clkdm", | 1462 | .clkdm_name = "core_l4_clkdm", |
| 1471 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1463 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1485,7 +1477,7 @@ static struct clk mmc_fck = { | |||
| 1485 | 1477 | ||
| 1486 | static struct clk fac_ick = { | 1478 | static struct clk fac_ick = { |
| 1487 | .name = "fac_ick", | 1479 | .name = "fac_ick", |
| 1488 | .ops = &clkops_omap2_dflt_wait, | 1480 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1489 | .parent = &l4_ck, | 1481 | .parent = &l4_ck, |
| 1490 | .clkdm_name = "core_l4_clkdm", | 1482 | .clkdm_name = "core_l4_clkdm", |
| 1491 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1483 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1505,7 +1497,7 @@ static struct clk fac_fck = { | |||
| 1505 | 1497 | ||
| 1506 | static struct clk eac_ick = { | 1498 | static struct clk eac_ick = { |
| 1507 | .name = "eac_ick", | 1499 | .name = "eac_ick", |
| 1508 | .ops = &clkops_omap2_dflt_wait, | 1500 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1509 | .parent = &l4_ck, | 1501 | .parent = &l4_ck, |
| 1510 | .clkdm_name = "core_l4_clkdm", | 1502 | .clkdm_name = "core_l4_clkdm", |
| 1511 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1503 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1525,7 +1517,7 @@ static struct clk eac_fck = { | |||
| 1525 | 1517 | ||
| 1526 | static struct clk hdq_ick = { | 1518 | static struct clk hdq_ick = { |
| 1527 | .name = "hdq_ick", | 1519 | .name = "hdq_ick", |
| 1528 | .ops = &clkops_omap2_dflt_wait, | 1520 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1529 | .parent = &l4_ck, | 1521 | .parent = &l4_ck, |
| 1530 | .clkdm_name = "core_l4_clkdm", | 1522 | .clkdm_name = "core_l4_clkdm", |
| 1531 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1523 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1545,7 +1537,7 @@ static struct clk hdq_fck = { | |||
| 1545 | 1537 | ||
| 1546 | static struct clk i2c2_ick = { | 1538 | static struct clk i2c2_ick = { |
| 1547 | .name = "i2c2_ick", | 1539 | .name = "i2c2_ick", |
| 1548 | .ops = &clkops_omap2_dflt_wait, | 1540 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1549 | .parent = &l4_ck, | 1541 | .parent = &l4_ck, |
| 1550 | .clkdm_name = "core_l4_clkdm", | 1542 | .clkdm_name = "core_l4_clkdm", |
| 1551 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1543 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1565,7 +1557,7 @@ static struct clk i2c2_fck = { | |||
| 1565 | 1557 | ||
| 1566 | static struct clk i2c1_ick = { | 1558 | static struct clk i2c1_ick = { |
| 1567 | .name = "i2c1_ick", | 1559 | .name = "i2c1_ick", |
| 1568 | .ops = &clkops_omap2_dflt_wait, | 1560 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1569 | .parent = &l4_ck, | 1561 | .parent = &l4_ck, |
| 1570 | .clkdm_name = "core_l4_clkdm", | 1562 | .clkdm_name = "core_l4_clkdm", |
| 1571 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1563 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1583,12 +1575,18 @@ static struct clk i2c1_fck = { | |||
| 1583 | .recalc = &followparent_recalc, | 1575 | .recalc = &followparent_recalc, |
| 1584 | }; | 1576 | }; |
| 1585 | 1577 | ||
| 1578 | /* | ||
| 1579 | * The enable_reg/enable_bit in this clock is only used for CM_AUTOIDLE | ||
| 1580 | * accesses derived from this data. | ||
| 1581 | */ | ||
| 1586 | static struct clk gpmc_fck = { | 1582 | static struct clk gpmc_fck = { |
| 1587 | .name = "gpmc_fck", | 1583 | .name = "gpmc_fck", |
| 1588 | .ops = &clkops_null, /* RMK: missing? */ | 1584 | .ops = &clkops_omap2_iclk_idle_only, |
| 1589 | .parent = &core_l3_ck, | 1585 | .parent = &core_l3_ck, |
| 1590 | .flags = ENABLE_ON_INIT, | 1586 | .flags = ENABLE_ON_INIT, |
| 1591 | .clkdm_name = "core_l3_clkdm", | 1587 | .clkdm_name = "core_l3_clkdm", |
| 1588 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3), | ||
| 1589 | .enable_bit = OMAP24XX_AUTO_GPMC_SHIFT, | ||
| 1592 | .recalc = &followparent_recalc, | 1590 | .recalc = &followparent_recalc, |
| 1593 | }; | 1591 | }; |
| 1594 | 1592 | ||
| @@ -1600,17 +1598,38 @@ static struct clk sdma_fck = { | |||
| 1600 | .recalc = &followparent_recalc, | 1598 | .recalc = &followparent_recalc, |
| 1601 | }; | 1599 | }; |
| 1602 | 1600 | ||
| 1601 | /* | ||
| 1602 | * The enable_reg/enable_bit in this clock is only used for CM_AUTOIDLE | ||
| 1603 | * accesses derived from this data. | ||
| 1604 | */ | ||
| 1603 | static struct clk sdma_ick = { | 1605 | static struct clk sdma_ick = { |
| 1604 | .name = "sdma_ick", | 1606 | .name = "sdma_ick", |
| 1605 | .ops = &clkops_null, /* RMK: missing? */ | 1607 | .ops = &clkops_omap2_iclk_idle_only, |
| 1606 | .parent = &l4_ck, | 1608 | .parent = &core_l3_ck, |
| 1609 | .clkdm_name = "core_l3_clkdm", | ||
| 1610 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3), | ||
| 1611 | .enable_bit = OMAP24XX_AUTO_SDMA_SHIFT, | ||
| 1612 | .recalc = &followparent_recalc, | ||
| 1613 | }; | ||
| 1614 | |||
| 1615 | /* | ||
| 1616 | * The enable_reg/enable_bit in this clock is only used for CM_AUTOIDLE | ||
| 1617 | * accesses derived from this data. | ||
| 1618 | */ | ||
| 1619 | static struct clk sdrc_ick = { | ||
| 1620 | .name = "sdrc_ick", | ||
| 1621 | .ops = &clkops_omap2_iclk_idle_only, | ||
| 1622 | .parent = &core_l3_ck, | ||
| 1623 | .flags = ENABLE_ON_INIT, | ||
| 1607 | .clkdm_name = "core_l3_clkdm", | 1624 | .clkdm_name = "core_l3_clkdm", |
| 1625 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3), | ||
| 1626 | .enable_bit = OMAP24XX_AUTO_SDRC_SHIFT, | ||
| 1608 | .recalc = &followparent_recalc, | 1627 | .recalc = &followparent_recalc, |
| 1609 | }; | 1628 | }; |
| 1610 | 1629 | ||
| 1611 | static struct clk vlynq_ick = { | 1630 | static struct clk vlynq_ick = { |
| 1612 | .name = "vlynq_ick", | 1631 | .name = "vlynq_ick", |
| 1613 | .ops = &clkops_omap2_dflt_wait, | 1632 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1614 | .parent = &core_l3_ck, | 1633 | .parent = &core_l3_ck, |
| 1615 | .clkdm_name = "core_l3_clkdm", | 1634 | .clkdm_name = "core_l3_clkdm", |
| 1616 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1635 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1659,7 +1678,7 @@ static struct clk vlynq_fck = { | |||
| 1659 | 1678 | ||
| 1660 | static struct clk des_ick = { | 1679 | static struct clk des_ick = { |
| 1661 | .name = "des_ick", | 1680 | .name = "des_ick", |
| 1662 | .ops = &clkops_omap2_dflt_wait, | 1681 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1663 | .parent = &l4_ck, | 1682 | .parent = &l4_ck, |
| 1664 | .clkdm_name = "core_l4_clkdm", | 1683 | .clkdm_name = "core_l4_clkdm", |
| 1665 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), | 1684 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| @@ -1669,7 +1688,7 @@ static struct clk des_ick = { | |||
| 1669 | 1688 | ||
| 1670 | static struct clk sha_ick = { | 1689 | static struct clk sha_ick = { |
| 1671 | .name = "sha_ick", | 1690 | .name = "sha_ick", |
| 1672 | .ops = &clkops_omap2_dflt_wait, | 1691 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1673 | .parent = &l4_ck, | 1692 | .parent = &l4_ck, |
| 1674 | .clkdm_name = "core_l4_clkdm", | 1693 | .clkdm_name = "core_l4_clkdm", |
| 1675 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), | 1694 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| @@ -1679,7 +1698,7 @@ static struct clk sha_ick = { | |||
| 1679 | 1698 | ||
| 1680 | static struct clk rng_ick = { | 1699 | static struct clk rng_ick = { |
| 1681 | .name = "rng_ick", | 1700 | .name = "rng_ick", |
| 1682 | .ops = &clkops_omap2_dflt_wait, | 1701 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1683 | .parent = &l4_ck, | 1702 | .parent = &l4_ck, |
| 1684 | .clkdm_name = "core_l4_clkdm", | 1703 | .clkdm_name = "core_l4_clkdm", |
| 1685 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), | 1704 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| @@ -1689,7 +1708,7 @@ static struct clk rng_ick = { | |||
| 1689 | 1708 | ||
| 1690 | static struct clk aes_ick = { | 1709 | static struct clk aes_ick = { |
| 1691 | .name = "aes_ick", | 1710 | .name = "aes_ick", |
| 1692 | .ops = &clkops_omap2_dflt_wait, | 1711 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1693 | .parent = &l4_ck, | 1712 | .parent = &l4_ck, |
| 1694 | .clkdm_name = "core_l4_clkdm", | 1713 | .clkdm_name = "core_l4_clkdm", |
| 1695 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), | 1714 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| @@ -1699,7 +1718,7 @@ static struct clk aes_ick = { | |||
| 1699 | 1718 | ||
| 1700 | static struct clk pka_ick = { | 1719 | static struct clk pka_ick = { |
| 1701 | .name = "pka_ick", | 1720 | .name = "pka_ick", |
| 1702 | .ops = &clkops_omap2_dflt_wait, | 1721 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1703 | .parent = &l4_ck, | 1722 | .parent = &l4_ck, |
| 1704 | .clkdm_name = "core_l4_clkdm", | 1723 | .clkdm_name = "core_l4_clkdm", |
| 1705 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), | 1724 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| @@ -1777,7 +1796,6 @@ static struct omap_clk omap2420_clks[] = { | |||
| 1777 | CLK(NULL, "mpu_ck", &mpu_ck, CK_242X), | 1796 | CLK(NULL, "mpu_ck", &mpu_ck, CK_242X), |
| 1778 | /* dsp domain clocks */ | 1797 | /* dsp domain clocks */ |
| 1779 | CLK(NULL, "dsp_fck", &dsp_fck, CK_242X), | 1798 | CLK(NULL, "dsp_fck", &dsp_fck, CK_242X), |
| 1780 | CLK(NULL, "dsp_irate_ick", &dsp_irate_ick, CK_242X), | ||
| 1781 | CLK(NULL, "dsp_ick", &dsp_ick, CK_242X), | 1799 | CLK(NULL, "dsp_ick", &dsp_ick, CK_242X), |
| 1782 | CLK(NULL, "iva1_ifck", &iva1_ifck, CK_242X), | 1800 | CLK(NULL, "iva1_ifck", &iva1_ifck, CK_242X), |
| 1783 | CLK(NULL, "iva1_mpu_int_ifck", &iva1_mpu_int_ifck, CK_242X), | 1801 | CLK(NULL, "iva1_mpu_int_ifck", &iva1_mpu_int_ifck, CK_242X), |
| @@ -1797,6 +1815,7 @@ static struct omap_clk omap2420_clks[] = { | |||
| 1797 | /* L4 domain clocks */ | 1815 | /* L4 domain clocks */ |
| 1798 | CLK(NULL, "l4_ck", &l4_ck, CK_242X), | 1816 | CLK(NULL, "l4_ck", &l4_ck, CK_242X), |
| 1799 | CLK(NULL, "ssi_l4_ick", &ssi_l4_ick, CK_242X), | 1817 | CLK(NULL, "ssi_l4_ick", &ssi_l4_ick, CK_242X), |
| 1818 | CLK(NULL, "wu_l4_ick", &wu_l4_ick, CK_242X), | ||
| 1800 | /* virtual meta-group clock */ | 1819 | /* virtual meta-group clock */ |
| 1801 | CLK(NULL, "virt_prcm_set", &virt_prcm_set, CK_242X), | 1820 | CLK(NULL, "virt_prcm_set", &virt_prcm_set, CK_242X), |
| 1802 | /* general l4 interface ck, multi-parent functional clk */ | 1821 | /* general l4 interface ck, multi-parent functional clk */ |
| @@ -1869,6 +1888,7 @@ static struct omap_clk omap2420_clks[] = { | |||
| 1869 | CLK(NULL, "gpmc_fck", &gpmc_fck, CK_242X), | 1888 | CLK(NULL, "gpmc_fck", &gpmc_fck, CK_242X), |
| 1870 | CLK(NULL, "sdma_fck", &sdma_fck, CK_242X), | 1889 | CLK(NULL, "sdma_fck", &sdma_fck, CK_242X), |
| 1871 | CLK(NULL, "sdma_ick", &sdma_ick, CK_242X), | 1890 | CLK(NULL, "sdma_ick", &sdma_ick, CK_242X), |
| 1891 | CLK(NULL, "sdrc_ick", &sdrc_ick, CK_242X), | ||
| 1872 | CLK(NULL, "vlynq_ick", &vlynq_ick, CK_242X), | 1892 | CLK(NULL, "vlynq_ick", &vlynq_ick, CK_242X), |
| 1873 | CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X), | 1893 | CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X), |
| 1874 | CLK(NULL, "des_ick", &des_ick, CK_242X), | 1894 | CLK(NULL, "des_ick", &des_ick, CK_242X), |
| @@ -1913,6 +1933,9 @@ int __init omap2420_clk_init(void) | |||
| 1913 | omap2_init_clk_clkdm(c->lk.clk); | 1933 | omap2_init_clk_clkdm(c->lk.clk); |
| 1914 | } | 1934 | } |
| 1915 | 1935 | ||
| 1936 | /* Disable autoidle on all clocks; let the PM code enable it later */ | ||
| 1937 | omap_clk_disable_autoidle_all(); | ||
| 1938 | |||
| 1916 | /* Check the MPU rate set by bootloader */ | 1939 | /* Check the MPU rate set by bootloader */ |
| 1917 | clkrate = omap2xxx_clk_get_core_rate(&dpll_ck); | 1940 | clkrate = omap2xxx_clk_get_core_rate(&dpll_ck); |
| 1918 | for (prcm = rate_table; prcm->mpu_speed; prcm++) { | 1941 | for (prcm = rate_table; prcm->mpu_speed; prcm++) { |
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c index c047dcd007e5..bba018331a71 100644 --- a/arch/arm/mach-omap2/clock2430_data.c +++ b/arch/arm/mach-omap2/clock2430_data.c | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * linux/arch/arm/mach-omap2/clock2430_data.c | 2 | * OMAP2430 clock data |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2005-2009 Texas Instruments, Inc. | 4 | * Copyright (C) 2005-2009 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2004-2010 Nokia Corporation | 5 | * Copyright (C) 2004-2011 Nokia Corporation |
| 6 | * | 6 | * |
| 7 | * Contacts: | 7 | * Contacts: |
| 8 | * Richard Woodruff <r-woodruff2@ti.com> | 8 | * Richard Woodruff <r-woodruff2@ti.com> |
| 9 | * Paul Walmsley | 9 | * Paul Walmsley |
| 10 | * | 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
| @@ -34,18 +34,15 @@ | |||
| 34 | /* | 34 | /* |
| 35 | * 2430 clock tree. | 35 | * 2430 clock tree. |
| 36 | * | 36 | * |
| 37 | * NOTE:In many cases here we are assigning a 'default' parent. In many | 37 | * NOTE:In many cases here we are assigning a 'default' parent. In |
| 38 | * cases the parent is selectable. The get/set parent calls will also | 38 | * many cases the parent is selectable. The set parent calls will |
| 39 | * switch sources. | 39 | * also switch sources. |
| 40 | * | ||
| 41 | * Many some clocks say always_enabled, but they can be auto idled for | ||
| 42 | * power savings. They will always be available upon clock request. | ||
| 43 | * | 40 | * |
| 44 | * Several sources are given initial rates which may be wrong, this will | 41 | * Several sources are given initial rates which may be wrong, this will |
| 45 | * be fixed up in the init func. | 42 | * be fixed up in the init func. |
| 46 | * | 43 | * |
| 47 | * Things are broadly separated below by clock domains. It is | 44 | * Things are broadly separated below by clock domains. It is |
| 48 | * noteworthy that most periferals have dependencies on multiple clock | 45 | * noteworthy that most peripherals have dependencies on multiple clock |
| 49 | * domains. Many get their interface clocks from the L4 domain, but get | 46 | * domains. Many get their interface clocks from the L4 domain, but get |
| 50 | * functional clocks from fixed sources or other core domain derived | 47 | * functional clocks from fixed sources or other core domain derived |
| 51 | * clocks. | 48 | * clocks. |
| @@ -55,7 +52,7 @@ | |||
| 55 | static struct clk func_32k_ck = { | 52 | static struct clk func_32k_ck = { |
| 56 | .name = "func_32k_ck", | 53 | .name = "func_32k_ck", |
| 57 | .ops = &clkops_null, | 54 | .ops = &clkops_null, |
| 58 | .rate = 32000, | 55 | .rate = 32768, |
| 59 | .clkdm_name = "wkup_clkdm", | 56 | .clkdm_name = "wkup_clkdm", |
| 60 | }; | 57 | }; |
| 61 | 58 | ||
| @@ -116,7 +113,6 @@ static struct dpll_data dpll_dd = { | |||
| 116 | .max_multiplier = 1023, | 113 | .max_multiplier = 1023, |
| 117 | .min_divider = 1, | 114 | .min_divider = 1, |
| 118 | .max_divider = 16, | 115 | .max_divider = 16, |
| 119 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE | ||
| 120 | }; | 116 | }; |
| 121 | 117 | ||
| 122 | /* | 118 | /* |
| @@ -125,7 +121,7 @@ static struct dpll_data dpll_dd = { | |||
| 125 | */ | 121 | */ |
| 126 | static struct clk dpll_ck = { | 122 | static struct clk dpll_ck = { |
| 127 | .name = "dpll_ck", | 123 | .name = "dpll_ck", |
| 128 | .ops = &clkops_null, | 124 | .ops = &clkops_omap2xxx_dpll_ops, |
| 129 | .parent = &sys_ck, /* Can be func_32k also */ | 125 | .parent = &sys_ck, /* Can be func_32k also */ |
| 130 | .dpll_data = &dpll_dd, | 126 | .dpll_data = &dpll_dd, |
| 131 | .clkdm_name = "wkup_clkdm", | 127 | .clkdm_name = "wkup_clkdm", |
| @@ -434,37 +430,23 @@ static struct clk dsp_fck = { | |||
| 434 | .recalc = &omap2_clksel_recalc, | 430 | .recalc = &omap2_clksel_recalc, |
| 435 | }; | 431 | }; |
| 436 | 432 | ||
| 437 | /* DSP interface clock */ | 433 | static const struct clksel dsp_ick_clksel[] = { |
| 438 | static const struct clksel_rate dsp_irate_ick_rates[] = { | 434 | { .parent = &dsp_fck, .rates = dsp_ick_rates }, |
| 439 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, | ||
| 440 | { .div = 2, .val = 2, .flags = RATE_IN_24XX }, | ||
| 441 | { .div = 3, .val = 3, .flags = RATE_IN_243X }, | ||
| 442 | { .div = 0 }, | ||
| 443 | }; | ||
| 444 | |||
| 445 | static const struct clksel dsp_irate_ick_clksel[] = { | ||
| 446 | { .parent = &dsp_fck, .rates = dsp_irate_ick_rates }, | ||
| 447 | { .parent = NULL } | 435 | { .parent = NULL } |
| 448 | }; | 436 | }; |
| 449 | 437 | ||
| 450 | /* This clock does not exist as such in the TRM. */ | ||
| 451 | static struct clk dsp_irate_ick = { | ||
| 452 | .name = "dsp_irate_ick", | ||
| 453 | .ops = &clkops_null, | ||
| 454 | .parent = &dsp_fck, | ||
| 455 | .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL), | ||
| 456 | .clksel_mask = OMAP24XX_CLKSEL_DSP_IF_MASK, | ||
| 457 | .clksel = dsp_irate_ick_clksel, | ||
| 458 | .recalc = &omap2_clksel_recalc, | ||
| 459 | }; | ||
| 460 | |||
| 461 | /* 2430 only - EN_DSP controls both dsp fclk and iclk on 2430 */ | 438 | /* 2430 only - EN_DSP controls both dsp fclk and iclk on 2430 */ |
| 462 | static struct clk iva2_1_ick = { | 439 | static struct clk iva2_1_ick = { |
| 463 | .name = "iva2_1_ick", | 440 | .name = "iva2_1_ick", |
| 464 | .ops = &clkops_omap2_dflt_wait, | 441 | .ops = &clkops_omap2_dflt_wait, |
| 465 | .parent = &dsp_irate_ick, | 442 | .parent = &dsp_fck, |
| 443 | .clkdm_name = "dsp_clkdm", | ||
| 466 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN), | 444 | .enable_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN), |
| 467 | .enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT, | 445 | .enable_bit = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT, |
| 446 | .clksel_reg = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL), | ||
| 447 | .clksel_mask = OMAP24XX_CLKSEL_DSP_IF_MASK, | ||
| 448 | .clksel = dsp_ick_clksel, | ||
| 449 | .recalc = &omap2_clksel_recalc, | ||
| 468 | }; | 450 | }; |
| 469 | 451 | ||
| 470 | /* | 452 | /* |
| @@ -525,7 +507,7 @@ static const struct clksel usb_l4_ick_clksel[] = { | |||
| 525 | /* It is unclear from TRM whether usb_l4_ick is really in L3 or L4 clkdm */ | 507 | /* It is unclear from TRM whether usb_l4_ick is really in L3 or L4 clkdm */ |
| 526 | static struct clk usb_l4_ick = { /* FS-USB interface clock */ | 508 | static struct clk usb_l4_ick = { /* FS-USB interface clock */ |
| 527 | .name = "usb_l4_ick", | 509 | .name = "usb_l4_ick", |
| 528 | .ops = &clkops_omap2_dflt_wait, | 510 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 529 | .parent = &core_l3_ck, | 511 | .parent = &core_l3_ck, |
| 530 | .clkdm_name = "core_l4_clkdm", | 512 | .clkdm_name = "core_l4_clkdm", |
| 531 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 513 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -606,7 +588,7 @@ static struct clk ssi_ssr_sst_fck = { | |||
| 606 | */ | 588 | */ |
| 607 | static struct clk ssi_l4_ick = { | 589 | static struct clk ssi_l4_ick = { |
| 608 | .name = "ssi_l4_ick", | 590 | .name = "ssi_l4_ick", |
| 609 | .ops = &clkops_omap2_dflt_wait, | 591 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 610 | .parent = &l4_ck, | 592 | .parent = &l4_ck, |
| 611 | .clkdm_name = "core_l4_clkdm", | 593 | .clkdm_name = "core_l4_clkdm", |
| 612 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 594 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -661,6 +643,7 @@ static struct clk gfx_2d_fck = { | |||
| 661 | .recalc = &omap2_clksel_recalc, | 643 | .recalc = &omap2_clksel_recalc, |
| 662 | }; | 644 | }; |
| 663 | 645 | ||
| 646 | /* This interface clock does not have a CM_AUTOIDLE bit */ | ||
| 664 | static struct clk gfx_ick = { | 647 | static struct clk gfx_ick = { |
| 665 | .name = "gfx_ick", /* From l3 */ | 648 | .name = "gfx_ick", /* From l3 */ |
| 666 | .ops = &clkops_omap2_dflt_wait, | 649 | .ops = &clkops_omap2_dflt_wait, |
| @@ -693,7 +676,7 @@ static const struct clksel mdm_ick_clksel[] = { | |||
| 693 | 676 | ||
| 694 | static struct clk mdm_ick = { /* used both as a ick and fck */ | 677 | static struct clk mdm_ick = { /* used both as a ick and fck */ |
| 695 | .name = "mdm_ick", | 678 | .name = "mdm_ick", |
| 696 | .ops = &clkops_omap2_dflt_wait, | 679 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 697 | .parent = &core_ck, | 680 | .parent = &core_ck, |
| 698 | .clkdm_name = "mdm_clkdm", | 681 | .clkdm_name = "mdm_clkdm", |
| 699 | .enable_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_ICLKEN), | 682 | .enable_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_ICLKEN), |
| @@ -706,7 +689,7 @@ static struct clk mdm_ick = { /* used both as a ick and fck */ | |||
| 706 | 689 | ||
| 707 | static struct clk mdm_osc_ck = { | 690 | static struct clk mdm_osc_ck = { |
| 708 | .name = "mdm_osc_ck", | 691 | .name = "mdm_osc_ck", |
| 709 | .ops = &clkops_omap2_dflt_wait, | 692 | .ops = &clkops_omap2_mdmclk_dflt_wait, |
| 710 | .parent = &osc_ck, | 693 | .parent = &osc_ck, |
| 711 | .clkdm_name = "mdm_clkdm", | 694 | .clkdm_name = "mdm_clkdm", |
| 712 | .enable_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_FCLKEN), | 695 | .enable_reg = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_FCLKEN), |
| @@ -751,7 +734,7 @@ static const struct clksel dss1_fck_clksel[] = { | |||
| 751 | 734 | ||
| 752 | static struct clk dss_ick = { /* Enables both L3,L4 ICLK's */ | 735 | static struct clk dss_ick = { /* Enables both L3,L4 ICLK's */ |
| 753 | .name = "dss_ick", | 736 | .name = "dss_ick", |
| 754 | .ops = &clkops_omap2_dflt, | 737 | .ops = &clkops_omap2_iclk_dflt, |
| 755 | .parent = &l4_ck, /* really both l3 and l4 */ | 738 | .parent = &l4_ck, /* really both l3 and l4 */ |
| 756 | .clkdm_name = "dss_clkdm", | 739 | .clkdm_name = "dss_clkdm", |
| 757 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 740 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -813,6 +796,14 @@ static struct clk dss_54m_fck = { /* Alt clk used in power management */ | |||
| 813 | .recalc = &followparent_recalc, | 796 | .recalc = &followparent_recalc, |
| 814 | }; | 797 | }; |
| 815 | 798 | ||
| 799 | static struct clk wu_l4_ick = { | ||
| 800 | .name = "wu_l4_ick", | ||
| 801 | .ops = &clkops_null, | ||
| 802 | .parent = &sys_ck, | ||
| 803 | .clkdm_name = "wkup_clkdm", | ||
| 804 | .recalc = &followparent_recalc, | ||
| 805 | }; | ||
| 806 | |||
| 816 | /* | 807 | /* |
| 817 | * CORE power domain ICLK & FCLK defines. | 808 | * CORE power domain ICLK & FCLK defines. |
| 818 | * Many of the these can have more than one possible parent. Entries | 809 | * Many of the these can have more than one possible parent. Entries |
| @@ -833,9 +824,9 @@ static const struct clksel omap24xx_gpt_clksel[] = { | |||
| 833 | 824 | ||
| 834 | static struct clk gpt1_ick = { | 825 | static struct clk gpt1_ick = { |
| 835 | .name = "gpt1_ick", | 826 | .name = "gpt1_ick", |
| 836 | .ops = &clkops_omap2_dflt_wait, | 827 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 837 | .parent = &l4_ck, | 828 | .parent = &wu_l4_ick, |
| 838 | .clkdm_name = "core_l4_clkdm", | 829 | .clkdm_name = "wkup_clkdm", |
| 839 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 830 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 840 | .enable_bit = OMAP24XX_EN_GPT1_SHIFT, | 831 | .enable_bit = OMAP24XX_EN_GPT1_SHIFT, |
| 841 | .recalc = &followparent_recalc, | 832 | .recalc = &followparent_recalc, |
| @@ -859,7 +850,7 @@ static struct clk gpt1_fck = { | |||
| 859 | 850 | ||
| 860 | static struct clk gpt2_ick = { | 851 | static struct clk gpt2_ick = { |
| 861 | .name = "gpt2_ick", | 852 | .name = "gpt2_ick", |
| 862 | .ops = &clkops_omap2_dflt_wait, | 853 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 863 | .parent = &l4_ck, | 854 | .parent = &l4_ck, |
| 864 | .clkdm_name = "core_l4_clkdm", | 855 | .clkdm_name = "core_l4_clkdm", |
| 865 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 856 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -883,7 +874,7 @@ static struct clk gpt2_fck = { | |||
| 883 | 874 | ||
| 884 | static struct clk gpt3_ick = { | 875 | static struct clk gpt3_ick = { |
| 885 | .name = "gpt3_ick", | 876 | .name = "gpt3_ick", |
| 886 | .ops = &clkops_omap2_dflt_wait, | 877 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 887 | .parent = &l4_ck, | 878 | .parent = &l4_ck, |
| 888 | .clkdm_name = "core_l4_clkdm", | 879 | .clkdm_name = "core_l4_clkdm", |
| 889 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 880 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -907,7 +898,7 @@ static struct clk gpt3_fck = { | |||
| 907 | 898 | ||
| 908 | static struct clk gpt4_ick = { | 899 | static struct clk gpt4_ick = { |
| 909 | .name = "gpt4_ick", | 900 | .name = "gpt4_ick", |
| 910 | .ops = &clkops_omap2_dflt_wait, | 901 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 911 | .parent = &l4_ck, | 902 | .parent = &l4_ck, |
| 912 | .clkdm_name = "core_l4_clkdm", | 903 | .clkdm_name = "core_l4_clkdm", |
| 913 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 904 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -931,7 +922,7 @@ static struct clk gpt4_fck = { | |||
| 931 | 922 | ||
| 932 | static struct clk gpt5_ick = { | 923 | static struct clk gpt5_ick = { |
| 933 | .name = "gpt5_ick", | 924 | .name = "gpt5_ick", |
| 934 | .ops = &clkops_omap2_dflt_wait, | 925 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 935 | .parent = &l4_ck, | 926 | .parent = &l4_ck, |
| 936 | .clkdm_name = "core_l4_clkdm", | 927 | .clkdm_name = "core_l4_clkdm", |
| 937 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 928 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -955,7 +946,7 @@ static struct clk gpt5_fck = { | |||
| 955 | 946 | ||
| 956 | static struct clk gpt6_ick = { | 947 | static struct clk gpt6_ick = { |
| 957 | .name = "gpt6_ick", | 948 | .name = "gpt6_ick", |
| 958 | .ops = &clkops_omap2_dflt_wait, | 949 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 959 | .parent = &l4_ck, | 950 | .parent = &l4_ck, |
| 960 | .clkdm_name = "core_l4_clkdm", | 951 | .clkdm_name = "core_l4_clkdm", |
| 961 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 952 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -979,8 +970,9 @@ static struct clk gpt6_fck = { | |||
| 979 | 970 | ||
| 980 | static struct clk gpt7_ick = { | 971 | static struct clk gpt7_ick = { |
| 981 | .name = "gpt7_ick", | 972 | .name = "gpt7_ick", |
| 982 | .ops = &clkops_omap2_dflt_wait, | 973 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 983 | .parent = &l4_ck, | 974 | .parent = &l4_ck, |
| 975 | .clkdm_name = "core_l4_clkdm", | ||
| 984 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 976 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 985 | .enable_bit = OMAP24XX_EN_GPT7_SHIFT, | 977 | .enable_bit = OMAP24XX_EN_GPT7_SHIFT, |
| 986 | .recalc = &followparent_recalc, | 978 | .recalc = &followparent_recalc, |
| @@ -1002,7 +994,7 @@ static struct clk gpt7_fck = { | |||
| 1002 | 994 | ||
| 1003 | static struct clk gpt8_ick = { | 995 | static struct clk gpt8_ick = { |
| 1004 | .name = "gpt8_ick", | 996 | .name = "gpt8_ick", |
| 1005 | .ops = &clkops_omap2_dflt_wait, | 997 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1006 | .parent = &l4_ck, | 998 | .parent = &l4_ck, |
| 1007 | .clkdm_name = "core_l4_clkdm", | 999 | .clkdm_name = "core_l4_clkdm", |
| 1008 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1000 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1026,7 +1018,7 @@ static struct clk gpt8_fck = { | |||
| 1026 | 1018 | ||
| 1027 | static struct clk gpt9_ick = { | 1019 | static struct clk gpt9_ick = { |
| 1028 | .name = "gpt9_ick", | 1020 | .name = "gpt9_ick", |
| 1029 | .ops = &clkops_omap2_dflt_wait, | 1021 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1030 | .parent = &l4_ck, | 1022 | .parent = &l4_ck, |
| 1031 | .clkdm_name = "core_l4_clkdm", | 1023 | .clkdm_name = "core_l4_clkdm", |
| 1032 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1024 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1050,7 +1042,7 @@ static struct clk gpt9_fck = { | |||
| 1050 | 1042 | ||
| 1051 | static struct clk gpt10_ick = { | 1043 | static struct clk gpt10_ick = { |
| 1052 | .name = "gpt10_ick", | 1044 | .name = "gpt10_ick", |
| 1053 | .ops = &clkops_omap2_dflt_wait, | 1045 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1054 | .parent = &l4_ck, | 1046 | .parent = &l4_ck, |
| 1055 | .clkdm_name = "core_l4_clkdm", | 1047 | .clkdm_name = "core_l4_clkdm", |
| 1056 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1048 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1074,7 +1066,7 @@ static struct clk gpt10_fck = { | |||
| 1074 | 1066 | ||
| 1075 | static struct clk gpt11_ick = { | 1067 | static struct clk gpt11_ick = { |
| 1076 | .name = "gpt11_ick", | 1068 | .name = "gpt11_ick", |
| 1077 | .ops = &clkops_omap2_dflt_wait, | 1069 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1078 | .parent = &l4_ck, | 1070 | .parent = &l4_ck, |
| 1079 | .clkdm_name = "core_l4_clkdm", | 1071 | .clkdm_name = "core_l4_clkdm", |
| 1080 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1072 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1098,7 +1090,7 @@ static struct clk gpt11_fck = { | |||
| 1098 | 1090 | ||
| 1099 | static struct clk gpt12_ick = { | 1091 | static struct clk gpt12_ick = { |
| 1100 | .name = "gpt12_ick", | 1092 | .name = "gpt12_ick", |
| 1101 | .ops = &clkops_omap2_dflt_wait, | 1093 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1102 | .parent = &l4_ck, | 1094 | .parent = &l4_ck, |
| 1103 | .clkdm_name = "core_l4_clkdm", | 1095 | .clkdm_name = "core_l4_clkdm", |
| 1104 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1096 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1122,7 +1114,7 @@ static struct clk gpt12_fck = { | |||
| 1122 | 1114 | ||
| 1123 | static struct clk mcbsp1_ick = { | 1115 | static struct clk mcbsp1_ick = { |
| 1124 | .name = "mcbsp1_ick", | 1116 | .name = "mcbsp1_ick", |
| 1125 | .ops = &clkops_omap2_dflt_wait, | 1117 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1126 | .parent = &l4_ck, | 1118 | .parent = &l4_ck, |
| 1127 | .clkdm_name = "core_l4_clkdm", | 1119 | .clkdm_name = "core_l4_clkdm", |
| 1128 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1120 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1162,7 +1154,7 @@ static struct clk mcbsp1_fck = { | |||
| 1162 | 1154 | ||
| 1163 | static struct clk mcbsp2_ick = { | 1155 | static struct clk mcbsp2_ick = { |
| 1164 | .name = "mcbsp2_ick", | 1156 | .name = "mcbsp2_ick", |
| 1165 | .ops = &clkops_omap2_dflt_wait, | 1157 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1166 | .parent = &l4_ck, | 1158 | .parent = &l4_ck, |
| 1167 | .clkdm_name = "core_l4_clkdm", | 1159 | .clkdm_name = "core_l4_clkdm", |
| 1168 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1160 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1186,7 +1178,7 @@ static struct clk mcbsp2_fck = { | |||
| 1186 | 1178 | ||
| 1187 | static struct clk mcbsp3_ick = { | 1179 | static struct clk mcbsp3_ick = { |
| 1188 | .name = "mcbsp3_ick", | 1180 | .name = "mcbsp3_ick", |
| 1189 | .ops = &clkops_omap2_dflt_wait, | 1181 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1190 | .parent = &l4_ck, | 1182 | .parent = &l4_ck, |
| 1191 | .clkdm_name = "core_l4_clkdm", | 1183 | .clkdm_name = "core_l4_clkdm", |
| 1192 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 1184 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -1210,7 +1202,7 @@ static struct clk mcbsp3_fck = { | |||
| 1210 | 1202 | ||
| 1211 | static struct clk mcbsp4_ick = { | 1203 | static struct clk mcbsp4_ick = { |
| 1212 | .name = "mcbsp4_ick", | 1204 | .name = "mcbsp4_ick", |
| 1213 | .ops = &clkops_omap2_dflt_wait, | 1205 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1214 | .parent = &l4_ck, | 1206 | .parent = &l4_ck, |
| 1215 | .clkdm_name = "core_l4_clkdm", | 1207 | .clkdm_name = "core_l4_clkdm", |
| 1216 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 1208 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -1234,7 +1226,7 @@ static struct clk mcbsp4_fck = { | |||
| 1234 | 1226 | ||
| 1235 | static struct clk mcbsp5_ick = { | 1227 | static struct clk mcbsp5_ick = { |
| 1236 | .name = "mcbsp5_ick", | 1228 | .name = "mcbsp5_ick", |
| 1237 | .ops = &clkops_omap2_dflt_wait, | 1229 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1238 | .parent = &l4_ck, | 1230 | .parent = &l4_ck, |
| 1239 | .clkdm_name = "core_l4_clkdm", | 1231 | .clkdm_name = "core_l4_clkdm", |
| 1240 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 1232 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -1258,7 +1250,7 @@ static struct clk mcbsp5_fck = { | |||
| 1258 | 1250 | ||
| 1259 | static struct clk mcspi1_ick = { | 1251 | static struct clk mcspi1_ick = { |
| 1260 | .name = "mcspi1_ick", | 1252 | .name = "mcspi1_ick", |
| 1261 | .ops = &clkops_omap2_dflt_wait, | 1253 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1262 | .parent = &l4_ck, | 1254 | .parent = &l4_ck, |
| 1263 | .clkdm_name = "core_l4_clkdm", | 1255 | .clkdm_name = "core_l4_clkdm", |
| 1264 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1256 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1278,7 +1270,7 @@ static struct clk mcspi1_fck = { | |||
| 1278 | 1270 | ||
| 1279 | static struct clk mcspi2_ick = { | 1271 | static struct clk mcspi2_ick = { |
| 1280 | .name = "mcspi2_ick", | 1272 | .name = "mcspi2_ick", |
| 1281 | .ops = &clkops_omap2_dflt_wait, | 1273 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1282 | .parent = &l4_ck, | 1274 | .parent = &l4_ck, |
| 1283 | .clkdm_name = "core_l4_clkdm", | 1275 | .clkdm_name = "core_l4_clkdm", |
| 1284 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1276 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1298,7 +1290,7 @@ static struct clk mcspi2_fck = { | |||
| 1298 | 1290 | ||
| 1299 | static struct clk mcspi3_ick = { | 1291 | static struct clk mcspi3_ick = { |
| 1300 | .name = "mcspi3_ick", | 1292 | .name = "mcspi3_ick", |
| 1301 | .ops = &clkops_omap2_dflt_wait, | 1293 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1302 | .parent = &l4_ck, | 1294 | .parent = &l4_ck, |
| 1303 | .clkdm_name = "core_l4_clkdm", | 1295 | .clkdm_name = "core_l4_clkdm", |
| 1304 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 1296 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -1318,7 +1310,7 @@ static struct clk mcspi3_fck = { | |||
| 1318 | 1310 | ||
| 1319 | static struct clk uart1_ick = { | 1311 | static struct clk uart1_ick = { |
| 1320 | .name = "uart1_ick", | 1312 | .name = "uart1_ick", |
| 1321 | .ops = &clkops_omap2_dflt_wait, | 1313 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1322 | .parent = &l4_ck, | 1314 | .parent = &l4_ck, |
| 1323 | .clkdm_name = "core_l4_clkdm", | 1315 | .clkdm_name = "core_l4_clkdm", |
| 1324 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1316 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1338,7 +1330,7 @@ static struct clk uart1_fck = { | |||
| 1338 | 1330 | ||
| 1339 | static struct clk uart2_ick = { | 1331 | static struct clk uart2_ick = { |
| 1340 | .name = "uart2_ick", | 1332 | .name = "uart2_ick", |
| 1341 | .ops = &clkops_omap2_dflt_wait, | 1333 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1342 | .parent = &l4_ck, | 1334 | .parent = &l4_ck, |
| 1343 | .clkdm_name = "core_l4_clkdm", | 1335 | .clkdm_name = "core_l4_clkdm", |
| 1344 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1336 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1358,7 +1350,7 @@ static struct clk uart2_fck = { | |||
| 1358 | 1350 | ||
| 1359 | static struct clk uart3_ick = { | 1351 | static struct clk uart3_ick = { |
| 1360 | .name = "uart3_ick", | 1352 | .name = "uart3_ick", |
| 1361 | .ops = &clkops_omap2_dflt_wait, | 1353 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1362 | .parent = &l4_ck, | 1354 | .parent = &l4_ck, |
| 1363 | .clkdm_name = "core_l4_clkdm", | 1355 | .clkdm_name = "core_l4_clkdm", |
| 1364 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 1356 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -1378,9 +1370,9 @@ static struct clk uart3_fck = { | |||
| 1378 | 1370 | ||
| 1379 | static struct clk gpios_ick = { | 1371 | static struct clk gpios_ick = { |
| 1380 | .name = "gpios_ick", | 1372 | .name = "gpios_ick", |
| 1381 | .ops = &clkops_omap2_dflt_wait, | 1373 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1382 | .parent = &l4_ck, | 1374 | .parent = &wu_l4_ick, |
| 1383 | .clkdm_name = "core_l4_clkdm", | 1375 | .clkdm_name = "wkup_clkdm", |
| 1384 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 1376 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1385 | .enable_bit = OMAP24XX_EN_GPIOS_SHIFT, | 1377 | .enable_bit = OMAP24XX_EN_GPIOS_SHIFT, |
| 1386 | .recalc = &followparent_recalc, | 1378 | .recalc = &followparent_recalc, |
| @@ -1398,9 +1390,9 @@ static struct clk gpios_fck = { | |||
| 1398 | 1390 | ||
| 1399 | static struct clk mpu_wdt_ick = { | 1391 | static struct clk mpu_wdt_ick = { |
| 1400 | .name = "mpu_wdt_ick", | 1392 | .name = "mpu_wdt_ick", |
| 1401 | .ops = &clkops_omap2_dflt_wait, | 1393 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1402 | .parent = &l4_ck, | 1394 | .parent = &wu_l4_ick, |
| 1403 | .clkdm_name = "core_l4_clkdm", | 1395 | .clkdm_name = "wkup_clkdm", |
| 1404 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 1396 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1405 | .enable_bit = OMAP24XX_EN_MPU_WDT_SHIFT, | 1397 | .enable_bit = OMAP24XX_EN_MPU_WDT_SHIFT, |
| 1406 | .recalc = &followparent_recalc, | 1398 | .recalc = &followparent_recalc, |
| @@ -1418,10 +1410,10 @@ static struct clk mpu_wdt_fck = { | |||
| 1418 | 1410 | ||
| 1419 | static struct clk sync_32k_ick = { | 1411 | static struct clk sync_32k_ick = { |
| 1420 | .name = "sync_32k_ick", | 1412 | .name = "sync_32k_ick", |
| 1421 | .ops = &clkops_omap2_dflt_wait, | 1413 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1422 | .parent = &l4_ck, | ||
| 1423 | .flags = ENABLE_ON_INIT, | 1414 | .flags = ENABLE_ON_INIT, |
| 1424 | .clkdm_name = "core_l4_clkdm", | 1415 | .parent = &wu_l4_ick, |
| 1416 | .clkdm_name = "wkup_clkdm", | ||
| 1425 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 1417 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1426 | .enable_bit = OMAP24XX_EN_32KSYNC_SHIFT, | 1418 | .enable_bit = OMAP24XX_EN_32KSYNC_SHIFT, |
| 1427 | .recalc = &followparent_recalc, | 1419 | .recalc = &followparent_recalc, |
| @@ -1429,9 +1421,9 @@ static struct clk sync_32k_ick = { | |||
| 1429 | 1421 | ||
| 1430 | static struct clk wdt1_ick = { | 1422 | static struct clk wdt1_ick = { |
| 1431 | .name = "wdt1_ick", | 1423 | .name = "wdt1_ick", |
| 1432 | .ops = &clkops_omap2_dflt_wait, | 1424 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1433 | .parent = &l4_ck, | 1425 | .parent = &wu_l4_ick, |
| 1434 | .clkdm_name = "core_l4_clkdm", | 1426 | .clkdm_name = "wkup_clkdm", |
| 1435 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 1427 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1436 | .enable_bit = OMAP24XX_EN_WDT1_SHIFT, | 1428 | .enable_bit = OMAP24XX_EN_WDT1_SHIFT, |
| 1437 | .recalc = &followparent_recalc, | 1429 | .recalc = &followparent_recalc, |
| @@ -1439,10 +1431,10 @@ static struct clk wdt1_ick = { | |||
| 1439 | 1431 | ||
| 1440 | static struct clk omapctrl_ick = { | 1432 | static struct clk omapctrl_ick = { |
| 1441 | .name = "omapctrl_ick", | 1433 | .name = "omapctrl_ick", |
| 1442 | .ops = &clkops_omap2_dflt_wait, | 1434 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1443 | .parent = &l4_ck, | ||
| 1444 | .flags = ENABLE_ON_INIT, | 1435 | .flags = ENABLE_ON_INIT, |
| 1445 | .clkdm_name = "core_l4_clkdm", | 1436 | .parent = &wu_l4_ick, |
| 1437 | .clkdm_name = "wkup_clkdm", | ||
| 1446 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 1438 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1447 | .enable_bit = OMAP24XX_EN_OMAPCTRL_SHIFT, | 1439 | .enable_bit = OMAP24XX_EN_OMAPCTRL_SHIFT, |
| 1448 | .recalc = &followparent_recalc, | 1440 | .recalc = &followparent_recalc, |
| @@ -1450,9 +1442,9 @@ static struct clk omapctrl_ick = { | |||
| 1450 | 1442 | ||
| 1451 | static struct clk icr_ick = { | 1443 | static struct clk icr_ick = { |
| 1452 | .name = "icr_ick", | 1444 | .name = "icr_ick", |
| 1453 | .ops = &clkops_omap2_dflt_wait, | 1445 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1454 | .parent = &l4_ck, | 1446 | .parent = &wu_l4_ick, |
| 1455 | .clkdm_name = "core_l4_clkdm", | 1447 | .clkdm_name = "wkup_clkdm", |
| 1456 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 1448 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 1457 | .enable_bit = OMAP2430_EN_ICR_SHIFT, | 1449 | .enable_bit = OMAP2430_EN_ICR_SHIFT, |
| 1458 | .recalc = &followparent_recalc, | 1450 | .recalc = &followparent_recalc, |
| @@ -1460,7 +1452,7 @@ static struct clk icr_ick = { | |||
| 1460 | 1452 | ||
| 1461 | static struct clk cam_ick = { | 1453 | static struct clk cam_ick = { |
| 1462 | .name = "cam_ick", | 1454 | .name = "cam_ick", |
| 1463 | .ops = &clkops_omap2_dflt, | 1455 | .ops = &clkops_omap2_iclk_dflt, |
| 1464 | .parent = &l4_ck, | 1456 | .parent = &l4_ck, |
| 1465 | .clkdm_name = "core_l4_clkdm", | 1457 | .clkdm_name = "core_l4_clkdm", |
| 1466 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1458 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1485,7 +1477,7 @@ static struct clk cam_fck = { | |||
| 1485 | 1477 | ||
| 1486 | static struct clk mailboxes_ick = { | 1478 | static struct clk mailboxes_ick = { |
| 1487 | .name = "mailboxes_ick", | 1479 | .name = "mailboxes_ick", |
| 1488 | .ops = &clkops_omap2_dflt_wait, | 1480 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1489 | .parent = &l4_ck, | 1481 | .parent = &l4_ck, |
| 1490 | .clkdm_name = "core_l4_clkdm", | 1482 | .clkdm_name = "core_l4_clkdm", |
| 1491 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1483 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1495,7 +1487,7 @@ static struct clk mailboxes_ick = { | |||
| 1495 | 1487 | ||
| 1496 | static struct clk wdt4_ick = { | 1488 | static struct clk wdt4_ick = { |
| 1497 | .name = "wdt4_ick", | 1489 | .name = "wdt4_ick", |
| 1498 | .ops = &clkops_omap2_dflt_wait, | 1490 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1499 | .parent = &l4_ck, | 1491 | .parent = &l4_ck, |
| 1500 | .clkdm_name = "core_l4_clkdm", | 1492 | .clkdm_name = "core_l4_clkdm", |
| 1501 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1493 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1515,7 +1507,7 @@ static struct clk wdt4_fck = { | |||
| 1515 | 1507 | ||
| 1516 | static struct clk mspro_ick = { | 1508 | static struct clk mspro_ick = { |
| 1517 | .name = "mspro_ick", | 1509 | .name = "mspro_ick", |
| 1518 | .ops = &clkops_omap2_dflt_wait, | 1510 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1519 | .parent = &l4_ck, | 1511 | .parent = &l4_ck, |
| 1520 | .clkdm_name = "core_l4_clkdm", | 1512 | .clkdm_name = "core_l4_clkdm", |
| 1521 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1513 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1535,7 +1527,7 @@ static struct clk mspro_fck = { | |||
| 1535 | 1527 | ||
| 1536 | static struct clk fac_ick = { | 1528 | static struct clk fac_ick = { |
| 1537 | .name = "fac_ick", | 1529 | .name = "fac_ick", |
| 1538 | .ops = &clkops_omap2_dflt_wait, | 1530 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1539 | .parent = &l4_ck, | 1531 | .parent = &l4_ck, |
| 1540 | .clkdm_name = "core_l4_clkdm", | 1532 | .clkdm_name = "core_l4_clkdm", |
| 1541 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1533 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1555,7 +1547,7 @@ static struct clk fac_fck = { | |||
| 1555 | 1547 | ||
| 1556 | static struct clk hdq_ick = { | 1548 | static struct clk hdq_ick = { |
| 1557 | .name = "hdq_ick", | 1549 | .name = "hdq_ick", |
| 1558 | .ops = &clkops_omap2_dflt_wait, | 1550 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1559 | .parent = &l4_ck, | 1551 | .parent = &l4_ck, |
| 1560 | .clkdm_name = "core_l4_clkdm", | 1552 | .clkdm_name = "core_l4_clkdm", |
| 1561 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1553 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1579,7 +1571,7 @@ static struct clk hdq_fck = { | |||
| 1579 | */ | 1571 | */ |
| 1580 | static struct clk i2c2_ick = { | 1572 | static struct clk i2c2_ick = { |
| 1581 | .name = "i2c2_ick", | 1573 | .name = "i2c2_ick", |
| 1582 | .ops = &clkops_omap2_dflt_wait, | 1574 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1583 | .parent = &l4_ck, | 1575 | .parent = &l4_ck, |
| 1584 | .clkdm_name = "core_l4_clkdm", | 1576 | .clkdm_name = "core_l4_clkdm", |
| 1585 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1577 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1603,7 +1595,7 @@ static struct clk i2chs2_fck = { | |||
| 1603 | */ | 1595 | */ |
| 1604 | static struct clk i2c1_ick = { | 1596 | static struct clk i2c1_ick = { |
| 1605 | .name = "i2c1_ick", | 1597 | .name = "i2c1_ick", |
| 1606 | .ops = &clkops_omap2_dflt_wait, | 1598 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1607 | .parent = &l4_ck, | 1599 | .parent = &l4_ck, |
| 1608 | .clkdm_name = "core_l4_clkdm", | 1600 | .clkdm_name = "core_l4_clkdm", |
| 1609 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1601 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -1621,12 +1613,18 @@ static struct clk i2chs1_fck = { | |||
| 1621 | .recalc = &followparent_recalc, | 1613 | .recalc = &followparent_recalc, |
| 1622 | }; | 1614 | }; |
| 1623 | 1615 | ||
| 1616 | /* | ||
| 1617 | * The enable_reg/enable_bit in this clock is only used for CM_AUTOIDLE | ||
| 1618 | * accesses derived from this data. | ||
| 1619 | */ | ||
| 1624 | static struct clk gpmc_fck = { | 1620 | static struct clk gpmc_fck = { |
| 1625 | .name = "gpmc_fck", | 1621 | .name = "gpmc_fck", |
| 1626 | .ops = &clkops_null, /* RMK: missing? */ | 1622 | .ops = &clkops_omap2_iclk_idle_only, |
| 1627 | .parent = &core_l3_ck, | 1623 | .parent = &core_l3_ck, |
| 1628 | .flags = ENABLE_ON_INIT, | 1624 | .flags = ENABLE_ON_INIT, |
| 1629 | .clkdm_name = "core_l3_clkdm", | 1625 | .clkdm_name = "core_l3_clkdm", |
| 1626 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3), | ||
| 1627 | .enable_bit = OMAP24XX_AUTO_GPMC_SHIFT, | ||
| 1630 | .recalc = &followparent_recalc, | 1628 | .recalc = &followparent_recalc, |
| 1631 | }; | 1629 | }; |
| 1632 | 1630 | ||
| @@ -1638,20 +1636,26 @@ static struct clk sdma_fck = { | |||
| 1638 | .recalc = &followparent_recalc, | 1636 | .recalc = &followparent_recalc, |
| 1639 | }; | 1637 | }; |
| 1640 | 1638 | ||
| 1639 | /* | ||
| 1640 | * The enable_reg/enable_bit in this clock is only used for CM_AUTOIDLE | ||
| 1641 | * accesses derived from this data. | ||
| 1642 | */ | ||
| 1641 | static struct clk sdma_ick = { | 1643 | static struct clk sdma_ick = { |
| 1642 | .name = "sdma_ick", | 1644 | .name = "sdma_ick", |
| 1643 | .ops = &clkops_null, /* RMK: missing? */ | 1645 | .ops = &clkops_omap2_iclk_idle_only, |
| 1644 | .parent = &l4_ck, | 1646 | .parent = &core_l3_ck, |
| 1645 | .clkdm_name = "core_l3_clkdm", | 1647 | .clkdm_name = "core_l3_clkdm", |
| 1648 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3), | ||
| 1649 | .enable_bit = OMAP24XX_AUTO_SDMA_SHIFT, | ||
| 1646 | .recalc = &followparent_recalc, | 1650 | .recalc = &followparent_recalc, |
| 1647 | }; | 1651 | }; |
| 1648 | 1652 | ||
| 1649 | static struct clk sdrc_ick = { | 1653 | static struct clk sdrc_ick = { |
| 1650 | .name = "sdrc_ick", | 1654 | .name = "sdrc_ick", |
| 1651 | .ops = &clkops_omap2_dflt_wait, | 1655 | .ops = &clkops_omap2_iclk_idle_only, |
| 1652 | .parent = &l4_ck, | 1656 | .parent = &core_l3_ck, |
| 1653 | .flags = ENABLE_ON_INIT, | 1657 | .flags = ENABLE_ON_INIT, |
| 1654 | .clkdm_name = "core_l4_clkdm", | 1658 | .clkdm_name = "core_l3_clkdm", |
| 1655 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3), | 1659 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3), |
| 1656 | .enable_bit = OMAP2430_EN_SDRC_SHIFT, | 1660 | .enable_bit = OMAP2430_EN_SDRC_SHIFT, |
| 1657 | .recalc = &followparent_recalc, | 1661 | .recalc = &followparent_recalc, |
| @@ -1659,7 +1663,7 @@ static struct clk sdrc_ick = { | |||
| 1659 | 1663 | ||
| 1660 | static struct clk des_ick = { | 1664 | static struct clk des_ick = { |
| 1661 | .name = "des_ick", | 1665 | .name = "des_ick", |
| 1662 | .ops = &clkops_omap2_dflt_wait, | 1666 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1663 | .parent = &l4_ck, | 1667 | .parent = &l4_ck, |
| 1664 | .clkdm_name = "core_l4_clkdm", | 1668 | .clkdm_name = "core_l4_clkdm", |
| 1665 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), | 1669 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| @@ -1669,7 +1673,7 @@ static struct clk des_ick = { | |||
| 1669 | 1673 | ||
| 1670 | static struct clk sha_ick = { | 1674 | static struct clk sha_ick = { |
| 1671 | .name = "sha_ick", | 1675 | .name = "sha_ick", |
| 1672 | .ops = &clkops_omap2_dflt_wait, | 1676 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1673 | .parent = &l4_ck, | 1677 | .parent = &l4_ck, |
| 1674 | .clkdm_name = "core_l4_clkdm", | 1678 | .clkdm_name = "core_l4_clkdm", |
| 1675 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), | 1679 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| @@ -1679,7 +1683,7 @@ static struct clk sha_ick = { | |||
| 1679 | 1683 | ||
| 1680 | static struct clk rng_ick = { | 1684 | static struct clk rng_ick = { |
| 1681 | .name = "rng_ick", | 1685 | .name = "rng_ick", |
| 1682 | .ops = &clkops_omap2_dflt_wait, | 1686 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1683 | .parent = &l4_ck, | 1687 | .parent = &l4_ck, |
| 1684 | .clkdm_name = "core_l4_clkdm", | 1688 | .clkdm_name = "core_l4_clkdm", |
| 1685 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), | 1689 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| @@ -1689,7 +1693,7 @@ static struct clk rng_ick = { | |||
| 1689 | 1693 | ||
| 1690 | static struct clk aes_ick = { | 1694 | static struct clk aes_ick = { |
| 1691 | .name = "aes_ick", | 1695 | .name = "aes_ick", |
| 1692 | .ops = &clkops_omap2_dflt_wait, | 1696 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1693 | .parent = &l4_ck, | 1697 | .parent = &l4_ck, |
| 1694 | .clkdm_name = "core_l4_clkdm", | 1698 | .clkdm_name = "core_l4_clkdm", |
| 1695 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), | 1699 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| @@ -1699,7 +1703,7 @@ static struct clk aes_ick = { | |||
| 1699 | 1703 | ||
| 1700 | static struct clk pka_ick = { | 1704 | static struct clk pka_ick = { |
| 1701 | .name = "pka_ick", | 1705 | .name = "pka_ick", |
| 1702 | .ops = &clkops_omap2_dflt_wait, | 1706 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1703 | .parent = &l4_ck, | 1707 | .parent = &l4_ck, |
| 1704 | .clkdm_name = "core_l4_clkdm", | 1708 | .clkdm_name = "core_l4_clkdm", |
| 1705 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), | 1709 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4), |
| @@ -1719,7 +1723,7 @@ static struct clk usb_fck = { | |||
| 1719 | 1723 | ||
| 1720 | static struct clk usbhs_ick = { | 1724 | static struct clk usbhs_ick = { |
| 1721 | .name = "usbhs_ick", | 1725 | .name = "usbhs_ick", |
| 1722 | .ops = &clkops_omap2_dflt_wait, | 1726 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1723 | .parent = &core_l3_ck, | 1727 | .parent = &core_l3_ck, |
| 1724 | .clkdm_name = "core_l3_clkdm", | 1728 | .clkdm_name = "core_l3_clkdm", |
| 1725 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 1729 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -1729,7 +1733,7 @@ static struct clk usbhs_ick = { | |||
| 1729 | 1733 | ||
| 1730 | static struct clk mmchs1_ick = { | 1734 | static struct clk mmchs1_ick = { |
| 1731 | .name = "mmchs1_ick", | 1735 | .name = "mmchs1_ick", |
| 1732 | .ops = &clkops_omap2_dflt_wait, | 1736 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1733 | .parent = &l4_ck, | 1737 | .parent = &l4_ck, |
| 1734 | .clkdm_name = "core_l4_clkdm", | 1738 | .clkdm_name = "core_l4_clkdm", |
| 1735 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 1739 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -1741,7 +1745,7 @@ static struct clk mmchs1_fck = { | |||
| 1741 | .name = "mmchs1_fck", | 1745 | .name = "mmchs1_fck", |
| 1742 | .ops = &clkops_omap2_dflt_wait, | 1746 | .ops = &clkops_omap2_dflt_wait, |
| 1743 | .parent = &func_96m_ck, | 1747 | .parent = &func_96m_ck, |
| 1744 | .clkdm_name = "core_l3_clkdm", | 1748 | .clkdm_name = "core_l4_clkdm", |
| 1745 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), | 1749 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1746 | .enable_bit = OMAP2430_EN_MMCHS1_SHIFT, | 1750 | .enable_bit = OMAP2430_EN_MMCHS1_SHIFT, |
| 1747 | .recalc = &followparent_recalc, | 1751 | .recalc = &followparent_recalc, |
| @@ -1749,7 +1753,7 @@ static struct clk mmchs1_fck = { | |||
| 1749 | 1753 | ||
| 1750 | static struct clk mmchs2_ick = { | 1754 | static struct clk mmchs2_ick = { |
| 1751 | .name = "mmchs2_ick", | 1755 | .name = "mmchs2_ick", |
| 1752 | .ops = &clkops_omap2_dflt_wait, | 1756 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1753 | .parent = &l4_ck, | 1757 | .parent = &l4_ck, |
| 1754 | .clkdm_name = "core_l4_clkdm", | 1758 | .clkdm_name = "core_l4_clkdm", |
| 1755 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 1759 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -1761,6 +1765,7 @@ static struct clk mmchs2_fck = { | |||
| 1761 | .name = "mmchs2_fck", | 1765 | .name = "mmchs2_fck", |
| 1762 | .ops = &clkops_omap2_dflt_wait, | 1766 | .ops = &clkops_omap2_dflt_wait, |
| 1763 | .parent = &func_96m_ck, | 1767 | .parent = &func_96m_ck, |
| 1768 | .clkdm_name = "core_l4_clkdm", | ||
| 1764 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), | 1769 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
| 1765 | .enable_bit = OMAP2430_EN_MMCHS2_SHIFT, | 1770 | .enable_bit = OMAP2430_EN_MMCHS2_SHIFT, |
| 1766 | .recalc = &followparent_recalc, | 1771 | .recalc = &followparent_recalc, |
| @@ -1768,7 +1773,7 @@ static struct clk mmchs2_fck = { | |||
| 1768 | 1773 | ||
| 1769 | static struct clk gpio5_ick = { | 1774 | static struct clk gpio5_ick = { |
| 1770 | .name = "gpio5_ick", | 1775 | .name = "gpio5_ick", |
| 1771 | .ops = &clkops_omap2_dflt_wait, | 1776 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1772 | .parent = &l4_ck, | 1777 | .parent = &l4_ck, |
| 1773 | .clkdm_name = "core_l4_clkdm", | 1778 | .clkdm_name = "core_l4_clkdm", |
| 1774 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 1779 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -1788,7 +1793,7 @@ static struct clk gpio5_fck = { | |||
| 1788 | 1793 | ||
| 1789 | static struct clk mdm_intc_ick = { | 1794 | static struct clk mdm_intc_ick = { |
| 1790 | .name = "mdm_intc_ick", | 1795 | .name = "mdm_intc_ick", |
| 1791 | .ops = &clkops_omap2_dflt_wait, | 1796 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1792 | .parent = &l4_ck, | 1797 | .parent = &l4_ck, |
| 1793 | .clkdm_name = "core_l4_clkdm", | 1798 | .clkdm_name = "core_l4_clkdm", |
| 1794 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 1799 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| @@ -1880,7 +1885,6 @@ static struct omap_clk omap2430_clks[] = { | |||
| 1880 | CLK(NULL, "mpu_ck", &mpu_ck, CK_243X), | 1885 | CLK(NULL, "mpu_ck", &mpu_ck, CK_243X), |
| 1881 | /* dsp domain clocks */ | 1886 | /* dsp domain clocks */ |
| 1882 | CLK(NULL, "dsp_fck", &dsp_fck, CK_243X), | 1887 | CLK(NULL, "dsp_fck", &dsp_fck, CK_243X), |
| 1883 | CLK(NULL, "dsp_irate_ick", &dsp_irate_ick, CK_243X), | ||
| 1884 | CLK(NULL, "iva2_1_ick", &iva2_1_ick, CK_243X), | 1888 | CLK(NULL, "iva2_1_ick", &iva2_1_ick, CK_243X), |
| 1885 | /* GFX domain clocks */ | 1889 | /* GFX domain clocks */ |
| 1886 | CLK(NULL, "gfx_3d_fck", &gfx_3d_fck, CK_243X), | 1890 | CLK(NULL, "gfx_3d_fck", &gfx_3d_fck, CK_243X), |
| @@ -1901,6 +1905,7 @@ static struct omap_clk omap2430_clks[] = { | |||
| 1901 | /* L4 domain clocks */ | 1905 | /* L4 domain clocks */ |
| 1902 | CLK(NULL, "l4_ck", &l4_ck, CK_243X), | 1906 | CLK(NULL, "l4_ck", &l4_ck, CK_243X), |
| 1903 | CLK(NULL, "ssi_l4_ick", &ssi_l4_ick, CK_243X), | 1907 | CLK(NULL, "ssi_l4_ick", &ssi_l4_ick, CK_243X), |
| 1908 | CLK(NULL, "wu_l4_ick", &wu_l4_ick, CK_243X), | ||
| 1904 | /* virtual meta-group clock */ | 1909 | /* virtual meta-group clock */ |
| 1905 | CLK(NULL, "virt_prcm_set", &virt_prcm_set, CK_243X), | 1910 | CLK(NULL, "virt_prcm_set", &virt_prcm_set, CK_243X), |
| 1906 | /* general l4 interface ck, multi-parent functional clk */ | 1911 | /* general l4 interface ck, multi-parent functional clk */ |
| @@ -1984,15 +1989,15 @@ static struct omap_clk omap2430_clks[] = { | |||
| 1984 | CLK(NULL, "pka_ick", &pka_ick, CK_243X), | 1989 | CLK(NULL, "pka_ick", &pka_ick, CK_243X), |
| 1985 | CLK(NULL, "usb_fck", &usb_fck, CK_243X), | 1990 | CLK(NULL, "usb_fck", &usb_fck, CK_243X), |
| 1986 | CLK("musb-omap2430", "ick", &usbhs_ick, CK_243X), | 1991 | CLK("musb-omap2430", "ick", &usbhs_ick, CK_243X), |
| 1987 | CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_243X), | 1992 | CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_243X), |
| 1988 | CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_243X), | 1993 | CLK("omap_hsmmc.0", "fck", &mmchs1_fck, CK_243X), |
| 1989 | CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_243X), | 1994 | CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_243X), |
| 1990 | CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_243X), | 1995 | CLK("omap_hsmmc.1", "fck", &mmchs2_fck, CK_243X), |
| 1991 | CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X), | 1996 | CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X), |
| 1992 | CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X), | 1997 | CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X), |
| 1993 | CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X), | 1998 | CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X), |
| 1994 | CLK("mmci-omap-hs.0", "mmchsdb_fck", &mmchsdb1_fck, CK_243X), | 1999 | CLK("omap_hsmmc.0", "mmchsdb_fck", &mmchsdb1_fck, CK_243X), |
| 1995 | CLK("mmci-omap-hs.1", "mmchsdb_fck", &mmchsdb2_fck, CK_243X), | 2000 | CLK("omap_hsmmc.1", "mmchsdb_fck", &mmchsdb2_fck, CK_243X), |
| 1996 | }; | 2001 | }; |
| 1997 | 2002 | ||
| 1998 | /* | 2003 | /* |
| @@ -2028,6 +2033,9 @@ int __init omap2430_clk_init(void) | |||
| 2028 | omap2_init_clk_clkdm(c->lk.clk); | 2033 | omap2_init_clk_clkdm(c->lk.clk); |
| 2029 | } | 2034 | } |
| 2030 | 2035 | ||
| 2036 | /* Disable autoidle on all clocks; let the PM code enable it later */ | ||
| 2037 | omap_clk_disable_autoidle_all(); | ||
| 2038 | |||
| 2031 | /* Check the MPU rate set by bootloader */ | 2039 | /* Check the MPU rate set by bootloader */ |
| 2032 | clkrate = omap2xxx_clk_get_core_rate(&dpll_ck); | 2040 | clkrate = omap2xxx_clk_get_core_rate(&dpll_ck); |
| 2033 | for (prcm = rate_table; prcm->mpu_speed; prcm++) { | 2041 | for (prcm = rate_table; prcm->mpu_speed; prcm++) { |
diff --git a/arch/arm/mach-omap2/clock2xxx.h b/arch/arm/mach-omap2/clock2xxx.h index 6a658b890c17..cb6df8ca9e4a 100644 --- a/arch/arm/mach-omap2/clock2xxx.h +++ b/arch/arm/mach-omap2/clock2xxx.h | |||
| @@ -20,16 +20,16 @@ u32 omap2xxx_get_apll_clkin(void); | |||
| 20 | u32 omap2xxx_get_sysclkdiv(void); | 20 | u32 omap2xxx_get_sysclkdiv(void); |
| 21 | void omap2xxx_clk_prepare_for_reboot(void); | 21 | void omap2xxx_clk_prepare_for_reboot(void); |
| 22 | 22 | ||
| 23 | #ifdef CONFIG_ARCH_OMAP2420 | 23 | #ifdef CONFIG_SOC_OMAP2420 |
| 24 | int omap2420_clk_init(void); | 24 | int omap2420_clk_init(void); |
| 25 | #else | 25 | #else |
| 26 | #define omap2420_clk_init() 0 | 26 | #define omap2420_clk_init() do { } while(0) |
| 27 | #endif | 27 | #endif |
| 28 | 28 | ||
| 29 | #ifdef CONFIG_ARCH_OMAP2430 | 29 | #ifdef CONFIG_SOC_OMAP2430 |
| 30 | int omap2430_clk_init(void); | 30 | int omap2430_clk_init(void); |
| 31 | #else | 31 | #else |
| 32 | #define omap2430_clk_init() 0 | 32 | #define omap2430_clk_init() do { } while(0) |
| 33 | #endif | 33 | #endif |
| 34 | 34 | ||
| 35 | extern void __iomem *prcm_clksrc_ctrl, *cm_idlest_pll; | 35 | extern void __iomem *prcm_clksrc_ctrl, *cm_idlest_pll; |
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c index 287abc480924..1fc96b9ee330 100644 --- a/arch/arm/mach-omap2/clock34xx.c +++ b/arch/arm/mach-omap2/clock34xx.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * OMAP3-specific clock framework functions | 2 | * OMAP3-specific clock framework functions |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007-2008 Texas Instruments, Inc. | 4 | * Copyright (C) 2007-2008 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2007-2010 Nokia Corporation | 5 | * Copyright (C) 2007-2011 Nokia Corporation |
| 6 | * | 6 | * |
| 7 | * Paul Walmsley | 7 | * Paul Walmsley |
| 8 | * Jouni Högander | 8 | * Jouni Högander |
| @@ -59,6 +59,15 @@ const struct clkops clkops_omap3430es2_ssi_wait = { | |||
| 59 | .find_companion = omap2_clk_dflt_find_companion, | 59 | .find_companion = omap2_clk_dflt_find_companion, |
| 60 | }; | 60 | }; |
| 61 | 61 | ||
| 62 | const struct clkops clkops_omap3430es2_iclk_ssi_wait = { | ||
| 63 | .enable = omap2_dflt_clk_enable, | ||
| 64 | .disable = omap2_dflt_clk_disable, | ||
| 65 | .find_idlest = omap3430es2_clk_ssi_find_idlest, | ||
| 66 | .find_companion = omap2_clk_dflt_find_companion, | ||
| 67 | .allow_idle = omap2_clkt_iclk_allow_idle, | ||
| 68 | .deny_idle = omap2_clkt_iclk_deny_idle, | ||
| 69 | }; | ||
| 70 | |||
| 62 | /** | 71 | /** |
| 63 | * omap3430es2_clk_dss_usbhost_find_idlest - CM_IDLEST info for DSS, USBHOST | 72 | * omap3430es2_clk_dss_usbhost_find_idlest - CM_IDLEST info for DSS, USBHOST |
| 64 | * @clk: struct clk * being enabled | 73 | * @clk: struct clk * being enabled |
| @@ -94,6 +103,15 @@ const struct clkops clkops_omap3430es2_dss_usbhost_wait = { | |||
| 94 | .find_companion = omap2_clk_dflt_find_companion, | 103 | .find_companion = omap2_clk_dflt_find_companion, |
| 95 | }; | 104 | }; |
| 96 | 105 | ||
| 106 | const struct clkops clkops_omap3430es2_iclk_dss_usbhost_wait = { | ||
| 107 | .enable = omap2_dflt_clk_enable, | ||
| 108 | .disable = omap2_dflt_clk_disable, | ||
| 109 | .find_idlest = omap3430es2_clk_dss_usbhost_find_idlest, | ||
| 110 | .find_companion = omap2_clk_dflt_find_companion, | ||
| 111 | .allow_idle = omap2_clkt_iclk_allow_idle, | ||
| 112 | .deny_idle = omap2_clkt_iclk_deny_idle, | ||
| 113 | }; | ||
| 114 | |||
| 97 | /** | 115 | /** |
| 98 | * omap3430es2_clk_hsotgusb_find_idlest - return CM_IDLEST info for HSOTGUSB | 116 | * omap3430es2_clk_hsotgusb_find_idlest - return CM_IDLEST info for HSOTGUSB |
| 99 | * @clk: struct clk * being enabled | 117 | * @clk: struct clk * being enabled |
| @@ -124,3 +142,12 @@ const struct clkops clkops_omap3430es2_hsotgusb_wait = { | |||
| 124 | .find_idlest = omap3430es2_clk_hsotgusb_find_idlest, | 142 | .find_idlest = omap3430es2_clk_hsotgusb_find_idlest, |
| 125 | .find_companion = omap2_clk_dflt_find_companion, | 143 | .find_companion = omap2_clk_dflt_find_companion, |
| 126 | }; | 144 | }; |
| 145 | |||
| 146 | const struct clkops clkops_omap3430es2_iclk_hsotgusb_wait = { | ||
| 147 | .enable = omap2_dflt_clk_enable, | ||
| 148 | .disable = omap2_dflt_clk_disable, | ||
| 149 | .find_idlest = omap3430es2_clk_hsotgusb_find_idlest, | ||
| 150 | .find_companion = omap2_clk_dflt_find_companion, | ||
| 151 | .allow_idle = omap2_clkt_iclk_allow_idle, | ||
| 152 | .deny_idle = omap2_clkt_iclk_deny_idle, | ||
| 153 | }; | ||
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h index 628e8de57680..084ba71b2b31 100644 --- a/arch/arm/mach-omap2/clock34xx.h +++ b/arch/arm/mach-omap2/clock34xx.h | |||
| @@ -2,14 +2,17 @@ | |||
| 2 | * OMAP34xx clock function prototypes and macros | 2 | * OMAP34xx clock function prototypes and macros |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007-2010 Texas Instruments, Inc. | 4 | * Copyright (C) 2007-2010 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2007-2010 Nokia Corporation | 5 | * Copyright (C) 2007-2011 Nokia Corporation |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H | 8 | #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H |
| 9 | #define __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H | 9 | #define __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H |
| 10 | 10 | ||
| 11 | extern const struct clkops clkops_omap3430es2_ssi_wait; | 11 | extern const struct clkops clkops_omap3430es2_ssi_wait; |
| 12 | extern const struct clkops clkops_omap3430es2_iclk_ssi_wait; | ||
| 12 | extern const struct clkops clkops_omap3430es2_hsotgusb_wait; | 13 | extern const struct clkops clkops_omap3430es2_hsotgusb_wait; |
| 14 | extern const struct clkops clkops_omap3430es2_iclk_hsotgusb_wait; | ||
| 13 | extern const struct clkops clkops_omap3430es2_dss_usbhost_wait; | 15 | extern const struct clkops clkops_omap3430es2_dss_usbhost_wait; |
| 16 | extern const struct clkops clkops_omap3430es2_iclk_dss_usbhost_wait; | ||
| 14 | 17 | ||
| 15 | #endif | 18 | #endif |
diff --git a/arch/arm/mach-omap2/clock3517.c b/arch/arm/mach-omap2/clock3517.c index 74116a3cf099..2e97d08f0e56 100644 --- a/arch/arm/mach-omap2/clock3517.c +++ b/arch/arm/mach-omap2/clock3517.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * OMAP3517/3505-specific clock framework functions | 2 | * OMAP3517/3505-specific clock framework functions |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2010 Texas Instruments, Inc. | 4 | * Copyright (C) 2010 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2010 Nokia Corporation | 5 | * Copyright (C) 2011 Nokia Corporation |
| 6 | * | 6 | * |
| 7 | * Ranjith Lohithakshan | 7 | * Ranjith Lohithakshan |
| 8 | * Paul Walmsley | 8 | * Paul Walmsley |
| @@ -119,6 +119,8 @@ const struct clkops clkops_am35xx_ipss_wait = { | |||
| 119 | .disable = omap2_dflt_clk_disable, | 119 | .disable = omap2_dflt_clk_disable, |
| 120 | .find_idlest = am35xx_clk_ipss_find_idlest, | 120 | .find_idlest = am35xx_clk_ipss_find_idlest, |
| 121 | .find_companion = omap2_clk_dflt_find_companion, | 121 | .find_companion = omap2_clk_dflt_find_companion, |
| 122 | .allow_idle = omap2_clkt_iclk_allow_idle, | ||
| 123 | .deny_idle = omap2_clkt_iclk_deny_idle, | ||
| 122 | }; | 124 | }; |
| 123 | 125 | ||
| 124 | 126 | ||
diff --git a/arch/arm/mach-omap2/clock3xxx.c b/arch/arm/mach-omap2/clock3xxx.c index e9f66b6dec18..952c3e01c9eb 100644 --- a/arch/arm/mach-omap2/clock3xxx.c +++ b/arch/arm/mach-omap2/clock3xxx.c | |||
| @@ -65,9 +65,6 @@ void __init omap3_clk_lock_dpll5(void) | |||
| 65 | clk_set_rate(dpll5_clk, DPLL5_FREQ_FOR_USBHOST); | 65 | clk_set_rate(dpll5_clk, DPLL5_FREQ_FOR_USBHOST); |
| 66 | clk_enable(dpll5_clk); | 66 | clk_enable(dpll5_clk); |
| 67 | 67 | ||
| 68 | /* Enable autoidle to allow it to enter low power bypass */ | ||
| 69 | omap3_dpll_allow_idle(dpll5_clk); | ||
| 70 | |||
| 71 | /* Program dpll5_m2_clk divider for no division */ | 68 | /* Program dpll5_m2_clk divider for no division */ |
| 72 | dpll5_m2_clk = clk_get(NULL, "dpll5_m2_ck"); | 69 | dpll5_m2_clk = clk_get(NULL, "dpll5_m2_ck"); |
| 73 | clk_enable(dpll5_m2_clk); | 70 | clk_enable(dpll5_m2_clk); |
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 403a4a1d3f9c..d905ecc7989a 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * OMAP3 clock data | 2 | * OMAP3 clock data |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007-2010 Texas Instruments, Inc. | 4 | * Copyright (C) 2007-2010 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2007-2010 Nokia Corporation | 5 | * Copyright (C) 2007-2011 Nokia Corporation |
| 6 | * | 6 | * |
| 7 | * Written by Paul Walmsley | 7 | * Written by Paul Walmsley |
| 8 | * With many device clock fixes by Kevin Hilman and Jouni Högander | 8 | * With many device clock fixes by Kevin Hilman and Jouni Högander |
| @@ -291,12 +291,11 @@ static struct dpll_data dpll1_dd = { | |||
| 291 | .max_multiplier = OMAP3_MAX_DPLL_MULT, | 291 | .max_multiplier = OMAP3_MAX_DPLL_MULT, |
| 292 | .min_divider = 1, | 292 | .min_divider = 1, |
| 293 | .max_divider = OMAP3_MAX_DPLL_DIV, | 293 | .max_divider = OMAP3_MAX_DPLL_DIV, |
| 294 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE | ||
| 295 | }; | 294 | }; |
| 296 | 295 | ||
| 297 | static struct clk dpll1_ck = { | 296 | static struct clk dpll1_ck = { |
| 298 | .name = "dpll1_ck", | 297 | .name = "dpll1_ck", |
| 299 | .ops = &clkops_null, | 298 | .ops = &clkops_omap3_noncore_dpll_ops, |
| 300 | .parent = &sys_ck, | 299 | .parent = &sys_ck, |
| 301 | .dpll_data = &dpll1_dd, | 300 | .dpll_data = &dpll1_dd, |
| 302 | .round_rate = &omap2_dpll_round_rate, | 301 | .round_rate = &omap2_dpll_round_rate, |
| @@ -364,7 +363,6 @@ static struct dpll_data dpll2_dd = { | |||
| 364 | .max_multiplier = OMAP3_MAX_DPLL_MULT, | 363 | .max_multiplier = OMAP3_MAX_DPLL_MULT, |
| 365 | .min_divider = 1, | 364 | .min_divider = 1, |
| 366 | .max_divider = OMAP3_MAX_DPLL_DIV, | 365 | .max_divider = OMAP3_MAX_DPLL_DIV, |
| 367 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE | ||
| 368 | }; | 366 | }; |
| 369 | 367 | ||
| 370 | static struct clk dpll2_ck = { | 368 | static struct clk dpll2_ck = { |
| @@ -424,12 +422,11 @@ static struct dpll_data dpll3_dd = { | |||
| 424 | .max_multiplier = OMAP3_MAX_DPLL_MULT, | 422 | .max_multiplier = OMAP3_MAX_DPLL_MULT, |
| 425 | .min_divider = 1, | 423 | .min_divider = 1, |
| 426 | .max_divider = OMAP3_MAX_DPLL_DIV, | 424 | .max_divider = OMAP3_MAX_DPLL_DIV, |
| 427 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE | ||
| 428 | }; | 425 | }; |
| 429 | 426 | ||
| 430 | static struct clk dpll3_ck = { | 427 | static struct clk dpll3_ck = { |
| 431 | .name = "dpll3_ck", | 428 | .name = "dpll3_ck", |
| 432 | .ops = &clkops_null, | 429 | .ops = &clkops_omap3_core_dpll_ops, |
| 433 | .parent = &sys_ck, | 430 | .parent = &sys_ck, |
| 434 | .dpll_data = &dpll3_dd, | 431 | .dpll_data = &dpll3_dd, |
| 435 | .round_rate = &omap2_dpll_round_rate, | 432 | .round_rate = &omap2_dpll_round_rate, |
| @@ -583,7 +580,6 @@ static struct dpll_data dpll4_dd_34xx __initdata = { | |||
| 583 | .max_multiplier = OMAP3_MAX_DPLL_MULT, | 580 | .max_multiplier = OMAP3_MAX_DPLL_MULT, |
| 584 | .min_divider = 1, | 581 | .min_divider = 1, |
| 585 | .max_divider = OMAP3_MAX_DPLL_DIV, | 582 | .max_divider = OMAP3_MAX_DPLL_DIV, |
| 586 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE | ||
| 587 | }; | 583 | }; |
| 588 | 584 | ||
| 589 | static struct dpll_data dpll4_dd_3630 __initdata = { | 585 | static struct dpll_data dpll4_dd_3630 __initdata = { |
| @@ -607,7 +603,6 @@ static struct dpll_data dpll4_dd_3630 __initdata = { | |||
| 607 | .max_multiplier = OMAP3630_MAX_JTYPE_DPLL_MULT, | 603 | .max_multiplier = OMAP3630_MAX_JTYPE_DPLL_MULT, |
| 608 | .min_divider = 1, | 604 | .min_divider = 1, |
| 609 | .max_divider = OMAP3_MAX_DPLL_DIV, | 605 | .max_divider = OMAP3_MAX_DPLL_DIV, |
| 610 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE, | ||
| 611 | .flags = DPLL_J_TYPE | 606 | .flags = DPLL_J_TYPE |
| 612 | }; | 607 | }; |
| 613 | 608 | ||
| @@ -939,7 +934,6 @@ static struct dpll_data dpll5_dd = { | |||
| 939 | .max_multiplier = OMAP3_MAX_DPLL_MULT, | 934 | .max_multiplier = OMAP3_MAX_DPLL_MULT, |
| 940 | .min_divider = 1, | 935 | .min_divider = 1, |
| 941 | .max_divider = OMAP3_MAX_DPLL_DIV, | 936 | .max_divider = OMAP3_MAX_DPLL_DIV, |
| 942 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE | ||
| 943 | }; | 937 | }; |
| 944 | 938 | ||
| 945 | static struct clk dpll5_ck = { | 939 | static struct clk dpll5_ck = { |
| @@ -1205,7 +1199,10 @@ static const struct clksel gfx_l3_clksel[] = { | |||
| 1205 | { .parent = NULL } | 1199 | { .parent = NULL } |
| 1206 | }; | 1200 | }; |
| 1207 | 1201 | ||
| 1208 | /* Virtual parent clock for gfx_l3_ick and gfx_l3_fck */ | 1202 | /* |
| 1203 | * Virtual parent clock for gfx_l3_ick and gfx_l3_fck | ||
| 1204 | * This interface clock does not have a CM_AUTOIDLE bit | ||
| 1205 | */ | ||
| 1209 | static struct clk gfx_l3_ck = { | 1206 | static struct clk gfx_l3_ck = { |
| 1210 | .name = "gfx_l3_ck", | 1207 | .name = "gfx_l3_ck", |
| 1211 | .ops = &clkops_omap2_dflt_wait, | 1208 | .ops = &clkops_omap2_dflt_wait, |
| @@ -1304,6 +1301,7 @@ static struct clk sgx_fck = { | |||
| 1304 | .round_rate = &omap2_clksel_round_rate | 1301 | .round_rate = &omap2_clksel_round_rate |
| 1305 | }; | 1302 | }; |
| 1306 | 1303 | ||
| 1304 | /* This interface clock does not have a CM_AUTOIDLE bit */ | ||
| 1307 | static struct clk sgx_ick = { | 1305 | static struct clk sgx_ick = { |
| 1308 | .name = "sgx_ick", | 1306 | .name = "sgx_ick", |
| 1309 | .ops = &clkops_omap2_dflt_wait, | 1307 | .ops = &clkops_omap2_dflt_wait, |
| @@ -1328,7 +1326,7 @@ static struct clk d2d_26m_fck = { | |||
| 1328 | 1326 | ||
| 1329 | static struct clk modem_fck = { | 1327 | static struct clk modem_fck = { |
| 1330 | .name = "modem_fck", | 1328 | .name = "modem_fck", |
| 1331 | .ops = &clkops_omap2_dflt_wait, | 1329 | .ops = &clkops_omap2_mdmclk_dflt_wait, |
| 1332 | .parent = &sys_ck, | 1330 | .parent = &sys_ck, |
| 1333 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1331 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
| 1334 | .enable_bit = OMAP3430_EN_MODEM_SHIFT, | 1332 | .enable_bit = OMAP3430_EN_MODEM_SHIFT, |
| @@ -1338,7 +1336,7 @@ static struct clk modem_fck = { | |||
| 1338 | 1336 | ||
| 1339 | static struct clk sad2d_ick = { | 1337 | static struct clk sad2d_ick = { |
| 1340 | .name = "sad2d_ick", | 1338 | .name = "sad2d_ick", |
| 1341 | .ops = &clkops_omap2_dflt_wait, | 1339 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1342 | .parent = &l3_ick, | 1340 | .parent = &l3_ick, |
| 1343 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1341 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1344 | .enable_bit = OMAP3430_EN_SAD2D_SHIFT, | 1342 | .enable_bit = OMAP3430_EN_SAD2D_SHIFT, |
| @@ -1348,7 +1346,7 @@ static struct clk sad2d_ick = { | |||
| 1348 | 1346 | ||
| 1349 | static struct clk mad2d_ick = { | 1347 | static struct clk mad2d_ick = { |
| 1350 | .name = "mad2d_ick", | 1348 | .name = "mad2d_ick", |
| 1351 | .ops = &clkops_omap2_dflt_wait, | 1349 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1352 | .parent = &l3_ick, | 1350 | .parent = &l3_ick, |
| 1353 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3), | 1351 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3), |
| 1354 | .enable_bit = OMAP3430_EN_MAD2D_SHIFT, | 1352 | .enable_bit = OMAP3430_EN_MAD2D_SHIFT, |
| @@ -1718,7 +1716,7 @@ static struct clk core_l3_ick = { | |||
| 1718 | 1716 | ||
| 1719 | static struct clk hsotgusb_ick_3430es1 = { | 1717 | static struct clk hsotgusb_ick_3430es1 = { |
| 1720 | .name = "hsotgusb_ick", | 1718 | .name = "hsotgusb_ick", |
| 1721 | .ops = &clkops_omap2_dflt, | 1719 | .ops = &clkops_omap2_iclk_dflt, |
| 1722 | .parent = &core_l3_ick, | 1720 | .parent = &core_l3_ick, |
| 1723 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1721 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1724 | .enable_bit = OMAP3430_EN_HSOTGUSB_SHIFT, | 1722 | .enable_bit = OMAP3430_EN_HSOTGUSB_SHIFT, |
| @@ -1728,7 +1726,7 @@ static struct clk hsotgusb_ick_3430es1 = { | |||
| 1728 | 1726 | ||
| 1729 | static struct clk hsotgusb_ick_3430es2 = { | 1727 | static struct clk hsotgusb_ick_3430es2 = { |
| 1730 | .name = "hsotgusb_ick", | 1728 | .name = "hsotgusb_ick", |
| 1731 | .ops = &clkops_omap3430es2_hsotgusb_wait, | 1729 | .ops = &clkops_omap3430es2_iclk_hsotgusb_wait, |
| 1732 | .parent = &core_l3_ick, | 1730 | .parent = &core_l3_ick, |
| 1733 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1731 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1734 | .enable_bit = OMAP3430_EN_HSOTGUSB_SHIFT, | 1732 | .enable_bit = OMAP3430_EN_HSOTGUSB_SHIFT, |
| @@ -1736,6 +1734,7 @@ static struct clk hsotgusb_ick_3430es2 = { | |||
| 1736 | .recalc = &followparent_recalc, | 1734 | .recalc = &followparent_recalc, |
| 1737 | }; | 1735 | }; |
| 1738 | 1736 | ||
| 1737 | /* This interface clock does not have a CM_AUTOIDLE bit */ | ||
| 1739 | static struct clk sdrc_ick = { | 1738 | static struct clk sdrc_ick = { |
| 1740 | .name = "sdrc_ick", | 1739 | .name = "sdrc_ick", |
| 1741 | .ops = &clkops_omap2_dflt_wait, | 1740 | .ops = &clkops_omap2_dflt_wait, |
| @@ -1767,7 +1766,7 @@ static struct clk security_l3_ick = { | |||
| 1767 | 1766 | ||
| 1768 | static struct clk pka_ick = { | 1767 | static struct clk pka_ick = { |
| 1769 | .name = "pka_ick", | 1768 | .name = "pka_ick", |
| 1770 | .ops = &clkops_omap2_dflt_wait, | 1769 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1771 | .parent = &security_l3_ick, | 1770 | .parent = &security_l3_ick, |
| 1772 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 1771 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 1773 | .enable_bit = OMAP3430_EN_PKA_SHIFT, | 1772 | .enable_bit = OMAP3430_EN_PKA_SHIFT, |
| @@ -1786,7 +1785,7 @@ static struct clk core_l4_ick = { | |||
| 1786 | 1785 | ||
| 1787 | static struct clk usbtll_ick = { | 1786 | static struct clk usbtll_ick = { |
| 1788 | .name = "usbtll_ick", | 1787 | .name = "usbtll_ick", |
| 1789 | .ops = &clkops_omap2_dflt_wait, | 1788 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1790 | .parent = &core_l4_ick, | 1789 | .parent = &core_l4_ick, |
| 1791 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3), | 1790 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3), |
| 1792 | .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT, | 1791 | .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT, |
| @@ -1796,7 +1795,7 @@ static struct clk usbtll_ick = { | |||
| 1796 | 1795 | ||
| 1797 | static struct clk mmchs3_ick = { | 1796 | static struct clk mmchs3_ick = { |
| 1798 | .name = "mmchs3_ick", | 1797 | .name = "mmchs3_ick", |
| 1799 | .ops = &clkops_omap2_dflt_wait, | 1798 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1800 | .parent = &core_l4_ick, | 1799 | .parent = &core_l4_ick, |
| 1801 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1800 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1802 | .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT, | 1801 | .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT, |
| @@ -1807,7 +1806,7 @@ static struct clk mmchs3_ick = { | |||
| 1807 | /* Intersystem Communication Registers - chassis mode only */ | 1806 | /* Intersystem Communication Registers - chassis mode only */ |
| 1808 | static struct clk icr_ick = { | 1807 | static struct clk icr_ick = { |
| 1809 | .name = "icr_ick", | 1808 | .name = "icr_ick", |
| 1810 | .ops = &clkops_omap2_dflt_wait, | 1809 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1811 | .parent = &core_l4_ick, | 1810 | .parent = &core_l4_ick, |
| 1812 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1811 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1813 | .enable_bit = OMAP3430_EN_ICR_SHIFT, | 1812 | .enable_bit = OMAP3430_EN_ICR_SHIFT, |
| @@ -1817,7 +1816,7 @@ static struct clk icr_ick = { | |||
| 1817 | 1816 | ||
| 1818 | static struct clk aes2_ick = { | 1817 | static struct clk aes2_ick = { |
| 1819 | .name = "aes2_ick", | 1818 | .name = "aes2_ick", |
| 1820 | .ops = &clkops_omap2_dflt_wait, | 1819 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1821 | .parent = &core_l4_ick, | 1820 | .parent = &core_l4_ick, |
| 1822 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1821 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1823 | .enable_bit = OMAP3430_EN_AES2_SHIFT, | 1822 | .enable_bit = OMAP3430_EN_AES2_SHIFT, |
| @@ -1827,7 +1826,7 @@ static struct clk aes2_ick = { | |||
| 1827 | 1826 | ||
| 1828 | static struct clk sha12_ick = { | 1827 | static struct clk sha12_ick = { |
| 1829 | .name = "sha12_ick", | 1828 | .name = "sha12_ick", |
| 1830 | .ops = &clkops_omap2_dflt_wait, | 1829 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1831 | .parent = &core_l4_ick, | 1830 | .parent = &core_l4_ick, |
| 1832 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1831 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1833 | .enable_bit = OMAP3430_EN_SHA12_SHIFT, | 1832 | .enable_bit = OMAP3430_EN_SHA12_SHIFT, |
| @@ -1837,7 +1836,7 @@ static struct clk sha12_ick = { | |||
| 1837 | 1836 | ||
| 1838 | static struct clk des2_ick = { | 1837 | static struct clk des2_ick = { |
| 1839 | .name = "des2_ick", | 1838 | .name = "des2_ick", |
| 1840 | .ops = &clkops_omap2_dflt_wait, | 1839 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1841 | .parent = &core_l4_ick, | 1840 | .parent = &core_l4_ick, |
| 1842 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1841 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1843 | .enable_bit = OMAP3430_EN_DES2_SHIFT, | 1842 | .enable_bit = OMAP3430_EN_DES2_SHIFT, |
| @@ -1847,7 +1846,7 @@ static struct clk des2_ick = { | |||
| 1847 | 1846 | ||
| 1848 | static struct clk mmchs2_ick = { | 1847 | static struct clk mmchs2_ick = { |
| 1849 | .name = "mmchs2_ick", | 1848 | .name = "mmchs2_ick", |
| 1850 | .ops = &clkops_omap2_dflt_wait, | 1849 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1851 | .parent = &core_l4_ick, | 1850 | .parent = &core_l4_ick, |
| 1852 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1851 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1853 | .enable_bit = OMAP3430_EN_MMC2_SHIFT, | 1852 | .enable_bit = OMAP3430_EN_MMC2_SHIFT, |
| @@ -1857,7 +1856,7 @@ static struct clk mmchs2_ick = { | |||
| 1857 | 1856 | ||
| 1858 | static struct clk mmchs1_ick = { | 1857 | static struct clk mmchs1_ick = { |
| 1859 | .name = "mmchs1_ick", | 1858 | .name = "mmchs1_ick", |
| 1860 | .ops = &clkops_omap2_dflt_wait, | 1859 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1861 | .parent = &core_l4_ick, | 1860 | .parent = &core_l4_ick, |
| 1862 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1861 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1863 | .enable_bit = OMAP3430_EN_MMC1_SHIFT, | 1862 | .enable_bit = OMAP3430_EN_MMC1_SHIFT, |
| @@ -1867,7 +1866,7 @@ static struct clk mmchs1_ick = { | |||
| 1867 | 1866 | ||
| 1868 | static struct clk mspro_ick = { | 1867 | static struct clk mspro_ick = { |
| 1869 | .name = "mspro_ick", | 1868 | .name = "mspro_ick", |
| 1870 | .ops = &clkops_omap2_dflt_wait, | 1869 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1871 | .parent = &core_l4_ick, | 1870 | .parent = &core_l4_ick, |
| 1872 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1871 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1873 | .enable_bit = OMAP3430_EN_MSPRO_SHIFT, | 1872 | .enable_bit = OMAP3430_EN_MSPRO_SHIFT, |
| @@ -1877,7 +1876,7 @@ static struct clk mspro_ick = { | |||
| 1877 | 1876 | ||
| 1878 | static struct clk hdq_ick = { | 1877 | static struct clk hdq_ick = { |
| 1879 | .name = "hdq_ick", | 1878 | .name = "hdq_ick", |
| 1880 | .ops = &clkops_omap2_dflt_wait, | 1879 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1881 | .parent = &core_l4_ick, | 1880 | .parent = &core_l4_ick, |
| 1882 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1881 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1883 | .enable_bit = OMAP3430_EN_HDQ_SHIFT, | 1882 | .enable_bit = OMAP3430_EN_HDQ_SHIFT, |
| @@ -1887,7 +1886,7 @@ static struct clk hdq_ick = { | |||
| 1887 | 1886 | ||
| 1888 | static struct clk mcspi4_ick = { | 1887 | static struct clk mcspi4_ick = { |
| 1889 | .name = "mcspi4_ick", | 1888 | .name = "mcspi4_ick", |
| 1890 | .ops = &clkops_omap2_dflt_wait, | 1889 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1891 | .parent = &core_l4_ick, | 1890 | .parent = &core_l4_ick, |
| 1892 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1891 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1893 | .enable_bit = OMAP3430_EN_MCSPI4_SHIFT, | 1892 | .enable_bit = OMAP3430_EN_MCSPI4_SHIFT, |
| @@ -1897,7 +1896,7 @@ static struct clk mcspi4_ick = { | |||
| 1897 | 1896 | ||
| 1898 | static struct clk mcspi3_ick = { | 1897 | static struct clk mcspi3_ick = { |
| 1899 | .name = "mcspi3_ick", | 1898 | .name = "mcspi3_ick", |
| 1900 | .ops = &clkops_omap2_dflt_wait, | 1899 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1901 | .parent = &core_l4_ick, | 1900 | .parent = &core_l4_ick, |
| 1902 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1901 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1903 | .enable_bit = OMAP3430_EN_MCSPI3_SHIFT, | 1902 | .enable_bit = OMAP3430_EN_MCSPI3_SHIFT, |
| @@ -1907,7 +1906,7 @@ static struct clk mcspi3_ick = { | |||
| 1907 | 1906 | ||
| 1908 | static struct clk mcspi2_ick = { | 1907 | static struct clk mcspi2_ick = { |
| 1909 | .name = "mcspi2_ick", | 1908 | .name = "mcspi2_ick", |
| 1910 | .ops = &clkops_omap2_dflt_wait, | 1909 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1911 | .parent = &core_l4_ick, | 1910 | .parent = &core_l4_ick, |
| 1912 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1911 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1913 | .enable_bit = OMAP3430_EN_MCSPI2_SHIFT, | 1912 | .enable_bit = OMAP3430_EN_MCSPI2_SHIFT, |
| @@ -1917,7 +1916,7 @@ static struct clk mcspi2_ick = { | |||
| 1917 | 1916 | ||
| 1918 | static struct clk mcspi1_ick = { | 1917 | static struct clk mcspi1_ick = { |
| 1919 | .name = "mcspi1_ick", | 1918 | .name = "mcspi1_ick", |
| 1920 | .ops = &clkops_omap2_dflt_wait, | 1919 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1921 | .parent = &core_l4_ick, | 1920 | .parent = &core_l4_ick, |
| 1922 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1921 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1923 | .enable_bit = OMAP3430_EN_MCSPI1_SHIFT, | 1922 | .enable_bit = OMAP3430_EN_MCSPI1_SHIFT, |
| @@ -1927,7 +1926,7 @@ static struct clk mcspi1_ick = { | |||
| 1927 | 1926 | ||
| 1928 | static struct clk i2c3_ick = { | 1927 | static struct clk i2c3_ick = { |
| 1929 | .name = "i2c3_ick", | 1928 | .name = "i2c3_ick", |
| 1930 | .ops = &clkops_omap2_dflt_wait, | 1929 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1931 | .parent = &core_l4_ick, | 1930 | .parent = &core_l4_ick, |
| 1932 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1931 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1933 | .enable_bit = OMAP3430_EN_I2C3_SHIFT, | 1932 | .enable_bit = OMAP3430_EN_I2C3_SHIFT, |
| @@ -1937,7 +1936,7 @@ static struct clk i2c3_ick = { | |||
| 1937 | 1936 | ||
| 1938 | static struct clk i2c2_ick = { | 1937 | static struct clk i2c2_ick = { |
| 1939 | .name = "i2c2_ick", | 1938 | .name = "i2c2_ick", |
| 1940 | .ops = &clkops_omap2_dflt_wait, | 1939 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1941 | .parent = &core_l4_ick, | 1940 | .parent = &core_l4_ick, |
| 1942 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1941 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1943 | .enable_bit = OMAP3430_EN_I2C2_SHIFT, | 1942 | .enable_bit = OMAP3430_EN_I2C2_SHIFT, |
| @@ -1947,7 +1946,7 @@ static struct clk i2c2_ick = { | |||
| 1947 | 1946 | ||
| 1948 | static struct clk i2c1_ick = { | 1947 | static struct clk i2c1_ick = { |
| 1949 | .name = "i2c1_ick", | 1948 | .name = "i2c1_ick", |
| 1950 | .ops = &clkops_omap2_dflt_wait, | 1949 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1951 | .parent = &core_l4_ick, | 1950 | .parent = &core_l4_ick, |
| 1952 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1951 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1953 | .enable_bit = OMAP3430_EN_I2C1_SHIFT, | 1952 | .enable_bit = OMAP3430_EN_I2C1_SHIFT, |
| @@ -1957,7 +1956,7 @@ static struct clk i2c1_ick = { | |||
| 1957 | 1956 | ||
| 1958 | static struct clk uart2_ick = { | 1957 | static struct clk uart2_ick = { |
| 1959 | .name = "uart2_ick", | 1958 | .name = "uart2_ick", |
| 1960 | .ops = &clkops_omap2_dflt_wait, | 1959 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1961 | .parent = &core_l4_ick, | 1960 | .parent = &core_l4_ick, |
| 1962 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1961 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1963 | .enable_bit = OMAP3430_EN_UART2_SHIFT, | 1962 | .enable_bit = OMAP3430_EN_UART2_SHIFT, |
| @@ -1967,7 +1966,7 @@ static struct clk uart2_ick = { | |||
| 1967 | 1966 | ||
| 1968 | static struct clk uart1_ick = { | 1967 | static struct clk uart1_ick = { |
| 1969 | .name = "uart1_ick", | 1968 | .name = "uart1_ick", |
| 1970 | .ops = &clkops_omap2_dflt_wait, | 1969 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1971 | .parent = &core_l4_ick, | 1970 | .parent = &core_l4_ick, |
| 1972 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1971 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1973 | .enable_bit = OMAP3430_EN_UART1_SHIFT, | 1972 | .enable_bit = OMAP3430_EN_UART1_SHIFT, |
| @@ -1977,7 +1976,7 @@ static struct clk uart1_ick = { | |||
| 1977 | 1976 | ||
| 1978 | static struct clk gpt11_ick = { | 1977 | static struct clk gpt11_ick = { |
| 1979 | .name = "gpt11_ick", | 1978 | .name = "gpt11_ick", |
| 1980 | .ops = &clkops_omap2_dflt_wait, | 1979 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1981 | .parent = &core_l4_ick, | 1980 | .parent = &core_l4_ick, |
| 1982 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1981 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1983 | .enable_bit = OMAP3430_EN_GPT11_SHIFT, | 1982 | .enable_bit = OMAP3430_EN_GPT11_SHIFT, |
| @@ -1987,7 +1986,7 @@ static struct clk gpt11_ick = { | |||
| 1987 | 1986 | ||
| 1988 | static struct clk gpt10_ick = { | 1987 | static struct clk gpt10_ick = { |
| 1989 | .name = "gpt10_ick", | 1988 | .name = "gpt10_ick", |
| 1990 | .ops = &clkops_omap2_dflt_wait, | 1989 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 1991 | .parent = &core_l4_ick, | 1990 | .parent = &core_l4_ick, |
| 1992 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1991 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 1993 | .enable_bit = OMAP3430_EN_GPT10_SHIFT, | 1992 | .enable_bit = OMAP3430_EN_GPT10_SHIFT, |
| @@ -1997,7 +1996,7 @@ static struct clk gpt10_ick = { | |||
| 1997 | 1996 | ||
| 1998 | static struct clk mcbsp5_ick = { | 1997 | static struct clk mcbsp5_ick = { |
| 1999 | .name = "mcbsp5_ick", | 1998 | .name = "mcbsp5_ick", |
| 2000 | .ops = &clkops_omap2_dflt_wait, | 1999 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2001 | .parent = &core_l4_ick, | 2000 | .parent = &core_l4_ick, |
| 2002 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 2001 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2003 | .enable_bit = OMAP3430_EN_MCBSP5_SHIFT, | 2002 | .enable_bit = OMAP3430_EN_MCBSP5_SHIFT, |
| @@ -2007,7 +2006,7 @@ static struct clk mcbsp5_ick = { | |||
| 2007 | 2006 | ||
| 2008 | static struct clk mcbsp1_ick = { | 2007 | static struct clk mcbsp1_ick = { |
| 2009 | .name = "mcbsp1_ick", | 2008 | .name = "mcbsp1_ick", |
| 2010 | .ops = &clkops_omap2_dflt_wait, | 2009 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2011 | .parent = &core_l4_ick, | 2010 | .parent = &core_l4_ick, |
| 2012 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 2011 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2013 | .enable_bit = OMAP3430_EN_MCBSP1_SHIFT, | 2012 | .enable_bit = OMAP3430_EN_MCBSP1_SHIFT, |
| @@ -2017,7 +2016,7 @@ static struct clk mcbsp1_ick = { | |||
| 2017 | 2016 | ||
| 2018 | static struct clk fac_ick = { | 2017 | static struct clk fac_ick = { |
| 2019 | .name = "fac_ick", | 2018 | .name = "fac_ick", |
| 2020 | .ops = &clkops_omap2_dflt_wait, | 2019 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2021 | .parent = &core_l4_ick, | 2020 | .parent = &core_l4_ick, |
| 2022 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 2021 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2023 | .enable_bit = OMAP3430ES1_EN_FAC_SHIFT, | 2022 | .enable_bit = OMAP3430ES1_EN_FAC_SHIFT, |
| @@ -2027,7 +2026,7 @@ static struct clk fac_ick = { | |||
| 2027 | 2026 | ||
| 2028 | static struct clk mailboxes_ick = { | 2027 | static struct clk mailboxes_ick = { |
| 2029 | .name = "mailboxes_ick", | 2028 | .name = "mailboxes_ick", |
| 2030 | .ops = &clkops_omap2_dflt_wait, | 2029 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2031 | .parent = &core_l4_ick, | 2030 | .parent = &core_l4_ick, |
| 2032 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 2031 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2033 | .enable_bit = OMAP3430_EN_MAILBOXES_SHIFT, | 2032 | .enable_bit = OMAP3430_EN_MAILBOXES_SHIFT, |
| @@ -2037,7 +2036,7 @@ static struct clk mailboxes_ick = { | |||
| 2037 | 2036 | ||
| 2038 | static struct clk omapctrl_ick = { | 2037 | static struct clk omapctrl_ick = { |
| 2039 | .name = "omapctrl_ick", | 2038 | .name = "omapctrl_ick", |
| 2040 | .ops = &clkops_omap2_dflt_wait, | 2039 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2041 | .parent = &core_l4_ick, | 2040 | .parent = &core_l4_ick, |
| 2042 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 2041 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2043 | .enable_bit = OMAP3430_EN_OMAPCTRL_SHIFT, | 2042 | .enable_bit = OMAP3430_EN_OMAPCTRL_SHIFT, |
| @@ -2057,7 +2056,7 @@ static struct clk ssi_l4_ick = { | |||
| 2057 | 2056 | ||
| 2058 | static struct clk ssi_ick_3430es1 = { | 2057 | static struct clk ssi_ick_3430es1 = { |
| 2059 | .name = "ssi_ick", | 2058 | .name = "ssi_ick", |
| 2060 | .ops = &clkops_omap2_dflt, | 2059 | .ops = &clkops_omap2_iclk_dflt, |
| 2061 | .parent = &ssi_l4_ick, | 2060 | .parent = &ssi_l4_ick, |
| 2062 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 2061 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2063 | .enable_bit = OMAP3430_EN_SSI_SHIFT, | 2062 | .enable_bit = OMAP3430_EN_SSI_SHIFT, |
| @@ -2067,7 +2066,7 @@ static struct clk ssi_ick_3430es1 = { | |||
| 2067 | 2066 | ||
| 2068 | static struct clk ssi_ick_3430es2 = { | 2067 | static struct clk ssi_ick_3430es2 = { |
| 2069 | .name = "ssi_ick", | 2068 | .name = "ssi_ick", |
| 2070 | .ops = &clkops_omap3430es2_ssi_wait, | 2069 | .ops = &clkops_omap3430es2_iclk_ssi_wait, |
| 2071 | .parent = &ssi_l4_ick, | 2070 | .parent = &ssi_l4_ick, |
| 2072 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 2071 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 2073 | .enable_bit = OMAP3430_EN_SSI_SHIFT, | 2072 | .enable_bit = OMAP3430_EN_SSI_SHIFT, |
| @@ -2085,7 +2084,7 @@ static const struct clksel usb_l4_clksel[] = { | |||
| 2085 | 2084 | ||
| 2086 | static struct clk usb_l4_ick = { | 2085 | static struct clk usb_l4_ick = { |
| 2087 | .name = "usb_l4_ick", | 2086 | .name = "usb_l4_ick", |
| 2088 | .ops = &clkops_omap2_dflt_wait, | 2087 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2089 | .parent = &l4_ick, | 2088 | .parent = &l4_ick, |
| 2090 | .init = &omap2_init_clksel_parent, | 2089 | .init = &omap2_init_clksel_parent, |
| 2091 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 2090 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| @@ -2107,7 +2106,7 @@ static struct clk security_l4_ick2 = { | |||
| 2107 | 2106 | ||
| 2108 | static struct clk aes1_ick = { | 2107 | static struct clk aes1_ick = { |
| 2109 | .name = "aes1_ick", | 2108 | .name = "aes1_ick", |
| 2110 | .ops = &clkops_omap2_dflt_wait, | 2109 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2111 | .parent = &security_l4_ick2, | 2110 | .parent = &security_l4_ick2, |
| 2112 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 2111 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 2113 | .enable_bit = OMAP3430_EN_AES1_SHIFT, | 2112 | .enable_bit = OMAP3430_EN_AES1_SHIFT, |
| @@ -2116,7 +2115,7 @@ static struct clk aes1_ick = { | |||
| 2116 | 2115 | ||
| 2117 | static struct clk rng_ick = { | 2116 | static struct clk rng_ick = { |
| 2118 | .name = "rng_ick", | 2117 | .name = "rng_ick", |
| 2119 | .ops = &clkops_omap2_dflt_wait, | 2118 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2120 | .parent = &security_l4_ick2, | 2119 | .parent = &security_l4_ick2, |
| 2121 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 2120 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 2122 | .enable_bit = OMAP3430_EN_RNG_SHIFT, | 2121 | .enable_bit = OMAP3430_EN_RNG_SHIFT, |
| @@ -2125,7 +2124,7 @@ static struct clk rng_ick = { | |||
| 2125 | 2124 | ||
| 2126 | static struct clk sha11_ick = { | 2125 | static struct clk sha11_ick = { |
| 2127 | .name = "sha11_ick", | 2126 | .name = "sha11_ick", |
| 2128 | .ops = &clkops_omap2_dflt_wait, | 2127 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2129 | .parent = &security_l4_ick2, | 2128 | .parent = &security_l4_ick2, |
| 2130 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 2129 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 2131 | .enable_bit = OMAP3430_EN_SHA11_SHIFT, | 2130 | .enable_bit = OMAP3430_EN_SHA11_SHIFT, |
| @@ -2134,7 +2133,7 @@ static struct clk sha11_ick = { | |||
| 2134 | 2133 | ||
| 2135 | static struct clk des1_ick = { | 2134 | static struct clk des1_ick = { |
| 2136 | .name = "des1_ick", | 2135 | .name = "des1_ick", |
| 2137 | .ops = &clkops_omap2_dflt_wait, | 2136 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2138 | .parent = &security_l4_ick2, | 2137 | .parent = &security_l4_ick2, |
| 2139 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), | 2138 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2), |
| 2140 | .enable_bit = OMAP3430_EN_DES1_SHIFT, | 2139 | .enable_bit = OMAP3430_EN_DES1_SHIFT, |
| @@ -2195,7 +2194,7 @@ static struct clk dss2_alwon_fck = { | |||
| 2195 | static struct clk dss_ick_3430es1 = { | 2194 | static struct clk dss_ick_3430es1 = { |
| 2196 | /* Handles both L3 and L4 clocks */ | 2195 | /* Handles both L3 and L4 clocks */ |
| 2197 | .name = "dss_ick", | 2196 | .name = "dss_ick", |
| 2198 | .ops = &clkops_omap2_dflt, | 2197 | .ops = &clkops_omap2_iclk_dflt, |
| 2199 | .parent = &l4_ick, | 2198 | .parent = &l4_ick, |
| 2200 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN), | 2199 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN), |
| 2201 | .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT, | 2200 | .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT, |
| @@ -2206,7 +2205,7 @@ static struct clk dss_ick_3430es1 = { | |||
| 2206 | static struct clk dss_ick_3430es2 = { | 2205 | static struct clk dss_ick_3430es2 = { |
| 2207 | /* Handles both L3 and L4 clocks */ | 2206 | /* Handles both L3 and L4 clocks */ |
| 2208 | .name = "dss_ick", | 2207 | .name = "dss_ick", |
| 2209 | .ops = &clkops_omap3430es2_dss_usbhost_wait, | 2208 | .ops = &clkops_omap3430es2_iclk_dss_usbhost_wait, |
| 2210 | .parent = &l4_ick, | 2209 | .parent = &l4_ick, |
| 2211 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN), | 2210 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN), |
| 2212 | .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT, | 2211 | .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT, |
| @@ -2229,7 +2228,7 @@ static struct clk cam_mclk = { | |||
| 2229 | static struct clk cam_ick = { | 2228 | static struct clk cam_ick = { |
| 2230 | /* Handles both L3 and L4 clocks */ | 2229 | /* Handles both L3 and L4 clocks */ |
| 2231 | .name = "cam_ick", | 2230 | .name = "cam_ick", |
| 2232 | .ops = &clkops_omap2_dflt, | 2231 | .ops = &clkops_omap2_iclk_dflt, |
| 2233 | .parent = &l4_ick, | 2232 | .parent = &l4_ick, |
| 2234 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN), | 2233 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_ICLKEN), |
| 2235 | .enable_bit = OMAP3430_EN_CAM_SHIFT, | 2234 | .enable_bit = OMAP3430_EN_CAM_SHIFT, |
| @@ -2272,7 +2271,7 @@ static struct clk usbhost_48m_fck = { | |||
| 2272 | static struct clk usbhost_ick = { | 2271 | static struct clk usbhost_ick = { |
| 2273 | /* Handles both L3 and L4 clocks */ | 2272 | /* Handles both L3 and L4 clocks */ |
| 2274 | .name = "usbhost_ick", | 2273 | .name = "usbhost_ick", |
| 2275 | .ops = &clkops_omap3430es2_dss_usbhost_wait, | 2274 | .ops = &clkops_omap3430es2_iclk_dss_usbhost_wait, |
| 2276 | .parent = &l4_ick, | 2275 | .parent = &l4_ick, |
| 2277 | .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN), | 2276 | .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN), |
| 2278 | .enable_bit = OMAP3430ES2_EN_USBHOST_SHIFT, | 2277 | .enable_bit = OMAP3430ES2_EN_USBHOST_SHIFT, |
| @@ -2372,7 +2371,7 @@ static struct clk wkup_l4_ick = { | |||
| 2372 | /* Never specifically named in the TRM, so we have to infer a likely name */ | 2371 | /* Never specifically named in the TRM, so we have to infer a likely name */ |
| 2373 | static struct clk usim_ick = { | 2372 | static struct clk usim_ick = { |
| 2374 | .name = "usim_ick", | 2373 | .name = "usim_ick", |
| 2375 | .ops = &clkops_omap2_dflt_wait, | 2374 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2376 | .parent = &wkup_l4_ick, | 2375 | .parent = &wkup_l4_ick, |
| 2377 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 2376 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 2378 | .enable_bit = OMAP3430ES2_EN_USIMOCP_SHIFT, | 2377 | .enable_bit = OMAP3430ES2_EN_USIMOCP_SHIFT, |
| @@ -2382,7 +2381,7 @@ static struct clk usim_ick = { | |||
| 2382 | 2381 | ||
| 2383 | static struct clk wdt2_ick = { | 2382 | static struct clk wdt2_ick = { |
| 2384 | .name = "wdt2_ick", | 2383 | .name = "wdt2_ick", |
| 2385 | .ops = &clkops_omap2_dflt_wait, | 2384 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2386 | .parent = &wkup_l4_ick, | 2385 | .parent = &wkup_l4_ick, |
| 2387 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 2386 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 2388 | .enable_bit = OMAP3430_EN_WDT2_SHIFT, | 2387 | .enable_bit = OMAP3430_EN_WDT2_SHIFT, |
| @@ -2392,7 +2391,7 @@ static struct clk wdt2_ick = { | |||
| 2392 | 2391 | ||
| 2393 | static struct clk wdt1_ick = { | 2392 | static struct clk wdt1_ick = { |
| 2394 | .name = "wdt1_ick", | 2393 | .name = "wdt1_ick", |
| 2395 | .ops = &clkops_omap2_dflt_wait, | 2394 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2396 | .parent = &wkup_l4_ick, | 2395 | .parent = &wkup_l4_ick, |
| 2397 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 2396 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 2398 | .enable_bit = OMAP3430_EN_WDT1_SHIFT, | 2397 | .enable_bit = OMAP3430_EN_WDT1_SHIFT, |
| @@ -2402,7 +2401,7 @@ static struct clk wdt1_ick = { | |||
| 2402 | 2401 | ||
| 2403 | static struct clk gpio1_ick = { | 2402 | static struct clk gpio1_ick = { |
| 2404 | .name = "gpio1_ick", | 2403 | .name = "gpio1_ick", |
| 2405 | .ops = &clkops_omap2_dflt_wait, | 2404 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2406 | .parent = &wkup_l4_ick, | 2405 | .parent = &wkup_l4_ick, |
| 2407 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 2406 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 2408 | .enable_bit = OMAP3430_EN_GPIO1_SHIFT, | 2407 | .enable_bit = OMAP3430_EN_GPIO1_SHIFT, |
| @@ -2412,7 +2411,7 @@ static struct clk gpio1_ick = { | |||
| 2412 | 2411 | ||
| 2413 | static struct clk omap_32ksync_ick = { | 2412 | static struct clk omap_32ksync_ick = { |
| 2414 | .name = "omap_32ksync_ick", | 2413 | .name = "omap_32ksync_ick", |
| 2415 | .ops = &clkops_omap2_dflt_wait, | 2414 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2416 | .parent = &wkup_l4_ick, | 2415 | .parent = &wkup_l4_ick, |
| 2417 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 2416 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 2418 | .enable_bit = OMAP3430_EN_32KSYNC_SHIFT, | 2417 | .enable_bit = OMAP3430_EN_32KSYNC_SHIFT, |
| @@ -2423,7 +2422,7 @@ static struct clk omap_32ksync_ick = { | |||
| 2423 | /* XXX This clock no longer exists in 3430 TRM rev F */ | 2422 | /* XXX This clock no longer exists in 3430 TRM rev F */ |
| 2424 | static struct clk gpt12_ick = { | 2423 | static struct clk gpt12_ick = { |
| 2425 | .name = "gpt12_ick", | 2424 | .name = "gpt12_ick", |
| 2426 | .ops = &clkops_omap2_dflt_wait, | 2425 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2427 | .parent = &wkup_l4_ick, | 2426 | .parent = &wkup_l4_ick, |
| 2428 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 2427 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 2429 | .enable_bit = OMAP3430_EN_GPT12_SHIFT, | 2428 | .enable_bit = OMAP3430_EN_GPT12_SHIFT, |
| @@ -2433,7 +2432,7 @@ static struct clk gpt12_ick = { | |||
| 2433 | 2432 | ||
| 2434 | static struct clk gpt1_ick = { | 2433 | static struct clk gpt1_ick = { |
| 2435 | .name = "gpt1_ick", | 2434 | .name = "gpt1_ick", |
| 2436 | .ops = &clkops_omap2_dflt_wait, | 2435 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2437 | .parent = &wkup_l4_ick, | 2436 | .parent = &wkup_l4_ick, |
| 2438 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), | 2437 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN), |
| 2439 | .enable_bit = OMAP3430_EN_GPT1_SHIFT, | 2438 | .enable_bit = OMAP3430_EN_GPT1_SHIFT, |
| @@ -2663,7 +2662,7 @@ static struct clk per_l4_ick = { | |||
| 2663 | 2662 | ||
| 2664 | static struct clk gpio6_ick = { | 2663 | static struct clk gpio6_ick = { |
| 2665 | .name = "gpio6_ick", | 2664 | .name = "gpio6_ick", |
| 2666 | .ops = &clkops_omap2_dflt_wait, | 2665 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2667 | .parent = &per_l4_ick, | 2666 | .parent = &per_l4_ick, |
| 2668 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2667 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2669 | .enable_bit = OMAP3430_EN_GPIO6_SHIFT, | 2668 | .enable_bit = OMAP3430_EN_GPIO6_SHIFT, |
| @@ -2673,7 +2672,7 @@ static struct clk gpio6_ick = { | |||
| 2673 | 2672 | ||
| 2674 | static struct clk gpio5_ick = { | 2673 | static struct clk gpio5_ick = { |
| 2675 | .name = "gpio5_ick", | 2674 | .name = "gpio5_ick", |
| 2676 | .ops = &clkops_omap2_dflt_wait, | 2675 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2677 | .parent = &per_l4_ick, | 2676 | .parent = &per_l4_ick, |
| 2678 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2677 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2679 | .enable_bit = OMAP3430_EN_GPIO5_SHIFT, | 2678 | .enable_bit = OMAP3430_EN_GPIO5_SHIFT, |
| @@ -2683,7 +2682,7 @@ static struct clk gpio5_ick = { | |||
| 2683 | 2682 | ||
| 2684 | static struct clk gpio4_ick = { | 2683 | static struct clk gpio4_ick = { |
| 2685 | .name = "gpio4_ick", | 2684 | .name = "gpio4_ick", |
| 2686 | .ops = &clkops_omap2_dflt_wait, | 2685 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2687 | .parent = &per_l4_ick, | 2686 | .parent = &per_l4_ick, |
| 2688 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2687 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2689 | .enable_bit = OMAP3430_EN_GPIO4_SHIFT, | 2688 | .enable_bit = OMAP3430_EN_GPIO4_SHIFT, |
| @@ -2693,7 +2692,7 @@ static struct clk gpio4_ick = { | |||
| 2693 | 2692 | ||
| 2694 | static struct clk gpio3_ick = { | 2693 | static struct clk gpio3_ick = { |
| 2695 | .name = "gpio3_ick", | 2694 | .name = "gpio3_ick", |
| 2696 | .ops = &clkops_omap2_dflt_wait, | 2695 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2697 | .parent = &per_l4_ick, | 2696 | .parent = &per_l4_ick, |
| 2698 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2697 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2699 | .enable_bit = OMAP3430_EN_GPIO3_SHIFT, | 2698 | .enable_bit = OMAP3430_EN_GPIO3_SHIFT, |
| @@ -2703,7 +2702,7 @@ static struct clk gpio3_ick = { | |||
| 2703 | 2702 | ||
| 2704 | static struct clk gpio2_ick = { | 2703 | static struct clk gpio2_ick = { |
| 2705 | .name = "gpio2_ick", | 2704 | .name = "gpio2_ick", |
| 2706 | .ops = &clkops_omap2_dflt_wait, | 2705 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2707 | .parent = &per_l4_ick, | 2706 | .parent = &per_l4_ick, |
| 2708 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2707 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2709 | .enable_bit = OMAP3430_EN_GPIO2_SHIFT, | 2708 | .enable_bit = OMAP3430_EN_GPIO2_SHIFT, |
| @@ -2713,7 +2712,7 @@ static struct clk gpio2_ick = { | |||
| 2713 | 2712 | ||
| 2714 | static struct clk wdt3_ick = { | 2713 | static struct clk wdt3_ick = { |
| 2715 | .name = "wdt3_ick", | 2714 | .name = "wdt3_ick", |
| 2716 | .ops = &clkops_omap2_dflt_wait, | 2715 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2717 | .parent = &per_l4_ick, | 2716 | .parent = &per_l4_ick, |
| 2718 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2717 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2719 | .enable_bit = OMAP3430_EN_WDT3_SHIFT, | 2718 | .enable_bit = OMAP3430_EN_WDT3_SHIFT, |
| @@ -2723,7 +2722,7 @@ static struct clk wdt3_ick = { | |||
| 2723 | 2722 | ||
| 2724 | static struct clk uart3_ick = { | 2723 | static struct clk uart3_ick = { |
| 2725 | .name = "uart3_ick", | 2724 | .name = "uart3_ick", |
| 2726 | .ops = &clkops_omap2_dflt_wait, | 2725 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2727 | .parent = &per_l4_ick, | 2726 | .parent = &per_l4_ick, |
| 2728 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2727 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2729 | .enable_bit = OMAP3430_EN_UART3_SHIFT, | 2728 | .enable_bit = OMAP3430_EN_UART3_SHIFT, |
| @@ -2733,7 +2732,7 @@ static struct clk uart3_ick = { | |||
| 2733 | 2732 | ||
| 2734 | static struct clk uart4_ick = { | 2733 | static struct clk uart4_ick = { |
| 2735 | .name = "uart4_ick", | 2734 | .name = "uart4_ick", |
| 2736 | .ops = &clkops_omap2_dflt_wait, | 2735 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2737 | .parent = &per_l4_ick, | 2736 | .parent = &per_l4_ick, |
| 2738 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2737 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2739 | .enable_bit = OMAP3630_EN_UART4_SHIFT, | 2738 | .enable_bit = OMAP3630_EN_UART4_SHIFT, |
| @@ -2743,7 +2742,7 @@ static struct clk uart4_ick = { | |||
| 2743 | 2742 | ||
| 2744 | static struct clk gpt9_ick = { | 2743 | static struct clk gpt9_ick = { |
| 2745 | .name = "gpt9_ick", | 2744 | .name = "gpt9_ick", |
| 2746 | .ops = &clkops_omap2_dflt_wait, | 2745 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2747 | .parent = &per_l4_ick, | 2746 | .parent = &per_l4_ick, |
| 2748 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2747 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2749 | .enable_bit = OMAP3430_EN_GPT9_SHIFT, | 2748 | .enable_bit = OMAP3430_EN_GPT9_SHIFT, |
| @@ -2753,7 +2752,7 @@ static struct clk gpt9_ick = { | |||
| 2753 | 2752 | ||
| 2754 | static struct clk gpt8_ick = { | 2753 | static struct clk gpt8_ick = { |
| 2755 | .name = "gpt8_ick", | 2754 | .name = "gpt8_ick", |
| 2756 | .ops = &clkops_omap2_dflt_wait, | 2755 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2757 | .parent = &per_l4_ick, | 2756 | .parent = &per_l4_ick, |
| 2758 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2757 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2759 | .enable_bit = OMAP3430_EN_GPT8_SHIFT, | 2758 | .enable_bit = OMAP3430_EN_GPT8_SHIFT, |
| @@ -2763,7 +2762,7 @@ static struct clk gpt8_ick = { | |||
| 2763 | 2762 | ||
| 2764 | static struct clk gpt7_ick = { | 2763 | static struct clk gpt7_ick = { |
| 2765 | .name = "gpt7_ick", | 2764 | .name = "gpt7_ick", |
| 2766 | .ops = &clkops_omap2_dflt_wait, | 2765 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2767 | .parent = &per_l4_ick, | 2766 | .parent = &per_l4_ick, |
| 2768 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2767 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2769 | .enable_bit = OMAP3430_EN_GPT7_SHIFT, | 2768 | .enable_bit = OMAP3430_EN_GPT7_SHIFT, |
| @@ -2773,7 +2772,7 @@ static struct clk gpt7_ick = { | |||
| 2773 | 2772 | ||
| 2774 | static struct clk gpt6_ick = { | 2773 | static struct clk gpt6_ick = { |
| 2775 | .name = "gpt6_ick", | 2774 | .name = "gpt6_ick", |
| 2776 | .ops = &clkops_omap2_dflt_wait, | 2775 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2777 | .parent = &per_l4_ick, | 2776 | .parent = &per_l4_ick, |
| 2778 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2777 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2779 | .enable_bit = OMAP3430_EN_GPT6_SHIFT, | 2778 | .enable_bit = OMAP3430_EN_GPT6_SHIFT, |
| @@ -2783,7 +2782,7 @@ static struct clk gpt6_ick = { | |||
| 2783 | 2782 | ||
| 2784 | static struct clk gpt5_ick = { | 2783 | static struct clk gpt5_ick = { |
| 2785 | .name = "gpt5_ick", | 2784 | .name = "gpt5_ick", |
| 2786 | .ops = &clkops_omap2_dflt_wait, | 2785 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2787 | .parent = &per_l4_ick, | 2786 | .parent = &per_l4_ick, |
| 2788 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2787 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2789 | .enable_bit = OMAP3430_EN_GPT5_SHIFT, | 2788 | .enable_bit = OMAP3430_EN_GPT5_SHIFT, |
| @@ -2793,7 +2792,7 @@ static struct clk gpt5_ick = { | |||
| 2793 | 2792 | ||
| 2794 | static struct clk gpt4_ick = { | 2793 | static struct clk gpt4_ick = { |
| 2795 | .name = "gpt4_ick", | 2794 | .name = "gpt4_ick", |
| 2796 | .ops = &clkops_omap2_dflt_wait, | 2795 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2797 | .parent = &per_l4_ick, | 2796 | .parent = &per_l4_ick, |
| 2798 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2797 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2799 | .enable_bit = OMAP3430_EN_GPT4_SHIFT, | 2798 | .enable_bit = OMAP3430_EN_GPT4_SHIFT, |
| @@ -2803,7 +2802,7 @@ static struct clk gpt4_ick = { | |||
| 2803 | 2802 | ||
| 2804 | static struct clk gpt3_ick = { | 2803 | static struct clk gpt3_ick = { |
| 2805 | .name = "gpt3_ick", | 2804 | .name = "gpt3_ick", |
| 2806 | .ops = &clkops_omap2_dflt_wait, | 2805 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2807 | .parent = &per_l4_ick, | 2806 | .parent = &per_l4_ick, |
| 2808 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2807 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2809 | .enable_bit = OMAP3430_EN_GPT3_SHIFT, | 2808 | .enable_bit = OMAP3430_EN_GPT3_SHIFT, |
| @@ -2813,7 +2812,7 @@ static struct clk gpt3_ick = { | |||
| 2813 | 2812 | ||
| 2814 | static struct clk gpt2_ick = { | 2813 | static struct clk gpt2_ick = { |
| 2815 | .name = "gpt2_ick", | 2814 | .name = "gpt2_ick", |
| 2816 | .ops = &clkops_omap2_dflt_wait, | 2815 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2817 | .parent = &per_l4_ick, | 2816 | .parent = &per_l4_ick, |
| 2818 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2817 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2819 | .enable_bit = OMAP3430_EN_GPT2_SHIFT, | 2818 | .enable_bit = OMAP3430_EN_GPT2_SHIFT, |
| @@ -2823,7 +2822,7 @@ static struct clk gpt2_ick = { | |||
| 2823 | 2822 | ||
| 2824 | static struct clk mcbsp2_ick = { | 2823 | static struct clk mcbsp2_ick = { |
| 2825 | .name = "mcbsp2_ick", | 2824 | .name = "mcbsp2_ick", |
| 2826 | .ops = &clkops_omap2_dflt_wait, | 2825 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2827 | .parent = &per_l4_ick, | 2826 | .parent = &per_l4_ick, |
| 2828 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2827 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2829 | .enable_bit = OMAP3430_EN_MCBSP2_SHIFT, | 2828 | .enable_bit = OMAP3430_EN_MCBSP2_SHIFT, |
| @@ -2833,7 +2832,7 @@ static struct clk mcbsp2_ick = { | |||
| 2833 | 2832 | ||
| 2834 | static struct clk mcbsp3_ick = { | 2833 | static struct clk mcbsp3_ick = { |
| 2835 | .name = "mcbsp3_ick", | 2834 | .name = "mcbsp3_ick", |
| 2836 | .ops = &clkops_omap2_dflt_wait, | 2835 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2837 | .parent = &per_l4_ick, | 2836 | .parent = &per_l4_ick, |
| 2838 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2837 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2839 | .enable_bit = OMAP3430_EN_MCBSP3_SHIFT, | 2838 | .enable_bit = OMAP3430_EN_MCBSP3_SHIFT, |
| @@ -2843,7 +2842,7 @@ static struct clk mcbsp3_ick = { | |||
| 2843 | 2842 | ||
| 2844 | static struct clk mcbsp4_ick = { | 2843 | static struct clk mcbsp4_ick = { |
| 2845 | .name = "mcbsp4_ick", | 2844 | .name = "mcbsp4_ick", |
| 2846 | .ops = &clkops_omap2_dflt_wait, | 2845 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 2847 | .parent = &per_l4_ick, | 2846 | .parent = &per_l4_ick, |
| 2848 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2847 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
| 2849 | .enable_bit = OMAP3430_EN_MCBSP4_SHIFT, | 2848 | .enable_bit = OMAP3430_EN_MCBSP4_SHIFT, |
| @@ -3186,7 +3185,7 @@ static struct clk vpfe_fck = { | |||
| 3186 | */ | 3185 | */ |
| 3187 | static struct clk uart4_ick_am35xx = { | 3186 | static struct clk uart4_ick_am35xx = { |
| 3188 | .name = "uart4_ick", | 3187 | .name = "uart4_ick", |
| 3189 | .ops = &clkops_omap2_dflt_wait, | 3188 | .ops = &clkops_omap2_iclk_dflt_wait, |
| 3190 | .parent = &core_l4_ick, | 3189 | .parent = &core_l4_ick, |
| 3191 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 3190 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
| 3192 | .enable_bit = AM35XX_EN_UART4_SHIFT, | 3191 | .enable_bit = AM35XX_EN_UART4_SHIFT, |
| @@ -3290,10 +3289,10 @@ static struct omap_clk omap3xxx_clks[] = { | |||
| 3290 | CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX), | 3289 | CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX), |
| 3291 | CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX), | 3290 | CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX), |
| 3292 | CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), | 3291 | CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), |
| 3293 | CLK("mmci-omap-hs.2", "fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3292 | CLK("omap_hsmmc.2", "fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
| 3294 | CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_3XXX), | 3293 | CLK("omap_hsmmc.1", "fck", &mmchs2_fck, CK_3XXX), |
| 3295 | CLK(NULL, "mspro_fck", &mspro_fck, CK_34XX | CK_36XX), | 3294 | CLK(NULL, "mspro_fck", &mspro_fck, CK_34XX | CK_36XX), |
| 3296 | CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_3XXX), | 3295 | CLK("omap_hsmmc.0", "fck", &mmchs1_fck, CK_3XXX), |
| 3297 | CLK("omap_i2c.3", "fck", &i2c3_fck, CK_3XXX), | 3296 | CLK("omap_i2c.3", "fck", &i2c3_fck, CK_3XXX), |
| 3298 | CLK("omap_i2c.2", "fck", &i2c2_fck, CK_3XXX), | 3297 | CLK("omap_i2c.2", "fck", &i2c2_fck, CK_3XXX), |
| 3299 | CLK("omap_i2c.1", "fck", &i2c1_fck, CK_3XXX), | 3298 | CLK("omap_i2c.1", "fck", &i2c1_fck, CK_3XXX), |
| @@ -3323,13 +3322,13 @@ static struct omap_clk omap3xxx_clks[] = { | |||
| 3323 | CLK(NULL, "core_l4_ick", &core_l4_ick, CK_3XXX), | 3322 | CLK(NULL, "core_l4_ick", &core_l4_ick, CK_3XXX), |
| 3324 | CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3323 | CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
| 3325 | CLK("ehci-omap.0", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3324 | CLK("ehci-omap.0", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
| 3326 | CLK("mmci-omap-hs.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3325 | CLK("omap_hsmmc.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
| 3327 | CLK(NULL, "icr_ick", &icr_ick, CK_34XX | CK_36XX), | 3326 | CLK(NULL, "icr_ick", &icr_ick, CK_34XX | CK_36XX), |
| 3328 | CLK("omap-aes", "ick", &aes2_ick, CK_34XX | CK_36XX), | 3327 | CLK("omap-aes", "ick", &aes2_ick, CK_34XX | CK_36XX), |
| 3329 | CLK("omap-sham", "ick", &sha12_ick, CK_34XX | CK_36XX), | 3328 | CLK("omap-sham", "ick", &sha12_ick, CK_34XX | CK_36XX), |
| 3330 | CLK(NULL, "des2_ick", &des2_ick, CK_34XX | CK_36XX), | 3329 | CLK(NULL, "des2_ick", &des2_ick, CK_34XX | CK_36XX), |
| 3331 | CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_3XXX), | 3330 | CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_3XXX), |
| 3332 | CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_3XXX), | 3331 | CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_3XXX), |
| 3333 | CLK(NULL, "mspro_ick", &mspro_ick, CK_34XX | CK_36XX), | 3332 | CLK(NULL, "mspro_ick", &mspro_ick, CK_34XX | CK_36XX), |
| 3334 | CLK("omap_hdq.0", "ick", &hdq_ick, CK_3XXX), | 3333 | CLK("omap_hdq.0", "ick", &hdq_ick, CK_3XXX), |
| 3335 | CLK("omap2_mcspi.4", "ick", &mcspi4_ick, CK_3XXX), | 3334 | CLK("omap2_mcspi.4", "ick", &mcspi4_ick, CK_3XXX), |
| @@ -3471,6 +3470,9 @@ int __init omap3xxx_clk_init(void) | |||
| 3471 | } else if (cpu_is_omap3630()) { | 3470 | } else if (cpu_is_omap3630()) { |
| 3472 | cpu_mask = (RATE_IN_34XX | RATE_IN_36XX); | 3471 | cpu_mask = (RATE_IN_34XX | RATE_IN_36XX); |
| 3473 | cpu_clkflg = CK_36XX; | 3472 | cpu_clkflg = CK_36XX; |
| 3473 | } else if (cpu_is_ti816x()) { | ||
| 3474 | cpu_mask = RATE_IN_TI816X; | ||
| 3475 | cpu_clkflg = CK_TI816X; | ||
| 3474 | } else if (cpu_is_omap34xx()) { | 3476 | } else if (cpu_is_omap34xx()) { |
| 3475 | if (omap_rev() == OMAP3430_REV_ES1_0) { | 3477 | if (omap_rev() == OMAP3430_REV_ES1_0) { |
| 3476 | cpu_mask = RATE_IN_3430ES1; | 3478 | cpu_mask = RATE_IN_3430ES1; |
| @@ -3535,6 +3537,9 @@ int __init omap3xxx_clk_init(void) | |||
| 3535 | omap2_init_clk_clkdm(c->lk.clk); | 3537 | omap2_init_clk_clkdm(c->lk.clk); |
| 3536 | } | 3538 | } |
| 3537 | 3539 | ||
| 3540 | /* Disable autoidle on all clocks; let the PM code enable it later */ | ||
| 3541 | omap_clk_disable_autoidle_all(); | ||
| 3542 | |||
| 3538 | recalculate_root_clocks(); | 3543 | recalculate_root_clocks(); |
| 3539 | 3544 | ||
| 3540 | pr_info("Clocking rate (Crystal/Core/MPU): %ld.%01ld/%ld/%ld MHz\n", | 3545 | pr_info("Clocking rate (Crystal/Core/MPU): %ld.%01ld/%ld/%ld MHz\n", |
| @@ -3548,9 +3553,10 @@ int __init omap3xxx_clk_init(void) | |||
| 3548 | clk_enable_init_clocks(); | 3553 | clk_enable_init_clocks(); |
| 3549 | 3554 | ||
| 3550 | /* | 3555 | /* |
| 3551 | * Lock DPLL5 and put it in autoidle. | 3556 | * Lock DPLL5 -- here only until other device init code can |
| 3557 | * handle this | ||
| 3552 | */ | 3558 | */ |
| 3553 | if (omap_rev() >= OMAP3430_REV_ES2_0) | 3559 | if (!cpu_is_ti816x() && (omap_rev() >= OMAP3430_REV_ES2_0)) |
| 3554 | omap3_clk_lock_dpll5(); | 3560 | omap3_clk_lock_dpll5(); |
| 3555 | 3561 | ||
| 3556 | /* Avoid sleeping during omap3_core_dpll_m2_set_rate() */ | 3562 | /* Avoid sleeping during omap3_core_dpll_m2_set_rate() */ |
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index de9ec8ddd2ae..f1fedb71ae08 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
| @@ -278,8 +278,10 @@ static struct clk dpll_abe_ck = { | |||
| 278 | static struct clk dpll_abe_x2_ck = { | 278 | static struct clk dpll_abe_x2_ck = { |
| 279 | .name = "dpll_abe_x2_ck", | 279 | .name = "dpll_abe_x2_ck", |
| 280 | .parent = &dpll_abe_ck, | 280 | .parent = &dpll_abe_ck, |
| 281 | .ops = &clkops_null, | 281 | .flags = CLOCK_CLKOUTX2, |
| 282 | .ops = &clkops_omap4_dpllmx_ops, | ||
| 282 | .recalc = &omap3_clkoutx2_recalc, | 283 | .recalc = &omap3_clkoutx2_recalc, |
| 284 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE, | ||
| 283 | }; | 285 | }; |
| 284 | 286 | ||
| 285 | static const struct clksel_rate div31_1to31_rates[] = { | 287 | static const struct clksel_rate div31_1to31_rates[] = { |
| @@ -328,7 +330,7 @@ static struct clk dpll_abe_m2x2_ck = { | |||
| 328 | .clksel = dpll_abe_m2x2_div, | 330 | .clksel = dpll_abe_m2x2_div, |
| 329 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE, | 331 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE, |
| 330 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, | 332 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, |
| 331 | .ops = &clkops_null, | 333 | .ops = &clkops_omap4_dpllmx_ops, |
| 332 | .recalc = &omap2_clksel_recalc, | 334 | .recalc = &omap2_clksel_recalc, |
| 333 | .round_rate = &omap2_clksel_round_rate, | 335 | .round_rate = &omap2_clksel_round_rate, |
| 334 | .set_rate = &omap2_clksel_set_rate, | 336 | .set_rate = &omap2_clksel_set_rate, |
| @@ -395,7 +397,7 @@ static struct clk dpll_abe_m3x2_ck = { | |||
| 395 | .clksel = dpll_abe_m2x2_div, | 397 | .clksel = dpll_abe_m2x2_div, |
| 396 | .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_ABE, | 398 | .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_ABE, |
| 397 | .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK, | 399 | .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK, |
| 398 | .ops = &clkops_null, | 400 | .ops = &clkops_omap4_dpllmx_ops, |
| 399 | .recalc = &omap2_clksel_recalc, | 401 | .recalc = &omap2_clksel_recalc, |
| 400 | .round_rate = &omap2_clksel_round_rate, | 402 | .round_rate = &omap2_clksel_round_rate, |
| 401 | .set_rate = &omap2_clksel_set_rate, | 403 | .set_rate = &omap2_clksel_set_rate, |
| @@ -443,13 +445,14 @@ static struct clk dpll_core_ck = { | |||
| 443 | .parent = &sys_clkin_ck, | 445 | .parent = &sys_clkin_ck, |
| 444 | .dpll_data = &dpll_core_dd, | 446 | .dpll_data = &dpll_core_dd, |
| 445 | .init = &omap2_init_dpll_parent, | 447 | .init = &omap2_init_dpll_parent, |
| 446 | .ops = &clkops_null, | 448 | .ops = &clkops_omap3_core_dpll_ops, |
| 447 | .recalc = &omap3_dpll_recalc, | 449 | .recalc = &omap3_dpll_recalc, |
| 448 | }; | 450 | }; |
| 449 | 451 | ||
| 450 | static struct clk dpll_core_x2_ck = { | 452 | static struct clk dpll_core_x2_ck = { |
| 451 | .name = "dpll_core_x2_ck", | 453 | .name = "dpll_core_x2_ck", |
| 452 | .parent = &dpll_core_ck, | 454 | .parent = &dpll_core_ck, |
| 455 | .flags = CLOCK_CLKOUTX2, | ||
| 453 | .ops = &clkops_null, | 456 | .ops = &clkops_null, |
| 454 | .recalc = &omap3_clkoutx2_recalc, | 457 | .recalc = &omap3_clkoutx2_recalc, |
| 455 | }; | 458 | }; |
| @@ -465,7 +468,7 @@ static struct clk dpll_core_m6x2_ck = { | |||
| 465 | .clksel = dpll_core_m6x2_div, | 468 | .clksel = dpll_core_m6x2_div, |
| 466 | .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_CORE, | 469 | .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_CORE, |
| 467 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK, | 470 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK, |
| 468 | .ops = &clkops_null, | 471 | .ops = &clkops_omap4_dpllmx_ops, |
| 469 | .recalc = &omap2_clksel_recalc, | 472 | .recalc = &omap2_clksel_recalc, |
| 470 | .round_rate = &omap2_clksel_round_rate, | 473 | .round_rate = &omap2_clksel_round_rate, |
| 471 | .set_rate = &omap2_clksel_set_rate, | 474 | .set_rate = &omap2_clksel_set_rate, |
| @@ -495,7 +498,7 @@ static struct clk dpll_core_m2_ck = { | |||
| 495 | .clksel = dpll_core_m2_div, | 498 | .clksel = dpll_core_m2_div, |
| 496 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_CORE, | 499 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_CORE, |
| 497 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, | 500 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, |
| 498 | .ops = &clkops_null, | 501 | .ops = &clkops_omap4_dpllmx_ops, |
| 499 | .recalc = &omap2_clksel_recalc, | 502 | .recalc = &omap2_clksel_recalc, |
| 500 | .round_rate = &omap2_clksel_round_rate, | 503 | .round_rate = &omap2_clksel_round_rate, |
| 501 | .set_rate = &omap2_clksel_set_rate, | 504 | .set_rate = &omap2_clksel_set_rate, |
| @@ -515,7 +518,7 @@ static struct clk dpll_core_m5x2_ck = { | |||
| 515 | .clksel = dpll_core_m6x2_div, | 518 | .clksel = dpll_core_m6x2_div, |
| 516 | .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_CORE, | 519 | .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_CORE, |
| 517 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, | 520 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, |
| 518 | .ops = &clkops_null, | 521 | .ops = &clkops_omap4_dpllmx_ops, |
| 519 | .recalc = &omap2_clksel_recalc, | 522 | .recalc = &omap2_clksel_recalc, |
| 520 | .round_rate = &omap2_clksel_round_rate, | 523 | .round_rate = &omap2_clksel_round_rate, |
| 521 | .set_rate = &omap2_clksel_set_rate, | 524 | .set_rate = &omap2_clksel_set_rate, |
| @@ -581,7 +584,7 @@ static struct clk dpll_core_m4x2_ck = { | |||
| 581 | .clksel = dpll_core_m6x2_div, | 584 | .clksel = dpll_core_m6x2_div, |
| 582 | .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_CORE, | 585 | .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_CORE, |
| 583 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, | 586 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, |
| 584 | .ops = &clkops_null, | 587 | .ops = &clkops_omap4_dpllmx_ops, |
| 585 | .recalc = &omap2_clksel_recalc, | 588 | .recalc = &omap2_clksel_recalc, |
| 586 | .round_rate = &omap2_clksel_round_rate, | 589 | .round_rate = &omap2_clksel_round_rate, |
| 587 | .set_rate = &omap2_clksel_set_rate, | 590 | .set_rate = &omap2_clksel_set_rate, |
| @@ -606,7 +609,7 @@ static struct clk dpll_abe_m2_ck = { | |||
| 606 | .clksel = dpll_abe_m2_div, | 609 | .clksel = dpll_abe_m2_div, |
| 607 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE, | 610 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE, |
| 608 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, | 611 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, |
| 609 | .ops = &clkops_null, | 612 | .ops = &clkops_omap4_dpllmx_ops, |
| 610 | .recalc = &omap2_clksel_recalc, | 613 | .recalc = &omap2_clksel_recalc, |
| 611 | .round_rate = &omap2_clksel_round_rate, | 614 | .round_rate = &omap2_clksel_round_rate, |
| 612 | .set_rate = &omap2_clksel_set_rate, | 615 | .set_rate = &omap2_clksel_set_rate, |
| @@ -632,7 +635,7 @@ static struct clk dpll_core_m7x2_ck = { | |||
| 632 | .clksel = dpll_core_m6x2_div, | 635 | .clksel = dpll_core_m6x2_div, |
| 633 | .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_CORE, | 636 | .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_CORE, |
| 634 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK, | 637 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK, |
| 635 | .ops = &clkops_null, | 638 | .ops = &clkops_omap4_dpllmx_ops, |
| 636 | .recalc = &omap2_clksel_recalc, | 639 | .recalc = &omap2_clksel_recalc, |
| 637 | .round_rate = &omap2_clksel_round_rate, | 640 | .round_rate = &omap2_clksel_round_rate, |
| 638 | .set_rate = &omap2_clksel_set_rate, | 641 | .set_rate = &omap2_clksel_set_rate, |
| @@ -689,6 +692,7 @@ static struct clk dpll_iva_ck = { | |||
| 689 | static struct clk dpll_iva_x2_ck = { | 692 | static struct clk dpll_iva_x2_ck = { |
| 690 | .name = "dpll_iva_x2_ck", | 693 | .name = "dpll_iva_x2_ck", |
| 691 | .parent = &dpll_iva_ck, | 694 | .parent = &dpll_iva_ck, |
| 695 | .flags = CLOCK_CLKOUTX2, | ||
| 692 | .ops = &clkops_null, | 696 | .ops = &clkops_null, |
| 693 | .recalc = &omap3_clkoutx2_recalc, | 697 | .recalc = &omap3_clkoutx2_recalc, |
| 694 | }; | 698 | }; |
| @@ -704,7 +708,7 @@ static struct clk dpll_iva_m4x2_ck = { | |||
| 704 | .clksel = dpll_iva_m4x2_div, | 708 | .clksel = dpll_iva_m4x2_div, |
| 705 | .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_IVA, | 709 | .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_IVA, |
| 706 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, | 710 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, |
| 707 | .ops = &clkops_null, | 711 | .ops = &clkops_omap4_dpllmx_ops, |
| 708 | .recalc = &omap2_clksel_recalc, | 712 | .recalc = &omap2_clksel_recalc, |
| 709 | .round_rate = &omap2_clksel_round_rate, | 713 | .round_rate = &omap2_clksel_round_rate, |
| 710 | .set_rate = &omap2_clksel_set_rate, | 714 | .set_rate = &omap2_clksel_set_rate, |
| @@ -716,7 +720,7 @@ static struct clk dpll_iva_m5x2_ck = { | |||
| 716 | .clksel = dpll_iva_m4x2_div, | 720 | .clksel = dpll_iva_m4x2_div, |
| 717 | .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_IVA, | 721 | .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_IVA, |
| 718 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, | 722 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, |
| 719 | .ops = &clkops_null, | 723 | .ops = &clkops_omap4_dpllmx_ops, |
| 720 | .recalc = &omap2_clksel_recalc, | 724 | .recalc = &omap2_clksel_recalc, |
| 721 | .round_rate = &omap2_clksel_round_rate, | 725 | .round_rate = &omap2_clksel_round_rate, |
| 722 | .set_rate = &omap2_clksel_set_rate, | 726 | .set_rate = &omap2_clksel_set_rate, |
| @@ -764,7 +768,7 @@ static struct clk dpll_mpu_m2_ck = { | |||
| 764 | .clksel = dpll_mpu_m2_div, | 768 | .clksel = dpll_mpu_m2_div, |
| 765 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_MPU, | 769 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_MPU, |
| 766 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, | 770 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, |
| 767 | .ops = &clkops_null, | 771 | .ops = &clkops_omap4_dpllmx_ops, |
| 768 | .recalc = &omap2_clksel_recalc, | 772 | .recalc = &omap2_clksel_recalc, |
| 769 | .round_rate = &omap2_clksel_round_rate, | 773 | .round_rate = &omap2_clksel_round_rate, |
| 770 | .set_rate = &omap2_clksel_set_rate, | 774 | .set_rate = &omap2_clksel_set_rate, |
| @@ -837,7 +841,7 @@ static struct clk dpll_per_m2_ck = { | |||
| 837 | .clksel = dpll_per_m2_div, | 841 | .clksel = dpll_per_m2_div, |
| 838 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER, | 842 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER, |
| 839 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, | 843 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, |
| 840 | .ops = &clkops_null, | 844 | .ops = &clkops_omap4_dpllmx_ops, |
| 841 | .recalc = &omap2_clksel_recalc, | 845 | .recalc = &omap2_clksel_recalc, |
| 842 | .round_rate = &omap2_clksel_round_rate, | 846 | .round_rate = &omap2_clksel_round_rate, |
| 843 | .set_rate = &omap2_clksel_set_rate, | 847 | .set_rate = &omap2_clksel_set_rate, |
| @@ -846,8 +850,10 @@ static struct clk dpll_per_m2_ck = { | |||
| 846 | static struct clk dpll_per_x2_ck = { | 850 | static struct clk dpll_per_x2_ck = { |
| 847 | .name = "dpll_per_x2_ck", | 851 | .name = "dpll_per_x2_ck", |
| 848 | .parent = &dpll_per_ck, | 852 | .parent = &dpll_per_ck, |
| 849 | .ops = &clkops_null, | 853 | .flags = CLOCK_CLKOUTX2, |
| 854 | .ops = &clkops_omap4_dpllmx_ops, | ||
| 850 | .recalc = &omap3_clkoutx2_recalc, | 855 | .recalc = &omap3_clkoutx2_recalc, |
| 856 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER, | ||
| 851 | }; | 857 | }; |
| 852 | 858 | ||
| 853 | static const struct clksel dpll_per_m2x2_div[] = { | 859 | static const struct clksel dpll_per_m2x2_div[] = { |
| @@ -861,7 +867,7 @@ static struct clk dpll_per_m2x2_ck = { | |||
| 861 | .clksel = dpll_per_m2x2_div, | 867 | .clksel = dpll_per_m2x2_div, |
| 862 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER, | 868 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER, |
| 863 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, | 869 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, |
| 864 | .ops = &clkops_null, | 870 | .ops = &clkops_omap4_dpllmx_ops, |
| 865 | .recalc = &omap2_clksel_recalc, | 871 | .recalc = &omap2_clksel_recalc, |
| 866 | .round_rate = &omap2_clksel_round_rate, | 872 | .round_rate = &omap2_clksel_round_rate, |
| 867 | .set_rate = &omap2_clksel_set_rate, | 873 | .set_rate = &omap2_clksel_set_rate, |
| @@ -887,7 +893,7 @@ static struct clk dpll_per_m4x2_ck = { | |||
| 887 | .clksel = dpll_per_m2x2_div, | 893 | .clksel = dpll_per_m2x2_div, |
| 888 | .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_PER, | 894 | .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_PER, |
| 889 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, | 895 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, |
| 890 | .ops = &clkops_null, | 896 | .ops = &clkops_omap4_dpllmx_ops, |
| 891 | .recalc = &omap2_clksel_recalc, | 897 | .recalc = &omap2_clksel_recalc, |
| 892 | .round_rate = &omap2_clksel_round_rate, | 898 | .round_rate = &omap2_clksel_round_rate, |
| 893 | .set_rate = &omap2_clksel_set_rate, | 899 | .set_rate = &omap2_clksel_set_rate, |
| @@ -899,7 +905,7 @@ static struct clk dpll_per_m5x2_ck = { | |||
| 899 | .clksel = dpll_per_m2x2_div, | 905 | .clksel = dpll_per_m2x2_div, |
| 900 | .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_PER, | 906 | .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_PER, |
| 901 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, | 907 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, |
| 902 | .ops = &clkops_null, | 908 | .ops = &clkops_omap4_dpllmx_ops, |
| 903 | .recalc = &omap2_clksel_recalc, | 909 | .recalc = &omap2_clksel_recalc, |
| 904 | .round_rate = &omap2_clksel_round_rate, | 910 | .round_rate = &omap2_clksel_round_rate, |
| 905 | .set_rate = &omap2_clksel_set_rate, | 911 | .set_rate = &omap2_clksel_set_rate, |
| @@ -911,7 +917,7 @@ static struct clk dpll_per_m6x2_ck = { | |||
| 911 | .clksel = dpll_per_m2x2_div, | 917 | .clksel = dpll_per_m2x2_div, |
| 912 | .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_PER, | 918 | .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_PER, |
| 913 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK, | 919 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK, |
| 914 | .ops = &clkops_null, | 920 | .ops = &clkops_omap4_dpllmx_ops, |
| 915 | .recalc = &omap2_clksel_recalc, | 921 | .recalc = &omap2_clksel_recalc, |
| 916 | .round_rate = &omap2_clksel_round_rate, | 922 | .round_rate = &omap2_clksel_round_rate, |
| 917 | .set_rate = &omap2_clksel_set_rate, | 923 | .set_rate = &omap2_clksel_set_rate, |
| @@ -923,7 +929,7 @@ static struct clk dpll_per_m7x2_ck = { | |||
| 923 | .clksel = dpll_per_m2x2_div, | 929 | .clksel = dpll_per_m2x2_div, |
| 924 | .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_PER, | 930 | .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_PER, |
| 925 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK, | 931 | .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK, |
| 926 | .ops = &clkops_null, | 932 | .ops = &clkops_omap4_dpllmx_ops, |
| 927 | .recalc = &omap2_clksel_recalc, | 933 | .recalc = &omap2_clksel_recalc, |
| 928 | .round_rate = &omap2_clksel_round_rate, | 934 | .round_rate = &omap2_clksel_round_rate, |
| 929 | .set_rate = &omap2_clksel_set_rate, | 935 | .set_rate = &omap2_clksel_set_rate, |
| @@ -964,6 +970,7 @@ static struct clk dpll_unipro_ck = { | |||
| 964 | static struct clk dpll_unipro_x2_ck = { | 970 | static struct clk dpll_unipro_x2_ck = { |
| 965 | .name = "dpll_unipro_x2_ck", | 971 | .name = "dpll_unipro_x2_ck", |
| 966 | .parent = &dpll_unipro_ck, | 972 | .parent = &dpll_unipro_ck, |
| 973 | .flags = CLOCK_CLKOUTX2, | ||
| 967 | .ops = &clkops_null, | 974 | .ops = &clkops_null, |
| 968 | .recalc = &omap3_clkoutx2_recalc, | 975 | .recalc = &omap3_clkoutx2_recalc, |
| 969 | }; | 976 | }; |
| @@ -979,7 +986,7 @@ static struct clk dpll_unipro_m2x2_ck = { | |||
| 979 | .clksel = dpll_unipro_m2x2_div, | 986 | .clksel = dpll_unipro_m2x2_div, |
| 980 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_UNIPRO, | 987 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_UNIPRO, |
| 981 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, | 988 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, |
| 982 | .ops = &clkops_null, | 989 | .ops = &clkops_omap4_dpllmx_ops, |
| 983 | .recalc = &omap2_clksel_recalc, | 990 | .recalc = &omap2_clksel_recalc, |
| 984 | .round_rate = &omap2_clksel_round_rate, | 991 | .round_rate = &omap2_clksel_round_rate, |
| 985 | .set_rate = &omap2_clksel_set_rate, | 992 | .set_rate = &omap2_clksel_set_rate, |
| @@ -1028,7 +1035,8 @@ static struct clk dpll_usb_ck = { | |||
| 1028 | static struct clk dpll_usb_clkdcoldo_ck = { | 1035 | static struct clk dpll_usb_clkdcoldo_ck = { |
| 1029 | .name = "dpll_usb_clkdcoldo_ck", | 1036 | .name = "dpll_usb_clkdcoldo_ck", |
| 1030 | .parent = &dpll_usb_ck, | 1037 | .parent = &dpll_usb_ck, |
| 1031 | .ops = &clkops_null, | 1038 | .ops = &clkops_omap4_dpllmx_ops, |
| 1039 | .clksel_reg = OMAP4430_CM_CLKDCOLDO_DPLL_USB, | ||
| 1032 | .recalc = &followparent_recalc, | 1040 | .recalc = &followparent_recalc, |
| 1033 | }; | 1041 | }; |
| 1034 | 1042 | ||
| @@ -1043,7 +1051,7 @@ static struct clk dpll_usb_m2_ck = { | |||
| 1043 | .clksel = dpll_usb_m2_div, | 1051 | .clksel = dpll_usb_m2_div, |
| 1044 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_USB, | 1052 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_USB, |
| 1045 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK, | 1053 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK, |
| 1046 | .ops = &clkops_null, | 1054 | .ops = &clkops_omap4_dpllmx_ops, |
| 1047 | .recalc = &omap2_clksel_recalc, | 1055 | .recalc = &omap2_clksel_recalc, |
| 1048 | .round_rate = &omap2_clksel_round_rate, | 1056 | .round_rate = &omap2_clksel_round_rate, |
| 1049 | .set_rate = &omap2_clksel_set_rate, | 1057 | .set_rate = &omap2_clksel_set_rate, |
| @@ -3158,11 +3166,11 @@ static struct omap_clk omap44xx_clks[] = { | |||
| 3158 | CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_443X), | 3166 | CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_443X), |
| 3159 | CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_443X), | 3167 | CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_443X), |
| 3160 | CLK("omap2_mcspi.4", "fck", &mcspi4_fck, CK_443X), | 3168 | CLK("omap2_mcspi.4", "fck", &mcspi4_fck, CK_443X), |
| 3161 | CLK("mmci-omap-hs.0", "fck", &mmc1_fck, CK_443X), | 3169 | CLK("omap_hsmmc.0", "fck", &mmc1_fck, CK_443X), |
| 3162 | CLK("mmci-omap-hs.1", "fck", &mmc2_fck, CK_443X), | 3170 | CLK("omap_hsmmc.1", "fck", &mmc2_fck, CK_443X), |
| 3163 | CLK("mmci-omap-hs.2", "fck", &mmc3_fck, CK_443X), | 3171 | CLK("omap_hsmmc.2", "fck", &mmc3_fck, CK_443X), |
| 3164 | CLK("mmci-omap-hs.3", "fck", &mmc4_fck, CK_443X), | 3172 | CLK("omap_hsmmc.3", "fck", &mmc4_fck, CK_443X), |
| 3165 | CLK("mmci-omap-hs.4", "fck", &mmc5_fck, CK_443X), | 3173 | CLK("omap_hsmmc.4", "fck", &mmc5_fck, CK_443X), |
| 3166 | CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X), | 3174 | CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X), |
| 3167 | CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X), | 3175 | CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X), |
| 3168 | CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X), | 3176 | CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X), |
| @@ -3245,11 +3253,11 @@ static struct omap_clk omap44xx_clks[] = { | |||
| 3245 | CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X), | 3253 | CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X), |
| 3246 | CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X), | 3254 | CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X), |
| 3247 | CLK("omap_i2c.4", "ick", &dummy_ck, CK_443X), | 3255 | CLK("omap_i2c.4", "ick", &dummy_ck, CK_443X), |
| 3248 | CLK("mmci-omap-hs.0", "ick", &dummy_ck, CK_443X), | 3256 | CLK("omap_hsmmc.0", "ick", &dummy_ck, CK_443X), |
| 3249 | CLK("mmci-omap-hs.1", "ick", &dummy_ck, CK_443X), | 3257 | CLK("omap_hsmmc.1", "ick", &dummy_ck, CK_443X), |
| 3250 | CLK("mmci-omap-hs.2", "ick", &dummy_ck, CK_443X), | 3258 | CLK("omap_hsmmc.2", "ick", &dummy_ck, CK_443X), |
| 3251 | CLK("mmci-omap-hs.3", "ick", &dummy_ck, CK_443X), | 3259 | CLK("omap_hsmmc.3", "ick", &dummy_ck, CK_443X), |
| 3252 | CLK("mmci-omap-hs.4", "ick", &dummy_ck, CK_443X), | 3260 | CLK("omap_hsmmc.4", "ick", &dummy_ck, CK_443X), |
| 3253 | CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_443X), | 3261 | CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_443X), |
| 3254 | CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X), | 3262 | CLK("omap-mcbsp.2", "ick", &dummy_ck, CK_443X), |
| 3255 | CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X), | 3263 | CLK("omap-mcbsp.3", "ick", &dummy_ck, CK_443X), |
| @@ -3301,6 +3309,9 @@ int __init omap4xxx_clk_init(void) | |||
| 3301 | omap2_init_clk_clkdm(c->lk.clk); | 3309 | omap2_init_clk_clkdm(c->lk.clk); |
| 3302 | } | 3310 | } |
| 3303 | 3311 | ||
| 3312 | /* Disable autoidle on all clocks; let the PM code enable it later */ | ||
| 3313 | omap_clk_disable_autoidle_all(); | ||
| 3314 | |||
| 3304 | recalculate_root_clocks(); | 3315 | recalculate_root_clocks(); |
| 3305 | 3316 | ||
| 3306 | /* | 3317 | /* |
diff --git a/arch/arm/mach-omap2/clock_common_data.c b/arch/arm/mach-omap2/clock_common_data.c index 1cf8131205fa..6424d46be14a 100644 --- a/arch/arm/mach-omap2/clock_common_data.c +++ b/arch/arm/mach-omap2/clock_common_data.c | |||
| @@ -37,3 +37,9 @@ const struct clksel_rate gfx_l3_rates[] = { | |||
| 37 | { .div = 0 } | 37 | { .div = 0 } |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | const struct clksel_rate dsp_ick_rates[] = { | ||
| 41 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, | ||
| 42 | { .div = 2, .val = 2, .flags = RATE_IN_24XX }, | ||
| 43 | { .div = 3, .val = 3, .flags = RATE_IN_243X }, | ||
| 44 | { .div = 0 }, | ||
| 45 | }; | ||
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index 58e42f76603f..ab878545bd9b 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
| @@ -26,17 +26,8 @@ | |||
| 26 | 26 | ||
| 27 | #include <linux/bitops.h> | 27 | #include <linux/bitops.h> |
| 28 | 28 | ||
| 29 | #include "prm2xxx_3xxx.h" | ||
| 30 | #include "prm-regbits-24xx.h" | ||
| 31 | #include "cm2xxx_3xxx.h" | ||
| 32 | #include "cm-regbits-24xx.h" | ||
| 33 | #include "cminst44xx.h" | ||
| 34 | #include "prcm44xx.h" | ||
| 35 | |||
| 36 | #include <plat/clock.h> | 29 | #include <plat/clock.h> |
| 37 | #include "powerdomain.h" | ||
| 38 | #include "clockdomain.h" | 30 | #include "clockdomain.h" |
| 39 | #include <plat/prcm.h> | ||
| 40 | 31 | ||
| 41 | /* clkdm_list contains all registered struct clockdomains */ | 32 | /* clkdm_list contains all registered struct clockdomains */ |
| 42 | static LIST_HEAD(clkdm_list); | 33 | static LIST_HEAD(clkdm_list); |
| @@ -44,6 +35,7 @@ static LIST_HEAD(clkdm_list); | |||
| 44 | /* array of clockdomain deps to be added/removed when clkdm in hwsup mode */ | 35 | /* array of clockdomain deps to be added/removed when clkdm in hwsup mode */ |
| 45 | static struct clkdm_autodep *autodeps; | 36 | static struct clkdm_autodep *autodeps; |
| 46 | 37 | ||
| 38 | static struct clkdm_ops *arch_clkdm; | ||
| 47 | 39 | ||
| 48 | /* Private functions */ | 40 | /* Private functions */ |
| 49 | 41 | ||
| @@ -177,11 +169,11 @@ static void _autodep_lookup(struct clkdm_autodep *autodep) | |||
| 177 | * XXX autodeps are deprecated and should be removed at the earliest | 169 | * XXX autodeps are deprecated and should be removed at the earliest |
| 178 | * opportunity | 170 | * opportunity |
| 179 | */ | 171 | */ |
| 180 | static void _clkdm_add_autodeps(struct clockdomain *clkdm) | 172 | void _clkdm_add_autodeps(struct clockdomain *clkdm) |
| 181 | { | 173 | { |
| 182 | struct clkdm_autodep *autodep; | 174 | struct clkdm_autodep *autodep; |
| 183 | 175 | ||
| 184 | if (!autodeps) | 176 | if (!autodeps || clkdm->flags & CLKDM_NO_AUTODEPS) |
| 185 | return; | 177 | return; |
| 186 | 178 | ||
| 187 | for (autodep = autodeps; autodep->clkdm.ptr; autodep++) { | 179 | for (autodep = autodeps; autodep->clkdm.ptr; autodep++) { |
| @@ -211,11 +203,11 @@ static void _clkdm_add_autodeps(struct clockdomain *clkdm) | |||
| 211 | * XXX autodeps are deprecated and should be removed at the earliest | 203 | * XXX autodeps are deprecated and should be removed at the earliest |
| 212 | * opportunity | 204 | * opportunity |
| 213 | */ | 205 | */ |
| 214 | static void _clkdm_del_autodeps(struct clockdomain *clkdm) | 206 | void _clkdm_del_autodeps(struct clockdomain *clkdm) |
| 215 | { | 207 | { |
| 216 | struct clkdm_autodep *autodep; | 208 | struct clkdm_autodep *autodep; |
| 217 | 209 | ||
| 218 | if (!autodeps) | 210 | if (!autodeps || clkdm->flags & CLKDM_NO_AUTODEPS) |
| 219 | return; | 211 | return; |
| 220 | 212 | ||
| 221 | for (autodep = autodeps; autodep->clkdm.ptr; autodep++) { | 213 | for (autodep = autodeps; autodep->clkdm.ptr; autodep++) { |
| @@ -235,55 +227,29 @@ static void _clkdm_del_autodeps(struct clockdomain *clkdm) | |||
| 235 | } | 227 | } |
| 236 | 228 | ||
| 237 | /** | 229 | /** |
| 238 | * _enable_hwsup - place a clockdomain into hardware-supervised idle | 230 | * _resolve_clkdm_deps() - resolve clkdm_names in @clkdm_deps to clkdms |
| 239 | * @clkdm: struct clockdomain * | 231 | * @clkdm: clockdomain that we are resolving dependencies for |
| 240 | * | 232 | * @clkdm_deps: ptr to array of struct clkdm_deps to resolve |
| 241 | * Place the clockdomain into hardware-supervised idle mode. No return | ||
| 242 | * value. | ||
| 243 | * | 233 | * |
| 244 | * XXX Should this return an error if the clockdomain does not support | 234 | * Iterates through @clkdm_deps, looking up the struct clockdomain named by |
| 245 | * hardware-supervised idle mode? | 235 | * clkdm_name and storing the clockdomain pointer in the struct clkdm_dep. |
| 246 | */ | ||
| 247 | static void _enable_hwsup(struct clockdomain *clkdm) | ||
| 248 | { | ||
| 249 | if (cpu_is_omap24xx()) | ||
| 250 | omap2xxx_cm_clkdm_enable_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 251 | clkdm->clktrctrl_mask); | ||
| 252 | else if (cpu_is_omap34xx()) | ||
| 253 | omap3xxx_cm_clkdm_enable_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 254 | clkdm->clktrctrl_mask); | ||
| 255 | else if (cpu_is_omap44xx()) | ||
| 256 | return omap4_cminst_clkdm_enable_hwsup(clkdm->prcm_partition, | ||
| 257 | clkdm->cm_inst, | ||
| 258 | clkdm->clkdm_offs); | ||
| 259 | else | ||
| 260 | BUG(); | ||
| 261 | } | ||
| 262 | |||
| 263 | /** | ||
| 264 | * _disable_hwsup - place a clockdomain into software-supervised idle | ||
| 265 | * @clkdm: struct clockdomain * | ||
| 266 | * | ||
| 267 | * Place the clockdomain @clkdm into software-supervised idle mode. | ||
| 268 | * No return value. | 236 | * No return value. |
| 269 | * | ||
| 270 | * XXX Should this return an error if the clockdomain does not support | ||
| 271 | * software-supervised idle mode? | ||
| 272 | */ | 237 | */ |
| 273 | static void _disable_hwsup(struct clockdomain *clkdm) | 238 | static void _resolve_clkdm_deps(struct clockdomain *clkdm, |
| 239 | struct clkdm_dep *clkdm_deps) | ||
| 274 | { | 240 | { |
| 275 | if (cpu_is_omap24xx()) | 241 | struct clkdm_dep *cd; |
| 276 | omap2xxx_cm_clkdm_disable_hwsup(clkdm->pwrdm.ptr->prcm_offs, | 242 | |
| 277 | clkdm->clktrctrl_mask); | 243 | for (cd = clkdm_deps; cd && cd->clkdm_name; cd++) { |
| 278 | else if (cpu_is_omap34xx()) | 244 | if (!omap_chip_is(cd->omap_chip)) |
| 279 | omap3xxx_cm_clkdm_disable_hwsup(clkdm->pwrdm.ptr->prcm_offs, | 245 | continue; |
| 280 | clkdm->clktrctrl_mask); | 246 | if (cd->clkdm) |
| 281 | else if (cpu_is_omap44xx()) | 247 | continue; |
| 282 | return omap4_cminst_clkdm_disable_hwsup(clkdm->prcm_partition, | 248 | cd->clkdm = _clkdm_lookup(cd->clkdm_name); |
| 283 | clkdm->cm_inst, | 249 | |
| 284 | clkdm->clkdm_offs); | 250 | WARN(!cd->clkdm, "clockdomain: %s: could not find clkdm %s while resolving dependencies - should never happen", |
| 285 | else | 251 | clkdm->name, cd->clkdm_name); |
| 286 | BUG(); | 252 | } |
| 287 | } | 253 | } |
| 288 | 254 | ||
| 289 | /* Public functions */ | 255 | /* Public functions */ |
| @@ -292,6 +258,7 @@ static void _disable_hwsup(struct clockdomain *clkdm) | |||
| 292 | * clkdm_init - set up the clockdomain layer | 258 | * clkdm_init - set up the clockdomain layer |
| 293 | * @clkdms: optional pointer to an array of clockdomains to register | 259 | * @clkdms: optional pointer to an array of clockdomains to register |
| 294 | * @init_autodeps: optional pointer to an array of autodeps to register | 260 | * @init_autodeps: optional pointer to an array of autodeps to register |
| 261 | * @custom_funcs: func pointers for arch specfic implementations | ||
| 295 | * | 262 | * |
| 296 | * Set up internal state. If a pointer to an array of clockdomains | 263 | * Set up internal state. If a pointer to an array of clockdomains |
| 297 | * @clkdms was supplied, loop through the list of clockdomains, | 264 | * @clkdms was supplied, loop through the list of clockdomains, |
| @@ -300,12 +267,18 @@ static void _disable_hwsup(struct clockdomain *clkdm) | |||
| 300 | * @init_autodeps was provided, register those. No return value. | 267 | * @init_autodeps was provided, register those. No return value. |
| 301 | */ | 268 | */ |
| 302 | void clkdm_init(struct clockdomain **clkdms, | 269 | void clkdm_init(struct clockdomain **clkdms, |
| 303 | struct clkdm_autodep *init_autodeps) | 270 | struct clkdm_autodep *init_autodeps, |
| 271 | struct clkdm_ops *custom_funcs) | ||
| 304 | { | 272 | { |
| 305 | struct clockdomain **c = NULL; | 273 | struct clockdomain **c = NULL; |
| 306 | struct clockdomain *clkdm; | 274 | struct clockdomain *clkdm; |
| 307 | struct clkdm_autodep *autodep = NULL; | 275 | struct clkdm_autodep *autodep = NULL; |
| 308 | 276 | ||
| 277 | if (!custom_funcs) | ||
| 278 | WARN(1, "No custom clkdm functions registered\n"); | ||
| 279 | else | ||
| 280 | arch_clkdm = custom_funcs; | ||
| 281 | |||
| 309 | if (clkdms) | 282 | if (clkdms) |
| 310 | for (c = clkdms; *c; c++) | 283 | for (c = clkdms; *c; c++) |
| 311 | _clkdm_register(*c); | 284 | _clkdm_register(*c); |
| @@ -321,11 +294,14 @@ void clkdm_init(struct clockdomain **clkdms, | |||
| 321 | */ | 294 | */ |
| 322 | list_for_each_entry(clkdm, &clkdm_list, node) { | 295 | list_for_each_entry(clkdm, &clkdm_list, node) { |
| 323 | if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP) | 296 | if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP) |
| 324 | omap2_clkdm_wakeup(clkdm); | 297 | clkdm_wakeup(clkdm); |
| 325 | else if (clkdm->flags & CLKDM_CAN_DISABLE_AUTO) | 298 | else if (clkdm->flags & CLKDM_CAN_DISABLE_AUTO) |
| 326 | omap2_clkdm_deny_idle(clkdm); | 299 | clkdm_deny_idle(clkdm); |
| 327 | 300 | ||
| 301 | _resolve_clkdm_deps(clkdm, clkdm->wkdep_srcs); | ||
| 328 | clkdm_clear_all_wkdeps(clkdm); | 302 | clkdm_clear_all_wkdeps(clkdm); |
| 303 | |||
| 304 | _resolve_clkdm_deps(clkdm, clkdm->sleepdep_srcs); | ||
| 329 | clkdm_clear_all_sleepdeps(clkdm); | 305 | clkdm_clear_all_sleepdeps(clkdm); |
| 330 | } | 306 | } |
| 331 | } | 307 | } |
| @@ -422,32 +398,32 @@ struct powerdomain *clkdm_get_pwrdm(struct clockdomain *clkdm) | |||
| 422 | int clkdm_add_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | 398 | int clkdm_add_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) |
| 423 | { | 399 | { |
| 424 | struct clkdm_dep *cd; | 400 | struct clkdm_dep *cd; |
| 425 | 401 | int ret = 0; | |
| 426 | if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) { | ||
| 427 | pr_err("clockdomain: %s/%s: %s: not yet implemented\n", | ||
| 428 | clkdm1->name, clkdm2->name, __func__); | ||
| 429 | return -EINVAL; | ||
| 430 | } | ||
| 431 | 402 | ||
| 432 | if (!clkdm1 || !clkdm2) | 403 | if (!clkdm1 || !clkdm2) |
| 433 | return -EINVAL; | 404 | return -EINVAL; |
| 434 | 405 | ||
| 435 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->wkdep_srcs); | 406 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->wkdep_srcs); |
| 436 | if (IS_ERR(cd)) { | 407 | if (IS_ERR(cd)) |
| 408 | ret = PTR_ERR(cd); | ||
| 409 | |||
| 410 | if (!arch_clkdm || !arch_clkdm->clkdm_add_wkdep) | ||
| 411 | ret = -EINVAL; | ||
| 412 | |||
| 413 | if (ret) { | ||
| 437 | pr_debug("clockdomain: hardware cannot set/clear wake up of " | 414 | pr_debug("clockdomain: hardware cannot set/clear wake up of " |
| 438 | "%s when %s wakes up\n", clkdm1->name, clkdm2->name); | 415 | "%s when %s wakes up\n", clkdm1->name, clkdm2->name); |
| 439 | return PTR_ERR(cd); | 416 | return ret; |
| 440 | } | 417 | } |
| 441 | 418 | ||
| 442 | if (atomic_inc_return(&cd->wkdep_usecount) == 1) { | 419 | if (atomic_inc_return(&cd->wkdep_usecount) == 1) { |
| 443 | pr_debug("clockdomain: hardware will wake up %s when %s wakes " | 420 | pr_debug("clockdomain: hardware will wake up %s when %s wakes " |
| 444 | "up\n", clkdm1->name, clkdm2->name); | 421 | "up\n", clkdm1->name, clkdm2->name); |
| 445 | 422 | ||
| 446 | omap2_prm_set_mod_reg_bits((1 << clkdm2->dep_bit), | 423 | ret = arch_clkdm->clkdm_add_wkdep(clkdm1, clkdm2); |
| 447 | clkdm1->pwrdm.ptr->prcm_offs, PM_WKDEP); | ||
| 448 | } | 424 | } |
| 449 | 425 | ||
| 450 | return 0; | 426 | return ret; |
| 451 | } | 427 | } |
| 452 | 428 | ||
| 453 | /** | 429 | /** |
| @@ -463,32 +439,32 @@ int clkdm_add_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | |||
| 463 | int clkdm_del_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | 439 | int clkdm_del_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) |
| 464 | { | 440 | { |
| 465 | struct clkdm_dep *cd; | 441 | struct clkdm_dep *cd; |
| 466 | 442 | int ret = 0; | |
| 467 | if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) { | ||
| 468 | pr_err("clockdomain: %s/%s: %s: not yet implemented\n", | ||
| 469 | clkdm1->name, clkdm2->name, __func__); | ||
| 470 | return -EINVAL; | ||
| 471 | } | ||
| 472 | 443 | ||
| 473 | if (!clkdm1 || !clkdm2) | 444 | if (!clkdm1 || !clkdm2) |
| 474 | return -EINVAL; | 445 | return -EINVAL; |
| 475 | 446 | ||
| 476 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->wkdep_srcs); | 447 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->wkdep_srcs); |
| 477 | if (IS_ERR(cd)) { | 448 | if (IS_ERR(cd)) |
| 449 | ret = PTR_ERR(cd); | ||
| 450 | |||
| 451 | if (!arch_clkdm || !arch_clkdm->clkdm_del_wkdep) | ||
| 452 | ret = -EINVAL; | ||
| 453 | |||
| 454 | if (ret) { | ||
| 478 | pr_debug("clockdomain: hardware cannot set/clear wake up of " | 455 | pr_debug("clockdomain: hardware cannot set/clear wake up of " |
| 479 | "%s when %s wakes up\n", clkdm1->name, clkdm2->name); | 456 | "%s when %s wakes up\n", clkdm1->name, clkdm2->name); |
| 480 | return PTR_ERR(cd); | 457 | return ret; |
| 481 | } | 458 | } |
| 482 | 459 | ||
| 483 | if (atomic_dec_return(&cd->wkdep_usecount) == 0) { | 460 | if (atomic_dec_return(&cd->wkdep_usecount) == 0) { |
| 484 | pr_debug("clockdomain: hardware will no longer wake up %s " | 461 | pr_debug("clockdomain: hardware will no longer wake up %s " |
| 485 | "after %s wakes up\n", clkdm1->name, clkdm2->name); | 462 | "after %s wakes up\n", clkdm1->name, clkdm2->name); |
| 486 | 463 | ||
| 487 | omap2_prm_clear_mod_reg_bits((1 << clkdm2->dep_bit), | 464 | ret = arch_clkdm->clkdm_del_wkdep(clkdm1, clkdm2); |
| 488 | clkdm1->pwrdm.ptr->prcm_offs, PM_WKDEP); | ||
| 489 | } | 465 | } |
| 490 | 466 | ||
| 491 | return 0; | 467 | return ret; |
| 492 | } | 468 | } |
| 493 | 469 | ||
| 494 | /** | 470 | /** |
| @@ -508,26 +484,26 @@ int clkdm_del_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | |||
| 508 | int clkdm_read_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | 484 | int clkdm_read_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) |
| 509 | { | 485 | { |
| 510 | struct clkdm_dep *cd; | 486 | struct clkdm_dep *cd; |
| 487 | int ret = 0; | ||
| 511 | 488 | ||
| 512 | if (!clkdm1 || !clkdm2) | 489 | if (!clkdm1 || !clkdm2) |
| 513 | return -EINVAL; | 490 | return -EINVAL; |
| 514 | 491 | ||
| 515 | if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) { | ||
| 516 | pr_err("clockdomain: %s/%s: %s: not yet implemented\n", | ||
| 517 | clkdm1->name, clkdm2->name, __func__); | ||
| 518 | return -EINVAL; | ||
| 519 | } | ||
| 520 | |||
| 521 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->wkdep_srcs); | 492 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->wkdep_srcs); |
| 522 | if (IS_ERR(cd)) { | 493 | if (IS_ERR(cd)) |
| 494 | ret = PTR_ERR(cd); | ||
| 495 | |||
| 496 | if (!arch_clkdm || !arch_clkdm->clkdm_read_wkdep) | ||
| 497 | ret = -EINVAL; | ||
| 498 | |||
| 499 | if (ret) { | ||
| 523 | pr_debug("clockdomain: hardware cannot set/clear wake up of " | 500 | pr_debug("clockdomain: hardware cannot set/clear wake up of " |
| 524 | "%s when %s wakes up\n", clkdm1->name, clkdm2->name); | 501 | "%s when %s wakes up\n", clkdm1->name, clkdm2->name); |
| 525 | return PTR_ERR(cd); | 502 | return ret; |
| 526 | } | 503 | } |
| 527 | 504 | ||
| 528 | /* XXX It's faster to return the atomic wkdep_usecount */ | 505 | /* XXX It's faster to return the atomic wkdep_usecount */ |
| 529 | return omap2_prm_read_mod_bits_shift(clkdm1->pwrdm.ptr->prcm_offs, PM_WKDEP, | 506 | return arch_clkdm->clkdm_read_wkdep(clkdm1, clkdm2); |
| 530 | (1 << clkdm2->dep_bit)); | ||
| 531 | } | 507 | } |
| 532 | 508 | ||
| 533 | /** | 509 | /** |
| @@ -542,33 +518,13 @@ int clkdm_read_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | |||
| 542 | */ | 518 | */ |
| 543 | int clkdm_clear_all_wkdeps(struct clockdomain *clkdm) | 519 | int clkdm_clear_all_wkdeps(struct clockdomain *clkdm) |
| 544 | { | 520 | { |
| 545 | struct clkdm_dep *cd; | ||
| 546 | u32 mask = 0; | ||
| 547 | |||
| 548 | if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) { | ||
| 549 | pr_err("clockdomain: %s: %s: not yet implemented\n", | ||
| 550 | clkdm->name, __func__); | ||
| 551 | return -EINVAL; | ||
| 552 | } | ||
| 553 | |||
| 554 | if (!clkdm) | 521 | if (!clkdm) |
| 555 | return -EINVAL; | 522 | return -EINVAL; |
| 556 | 523 | ||
| 557 | for (cd = clkdm->wkdep_srcs; cd && cd->clkdm_name; cd++) { | 524 | if (!arch_clkdm || !arch_clkdm->clkdm_clear_all_wkdeps) |
| 558 | if (!omap_chip_is(cd->omap_chip)) | 525 | return -EINVAL; |
| 559 | continue; | ||
| 560 | |||
| 561 | if (!cd->clkdm && cd->clkdm_name) | ||
| 562 | cd->clkdm = _clkdm_lookup(cd->clkdm_name); | ||
| 563 | |||
| 564 | /* PRM accesses are slow, so minimize them */ | ||
| 565 | mask |= 1 << cd->clkdm->dep_bit; | ||
| 566 | atomic_set(&cd->wkdep_usecount, 0); | ||
| 567 | } | ||
| 568 | |||
| 569 | omap2_prm_clear_mod_reg_bits(mask, clkdm->pwrdm.ptr->prcm_offs, PM_WKDEP); | ||
| 570 | 526 | ||
| 571 | return 0; | 527 | return arch_clkdm->clkdm_clear_all_wkdeps(clkdm); |
| 572 | } | 528 | } |
| 573 | 529 | ||
| 574 | /** | 530 | /** |
| @@ -586,31 +542,33 @@ int clkdm_clear_all_wkdeps(struct clockdomain *clkdm) | |||
| 586 | int clkdm_add_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | 542 | int clkdm_add_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) |
| 587 | { | 543 | { |
| 588 | struct clkdm_dep *cd; | 544 | struct clkdm_dep *cd; |
| 589 | 545 | int ret = 0; | |
| 590 | if (!cpu_is_omap34xx()) | ||
| 591 | return -EINVAL; | ||
| 592 | 546 | ||
| 593 | if (!clkdm1 || !clkdm2) | 547 | if (!clkdm1 || !clkdm2) |
| 594 | return -EINVAL; | 548 | return -EINVAL; |
| 595 | 549 | ||
| 596 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->sleepdep_srcs); | 550 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->sleepdep_srcs); |
| 597 | if (IS_ERR(cd)) { | 551 | if (IS_ERR(cd)) |
| 552 | ret = PTR_ERR(cd); | ||
| 553 | |||
| 554 | if (!arch_clkdm || !arch_clkdm->clkdm_add_sleepdep) | ||
| 555 | ret = -EINVAL; | ||
| 556 | |||
| 557 | if (ret) { | ||
| 598 | pr_debug("clockdomain: hardware cannot set/clear sleep " | 558 | pr_debug("clockdomain: hardware cannot set/clear sleep " |
| 599 | "dependency affecting %s from %s\n", clkdm1->name, | 559 | "dependency affecting %s from %s\n", clkdm1->name, |
| 600 | clkdm2->name); | 560 | clkdm2->name); |
| 601 | return PTR_ERR(cd); | 561 | return ret; |
| 602 | } | 562 | } |
| 603 | 563 | ||
| 604 | if (atomic_inc_return(&cd->sleepdep_usecount) == 1) { | 564 | if (atomic_inc_return(&cd->sleepdep_usecount) == 1) { |
| 605 | pr_debug("clockdomain: will prevent %s from sleeping if %s " | 565 | pr_debug("clockdomain: will prevent %s from sleeping if %s " |
| 606 | "is active\n", clkdm1->name, clkdm2->name); | 566 | "is active\n", clkdm1->name, clkdm2->name); |
| 607 | 567 | ||
| 608 | omap2_cm_set_mod_reg_bits((1 << clkdm2->dep_bit), | 568 | ret = arch_clkdm->clkdm_add_sleepdep(clkdm1, clkdm2); |
| 609 | clkdm1->pwrdm.ptr->prcm_offs, | ||
| 610 | OMAP3430_CM_SLEEPDEP); | ||
| 611 | } | 569 | } |
| 612 | 570 | ||
| 613 | return 0; | 571 | return ret; |
| 614 | } | 572 | } |
| 615 | 573 | ||
| 616 | /** | 574 | /** |
| @@ -628,19 +586,23 @@ int clkdm_add_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | |||
| 628 | int clkdm_del_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | 586 | int clkdm_del_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) |
| 629 | { | 587 | { |
| 630 | struct clkdm_dep *cd; | 588 | struct clkdm_dep *cd; |
| 631 | 589 | int ret = 0; | |
| 632 | if (!cpu_is_omap34xx()) | ||
| 633 | return -EINVAL; | ||
| 634 | 590 | ||
| 635 | if (!clkdm1 || !clkdm2) | 591 | if (!clkdm1 || !clkdm2) |
| 636 | return -EINVAL; | 592 | return -EINVAL; |
| 637 | 593 | ||
| 638 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->sleepdep_srcs); | 594 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->sleepdep_srcs); |
| 639 | if (IS_ERR(cd)) { | 595 | if (IS_ERR(cd)) |
| 596 | ret = PTR_ERR(cd); | ||
| 597 | |||
| 598 | if (!arch_clkdm || !arch_clkdm->clkdm_del_sleepdep) | ||
| 599 | ret = -EINVAL; | ||
| 600 | |||
| 601 | if (ret) { | ||
| 640 | pr_debug("clockdomain: hardware cannot set/clear sleep " | 602 | pr_debug("clockdomain: hardware cannot set/clear sleep " |
| 641 | "dependency affecting %s from %s\n", clkdm1->name, | 603 | "dependency affecting %s from %s\n", clkdm1->name, |
| 642 | clkdm2->name); | 604 | clkdm2->name); |
| 643 | return PTR_ERR(cd); | 605 | return ret; |
| 644 | } | 606 | } |
| 645 | 607 | ||
| 646 | if (atomic_dec_return(&cd->sleepdep_usecount) == 0) { | 608 | if (atomic_dec_return(&cd->sleepdep_usecount) == 0) { |
| @@ -648,12 +610,10 @@ int clkdm_del_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | |||
| 648 | "sleeping if %s is active\n", clkdm1->name, | 610 | "sleeping if %s is active\n", clkdm1->name, |
| 649 | clkdm2->name); | 611 | clkdm2->name); |
| 650 | 612 | ||
| 651 | omap2_cm_clear_mod_reg_bits((1 << clkdm2->dep_bit), | 613 | ret = arch_clkdm->clkdm_del_sleepdep(clkdm1, clkdm2); |
| 652 | clkdm1->pwrdm.ptr->prcm_offs, | ||
| 653 | OMAP3430_CM_SLEEPDEP); | ||
| 654 | } | 614 | } |
| 655 | 615 | ||
| 656 | return 0; | 616 | return ret; |
| 657 | } | 617 | } |
| 658 | 618 | ||
| 659 | /** | 619 | /** |
| @@ -675,25 +635,27 @@ int clkdm_del_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | |||
| 675 | int clkdm_read_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | 635 | int clkdm_read_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) |
| 676 | { | 636 | { |
| 677 | struct clkdm_dep *cd; | 637 | struct clkdm_dep *cd; |
| 678 | 638 | int ret = 0; | |
| 679 | if (!cpu_is_omap34xx()) | ||
| 680 | return -EINVAL; | ||
| 681 | 639 | ||
| 682 | if (!clkdm1 || !clkdm2) | 640 | if (!clkdm1 || !clkdm2) |
| 683 | return -EINVAL; | 641 | return -EINVAL; |
| 684 | 642 | ||
| 685 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->sleepdep_srcs); | 643 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->sleepdep_srcs); |
| 686 | if (IS_ERR(cd)) { | 644 | if (IS_ERR(cd)) |
| 645 | ret = PTR_ERR(cd); | ||
| 646 | |||
| 647 | if (!arch_clkdm || !arch_clkdm->clkdm_read_sleepdep) | ||
| 648 | ret = -EINVAL; | ||
| 649 | |||
| 650 | if (ret) { | ||
| 687 | pr_debug("clockdomain: hardware cannot set/clear sleep " | 651 | pr_debug("clockdomain: hardware cannot set/clear sleep " |
| 688 | "dependency affecting %s from %s\n", clkdm1->name, | 652 | "dependency affecting %s from %s\n", clkdm1->name, |
| 689 | clkdm2->name); | 653 | clkdm2->name); |
| 690 | return PTR_ERR(cd); | 654 | return ret; |
| 691 | } | 655 | } |
| 692 | 656 | ||
| 693 | /* XXX It's faster to return the atomic sleepdep_usecount */ | 657 | /* XXX It's faster to return the atomic sleepdep_usecount */ |
| 694 | return omap2_prm_read_mod_bits_shift(clkdm1->pwrdm.ptr->prcm_offs, | 658 | return arch_clkdm->clkdm_read_sleepdep(clkdm1, clkdm2); |
| 695 | OMAP3430_CM_SLEEPDEP, | ||
| 696 | (1 << clkdm2->dep_bit)); | ||
| 697 | } | 659 | } |
| 698 | 660 | ||
| 699 | /** | 661 | /** |
| @@ -708,35 +670,17 @@ int clkdm_read_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | |||
| 708 | */ | 670 | */ |
| 709 | int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm) | 671 | int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm) |
| 710 | { | 672 | { |
| 711 | struct clkdm_dep *cd; | ||
| 712 | u32 mask = 0; | ||
| 713 | |||
| 714 | if (!cpu_is_omap34xx()) | ||
| 715 | return -EINVAL; | ||
| 716 | |||
| 717 | if (!clkdm) | 673 | if (!clkdm) |
| 718 | return -EINVAL; | 674 | return -EINVAL; |
| 719 | 675 | ||
| 720 | for (cd = clkdm->sleepdep_srcs; cd && cd->clkdm_name; cd++) { | 676 | if (!arch_clkdm || !arch_clkdm->clkdm_clear_all_sleepdeps) |
| 721 | if (!omap_chip_is(cd->omap_chip)) | 677 | return -EINVAL; |
| 722 | continue; | ||
| 723 | |||
| 724 | if (!cd->clkdm && cd->clkdm_name) | ||
| 725 | cd->clkdm = _clkdm_lookup(cd->clkdm_name); | ||
| 726 | |||
| 727 | /* PRM accesses are slow, so minimize them */ | ||
| 728 | mask |= 1 << cd->clkdm->dep_bit; | ||
| 729 | atomic_set(&cd->sleepdep_usecount, 0); | ||
| 730 | } | ||
| 731 | |||
| 732 | omap2_prm_clear_mod_reg_bits(mask, clkdm->pwrdm.ptr->prcm_offs, | ||
| 733 | OMAP3430_CM_SLEEPDEP); | ||
| 734 | 678 | ||
| 735 | return 0; | 679 | return arch_clkdm->clkdm_clear_all_sleepdeps(clkdm); |
| 736 | } | 680 | } |
| 737 | 681 | ||
| 738 | /** | 682 | /** |
| 739 | * omap2_clkdm_sleep - force clockdomain sleep transition | 683 | * clkdm_sleep - force clockdomain sleep transition |
| 740 | * @clkdm: struct clockdomain * | 684 | * @clkdm: struct clockdomain * |
| 741 | * | 685 | * |
| 742 | * Instruct the CM to force a sleep transition on the specified | 686 | * Instruct the CM to force a sleep transition on the specified |
| @@ -744,7 +688,7 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm) | |||
| 744 | * clockdomain does not support software-initiated sleep; 0 upon | 688 | * clockdomain does not support software-initiated sleep; 0 upon |
| 745 | * success. | 689 | * success. |
| 746 | */ | 690 | */ |
| 747 | int omap2_clkdm_sleep(struct clockdomain *clkdm) | 691 | int clkdm_sleep(struct clockdomain *clkdm) |
| 748 | { | 692 | { |
| 749 | if (!clkdm) | 693 | if (!clkdm) |
| 750 | return -EINVAL; | 694 | return -EINVAL; |
| @@ -755,33 +699,16 @@ int omap2_clkdm_sleep(struct clockdomain *clkdm) | |||
| 755 | return -EINVAL; | 699 | return -EINVAL; |
| 756 | } | 700 | } |
| 757 | 701 | ||
| 758 | pr_debug("clockdomain: forcing sleep on %s\n", clkdm->name); | 702 | if (!arch_clkdm || !arch_clkdm->clkdm_sleep) |
| 759 | 703 | return -EINVAL; | |
| 760 | if (cpu_is_omap24xx()) { | ||
| 761 | |||
| 762 | omap2_cm_set_mod_reg_bits(OMAP24XX_FORCESTATE_MASK, | ||
| 763 | clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); | ||
| 764 | |||
| 765 | } else if (cpu_is_omap34xx()) { | ||
| 766 | |||
| 767 | omap3xxx_cm_clkdm_force_sleep(clkdm->pwrdm.ptr->prcm_offs, | ||
| 768 | clkdm->clktrctrl_mask); | ||
| 769 | |||
| 770 | } else if (cpu_is_omap44xx()) { | ||
| 771 | |||
| 772 | omap4_cminst_clkdm_force_sleep(clkdm->prcm_partition, | ||
| 773 | clkdm->cm_inst, | ||
| 774 | clkdm->clkdm_offs); | ||
| 775 | 704 | ||
| 776 | } else { | 705 | pr_debug("clockdomain: forcing sleep on %s\n", clkdm->name); |
| 777 | BUG(); | ||
| 778 | }; | ||
| 779 | 706 | ||
| 780 | return 0; | 707 | return arch_clkdm->clkdm_sleep(clkdm); |
| 781 | } | 708 | } |
| 782 | 709 | ||
| 783 | /** | 710 | /** |
| 784 | * omap2_clkdm_wakeup - force clockdomain wakeup transition | 711 | * clkdm_wakeup - force clockdomain wakeup transition |
| 785 | * @clkdm: struct clockdomain * | 712 | * @clkdm: struct clockdomain * |
| 786 | * | 713 | * |
| 787 | * Instruct the CM to force a wakeup transition on the specified | 714 | * Instruct the CM to force a wakeup transition on the specified |
| @@ -789,7 +716,7 @@ int omap2_clkdm_sleep(struct clockdomain *clkdm) | |||
| 789 | * clockdomain does not support software-controlled wakeup; 0 upon | 716 | * clockdomain does not support software-controlled wakeup; 0 upon |
| 790 | * success. | 717 | * success. |
| 791 | */ | 718 | */ |
| 792 | int omap2_clkdm_wakeup(struct clockdomain *clkdm) | 719 | int clkdm_wakeup(struct clockdomain *clkdm) |
| 793 | { | 720 | { |
| 794 | if (!clkdm) | 721 | if (!clkdm) |
| 795 | return -EINVAL; | 722 | return -EINVAL; |
| @@ -800,33 +727,16 @@ int omap2_clkdm_wakeup(struct clockdomain *clkdm) | |||
| 800 | return -EINVAL; | 727 | return -EINVAL; |
| 801 | } | 728 | } |
| 802 | 729 | ||
| 803 | pr_debug("clockdomain: forcing wakeup on %s\n", clkdm->name); | 730 | if (!arch_clkdm || !arch_clkdm->clkdm_wakeup) |
| 804 | 731 | return -EINVAL; | |
| 805 | if (cpu_is_omap24xx()) { | ||
| 806 | |||
| 807 | omap2_cm_clear_mod_reg_bits(OMAP24XX_FORCESTATE_MASK, | ||
| 808 | clkdm->pwrdm.ptr->prcm_offs, OMAP2_PM_PWSTCTRL); | ||
| 809 | |||
| 810 | } else if (cpu_is_omap34xx()) { | ||
| 811 | |||
| 812 | omap3xxx_cm_clkdm_force_wakeup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 813 | clkdm->clktrctrl_mask); | ||
| 814 | |||
| 815 | } else if (cpu_is_omap44xx()) { | ||
| 816 | |||
| 817 | omap4_cminst_clkdm_force_wakeup(clkdm->prcm_partition, | ||
| 818 | clkdm->cm_inst, | ||
| 819 | clkdm->clkdm_offs); | ||
| 820 | 732 | ||
| 821 | } else { | 733 | pr_debug("clockdomain: forcing wakeup on %s\n", clkdm->name); |
| 822 | BUG(); | ||
| 823 | }; | ||
| 824 | 734 | ||
| 825 | return 0; | 735 | return arch_clkdm->clkdm_wakeup(clkdm); |
| 826 | } | 736 | } |
| 827 | 737 | ||
| 828 | /** | 738 | /** |
| 829 | * omap2_clkdm_allow_idle - enable hwsup idle transitions for clkdm | 739 | * clkdm_allow_idle - enable hwsup idle transitions for clkdm |
| 830 | * @clkdm: struct clockdomain * | 740 | * @clkdm: struct clockdomain * |
| 831 | * | 741 | * |
| 832 | * Allow the hardware to automatically switch the clockdomain @clkdm into | 742 | * Allow the hardware to automatically switch the clockdomain @clkdm into |
| @@ -835,7 +745,7 @@ int omap2_clkdm_wakeup(struct clockdomain *clkdm) | |||
| 835 | * framework, wkdep/sleepdep autodependencies are added; this is so | 745 | * framework, wkdep/sleepdep autodependencies are added; this is so |
| 836 | * device drivers can read and write to the device. No return value. | 746 | * device drivers can read and write to the device. No return value. |
| 837 | */ | 747 | */ |
| 838 | void omap2_clkdm_allow_idle(struct clockdomain *clkdm) | 748 | void clkdm_allow_idle(struct clockdomain *clkdm) |
| 839 | { | 749 | { |
| 840 | if (!clkdm) | 750 | if (!clkdm) |
| 841 | return; | 751 | return; |
| @@ -846,27 +756,18 @@ void omap2_clkdm_allow_idle(struct clockdomain *clkdm) | |||
| 846 | return; | 756 | return; |
| 847 | } | 757 | } |
| 848 | 758 | ||
| 759 | if (!arch_clkdm || !arch_clkdm->clkdm_allow_idle) | ||
| 760 | return; | ||
| 761 | |||
| 849 | pr_debug("clockdomain: enabling automatic idle transitions for %s\n", | 762 | pr_debug("clockdomain: enabling automatic idle transitions for %s\n", |
| 850 | clkdm->name); | 763 | clkdm->name); |
| 851 | 764 | ||
| 852 | /* | 765 | arch_clkdm->clkdm_allow_idle(clkdm); |
| 853 | * XXX This should be removed once TI adds wakeup/sleep | ||
| 854 | * dependency code and data for OMAP4. | ||
| 855 | */ | ||
| 856 | if (cpu_is_omap44xx()) { | ||
| 857 | pr_err("clockdomain: %s: OMAP4 wakeup/sleep dependency support: not yet implemented\n", clkdm->name); | ||
| 858 | } else { | ||
| 859 | if (atomic_read(&clkdm->usecount) > 0) | ||
| 860 | _clkdm_add_autodeps(clkdm); | ||
| 861 | } | ||
| 862 | |||
| 863 | _enable_hwsup(clkdm); | ||
| 864 | |||
| 865 | pwrdm_clkdm_state_switch(clkdm); | 766 | pwrdm_clkdm_state_switch(clkdm); |
| 866 | } | 767 | } |
| 867 | 768 | ||
| 868 | /** | 769 | /** |
| 869 | * omap2_clkdm_deny_idle - disable hwsup idle transitions for clkdm | 770 | * clkdm_deny_idle - disable hwsup idle transitions for clkdm |
| 870 | * @clkdm: struct clockdomain * | 771 | * @clkdm: struct clockdomain * |
| 871 | * | 772 | * |
| 872 | * Prevent the hardware from automatically switching the clockdomain | 773 | * Prevent the hardware from automatically switching the clockdomain |
| @@ -874,7 +775,7 @@ void omap2_clkdm_allow_idle(struct clockdomain *clkdm) | |||
| 874 | * downstream clocks enabled in the clock framework, wkdep/sleepdep | 775 | * downstream clocks enabled in the clock framework, wkdep/sleepdep |
| 875 | * autodependencies are removed. No return value. | 776 | * autodependencies are removed. No return value. |
| 876 | */ | 777 | */ |
| 877 | void omap2_clkdm_deny_idle(struct clockdomain *clkdm) | 778 | void clkdm_deny_idle(struct clockdomain *clkdm) |
| 878 | { | 779 | { |
| 879 | if (!clkdm) | 780 | if (!clkdm) |
| 880 | return; | 781 | return; |
| @@ -885,28 +786,20 @@ void omap2_clkdm_deny_idle(struct clockdomain *clkdm) | |||
| 885 | return; | 786 | return; |
| 886 | } | 787 | } |
| 887 | 788 | ||
| 789 | if (!arch_clkdm || !arch_clkdm->clkdm_deny_idle) | ||
| 790 | return; | ||
| 791 | |||
| 888 | pr_debug("clockdomain: disabling automatic idle transitions for %s\n", | 792 | pr_debug("clockdomain: disabling automatic idle transitions for %s\n", |
| 889 | clkdm->name); | 793 | clkdm->name); |
| 890 | 794 | ||
| 891 | _disable_hwsup(clkdm); | 795 | arch_clkdm->clkdm_deny_idle(clkdm); |
| 892 | |||
| 893 | /* | ||
| 894 | * XXX This should be removed once TI adds wakeup/sleep | ||
| 895 | * dependency code and data for OMAP4. | ||
| 896 | */ | ||
| 897 | if (cpu_is_omap44xx()) { | ||
| 898 | pr_err("clockdomain: %s: OMAP4 wakeup/sleep dependency support: not yet implemented\n", clkdm->name); | ||
| 899 | } else { | ||
| 900 | if (atomic_read(&clkdm->usecount) > 0) | ||
| 901 | _clkdm_del_autodeps(clkdm); | ||
| 902 | } | ||
| 903 | } | 796 | } |
| 904 | 797 | ||
| 905 | 798 | ||
| 906 | /* Clockdomain-to-clock framework interface code */ | 799 | /* Clockdomain-to-clock framework interface code */ |
| 907 | 800 | ||
| 908 | /** | 801 | /** |
| 909 | * omap2_clkdm_clk_enable - add an enabled downstream clock to this clkdm | 802 | * clkdm_clk_enable - add an enabled downstream clock to this clkdm |
| 910 | * @clkdm: struct clockdomain * | 803 | * @clkdm: struct clockdomain * |
| 911 | * @clk: struct clk * of the enabled downstream clock | 804 | * @clk: struct clk * of the enabled downstream clock |
| 912 | * | 805 | * |
| @@ -919,10 +812,8 @@ void omap2_clkdm_deny_idle(struct clockdomain *clkdm) | |||
| 919 | * by on-chip processors. Returns -EINVAL if passed null pointers; | 812 | * by on-chip processors. Returns -EINVAL if passed null pointers; |
| 920 | * returns 0 upon success or if the clockdomain is in hwsup idle mode. | 813 | * returns 0 upon success or if the clockdomain is in hwsup idle mode. |
| 921 | */ | 814 | */ |
| 922 | int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) | 815 | int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) |
| 923 | { | 816 | { |
| 924 | bool hwsup = false; | ||
| 925 | |||
| 926 | /* | 817 | /* |
| 927 | * XXX Rewrite this code to maintain a list of enabled | 818 | * XXX Rewrite this code to maintain a list of enabled |
| 928 | * downstream clocks for debugging purposes? | 819 | * downstream clocks for debugging purposes? |
| @@ -931,6 +822,9 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) | |||
| 931 | if (!clkdm || !clk) | 822 | if (!clkdm || !clk) |
| 932 | return -EINVAL; | 823 | return -EINVAL; |
| 933 | 824 | ||
| 825 | if (!arch_clkdm || !arch_clkdm->clkdm_clk_enable) | ||
| 826 | return -EINVAL; | ||
| 827 | |||
| 934 | if (atomic_inc_return(&clkdm->usecount) > 1) | 828 | if (atomic_inc_return(&clkdm->usecount) > 1) |
| 935 | return 0; | 829 | return 0; |
| 936 | 830 | ||
| @@ -939,31 +833,7 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) | |||
| 939 | pr_debug("clockdomain: clkdm %s: clk %s now enabled\n", clkdm->name, | 833 | pr_debug("clockdomain: clkdm %s: clk %s now enabled\n", clkdm->name, |
| 940 | clk->name); | 834 | clk->name); |
| 941 | 835 | ||
| 942 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { | 836 | arch_clkdm->clkdm_clk_enable(clkdm); |
| 943 | |||
| 944 | if (!clkdm->clktrctrl_mask) | ||
| 945 | return 0; | ||
| 946 | |||
| 947 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 948 | clkdm->clktrctrl_mask); | ||
| 949 | |||
| 950 | } else if (cpu_is_omap44xx()) { | ||
| 951 | |||
| 952 | hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, | ||
| 953 | clkdm->cm_inst, | ||
| 954 | clkdm->clkdm_offs); | ||
| 955 | |||
| 956 | } | ||
| 957 | |||
| 958 | if (hwsup) { | ||
| 959 | /* Disable HW transitions when we are changing deps */ | ||
| 960 | _disable_hwsup(clkdm); | ||
| 961 | _clkdm_add_autodeps(clkdm); | ||
| 962 | _enable_hwsup(clkdm); | ||
| 963 | } else { | ||
| 964 | omap2_clkdm_wakeup(clkdm); | ||
| 965 | } | ||
| 966 | |||
| 967 | pwrdm_wait_transition(clkdm->pwrdm.ptr); | 837 | pwrdm_wait_transition(clkdm->pwrdm.ptr); |
| 968 | pwrdm_clkdm_state_switch(clkdm); | 838 | pwrdm_clkdm_state_switch(clkdm); |
| 969 | 839 | ||
| @@ -971,7 +841,7 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) | |||
| 971 | } | 841 | } |
| 972 | 842 | ||
| 973 | /** | 843 | /** |
| 974 | * omap2_clkdm_clk_disable - remove an enabled downstream clock from this clkdm | 844 | * clkdm_clk_disable - remove an enabled downstream clock from this clkdm |
| 975 | * @clkdm: struct clockdomain * | 845 | * @clkdm: struct clockdomain * |
| 976 | * @clk: struct clk * of the disabled downstream clock | 846 | * @clk: struct clk * of the disabled downstream clock |
| 977 | * | 847 | * |
| @@ -984,10 +854,8 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) | |||
| 984 | * is enabled; or returns 0 upon success or if the clockdomain is in | 854 | * is enabled; or returns 0 upon success or if the clockdomain is in |
| 985 | * hwsup idle mode. | 855 | * hwsup idle mode. |
| 986 | */ | 856 | */ |
| 987 | int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) | 857 | int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) |
| 988 | { | 858 | { |
| 989 | bool hwsup = false; | ||
| 990 | |||
| 991 | /* | 859 | /* |
| 992 | * XXX Rewrite this code to maintain a list of enabled | 860 | * XXX Rewrite this code to maintain a list of enabled |
| 993 | * downstream clocks for debugging purposes? | 861 | * downstream clocks for debugging purposes? |
| @@ -996,6 +864,9 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) | |||
| 996 | if (!clkdm || !clk) | 864 | if (!clkdm || !clk) |
| 997 | return -EINVAL; | 865 | return -EINVAL; |
| 998 | 866 | ||
| 867 | if (!arch_clkdm || !arch_clkdm->clkdm_clk_disable) | ||
| 868 | return -EINVAL; | ||
| 869 | |||
| 999 | #ifdef DEBUG | 870 | #ifdef DEBUG |
| 1000 | if (atomic_read(&clkdm->usecount) == 0) { | 871 | if (atomic_read(&clkdm->usecount) == 0) { |
| 1001 | WARN_ON(1); /* underflow */ | 872 | WARN_ON(1); /* underflow */ |
| @@ -1011,31 +882,7 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) | |||
| 1011 | pr_debug("clockdomain: clkdm %s: clk %s now disabled\n", clkdm->name, | 882 | pr_debug("clockdomain: clkdm %s: clk %s now disabled\n", clkdm->name, |
| 1012 | clk->name); | 883 | clk->name); |
| 1013 | 884 | ||
| 1014 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { | 885 | arch_clkdm->clkdm_clk_disable(clkdm); |
| 1015 | |||
| 1016 | if (!clkdm->clktrctrl_mask) | ||
| 1017 | return 0; | ||
| 1018 | |||
| 1019 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 1020 | clkdm->clktrctrl_mask); | ||
| 1021 | |||
| 1022 | } else if (cpu_is_omap44xx()) { | ||
| 1023 | |||
| 1024 | hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, | ||
| 1025 | clkdm->cm_inst, | ||
| 1026 | clkdm->clkdm_offs); | ||
| 1027 | |||
| 1028 | } | ||
| 1029 | |||
| 1030 | if (hwsup) { | ||
| 1031 | /* Disable HW transitions when we are changing deps */ | ||
| 1032 | _disable_hwsup(clkdm); | ||
| 1033 | _clkdm_del_autodeps(clkdm); | ||
| 1034 | _enable_hwsup(clkdm); | ||
| 1035 | } else { | ||
| 1036 | omap2_clkdm_sleep(clkdm); | ||
| 1037 | } | ||
| 1038 | |||
| 1039 | pwrdm_clkdm_state_switch(clkdm); | 886 | pwrdm_clkdm_state_switch(clkdm); |
| 1040 | 887 | ||
| 1041 | return 0; | 888 | return 0; |
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index 9b459c26fb85..85b3dce65640 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * OMAP2/3 clockdomain framework functions | 4 | * OMAP2/3 clockdomain framework functions |
| 5 | * | 5 | * |
| 6 | * Copyright (C) 2008 Texas Instruments, Inc. | 6 | * Copyright (C) 2008 Texas Instruments, Inc. |
| 7 | * Copyright (C) 2008-2010 Nokia Corporation | 7 | * Copyright (C) 2008-2011 Nokia Corporation |
| 8 | * | 8 | * |
| 9 | * Paul Walmsley | 9 | * Paul Walmsley |
| 10 | * | 10 | * |
| @@ -22,11 +22,19 @@ | |||
| 22 | #include <plat/clock.h> | 22 | #include <plat/clock.h> |
| 23 | #include <plat/cpu.h> | 23 | #include <plat/cpu.h> |
| 24 | 24 | ||
| 25 | /* Clockdomain capability flags */ | 25 | /* |
| 26 | * Clockdomain flags | ||
| 27 | * | ||
| 28 | * XXX Document CLKDM_CAN_* flags | ||
| 29 | * | ||
| 30 | * CLKDM_NO_AUTODEPS: Prevent "autodeps" from being added/removed from this | ||
| 31 | * clockdomain. (Currently, this applies to OMAP3 clockdomains only.) | ||
| 32 | */ | ||
| 26 | #define CLKDM_CAN_FORCE_SLEEP (1 << 0) | 33 | #define CLKDM_CAN_FORCE_SLEEP (1 << 0) |
| 27 | #define CLKDM_CAN_FORCE_WAKEUP (1 << 1) | 34 | #define CLKDM_CAN_FORCE_WAKEUP (1 << 1) |
| 28 | #define CLKDM_CAN_ENABLE_AUTO (1 << 2) | 35 | #define CLKDM_CAN_ENABLE_AUTO (1 << 2) |
| 29 | #define CLKDM_CAN_DISABLE_AUTO (1 << 3) | 36 | #define CLKDM_CAN_DISABLE_AUTO (1 << 3) |
| 37 | #define CLKDM_NO_AUTODEPS (1 << 4) | ||
| 30 | 38 | ||
| 31 | #define CLKDM_CAN_HWSUP (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO) | 39 | #define CLKDM_CAN_HWSUP (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO) |
| 32 | #define CLKDM_CAN_SWSUP (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP) | 40 | #define CLKDM_CAN_SWSUP (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP) |
| @@ -116,7 +124,42 @@ struct clockdomain { | |||
| 116 | struct list_head node; | 124 | struct list_head node; |
| 117 | }; | 125 | }; |
| 118 | 126 | ||
| 119 | void clkdm_init(struct clockdomain **clkdms, struct clkdm_autodep *autodeps); | 127 | /** |
| 128 | * struct clkdm_ops - Arch specfic function implementations | ||
| 129 | * @clkdm_add_wkdep: Add a wakeup dependency between clk domains | ||
| 130 | * @clkdm_del_wkdep: Delete a wakeup dependency between clk domains | ||
| 131 | * @clkdm_read_wkdep: Read wakeup dependency state between clk domains | ||
| 132 | * @clkdm_clear_all_wkdeps: Remove all wakeup dependencies from the clk domain | ||
| 133 | * @clkdm_add_sleepdep: Add a sleep dependency between clk domains | ||
| 134 | * @clkdm_del_sleepdep: Delete a sleep dependency between clk domains | ||
| 135 | * @clkdm_read_sleepdep: Read sleep dependency state between clk domains | ||
| 136 | * @clkdm_clear_all_sleepdeps: Remove all sleep dependencies from the clk domain | ||
| 137 | * @clkdm_sleep: Force a clockdomain to sleep | ||
| 138 | * @clkdm_wakeup: Force a clockdomain to wakeup | ||
| 139 | * @clkdm_allow_idle: Enable hw supervised idle transitions for clock domain | ||
| 140 | * @clkdm_deny_idle: Disable hw supervised idle transitions for clock domain | ||
| 141 | * @clkdm_clk_enable: Put the clkdm in right state for a clock enable | ||
| 142 | * @clkdm_clk_disable: Put the clkdm in right state for a clock disable | ||
| 143 | */ | ||
| 144 | struct clkdm_ops { | ||
| 145 | int (*clkdm_add_wkdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | ||
| 146 | int (*clkdm_del_wkdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | ||
| 147 | int (*clkdm_read_wkdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | ||
| 148 | int (*clkdm_clear_all_wkdeps)(struct clockdomain *clkdm); | ||
| 149 | int (*clkdm_add_sleepdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | ||
| 150 | int (*clkdm_del_sleepdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | ||
| 151 | int (*clkdm_read_sleepdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | ||
| 152 | int (*clkdm_clear_all_sleepdeps)(struct clockdomain *clkdm); | ||
| 153 | int (*clkdm_sleep)(struct clockdomain *clkdm); | ||
| 154 | int (*clkdm_wakeup)(struct clockdomain *clkdm); | ||
| 155 | void (*clkdm_allow_idle)(struct clockdomain *clkdm); | ||
| 156 | void (*clkdm_deny_idle)(struct clockdomain *clkdm); | ||
| 157 | int (*clkdm_clk_enable)(struct clockdomain *clkdm); | ||
| 158 | int (*clkdm_clk_disable)(struct clockdomain *clkdm); | ||
| 159 | }; | ||
| 160 | |||
| 161 | void clkdm_init(struct clockdomain **clkdms, struct clkdm_autodep *autodeps, | ||
| 162 | struct clkdm_ops *custom_funcs); | ||
| 120 | struct clockdomain *clkdm_lookup(const char *name); | 163 | struct clockdomain *clkdm_lookup(const char *name); |
| 121 | 164 | ||
| 122 | int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user), | 165 | int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user), |
| @@ -132,16 +175,23 @@ int clkdm_del_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | |||
| 132 | int clkdm_read_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2); | 175 | int clkdm_read_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2); |
| 133 | int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm); | 176 | int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm); |
| 134 | 177 | ||
| 135 | void omap2_clkdm_allow_idle(struct clockdomain *clkdm); | 178 | void clkdm_allow_idle(struct clockdomain *clkdm); |
| 136 | void omap2_clkdm_deny_idle(struct clockdomain *clkdm); | 179 | void clkdm_deny_idle(struct clockdomain *clkdm); |
| 137 | 180 | ||
| 138 | int omap2_clkdm_wakeup(struct clockdomain *clkdm); | 181 | int clkdm_wakeup(struct clockdomain *clkdm); |
| 139 | int omap2_clkdm_sleep(struct clockdomain *clkdm); | 182 | int clkdm_sleep(struct clockdomain *clkdm); |
| 140 | 183 | ||
| 141 | int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk); | 184 | int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk); |
| 142 | int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk); | 185 | int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk); |
| 143 | 186 | ||
| 144 | extern void __init omap2_clockdomains_init(void); | 187 | extern void __init omap2xxx_clockdomains_init(void); |
| 188 | extern void __init omap3xxx_clockdomains_init(void); | ||
| 145 | extern void __init omap44xx_clockdomains_init(void); | 189 | extern void __init omap44xx_clockdomains_init(void); |
| 190 | extern void _clkdm_add_autodeps(struct clockdomain *clkdm); | ||
| 191 | extern void _clkdm_del_autodeps(struct clockdomain *clkdm); | ||
| 192 | |||
| 193 | extern struct clkdm_ops omap2_clkdm_operations; | ||
| 194 | extern struct clkdm_ops omap3_clkdm_operations; | ||
| 195 | extern struct clkdm_ops omap4_clkdm_operations; | ||
| 146 | 196 | ||
| 147 | #endif | 197 | #endif |
diff --git a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c new file mode 100644 index 000000000000..48d0db7e6069 --- /dev/null +++ b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c | |||
| @@ -0,0 +1,274 @@ | |||
| 1 | /* | ||
| 2 | * OMAP2 and OMAP3 clockdomain control | ||
| 3 | * | ||
| 4 | * Copyright (C) 2008-2010 Texas Instruments, Inc. | ||
| 5 | * Copyright (C) 2008-2010 Nokia Corporation | ||
| 6 | * | ||
| 7 | * Derived from mach-omap2/clockdomain.c written by Paul Walmsley | ||
| 8 | * Rajendra Nayak <rnayak@ti.com> | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License version 2 as | ||
| 12 | * published by the Free Software Foundation. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/types.h> | ||
| 16 | #include <plat/prcm.h> | ||
| 17 | #include "prm.h" | ||
| 18 | #include "prm2xxx_3xxx.h" | ||
| 19 | #include "cm.h" | ||
| 20 | #include "cm2xxx_3xxx.h" | ||
| 21 | #include "cm-regbits-24xx.h" | ||
| 22 | #include "cm-regbits-34xx.h" | ||
| 23 | #include "prm-regbits-24xx.h" | ||
| 24 | #include "clockdomain.h" | ||
| 25 | |||
| 26 | static int omap2_clkdm_add_wkdep(struct clockdomain *clkdm1, | ||
| 27 | struct clockdomain *clkdm2) | ||
| 28 | { | ||
| 29 | omap2_prm_set_mod_reg_bits((1 << clkdm2->dep_bit), | ||
| 30 | clkdm1->pwrdm.ptr->prcm_offs, PM_WKDEP); | ||
| 31 | return 0; | ||
| 32 | } | ||
| 33 | |||
| 34 | static int omap2_clkdm_del_wkdep(struct clockdomain *clkdm1, | ||
| 35 | struct clockdomain *clkdm2) | ||
| 36 | { | ||
| 37 | omap2_prm_clear_mod_reg_bits((1 << clkdm2->dep_bit), | ||
| 38 | clkdm1->pwrdm.ptr->prcm_offs, PM_WKDEP); | ||
| 39 | return 0; | ||
| 40 | } | ||
| 41 | |||
| 42 | static int omap2_clkdm_read_wkdep(struct clockdomain *clkdm1, | ||
| 43 | struct clockdomain *clkdm2) | ||
| 44 | { | ||
| 45 | return omap2_prm_read_mod_bits_shift(clkdm1->pwrdm.ptr->prcm_offs, | ||
| 46 | PM_WKDEP, (1 << clkdm2->dep_bit)); | ||
| 47 | } | ||
| 48 | |||
| 49 | static int omap2_clkdm_clear_all_wkdeps(struct clockdomain *clkdm) | ||
| 50 | { | ||
| 51 | struct clkdm_dep *cd; | ||
| 52 | u32 mask = 0; | ||
| 53 | |||
| 54 | for (cd = clkdm->wkdep_srcs; cd && cd->clkdm_name; cd++) { | ||
| 55 | if (!omap_chip_is(cd->omap_chip)) | ||
| 56 | continue; | ||
| 57 | if (!cd->clkdm) | ||
| 58 | continue; /* only happens if data is erroneous */ | ||
| 59 | |||
| 60 | /* PRM accesses are slow, so minimize them */ | ||
| 61 | mask |= 1 << cd->clkdm->dep_bit; | ||
| 62 | atomic_set(&cd->wkdep_usecount, 0); | ||
| 63 | } | ||
| 64 | |||
| 65 | omap2_prm_clear_mod_reg_bits(mask, clkdm->pwrdm.ptr->prcm_offs, | ||
| 66 | PM_WKDEP); | ||
| 67 | return 0; | ||
| 68 | } | ||
| 69 | |||
| 70 | static int omap3_clkdm_add_sleepdep(struct clockdomain *clkdm1, | ||
| 71 | struct clockdomain *clkdm2) | ||
| 72 | { | ||
| 73 | omap2_cm_set_mod_reg_bits((1 << clkdm2->dep_bit), | ||
| 74 | clkdm1->pwrdm.ptr->prcm_offs, | ||
| 75 | OMAP3430_CM_SLEEPDEP); | ||
| 76 | return 0; | ||
| 77 | } | ||
| 78 | |||
| 79 | static int omap3_clkdm_del_sleepdep(struct clockdomain *clkdm1, | ||
| 80 | struct clockdomain *clkdm2) | ||
| 81 | { | ||
| 82 | omap2_cm_clear_mod_reg_bits((1 << clkdm2->dep_bit), | ||
| 83 | clkdm1->pwrdm.ptr->prcm_offs, | ||
| 84 | OMAP3430_CM_SLEEPDEP); | ||
| 85 | return 0; | ||
| 86 | } | ||
| 87 | |||
| 88 | static int omap3_clkdm_read_sleepdep(struct clockdomain *clkdm1, | ||
| 89 | struct clockdomain *clkdm2) | ||
| 90 | { | ||
| 91 | return omap2_prm_read_mod_bits_shift(clkdm1->pwrdm.ptr->prcm_offs, | ||
| 92 | OMAP3430_CM_SLEEPDEP, (1 << clkdm2->dep_bit)); | ||
| 93 | } | ||
| 94 | |||
| 95 | static int omap3_clkdm_clear_all_sleepdeps(struct clockdomain *clkdm) | ||
| 96 | { | ||
| 97 | struct clkdm_dep *cd; | ||
| 98 | u32 mask = 0; | ||
| 99 | |||
| 100 | for (cd = clkdm->sleepdep_srcs; cd && cd->clkdm_name; cd++) { | ||
| 101 | if (!omap_chip_is(cd->omap_chip)) | ||
| 102 | continue; | ||
| 103 | if (!cd->clkdm) | ||
| 104 | continue; /* only happens if data is erroneous */ | ||
| 105 | |||
| 106 | /* PRM accesses are slow, so minimize them */ | ||
| 107 | mask |= 1 << cd->clkdm->dep_bit; | ||
| 108 | atomic_set(&cd->sleepdep_usecount, 0); | ||
| 109 | } | ||
| 110 | omap2_prm_clear_mod_reg_bits(mask, clkdm->pwrdm.ptr->prcm_offs, | ||
| 111 | OMAP3430_CM_SLEEPDEP); | ||
| 112 | return 0; | ||
| 113 | } | ||
| 114 | |||
| 115 | static int omap2_clkdm_sleep(struct clockdomain *clkdm) | ||
| 116 | { | ||
| 117 | omap2_cm_set_mod_reg_bits(OMAP24XX_FORCESTATE_MASK, | ||
| 118 | clkdm->pwrdm.ptr->prcm_offs, | ||
| 119 | OMAP2_PM_PWSTCTRL); | ||
| 120 | return 0; | ||
| 121 | } | ||
| 122 | |||
| 123 | static int omap2_clkdm_wakeup(struct clockdomain *clkdm) | ||
| 124 | { | ||
| 125 | omap2_cm_clear_mod_reg_bits(OMAP24XX_FORCESTATE_MASK, | ||
| 126 | clkdm->pwrdm.ptr->prcm_offs, | ||
| 127 | OMAP2_PM_PWSTCTRL); | ||
| 128 | return 0; | ||
| 129 | } | ||
| 130 | |||
| 131 | static void omap2_clkdm_allow_idle(struct clockdomain *clkdm) | ||
| 132 | { | ||
| 133 | if (atomic_read(&clkdm->usecount) > 0) | ||
| 134 | _clkdm_add_autodeps(clkdm); | ||
| 135 | |||
| 136 | omap2xxx_cm_clkdm_enable_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 137 | clkdm->clktrctrl_mask); | ||
| 138 | } | ||
| 139 | |||
| 140 | static void omap2_clkdm_deny_idle(struct clockdomain *clkdm) | ||
| 141 | { | ||
| 142 | omap2xxx_cm_clkdm_disable_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 143 | clkdm->clktrctrl_mask); | ||
| 144 | |||
| 145 | if (atomic_read(&clkdm->usecount) > 0) | ||
| 146 | _clkdm_del_autodeps(clkdm); | ||
| 147 | } | ||
| 148 | |||
| 149 | static void _enable_hwsup(struct clockdomain *clkdm) | ||
| 150 | { | ||
| 151 | if (cpu_is_omap24xx()) | ||
| 152 | omap2xxx_cm_clkdm_enable_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 153 | clkdm->clktrctrl_mask); | ||
| 154 | else if (cpu_is_omap34xx()) | ||
| 155 | omap3xxx_cm_clkdm_enable_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 156 | clkdm->clktrctrl_mask); | ||
| 157 | } | ||
| 158 | |||
| 159 | static void _disable_hwsup(struct clockdomain *clkdm) | ||
| 160 | { | ||
| 161 | if (cpu_is_omap24xx()) | ||
| 162 | omap2xxx_cm_clkdm_disable_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 163 | clkdm->clktrctrl_mask); | ||
| 164 | else if (cpu_is_omap34xx()) | ||
| 165 | omap3xxx_cm_clkdm_disable_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 166 | clkdm->clktrctrl_mask); | ||
| 167 | } | ||
| 168 | |||
| 169 | |||
| 170 | static int omap2_clkdm_clk_enable(struct clockdomain *clkdm) | ||
| 171 | { | ||
| 172 | bool hwsup = false; | ||
| 173 | |||
| 174 | if (!clkdm->clktrctrl_mask) | ||
| 175 | return 0; | ||
| 176 | |||
| 177 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 178 | clkdm->clktrctrl_mask); | ||
| 179 | |||
| 180 | if (hwsup) { | ||
| 181 | /* Disable HW transitions when we are changing deps */ | ||
| 182 | _disable_hwsup(clkdm); | ||
| 183 | _clkdm_add_autodeps(clkdm); | ||
| 184 | _enable_hwsup(clkdm); | ||
| 185 | } else { | ||
| 186 | clkdm_wakeup(clkdm); | ||
| 187 | } | ||
| 188 | |||
| 189 | return 0; | ||
| 190 | } | ||
| 191 | |||
| 192 | static int omap2_clkdm_clk_disable(struct clockdomain *clkdm) | ||
| 193 | { | ||
| 194 | bool hwsup = false; | ||
| 195 | |||
| 196 | if (!clkdm->clktrctrl_mask) | ||
| 197 | return 0; | ||
| 198 | |||
| 199 | hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 200 | clkdm->clktrctrl_mask); | ||
| 201 | |||
| 202 | if (hwsup) { | ||
| 203 | /* Disable HW transitions when we are changing deps */ | ||
| 204 | _disable_hwsup(clkdm); | ||
| 205 | _clkdm_del_autodeps(clkdm); | ||
| 206 | _enable_hwsup(clkdm); | ||
| 207 | } else { | ||
| 208 | clkdm_sleep(clkdm); | ||
| 209 | } | ||
| 210 | |||
| 211 | return 0; | ||
| 212 | } | ||
| 213 | |||
| 214 | static int omap3_clkdm_sleep(struct clockdomain *clkdm) | ||
| 215 | { | ||
| 216 | omap3xxx_cm_clkdm_force_sleep(clkdm->pwrdm.ptr->prcm_offs, | ||
| 217 | clkdm->clktrctrl_mask); | ||
| 218 | return 0; | ||
| 219 | } | ||
| 220 | |||
| 221 | static int omap3_clkdm_wakeup(struct clockdomain *clkdm) | ||
| 222 | { | ||
| 223 | omap3xxx_cm_clkdm_force_wakeup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 224 | clkdm->clktrctrl_mask); | ||
| 225 | return 0; | ||
| 226 | } | ||
| 227 | |||
| 228 | static void omap3_clkdm_allow_idle(struct clockdomain *clkdm) | ||
| 229 | { | ||
| 230 | if (atomic_read(&clkdm->usecount) > 0) | ||
| 231 | _clkdm_add_autodeps(clkdm); | ||
| 232 | |||
| 233 | omap3xxx_cm_clkdm_enable_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 234 | clkdm->clktrctrl_mask); | ||
| 235 | } | ||
| 236 | |||
| 237 | static void omap3_clkdm_deny_idle(struct clockdomain *clkdm) | ||
| 238 | { | ||
| 239 | omap3xxx_cm_clkdm_disable_hwsup(clkdm->pwrdm.ptr->prcm_offs, | ||
| 240 | clkdm->clktrctrl_mask); | ||
| 241 | |||
| 242 | if (atomic_read(&clkdm->usecount) > 0) | ||
| 243 | _clkdm_del_autodeps(clkdm); | ||
| 244 | } | ||
| 245 | |||
| 246 | struct clkdm_ops omap2_clkdm_operations = { | ||
| 247 | .clkdm_add_wkdep = omap2_clkdm_add_wkdep, | ||
| 248 | .clkdm_del_wkdep = omap2_clkdm_del_wkdep, | ||
| 249 | .clkdm_read_wkdep = omap2_clkdm_read_wkdep, | ||
| 250 | .clkdm_clear_all_wkdeps = omap2_clkdm_clear_all_wkdeps, | ||
| 251 | .clkdm_sleep = omap2_clkdm_sleep, | ||
| 252 | .clkdm_wakeup = omap2_clkdm_wakeup, | ||
| 253 | .clkdm_allow_idle = omap2_clkdm_allow_idle, | ||
| 254 | .clkdm_deny_idle = omap2_clkdm_deny_idle, | ||
| 255 | .clkdm_clk_enable = omap2_clkdm_clk_enable, | ||
| 256 | .clkdm_clk_disable = omap2_clkdm_clk_disable, | ||
| 257 | }; | ||
| 258 | |||
| 259 | struct clkdm_ops omap3_clkdm_operations = { | ||
| 260 | .clkdm_add_wkdep = omap2_clkdm_add_wkdep, | ||
| 261 | .clkdm_del_wkdep = omap2_clkdm_del_wkdep, | ||
| 262 | .clkdm_read_wkdep = omap2_clkdm_read_wkdep, | ||
| 263 | .clkdm_clear_all_wkdeps = omap2_clkdm_clear_all_wkdeps, | ||
| 264 | .clkdm_add_sleepdep = omap3_clkdm_add_sleepdep, | ||
| 265 | .clkdm_del_sleepdep = omap3_clkdm_del_sleepdep, | ||
| 266 | .clkdm_read_sleepdep = omap3_clkdm_read_sleepdep, | ||
| 267 | .clkdm_clear_all_sleepdeps = omap3_clkdm_clear_all_sleepdeps, | ||
| 268 | .clkdm_sleep = omap3_clkdm_sleep, | ||
| 269 | .clkdm_wakeup = omap3_clkdm_wakeup, | ||
| 270 | .clkdm_allow_idle = omap3_clkdm_allow_idle, | ||
| 271 | .clkdm_deny_idle = omap3_clkdm_deny_idle, | ||
| 272 | .clkdm_clk_enable = omap2_clkdm_clk_enable, | ||
| 273 | .clkdm_clk_disable = omap2_clkdm_clk_disable, | ||
| 274 | }; | ||
diff --git a/arch/arm/mach-omap2/clockdomain44xx.c b/arch/arm/mach-omap2/clockdomain44xx.c new file mode 100644 index 000000000000..a1a4ecd26544 --- /dev/null +++ b/arch/arm/mach-omap2/clockdomain44xx.c | |||
| @@ -0,0 +1,137 @@ | |||
| 1 | /* | ||
| 2 | * OMAP4 clockdomain control | ||
| 3 | * | ||
| 4 | * Copyright (C) 2008-2010 Texas Instruments, Inc. | ||
| 5 | * Copyright (C) 2008-2010 Nokia Corporation | ||
| 6 | * | ||
| 7 | * Derived from mach-omap2/clockdomain.c written by Paul Walmsley | ||
| 8 | * Rajendra Nayak <rnayak@ti.com> | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License version 2 as | ||
| 12 | * published by the Free Software Foundation. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #include <linux/kernel.h> | ||
| 16 | #include "clockdomain.h" | ||
| 17 | #include "cminst44xx.h" | ||
| 18 | #include "cm44xx.h" | ||
| 19 | |||
| 20 | static int omap4_clkdm_add_wkup_sleep_dep(struct clockdomain *clkdm1, | ||
| 21 | struct clockdomain *clkdm2) | ||
| 22 | { | ||
| 23 | omap4_cminst_set_inst_reg_bits((1 << clkdm2->dep_bit), | ||
| 24 | clkdm1->prcm_partition, | ||
| 25 | clkdm1->cm_inst, clkdm1->clkdm_offs + | ||
| 26 | OMAP4_CM_STATICDEP); | ||
| 27 | return 0; | ||
| 28 | } | ||
| 29 | |||
| 30 | static int omap4_clkdm_del_wkup_sleep_dep(struct clockdomain *clkdm1, | ||
| 31 | struct clockdomain *clkdm2) | ||
| 32 | { | ||
| 33 | omap4_cminst_clear_inst_reg_bits((1 << clkdm2->dep_bit), | ||
| 34 | clkdm1->prcm_partition, | ||
| 35 | clkdm1->cm_inst, clkdm1->clkdm_offs + | ||
| 36 | OMAP4_CM_STATICDEP); | ||
| 37 | return 0; | ||
| 38 | } | ||
| 39 | |||
| 40 | static int omap4_clkdm_read_wkup_sleep_dep(struct clockdomain *clkdm1, | ||
| 41 | struct clockdomain *clkdm2) | ||
| 42 | { | ||
| 43 | return omap4_cminst_read_inst_reg_bits(clkdm1->prcm_partition, | ||
| 44 | clkdm1->cm_inst, clkdm1->clkdm_offs + | ||
| 45 | OMAP4_CM_STATICDEP, | ||
| 46 | (1 << clkdm2->dep_bit)); | ||
| 47 | } | ||
| 48 | |||
| 49 | static int omap4_clkdm_clear_all_wkup_sleep_deps(struct clockdomain *clkdm) | ||
| 50 | { | ||
| 51 | struct clkdm_dep *cd; | ||
| 52 | u32 mask = 0; | ||
| 53 | |||
| 54 | for (cd = clkdm->wkdep_srcs; cd && cd->clkdm_name; cd++) { | ||
| 55 | if (!omap_chip_is(cd->omap_chip)) | ||
| 56 | continue; | ||
| 57 | if (!cd->clkdm) | ||
| 58 | continue; /* only happens if data is erroneous */ | ||
| 59 | |||
| 60 | mask |= 1 << cd->clkdm->dep_bit; | ||
| 61 | atomic_set(&cd->wkdep_usecount, 0); | ||
| 62 | } | ||
| 63 | |||
| 64 | omap4_cminst_clear_inst_reg_bits(mask, clkdm->prcm_partition, | ||
| 65 | clkdm->cm_inst, clkdm->clkdm_offs + | ||
| 66 | OMAP4_CM_STATICDEP); | ||
| 67 | return 0; | ||
| 68 | } | ||
| 69 | |||
| 70 | static int omap4_clkdm_sleep(struct clockdomain *clkdm) | ||
| 71 | { | ||
| 72 | omap4_cminst_clkdm_force_sleep(clkdm->prcm_partition, | ||
| 73 | clkdm->cm_inst, clkdm->clkdm_offs); | ||
| 74 | return 0; | ||
| 75 | } | ||
| 76 | |||
| 77 | static int omap4_clkdm_wakeup(struct clockdomain *clkdm) | ||
| 78 | { | ||
| 79 | omap4_cminst_clkdm_force_wakeup(clkdm->prcm_partition, | ||
| 80 | clkdm->cm_inst, clkdm->clkdm_offs); | ||
| 81 | return 0; | ||
| 82 | } | ||
| 83 | |||
| 84 | static void omap4_clkdm_allow_idle(struct clockdomain *clkdm) | ||
| 85 | { | ||
| 86 | omap4_cminst_clkdm_enable_hwsup(clkdm->prcm_partition, | ||
| 87 | clkdm->cm_inst, clkdm->clkdm_offs); | ||
| 88 | } | ||
| 89 | |||
| 90 | static void omap4_clkdm_deny_idle(struct clockdomain *clkdm) | ||
| 91 | { | ||
| 92 | omap4_cminst_clkdm_disable_hwsup(clkdm->prcm_partition, | ||
| 93 | clkdm->cm_inst, clkdm->clkdm_offs); | ||
| 94 | } | ||
| 95 | |||
| 96 | static int omap4_clkdm_clk_enable(struct clockdomain *clkdm) | ||
| 97 | { | ||
| 98 | bool hwsup = false; | ||
| 99 | |||
| 100 | hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, | ||
| 101 | clkdm->cm_inst, clkdm->clkdm_offs); | ||
| 102 | |||
| 103 | if (!hwsup) | ||
| 104 | clkdm_wakeup(clkdm); | ||
| 105 | |||
| 106 | return 0; | ||
| 107 | } | ||
| 108 | |||
| 109 | static int omap4_clkdm_clk_disable(struct clockdomain *clkdm) | ||
| 110 | { | ||
| 111 | bool hwsup = false; | ||
| 112 | |||
| 113 | hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, | ||
| 114 | clkdm->cm_inst, clkdm->clkdm_offs); | ||
| 115 | |||
| 116 | if (!hwsup) | ||
| 117 | clkdm_sleep(clkdm); | ||
| 118 | |||
| 119 | return 0; | ||
| 120 | } | ||
| 121 | |||
| 122 | struct clkdm_ops omap4_clkdm_operations = { | ||
| 123 | .clkdm_add_wkdep = omap4_clkdm_add_wkup_sleep_dep, | ||
| 124 | .clkdm_del_wkdep = omap4_clkdm_del_wkup_sleep_dep, | ||
| 125 | .clkdm_read_wkdep = omap4_clkdm_read_wkup_sleep_dep, | ||
| 126 | .clkdm_clear_all_wkdeps = omap4_clkdm_clear_all_wkup_sleep_deps, | ||
| 127 | .clkdm_add_sleepdep = omap4_clkdm_add_wkup_sleep_dep, | ||
| 128 | .clkdm_del_sleepdep = omap4_clkdm_del_wkup_sleep_dep, | ||
| 129 | .clkdm_read_sleepdep = omap4_clkdm_read_wkup_sleep_dep, | ||
| 130 | .clkdm_clear_all_sleepdeps = omap4_clkdm_clear_all_wkup_sleep_deps, | ||
| 131 | .clkdm_sleep = omap4_clkdm_sleep, | ||
| 132 | .clkdm_wakeup = omap4_clkdm_wakeup, | ||
| 133 | .clkdm_allow_idle = omap4_clkdm_allow_idle, | ||
| 134 | .clkdm_deny_idle = omap4_clkdm_deny_idle, | ||
| 135 | .clkdm_clk_enable = omap4_clkdm_clk_enable, | ||
| 136 | .clkdm_clk_disable = omap4_clkdm_clk_disable, | ||
| 137 | }; | ||
diff --git a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c index e4a7133ea3b3..13bde95b6790 100644 --- a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c +++ b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c | |||
| @@ -89,6 +89,8 @@ static struct clkdm_dep gfx_sgx_wkdeps[] = { | |||
| 89 | 89 | ||
| 90 | /* 24XX-specific possible dependencies */ | 90 | /* 24XX-specific possible dependencies */ |
| 91 | 91 | ||
| 92 | #ifdef CONFIG_ARCH_OMAP2 | ||
| 93 | |||
| 92 | /* Wakeup dependency source arrays */ | 94 | /* Wakeup dependency source arrays */ |
| 93 | 95 | ||
| 94 | /* 2420/2430 PM_WKDEP_DSP: CORE, MPU, WKUP */ | 96 | /* 2420/2430 PM_WKDEP_DSP: CORE, MPU, WKUP */ |
| @@ -168,10 +170,11 @@ static struct clkdm_dep core_24xx_wkdeps[] = { | |||
| 168 | { NULL }, | 170 | { NULL }, |
| 169 | }; | 171 | }; |
| 170 | 172 | ||
| 173 | #endif /* CONFIG_ARCH_OMAP2 */ | ||
| 171 | 174 | ||
| 172 | /* 2430-specific possible wakeup dependencies */ | 175 | /* 2430-specific possible wakeup dependencies */ |
| 173 | 176 | ||
| 174 | #ifdef CONFIG_ARCH_OMAP2430 | 177 | #ifdef CONFIG_SOC_OMAP2430 |
| 175 | 178 | ||
| 176 | /* 2430 PM_WKDEP_MDM: CORE, MPU, WKUP */ | 179 | /* 2430 PM_WKDEP_MDM: CORE, MPU, WKUP */ |
| 177 | static struct clkdm_dep mdm_2430_wkdeps[] = { | 180 | static struct clkdm_dep mdm_2430_wkdeps[] = { |
| @@ -194,7 +197,7 @@ static struct clkdm_dep mdm_2430_wkdeps[] = { | |||
| 194 | { NULL }, | 197 | { NULL }, |
| 195 | }; | 198 | }; |
| 196 | 199 | ||
| 197 | #endif /* CONFIG_ARCH_OMAP2430 */ | 200 | #endif /* CONFIG_SOC_OMAP2430 */ |
| 198 | 201 | ||
| 199 | 202 | ||
| 200 | /* OMAP3-specific possible dependencies */ | 203 | /* OMAP3-specific possible dependencies */ |
| @@ -450,7 +453,7 @@ static struct clockdomain cm_clkdm = { | |||
| 450 | * 2420-only clockdomains | 453 | * 2420-only clockdomains |
| 451 | */ | 454 | */ |
| 452 | 455 | ||
| 453 | #if defined(CONFIG_ARCH_OMAP2420) | 456 | #if defined(CONFIG_SOC_OMAP2420) |
| 454 | 457 | ||
| 455 | static struct clockdomain mpu_2420_clkdm = { | 458 | static struct clockdomain mpu_2420_clkdm = { |
| 456 | .name = "mpu_clkdm", | 459 | .name = "mpu_clkdm", |
| @@ -514,14 +517,14 @@ static struct clockdomain dss_2420_clkdm = { | |||
| 514 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 517 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
| 515 | }; | 518 | }; |
| 516 | 519 | ||
| 517 | #endif /* CONFIG_ARCH_OMAP2420 */ | 520 | #endif /* CONFIG_SOC_OMAP2420 */ |
| 518 | 521 | ||
| 519 | 522 | ||
| 520 | /* | 523 | /* |
| 521 | * 2430-only clockdomains | 524 | * 2430-only clockdomains |
| 522 | */ | 525 | */ |
| 523 | 526 | ||
| 524 | #if defined(CONFIG_ARCH_OMAP2430) | 527 | #if defined(CONFIG_SOC_OMAP2430) |
| 525 | 528 | ||
| 526 | static struct clockdomain mpu_2430_clkdm = { | 529 | static struct clockdomain mpu_2430_clkdm = { |
| 527 | .name = "mpu_clkdm", | 530 | .name = "mpu_clkdm", |
| @@ -600,7 +603,7 @@ static struct clockdomain dss_2430_clkdm = { | |||
| 600 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 603 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
| 601 | }; | 604 | }; |
| 602 | 605 | ||
| 603 | #endif /* CONFIG_ARCH_OMAP2430 */ | 606 | #endif /* CONFIG_SOC_OMAP2430 */ |
| 604 | 607 | ||
| 605 | 608 | ||
| 606 | /* | 609 | /* |
| @@ -811,7 +814,7 @@ static struct clockdomain *clockdomains_omap2[] __initdata = { | |||
| 811 | &cm_clkdm, | 814 | &cm_clkdm, |
| 812 | &prm_clkdm, | 815 | &prm_clkdm, |
| 813 | 816 | ||
| 814 | #ifdef CONFIG_ARCH_OMAP2420 | 817 | #ifdef CONFIG_SOC_OMAP2420 |
| 815 | &mpu_2420_clkdm, | 818 | &mpu_2420_clkdm, |
| 816 | &iva1_2420_clkdm, | 819 | &iva1_2420_clkdm, |
| 817 | &dsp_2420_clkdm, | 820 | &dsp_2420_clkdm, |
| @@ -821,7 +824,7 @@ static struct clockdomain *clockdomains_omap2[] __initdata = { | |||
| 821 | &dss_2420_clkdm, | 824 | &dss_2420_clkdm, |
| 822 | #endif | 825 | #endif |
| 823 | 826 | ||
| 824 | #ifdef CONFIG_ARCH_OMAP2430 | 827 | #ifdef CONFIG_SOC_OMAP2430 |
| 825 | &mpu_2430_clkdm, | 828 | &mpu_2430_clkdm, |
| 826 | &mdm_clkdm, | 829 | &mdm_clkdm, |
| 827 | &dsp_2430_clkdm, | 830 | &dsp_2430_clkdm, |
| @@ -854,7 +857,12 @@ static struct clockdomain *clockdomains_omap2[] __initdata = { | |||
| 854 | NULL, | 857 | NULL, |
| 855 | }; | 858 | }; |
| 856 | 859 | ||
| 857 | void __init omap2_clockdomains_init(void) | 860 | void __init omap2xxx_clockdomains_init(void) |
| 861 | { | ||
| 862 | clkdm_init(clockdomains_omap2, clkdm_autodeps, &omap2_clkdm_operations); | ||
| 863 | } | ||
| 864 | |||
| 865 | void __init omap3xxx_clockdomains_init(void) | ||
| 858 | { | 866 | { |
| 859 | clkdm_init(clockdomains_omap2, clkdm_autodeps); | 867 | clkdm_init(clockdomains_omap2, clkdm_autodeps, &omap3_clkdm_operations); |
| 860 | } | 868 | } |
diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c b/arch/arm/mach-omap2/clockdomains44xx_data.c index 10622c914abc..a607ec196e8b 100644 --- a/arch/arm/mach-omap2/clockdomains44xx_data.c +++ b/arch/arm/mach-omap2/clockdomains44xx_data.c | |||
| @@ -18,11 +18,6 @@ | |||
| 18 | * published by the Free Software Foundation. | 18 | * published by the Free Software Foundation. |
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | /* | ||
| 22 | * To-Do List | ||
| 23 | * -> Populate the Sleep/Wakeup dependencies for the domains | ||
| 24 | */ | ||
| 25 | |||
| 26 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
| 27 | #include <linux/io.h> | 22 | #include <linux/io.h> |
| 28 | 23 | ||
| @@ -35,6 +30,355 @@ | |||
| 35 | #include "prcm44xx.h" | 30 | #include "prcm44xx.h" |
| 36 | #include "prcm_mpu44xx.h" | 31 | #include "prcm_mpu44xx.h" |
| 37 | 32 | ||
| 33 | /* Static Dependencies for OMAP4 Clock Domains */ | ||
| 34 | |||
| 35 | static struct clkdm_dep ducati_wkup_sleep_deps[] = { | ||
| 36 | { | ||
| 37 | .clkdm_name = "abe_clkdm", | ||
| 38 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 39 | }, | ||
| 40 | { | ||
| 41 | .clkdm_name = "ivahd_clkdm", | ||
| 42 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 43 | }, | ||
| 44 | { | ||
| 45 | .clkdm_name = "l3_1_clkdm", | ||
| 46 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 47 | }, | ||
| 48 | { | ||
| 49 | .clkdm_name = "l3_2_clkdm", | ||
| 50 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 51 | }, | ||
| 52 | { | ||
| 53 | .clkdm_name = "l3_dss_clkdm", | ||
| 54 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 55 | }, | ||
| 56 | { | ||
| 57 | .clkdm_name = "l3_emif_clkdm", | ||
| 58 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 59 | }, | ||
| 60 | { | ||
| 61 | .clkdm_name = "l3_gfx_clkdm", | ||
| 62 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 63 | }, | ||
| 64 | { | ||
| 65 | .clkdm_name = "l3_init_clkdm", | ||
| 66 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 67 | }, | ||
| 68 | { | ||
| 69 | .clkdm_name = "l4_cfg_clkdm", | ||
| 70 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 71 | }, | ||
| 72 | { | ||
| 73 | .clkdm_name = "l4_per_clkdm", | ||
| 74 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 75 | }, | ||
| 76 | { | ||
| 77 | .clkdm_name = "l4_secure_clkdm", | ||
| 78 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 79 | }, | ||
| 80 | { | ||
| 81 | .clkdm_name = "l4_wkup_clkdm", | ||
| 82 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 83 | }, | ||
| 84 | { | ||
| 85 | .clkdm_name = "tesla_clkdm", | ||
| 86 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 87 | }, | ||
| 88 | { NULL }, | ||
| 89 | }; | ||
| 90 | |||
| 91 | static struct clkdm_dep iss_wkup_sleep_deps[] = { | ||
| 92 | { | ||
| 93 | .clkdm_name = "ivahd_clkdm", | ||
| 94 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 95 | }, | ||
| 96 | { | ||
| 97 | .clkdm_name = "l3_1_clkdm", | ||
| 98 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 99 | }, | ||
| 100 | { | ||
| 101 | .clkdm_name = "l3_emif_clkdm", | ||
| 102 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 103 | }, | ||
| 104 | { NULL }, | ||
| 105 | }; | ||
| 106 | |||
| 107 | static struct clkdm_dep ivahd_wkup_sleep_deps[] = { | ||
| 108 | { | ||
| 109 | .clkdm_name = "l3_1_clkdm", | ||
| 110 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 111 | }, | ||
| 112 | { | ||
| 113 | .clkdm_name = "l3_emif_clkdm", | ||
| 114 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 115 | }, | ||
| 116 | { NULL }, | ||
| 117 | }; | ||
| 118 | |||
| 119 | static struct clkdm_dep l3_d2d_wkup_sleep_deps[] = { | ||
| 120 | { | ||
| 121 | .clkdm_name = "abe_clkdm", | ||
| 122 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 123 | }, | ||
| 124 | { | ||
| 125 | .clkdm_name = "ivahd_clkdm", | ||
| 126 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 127 | }, | ||
| 128 | { | ||
| 129 | .clkdm_name = "l3_1_clkdm", | ||
| 130 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 131 | }, | ||
| 132 | { | ||
| 133 | .clkdm_name = "l3_2_clkdm", | ||
| 134 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 135 | }, | ||
| 136 | { | ||
| 137 | .clkdm_name = "l3_emif_clkdm", | ||
| 138 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 139 | }, | ||
| 140 | { | ||
| 141 | .clkdm_name = "l3_init_clkdm", | ||
| 142 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 143 | }, | ||
| 144 | { | ||
| 145 | .clkdm_name = "l4_cfg_clkdm", | ||
| 146 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 147 | }, | ||
| 148 | { | ||
| 149 | .clkdm_name = "l4_per_clkdm", | ||
| 150 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 151 | }, | ||
| 152 | { NULL }, | ||
| 153 | }; | ||
| 154 | |||
| 155 | static struct clkdm_dep l3_dma_wkup_sleep_deps[] = { | ||
| 156 | { | ||
| 157 | .clkdm_name = "abe_clkdm", | ||
| 158 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 159 | }, | ||
| 160 | { | ||
| 161 | .clkdm_name = "ducati_clkdm", | ||
| 162 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 163 | }, | ||
| 164 | { | ||
| 165 | .clkdm_name = "ivahd_clkdm", | ||
| 166 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 167 | }, | ||
| 168 | { | ||
| 169 | .clkdm_name = "l3_1_clkdm", | ||
| 170 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 171 | }, | ||
| 172 | { | ||
| 173 | .clkdm_name = "l3_dss_clkdm", | ||
| 174 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 175 | }, | ||
| 176 | { | ||
| 177 | .clkdm_name = "l3_emif_clkdm", | ||
| 178 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 179 | }, | ||
| 180 | { | ||
| 181 | .clkdm_name = "l3_init_clkdm", | ||
| 182 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 183 | }, | ||
| 184 | { | ||
| 185 | .clkdm_name = "l4_cfg_clkdm", | ||
| 186 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 187 | }, | ||
| 188 | { | ||
| 189 | .clkdm_name = "l4_per_clkdm", | ||
| 190 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 191 | }, | ||
| 192 | { | ||
| 193 | .clkdm_name = "l4_secure_clkdm", | ||
| 194 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 195 | }, | ||
| 196 | { | ||
| 197 | .clkdm_name = "l4_wkup_clkdm", | ||
| 198 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 199 | }, | ||
| 200 | { NULL }, | ||
| 201 | }; | ||
| 202 | |||
| 203 | static struct clkdm_dep l3_dss_wkup_sleep_deps[] = { | ||
| 204 | { | ||
| 205 | .clkdm_name = "ivahd_clkdm", | ||
| 206 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 207 | }, | ||
| 208 | { | ||
| 209 | .clkdm_name = "l3_2_clkdm", | ||
| 210 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 211 | }, | ||
| 212 | { | ||
| 213 | .clkdm_name = "l3_emif_clkdm", | ||
| 214 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 215 | }, | ||
| 216 | { NULL }, | ||
| 217 | }; | ||
| 218 | |||
| 219 | static struct clkdm_dep l3_gfx_wkup_sleep_deps[] = { | ||
| 220 | { | ||
| 221 | .clkdm_name = "ivahd_clkdm", | ||
| 222 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 223 | }, | ||
| 224 | { | ||
| 225 | .clkdm_name = "l3_1_clkdm", | ||
| 226 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 227 | }, | ||
| 228 | { | ||
| 229 | .clkdm_name = "l3_emif_clkdm", | ||
| 230 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 231 | }, | ||
| 232 | { NULL }, | ||
| 233 | }; | ||
| 234 | |||
| 235 | static struct clkdm_dep l3_init_wkup_sleep_deps[] = { | ||
| 236 | { | ||
| 237 | .clkdm_name = "abe_clkdm", | ||
| 238 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 239 | }, | ||
| 240 | { | ||
| 241 | .clkdm_name = "ivahd_clkdm", | ||
| 242 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 243 | }, | ||
| 244 | { | ||
| 245 | .clkdm_name = "l3_emif_clkdm", | ||
| 246 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 247 | }, | ||
| 248 | { | ||
| 249 | .clkdm_name = "l4_cfg_clkdm", | ||
| 250 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 251 | }, | ||
| 252 | { | ||
| 253 | .clkdm_name = "l4_per_clkdm", | ||
| 254 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 255 | }, | ||
| 256 | { | ||
| 257 | .clkdm_name = "l4_secure_clkdm", | ||
| 258 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 259 | }, | ||
| 260 | { | ||
| 261 | .clkdm_name = "l4_wkup_clkdm", | ||
| 262 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 263 | }, | ||
| 264 | { NULL }, | ||
| 265 | }; | ||
| 266 | |||
| 267 | static struct clkdm_dep l4_secure_wkup_sleep_deps[] = { | ||
| 268 | { | ||
| 269 | .clkdm_name = "l3_1_clkdm", | ||
| 270 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 271 | }, | ||
| 272 | { | ||
| 273 | .clkdm_name = "l3_emif_clkdm", | ||
| 274 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 275 | }, | ||
| 276 | { | ||
| 277 | .clkdm_name = "l4_per_clkdm", | ||
| 278 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 279 | }, | ||
| 280 | { NULL }, | ||
| 281 | }; | ||
| 282 | |||
| 283 | static struct clkdm_dep mpuss_wkup_sleep_deps[] = { | ||
| 284 | { | ||
| 285 | .clkdm_name = "abe_clkdm", | ||
| 286 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 287 | }, | ||
| 288 | { | ||
| 289 | .clkdm_name = "ducati_clkdm", | ||
| 290 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 291 | }, | ||
| 292 | { | ||
| 293 | .clkdm_name = "ivahd_clkdm", | ||
| 294 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 295 | }, | ||
| 296 | { | ||
| 297 | .clkdm_name = "l3_1_clkdm", | ||
| 298 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 299 | }, | ||
| 300 | { | ||
| 301 | .clkdm_name = "l3_2_clkdm", | ||
| 302 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 303 | }, | ||
| 304 | { | ||
| 305 | .clkdm_name = "l3_dss_clkdm", | ||
| 306 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 307 | }, | ||
| 308 | { | ||
| 309 | .clkdm_name = "l3_emif_clkdm", | ||
| 310 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 311 | }, | ||
| 312 | { | ||
| 313 | .clkdm_name = "l3_gfx_clkdm", | ||
| 314 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 315 | }, | ||
| 316 | { | ||
| 317 | .clkdm_name = "l3_init_clkdm", | ||
| 318 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 319 | }, | ||
| 320 | { | ||
| 321 | .clkdm_name = "l4_cfg_clkdm", | ||
| 322 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 323 | }, | ||
| 324 | { | ||
| 325 | .clkdm_name = "l4_per_clkdm", | ||
| 326 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 327 | }, | ||
| 328 | { | ||
| 329 | .clkdm_name = "l4_secure_clkdm", | ||
| 330 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 331 | }, | ||
| 332 | { | ||
| 333 | .clkdm_name = "l4_wkup_clkdm", | ||
| 334 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 335 | }, | ||
| 336 | { | ||
| 337 | .clkdm_name = "tesla_clkdm", | ||
| 338 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 339 | }, | ||
| 340 | { NULL }, | ||
| 341 | }; | ||
| 342 | |||
| 343 | static struct clkdm_dep tesla_wkup_sleep_deps[] = { | ||
| 344 | { | ||
| 345 | .clkdm_name = "abe_clkdm", | ||
| 346 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 347 | }, | ||
| 348 | { | ||
| 349 | .clkdm_name = "ivahd_clkdm", | ||
| 350 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 351 | }, | ||
| 352 | { | ||
| 353 | .clkdm_name = "l3_1_clkdm", | ||
| 354 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 355 | }, | ||
| 356 | { | ||
| 357 | .clkdm_name = "l3_2_clkdm", | ||
| 358 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 359 | }, | ||
| 360 | { | ||
| 361 | .clkdm_name = "l3_emif_clkdm", | ||
| 362 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 363 | }, | ||
| 364 | { | ||
| 365 | .clkdm_name = "l3_init_clkdm", | ||
| 366 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 367 | }, | ||
| 368 | { | ||
| 369 | .clkdm_name = "l4_cfg_clkdm", | ||
| 370 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 371 | }, | ||
| 372 | { | ||
| 373 | .clkdm_name = "l4_per_clkdm", | ||
| 374 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 375 | }, | ||
| 376 | { | ||
| 377 | .clkdm_name = "l4_wkup_clkdm", | ||
| 378 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | ||
| 379 | }, | ||
| 380 | { NULL }, | ||
| 381 | }; | ||
| 38 | 382 | ||
| 39 | static struct clockdomain l4_cefuse_44xx_clkdm = { | 383 | static struct clockdomain l4_cefuse_44xx_clkdm = { |
| 40 | .name = "l4_cefuse_clkdm", | 384 | .name = "l4_cefuse_clkdm", |
| @@ -52,6 +396,7 @@ static struct clockdomain l4_cfg_44xx_clkdm = { | |||
| 52 | .prcm_partition = OMAP4430_CM2_PARTITION, | 396 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 53 | .cm_inst = OMAP4430_CM2_CORE_INST, | 397 | .cm_inst = OMAP4430_CM2_CORE_INST, |
| 54 | .clkdm_offs = OMAP4430_CM2_CORE_L4CFG_CDOFFS, | 398 | .clkdm_offs = OMAP4430_CM2_CORE_L4CFG_CDOFFS, |
| 399 | .dep_bit = OMAP4430_L4CFG_STATDEP_SHIFT, | ||
| 55 | .flags = CLKDM_CAN_HWSUP, | 400 | .flags = CLKDM_CAN_HWSUP, |
| 56 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 401 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 57 | }; | 402 | }; |
| @@ -62,6 +407,9 @@ static struct clockdomain tesla_44xx_clkdm = { | |||
| 62 | .prcm_partition = OMAP4430_CM1_PARTITION, | 407 | .prcm_partition = OMAP4430_CM1_PARTITION, |
| 63 | .cm_inst = OMAP4430_CM1_TESLA_INST, | 408 | .cm_inst = OMAP4430_CM1_TESLA_INST, |
| 64 | .clkdm_offs = OMAP4430_CM1_TESLA_TESLA_CDOFFS, | 409 | .clkdm_offs = OMAP4430_CM1_TESLA_TESLA_CDOFFS, |
| 410 | .dep_bit = OMAP4430_TESLA_STATDEP_SHIFT, | ||
| 411 | .wkdep_srcs = tesla_wkup_sleep_deps, | ||
| 412 | .sleepdep_srcs = tesla_wkup_sleep_deps, | ||
| 65 | .flags = CLKDM_CAN_HWSUP_SWSUP, | 413 | .flags = CLKDM_CAN_HWSUP_SWSUP, |
| 66 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 414 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 67 | }; | 415 | }; |
| @@ -72,6 +420,9 @@ static struct clockdomain l3_gfx_44xx_clkdm = { | |||
| 72 | .prcm_partition = OMAP4430_CM2_PARTITION, | 420 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 73 | .cm_inst = OMAP4430_CM2_GFX_INST, | 421 | .cm_inst = OMAP4430_CM2_GFX_INST, |
| 74 | .clkdm_offs = OMAP4430_CM2_GFX_GFX_CDOFFS, | 422 | .clkdm_offs = OMAP4430_CM2_GFX_GFX_CDOFFS, |
| 423 | .dep_bit = OMAP4430_GFX_STATDEP_SHIFT, | ||
| 424 | .wkdep_srcs = l3_gfx_wkup_sleep_deps, | ||
| 425 | .sleepdep_srcs = l3_gfx_wkup_sleep_deps, | ||
| 75 | .flags = CLKDM_CAN_HWSUP_SWSUP, | 426 | .flags = CLKDM_CAN_HWSUP_SWSUP, |
| 76 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 427 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 77 | }; | 428 | }; |
| @@ -82,6 +433,9 @@ static struct clockdomain ivahd_44xx_clkdm = { | |||
| 82 | .prcm_partition = OMAP4430_CM2_PARTITION, | 433 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 83 | .cm_inst = OMAP4430_CM2_IVAHD_INST, | 434 | .cm_inst = OMAP4430_CM2_IVAHD_INST, |
| 84 | .clkdm_offs = OMAP4430_CM2_IVAHD_IVAHD_CDOFFS, | 435 | .clkdm_offs = OMAP4430_CM2_IVAHD_IVAHD_CDOFFS, |
| 436 | .dep_bit = OMAP4430_IVAHD_STATDEP_SHIFT, | ||
| 437 | .wkdep_srcs = ivahd_wkup_sleep_deps, | ||
| 438 | .sleepdep_srcs = ivahd_wkup_sleep_deps, | ||
| 85 | .flags = CLKDM_CAN_HWSUP_SWSUP, | 439 | .flags = CLKDM_CAN_HWSUP_SWSUP, |
| 86 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 440 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 87 | }; | 441 | }; |
| @@ -92,6 +446,9 @@ static struct clockdomain l4_secure_44xx_clkdm = { | |||
| 92 | .prcm_partition = OMAP4430_CM2_PARTITION, | 446 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 93 | .cm_inst = OMAP4430_CM2_L4PER_INST, | 447 | .cm_inst = OMAP4430_CM2_L4PER_INST, |
| 94 | .clkdm_offs = OMAP4430_CM2_L4PER_L4SEC_CDOFFS, | 448 | .clkdm_offs = OMAP4430_CM2_L4PER_L4SEC_CDOFFS, |
| 449 | .dep_bit = OMAP4430_L4SEC_STATDEP_SHIFT, | ||
| 450 | .wkdep_srcs = l4_secure_wkup_sleep_deps, | ||
| 451 | .sleepdep_srcs = l4_secure_wkup_sleep_deps, | ||
| 95 | .flags = CLKDM_CAN_HWSUP_SWSUP, | 452 | .flags = CLKDM_CAN_HWSUP_SWSUP, |
| 96 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 453 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 97 | }; | 454 | }; |
| @@ -102,6 +459,7 @@ static struct clockdomain l4_per_44xx_clkdm = { | |||
| 102 | .prcm_partition = OMAP4430_CM2_PARTITION, | 459 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 103 | .cm_inst = OMAP4430_CM2_L4PER_INST, | 460 | .cm_inst = OMAP4430_CM2_L4PER_INST, |
| 104 | .clkdm_offs = OMAP4430_CM2_L4PER_L4PER_CDOFFS, | 461 | .clkdm_offs = OMAP4430_CM2_L4PER_L4PER_CDOFFS, |
| 462 | .dep_bit = OMAP4430_L4PER_STATDEP_SHIFT, | ||
| 105 | .flags = CLKDM_CAN_HWSUP_SWSUP, | 463 | .flags = CLKDM_CAN_HWSUP_SWSUP, |
| 106 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 464 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 107 | }; | 465 | }; |
| @@ -112,6 +470,7 @@ static struct clockdomain abe_44xx_clkdm = { | |||
| 112 | .prcm_partition = OMAP4430_CM1_PARTITION, | 470 | .prcm_partition = OMAP4430_CM1_PARTITION, |
| 113 | .cm_inst = OMAP4430_CM1_ABE_INST, | 471 | .cm_inst = OMAP4430_CM1_ABE_INST, |
| 114 | .clkdm_offs = OMAP4430_CM1_ABE_ABE_CDOFFS, | 472 | .clkdm_offs = OMAP4430_CM1_ABE_ABE_CDOFFS, |
| 473 | .dep_bit = OMAP4430_ABE_STATDEP_SHIFT, | ||
| 115 | .flags = CLKDM_CAN_HWSUP_SWSUP, | 474 | .flags = CLKDM_CAN_HWSUP_SWSUP, |
| 116 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 475 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 117 | }; | 476 | }; |
| @@ -131,6 +490,9 @@ static struct clockdomain l3_init_44xx_clkdm = { | |||
| 131 | .prcm_partition = OMAP4430_CM2_PARTITION, | 490 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 132 | .cm_inst = OMAP4430_CM2_L3INIT_INST, | 491 | .cm_inst = OMAP4430_CM2_L3INIT_INST, |
| 133 | .clkdm_offs = OMAP4430_CM2_L3INIT_L3INIT_CDOFFS, | 492 | .clkdm_offs = OMAP4430_CM2_L3INIT_L3INIT_CDOFFS, |
| 493 | .dep_bit = OMAP4430_L3INIT_STATDEP_SHIFT, | ||
| 494 | .wkdep_srcs = l3_init_wkup_sleep_deps, | ||
| 495 | .sleepdep_srcs = l3_init_wkup_sleep_deps, | ||
| 134 | .flags = CLKDM_CAN_HWSUP_SWSUP, | 496 | .flags = CLKDM_CAN_HWSUP_SWSUP, |
| 135 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 497 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 136 | }; | 498 | }; |
| @@ -141,6 +503,8 @@ static struct clockdomain mpuss_44xx_clkdm = { | |||
| 141 | .prcm_partition = OMAP4430_CM1_PARTITION, | 503 | .prcm_partition = OMAP4430_CM1_PARTITION, |
| 142 | .cm_inst = OMAP4430_CM1_MPU_INST, | 504 | .cm_inst = OMAP4430_CM1_MPU_INST, |
| 143 | .clkdm_offs = OMAP4430_CM1_MPU_MPU_CDOFFS, | 505 | .clkdm_offs = OMAP4430_CM1_MPU_MPU_CDOFFS, |
| 506 | .wkdep_srcs = mpuss_wkup_sleep_deps, | ||
| 507 | .sleepdep_srcs = mpuss_wkup_sleep_deps, | ||
| 144 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, | 508 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, |
| 145 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 509 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 146 | }; | 510 | }; |
| @@ -150,7 +514,7 @@ static struct clockdomain mpu0_44xx_clkdm = { | |||
| 150 | .pwrdm = { .name = "cpu0_pwrdm" }, | 514 | .pwrdm = { .name = "cpu0_pwrdm" }, |
| 151 | .prcm_partition = OMAP4430_PRCM_MPU_PARTITION, | 515 | .prcm_partition = OMAP4430_PRCM_MPU_PARTITION, |
| 152 | .cm_inst = OMAP4430_PRCM_MPU_CPU0_INST, | 516 | .cm_inst = OMAP4430_PRCM_MPU_CPU0_INST, |
| 153 | .clkdm_offs = OMAP4430_PRCM_MPU_CPU0_MPU_CDOFFS, | 517 | .clkdm_offs = OMAP4430_PRCM_MPU_CPU0_CPU0_CDOFFS, |
| 154 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, | 518 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, |
| 155 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 519 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 156 | }; | 520 | }; |
| @@ -160,7 +524,7 @@ static struct clockdomain mpu1_44xx_clkdm = { | |||
| 160 | .pwrdm = { .name = "cpu1_pwrdm" }, | 524 | .pwrdm = { .name = "cpu1_pwrdm" }, |
| 161 | .prcm_partition = OMAP4430_PRCM_MPU_PARTITION, | 525 | .prcm_partition = OMAP4430_PRCM_MPU_PARTITION, |
| 162 | .cm_inst = OMAP4430_PRCM_MPU_CPU1_INST, | 526 | .cm_inst = OMAP4430_PRCM_MPU_CPU1_INST, |
| 163 | .clkdm_offs = OMAP4430_PRCM_MPU_CPU1_MPU_CDOFFS, | 527 | .clkdm_offs = OMAP4430_PRCM_MPU_CPU1_CPU1_CDOFFS, |
| 164 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, | 528 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, |
| 165 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 529 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 166 | }; | 530 | }; |
| @@ -171,6 +535,7 @@ static struct clockdomain l3_emif_44xx_clkdm = { | |||
| 171 | .prcm_partition = OMAP4430_CM2_PARTITION, | 535 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 172 | .cm_inst = OMAP4430_CM2_CORE_INST, | 536 | .cm_inst = OMAP4430_CM2_CORE_INST, |
| 173 | .clkdm_offs = OMAP4430_CM2_CORE_MEMIF_CDOFFS, | 537 | .clkdm_offs = OMAP4430_CM2_CORE_MEMIF_CDOFFS, |
| 538 | .dep_bit = OMAP4430_MEMIF_STATDEP_SHIFT, | ||
| 174 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, | 539 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, |
| 175 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 540 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 176 | }; | 541 | }; |
| @@ -191,6 +556,9 @@ static struct clockdomain ducati_44xx_clkdm = { | |||
| 191 | .prcm_partition = OMAP4430_CM2_PARTITION, | 556 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 192 | .cm_inst = OMAP4430_CM2_CORE_INST, | 557 | .cm_inst = OMAP4430_CM2_CORE_INST, |
| 193 | .clkdm_offs = OMAP4430_CM2_CORE_DUCATI_CDOFFS, | 558 | .clkdm_offs = OMAP4430_CM2_CORE_DUCATI_CDOFFS, |
| 559 | .dep_bit = OMAP4430_DUCATI_STATDEP_SHIFT, | ||
| 560 | .wkdep_srcs = ducati_wkup_sleep_deps, | ||
| 561 | .sleepdep_srcs = ducati_wkup_sleep_deps, | ||
| 194 | .flags = CLKDM_CAN_HWSUP_SWSUP, | 562 | .flags = CLKDM_CAN_HWSUP_SWSUP, |
| 195 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 563 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 196 | }; | 564 | }; |
| @@ -201,6 +569,7 @@ static struct clockdomain l3_2_44xx_clkdm = { | |||
| 201 | .prcm_partition = OMAP4430_CM2_PARTITION, | 569 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 202 | .cm_inst = OMAP4430_CM2_CORE_INST, | 570 | .cm_inst = OMAP4430_CM2_CORE_INST, |
| 203 | .clkdm_offs = OMAP4430_CM2_CORE_L3_2_CDOFFS, | 571 | .clkdm_offs = OMAP4430_CM2_CORE_L3_2_CDOFFS, |
| 572 | .dep_bit = OMAP4430_L3_2_STATDEP_SHIFT, | ||
| 204 | .flags = CLKDM_CAN_HWSUP, | 573 | .flags = CLKDM_CAN_HWSUP, |
| 205 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 574 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 206 | }; | 575 | }; |
| @@ -211,6 +580,7 @@ static struct clockdomain l3_1_44xx_clkdm = { | |||
| 211 | .prcm_partition = OMAP4430_CM2_PARTITION, | 580 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 212 | .cm_inst = OMAP4430_CM2_CORE_INST, | 581 | .cm_inst = OMAP4430_CM2_CORE_INST, |
| 213 | .clkdm_offs = OMAP4430_CM2_CORE_L3_1_CDOFFS, | 582 | .clkdm_offs = OMAP4430_CM2_CORE_L3_1_CDOFFS, |
| 583 | .dep_bit = OMAP4430_L3_1_STATDEP_SHIFT, | ||
| 214 | .flags = CLKDM_CAN_HWSUP, | 584 | .flags = CLKDM_CAN_HWSUP, |
| 215 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 585 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 216 | }; | 586 | }; |
| @@ -221,6 +591,8 @@ static struct clockdomain l3_d2d_44xx_clkdm = { | |||
| 221 | .prcm_partition = OMAP4430_CM2_PARTITION, | 591 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 222 | .cm_inst = OMAP4430_CM2_CORE_INST, | 592 | .cm_inst = OMAP4430_CM2_CORE_INST, |
| 223 | .clkdm_offs = OMAP4430_CM2_CORE_D2D_CDOFFS, | 593 | .clkdm_offs = OMAP4430_CM2_CORE_D2D_CDOFFS, |
| 594 | .wkdep_srcs = l3_d2d_wkup_sleep_deps, | ||
| 595 | .sleepdep_srcs = l3_d2d_wkup_sleep_deps, | ||
| 224 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, | 596 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, |
| 225 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 597 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 226 | }; | 598 | }; |
| @@ -231,6 +603,8 @@ static struct clockdomain iss_44xx_clkdm = { | |||
| 231 | .prcm_partition = OMAP4430_CM2_PARTITION, | 603 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 232 | .cm_inst = OMAP4430_CM2_CAM_INST, | 604 | .cm_inst = OMAP4430_CM2_CAM_INST, |
| 233 | .clkdm_offs = OMAP4430_CM2_CAM_CAM_CDOFFS, | 605 | .clkdm_offs = OMAP4430_CM2_CAM_CAM_CDOFFS, |
| 606 | .wkdep_srcs = iss_wkup_sleep_deps, | ||
| 607 | .sleepdep_srcs = iss_wkup_sleep_deps, | ||
| 234 | .flags = CLKDM_CAN_HWSUP_SWSUP, | 608 | .flags = CLKDM_CAN_HWSUP_SWSUP, |
| 235 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 609 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 236 | }; | 610 | }; |
| @@ -241,6 +615,9 @@ static struct clockdomain l3_dss_44xx_clkdm = { | |||
| 241 | .prcm_partition = OMAP4430_CM2_PARTITION, | 615 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 242 | .cm_inst = OMAP4430_CM2_DSS_INST, | 616 | .cm_inst = OMAP4430_CM2_DSS_INST, |
| 243 | .clkdm_offs = OMAP4430_CM2_DSS_DSS_CDOFFS, | 617 | .clkdm_offs = OMAP4430_CM2_DSS_DSS_CDOFFS, |
| 618 | .dep_bit = OMAP4430_DSS_STATDEP_SHIFT, | ||
| 619 | .wkdep_srcs = l3_dss_wkup_sleep_deps, | ||
| 620 | .sleepdep_srcs = l3_dss_wkup_sleep_deps, | ||
| 244 | .flags = CLKDM_CAN_HWSUP_SWSUP, | 621 | .flags = CLKDM_CAN_HWSUP_SWSUP, |
| 245 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 622 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 246 | }; | 623 | }; |
| @@ -251,6 +628,7 @@ static struct clockdomain l4_wkup_44xx_clkdm = { | |||
| 251 | .prcm_partition = OMAP4430_PRM_PARTITION, | 628 | .prcm_partition = OMAP4430_PRM_PARTITION, |
| 252 | .cm_inst = OMAP4430_PRM_WKUP_CM_INST, | 629 | .cm_inst = OMAP4430_PRM_WKUP_CM_INST, |
| 253 | .clkdm_offs = OMAP4430_PRM_WKUP_CM_WKUP_CDOFFS, | 630 | .clkdm_offs = OMAP4430_PRM_WKUP_CM_WKUP_CDOFFS, |
| 631 | .dep_bit = OMAP4430_L4WKUP_STATDEP_SHIFT, | ||
| 254 | .flags = CLKDM_CAN_HWSUP, | 632 | .flags = CLKDM_CAN_HWSUP, |
| 255 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 633 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 256 | }; | 634 | }; |
| @@ -271,6 +649,8 @@ static struct clockdomain l3_dma_44xx_clkdm = { | |||
| 271 | .prcm_partition = OMAP4430_CM2_PARTITION, | 649 | .prcm_partition = OMAP4430_CM2_PARTITION, |
| 272 | .cm_inst = OMAP4430_CM2_CORE_INST, | 650 | .cm_inst = OMAP4430_CM2_CORE_INST, |
| 273 | .clkdm_offs = OMAP4430_CM2_CORE_SDMA_CDOFFS, | 651 | .clkdm_offs = OMAP4430_CM2_CORE_SDMA_CDOFFS, |
| 652 | .wkdep_srcs = l3_dma_wkup_sleep_deps, | ||
| 653 | .sleepdep_srcs = l3_dma_wkup_sleep_deps, | ||
| 274 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, | 654 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, |
| 275 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 655 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 276 | }; | 656 | }; |
| @@ -305,5 +685,5 @@ static struct clockdomain *clockdomains_omap44xx[] __initdata = { | |||
| 305 | 685 | ||
| 306 | void __init omap44xx_clockdomains_init(void) | 686 | void __init omap44xx_clockdomains_init(void) |
| 307 | { | 687 | { |
| 308 | clkdm_init(clockdomains_omap44xx, NULL); | 688 | clkdm_init(clockdomains_omap44xx, NULL, &omap4_clkdm_operations); |
| 309 | } | 689 | } |
diff --git a/arch/arm/mach-omap2/cm-regbits-24xx.h b/arch/arm/mach-omap2/cm-regbits-24xx.h index d70660e82fe6..686290437568 100644 --- a/arch/arm/mach-omap2/cm-regbits-24xx.h +++ b/arch/arm/mach-omap2/cm-regbits-24xx.h | |||
| @@ -210,8 +210,11 @@ | |||
| 210 | #define OMAP24XX_AUTO_USB_MASK (1 << 0) | 210 | #define OMAP24XX_AUTO_USB_MASK (1 << 0) |
| 211 | 211 | ||
| 212 | /* CM_AUTOIDLE3_CORE */ | 212 | /* CM_AUTOIDLE3_CORE */ |
| 213 | #define OMAP24XX_AUTO_SDRC_SHIFT 2 | ||
| 213 | #define OMAP24XX_AUTO_SDRC_MASK (1 << 2) | 214 | #define OMAP24XX_AUTO_SDRC_MASK (1 << 2) |
| 215 | #define OMAP24XX_AUTO_GPMC_SHIFT 1 | ||
| 214 | #define OMAP24XX_AUTO_GPMC_MASK (1 << 1) | 216 | #define OMAP24XX_AUTO_GPMC_MASK (1 << 1) |
| 217 | #define OMAP24XX_AUTO_SDMA_SHIFT 0 | ||
| 215 | #define OMAP24XX_AUTO_SDMA_MASK (1 << 0) | 218 | #define OMAP24XX_AUTO_SDMA_MASK (1 << 0) |
| 216 | 219 | ||
| 217 | /* CM_AUTOIDLE4_CORE */ | 220 | /* CM_AUTOIDLE4_CORE */ |
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.c b/arch/arm/mach-omap2/cm2xxx_3xxx.c index 96954aa48671..9d0dec806e92 100644 --- a/arch/arm/mach-omap2/cm2xxx_3xxx.c +++ b/arch/arm/mach-omap2/cm2xxx_3xxx.c | |||
| @@ -25,6 +25,14 @@ | |||
| 25 | #include "cm-regbits-24xx.h" | 25 | #include "cm-regbits-24xx.h" |
| 26 | #include "cm-regbits-34xx.h" | 26 | #include "cm-regbits-34xx.h" |
| 27 | 27 | ||
| 28 | /* CM_AUTOIDLE_PLL.AUTO_* bit values for DPLLs */ | ||
| 29 | #define DPLL_AUTOIDLE_DISABLE 0x0 | ||
| 30 | #define OMAP2XXX_DPLL_AUTOIDLE_LOW_POWER_STOP 0x3 | ||
| 31 | |||
| 32 | /* CM_AUTOIDLE_PLL.AUTO_* bit values for APLLs (OMAP2xxx only) */ | ||
| 33 | #define OMAP2XXX_APLL_AUTOIDLE_DISABLE 0x0 | ||
| 34 | #define OMAP2XXX_APLL_AUTOIDLE_LOW_POWER_STOP 0x3 | ||
| 35 | |||
| 28 | static const u8 cm_idlest_offs[] = { | 36 | static const u8 cm_idlest_offs[] = { |
| 29 | CM_IDLEST1, CM_IDLEST2, OMAP2430_CM_IDLEST3 | 37 | CM_IDLEST1, CM_IDLEST2, OMAP2430_CM_IDLEST3 |
| 30 | }; | 38 | }; |
| @@ -125,6 +133,67 @@ void omap3xxx_cm_clkdm_force_wakeup(s16 module, u32 mask) | |||
| 125 | _write_clktrctrl(OMAP34XX_CLKSTCTRL_FORCE_WAKEUP, module, mask); | 133 | _write_clktrctrl(OMAP34XX_CLKSTCTRL_FORCE_WAKEUP, module, mask); |
| 126 | } | 134 | } |
| 127 | 135 | ||
| 136 | /* | ||
| 137 | * DPLL autoidle control | ||
| 138 | */ | ||
| 139 | |||
| 140 | static void _omap2xxx_set_dpll_autoidle(u8 m) | ||
| 141 | { | ||
| 142 | u32 v; | ||
| 143 | |||
| 144 | v = omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE); | ||
| 145 | v &= ~OMAP24XX_AUTO_DPLL_MASK; | ||
| 146 | v |= m << OMAP24XX_AUTO_DPLL_SHIFT; | ||
| 147 | omap2_cm_write_mod_reg(v, PLL_MOD, CM_AUTOIDLE); | ||
| 148 | } | ||
| 149 | |||
| 150 | void omap2xxx_cm_set_dpll_disable_autoidle(void) | ||
| 151 | { | ||
| 152 | _omap2xxx_set_dpll_autoidle(OMAP2XXX_DPLL_AUTOIDLE_LOW_POWER_STOP); | ||
| 153 | } | ||
| 154 | |||
| 155 | void omap2xxx_cm_set_dpll_auto_low_power_stop(void) | ||
| 156 | { | ||
| 157 | _omap2xxx_set_dpll_autoidle(DPLL_AUTOIDLE_DISABLE); | ||
| 158 | } | ||
| 159 | |||
| 160 | /* | ||
| 161 | * APLL autoidle control | ||
| 162 | */ | ||
| 163 | |||
| 164 | static void _omap2xxx_set_apll_autoidle(u8 m, u32 mask) | ||
| 165 | { | ||
| 166 | u32 v; | ||
| 167 | |||
| 168 | v = omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE); | ||
| 169 | v &= ~mask; | ||
| 170 | v |= m << __ffs(mask); | ||
| 171 | omap2_cm_write_mod_reg(v, PLL_MOD, CM_AUTOIDLE); | ||
| 172 | } | ||
| 173 | |||
| 174 | void omap2xxx_cm_set_apll54_disable_autoidle(void) | ||
| 175 | { | ||
| 176 | _omap2xxx_set_apll_autoidle(OMAP2XXX_APLL_AUTOIDLE_LOW_POWER_STOP, | ||
| 177 | OMAP24XX_AUTO_54M_MASK); | ||
| 178 | } | ||
| 179 | |||
| 180 | void omap2xxx_cm_set_apll54_auto_low_power_stop(void) | ||
| 181 | { | ||
| 182 | _omap2xxx_set_apll_autoidle(OMAP2XXX_APLL_AUTOIDLE_DISABLE, | ||
| 183 | OMAP24XX_AUTO_54M_MASK); | ||
| 184 | } | ||
| 185 | |||
| 186 | void omap2xxx_cm_set_apll96_disable_autoidle(void) | ||
| 187 | { | ||
| 188 | _omap2xxx_set_apll_autoidle(OMAP2XXX_APLL_AUTOIDLE_LOW_POWER_STOP, | ||
| 189 | OMAP24XX_AUTO_96M_MASK); | ||
| 190 | } | ||
| 191 | |||
| 192 | void omap2xxx_cm_set_apll96_auto_low_power_stop(void) | ||
| 193 | { | ||
| 194 | _omap2xxx_set_apll_autoidle(OMAP2XXX_APLL_AUTOIDLE_DISABLE, | ||
| 195 | OMAP24XX_AUTO_96M_MASK); | ||
| 196 | } | ||
| 128 | 197 | ||
| 129 | /* | 198 | /* |
| 130 | * | 199 | * |
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.h b/arch/arm/mach-omap2/cm2xxx_3xxx.h index 5e9ea5bd60b9..088bbad73db5 100644 --- a/arch/arm/mach-omap2/cm2xxx_3xxx.h +++ b/arch/arm/mach-omap2/cm2xxx_3xxx.h | |||
| @@ -122,6 +122,14 @@ extern void omap3xxx_cm_clkdm_disable_hwsup(s16 module, u32 mask); | |||
| 122 | extern void omap3xxx_cm_clkdm_force_sleep(s16 module, u32 mask); | 122 | extern void omap3xxx_cm_clkdm_force_sleep(s16 module, u32 mask); |
| 123 | extern void omap3xxx_cm_clkdm_force_wakeup(s16 module, u32 mask); | 123 | extern void omap3xxx_cm_clkdm_force_wakeup(s16 module, u32 mask); |
| 124 | 124 | ||
| 125 | extern void omap2xxx_cm_set_dpll_disable_autoidle(void); | ||
| 126 | extern void omap2xxx_cm_set_dpll_auto_low_power_stop(void); | ||
| 127 | |||
| 128 | extern void omap2xxx_cm_set_apll54_disable_autoidle(void); | ||
| 129 | extern void omap2xxx_cm_set_apll54_auto_low_power_stop(void); | ||
| 130 | extern void omap2xxx_cm_set_apll96_disable_autoidle(void); | ||
| 131 | extern void omap2xxx_cm_set_apll96_auto_low_power_stop(void); | ||
| 132 | |||
| 125 | #endif | 133 | #endif |
| 126 | 134 | ||
| 127 | /* CM register bits shared between 24XX and 3430 */ | 135 | /* CM register bits shared between 24XX and 3430 */ |
diff --git a/arch/arm/mach-omap2/cm44xx.h b/arch/arm/mach-omap2/cm44xx.h index 48fc3f426fbd..0b87ec82b41c 100644 --- a/arch/arm/mach-omap2/cm44xx.h +++ b/arch/arm/mach-omap2/cm44xx.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include "cm.h" | 21 | #include "cm.h" |
| 22 | 22 | ||
| 23 | #define OMAP4_CM_CLKSTCTRL 0x0000 | 23 | #define OMAP4_CM_CLKSTCTRL 0x0000 |
| 24 | #define OMAP4_CM_STATICDEP 0x0004 | ||
| 24 | 25 | ||
| 25 | /* Function prototypes */ | 26 | /* Function prototypes */ |
| 26 | # ifndef __ASSEMBLER__ | 27 | # ifndef __ASSEMBLER__ |
diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c index c04bbbea17a5..a482bfa0a954 100644 --- a/arch/arm/mach-omap2/cminst44xx.c +++ b/arch/arm/mach-omap2/cminst44xx.c | |||
| @@ -73,6 +73,27 @@ u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, s16 inst, | |||
| 73 | return v; | 73 | return v; |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | u32 omap4_cminst_set_inst_reg_bits(u32 bits, u8 part, s16 inst, s16 idx) | ||
| 77 | { | ||
| 78 | return omap4_cminst_rmw_inst_reg_bits(bits, bits, part, inst, idx); | ||
| 79 | } | ||
| 80 | |||
| 81 | u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, s16 inst, s16 idx) | ||
| 82 | { | ||
| 83 | return omap4_cminst_rmw_inst_reg_bits(bits, 0x0, part, inst, idx); | ||
| 84 | } | ||
| 85 | |||
| 86 | u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx, u32 mask) | ||
| 87 | { | ||
| 88 | u32 v; | ||
| 89 | |||
| 90 | v = omap4_cminst_read_inst_reg(part, inst, idx); | ||
| 91 | v &= mask; | ||
| 92 | v >>= __ffs(mask); | ||
| 93 | |||
| 94 | return v; | ||
| 95 | } | ||
| 96 | |||
| 76 | /* | 97 | /* |
| 77 | * | 98 | * |
| 78 | */ | 99 | */ |
diff --git a/arch/arm/mach-omap2/cminst44xx.h b/arch/arm/mach-omap2/cminst44xx.h index a6abd0a8cb82..2b32c181a2ee 100644 --- a/arch/arm/mach-omap2/cminst44xx.h +++ b/arch/arm/mach-omap2/cminst44xx.h | |||
| @@ -25,6 +25,12 @@ extern u32 omap4_cminst_read_inst_reg(u8 part, s16 inst, u16 idx); | |||
| 25 | extern void omap4_cminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx); | 25 | extern void omap4_cminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx); |
| 26 | extern u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, | 26 | extern u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, |
| 27 | s16 inst, s16 idx); | 27 | s16 inst, s16 idx); |
| 28 | extern u32 omap4_cminst_set_inst_reg_bits(u32 bits, u8 part, s16 inst, | ||
| 29 | s16 idx); | ||
| 30 | extern u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, s16 inst, | ||
| 31 | s16 idx); | ||
| 32 | extern u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx, | ||
| 33 | u32 mask); | ||
| 28 | 34 | ||
| 29 | extern int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg); | 35 | extern int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg); |
| 30 | 36 | ||
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c index 778929f7e92d..48de4513de49 100644 --- a/arch/arm/mach-omap2/common.c +++ b/arch/arm/mach-omap2/common.c | |||
| @@ -40,7 +40,7 @@ static void __init __omap2_set_globals(struct omap_globals *omap2_globals) | |||
| 40 | 40 | ||
| 41 | #endif | 41 | #endif |
| 42 | 42 | ||
| 43 | #if defined(CONFIG_ARCH_OMAP2420) | 43 | #if defined(CONFIG_SOC_OMAP2420) |
| 44 | 44 | ||
| 45 | static struct omap_globals omap242x_globals = { | 45 | static struct omap_globals omap242x_globals = { |
| 46 | .class = OMAP242X_CLASS, | 46 | .class = OMAP242X_CLASS, |
| @@ -61,7 +61,7 @@ void __init omap2_set_globals_242x(void) | |||
| 61 | } | 61 | } |
| 62 | #endif | 62 | #endif |
| 63 | 63 | ||
| 64 | #if defined(CONFIG_ARCH_OMAP2430) | 64 | #if defined(CONFIG_SOC_OMAP2430) |
| 65 | 65 | ||
| 66 | static struct omap_globals omap243x_globals = { | 66 | static struct omap_globals omap243x_globals = { |
| 67 | .class = OMAP243X_CLASS, | 67 | .class = OMAP243X_CLASS, |
| @@ -108,6 +108,27 @@ void __init omap3_map_io(void) | |||
| 108 | omap2_set_globals_3xxx(); | 108 | omap2_set_globals_3xxx(); |
| 109 | omap34xx_map_common_io(); | 109 | omap34xx_map_common_io(); |
| 110 | } | 110 | } |
| 111 | |||
| 112 | /* | ||
| 113 | * Adjust TAP register base such that omap3_check_revision accesses the correct | ||
| 114 | * TI816X register for checking device ID (it adds 0x204 to tap base while | ||
| 115 | * TI816X DEVICE ID register is at offset 0x600 from control base). | ||
| 116 | */ | ||
| 117 | #define TI816X_TAP_BASE (TI816X_CTRL_BASE + \ | ||
| 118 | TI816X_CONTROL_DEVICE_ID - 0x204) | ||
| 119 | |||
| 120 | static struct omap_globals ti816x_globals = { | ||
| 121 | .class = OMAP343X_CLASS, | ||
| 122 | .tap = OMAP2_L4_IO_ADDRESS(TI816X_TAP_BASE), | ||
| 123 | .ctrl = TI816X_CTRL_BASE, | ||
| 124 | .prm = TI816X_PRCM_BASE, | ||
| 125 | .cm = TI816X_PRCM_BASE, | ||
| 126 | }; | ||
| 127 | |||
| 128 | void __init omap2_set_globals_ti816x(void) | ||
| 129 | { | ||
| 130 | __omap2_set_globals(&ti816x_globals); | ||
| 131 | } | ||
| 111 | #endif | 132 | #endif |
| 112 | 133 | ||
| 113 | #if defined(CONFIG_ARCH_OMAP4) | 134 | #if defined(CONFIG_ARCH_OMAP4) |
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h index f0629ae04102..c2804c1c4efd 100644 --- a/arch/arm/mach-omap2/control.h +++ b/arch/arm/mach-omap2/control.h | |||
| @@ -52,6 +52,9 @@ | |||
| 52 | #define OMAP343X_CONTROL_PADCONFS_WKUP 0xa00 | 52 | #define OMAP343X_CONTROL_PADCONFS_WKUP 0xa00 |
| 53 | #define OMAP343X_CONTROL_GENERAL_WKUP 0xa60 | 53 | #define OMAP343X_CONTROL_GENERAL_WKUP 0xa60 |
| 54 | 54 | ||
| 55 | /* TI816X spefic control submodules */ | ||
| 56 | #define TI816X_CONTROL_DEVCONF 0x600 | ||
| 57 | |||
| 55 | /* Control register offsets - read/write with omap_ctrl_{read,write}{bwl}() */ | 58 | /* Control register offsets - read/write with omap_ctrl_{read,write}{bwl}() */ |
| 56 | 59 | ||
| 57 | #define OMAP2_CONTROL_SYSCONFIG (OMAP2_CONTROL_INTERFACE + 0x10) | 60 | #define OMAP2_CONTROL_SYSCONFIG (OMAP2_CONTROL_INTERFACE + 0x10) |
| @@ -241,6 +244,9 @@ | |||
| 241 | #define OMAP3_PADCONF_SAD2D_MSTANDBY 0x250 | 244 | #define OMAP3_PADCONF_SAD2D_MSTANDBY 0x250 |
| 242 | #define OMAP3_PADCONF_SAD2D_IDLEACK 0x254 | 245 | #define OMAP3_PADCONF_SAD2D_IDLEACK 0x254 |
| 243 | 246 | ||
| 247 | /* TI816X CONTROL_DEVCONF register offsets */ | ||
| 248 | #define TI816X_CONTROL_DEVICE_ID (TI816X_CONTROL_DEVCONF + 0x000) | ||
| 249 | |||
| 244 | /* | 250 | /* |
| 245 | * REVISIT: This list of registers is not comprehensive - there are more | 251 | * REVISIT: This list of registers is not comprehensive - there are more |
| 246 | * that should be added. | 252 | * that should be added. |
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index f7b22a16f385..7cc80715ef12 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c | |||
| @@ -99,14 +99,14 @@ static int omap3_idle_bm_check(void) | |||
| 99 | static int _cpuidle_allow_idle(struct powerdomain *pwrdm, | 99 | static int _cpuidle_allow_idle(struct powerdomain *pwrdm, |
| 100 | struct clockdomain *clkdm) | 100 | struct clockdomain *clkdm) |
| 101 | { | 101 | { |
| 102 | omap2_clkdm_allow_idle(clkdm); | 102 | clkdm_allow_idle(clkdm); |
| 103 | return 0; | 103 | return 0; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | static int _cpuidle_deny_idle(struct powerdomain *pwrdm, | 106 | static int _cpuidle_deny_idle(struct powerdomain *pwrdm, |
| 107 | struct clockdomain *clkdm) | 107 | struct clockdomain *clkdm) |
| 108 | { | 108 | { |
| 109 | omap2_clkdm_deny_idle(clkdm); | 109 | clkdm_deny_idle(clkdm); |
| 110 | return 0; | 110 | return 0; |
| 111 | } | 111 | } |
| 112 | 112 | ||
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 2c9c912f2c42..0d2d6a9c303c 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
| 16 | #include <linux/clk.h> | 16 | #include <linux/clk.h> |
| 17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
| 18 | #include <linux/slab.h> | ||
| 18 | 19 | ||
| 19 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
| 20 | #include <mach/irqs.h> | 21 | #include <mach/irqs.h> |
| @@ -30,10 +31,75 @@ | |||
| 30 | #include <plat/dma.h> | 31 | #include <plat/dma.h> |
| 31 | #include <plat/omap_hwmod.h> | 32 | #include <plat/omap_hwmod.h> |
| 32 | #include <plat/omap_device.h> | 33 | #include <plat/omap_device.h> |
| 34 | #include <plat/omap4-keypad.h> | ||
| 33 | 35 | ||
| 34 | #include "mux.h" | 36 | #include "mux.h" |
| 35 | #include "control.h" | 37 | #include "control.h" |
| 36 | 38 | ||
| 39 | #define L3_MODULES_MAX_LEN 12 | ||
| 40 | #define L3_MODULES 3 | ||
| 41 | |||
| 42 | static int __init omap3_l3_init(void) | ||
| 43 | { | ||
| 44 | int l; | ||
| 45 | struct omap_hwmod *oh; | ||
| 46 | struct omap_device *od; | ||
| 47 | char oh_name[L3_MODULES_MAX_LEN]; | ||
| 48 | |||
| 49 | /* | ||
| 50 | * To avoid code running on other OMAPs in | ||
| 51 | * multi-omap builds | ||
| 52 | */ | ||
| 53 | if (!(cpu_is_omap34xx())) | ||
| 54 | return -ENODEV; | ||
| 55 | |||
| 56 | l = snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main"); | ||
| 57 | |||
| 58 | oh = omap_hwmod_lookup(oh_name); | ||
| 59 | |||
| 60 | if (!oh) | ||
| 61 | pr_err("could not look up %s\n", oh_name); | ||
| 62 | |||
| 63 | od = omap_device_build("omap_l3_smx", 0, oh, NULL, 0, | ||
| 64 | NULL, 0, 0); | ||
| 65 | |||
| 66 | WARN(IS_ERR(od), "could not build omap_device for %s\n", oh_name); | ||
| 67 | |||
| 68 | return PTR_ERR(od); | ||
| 69 | } | ||
| 70 | postcore_initcall(omap3_l3_init); | ||
| 71 | |||
| 72 | static int __init omap4_l3_init(void) | ||
| 73 | { | ||
| 74 | int l, i; | ||
| 75 | struct omap_hwmod *oh[3]; | ||
| 76 | struct omap_device *od; | ||
| 77 | char oh_name[L3_MODULES_MAX_LEN]; | ||
| 78 | |||
| 79 | /* | ||
| 80 | * To avoid code running on other OMAPs in | ||
| 81 | * multi-omap builds | ||
| 82 | */ | ||
| 83 | if (!(cpu_is_omap44xx())) | ||
| 84 | return -ENODEV; | ||
| 85 | |||
| 86 | for (i = 0; i < L3_MODULES; i++) { | ||
| 87 | l = snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main_%d", i+1); | ||
| 88 | |||
| 89 | oh[i] = omap_hwmod_lookup(oh_name); | ||
| 90 | if (!(oh[i])) | ||
| 91 | pr_err("could not look up %s\n", oh_name); | ||
| 92 | } | ||
| 93 | |||
| 94 | od = omap_device_build_ss("omap_l3_noc", 0, oh, 3, NULL, | ||
| 95 | 0, NULL, 0, 0); | ||
| 96 | |||
| 97 | WARN(IS_ERR(od), "could not build omap_device for %s\n", oh_name); | ||
| 98 | |||
| 99 | return PTR_ERR(od); | ||
| 100 | } | ||
| 101 | postcore_initcall(omap4_l3_init); | ||
| 102 | |||
| 37 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) | 103 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) |
| 38 | 104 | ||
| 39 | static struct resource cam_resources[] = { | 105 | static struct resource cam_resources[] = { |
| @@ -141,96 +207,70 @@ static inline void omap_init_camera(void) | |||
| 141 | } | 207 | } |
| 142 | #endif | 208 | #endif |
| 143 | 209 | ||
| 144 | #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE) | 210 | struct omap_device_pm_latency omap_keyboard_latency[] = { |
| 145 | |||
| 146 | #define MBOX_REG_SIZE 0x120 | ||
| 147 | |||
| 148 | #ifdef CONFIG_ARCH_OMAP2 | ||
| 149 | static struct resource omap2_mbox_resources[] = { | ||
| 150 | { | ||
| 151 | .start = OMAP24XX_MAILBOX_BASE, | ||
| 152 | .end = OMAP24XX_MAILBOX_BASE + MBOX_REG_SIZE - 1, | ||
| 153 | .flags = IORESOURCE_MEM, | ||
| 154 | }, | ||
| 155 | { | ||
| 156 | .start = INT_24XX_MAIL_U0_MPU, | ||
| 157 | .flags = IORESOURCE_IRQ, | ||
| 158 | .name = "dsp", | ||
| 159 | }, | ||
| 160 | { | 211 | { |
| 161 | .start = INT_24XX_MAIL_U3_MPU, | 212 | .deactivate_func = omap_device_idle_hwmods, |
| 162 | .flags = IORESOURCE_IRQ, | 213 | .activate_func = omap_device_enable_hwmods, |
| 163 | .name = "iva", | 214 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, |
| 164 | }, | 215 | }, |
| 165 | }; | 216 | }; |
| 166 | static int omap2_mbox_resources_sz = ARRAY_SIZE(omap2_mbox_resources); | ||
| 167 | #else | ||
| 168 | #define omap2_mbox_resources NULL | ||
| 169 | #define omap2_mbox_resources_sz 0 | ||
| 170 | #endif | ||
| 171 | 217 | ||
| 172 | #ifdef CONFIG_ARCH_OMAP3 | 218 | int __init omap4_keyboard_init(struct omap4_keypad_platform_data |
| 173 | static struct resource omap3_mbox_resources[] = { | 219 | *sdp4430_keypad_data) |
| 174 | { | 220 | { |
| 175 | .start = OMAP34XX_MAILBOX_BASE, | 221 | struct omap_device *od; |
| 176 | .end = OMAP34XX_MAILBOX_BASE + MBOX_REG_SIZE - 1, | 222 | struct omap_hwmod *oh; |
| 177 | .flags = IORESOURCE_MEM, | 223 | struct omap4_keypad_platform_data *keypad_data; |
| 178 | }, | 224 | unsigned int id = -1; |
| 179 | { | 225 | char *oh_name = "kbd"; |
| 180 | .start = INT_24XX_MAIL_U0_MPU, | 226 | char *name = "omap4-keypad"; |
| 181 | .flags = IORESOURCE_IRQ, | ||
| 182 | .name = "dsp", | ||
| 183 | }, | ||
| 184 | }; | ||
| 185 | static int omap3_mbox_resources_sz = ARRAY_SIZE(omap3_mbox_resources); | ||
| 186 | #else | ||
| 187 | #define omap3_mbox_resources NULL | ||
| 188 | #define omap3_mbox_resources_sz 0 | ||
| 189 | #endif | ||
| 190 | 227 | ||
| 191 | #ifdef CONFIG_ARCH_OMAP4 | 228 | oh = omap_hwmod_lookup(oh_name); |
| 229 | if (!oh) { | ||
| 230 | pr_err("Could not look up %s\n", oh_name); | ||
| 231 | return -ENODEV; | ||
| 232 | } | ||
| 192 | 233 | ||
| 193 | #define OMAP4_MBOX_REG_SIZE 0x130 | 234 | keypad_data = sdp4430_keypad_data; |
| 194 | static struct resource omap4_mbox_resources[] = { | ||
| 195 | { | ||
| 196 | .start = OMAP44XX_MAILBOX_BASE, | ||
| 197 | .end = OMAP44XX_MAILBOX_BASE + | ||
| 198 | OMAP4_MBOX_REG_SIZE - 1, | ||
| 199 | .flags = IORESOURCE_MEM, | ||
| 200 | }, | ||
| 201 | { | ||
| 202 | .start = OMAP44XX_IRQ_MAIL_U0, | ||
| 203 | .flags = IORESOURCE_IRQ, | ||
| 204 | .name = "mbox", | ||
| 205 | }, | ||
| 206 | }; | ||
| 207 | static int omap4_mbox_resources_sz = ARRAY_SIZE(omap4_mbox_resources); | ||
| 208 | #else | ||
| 209 | #define omap4_mbox_resources NULL | ||
| 210 | #define omap4_mbox_resources_sz 0 | ||
| 211 | #endif | ||
| 212 | 235 | ||
| 213 | static struct platform_device mbox_device = { | 236 | od = omap_device_build(name, id, oh, keypad_data, |
| 214 | .name = "omap-mailbox", | 237 | sizeof(struct omap4_keypad_platform_data), |
| 215 | .id = -1, | 238 | omap_keyboard_latency, |
| 239 | ARRAY_SIZE(omap_keyboard_latency), 0); | ||
| 240 | |||
| 241 | if (IS_ERR(od)) { | ||
| 242 | WARN(1, "Cant build omap_device for %s:%s.\n", | ||
| 243 | name, oh->name); | ||
| 244 | return PTR_ERR(od); | ||
| 245 | } | ||
| 246 | |||
| 247 | return 0; | ||
| 248 | } | ||
| 249 | |||
| 250 | #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE) | ||
| 251 | static struct omap_device_pm_latency mbox_latencies[] = { | ||
| 252 | [0] = { | ||
| 253 | .activate_func = omap_device_enable_hwmods, | ||
| 254 | .deactivate_func = omap_device_idle_hwmods, | ||
| 255 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, | ||
| 256 | }, | ||
| 216 | }; | 257 | }; |
| 217 | 258 | ||
| 218 | static inline void omap_init_mbox(void) | 259 | static inline void omap_init_mbox(void) |
| 219 | { | 260 | { |
| 220 | if (cpu_is_omap24xx()) { | 261 | struct omap_hwmod *oh; |
| 221 | mbox_device.resource = omap2_mbox_resources; | 262 | struct omap_device *od; |
| 222 | mbox_device.num_resources = omap2_mbox_resources_sz; | 263 | |
| 223 | } else if (cpu_is_omap34xx()) { | 264 | oh = omap_hwmod_lookup("mailbox"); |
| 224 | mbox_device.resource = omap3_mbox_resources; | 265 | if (!oh) { |
| 225 | mbox_device.num_resources = omap3_mbox_resources_sz; | 266 | pr_err("%s: unable to find hwmod\n", __func__); |
| 226 | } else if (cpu_is_omap44xx()) { | ||
| 227 | mbox_device.resource = omap4_mbox_resources; | ||
| 228 | mbox_device.num_resources = omap4_mbox_resources_sz; | ||
| 229 | } else { | ||
| 230 | pr_err("%s: platform not supported\n", __func__); | ||
| 231 | return; | 267 | return; |
| 232 | } | 268 | } |
| 233 | platform_device_register(&mbox_device); | 269 | |
| 270 | od = omap_device_build("omap-mailbox", -1, oh, NULL, 0, | ||
| 271 | mbox_latencies, ARRAY_SIZE(mbox_latencies), 0); | ||
| 272 | WARN(IS_ERR(od), "%s: could not build device, err %ld\n", | ||
| 273 | __func__, PTR_ERR(od)); | ||
| 234 | } | 274 | } |
| 235 | #else | 275 | #else |
| 236 | static inline void omap_init_mbox(void) { } | 276 | static inline void omap_init_mbox(void) { } |
| @@ -279,163 +319,55 @@ static inline void omap_init_audio(void) {} | |||
| 279 | 319 | ||
| 280 | #include <plat/mcspi.h> | 320 | #include <plat/mcspi.h> |
| 281 | 321 | ||
| 282 | #define OMAP2_MCSPI1_BASE 0x48098000 | 322 | struct omap_device_pm_latency omap_mcspi_latency[] = { |
| 283 | #define OMAP2_MCSPI2_BASE 0x4809a000 | 323 | [0] = { |
| 284 | #define OMAP2_MCSPI3_BASE 0x480b8000 | 324 | .deactivate_func = omap_device_idle_hwmods, |
| 285 | #define OMAP2_MCSPI4_BASE 0x480ba000 | 325 | .activate_func = omap_device_enable_hwmods, |
| 286 | 326 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, | |
| 287 | #define OMAP4_MCSPI1_BASE 0x48098100 | ||
| 288 | #define OMAP4_MCSPI2_BASE 0x4809a100 | ||
| 289 | #define OMAP4_MCSPI3_BASE 0x480b8100 | ||
| 290 | #define OMAP4_MCSPI4_BASE 0x480ba100 | ||
| 291 | |||
| 292 | static struct omap2_mcspi_platform_config omap2_mcspi1_config = { | ||
| 293 | .num_cs = 4, | ||
| 294 | }; | ||
| 295 | |||
| 296 | static struct resource omap2_mcspi1_resources[] = { | ||
| 297 | { | ||
| 298 | .start = OMAP2_MCSPI1_BASE, | ||
| 299 | .end = OMAP2_MCSPI1_BASE + 0xff, | ||
| 300 | .flags = IORESOURCE_MEM, | ||
| 301 | }, | ||
| 302 | }; | ||
| 303 | |||
| 304 | static struct platform_device omap2_mcspi1 = { | ||
| 305 | .name = "omap2_mcspi", | ||
| 306 | .id = 1, | ||
| 307 | .num_resources = ARRAY_SIZE(omap2_mcspi1_resources), | ||
| 308 | .resource = omap2_mcspi1_resources, | ||
| 309 | .dev = { | ||
| 310 | .platform_data = &omap2_mcspi1_config, | ||
| 311 | }, | ||
| 312 | }; | ||
| 313 | |||
| 314 | static struct omap2_mcspi_platform_config omap2_mcspi2_config = { | ||
| 315 | .num_cs = 2, | ||
| 316 | }; | ||
| 317 | |||
| 318 | static struct resource omap2_mcspi2_resources[] = { | ||
| 319 | { | ||
| 320 | .start = OMAP2_MCSPI2_BASE, | ||
| 321 | .end = OMAP2_MCSPI2_BASE + 0xff, | ||
| 322 | .flags = IORESOURCE_MEM, | ||
| 323 | }, | ||
| 324 | }; | ||
| 325 | |||
| 326 | static struct platform_device omap2_mcspi2 = { | ||
| 327 | .name = "omap2_mcspi", | ||
| 328 | .id = 2, | ||
| 329 | .num_resources = ARRAY_SIZE(omap2_mcspi2_resources), | ||
| 330 | .resource = omap2_mcspi2_resources, | ||
| 331 | .dev = { | ||
| 332 | .platform_data = &omap2_mcspi2_config, | ||
| 333 | }, | ||
| 334 | }; | ||
| 335 | |||
| 336 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \ | ||
| 337 | defined(CONFIG_ARCH_OMAP4) | ||
| 338 | static struct omap2_mcspi_platform_config omap2_mcspi3_config = { | ||
| 339 | .num_cs = 2, | ||
| 340 | }; | ||
| 341 | |||
| 342 | static struct resource omap2_mcspi3_resources[] = { | ||
| 343 | { | ||
| 344 | .start = OMAP2_MCSPI3_BASE, | ||
| 345 | .end = OMAP2_MCSPI3_BASE + 0xff, | ||
| 346 | .flags = IORESOURCE_MEM, | ||
| 347 | }, | ||
| 348 | }; | ||
| 349 | |||
| 350 | static struct platform_device omap2_mcspi3 = { | ||
| 351 | .name = "omap2_mcspi", | ||
| 352 | .id = 3, | ||
| 353 | .num_resources = ARRAY_SIZE(omap2_mcspi3_resources), | ||
| 354 | .resource = omap2_mcspi3_resources, | ||
| 355 | .dev = { | ||
| 356 | .platform_data = &omap2_mcspi3_config, | ||
| 357 | }, | ||
| 358 | }; | ||
| 359 | #endif | ||
| 360 | |||
| 361 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) | ||
| 362 | static struct omap2_mcspi_platform_config omap2_mcspi4_config = { | ||
| 363 | .num_cs = 1, | ||
| 364 | }; | ||
| 365 | |||
| 366 | static struct resource omap2_mcspi4_resources[] = { | ||
| 367 | { | ||
| 368 | .start = OMAP2_MCSPI4_BASE, | ||
| 369 | .end = OMAP2_MCSPI4_BASE + 0xff, | ||
| 370 | .flags = IORESOURCE_MEM, | ||
| 371 | }, | ||
| 372 | }; | ||
| 373 | |||
| 374 | static struct platform_device omap2_mcspi4 = { | ||
| 375 | .name = "omap2_mcspi", | ||
| 376 | .id = 4, | ||
| 377 | .num_resources = ARRAY_SIZE(omap2_mcspi4_resources), | ||
| 378 | .resource = omap2_mcspi4_resources, | ||
| 379 | .dev = { | ||
| 380 | .platform_data = &omap2_mcspi4_config, | ||
| 381 | }, | 327 | }, |
| 382 | }; | 328 | }; |
| 383 | #endif | ||
| 384 | 329 | ||
| 385 | #ifdef CONFIG_ARCH_OMAP4 | 330 | static int omap_mcspi_init(struct omap_hwmod *oh, void *unused) |
| 386 | static inline void omap4_mcspi_fixup(void) | ||
| 387 | { | 331 | { |
| 388 | omap2_mcspi1_resources[0].start = OMAP4_MCSPI1_BASE; | 332 | struct omap_device *od; |
| 389 | omap2_mcspi1_resources[0].end = OMAP4_MCSPI1_BASE + 0xff; | 333 | char *name = "omap2_mcspi"; |
| 390 | omap2_mcspi2_resources[0].start = OMAP4_MCSPI2_BASE; | 334 | struct omap2_mcspi_platform_config *pdata; |
| 391 | omap2_mcspi2_resources[0].end = OMAP4_MCSPI2_BASE + 0xff; | 335 | static int spi_num; |
| 392 | omap2_mcspi3_resources[0].start = OMAP4_MCSPI3_BASE; | 336 | struct omap2_mcspi_dev_attr *mcspi_attrib = oh->dev_attr; |
| 393 | omap2_mcspi3_resources[0].end = OMAP4_MCSPI3_BASE + 0xff; | 337 | |
| 394 | omap2_mcspi4_resources[0].start = OMAP4_MCSPI4_BASE; | 338 | pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); |
| 395 | omap2_mcspi4_resources[0].end = OMAP4_MCSPI4_BASE + 0xff; | 339 | if (!pdata) { |
| 396 | } | 340 | pr_err("Memory allocation for McSPI device failed\n"); |
| 397 | #else | 341 | return -ENOMEM; |
| 398 | static inline void omap4_mcspi_fixup(void) | 342 | } |
| 399 | { | ||
| 400 | } | ||
| 401 | #endif | ||
| 402 | 343 | ||
| 403 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \ | 344 | pdata->num_cs = mcspi_attrib->num_chipselect; |
| 404 | defined(CONFIG_ARCH_OMAP4) | 345 | switch (oh->class->rev) { |
| 405 | static inline void omap2_mcspi3_init(void) | 346 | case OMAP2_MCSPI_REV: |
| 406 | { | 347 | case OMAP3_MCSPI_REV: |
| 407 | platform_device_register(&omap2_mcspi3); | 348 | pdata->regs_offset = 0; |
| 408 | } | 349 | break; |
| 409 | #else | 350 | case OMAP4_MCSPI_REV: |
| 410 | static inline void omap2_mcspi3_init(void) | 351 | pdata->regs_offset = OMAP4_MCSPI_REG_OFFSET; |
| 411 | { | 352 | break; |
| 412 | } | 353 | default: |
| 413 | #endif | 354 | pr_err("Invalid McSPI Revision value\n"); |
| 355 | return -EINVAL; | ||
| 356 | } | ||
| 414 | 357 | ||
| 415 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) | 358 | spi_num++; |
| 416 | static inline void omap2_mcspi4_init(void) | 359 | od = omap_device_build(name, spi_num, oh, pdata, |
| 417 | { | 360 | sizeof(*pdata), omap_mcspi_latency, |
| 418 | platform_device_register(&omap2_mcspi4); | 361 | ARRAY_SIZE(omap_mcspi_latency), 0); |
| 419 | } | 362 | WARN(IS_ERR(od), "Cant build omap_device for %s:%s\n", |
| 420 | #else | 363 | name, oh->name); |
| 421 | static inline void omap2_mcspi4_init(void) | 364 | kfree(pdata); |
| 422 | { | 365 | return 0; |
| 423 | } | 366 | } |
| 424 | #endif | ||
| 425 | 367 | ||
| 426 | static void omap_init_mcspi(void) | 368 | static void omap_init_mcspi(void) |
| 427 | { | 369 | { |
| 428 | if (cpu_is_omap44xx()) | 370 | omap_hwmod_for_each_by_class("mcspi", omap_mcspi_init, NULL); |
| 429 | omap4_mcspi_fixup(); | ||
| 430 | |||
| 431 | platform_device_register(&omap2_mcspi1); | ||
| 432 | platform_device_register(&omap2_mcspi2); | ||
| 433 | |||
| 434 | if (cpu_is_omap2430() || cpu_is_omap343x() || cpu_is_omap44xx()) | ||
| 435 | omap2_mcspi3_init(); | ||
| 436 | |||
| 437 | if (cpu_is_omap343x() || cpu_is_omap44xx()) | ||
| 438 | omap2_mcspi4_init(); | ||
| 439 | } | 371 | } |
| 440 | 372 | ||
| 441 | #else | 373 | #else |
| @@ -610,117 +542,10 @@ static inline void omap_init_aes(void) { } | |||
| 610 | 542 | ||
| 611 | /*-------------------------------------------------------------------------*/ | 543 | /*-------------------------------------------------------------------------*/ |
| 612 | 544 | ||
| 613 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) | 545 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) |
| 614 | |||
| 615 | #define MMCHS_SYSCONFIG 0x0010 | ||
| 616 | #define MMCHS_SYSCONFIG_SWRESET (1 << 1) | ||
| 617 | #define MMCHS_SYSSTATUS 0x0014 | ||
| 618 | #define MMCHS_SYSSTATUS_RESETDONE (1 << 0) | ||
| 619 | |||
| 620 | static struct platform_device dummy_pdev = { | ||
| 621 | .dev = { | ||
| 622 | .bus = &platform_bus_type, | ||
| 623 | }, | ||
| 624 | }; | ||
| 625 | |||
| 626 | /** | ||
| 627 | * omap_hsmmc_reset() - Full reset of each HS-MMC controller | ||
| 628 | * | ||
| 629 | * Ensure that each MMC controller is fully reset. Controllers | ||
| 630 | * left in an unknown state (by bootloader) may prevent retention | ||
| 631 | * or OFF-mode. This is especially important in cases where the | ||
| 632 | * MMC driver is not enabled, _or_ built as a module. | ||
| 633 | * | ||
| 634 | * In order for reset to work, interface, functional and debounce | ||
| 635 | * clocks must be enabled. The debounce clock comes from func_32k_clk | ||
| 636 | * and is not under SW control, so we only enable i- and f-clocks. | ||
| 637 | **/ | ||
| 638 | static void __init omap_hsmmc_reset(void) | ||
| 639 | { | ||
| 640 | u32 i, nr_controllers; | ||
| 641 | struct clk *iclk, *fclk; | ||
| 642 | |||
| 643 | if (cpu_is_omap242x()) | ||
| 644 | return; | ||
| 645 | |||
| 646 | nr_controllers = cpu_is_omap44xx() ? OMAP44XX_NR_MMC : | ||
| 647 | (cpu_is_omap34xx() ? OMAP34XX_NR_MMC : OMAP24XX_NR_MMC); | ||
| 648 | 546 | ||
| 649 | for (i = 0; i < nr_controllers; i++) { | 547 | static inline void omap242x_mmc_mux(struct omap_mmc_platform_data |
| 650 | u32 v, base = 0; | 548 | *mmc_controller) |
| 651 | struct device *dev = &dummy_pdev.dev; | ||
| 652 | |||
| 653 | switch (i) { | ||
| 654 | case 0: | ||
| 655 | base = OMAP2_MMC1_BASE; | ||
| 656 | break; | ||
| 657 | case 1: | ||
| 658 | base = OMAP2_MMC2_BASE; | ||
| 659 | break; | ||
| 660 | case 2: | ||
| 661 | base = OMAP3_MMC3_BASE; | ||
| 662 | break; | ||
| 663 | case 3: | ||
| 664 | if (!cpu_is_omap44xx()) | ||
| 665 | return; | ||
| 666 | base = OMAP4_MMC4_BASE; | ||
| 667 | break; | ||
| 668 | case 4: | ||
| 669 | if (!cpu_is_omap44xx()) | ||
| 670 | return; | ||
| 671 | base = OMAP4_MMC5_BASE; | ||
| 672 | break; | ||
| 673 | } | ||
| 674 | |||
| 675 | if (cpu_is_omap44xx()) | ||
| 676 | base += OMAP4_MMC_REG_OFFSET; | ||
| 677 | |||
| 678 | dummy_pdev.id = i; | ||
| 679 | dev_set_name(&dummy_pdev.dev, "mmci-omap-hs.%d", i); | ||
| 680 | iclk = clk_get(dev, "ick"); | ||
| 681 | if (IS_ERR(iclk)) | ||
| 682 | goto err1; | ||
| 683 | if (clk_enable(iclk)) | ||
| 684 | goto err2; | ||
| 685 | |||
| 686 | fclk = clk_get(dev, "fck"); | ||
| 687 | if (IS_ERR(fclk)) | ||
| 688 | goto err3; | ||
| 689 | if (clk_enable(fclk)) | ||
| 690 | goto err4; | ||
| 691 | |||
| 692 | omap_writel(MMCHS_SYSCONFIG_SWRESET, base + MMCHS_SYSCONFIG); | ||
| 693 | v = omap_readl(base + MMCHS_SYSSTATUS); | ||
| 694 | while (!(omap_readl(base + MMCHS_SYSSTATUS) & | ||
| 695 | MMCHS_SYSSTATUS_RESETDONE)) | ||
| 696 | cpu_relax(); | ||
| 697 | |||
| 698 | clk_disable(fclk); | ||
| 699 | clk_put(fclk); | ||
| 700 | clk_disable(iclk); | ||
| 701 | clk_put(iclk); | ||
| 702 | } | ||
| 703 | return; | ||
| 704 | |||
| 705 | err4: | ||
| 706 | clk_put(fclk); | ||
| 707 | err3: | ||
| 708 | clk_disable(iclk); | ||
| 709 | err2: | ||
| 710 | clk_put(iclk); | ||
| 711 | err1: | ||
| 712 | printk(KERN_WARNING "%s: Unable to enable clocks for MMC%d, " | ||
| 713 | "cannot reset.\n", __func__, i); | ||
| 714 | } | ||
| 715 | #else | ||
| 716 | static inline void omap_hsmmc_reset(void) {} | ||
| 717 | #endif | ||
| 718 | |||
| 719 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ | ||
| 720 | defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) | ||
| 721 | |||
| 722 | static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, | ||
| 723 | int controller_nr) | ||
| 724 | { | 549 | { |
| 725 | if ((mmc_controller->slots[0].switch_pin > 0) && \ | 550 | if ((mmc_controller->slots[0].switch_pin > 0) && \ |
| 726 | (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) | 551 | (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) |
| @@ -731,163 +556,44 @@ static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, | |||
| 731 | omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, | 556 | omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, |
| 732 | OMAP_PIN_INPUT_PULLUP); | 557 | OMAP_PIN_INPUT_PULLUP); |
| 733 | 558 | ||
| 734 | if (cpu_is_omap2420() && controller_nr == 0) { | 559 | omap_mux_init_signal("sdmmc_cmd", 0); |
| 735 | omap_mux_init_signal("sdmmc_cmd", 0); | 560 | omap_mux_init_signal("sdmmc_clki", 0); |
| 736 | omap_mux_init_signal("sdmmc_clki", 0); | 561 | omap_mux_init_signal("sdmmc_clko", 0); |
| 737 | omap_mux_init_signal("sdmmc_clko", 0); | 562 | omap_mux_init_signal("sdmmc_dat0", 0); |
| 738 | omap_mux_init_signal("sdmmc_dat0", 0); | 563 | omap_mux_init_signal("sdmmc_dat_dir0", 0); |
| 739 | omap_mux_init_signal("sdmmc_dat_dir0", 0); | 564 | omap_mux_init_signal("sdmmc_cmd_dir", 0); |
| 740 | omap_mux_init_signal("sdmmc_cmd_dir", 0); | 565 | if (mmc_controller->slots[0].caps & MMC_CAP_4_BIT_DATA) { |
| 741 | if (mmc_controller->slots[0].caps & MMC_CAP_4_BIT_DATA) { | 566 | omap_mux_init_signal("sdmmc_dat1", 0); |
| 742 | omap_mux_init_signal("sdmmc_dat1", 0); | 567 | omap_mux_init_signal("sdmmc_dat2", 0); |
| 743 | omap_mux_init_signal("sdmmc_dat2", 0); | 568 | omap_mux_init_signal("sdmmc_dat3", 0); |
| 744 | omap_mux_init_signal("sdmmc_dat3", 0); | 569 | omap_mux_init_signal("sdmmc_dat_dir1", 0); |
| 745 | omap_mux_init_signal("sdmmc_dat_dir1", 0); | 570 | omap_mux_init_signal("sdmmc_dat_dir2", 0); |
| 746 | omap_mux_init_signal("sdmmc_dat_dir2", 0); | 571 | omap_mux_init_signal("sdmmc_dat_dir3", 0); |
| 747 | omap_mux_init_signal("sdmmc_dat_dir3", 0); | ||
| 748 | } | ||
| 749 | |||
| 750 | /* | ||
| 751 | * Use internal loop-back in MMC/SDIO Module Input Clock | ||
| 752 | * selection | ||
| 753 | */ | ||
| 754 | if (mmc_controller->slots[0].internal_clock) { | ||
| 755 | u32 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); | ||
| 756 | v |= (1 << 24); | ||
| 757 | omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); | ||
| 758 | } | ||
| 759 | } | 572 | } |
| 760 | 573 | ||
| 761 | if (cpu_is_omap34xx()) { | 574 | /* |
| 762 | if (controller_nr == 0) { | 575 | * Use internal loop-back in MMC/SDIO Module Input Clock |
| 763 | omap_mux_init_signal("sdmmc1_clk", | 576 | * selection |
| 764 | OMAP_PIN_INPUT_PULLUP); | 577 | */ |
| 765 | omap_mux_init_signal("sdmmc1_cmd", | 578 | if (mmc_controller->slots[0].internal_clock) { |
| 766 | OMAP_PIN_INPUT_PULLUP); | 579 | u32 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); |
| 767 | omap_mux_init_signal("sdmmc1_dat0", | 580 | v |= (1 << 24); |
| 768 | OMAP_PIN_INPUT_PULLUP); | 581 | omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); |
| 769 | if (mmc_controller->slots[0].caps & | ||
| 770 | (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) { | ||
| 771 | omap_mux_init_signal("sdmmc1_dat1", | ||
| 772 | OMAP_PIN_INPUT_PULLUP); | ||
| 773 | omap_mux_init_signal("sdmmc1_dat2", | ||
| 774 | OMAP_PIN_INPUT_PULLUP); | ||
| 775 | omap_mux_init_signal("sdmmc1_dat3", | ||
| 776 | OMAP_PIN_INPUT_PULLUP); | ||
| 777 | } | ||
| 778 | if (mmc_controller->slots[0].caps & | ||
| 779 | MMC_CAP_8_BIT_DATA) { | ||
| 780 | omap_mux_init_signal("sdmmc1_dat4", | ||
| 781 | OMAP_PIN_INPUT_PULLUP); | ||
| 782 | omap_mux_init_signal("sdmmc1_dat5", | ||
| 783 | OMAP_PIN_INPUT_PULLUP); | ||
| 784 | omap_mux_init_signal("sdmmc1_dat6", | ||
| 785 | OMAP_PIN_INPUT_PULLUP); | ||
| 786 | omap_mux_init_signal("sdmmc1_dat7", | ||
| 787 | OMAP_PIN_INPUT_PULLUP); | ||
| 788 | } | ||
| 789 | } | ||
| 790 | if (controller_nr == 1) { | ||
| 791 | /* MMC2 */ | ||
| 792 | omap_mux_init_signal("sdmmc2_clk", | ||
| 793 | OMAP_PIN_INPUT_PULLUP); | ||
| 794 | omap_mux_init_signal("sdmmc2_cmd", | ||
| 795 | OMAP_PIN_INPUT_PULLUP); | ||
| 796 | omap_mux_init_signal("sdmmc2_dat0", | ||
| 797 | OMAP_PIN_INPUT_PULLUP); | ||
| 798 | |||
| 799 | /* | ||
| 800 | * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed | ||
| 801 | * in the board-*.c files | ||
| 802 | */ | ||
| 803 | if (mmc_controller->slots[0].caps & | ||
| 804 | (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) { | ||
| 805 | omap_mux_init_signal("sdmmc2_dat1", | ||
| 806 | OMAP_PIN_INPUT_PULLUP); | ||
| 807 | omap_mux_init_signal("sdmmc2_dat2", | ||
| 808 | OMAP_PIN_INPUT_PULLUP); | ||
| 809 | omap_mux_init_signal("sdmmc2_dat3", | ||
| 810 | OMAP_PIN_INPUT_PULLUP); | ||
| 811 | } | ||
| 812 | if (mmc_controller->slots[0].caps & | ||
| 813 | MMC_CAP_8_BIT_DATA) { | ||
| 814 | omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4", | ||
| 815 | OMAP_PIN_INPUT_PULLUP); | ||
| 816 | omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5", | ||
| 817 | OMAP_PIN_INPUT_PULLUP); | ||
| 818 | omap_mux_init_signal("sdmmc2_dat6.sdmmc2_dat6", | ||
| 819 | OMAP_PIN_INPUT_PULLUP); | ||
| 820 | omap_mux_init_signal("sdmmc2_dat7.sdmmc2_dat7", | ||
| 821 | OMAP_PIN_INPUT_PULLUP); | ||
| 822 | } | ||
| 823 | } | ||
| 824 | |||
| 825 | /* | ||
| 826 | * For MMC3 the pins need to be muxed in the board-*.c files | ||
| 827 | */ | ||
| 828 | } | 582 | } |
| 829 | } | 583 | } |
| 830 | 584 | ||
| 831 | void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | 585 | void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data) |
| 832 | int nr_controllers) | ||
| 833 | { | 586 | { |
| 834 | int i; | 587 | char *name = "mmci-omap"; |
| 835 | char *name; | ||
| 836 | 588 | ||
| 837 | for (i = 0; i < nr_controllers; i++) { | 589 | if (!mmc_data[0]) { |
| 838 | unsigned long base, size; | 590 | pr_err("%s fails: Incomplete platform data\n", __func__); |
| 839 | unsigned int irq = 0; | 591 | return; |
| 840 | 592 | } | |
| 841 | if (!mmc_data[i]) | ||
| 842 | continue; | ||
| 843 | |||
| 844 | omap2_mmc_mux(mmc_data[i], i); | ||
| 845 | 593 | ||
| 846 | switch (i) { | 594 | omap242x_mmc_mux(mmc_data[0]); |
| 847 | case 0: | 595 | omap_mmc_add(name, 0, OMAP2_MMC1_BASE, OMAP2420_MMC_SIZE, |
| 848 | base = OMAP2_MMC1_BASE; | 596 | INT_24XX_MMC_IRQ, mmc_data[0]); |
| 849 | irq = INT_24XX_MMC_IRQ; | ||
| 850 | break; | ||
| 851 | case 1: | ||
| 852 | base = OMAP2_MMC2_BASE; | ||
| 853 | irq = INT_24XX_MMC2_IRQ; | ||
| 854 | break; | ||
| 855 | case 2: | ||
| 856 | if (!cpu_is_omap44xx() && !cpu_is_omap34xx()) | ||
| 857 | return; | ||
| 858 | base = OMAP3_MMC3_BASE; | ||
| 859 | irq = INT_34XX_MMC3_IRQ; | ||
| 860 | break; | ||
| 861 | case 3: | ||
| 862 | if (!cpu_is_omap44xx()) | ||
| 863 | return; | ||
| 864 | base = OMAP4_MMC4_BASE; | ||
| 865 | irq = OMAP44XX_IRQ_MMC4; | ||
| 866 | break; | ||
| 867 | case 4: | ||
| 868 | if (!cpu_is_omap44xx()) | ||
| 869 | return; | ||
| 870 | base = OMAP4_MMC5_BASE; | ||
| 871 | irq = OMAP44XX_IRQ_MMC5; | ||
| 872 | break; | ||
| 873 | default: | ||
| 874 | continue; | ||
| 875 | } | ||
| 876 | |||
| 877 | if (cpu_is_omap2420()) { | ||
| 878 | size = OMAP2420_MMC_SIZE; | ||
| 879 | name = "mmci-omap"; | ||
| 880 | } else if (cpu_is_omap44xx()) { | ||
| 881 | if (i < 3) | ||
| 882 | irq += OMAP44XX_IRQ_GIC_START; | ||
| 883 | size = OMAP4_HSMMC_SIZE; | ||
| 884 | name = "mmci-omap-hs"; | ||
| 885 | } else { | ||
| 886 | size = OMAP3_HSMMC_SIZE; | ||
| 887 | name = "mmci-omap-hs"; | ||
| 888 | } | ||
| 889 | omap_mmc_add(name, i, base, size, irq, mmc_data[i]); | ||
| 890 | }; | ||
| 891 | } | 597 | } |
| 892 | 598 | ||
| 893 | #endif | 599 | #endif |
| @@ -895,7 +601,7 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
| 895 | /*-------------------------------------------------------------------------*/ | 601 | /*-------------------------------------------------------------------------*/ |
| 896 | 602 | ||
| 897 | #if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE) | 603 | #if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE) |
| 898 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430) | 604 | #if defined(CONFIG_SOC_OMAP2430) || defined(CONFIG_SOC_OMAP3430) |
| 899 | #define OMAP_HDQ_BASE 0x480B2000 | 605 | #define OMAP_HDQ_BASE 0x480B2000 |
| 900 | #endif | 606 | #endif |
| 901 | static struct resource omap_hdq_resources[] = { | 607 | static struct resource omap_hdq_resources[] = { |
| @@ -961,7 +667,6 @@ static int __init omap2_init_devices(void) | |||
| 961 | * please keep these calls, and their implementations above, | 667 | * please keep these calls, and their implementations above, |
| 962 | * in alphabetical order so they're easier to sort through. | 668 | * in alphabetical order so they're easier to sort through. |
| 963 | */ | 669 | */ |
| 964 | omap_hsmmc_reset(); | ||
| 965 | omap_init_audio(); | 670 | omap_init_audio(); |
| 966 | omap_init_camera(); | 671 | omap_init_camera(); |
| 967 | omap_init_mbox(); | 672 | omap_init_mbox(); |
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c new file mode 100644 index 000000000000..b18db84b0349 --- /dev/null +++ b/arch/arm/mach-omap2/display.c | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | /* | ||
| 2 | * OMAP2plus display device setup / initialization. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ | ||
| 5 | * Senthilvadivu Guruswamy | ||
| 6 | * Sumit Semwal | ||
| 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 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
| 13 | * kind, whether express or implied; without even the implied warranty | ||
| 14 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include <linux/kernel.h> | ||
| 19 | #include <linux/init.h> | ||
| 20 | #include <linux/platform_device.h> | ||
| 21 | #include <linux/io.h> | ||
| 22 | #include <linux/clk.h> | ||
| 23 | #include <linux/err.h> | ||
| 24 | |||
| 25 | #include <plat/display.h> | ||
| 26 | |||
| 27 | static struct platform_device omap_display_device = { | ||
| 28 | .name = "omapdss", | ||
| 29 | .id = -1, | ||
| 30 | .dev = { | ||
| 31 | .platform_data = NULL, | ||
| 32 | }, | ||
| 33 | }; | ||
| 34 | |||
| 35 | int __init omap_display_init(struct omap_dss_board_info *board_data) | ||
| 36 | { | ||
| 37 | int r = 0; | ||
| 38 | omap_display_device.dev.platform_data = board_data; | ||
| 39 | |||
| 40 | r = platform_device_register(&omap_display_device); | ||
| 41 | if (r < 0) | ||
| 42 | printk(KERN_ERR "Unable to register OMAP-Display device\n"); | ||
| 43 | |||
| 44 | return r; | ||
| 45 | } | ||
diff --git a/arch/arm/mach-omap2/dpll44xx.c b/arch/arm/mach-omap2/dpll44xx.c new file mode 100644 index 000000000000..4e4da6160d05 --- /dev/null +++ b/arch/arm/mach-omap2/dpll44xx.c | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | /* | ||
| 2 | * OMAP4-specific DPLL control functions | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Texas Instruments, Inc. | ||
| 5 | * Rajendra Nayak | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/kernel.h> | ||
| 13 | #include <linux/errno.h> | ||
| 14 | #include <linux/clk.h> | ||
| 15 | #include <linux/io.h> | ||
| 16 | #include <linux/bitops.h> | ||
| 17 | |||
| 18 | #include <plat/cpu.h> | ||
| 19 | #include <plat/clock.h> | ||
| 20 | |||
| 21 | #include "clock.h" | ||
| 22 | #include "cm-regbits-44xx.h" | ||
| 23 | |||
| 24 | /* Supported only on OMAP4 */ | ||
| 25 | int omap4_dpllmx_gatectrl_read(struct clk *clk) | ||
| 26 | { | ||
| 27 | u32 v; | ||
| 28 | u32 mask; | ||
| 29 | |||
| 30 | if (!clk || !clk->clksel_reg || !cpu_is_omap44xx()) | ||
| 31 | return -EINVAL; | ||
| 32 | |||
| 33 | mask = clk->flags & CLOCK_CLKOUTX2 ? | ||
| 34 | OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK : | ||
| 35 | OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK; | ||
| 36 | |||
| 37 | v = __raw_readl(clk->clksel_reg); | ||
| 38 | v &= mask; | ||
| 39 | v >>= __ffs(mask); | ||
| 40 | |||
| 41 | return v; | ||
| 42 | } | ||
| 43 | |||
| 44 | void omap4_dpllmx_allow_gatectrl(struct clk *clk) | ||
| 45 | { | ||
| 46 | u32 v; | ||
| 47 | u32 mask; | ||
| 48 | |||
| 49 | if (!clk || !clk->clksel_reg || !cpu_is_omap44xx()) | ||
| 50 | return; | ||
| 51 | |||
| 52 | mask = clk->flags & CLOCK_CLKOUTX2 ? | ||
| 53 | OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK : | ||
| 54 | OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK; | ||
| 55 | |||
| 56 | v = __raw_readl(clk->clksel_reg); | ||
| 57 | /* Clear the bit to allow gatectrl */ | ||
| 58 | v &= ~mask; | ||
| 59 | __raw_writel(v, clk->clksel_reg); | ||
| 60 | } | ||
| 61 | |||
| 62 | void omap4_dpllmx_deny_gatectrl(struct clk *clk) | ||
| 63 | { | ||
| 64 | u32 v; | ||
| 65 | u32 mask; | ||
| 66 | |||
| 67 | if (!clk || !clk->clksel_reg || !cpu_is_omap44xx()) | ||
| 68 | return; | ||
| 69 | |||
| 70 | mask = clk->flags & CLOCK_CLKOUTX2 ? | ||
| 71 | OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK : | ||
| 72 | OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK; | ||
| 73 | |||
| 74 | v = __raw_readl(clk->clksel_reg); | ||
| 75 | /* Set the bit to deny gatectrl */ | ||
| 76 | v |= mask; | ||
| 77 | __raw_writel(v, clk->clksel_reg); | ||
| 78 | } | ||
| 79 | |||
| 80 | const struct clkops clkops_omap4_dpllmx_ops = { | ||
| 81 | .allow_idle = omap4_dpllmx_allow_gatectrl, | ||
| 82 | .deny_idle = omap4_dpllmx_deny_gatectrl, | ||
| 83 | }; | ||
| 84 | |||
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 2bb29c160702..c1791d08ae56 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
| 13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
| 14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
| 15 | #include <linux/mtd/nand.h> | ||
| 15 | 16 | ||
| 16 | #include <asm/mach/flash.h> | 17 | #include <asm/mach/flash.h> |
| 17 | 18 | ||
| @@ -69,8 +70,10 @@ static int omap2_nand_gpmc_retime(void) | |||
| 69 | t.wr_cycle = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->wr_cycle); | 70 | t.wr_cycle = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->wr_cycle); |
| 70 | 71 | ||
| 71 | /* Configure GPMC */ | 72 | /* Configure GPMC */ |
| 72 | gpmc_cs_configure(gpmc_nand_data->cs, | 73 | if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16) |
| 73 | GPMC_CONFIG_DEV_SIZE, gpmc_nand_data->devsize); | 74 | gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_DEV_SIZE, 1); |
| 75 | else | ||
| 76 | gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_DEV_SIZE, 0); | ||
| 74 | gpmc_cs_configure(gpmc_nand_data->cs, | 77 | gpmc_cs_configure(gpmc_nand_data->cs, |
| 75 | GPMC_CONFIG_DEV_TYPE, GPMC_DEVICETYPE_NAND); | 78 | GPMC_CONFIG_DEV_TYPE, GPMC_DEVICETYPE_NAND); |
| 76 | err = gpmc_cs_set_timings(gpmc_nand_data->cs, &t); | 79 | err = gpmc_cs_set_timings(gpmc_nand_data->cs, &t); |
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c index 3a7d25fb00ef..d776ded9830d 100644 --- a/arch/arm/mach-omap2/gpmc-onenand.c +++ b/arch/arm/mach-omap2/gpmc-onenand.c | |||
| @@ -94,7 +94,7 @@ static int omap2_onenand_set_async_mode(int cs, void __iomem *onenand_base) | |||
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | static void set_onenand_cfg(void __iomem *onenand_base, int latency, | 96 | static void set_onenand_cfg(void __iomem *onenand_base, int latency, |
| 97 | int sync_read, int sync_write, int hf) | 97 | int sync_read, int sync_write, int hf, int vhf) |
| 98 | { | 98 | { |
| 99 | u32 reg; | 99 | u32 reg; |
| 100 | 100 | ||
| @@ -114,12 +114,57 @@ static void set_onenand_cfg(void __iomem *onenand_base, int latency, | |||
| 114 | reg |= ONENAND_SYS_CFG1_HF; | 114 | reg |= ONENAND_SYS_CFG1_HF; |
| 115 | else | 115 | else |
| 116 | reg &= ~ONENAND_SYS_CFG1_HF; | 116 | reg &= ~ONENAND_SYS_CFG1_HF; |
| 117 | if (vhf) | ||
| 118 | reg |= ONENAND_SYS_CFG1_VHF; | ||
| 119 | else | ||
| 120 | reg &= ~ONENAND_SYS_CFG1_VHF; | ||
| 117 | writew(reg, onenand_base + ONENAND_REG_SYS_CFG1); | 121 | writew(reg, onenand_base + ONENAND_REG_SYS_CFG1); |
| 118 | } | 122 | } |
| 119 | 123 | ||
| 124 | static int omap2_onenand_get_freq(struct omap_onenand_platform_data *cfg, | ||
| 125 | void __iomem *onenand_base, bool *clk_dep) | ||
| 126 | { | ||
| 127 | u16 ver = readw(onenand_base + ONENAND_REG_VERSION_ID); | ||
| 128 | int freq = 0; | ||
| 129 | |||
| 130 | if (cfg->get_freq) { | ||
| 131 | struct onenand_freq_info fi; | ||
| 132 | |||
| 133 | fi.maf_id = readw(onenand_base + ONENAND_REG_MANUFACTURER_ID); | ||
| 134 | fi.dev_id = readw(onenand_base + ONENAND_REG_DEVICE_ID); | ||
| 135 | fi.ver_id = ver; | ||
| 136 | freq = cfg->get_freq(&fi, clk_dep); | ||
| 137 | if (freq) | ||
| 138 | return freq; | ||
| 139 | } | ||
| 140 | |||
| 141 | switch ((ver >> 4) & 0xf) { | ||
| 142 | case 0: | ||
| 143 | freq = 40; | ||
| 144 | break; | ||
| 145 | case 1: | ||
| 146 | freq = 54; | ||
| 147 | break; | ||
| 148 | case 2: | ||
| 149 | freq = 66; | ||
| 150 | break; | ||
| 151 | case 3: | ||
| 152 | freq = 83; | ||
| 153 | break; | ||
| 154 | case 4: | ||
| 155 | freq = 104; | ||
| 156 | break; | ||
| 157 | default: | ||
| 158 | freq = 54; | ||
| 159 | break; | ||
| 160 | } | ||
| 161 | |||
| 162 | return freq; | ||
| 163 | } | ||
| 164 | |||
| 120 | static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | 165 | static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, |
| 121 | void __iomem *onenand_base, | 166 | void __iomem *onenand_base, |
| 122 | int freq) | 167 | int *freq_ptr) |
| 123 | { | 168 | { |
| 124 | struct gpmc_timings t; | 169 | struct gpmc_timings t; |
| 125 | const int t_cer = 15; | 170 | const int t_cer = 15; |
| @@ -130,10 +175,11 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
| 130 | const int t_wph = 30; | 175 | const int t_wph = 30; |
| 131 | int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo; | 176 | int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo; |
| 132 | int tick_ns, div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency; | 177 | int tick_ns, div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency; |
| 133 | int first_time = 0, hf = 0, sync_read = 0, sync_write = 0; | 178 | int first_time = 0, hf = 0, vhf = 0, sync_read = 0, sync_write = 0; |
| 134 | int err, ticks_cez; | 179 | int err, ticks_cez; |
| 135 | int cs = cfg->cs; | 180 | int cs = cfg->cs, freq = *freq_ptr; |
| 136 | u32 reg; | 181 | u32 reg; |
| 182 | bool clk_dep = false; | ||
| 137 | 183 | ||
| 138 | if (cfg->flags & ONENAND_SYNC_READ) { | 184 | if (cfg->flags & ONENAND_SYNC_READ) { |
| 139 | sync_read = 1; | 185 | sync_read = 1; |
| @@ -148,27 +194,7 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
| 148 | err = omap2_onenand_set_async_mode(cs, onenand_base); | 194 | err = omap2_onenand_set_async_mode(cs, onenand_base); |
| 149 | if (err) | 195 | if (err) |
| 150 | return err; | 196 | return err; |
| 151 | reg = readw(onenand_base + ONENAND_REG_VERSION_ID); | 197 | freq = omap2_onenand_get_freq(cfg, onenand_base, &clk_dep); |
| 152 | switch ((reg >> 4) & 0xf) { | ||
| 153 | case 0: | ||
| 154 | freq = 40; | ||
| 155 | break; | ||
| 156 | case 1: | ||
| 157 | freq = 54; | ||
| 158 | break; | ||
| 159 | case 2: | ||
| 160 | freq = 66; | ||
| 161 | break; | ||
| 162 | case 3: | ||
| 163 | freq = 83; | ||
| 164 | break; | ||
| 165 | case 4: | ||
| 166 | freq = 104; | ||
| 167 | break; | ||
| 168 | default: | ||
| 169 | freq = 54; | ||
| 170 | break; | ||
| 171 | } | ||
| 172 | first_time = 1; | 198 | first_time = 1; |
| 173 | } | 199 | } |
| 174 | 200 | ||
| @@ -180,7 +206,7 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
| 180 | t_avdh = 2; | 206 | t_avdh = 2; |
| 181 | t_ach = 3; | 207 | t_ach = 3; |
| 182 | t_aavdh = 6; | 208 | t_aavdh = 6; |
| 183 | t_rdyo = 9; | 209 | t_rdyo = 6; |
| 184 | break; | 210 | break; |
| 185 | case 83: | 211 | case 83: |
| 186 | min_gpmc_clk_period = 12000; /* 83 MHz */ | 212 | min_gpmc_clk_period = 12000; /* 83 MHz */ |
| @@ -217,16 +243,36 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
| 217 | gpmc_clk_ns = gpmc_ticks_to_ns(div); | 243 | gpmc_clk_ns = gpmc_ticks_to_ns(div); |
| 218 | if (gpmc_clk_ns < 15) /* >66Mhz */ | 244 | if (gpmc_clk_ns < 15) /* >66Mhz */ |
| 219 | hf = 1; | 245 | hf = 1; |
| 220 | if (hf) | 246 | if (gpmc_clk_ns < 12) /* >83Mhz */ |
| 247 | vhf = 1; | ||
| 248 | if (vhf) | ||
| 249 | latency = 8; | ||
| 250 | else if (hf) | ||
| 221 | latency = 6; | 251 | latency = 6; |
| 222 | else if (gpmc_clk_ns >= 25) /* 40 MHz*/ | 252 | else if (gpmc_clk_ns >= 25) /* 40 MHz*/ |
| 223 | latency = 3; | 253 | latency = 3; |
| 224 | else | 254 | else |
| 225 | latency = 4; | 255 | latency = 4; |
| 226 | 256 | ||
| 257 | if (clk_dep) { | ||
| 258 | if (gpmc_clk_ns < 12) { /* >83Mhz */ | ||
| 259 | t_ces = 3; | ||
| 260 | t_avds = 4; | ||
| 261 | } else if (gpmc_clk_ns < 15) { /* >66Mhz */ | ||
| 262 | t_ces = 5; | ||
| 263 | t_avds = 4; | ||
| 264 | } else if (gpmc_clk_ns < 25) { /* >40Mhz */ | ||
| 265 | t_ces = 6; | ||
| 266 | t_avds = 5; | ||
| 267 | } else { | ||
| 268 | t_ces = 7; | ||
| 269 | t_avds = 7; | ||
| 270 | } | ||
| 271 | } | ||
| 272 | |||
| 227 | if (first_time) | 273 | if (first_time) |
| 228 | set_onenand_cfg(onenand_base, latency, | 274 | set_onenand_cfg(onenand_base, latency, |
| 229 | sync_read, sync_write, hf); | 275 | sync_read, sync_write, hf, vhf); |
| 230 | 276 | ||
| 231 | if (div == 1) { | 277 | if (div == 1) { |
| 232 | reg = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG2); | 278 | reg = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG2); |
| @@ -264,6 +310,9 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
| 264 | /* Read */ | 310 | /* Read */ |
| 265 | t.adv_rd_off = gpmc_ticks_to_ns(fclk_offset + gpmc_ns_to_ticks(t_avdh)); | 311 | t.adv_rd_off = gpmc_ticks_to_ns(fclk_offset + gpmc_ns_to_ticks(t_avdh)); |
| 266 | t.oe_on = gpmc_ticks_to_ns(fclk_offset + gpmc_ns_to_ticks(t_ach)); | 312 | t.oe_on = gpmc_ticks_to_ns(fclk_offset + gpmc_ns_to_ticks(t_ach)); |
| 313 | /* Force at least 1 clk between AVD High to OE Low */ | ||
| 314 | if (t.oe_on <= t.adv_rd_off) | ||
| 315 | t.oe_on = t.adv_rd_off + gpmc_round_ns_to_ticks(1); | ||
| 267 | t.access = gpmc_ticks_to_ns(fclk_offset + (latency + 1) * div); | 316 | t.access = gpmc_ticks_to_ns(fclk_offset + (latency + 1) * div); |
| 268 | t.oe_off = t.access + gpmc_round_ns_to_ticks(1); | 317 | t.oe_off = t.access + gpmc_round_ns_to_ticks(1); |
| 269 | t.cs_rd_off = t.oe_off; | 318 | t.cs_rd_off = t.oe_off; |
| @@ -317,18 +366,20 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
| 317 | if (err) | 366 | if (err) |
| 318 | return err; | 367 | return err; |
| 319 | 368 | ||
| 320 | set_onenand_cfg(onenand_base, latency, sync_read, sync_write, hf); | 369 | set_onenand_cfg(onenand_base, latency, sync_read, sync_write, hf, vhf); |
| 370 | |||
| 371 | *freq_ptr = freq; | ||
| 321 | 372 | ||
| 322 | return 0; | 373 | return 0; |
| 323 | } | 374 | } |
| 324 | 375 | ||
| 325 | static int gpmc_onenand_setup(void __iomem *onenand_base, int freq) | 376 | static int gpmc_onenand_setup(void __iomem *onenand_base, int *freq_ptr) |
| 326 | { | 377 | { |
| 327 | struct device *dev = &gpmc_onenand_device.dev; | 378 | struct device *dev = &gpmc_onenand_device.dev; |
| 328 | 379 | ||
| 329 | /* Set sync timings in GPMC */ | 380 | /* Set sync timings in GPMC */ |
| 330 | if (omap2_onenand_set_sync_mode(gpmc_onenand_data, onenand_base, | 381 | if (omap2_onenand_set_sync_mode(gpmc_onenand_data, onenand_base, |
| 331 | freq) < 0) { | 382 | freq_ptr) < 0) { |
| 332 | dev_err(dev, "Unable to set synchronous mode\n"); | 383 | dev_err(dev, "Unable to set synchronous mode\n"); |
| 333 | return -EINVAL; | 384 | return -EINVAL; |
| 334 | } | 385 | } |
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 1b7b3e7d02f7..674174365f78 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | */ | 14 | */ |
| 15 | #undef DEBUG | 15 | #undef DEBUG |
| 16 | 16 | ||
| 17 | #include <linux/irq.h> | ||
| 17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
| 18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
| 19 | #include <linux/err.h> | 20 | #include <linux/err.h> |
| @@ -22,6 +23,7 @@ | |||
| 22 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
| 23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
| 24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
| 26 | #include <linux/interrupt.h> | ||
| 25 | 27 | ||
| 26 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
| 27 | #include <plat/gpmc.h> | 29 | #include <plat/gpmc.h> |
| @@ -58,7 +60,6 @@ | |||
| 58 | #define GPMC_CHUNK_SHIFT 24 /* 16 MB */ | 60 | #define GPMC_CHUNK_SHIFT 24 /* 16 MB */ |
| 59 | #define GPMC_SECTION_SHIFT 28 /* 128 MB */ | 61 | #define GPMC_SECTION_SHIFT 28 /* 128 MB */ |
| 60 | 62 | ||
| 61 | #define PREFETCH_FIFOTHRESHOLD (0x40 << 8) | ||
| 62 | #define CS_NUM_SHIFT 24 | 63 | #define CS_NUM_SHIFT 24 |
| 63 | #define ENABLE_PREFETCH (0x1 << 7) | 64 | #define ENABLE_PREFETCH (0x1 << 7) |
| 64 | #define DMA_MPU_MODE 2 | 65 | #define DMA_MPU_MODE 2 |
| @@ -100,6 +101,8 @@ static void __iomem *gpmc_base; | |||
| 100 | 101 | ||
| 101 | static struct clk *gpmc_l3_clk; | 102 | static struct clk *gpmc_l3_clk; |
| 102 | 103 | ||
| 104 | static irqreturn_t gpmc_handle_irq(int irq, void *dev); | ||
| 105 | |||
| 103 | static void gpmc_write_reg(int idx, u32 val) | 106 | static void gpmc_write_reg(int idx, u32 val) |
| 104 | { | 107 | { |
| 105 | __raw_writel(val, gpmc_base + idx); | 108 | __raw_writel(val, gpmc_base + idx); |
| @@ -497,6 +500,10 @@ int gpmc_cs_configure(int cs, int cmd, int wval) | |||
| 497 | u32 regval = 0; | 500 | u32 regval = 0; |
| 498 | 501 | ||
| 499 | switch (cmd) { | 502 | switch (cmd) { |
| 503 | case GPMC_ENABLE_IRQ: | ||
| 504 | gpmc_write_reg(GPMC_IRQENABLE, wval); | ||
| 505 | break; | ||
| 506 | |||
| 500 | case GPMC_SET_IRQ_STATUS: | 507 | case GPMC_SET_IRQ_STATUS: |
| 501 | gpmc_write_reg(GPMC_IRQSTATUS, wval); | 508 | gpmc_write_reg(GPMC_IRQSTATUS, wval); |
| 502 | break; | 509 | break; |
| @@ -598,15 +605,19 @@ EXPORT_SYMBOL(gpmc_nand_write); | |||
| 598 | /** | 605 | /** |
| 599 | * gpmc_prefetch_enable - configures and starts prefetch transfer | 606 | * gpmc_prefetch_enable - configures and starts prefetch transfer |
| 600 | * @cs: cs (chip select) number | 607 | * @cs: cs (chip select) number |
| 608 | * @fifo_th: fifo threshold to be used for read/ write | ||
| 601 | * @dma_mode: dma mode enable (1) or disable (0) | 609 | * @dma_mode: dma mode enable (1) or disable (0) |
| 602 | * @u32_count: number of bytes to be transferred | 610 | * @u32_count: number of bytes to be transferred |
| 603 | * @is_write: prefetch read(0) or write post(1) mode | 611 | * @is_write: prefetch read(0) or write post(1) mode |
| 604 | */ | 612 | */ |
| 605 | int gpmc_prefetch_enable(int cs, int dma_mode, | 613 | int gpmc_prefetch_enable(int cs, int fifo_th, int dma_mode, |
| 606 | unsigned int u32_count, int is_write) | 614 | unsigned int u32_count, int is_write) |
| 607 | { | 615 | { |
| 608 | 616 | ||
| 609 | if (!(gpmc_read_reg(GPMC_PREFETCH_CONTROL))) { | 617 | if (fifo_th > PREFETCH_FIFOTHRESHOLD_MAX) { |
| 618 | pr_err("gpmc: fifo threshold is not supported\n"); | ||
| 619 | return -1; | ||
| 620 | } else if (!(gpmc_read_reg(GPMC_PREFETCH_CONTROL))) { | ||
| 610 | /* Set the amount of bytes to be prefetched */ | 621 | /* Set the amount of bytes to be prefetched */ |
| 611 | gpmc_write_reg(GPMC_PREFETCH_CONFIG2, u32_count); | 622 | gpmc_write_reg(GPMC_PREFETCH_CONFIG2, u32_count); |
| 612 | 623 | ||
| @@ -614,7 +625,7 @@ int gpmc_prefetch_enable(int cs, int dma_mode, | |||
| 614 | * enable the engine. Set which cs is has requested for. | 625 | * enable the engine. Set which cs is has requested for. |
| 615 | */ | 626 | */ |
| 616 | gpmc_write_reg(GPMC_PREFETCH_CONFIG1, ((cs << CS_NUM_SHIFT) | | 627 | gpmc_write_reg(GPMC_PREFETCH_CONFIG1, ((cs << CS_NUM_SHIFT) | |
| 617 | PREFETCH_FIFOTHRESHOLD | | 628 | PREFETCH_FIFOTHRESHOLD(fifo_th) | |
| 618 | ENABLE_PREFETCH | | 629 | ENABLE_PREFETCH | |
| 619 | (dma_mode << DMA_MPU_MODE) | | 630 | (dma_mode << DMA_MPU_MODE) | |
| 620 | (0x1 & is_write))); | 631 | (0x1 & is_write))); |
| @@ -678,9 +689,10 @@ static void __init gpmc_mem_init(void) | |||
| 678 | } | 689 | } |
| 679 | } | 690 | } |
| 680 | 691 | ||
| 681 | void __init gpmc_init(void) | 692 | static int __init gpmc_init(void) |
| 682 | { | 693 | { |
| 683 | u32 l; | 694 | u32 l, irq; |
| 695 | int cs, ret = -EINVAL; | ||
| 684 | char *ck = NULL; | 696 | char *ck = NULL; |
| 685 | 697 | ||
| 686 | if (cpu_is_omap24xx()) { | 698 | if (cpu_is_omap24xx()) { |
| @@ -698,7 +710,7 @@ void __init gpmc_init(void) | |||
| 698 | } | 710 | } |
| 699 | 711 | ||
| 700 | if (WARN_ON(!ck)) | 712 | if (WARN_ON(!ck)) |
| 701 | return; | 713 | return ret; |
| 702 | 714 | ||
| 703 | gpmc_l3_clk = clk_get(NULL, ck); | 715 | gpmc_l3_clk = clk_get(NULL, ck); |
| 704 | if (IS_ERR(gpmc_l3_clk)) { | 716 | if (IS_ERR(gpmc_l3_clk)) { |
| @@ -723,6 +735,36 @@ void __init gpmc_init(void) | |||
| 723 | l |= (0x02 << 3) | (1 << 0); | 735 | l |= (0x02 << 3) | (1 << 0); |
| 724 | gpmc_write_reg(GPMC_SYSCONFIG, l); | 736 | gpmc_write_reg(GPMC_SYSCONFIG, l); |
| 725 | gpmc_mem_init(); | 737 | gpmc_mem_init(); |
| 738 | |||
| 739 | /* initalize the irq_chained */ | ||
| 740 | irq = OMAP_GPMC_IRQ_BASE; | ||
| 741 | for (cs = 0; cs < GPMC_CS_NUM; cs++) { | ||
| 742 | set_irq_handler(irq, handle_simple_irq); | ||
| 743 | set_irq_flags(irq, IRQF_VALID); | ||
| 744 | irq++; | ||
| 745 | } | ||
| 746 | |||
| 747 | ret = request_irq(INT_34XX_GPMC_IRQ, | ||
| 748 | gpmc_handle_irq, IRQF_SHARED, "gpmc", gpmc_base); | ||
| 749 | if (ret) | ||
| 750 | pr_err("gpmc: irq-%d could not claim: err %d\n", | ||
| 751 | INT_34XX_GPMC_IRQ, ret); | ||
| 752 | return ret; | ||
| 753 | } | ||
| 754 | postcore_initcall(gpmc_init); | ||
| 755 | |||
| 756 | static irqreturn_t gpmc_handle_irq(int irq, void *dev) | ||
| 757 | { | ||
| 758 | u8 cs; | ||
| 759 | |||
| 760 | if (irq != INT_34XX_GPMC_IRQ) | ||
| 761 | return IRQ_HANDLED; | ||
| 762 | /* check cs to invoke the irq */ | ||
| 763 | cs = ((gpmc_read_reg(GPMC_PREFETCH_CONFIG1)) >> CS_NUM_SHIFT) & 0x7; | ||
| 764 | if (OMAP_GPMC_IRQ_BASE+cs <= OMAP_GPMC_IRQ_END) | ||
| 765 | generic_handle_irq(OMAP_GPMC_IRQ_BASE+cs); | ||
| 766 | |||
| 767 | return IRQ_HANDLED; | ||
| 726 | } | 768 | } |
| 727 | 769 | ||
| 728 | #ifdef CONFIG_ARCH_OMAP3 | 770 | #ifdef CONFIG_ARCH_OMAP3 |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 34272e4863fd..137e1a5f3d85 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
| @@ -16,7 +16,10 @@ | |||
| 16 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
| 17 | #include <plat/mmc.h> | 17 | #include <plat/mmc.h> |
| 18 | #include <plat/omap-pm.h> | 18 | #include <plat/omap-pm.h> |
| 19 | #include <plat/mux.h> | ||
| 20 | #include <plat/omap_device.h> | ||
| 19 | 21 | ||
| 22 | #include "mux.h" | ||
| 20 | #include "hsmmc.h" | 23 | #include "hsmmc.h" |
| 21 | #include "control.h" | 24 | #include "control.h" |
| 22 | 25 | ||
| @@ -28,10 +31,6 @@ static u16 control_mmc1; | |||
| 28 | 31 | ||
| 29 | #define HSMMC_NAME_LEN 9 | 32 | #define HSMMC_NAME_LEN 9 |
| 30 | 33 | ||
| 31 | static struct hsmmc_controller { | ||
| 32 | char name[HSMMC_NAME_LEN + 1]; | ||
| 33 | } hsmmc[OMAP34XX_NR_MMC]; | ||
| 34 | |||
| 35 | #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) | 34 | #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) |
| 36 | 35 | ||
| 37 | static int hsmmc_get_context_loss(struct device *dev) | 36 | static int hsmmc_get_context_loss(struct device *dev) |
| @@ -204,174 +203,312 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on, | |||
| 204 | return 0; | 203 | return 0; |
| 205 | } | 204 | } |
| 206 | 205 | ||
| 207 | static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata; | 206 | static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, |
| 208 | 207 | int controller_nr) | |
| 209 | void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) | ||
| 210 | { | 208 | { |
| 211 | struct omap2_hsmmc_info *c; | 209 | if ((mmc_controller->slots[0].switch_pin > 0) && \ |
| 212 | int nr_hsmmc = ARRAY_SIZE(hsmmc_data); | 210 | (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) |
| 213 | int i; | 211 | omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, |
| 214 | u32 reg; | 212 | OMAP_PIN_INPUT_PULLUP); |
| 215 | 213 | if ((mmc_controller->slots[0].gpio_wp > 0) && \ | |
| 216 | if (!cpu_is_omap44xx()) { | 214 | (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES)) |
| 217 | if (cpu_is_omap2430()) { | 215 | omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, |
| 218 | control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; | 216 | OMAP_PIN_INPUT_PULLUP); |
| 219 | control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1; | 217 | if (cpu_is_omap34xx()) { |
| 220 | } else { | 218 | if (controller_nr == 0) { |
| 221 | control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE; | 219 | omap_mux_init_signal("sdmmc1_clk", |
| 222 | control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1; | 220 | OMAP_PIN_INPUT_PULLUP); |
| 223 | } | 221 | omap_mux_init_signal("sdmmc1_cmd", |
| 224 | } else { | 222 | OMAP_PIN_INPUT_PULLUP); |
| 225 | control_pbias_offset = | 223 | omap_mux_init_signal("sdmmc1_dat0", |
| 226 | OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_PBIASLITE; | 224 | OMAP_PIN_INPUT_PULLUP); |
| 227 | control_mmc1 = OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MMC1; | 225 | if (mmc_controller->slots[0].caps & |
| 228 | reg = omap4_ctrl_pad_readl(control_mmc1); | 226 | (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) { |
| 229 | reg |= (OMAP4_SDMMC1_PUSTRENGTH_GRP0_MASK | | 227 | omap_mux_init_signal("sdmmc1_dat1", |
| 230 | OMAP4_SDMMC1_PUSTRENGTH_GRP1_MASK); | 228 | OMAP_PIN_INPUT_PULLUP); |
| 231 | reg &= ~(OMAP4_SDMMC1_PUSTRENGTH_GRP2_MASK | | 229 | omap_mux_init_signal("sdmmc1_dat2", |
| 232 | OMAP4_SDMMC1_PUSTRENGTH_GRP3_MASK); | 230 | OMAP_PIN_INPUT_PULLUP); |
| 233 | reg |= (OMAP4_USBC1_DR0_SPEEDCTRL_MASK| | 231 | omap_mux_init_signal("sdmmc1_dat3", |
| 234 | OMAP4_SDMMC1_DR1_SPEEDCTRL_MASK | | 232 | OMAP_PIN_INPUT_PULLUP); |
| 235 | OMAP4_SDMMC1_DR2_SPEEDCTRL_MASK); | 233 | } |
| 236 | omap4_ctrl_pad_writel(reg, control_mmc1); | 234 | if (mmc_controller->slots[0].caps & |
| 237 | } | 235 | MMC_CAP_8_BIT_DATA) { |
| 238 | 236 | omap_mux_init_signal("sdmmc1_dat4", | |
| 239 | for (c = controllers; c->mmc; c++) { | 237 | OMAP_PIN_INPUT_PULLUP); |
| 240 | struct hsmmc_controller *hc = hsmmc + c->mmc - 1; | 238 | omap_mux_init_signal("sdmmc1_dat5", |
| 241 | struct omap_mmc_platform_data *mmc = hsmmc_data[c->mmc - 1]; | 239 | OMAP_PIN_INPUT_PULLUP); |
| 242 | 240 | omap_mux_init_signal("sdmmc1_dat6", | |
| 243 | if (!c->mmc || c->mmc > nr_hsmmc) { | 241 | OMAP_PIN_INPUT_PULLUP); |
| 244 | pr_debug("MMC%d: no such controller\n", c->mmc); | 242 | omap_mux_init_signal("sdmmc1_dat7", |
| 245 | continue; | 243 | OMAP_PIN_INPUT_PULLUP); |
| 246 | } | 244 | } |
| 247 | if (mmc) { | ||
| 248 | pr_debug("MMC%d: already configured\n", c->mmc); | ||
| 249 | continue; | ||
| 250 | } | 245 | } |
| 251 | 246 | if (controller_nr == 1) { | |
| 252 | mmc = kzalloc(sizeof(struct omap_mmc_platform_data), | 247 | /* MMC2 */ |
| 253 | GFP_KERNEL); | 248 | omap_mux_init_signal("sdmmc2_clk", |
| 254 | if (!mmc) { | 249 | OMAP_PIN_INPUT_PULLUP); |
| 255 | pr_err("Cannot allocate memory for mmc device!\n"); | 250 | omap_mux_init_signal("sdmmc2_cmd", |
| 256 | goto done; | 251 | OMAP_PIN_INPUT_PULLUP); |
| 252 | omap_mux_init_signal("sdmmc2_dat0", | ||
| 253 | OMAP_PIN_INPUT_PULLUP); | ||
| 254 | |||
| 255 | /* | ||
| 256 | * For 8 wire configurations, Lines DAT4, 5, 6 and 7 | ||
| 257 | * need to be muxed in the board-*.c files | ||
| 258 | */ | ||
| 259 | if (mmc_controller->slots[0].caps & | ||
| 260 | (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)) { | ||
| 261 | omap_mux_init_signal("sdmmc2_dat1", | ||
| 262 | OMAP_PIN_INPUT_PULLUP); | ||
| 263 | omap_mux_init_signal("sdmmc2_dat2", | ||
| 264 | OMAP_PIN_INPUT_PULLUP); | ||
| 265 | omap_mux_init_signal("sdmmc2_dat3", | ||
| 266 | OMAP_PIN_INPUT_PULLUP); | ||
| 267 | } | ||
| 268 | if (mmc_controller->slots[0].caps & | ||
| 269 | MMC_CAP_8_BIT_DATA) { | ||
| 270 | omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4", | ||
| 271 | OMAP_PIN_INPUT_PULLUP); | ||
| 272 | omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5", | ||
| 273 | OMAP_PIN_INPUT_PULLUP); | ||
| 274 | omap_mux_init_signal("sdmmc2_dat6.sdmmc2_dat6", | ||
| 275 | OMAP_PIN_INPUT_PULLUP); | ||
| 276 | omap_mux_init_signal("sdmmc2_dat7.sdmmc2_dat7", | ||
| 277 | OMAP_PIN_INPUT_PULLUP); | ||
| 278 | } | ||
| 257 | } | 279 | } |
| 258 | 280 | ||
| 259 | if (c->name) | 281 | /* |
| 260 | strncpy(hc->name, c->name, HSMMC_NAME_LEN); | 282 | * For MMC3 the pins need to be muxed in the board-*.c files |
| 261 | else | 283 | */ |
| 262 | snprintf(hc->name, ARRAY_SIZE(hc->name), | 284 | } |
| 263 | "mmc%islot%i", c->mmc, 1); | 285 | } |
| 264 | mmc->slots[0].name = hc->name; | ||
| 265 | mmc->nr_slots = 1; | ||
| 266 | mmc->slots[0].caps = c->caps; | ||
| 267 | mmc->slots[0].internal_clock = !c->ext_clock; | ||
| 268 | mmc->dma_mask = 0xffffffff; | ||
| 269 | if (cpu_is_omap44xx()) | ||
| 270 | mmc->reg_offset = OMAP4_MMC_REG_OFFSET; | ||
| 271 | else | ||
| 272 | mmc->reg_offset = 0; | ||
| 273 | 286 | ||
| 274 | mmc->get_context_loss_count = hsmmc_get_context_loss; | 287 | static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, |
| 288 | struct omap_mmc_platform_data *mmc) | ||
| 289 | { | ||
| 290 | char *hc_name; | ||
| 275 | 291 | ||
| 276 | mmc->slots[0].switch_pin = c->gpio_cd; | 292 | hc_name = kzalloc(sizeof(char) * (HSMMC_NAME_LEN + 1), GFP_KERNEL); |
| 277 | mmc->slots[0].gpio_wp = c->gpio_wp; | 293 | if (!hc_name) { |
| 294 | pr_err("Cannot allocate memory for controller slot name\n"); | ||
| 295 | kfree(hc_name); | ||
| 296 | return -ENOMEM; | ||
| 297 | } | ||
| 278 | 298 | ||
| 279 | mmc->slots[0].remux = c->remux; | 299 | if (c->name) |
| 280 | mmc->slots[0].init_card = c->init_card; | 300 | strncpy(hc_name, c->name, HSMMC_NAME_LEN); |
| 301 | else | ||
| 302 | snprintf(hc_name, (HSMMC_NAME_LEN + 1), "mmc%islot%i", | ||
| 303 | c->mmc, 1); | ||
| 304 | mmc->slots[0].name = hc_name; | ||
| 305 | mmc->nr_slots = 1; | ||
| 306 | mmc->slots[0].caps = c->caps; | ||
| 307 | mmc->slots[0].internal_clock = !c->ext_clock; | ||
| 308 | mmc->dma_mask = 0xffffffff; | ||
| 309 | if (cpu_is_omap44xx()) | ||
| 310 | mmc->reg_offset = OMAP4_MMC_REG_OFFSET; | ||
| 311 | else | ||
| 312 | mmc->reg_offset = 0; | ||
| 281 | 313 | ||
| 282 | if (c->cover_only) | 314 | mmc->get_context_loss_count = hsmmc_get_context_loss; |
| 283 | mmc->slots[0].cover = 1; | ||
| 284 | 315 | ||
| 285 | if (c->nonremovable) | 316 | mmc->slots[0].switch_pin = c->gpio_cd; |
| 286 | mmc->slots[0].nonremovable = 1; | 317 | mmc->slots[0].gpio_wp = c->gpio_wp; |
| 287 | 318 | ||
| 288 | if (c->power_saving) | 319 | mmc->slots[0].remux = c->remux; |
| 289 | mmc->slots[0].power_saving = 1; | 320 | mmc->slots[0].init_card = c->init_card; |
| 290 | 321 | ||
| 291 | if (c->no_off) | 322 | if (c->cover_only) |
| 292 | mmc->slots[0].no_off = 1; | 323 | mmc->slots[0].cover = 1; |
| 293 | 324 | ||
| 294 | if (c->vcc_aux_disable_is_sleep) | 325 | if (c->nonremovable) |
| 295 | mmc->slots[0].vcc_aux_disable_is_sleep = 1; | 326 | mmc->slots[0].nonremovable = 1; |
| 296 | 327 | ||
| 297 | /* NOTE: MMC slots should have a Vcc regulator set up. | 328 | if (c->power_saving) |
| 298 | * This may be from a TWL4030-family chip, another | 329 | mmc->slots[0].power_saving = 1; |
| 299 | * controllable regulator, or a fixed supply. | ||
| 300 | * | ||
| 301 | * temporary HACK: ocr_mask instead of fixed supply | ||
| 302 | */ | ||
| 303 | mmc->slots[0].ocr_mask = c->ocr_mask; | ||
| 304 | 330 | ||
| 305 | if (cpu_is_omap3517() || cpu_is_omap3505()) | 331 | if (c->no_off) |
| 306 | mmc->slots[0].set_power = nop_mmc_set_power; | 332 | mmc->slots[0].no_off = 1; |
| 307 | else | ||
| 308 | mmc->slots[0].features |= HSMMC_HAS_PBIAS; | ||
| 309 | 333 | ||
| 310 | if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0)) | 334 | if (c->vcc_aux_disable_is_sleep) |
| 311 | mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET; | 335 | mmc->slots[0].vcc_aux_disable_is_sleep = 1; |
| 312 | 336 | ||
| 313 | switch (c->mmc) { | 337 | /* |
| 314 | case 1: | 338 | * NOTE: MMC slots should have a Vcc regulator set up. |
| 315 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { | 339 | * This may be from a TWL4030-family chip, another |
| 316 | /* on-chip level shifting via PBIAS0/PBIAS1 */ | 340 | * controllable regulator, or a fixed supply. |
| 317 | if (cpu_is_omap44xx()) { | 341 | * |
| 318 | mmc->slots[0].before_set_reg = | 342 | * temporary HACK: ocr_mask instead of fixed supply |
| 343 | */ | ||
| 344 | mmc->slots[0].ocr_mask = c->ocr_mask; | ||
| 345 | |||
| 346 | if (cpu_is_omap3517() || cpu_is_omap3505()) | ||
| 347 | mmc->slots[0].set_power = nop_mmc_set_power; | ||
| 348 | else | ||
| 349 | mmc->slots[0].features |= HSMMC_HAS_PBIAS; | ||
| 350 | |||
| 351 | if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0)) | ||
| 352 | mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET; | ||
| 353 | |||
| 354 | switch (c->mmc) { | ||
| 355 | case 1: | ||
| 356 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { | ||
| 357 | /* on-chip level shifting via PBIAS0/PBIAS1 */ | ||
| 358 | if (cpu_is_omap44xx()) { | ||
| 359 | mmc->slots[0].before_set_reg = | ||
| 319 | omap4_hsmmc1_before_set_reg; | 360 | omap4_hsmmc1_before_set_reg; |
| 320 | mmc->slots[0].after_set_reg = | 361 | mmc->slots[0].after_set_reg = |
| 321 | omap4_hsmmc1_after_set_reg; | 362 | omap4_hsmmc1_after_set_reg; |
| 322 | } else { | 363 | } else { |
| 323 | mmc->slots[0].before_set_reg = | 364 | mmc->slots[0].before_set_reg = |
| 324 | omap_hsmmc1_before_set_reg; | 365 | omap_hsmmc1_before_set_reg; |
| 325 | mmc->slots[0].after_set_reg = | 366 | mmc->slots[0].after_set_reg = |
| 326 | omap_hsmmc1_after_set_reg; | 367 | omap_hsmmc1_after_set_reg; |
| 327 | } | ||
| 328 | } | 368 | } |
| 369 | } | ||
| 329 | 370 | ||
| 330 | /* Omap3630 HSMMC1 supports only 4-bit */ | 371 | /* OMAP3630 HSMMC1 supports only 4-bit */ |
| 331 | if (cpu_is_omap3630() && | 372 | if (cpu_is_omap3630() && |
| 332 | (c->caps & MMC_CAP_8_BIT_DATA)) { | 373 | (c->caps & MMC_CAP_8_BIT_DATA)) { |
| 333 | c->caps &= ~MMC_CAP_8_BIT_DATA; | 374 | c->caps &= ~MMC_CAP_8_BIT_DATA; |
| 334 | c->caps |= MMC_CAP_4_BIT_DATA; | 375 | c->caps |= MMC_CAP_4_BIT_DATA; |
| 335 | mmc->slots[0].caps = c->caps; | 376 | mmc->slots[0].caps = c->caps; |
| 336 | } | 377 | } |
| 337 | break; | 378 | break; |
| 338 | case 2: | 379 | case 2: |
| 339 | if (c->ext_clock) | 380 | if (c->ext_clock) |
| 340 | c->transceiver = 1; | 381 | c->transceiver = 1; |
| 341 | if (c->transceiver && (c->caps & MMC_CAP_8_BIT_DATA)) { | 382 | if (c->transceiver && (c->caps & MMC_CAP_8_BIT_DATA)) { |
| 342 | c->caps &= ~MMC_CAP_8_BIT_DATA; | 383 | c->caps &= ~MMC_CAP_8_BIT_DATA; |
| 343 | c->caps |= MMC_CAP_4_BIT_DATA; | 384 | c->caps |= MMC_CAP_4_BIT_DATA; |
| 344 | } | ||
| 345 | /* FALLTHROUGH */ | ||
| 346 | case 3: | ||
| 347 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { | ||
| 348 | /* off-chip level shifting, or none */ | ||
| 349 | mmc->slots[0].before_set_reg = hsmmc23_before_set_reg; | ||
| 350 | mmc->slots[0].after_set_reg = NULL; | ||
| 351 | } | ||
| 352 | break; | ||
| 353 | default: | ||
| 354 | pr_err("MMC%d configuration not supported!\n", c->mmc); | ||
| 355 | kfree(mmc); | ||
| 356 | continue; | ||
| 357 | } | 385 | } |
| 358 | hsmmc_data[c->mmc - 1] = mmc; | 386 | /* FALLTHROUGH */ |
| 387 | case 3: | ||
| 388 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { | ||
| 389 | /* off-chip level shifting, or none */ | ||
| 390 | mmc->slots[0].before_set_reg = hsmmc23_before_set_reg; | ||
| 391 | mmc->slots[0].after_set_reg = NULL; | ||
| 392 | } | ||
| 393 | break; | ||
| 394 | case 4: | ||
| 395 | case 5: | ||
| 396 | mmc->slots[0].before_set_reg = NULL; | ||
| 397 | mmc->slots[0].after_set_reg = NULL; | ||
| 398 | break; | ||
| 399 | default: | ||
| 400 | pr_err("MMC%d configuration not supported!\n", c->mmc); | ||
| 401 | kfree(hc_name); | ||
| 402 | return -ENODEV; | ||
| 403 | } | ||
| 404 | return 0; | ||
| 405 | } | ||
| 406 | |||
| 407 | static struct omap_device_pm_latency omap_hsmmc_latency[] = { | ||
| 408 | [0] = { | ||
| 409 | .deactivate_func = omap_device_idle_hwmods, | ||
| 410 | .activate_func = omap_device_enable_hwmods, | ||
| 411 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, | ||
| 412 | }, | ||
| 413 | /* | ||
| 414 | * XXX There should also be an entry here to power off/on the | ||
| 415 | * MMC regulators/PBIAS cells, etc. | ||
| 416 | */ | ||
| 417 | }; | ||
| 418 | |||
| 419 | #define MAX_OMAP_MMC_HWMOD_NAME_LEN 16 | ||
| 420 | |||
| 421 | void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr) | ||
| 422 | { | ||
| 423 | struct omap_hwmod *oh; | ||
| 424 | struct omap_device *od; | ||
| 425 | struct omap_device_pm_latency *ohl; | ||
| 426 | char oh_name[MAX_OMAP_MMC_HWMOD_NAME_LEN]; | ||
| 427 | struct omap_mmc_platform_data *mmc_data; | ||
| 428 | struct omap_mmc_dev_attr *mmc_dev_attr; | ||
| 429 | char *name; | ||
| 430 | int l; | ||
| 431 | int ohl_cnt = 0; | ||
| 432 | |||
| 433 | mmc_data = kzalloc(sizeof(struct omap_mmc_platform_data), GFP_KERNEL); | ||
| 434 | if (!mmc_data) { | ||
| 435 | pr_err("Cannot allocate memory for mmc device!\n"); | ||
| 436 | goto done; | ||
| 359 | } | 437 | } |
| 360 | 438 | ||
| 361 | omap2_init_mmc(hsmmc_data, OMAP34XX_NR_MMC); | 439 | if (omap_hsmmc_pdata_init(hsmmcinfo, mmc_data) < 0) { |
| 440 | pr_err("%s fails!\n", __func__); | ||
| 441 | goto done; | ||
| 442 | } | ||
| 443 | omap_hsmmc_mux(mmc_data, (ctrl_nr - 1)); | ||
| 444 | |||
| 445 | name = "omap_hsmmc"; | ||
| 446 | ohl = omap_hsmmc_latency; | ||
| 447 | ohl_cnt = ARRAY_SIZE(omap_hsmmc_latency); | ||
| 448 | |||
| 449 | l = snprintf(oh_name, MAX_OMAP_MMC_HWMOD_NAME_LEN, | ||
| 450 | "mmc%d", ctrl_nr); | ||
| 451 | WARN(l >= MAX_OMAP_MMC_HWMOD_NAME_LEN, | ||
| 452 | "String buffer overflow in MMC%d device setup\n", ctrl_nr); | ||
| 453 | oh = omap_hwmod_lookup(oh_name); | ||
| 454 | if (!oh) { | ||
| 455 | pr_err("Could not look up %s\n", oh_name); | ||
| 456 | kfree(mmc_data->slots[0].name); | ||
| 457 | goto done; | ||
| 458 | } | ||
| 362 | 459 | ||
| 363 | /* pass the device nodes back to board setup code */ | 460 | if (oh->dev_attr != NULL) { |
| 364 | for (c = controllers; c->mmc; c++) { | 461 | mmc_dev_attr = oh->dev_attr; |
| 365 | struct omap_mmc_platform_data *mmc = hsmmc_data[c->mmc - 1]; | 462 | mmc_data->controller_flags = mmc_dev_attr->flags; |
| 463 | } | ||
| 366 | 464 | ||
| 367 | if (!c->mmc || c->mmc > nr_hsmmc) | 465 | od = omap_device_build(name, ctrl_nr - 1, oh, mmc_data, |
| 368 | continue; | 466 | sizeof(struct omap_mmc_platform_data), ohl, ohl_cnt, false); |
| 369 | c->dev = mmc->dev; | 467 | if (IS_ERR(od)) { |
| 468 | WARN(1, "Cant build omap_device for %s:%s.\n", name, oh->name); | ||
| 469 | kfree(mmc_data->slots[0].name); | ||
| 470 | goto done; | ||
| 370 | } | 471 | } |
| 472 | /* | ||
| 473 | * return device handle to board setup code | ||
| 474 | * required to populate for regulator framework structure | ||
| 475 | */ | ||
| 476 | hsmmcinfo->dev = &od->pdev.dev; | ||
| 371 | 477 | ||
| 372 | done: | 478 | done: |
| 373 | for (i = 0; i < nr_hsmmc; i++) | 479 | kfree(mmc_data); |
| 374 | kfree(hsmmc_data[i]); | 480 | } |
| 481 | |||
| 482 | void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) | ||
| 483 | { | ||
| 484 | u32 reg; | ||
| 485 | |||
| 486 | if (!cpu_is_omap44xx()) { | ||
| 487 | if (cpu_is_omap2430()) { | ||
| 488 | control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; | ||
| 489 | control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1; | ||
| 490 | } else { | ||
| 491 | control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE; | ||
| 492 | control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1; | ||
| 493 | } | ||
| 494 | } else { | ||
| 495 | control_pbias_offset = | ||
| 496 | OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_PBIASLITE; | ||
| 497 | control_mmc1 = OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MMC1; | ||
| 498 | reg = omap4_ctrl_pad_readl(control_mmc1); | ||
| 499 | reg |= (OMAP4_SDMMC1_PUSTRENGTH_GRP0_MASK | | ||
| 500 | OMAP4_SDMMC1_PUSTRENGTH_GRP1_MASK); | ||
| 501 | reg &= ~(OMAP4_SDMMC1_PUSTRENGTH_GRP2_MASK | | ||
| 502 | OMAP4_SDMMC1_PUSTRENGTH_GRP3_MASK); | ||
| 503 | reg |= (OMAP4_USBC1_DR0_SPEEDCTRL_MASK| | ||
| 504 | OMAP4_SDMMC1_DR1_SPEEDCTRL_MASK | | ||
| 505 | OMAP4_SDMMC1_DR2_SPEEDCTRL_MASK); | ||
| 506 | omap4_ctrl_pad_writel(reg, control_mmc1); | ||
| 507 | } | ||
| 508 | |||
| 509 | for (; controllers->mmc; controllers++) | ||
| 510 | omap_init_hsmmc(controllers, controllers->mmc); | ||
| 511 | |||
| 375 | } | 512 | } |
| 376 | 513 | ||
| 377 | #endif | 514 | #endif |
diff --git a/arch/arm/mach-omap2/hwspinlock.c b/arch/arm/mach-omap2/hwspinlock.c new file mode 100644 index 000000000000..06d4a80660a5 --- /dev/null +++ b/arch/arm/mach-omap2/hwspinlock.c | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | /* | ||
| 2 | * OMAP hardware spinlock device initialization | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com | ||
| 5 | * | ||
| 6 | * Contact: Simon Que <sque@ti.com> | ||
| 7 | * Hari Kanigeri <h-kanigeri2@ti.com> | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or | ||
| 10 | * modify it under the terms of the GNU General Public License | ||
| 11 | * version 2 as published by the Free Software Foundation. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, but | ||
| 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 16 | * General Public License for more details. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include <linux/kernel.h> | ||
| 20 | #include <linux/init.h> | ||
| 21 | #include <linux/err.h> | ||
| 22 | |||
| 23 | #include <plat/omap_hwmod.h> | ||
| 24 | #include <plat/omap_device.h> | ||
| 25 | |||
| 26 | struct omap_device_pm_latency omap_spinlock_latency[] = { | ||
| 27 | { | ||
| 28 | .deactivate_func = omap_device_idle_hwmods, | ||
| 29 | .activate_func = omap_device_enable_hwmods, | ||
| 30 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, | ||
| 31 | } | ||
| 32 | }; | ||
| 33 | |||
| 34 | int __init hwspinlocks_init(void) | ||
| 35 | { | ||
| 36 | int retval = 0; | ||
| 37 | struct omap_hwmod *oh; | ||
| 38 | struct omap_device *od; | ||
| 39 | const char *oh_name = "spinlock"; | ||
| 40 | const char *dev_name = "omap_hwspinlock"; | ||
| 41 | |||
| 42 | /* | ||
| 43 | * Hwmod lookup will fail in case our platform doesn't support the | ||
| 44 | * hardware spinlock module, so it is safe to run this initcall | ||
| 45 | * on all omaps | ||
| 46 | */ | ||
| 47 | oh = omap_hwmod_lookup(oh_name); | ||
| 48 | if (oh == NULL) | ||
| 49 | return -EINVAL; | ||
| 50 | |||
| 51 | od = omap_device_build(dev_name, 0, oh, NULL, 0, | ||
| 52 | omap_spinlock_latency, | ||
| 53 | ARRAY_SIZE(omap_spinlock_latency), false); | ||
| 54 | if (IS_ERR(od)) { | ||
| 55 | pr_err("Can't build omap_device for %s:%s\n", dev_name, | ||
| 56 | oh_name); | ||
| 57 | retval = PTR_ERR(od); | ||
| 58 | } | ||
| 59 | |||
| 60 | return retval; | ||
| 61 | } | ||
| 62 | /* early board code might need to reserve specific hwspinlock instances */ | ||
| 63 | postcore_initcall(hwspinlocks_init); | ||
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 5f9086c65e48..3168b17bc264 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Copyright (C) 2005 Nokia Corporation | 6 | * Copyright (C) 2005 Nokia Corporation |
| 7 | * Written by Tony Lindgren <tony@atomide.com> | 7 | * Written by Tony Lindgren <tony@atomide.com> |
| 8 | * | 8 | * |
| 9 | * Copyright (C) 2009 Texas Instruments | 9 | * Copyright (C) 2009-11 Texas Instruments |
| 10 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | 10 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> |
| 11 | * | 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify | 12 | * This program is free software; you can redistribute it and/or modify |
| @@ -191,12 +191,19 @@ static void __init omap3_check_features(void) | |||
| 191 | if (!cpu_is_omap3505() && !cpu_is_omap3517()) | 191 | if (!cpu_is_omap3505() && !cpu_is_omap3517()) |
| 192 | omap3_features |= OMAP3_HAS_IO_WAKEUP; | 192 | omap3_features |= OMAP3_HAS_IO_WAKEUP; |
| 193 | 193 | ||
| 194 | omap3_features |= OMAP3_HAS_SDRC; | ||
| 195 | |||
| 194 | /* | 196 | /* |
| 195 | * TODO: Get additional info (where applicable) | 197 | * TODO: Get additional info (where applicable) |
| 196 | * e.g. Size of L2 cache. | 198 | * e.g. Size of L2 cache. |
| 197 | */ | 199 | */ |
| 198 | } | 200 | } |
| 199 | 201 | ||
| 202 | static void __init ti816x_check_features(void) | ||
| 203 | { | ||
| 204 | omap3_features = OMAP3_HAS_NEON; | ||
| 205 | } | ||
| 206 | |||
| 200 | static void __init omap3_check_revision(void) | 207 | static void __init omap3_check_revision(void) |
| 201 | { | 208 | { |
| 202 | u32 cpuid, idcode; | 209 | u32 cpuid, idcode; |
| @@ -287,6 +294,20 @@ static void __init omap3_check_revision(void) | |||
| 287 | omap_chip.oc |= CHIP_IS_OMAP3630ES1_2; | 294 | omap_chip.oc |= CHIP_IS_OMAP3630ES1_2; |
| 288 | } | 295 | } |
| 289 | break; | 296 | break; |
| 297 | case 0xb81e: | ||
| 298 | omap_chip.oc = CHIP_IS_TI816X; | ||
| 299 | |||
| 300 | switch (rev) { | ||
| 301 | case 0: | ||
| 302 | omap_revision = TI8168_REV_ES1_0; | ||
| 303 | break; | ||
| 304 | case 1: | ||
| 305 | omap_revision = TI8168_REV_ES1_1; | ||
| 306 | break; | ||
| 307 | default: | ||
| 308 | omap_revision = TI8168_REV_ES1_1; | ||
| 309 | } | ||
| 310 | break; | ||
| 290 | default: | 311 | default: |
| 291 | /* Unknown default to latest silicon rev as default*/ | 312 | /* Unknown default to latest silicon rev as default*/ |
| 292 | omap_revision = OMAP3630_REV_ES1_2; | 313 | omap_revision = OMAP3630_REV_ES1_2; |
| @@ -307,7 +328,7 @@ static void __init omap4_check_revision(void) | |||
| 307 | */ | 328 | */ |
| 308 | idcode = read_tap_reg(OMAP_TAP_IDCODE); | 329 | idcode = read_tap_reg(OMAP_TAP_IDCODE); |
| 309 | hawkeye = (idcode >> 12) & 0xffff; | 330 | hawkeye = (idcode >> 12) & 0xffff; |
| 310 | rev = (idcode >> 28) & 0xff; | 331 | rev = (idcode >> 28) & 0xf; |
| 311 | 332 | ||
| 312 | /* | 333 | /* |
| 313 | * Few initial ES2.0 samples IDCODE is same as ES1.0 | 334 | * Few initial ES2.0 samples IDCODE is same as ES1.0 |
| @@ -326,22 +347,31 @@ static void __init omap4_check_revision(void) | |||
| 326 | omap_chip.oc |= CHIP_IS_OMAP4430ES1; | 347 | omap_chip.oc |= CHIP_IS_OMAP4430ES1; |
| 327 | break; | 348 | break; |
| 328 | case 1: | 349 | case 1: |
| 350 | default: | ||
| 329 | omap_revision = OMAP4430_REV_ES2_0; | 351 | omap_revision = OMAP4430_REV_ES2_0; |
| 330 | omap_chip.oc |= CHIP_IS_OMAP4430ES2; | 352 | omap_chip.oc |= CHIP_IS_OMAP4430ES2; |
| 353 | } | ||
| 354 | break; | ||
| 355 | case 0xb95c: | ||
| 356 | switch (rev) { | ||
| 357 | case 3: | ||
| 358 | omap_revision = OMAP4430_REV_ES2_1; | ||
| 359 | omap_chip.oc |= CHIP_IS_OMAP4430ES2_1; | ||
| 331 | break; | 360 | break; |
| 361 | case 4: | ||
| 332 | default: | 362 | default: |
| 333 | omap_revision = OMAP4430_REV_ES2_0; | 363 | omap_revision = OMAP4430_REV_ES2_2; |
| 334 | omap_chip.oc |= CHIP_IS_OMAP4430ES2; | 364 | omap_chip.oc |= CHIP_IS_OMAP4430ES2_2; |
| 335 | } | 365 | } |
| 336 | break; | 366 | break; |
| 337 | default: | 367 | default: |
| 338 | /* Unknown default to latest silicon rev as default*/ | 368 | /* Unknown default to latest silicon rev as default */ |
| 339 | omap_revision = OMAP4430_REV_ES2_0; | 369 | omap_revision = OMAP4430_REV_ES2_2; |
| 340 | omap_chip.oc |= CHIP_IS_OMAP4430ES2; | 370 | omap_chip.oc |= CHIP_IS_OMAP4430ES2_2; |
| 341 | } | 371 | } |
| 342 | 372 | ||
| 343 | pr_info("OMAP%04x ES%d.0\n", | 373 | pr_info("OMAP%04x ES%d.%d\n", omap_rev() >> 16, |
| 344 | omap_rev() >> 16, ((omap_rev() >> 12) & 0xf) + 1); | 374 | ((omap_rev() >> 12) & 0xf), ((omap_rev() >> 8) & 0xf)); |
| 345 | } | 375 | } |
| 346 | 376 | ||
| 347 | #define OMAP3_SHOW_FEATURE(feat) \ | 377 | #define OMAP3_SHOW_FEATURE(feat) \ |
| @@ -372,6 +402,8 @@ static void __init omap3_cpuinfo(void) | |||
| 372 | /* Already set in omap3_check_revision() */ | 402 | /* Already set in omap3_check_revision() */ |
| 373 | strcpy(cpu_name, "AM3505"); | 403 | strcpy(cpu_name, "AM3505"); |
| 374 | } | 404 | } |
| 405 | } else if (cpu_is_ti816x()) { | ||
| 406 | strcpy(cpu_name, "TI816X"); | ||
| 375 | } else if (omap3_has_iva() && omap3_has_sgx()) { | 407 | } else if (omap3_has_iva() && omap3_has_sgx()) { |
| 376 | /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */ | 408 | /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */ |
| 377 | strcpy(cpu_name, "OMAP3430/3530"); | 409 | strcpy(cpu_name, "OMAP3430/3530"); |
| @@ -386,7 +418,7 @@ static void __init omap3_cpuinfo(void) | |||
| 386 | strcpy(cpu_name, "OMAP3503"); | 418 | strcpy(cpu_name, "OMAP3503"); |
| 387 | } | 419 | } |
| 388 | 420 | ||
| 389 | if (cpu_is_omap3630()) { | 421 | if (cpu_is_omap3630() || cpu_is_ti816x()) { |
| 390 | switch (rev) { | 422 | switch (rev) { |
| 391 | case OMAP_REVBITS_00: | 423 | case OMAP_REVBITS_00: |
| 392 | strcpy(cpu_rev, "1.0"); | 424 | strcpy(cpu_rev, "1.0"); |
| @@ -462,7 +494,13 @@ void __init omap2_check_revision(void) | |||
| 462 | omap24xx_check_revision(); | 494 | omap24xx_check_revision(); |
| 463 | } else if (cpu_is_omap34xx()) { | 495 | } else if (cpu_is_omap34xx()) { |
| 464 | omap3_check_revision(); | 496 | omap3_check_revision(); |
| 465 | omap3_check_features(); | 497 | |
| 498 | /* TI816X doesn't have feature register */ | ||
| 499 | if (!cpu_is_ti816x()) | ||
| 500 | omap3_check_features(); | ||
| 501 | else | ||
| 502 | ti816x_check_features(); | ||
| 503 | |||
| 466 | omap3_cpuinfo(); | 504 | omap3_cpuinfo(); |
| 467 | return; | 505 | return; |
| 468 | } else if (cpu_is_omap44xx()) { | 506 | } else if (cpu_is_omap44xx()) { |
diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S index 6a4d4136002e..e1b0f17b0927 100644 --- a/arch/arm/mach-omap2/include/mach/debug-macro.S +++ b/arch/arm/mach-omap2/include/mach/debug-macro.S | |||
| @@ -69,6 +69,12 @@ omap_uart_lsr: .word 0 | |||
| 69 | beq 34f @ configure OMAP3UART4 | 69 | beq 34f @ configure OMAP3UART4 |
| 70 | cmp \rp, #OMAP4UART4 @ only on 44xx | 70 | cmp \rp, #OMAP4UART4 @ only on 44xx |
| 71 | beq 44f @ configure OMAP4UART4 | 71 | beq 44f @ configure OMAP4UART4 |
| 72 | cmp \rp, #TI816XUART1 @ ti816x UART offsets different | ||
| 73 | beq 81f @ configure UART1 | ||
| 74 | cmp \rp, #TI816XUART2 @ ti816x UART offsets different | ||
| 75 | beq 82f @ configure UART2 | ||
| 76 | cmp \rp, #TI816XUART3 @ ti816x UART offsets different | ||
| 77 | beq 83f @ configure UART3 | ||
| 72 | cmp \rp, #ZOOM_UART @ only on zoom2/3 | 78 | cmp \rp, #ZOOM_UART @ only on zoom2/3 |
| 73 | beq 95f @ configure ZOOM_UART | 79 | beq 95f @ configure ZOOM_UART |
| 74 | 80 | ||
| @@ -91,6 +97,12 @@ omap_uart_lsr: .word 0 | |||
| 91 | b 98f | 97 | b 98f |
| 92 | 44: mov \rp, #UART_OFFSET(OMAP4_UART4_BASE) | 98 | 44: mov \rp, #UART_OFFSET(OMAP4_UART4_BASE) |
| 93 | b 98f | 99 | b 98f |
| 100 | 81: mov \rp, #UART_OFFSET(TI816X_UART1_BASE) | ||
| 101 | b 98f | ||
| 102 | 82: mov \rp, #UART_OFFSET(TI816X_UART2_BASE) | ||
| 103 | b 98f | ||
| 104 | 83: mov \rp, #UART_OFFSET(TI816X_UART3_BASE) | ||
| 105 | b 98f | ||
| 94 | 95: ldr \rp, =ZOOM_UART_BASE | 106 | 95: ldr \rp, =ZOOM_UART_BASE |
| 95 | mrc p15, 0, \rv, c1, c0 | 107 | mrc p15, 0, \rv, c1, c0 |
| 96 | tst \rv, #1 @ MMU enabled? | 108 | tst \rv, #1 @ MMU enabled? |
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S index 81985a665cb3..a48690b90990 100644 --- a/arch/arm/mach-omap2/include/mach/entry-macro.S +++ b/arch/arm/mach-omap2/include/mach/entry-macro.S | |||
| @@ -61,6 +61,14 @@ | |||
| 61 | bne 9998f | 61 | bne 9998f |
| 62 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ | 62 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ |
| 63 | cmp \irqnr, #0x0 | 63 | cmp \irqnr, #0x0 |
| 64 | bne 9998f | ||
| 65 | |||
| 66 | /* | ||
| 67 | * ti816x has additional IRQ pending register. Checking this | ||
| 68 | * register on omap2 & omap3 has no effect (read as 0). | ||
| 69 | */ | ||
| 70 | ldr \irqnr, [\base, #0xf8] /* IRQ pending reg 4 */ | ||
| 71 | cmp \irqnr, #0x0 | ||
| 64 | 9998: | 72 | 9998: |
| 65 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] | 73 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] |
| 66 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ | 74 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ |
| @@ -133,6 +141,11 @@ | |||
| 133 | bne 9999f | 141 | bne 9999f |
| 134 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ | 142 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ |
| 135 | cmp \irqnr, #0x0 | 143 | cmp \irqnr, #0x0 |
| 144 | #ifdef CONFIG_SOC_OMAPTI816X | ||
| 145 | bne 9999f | ||
| 146 | ldr \irqnr, [\base, #0xf8] /* IRQ pending reg 4 */ | ||
| 147 | cmp \irqnr, #0x0 | ||
| 148 | #endif | ||
| 136 | 9999: | 149 | 9999: |
| 137 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] | 150 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] |
| 138 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ | 151 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index c2032041d26f..441e79d043a7 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
| @@ -30,7 +30,6 @@ | |||
| 30 | 30 | ||
| 31 | #include <plat/sram.h> | 31 | #include <plat/sram.h> |
| 32 | #include <plat/sdrc.h> | 32 | #include <plat/sdrc.h> |
| 33 | #include <plat/gpmc.h> | ||
| 34 | #include <plat/serial.h> | 33 | #include <plat/serial.h> |
| 35 | 34 | ||
| 36 | #include "clock2xxx.h" | 35 | #include "clock2xxx.h" |
| @@ -66,7 +65,7 @@ static struct map_desc omap24xx_io_desc[] __initdata = { | |||
| 66 | }, | 65 | }, |
| 67 | }; | 66 | }; |
| 68 | 67 | ||
| 69 | #ifdef CONFIG_ARCH_OMAP2420 | 68 | #ifdef CONFIG_SOC_OMAP2420 |
| 70 | static struct map_desc omap242x_io_desc[] __initdata = { | 69 | static struct map_desc omap242x_io_desc[] __initdata = { |
| 71 | { | 70 | { |
| 72 | .virtual = DSP_MEM_2420_VIRT, | 71 | .virtual = DSP_MEM_2420_VIRT, |
| @@ -90,7 +89,7 @@ static struct map_desc omap242x_io_desc[] __initdata = { | |||
| 90 | 89 | ||
| 91 | #endif | 90 | #endif |
| 92 | 91 | ||
| 93 | #ifdef CONFIG_ARCH_OMAP2430 | 92 | #ifdef CONFIG_SOC_OMAP2430 |
| 94 | static struct map_desc omap243x_io_desc[] __initdata = { | 93 | static struct map_desc omap243x_io_desc[] __initdata = { |
| 95 | { | 94 | { |
| 96 | .virtual = L4_WK_243X_VIRT, | 95 | .virtual = L4_WK_243X_VIRT, |
| @@ -175,6 +174,18 @@ static struct map_desc omap34xx_io_desc[] __initdata = { | |||
| 175 | #endif | 174 | #endif |
| 176 | }; | 175 | }; |
| 177 | #endif | 176 | #endif |
| 177 | |||
| 178 | #ifdef CONFIG_SOC_OMAPTI816X | ||
| 179 | static struct map_desc omapti816x_io_desc[] __initdata = { | ||
| 180 | { | ||
| 181 | .virtual = L4_34XX_VIRT, | ||
| 182 | .pfn = __phys_to_pfn(L4_34XX_PHYS), | ||
| 183 | .length = L4_34XX_SIZE, | ||
| 184 | .type = MT_DEVICE | ||
| 185 | }, | ||
| 186 | }; | ||
| 187 | #endif | ||
| 188 | |||
| 178 | #ifdef CONFIG_ARCH_OMAP4 | 189 | #ifdef CONFIG_ARCH_OMAP4 |
| 179 | static struct map_desc omap44xx_io_desc[] __initdata = { | 190 | static struct map_desc omap44xx_io_desc[] __initdata = { |
| 180 | { | 191 | { |
| @@ -241,7 +252,7 @@ static void __init _omap2_map_common_io(void) | |||
| 241 | omap_sram_init(); | 252 | omap_sram_init(); |
| 242 | } | 253 | } |
| 243 | 254 | ||
| 244 | #ifdef CONFIG_ARCH_OMAP2420 | 255 | #ifdef CONFIG_SOC_OMAP2420 |
| 245 | void __init omap242x_map_common_io(void) | 256 | void __init omap242x_map_common_io(void) |
| 246 | { | 257 | { |
| 247 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); | 258 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); |
| @@ -250,7 +261,7 @@ void __init omap242x_map_common_io(void) | |||
| 250 | } | 261 | } |
| 251 | #endif | 262 | #endif |
| 252 | 263 | ||
| 253 | #ifdef CONFIG_ARCH_OMAP2430 | 264 | #ifdef CONFIG_SOC_OMAP2430 |
| 254 | void __init omap243x_map_common_io(void) | 265 | void __init omap243x_map_common_io(void) |
| 255 | { | 266 | { |
| 256 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); | 267 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); |
| @@ -267,6 +278,14 @@ void __init omap34xx_map_common_io(void) | |||
| 267 | } | 278 | } |
| 268 | #endif | 279 | #endif |
| 269 | 280 | ||
| 281 | #ifdef CONFIG_SOC_OMAPTI816X | ||
| 282 | void __init omapti816x_map_common_io(void) | ||
| 283 | { | ||
| 284 | iotable_init(omapti816x_io_desc, ARRAY_SIZE(omapti816x_io_desc)); | ||
| 285 | _omap2_map_common_io(); | ||
| 286 | } | ||
| 287 | #endif | ||
| 288 | |||
| 270 | #ifdef CONFIG_ARCH_OMAP4 | 289 | #ifdef CONFIG_ARCH_OMAP4 |
| 271 | void __init omap44xx_map_common_io(void) | 290 | void __init omap44xx_map_common_io(void) |
| 272 | { | 291 | { |
| @@ -337,15 +356,15 @@ void __init omap2_init_common_infrastructure(void) | |||
| 337 | 356 | ||
| 338 | if (cpu_is_omap242x()) { | 357 | if (cpu_is_omap242x()) { |
| 339 | omap2xxx_powerdomains_init(); | 358 | omap2xxx_powerdomains_init(); |
| 340 | omap2_clockdomains_init(); | 359 | omap2xxx_clockdomains_init(); |
| 341 | omap2420_hwmod_init(); | 360 | omap2420_hwmod_init(); |
| 342 | } else if (cpu_is_omap243x()) { | 361 | } else if (cpu_is_omap243x()) { |
| 343 | omap2xxx_powerdomains_init(); | 362 | omap2xxx_powerdomains_init(); |
| 344 | omap2_clockdomains_init(); | 363 | omap2xxx_clockdomains_init(); |
| 345 | omap2430_hwmod_init(); | 364 | omap2430_hwmod_init(); |
| 346 | } else if (cpu_is_omap34xx()) { | 365 | } else if (cpu_is_omap34xx()) { |
| 347 | omap3xxx_powerdomains_init(); | 366 | omap3xxx_powerdomains_init(); |
| 348 | omap2_clockdomains_init(); | 367 | omap3xxx_clockdomains_init(); |
| 349 | omap3xxx_hwmod_init(); | 368 | omap3xxx_hwmod_init(); |
| 350 | } else if (cpu_is_omap44xx()) { | 369 | } else if (cpu_is_omap44xx()) { |
| 351 | omap44xx_powerdomains_init(); | 370 | omap44xx_powerdomains_init(); |
| @@ -398,15 +417,10 @@ void __init omap2_init_common_infrastructure(void) | |||
| 398 | void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0, | 417 | void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0, |
| 399 | struct omap_sdrc_params *sdrc_cs1) | 418 | struct omap_sdrc_params *sdrc_cs1) |
| 400 | { | 419 | { |
| 401 | omap_serial_early_init(); | 420 | if (cpu_is_omap24xx() || omap3_has_sdrc()) { |
| 402 | |||
| 403 | omap_hwmod_late_init(); | ||
| 404 | |||
| 405 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { | ||
| 406 | omap2_sdrc_init(sdrc_cs0, sdrc_cs1); | 421 | omap2_sdrc_init(sdrc_cs0, sdrc_cs1); |
| 407 | _omap2_init_reprogram_sdrc(); | 422 | _omap2_init_reprogram_sdrc(); |
| 408 | } | 423 | } |
| 409 | gpmc_init(); | ||
| 410 | 424 | ||
| 411 | omap_irq_base_init(); | 425 | omap_irq_base_init(); |
| 412 | } | 426 | } |
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index 14ee686b6492..adb083e41acd 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c | |||
| @@ -145,35 +145,32 @@ static void omap2_iommu_set_twl(struct iommu *obj, bool on) | |||
| 145 | 145 | ||
| 146 | static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra) | 146 | static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra) |
| 147 | { | 147 | { |
| 148 | int i; | ||
| 149 | u32 stat, da; | 148 | u32 stat, da; |
| 150 | const char *err_msg[] = { | 149 | u32 errs = 0; |
| 151 | "tlb miss", | ||
| 152 | "translation fault", | ||
| 153 | "emulation miss", | ||
| 154 | "table walk fault", | ||
| 155 | "multi hit fault", | ||
| 156 | }; | ||
| 157 | 150 | ||
| 158 | stat = iommu_read_reg(obj, MMU_IRQSTATUS); | 151 | stat = iommu_read_reg(obj, MMU_IRQSTATUS); |
| 159 | stat &= MMU_IRQ_MASK; | 152 | stat &= MMU_IRQ_MASK; |
| 160 | if (!stat) | 153 | if (!stat) { |
| 154 | *ra = 0; | ||
| 161 | return 0; | 155 | return 0; |
| 156 | } | ||
| 162 | 157 | ||
| 163 | da = iommu_read_reg(obj, MMU_FAULT_AD); | 158 | da = iommu_read_reg(obj, MMU_FAULT_AD); |
| 164 | *ra = da; | 159 | *ra = da; |
| 165 | 160 | ||
| 166 | dev_err(obj->dev, "%s:\tda:%08x ", __func__, da); | 161 | if (stat & MMU_IRQ_TLBMISS) |
| 167 | 162 | errs |= OMAP_IOMMU_ERR_TLB_MISS; | |
| 168 | for (i = 0; i < ARRAY_SIZE(err_msg); i++) { | 163 | if (stat & MMU_IRQ_TRANSLATIONFAULT) |
| 169 | if (stat & (1 << i)) | 164 | errs |= OMAP_IOMMU_ERR_TRANS_FAULT; |
| 170 | printk("%s ", err_msg[i]); | 165 | if (stat & MMU_IRQ_EMUMISS) |
| 171 | } | 166 | errs |= OMAP_IOMMU_ERR_EMU_MISS; |
| 172 | printk("\n"); | 167 | if (stat & MMU_IRQ_TABLEWALKFAULT) |
| 173 | 168 | errs |= OMAP_IOMMU_ERR_TBLWALK_FAULT; | |
| 169 | if (stat & MMU_IRQ_MULTIHITFAULT) | ||
| 170 | errs |= OMAP_IOMMU_ERR_MULTIHIT_FAULT; | ||
| 174 | iommu_write_reg(obj, stat, MMU_IRQSTATUS); | 171 | iommu_write_reg(obj, stat, MMU_IRQSTATUS); |
| 175 | 172 | ||
| 176 | return stat; | 173 | return errs; |
| 177 | } | 174 | } |
| 178 | 175 | ||
| 179 | static void omap2_tlb_read_cr(struct iommu *obj, struct cr_regs *cr) | 176 | static void omap2_tlb_read_cr(struct iommu *obj, struct cr_regs *cr) |
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 23049c487c47..bc524b94fd59 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
| @@ -61,8 +61,6 @@ struct omap3_intc_regs { | |||
| 61 | u32 mir[INTCPS_NR_MIR_REGS]; | 61 | u32 mir[INTCPS_NR_MIR_REGS]; |
| 62 | }; | 62 | }; |
| 63 | 63 | ||
| 64 | static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)]; | ||
| 65 | |||
| 66 | /* INTC bank register get/set */ | 64 | /* INTC bank register get/set */ |
| 67 | 65 | ||
| 68 | static void intc_bank_write_reg(u32 val, struct omap_irq_bank *bank, u16 reg) | 66 | static void intc_bank_write_reg(u32 val, struct omap_irq_bank *bank, u16 reg) |
| @@ -110,7 +108,7 @@ static void omap_mask_irq(struct irq_data *d) | |||
| 110 | unsigned int irq = d->irq; | 108 | unsigned int irq = d->irq; |
| 111 | int offset = irq & (~(IRQ_BITS_PER_REG - 1)); | 109 | int offset = irq & (~(IRQ_BITS_PER_REG - 1)); |
| 112 | 110 | ||
| 113 | if (cpu_is_omap34xx()) { | 111 | if (cpu_is_omap34xx() && !cpu_is_ti816x()) { |
| 114 | int spurious = 0; | 112 | int spurious = 0; |
| 115 | 113 | ||
| 116 | /* | 114 | /* |
| @@ -205,6 +203,9 @@ void __init omap_init_irq(void) | |||
| 205 | 203 | ||
| 206 | BUG_ON(!base); | 204 | BUG_ON(!base); |
| 207 | 205 | ||
| 206 | if (cpu_is_ti816x()) | ||
| 207 | bank->nr_irqs = 128; | ||
| 208 | |||
| 208 | /* Static mapping, never released */ | 209 | /* Static mapping, never released */ |
| 209 | bank->base_reg = ioremap(base, SZ_4K); | 210 | bank->base_reg = ioremap(base, SZ_4K); |
| 210 | if (!bank->base_reg) { | 211 | if (!bank->base_reg) { |
| @@ -229,6 +230,8 @@ void __init omap_init_irq(void) | |||
| 229 | } | 230 | } |
| 230 | 231 | ||
| 231 | #ifdef CONFIG_ARCH_OMAP3 | 232 | #ifdef CONFIG_ARCH_OMAP3 |
| 233 | static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)]; | ||
| 234 | |||
| 232 | void omap_intc_save_context(void) | 235 | void omap_intc_save_context(void) |
| 233 | { | 236 | { |
| 234 | int ind = 0, i = 0; | 237 | int ind = 0, i = 0; |
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 0a585dfa9874..6e15e3d7c65e 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c | |||
| @@ -14,12 +14,11 @@ | |||
| 14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
| 15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
| 16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
| 17 | #include <linux/pm_runtime.h> | ||
| 17 | #include <plat/mailbox.h> | 18 | #include <plat/mailbox.h> |
| 18 | #include <mach/irqs.h> | 19 | #include <mach/irqs.h> |
| 19 | 20 | ||
| 20 | #define MAILBOX_REVISION 0x000 | 21 | #define MAILBOX_REVISION 0x000 |
| 21 | #define MAILBOX_SYSCONFIG 0x010 | ||
| 22 | #define MAILBOX_SYSSTATUS 0x014 | ||
| 23 | #define MAILBOX_MESSAGE(m) (0x040 + 4 * (m)) | 22 | #define MAILBOX_MESSAGE(m) (0x040 + 4 * (m)) |
| 24 | #define MAILBOX_FIFOSTATUS(m) (0x080 + 4 * (m)) | 23 | #define MAILBOX_FIFOSTATUS(m) (0x080 + 4 * (m)) |
| 25 | #define MAILBOX_MSGSTATUS(m) (0x0c0 + 4 * (m)) | 24 | #define MAILBOX_MSGSTATUS(m) (0x0c0 + 4 * (m)) |
| @@ -33,17 +32,6 @@ | |||
| 33 | #define MAILBOX_IRQ_NEWMSG(m) (1 << (2 * (m))) | 32 | #define MAILBOX_IRQ_NEWMSG(m) (1 << (2 * (m))) |
| 34 | #define MAILBOX_IRQ_NOTFULL(m) (1 << (2 * (m) + 1)) | 33 | #define MAILBOX_IRQ_NOTFULL(m) (1 << (2 * (m) + 1)) |
| 35 | 34 | ||
| 36 | /* SYSCONFIG: register bit definition */ | ||
| 37 | #define AUTOIDLE (1 << 0) | ||
| 38 | #define SOFTRESET (1 << 1) | ||
| 39 | #define SMARTIDLE (2 << 3) | ||
| 40 | #define OMAP4_SOFTRESET (1 << 0) | ||
| 41 | #define OMAP4_NOIDLE (1 << 2) | ||
| 42 | #define OMAP4_SMARTIDLE (2 << 2) | ||
| 43 | |||
| 44 | /* SYSSTATUS: register bit definition */ | ||
| 45 | #define RESETDONE (1 << 0) | ||
| 46 | |||
| 47 | #define MBOX_REG_SIZE 0x120 | 35 | #define MBOX_REG_SIZE 0x120 |
| 48 | 36 | ||
| 49 | #define OMAP4_MBOX_REG_SIZE 0x130 | 37 | #define OMAP4_MBOX_REG_SIZE 0x130 |
| @@ -70,8 +58,6 @@ struct omap_mbox2_priv { | |||
| 70 | unsigned long irqdisable; | 58 | unsigned long irqdisable; |
| 71 | }; | 59 | }; |
| 72 | 60 | ||
| 73 | static struct clk *mbox_ick_handle; | ||
| 74 | |||
| 75 | static void omap2_mbox_enable_irq(struct omap_mbox *mbox, | 61 | static void omap2_mbox_enable_irq(struct omap_mbox *mbox, |
| 76 | omap_mbox_type_t irq); | 62 | omap_mbox_type_t irq); |
| 77 | 63 | ||
| @@ -89,53 +75,13 @@ static inline void mbox_write_reg(u32 val, size_t ofs) | |||
| 89 | static int omap2_mbox_startup(struct omap_mbox *mbox) | 75 | static int omap2_mbox_startup(struct omap_mbox *mbox) |
| 90 | { | 76 | { |
| 91 | u32 l; | 77 | u32 l; |
| 92 | unsigned long timeout; | ||
| 93 | 78 | ||
| 94 | mbox_ick_handle = clk_get(NULL, "mailboxes_ick"); | 79 | pm_runtime_enable(mbox->dev->parent); |
| 95 | if (IS_ERR(mbox_ick_handle)) { | 80 | pm_runtime_get_sync(mbox->dev->parent); |
| 96 | printk(KERN_ERR "Could not get mailboxes_ick: %ld\n", | ||
| 97 | PTR_ERR(mbox_ick_handle)); | ||
| 98 | return PTR_ERR(mbox_ick_handle); | ||
| 99 | } | ||
| 100 | clk_enable(mbox_ick_handle); | ||
| 101 | |||
| 102 | if (cpu_is_omap44xx()) { | ||
| 103 | mbox_write_reg(OMAP4_SOFTRESET, MAILBOX_SYSCONFIG); | ||
| 104 | timeout = jiffies + msecs_to_jiffies(20); | ||
| 105 | do { | ||
| 106 | l = mbox_read_reg(MAILBOX_SYSCONFIG); | ||
| 107 | if (!(l & OMAP4_SOFTRESET)) | ||
| 108 | break; | ||
| 109 | } while (!time_after(jiffies, timeout)); | ||
| 110 | |||
| 111 | if (l & OMAP4_SOFTRESET) { | ||
| 112 | pr_err("Can't take mailbox out of reset\n"); | ||
| 113 | return -ENODEV; | ||
| 114 | } | ||
| 115 | } else { | ||
| 116 | mbox_write_reg(SOFTRESET, MAILBOX_SYSCONFIG); | ||
| 117 | timeout = jiffies + msecs_to_jiffies(20); | ||
| 118 | do { | ||
| 119 | l = mbox_read_reg(MAILBOX_SYSSTATUS); | ||
| 120 | if (l & RESETDONE) | ||
| 121 | break; | ||
| 122 | } while (!time_after(jiffies, timeout)); | ||
| 123 | |||
| 124 | if (!(l & RESETDONE)) { | ||
| 125 | pr_err("Can't take mailbox out of reset\n"); | ||
| 126 | return -ENODEV; | ||
| 127 | } | ||
| 128 | } | ||
| 129 | 81 | ||
| 130 | l = mbox_read_reg(MAILBOX_REVISION); | 82 | l = mbox_read_reg(MAILBOX_REVISION); |
| 131 | pr_debug("omap mailbox rev %d.%d\n", (l & 0xf0) >> 4, (l & 0x0f)); | 83 | pr_debug("omap mailbox rev %d.%d\n", (l & 0xf0) >> 4, (l & 0x0f)); |
| 132 | 84 | ||
| 133 | if (cpu_is_omap44xx()) | ||
| 134 | l = OMAP4_SMARTIDLE; | ||
| 135 | else | ||
| 136 | l = SMARTIDLE | AUTOIDLE; | ||
| 137 | mbox_write_reg(l, MAILBOX_SYSCONFIG); | ||
| 138 | |||
| 139 | omap2_mbox_enable_irq(mbox, IRQ_RX); | 85 | omap2_mbox_enable_irq(mbox, IRQ_RX); |
| 140 | 86 | ||
| 141 | return 0; | 87 | return 0; |
| @@ -143,9 +89,8 @@ static int omap2_mbox_startup(struct omap_mbox *mbox) | |||
| 143 | 89 | ||
| 144 | static void omap2_mbox_shutdown(struct omap_mbox *mbox) | 90 | static void omap2_mbox_shutdown(struct omap_mbox *mbox) |
| 145 | { | 91 | { |
| 146 | clk_disable(mbox_ick_handle); | 92 | pm_runtime_put_sync(mbox->dev->parent); |
| 147 | clk_put(mbox_ick_handle); | 93 | pm_runtime_disable(mbox->dev->parent); |
| 148 | mbox_ick_handle = NULL; | ||
| 149 | } | 94 | } |
| 150 | 95 | ||
| 151 | /* Mailbox FIFO handle functions */ | 96 | /* Mailbox FIFO handle functions */ |
| @@ -310,7 +255,7 @@ struct omap_mbox mbox_dsp_info = { | |||
| 310 | struct omap_mbox *omap3_mboxes[] = { &mbox_dsp_info, NULL }; | 255 | struct omap_mbox *omap3_mboxes[] = { &mbox_dsp_info, NULL }; |
| 311 | #endif | 256 | #endif |
| 312 | 257 | ||
| 313 | #if defined(CONFIG_ARCH_OMAP2420) | 258 | #if defined(CONFIG_SOC_OMAP2420) |
| 314 | /* IVA */ | 259 | /* IVA */ |
| 315 | static struct omap_mbox2_priv omap2_mbox_iva_priv = { | 260 | static struct omap_mbox2_priv omap2_mbox_iva_priv = { |
| 316 | .tx_fifo = { | 261 | .tx_fifo = { |
| @@ -398,14 +343,14 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev) | |||
| 398 | else if (cpu_is_omap34xx()) { | 343 | else if (cpu_is_omap34xx()) { |
| 399 | list = omap3_mboxes; | 344 | list = omap3_mboxes; |
| 400 | 345 | ||
| 401 | list[0]->irq = platform_get_irq_byname(pdev, "dsp"); | 346 | list[0]->irq = platform_get_irq(pdev, 0); |
| 402 | } | 347 | } |
| 403 | #endif | 348 | #endif |
| 404 | #if defined(CONFIG_ARCH_OMAP2) | 349 | #if defined(CONFIG_ARCH_OMAP2) |
| 405 | else if (cpu_is_omap2430()) { | 350 | else if (cpu_is_omap2430()) { |
| 406 | list = omap2_mboxes; | 351 | list = omap2_mboxes; |
| 407 | 352 | ||
| 408 | list[0]->irq = platform_get_irq_byname(pdev, "dsp"); | 353 | list[0]->irq = platform_get_irq(pdev, 0); |
| 409 | } else if (cpu_is_omap2420()) { | 354 | } else if (cpu_is_omap2420()) { |
| 410 | list = omap2_mboxes; | 355 | list = omap2_mboxes; |
| 411 | 356 | ||
| @@ -417,8 +362,7 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev) | |||
| 417 | else if (cpu_is_omap44xx()) { | 362 | else if (cpu_is_omap44xx()) { |
| 418 | list = omap4_mboxes; | 363 | list = omap4_mboxes; |
| 419 | 364 | ||
| 420 | list[0]->irq = list[1]->irq = | 365 | list[0]->irq = list[1]->irq = platform_get_irq(pdev, 0); |
| 421 | platform_get_irq_byname(pdev, "mbox"); | ||
| 422 | } | 366 | } |
| 423 | #endif | 367 | #endif |
| 424 | else { | 368 | else { |
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index f9c9df5b5ff1..565b9064a328 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
| @@ -22,10 +22,11 @@ | |||
| 22 | #include <plat/dma.h> | 22 | #include <plat/dma.h> |
| 23 | #include <plat/cpu.h> | 23 | #include <plat/cpu.h> |
| 24 | #include <plat/mcbsp.h> | 24 | #include <plat/mcbsp.h> |
| 25 | #include <plat/omap_device.h> | ||
| 26 | #include <linux/pm_runtime.h> | ||
| 25 | 27 | ||
| 26 | #include "control.h" | 28 | #include "control.h" |
| 27 | 29 | ||
| 28 | |||
| 29 | /* McBSP internal signal muxing functions */ | 30 | /* McBSP internal signal muxing functions */ |
| 30 | 31 | ||
| 31 | void omap2_mcbsp1_mux_clkr_src(u8 mux) | 32 | void omap2_mcbsp1_mux_clkr_src(u8 mux) |
| @@ -83,7 +84,7 @@ int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id) | |||
| 83 | return -EINVAL; | 84 | return -EINVAL; |
| 84 | } | 85 | } |
| 85 | 86 | ||
| 86 | clk_disable(mcbsp->fclk); | 87 | pm_runtime_put_sync(mcbsp->dev); |
| 87 | 88 | ||
| 88 | r = clk_set_parent(mcbsp->fclk, fck_src); | 89 | r = clk_set_parent(mcbsp->fclk, fck_src); |
| 89 | if (IS_ERR_VALUE(r)) { | 90 | if (IS_ERR_VALUE(r)) { |
| @@ -93,7 +94,7 @@ int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id) | |||
| 93 | return -EINVAL; | 94 | return -EINVAL; |
| 94 | } | 95 | } |
| 95 | 96 | ||
| 96 | clk_enable(mcbsp->fclk); | 97 | pm_runtime_get_sync(mcbsp->dev); |
| 97 | 98 | ||
| 98 | clk_put(fck_src); | 99 | clk_put(fck_src); |
| 99 | 100 | ||
| @@ -101,196 +102,70 @@ int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id) | |||
| 101 | } | 102 | } |
| 102 | EXPORT_SYMBOL(omap2_mcbsp_set_clks_src); | 103 | EXPORT_SYMBOL(omap2_mcbsp_set_clks_src); |
| 103 | 104 | ||
| 104 | 105 | struct omap_device_pm_latency omap2_mcbsp_latency[] = { | |
| 105 | /* Platform data */ | ||
| 106 | |||
| 107 | #ifdef CONFIG_ARCH_OMAP2420 | ||
| 108 | static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = { | ||
| 109 | { | 106 | { |
| 110 | .phys_base = OMAP24XX_MCBSP1_BASE, | 107 | .deactivate_func = omap_device_idle_hwmods, |
| 111 | .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX, | 108 | .activate_func = omap_device_enable_hwmods, |
| 112 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, | 109 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, |
| 113 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, | ||
| 114 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, | ||
| 115 | }, | ||
| 116 | { | ||
| 117 | .phys_base = OMAP24XX_MCBSP2_BASE, | ||
| 118 | .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX, | ||
| 119 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, | ||
| 120 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, | ||
| 121 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, | ||
| 122 | }, | 110 | }, |
| 123 | }; | 111 | }; |
| 124 | #define OMAP2420_MCBSP_PDATA_SZ ARRAY_SIZE(omap2420_mcbsp_pdata) | ||
| 125 | #define OMAP2420_MCBSP_REG_NUM (OMAP_MCBSP_REG_RCCR / sizeof(u32) + 1) | ||
| 126 | #else | ||
| 127 | #define omap2420_mcbsp_pdata NULL | ||
| 128 | #define OMAP2420_MCBSP_PDATA_SZ 0 | ||
| 129 | #define OMAP2420_MCBSP_REG_NUM 0 | ||
| 130 | #endif | ||
| 131 | 112 | ||
| 132 | #ifdef CONFIG_ARCH_OMAP2430 | 113 | static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused) |
| 133 | static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { | 114 | { |
| 134 | { | 115 | int id, count = 1; |
| 135 | .phys_base = OMAP24XX_MCBSP1_BASE, | 116 | char *name = "omap-mcbsp"; |
| 136 | .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX, | 117 | struct omap_hwmod *oh_device[2]; |
| 137 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, | 118 | struct omap_mcbsp_platform_data *pdata = NULL; |
| 138 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, | 119 | struct omap_device *od; |
| 139 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, | ||
| 140 | }, | ||
| 141 | { | ||
| 142 | .phys_base = OMAP24XX_MCBSP2_BASE, | ||
| 143 | .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX, | ||
| 144 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, | ||
| 145 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, | ||
| 146 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, | ||
| 147 | }, | ||
| 148 | { | ||
| 149 | .phys_base = OMAP2430_MCBSP3_BASE, | ||
| 150 | .dma_rx_sync = OMAP24XX_DMA_MCBSP3_RX, | ||
| 151 | .dma_tx_sync = OMAP24XX_DMA_MCBSP3_TX, | ||
| 152 | .rx_irq = INT_24XX_MCBSP3_IRQ_RX, | ||
| 153 | .tx_irq = INT_24XX_MCBSP3_IRQ_TX, | ||
| 154 | }, | ||
| 155 | { | ||
| 156 | .phys_base = OMAP2430_MCBSP4_BASE, | ||
| 157 | .dma_rx_sync = OMAP24XX_DMA_MCBSP4_RX, | ||
| 158 | .dma_tx_sync = OMAP24XX_DMA_MCBSP4_TX, | ||
| 159 | .rx_irq = INT_24XX_MCBSP4_IRQ_RX, | ||
| 160 | .tx_irq = INT_24XX_MCBSP4_IRQ_TX, | ||
| 161 | }, | ||
| 162 | { | ||
| 163 | .phys_base = OMAP2430_MCBSP5_BASE, | ||
| 164 | .dma_rx_sync = OMAP24XX_DMA_MCBSP5_RX, | ||
| 165 | .dma_tx_sync = OMAP24XX_DMA_MCBSP5_TX, | ||
| 166 | .rx_irq = INT_24XX_MCBSP5_IRQ_RX, | ||
| 167 | .tx_irq = INT_24XX_MCBSP5_IRQ_TX, | ||
| 168 | }, | ||
| 169 | }; | ||
| 170 | #define OMAP2430_MCBSP_PDATA_SZ ARRAY_SIZE(omap2430_mcbsp_pdata) | ||
| 171 | #define OMAP2430_MCBSP_REG_NUM (OMAP_MCBSP_REG_RCCR / sizeof(u32) + 1) | ||
| 172 | #else | ||
| 173 | #define omap2430_mcbsp_pdata NULL | ||
| 174 | #define OMAP2430_MCBSP_PDATA_SZ 0 | ||
| 175 | #define OMAP2430_MCBSP_REG_NUM 0 | ||
| 176 | #endif | ||
| 177 | 120 | ||
| 178 | #ifdef CONFIG_ARCH_OMAP3 | 121 | sscanf(oh->name, "mcbsp%d", &id); |
| 179 | static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | ||
| 180 | { | ||
| 181 | .phys_base = OMAP34XX_MCBSP1_BASE, | ||
| 182 | .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX, | ||
| 183 | .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, | ||
| 184 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, | ||
| 185 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, | ||
| 186 | .buffer_size = 0x80, /* The FIFO has 128 locations */ | ||
| 187 | }, | ||
| 188 | { | ||
| 189 | .phys_base = OMAP34XX_MCBSP2_BASE, | ||
| 190 | .phys_base_st = OMAP34XX_MCBSP2_ST_BASE, | ||
| 191 | .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX, | ||
| 192 | .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, | ||
| 193 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, | ||
| 194 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, | ||
| 195 | .buffer_size = 0x500, /* The FIFO has 1024 + 256 locations */ | ||
| 196 | }, | ||
| 197 | { | ||
| 198 | .phys_base = OMAP34XX_MCBSP3_BASE, | ||
| 199 | .phys_base_st = OMAP34XX_MCBSP3_ST_BASE, | ||
| 200 | .dma_rx_sync = OMAP24XX_DMA_MCBSP3_RX, | ||
| 201 | .dma_tx_sync = OMAP24XX_DMA_MCBSP3_TX, | ||
| 202 | .rx_irq = INT_24XX_MCBSP3_IRQ_RX, | ||
| 203 | .tx_irq = INT_24XX_MCBSP3_IRQ_TX, | ||
| 204 | .buffer_size = 0x80, /* The FIFO has 128 locations */ | ||
| 205 | }, | ||
| 206 | { | ||
| 207 | .phys_base = OMAP34XX_MCBSP4_BASE, | ||
| 208 | .dma_rx_sync = OMAP24XX_DMA_MCBSP4_RX, | ||
| 209 | .dma_tx_sync = OMAP24XX_DMA_MCBSP4_TX, | ||
| 210 | .rx_irq = INT_24XX_MCBSP4_IRQ_RX, | ||
| 211 | .tx_irq = INT_24XX_MCBSP4_IRQ_TX, | ||
| 212 | .buffer_size = 0x80, /* The FIFO has 128 locations */ | ||
| 213 | }, | ||
| 214 | { | ||
| 215 | .phys_base = OMAP34XX_MCBSP5_BASE, | ||
| 216 | .dma_rx_sync = OMAP24XX_DMA_MCBSP5_RX, | ||
| 217 | .dma_tx_sync = OMAP24XX_DMA_MCBSP5_TX, | ||
| 218 | .rx_irq = INT_24XX_MCBSP5_IRQ_RX, | ||
| 219 | .tx_irq = INT_24XX_MCBSP5_IRQ_TX, | ||
| 220 | .buffer_size = 0x80, /* The FIFO has 128 locations */ | ||
| 221 | }, | ||
| 222 | }; | ||
| 223 | #define OMAP34XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap34xx_mcbsp_pdata) | ||
| 224 | #define OMAP34XX_MCBSP_REG_NUM (OMAP_MCBSP_REG_RCCR / sizeof(u32) + 1) | ||
| 225 | #else | ||
| 226 | #define omap34xx_mcbsp_pdata NULL | ||
| 227 | #define OMAP34XX_MCBSP_PDATA_SZ 0 | ||
| 228 | #define OMAP34XX_MCBSP_REG_NUM 0 | ||
| 229 | #endif | ||
| 230 | 122 | ||
| 231 | static struct omap_mcbsp_platform_data omap44xx_mcbsp_pdata[] = { | 123 | pdata = kzalloc(sizeof(struct omap_mcbsp_platform_data), GFP_KERNEL); |
| 232 | { | 124 | if (!pdata) { |
| 233 | .phys_base = OMAP44XX_MCBSP1_BASE, | 125 | pr_err("%s: No memory for mcbsp\n", __func__); |
| 234 | .dma_rx_sync = OMAP44XX_DMA_MCBSP1_RX, | 126 | return -ENOMEM; |
| 235 | .dma_tx_sync = OMAP44XX_DMA_MCBSP1_TX, | 127 | } |
| 236 | .tx_irq = OMAP44XX_IRQ_MCBSP1, | 128 | |
| 237 | }, | 129 | pdata->mcbsp_config_type = oh->class->rev; |
| 238 | { | 130 | |
| 239 | .phys_base = OMAP44XX_MCBSP2_BASE, | 131 | if (oh->class->rev == MCBSP_CONFIG_TYPE3) { |
| 240 | .dma_rx_sync = OMAP44XX_DMA_MCBSP2_RX, | 132 | if (id == 2) |
| 241 | .dma_tx_sync = OMAP44XX_DMA_MCBSP2_TX, | 133 | /* The FIFO has 1024 + 256 locations */ |
| 242 | .tx_irq = OMAP44XX_IRQ_MCBSP2, | 134 | pdata->buffer_size = 0x500; |
| 243 | }, | 135 | else |
| 244 | { | 136 | /* The FIFO has 128 locations */ |
| 245 | .phys_base = OMAP44XX_MCBSP3_BASE, | 137 | pdata->buffer_size = 0x80; |
| 246 | .dma_rx_sync = OMAP44XX_DMA_MCBSP3_RX, | 138 | } |
| 247 | .dma_tx_sync = OMAP44XX_DMA_MCBSP3_TX, | 139 | |
| 248 | .tx_irq = OMAP44XX_IRQ_MCBSP3, | 140 | oh_device[0] = oh; |
| 249 | }, | 141 | |
| 250 | { | 142 | if (oh->dev_attr) { |
| 251 | .phys_base = OMAP44XX_MCBSP4_BASE, | 143 | oh_device[1] = omap_hwmod_lookup(( |
| 252 | .dma_rx_sync = OMAP44XX_DMA_MCBSP4_RX, | 144 | (struct omap_mcbsp_dev_attr *)(oh->dev_attr))->sidetone); |
| 253 | .dma_tx_sync = OMAP44XX_DMA_MCBSP4_TX, | 145 | count++; |
| 254 | .tx_irq = OMAP44XX_IRQ_MCBSP4, | 146 | } |
| 255 | }, | 147 | od = omap_device_build_ss(name, id, oh_device, count, pdata, |
| 256 | }; | 148 | sizeof(*pdata), omap2_mcbsp_latency, |
| 257 | #define OMAP44XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap44xx_mcbsp_pdata) | 149 | ARRAY_SIZE(omap2_mcbsp_latency), false); |
| 258 | #define OMAP44XX_MCBSP_REG_NUM (OMAP_MCBSP_REG_RCCR / sizeof(u32) + 1) | 150 | kfree(pdata); |
| 151 | if (IS_ERR(od)) { | ||
| 152 | pr_err("%s: Cant build omap_device for %s:%s.\n", __func__, | ||
| 153 | name, oh->name); | ||
| 154 | return PTR_ERR(od); | ||
| 155 | } | ||
| 156 | omap_mcbsp_count++; | ||
| 157 | return 0; | ||
| 158 | } | ||
| 259 | 159 | ||
| 260 | static int __init omap2_mcbsp_init(void) | 160 | static int __init omap2_mcbsp_init(void) |
| 261 | { | 161 | { |
| 262 | if (cpu_is_omap2420()) { | 162 | omap_hwmod_for_each_by_class("mcbsp", omap_init_mcbsp, NULL); |
| 263 | omap_mcbsp_count = OMAP2420_MCBSP_PDATA_SZ; | ||
| 264 | omap_mcbsp_cache_size = OMAP2420_MCBSP_REG_NUM * sizeof(u16); | ||
| 265 | } else if (cpu_is_omap2430()) { | ||
| 266 | omap_mcbsp_count = OMAP2430_MCBSP_PDATA_SZ; | ||
| 267 | omap_mcbsp_cache_size = OMAP2430_MCBSP_REG_NUM * sizeof(u32); | ||
| 268 | } else if (cpu_is_omap34xx()) { | ||
| 269 | omap_mcbsp_count = OMAP34XX_MCBSP_PDATA_SZ; | ||
| 270 | omap_mcbsp_cache_size = OMAP34XX_MCBSP_REG_NUM * sizeof(u32); | ||
| 271 | } else if (cpu_is_omap44xx()) { | ||
| 272 | omap_mcbsp_count = OMAP44XX_MCBSP_PDATA_SZ; | ||
| 273 | omap_mcbsp_cache_size = OMAP44XX_MCBSP_REG_NUM * sizeof(u32); | ||
| 274 | } | ||
| 275 | 163 | ||
| 276 | mcbsp_ptr = kzalloc(omap_mcbsp_count * sizeof(struct omap_mcbsp *), | 164 | mcbsp_ptr = kzalloc(omap_mcbsp_count * sizeof(struct omap_mcbsp *), |
| 277 | GFP_KERNEL); | 165 | GFP_KERNEL); |
| 278 | if (!mcbsp_ptr) | 166 | if (!mcbsp_ptr) |
| 279 | return -ENOMEM; | 167 | return -ENOMEM; |
| 280 | 168 | ||
| 281 | if (cpu_is_omap2420()) | ||
| 282 | omap_mcbsp_register_board_cfg(omap2420_mcbsp_pdata, | ||
| 283 | OMAP2420_MCBSP_PDATA_SZ); | ||
| 284 | if (cpu_is_omap2430()) | ||
| 285 | omap_mcbsp_register_board_cfg(omap2430_mcbsp_pdata, | ||
| 286 | OMAP2430_MCBSP_PDATA_SZ); | ||
| 287 | if (cpu_is_omap34xx()) | ||
| 288 | omap_mcbsp_register_board_cfg(omap34xx_mcbsp_pdata, | ||
| 289 | OMAP34XX_MCBSP_PDATA_SZ); | ||
| 290 | if (cpu_is_omap44xx()) | ||
| 291 | omap_mcbsp_register_board_cfg(omap44xx_mcbsp_pdata, | ||
| 292 | OMAP44XX_MCBSP_PDATA_SZ); | ||
| 293 | |||
| 294 | return omap_mcbsp_init(); | 169 | return omap_mcbsp_init(); |
| 295 | } | 170 | } |
| 296 | arch_initcall(omap2_mcbsp_init); | 171 | arch_initcall(omap2_mcbsp_init); |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 005264779f8d..4c8329e4e6e1 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * omap_hwmod implementation for OMAP2/3/4 | 2 | * omap_hwmod implementation for OMAP2/3/4 |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2009-2010 Nokia Corporation | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
| 5 | * | 5 | * |
| 6 | * Paul Walmsley, Benoît Cousson, Kevin Hilman | 6 | * Paul Walmsley, Benoît Cousson, Kevin Hilman |
| 7 | * | 7 | * |
| @@ -162,9 +162,6 @@ static LIST_HEAD(omap_hwmod_list); | |||
| 162 | /* mpu_oh: used to add/remove MPU initiator from sleepdep list */ | 162 | /* mpu_oh: used to add/remove MPU initiator from sleepdep list */ |
| 163 | static struct omap_hwmod *mpu_oh; | 163 | static struct omap_hwmod *mpu_oh; |
| 164 | 164 | ||
| 165 | /* inited: 0 if omap_hwmod_init() has not yet been called; 1 otherwise */ | ||
| 166 | static u8 inited; | ||
| 167 | |||
| 168 | 165 | ||
| 169 | /* Private functions */ | 166 | /* Private functions */ |
| 170 | 167 | ||
| @@ -460,14 +457,18 @@ static int _disable_wakeup(struct omap_hwmod *oh, u32 *v) | |||
| 460 | * will be accessed by a particular initiator (e.g., if a module will | 457 | * will be accessed by a particular initiator (e.g., if a module will |
| 461 | * be accessed by the IVA, there should be a sleepdep between the IVA | 458 | * be accessed by the IVA, there should be a sleepdep between the IVA |
| 462 | * initiator and the module). Only applies to modules in smart-idle | 459 | * initiator and the module). Only applies to modules in smart-idle |
| 463 | * mode. Returns -EINVAL upon error or passes along | 460 | * mode. If the clockdomain is marked as not needing autodeps, return |
| 464 | * clkdm_add_sleepdep() value upon success. | 461 | * 0 without doing anything. Otherwise, returns -EINVAL upon error or |
| 462 | * passes along clkdm_add_sleepdep() value upon success. | ||
| 465 | */ | 463 | */ |
| 466 | static int _add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) | 464 | static int _add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) |
| 467 | { | 465 | { |
| 468 | if (!oh->_clk) | 466 | if (!oh->_clk) |
| 469 | return -EINVAL; | 467 | return -EINVAL; |
| 470 | 468 | ||
| 469 | if (oh->_clk->clkdm && oh->_clk->clkdm->flags & CLKDM_NO_AUTODEPS) | ||
| 470 | return 0; | ||
| 471 | |||
| 471 | return clkdm_add_sleepdep(oh->_clk->clkdm, init_oh->_clk->clkdm); | 472 | return clkdm_add_sleepdep(oh->_clk->clkdm, init_oh->_clk->clkdm); |
| 472 | } | 473 | } |
| 473 | 474 | ||
| @@ -480,14 +481,18 @@ static int _add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) | |||
| 480 | * be accessed by a particular initiator (e.g., if a module will not | 481 | * be accessed by a particular initiator (e.g., if a module will not |
| 481 | * be accessed by the IVA, there should be no sleepdep between the IVA | 482 | * be accessed by the IVA, there should be no sleepdep between the IVA |
| 482 | * initiator and the module). Only applies to modules in smart-idle | 483 | * initiator and the module). Only applies to modules in smart-idle |
| 483 | * mode. Returns -EINVAL upon error or passes along | 484 | * mode. If the clockdomain is marked as not needing autodeps, return |
| 484 | * clkdm_del_sleepdep() value upon success. | 485 | * 0 without doing anything. Returns -EINVAL upon error or passes |
| 486 | * along clkdm_del_sleepdep() value upon success. | ||
| 485 | */ | 487 | */ |
| 486 | static int _del_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) | 488 | static int _del_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) |
| 487 | { | 489 | { |
| 488 | if (!oh->_clk) | 490 | if (!oh->_clk) |
| 489 | return -EINVAL; | 491 | return -EINVAL; |
| 490 | 492 | ||
| 493 | if (oh->_clk->clkdm && oh->_clk->clkdm->flags & CLKDM_NO_AUTODEPS) | ||
| 494 | return 0; | ||
| 495 | |||
| 491 | return clkdm_del_sleepdep(oh->_clk->clkdm, init_oh->_clk->clkdm); | 496 | return clkdm_del_sleepdep(oh->_clk->clkdm, init_oh->_clk->clkdm); |
| 492 | } | 497 | } |
| 493 | 498 | ||
| @@ -904,18 +909,16 @@ static struct omap_hwmod *_lookup(const char *name) | |||
| 904 | * @oh: struct omap_hwmod * | 909 | * @oh: struct omap_hwmod * |
| 905 | * @data: not used; pass NULL | 910 | * @data: not used; pass NULL |
| 906 | * | 911 | * |
| 907 | * Called by omap_hwmod_late_init() (after omap2_clk_init()). | 912 | * Called by omap_hwmod_setup_*() (after omap2_clk_init()). |
| 908 | * Resolves all clock names embedded in the hwmod. Returns -EINVAL if | 913 | * Resolves all clock names embedded in the hwmod. Returns 0 on |
| 909 | * the omap_hwmod has not yet been registered or if the clocks have | 914 | * success, or a negative error code on failure. |
| 910 | * already been initialized, 0 on success, or a non-zero error on | ||
| 911 | * failure. | ||
| 912 | */ | 915 | */ |
| 913 | static int _init_clocks(struct omap_hwmod *oh, void *data) | 916 | static int _init_clocks(struct omap_hwmod *oh, void *data) |
| 914 | { | 917 | { |
| 915 | int ret = 0; | 918 | int ret = 0; |
| 916 | 919 | ||
| 917 | if (!oh || (oh->_state != _HWMOD_STATE_REGISTERED)) | 920 | if (oh->_state != _HWMOD_STATE_REGISTERED) |
| 918 | return -EINVAL; | 921 | return 0; |
| 919 | 922 | ||
| 920 | pr_debug("omap_hwmod: %s: looking up clocks\n", oh->name); | 923 | pr_debug("omap_hwmod: %s: looking up clocks\n", oh->name); |
| 921 | 924 | ||
| @@ -1299,6 +1302,42 @@ static int _idle(struct omap_hwmod *oh) | |||
| 1299 | } | 1302 | } |
| 1300 | 1303 | ||
| 1301 | /** | 1304 | /** |
| 1305 | * omap_hwmod_set_ocp_autoidle - set the hwmod's OCP autoidle bit | ||
| 1306 | * @oh: struct omap_hwmod * | ||
| 1307 | * @autoidle: desired AUTOIDLE bitfield value (0 or 1) | ||
| 1308 | * | ||
| 1309 | * Sets the IP block's OCP autoidle bit in hardware, and updates our | ||
| 1310 | * local copy. Intended to be used by drivers that require | ||
| 1311 | * direct manipulation of the AUTOIDLE bits. | ||
| 1312 | * Returns -EINVAL if @oh is null or is not in the ENABLED state, or passes | ||
| 1313 | * along the return value from _set_module_autoidle(). | ||
| 1314 | * | ||
| 1315 | * Any users of this function should be scrutinized carefully. | ||
| 1316 | */ | ||
| 1317 | int omap_hwmod_set_ocp_autoidle(struct omap_hwmod *oh, u8 autoidle) | ||
| 1318 | { | ||
| 1319 | u32 v; | ||
| 1320 | int retval = 0; | ||
| 1321 | unsigned long flags; | ||
| 1322 | |||
| 1323 | if (!oh || oh->_state != _HWMOD_STATE_ENABLED) | ||
| 1324 | return -EINVAL; | ||
| 1325 | |||
| 1326 | spin_lock_irqsave(&oh->_lock, flags); | ||
| 1327 | |||
| 1328 | v = oh->_sysc_cache; | ||
| 1329 | |||
| 1330 | retval = _set_module_autoidle(oh, autoidle, &v); | ||
| 1331 | |||
| 1332 | if (!retval) | ||
| 1333 | _write_sysconfig(v, oh); | ||
| 1334 | |||
| 1335 | spin_unlock_irqrestore(&oh->_lock, flags); | ||
| 1336 | |||
| 1337 | return retval; | ||
| 1338 | } | ||
| 1339 | |||
| 1340 | /** | ||
| 1302 | * _shutdown - shutdown an omap_hwmod | 1341 | * _shutdown - shutdown an omap_hwmod |
| 1303 | * @oh: struct omap_hwmod * | 1342 | * @oh: struct omap_hwmod * |
| 1304 | * | 1343 | * |
| @@ -1365,14 +1404,16 @@ static int _shutdown(struct omap_hwmod *oh) | |||
| 1365 | * @oh: struct omap_hwmod * | 1404 | * @oh: struct omap_hwmod * |
| 1366 | * | 1405 | * |
| 1367 | * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh | 1406 | * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh |
| 1368 | * OCP_SYSCONFIG register. Returns -EINVAL if the hwmod is in the | 1407 | * OCP_SYSCONFIG register. Returns 0. |
| 1369 | * wrong state or returns 0. | ||
| 1370 | */ | 1408 | */ |
| 1371 | static int _setup(struct omap_hwmod *oh, void *data) | 1409 | static int _setup(struct omap_hwmod *oh, void *data) |
| 1372 | { | 1410 | { |
| 1373 | int i, r; | 1411 | int i, r; |
| 1374 | u8 postsetup_state; | 1412 | u8 postsetup_state; |
| 1375 | 1413 | ||
| 1414 | if (oh->_state != _HWMOD_STATE_CLKS_INITED) | ||
| 1415 | return 0; | ||
| 1416 | |||
| 1376 | /* Set iclk autoidle mode */ | 1417 | /* Set iclk autoidle mode */ |
| 1377 | if (oh->slaves_cnt > 0) { | 1418 | if (oh->slaves_cnt > 0) { |
| 1378 | for (i = 0; i < oh->slaves_cnt; i++) { | 1419 | for (i = 0; i < oh->slaves_cnt; i++) { |
| @@ -1466,7 +1507,7 @@ static int _setup(struct omap_hwmod *oh, void *data) | |||
| 1466 | */ | 1507 | */ |
| 1467 | static int __init _register(struct omap_hwmod *oh) | 1508 | static int __init _register(struct omap_hwmod *oh) |
| 1468 | { | 1509 | { |
| 1469 | int ret, ms_id; | 1510 | int ms_id; |
| 1470 | 1511 | ||
| 1471 | if (!oh || !oh->name || !oh->class || !oh->class->name || | 1512 | if (!oh || !oh->name || !oh->class || !oh->class->name || |
| 1472 | (oh->_state != _HWMOD_STATE_UNKNOWN)) | 1513 | (oh->_state != _HWMOD_STATE_UNKNOWN)) |
| @@ -1478,12 +1519,10 @@ static int __init _register(struct omap_hwmod *oh) | |||
| 1478 | return -EEXIST; | 1519 | return -EEXIST; |
| 1479 | 1520 | ||
| 1480 | ms_id = _find_mpu_port_index(oh); | 1521 | ms_id = _find_mpu_port_index(oh); |
| 1481 | if (!IS_ERR_VALUE(ms_id)) { | 1522 | if (!IS_ERR_VALUE(ms_id)) |
| 1482 | oh->_mpu_port_index = ms_id; | 1523 | oh->_mpu_port_index = ms_id; |
| 1483 | oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index); | 1524 | else |
| 1484 | } else { | ||
| 1485 | oh->_int_flags |= _HWMOD_NO_MPU_PORT; | 1525 | oh->_int_flags |= _HWMOD_NO_MPU_PORT; |
| 1486 | } | ||
| 1487 | 1526 | ||
| 1488 | list_add_tail(&oh->node, &omap_hwmod_list); | 1527 | list_add_tail(&oh->node, &omap_hwmod_list); |
| 1489 | 1528 | ||
| @@ -1491,9 +1530,14 @@ static int __init _register(struct omap_hwmod *oh) | |||
| 1491 | 1530 | ||
| 1492 | oh->_state = _HWMOD_STATE_REGISTERED; | 1531 | oh->_state = _HWMOD_STATE_REGISTERED; |
| 1493 | 1532 | ||
| 1494 | ret = 0; | 1533 | /* |
| 1534 | * XXX Rather than doing a strcmp(), this should test a flag | ||
| 1535 | * set in the hwmod data, inserted by the autogenerator code. | ||
| 1536 | */ | ||
| 1537 | if (!strcmp(oh->name, MPU_INITIATOR_NAME)) | ||
| 1538 | mpu_oh = oh; | ||
| 1495 | 1539 | ||
| 1496 | return ret; | 1540 | return 0; |
| 1497 | } | 1541 | } |
| 1498 | 1542 | ||
| 1499 | 1543 | ||
| @@ -1596,65 +1640,132 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), | |||
| 1596 | return ret; | 1640 | return ret; |
| 1597 | } | 1641 | } |
| 1598 | 1642 | ||
| 1599 | |||
| 1600 | /** | 1643 | /** |
| 1601 | * omap_hwmod_init - init omap_hwmod code and register hwmods | 1644 | * omap_hwmod_register - register an array of hwmods |
| 1602 | * @ohs: pointer to an array of omap_hwmods to register | 1645 | * @ohs: pointer to an array of omap_hwmods to register |
| 1603 | * | 1646 | * |
| 1604 | * Intended to be called early in boot before the clock framework is | 1647 | * Intended to be called early in boot before the clock framework is |
| 1605 | * initialized. If @ohs is not null, will register all omap_hwmods | 1648 | * initialized. If @ohs is not null, will register all omap_hwmods |
| 1606 | * listed in @ohs that are valid for this chip. Returns -EINVAL if | 1649 | * listed in @ohs that are valid for this chip. Returns 0. |
| 1607 | * omap_hwmod_init() has already been called or 0 otherwise. | 1650 | */ |
| 1651 | int __init omap_hwmod_register(struct omap_hwmod **ohs) | ||
| 1652 | { | ||
| 1653 | int r, i; | ||
| 1654 | |||
| 1655 | if (!ohs) | ||
| 1656 | return 0; | ||
| 1657 | |||
| 1658 | i = 0; | ||
| 1659 | do { | ||
| 1660 | if (!omap_chip_is(ohs[i]->omap_chip)) | ||
| 1661 | continue; | ||
| 1662 | |||
| 1663 | r = _register(ohs[i]); | ||
| 1664 | WARN(r, "omap_hwmod: %s: _register returned %d\n", ohs[i]->name, | ||
| 1665 | r); | ||
| 1666 | } while (ohs[++i]); | ||
| 1667 | |||
| 1668 | return 0; | ||
| 1669 | } | ||
| 1670 | |||
| 1671 | /* | ||
| 1672 | * _populate_mpu_rt_base - populate the virtual address for a hwmod | ||
| 1673 | * | ||
| 1674 | * Must be called only from omap_hwmod_setup_*() so ioremap works properly. | ||
| 1675 | * Assumes the caller takes care of locking if needed. | ||
| 1608 | */ | 1676 | */ |
| 1609 | int __init omap_hwmod_init(struct omap_hwmod **ohs) | 1677 | static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data) |
| 1678 | { | ||
| 1679 | if (oh->_state != _HWMOD_STATE_REGISTERED) | ||
| 1680 | return 0; | ||
| 1681 | |||
| 1682 | if (oh->_int_flags & _HWMOD_NO_MPU_PORT) | ||
| 1683 | return 0; | ||
| 1684 | |||
| 1685 | oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index); | ||
| 1686 | if (!oh->_mpu_rt_va) | ||
| 1687 | pr_warning("omap_hwmod: %s found no _mpu_rt_va for %s\n", | ||
| 1688 | __func__, oh->name); | ||
| 1689 | |||
| 1690 | return 0; | ||
| 1691 | } | ||
| 1692 | |||
| 1693 | /** | ||
| 1694 | * omap_hwmod_setup_one - set up a single hwmod | ||
| 1695 | * @oh_name: const char * name of the already-registered hwmod to set up | ||
| 1696 | * | ||
| 1697 | * Must be called after omap2_clk_init(). Resolves the struct clk | ||
| 1698 | * names to struct clk pointers for each registered omap_hwmod. Also | ||
| 1699 | * calls _setup() on each hwmod. Returns -EINVAL upon error or 0 upon | ||
| 1700 | * success. | ||
| 1701 | */ | ||
| 1702 | int __init omap_hwmod_setup_one(const char *oh_name) | ||
| 1610 | { | 1703 | { |
| 1611 | struct omap_hwmod *oh; | 1704 | struct omap_hwmod *oh; |
| 1612 | int r; | 1705 | int r; |
| 1613 | 1706 | ||
| 1614 | if (inited) | 1707 | pr_debug("omap_hwmod: %s: %s\n", oh_name, __func__); |
| 1708 | |||
| 1709 | if (!mpu_oh) { | ||
| 1710 | pr_err("omap_hwmod: %s: cannot setup_one: MPU initiator hwmod %s not yet registered\n", | ||
| 1711 | oh_name, MPU_INITIATOR_NAME); | ||
| 1615 | return -EINVAL; | 1712 | return -EINVAL; |
| 1713 | } | ||
| 1616 | 1714 | ||
| 1617 | inited = 1; | 1715 | oh = _lookup(oh_name); |
| 1716 | if (!oh) { | ||
| 1717 | WARN(1, "omap_hwmod: %s: hwmod not yet registered\n", oh_name); | ||
| 1718 | return -EINVAL; | ||
| 1719 | } | ||
| 1618 | 1720 | ||
| 1619 | if (!ohs) | 1721 | if (mpu_oh->_state == _HWMOD_STATE_REGISTERED && oh != mpu_oh) |
| 1620 | return 0; | 1722 | omap_hwmod_setup_one(MPU_INITIATOR_NAME); |
| 1621 | 1723 | ||
| 1622 | oh = *ohs; | 1724 | r = _populate_mpu_rt_base(oh, NULL); |
| 1623 | while (oh) { | 1725 | if (IS_ERR_VALUE(r)) { |
| 1624 | if (omap_chip_is(oh->omap_chip)) { | 1726 | WARN(1, "omap_hwmod: %s: couldn't set mpu_rt_base\n", oh_name); |
| 1625 | r = _register(oh); | 1727 | return -EINVAL; |
| 1626 | WARN(r, "omap_hwmod: %s: _register returned " | 1728 | } |
| 1627 | "%d\n", oh->name, r); | 1729 | |
| 1628 | } | 1730 | r = _init_clocks(oh, NULL); |
| 1629 | oh = *++ohs; | 1731 | if (IS_ERR_VALUE(r)) { |
| 1732 | WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh_name); | ||
| 1733 | return -EINVAL; | ||
| 1630 | } | 1734 | } |
| 1631 | 1735 | ||
| 1736 | _setup(oh, NULL); | ||
| 1737 | |||
| 1632 | return 0; | 1738 | return 0; |
| 1633 | } | 1739 | } |
| 1634 | 1740 | ||
| 1635 | /** | 1741 | /** |
| 1636 | * omap_hwmod_late_init - do some post-clock framework initialization | 1742 | * omap_hwmod_setup - do some post-clock framework initialization |
| 1637 | * | 1743 | * |
| 1638 | * Must be called after omap2_clk_init(). Resolves the struct clk names | 1744 | * Must be called after omap2_clk_init(). Resolves the struct clk names |
| 1639 | * to struct clk pointers for each registered omap_hwmod. Also calls | 1745 | * to struct clk pointers for each registered omap_hwmod. Also calls |
| 1640 | * _setup() on each hwmod. Returns 0. | 1746 | * _setup() on each hwmod. Returns 0 upon success. |
| 1641 | */ | 1747 | */ |
| 1642 | int omap_hwmod_late_init(void) | 1748 | static int __init omap_hwmod_setup_all(void) |
| 1643 | { | 1749 | { |
| 1644 | int r; | 1750 | int r; |
| 1645 | 1751 | ||
| 1646 | /* XXX check return value */ | 1752 | if (!mpu_oh) { |
| 1647 | r = omap_hwmod_for_each(_init_clocks, NULL); | 1753 | pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet registered\n", |
| 1648 | WARN(r, "omap_hwmod: omap_hwmod_late_init(): _init_clocks failed\n"); | 1754 | __func__, MPU_INITIATOR_NAME); |
| 1755 | return -EINVAL; | ||
| 1756 | } | ||
| 1757 | |||
| 1758 | r = omap_hwmod_for_each(_populate_mpu_rt_base, NULL); | ||
| 1649 | 1759 | ||
| 1650 | mpu_oh = omap_hwmod_lookup(MPU_INITIATOR_NAME); | 1760 | r = omap_hwmod_for_each(_init_clocks, NULL); |
| 1651 | WARN(!mpu_oh, "omap_hwmod: could not find MPU initiator hwmod %s\n", | 1761 | WARN(IS_ERR_VALUE(r), |
| 1652 | MPU_INITIATOR_NAME); | 1762 | "omap_hwmod: %s: _init_clocks failed\n", __func__); |
| 1653 | 1763 | ||
| 1654 | omap_hwmod_for_each(_setup, NULL); | 1764 | omap_hwmod_for_each(_setup, NULL); |
| 1655 | 1765 | ||
| 1656 | return 0; | 1766 | return 0; |
| 1657 | } | 1767 | } |
| 1768 | core_initcall(omap_hwmod_setup_all); | ||
| 1658 | 1769 | ||
| 1659 | /** | 1770 | /** |
| 1660 | * omap_hwmod_enable - enable an omap_hwmod | 1771 | * omap_hwmod_enable - enable an omap_hwmod |
| @@ -1873,6 +1984,7 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) | |||
| 1873 | os = oh->slaves[i]; | 1984 | os = oh->slaves[i]; |
| 1874 | 1985 | ||
| 1875 | for (j = 0; j < os->addr_cnt; j++) { | 1986 | for (j = 0; j < os->addr_cnt; j++) { |
| 1987 | (res + r)->name = (os->addr + j)->name; | ||
| 1876 | (res + r)->start = (os->addr + j)->pa_start; | 1988 | (res + r)->start = (os->addr + j)->pa_start; |
| 1877 | (res + r)->end = (os->addr + j)->pa_end; | 1989 | (res + r)->end = (os->addr + j)->pa_end; |
| 1878 | (res + r)->flags = IORESOURCE_MEM; | 1990 | (res + r)->flags = IORESOURCE_MEM; |
| @@ -2173,11 +2285,11 @@ int omap_hwmod_for_each_by_class(const char *classname, | |||
| 2173 | * @oh: struct omap_hwmod * | 2285 | * @oh: struct omap_hwmod * |
| 2174 | * @state: state that _setup() should leave the hwmod in | 2286 | * @state: state that _setup() should leave the hwmod in |
| 2175 | * | 2287 | * |
| 2176 | * Sets the hwmod state that @oh will enter at the end of _setup() (called by | 2288 | * Sets the hwmod state that @oh will enter at the end of _setup() |
| 2177 | * omap_hwmod_late_init()). Only valid to call between calls to | 2289 | * (called by omap_hwmod_setup_*()). Only valid to call between |
| 2178 | * omap_hwmod_init() and omap_hwmod_late_init(). Returns 0 upon success or | 2290 | * calling omap_hwmod_register() and omap_hwmod_setup_*(). Returns |
| 2179 | * -EINVAL if there is a problem with the arguments or if the hwmod is | 2291 | * 0 upon success or -EINVAL if there is a problem with the arguments |
| 2180 | * in the wrong state. | 2292 | * or if the hwmod is in the wrong state. |
| 2181 | */ | 2293 | */ |
| 2182 | int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state) | 2294 | int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state) |
| 2183 | { | 2295 | { |
| @@ -2229,3 +2341,29 @@ u32 omap_hwmod_get_context_loss_count(struct omap_hwmod *oh) | |||
| 2229 | 2341 | ||
| 2230 | return ret; | 2342 | return ret; |
| 2231 | } | 2343 | } |
| 2344 | |||
| 2345 | /** | ||
| 2346 | * omap_hwmod_no_setup_reset - prevent a hwmod from being reset upon setup | ||
| 2347 | * @oh: struct omap_hwmod * | ||
| 2348 | * | ||
| 2349 | * Prevent the hwmod @oh from being reset during the setup process. | ||
| 2350 | * Intended for use by board-*.c files on boards with devices that | ||
| 2351 | * cannot tolerate being reset. Must be called before the hwmod has | ||
| 2352 | * been set up. Returns 0 upon success or negative error code upon | ||
| 2353 | * failure. | ||
| 2354 | */ | ||
| 2355 | int omap_hwmod_no_setup_reset(struct omap_hwmod *oh) | ||
| 2356 | { | ||
| 2357 | if (!oh) | ||
| 2358 | return -EINVAL; | ||
| 2359 | |||
| 2360 | if (oh->_state != _HWMOD_STATE_REGISTERED) { | ||
| 2361 | pr_err("omap_hwmod: %s: cannot prevent setup reset; in wrong state\n", | ||
| 2362 | oh->name); | ||
| 2363 | return -EINVAL; | ||
| 2364 | } | ||
| 2365 | |||
| 2366 | oh->flags |= HWMOD_INIT_NO_RESET; | ||
| 2367 | |||
| 2368 | return 0; | ||
| 2369 | } | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index e8046b4ec6a4..62823467163b 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
| @@ -18,6 +18,10 @@ | |||
| 18 | #include <plat/serial.h> | 18 | #include <plat/serial.h> |
| 19 | #include <plat/i2c.h> | 19 | #include <plat/i2c.h> |
| 20 | #include <plat/gpio.h> | 20 | #include <plat/gpio.h> |
| 21 | #include <plat/mcspi.h> | ||
| 22 | #include <plat/dmtimer.h> | ||
| 23 | #include <plat/l3_2xxx.h> | ||
| 24 | #include <plat/l4_2xxx.h> | ||
| 21 | 25 | ||
| 22 | #include "omap_hwmod_common_data.h" | 26 | #include "omap_hwmod_common_data.h" |
| 23 | 27 | ||
| @@ -38,12 +42,18 @@ static struct omap_hwmod omap2420_mpu_hwmod; | |||
| 38 | static struct omap_hwmod omap2420_iva_hwmod; | 42 | static struct omap_hwmod omap2420_iva_hwmod; |
| 39 | static struct omap_hwmod omap2420_l3_main_hwmod; | 43 | static struct omap_hwmod omap2420_l3_main_hwmod; |
| 40 | static struct omap_hwmod omap2420_l4_core_hwmod; | 44 | static struct omap_hwmod omap2420_l4_core_hwmod; |
| 45 | static struct omap_hwmod omap2420_dss_core_hwmod; | ||
| 46 | static struct omap_hwmod omap2420_dss_dispc_hwmod; | ||
| 47 | static struct omap_hwmod omap2420_dss_rfbi_hwmod; | ||
| 48 | static struct omap_hwmod omap2420_dss_venc_hwmod; | ||
| 41 | static struct omap_hwmod omap2420_wd_timer2_hwmod; | 49 | static struct omap_hwmod omap2420_wd_timer2_hwmod; |
| 42 | static struct omap_hwmod omap2420_gpio1_hwmod; | 50 | static struct omap_hwmod omap2420_gpio1_hwmod; |
| 43 | static struct omap_hwmod omap2420_gpio2_hwmod; | 51 | static struct omap_hwmod omap2420_gpio2_hwmod; |
| 44 | static struct omap_hwmod omap2420_gpio3_hwmod; | 52 | static struct omap_hwmod omap2420_gpio3_hwmod; |
| 45 | static struct omap_hwmod omap2420_gpio4_hwmod; | 53 | static struct omap_hwmod omap2420_gpio4_hwmod; |
| 46 | static struct omap_hwmod omap2420_dma_system_hwmod; | 54 | static struct omap_hwmod omap2420_dma_system_hwmod; |
| 55 | static struct omap_hwmod omap2420_mcspi1_hwmod; | ||
| 56 | static struct omap_hwmod omap2420_mcspi2_hwmod; | ||
| 47 | 57 | ||
| 48 | /* L3 -> L4_CORE interface */ | 58 | /* L3 -> L4_CORE interface */ |
| 49 | static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = { | 59 | static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = { |
| @@ -64,6 +74,19 @@ static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = { | |||
| 64 | &omap2420_mpu__l3_main, | 74 | &omap2420_mpu__l3_main, |
| 65 | }; | 75 | }; |
| 66 | 76 | ||
| 77 | /* DSS -> l3 */ | ||
| 78 | static struct omap_hwmod_ocp_if omap2420_dss__l3 = { | ||
| 79 | .master = &omap2420_dss_core_hwmod, | ||
| 80 | .slave = &omap2420_l3_main_hwmod, | ||
| 81 | .fw = { | ||
| 82 | .omap2 = { | ||
| 83 | .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS, | ||
| 84 | .flags = OMAP_FIREWALL_L3, | ||
| 85 | } | ||
| 86 | }, | ||
| 87 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 88 | }; | ||
| 89 | |||
| 67 | /* Master interfaces on the L3 interconnect */ | 90 | /* Master interfaces on the L3 interconnect */ |
| 68 | static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = { | 91 | static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = { |
| 69 | &omap2420_l3_main__l4_core, | 92 | &omap2420_l3_main__l4_core, |
| @@ -87,6 +110,44 @@ static struct omap_hwmod omap2420_uart2_hwmod; | |||
| 87 | static struct omap_hwmod omap2420_uart3_hwmod; | 110 | static struct omap_hwmod omap2420_uart3_hwmod; |
| 88 | static struct omap_hwmod omap2420_i2c1_hwmod; | 111 | static struct omap_hwmod omap2420_i2c1_hwmod; |
| 89 | static struct omap_hwmod omap2420_i2c2_hwmod; | 112 | static struct omap_hwmod omap2420_i2c2_hwmod; |
| 113 | static struct omap_hwmod omap2420_mcbsp1_hwmod; | ||
| 114 | static struct omap_hwmod omap2420_mcbsp2_hwmod; | ||
| 115 | |||
| 116 | /* l4 core -> mcspi1 interface */ | ||
| 117 | static struct omap_hwmod_addr_space omap2420_mcspi1_addr_space[] = { | ||
| 118 | { | ||
| 119 | .pa_start = 0x48098000, | ||
| 120 | .pa_end = 0x480980ff, | ||
| 121 | .flags = ADDR_TYPE_RT, | ||
| 122 | }, | ||
| 123 | }; | ||
| 124 | |||
| 125 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = { | ||
| 126 | .master = &omap2420_l4_core_hwmod, | ||
| 127 | .slave = &omap2420_mcspi1_hwmod, | ||
| 128 | .clk = "mcspi1_ick", | ||
| 129 | .addr = omap2420_mcspi1_addr_space, | ||
| 130 | .addr_cnt = ARRAY_SIZE(omap2420_mcspi1_addr_space), | ||
| 131 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 132 | }; | ||
| 133 | |||
| 134 | /* l4 core -> mcspi2 interface */ | ||
| 135 | static struct omap_hwmod_addr_space omap2420_mcspi2_addr_space[] = { | ||
| 136 | { | ||
| 137 | .pa_start = 0x4809a000, | ||
| 138 | .pa_end = 0x4809a0ff, | ||
| 139 | .flags = ADDR_TYPE_RT, | ||
| 140 | }, | ||
| 141 | }; | ||
| 142 | |||
| 143 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = { | ||
| 144 | .master = &omap2420_l4_core_hwmod, | ||
| 145 | .slave = &omap2420_mcspi2_hwmod, | ||
| 146 | .clk = "mcspi2_ick", | ||
| 147 | .addr = omap2420_mcspi2_addr_space, | ||
| 148 | .addr_cnt = ARRAY_SIZE(omap2420_mcspi2_addr_space), | ||
| 149 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 150 | }; | ||
| 90 | 151 | ||
| 91 | /* L4_CORE -> L4_WKUP interface */ | 152 | /* L4_CORE -> L4_WKUP interface */ |
| 92 | static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = { | 153 | static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = { |
| @@ -279,6 +340,625 @@ static struct omap_hwmod omap2420_iva_hwmod = { | |||
| 279 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 340 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
| 280 | }; | 341 | }; |
| 281 | 342 | ||
| 343 | /* Timer Common */ | ||
| 344 | static struct omap_hwmod_class_sysconfig omap2420_timer_sysc = { | ||
| 345 | .rev_offs = 0x0000, | ||
| 346 | .sysc_offs = 0x0010, | ||
| 347 | .syss_offs = 0x0014, | ||
| 348 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | ||
| 349 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
| 350 | SYSC_HAS_AUTOIDLE), | ||
| 351 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 352 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 353 | }; | ||
| 354 | |||
| 355 | static struct omap_hwmod_class omap2420_timer_hwmod_class = { | ||
| 356 | .name = "timer", | ||
| 357 | .sysc = &omap2420_timer_sysc, | ||
| 358 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
| 359 | }; | ||
| 360 | |||
| 361 | /* timer1 */ | ||
| 362 | static struct omap_hwmod omap2420_timer1_hwmod; | ||
| 363 | static struct omap_hwmod_irq_info omap2420_timer1_mpu_irqs[] = { | ||
| 364 | { .irq = 37, }, | ||
| 365 | }; | ||
| 366 | |||
| 367 | static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = { | ||
| 368 | { | ||
| 369 | .pa_start = 0x48028000, | ||
| 370 | .pa_end = 0x48028000 + SZ_1K - 1, | ||
| 371 | .flags = ADDR_TYPE_RT | ||
| 372 | }, | ||
| 373 | }; | ||
| 374 | |||
| 375 | /* l4_wkup -> timer1 */ | ||
| 376 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = { | ||
| 377 | .master = &omap2420_l4_wkup_hwmod, | ||
| 378 | .slave = &omap2420_timer1_hwmod, | ||
| 379 | .clk = "gpt1_ick", | ||
| 380 | .addr = omap2420_timer1_addrs, | ||
| 381 | .addr_cnt = ARRAY_SIZE(omap2420_timer1_addrs), | ||
| 382 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 383 | }; | ||
| 384 | |||
| 385 | /* timer1 slave port */ | ||
| 386 | static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = { | ||
| 387 | &omap2420_l4_wkup__timer1, | ||
| 388 | }; | ||
| 389 | |||
| 390 | /* timer1 hwmod */ | ||
| 391 | static struct omap_hwmod omap2420_timer1_hwmod = { | ||
| 392 | .name = "timer1", | ||
| 393 | .mpu_irqs = omap2420_timer1_mpu_irqs, | ||
| 394 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer1_mpu_irqs), | ||
| 395 | .main_clk = "gpt1_fck", | ||
| 396 | .prcm = { | ||
| 397 | .omap2 = { | ||
| 398 | .prcm_reg_id = 1, | ||
| 399 | .module_bit = OMAP24XX_EN_GPT1_SHIFT, | ||
| 400 | .module_offs = WKUP_MOD, | ||
| 401 | .idlest_reg_id = 1, | ||
| 402 | .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT, | ||
| 403 | }, | ||
| 404 | }, | ||
| 405 | .slaves = omap2420_timer1_slaves, | ||
| 406 | .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves), | ||
| 407 | .class = &omap2420_timer_hwmod_class, | ||
| 408 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
| 409 | }; | ||
| 410 | |||
| 411 | /* timer2 */ | ||
| 412 | static struct omap_hwmod omap2420_timer2_hwmod; | ||
| 413 | static struct omap_hwmod_irq_info omap2420_timer2_mpu_irqs[] = { | ||
| 414 | { .irq = 38, }, | ||
| 415 | }; | ||
| 416 | |||
| 417 | static struct omap_hwmod_addr_space omap2420_timer2_addrs[] = { | ||
| 418 | { | ||
| 419 | .pa_start = 0x4802a000, | ||
| 420 | .pa_end = 0x4802a000 + SZ_1K - 1, | ||
| 421 | .flags = ADDR_TYPE_RT | ||
| 422 | }, | ||
| 423 | }; | ||
| 424 | |||
| 425 | /* l4_core -> timer2 */ | ||
| 426 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = { | ||
| 427 | .master = &omap2420_l4_core_hwmod, | ||
| 428 | .slave = &omap2420_timer2_hwmod, | ||
| 429 | .clk = "gpt2_ick", | ||
| 430 | .addr = omap2420_timer2_addrs, | ||
| 431 | .addr_cnt = ARRAY_SIZE(omap2420_timer2_addrs), | ||
| 432 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 433 | }; | ||
| 434 | |||
| 435 | /* timer2 slave port */ | ||
| 436 | static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = { | ||
| 437 | &omap2420_l4_core__timer2, | ||
| 438 | }; | ||
| 439 | |||
| 440 | /* timer2 hwmod */ | ||
| 441 | static struct omap_hwmod omap2420_timer2_hwmod = { | ||
| 442 | .name = "timer2", | ||
| 443 | .mpu_irqs = omap2420_timer2_mpu_irqs, | ||
| 444 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer2_mpu_irqs), | ||
| 445 | .main_clk = "gpt2_fck", | ||
| 446 | .prcm = { | ||
| 447 | .omap2 = { | ||
| 448 | .prcm_reg_id = 1, | ||
| 449 | .module_bit = OMAP24XX_EN_GPT2_SHIFT, | ||
| 450 | .module_offs = CORE_MOD, | ||
| 451 | .idlest_reg_id = 1, | ||
| 452 | .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT, | ||
| 453 | }, | ||
| 454 | }, | ||
| 455 | .slaves = omap2420_timer2_slaves, | ||
| 456 | .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves), | ||
| 457 | .class = &omap2420_timer_hwmod_class, | ||
| 458 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
| 459 | }; | ||
| 460 | |||
| 461 | /* timer3 */ | ||
| 462 | static struct omap_hwmod omap2420_timer3_hwmod; | ||
| 463 | static struct omap_hwmod_irq_info omap2420_timer3_mpu_irqs[] = { | ||
| 464 | { .irq = 39, }, | ||
| 465 | }; | ||
| 466 | |||
| 467 | static struct omap_hwmod_addr_space omap2420_timer3_addrs[] = { | ||
| 468 | { | ||
| 469 | .pa_start = 0x48078000, | ||
| 470 | .pa_end = 0x48078000 + SZ_1K - 1, | ||
| 471 | .flags = ADDR_TYPE_RT | ||
| 472 | }, | ||
| 473 | }; | ||
| 474 | |||
| 475 | /* l4_core -> timer3 */ | ||
| 476 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = { | ||
| 477 | .master = &omap2420_l4_core_hwmod, | ||
| 478 | .slave = &omap2420_timer3_hwmod, | ||
| 479 | .clk = "gpt3_ick", | ||
| 480 | .addr = omap2420_timer3_addrs, | ||
| 481 | .addr_cnt = ARRAY_SIZE(omap2420_timer3_addrs), | ||
| 482 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 483 | }; | ||
| 484 | |||
| 485 | /* timer3 slave port */ | ||
| 486 | static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = { | ||
| 487 | &omap2420_l4_core__timer3, | ||
| 488 | }; | ||
| 489 | |||
| 490 | /* timer3 hwmod */ | ||
| 491 | static struct omap_hwmod omap2420_timer3_hwmod = { | ||
| 492 | .name = "timer3", | ||
| 493 | .mpu_irqs = omap2420_timer3_mpu_irqs, | ||
| 494 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer3_mpu_irqs), | ||
| 495 | .main_clk = "gpt3_fck", | ||
| 496 | .prcm = { | ||
| 497 | .omap2 = { | ||
| 498 | .prcm_reg_id = 1, | ||
| 499 | .module_bit = OMAP24XX_EN_GPT3_SHIFT, | ||
| 500 | .module_offs = CORE_MOD, | ||
| 501 | .idlest_reg_id = 1, | ||
| 502 | .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT, | ||
| 503 | }, | ||
| 504 | }, | ||
| 505 | .slaves = omap2420_timer3_slaves, | ||
| 506 | .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves), | ||
| 507 | .class = &omap2420_timer_hwmod_class, | ||
| 508 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
| 509 | }; | ||
| 510 | |||
| 511 | /* timer4 */ | ||
| 512 | static struct omap_hwmod omap2420_timer4_hwmod; | ||
| 513 | static struct omap_hwmod_irq_info omap2420_timer4_mpu_irqs[] = { | ||
| 514 | { .irq = 40, }, | ||
| 515 | }; | ||
| 516 | |||
| 517 | static struct omap_hwmod_addr_space omap2420_timer4_addrs[] = { | ||
| 518 | { | ||
| 519 | .pa_start = 0x4807a000, | ||
| 520 | .pa_end = 0x4807a000 + SZ_1K - 1, | ||
| 521 | .flags = ADDR_TYPE_RT | ||
| 522 | }, | ||
| 523 | }; | ||
| 524 | |||
| 525 | /* l4_core -> timer4 */ | ||
| 526 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = { | ||
| 527 | .master = &omap2420_l4_core_hwmod, | ||
| 528 | .slave = &omap2420_timer4_hwmod, | ||
| 529 | .clk = "gpt4_ick", | ||
| 530 | .addr = omap2420_timer4_addrs, | ||
| 531 | .addr_cnt = ARRAY_SIZE(omap2420_timer4_addrs), | ||
| 532 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 533 | }; | ||
| 534 | |||
| 535 | /* timer4 slave port */ | ||
| 536 | static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = { | ||
| 537 | &omap2420_l4_core__timer4, | ||
| 538 | }; | ||
| 539 | |||
| 540 | /* timer4 hwmod */ | ||
| 541 | static struct omap_hwmod omap2420_timer4_hwmod = { | ||
| 542 | .name = "timer4", | ||
| 543 | .mpu_irqs = omap2420_timer4_mpu_irqs, | ||
| 544 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer4_mpu_irqs), | ||
| 545 | .main_clk = "gpt4_fck", | ||
| 546 | .prcm = { | ||
| 547 | .omap2 = { | ||
| 548 | .prcm_reg_id = 1, | ||
| 549 | .module_bit = OMAP24XX_EN_GPT4_SHIFT, | ||
| 550 | .module_offs = CORE_MOD, | ||
| 551 | .idlest_reg_id = 1, | ||
| 552 | .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT, | ||
| 553 | }, | ||
| 554 | }, | ||
| 555 | .slaves = omap2420_timer4_slaves, | ||
| 556 | .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves), | ||
| 557 | .class = &omap2420_timer_hwmod_class, | ||
| 558 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
| 559 | }; | ||
| 560 | |||
| 561 | /* timer5 */ | ||
| 562 | static struct omap_hwmod omap2420_timer5_hwmod; | ||
| 563 | static struct omap_hwmod_irq_info omap2420_timer5_mpu_irqs[] = { | ||
| 564 | { .irq = 41, }, | ||
| 565 | }; | ||
| 566 | |||
| 567 | static struct omap_hwmod_addr_space omap2420_timer5_addrs[] = { | ||
| 568 | { | ||
| 569 | .pa_start = 0x4807c000, | ||
| 570 | .pa_end = 0x4807c000 + SZ_1K - 1, | ||
| 571 | .flags = ADDR_TYPE_RT | ||
| 572 | }, | ||
| 573 | }; | ||
| 574 | |||
| 575 | /* l4_core -> timer5 */ | ||
| 576 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = { | ||
| 577 | .master = &omap2420_l4_core_hwmod, | ||
| 578 | .slave = &omap2420_timer5_hwmod, | ||
| 579 | .clk = "gpt5_ick", | ||
| 580 | .addr = omap2420_timer5_addrs, | ||
| 581 | .addr_cnt = ARRAY_SIZE(omap2420_timer5_addrs), | ||
| 582 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 583 | }; | ||
| 584 | |||
| 585 | /* timer5 slave port */ | ||
| 586 | static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = { | ||
| 587 | &omap2420_l4_core__timer5, | ||
| 588 | }; | ||
| 589 | |||
| 590 | /* timer5 hwmod */ | ||
| 591 | static struct omap_hwmod omap2420_timer5_hwmod = { | ||
| 592 | .name = "timer5", | ||
| 593 | .mpu_irqs = omap2420_timer5_mpu_irqs, | ||
| 594 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer5_mpu_irqs), | ||
| 595 | .main_clk = "gpt5_fck", | ||
| 596 | .prcm = { | ||
| 597 | .omap2 = { | ||
| 598 | .prcm_reg_id = 1, | ||
| 599 | .module_bit = OMAP24XX_EN_GPT5_SHIFT, | ||
| 600 | .module_offs = CORE_MOD, | ||
| 601 | .idlest_reg_id = 1, | ||
| 602 | .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, | ||
| 603 | }, | ||
| 604 | }, | ||
| 605 | .slaves = omap2420_timer5_slaves, | ||
| 606 | .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves), | ||
| 607 | .class = &omap2420_timer_hwmod_class, | ||
| 608 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
| 609 | }; | ||
| 610 | |||
| 611 | |||
| 612 | /* timer6 */ | ||
| 613 | static struct omap_hwmod omap2420_timer6_hwmod; | ||
| 614 | static struct omap_hwmod_irq_info omap2420_timer6_mpu_irqs[] = { | ||
| 615 | { .irq = 42, }, | ||
| 616 | }; | ||
| 617 | |||
| 618 | static struct omap_hwmod_addr_space omap2420_timer6_addrs[] = { | ||
| 619 | { | ||
| 620 | .pa_start = 0x4807e000, | ||
| 621 | .pa_end = 0x4807e000 + SZ_1K - 1, | ||
| 622 | .flags = ADDR_TYPE_RT | ||
| 623 | }, | ||
| 624 | }; | ||
| 625 | |||
| 626 | /* l4_core -> timer6 */ | ||
| 627 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = { | ||
| 628 | .master = &omap2420_l4_core_hwmod, | ||
| 629 | .slave = &omap2420_timer6_hwmod, | ||
| 630 | .clk = "gpt6_ick", | ||
| 631 | .addr = omap2420_timer6_addrs, | ||
| 632 | .addr_cnt = ARRAY_SIZE(omap2420_timer6_addrs), | ||
| 633 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 634 | }; | ||
| 635 | |||
| 636 | /* timer6 slave port */ | ||
| 637 | static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = { | ||
| 638 | &omap2420_l4_core__timer6, | ||
| 639 | }; | ||
| 640 | |||
| 641 | /* timer6 hwmod */ | ||
| 642 | static struct omap_hwmod omap2420_timer6_hwmod = { | ||
| 643 | .name = "timer6", | ||
| 644 | .mpu_irqs = omap2420_timer6_mpu_irqs, | ||
| 645 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer6_mpu_irqs), | ||
| 646 | .main_clk = "gpt6_fck", | ||
| 647 | .prcm = { | ||
| 648 | .omap2 = { | ||
| 649 | .prcm_reg_id = 1, | ||
| 650 | .module_bit = OMAP24XX_EN_GPT6_SHIFT, | ||
| 651 | .module_offs = CORE_MOD, | ||
| 652 | .idlest_reg_id = 1, | ||
| 653 | .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT, | ||
| 654 | }, | ||
| 655 | }, | ||
| 656 | .slaves = omap2420_timer6_slaves, | ||
| 657 | .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves), | ||
| 658 | .class = &omap2420_timer_hwmod_class, | ||
| 659 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
| 660 | }; | ||
| 661 | |||
| 662 | /* timer7 */ | ||
| 663 | static struct omap_hwmod omap2420_timer7_hwmod; | ||
| 664 | static struct omap_hwmod_irq_info omap2420_timer7_mpu_irqs[] = { | ||
| 665 | { .irq = 43, }, | ||
| 666 | }; | ||
| 667 | |||
| 668 | static struct omap_hwmod_addr_space omap2420_timer7_addrs[] = { | ||
| 669 | { | ||
| 670 | .pa_start = 0x48080000, | ||
| 671 | .pa_end = 0x48080000 + SZ_1K - 1, | ||
| 672 | .flags = ADDR_TYPE_RT | ||
| 673 | }, | ||
| 674 | }; | ||
| 675 | |||
| 676 | /* l4_core -> timer7 */ | ||
| 677 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = { | ||
| 678 | .master = &omap2420_l4_core_hwmod, | ||
| 679 | .slave = &omap2420_timer7_hwmod, | ||
| 680 | .clk = "gpt7_ick", | ||
| 681 | .addr = omap2420_timer7_addrs, | ||
| 682 | .addr_cnt = ARRAY_SIZE(omap2420_timer7_addrs), | ||
| 683 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 684 | }; | ||
| 685 | |||
| 686 | /* timer7 slave port */ | ||
| 687 | static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = { | ||
| 688 | &omap2420_l4_core__timer7, | ||
| 689 | }; | ||
| 690 | |||
| 691 | /* timer7 hwmod */ | ||
| 692 | static struct omap_hwmod omap2420_timer7_hwmod = { | ||
| 693 | .name = "timer7", | ||
| 694 | .mpu_irqs = omap2420_timer7_mpu_irqs, | ||
| 695 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer7_mpu_irqs), | ||
| 696 | .main_clk = "gpt7_fck", | ||
| 697 | .prcm = { | ||
| 698 | .omap2 = { | ||
| 699 | .prcm_reg_id = 1, | ||
| 700 | .module_bit = OMAP24XX_EN_GPT7_SHIFT, | ||
| 701 | .module_offs = CORE_MOD, | ||
| 702 | .idlest_reg_id = 1, | ||
| 703 | .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, | ||
| 704 | }, | ||
| 705 | }, | ||
| 706 | .slaves = omap2420_timer7_slaves, | ||
| 707 | .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves), | ||
| 708 | .class = &omap2420_timer_hwmod_class, | ||
| 709 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
| 710 | }; | ||
| 711 | |||
| 712 | /* timer8 */ | ||
| 713 | static struct omap_hwmod omap2420_timer8_hwmod; | ||
| 714 | static struct omap_hwmod_irq_info omap2420_timer8_mpu_irqs[] = { | ||
| 715 | { .irq = 44, }, | ||
| 716 | }; | ||
| 717 | |||
| 718 | static struct omap_hwmod_addr_space omap2420_timer8_addrs[] = { | ||
| 719 | { | ||
| 720 | .pa_start = 0x48082000, | ||
| 721 | .pa_end = 0x48082000 + SZ_1K - 1, | ||
| 722 | .flags = ADDR_TYPE_RT | ||
| 723 | }, | ||
| 724 | }; | ||
| 725 | |||
| 726 | /* l4_core -> timer8 */ | ||
| 727 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = { | ||
| 728 | .master = &omap2420_l4_core_hwmod, | ||
| 729 | .slave = &omap2420_timer8_hwmod, | ||
| 730 | .clk = "gpt8_ick", | ||
| 731 | .addr = omap2420_timer8_addrs, | ||
| 732 | .addr_cnt = ARRAY_SIZE(omap2420_timer8_addrs), | ||
| 733 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 734 | }; | ||
| 735 | |||
| 736 | /* timer8 slave port */ | ||
| 737 | static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = { | ||
| 738 | &omap2420_l4_core__timer8, | ||
| 739 | }; | ||
| 740 | |||
| 741 | /* timer8 hwmod */ | ||
| 742 | static struct omap_hwmod omap2420_timer8_hwmod = { | ||
| 743 | .name = "timer8", | ||
| 744 | .mpu_irqs = omap2420_timer8_mpu_irqs, | ||
| 745 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer8_mpu_irqs), | ||
| 746 | .main_clk = "gpt8_fck", | ||
| 747 | .prcm = { | ||
| 748 | .omap2 = { | ||
| 749 | .prcm_reg_id = 1, | ||
| 750 | .module_bit = OMAP24XX_EN_GPT8_SHIFT, | ||
| 751 | .module_offs = CORE_MOD, | ||
| 752 | .idlest_reg_id = 1, | ||
| 753 | .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, | ||
| 754 | }, | ||
| 755 | }, | ||
| 756 | .slaves = omap2420_timer8_slaves, | ||
| 757 | .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves), | ||
| 758 | .class = &omap2420_timer_hwmod_class, | ||
| 759 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
| 760 | }; | ||
| 761 | |||
| 762 | /* timer9 */ | ||
| 763 | static struct omap_hwmod omap2420_timer9_hwmod; | ||
| 764 | static struct omap_hwmod_irq_info omap2420_timer9_mpu_irqs[] = { | ||
| 765 | { .irq = 45, }, | ||
| 766 | }; | ||
| 767 | |||
| 768 | static struct omap_hwmod_addr_space omap2420_timer9_addrs[] = { | ||
| 769 | { | ||
| 770 | .pa_start = 0x48084000, | ||
| 771 | .pa_end = 0x48084000 + SZ_1K - 1, | ||
| 772 | .flags = ADDR_TYPE_RT | ||
| 773 | }, | ||
| 774 | }; | ||
| 775 | |||
| 776 | /* l4_core -> timer9 */ | ||
| 777 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = { | ||
| 778 | .master = &omap2420_l4_core_hwmod, | ||
| 779 | .slave = &omap2420_timer9_hwmod, | ||
| 780 | .clk = "gpt9_ick", | ||
| 781 | .addr = omap2420_timer9_addrs, | ||
| 782 | .addr_cnt = ARRAY_SIZE(omap2420_timer9_addrs), | ||
| 783 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 784 | }; | ||
| 785 | |||
| 786 | /* timer9 slave port */ | ||
| 787 | static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = { | ||
| 788 | &omap2420_l4_core__timer9, | ||
| 789 | }; | ||
| 790 | |||
| 791 | /* timer9 hwmod */ | ||
| 792 | static struct omap_hwmod omap2420_timer9_hwmod = { | ||
| 793 | .name = "timer9", | ||
| 794 | .mpu_irqs = omap2420_timer9_mpu_irqs, | ||
| 795 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer9_mpu_irqs), | ||
| 796 | .main_clk = "gpt9_fck", | ||
| 797 | .prcm = { | ||
| 798 | .omap2 = { | ||
| 799 | .prcm_reg_id = 1, | ||
| 800 | .module_bit = OMAP24XX_EN_GPT9_SHIFT, | ||
| 801 | .module_offs = CORE_MOD, | ||
| 802 | .idlest_reg_id = 1, | ||
| 803 | .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT, | ||
| 804 | }, | ||
| 805 | }, | ||
| 806 | .slaves = omap2420_timer9_slaves, | ||
| 807 | .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves), | ||
| 808 | .class = &omap2420_timer_hwmod_class, | ||
| 809 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
| 810 | }; | ||
| 811 | |||
| 812 | /* timer10 */ | ||
| 813 | static struct omap_hwmod omap2420_timer10_hwmod; | ||
| 814 | static struct omap_hwmod_irq_info omap2420_timer10_mpu_irqs[] = { | ||
| 815 | { .irq = 46, }, | ||
| 816 | }; | ||
| 817 | |||
| 818 | static struct omap_hwmod_addr_space omap2420_timer10_addrs[] = { | ||
| 819 | { | ||
| 820 | .pa_start = 0x48086000, | ||
| 821 | .pa_end = 0x48086000 + SZ_1K - 1, | ||
| 822 | .flags = ADDR_TYPE_RT | ||
| 823 | }, | ||
| 824 | }; | ||
| 825 | |||
| 826 | /* l4_core -> timer10 */ | ||
| 827 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = { | ||
| 828 | .master = &omap2420_l4_core_hwmod, | ||
| 829 | .slave = &omap2420_timer10_hwmod, | ||
| 830 | .clk = "gpt10_ick", | ||
| 831 | .addr = omap2420_timer10_addrs, | ||
| 832 | .addr_cnt = ARRAY_SIZE(omap2420_timer10_addrs), | ||
| 833 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 834 | }; | ||
| 835 | |||
| 836 | /* timer10 slave port */ | ||
| 837 | static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = { | ||
| 838 | &omap2420_l4_core__timer10, | ||
| 839 | }; | ||
| 840 | |||
| 841 | /* timer10 hwmod */ | ||
| 842 | static struct omap_hwmod omap2420_timer10_hwmod = { | ||
| 843 | .name = "timer10", | ||
| 844 | .mpu_irqs = omap2420_timer10_mpu_irqs, | ||
| 845 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer10_mpu_irqs), | ||
| 846 | .main_clk = "gpt10_fck", | ||
| 847 | .prcm = { | ||
| 848 | .omap2 = { | ||
| 849 | .prcm_reg_id = 1, | ||
| 850 | .module_bit = OMAP24XX_EN_GPT10_SHIFT, | ||
| 851 | .module_offs = CORE_MOD, | ||
| 852 | .idlest_reg_id = 1, | ||
| 853 | .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT, | ||
| 854 | }, | ||
| 855 | }, | ||
| 856 | .slaves = omap2420_timer10_slaves, | ||
| 857 | .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves), | ||
| 858 | .class = &omap2420_timer_hwmod_class, | ||
| 859 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
| 860 | }; | ||
| 861 | |||
| 862 | /* timer11 */ | ||
| 863 | static struct omap_hwmod omap2420_timer11_hwmod; | ||
| 864 | static struct omap_hwmod_irq_info omap2420_timer11_mpu_irqs[] = { | ||
| 865 | { .irq = 47, }, | ||
| 866 | }; | ||
| 867 | |||
| 868 | static struct omap_hwmod_addr_space omap2420_timer11_addrs[] = { | ||
| 869 | { | ||
| 870 | .pa_start = 0x48088000, | ||
| 871 | .pa_end = 0x48088000 + SZ_1K - 1, | ||
| 872 | .flags = ADDR_TYPE_RT | ||
| 873 | }, | ||
| 874 | }; | ||
| 875 | |||
| 876 | /* l4_core -> timer11 */ | ||
| 877 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = { | ||
| 878 | .master = &omap2420_l4_core_hwmod, | ||
| 879 | .slave = &omap2420_timer11_hwmod, | ||
| 880 | .clk = "gpt11_ick", | ||
| 881 | .addr = omap2420_timer11_addrs, | ||
| 882 | .addr_cnt = ARRAY_SIZE(omap2420_timer11_addrs), | ||
| 883 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 884 | }; | ||
| 885 | |||
| 886 | /* timer11 slave port */ | ||
| 887 | static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = { | ||
| 888 | &omap2420_l4_core__timer11, | ||
| 889 | }; | ||
| 890 | |||
| 891 | /* timer11 hwmod */ | ||
| 892 | static struct omap_hwmod omap2420_timer11_hwmod = { | ||
| 893 | .name = "timer11", | ||
| 894 | .mpu_irqs = omap2420_timer11_mpu_irqs, | ||
| 895 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer11_mpu_irqs), | ||
| 896 | .main_clk = "gpt11_fck", | ||
| 897 | .prcm = { | ||
| 898 | .omap2 = { | ||
| 899 | .prcm_reg_id = 1, | ||
| 900 | .module_bit = OMAP24XX_EN_GPT11_SHIFT, | ||
| 901 | .module_offs = CORE_MOD, | ||
| 902 | .idlest_reg_id = 1, | ||
| 903 | .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT, | ||
| 904 | }, | ||
| 905 | }, | ||
| 906 | .slaves = omap2420_timer11_slaves, | ||
| 907 | .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves), | ||
| 908 | .class = &omap2420_timer_hwmod_class, | ||
| 909 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
| 910 | }; | ||
| 911 | |||
| 912 | /* timer12 */ | ||
| 913 | static struct omap_hwmod omap2420_timer12_hwmod; | ||
| 914 | static struct omap_hwmod_irq_info omap2420_timer12_mpu_irqs[] = { | ||
| 915 | { .irq = 48, }, | ||
| 916 | }; | ||
| 917 | |||
| 918 | static struct omap_hwmod_addr_space omap2420_timer12_addrs[] = { | ||
| 919 | { | ||
| 920 | .pa_start = 0x4808a000, | ||
| 921 | .pa_end = 0x4808a000 + SZ_1K - 1, | ||
| 922 | .flags = ADDR_TYPE_RT | ||
| 923 | }, | ||
| 924 | }; | ||
| 925 | |||
| 926 | /* l4_core -> timer12 */ | ||
| 927 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = { | ||
| 928 | .master = &omap2420_l4_core_hwmod, | ||
| 929 | .slave = &omap2420_timer12_hwmod, | ||
| 930 | .clk = "gpt12_ick", | ||
| 931 | .addr = omap2420_timer12_addrs, | ||
| 932 | .addr_cnt = ARRAY_SIZE(omap2420_timer12_addrs), | ||
| 933 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 934 | }; | ||
| 935 | |||
| 936 | /* timer12 slave port */ | ||
| 937 | static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = { | ||
| 938 | &omap2420_l4_core__timer12, | ||
| 939 | }; | ||
| 940 | |||
| 941 | /* timer12 hwmod */ | ||
| 942 | static struct omap_hwmod omap2420_timer12_hwmod = { | ||
| 943 | .name = "timer12", | ||
| 944 | .mpu_irqs = omap2420_timer12_mpu_irqs, | ||
| 945 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer12_mpu_irqs), | ||
| 946 | .main_clk = "gpt12_fck", | ||
| 947 | .prcm = { | ||
| 948 | .omap2 = { | ||
| 949 | .prcm_reg_id = 1, | ||
| 950 | .module_bit = OMAP24XX_EN_GPT12_SHIFT, | ||
| 951 | .module_offs = CORE_MOD, | ||
| 952 | .idlest_reg_id = 1, | ||
| 953 | .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT, | ||
| 954 | }, | ||
| 955 | }, | ||
| 956 | .slaves = omap2420_timer12_slaves, | ||
| 957 | .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves), | ||
| 958 | .class = &omap2420_timer_hwmod_class, | ||
| 959 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
| 960 | }; | ||
| 961 | |||
| 282 | /* l4_wkup -> wd_timer2 */ | 962 | /* l4_wkup -> wd_timer2 */ |
| 283 | static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = { | 963 | static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = { |
| 284 | { | 964 | { |
| @@ -470,6 +1150,292 @@ static struct omap_hwmod omap2420_uart3_hwmod = { | |||
| 470 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 1150 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
| 471 | }; | 1151 | }; |
| 472 | 1152 | ||
| 1153 | /* | ||
| 1154 | * 'dss' class | ||
| 1155 | * display sub-system | ||
| 1156 | */ | ||
| 1157 | |||
| 1158 | static struct omap_hwmod_class_sysconfig omap2420_dss_sysc = { | ||
| 1159 | .rev_offs = 0x0000, | ||
| 1160 | .sysc_offs = 0x0010, | ||
| 1161 | .syss_offs = 0x0014, | ||
| 1162 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
| 1163 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1164 | }; | ||
| 1165 | |||
| 1166 | static struct omap_hwmod_class omap2420_dss_hwmod_class = { | ||
| 1167 | .name = "dss", | ||
| 1168 | .sysc = &omap2420_dss_sysc, | ||
| 1169 | }; | ||
| 1170 | |||
| 1171 | /* dss */ | ||
| 1172 | static struct omap_hwmod_irq_info omap2420_dss_irqs[] = { | ||
| 1173 | { .irq = 25 }, | ||
| 1174 | }; | ||
| 1175 | |||
| 1176 | static struct omap_hwmod_dma_info omap2420_dss_sdma_chs[] = { | ||
| 1177 | { .name = "dispc", .dma_req = 5 }, | ||
| 1178 | }; | ||
| 1179 | |||
| 1180 | /* dss */ | ||
| 1181 | /* dss master ports */ | ||
| 1182 | static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = { | ||
| 1183 | &omap2420_dss__l3, | ||
| 1184 | }; | ||
| 1185 | |||
| 1186 | static struct omap_hwmod_addr_space omap2420_dss_addrs[] = { | ||
| 1187 | { | ||
| 1188 | .pa_start = 0x48050000, | ||
| 1189 | .pa_end = 0x480503FF, | ||
| 1190 | .flags = ADDR_TYPE_RT | ||
| 1191 | }, | ||
| 1192 | }; | ||
| 1193 | |||
| 1194 | /* l4_core -> dss */ | ||
| 1195 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss = { | ||
| 1196 | .master = &omap2420_l4_core_hwmod, | ||
| 1197 | .slave = &omap2420_dss_core_hwmod, | ||
| 1198 | .clk = "dss_ick", | ||
| 1199 | .addr = omap2420_dss_addrs, | ||
| 1200 | .addr_cnt = ARRAY_SIZE(omap2420_dss_addrs), | ||
| 1201 | .fw = { | ||
| 1202 | .omap2 = { | ||
| 1203 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, | ||
| 1204 | .flags = OMAP_FIREWALL_L4, | ||
| 1205 | } | ||
| 1206 | }, | ||
| 1207 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1208 | }; | ||
| 1209 | |||
| 1210 | /* dss slave ports */ | ||
| 1211 | static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = { | ||
| 1212 | &omap2420_l4_core__dss, | ||
| 1213 | }; | ||
| 1214 | |||
| 1215 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | ||
| 1216 | { .role = "tv_clk", .clk = "dss_54m_fck" }, | ||
| 1217 | { .role = "sys_clk", .clk = "dss2_fck" }, | ||
| 1218 | }; | ||
| 1219 | |||
| 1220 | static struct omap_hwmod omap2420_dss_core_hwmod = { | ||
| 1221 | .name = "dss_core", | ||
| 1222 | .class = &omap2420_dss_hwmod_class, | ||
| 1223 | .main_clk = "dss1_fck", /* instead of dss_fck */ | ||
| 1224 | .mpu_irqs = omap2420_dss_irqs, | ||
| 1225 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_dss_irqs), | ||
| 1226 | .sdma_reqs = omap2420_dss_sdma_chs, | ||
| 1227 | .sdma_reqs_cnt = ARRAY_SIZE(omap2420_dss_sdma_chs), | ||
| 1228 | .prcm = { | ||
| 1229 | .omap2 = { | ||
| 1230 | .prcm_reg_id = 1, | ||
| 1231 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
| 1232 | .module_offs = CORE_MOD, | ||
| 1233 | .idlest_reg_id = 1, | ||
| 1234 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
| 1235 | }, | ||
| 1236 | }, | ||
| 1237 | .opt_clks = dss_opt_clks, | ||
| 1238 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | ||
| 1239 | .slaves = omap2420_dss_slaves, | ||
| 1240 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves), | ||
| 1241 | .masters = omap2420_dss_masters, | ||
| 1242 | .masters_cnt = ARRAY_SIZE(omap2420_dss_masters), | ||
| 1243 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
| 1244 | .flags = HWMOD_NO_IDLEST, | ||
| 1245 | }; | ||
| 1246 | |||
| 1247 | /* | ||
| 1248 | * 'dispc' class | ||
| 1249 | * display controller | ||
| 1250 | */ | ||
| 1251 | |||
| 1252 | static struct omap_hwmod_class_sysconfig omap2420_dispc_sysc = { | ||
| 1253 | .rev_offs = 0x0000, | ||
| 1254 | .sysc_offs = 0x0010, | ||
| 1255 | .syss_offs = 0x0014, | ||
| 1256 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | | ||
| 1257 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
| 1258 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 1259 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
| 1260 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1261 | }; | ||
| 1262 | |||
| 1263 | static struct omap_hwmod_class omap2420_dispc_hwmod_class = { | ||
| 1264 | .name = "dispc", | ||
| 1265 | .sysc = &omap2420_dispc_sysc, | ||
| 1266 | }; | ||
| 1267 | |||
| 1268 | static struct omap_hwmod_addr_space omap2420_dss_dispc_addrs[] = { | ||
| 1269 | { | ||
| 1270 | .pa_start = 0x48050400, | ||
| 1271 | .pa_end = 0x480507FF, | ||
| 1272 | .flags = ADDR_TYPE_RT | ||
| 1273 | }, | ||
| 1274 | }; | ||
| 1275 | |||
| 1276 | /* l4_core -> dss_dispc */ | ||
| 1277 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = { | ||
| 1278 | .master = &omap2420_l4_core_hwmod, | ||
| 1279 | .slave = &omap2420_dss_dispc_hwmod, | ||
| 1280 | .clk = "dss_ick", | ||
| 1281 | .addr = omap2420_dss_dispc_addrs, | ||
| 1282 | .addr_cnt = ARRAY_SIZE(omap2420_dss_dispc_addrs), | ||
| 1283 | .fw = { | ||
| 1284 | .omap2 = { | ||
| 1285 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION, | ||
| 1286 | .flags = OMAP_FIREWALL_L4, | ||
| 1287 | } | ||
| 1288 | }, | ||
| 1289 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1290 | }; | ||
| 1291 | |||
| 1292 | /* dss_dispc slave ports */ | ||
| 1293 | static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = { | ||
| 1294 | &omap2420_l4_core__dss_dispc, | ||
| 1295 | }; | ||
| 1296 | |||
| 1297 | static struct omap_hwmod omap2420_dss_dispc_hwmod = { | ||
| 1298 | .name = "dss_dispc", | ||
| 1299 | .class = &omap2420_dispc_hwmod_class, | ||
| 1300 | .main_clk = "dss1_fck", | ||
| 1301 | .prcm = { | ||
| 1302 | .omap2 = { | ||
| 1303 | .prcm_reg_id = 1, | ||
| 1304 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
| 1305 | .module_offs = CORE_MOD, | ||
| 1306 | .idlest_reg_id = 1, | ||
| 1307 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
| 1308 | }, | ||
| 1309 | }, | ||
| 1310 | .slaves = omap2420_dss_dispc_slaves, | ||
| 1311 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves), | ||
| 1312 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
| 1313 | .flags = HWMOD_NO_IDLEST, | ||
| 1314 | }; | ||
| 1315 | |||
| 1316 | /* | ||
| 1317 | * 'rfbi' class | ||
| 1318 | * remote frame buffer interface | ||
| 1319 | */ | ||
| 1320 | |||
| 1321 | static struct omap_hwmod_class_sysconfig omap2420_rfbi_sysc = { | ||
| 1322 | .rev_offs = 0x0000, | ||
| 1323 | .sysc_offs = 0x0010, | ||
| 1324 | .syss_offs = 0x0014, | ||
| 1325 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
| 1326 | SYSC_HAS_AUTOIDLE), | ||
| 1327 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 1328 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1329 | }; | ||
| 1330 | |||
| 1331 | static struct omap_hwmod_class omap2420_rfbi_hwmod_class = { | ||
| 1332 | .name = "rfbi", | ||
| 1333 | .sysc = &omap2420_rfbi_sysc, | ||
| 1334 | }; | ||
| 1335 | |||
| 1336 | static struct omap_hwmod_addr_space omap2420_dss_rfbi_addrs[] = { | ||
| 1337 | { | ||
| 1338 | .pa_start = 0x48050800, | ||
| 1339 | .pa_end = 0x48050BFF, | ||
| 1340 | .flags = ADDR_TYPE_RT | ||
| 1341 | }, | ||
| 1342 | }; | ||
| 1343 | |||
| 1344 | /* l4_core -> dss_rfbi */ | ||
| 1345 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = { | ||
| 1346 | .master = &omap2420_l4_core_hwmod, | ||
| 1347 | .slave = &omap2420_dss_rfbi_hwmod, | ||
| 1348 | .clk = "dss_ick", | ||
| 1349 | .addr = omap2420_dss_rfbi_addrs, | ||
| 1350 | .addr_cnt = ARRAY_SIZE(omap2420_dss_rfbi_addrs), | ||
| 1351 | .fw = { | ||
| 1352 | .omap2 = { | ||
| 1353 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, | ||
| 1354 | .flags = OMAP_FIREWALL_L4, | ||
| 1355 | } | ||
| 1356 | }, | ||
| 1357 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1358 | }; | ||
| 1359 | |||
| 1360 | /* dss_rfbi slave ports */ | ||
| 1361 | static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = { | ||
| 1362 | &omap2420_l4_core__dss_rfbi, | ||
| 1363 | }; | ||
| 1364 | |||
| 1365 | static struct omap_hwmod omap2420_dss_rfbi_hwmod = { | ||
| 1366 | .name = "dss_rfbi", | ||
| 1367 | .class = &omap2420_rfbi_hwmod_class, | ||
| 1368 | .main_clk = "dss1_fck", | ||
| 1369 | .prcm = { | ||
| 1370 | .omap2 = { | ||
| 1371 | .prcm_reg_id = 1, | ||
| 1372 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
| 1373 | .module_offs = CORE_MOD, | ||
| 1374 | }, | ||
| 1375 | }, | ||
| 1376 | .slaves = omap2420_dss_rfbi_slaves, | ||
| 1377 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves), | ||
| 1378 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
| 1379 | .flags = HWMOD_NO_IDLEST, | ||
| 1380 | }; | ||
| 1381 | |||
| 1382 | /* | ||
| 1383 | * 'venc' class | ||
| 1384 | * video encoder | ||
| 1385 | */ | ||
| 1386 | |||
| 1387 | static struct omap_hwmod_class omap2420_venc_hwmod_class = { | ||
| 1388 | .name = "venc", | ||
| 1389 | }; | ||
| 1390 | |||
| 1391 | /* dss_venc */ | ||
| 1392 | static struct omap_hwmod_addr_space omap2420_dss_venc_addrs[] = { | ||
| 1393 | { | ||
| 1394 | .pa_start = 0x48050C00, | ||
| 1395 | .pa_end = 0x48050FFF, | ||
| 1396 | .flags = ADDR_TYPE_RT | ||
| 1397 | }, | ||
| 1398 | }; | ||
| 1399 | |||
| 1400 | /* l4_core -> dss_venc */ | ||
| 1401 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = { | ||
| 1402 | .master = &omap2420_l4_core_hwmod, | ||
| 1403 | .slave = &omap2420_dss_venc_hwmod, | ||
| 1404 | .clk = "dss_54m_fck", | ||
| 1405 | .addr = omap2420_dss_venc_addrs, | ||
| 1406 | .addr_cnt = ARRAY_SIZE(omap2420_dss_venc_addrs), | ||
| 1407 | .fw = { | ||
| 1408 | .omap2 = { | ||
| 1409 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION, | ||
| 1410 | .flags = OMAP_FIREWALL_L4, | ||
| 1411 | } | ||
| 1412 | }, | ||
| 1413 | .flags = OCPIF_SWSUP_IDLE, | ||
| 1414 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1415 | }; | ||
| 1416 | |||
| 1417 | /* dss_venc slave ports */ | ||
| 1418 | static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = { | ||
| 1419 | &omap2420_l4_core__dss_venc, | ||
| 1420 | }; | ||
| 1421 | |||
| 1422 | static struct omap_hwmod omap2420_dss_venc_hwmod = { | ||
| 1423 | .name = "dss_venc", | ||
| 1424 | .class = &omap2420_venc_hwmod_class, | ||
| 1425 | .main_clk = "dss1_fck", | ||
| 1426 | .prcm = { | ||
| 1427 | .omap2 = { | ||
| 1428 | .prcm_reg_id = 1, | ||
| 1429 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
| 1430 | .module_offs = CORE_MOD, | ||
| 1431 | }, | ||
| 1432 | }, | ||
| 1433 | .slaves = omap2420_dss_venc_slaves, | ||
| 1434 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_venc_slaves), | ||
| 1435 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
| 1436 | .flags = HWMOD_NO_IDLEST, | ||
| 1437 | }; | ||
| 1438 | |||
| 473 | /* I2C common */ | 1439 | /* I2C common */ |
| 474 | static struct omap_hwmod_class_sysconfig i2c_sysc = { | 1440 | static struct omap_hwmod_class_sysconfig i2c_sysc = { |
| 475 | .rev_offs = 0x00, | 1441 | .rev_offs = 0x00, |
| @@ -865,16 +1831,342 @@ static struct omap_hwmod omap2420_dma_system_hwmod = { | |||
| 865 | .flags = HWMOD_NO_IDLEST, | 1831 | .flags = HWMOD_NO_IDLEST, |
| 866 | }; | 1832 | }; |
| 867 | 1833 | ||
| 1834 | /* | ||
| 1835 | * 'mailbox' class | ||
| 1836 | * mailbox module allowing communication between the on-chip processors | ||
| 1837 | * using a queued mailbox-interrupt mechanism. | ||
| 1838 | */ | ||
| 1839 | |||
| 1840 | static struct omap_hwmod_class_sysconfig omap2420_mailbox_sysc = { | ||
| 1841 | .rev_offs = 0x000, | ||
| 1842 | .sysc_offs = 0x010, | ||
| 1843 | .syss_offs = 0x014, | ||
| 1844 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
| 1845 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
| 1846 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 1847 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1848 | }; | ||
| 1849 | |||
| 1850 | static struct omap_hwmod_class omap2420_mailbox_hwmod_class = { | ||
| 1851 | .name = "mailbox", | ||
| 1852 | .sysc = &omap2420_mailbox_sysc, | ||
| 1853 | }; | ||
| 1854 | |||
| 1855 | /* mailbox */ | ||
| 1856 | static struct omap_hwmod omap2420_mailbox_hwmod; | ||
| 1857 | static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = { | ||
| 1858 | { .name = "dsp", .irq = 26 }, | ||
| 1859 | { .name = "iva", .irq = 34 }, | ||
| 1860 | }; | ||
| 1861 | |||
| 1862 | static struct omap_hwmod_addr_space omap2420_mailbox_addrs[] = { | ||
| 1863 | { | ||
| 1864 | .pa_start = 0x48094000, | ||
| 1865 | .pa_end = 0x480941ff, | ||
| 1866 | .flags = ADDR_TYPE_RT, | ||
| 1867 | }, | ||
| 1868 | }; | ||
| 1869 | |||
| 1870 | /* l4_core -> mailbox */ | ||
| 1871 | static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = { | ||
| 1872 | .master = &omap2420_l4_core_hwmod, | ||
| 1873 | .slave = &omap2420_mailbox_hwmod, | ||
| 1874 | .addr = omap2420_mailbox_addrs, | ||
| 1875 | .addr_cnt = ARRAY_SIZE(omap2420_mailbox_addrs), | ||
| 1876 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1877 | }; | ||
| 1878 | |||
| 1879 | /* mailbox slave ports */ | ||
| 1880 | static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = { | ||
| 1881 | &omap2420_l4_core__mailbox, | ||
| 1882 | }; | ||
| 1883 | |||
| 1884 | static struct omap_hwmod omap2420_mailbox_hwmod = { | ||
| 1885 | .name = "mailbox", | ||
| 1886 | .class = &omap2420_mailbox_hwmod_class, | ||
| 1887 | .mpu_irqs = omap2420_mailbox_irqs, | ||
| 1888 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mailbox_irqs), | ||
| 1889 | .main_clk = "mailboxes_ick", | ||
| 1890 | .prcm = { | ||
| 1891 | .omap2 = { | ||
| 1892 | .prcm_reg_id = 1, | ||
| 1893 | .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT, | ||
| 1894 | .module_offs = CORE_MOD, | ||
| 1895 | .idlest_reg_id = 1, | ||
| 1896 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, | ||
| 1897 | }, | ||
| 1898 | }, | ||
| 1899 | .slaves = omap2420_mailbox_slaves, | ||
| 1900 | .slaves_cnt = ARRAY_SIZE(omap2420_mailbox_slaves), | ||
| 1901 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
| 1902 | }; | ||
| 1903 | |||
| 1904 | /* | ||
| 1905 | * 'mcspi' class | ||
| 1906 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | ||
| 1907 | * bus | ||
| 1908 | */ | ||
| 1909 | |||
| 1910 | static struct omap_hwmod_class_sysconfig omap2420_mcspi_sysc = { | ||
| 1911 | .rev_offs = 0x0000, | ||
| 1912 | .sysc_offs = 0x0010, | ||
| 1913 | .syss_offs = 0x0014, | ||
| 1914 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
| 1915 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
| 1916 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
| 1917 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 1918 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1919 | }; | ||
| 1920 | |||
| 1921 | static struct omap_hwmod_class omap2420_mcspi_class = { | ||
| 1922 | .name = "mcspi", | ||
| 1923 | .sysc = &omap2420_mcspi_sysc, | ||
| 1924 | .rev = OMAP2_MCSPI_REV, | ||
| 1925 | }; | ||
| 1926 | |||
| 1927 | /* mcspi1 */ | ||
| 1928 | static struct omap_hwmod_irq_info omap2420_mcspi1_mpu_irqs[] = { | ||
| 1929 | { .irq = 65 }, | ||
| 1930 | }; | ||
| 1931 | |||
| 1932 | static struct omap_hwmod_dma_info omap2420_mcspi1_sdma_reqs[] = { | ||
| 1933 | { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */ | ||
| 1934 | { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */ | ||
| 1935 | { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */ | ||
| 1936 | { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */ | ||
| 1937 | { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */ | ||
| 1938 | { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */ | ||
| 1939 | { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */ | ||
| 1940 | { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */ | ||
| 1941 | }; | ||
| 1942 | |||
| 1943 | static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = { | ||
| 1944 | &omap2420_l4_core__mcspi1, | ||
| 1945 | }; | ||
| 1946 | |||
| 1947 | static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { | ||
| 1948 | .num_chipselect = 4, | ||
| 1949 | }; | ||
| 1950 | |||
| 1951 | static struct omap_hwmod omap2420_mcspi1_hwmod = { | ||
| 1952 | .name = "mcspi1_hwmod", | ||
| 1953 | .mpu_irqs = omap2420_mcspi1_mpu_irqs, | ||
| 1954 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcspi1_mpu_irqs), | ||
| 1955 | .sdma_reqs = omap2420_mcspi1_sdma_reqs, | ||
| 1956 | .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcspi1_sdma_reqs), | ||
| 1957 | .main_clk = "mcspi1_fck", | ||
| 1958 | .prcm = { | ||
| 1959 | .omap2 = { | ||
| 1960 | .module_offs = CORE_MOD, | ||
| 1961 | .prcm_reg_id = 1, | ||
| 1962 | .module_bit = OMAP24XX_EN_MCSPI1_SHIFT, | ||
| 1963 | .idlest_reg_id = 1, | ||
| 1964 | .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT, | ||
| 1965 | }, | ||
| 1966 | }, | ||
| 1967 | .slaves = omap2420_mcspi1_slaves, | ||
| 1968 | .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves), | ||
| 1969 | .class = &omap2420_mcspi_class, | ||
| 1970 | .dev_attr = &omap_mcspi1_dev_attr, | ||
| 1971 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
| 1972 | }; | ||
| 1973 | |||
| 1974 | /* mcspi2 */ | ||
| 1975 | static struct omap_hwmod_irq_info omap2420_mcspi2_mpu_irqs[] = { | ||
| 1976 | { .irq = 66 }, | ||
| 1977 | }; | ||
| 1978 | |||
| 1979 | static struct omap_hwmod_dma_info omap2420_mcspi2_sdma_reqs[] = { | ||
| 1980 | { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */ | ||
| 1981 | { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */ | ||
| 1982 | { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */ | ||
| 1983 | { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */ | ||
| 1984 | }; | ||
| 1985 | |||
| 1986 | static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = { | ||
| 1987 | &omap2420_l4_core__mcspi2, | ||
| 1988 | }; | ||
| 1989 | |||
| 1990 | static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { | ||
| 1991 | .num_chipselect = 2, | ||
| 1992 | }; | ||
| 1993 | |||
| 1994 | static struct omap_hwmod omap2420_mcspi2_hwmod = { | ||
| 1995 | .name = "mcspi2_hwmod", | ||
| 1996 | .mpu_irqs = omap2420_mcspi2_mpu_irqs, | ||
| 1997 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcspi2_mpu_irqs), | ||
| 1998 | .sdma_reqs = omap2420_mcspi2_sdma_reqs, | ||
| 1999 | .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcspi2_sdma_reqs), | ||
| 2000 | .main_clk = "mcspi2_fck", | ||
| 2001 | .prcm = { | ||
| 2002 | .omap2 = { | ||
| 2003 | .module_offs = CORE_MOD, | ||
| 2004 | .prcm_reg_id = 1, | ||
| 2005 | .module_bit = OMAP24XX_EN_MCSPI2_SHIFT, | ||
| 2006 | .idlest_reg_id = 1, | ||
| 2007 | .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT, | ||
| 2008 | }, | ||
| 2009 | }, | ||
| 2010 | .slaves = omap2420_mcspi2_slaves, | ||
| 2011 | .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves), | ||
| 2012 | .class = &omap2420_mcspi_class, | ||
| 2013 | .dev_attr = &omap_mcspi2_dev_attr, | ||
| 2014 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
| 2015 | }; | ||
| 2016 | |||
| 2017 | /* | ||
| 2018 | * 'mcbsp' class | ||
| 2019 | * multi channel buffered serial port controller | ||
| 2020 | */ | ||
| 2021 | |||
| 2022 | static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = { | ||
| 2023 | .name = "mcbsp", | ||
| 2024 | }; | ||
| 2025 | |||
| 2026 | /* mcbsp1 */ | ||
| 2027 | static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = { | ||
| 2028 | { .name = "tx", .irq = 59 }, | ||
| 2029 | { .name = "rx", .irq = 60 }, | ||
| 2030 | }; | ||
| 2031 | |||
| 2032 | static struct omap_hwmod_dma_info omap2420_mcbsp1_sdma_chs[] = { | ||
| 2033 | { .name = "rx", .dma_req = 32 }, | ||
| 2034 | { .name = "tx", .dma_req = 31 }, | ||
| 2035 | }; | ||
| 2036 | |||
| 2037 | static struct omap_hwmod_addr_space omap2420_mcbsp1_addrs[] = { | ||
| 2038 | { | ||
| 2039 | .name = "mpu", | ||
| 2040 | .pa_start = 0x48074000, | ||
| 2041 | .pa_end = 0x480740ff, | ||
| 2042 | .flags = ADDR_TYPE_RT | ||
| 2043 | }, | ||
| 2044 | }; | ||
| 2045 | |||
| 2046 | /* l4_core -> mcbsp1 */ | ||
| 2047 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = { | ||
| 2048 | .master = &omap2420_l4_core_hwmod, | ||
| 2049 | .slave = &omap2420_mcbsp1_hwmod, | ||
| 2050 | .clk = "mcbsp1_ick", | ||
| 2051 | .addr = omap2420_mcbsp1_addrs, | ||
| 2052 | .addr_cnt = ARRAY_SIZE(omap2420_mcbsp1_addrs), | ||
| 2053 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2054 | }; | ||
| 2055 | |||
| 2056 | /* mcbsp1 slave ports */ | ||
| 2057 | static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = { | ||
| 2058 | &omap2420_l4_core__mcbsp1, | ||
| 2059 | }; | ||
| 2060 | |||
| 2061 | static struct omap_hwmod omap2420_mcbsp1_hwmod = { | ||
| 2062 | .name = "mcbsp1", | ||
| 2063 | .class = &omap2420_mcbsp_hwmod_class, | ||
| 2064 | .mpu_irqs = omap2420_mcbsp1_irqs, | ||
| 2065 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcbsp1_irqs), | ||
| 2066 | .sdma_reqs = omap2420_mcbsp1_sdma_chs, | ||
| 2067 | .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcbsp1_sdma_chs), | ||
| 2068 | .main_clk = "mcbsp1_fck", | ||
| 2069 | .prcm = { | ||
| 2070 | .omap2 = { | ||
| 2071 | .prcm_reg_id = 1, | ||
| 2072 | .module_bit = OMAP24XX_EN_MCBSP1_SHIFT, | ||
| 2073 | .module_offs = CORE_MOD, | ||
| 2074 | .idlest_reg_id = 1, | ||
| 2075 | .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT, | ||
| 2076 | }, | ||
| 2077 | }, | ||
| 2078 | .slaves = omap2420_mcbsp1_slaves, | ||
| 2079 | .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp1_slaves), | ||
| 2080 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
| 2081 | }; | ||
| 2082 | |||
| 2083 | /* mcbsp2 */ | ||
| 2084 | static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = { | ||
| 2085 | { .name = "tx", .irq = 62 }, | ||
| 2086 | { .name = "rx", .irq = 63 }, | ||
| 2087 | }; | ||
| 2088 | |||
| 2089 | static struct omap_hwmod_dma_info omap2420_mcbsp2_sdma_chs[] = { | ||
| 2090 | { .name = "rx", .dma_req = 34 }, | ||
| 2091 | { .name = "tx", .dma_req = 33 }, | ||
| 2092 | }; | ||
| 2093 | |||
| 2094 | static struct omap_hwmod_addr_space omap2420_mcbsp2_addrs[] = { | ||
| 2095 | { | ||
| 2096 | .name = "mpu", | ||
| 2097 | .pa_start = 0x48076000, | ||
| 2098 | .pa_end = 0x480760ff, | ||
| 2099 | .flags = ADDR_TYPE_RT | ||
| 2100 | }, | ||
| 2101 | }; | ||
| 2102 | |||
| 2103 | /* l4_core -> mcbsp2 */ | ||
| 2104 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = { | ||
| 2105 | .master = &omap2420_l4_core_hwmod, | ||
| 2106 | .slave = &omap2420_mcbsp2_hwmod, | ||
| 2107 | .clk = "mcbsp2_ick", | ||
| 2108 | .addr = omap2420_mcbsp2_addrs, | ||
| 2109 | .addr_cnt = ARRAY_SIZE(omap2420_mcbsp2_addrs), | ||
| 2110 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2111 | }; | ||
| 2112 | |||
| 2113 | /* mcbsp2 slave ports */ | ||
| 2114 | static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = { | ||
| 2115 | &omap2420_l4_core__mcbsp2, | ||
| 2116 | }; | ||
| 2117 | |||
| 2118 | static struct omap_hwmod omap2420_mcbsp2_hwmod = { | ||
| 2119 | .name = "mcbsp2", | ||
| 2120 | .class = &omap2420_mcbsp_hwmod_class, | ||
| 2121 | .mpu_irqs = omap2420_mcbsp2_irqs, | ||
| 2122 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcbsp2_irqs), | ||
| 2123 | .sdma_reqs = omap2420_mcbsp2_sdma_chs, | ||
| 2124 | .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcbsp2_sdma_chs), | ||
| 2125 | .main_clk = "mcbsp2_fck", | ||
| 2126 | .prcm = { | ||
| 2127 | .omap2 = { | ||
| 2128 | .prcm_reg_id = 1, | ||
| 2129 | .module_bit = OMAP24XX_EN_MCBSP2_SHIFT, | ||
| 2130 | .module_offs = CORE_MOD, | ||
| 2131 | .idlest_reg_id = 1, | ||
| 2132 | .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT, | ||
| 2133 | }, | ||
| 2134 | }, | ||
| 2135 | .slaves = omap2420_mcbsp2_slaves, | ||
| 2136 | .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp2_slaves), | ||
| 2137 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
| 2138 | }; | ||
| 2139 | |||
| 868 | static __initdata struct omap_hwmod *omap2420_hwmods[] = { | 2140 | static __initdata struct omap_hwmod *omap2420_hwmods[] = { |
| 869 | &omap2420_l3_main_hwmod, | 2141 | &omap2420_l3_main_hwmod, |
| 870 | &omap2420_l4_core_hwmod, | 2142 | &omap2420_l4_core_hwmod, |
| 871 | &omap2420_l4_wkup_hwmod, | 2143 | &omap2420_l4_wkup_hwmod, |
| 872 | &omap2420_mpu_hwmod, | 2144 | &omap2420_mpu_hwmod, |
| 873 | &omap2420_iva_hwmod, | 2145 | &omap2420_iva_hwmod, |
| 2146 | |||
| 2147 | &omap2420_timer1_hwmod, | ||
| 2148 | &omap2420_timer2_hwmod, | ||
| 2149 | &omap2420_timer3_hwmod, | ||
| 2150 | &omap2420_timer4_hwmod, | ||
| 2151 | &omap2420_timer5_hwmod, | ||
| 2152 | &omap2420_timer6_hwmod, | ||
| 2153 | &omap2420_timer7_hwmod, | ||
| 2154 | &omap2420_timer8_hwmod, | ||
| 2155 | &omap2420_timer9_hwmod, | ||
| 2156 | &omap2420_timer10_hwmod, | ||
| 2157 | &omap2420_timer11_hwmod, | ||
| 2158 | &omap2420_timer12_hwmod, | ||
| 2159 | |||
| 874 | &omap2420_wd_timer2_hwmod, | 2160 | &omap2420_wd_timer2_hwmod, |
| 875 | &omap2420_uart1_hwmod, | 2161 | &omap2420_uart1_hwmod, |
| 876 | &omap2420_uart2_hwmod, | 2162 | &omap2420_uart2_hwmod, |
| 877 | &omap2420_uart3_hwmod, | 2163 | &omap2420_uart3_hwmod, |
| 2164 | /* dss class */ | ||
| 2165 | &omap2420_dss_core_hwmod, | ||
| 2166 | &omap2420_dss_dispc_hwmod, | ||
| 2167 | &omap2420_dss_rfbi_hwmod, | ||
| 2168 | &omap2420_dss_venc_hwmod, | ||
| 2169 | /* i2c class */ | ||
| 878 | &omap2420_i2c1_hwmod, | 2170 | &omap2420_i2c1_hwmod, |
| 879 | &omap2420_i2c2_hwmod, | 2171 | &omap2420_i2c2_hwmod, |
| 880 | 2172 | ||
| @@ -886,10 +2178,21 @@ static __initdata struct omap_hwmod *omap2420_hwmods[] = { | |||
| 886 | 2178 | ||
| 887 | /* dma_system class*/ | 2179 | /* dma_system class*/ |
| 888 | &omap2420_dma_system_hwmod, | 2180 | &omap2420_dma_system_hwmod, |
| 2181 | |||
| 2182 | /* mailbox class */ | ||
| 2183 | &omap2420_mailbox_hwmod, | ||
| 2184 | |||
| 2185 | /* mcbsp class */ | ||
| 2186 | &omap2420_mcbsp1_hwmod, | ||
| 2187 | &omap2420_mcbsp2_hwmod, | ||
| 2188 | |||
| 2189 | /* mcspi class */ | ||
| 2190 | &omap2420_mcspi1_hwmod, | ||
| 2191 | &omap2420_mcspi2_hwmod, | ||
| 889 | NULL, | 2192 | NULL, |
| 890 | }; | 2193 | }; |
| 891 | 2194 | ||
| 892 | int __init omap2420_hwmod_init(void) | 2195 | int __init omap2420_hwmod_init(void) |
| 893 | { | 2196 | { |
| 894 | return omap_hwmod_init(omap2420_hwmods); | 2197 | return omap_hwmod_register(omap2420_hwmods); |
| 895 | } | 2198 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 115eed51b521..0fdf2cabfb12 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
| @@ -18,6 +18,11 @@ | |||
| 18 | #include <plat/serial.h> | 18 | #include <plat/serial.h> |
| 19 | #include <plat/i2c.h> | 19 | #include <plat/i2c.h> |
| 20 | #include <plat/gpio.h> | 20 | #include <plat/gpio.h> |
| 21 | #include <plat/mcbsp.h> | ||
| 22 | #include <plat/mcspi.h> | ||
| 23 | #include <plat/dmtimer.h> | ||
| 24 | #include <plat/mmc.h> | ||
| 25 | #include <plat/l3_2xxx.h> | ||
| 21 | 26 | ||
| 22 | #include "omap_hwmod_common_data.h" | 27 | #include "omap_hwmod_common_data.h" |
| 23 | 28 | ||
| @@ -38,6 +43,10 @@ static struct omap_hwmod omap2430_mpu_hwmod; | |||
| 38 | static struct omap_hwmod omap2430_iva_hwmod; | 43 | static struct omap_hwmod omap2430_iva_hwmod; |
| 39 | static struct omap_hwmod omap2430_l3_main_hwmod; | 44 | static struct omap_hwmod omap2430_l3_main_hwmod; |
| 40 | static struct omap_hwmod omap2430_l4_core_hwmod; | 45 | static struct omap_hwmod omap2430_l4_core_hwmod; |
| 46 | static struct omap_hwmod omap2430_dss_core_hwmod; | ||
| 47 | static struct omap_hwmod omap2430_dss_dispc_hwmod; | ||
| 48 | static struct omap_hwmod omap2430_dss_rfbi_hwmod; | ||
| 49 | static struct omap_hwmod omap2430_dss_venc_hwmod; | ||
| 41 | static struct omap_hwmod omap2430_wd_timer2_hwmod; | 50 | static struct omap_hwmod omap2430_wd_timer2_hwmod; |
| 42 | static struct omap_hwmod omap2430_gpio1_hwmod; | 51 | static struct omap_hwmod omap2430_gpio1_hwmod; |
| 43 | static struct omap_hwmod omap2430_gpio2_hwmod; | 52 | static struct omap_hwmod omap2430_gpio2_hwmod; |
| @@ -45,6 +54,16 @@ static struct omap_hwmod omap2430_gpio3_hwmod; | |||
| 45 | static struct omap_hwmod omap2430_gpio4_hwmod; | 54 | static struct omap_hwmod omap2430_gpio4_hwmod; |
| 46 | static struct omap_hwmod omap2430_gpio5_hwmod; | 55 | static struct omap_hwmod omap2430_gpio5_hwmod; |
| 47 | static struct omap_hwmod omap2430_dma_system_hwmod; | 56 | static struct omap_hwmod omap2430_dma_system_hwmod; |
| 57 | static struct omap_hwmod omap2430_mcbsp1_hwmod; | ||
| 58 | static struct omap_hwmod omap2430_mcbsp2_hwmod; | ||
| 59 | static struct omap_hwmod omap2430_mcbsp3_hwmod; | ||
| 60 | static struct omap_hwmod omap2430_mcbsp4_hwmod; | ||
| 61 | static struct omap_hwmod omap2430_mcbsp5_hwmod; | ||
| 62 | static struct omap_hwmod omap2430_mcspi1_hwmod; | ||
| 63 | static struct omap_hwmod omap2430_mcspi2_hwmod; | ||
| 64 | static struct omap_hwmod omap2430_mcspi3_hwmod; | ||
| 65 | static struct omap_hwmod omap2430_mmc1_hwmod; | ||
| 66 | static struct omap_hwmod omap2430_mmc2_hwmod; | ||
| 48 | 67 | ||
| 49 | /* L3 -> L4_CORE interface */ | 68 | /* L3 -> L4_CORE interface */ |
| 50 | static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = { | 69 | static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = { |
| @@ -65,6 +84,19 @@ static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = { | |||
| 65 | &omap2430_mpu__l3_main, | 84 | &omap2430_mpu__l3_main, |
| 66 | }; | 85 | }; |
| 67 | 86 | ||
| 87 | /* DSS -> l3 */ | ||
| 88 | static struct omap_hwmod_ocp_if omap2430_dss__l3 = { | ||
| 89 | .master = &omap2430_dss_core_hwmod, | ||
| 90 | .slave = &omap2430_l3_main_hwmod, | ||
| 91 | .fw = { | ||
| 92 | .omap2 = { | ||
| 93 | .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS, | ||
| 94 | .flags = OMAP_FIREWALL_L3, | ||
| 95 | } | ||
| 96 | }, | ||
| 97 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 98 | }; | ||
| 99 | |||
| 68 | /* Master interfaces on the L3 interconnect */ | 100 | /* Master interfaces on the L3 interconnect */ |
| 69 | static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = { | 101 | static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = { |
| 70 | &omap2430_l3_main__l4_core, | 102 | &omap2430_l3_main__l4_core, |
| @@ -89,6 +121,16 @@ static struct omap_hwmod omap2430_uart3_hwmod; | |||
| 89 | static struct omap_hwmod omap2430_i2c1_hwmod; | 121 | static struct omap_hwmod omap2430_i2c1_hwmod; |
| 90 | static struct omap_hwmod omap2430_i2c2_hwmod; | 122 | static struct omap_hwmod omap2430_i2c2_hwmod; |
| 91 | 123 | ||
| 124 | static struct omap_hwmod omap2430_usbhsotg_hwmod; | ||
| 125 | |||
| 126 | /* l3_core -> usbhsotg interface */ | ||
| 127 | static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = { | ||
| 128 | .master = &omap2430_usbhsotg_hwmod, | ||
| 129 | .slave = &omap2430_l3_main_hwmod, | ||
| 130 | .clk = "core_l3_ck", | ||
| 131 | .user = OCP_USER_MPU, | ||
| 132 | }; | ||
| 133 | |||
| 92 | /* I2C IP block address space length (in bytes) */ | 134 | /* I2C IP block address space length (in bytes) */ |
| 93 | #define OMAP2_I2C_AS_LEN 128 | 135 | #define OMAP2_I2C_AS_LEN 128 |
| 94 | 136 | ||
| @@ -189,6 +231,71 @@ static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { | |||
| 189 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 231 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 190 | }; | 232 | }; |
| 191 | 233 | ||
| 234 | /* | ||
| 235 | * usbhsotg interface data | ||
| 236 | */ | ||
| 237 | static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = { | ||
| 238 | { | ||
| 239 | .pa_start = OMAP243X_HS_BASE, | ||
| 240 | .pa_end = OMAP243X_HS_BASE + SZ_4K - 1, | ||
| 241 | .flags = ADDR_TYPE_RT | ||
| 242 | }, | ||
| 243 | }; | ||
| 244 | |||
| 245 | /* l4_core ->usbhsotg interface */ | ||
| 246 | static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = { | ||
| 247 | .master = &omap2430_l4_core_hwmod, | ||
| 248 | .slave = &omap2430_usbhsotg_hwmod, | ||
| 249 | .clk = "usb_l4_ick", | ||
| 250 | .addr = omap2430_usbhsotg_addrs, | ||
| 251 | .addr_cnt = ARRAY_SIZE(omap2430_usbhsotg_addrs), | ||
| 252 | .user = OCP_USER_MPU, | ||
| 253 | }; | ||
| 254 | |||
| 255 | static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = { | ||
| 256 | &omap2430_usbhsotg__l3, | ||
| 257 | }; | ||
| 258 | |||
| 259 | static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = { | ||
| 260 | &omap2430_l4_core__usbhsotg, | ||
| 261 | }; | ||
| 262 | |||
| 263 | /* L4 CORE -> MMC1 interface */ | ||
| 264 | static struct omap_hwmod_addr_space omap2430_mmc1_addr_space[] = { | ||
| 265 | { | ||
| 266 | .pa_start = 0x4809c000, | ||
| 267 | .pa_end = 0x4809c1ff, | ||
| 268 | .flags = ADDR_TYPE_RT, | ||
| 269 | }, | ||
| 270 | }; | ||
| 271 | |||
| 272 | static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = { | ||
| 273 | .master = &omap2430_l4_core_hwmod, | ||
| 274 | .slave = &omap2430_mmc1_hwmod, | ||
| 275 | .clk = "mmchs1_ick", | ||
| 276 | .addr = omap2430_mmc1_addr_space, | ||
| 277 | .addr_cnt = ARRAY_SIZE(omap2430_mmc1_addr_space), | ||
| 278 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 279 | }; | ||
| 280 | |||
| 281 | /* L4 CORE -> MMC2 interface */ | ||
| 282 | static struct omap_hwmod_addr_space omap2430_mmc2_addr_space[] = { | ||
| 283 | { | ||
| 284 | .pa_start = 0x480b4000, | ||
| 285 | .pa_end = 0x480b41ff, | ||
| 286 | .flags = ADDR_TYPE_RT, | ||
| 287 | }, | ||
| 288 | }; | ||
| 289 | |||
| 290 | static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = { | ||
| 291 | .master = &omap2430_l4_core_hwmod, | ||
| 292 | .slave = &omap2430_mmc2_hwmod, | ||
| 293 | .addr = omap2430_mmc2_addr_space, | ||
| 294 | .clk = "mmchs2_ick", | ||
| 295 | .addr_cnt = ARRAY_SIZE(omap2430_mmc2_addr_space), | ||
| 296 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 297 | }; | ||
| 298 | |||
| 192 | /* Slave interfaces on the L4_CORE interconnect */ | 299 | /* Slave interfaces on the L4_CORE interconnect */ |
| 193 | static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = { | 300 | static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = { |
| 194 | &omap2430_l3_main__l4_core, | 301 | &omap2430_l3_main__l4_core, |
| @@ -197,6 +304,8 @@ static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = { | |||
| 197 | /* Master interfaces on the L4_CORE interconnect */ | 304 | /* Master interfaces on the L4_CORE interconnect */ |
| 198 | static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = { | 305 | static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = { |
| 199 | &omap2430_l4_core__l4_wkup, | 306 | &omap2430_l4_core__l4_wkup, |
| 307 | &omap2430_l4_core__mmc1, | ||
| 308 | &omap2430_l4_core__mmc2, | ||
| 200 | }; | 309 | }; |
| 201 | 310 | ||
| 202 | /* L4 CORE */ | 311 | /* L4 CORE */ |
| @@ -223,6 +332,60 @@ static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = { | |||
| 223 | static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = { | 332 | static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = { |
| 224 | }; | 333 | }; |
| 225 | 334 | ||
| 335 | /* l4 core -> mcspi1 interface */ | ||
| 336 | static struct omap_hwmod_addr_space omap2430_mcspi1_addr_space[] = { | ||
| 337 | { | ||
| 338 | .pa_start = 0x48098000, | ||
| 339 | .pa_end = 0x480980ff, | ||
| 340 | .flags = ADDR_TYPE_RT, | ||
| 341 | }, | ||
| 342 | }; | ||
| 343 | |||
| 344 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = { | ||
| 345 | .master = &omap2430_l4_core_hwmod, | ||
| 346 | .slave = &omap2430_mcspi1_hwmod, | ||
| 347 | .clk = "mcspi1_ick", | ||
| 348 | .addr = omap2430_mcspi1_addr_space, | ||
| 349 | .addr_cnt = ARRAY_SIZE(omap2430_mcspi1_addr_space), | ||
| 350 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 351 | }; | ||
| 352 | |||
| 353 | /* l4 core -> mcspi2 interface */ | ||
| 354 | static struct omap_hwmod_addr_space omap2430_mcspi2_addr_space[] = { | ||
| 355 | { | ||
| 356 | .pa_start = 0x4809a000, | ||
| 357 | .pa_end = 0x4809a0ff, | ||
| 358 | .flags = ADDR_TYPE_RT, | ||
| 359 | }, | ||
| 360 | }; | ||
| 361 | |||
| 362 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = { | ||
| 363 | .master = &omap2430_l4_core_hwmod, | ||
| 364 | .slave = &omap2430_mcspi2_hwmod, | ||
| 365 | .clk = "mcspi2_ick", | ||
| 366 | .addr = omap2430_mcspi2_addr_space, | ||
| 367 | .addr_cnt = ARRAY_SIZE(omap2430_mcspi2_addr_space), | ||
| 368 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 369 | }; | ||
| 370 | |||
| 371 | /* l4 core -> mcspi3 interface */ | ||
| 372 | static struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[] = { | ||
| 373 | { | ||
| 374 | .pa_start = 0x480b8000, | ||
| 375 | .pa_end = 0x480b80ff, | ||
| 376 | .flags = ADDR_TYPE_RT, | ||
| 377 | }, | ||
| 378 | }; | ||
| 379 | |||
| 380 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = { | ||
| 381 | .master = &omap2430_l4_core_hwmod, | ||
| 382 | .slave = &omap2430_mcspi3_hwmod, | ||
| 383 | .clk = "mcspi3_ick", | ||
| 384 | .addr = omap2430_mcspi3_addr_space, | ||
| 385 | .addr_cnt = ARRAY_SIZE(omap2430_mcspi3_addr_space), | ||
| 386 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 387 | }; | ||
| 388 | |||
| 226 | /* L4 WKUP */ | 389 | /* L4 WKUP */ |
| 227 | static struct omap_hwmod omap2430_l4_wkup_hwmod = { | 390 | static struct omap_hwmod omap2430_l4_wkup_hwmod = { |
| 228 | .name = "l4_wkup", | 391 | .name = "l4_wkup", |
| @@ -278,6 +441,624 @@ static struct omap_hwmod omap2430_iva_hwmod = { | |||
| 278 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 441 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
| 279 | }; | 442 | }; |
| 280 | 443 | ||
| 444 | /* Timer Common */ | ||
| 445 | static struct omap_hwmod_class_sysconfig omap2430_timer_sysc = { | ||
| 446 | .rev_offs = 0x0000, | ||
| 447 | .sysc_offs = 0x0010, | ||
| 448 | .syss_offs = 0x0014, | ||
| 449 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | ||
| 450 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
| 451 | SYSC_HAS_AUTOIDLE), | ||
| 452 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 453 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 454 | }; | ||
| 455 | |||
| 456 | static struct omap_hwmod_class omap2430_timer_hwmod_class = { | ||
| 457 | .name = "timer", | ||
| 458 | .sysc = &omap2430_timer_sysc, | ||
| 459 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
| 460 | }; | ||
| 461 | |||
| 462 | /* timer1 */ | ||
| 463 | static struct omap_hwmod omap2430_timer1_hwmod; | ||
| 464 | static struct omap_hwmod_irq_info omap2430_timer1_mpu_irqs[] = { | ||
| 465 | { .irq = 37, }, | ||
| 466 | }; | ||
| 467 | |||
| 468 | static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = { | ||
| 469 | { | ||
| 470 | .pa_start = 0x49018000, | ||
| 471 | .pa_end = 0x49018000 + SZ_1K - 1, | ||
| 472 | .flags = ADDR_TYPE_RT | ||
| 473 | }, | ||
| 474 | }; | ||
| 475 | |||
| 476 | /* l4_wkup -> timer1 */ | ||
| 477 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = { | ||
| 478 | .master = &omap2430_l4_wkup_hwmod, | ||
| 479 | .slave = &omap2430_timer1_hwmod, | ||
| 480 | .clk = "gpt1_ick", | ||
| 481 | .addr = omap2430_timer1_addrs, | ||
| 482 | .addr_cnt = ARRAY_SIZE(omap2430_timer1_addrs), | ||
| 483 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 484 | }; | ||
| 485 | |||
| 486 | /* timer1 slave port */ | ||
| 487 | static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = { | ||
| 488 | &omap2430_l4_wkup__timer1, | ||
| 489 | }; | ||
| 490 | |||
| 491 | /* timer1 hwmod */ | ||
| 492 | static struct omap_hwmod omap2430_timer1_hwmod = { | ||
| 493 | .name = "timer1", | ||
| 494 | .mpu_irqs = omap2430_timer1_mpu_irqs, | ||
| 495 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer1_mpu_irqs), | ||
| 496 | .main_clk = "gpt1_fck", | ||
| 497 | .prcm = { | ||
| 498 | .omap2 = { | ||
| 499 | .prcm_reg_id = 1, | ||
| 500 | .module_bit = OMAP24XX_EN_GPT1_SHIFT, | ||
| 501 | .module_offs = WKUP_MOD, | ||
| 502 | .idlest_reg_id = 1, | ||
| 503 | .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT, | ||
| 504 | }, | ||
| 505 | }, | ||
| 506 | .slaves = omap2430_timer1_slaves, | ||
| 507 | .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves), | ||
| 508 | .class = &omap2430_timer_hwmod_class, | ||
| 509 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
| 510 | }; | ||
| 511 | |||
| 512 | /* timer2 */ | ||
| 513 | static struct omap_hwmod omap2430_timer2_hwmod; | ||
| 514 | static struct omap_hwmod_irq_info omap2430_timer2_mpu_irqs[] = { | ||
| 515 | { .irq = 38, }, | ||
| 516 | }; | ||
| 517 | |||
| 518 | static struct omap_hwmod_addr_space omap2430_timer2_addrs[] = { | ||
| 519 | { | ||
| 520 | .pa_start = 0x4802a000, | ||
| 521 | .pa_end = 0x4802a000 + SZ_1K - 1, | ||
| 522 | .flags = ADDR_TYPE_RT | ||
| 523 | }, | ||
| 524 | }; | ||
| 525 | |||
| 526 | /* l4_core -> timer2 */ | ||
| 527 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = { | ||
| 528 | .master = &omap2430_l4_core_hwmod, | ||
| 529 | .slave = &omap2430_timer2_hwmod, | ||
| 530 | .clk = "gpt2_ick", | ||
| 531 | .addr = omap2430_timer2_addrs, | ||
| 532 | .addr_cnt = ARRAY_SIZE(omap2430_timer2_addrs), | ||
| 533 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 534 | }; | ||
| 535 | |||
| 536 | /* timer2 slave port */ | ||
| 537 | static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = { | ||
| 538 | &omap2430_l4_core__timer2, | ||
| 539 | }; | ||
| 540 | |||
| 541 | /* timer2 hwmod */ | ||
| 542 | static struct omap_hwmod omap2430_timer2_hwmod = { | ||
| 543 | .name = "timer2", | ||
| 544 | .mpu_irqs = omap2430_timer2_mpu_irqs, | ||
| 545 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer2_mpu_irqs), | ||
| 546 | .main_clk = "gpt2_fck", | ||
| 547 | .prcm = { | ||
| 548 | .omap2 = { | ||
| 549 | .prcm_reg_id = 1, | ||
| 550 | .module_bit = OMAP24XX_EN_GPT2_SHIFT, | ||
| 551 | .module_offs = CORE_MOD, | ||
| 552 | .idlest_reg_id = 1, | ||
| 553 | .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT, | ||
| 554 | }, | ||
| 555 | }, | ||
| 556 | .slaves = omap2430_timer2_slaves, | ||
| 557 | .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves), | ||
| 558 | .class = &omap2430_timer_hwmod_class, | ||
| 559 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
| 560 | }; | ||
| 561 | |||
| 562 | /* timer3 */ | ||
| 563 | static struct omap_hwmod omap2430_timer3_hwmod; | ||
| 564 | static struct omap_hwmod_irq_info omap2430_timer3_mpu_irqs[] = { | ||
| 565 | { .irq = 39, }, | ||
| 566 | }; | ||
| 567 | |||
| 568 | static struct omap_hwmod_addr_space omap2430_timer3_addrs[] = { | ||
| 569 | { | ||
| 570 | .pa_start = 0x48078000, | ||
| 571 | .pa_end = 0x48078000 + SZ_1K - 1, | ||
| 572 | .flags = ADDR_TYPE_RT | ||
| 573 | }, | ||
| 574 | }; | ||
| 575 | |||
| 576 | /* l4_core -> timer3 */ | ||
| 577 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = { | ||
| 578 | .master = &omap2430_l4_core_hwmod, | ||
| 579 | .slave = &omap2430_timer3_hwmod, | ||
| 580 | .clk = "gpt3_ick", | ||
| 581 | .addr = omap2430_timer3_addrs, | ||
| 582 | .addr_cnt = ARRAY_SIZE(omap2430_timer3_addrs), | ||
| 583 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 584 | }; | ||
| 585 | |||
| 586 | /* timer3 slave port */ | ||
| 587 | static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = { | ||
| 588 | &omap2430_l4_core__timer3, | ||
| 589 | }; | ||
| 590 | |||
| 591 | /* timer3 hwmod */ | ||
| 592 | static struct omap_hwmod omap2430_timer3_hwmod = { | ||
| 593 | .name = "timer3", | ||
| 594 | .mpu_irqs = omap2430_timer3_mpu_irqs, | ||
| 595 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer3_mpu_irqs), | ||
| 596 | .main_clk = "gpt3_fck", | ||
| 597 | .prcm = { | ||
| 598 | .omap2 = { | ||
| 599 | .prcm_reg_id = 1, | ||
| 600 | .module_bit = OMAP24XX_EN_GPT3_SHIFT, | ||
| 601 | .module_offs = CORE_MOD, | ||
| 602 | .idlest_reg_id = 1, | ||
| 603 | .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT, | ||
| 604 | }, | ||
| 605 | }, | ||
| 606 | .slaves = omap2430_timer3_slaves, | ||
| 607 | .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves), | ||
| 608 | .class = &omap2430_timer_hwmod_class, | ||
| 609 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
| 610 | }; | ||
| 611 | |||
| 612 | /* timer4 */ | ||
| 613 | static struct omap_hwmod omap2430_timer4_hwmod; | ||
| 614 | static struct omap_hwmod_irq_info omap2430_timer4_mpu_irqs[] = { | ||
| 615 | { .irq = 40, }, | ||
| 616 | }; | ||
| 617 | |||
| 618 | static struct omap_hwmod_addr_space omap2430_timer4_addrs[] = { | ||
| 619 | { | ||
| 620 | .pa_start = 0x4807a000, | ||
| 621 | .pa_end = 0x4807a000 + SZ_1K - 1, | ||
| 622 | .flags = ADDR_TYPE_RT | ||
| 623 | }, | ||
| 624 | }; | ||
| 625 | |||
| 626 | /* l4_core -> timer4 */ | ||
| 627 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = { | ||
| 628 | .master = &omap2430_l4_core_hwmod, | ||
| 629 | .slave = &omap2430_timer4_hwmod, | ||
| 630 | .clk = "gpt4_ick", | ||
| 631 | .addr = omap2430_timer4_addrs, | ||
| 632 | .addr_cnt = ARRAY_SIZE(omap2430_timer4_addrs), | ||
| 633 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 634 | }; | ||
| 635 | |||
| 636 | /* timer4 slave port */ | ||
| 637 | static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = { | ||
| 638 | &omap2430_l4_core__timer4, | ||
| 639 | }; | ||
| 640 | |||
| 641 | /* timer4 hwmod */ | ||
| 642 | static struct omap_hwmod omap2430_timer4_hwmod = { | ||
| 643 | .name = "timer4", | ||
| 644 | .mpu_irqs = omap2430_timer4_mpu_irqs, | ||
| 645 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer4_mpu_irqs), | ||
| 646 | .main_clk = "gpt4_fck", | ||
| 647 | .prcm = { | ||
| 648 | .omap2 = { | ||
| 649 | .prcm_reg_id = 1, | ||
| 650 | .module_bit = OMAP24XX_EN_GPT4_SHIFT, | ||
| 651 | .module_offs = CORE_MOD, | ||
| 652 | .idlest_reg_id = 1, | ||
| 653 | .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT, | ||
| 654 | }, | ||
| 655 | }, | ||
| 656 | .slaves = omap2430_timer4_slaves, | ||
| 657 | .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves), | ||
| 658 | .class = &omap2430_timer_hwmod_class, | ||
| 659 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
| 660 | }; | ||
| 661 | |||
| 662 | /* timer5 */ | ||
| 663 | static struct omap_hwmod omap2430_timer5_hwmod; | ||
| 664 | static struct omap_hwmod_irq_info omap2430_timer5_mpu_irqs[] = { | ||
| 665 | { .irq = 41, }, | ||
| 666 | }; | ||
| 667 | |||
| 668 | static struct omap_hwmod_addr_space omap2430_timer5_addrs[] = { | ||
| 669 | { | ||
| 670 | .pa_start = 0x4807c000, | ||
| 671 | .pa_end = 0x4807c000 + SZ_1K - 1, | ||
| 672 | .flags = ADDR_TYPE_RT | ||
| 673 | }, | ||
| 674 | }; | ||
| 675 | |||
| 676 | /* l4_core -> timer5 */ | ||
| 677 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = { | ||
| 678 | .master = &omap2430_l4_core_hwmod, | ||
| 679 | .slave = &omap2430_timer5_hwmod, | ||
| 680 | .clk = "gpt5_ick", | ||
| 681 | .addr = omap2430_timer5_addrs, | ||
| 682 | .addr_cnt = ARRAY_SIZE(omap2430_timer5_addrs), | ||
| 683 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 684 | }; | ||
| 685 | |||
| 686 | /* timer5 slave port */ | ||
| 687 | static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = { | ||
| 688 | &omap2430_l4_core__timer5, | ||
| 689 | }; | ||
| 690 | |||
| 691 | /* timer5 hwmod */ | ||
| 692 | static struct omap_hwmod omap2430_timer5_hwmod = { | ||
| 693 | .name = "timer5", | ||
| 694 | .mpu_irqs = omap2430_timer5_mpu_irqs, | ||
| 695 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer5_mpu_irqs), | ||
| 696 | .main_clk = "gpt5_fck", | ||
| 697 | .prcm = { | ||
| 698 | .omap2 = { | ||
| 699 | .prcm_reg_id = 1, | ||
| 700 | .module_bit = OMAP24XX_EN_GPT5_SHIFT, | ||
| 701 | .module_offs = CORE_MOD, | ||
| 702 | .idlest_reg_id = 1, | ||
| 703 | .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, | ||
| 704 | }, | ||
| 705 | }, | ||
| 706 | .slaves = omap2430_timer5_slaves, | ||
| 707 | .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves), | ||
| 708 | .class = &omap2430_timer_hwmod_class, | ||
| 709 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
| 710 | }; | ||
| 711 | |||
| 712 | /* timer6 */ | ||
| 713 | static struct omap_hwmod omap2430_timer6_hwmod; | ||
| 714 | static struct omap_hwmod_irq_info omap2430_timer6_mpu_irqs[] = { | ||
| 715 | { .irq = 42, }, | ||
| 716 | }; | ||
| 717 | |||
| 718 | static struct omap_hwmod_addr_space omap2430_timer6_addrs[] = { | ||
| 719 | { | ||
| 720 | .pa_start = 0x4807e000, | ||
| 721 | .pa_end = 0x4807e000 + SZ_1K - 1, | ||
| 722 | .flags = ADDR_TYPE_RT | ||
| 723 | }, | ||
| 724 | }; | ||
| 725 | |||
| 726 | /* l4_core -> timer6 */ | ||
| 727 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = { | ||
| 728 | .master = &omap2430_l4_core_hwmod, | ||
| 729 | .slave = &omap2430_timer6_hwmod, | ||
| 730 | .clk = "gpt6_ick", | ||
| 731 | .addr = omap2430_timer6_addrs, | ||
| 732 | .addr_cnt = ARRAY_SIZE(omap2430_timer6_addrs), | ||
| 733 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 734 | }; | ||
| 735 | |||
| 736 | /* timer6 slave port */ | ||
| 737 | static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = { | ||
| 738 | &omap2430_l4_core__timer6, | ||
| 739 | }; | ||
| 740 | |||
| 741 | /* timer6 hwmod */ | ||
| 742 | static struct omap_hwmod omap2430_timer6_hwmod = { | ||
| 743 | .name = "timer6", | ||
| 744 | .mpu_irqs = omap2430_timer6_mpu_irqs, | ||
| 745 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer6_mpu_irqs), | ||
| 746 | .main_clk = "gpt6_fck", | ||
| 747 | .prcm = { | ||
| 748 | .omap2 = { | ||
| 749 | .prcm_reg_id = 1, | ||
| 750 | .module_bit = OMAP24XX_EN_GPT6_SHIFT, | ||
| 751 | .module_offs = CORE_MOD, | ||
| 752 | .idlest_reg_id = 1, | ||
| 753 | .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT, | ||
| 754 | }, | ||
| 755 | }, | ||
| 756 | .slaves = omap2430_timer6_slaves, | ||
| 757 | .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves), | ||
| 758 | .class = &omap2430_timer_hwmod_class, | ||
| 759 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
| 760 | }; | ||
| 761 | |||
| 762 | /* timer7 */ | ||
| 763 | static struct omap_hwmod omap2430_timer7_hwmod; | ||
| 764 | static struct omap_hwmod_irq_info omap2430_timer7_mpu_irqs[] = { | ||
| 765 | { .irq = 43, }, | ||
| 766 | }; | ||
| 767 | |||
| 768 | static struct omap_hwmod_addr_space omap2430_timer7_addrs[] = { | ||
| 769 | { | ||
| 770 | .pa_start = 0x48080000, | ||
| 771 | .pa_end = 0x48080000 + SZ_1K - 1, | ||
| 772 | .flags = ADDR_TYPE_RT | ||
| 773 | }, | ||
| 774 | }; | ||
| 775 | |||
| 776 | /* l4_core -> timer7 */ | ||
| 777 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = { | ||
| 778 | .master = &omap2430_l4_core_hwmod, | ||
| 779 | .slave = &omap2430_timer7_hwmod, | ||
| 780 | .clk = "gpt7_ick", | ||
| 781 | .addr = omap2430_timer7_addrs, | ||
| 782 | .addr_cnt = ARRAY_SIZE(omap2430_timer7_addrs), | ||
| 783 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 784 | }; | ||
| 785 | |||
| 786 | /* timer7 slave port */ | ||
| 787 | static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = { | ||
| 788 | &omap2430_l4_core__timer7, | ||
| 789 | }; | ||
| 790 | |||
| 791 | /* timer7 hwmod */ | ||
| 792 | static struct omap_hwmod omap2430_timer7_hwmod = { | ||
| 793 | .name = "timer7", | ||
| 794 | .mpu_irqs = omap2430_timer7_mpu_irqs, | ||
| 795 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer7_mpu_irqs), | ||
| 796 | .main_clk = "gpt7_fck", | ||
| 797 | .prcm = { | ||
| 798 | .omap2 = { | ||
| 799 | .prcm_reg_id = 1, | ||
| 800 | .module_bit = OMAP24XX_EN_GPT7_SHIFT, | ||
| 801 | .module_offs = CORE_MOD, | ||
| 802 | .idlest_reg_id = 1, | ||
| 803 | .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, | ||
| 804 | }, | ||
| 805 | }, | ||
| 806 | .slaves = omap2430_timer7_slaves, | ||
| 807 | .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves), | ||
| 808 | .class = &omap2430_timer_hwmod_class, | ||
| 809 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
| 810 | }; | ||
| 811 | |||
| 812 | /* timer8 */ | ||
| 813 | static struct omap_hwmod omap2430_timer8_hwmod; | ||
| 814 | static struct omap_hwmod_irq_info omap2430_timer8_mpu_irqs[] = { | ||
| 815 | { .irq = 44, }, | ||
| 816 | }; | ||
| 817 | |||
| 818 | static struct omap_hwmod_addr_space omap2430_timer8_addrs[] = { | ||
| 819 | { | ||
| 820 | .pa_start = 0x48082000, | ||
| 821 | .pa_end = 0x48082000 + SZ_1K - 1, | ||
| 822 | .flags = ADDR_TYPE_RT | ||
| 823 | }, | ||
| 824 | }; | ||
| 825 | |||
| 826 | /* l4_core -> timer8 */ | ||
| 827 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = { | ||
| 828 | .master = &omap2430_l4_core_hwmod, | ||
| 829 | .slave = &omap2430_timer8_hwmod, | ||
| 830 | .clk = "gpt8_ick", | ||
| 831 | .addr = omap2430_timer8_addrs, | ||
| 832 | .addr_cnt = ARRAY_SIZE(omap2430_timer8_addrs), | ||
| 833 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 834 | }; | ||
| 835 | |||
| 836 | /* timer8 slave port */ | ||
| 837 | static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = { | ||
| 838 | &omap2430_l4_core__timer8, | ||
| 839 | }; | ||
| 840 | |||
| 841 | /* timer8 hwmod */ | ||
| 842 | static struct omap_hwmod omap2430_timer8_hwmod = { | ||
| 843 | .name = "timer8", | ||
| 844 | .mpu_irqs = omap2430_timer8_mpu_irqs, | ||
| 845 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer8_mpu_irqs), | ||
| 846 | .main_clk = "gpt8_fck", | ||
| 847 | .prcm = { | ||
| 848 | .omap2 = { | ||
| 849 | .prcm_reg_id = 1, | ||
| 850 | .module_bit = OMAP24XX_EN_GPT8_SHIFT, | ||
| 851 | .module_offs = CORE_MOD, | ||
| 852 | .idlest_reg_id = 1, | ||
| 853 | .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, | ||
| 854 | }, | ||
| 855 | }, | ||
| 856 | .slaves = omap2430_timer8_slaves, | ||
| 857 | .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves), | ||
| 858 | .class = &omap2430_timer_hwmod_class, | ||
| 859 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
| 860 | }; | ||
| 861 | |||
| 862 | /* timer9 */ | ||
| 863 | static struct omap_hwmod omap2430_timer9_hwmod; | ||
| 864 | static struct omap_hwmod_irq_info omap2430_timer9_mpu_irqs[] = { | ||
| 865 | { .irq = 45, }, | ||
| 866 | }; | ||
| 867 | |||
| 868 | static struct omap_hwmod_addr_space omap2430_timer9_addrs[] = { | ||
| 869 | { | ||
| 870 | .pa_start = 0x48084000, | ||
| 871 | .pa_end = 0x48084000 + SZ_1K - 1, | ||
| 872 | .flags = ADDR_TYPE_RT | ||
| 873 | }, | ||
| 874 | }; | ||
| 875 | |||
| 876 | /* l4_core -> timer9 */ | ||
| 877 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = { | ||
| 878 | .master = &omap2430_l4_core_hwmod, | ||
| 879 | .slave = &omap2430_timer9_hwmod, | ||
| 880 | .clk = "gpt9_ick", | ||
| 881 | .addr = omap2430_timer9_addrs, | ||
| 882 | .addr_cnt = ARRAY_SIZE(omap2430_timer9_addrs), | ||
| 883 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 884 | }; | ||
| 885 | |||
| 886 | /* timer9 slave port */ | ||
| 887 | static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = { | ||
| 888 | &omap2430_l4_core__timer9, | ||
| 889 | }; | ||
| 890 | |||
| 891 | /* timer9 hwmod */ | ||
| 892 | static struct omap_hwmod omap2430_timer9_hwmod = { | ||
| 893 | .name = "timer9", | ||
| 894 | .mpu_irqs = omap2430_timer9_mpu_irqs, | ||
| 895 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer9_mpu_irqs), | ||
| 896 | .main_clk = "gpt9_fck", | ||
| 897 | .prcm = { | ||
| 898 | .omap2 = { | ||
| 899 | .prcm_reg_id = 1, | ||
| 900 | .module_bit = OMAP24XX_EN_GPT9_SHIFT, | ||
| 901 | .module_offs = CORE_MOD, | ||
| 902 | .idlest_reg_id = 1, | ||
| 903 | .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT, | ||
| 904 | }, | ||
| 905 | }, | ||
| 906 | .slaves = omap2430_timer9_slaves, | ||
| 907 | .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves), | ||
| 908 | .class = &omap2430_timer_hwmod_class, | ||
| 909 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
| 910 | }; | ||
| 911 | |||
| 912 | /* timer10 */ | ||
| 913 | static struct omap_hwmod omap2430_timer10_hwmod; | ||
| 914 | static struct omap_hwmod_irq_info omap2430_timer10_mpu_irqs[] = { | ||
| 915 | { .irq = 46, }, | ||
| 916 | }; | ||
| 917 | |||
| 918 | static struct omap_hwmod_addr_space omap2430_timer10_addrs[] = { | ||
| 919 | { | ||
| 920 | .pa_start = 0x48086000, | ||
| 921 | .pa_end = 0x48086000 + SZ_1K - 1, | ||
| 922 | .flags = ADDR_TYPE_RT | ||
| 923 | }, | ||
| 924 | }; | ||
| 925 | |||
| 926 | /* l4_core -> timer10 */ | ||
| 927 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = { | ||
| 928 | .master = &omap2430_l4_core_hwmod, | ||
| 929 | .slave = &omap2430_timer10_hwmod, | ||
| 930 | .clk = "gpt10_ick", | ||
| 931 | .addr = omap2430_timer10_addrs, | ||
| 932 | .addr_cnt = ARRAY_SIZE(omap2430_timer10_addrs), | ||
| 933 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 934 | }; | ||
| 935 | |||
| 936 | /* timer10 slave port */ | ||
| 937 | static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = { | ||
| 938 | &omap2430_l4_core__timer10, | ||
| 939 | }; | ||
| 940 | |||
| 941 | /* timer10 hwmod */ | ||
| 942 | static struct omap_hwmod omap2430_timer10_hwmod = { | ||
| 943 | .name = "timer10", | ||
| 944 | .mpu_irqs = omap2430_timer10_mpu_irqs, | ||
| 945 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer10_mpu_irqs), | ||
| 946 | .main_clk = "gpt10_fck", | ||
| 947 | .prcm = { | ||
| 948 | .omap2 = { | ||
| 949 | .prcm_reg_id = 1, | ||
| 950 | .module_bit = OMAP24XX_EN_GPT10_SHIFT, | ||
| 951 | .module_offs = CORE_MOD, | ||
| 952 | .idlest_reg_id = 1, | ||
| 953 | .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT, | ||
| 954 | }, | ||
| 955 | }, | ||
| 956 | .slaves = omap2430_timer10_slaves, | ||
| 957 | .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves), | ||
| 958 | .class = &omap2430_timer_hwmod_class, | ||
| 959 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
| 960 | }; | ||
| 961 | |||
| 962 | /* timer11 */ | ||
| 963 | static struct omap_hwmod omap2430_timer11_hwmod; | ||
| 964 | static struct omap_hwmod_irq_info omap2430_timer11_mpu_irqs[] = { | ||
| 965 | { .irq = 47, }, | ||
| 966 | }; | ||
| 967 | |||
| 968 | static struct omap_hwmod_addr_space omap2430_timer11_addrs[] = { | ||
| 969 | { | ||
| 970 | .pa_start = 0x48088000, | ||
| 971 | .pa_end = 0x48088000 + SZ_1K - 1, | ||
| 972 | .flags = ADDR_TYPE_RT | ||
| 973 | }, | ||
| 974 | }; | ||
| 975 | |||
| 976 | /* l4_core -> timer11 */ | ||
| 977 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = { | ||
| 978 | .master = &omap2430_l4_core_hwmod, | ||
| 979 | .slave = &omap2430_timer11_hwmod, | ||
| 980 | .clk = "gpt11_ick", | ||
| 981 | .addr = omap2430_timer11_addrs, | ||
| 982 | .addr_cnt = ARRAY_SIZE(omap2430_timer11_addrs), | ||
| 983 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 984 | }; | ||
| 985 | |||
| 986 | /* timer11 slave port */ | ||
| 987 | static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = { | ||
| 988 | &omap2430_l4_core__timer11, | ||
| 989 | }; | ||
| 990 | |||
| 991 | /* timer11 hwmod */ | ||
| 992 | static struct omap_hwmod omap2430_timer11_hwmod = { | ||
| 993 | .name = "timer11", | ||
| 994 | .mpu_irqs = omap2430_timer11_mpu_irqs, | ||
| 995 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer11_mpu_irqs), | ||
| 996 | .main_clk = "gpt11_fck", | ||
| 997 | .prcm = { | ||
| 998 | .omap2 = { | ||
| 999 | .prcm_reg_id = 1, | ||
| 1000 | .module_bit = OMAP24XX_EN_GPT11_SHIFT, | ||
| 1001 | .module_offs = CORE_MOD, | ||
| 1002 | .idlest_reg_id = 1, | ||
| 1003 | .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT, | ||
| 1004 | }, | ||
| 1005 | }, | ||
| 1006 | .slaves = omap2430_timer11_slaves, | ||
| 1007 | .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves), | ||
| 1008 | .class = &omap2430_timer_hwmod_class, | ||
| 1009 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
| 1010 | }; | ||
| 1011 | |||
| 1012 | /* timer12 */ | ||
| 1013 | static struct omap_hwmod omap2430_timer12_hwmod; | ||
| 1014 | static struct omap_hwmod_irq_info omap2430_timer12_mpu_irqs[] = { | ||
| 1015 | { .irq = 48, }, | ||
| 1016 | }; | ||
| 1017 | |||
| 1018 | static struct omap_hwmod_addr_space omap2430_timer12_addrs[] = { | ||
| 1019 | { | ||
| 1020 | .pa_start = 0x4808a000, | ||
| 1021 | .pa_end = 0x4808a000 + SZ_1K - 1, | ||
| 1022 | .flags = ADDR_TYPE_RT | ||
| 1023 | }, | ||
| 1024 | }; | ||
| 1025 | |||
| 1026 | /* l4_core -> timer12 */ | ||
| 1027 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = { | ||
| 1028 | .master = &omap2430_l4_core_hwmod, | ||
| 1029 | .slave = &omap2430_timer12_hwmod, | ||
| 1030 | .clk = "gpt12_ick", | ||
| 1031 | .addr = omap2430_timer12_addrs, | ||
| 1032 | .addr_cnt = ARRAY_SIZE(omap2430_timer12_addrs), | ||
| 1033 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1034 | }; | ||
| 1035 | |||
| 1036 | /* timer12 slave port */ | ||
| 1037 | static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = { | ||
| 1038 | &omap2430_l4_core__timer12, | ||
| 1039 | }; | ||
| 1040 | |||
| 1041 | /* timer12 hwmod */ | ||
| 1042 | static struct omap_hwmod omap2430_timer12_hwmod = { | ||
| 1043 | .name = "timer12", | ||
| 1044 | .mpu_irqs = omap2430_timer12_mpu_irqs, | ||
| 1045 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer12_mpu_irqs), | ||
| 1046 | .main_clk = "gpt12_fck", | ||
| 1047 | .prcm = { | ||
| 1048 | .omap2 = { | ||
| 1049 | .prcm_reg_id = 1, | ||
| 1050 | .module_bit = OMAP24XX_EN_GPT12_SHIFT, | ||
| 1051 | .module_offs = CORE_MOD, | ||
| 1052 | .idlest_reg_id = 1, | ||
| 1053 | .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT, | ||
| 1054 | }, | ||
| 1055 | }, | ||
| 1056 | .slaves = omap2430_timer12_slaves, | ||
| 1057 | .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves), | ||
| 1058 | .class = &omap2430_timer_hwmod_class, | ||
| 1059 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
| 1060 | }; | ||
| 1061 | |||
| 281 | /* l4_wkup -> wd_timer2 */ | 1062 | /* l4_wkup -> wd_timer2 */ |
| 282 | static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = { | 1063 | static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = { |
| 283 | { | 1064 | { |
| @@ -469,6 +1250,267 @@ static struct omap_hwmod omap2430_uart3_hwmod = { | |||
| 469 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 1250 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
| 470 | }; | 1251 | }; |
| 471 | 1252 | ||
| 1253 | /* | ||
| 1254 | * 'dss' class | ||
| 1255 | * display sub-system | ||
| 1256 | */ | ||
| 1257 | |||
| 1258 | static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = { | ||
| 1259 | .rev_offs = 0x0000, | ||
| 1260 | .sysc_offs = 0x0010, | ||
| 1261 | .syss_offs = 0x0014, | ||
| 1262 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
| 1263 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1264 | }; | ||
| 1265 | |||
| 1266 | static struct omap_hwmod_class omap2430_dss_hwmod_class = { | ||
| 1267 | .name = "dss", | ||
| 1268 | .sysc = &omap2430_dss_sysc, | ||
| 1269 | }; | ||
| 1270 | |||
| 1271 | /* dss */ | ||
| 1272 | static struct omap_hwmod_irq_info omap2430_dss_irqs[] = { | ||
| 1273 | { .irq = 25 }, | ||
| 1274 | }; | ||
| 1275 | static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = { | ||
| 1276 | { .name = "dispc", .dma_req = 5 }, | ||
| 1277 | }; | ||
| 1278 | |||
| 1279 | /* dss */ | ||
| 1280 | /* dss master ports */ | ||
| 1281 | static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = { | ||
| 1282 | &omap2430_dss__l3, | ||
| 1283 | }; | ||
| 1284 | |||
| 1285 | static struct omap_hwmod_addr_space omap2430_dss_addrs[] = { | ||
| 1286 | { | ||
| 1287 | .pa_start = 0x48050000, | ||
| 1288 | .pa_end = 0x480503FF, | ||
| 1289 | .flags = ADDR_TYPE_RT | ||
| 1290 | }, | ||
| 1291 | }; | ||
| 1292 | |||
| 1293 | /* l4_core -> dss */ | ||
| 1294 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss = { | ||
| 1295 | .master = &omap2430_l4_core_hwmod, | ||
| 1296 | .slave = &omap2430_dss_core_hwmod, | ||
| 1297 | .clk = "dss_ick", | ||
| 1298 | .addr = omap2430_dss_addrs, | ||
| 1299 | .addr_cnt = ARRAY_SIZE(omap2430_dss_addrs), | ||
| 1300 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1301 | }; | ||
| 1302 | |||
| 1303 | /* dss slave ports */ | ||
| 1304 | static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = { | ||
| 1305 | &omap2430_l4_core__dss, | ||
| 1306 | }; | ||
| 1307 | |||
| 1308 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | ||
| 1309 | { .role = "tv_clk", .clk = "dss_54m_fck" }, | ||
| 1310 | { .role = "sys_clk", .clk = "dss2_fck" }, | ||
| 1311 | }; | ||
| 1312 | |||
| 1313 | static struct omap_hwmod omap2430_dss_core_hwmod = { | ||
| 1314 | .name = "dss_core", | ||
| 1315 | .class = &omap2430_dss_hwmod_class, | ||
| 1316 | .main_clk = "dss1_fck", /* instead of dss_fck */ | ||
| 1317 | .mpu_irqs = omap2430_dss_irqs, | ||
| 1318 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dss_irqs), | ||
| 1319 | .sdma_reqs = omap2430_dss_sdma_chs, | ||
| 1320 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_dss_sdma_chs), | ||
| 1321 | .prcm = { | ||
| 1322 | .omap2 = { | ||
| 1323 | .prcm_reg_id = 1, | ||
| 1324 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
| 1325 | .module_offs = CORE_MOD, | ||
| 1326 | .idlest_reg_id = 1, | ||
| 1327 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
| 1328 | }, | ||
| 1329 | }, | ||
| 1330 | .opt_clks = dss_opt_clks, | ||
| 1331 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | ||
| 1332 | .slaves = omap2430_dss_slaves, | ||
| 1333 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves), | ||
| 1334 | .masters = omap2430_dss_masters, | ||
| 1335 | .masters_cnt = ARRAY_SIZE(omap2430_dss_masters), | ||
| 1336 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 1337 | .flags = HWMOD_NO_IDLEST, | ||
| 1338 | }; | ||
| 1339 | |||
| 1340 | /* | ||
| 1341 | * 'dispc' class | ||
| 1342 | * display controller | ||
| 1343 | */ | ||
| 1344 | |||
| 1345 | static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = { | ||
| 1346 | .rev_offs = 0x0000, | ||
| 1347 | .sysc_offs = 0x0010, | ||
| 1348 | .syss_offs = 0x0014, | ||
| 1349 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | | ||
| 1350 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
| 1351 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 1352 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
| 1353 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1354 | }; | ||
| 1355 | |||
| 1356 | static struct omap_hwmod_class omap2430_dispc_hwmod_class = { | ||
| 1357 | .name = "dispc", | ||
| 1358 | .sysc = &omap2430_dispc_sysc, | ||
| 1359 | }; | ||
| 1360 | |||
| 1361 | static struct omap_hwmod_addr_space omap2430_dss_dispc_addrs[] = { | ||
| 1362 | { | ||
| 1363 | .pa_start = 0x48050400, | ||
| 1364 | .pa_end = 0x480507FF, | ||
| 1365 | .flags = ADDR_TYPE_RT | ||
| 1366 | }, | ||
| 1367 | }; | ||
| 1368 | |||
| 1369 | /* l4_core -> dss_dispc */ | ||
| 1370 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = { | ||
| 1371 | .master = &omap2430_l4_core_hwmod, | ||
| 1372 | .slave = &omap2430_dss_dispc_hwmod, | ||
| 1373 | .clk = "dss_ick", | ||
| 1374 | .addr = omap2430_dss_dispc_addrs, | ||
| 1375 | .addr_cnt = ARRAY_SIZE(omap2430_dss_dispc_addrs), | ||
| 1376 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1377 | }; | ||
| 1378 | |||
| 1379 | /* dss_dispc slave ports */ | ||
| 1380 | static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = { | ||
| 1381 | &omap2430_l4_core__dss_dispc, | ||
| 1382 | }; | ||
| 1383 | |||
| 1384 | static struct omap_hwmod omap2430_dss_dispc_hwmod = { | ||
| 1385 | .name = "dss_dispc", | ||
| 1386 | .class = &omap2430_dispc_hwmod_class, | ||
| 1387 | .main_clk = "dss1_fck", | ||
| 1388 | .prcm = { | ||
| 1389 | .omap2 = { | ||
| 1390 | .prcm_reg_id = 1, | ||
| 1391 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
| 1392 | .module_offs = CORE_MOD, | ||
| 1393 | .idlest_reg_id = 1, | ||
| 1394 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
| 1395 | }, | ||
| 1396 | }, | ||
| 1397 | .slaves = omap2430_dss_dispc_slaves, | ||
| 1398 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves), | ||
| 1399 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 1400 | .flags = HWMOD_NO_IDLEST, | ||
| 1401 | }; | ||
| 1402 | |||
| 1403 | /* | ||
| 1404 | * 'rfbi' class | ||
| 1405 | * remote frame buffer interface | ||
| 1406 | */ | ||
| 1407 | |||
| 1408 | static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = { | ||
| 1409 | .rev_offs = 0x0000, | ||
| 1410 | .sysc_offs = 0x0010, | ||
| 1411 | .syss_offs = 0x0014, | ||
| 1412 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
| 1413 | SYSC_HAS_AUTOIDLE), | ||
| 1414 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 1415 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1416 | }; | ||
| 1417 | |||
| 1418 | static struct omap_hwmod_class omap2430_rfbi_hwmod_class = { | ||
| 1419 | .name = "rfbi", | ||
| 1420 | .sysc = &omap2430_rfbi_sysc, | ||
| 1421 | }; | ||
| 1422 | |||
| 1423 | static struct omap_hwmod_addr_space omap2430_dss_rfbi_addrs[] = { | ||
| 1424 | { | ||
| 1425 | .pa_start = 0x48050800, | ||
| 1426 | .pa_end = 0x48050BFF, | ||
| 1427 | .flags = ADDR_TYPE_RT | ||
| 1428 | }, | ||
| 1429 | }; | ||
| 1430 | |||
| 1431 | /* l4_core -> dss_rfbi */ | ||
| 1432 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = { | ||
| 1433 | .master = &omap2430_l4_core_hwmod, | ||
| 1434 | .slave = &omap2430_dss_rfbi_hwmod, | ||
| 1435 | .clk = "dss_ick", | ||
| 1436 | .addr = omap2430_dss_rfbi_addrs, | ||
| 1437 | .addr_cnt = ARRAY_SIZE(omap2430_dss_rfbi_addrs), | ||
| 1438 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1439 | }; | ||
| 1440 | |||
| 1441 | /* dss_rfbi slave ports */ | ||
| 1442 | static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = { | ||
| 1443 | &omap2430_l4_core__dss_rfbi, | ||
| 1444 | }; | ||
| 1445 | |||
| 1446 | static struct omap_hwmod omap2430_dss_rfbi_hwmod = { | ||
| 1447 | .name = "dss_rfbi", | ||
| 1448 | .class = &omap2430_rfbi_hwmod_class, | ||
| 1449 | .main_clk = "dss1_fck", | ||
| 1450 | .prcm = { | ||
| 1451 | .omap2 = { | ||
| 1452 | .prcm_reg_id = 1, | ||
| 1453 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
| 1454 | .module_offs = CORE_MOD, | ||
| 1455 | }, | ||
| 1456 | }, | ||
| 1457 | .slaves = omap2430_dss_rfbi_slaves, | ||
| 1458 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves), | ||
| 1459 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 1460 | .flags = HWMOD_NO_IDLEST, | ||
| 1461 | }; | ||
| 1462 | |||
| 1463 | /* | ||
| 1464 | * 'venc' class | ||
| 1465 | * video encoder | ||
| 1466 | */ | ||
| 1467 | |||
| 1468 | static struct omap_hwmod_class omap2430_venc_hwmod_class = { | ||
| 1469 | .name = "venc", | ||
| 1470 | }; | ||
| 1471 | |||
| 1472 | /* dss_venc */ | ||
| 1473 | static struct omap_hwmod_addr_space omap2430_dss_venc_addrs[] = { | ||
| 1474 | { | ||
| 1475 | .pa_start = 0x48050C00, | ||
| 1476 | .pa_end = 0x48050FFF, | ||
| 1477 | .flags = ADDR_TYPE_RT | ||
| 1478 | }, | ||
| 1479 | }; | ||
| 1480 | |||
| 1481 | /* l4_core -> dss_venc */ | ||
| 1482 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = { | ||
| 1483 | .master = &omap2430_l4_core_hwmod, | ||
| 1484 | .slave = &omap2430_dss_venc_hwmod, | ||
| 1485 | .clk = "dss_54m_fck", | ||
| 1486 | .addr = omap2430_dss_venc_addrs, | ||
| 1487 | .addr_cnt = ARRAY_SIZE(omap2430_dss_venc_addrs), | ||
| 1488 | .flags = OCPIF_SWSUP_IDLE, | ||
| 1489 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1490 | }; | ||
| 1491 | |||
| 1492 | /* dss_venc slave ports */ | ||
| 1493 | static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = { | ||
| 1494 | &omap2430_l4_core__dss_venc, | ||
| 1495 | }; | ||
| 1496 | |||
| 1497 | static struct omap_hwmod omap2430_dss_venc_hwmod = { | ||
| 1498 | .name = "dss_venc", | ||
| 1499 | .class = &omap2430_venc_hwmod_class, | ||
| 1500 | .main_clk = "dss1_fck", | ||
| 1501 | .prcm = { | ||
| 1502 | .omap2 = { | ||
| 1503 | .prcm_reg_id = 1, | ||
| 1504 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
| 1505 | .module_offs = CORE_MOD, | ||
| 1506 | }, | ||
| 1507 | }, | ||
| 1508 | .slaves = omap2430_dss_venc_slaves, | ||
| 1509 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves), | ||
| 1510 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 1511 | .flags = HWMOD_NO_IDLEST, | ||
| 1512 | }; | ||
| 1513 | |||
| 472 | /* I2C common */ | 1514 | /* I2C common */ |
| 473 | static struct omap_hwmod_class_sysconfig i2c_sysc = { | 1515 | static struct omap_hwmod_class_sysconfig i2c_sysc = { |
| 474 | .rev_offs = 0x00, | 1516 | .rev_offs = 0x00, |
| @@ -921,18 +1963,741 @@ static struct omap_hwmod omap2430_dma_system_hwmod = { | |||
| 921 | .flags = HWMOD_NO_IDLEST, | 1963 | .flags = HWMOD_NO_IDLEST, |
| 922 | }; | 1964 | }; |
| 923 | 1965 | ||
| 1966 | /* | ||
| 1967 | * 'mailbox' class | ||
| 1968 | * mailbox module allowing communication between the on-chip processors | ||
| 1969 | * using a queued mailbox-interrupt mechanism. | ||
| 1970 | */ | ||
| 1971 | |||
| 1972 | static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = { | ||
| 1973 | .rev_offs = 0x000, | ||
| 1974 | .sysc_offs = 0x010, | ||
| 1975 | .syss_offs = 0x014, | ||
| 1976 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
| 1977 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
| 1978 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 1979 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1980 | }; | ||
| 1981 | |||
| 1982 | static struct omap_hwmod_class omap2430_mailbox_hwmod_class = { | ||
| 1983 | .name = "mailbox", | ||
| 1984 | .sysc = &omap2430_mailbox_sysc, | ||
| 1985 | }; | ||
| 1986 | |||
| 1987 | /* mailbox */ | ||
| 1988 | static struct omap_hwmod omap2430_mailbox_hwmod; | ||
| 1989 | static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = { | ||
| 1990 | { .irq = 26 }, | ||
| 1991 | }; | ||
| 1992 | |||
| 1993 | static struct omap_hwmod_addr_space omap2430_mailbox_addrs[] = { | ||
| 1994 | { | ||
| 1995 | .pa_start = 0x48094000, | ||
| 1996 | .pa_end = 0x480941ff, | ||
| 1997 | .flags = ADDR_TYPE_RT, | ||
| 1998 | }, | ||
| 1999 | }; | ||
| 2000 | |||
| 2001 | /* l4_core -> mailbox */ | ||
| 2002 | static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = { | ||
| 2003 | .master = &omap2430_l4_core_hwmod, | ||
| 2004 | .slave = &omap2430_mailbox_hwmod, | ||
| 2005 | .addr = omap2430_mailbox_addrs, | ||
| 2006 | .addr_cnt = ARRAY_SIZE(omap2430_mailbox_addrs), | ||
| 2007 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2008 | }; | ||
| 2009 | |||
| 2010 | /* mailbox slave ports */ | ||
| 2011 | static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = { | ||
| 2012 | &omap2430_l4_core__mailbox, | ||
| 2013 | }; | ||
| 2014 | |||
| 2015 | static struct omap_hwmod omap2430_mailbox_hwmod = { | ||
| 2016 | .name = "mailbox", | ||
| 2017 | .class = &omap2430_mailbox_hwmod_class, | ||
| 2018 | .mpu_irqs = omap2430_mailbox_irqs, | ||
| 2019 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mailbox_irqs), | ||
| 2020 | .main_clk = "mailboxes_ick", | ||
| 2021 | .prcm = { | ||
| 2022 | .omap2 = { | ||
| 2023 | .prcm_reg_id = 1, | ||
| 2024 | .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT, | ||
| 2025 | .module_offs = CORE_MOD, | ||
| 2026 | .idlest_reg_id = 1, | ||
| 2027 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, | ||
| 2028 | }, | ||
| 2029 | }, | ||
| 2030 | .slaves = omap2430_mailbox_slaves, | ||
| 2031 | .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves), | ||
| 2032 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 2033 | }; | ||
| 2034 | |||
| 2035 | /* | ||
| 2036 | * 'mcspi' class | ||
| 2037 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | ||
| 2038 | * bus | ||
| 2039 | */ | ||
| 2040 | |||
| 2041 | static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = { | ||
| 2042 | .rev_offs = 0x0000, | ||
| 2043 | .sysc_offs = 0x0010, | ||
| 2044 | .syss_offs = 0x0014, | ||
| 2045 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
| 2046 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
| 2047 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
| 2048 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 2049 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 2050 | }; | ||
| 2051 | |||
| 2052 | static struct omap_hwmod_class omap2430_mcspi_class = { | ||
| 2053 | .name = "mcspi", | ||
| 2054 | .sysc = &omap2430_mcspi_sysc, | ||
| 2055 | .rev = OMAP2_MCSPI_REV, | ||
| 2056 | }; | ||
| 2057 | |||
| 2058 | /* mcspi1 */ | ||
| 2059 | static struct omap_hwmod_irq_info omap2430_mcspi1_mpu_irqs[] = { | ||
| 2060 | { .irq = 65 }, | ||
| 2061 | }; | ||
| 2062 | |||
| 2063 | static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = { | ||
| 2064 | { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */ | ||
| 2065 | { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */ | ||
| 2066 | { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */ | ||
| 2067 | { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */ | ||
| 2068 | { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */ | ||
| 2069 | { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */ | ||
| 2070 | { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */ | ||
| 2071 | { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */ | ||
| 2072 | }; | ||
| 2073 | |||
| 2074 | static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = { | ||
| 2075 | &omap2430_l4_core__mcspi1, | ||
| 2076 | }; | ||
| 2077 | |||
| 2078 | static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { | ||
| 2079 | .num_chipselect = 4, | ||
| 2080 | }; | ||
| 2081 | |||
| 2082 | static struct omap_hwmod omap2430_mcspi1_hwmod = { | ||
| 2083 | .name = "mcspi1_hwmod", | ||
| 2084 | .mpu_irqs = omap2430_mcspi1_mpu_irqs, | ||
| 2085 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi1_mpu_irqs), | ||
| 2086 | .sdma_reqs = omap2430_mcspi1_sdma_reqs, | ||
| 2087 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi1_sdma_reqs), | ||
| 2088 | .main_clk = "mcspi1_fck", | ||
| 2089 | .prcm = { | ||
| 2090 | .omap2 = { | ||
| 2091 | .module_offs = CORE_MOD, | ||
| 2092 | .prcm_reg_id = 1, | ||
| 2093 | .module_bit = OMAP24XX_EN_MCSPI1_SHIFT, | ||
| 2094 | .idlest_reg_id = 1, | ||
| 2095 | .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT, | ||
| 2096 | }, | ||
| 2097 | }, | ||
| 2098 | .slaves = omap2430_mcspi1_slaves, | ||
| 2099 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves), | ||
| 2100 | .class = &omap2430_mcspi_class, | ||
| 2101 | .dev_attr = &omap_mcspi1_dev_attr, | ||
| 2102 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 2103 | }; | ||
| 2104 | |||
| 2105 | /* mcspi2 */ | ||
| 2106 | static struct omap_hwmod_irq_info omap2430_mcspi2_mpu_irqs[] = { | ||
| 2107 | { .irq = 66 }, | ||
| 2108 | }; | ||
| 2109 | |||
| 2110 | static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = { | ||
| 2111 | { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */ | ||
| 2112 | { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */ | ||
| 2113 | { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */ | ||
| 2114 | { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */ | ||
| 2115 | }; | ||
| 2116 | |||
| 2117 | static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = { | ||
| 2118 | &omap2430_l4_core__mcspi2, | ||
| 2119 | }; | ||
| 2120 | |||
| 2121 | static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { | ||
| 2122 | .num_chipselect = 2, | ||
| 2123 | }; | ||
| 2124 | |||
| 2125 | static struct omap_hwmod omap2430_mcspi2_hwmod = { | ||
| 2126 | .name = "mcspi2_hwmod", | ||
| 2127 | .mpu_irqs = omap2430_mcspi2_mpu_irqs, | ||
| 2128 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi2_mpu_irqs), | ||
| 2129 | .sdma_reqs = omap2430_mcspi2_sdma_reqs, | ||
| 2130 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi2_sdma_reqs), | ||
| 2131 | .main_clk = "mcspi2_fck", | ||
| 2132 | .prcm = { | ||
| 2133 | .omap2 = { | ||
| 2134 | .module_offs = CORE_MOD, | ||
| 2135 | .prcm_reg_id = 1, | ||
| 2136 | .module_bit = OMAP24XX_EN_MCSPI2_SHIFT, | ||
| 2137 | .idlest_reg_id = 1, | ||
| 2138 | .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT, | ||
| 2139 | }, | ||
| 2140 | }, | ||
| 2141 | .slaves = omap2430_mcspi2_slaves, | ||
| 2142 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves), | ||
| 2143 | .class = &omap2430_mcspi_class, | ||
| 2144 | .dev_attr = &omap_mcspi2_dev_attr, | ||
| 2145 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 2146 | }; | ||
| 2147 | |||
| 2148 | /* mcspi3 */ | ||
| 2149 | static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = { | ||
| 2150 | { .irq = 91 }, | ||
| 2151 | }; | ||
| 2152 | |||
| 2153 | static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = { | ||
| 2154 | { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */ | ||
| 2155 | { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */ | ||
| 2156 | { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */ | ||
| 2157 | { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */ | ||
| 2158 | }; | ||
| 2159 | |||
| 2160 | static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = { | ||
| 2161 | &omap2430_l4_core__mcspi3, | ||
| 2162 | }; | ||
| 2163 | |||
| 2164 | static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { | ||
| 2165 | .num_chipselect = 2, | ||
| 2166 | }; | ||
| 2167 | |||
| 2168 | static struct omap_hwmod omap2430_mcspi3_hwmod = { | ||
| 2169 | .name = "mcspi3_hwmod", | ||
| 2170 | .mpu_irqs = omap2430_mcspi3_mpu_irqs, | ||
| 2171 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi3_mpu_irqs), | ||
| 2172 | .sdma_reqs = omap2430_mcspi3_sdma_reqs, | ||
| 2173 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi3_sdma_reqs), | ||
| 2174 | .main_clk = "mcspi3_fck", | ||
| 2175 | .prcm = { | ||
| 2176 | .omap2 = { | ||
| 2177 | .module_offs = CORE_MOD, | ||
| 2178 | .prcm_reg_id = 2, | ||
| 2179 | .module_bit = OMAP2430_EN_MCSPI3_SHIFT, | ||
| 2180 | .idlest_reg_id = 2, | ||
| 2181 | .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT, | ||
| 2182 | }, | ||
| 2183 | }, | ||
| 2184 | .slaves = omap2430_mcspi3_slaves, | ||
| 2185 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves), | ||
| 2186 | .class = &omap2430_mcspi_class, | ||
| 2187 | .dev_attr = &omap_mcspi3_dev_attr, | ||
| 2188 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 2189 | }; | ||
| 2190 | |||
| 2191 | /* | ||
| 2192 | * usbhsotg | ||
| 2193 | */ | ||
| 2194 | static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = { | ||
| 2195 | .rev_offs = 0x0400, | ||
| 2196 | .sysc_offs = 0x0404, | ||
| 2197 | .syss_offs = 0x0408, | ||
| 2198 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE| | ||
| 2199 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
| 2200 | SYSC_HAS_AUTOIDLE), | ||
| 2201 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 2202 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
| 2203 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 2204 | }; | ||
| 2205 | |||
| 2206 | static struct omap_hwmod_class usbotg_class = { | ||
| 2207 | .name = "usbotg", | ||
| 2208 | .sysc = &omap2430_usbhsotg_sysc, | ||
| 2209 | }; | ||
| 2210 | |||
| 2211 | /* usb_otg_hs */ | ||
| 2212 | static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = { | ||
| 2213 | |||
| 2214 | { .name = "mc", .irq = 92 }, | ||
| 2215 | { .name = "dma", .irq = 93 }, | ||
| 2216 | }; | ||
| 2217 | |||
| 2218 | static struct omap_hwmod omap2430_usbhsotg_hwmod = { | ||
| 2219 | .name = "usb_otg_hs", | ||
| 2220 | .mpu_irqs = omap2430_usbhsotg_mpu_irqs, | ||
| 2221 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_usbhsotg_mpu_irqs), | ||
| 2222 | .main_clk = "usbhs_ick", | ||
| 2223 | .prcm = { | ||
| 2224 | .omap2 = { | ||
| 2225 | .prcm_reg_id = 1, | ||
| 2226 | .module_bit = OMAP2430_EN_USBHS_MASK, | ||
| 2227 | .module_offs = CORE_MOD, | ||
| 2228 | .idlest_reg_id = 1, | ||
| 2229 | .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT, | ||
| 2230 | }, | ||
| 2231 | }, | ||
| 2232 | .masters = omap2430_usbhsotg_masters, | ||
| 2233 | .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters), | ||
| 2234 | .slaves = omap2430_usbhsotg_slaves, | ||
| 2235 | .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves), | ||
| 2236 | .class = &usbotg_class, | ||
| 2237 | /* | ||
| 2238 | * Erratum ID: i479 idle_req / idle_ack mechanism potentially | ||
| 2239 | * broken when autoidle is enabled | ||
| 2240 | * workaround is to disable the autoidle bit at module level. | ||
| 2241 | */ | ||
| 2242 | .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE | ||
| 2243 | | HWMOD_SWSUP_MSTANDBY, | ||
| 2244 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
| 2245 | }; | ||
| 2246 | |||
| 2247 | /* | ||
| 2248 | * 'mcbsp' class | ||
| 2249 | * multi channel buffered serial port controller | ||
| 2250 | */ | ||
| 2251 | |||
| 2252 | static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = { | ||
| 2253 | .rev_offs = 0x007C, | ||
| 2254 | .sysc_offs = 0x008C, | ||
| 2255 | .sysc_flags = (SYSC_HAS_SOFTRESET), | ||
| 2256 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 2257 | }; | ||
| 2258 | |||
| 2259 | static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = { | ||
| 2260 | .name = "mcbsp", | ||
| 2261 | .sysc = &omap2430_mcbsp_sysc, | ||
| 2262 | .rev = MCBSP_CONFIG_TYPE2, | ||
| 2263 | }; | ||
| 2264 | |||
| 2265 | /* mcbsp1 */ | ||
| 2266 | static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = { | ||
| 2267 | { .name = "tx", .irq = 59 }, | ||
| 2268 | { .name = "rx", .irq = 60 }, | ||
| 2269 | { .name = "ovr", .irq = 61 }, | ||
| 2270 | { .name = "common", .irq = 64 }, | ||
| 2271 | }; | ||
| 2272 | |||
| 2273 | static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = { | ||
| 2274 | { .name = "rx", .dma_req = 32 }, | ||
| 2275 | { .name = "tx", .dma_req = 31 }, | ||
| 2276 | }; | ||
| 2277 | |||
| 2278 | static struct omap_hwmod_addr_space omap2430_mcbsp1_addrs[] = { | ||
| 2279 | { | ||
| 2280 | .name = "mpu", | ||
| 2281 | .pa_start = 0x48074000, | ||
| 2282 | .pa_end = 0x480740ff, | ||
| 2283 | .flags = ADDR_TYPE_RT | ||
| 2284 | }, | ||
| 2285 | }; | ||
| 2286 | |||
| 2287 | /* l4_core -> mcbsp1 */ | ||
| 2288 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = { | ||
| 2289 | .master = &omap2430_l4_core_hwmod, | ||
| 2290 | .slave = &omap2430_mcbsp1_hwmod, | ||
| 2291 | .clk = "mcbsp1_ick", | ||
| 2292 | .addr = omap2430_mcbsp1_addrs, | ||
| 2293 | .addr_cnt = ARRAY_SIZE(omap2430_mcbsp1_addrs), | ||
| 2294 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2295 | }; | ||
| 2296 | |||
| 2297 | /* mcbsp1 slave ports */ | ||
| 2298 | static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = { | ||
| 2299 | &omap2430_l4_core__mcbsp1, | ||
| 2300 | }; | ||
| 2301 | |||
| 2302 | static struct omap_hwmod omap2430_mcbsp1_hwmod = { | ||
| 2303 | .name = "mcbsp1", | ||
| 2304 | .class = &omap2430_mcbsp_hwmod_class, | ||
| 2305 | .mpu_irqs = omap2430_mcbsp1_irqs, | ||
| 2306 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_irqs), | ||
| 2307 | .sdma_reqs = omap2430_mcbsp1_sdma_chs, | ||
| 2308 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_sdma_chs), | ||
| 2309 | .main_clk = "mcbsp1_fck", | ||
| 2310 | .prcm = { | ||
| 2311 | .omap2 = { | ||
| 2312 | .prcm_reg_id = 1, | ||
| 2313 | .module_bit = OMAP24XX_EN_MCBSP1_SHIFT, | ||
| 2314 | .module_offs = CORE_MOD, | ||
| 2315 | .idlest_reg_id = 1, | ||
| 2316 | .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT, | ||
| 2317 | }, | ||
| 2318 | }, | ||
| 2319 | .slaves = omap2430_mcbsp1_slaves, | ||
| 2320 | .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves), | ||
| 2321 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 2322 | }; | ||
| 2323 | |||
| 2324 | /* mcbsp2 */ | ||
| 2325 | static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = { | ||
| 2326 | { .name = "tx", .irq = 62 }, | ||
| 2327 | { .name = "rx", .irq = 63 }, | ||
| 2328 | { .name = "common", .irq = 16 }, | ||
| 2329 | }; | ||
| 2330 | |||
| 2331 | static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = { | ||
| 2332 | { .name = "rx", .dma_req = 34 }, | ||
| 2333 | { .name = "tx", .dma_req = 33 }, | ||
| 2334 | }; | ||
| 2335 | |||
| 2336 | static struct omap_hwmod_addr_space omap2430_mcbsp2_addrs[] = { | ||
| 2337 | { | ||
| 2338 | .name = "mpu", | ||
| 2339 | .pa_start = 0x48076000, | ||
| 2340 | .pa_end = 0x480760ff, | ||
| 2341 | .flags = ADDR_TYPE_RT | ||
| 2342 | }, | ||
| 2343 | }; | ||
| 2344 | |||
| 2345 | /* l4_core -> mcbsp2 */ | ||
| 2346 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = { | ||
| 2347 | .master = &omap2430_l4_core_hwmod, | ||
| 2348 | .slave = &omap2430_mcbsp2_hwmod, | ||
| 2349 | .clk = "mcbsp2_ick", | ||
| 2350 | .addr = omap2430_mcbsp2_addrs, | ||
| 2351 | .addr_cnt = ARRAY_SIZE(omap2430_mcbsp2_addrs), | ||
| 2352 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2353 | }; | ||
| 2354 | |||
| 2355 | /* mcbsp2 slave ports */ | ||
| 2356 | static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = { | ||
| 2357 | &omap2430_l4_core__mcbsp2, | ||
| 2358 | }; | ||
| 2359 | |||
| 2360 | static struct omap_hwmod omap2430_mcbsp2_hwmod = { | ||
| 2361 | .name = "mcbsp2", | ||
| 2362 | .class = &omap2430_mcbsp_hwmod_class, | ||
| 2363 | .mpu_irqs = omap2430_mcbsp2_irqs, | ||
| 2364 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_irqs), | ||
| 2365 | .sdma_reqs = omap2430_mcbsp2_sdma_chs, | ||
| 2366 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_sdma_chs), | ||
| 2367 | .main_clk = "mcbsp2_fck", | ||
| 2368 | .prcm = { | ||
| 2369 | .omap2 = { | ||
| 2370 | .prcm_reg_id = 1, | ||
| 2371 | .module_bit = OMAP24XX_EN_MCBSP2_SHIFT, | ||
| 2372 | .module_offs = CORE_MOD, | ||
| 2373 | .idlest_reg_id = 1, | ||
| 2374 | .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT, | ||
| 2375 | }, | ||
| 2376 | }, | ||
| 2377 | .slaves = omap2430_mcbsp2_slaves, | ||
| 2378 | .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves), | ||
| 2379 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 2380 | }; | ||
| 2381 | |||
| 2382 | /* mcbsp3 */ | ||
| 2383 | static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = { | ||
| 2384 | { .name = "tx", .irq = 89 }, | ||
| 2385 | { .name = "rx", .irq = 90 }, | ||
| 2386 | { .name = "common", .irq = 17 }, | ||
| 2387 | }; | ||
| 2388 | |||
| 2389 | static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = { | ||
| 2390 | { .name = "rx", .dma_req = 18 }, | ||
| 2391 | { .name = "tx", .dma_req = 17 }, | ||
| 2392 | }; | ||
| 2393 | |||
| 2394 | static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = { | ||
| 2395 | { | ||
| 2396 | .name = "mpu", | ||
| 2397 | .pa_start = 0x4808C000, | ||
| 2398 | .pa_end = 0x4808C0ff, | ||
| 2399 | .flags = ADDR_TYPE_RT | ||
| 2400 | }, | ||
| 2401 | }; | ||
| 2402 | |||
| 2403 | /* l4_core -> mcbsp3 */ | ||
| 2404 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = { | ||
| 2405 | .master = &omap2430_l4_core_hwmod, | ||
| 2406 | .slave = &omap2430_mcbsp3_hwmod, | ||
| 2407 | .clk = "mcbsp3_ick", | ||
| 2408 | .addr = omap2430_mcbsp3_addrs, | ||
| 2409 | .addr_cnt = ARRAY_SIZE(omap2430_mcbsp3_addrs), | ||
| 2410 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2411 | }; | ||
| 2412 | |||
| 2413 | /* mcbsp3 slave ports */ | ||
| 2414 | static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = { | ||
| 2415 | &omap2430_l4_core__mcbsp3, | ||
| 2416 | }; | ||
| 2417 | |||
| 2418 | static struct omap_hwmod omap2430_mcbsp3_hwmod = { | ||
| 2419 | .name = "mcbsp3", | ||
| 2420 | .class = &omap2430_mcbsp_hwmod_class, | ||
| 2421 | .mpu_irqs = omap2430_mcbsp3_irqs, | ||
| 2422 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_irqs), | ||
| 2423 | .sdma_reqs = omap2430_mcbsp3_sdma_chs, | ||
| 2424 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_sdma_chs), | ||
| 2425 | .main_clk = "mcbsp3_fck", | ||
| 2426 | .prcm = { | ||
| 2427 | .omap2 = { | ||
| 2428 | .prcm_reg_id = 1, | ||
| 2429 | .module_bit = OMAP2430_EN_MCBSP3_SHIFT, | ||
| 2430 | .module_offs = CORE_MOD, | ||
| 2431 | .idlest_reg_id = 2, | ||
| 2432 | .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT, | ||
| 2433 | }, | ||
| 2434 | }, | ||
| 2435 | .slaves = omap2430_mcbsp3_slaves, | ||
| 2436 | .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves), | ||
| 2437 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 2438 | }; | ||
| 2439 | |||
| 2440 | /* mcbsp4 */ | ||
| 2441 | static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = { | ||
| 2442 | { .name = "tx", .irq = 54 }, | ||
| 2443 | { .name = "rx", .irq = 55 }, | ||
| 2444 | { .name = "common", .irq = 18 }, | ||
| 2445 | }; | ||
| 2446 | |||
| 2447 | static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = { | ||
| 2448 | { .name = "rx", .dma_req = 20 }, | ||
| 2449 | { .name = "tx", .dma_req = 19 }, | ||
| 2450 | }; | ||
| 2451 | |||
| 2452 | static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = { | ||
| 2453 | { | ||
| 2454 | .name = "mpu", | ||
| 2455 | .pa_start = 0x4808E000, | ||
| 2456 | .pa_end = 0x4808E0ff, | ||
| 2457 | .flags = ADDR_TYPE_RT | ||
| 2458 | }, | ||
| 2459 | }; | ||
| 2460 | |||
| 2461 | /* l4_core -> mcbsp4 */ | ||
| 2462 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = { | ||
| 2463 | .master = &omap2430_l4_core_hwmod, | ||
| 2464 | .slave = &omap2430_mcbsp4_hwmod, | ||
| 2465 | .clk = "mcbsp4_ick", | ||
| 2466 | .addr = omap2430_mcbsp4_addrs, | ||
| 2467 | .addr_cnt = ARRAY_SIZE(omap2430_mcbsp4_addrs), | ||
| 2468 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2469 | }; | ||
| 2470 | |||
| 2471 | /* mcbsp4 slave ports */ | ||
| 2472 | static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = { | ||
| 2473 | &omap2430_l4_core__mcbsp4, | ||
| 2474 | }; | ||
| 2475 | |||
| 2476 | static struct omap_hwmod omap2430_mcbsp4_hwmod = { | ||
| 2477 | .name = "mcbsp4", | ||
| 2478 | .class = &omap2430_mcbsp_hwmod_class, | ||
| 2479 | .mpu_irqs = omap2430_mcbsp4_irqs, | ||
| 2480 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_irqs), | ||
| 2481 | .sdma_reqs = omap2430_mcbsp4_sdma_chs, | ||
| 2482 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_sdma_chs), | ||
| 2483 | .main_clk = "mcbsp4_fck", | ||
| 2484 | .prcm = { | ||
| 2485 | .omap2 = { | ||
| 2486 | .prcm_reg_id = 1, | ||
| 2487 | .module_bit = OMAP2430_EN_MCBSP4_SHIFT, | ||
| 2488 | .module_offs = CORE_MOD, | ||
| 2489 | .idlest_reg_id = 2, | ||
| 2490 | .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT, | ||
| 2491 | }, | ||
| 2492 | }, | ||
| 2493 | .slaves = omap2430_mcbsp4_slaves, | ||
| 2494 | .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves), | ||
| 2495 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 2496 | }; | ||
| 2497 | |||
| 2498 | /* mcbsp5 */ | ||
| 2499 | static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = { | ||
| 2500 | { .name = "tx", .irq = 81 }, | ||
| 2501 | { .name = "rx", .irq = 82 }, | ||
| 2502 | { .name = "common", .irq = 19 }, | ||
| 2503 | }; | ||
| 2504 | |||
| 2505 | static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = { | ||
| 2506 | { .name = "rx", .dma_req = 22 }, | ||
| 2507 | { .name = "tx", .dma_req = 21 }, | ||
| 2508 | }; | ||
| 2509 | |||
| 2510 | static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = { | ||
| 2511 | { | ||
| 2512 | .name = "mpu", | ||
| 2513 | .pa_start = 0x48096000, | ||
| 2514 | .pa_end = 0x480960ff, | ||
| 2515 | .flags = ADDR_TYPE_RT | ||
| 2516 | }, | ||
| 2517 | }; | ||
| 2518 | |||
| 2519 | /* l4_core -> mcbsp5 */ | ||
| 2520 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = { | ||
| 2521 | .master = &omap2430_l4_core_hwmod, | ||
| 2522 | .slave = &omap2430_mcbsp5_hwmod, | ||
| 2523 | .clk = "mcbsp5_ick", | ||
| 2524 | .addr = omap2430_mcbsp5_addrs, | ||
| 2525 | .addr_cnt = ARRAY_SIZE(omap2430_mcbsp5_addrs), | ||
| 2526 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2527 | }; | ||
| 2528 | |||
| 2529 | /* mcbsp5 slave ports */ | ||
| 2530 | static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = { | ||
| 2531 | &omap2430_l4_core__mcbsp5, | ||
| 2532 | }; | ||
| 2533 | |||
| 2534 | static struct omap_hwmod omap2430_mcbsp5_hwmod = { | ||
| 2535 | .name = "mcbsp5", | ||
| 2536 | .class = &omap2430_mcbsp_hwmod_class, | ||
| 2537 | .mpu_irqs = omap2430_mcbsp5_irqs, | ||
| 2538 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_irqs), | ||
| 2539 | .sdma_reqs = omap2430_mcbsp5_sdma_chs, | ||
| 2540 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_sdma_chs), | ||
| 2541 | .main_clk = "mcbsp5_fck", | ||
| 2542 | .prcm = { | ||
| 2543 | .omap2 = { | ||
| 2544 | .prcm_reg_id = 1, | ||
| 2545 | .module_bit = OMAP2430_EN_MCBSP5_SHIFT, | ||
| 2546 | .module_offs = CORE_MOD, | ||
| 2547 | .idlest_reg_id = 2, | ||
| 2548 | .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT, | ||
| 2549 | }, | ||
| 2550 | }, | ||
| 2551 | .slaves = omap2430_mcbsp5_slaves, | ||
| 2552 | .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves), | ||
| 2553 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 2554 | }; | ||
| 2555 | |||
| 2556 | /* MMC/SD/SDIO common */ | ||
| 2557 | |||
| 2558 | static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = { | ||
| 2559 | .rev_offs = 0x1fc, | ||
| 2560 | .sysc_offs = 0x10, | ||
| 2561 | .syss_offs = 0x14, | ||
| 2562 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
| 2563 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
| 2564 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
| 2565 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 2566 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 2567 | }; | ||
| 2568 | |||
| 2569 | static struct omap_hwmod_class omap2430_mmc_class = { | ||
| 2570 | .name = "mmc", | ||
| 2571 | .sysc = &omap2430_mmc_sysc, | ||
| 2572 | }; | ||
| 2573 | |||
| 2574 | /* MMC/SD/SDIO1 */ | ||
| 2575 | |||
| 2576 | static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = { | ||
| 2577 | { .irq = 83 }, | ||
| 2578 | }; | ||
| 2579 | |||
| 2580 | static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = { | ||
| 2581 | { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */ | ||
| 2582 | { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */ | ||
| 2583 | }; | ||
| 2584 | |||
| 2585 | static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = { | ||
| 2586 | { .role = "dbck", .clk = "mmchsdb1_fck" }, | ||
| 2587 | }; | ||
| 2588 | |||
| 2589 | static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = { | ||
| 2590 | &omap2430_l4_core__mmc1, | ||
| 2591 | }; | ||
| 2592 | |||
| 2593 | static struct omap_mmc_dev_attr mmc1_dev_attr = { | ||
| 2594 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, | ||
| 2595 | }; | ||
| 2596 | |||
| 2597 | static struct omap_hwmod omap2430_mmc1_hwmod = { | ||
| 2598 | .name = "mmc1", | ||
| 2599 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
| 2600 | .mpu_irqs = omap2430_mmc1_mpu_irqs, | ||
| 2601 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc1_mpu_irqs), | ||
| 2602 | .sdma_reqs = omap2430_mmc1_sdma_reqs, | ||
| 2603 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc1_sdma_reqs), | ||
| 2604 | .opt_clks = omap2430_mmc1_opt_clks, | ||
| 2605 | .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks), | ||
| 2606 | .main_clk = "mmchs1_fck", | ||
| 2607 | .prcm = { | ||
| 2608 | .omap2 = { | ||
| 2609 | .module_offs = CORE_MOD, | ||
| 2610 | .prcm_reg_id = 2, | ||
| 2611 | .module_bit = OMAP2430_EN_MMCHS1_SHIFT, | ||
| 2612 | .idlest_reg_id = 2, | ||
| 2613 | .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT, | ||
| 2614 | }, | ||
| 2615 | }, | ||
| 2616 | .dev_attr = &mmc1_dev_attr, | ||
| 2617 | .slaves = omap2430_mmc1_slaves, | ||
| 2618 | .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves), | ||
| 2619 | .class = &omap2430_mmc_class, | ||
| 2620 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 2621 | }; | ||
| 2622 | |||
| 2623 | /* MMC/SD/SDIO2 */ | ||
| 2624 | |||
| 2625 | static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = { | ||
| 2626 | { .irq = 86 }, | ||
| 2627 | }; | ||
| 2628 | |||
| 2629 | static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = { | ||
| 2630 | { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */ | ||
| 2631 | { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */ | ||
| 2632 | }; | ||
| 2633 | |||
| 2634 | static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = { | ||
| 2635 | { .role = "dbck", .clk = "mmchsdb2_fck" }, | ||
| 2636 | }; | ||
| 2637 | |||
| 2638 | static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = { | ||
| 2639 | &omap2430_l4_core__mmc2, | ||
| 2640 | }; | ||
| 2641 | |||
| 2642 | static struct omap_hwmod omap2430_mmc2_hwmod = { | ||
| 2643 | .name = "mmc2", | ||
| 2644 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
| 2645 | .mpu_irqs = omap2430_mmc2_mpu_irqs, | ||
| 2646 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc2_mpu_irqs), | ||
| 2647 | .sdma_reqs = omap2430_mmc2_sdma_reqs, | ||
| 2648 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc2_sdma_reqs), | ||
| 2649 | .opt_clks = omap2430_mmc2_opt_clks, | ||
| 2650 | .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks), | ||
| 2651 | .main_clk = "mmchs2_fck", | ||
| 2652 | .prcm = { | ||
| 2653 | .omap2 = { | ||
| 2654 | .module_offs = CORE_MOD, | ||
| 2655 | .prcm_reg_id = 2, | ||
| 2656 | .module_bit = OMAP2430_EN_MMCHS2_SHIFT, | ||
| 2657 | .idlest_reg_id = 2, | ||
| 2658 | .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT, | ||
| 2659 | }, | ||
| 2660 | }, | ||
| 2661 | .slaves = omap2430_mmc2_slaves, | ||
| 2662 | .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves), | ||
| 2663 | .class = &omap2430_mmc_class, | ||
| 2664 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
| 2665 | }; | ||
| 2666 | |||
| 924 | static __initdata struct omap_hwmod *omap2430_hwmods[] = { | 2667 | static __initdata struct omap_hwmod *omap2430_hwmods[] = { |
| 925 | &omap2430_l3_main_hwmod, | 2668 | &omap2430_l3_main_hwmod, |
| 926 | &omap2430_l4_core_hwmod, | 2669 | &omap2430_l4_core_hwmod, |
| 927 | &omap2430_l4_wkup_hwmod, | 2670 | &omap2430_l4_wkup_hwmod, |
| 928 | &omap2430_mpu_hwmod, | 2671 | &omap2430_mpu_hwmod, |
| 929 | &omap2430_iva_hwmod, | 2672 | &omap2430_iva_hwmod, |
| 2673 | |||
| 2674 | &omap2430_timer1_hwmod, | ||
| 2675 | &omap2430_timer2_hwmod, | ||
| 2676 | &omap2430_timer3_hwmod, | ||
| 2677 | &omap2430_timer4_hwmod, | ||
| 2678 | &omap2430_timer5_hwmod, | ||
| 2679 | &omap2430_timer6_hwmod, | ||
| 2680 | &omap2430_timer7_hwmod, | ||
| 2681 | &omap2430_timer8_hwmod, | ||
| 2682 | &omap2430_timer9_hwmod, | ||
| 2683 | &omap2430_timer10_hwmod, | ||
| 2684 | &omap2430_timer11_hwmod, | ||
| 2685 | &omap2430_timer12_hwmod, | ||
| 2686 | |||
| 930 | &omap2430_wd_timer2_hwmod, | 2687 | &omap2430_wd_timer2_hwmod, |
| 931 | &omap2430_uart1_hwmod, | 2688 | &omap2430_uart1_hwmod, |
| 932 | &omap2430_uart2_hwmod, | 2689 | &omap2430_uart2_hwmod, |
| 933 | &omap2430_uart3_hwmod, | 2690 | &omap2430_uart3_hwmod, |
| 2691 | /* dss class */ | ||
| 2692 | &omap2430_dss_core_hwmod, | ||
| 2693 | &omap2430_dss_dispc_hwmod, | ||
| 2694 | &omap2430_dss_rfbi_hwmod, | ||
| 2695 | &omap2430_dss_venc_hwmod, | ||
| 2696 | /* i2c class */ | ||
| 934 | &omap2430_i2c1_hwmod, | 2697 | &omap2430_i2c1_hwmod, |
| 935 | &omap2430_i2c2_hwmod, | 2698 | &omap2430_i2c2_hwmod, |
| 2699 | &omap2430_mmc1_hwmod, | ||
| 2700 | &omap2430_mmc2_hwmod, | ||
| 936 | 2701 | ||
| 937 | /* gpio class */ | 2702 | /* gpio class */ |
| 938 | &omap2430_gpio1_hwmod, | 2703 | &omap2430_gpio1_hwmod, |
| @@ -943,10 +2708,29 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = { | |||
| 943 | 2708 | ||
| 944 | /* dma_system class*/ | 2709 | /* dma_system class*/ |
| 945 | &omap2430_dma_system_hwmod, | 2710 | &omap2430_dma_system_hwmod, |
| 2711 | |||
| 2712 | /* mcbsp class */ | ||
| 2713 | &omap2430_mcbsp1_hwmod, | ||
| 2714 | &omap2430_mcbsp2_hwmod, | ||
| 2715 | &omap2430_mcbsp3_hwmod, | ||
| 2716 | &omap2430_mcbsp4_hwmod, | ||
| 2717 | &omap2430_mcbsp5_hwmod, | ||
| 2718 | |||
| 2719 | /* mailbox class */ | ||
| 2720 | &omap2430_mailbox_hwmod, | ||
| 2721 | |||
| 2722 | /* mcspi class */ | ||
| 2723 | &omap2430_mcspi1_hwmod, | ||
| 2724 | &omap2430_mcspi2_hwmod, | ||
| 2725 | &omap2430_mcspi3_hwmod, | ||
| 2726 | |||
| 2727 | /* usbotg class*/ | ||
| 2728 | &omap2430_usbhsotg_hwmod, | ||
| 2729 | |||
| 946 | NULL, | 2730 | NULL, |
| 947 | }; | 2731 | }; |
| 948 | 2732 | ||
| 949 | int __init omap2430_hwmod_init(void) | 2733 | int __init omap2430_hwmod_init(void) |
| 950 | { | 2734 | { |
| 951 | return omap_hwmod_init(omap2430_hwmods); | 2735 | return omap_hwmod_register(omap2430_hwmods); |
| 952 | } | 2736 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index acf0d54024ab..17b4fb8c3479 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
| @@ -18,16 +18,22 @@ | |||
| 18 | #include <plat/cpu.h> | 18 | #include <plat/cpu.h> |
| 19 | #include <plat/dma.h> | 19 | #include <plat/dma.h> |
| 20 | #include <plat/serial.h> | 20 | #include <plat/serial.h> |
| 21 | #include <plat/l3_3xxx.h> | ||
| 21 | #include <plat/l4_3xxx.h> | 22 | #include <plat/l4_3xxx.h> |
| 22 | #include <plat/i2c.h> | 23 | #include <plat/i2c.h> |
| 23 | #include <plat/gpio.h> | 24 | #include <plat/gpio.h> |
| 25 | #include <plat/mmc.h> | ||
| 24 | #include <plat/smartreflex.h> | 26 | #include <plat/smartreflex.h> |
| 27 | #include <plat/mcbsp.h> | ||
| 28 | #include <plat/mcspi.h> | ||
| 29 | #include <plat/dmtimer.h> | ||
| 25 | 30 | ||
| 26 | #include "omap_hwmod_common_data.h" | 31 | #include "omap_hwmod_common_data.h" |
| 27 | 32 | ||
| 28 | #include "prm-regbits-34xx.h" | 33 | #include "prm-regbits-34xx.h" |
| 29 | #include "cm-regbits-34xx.h" | 34 | #include "cm-regbits-34xx.h" |
| 30 | #include "wd_timer.h" | 35 | #include "wd_timer.h" |
| 36 | #include <mach/am35xx.h> | ||
| 31 | 37 | ||
| 32 | /* | 38 | /* |
| 33 | * OMAP3xxx hardware module integration data | 39 | * OMAP3xxx hardware module integration data |
| @@ -44,6 +50,12 @@ static struct omap_hwmod omap3xxx_l3_main_hwmod; | |||
| 44 | static struct omap_hwmod omap3xxx_l4_core_hwmod; | 50 | static struct omap_hwmod omap3xxx_l4_core_hwmod; |
| 45 | static struct omap_hwmod omap3xxx_l4_per_hwmod; | 51 | static struct omap_hwmod omap3xxx_l4_per_hwmod; |
| 46 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod; | 52 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod; |
| 53 | static struct omap_hwmod omap3430es1_dss_core_hwmod; | ||
| 54 | static struct omap_hwmod omap3xxx_dss_core_hwmod; | ||
| 55 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod; | ||
| 56 | static struct omap_hwmod omap3xxx_dss_dsi1_hwmod; | ||
| 57 | static struct omap_hwmod omap3xxx_dss_rfbi_hwmod; | ||
| 58 | static struct omap_hwmod omap3xxx_dss_venc_hwmod; | ||
| 47 | static struct omap_hwmod omap3xxx_i2c1_hwmod; | 59 | static struct omap_hwmod omap3xxx_i2c1_hwmod; |
| 48 | static struct omap_hwmod omap3xxx_i2c2_hwmod; | 60 | static struct omap_hwmod omap3xxx_i2c2_hwmod; |
| 49 | static struct omap_hwmod omap3xxx_i2c3_hwmod; | 61 | static struct omap_hwmod omap3xxx_i2c3_hwmod; |
| @@ -55,9 +67,25 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod; | |||
| 55 | static struct omap_hwmod omap3xxx_gpio6_hwmod; | 67 | static struct omap_hwmod omap3xxx_gpio6_hwmod; |
| 56 | static struct omap_hwmod omap34xx_sr1_hwmod; | 68 | static struct omap_hwmod omap34xx_sr1_hwmod; |
| 57 | static struct omap_hwmod omap34xx_sr2_hwmod; | 69 | static struct omap_hwmod omap34xx_sr2_hwmod; |
| 70 | static struct omap_hwmod omap34xx_mcspi1; | ||
| 71 | static struct omap_hwmod omap34xx_mcspi2; | ||
| 72 | static struct omap_hwmod omap34xx_mcspi3; | ||
| 73 | static struct omap_hwmod omap34xx_mcspi4; | ||
| 74 | static struct omap_hwmod omap3xxx_mmc1_hwmod; | ||
| 75 | static struct omap_hwmod omap3xxx_mmc2_hwmod; | ||
| 76 | static struct omap_hwmod omap3xxx_mmc3_hwmod; | ||
| 77 | static struct omap_hwmod am35xx_usbhsotg_hwmod; | ||
| 58 | 78 | ||
| 59 | static struct omap_hwmod omap3xxx_dma_system_hwmod; | 79 | static struct omap_hwmod omap3xxx_dma_system_hwmod; |
| 60 | 80 | ||
| 81 | static struct omap_hwmod omap3xxx_mcbsp1_hwmod; | ||
| 82 | static struct omap_hwmod omap3xxx_mcbsp2_hwmod; | ||
| 83 | static struct omap_hwmod omap3xxx_mcbsp3_hwmod; | ||
| 84 | static struct omap_hwmod omap3xxx_mcbsp4_hwmod; | ||
| 85 | static struct omap_hwmod omap3xxx_mcbsp5_hwmod; | ||
| 86 | static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod; | ||
| 87 | static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod; | ||
| 88 | |||
| 61 | /* L3 -> L4_CORE interface */ | 89 | /* L3 -> L4_CORE interface */ |
| 62 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { | 90 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { |
| 63 | .master = &omap3xxx_l3_main_hwmod, | 91 | .master = &omap3xxx_l3_main_hwmod, |
| @@ -72,10 +100,26 @@ static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = { | |||
| 72 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 100 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 73 | }; | 101 | }; |
| 74 | 102 | ||
| 103 | /* L3 taret configuration and error log registers */ | ||
| 104 | static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = { | ||
| 105 | { .irq = INT_34XX_L3_DBG_IRQ }, | ||
| 106 | { .irq = INT_34XX_L3_APP_IRQ }, | ||
| 107 | }; | ||
| 108 | |||
| 109 | static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = { | ||
| 110 | { | ||
| 111 | .pa_start = 0x68000000, | ||
| 112 | .pa_end = 0x6800ffff, | ||
| 113 | .flags = ADDR_TYPE_RT, | ||
| 114 | }, | ||
| 115 | }; | ||
| 116 | |||
| 75 | /* MPU -> L3 interface */ | 117 | /* MPU -> L3 interface */ |
| 76 | static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = { | 118 | static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = { |
| 77 | .master = &omap3xxx_mpu_hwmod, | 119 | .master = &omap3xxx_mpu_hwmod, |
| 78 | .slave = &omap3xxx_l3_main_hwmod, | 120 | .slave = &omap3xxx_l3_main_hwmod, |
| 121 | .addr = omap3xxx_l3_main_addrs, | ||
| 122 | .addr_cnt = ARRAY_SIZE(omap3xxx_l3_main_addrs), | ||
| 79 | .user = OCP_USER_MPU, | 123 | .user = OCP_USER_MPU, |
| 80 | }; | 124 | }; |
| 81 | 125 | ||
| @@ -84,6 +128,19 @@ static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = { | |||
| 84 | &omap3xxx_mpu__l3_main, | 128 | &omap3xxx_mpu__l3_main, |
| 85 | }; | 129 | }; |
| 86 | 130 | ||
| 131 | /* DSS -> l3 */ | ||
| 132 | static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = { | ||
| 133 | .master = &omap3xxx_dss_core_hwmod, | ||
| 134 | .slave = &omap3xxx_l3_main_hwmod, | ||
| 135 | .fw = { | ||
| 136 | .omap2 = { | ||
| 137 | .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS, | ||
| 138 | .flags = OMAP_FIREWALL_L3, | ||
| 139 | } | ||
| 140 | }, | ||
| 141 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 142 | }; | ||
| 143 | |||
| 87 | /* Master interfaces on the L3 interconnect */ | 144 | /* Master interfaces on the L3 interconnect */ |
| 88 | static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = { | 145 | static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = { |
| 89 | &omap3xxx_l3_main__l4_core, | 146 | &omap3xxx_l3_main__l4_core, |
| @@ -94,6 +151,8 @@ static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = { | |||
| 94 | static struct omap_hwmod omap3xxx_l3_main_hwmod = { | 151 | static struct omap_hwmod omap3xxx_l3_main_hwmod = { |
| 95 | .name = "l3_main", | 152 | .name = "l3_main", |
| 96 | .class = &l3_hwmod_class, | 153 | .class = &l3_hwmod_class, |
| 154 | .mpu_irqs = omap3xxx_l3_main_irqs, | ||
| 155 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_l3_main_irqs), | ||
| 97 | .masters = omap3xxx_l3_main_masters, | 156 | .masters = omap3xxx_l3_main_masters, |
| 98 | .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters), | 157 | .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters), |
| 99 | .slaves = omap3xxx_l3_main_slaves, | 158 | .slaves = omap3xxx_l3_main_slaves, |
| @@ -107,7 +166,23 @@ static struct omap_hwmod omap3xxx_uart1_hwmod; | |||
| 107 | static struct omap_hwmod omap3xxx_uart2_hwmod; | 166 | static struct omap_hwmod omap3xxx_uart2_hwmod; |
| 108 | static struct omap_hwmod omap3xxx_uart3_hwmod; | 167 | static struct omap_hwmod omap3xxx_uart3_hwmod; |
| 109 | static struct omap_hwmod omap3xxx_uart4_hwmod; | 168 | static struct omap_hwmod omap3xxx_uart4_hwmod; |
| 169 | static struct omap_hwmod omap3xxx_usbhsotg_hwmod; | ||
| 110 | 170 | ||
| 171 | /* l3_core -> usbhsotg interface */ | ||
| 172 | static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = { | ||
| 173 | .master = &omap3xxx_usbhsotg_hwmod, | ||
| 174 | .slave = &omap3xxx_l3_main_hwmod, | ||
| 175 | .clk = "core_l3_ick", | ||
| 176 | .user = OCP_USER_MPU, | ||
| 177 | }; | ||
| 178 | |||
| 179 | /* l3_core -> am35xx_usbhsotg interface */ | ||
| 180 | static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = { | ||
| 181 | .master = &am35xx_usbhsotg_hwmod, | ||
| 182 | .slave = &omap3xxx_l3_main_hwmod, | ||
| 183 | .clk = "core_l3_ick", | ||
| 184 | .user = OCP_USER_MPU, | ||
| 185 | }; | ||
| 111 | /* L4_CORE -> L4_WKUP interface */ | 186 | /* L4_CORE -> L4_WKUP interface */ |
| 112 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { | 187 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { |
| 113 | .master = &omap3xxx_l4_core_hwmod, | 188 | .master = &omap3xxx_l4_core_hwmod, |
| @@ -115,6 +190,63 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { | |||
| 115 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 190 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 116 | }; | 191 | }; |
| 117 | 192 | ||
| 193 | /* L4 CORE -> MMC1 interface */ | ||
| 194 | static struct omap_hwmod_addr_space omap3xxx_mmc1_addr_space[] = { | ||
| 195 | { | ||
| 196 | .pa_start = 0x4809c000, | ||
| 197 | .pa_end = 0x4809c1ff, | ||
| 198 | .flags = ADDR_TYPE_RT, | ||
| 199 | }, | ||
| 200 | }; | ||
| 201 | |||
| 202 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = { | ||
| 203 | .master = &omap3xxx_l4_core_hwmod, | ||
| 204 | .slave = &omap3xxx_mmc1_hwmod, | ||
| 205 | .clk = "mmchs1_ick", | ||
| 206 | .addr = omap3xxx_mmc1_addr_space, | ||
| 207 | .addr_cnt = ARRAY_SIZE(omap3xxx_mmc1_addr_space), | ||
| 208 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 209 | .flags = OMAP_FIREWALL_L4 | ||
| 210 | }; | ||
| 211 | |||
| 212 | /* L4 CORE -> MMC2 interface */ | ||
| 213 | static struct omap_hwmod_addr_space omap3xxx_mmc2_addr_space[] = { | ||
| 214 | { | ||
| 215 | .pa_start = 0x480b4000, | ||
| 216 | .pa_end = 0x480b41ff, | ||
| 217 | .flags = ADDR_TYPE_RT, | ||
| 218 | }, | ||
| 219 | }; | ||
| 220 | |||
| 221 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = { | ||
| 222 | .master = &omap3xxx_l4_core_hwmod, | ||
| 223 | .slave = &omap3xxx_mmc2_hwmod, | ||
| 224 | .clk = "mmchs2_ick", | ||
| 225 | .addr = omap3xxx_mmc2_addr_space, | ||
| 226 | .addr_cnt = ARRAY_SIZE(omap3xxx_mmc2_addr_space), | ||
| 227 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 228 | .flags = OMAP_FIREWALL_L4 | ||
| 229 | }; | ||
| 230 | |||
| 231 | /* L4 CORE -> MMC3 interface */ | ||
| 232 | static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = { | ||
| 233 | { | ||
| 234 | .pa_start = 0x480ad000, | ||
| 235 | .pa_end = 0x480ad1ff, | ||
| 236 | .flags = ADDR_TYPE_RT, | ||
| 237 | }, | ||
| 238 | }; | ||
| 239 | |||
| 240 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = { | ||
| 241 | .master = &omap3xxx_l4_core_hwmod, | ||
| 242 | .slave = &omap3xxx_mmc3_hwmod, | ||
| 243 | .clk = "mmchs3_ick", | ||
| 244 | .addr = omap3xxx_mmc3_addr_space, | ||
| 245 | .addr_cnt = ARRAY_SIZE(omap3xxx_mmc3_addr_space), | ||
| 246 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 247 | .flags = OMAP_FIREWALL_L4 | ||
| 248 | }; | ||
| 249 | |||
| 118 | /* L4 CORE -> UART1 interface */ | 250 | /* L4 CORE -> UART1 interface */ |
| 119 | static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = { | 251 | static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = { |
| 120 | { | 252 | { |
| @@ -301,29 +433,70 @@ static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = { | |||
| 301 | .user = OCP_USER_MPU, | 433 | .user = OCP_USER_MPU, |
| 302 | }; | 434 | }; |
| 303 | 435 | ||
| 436 | /* | ||
| 437 | * usbhsotg interface data | ||
| 438 | */ | ||
| 439 | |||
| 440 | static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = { | ||
| 441 | { | ||
| 442 | .pa_start = OMAP34XX_HSUSB_OTG_BASE, | ||
| 443 | .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1, | ||
| 444 | .flags = ADDR_TYPE_RT | ||
| 445 | }, | ||
| 446 | }; | ||
| 447 | |||
| 448 | /* l4_core -> usbhsotg */ | ||
| 449 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = { | ||
| 450 | .master = &omap3xxx_l4_core_hwmod, | ||
| 451 | .slave = &omap3xxx_usbhsotg_hwmod, | ||
| 452 | .clk = "l4_ick", | ||
| 453 | .addr = omap3xxx_usbhsotg_addrs, | ||
| 454 | .addr_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_addrs), | ||
| 455 | .user = OCP_USER_MPU, | ||
| 456 | }; | ||
| 457 | |||
| 458 | static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = { | ||
| 459 | &omap3xxx_usbhsotg__l3, | ||
| 460 | }; | ||
| 461 | |||
| 462 | static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = { | ||
| 463 | &omap3xxx_l4_core__usbhsotg, | ||
| 464 | }; | ||
| 465 | |||
| 466 | static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = { | ||
| 467 | { | ||
| 468 | .pa_start = AM35XX_IPSS_USBOTGSS_BASE, | ||
| 469 | .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1, | ||
| 470 | .flags = ADDR_TYPE_RT | ||
| 471 | }, | ||
| 472 | }; | ||
| 473 | |||
| 474 | /* l4_core -> usbhsotg */ | ||
| 475 | static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = { | ||
| 476 | .master = &omap3xxx_l4_core_hwmod, | ||
| 477 | .slave = &am35xx_usbhsotg_hwmod, | ||
| 478 | .clk = "l4_ick", | ||
| 479 | .addr = am35xx_usbhsotg_addrs, | ||
| 480 | .addr_cnt = ARRAY_SIZE(am35xx_usbhsotg_addrs), | ||
| 481 | .user = OCP_USER_MPU, | ||
| 482 | }; | ||
| 483 | |||
| 484 | static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = { | ||
| 485 | &am35xx_usbhsotg__l3, | ||
| 486 | }; | ||
| 487 | |||
| 488 | static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = { | ||
| 489 | &am35xx_l4_core__usbhsotg, | ||
| 490 | }; | ||
| 304 | /* Slave interfaces on the L4_CORE interconnect */ | 491 | /* Slave interfaces on the L4_CORE interconnect */ |
| 305 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = { | 492 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = { |
| 306 | &omap3xxx_l3_main__l4_core, | 493 | &omap3xxx_l3_main__l4_core, |
| 307 | &omap3_l4_core__sr1, | ||
| 308 | &omap3_l4_core__sr2, | ||
| 309 | }; | ||
| 310 | |||
| 311 | /* Master interfaces on the L4_CORE interconnect */ | ||
| 312 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = { | ||
| 313 | &omap3xxx_l4_core__l4_wkup, | ||
| 314 | &omap3_l4_core__uart1, | ||
| 315 | &omap3_l4_core__uart2, | ||
| 316 | &omap3_l4_core__i2c1, | ||
| 317 | &omap3_l4_core__i2c2, | ||
| 318 | &omap3_l4_core__i2c3, | ||
| 319 | }; | 494 | }; |
| 320 | 495 | ||
| 321 | /* L4 CORE */ | 496 | /* L4 CORE */ |
| 322 | static struct omap_hwmod omap3xxx_l4_core_hwmod = { | 497 | static struct omap_hwmod omap3xxx_l4_core_hwmod = { |
| 323 | .name = "l4_core", | 498 | .name = "l4_core", |
| 324 | .class = &l4_hwmod_class, | 499 | .class = &l4_hwmod_class, |
| 325 | .masters = omap3xxx_l4_core_masters, | ||
| 326 | .masters_cnt = ARRAY_SIZE(omap3xxx_l4_core_masters), | ||
| 327 | .slaves = omap3xxx_l4_core_slaves, | 500 | .slaves = omap3xxx_l4_core_slaves, |
| 328 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves), | 501 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves), |
| 329 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | 502 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
| @@ -335,18 +508,10 @@ static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = { | |||
| 335 | &omap3xxx_l3_main__l4_per, | 508 | &omap3xxx_l3_main__l4_per, |
| 336 | }; | 509 | }; |
| 337 | 510 | ||
| 338 | /* Master interfaces on the L4_PER interconnect */ | ||
| 339 | static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = { | ||
| 340 | &omap3_l4_per__uart3, | ||
| 341 | &omap3_l4_per__uart4, | ||
| 342 | }; | ||
| 343 | |||
| 344 | /* L4 PER */ | 511 | /* L4 PER */ |
| 345 | static struct omap_hwmod omap3xxx_l4_per_hwmod = { | 512 | static struct omap_hwmod omap3xxx_l4_per_hwmod = { |
| 346 | .name = "l4_per", | 513 | .name = "l4_per", |
| 347 | .class = &l4_hwmod_class, | 514 | .class = &l4_hwmod_class, |
| 348 | .masters = omap3xxx_l4_per_masters, | ||
| 349 | .masters_cnt = ARRAY_SIZE(omap3xxx_l4_per_masters), | ||
| 350 | .slaves = omap3xxx_l4_per_slaves, | 515 | .slaves = omap3xxx_l4_per_slaves, |
| 351 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves), | 516 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves), |
| 352 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | 517 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
| @@ -358,16 +523,10 @@ static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = { | |||
| 358 | &omap3xxx_l4_core__l4_wkup, | 523 | &omap3xxx_l4_core__l4_wkup, |
| 359 | }; | 524 | }; |
| 360 | 525 | ||
| 361 | /* Master interfaces on the L4_WKUP interconnect */ | ||
| 362 | static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_masters[] = { | ||
| 363 | }; | ||
| 364 | |||
| 365 | /* L4 WKUP */ | 526 | /* L4 WKUP */ |
| 366 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod = { | 527 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod = { |
| 367 | .name = "l4_wkup", | 528 | .name = "l4_wkup", |
| 368 | .class = &l4_hwmod_class, | 529 | .class = &l4_hwmod_class, |
| 369 | .masters = omap3xxx_l4_wkup_masters, | ||
| 370 | .masters_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_masters), | ||
| 371 | .slaves = omap3xxx_l4_wkup_slaves, | 530 | .slaves = omap3xxx_l4_wkup_slaves, |
| 372 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves), | 531 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves), |
| 373 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | 532 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
| @@ -417,6 +576,640 @@ static struct omap_hwmod omap3xxx_iva_hwmod = { | |||
| 417 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | 576 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) |
| 418 | }; | 577 | }; |
| 419 | 578 | ||
| 579 | /* timer class */ | ||
| 580 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = { | ||
| 581 | .rev_offs = 0x0000, | ||
| 582 | .sysc_offs = 0x0010, | ||
| 583 | .syss_offs = 0x0014, | ||
| 584 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | ||
| 585 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
| 586 | SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE), | ||
| 587 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 588 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 589 | }; | ||
| 590 | |||
| 591 | static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = { | ||
| 592 | .name = "timer", | ||
| 593 | .sysc = &omap3xxx_timer_1ms_sysc, | ||
| 594 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
| 595 | }; | ||
| 596 | |||
| 597 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = { | ||
| 598 | .rev_offs = 0x0000, | ||
| 599 | .sysc_offs = 0x0010, | ||
| 600 | .syss_offs = 0x0014, | ||
| 601 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP | | ||
| 602 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
| 603 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 604 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 605 | }; | ||
| 606 | |||
| 607 | static struct omap_hwmod_class omap3xxx_timer_hwmod_class = { | ||
| 608 | .name = "timer", | ||
| 609 | .sysc = &omap3xxx_timer_sysc, | ||
| 610 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
| 611 | }; | ||
| 612 | |||
| 613 | /* timer1 */ | ||
| 614 | static struct omap_hwmod omap3xxx_timer1_hwmod; | ||
| 615 | static struct omap_hwmod_irq_info omap3xxx_timer1_mpu_irqs[] = { | ||
| 616 | { .irq = 37, }, | ||
| 617 | }; | ||
| 618 | |||
| 619 | static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = { | ||
| 620 | { | ||
| 621 | .pa_start = 0x48318000, | ||
| 622 | .pa_end = 0x48318000 + SZ_1K - 1, | ||
| 623 | .flags = ADDR_TYPE_RT | ||
| 624 | }, | ||
| 625 | }; | ||
| 626 | |||
| 627 | /* l4_wkup -> timer1 */ | ||
| 628 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = { | ||
| 629 | .master = &omap3xxx_l4_wkup_hwmod, | ||
| 630 | .slave = &omap3xxx_timer1_hwmod, | ||
| 631 | .clk = "gpt1_ick", | ||
| 632 | .addr = omap3xxx_timer1_addrs, | ||
| 633 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer1_addrs), | ||
| 634 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 635 | }; | ||
| 636 | |||
| 637 | /* timer1 slave port */ | ||
| 638 | static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = { | ||
| 639 | &omap3xxx_l4_wkup__timer1, | ||
| 640 | }; | ||
| 641 | |||
| 642 | /* timer1 hwmod */ | ||
| 643 | static struct omap_hwmod omap3xxx_timer1_hwmod = { | ||
| 644 | .name = "timer1", | ||
| 645 | .mpu_irqs = omap3xxx_timer1_mpu_irqs, | ||
| 646 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer1_mpu_irqs), | ||
| 647 | .main_clk = "gpt1_fck", | ||
| 648 | .prcm = { | ||
| 649 | .omap2 = { | ||
| 650 | .prcm_reg_id = 1, | ||
| 651 | .module_bit = OMAP3430_EN_GPT1_SHIFT, | ||
| 652 | .module_offs = WKUP_MOD, | ||
| 653 | .idlest_reg_id = 1, | ||
| 654 | .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT, | ||
| 655 | }, | ||
| 656 | }, | ||
| 657 | .slaves = omap3xxx_timer1_slaves, | ||
| 658 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer1_slaves), | ||
| 659 | .class = &omap3xxx_timer_1ms_hwmod_class, | ||
| 660 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
| 661 | }; | ||
| 662 | |||
| 663 | /* timer2 */ | ||
| 664 | static struct omap_hwmod omap3xxx_timer2_hwmod; | ||
| 665 | static struct omap_hwmod_irq_info omap3xxx_timer2_mpu_irqs[] = { | ||
| 666 | { .irq = 38, }, | ||
| 667 | }; | ||
| 668 | |||
| 669 | static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = { | ||
| 670 | { | ||
| 671 | .pa_start = 0x49032000, | ||
| 672 | .pa_end = 0x49032000 + SZ_1K - 1, | ||
| 673 | .flags = ADDR_TYPE_RT | ||
| 674 | }, | ||
| 675 | }; | ||
| 676 | |||
| 677 | /* l4_per -> timer2 */ | ||
| 678 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = { | ||
| 679 | .master = &omap3xxx_l4_per_hwmod, | ||
| 680 | .slave = &omap3xxx_timer2_hwmod, | ||
| 681 | .clk = "gpt2_ick", | ||
| 682 | .addr = omap3xxx_timer2_addrs, | ||
| 683 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer2_addrs), | ||
| 684 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 685 | }; | ||
| 686 | |||
| 687 | /* timer2 slave port */ | ||
| 688 | static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = { | ||
| 689 | &omap3xxx_l4_per__timer2, | ||
| 690 | }; | ||
| 691 | |||
| 692 | /* timer2 hwmod */ | ||
| 693 | static struct omap_hwmod omap3xxx_timer2_hwmod = { | ||
| 694 | .name = "timer2", | ||
| 695 | .mpu_irqs = omap3xxx_timer2_mpu_irqs, | ||
| 696 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer2_mpu_irqs), | ||
| 697 | .main_clk = "gpt2_fck", | ||
| 698 | .prcm = { | ||
| 699 | .omap2 = { | ||
| 700 | .prcm_reg_id = 1, | ||
| 701 | .module_bit = OMAP3430_EN_GPT2_SHIFT, | ||
| 702 | .module_offs = OMAP3430_PER_MOD, | ||
| 703 | .idlest_reg_id = 1, | ||
| 704 | .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT, | ||
| 705 | }, | ||
| 706 | }, | ||
| 707 | .slaves = omap3xxx_timer2_slaves, | ||
| 708 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer2_slaves), | ||
| 709 | .class = &omap3xxx_timer_1ms_hwmod_class, | ||
| 710 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
| 711 | }; | ||
| 712 | |||
| 713 | /* timer3 */ | ||
| 714 | static struct omap_hwmod omap3xxx_timer3_hwmod; | ||
| 715 | static struct omap_hwmod_irq_info omap3xxx_timer3_mpu_irqs[] = { | ||
| 716 | { .irq = 39, }, | ||
| 717 | }; | ||
| 718 | |||
| 719 | static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = { | ||
| 720 | { | ||
| 721 | .pa_start = 0x49034000, | ||
| 722 | .pa_end = 0x49034000 + SZ_1K - 1, | ||
| 723 | .flags = ADDR_TYPE_RT | ||
| 724 | }, | ||
| 725 | }; | ||
| 726 | |||
| 727 | /* l4_per -> timer3 */ | ||
| 728 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = { | ||
| 729 | .master = &omap3xxx_l4_per_hwmod, | ||
| 730 | .slave = &omap3xxx_timer3_hwmod, | ||
| 731 | .clk = "gpt3_ick", | ||
| 732 | .addr = omap3xxx_timer3_addrs, | ||
| 733 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer3_addrs), | ||
| 734 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 735 | }; | ||
| 736 | |||
| 737 | /* timer3 slave port */ | ||
| 738 | static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = { | ||
| 739 | &omap3xxx_l4_per__timer3, | ||
| 740 | }; | ||
| 741 | |||
| 742 | /* timer3 hwmod */ | ||
| 743 | static struct omap_hwmod omap3xxx_timer3_hwmod = { | ||
| 744 | .name = "timer3", | ||
| 745 | .mpu_irqs = omap3xxx_timer3_mpu_irqs, | ||
| 746 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer3_mpu_irqs), | ||
| 747 | .main_clk = "gpt3_fck", | ||
| 748 | .prcm = { | ||
| 749 | .omap2 = { | ||
| 750 | .prcm_reg_id = 1, | ||
| 751 | .module_bit = OMAP3430_EN_GPT3_SHIFT, | ||
| 752 | .module_offs = OMAP3430_PER_MOD, | ||
| 753 | .idlest_reg_id = 1, | ||
| 754 | .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT, | ||
| 755 | }, | ||
| 756 | }, | ||
| 757 | .slaves = omap3xxx_timer3_slaves, | ||
| 758 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer3_slaves), | ||
| 759 | .class = &omap3xxx_timer_hwmod_class, | ||
| 760 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
| 761 | }; | ||
| 762 | |||
| 763 | /* timer4 */ | ||
| 764 | static struct omap_hwmod omap3xxx_timer4_hwmod; | ||
| 765 | static struct omap_hwmod_irq_info omap3xxx_timer4_mpu_irqs[] = { | ||
| 766 | { .irq = 40, }, | ||
| 767 | }; | ||
| 768 | |||
| 769 | static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = { | ||
| 770 | { | ||
| 771 | .pa_start = 0x49036000, | ||
| 772 | .pa_end = 0x49036000 + SZ_1K - 1, | ||
| 773 | .flags = ADDR_TYPE_RT | ||
| 774 | }, | ||
| 775 | }; | ||
| 776 | |||
| 777 | /* l4_per -> timer4 */ | ||
| 778 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = { | ||
| 779 | .master = &omap3xxx_l4_per_hwmod, | ||
| 780 | .slave = &omap3xxx_timer4_hwmod, | ||
| 781 | .clk = "gpt4_ick", | ||
| 782 | .addr = omap3xxx_timer4_addrs, | ||
| 783 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer4_addrs), | ||
| 784 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 785 | }; | ||
| 786 | |||
| 787 | /* timer4 slave port */ | ||
| 788 | static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = { | ||
| 789 | &omap3xxx_l4_per__timer4, | ||
| 790 | }; | ||
| 791 | |||
| 792 | /* timer4 hwmod */ | ||
| 793 | static struct omap_hwmod omap3xxx_timer4_hwmod = { | ||
| 794 | .name = "timer4", | ||
| 795 | .mpu_irqs = omap3xxx_timer4_mpu_irqs, | ||
| 796 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer4_mpu_irqs), | ||
| 797 | .main_clk = "gpt4_fck", | ||
| 798 | .prcm = { | ||
| 799 | .omap2 = { | ||
| 800 | .prcm_reg_id = 1, | ||
| 801 | .module_bit = OMAP3430_EN_GPT4_SHIFT, | ||
| 802 | .module_offs = OMAP3430_PER_MOD, | ||
| 803 | .idlest_reg_id = 1, | ||
| 804 | .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT, | ||
| 805 | }, | ||
| 806 | }, | ||
| 807 | .slaves = omap3xxx_timer4_slaves, | ||
| 808 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer4_slaves), | ||
| 809 | .class = &omap3xxx_timer_hwmod_class, | ||
| 810 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
| 811 | }; | ||
| 812 | |||
| 813 | /* timer5 */ | ||
| 814 | static struct omap_hwmod omap3xxx_timer5_hwmod; | ||
| 815 | static struct omap_hwmod_irq_info omap3xxx_timer5_mpu_irqs[] = { | ||
| 816 | { .irq = 41, }, | ||
| 817 | }; | ||
| 818 | |||
| 819 | static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = { | ||
| 820 | { | ||
| 821 | .pa_start = 0x49038000, | ||
| 822 | .pa_end = 0x49038000 + SZ_1K - 1, | ||
| 823 | .flags = ADDR_TYPE_RT | ||
| 824 | }, | ||
| 825 | }; | ||
| 826 | |||
| 827 | /* l4_per -> timer5 */ | ||
| 828 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = { | ||
| 829 | .master = &omap3xxx_l4_per_hwmod, | ||
| 830 | .slave = &omap3xxx_timer5_hwmod, | ||
| 831 | .clk = "gpt5_ick", | ||
| 832 | .addr = omap3xxx_timer5_addrs, | ||
| 833 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer5_addrs), | ||
| 834 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 835 | }; | ||
| 836 | |||
| 837 | /* timer5 slave port */ | ||
| 838 | static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = { | ||
| 839 | &omap3xxx_l4_per__timer5, | ||
| 840 | }; | ||
| 841 | |||
| 842 | /* timer5 hwmod */ | ||
| 843 | static struct omap_hwmod omap3xxx_timer5_hwmod = { | ||
| 844 | .name = "timer5", | ||
| 845 | .mpu_irqs = omap3xxx_timer5_mpu_irqs, | ||
| 846 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer5_mpu_irqs), | ||
| 847 | .main_clk = "gpt5_fck", | ||
| 848 | .prcm = { | ||
| 849 | .omap2 = { | ||
| 850 | .prcm_reg_id = 1, | ||
| 851 | .module_bit = OMAP3430_EN_GPT5_SHIFT, | ||
| 852 | .module_offs = OMAP3430_PER_MOD, | ||
| 853 | .idlest_reg_id = 1, | ||
| 854 | .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT, | ||
| 855 | }, | ||
| 856 | }, | ||
| 857 | .slaves = omap3xxx_timer5_slaves, | ||
| 858 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer5_slaves), | ||
| 859 | .class = &omap3xxx_timer_hwmod_class, | ||
| 860 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
| 861 | }; | ||
| 862 | |||
| 863 | /* timer6 */ | ||
| 864 | static struct omap_hwmod omap3xxx_timer6_hwmod; | ||
| 865 | static struct omap_hwmod_irq_info omap3xxx_timer6_mpu_irqs[] = { | ||
| 866 | { .irq = 42, }, | ||
| 867 | }; | ||
| 868 | |||
| 869 | static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = { | ||
| 870 | { | ||
| 871 | .pa_start = 0x4903A000, | ||
| 872 | .pa_end = 0x4903A000 + SZ_1K - 1, | ||
| 873 | .flags = ADDR_TYPE_RT | ||
| 874 | }, | ||
| 875 | }; | ||
| 876 | |||
| 877 | /* l4_per -> timer6 */ | ||
| 878 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = { | ||
| 879 | .master = &omap3xxx_l4_per_hwmod, | ||
| 880 | .slave = &omap3xxx_timer6_hwmod, | ||
| 881 | .clk = "gpt6_ick", | ||
| 882 | .addr = omap3xxx_timer6_addrs, | ||
| 883 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer6_addrs), | ||
| 884 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 885 | }; | ||
| 886 | |||
| 887 | /* timer6 slave port */ | ||
| 888 | static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = { | ||
| 889 | &omap3xxx_l4_per__timer6, | ||
| 890 | }; | ||
| 891 | |||
| 892 | /* timer6 hwmod */ | ||
| 893 | static struct omap_hwmod omap3xxx_timer6_hwmod = { | ||
| 894 | .name = "timer6", | ||
| 895 | .mpu_irqs = omap3xxx_timer6_mpu_irqs, | ||
| 896 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer6_mpu_irqs), | ||
| 897 | .main_clk = "gpt6_fck", | ||
| 898 | .prcm = { | ||
| 899 | .omap2 = { | ||
| 900 | .prcm_reg_id = 1, | ||
| 901 | .module_bit = OMAP3430_EN_GPT6_SHIFT, | ||
| 902 | .module_offs = OMAP3430_PER_MOD, | ||
| 903 | .idlest_reg_id = 1, | ||
| 904 | .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT, | ||
| 905 | }, | ||
| 906 | }, | ||
| 907 | .slaves = omap3xxx_timer6_slaves, | ||
| 908 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer6_slaves), | ||
| 909 | .class = &omap3xxx_timer_hwmod_class, | ||
| 910 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
| 911 | }; | ||
| 912 | |||
| 913 | /* timer7 */ | ||
| 914 | static struct omap_hwmod omap3xxx_timer7_hwmod; | ||
| 915 | static struct omap_hwmod_irq_info omap3xxx_timer7_mpu_irqs[] = { | ||
| 916 | { .irq = 43, }, | ||
| 917 | }; | ||
| 918 | |||
| 919 | static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = { | ||
| 920 | { | ||
| 921 | .pa_start = 0x4903C000, | ||
| 922 | .pa_end = 0x4903C000 + SZ_1K - 1, | ||
| 923 | .flags = ADDR_TYPE_RT | ||
| 924 | }, | ||
| 925 | }; | ||
| 926 | |||
| 927 | /* l4_per -> timer7 */ | ||
| 928 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = { | ||
| 929 | .master = &omap3xxx_l4_per_hwmod, | ||
| 930 | .slave = &omap3xxx_timer7_hwmod, | ||
| 931 | .clk = "gpt7_ick", | ||
| 932 | .addr = omap3xxx_timer7_addrs, | ||
| 933 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer7_addrs), | ||
| 934 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 935 | }; | ||
| 936 | |||
| 937 | /* timer7 slave port */ | ||
| 938 | static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = { | ||
| 939 | &omap3xxx_l4_per__timer7, | ||
| 940 | }; | ||
| 941 | |||
| 942 | /* timer7 hwmod */ | ||
| 943 | static struct omap_hwmod omap3xxx_timer7_hwmod = { | ||
| 944 | .name = "timer7", | ||
| 945 | .mpu_irqs = omap3xxx_timer7_mpu_irqs, | ||
| 946 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer7_mpu_irqs), | ||
| 947 | .main_clk = "gpt7_fck", | ||
| 948 | .prcm = { | ||
| 949 | .omap2 = { | ||
| 950 | .prcm_reg_id = 1, | ||
| 951 | .module_bit = OMAP3430_EN_GPT7_SHIFT, | ||
| 952 | .module_offs = OMAP3430_PER_MOD, | ||
| 953 | .idlest_reg_id = 1, | ||
| 954 | .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT, | ||
| 955 | }, | ||
| 956 | }, | ||
| 957 | .slaves = omap3xxx_timer7_slaves, | ||
| 958 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer7_slaves), | ||
| 959 | .class = &omap3xxx_timer_hwmod_class, | ||
| 960 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
| 961 | }; | ||
| 962 | |||
| 963 | /* timer8 */ | ||
| 964 | static struct omap_hwmod omap3xxx_timer8_hwmod; | ||
| 965 | static struct omap_hwmod_irq_info omap3xxx_timer8_mpu_irqs[] = { | ||
| 966 | { .irq = 44, }, | ||
| 967 | }; | ||
| 968 | |||
| 969 | static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = { | ||
| 970 | { | ||
| 971 | .pa_start = 0x4903E000, | ||
| 972 | .pa_end = 0x4903E000 + SZ_1K - 1, | ||
| 973 | .flags = ADDR_TYPE_RT | ||
| 974 | }, | ||
| 975 | }; | ||
| 976 | |||
| 977 | /* l4_per -> timer8 */ | ||
| 978 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = { | ||
| 979 | .master = &omap3xxx_l4_per_hwmod, | ||
| 980 | .slave = &omap3xxx_timer8_hwmod, | ||
| 981 | .clk = "gpt8_ick", | ||
| 982 | .addr = omap3xxx_timer8_addrs, | ||
| 983 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer8_addrs), | ||
| 984 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 985 | }; | ||
| 986 | |||
| 987 | /* timer8 slave port */ | ||
| 988 | static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = { | ||
| 989 | &omap3xxx_l4_per__timer8, | ||
| 990 | }; | ||
| 991 | |||
| 992 | /* timer8 hwmod */ | ||
| 993 | static struct omap_hwmod omap3xxx_timer8_hwmod = { | ||
| 994 | .name = "timer8", | ||
| 995 | .mpu_irqs = omap3xxx_timer8_mpu_irqs, | ||
| 996 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer8_mpu_irqs), | ||
| 997 | .main_clk = "gpt8_fck", | ||
| 998 | .prcm = { | ||
| 999 | .omap2 = { | ||
| 1000 | .prcm_reg_id = 1, | ||
| 1001 | .module_bit = OMAP3430_EN_GPT8_SHIFT, | ||
| 1002 | .module_offs = OMAP3430_PER_MOD, | ||
| 1003 | .idlest_reg_id = 1, | ||
| 1004 | .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT, | ||
| 1005 | }, | ||
| 1006 | }, | ||
| 1007 | .slaves = omap3xxx_timer8_slaves, | ||
| 1008 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer8_slaves), | ||
| 1009 | .class = &omap3xxx_timer_hwmod_class, | ||
| 1010 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
| 1011 | }; | ||
| 1012 | |||
| 1013 | /* timer9 */ | ||
| 1014 | static struct omap_hwmod omap3xxx_timer9_hwmod; | ||
| 1015 | static struct omap_hwmod_irq_info omap3xxx_timer9_mpu_irqs[] = { | ||
| 1016 | { .irq = 45, }, | ||
| 1017 | }; | ||
| 1018 | |||
| 1019 | static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = { | ||
| 1020 | { | ||
| 1021 | .pa_start = 0x49040000, | ||
| 1022 | .pa_end = 0x49040000 + SZ_1K - 1, | ||
| 1023 | .flags = ADDR_TYPE_RT | ||
| 1024 | }, | ||
| 1025 | }; | ||
| 1026 | |||
| 1027 | /* l4_per -> timer9 */ | ||
| 1028 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = { | ||
| 1029 | .master = &omap3xxx_l4_per_hwmod, | ||
| 1030 | .slave = &omap3xxx_timer9_hwmod, | ||
| 1031 | .clk = "gpt9_ick", | ||
| 1032 | .addr = omap3xxx_timer9_addrs, | ||
| 1033 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer9_addrs), | ||
| 1034 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1035 | }; | ||
| 1036 | |||
| 1037 | /* timer9 slave port */ | ||
| 1038 | static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = { | ||
| 1039 | &omap3xxx_l4_per__timer9, | ||
| 1040 | }; | ||
| 1041 | |||
| 1042 | /* timer9 hwmod */ | ||
| 1043 | static struct omap_hwmod omap3xxx_timer9_hwmod = { | ||
| 1044 | .name = "timer9", | ||
| 1045 | .mpu_irqs = omap3xxx_timer9_mpu_irqs, | ||
| 1046 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer9_mpu_irqs), | ||
| 1047 | .main_clk = "gpt9_fck", | ||
| 1048 | .prcm = { | ||
| 1049 | .omap2 = { | ||
| 1050 | .prcm_reg_id = 1, | ||
| 1051 | .module_bit = OMAP3430_EN_GPT9_SHIFT, | ||
| 1052 | .module_offs = OMAP3430_PER_MOD, | ||
| 1053 | .idlest_reg_id = 1, | ||
| 1054 | .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT, | ||
| 1055 | }, | ||
| 1056 | }, | ||
| 1057 | .slaves = omap3xxx_timer9_slaves, | ||
| 1058 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer9_slaves), | ||
| 1059 | .class = &omap3xxx_timer_hwmod_class, | ||
| 1060 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
| 1061 | }; | ||
| 1062 | |||
| 1063 | /* timer10 */ | ||
| 1064 | static struct omap_hwmod omap3xxx_timer10_hwmod; | ||
| 1065 | static struct omap_hwmod_irq_info omap3xxx_timer10_mpu_irqs[] = { | ||
| 1066 | { .irq = 46, }, | ||
| 1067 | }; | ||
| 1068 | |||
| 1069 | static struct omap_hwmod_addr_space omap3xxx_timer10_addrs[] = { | ||
| 1070 | { | ||
| 1071 | .pa_start = 0x48086000, | ||
| 1072 | .pa_end = 0x48086000 + SZ_1K - 1, | ||
| 1073 | .flags = ADDR_TYPE_RT | ||
| 1074 | }, | ||
| 1075 | }; | ||
| 1076 | |||
| 1077 | /* l4_core -> timer10 */ | ||
| 1078 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = { | ||
| 1079 | .master = &omap3xxx_l4_core_hwmod, | ||
| 1080 | .slave = &omap3xxx_timer10_hwmod, | ||
| 1081 | .clk = "gpt10_ick", | ||
| 1082 | .addr = omap3xxx_timer10_addrs, | ||
| 1083 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer10_addrs), | ||
| 1084 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1085 | }; | ||
| 1086 | |||
| 1087 | /* timer10 slave port */ | ||
| 1088 | static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = { | ||
| 1089 | &omap3xxx_l4_core__timer10, | ||
| 1090 | }; | ||
| 1091 | |||
| 1092 | /* timer10 hwmod */ | ||
| 1093 | static struct omap_hwmod omap3xxx_timer10_hwmod = { | ||
| 1094 | .name = "timer10", | ||
| 1095 | .mpu_irqs = omap3xxx_timer10_mpu_irqs, | ||
| 1096 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer10_mpu_irqs), | ||
| 1097 | .main_clk = "gpt10_fck", | ||
| 1098 | .prcm = { | ||
| 1099 | .omap2 = { | ||
| 1100 | .prcm_reg_id = 1, | ||
| 1101 | .module_bit = OMAP3430_EN_GPT10_SHIFT, | ||
| 1102 | .module_offs = CORE_MOD, | ||
| 1103 | .idlest_reg_id = 1, | ||
| 1104 | .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT, | ||
| 1105 | }, | ||
| 1106 | }, | ||
| 1107 | .slaves = omap3xxx_timer10_slaves, | ||
| 1108 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer10_slaves), | ||
| 1109 | .class = &omap3xxx_timer_1ms_hwmod_class, | ||
| 1110 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
| 1111 | }; | ||
| 1112 | |||
| 1113 | /* timer11 */ | ||
| 1114 | static struct omap_hwmod omap3xxx_timer11_hwmod; | ||
| 1115 | static struct omap_hwmod_irq_info omap3xxx_timer11_mpu_irqs[] = { | ||
| 1116 | { .irq = 47, }, | ||
| 1117 | }; | ||
| 1118 | |||
| 1119 | static struct omap_hwmod_addr_space omap3xxx_timer11_addrs[] = { | ||
| 1120 | { | ||
| 1121 | .pa_start = 0x48088000, | ||
| 1122 | .pa_end = 0x48088000 + SZ_1K - 1, | ||
| 1123 | .flags = ADDR_TYPE_RT | ||
| 1124 | }, | ||
| 1125 | }; | ||
| 1126 | |||
| 1127 | /* l4_core -> timer11 */ | ||
| 1128 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = { | ||
| 1129 | .master = &omap3xxx_l4_core_hwmod, | ||
| 1130 | .slave = &omap3xxx_timer11_hwmod, | ||
| 1131 | .clk = "gpt11_ick", | ||
| 1132 | .addr = omap3xxx_timer11_addrs, | ||
| 1133 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer11_addrs), | ||
| 1134 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1135 | }; | ||
| 1136 | |||
| 1137 | /* timer11 slave port */ | ||
| 1138 | static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = { | ||
| 1139 | &omap3xxx_l4_core__timer11, | ||
| 1140 | }; | ||
| 1141 | |||
| 1142 | /* timer11 hwmod */ | ||
| 1143 | static struct omap_hwmod omap3xxx_timer11_hwmod = { | ||
| 1144 | .name = "timer11", | ||
| 1145 | .mpu_irqs = omap3xxx_timer11_mpu_irqs, | ||
| 1146 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer11_mpu_irqs), | ||
| 1147 | .main_clk = "gpt11_fck", | ||
| 1148 | .prcm = { | ||
| 1149 | .omap2 = { | ||
| 1150 | .prcm_reg_id = 1, | ||
| 1151 | .module_bit = OMAP3430_EN_GPT11_SHIFT, | ||
| 1152 | .module_offs = CORE_MOD, | ||
| 1153 | .idlest_reg_id = 1, | ||
| 1154 | .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT, | ||
| 1155 | }, | ||
| 1156 | }, | ||
| 1157 | .slaves = omap3xxx_timer11_slaves, | ||
| 1158 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer11_slaves), | ||
| 1159 | .class = &omap3xxx_timer_hwmod_class, | ||
| 1160 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
| 1161 | }; | ||
| 1162 | |||
| 1163 | /* timer12*/ | ||
| 1164 | static struct omap_hwmod omap3xxx_timer12_hwmod; | ||
| 1165 | static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = { | ||
| 1166 | { .irq = 95, }, | ||
| 1167 | }; | ||
| 1168 | |||
| 1169 | static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = { | ||
| 1170 | { | ||
| 1171 | .pa_start = 0x48304000, | ||
| 1172 | .pa_end = 0x48304000 + SZ_1K - 1, | ||
| 1173 | .flags = ADDR_TYPE_RT | ||
| 1174 | }, | ||
| 1175 | }; | ||
| 1176 | |||
| 1177 | /* l4_core -> timer12 */ | ||
| 1178 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = { | ||
| 1179 | .master = &omap3xxx_l4_core_hwmod, | ||
| 1180 | .slave = &omap3xxx_timer12_hwmod, | ||
| 1181 | .clk = "gpt12_ick", | ||
| 1182 | .addr = omap3xxx_timer12_addrs, | ||
| 1183 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer12_addrs), | ||
| 1184 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1185 | }; | ||
| 1186 | |||
| 1187 | /* timer12 slave port */ | ||
| 1188 | static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = { | ||
| 1189 | &omap3xxx_l4_core__timer12, | ||
| 1190 | }; | ||
| 1191 | |||
| 1192 | /* timer12 hwmod */ | ||
| 1193 | static struct omap_hwmod omap3xxx_timer12_hwmod = { | ||
| 1194 | .name = "timer12", | ||
| 1195 | .mpu_irqs = omap3xxx_timer12_mpu_irqs, | ||
| 1196 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer12_mpu_irqs), | ||
| 1197 | .main_clk = "gpt12_fck", | ||
| 1198 | .prcm = { | ||
| 1199 | .omap2 = { | ||
| 1200 | .prcm_reg_id = 1, | ||
| 1201 | .module_bit = OMAP3430_EN_GPT12_SHIFT, | ||
| 1202 | .module_offs = WKUP_MOD, | ||
| 1203 | .idlest_reg_id = 1, | ||
| 1204 | .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT, | ||
| 1205 | }, | ||
| 1206 | }, | ||
| 1207 | .slaves = omap3xxx_timer12_slaves, | ||
| 1208 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer12_slaves), | ||
| 1209 | .class = &omap3xxx_timer_hwmod_class, | ||
| 1210 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
| 1211 | }; | ||
| 1212 | |||
| 420 | /* l4_wkup -> wd_timer2 */ | 1213 | /* l4_wkup -> wd_timer2 */ |
| 421 | static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = { | 1214 | static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = { |
| 422 | { | 1215 | { |
| @@ -492,6 +1285,11 @@ static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { | |||
| 492 | .slaves = omap3xxx_wd_timer2_slaves, | 1285 | .slaves = omap3xxx_wd_timer2_slaves, |
| 493 | .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves), | 1286 | .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves), |
| 494 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | 1287 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
| 1288 | /* | ||
| 1289 | * XXX: Use software supervised mode, HW supervised smartidle seems to | ||
| 1290 | * block CORE power domain idle transitions. Maybe a HW bug in wdt2? | ||
| 1291 | */ | ||
| 1292 | .flags = HWMOD_SWSUP_SIDLE, | ||
| 495 | }; | 1293 | }; |
| 496 | 1294 | ||
| 497 | /* UART common */ | 1295 | /* UART common */ |
| @@ -665,6 +1463,411 @@ static struct omap_hwmod_class i2c_class = { | |||
| 665 | .sysc = &i2c_sysc, | 1463 | .sysc = &i2c_sysc, |
| 666 | }; | 1464 | }; |
| 667 | 1465 | ||
| 1466 | /* | ||
| 1467 | * 'dss' class | ||
| 1468 | * display sub-system | ||
| 1469 | */ | ||
| 1470 | |||
| 1471 | static struct omap_hwmod_class_sysconfig omap3xxx_dss_sysc = { | ||
| 1472 | .rev_offs = 0x0000, | ||
| 1473 | .sysc_offs = 0x0010, | ||
| 1474 | .syss_offs = 0x0014, | ||
| 1475 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
| 1476 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1477 | }; | ||
| 1478 | |||
| 1479 | static struct omap_hwmod_class omap3xxx_dss_hwmod_class = { | ||
| 1480 | .name = "dss", | ||
| 1481 | .sysc = &omap3xxx_dss_sysc, | ||
| 1482 | }; | ||
| 1483 | |||
| 1484 | /* dss */ | ||
| 1485 | static struct omap_hwmod_irq_info omap3xxx_dss_irqs[] = { | ||
| 1486 | { .irq = 25 }, | ||
| 1487 | }; | ||
| 1488 | |||
| 1489 | static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = { | ||
| 1490 | { .name = "dispc", .dma_req = 5 }, | ||
| 1491 | { .name = "dsi1", .dma_req = 74 }, | ||
| 1492 | }; | ||
| 1493 | |||
| 1494 | /* dss */ | ||
| 1495 | /* dss master ports */ | ||
| 1496 | static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = { | ||
| 1497 | &omap3xxx_dss__l3, | ||
| 1498 | }; | ||
| 1499 | |||
| 1500 | static struct omap_hwmod_addr_space omap3xxx_dss_addrs[] = { | ||
| 1501 | { | ||
| 1502 | .pa_start = 0x48050000, | ||
| 1503 | .pa_end = 0x480503FF, | ||
| 1504 | .flags = ADDR_TYPE_RT | ||
| 1505 | }, | ||
| 1506 | }; | ||
| 1507 | |||
| 1508 | /* l4_core -> dss */ | ||
| 1509 | static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = { | ||
| 1510 | .master = &omap3xxx_l4_core_hwmod, | ||
| 1511 | .slave = &omap3430es1_dss_core_hwmod, | ||
| 1512 | .clk = "dss_ick", | ||
| 1513 | .addr = omap3xxx_dss_addrs, | ||
| 1514 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs), | ||
| 1515 | .fw = { | ||
| 1516 | .omap2 = { | ||
| 1517 | .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION, | ||
| 1518 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
| 1519 | .flags = OMAP_FIREWALL_L4, | ||
| 1520 | } | ||
| 1521 | }, | ||
| 1522 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1523 | }; | ||
| 1524 | |||
| 1525 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = { | ||
| 1526 | .master = &omap3xxx_l4_core_hwmod, | ||
| 1527 | .slave = &omap3xxx_dss_core_hwmod, | ||
| 1528 | .clk = "dss_ick", | ||
| 1529 | .addr = omap3xxx_dss_addrs, | ||
| 1530 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs), | ||
| 1531 | .fw = { | ||
| 1532 | .omap2 = { | ||
| 1533 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION, | ||
| 1534 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
| 1535 | .flags = OMAP_FIREWALL_L4, | ||
| 1536 | } | ||
| 1537 | }, | ||
| 1538 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1539 | }; | ||
| 1540 | |||
| 1541 | /* dss slave ports */ | ||
| 1542 | static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = { | ||
| 1543 | &omap3430es1_l4_core__dss, | ||
| 1544 | }; | ||
| 1545 | |||
| 1546 | static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = { | ||
| 1547 | &omap3xxx_l4_core__dss, | ||
| 1548 | }; | ||
| 1549 | |||
| 1550 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | ||
| 1551 | { .role = "tv_clk", .clk = "dss_tv_fck" }, | ||
| 1552 | { .role = "dssclk", .clk = "dss_96m_fck" }, | ||
| 1553 | { .role = "sys_clk", .clk = "dss2_alwon_fck" }, | ||
| 1554 | }; | ||
| 1555 | |||
| 1556 | static struct omap_hwmod omap3430es1_dss_core_hwmod = { | ||
| 1557 | .name = "dss_core", | ||
| 1558 | .class = &omap3xxx_dss_hwmod_class, | ||
| 1559 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ | ||
| 1560 | .mpu_irqs = omap3xxx_dss_irqs, | ||
| 1561 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dss_irqs), | ||
| 1562 | .sdma_reqs = omap3xxx_dss_sdma_chs, | ||
| 1563 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs), | ||
| 1564 | |||
| 1565 | .prcm = { | ||
| 1566 | .omap2 = { | ||
| 1567 | .prcm_reg_id = 1, | ||
| 1568 | .module_bit = OMAP3430_EN_DSS1_SHIFT, | ||
| 1569 | .module_offs = OMAP3430_DSS_MOD, | ||
| 1570 | .idlest_reg_id = 1, | ||
| 1571 | .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT, | ||
| 1572 | }, | ||
| 1573 | }, | ||
| 1574 | .opt_clks = dss_opt_clks, | ||
| 1575 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | ||
| 1576 | .slaves = omap3430es1_dss_slaves, | ||
| 1577 | .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves), | ||
| 1578 | .masters = omap3xxx_dss_masters, | ||
| 1579 | .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters), | ||
| 1580 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1), | ||
| 1581 | .flags = HWMOD_NO_IDLEST, | ||
| 1582 | }; | ||
| 1583 | |||
| 1584 | static struct omap_hwmod omap3xxx_dss_core_hwmod = { | ||
| 1585 | .name = "dss_core", | ||
| 1586 | .class = &omap3xxx_dss_hwmod_class, | ||
| 1587 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ | ||
| 1588 | .mpu_irqs = omap3xxx_dss_irqs, | ||
| 1589 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dss_irqs), | ||
| 1590 | .sdma_reqs = omap3xxx_dss_sdma_chs, | ||
| 1591 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs), | ||
| 1592 | |||
| 1593 | .prcm = { | ||
| 1594 | .omap2 = { | ||
| 1595 | .prcm_reg_id = 1, | ||
| 1596 | .module_bit = OMAP3430_EN_DSS1_SHIFT, | ||
| 1597 | .module_offs = OMAP3430_DSS_MOD, | ||
| 1598 | .idlest_reg_id = 1, | ||
| 1599 | .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT, | ||
| 1600 | .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT, | ||
| 1601 | }, | ||
| 1602 | }, | ||
| 1603 | .opt_clks = dss_opt_clks, | ||
| 1604 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | ||
| 1605 | .slaves = omap3xxx_dss_slaves, | ||
| 1606 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves), | ||
| 1607 | .masters = omap3xxx_dss_masters, | ||
| 1608 | .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters), | ||
| 1609 | .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2 | | ||
| 1610 | CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1), | ||
| 1611 | }; | ||
| 1612 | |||
| 1613 | /* | ||
| 1614 | * 'dispc' class | ||
| 1615 | * display controller | ||
| 1616 | */ | ||
| 1617 | |||
| 1618 | static struct omap_hwmod_class_sysconfig omap3xxx_dispc_sysc = { | ||
| 1619 | .rev_offs = 0x0000, | ||
| 1620 | .sysc_offs = 0x0010, | ||
| 1621 | .syss_offs = 0x0014, | ||
| 1622 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | ||
| 1623 | SYSC_HAS_MIDLEMODE | SYSC_HAS_ENAWAKEUP | | ||
| 1624 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
| 1625 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 1626 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
| 1627 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1628 | }; | ||
| 1629 | |||
| 1630 | static struct omap_hwmod_class omap3xxx_dispc_hwmod_class = { | ||
| 1631 | .name = "dispc", | ||
| 1632 | .sysc = &omap3xxx_dispc_sysc, | ||
| 1633 | }; | ||
| 1634 | |||
| 1635 | static struct omap_hwmod_addr_space omap3xxx_dss_dispc_addrs[] = { | ||
| 1636 | { | ||
| 1637 | .pa_start = 0x48050400, | ||
| 1638 | .pa_end = 0x480507FF, | ||
| 1639 | .flags = ADDR_TYPE_RT | ||
| 1640 | }, | ||
| 1641 | }; | ||
| 1642 | |||
| 1643 | /* l4_core -> dss_dispc */ | ||
| 1644 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = { | ||
| 1645 | .master = &omap3xxx_l4_core_hwmod, | ||
| 1646 | .slave = &omap3xxx_dss_dispc_hwmod, | ||
| 1647 | .clk = "dss_ick", | ||
| 1648 | .addr = omap3xxx_dss_dispc_addrs, | ||
| 1649 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_addrs), | ||
| 1650 | .fw = { | ||
| 1651 | .omap2 = { | ||
| 1652 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION, | ||
| 1653 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
| 1654 | .flags = OMAP_FIREWALL_L4, | ||
| 1655 | } | ||
| 1656 | }, | ||
| 1657 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1658 | }; | ||
| 1659 | |||
| 1660 | /* dss_dispc slave ports */ | ||
| 1661 | static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = { | ||
| 1662 | &omap3xxx_l4_core__dss_dispc, | ||
| 1663 | }; | ||
| 1664 | |||
| 1665 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { | ||
| 1666 | .name = "dss_dispc", | ||
| 1667 | .class = &omap3xxx_dispc_hwmod_class, | ||
| 1668 | .main_clk = "dss1_alwon_fck", | ||
| 1669 | .prcm = { | ||
| 1670 | .omap2 = { | ||
| 1671 | .prcm_reg_id = 1, | ||
| 1672 | .module_bit = OMAP3430_EN_DSS1_SHIFT, | ||
| 1673 | .module_offs = OMAP3430_DSS_MOD, | ||
| 1674 | }, | ||
| 1675 | }, | ||
| 1676 | .slaves = omap3xxx_dss_dispc_slaves, | ||
| 1677 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves), | ||
| 1678 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 | | ||
| 1679 | CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 | | ||
| 1680 | CHIP_GE_OMAP3630ES1_1), | ||
| 1681 | .flags = HWMOD_NO_IDLEST, | ||
| 1682 | }; | ||
| 1683 | |||
| 1684 | /* | ||
| 1685 | * 'dsi' class | ||
| 1686 | * display serial interface controller | ||
| 1687 | */ | ||
| 1688 | |||
| 1689 | static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = { | ||
| 1690 | .name = "dsi", | ||
| 1691 | }; | ||
| 1692 | |||
| 1693 | /* dss_dsi1 */ | ||
| 1694 | static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = { | ||
| 1695 | { | ||
| 1696 | .pa_start = 0x4804FC00, | ||
| 1697 | .pa_end = 0x4804FFFF, | ||
| 1698 | .flags = ADDR_TYPE_RT | ||
| 1699 | }, | ||
| 1700 | }; | ||
| 1701 | |||
| 1702 | /* l4_core -> dss_dsi1 */ | ||
| 1703 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = { | ||
| 1704 | .master = &omap3xxx_l4_core_hwmod, | ||
| 1705 | .slave = &omap3xxx_dss_dsi1_hwmod, | ||
| 1706 | .addr = omap3xxx_dss_dsi1_addrs, | ||
| 1707 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_addrs), | ||
| 1708 | .fw = { | ||
| 1709 | .omap2 = { | ||
| 1710 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION, | ||
| 1711 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
| 1712 | .flags = OMAP_FIREWALL_L4, | ||
| 1713 | } | ||
| 1714 | }, | ||
| 1715 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1716 | }; | ||
| 1717 | |||
| 1718 | /* dss_dsi1 slave ports */ | ||
| 1719 | static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = { | ||
| 1720 | &omap3xxx_l4_core__dss_dsi1, | ||
| 1721 | }; | ||
| 1722 | |||
| 1723 | static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = { | ||
| 1724 | .name = "dss_dsi1", | ||
| 1725 | .class = &omap3xxx_dsi_hwmod_class, | ||
| 1726 | .main_clk = "dss1_alwon_fck", | ||
| 1727 | .prcm = { | ||
| 1728 | .omap2 = { | ||
| 1729 | .prcm_reg_id = 1, | ||
| 1730 | .module_bit = OMAP3430_EN_DSS1_SHIFT, | ||
| 1731 | .module_offs = OMAP3430_DSS_MOD, | ||
| 1732 | }, | ||
| 1733 | }, | ||
| 1734 | .slaves = omap3xxx_dss_dsi1_slaves, | ||
| 1735 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves), | ||
| 1736 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 | | ||
| 1737 | CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 | | ||
| 1738 | CHIP_GE_OMAP3630ES1_1), | ||
| 1739 | .flags = HWMOD_NO_IDLEST, | ||
| 1740 | }; | ||
| 1741 | |||
| 1742 | /* | ||
| 1743 | * 'rfbi' class | ||
| 1744 | * remote frame buffer interface | ||
| 1745 | */ | ||
| 1746 | |||
| 1747 | static struct omap_hwmod_class_sysconfig omap3xxx_rfbi_sysc = { | ||
| 1748 | .rev_offs = 0x0000, | ||
| 1749 | .sysc_offs = 0x0010, | ||
| 1750 | .syss_offs = 0x0014, | ||
| 1751 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
| 1752 | SYSC_HAS_AUTOIDLE), | ||
| 1753 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 1754 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1755 | }; | ||
| 1756 | |||
| 1757 | static struct omap_hwmod_class omap3xxx_rfbi_hwmod_class = { | ||
| 1758 | .name = "rfbi", | ||
| 1759 | .sysc = &omap3xxx_rfbi_sysc, | ||
| 1760 | }; | ||
| 1761 | |||
| 1762 | static struct omap_hwmod_addr_space omap3xxx_dss_rfbi_addrs[] = { | ||
| 1763 | { | ||
| 1764 | .pa_start = 0x48050800, | ||
| 1765 | .pa_end = 0x48050BFF, | ||
| 1766 | .flags = ADDR_TYPE_RT | ||
| 1767 | }, | ||
| 1768 | }; | ||
| 1769 | |||
| 1770 | /* l4_core -> dss_rfbi */ | ||
| 1771 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = { | ||
| 1772 | .master = &omap3xxx_l4_core_hwmod, | ||
| 1773 | .slave = &omap3xxx_dss_rfbi_hwmod, | ||
| 1774 | .clk = "dss_ick", | ||
| 1775 | .addr = omap3xxx_dss_rfbi_addrs, | ||
| 1776 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_addrs), | ||
| 1777 | .fw = { | ||
| 1778 | .omap2 = { | ||
| 1779 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION, | ||
| 1780 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP , | ||
| 1781 | .flags = OMAP_FIREWALL_L4, | ||
| 1782 | } | ||
| 1783 | }, | ||
| 1784 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1785 | }; | ||
| 1786 | |||
| 1787 | /* dss_rfbi slave ports */ | ||
| 1788 | static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = { | ||
| 1789 | &omap3xxx_l4_core__dss_rfbi, | ||
| 1790 | }; | ||
| 1791 | |||
| 1792 | static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { | ||
| 1793 | .name = "dss_rfbi", | ||
| 1794 | .class = &omap3xxx_rfbi_hwmod_class, | ||
| 1795 | .main_clk = "dss1_alwon_fck", | ||
| 1796 | .prcm = { | ||
| 1797 | .omap2 = { | ||
| 1798 | .prcm_reg_id = 1, | ||
| 1799 | .module_bit = OMAP3430_EN_DSS1_SHIFT, | ||
| 1800 | .module_offs = OMAP3430_DSS_MOD, | ||
| 1801 | }, | ||
| 1802 | }, | ||
| 1803 | .slaves = omap3xxx_dss_rfbi_slaves, | ||
| 1804 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves), | ||
| 1805 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 | | ||
| 1806 | CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 | | ||
| 1807 | CHIP_GE_OMAP3630ES1_1), | ||
| 1808 | .flags = HWMOD_NO_IDLEST, | ||
| 1809 | }; | ||
| 1810 | |||
| 1811 | /* | ||
| 1812 | * 'venc' class | ||
| 1813 | * video encoder | ||
| 1814 | */ | ||
| 1815 | |||
| 1816 | static struct omap_hwmod_class omap3xxx_venc_hwmod_class = { | ||
| 1817 | .name = "venc", | ||
| 1818 | }; | ||
| 1819 | |||
| 1820 | /* dss_venc */ | ||
| 1821 | static struct omap_hwmod_addr_space omap3xxx_dss_venc_addrs[] = { | ||
| 1822 | { | ||
| 1823 | .pa_start = 0x48050C00, | ||
| 1824 | .pa_end = 0x48050FFF, | ||
| 1825 | .flags = ADDR_TYPE_RT | ||
| 1826 | }, | ||
| 1827 | }; | ||
| 1828 | |||
| 1829 | /* l4_core -> dss_venc */ | ||
| 1830 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { | ||
| 1831 | .master = &omap3xxx_l4_core_hwmod, | ||
| 1832 | .slave = &omap3xxx_dss_venc_hwmod, | ||
| 1833 | .clk = "dss_tv_fck", | ||
| 1834 | .addr = omap3xxx_dss_venc_addrs, | ||
| 1835 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_venc_addrs), | ||
| 1836 | .fw = { | ||
| 1837 | .omap2 = { | ||
| 1838 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION, | ||
| 1839 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
| 1840 | .flags = OMAP_FIREWALL_L4, | ||
| 1841 | } | ||
| 1842 | }, | ||
| 1843 | .flags = OCPIF_SWSUP_IDLE, | ||
| 1844 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1845 | }; | ||
| 1846 | |||
| 1847 | /* dss_venc slave ports */ | ||
| 1848 | static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = { | ||
| 1849 | &omap3xxx_l4_core__dss_venc, | ||
| 1850 | }; | ||
| 1851 | |||
| 1852 | static struct omap_hwmod omap3xxx_dss_venc_hwmod = { | ||
| 1853 | .name = "dss_venc", | ||
| 1854 | .class = &omap3xxx_venc_hwmod_class, | ||
| 1855 | .main_clk = "dss1_alwon_fck", | ||
| 1856 | .prcm = { | ||
| 1857 | .omap2 = { | ||
| 1858 | .prcm_reg_id = 1, | ||
| 1859 | .module_bit = OMAP3430_EN_DSS1_SHIFT, | ||
| 1860 | .module_offs = OMAP3430_DSS_MOD, | ||
| 1861 | }, | ||
| 1862 | }, | ||
| 1863 | .slaves = omap3xxx_dss_venc_slaves, | ||
| 1864 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves), | ||
| 1865 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 | | ||
| 1866 | CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 | | ||
| 1867 | CHIP_GE_OMAP3630ES1_1), | ||
| 1868 | .flags = HWMOD_NO_IDLEST, | ||
| 1869 | }; | ||
| 1870 | |||
| 668 | /* I2C1 */ | 1871 | /* I2C1 */ |
| 669 | 1872 | ||
| 670 | static struct omap_i2c_dev_attr i2c1_dev_attr = { | 1873 | static struct omap_i2c_dev_attr i2c1_dev_attr = { |
| @@ -1230,6 +2433,437 @@ static struct omap_hwmod omap3xxx_dma_system_hwmod = { | |||
| 1230 | .flags = HWMOD_NO_IDLEST, | 2433 | .flags = HWMOD_NO_IDLEST, |
| 1231 | }; | 2434 | }; |
| 1232 | 2435 | ||
| 2436 | /* | ||
| 2437 | * 'mcbsp' class | ||
| 2438 | * multi channel buffered serial port controller | ||
| 2439 | */ | ||
| 2440 | |||
| 2441 | static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = { | ||
| 2442 | .sysc_offs = 0x008c, | ||
| 2443 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP | | ||
| 2444 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
| 2445 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 2446 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 2447 | .clockact = 0x2, | ||
| 2448 | }; | ||
| 2449 | |||
| 2450 | static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = { | ||
| 2451 | .name = "mcbsp", | ||
| 2452 | .sysc = &omap3xxx_mcbsp_sysc, | ||
| 2453 | .rev = MCBSP_CONFIG_TYPE3, | ||
| 2454 | }; | ||
| 2455 | |||
| 2456 | /* mcbsp1 */ | ||
| 2457 | static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = { | ||
| 2458 | { .name = "irq", .irq = 16 }, | ||
| 2459 | { .name = "tx", .irq = 59 }, | ||
| 2460 | { .name = "rx", .irq = 60 }, | ||
| 2461 | }; | ||
| 2462 | |||
| 2463 | static struct omap_hwmod_dma_info omap3xxx_mcbsp1_sdma_chs[] = { | ||
| 2464 | { .name = "rx", .dma_req = 32 }, | ||
| 2465 | { .name = "tx", .dma_req = 31 }, | ||
| 2466 | }; | ||
| 2467 | |||
| 2468 | static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = { | ||
| 2469 | { | ||
| 2470 | .name = "mpu", | ||
| 2471 | .pa_start = 0x48074000, | ||
| 2472 | .pa_end = 0x480740ff, | ||
| 2473 | .flags = ADDR_TYPE_RT | ||
| 2474 | }, | ||
| 2475 | }; | ||
| 2476 | |||
| 2477 | /* l4_core -> mcbsp1 */ | ||
| 2478 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = { | ||
| 2479 | .master = &omap3xxx_l4_core_hwmod, | ||
| 2480 | .slave = &omap3xxx_mcbsp1_hwmod, | ||
| 2481 | .clk = "mcbsp1_ick", | ||
| 2482 | .addr = omap3xxx_mcbsp1_addrs, | ||
| 2483 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_addrs), | ||
| 2484 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2485 | }; | ||
| 2486 | |||
| 2487 | /* mcbsp1 slave ports */ | ||
| 2488 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = { | ||
| 2489 | &omap3xxx_l4_core__mcbsp1, | ||
| 2490 | }; | ||
| 2491 | |||
| 2492 | static struct omap_hwmod omap3xxx_mcbsp1_hwmod = { | ||
| 2493 | .name = "mcbsp1", | ||
| 2494 | .class = &omap3xxx_mcbsp_hwmod_class, | ||
| 2495 | .mpu_irqs = omap3xxx_mcbsp1_irqs, | ||
| 2496 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_irqs), | ||
| 2497 | .sdma_reqs = omap3xxx_mcbsp1_sdma_chs, | ||
| 2498 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_sdma_chs), | ||
| 2499 | .main_clk = "mcbsp1_fck", | ||
| 2500 | .prcm = { | ||
| 2501 | .omap2 = { | ||
| 2502 | .prcm_reg_id = 1, | ||
| 2503 | .module_bit = OMAP3430_EN_MCBSP1_SHIFT, | ||
| 2504 | .module_offs = CORE_MOD, | ||
| 2505 | .idlest_reg_id = 1, | ||
| 2506 | .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT, | ||
| 2507 | }, | ||
| 2508 | }, | ||
| 2509 | .slaves = omap3xxx_mcbsp1_slaves, | ||
| 2510 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves), | ||
| 2511 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 2512 | }; | ||
| 2513 | |||
| 2514 | /* mcbsp2 */ | ||
| 2515 | static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = { | ||
| 2516 | { .name = "irq", .irq = 17 }, | ||
| 2517 | { .name = "tx", .irq = 62 }, | ||
| 2518 | { .name = "rx", .irq = 63 }, | ||
| 2519 | }; | ||
| 2520 | |||
| 2521 | static struct omap_hwmod_dma_info omap3xxx_mcbsp2_sdma_chs[] = { | ||
| 2522 | { .name = "rx", .dma_req = 34 }, | ||
| 2523 | { .name = "tx", .dma_req = 33 }, | ||
| 2524 | }; | ||
| 2525 | |||
| 2526 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = { | ||
| 2527 | { | ||
| 2528 | .name = "mpu", | ||
| 2529 | .pa_start = 0x49022000, | ||
| 2530 | .pa_end = 0x490220ff, | ||
| 2531 | .flags = ADDR_TYPE_RT | ||
| 2532 | }, | ||
| 2533 | }; | ||
| 2534 | |||
| 2535 | /* l4_per -> mcbsp2 */ | ||
| 2536 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = { | ||
| 2537 | .master = &omap3xxx_l4_per_hwmod, | ||
| 2538 | .slave = &omap3xxx_mcbsp2_hwmod, | ||
| 2539 | .clk = "mcbsp2_ick", | ||
| 2540 | .addr = omap3xxx_mcbsp2_addrs, | ||
| 2541 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_addrs), | ||
| 2542 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2543 | }; | ||
| 2544 | |||
| 2545 | /* mcbsp2 slave ports */ | ||
| 2546 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = { | ||
| 2547 | &omap3xxx_l4_per__mcbsp2, | ||
| 2548 | }; | ||
| 2549 | |||
| 2550 | static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = { | ||
| 2551 | .sidetone = "mcbsp2_sidetone", | ||
| 2552 | }; | ||
| 2553 | |||
| 2554 | static struct omap_hwmod omap3xxx_mcbsp2_hwmod = { | ||
| 2555 | .name = "mcbsp2", | ||
| 2556 | .class = &omap3xxx_mcbsp_hwmod_class, | ||
| 2557 | .mpu_irqs = omap3xxx_mcbsp2_irqs, | ||
| 2558 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_irqs), | ||
| 2559 | .sdma_reqs = omap3xxx_mcbsp2_sdma_chs, | ||
| 2560 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sdma_chs), | ||
| 2561 | .main_clk = "mcbsp2_fck", | ||
| 2562 | .prcm = { | ||
| 2563 | .omap2 = { | ||
| 2564 | .prcm_reg_id = 1, | ||
| 2565 | .module_bit = OMAP3430_EN_MCBSP2_SHIFT, | ||
| 2566 | .module_offs = OMAP3430_PER_MOD, | ||
| 2567 | .idlest_reg_id = 1, | ||
| 2568 | .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, | ||
| 2569 | }, | ||
| 2570 | }, | ||
| 2571 | .slaves = omap3xxx_mcbsp2_slaves, | ||
| 2572 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves), | ||
| 2573 | .dev_attr = &omap34xx_mcbsp2_dev_attr, | ||
| 2574 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 2575 | }; | ||
| 2576 | |||
| 2577 | /* mcbsp3 */ | ||
| 2578 | static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = { | ||
| 2579 | { .name = "irq", .irq = 22 }, | ||
| 2580 | { .name = "tx", .irq = 89 }, | ||
| 2581 | { .name = "rx", .irq = 90 }, | ||
| 2582 | }; | ||
| 2583 | |||
| 2584 | static struct omap_hwmod_dma_info omap3xxx_mcbsp3_sdma_chs[] = { | ||
| 2585 | { .name = "rx", .dma_req = 18 }, | ||
| 2586 | { .name = "tx", .dma_req = 17 }, | ||
| 2587 | }; | ||
| 2588 | |||
| 2589 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = { | ||
| 2590 | { | ||
| 2591 | .name = "mpu", | ||
| 2592 | .pa_start = 0x49024000, | ||
| 2593 | .pa_end = 0x490240ff, | ||
| 2594 | .flags = ADDR_TYPE_RT | ||
| 2595 | }, | ||
| 2596 | }; | ||
| 2597 | |||
| 2598 | /* l4_per -> mcbsp3 */ | ||
| 2599 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = { | ||
| 2600 | .master = &omap3xxx_l4_per_hwmod, | ||
| 2601 | .slave = &omap3xxx_mcbsp3_hwmod, | ||
| 2602 | .clk = "mcbsp3_ick", | ||
| 2603 | .addr = omap3xxx_mcbsp3_addrs, | ||
| 2604 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_addrs), | ||
| 2605 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2606 | }; | ||
| 2607 | |||
| 2608 | /* mcbsp3 slave ports */ | ||
| 2609 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = { | ||
| 2610 | &omap3xxx_l4_per__mcbsp3, | ||
| 2611 | }; | ||
| 2612 | |||
| 2613 | static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = { | ||
| 2614 | .sidetone = "mcbsp3_sidetone", | ||
| 2615 | }; | ||
| 2616 | |||
| 2617 | static struct omap_hwmod omap3xxx_mcbsp3_hwmod = { | ||
| 2618 | .name = "mcbsp3", | ||
| 2619 | .class = &omap3xxx_mcbsp_hwmod_class, | ||
| 2620 | .mpu_irqs = omap3xxx_mcbsp3_irqs, | ||
| 2621 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_irqs), | ||
| 2622 | .sdma_reqs = omap3xxx_mcbsp3_sdma_chs, | ||
| 2623 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sdma_chs), | ||
| 2624 | .main_clk = "mcbsp3_fck", | ||
| 2625 | .prcm = { | ||
| 2626 | .omap2 = { | ||
| 2627 | .prcm_reg_id = 1, | ||
| 2628 | .module_bit = OMAP3430_EN_MCBSP3_SHIFT, | ||
| 2629 | .module_offs = OMAP3430_PER_MOD, | ||
| 2630 | .idlest_reg_id = 1, | ||
| 2631 | .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, | ||
| 2632 | }, | ||
| 2633 | }, | ||
| 2634 | .slaves = omap3xxx_mcbsp3_slaves, | ||
| 2635 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves), | ||
| 2636 | .dev_attr = &omap34xx_mcbsp3_dev_attr, | ||
| 2637 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 2638 | }; | ||
| 2639 | |||
| 2640 | /* mcbsp4 */ | ||
| 2641 | static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = { | ||
| 2642 | { .name = "irq", .irq = 23 }, | ||
| 2643 | { .name = "tx", .irq = 54 }, | ||
| 2644 | { .name = "rx", .irq = 55 }, | ||
| 2645 | }; | ||
| 2646 | |||
| 2647 | static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = { | ||
| 2648 | { .name = "rx", .dma_req = 20 }, | ||
| 2649 | { .name = "tx", .dma_req = 19 }, | ||
| 2650 | }; | ||
| 2651 | |||
| 2652 | static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = { | ||
| 2653 | { | ||
| 2654 | .name = "mpu", | ||
| 2655 | .pa_start = 0x49026000, | ||
| 2656 | .pa_end = 0x490260ff, | ||
| 2657 | .flags = ADDR_TYPE_RT | ||
| 2658 | }, | ||
| 2659 | }; | ||
| 2660 | |||
| 2661 | /* l4_per -> mcbsp4 */ | ||
| 2662 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = { | ||
| 2663 | .master = &omap3xxx_l4_per_hwmod, | ||
| 2664 | .slave = &omap3xxx_mcbsp4_hwmod, | ||
| 2665 | .clk = "mcbsp4_ick", | ||
| 2666 | .addr = omap3xxx_mcbsp4_addrs, | ||
| 2667 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_addrs), | ||
| 2668 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2669 | }; | ||
| 2670 | |||
| 2671 | /* mcbsp4 slave ports */ | ||
| 2672 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = { | ||
| 2673 | &omap3xxx_l4_per__mcbsp4, | ||
| 2674 | }; | ||
| 2675 | |||
| 2676 | static struct omap_hwmod omap3xxx_mcbsp4_hwmod = { | ||
| 2677 | .name = "mcbsp4", | ||
| 2678 | .class = &omap3xxx_mcbsp_hwmod_class, | ||
| 2679 | .mpu_irqs = omap3xxx_mcbsp4_irqs, | ||
| 2680 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_irqs), | ||
| 2681 | .sdma_reqs = omap3xxx_mcbsp4_sdma_chs, | ||
| 2682 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_sdma_chs), | ||
| 2683 | .main_clk = "mcbsp4_fck", | ||
| 2684 | .prcm = { | ||
| 2685 | .omap2 = { | ||
| 2686 | .prcm_reg_id = 1, | ||
| 2687 | .module_bit = OMAP3430_EN_MCBSP4_SHIFT, | ||
| 2688 | .module_offs = OMAP3430_PER_MOD, | ||
| 2689 | .idlest_reg_id = 1, | ||
| 2690 | .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT, | ||
| 2691 | }, | ||
| 2692 | }, | ||
| 2693 | .slaves = omap3xxx_mcbsp4_slaves, | ||
| 2694 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves), | ||
| 2695 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 2696 | }; | ||
| 2697 | |||
| 2698 | /* mcbsp5 */ | ||
| 2699 | static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = { | ||
| 2700 | { .name = "irq", .irq = 27 }, | ||
| 2701 | { .name = "tx", .irq = 81 }, | ||
| 2702 | { .name = "rx", .irq = 82 }, | ||
| 2703 | }; | ||
| 2704 | |||
| 2705 | static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = { | ||
| 2706 | { .name = "rx", .dma_req = 22 }, | ||
| 2707 | { .name = "tx", .dma_req = 21 }, | ||
| 2708 | }; | ||
| 2709 | |||
| 2710 | static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = { | ||
| 2711 | { | ||
| 2712 | .name = "mpu", | ||
| 2713 | .pa_start = 0x48096000, | ||
| 2714 | .pa_end = 0x480960ff, | ||
| 2715 | .flags = ADDR_TYPE_RT | ||
| 2716 | }, | ||
| 2717 | }; | ||
| 2718 | |||
| 2719 | /* l4_core -> mcbsp5 */ | ||
| 2720 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = { | ||
| 2721 | .master = &omap3xxx_l4_core_hwmod, | ||
| 2722 | .slave = &omap3xxx_mcbsp5_hwmod, | ||
| 2723 | .clk = "mcbsp5_ick", | ||
| 2724 | .addr = omap3xxx_mcbsp5_addrs, | ||
| 2725 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_addrs), | ||
| 2726 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2727 | }; | ||
| 2728 | |||
| 2729 | /* mcbsp5 slave ports */ | ||
| 2730 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = { | ||
| 2731 | &omap3xxx_l4_core__mcbsp5, | ||
| 2732 | }; | ||
| 2733 | |||
| 2734 | static struct omap_hwmod omap3xxx_mcbsp5_hwmod = { | ||
| 2735 | .name = "mcbsp5", | ||
| 2736 | .class = &omap3xxx_mcbsp_hwmod_class, | ||
| 2737 | .mpu_irqs = omap3xxx_mcbsp5_irqs, | ||
| 2738 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_irqs), | ||
| 2739 | .sdma_reqs = omap3xxx_mcbsp5_sdma_chs, | ||
| 2740 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_sdma_chs), | ||
| 2741 | .main_clk = "mcbsp5_fck", | ||
| 2742 | .prcm = { | ||
| 2743 | .omap2 = { | ||
| 2744 | .prcm_reg_id = 1, | ||
| 2745 | .module_bit = OMAP3430_EN_MCBSP5_SHIFT, | ||
| 2746 | .module_offs = CORE_MOD, | ||
| 2747 | .idlest_reg_id = 1, | ||
| 2748 | .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT, | ||
| 2749 | }, | ||
| 2750 | }, | ||
| 2751 | .slaves = omap3xxx_mcbsp5_slaves, | ||
| 2752 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves), | ||
| 2753 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 2754 | }; | ||
| 2755 | /* 'mcbsp sidetone' class */ | ||
| 2756 | |||
| 2757 | static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = { | ||
| 2758 | .sysc_offs = 0x0010, | ||
| 2759 | .sysc_flags = SYSC_HAS_AUTOIDLE, | ||
| 2760 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 2761 | }; | ||
| 2762 | |||
| 2763 | static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = { | ||
| 2764 | .name = "mcbsp_sidetone", | ||
| 2765 | .sysc = &omap3xxx_mcbsp_sidetone_sysc, | ||
| 2766 | }; | ||
| 2767 | |||
| 2768 | /* mcbsp2_sidetone */ | ||
| 2769 | static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = { | ||
| 2770 | { .name = "irq", .irq = 4 }, | ||
| 2771 | }; | ||
| 2772 | |||
| 2773 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = { | ||
| 2774 | { | ||
| 2775 | .name = "sidetone", | ||
| 2776 | .pa_start = 0x49028000, | ||
| 2777 | .pa_end = 0x490280ff, | ||
| 2778 | .flags = ADDR_TYPE_RT | ||
| 2779 | }, | ||
| 2780 | }; | ||
| 2781 | |||
| 2782 | /* l4_per -> mcbsp2_sidetone */ | ||
| 2783 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = { | ||
| 2784 | .master = &omap3xxx_l4_per_hwmod, | ||
| 2785 | .slave = &omap3xxx_mcbsp2_sidetone_hwmod, | ||
| 2786 | .clk = "mcbsp2_ick", | ||
| 2787 | .addr = omap3xxx_mcbsp2_sidetone_addrs, | ||
| 2788 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_addrs), | ||
| 2789 | .user = OCP_USER_MPU, | ||
| 2790 | }; | ||
| 2791 | |||
| 2792 | /* mcbsp2_sidetone slave ports */ | ||
| 2793 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = { | ||
| 2794 | &omap3xxx_l4_per__mcbsp2_sidetone, | ||
| 2795 | }; | ||
| 2796 | |||
| 2797 | static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { | ||
| 2798 | .name = "mcbsp2_sidetone", | ||
| 2799 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, | ||
| 2800 | .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs, | ||
| 2801 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_irqs), | ||
| 2802 | .main_clk = "mcbsp2_fck", | ||
| 2803 | .prcm = { | ||
| 2804 | .omap2 = { | ||
| 2805 | .prcm_reg_id = 1, | ||
| 2806 | .module_bit = OMAP3430_EN_MCBSP2_SHIFT, | ||
| 2807 | .module_offs = OMAP3430_PER_MOD, | ||
| 2808 | .idlest_reg_id = 1, | ||
| 2809 | .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, | ||
| 2810 | }, | ||
| 2811 | }, | ||
| 2812 | .slaves = omap3xxx_mcbsp2_sidetone_slaves, | ||
| 2813 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves), | ||
| 2814 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 2815 | }; | ||
| 2816 | |||
| 2817 | /* mcbsp3_sidetone */ | ||
| 2818 | static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = { | ||
| 2819 | { .name = "irq", .irq = 5 }, | ||
| 2820 | }; | ||
| 2821 | |||
| 2822 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = { | ||
| 2823 | { | ||
| 2824 | .name = "sidetone", | ||
| 2825 | .pa_start = 0x4902A000, | ||
| 2826 | .pa_end = 0x4902A0ff, | ||
| 2827 | .flags = ADDR_TYPE_RT | ||
| 2828 | }, | ||
| 2829 | }; | ||
| 2830 | |||
| 2831 | /* l4_per -> mcbsp3_sidetone */ | ||
| 2832 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = { | ||
| 2833 | .master = &omap3xxx_l4_per_hwmod, | ||
| 2834 | .slave = &omap3xxx_mcbsp3_sidetone_hwmod, | ||
| 2835 | .clk = "mcbsp3_ick", | ||
| 2836 | .addr = omap3xxx_mcbsp3_sidetone_addrs, | ||
| 2837 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_addrs), | ||
| 2838 | .user = OCP_USER_MPU, | ||
| 2839 | }; | ||
| 2840 | |||
| 2841 | /* mcbsp3_sidetone slave ports */ | ||
| 2842 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = { | ||
| 2843 | &omap3xxx_l4_per__mcbsp3_sidetone, | ||
| 2844 | }; | ||
| 2845 | |||
| 2846 | static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = { | ||
| 2847 | .name = "mcbsp3_sidetone", | ||
| 2848 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, | ||
| 2849 | .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs, | ||
| 2850 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_irqs), | ||
| 2851 | .main_clk = "mcbsp3_fck", | ||
| 2852 | .prcm = { | ||
| 2853 | .omap2 = { | ||
| 2854 | .prcm_reg_id = 1, | ||
| 2855 | .module_bit = OMAP3430_EN_MCBSP3_SHIFT, | ||
| 2856 | .module_offs = OMAP3430_PER_MOD, | ||
| 2857 | .idlest_reg_id = 1, | ||
| 2858 | .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, | ||
| 2859 | }, | ||
| 2860 | }, | ||
| 2861 | .slaves = omap3xxx_mcbsp3_sidetone_slaves, | ||
| 2862 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves), | ||
| 2863 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 2864 | }; | ||
| 2865 | |||
| 2866 | |||
| 1233 | /* SR common */ | 2867 | /* SR common */ |
| 1234 | static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = { | 2868 | static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = { |
| 1235 | .clkact_shift = 20, | 2869 | .clkact_shift = 20, |
| @@ -1359,18 +2993,617 @@ static struct omap_hwmod omap36xx_sr2_hwmod = { | |||
| 1359 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1), | 2993 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1), |
| 1360 | }; | 2994 | }; |
| 1361 | 2995 | ||
| 2996 | /* | ||
| 2997 | * 'mailbox' class | ||
| 2998 | * mailbox module allowing communication between the on-chip processors | ||
| 2999 | * using a queued mailbox-interrupt mechanism. | ||
| 3000 | */ | ||
| 3001 | |||
| 3002 | static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = { | ||
| 3003 | .rev_offs = 0x000, | ||
| 3004 | .sysc_offs = 0x010, | ||
| 3005 | .syss_offs = 0x014, | ||
| 3006 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
| 3007 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
| 3008 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 3009 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 3010 | }; | ||
| 3011 | |||
| 3012 | static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = { | ||
| 3013 | .name = "mailbox", | ||
| 3014 | .sysc = &omap3xxx_mailbox_sysc, | ||
| 3015 | }; | ||
| 3016 | |||
| 3017 | static struct omap_hwmod omap3xxx_mailbox_hwmod; | ||
| 3018 | static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = { | ||
| 3019 | { .irq = 26 }, | ||
| 3020 | }; | ||
| 3021 | |||
| 3022 | static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = { | ||
| 3023 | { | ||
| 3024 | .pa_start = 0x48094000, | ||
| 3025 | .pa_end = 0x480941ff, | ||
| 3026 | .flags = ADDR_TYPE_RT, | ||
| 3027 | }, | ||
| 3028 | }; | ||
| 3029 | |||
| 3030 | /* l4_core -> mailbox */ | ||
| 3031 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = { | ||
| 3032 | .master = &omap3xxx_l4_core_hwmod, | ||
| 3033 | .slave = &omap3xxx_mailbox_hwmod, | ||
| 3034 | .addr = omap3xxx_mailbox_addrs, | ||
| 3035 | .addr_cnt = ARRAY_SIZE(omap3xxx_mailbox_addrs), | ||
| 3036 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3037 | }; | ||
| 3038 | |||
| 3039 | /* mailbox slave ports */ | ||
| 3040 | static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = { | ||
| 3041 | &omap3xxx_l4_core__mailbox, | ||
| 3042 | }; | ||
| 3043 | |||
| 3044 | static struct omap_hwmod omap3xxx_mailbox_hwmod = { | ||
| 3045 | .name = "mailbox", | ||
| 3046 | .class = &omap3xxx_mailbox_hwmod_class, | ||
| 3047 | .mpu_irqs = omap3xxx_mailbox_irqs, | ||
| 3048 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mailbox_irqs), | ||
| 3049 | .main_clk = "mailboxes_ick", | ||
| 3050 | .prcm = { | ||
| 3051 | .omap2 = { | ||
| 3052 | .prcm_reg_id = 1, | ||
| 3053 | .module_bit = OMAP3430_EN_MAILBOXES_SHIFT, | ||
| 3054 | .module_offs = CORE_MOD, | ||
| 3055 | .idlest_reg_id = 1, | ||
| 3056 | .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT, | ||
| 3057 | }, | ||
| 3058 | }, | ||
| 3059 | .slaves = omap3xxx_mailbox_slaves, | ||
| 3060 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves), | ||
| 3061 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 3062 | }; | ||
| 3063 | |||
| 3064 | /* l4 core -> mcspi1 interface */ | ||
| 3065 | static struct omap_hwmod_addr_space omap34xx_mcspi1_addr_space[] = { | ||
| 3066 | { | ||
| 3067 | .pa_start = 0x48098000, | ||
| 3068 | .pa_end = 0x480980ff, | ||
| 3069 | .flags = ADDR_TYPE_RT, | ||
| 3070 | }, | ||
| 3071 | }; | ||
| 3072 | |||
| 3073 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = { | ||
| 3074 | .master = &omap3xxx_l4_core_hwmod, | ||
| 3075 | .slave = &omap34xx_mcspi1, | ||
| 3076 | .clk = "mcspi1_ick", | ||
| 3077 | .addr = omap34xx_mcspi1_addr_space, | ||
| 3078 | .addr_cnt = ARRAY_SIZE(omap34xx_mcspi1_addr_space), | ||
| 3079 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3080 | }; | ||
| 3081 | |||
| 3082 | /* l4 core -> mcspi2 interface */ | ||
| 3083 | static struct omap_hwmod_addr_space omap34xx_mcspi2_addr_space[] = { | ||
| 3084 | { | ||
| 3085 | .pa_start = 0x4809a000, | ||
| 3086 | .pa_end = 0x4809a0ff, | ||
| 3087 | .flags = ADDR_TYPE_RT, | ||
| 3088 | }, | ||
| 3089 | }; | ||
| 3090 | |||
| 3091 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = { | ||
| 3092 | .master = &omap3xxx_l4_core_hwmod, | ||
| 3093 | .slave = &omap34xx_mcspi2, | ||
| 3094 | .clk = "mcspi2_ick", | ||
| 3095 | .addr = omap34xx_mcspi2_addr_space, | ||
| 3096 | .addr_cnt = ARRAY_SIZE(omap34xx_mcspi2_addr_space), | ||
| 3097 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3098 | }; | ||
| 3099 | |||
| 3100 | /* l4 core -> mcspi3 interface */ | ||
| 3101 | static struct omap_hwmod_addr_space omap34xx_mcspi3_addr_space[] = { | ||
| 3102 | { | ||
| 3103 | .pa_start = 0x480b8000, | ||
| 3104 | .pa_end = 0x480b80ff, | ||
| 3105 | .flags = ADDR_TYPE_RT, | ||
| 3106 | }, | ||
| 3107 | }; | ||
| 3108 | |||
| 3109 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = { | ||
| 3110 | .master = &omap3xxx_l4_core_hwmod, | ||
| 3111 | .slave = &omap34xx_mcspi3, | ||
| 3112 | .clk = "mcspi3_ick", | ||
| 3113 | .addr = omap34xx_mcspi3_addr_space, | ||
| 3114 | .addr_cnt = ARRAY_SIZE(omap34xx_mcspi3_addr_space), | ||
| 3115 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3116 | }; | ||
| 3117 | |||
| 3118 | /* l4 core -> mcspi4 interface */ | ||
| 3119 | static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = { | ||
| 3120 | { | ||
| 3121 | .pa_start = 0x480ba000, | ||
| 3122 | .pa_end = 0x480ba0ff, | ||
| 3123 | .flags = ADDR_TYPE_RT, | ||
| 3124 | }, | ||
| 3125 | }; | ||
| 3126 | |||
| 3127 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = { | ||
| 3128 | .master = &omap3xxx_l4_core_hwmod, | ||
| 3129 | .slave = &omap34xx_mcspi4, | ||
| 3130 | .clk = "mcspi4_ick", | ||
| 3131 | .addr = omap34xx_mcspi4_addr_space, | ||
| 3132 | .addr_cnt = ARRAY_SIZE(omap34xx_mcspi4_addr_space), | ||
| 3133 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3134 | }; | ||
| 3135 | |||
| 3136 | /* | ||
| 3137 | * 'mcspi' class | ||
| 3138 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | ||
| 3139 | * bus | ||
| 3140 | */ | ||
| 3141 | |||
| 3142 | static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = { | ||
| 3143 | .rev_offs = 0x0000, | ||
| 3144 | .sysc_offs = 0x0010, | ||
| 3145 | .syss_offs = 0x0014, | ||
| 3146 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
| 3147 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
| 3148 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
| 3149 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 3150 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 3151 | }; | ||
| 3152 | |||
| 3153 | static struct omap_hwmod_class omap34xx_mcspi_class = { | ||
| 3154 | .name = "mcspi", | ||
| 3155 | .sysc = &omap34xx_mcspi_sysc, | ||
| 3156 | .rev = OMAP3_MCSPI_REV, | ||
| 3157 | }; | ||
| 3158 | |||
| 3159 | /* mcspi1 */ | ||
| 3160 | static struct omap_hwmod_irq_info omap34xx_mcspi1_mpu_irqs[] = { | ||
| 3161 | { .name = "irq", .irq = 65 }, | ||
| 3162 | }; | ||
| 3163 | |||
| 3164 | static struct omap_hwmod_dma_info omap34xx_mcspi1_sdma_reqs[] = { | ||
| 3165 | { .name = "tx0", .dma_req = 35 }, | ||
| 3166 | { .name = "rx0", .dma_req = 36 }, | ||
| 3167 | { .name = "tx1", .dma_req = 37 }, | ||
| 3168 | { .name = "rx1", .dma_req = 38 }, | ||
| 3169 | { .name = "tx2", .dma_req = 39 }, | ||
| 3170 | { .name = "rx2", .dma_req = 40 }, | ||
| 3171 | { .name = "tx3", .dma_req = 41 }, | ||
| 3172 | { .name = "rx3", .dma_req = 42 }, | ||
| 3173 | }; | ||
| 3174 | |||
| 3175 | static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = { | ||
| 3176 | &omap34xx_l4_core__mcspi1, | ||
| 3177 | }; | ||
| 3178 | |||
| 3179 | static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { | ||
| 3180 | .num_chipselect = 4, | ||
| 3181 | }; | ||
| 3182 | |||
| 3183 | static struct omap_hwmod omap34xx_mcspi1 = { | ||
| 3184 | .name = "mcspi1", | ||
| 3185 | .mpu_irqs = omap34xx_mcspi1_mpu_irqs, | ||
| 3186 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_mpu_irqs), | ||
| 3187 | .sdma_reqs = omap34xx_mcspi1_sdma_reqs, | ||
| 3188 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_sdma_reqs), | ||
| 3189 | .main_clk = "mcspi1_fck", | ||
| 3190 | .prcm = { | ||
| 3191 | .omap2 = { | ||
| 3192 | .module_offs = CORE_MOD, | ||
| 3193 | .prcm_reg_id = 1, | ||
| 3194 | .module_bit = OMAP3430_EN_MCSPI1_SHIFT, | ||
| 3195 | .idlest_reg_id = 1, | ||
| 3196 | .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT, | ||
| 3197 | }, | ||
| 3198 | }, | ||
| 3199 | .slaves = omap34xx_mcspi1_slaves, | ||
| 3200 | .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves), | ||
| 3201 | .class = &omap34xx_mcspi_class, | ||
| 3202 | .dev_attr = &omap_mcspi1_dev_attr, | ||
| 3203 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 3204 | }; | ||
| 3205 | |||
| 3206 | /* mcspi2 */ | ||
| 3207 | static struct omap_hwmod_irq_info omap34xx_mcspi2_mpu_irqs[] = { | ||
| 3208 | { .name = "irq", .irq = 66 }, | ||
| 3209 | }; | ||
| 3210 | |||
| 3211 | static struct omap_hwmod_dma_info omap34xx_mcspi2_sdma_reqs[] = { | ||
| 3212 | { .name = "tx0", .dma_req = 43 }, | ||
| 3213 | { .name = "rx0", .dma_req = 44 }, | ||
| 3214 | { .name = "tx1", .dma_req = 45 }, | ||
| 3215 | { .name = "rx1", .dma_req = 46 }, | ||
| 3216 | }; | ||
| 3217 | |||
| 3218 | static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = { | ||
| 3219 | &omap34xx_l4_core__mcspi2, | ||
| 3220 | }; | ||
| 3221 | |||
| 3222 | static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { | ||
| 3223 | .num_chipselect = 2, | ||
| 3224 | }; | ||
| 3225 | |||
| 3226 | static struct omap_hwmod omap34xx_mcspi2 = { | ||
| 3227 | .name = "mcspi2", | ||
| 3228 | .mpu_irqs = omap34xx_mcspi2_mpu_irqs, | ||
| 3229 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_mpu_irqs), | ||
| 3230 | .sdma_reqs = omap34xx_mcspi2_sdma_reqs, | ||
| 3231 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_sdma_reqs), | ||
| 3232 | .main_clk = "mcspi2_fck", | ||
| 3233 | .prcm = { | ||
| 3234 | .omap2 = { | ||
| 3235 | .module_offs = CORE_MOD, | ||
| 3236 | .prcm_reg_id = 1, | ||
| 3237 | .module_bit = OMAP3430_EN_MCSPI2_SHIFT, | ||
| 3238 | .idlest_reg_id = 1, | ||
| 3239 | .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT, | ||
| 3240 | }, | ||
| 3241 | }, | ||
| 3242 | .slaves = omap34xx_mcspi2_slaves, | ||
| 3243 | .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves), | ||
| 3244 | .class = &omap34xx_mcspi_class, | ||
| 3245 | .dev_attr = &omap_mcspi2_dev_attr, | ||
| 3246 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 3247 | }; | ||
| 3248 | |||
| 3249 | /* mcspi3 */ | ||
| 3250 | static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = { | ||
| 3251 | { .name = "irq", .irq = 91 }, /* 91 */ | ||
| 3252 | }; | ||
| 3253 | |||
| 3254 | static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = { | ||
| 3255 | { .name = "tx0", .dma_req = 15 }, | ||
| 3256 | { .name = "rx0", .dma_req = 16 }, | ||
| 3257 | { .name = "tx1", .dma_req = 23 }, | ||
| 3258 | { .name = "rx1", .dma_req = 24 }, | ||
| 3259 | }; | ||
| 3260 | |||
| 3261 | static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = { | ||
| 3262 | &omap34xx_l4_core__mcspi3, | ||
| 3263 | }; | ||
| 3264 | |||
| 3265 | static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { | ||
| 3266 | .num_chipselect = 2, | ||
| 3267 | }; | ||
| 3268 | |||
| 3269 | static struct omap_hwmod omap34xx_mcspi3 = { | ||
| 3270 | .name = "mcspi3", | ||
| 3271 | .mpu_irqs = omap34xx_mcspi3_mpu_irqs, | ||
| 3272 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_mpu_irqs), | ||
| 3273 | .sdma_reqs = omap34xx_mcspi3_sdma_reqs, | ||
| 3274 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_sdma_reqs), | ||
| 3275 | .main_clk = "mcspi3_fck", | ||
| 3276 | .prcm = { | ||
| 3277 | .omap2 = { | ||
| 3278 | .module_offs = CORE_MOD, | ||
| 3279 | .prcm_reg_id = 1, | ||
| 3280 | .module_bit = OMAP3430_EN_MCSPI3_SHIFT, | ||
| 3281 | .idlest_reg_id = 1, | ||
| 3282 | .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT, | ||
| 3283 | }, | ||
| 3284 | }, | ||
| 3285 | .slaves = omap34xx_mcspi3_slaves, | ||
| 3286 | .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves), | ||
| 3287 | .class = &omap34xx_mcspi_class, | ||
| 3288 | .dev_attr = &omap_mcspi3_dev_attr, | ||
| 3289 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 3290 | }; | ||
| 3291 | |||
| 3292 | /* SPI4 */ | ||
| 3293 | static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = { | ||
| 3294 | { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */ | ||
| 3295 | }; | ||
| 3296 | |||
| 3297 | static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = { | ||
| 3298 | { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */ | ||
| 3299 | { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */ | ||
| 3300 | }; | ||
| 3301 | |||
| 3302 | static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = { | ||
| 3303 | &omap34xx_l4_core__mcspi4, | ||
| 3304 | }; | ||
| 3305 | |||
| 3306 | static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = { | ||
| 3307 | .num_chipselect = 1, | ||
| 3308 | }; | ||
| 3309 | |||
| 3310 | static struct omap_hwmod omap34xx_mcspi4 = { | ||
| 3311 | .name = "mcspi4", | ||
| 3312 | .mpu_irqs = omap34xx_mcspi4_mpu_irqs, | ||
| 3313 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_mpu_irqs), | ||
| 3314 | .sdma_reqs = omap34xx_mcspi4_sdma_reqs, | ||
| 3315 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_sdma_reqs), | ||
| 3316 | .main_clk = "mcspi4_fck", | ||
| 3317 | .prcm = { | ||
| 3318 | .omap2 = { | ||
| 3319 | .module_offs = CORE_MOD, | ||
| 3320 | .prcm_reg_id = 1, | ||
| 3321 | .module_bit = OMAP3430_EN_MCSPI4_SHIFT, | ||
| 3322 | .idlest_reg_id = 1, | ||
| 3323 | .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT, | ||
| 3324 | }, | ||
| 3325 | }, | ||
| 3326 | .slaves = omap34xx_mcspi4_slaves, | ||
| 3327 | .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves), | ||
| 3328 | .class = &omap34xx_mcspi_class, | ||
| 3329 | .dev_attr = &omap_mcspi4_dev_attr, | ||
| 3330 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 3331 | }; | ||
| 3332 | |||
| 3333 | /* | ||
| 3334 | * usbhsotg | ||
| 3335 | */ | ||
| 3336 | static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = { | ||
| 3337 | .rev_offs = 0x0400, | ||
| 3338 | .sysc_offs = 0x0404, | ||
| 3339 | .syss_offs = 0x0408, | ||
| 3340 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE| | ||
| 3341 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
| 3342 | SYSC_HAS_AUTOIDLE), | ||
| 3343 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 3344 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
| 3345 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 3346 | }; | ||
| 3347 | |||
| 3348 | static struct omap_hwmod_class usbotg_class = { | ||
| 3349 | .name = "usbotg", | ||
| 3350 | .sysc = &omap3xxx_usbhsotg_sysc, | ||
| 3351 | }; | ||
| 3352 | /* usb_otg_hs */ | ||
| 3353 | static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = { | ||
| 3354 | |||
| 3355 | { .name = "mc", .irq = 92 }, | ||
| 3356 | { .name = "dma", .irq = 93 }, | ||
| 3357 | }; | ||
| 3358 | |||
| 3359 | static struct omap_hwmod omap3xxx_usbhsotg_hwmod = { | ||
| 3360 | .name = "usb_otg_hs", | ||
| 3361 | .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs, | ||
| 3362 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_mpu_irqs), | ||
| 3363 | .main_clk = "hsotgusb_ick", | ||
| 3364 | .prcm = { | ||
| 3365 | .omap2 = { | ||
| 3366 | .prcm_reg_id = 1, | ||
| 3367 | .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT, | ||
| 3368 | .module_offs = CORE_MOD, | ||
| 3369 | .idlest_reg_id = 1, | ||
| 3370 | .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT, | ||
| 3371 | .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT | ||
| 3372 | }, | ||
| 3373 | }, | ||
| 3374 | .masters = omap3xxx_usbhsotg_masters, | ||
| 3375 | .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters), | ||
| 3376 | .slaves = omap3xxx_usbhsotg_slaves, | ||
| 3377 | .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves), | ||
| 3378 | .class = &usbotg_class, | ||
| 3379 | |||
| 3380 | /* | ||
| 3381 | * Erratum ID: i479 idle_req / idle_ack mechanism potentially | ||
| 3382 | * broken when autoidle is enabled | ||
| 3383 | * workaround is to disable the autoidle bit at module level. | ||
| 3384 | */ | ||
| 3385 | .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE | ||
| 3386 | | HWMOD_SWSUP_MSTANDBY, | ||
| 3387 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
| 3388 | }; | ||
| 3389 | |||
| 3390 | /* usb_otg_hs */ | ||
| 3391 | static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = { | ||
| 3392 | |||
| 3393 | { .name = "mc", .irq = 71 }, | ||
| 3394 | }; | ||
| 3395 | |||
| 3396 | static struct omap_hwmod_class am35xx_usbotg_class = { | ||
| 3397 | .name = "am35xx_usbotg", | ||
| 3398 | .sysc = NULL, | ||
| 3399 | }; | ||
| 3400 | |||
| 3401 | static struct omap_hwmod am35xx_usbhsotg_hwmod = { | ||
| 3402 | .name = "am35x_otg_hs", | ||
| 3403 | .mpu_irqs = am35xx_usbhsotg_mpu_irqs, | ||
| 3404 | .mpu_irqs_cnt = ARRAY_SIZE(am35xx_usbhsotg_mpu_irqs), | ||
| 3405 | .main_clk = NULL, | ||
| 3406 | .prcm = { | ||
| 3407 | .omap2 = { | ||
| 3408 | }, | ||
| 3409 | }, | ||
| 3410 | .masters = am35xx_usbhsotg_masters, | ||
| 3411 | .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters), | ||
| 3412 | .slaves = am35xx_usbhsotg_slaves, | ||
| 3413 | .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves), | ||
| 3414 | .class = &am35xx_usbotg_class, | ||
| 3415 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1) | ||
| 3416 | }; | ||
| 3417 | |||
| 3418 | /* MMC/SD/SDIO common */ | ||
| 3419 | |||
| 3420 | static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = { | ||
| 3421 | .rev_offs = 0x1fc, | ||
| 3422 | .sysc_offs = 0x10, | ||
| 3423 | .syss_offs = 0x14, | ||
| 3424 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
| 3425 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
| 3426 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
| 3427 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 3428 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 3429 | }; | ||
| 3430 | |||
| 3431 | static struct omap_hwmod_class omap34xx_mmc_class = { | ||
| 3432 | .name = "mmc", | ||
| 3433 | .sysc = &omap34xx_mmc_sysc, | ||
| 3434 | }; | ||
| 3435 | |||
| 3436 | /* MMC/SD/SDIO1 */ | ||
| 3437 | |||
| 3438 | static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = { | ||
| 3439 | { .irq = 83, }, | ||
| 3440 | }; | ||
| 3441 | |||
| 3442 | static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = { | ||
| 3443 | { .name = "tx", .dma_req = 61, }, | ||
| 3444 | { .name = "rx", .dma_req = 62, }, | ||
| 3445 | }; | ||
| 3446 | |||
| 3447 | static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = { | ||
| 3448 | { .role = "dbck", .clk = "omap_32k_fck", }, | ||
| 3449 | }; | ||
| 3450 | |||
| 3451 | static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = { | ||
| 3452 | &omap3xxx_l4_core__mmc1, | ||
| 3453 | }; | ||
| 3454 | |||
| 3455 | static struct omap_mmc_dev_attr mmc1_dev_attr = { | ||
| 3456 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, | ||
| 3457 | }; | ||
| 3458 | |||
| 3459 | static struct omap_hwmod omap3xxx_mmc1_hwmod = { | ||
| 3460 | .name = "mmc1", | ||
| 3461 | .mpu_irqs = omap34xx_mmc1_mpu_irqs, | ||
| 3462 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc1_mpu_irqs), | ||
| 3463 | .sdma_reqs = omap34xx_mmc1_sdma_reqs, | ||
| 3464 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc1_sdma_reqs), | ||
| 3465 | .opt_clks = omap34xx_mmc1_opt_clks, | ||
| 3466 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks), | ||
| 3467 | .main_clk = "mmchs1_fck", | ||
| 3468 | .prcm = { | ||
| 3469 | .omap2 = { | ||
| 3470 | .module_offs = CORE_MOD, | ||
| 3471 | .prcm_reg_id = 1, | ||
| 3472 | .module_bit = OMAP3430_EN_MMC1_SHIFT, | ||
| 3473 | .idlest_reg_id = 1, | ||
| 3474 | .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT, | ||
| 3475 | }, | ||
| 3476 | }, | ||
| 3477 | .dev_attr = &mmc1_dev_attr, | ||
| 3478 | .slaves = omap3xxx_mmc1_slaves, | ||
| 3479 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves), | ||
| 3480 | .class = &omap34xx_mmc_class, | ||
| 3481 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 3482 | }; | ||
| 3483 | |||
| 3484 | /* MMC/SD/SDIO2 */ | ||
| 3485 | |||
| 3486 | static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = { | ||
| 3487 | { .irq = INT_24XX_MMC2_IRQ, }, | ||
| 3488 | }; | ||
| 3489 | |||
| 3490 | static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = { | ||
| 3491 | { .name = "tx", .dma_req = 47, }, | ||
| 3492 | { .name = "rx", .dma_req = 48, }, | ||
| 3493 | }; | ||
| 3494 | |||
| 3495 | static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = { | ||
| 3496 | { .role = "dbck", .clk = "omap_32k_fck", }, | ||
| 3497 | }; | ||
| 3498 | |||
| 3499 | static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = { | ||
| 3500 | &omap3xxx_l4_core__mmc2, | ||
| 3501 | }; | ||
| 3502 | |||
| 3503 | static struct omap_hwmod omap3xxx_mmc2_hwmod = { | ||
| 3504 | .name = "mmc2", | ||
| 3505 | .mpu_irqs = omap34xx_mmc2_mpu_irqs, | ||
| 3506 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc2_mpu_irqs), | ||
| 3507 | .sdma_reqs = omap34xx_mmc2_sdma_reqs, | ||
| 3508 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc2_sdma_reqs), | ||
| 3509 | .opt_clks = omap34xx_mmc2_opt_clks, | ||
| 3510 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks), | ||
| 3511 | .main_clk = "mmchs2_fck", | ||
| 3512 | .prcm = { | ||
| 3513 | .omap2 = { | ||
| 3514 | .module_offs = CORE_MOD, | ||
| 3515 | .prcm_reg_id = 1, | ||
| 3516 | .module_bit = OMAP3430_EN_MMC2_SHIFT, | ||
| 3517 | .idlest_reg_id = 1, | ||
| 3518 | .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT, | ||
| 3519 | }, | ||
| 3520 | }, | ||
| 3521 | .slaves = omap3xxx_mmc2_slaves, | ||
| 3522 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves), | ||
| 3523 | .class = &omap34xx_mmc_class, | ||
| 3524 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 3525 | }; | ||
| 3526 | |||
| 3527 | /* MMC/SD/SDIO3 */ | ||
| 3528 | |||
| 3529 | static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = { | ||
| 3530 | { .irq = 94, }, | ||
| 3531 | }; | ||
| 3532 | |||
| 3533 | static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = { | ||
| 3534 | { .name = "tx", .dma_req = 77, }, | ||
| 3535 | { .name = "rx", .dma_req = 78, }, | ||
| 3536 | }; | ||
| 3537 | |||
| 3538 | static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = { | ||
| 3539 | { .role = "dbck", .clk = "omap_32k_fck", }, | ||
| 3540 | }; | ||
| 3541 | |||
| 3542 | static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = { | ||
| 3543 | &omap3xxx_l4_core__mmc3, | ||
| 3544 | }; | ||
| 3545 | |||
| 3546 | static struct omap_hwmod omap3xxx_mmc3_hwmod = { | ||
| 3547 | .name = "mmc3", | ||
| 3548 | .mpu_irqs = omap34xx_mmc3_mpu_irqs, | ||
| 3549 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc3_mpu_irqs), | ||
| 3550 | .sdma_reqs = omap34xx_mmc3_sdma_reqs, | ||
| 3551 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc3_sdma_reqs), | ||
| 3552 | .opt_clks = omap34xx_mmc3_opt_clks, | ||
| 3553 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks), | ||
| 3554 | .main_clk = "mmchs3_fck", | ||
| 3555 | .prcm = { | ||
| 3556 | .omap2 = { | ||
| 3557 | .prcm_reg_id = 1, | ||
| 3558 | .module_bit = OMAP3430_EN_MMC3_SHIFT, | ||
| 3559 | .idlest_reg_id = 1, | ||
| 3560 | .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT, | ||
| 3561 | }, | ||
| 3562 | }, | ||
| 3563 | .slaves = omap3xxx_mmc3_slaves, | ||
| 3564 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves), | ||
| 3565 | .class = &omap34xx_mmc_class, | ||
| 3566 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
| 3567 | }; | ||
| 3568 | |||
| 1362 | static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | 3569 | static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { |
| 1363 | &omap3xxx_l3_main_hwmod, | 3570 | &omap3xxx_l3_main_hwmod, |
| 1364 | &omap3xxx_l4_core_hwmod, | 3571 | &omap3xxx_l4_core_hwmod, |
| 1365 | &omap3xxx_l4_per_hwmod, | 3572 | &omap3xxx_l4_per_hwmod, |
| 1366 | &omap3xxx_l4_wkup_hwmod, | 3573 | &omap3xxx_l4_wkup_hwmod, |
| 3574 | &omap3xxx_mmc1_hwmod, | ||
| 3575 | &omap3xxx_mmc2_hwmod, | ||
| 3576 | &omap3xxx_mmc3_hwmod, | ||
| 1367 | &omap3xxx_mpu_hwmod, | 3577 | &omap3xxx_mpu_hwmod, |
| 1368 | &omap3xxx_iva_hwmod, | 3578 | &omap3xxx_iva_hwmod, |
| 3579 | |||
| 3580 | &omap3xxx_timer1_hwmod, | ||
| 3581 | &omap3xxx_timer2_hwmod, | ||
| 3582 | &omap3xxx_timer3_hwmod, | ||
| 3583 | &omap3xxx_timer4_hwmod, | ||
| 3584 | &omap3xxx_timer5_hwmod, | ||
| 3585 | &omap3xxx_timer6_hwmod, | ||
| 3586 | &omap3xxx_timer7_hwmod, | ||
| 3587 | &omap3xxx_timer8_hwmod, | ||
| 3588 | &omap3xxx_timer9_hwmod, | ||
| 3589 | &omap3xxx_timer10_hwmod, | ||
| 3590 | &omap3xxx_timer11_hwmod, | ||
| 3591 | &omap3xxx_timer12_hwmod, | ||
| 3592 | |||
| 1369 | &omap3xxx_wd_timer2_hwmod, | 3593 | &omap3xxx_wd_timer2_hwmod, |
| 1370 | &omap3xxx_uart1_hwmod, | 3594 | &omap3xxx_uart1_hwmod, |
| 1371 | &omap3xxx_uart2_hwmod, | 3595 | &omap3xxx_uart2_hwmod, |
| 1372 | &omap3xxx_uart3_hwmod, | 3596 | &omap3xxx_uart3_hwmod, |
| 1373 | &omap3xxx_uart4_hwmod, | 3597 | &omap3xxx_uart4_hwmod, |
| 3598 | /* dss class */ | ||
| 3599 | &omap3430es1_dss_core_hwmod, | ||
| 3600 | &omap3xxx_dss_core_hwmod, | ||
| 3601 | &omap3xxx_dss_dispc_hwmod, | ||
| 3602 | &omap3xxx_dss_dsi1_hwmod, | ||
| 3603 | &omap3xxx_dss_rfbi_hwmod, | ||
| 3604 | &omap3xxx_dss_venc_hwmod, | ||
| 3605 | |||
| 3606 | /* i2c class */ | ||
| 1374 | &omap3xxx_i2c1_hwmod, | 3607 | &omap3xxx_i2c1_hwmod, |
| 1375 | &omap3xxx_i2c2_hwmod, | 3608 | &omap3xxx_i2c2_hwmod, |
| 1376 | &omap3xxx_i2c3_hwmod, | 3609 | &omap3xxx_i2c3_hwmod, |
| @@ -1390,10 +3623,35 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | |||
| 1390 | 3623 | ||
| 1391 | /* dma_system class*/ | 3624 | /* dma_system class*/ |
| 1392 | &omap3xxx_dma_system_hwmod, | 3625 | &omap3xxx_dma_system_hwmod, |
| 3626 | |||
| 3627 | /* mcbsp class */ | ||
| 3628 | &omap3xxx_mcbsp1_hwmod, | ||
| 3629 | &omap3xxx_mcbsp2_hwmod, | ||
| 3630 | &omap3xxx_mcbsp3_hwmod, | ||
| 3631 | &omap3xxx_mcbsp4_hwmod, | ||
| 3632 | &omap3xxx_mcbsp5_hwmod, | ||
| 3633 | &omap3xxx_mcbsp2_sidetone_hwmod, | ||
| 3634 | &omap3xxx_mcbsp3_sidetone_hwmod, | ||
| 3635 | |||
| 3636 | /* mailbox class */ | ||
| 3637 | &omap3xxx_mailbox_hwmod, | ||
| 3638 | |||
| 3639 | /* mcspi class */ | ||
| 3640 | &omap34xx_mcspi1, | ||
| 3641 | &omap34xx_mcspi2, | ||
| 3642 | &omap34xx_mcspi3, | ||
| 3643 | &omap34xx_mcspi4, | ||
| 3644 | |||
| 3645 | /* usbotg class */ | ||
| 3646 | &omap3xxx_usbhsotg_hwmod, | ||
| 3647 | |||
| 3648 | /* usbotg for am35x */ | ||
| 3649 | &am35xx_usbhsotg_hwmod, | ||
| 3650 | |||
| 1393 | NULL, | 3651 | NULL, |
| 1394 | }; | 3652 | }; |
| 1395 | 3653 | ||
| 1396 | int __init omap3xxx_hwmod_init(void) | 3654 | int __init omap3xxx_hwmod_init(void) |
| 1397 | { | 3655 | { |
| 1398 | return omap_hwmod_init(omap3xxx_hwmods); | 3656 | return omap_hwmod_register(omap3xxx_hwmods); |
| 1399 | } | 3657 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index c2806bd11fbf..3e88dd3f8ef3 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Hardware modules present on the OMAP44xx chips | 2 | * Hardware modules present on the OMAP44xx chips |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. | 4 | * Copyright (C) 2009-2011 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2009-2010 Nokia Corporation | 5 | * Copyright (C) 2009-2010 Nokia Corporation |
| 6 | * | 6 | * |
| 7 | * Paul Walmsley | 7 | * Paul Walmsley |
| @@ -24,6 +24,9 @@ | |||
| 24 | #include <plat/cpu.h> | 24 | #include <plat/cpu.h> |
| 25 | #include <plat/gpio.h> | 25 | #include <plat/gpio.h> |
| 26 | #include <plat/dma.h> | 26 | #include <plat/dma.h> |
| 27 | #include <plat/mcspi.h> | ||
| 28 | #include <plat/mcbsp.h> | ||
| 29 | #include <plat/mmc.h> | ||
| 27 | 30 | ||
| 28 | #include "omap_hwmod_common_data.h" | 31 | #include "omap_hwmod_common_data.h" |
| 29 | 32 | ||
| @@ -40,10 +43,15 @@ | |||
| 40 | #define OMAP44XX_DMA_REQ_START 1 | 43 | #define OMAP44XX_DMA_REQ_START 1 |
| 41 | 44 | ||
| 42 | /* Backward references (IPs with Bus Master capability) */ | 45 | /* Backward references (IPs with Bus Master capability) */ |
| 46 | static struct omap_hwmod omap44xx_aess_hwmod; | ||
| 43 | static struct omap_hwmod omap44xx_dma_system_hwmod; | 47 | static struct omap_hwmod omap44xx_dma_system_hwmod; |
| 44 | static struct omap_hwmod omap44xx_dmm_hwmod; | 48 | static struct omap_hwmod omap44xx_dmm_hwmod; |
| 45 | static struct omap_hwmod omap44xx_dsp_hwmod; | 49 | static struct omap_hwmod omap44xx_dsp_hwmod; |
| 50 | static struct omap_hwmod omap44xx_dss_hwmod; | ||
| 46 | static struct omap_hwmod omap44xx_emif_fw_hwmod; | 51 | static struct omap_hwmod omap44xx_emif_fw_hwmod; |
| 52 | static struct omap_hwmod omap44xx_hsi_hwmod; | ||
| 53 | static struct omap_hwmod omap44xx_ipu_hwmod; | ||
| 54 | static struct omap_hwmod omap44xx_iss_hwmod; | ||
| 47 | static struct omap_hwmod omap44xx_iva_hwmod; | 55 | static struct omap_hwmod omap44xx_iva_hwmod; |
| 48 | static struct omap_hwmod omap44xx_l3_instr_hwmod; | 56 | static struct omap_hwmod omap44xx_l3_instr_hwmod; |
| 49 | static struct omap_hwmod omap44xx_l3_main_1_hwmod; | 57 | static struct omap_hwmod omap44xx_l3_main_1_hwmod; |
| @@ -53,8 +61,11 @@ static struct omap_hwmod omap44xx_l4_abe_hwmod; | |||
| 53 | static struct omap_hwmod omap44xx_l4_cfg_hwmod; | 61 | static struct omap_hwmod omap44xx_l4_cfg_hwmod; |
| 54 | static struct omap_hwmod omap44xx_l4_per_hwmod; | 62 | static struct omap_hwmod omap44xx_l4_per_hwmod; |
| 55 | static struct omap_hwmod omap44xx_l4_wkup_hwmod; | 63 | static struct omap_hwmod omap44xx_l4_wkup_hwmod; |
| 64 | static struct omap_hwmod omap44xx_mmc1_hwmod; | ||
| 65 | static struct omap_hwmod omap44xx_mmc2_hwmod; | ||
| 56 | static struct omap_hwmod omap44xx_mpu_hwmod; | 66 | static struct omap_hwmod omap44xx_mpu_hwmod; |
| 57 | static struct omap_hwmod omap44xx_mpu_private_hwmod; | 67 | static struct omap_hwmod omap44xx_mpu_private_hwmod; |
| 68 | static struct omap_hwmod omap44xx_usb_otg_hs_hwmod; | ||
| 58 | 69 | ||
| 59 | /* | 70 | /* |
| 60 | * Interconnects omap_hwmod structures | 71 | * Interconnects omap_hwmod structures |
| @@ -213,6 +224,14 @@ static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = { | |||
| 213 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 224 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 214 | }; | 225 | }; |
| 215 | 226 | ||
| 227 | /* dss -> l3_main_1 */ | ||
| 228 | static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = { | ||
| 229 | .master = &omap44xx_dss_hwmod, | ||
| 230 | .slave = &omap44xx_l3_main_1_hwmod, | ||
| 231 | .clk = "l3_div_ck", | ||
| 232 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 233 | }; | ||
| 234 | |||
| 216 | /* l3_main_2 -> l3_main_1 */ | 235 | /* l3_main_2 -> l3_main_1 */ |
| 217 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = { | 236 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = { |
| 218 | .master = &omap44xx_l3_main_2_hwmod, | 237 | .master = &omap44xx_l3_main_2_hwmod, |
| @@ -229,25 +248,62 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = { | |||
| 229 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 248 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 230 | }; | 249 | }; |
| 231 | 250 | ||
| 251 | /* mmc1 -> l3_main_1 */ | ||
| 252 | static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = { | ||
| 253 | .master = &omap44xx_mmc1_hwmod, | ||
| 254 | .slave = &omap44xx_l3_main_1_hwmod, | ||
| 255 | .clk = "l3_div_ck", | ||
| 256 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 257 | }; | ||
| 258 | |||
| 259 | /* mmc2 -> l3_main_1 */ | ||
| 260 | static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = { | ||
| 261 | .master = &omap44xx_mmc2_hwmod, | ||
| 262 | .slave = &omap44xx_l3_main_1_hwmod, | ||
| 263 | .clk = "l3_div_ck", | ||
| 264 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 265 | }; | ||
| 266 | |||
| 267 | /* L3 target configuration and error log registers */ | ||
| 268 | static struct omap_hwmod_irq_info omap44xx_l3_targ_irqs[] = { | ||
| 269 | { .irq = 9 + OMAP44XX_IRQ_GIC_START }, | ||
| 270 | { .irq = 10 + OMAP44XX_IRQ_GIC_START }, | ||
| 271 | }; | ||
| 272 | |||
| 273 | static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = { | ||
| 274 | { | ||
| 275 | .pa_start = 0x44000000, | ||
| 276 | .pa_end = 0x44000fff, | ||
| 277 | .flags = ADDR_TYPE_RT, | ||
| 278 | }, | ||
| 279 | }; | ||
| 280 | |||
| 232 | /* mpu -> l3_main_1 */ | 281 | /* mpu -> l3_main_1 */ |
| 233 | static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = { | 282 | static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = { |
| 234 | .master = &omap44xx_mpu_hwmod, | 283 | .master = &omap44xx_mpu_hwmod, |
| 235 | .slave = &omap44xx_l3_main_1_hwmod, | 284 | .slave = &omap44xx_l3_main_1_hwmod, |
| 236 | .clk = "l3_div_ck", | 285 | .clk = "l3_div_ck", |
| 286 | .addr = omap44xx_l3_main_1_addrs, | ||
| 287 | .addr_cnt = ARRAY_SIZE(omap44xx_l3_main_1_addrs), | ||
| 237 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 288 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 238 | }; | 289 | }; |
| 239 | 290 | ||
| 240 | /* l3_main_1 slave ports */ | 291 | /* l3_main_1 slave ports */ |
| 241 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = { | 292 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = { |
| 242 | &omap44xx_dsp__l3_main_1, | 293 | &omap44xx_dsp__l3_main_1, |
| 294 | &omap44xx_dss__l3_main_1, | ||
| 243 | &omap44xx_l3_main_2__l3_main_1, | 295 | &omap44xx_l3_main_2__l3_main_1, |
| 244 | &omap44xx_l4_cfg__l3_main_1, | 296 | &omap44xx_l4_cfg__l3_main_1, |
| 297 | &omap44xx_mmc1__l3_main_1, | ||
| 298 | &omap44xx_mmc2__l3_main_1, | ||
| 245 | &omap44xx_mpu__l3_main_1, | 299 | &omap44xx_mpu__l3_main_1, |
| 246 | }; | 300 | }; |
| 247 | 301 | ||
| 248 | static struct omap_hwmod omap44xx_l3_main_1_hwmod = { | 302 | static struct omap_hwmod omap44xx_l3_main_1_hwmod = { |
| 249 | .name = "l3_main_1", | 303 | .name = "l3_main_1", |
| 250 | .class = &omap44xx_l3_hwmod_class, | 304 | .class = &omap44xx_l3_hwmod_class, |
| 305 | .mpu_irqs = omap44xx_l3_targ_irqs, | ||
| 306 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_l3_targ_irqs), | ||
| 251 | .slaves = omap44xx_l3_main_1_slaves, | 307 | .slaves = omap44xx_l3_main_1_slaves, |
| 252 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves), | 308 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves), |
| 253 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 309 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| @@ -262,6 +318,30 @@ static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = { | |||
| 262 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 318 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 263 | }; | 319 | }; |
| 264 | 320 | ||
| 321 | /* hsi -> l3_main_2 */ | ||
| 322 | static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = { | ||
| 323 | .master = &omap44xx_hsi_hwmod, | ||
| 324 | .slave = &omap44xx_l3_main_2_hwmod, | ||
| 325 | .clk = "l3_div_ck", | ||
| 326 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 327 | }; | ||
| 328 | |||
| 329 | /* ipu -> l3_main_2 */ | ||
| 330 | static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = { | ||
| 331 | .master = &omap44xx_ipu_hwmod, | ||
| 332 | .slave = &omap44xx_l3_main_2_hwmod, | ||
| 333 | .clk = "l3_div_ck", | ||
| 334 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 335 | }; | ||
| 336 | |||
| 337 | /* iss -> l3_main_2 */ | ||
| 338 | static struct omap_hwmod_ocp_if omap44xx_iss__l3_main_2 = { | ||
| 339 | .master = &omap44xx_iss_hwmod, | ||
| 340 | .slave = &omap44xx_l3_main_2_hwmod, | ||
| 341 | .clk = "l3_div_ck", | ||
| 342 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 343 | }; | ||
| 344 | |||
| 265 | /* iva -> l3_main_2 */ | 345 | /* iva -> l3_main_2 */ |
| 266 | static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = { | 346 | static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = { |
| 267 | .master = &omap44xx_iva_hwmod, | 347 | .master = &omap44xx_iva_hwmod, |
| @@ -270,11 +350,21 @@ static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = { | |||
| 270 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 350 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 271 | }; | 351 | }; |
| 272 | 352 | ||
| 353 | static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = { | ||
| 354 | { | ||
| 355 | .pa_start = 0x44800000, | ||
| 356 | .pa_end = 0x44801fff, | ||
| 357 | .flags = ADDR_TYPE_RT, | ||
| 358 | }, | ||
| 359 | }; | ||
| 360 | |||
| 273 | /* l3_main_1 -> l3_main_2 */ | 361 | /* l3_main_1 -> l3_main_2 */ |
| 274 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = { | 362 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = { |
| 275 | .master = &omap44xx_l3_main_1_hwmod, | 363 | .master = &omap44xx_l3_main_1_hwmod, |
| 276 | .slave = &omap44xx_l3_main_2_hwmod, | 364 | .slave = &omap44xx_l3_main_2_hwmod, |
| 277 | .clk = "l3_div_ck", | 365 | .clk = "l3_div_ck", |
| 366 | .addr = omap44xx_l3_main_2_addrs, | ||
| 367 | .addr_cnt = ARRAY_SIZE(omap44xx_l3_main_2_addrs), | ||
| 278 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 368 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 279 | }; | 369 | }; |
| 280 | 370 | ||
| @@ -286,12 +376,24 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = { | |||
| 286 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 376 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 287 | }; | 377 | }; |
| 288 | 378 | ||
| 379 | /* usb_otg_hs -> l3_main_2 */ | ||
| 380 | static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = { | ||
| 381 | .master = &omap44xx_usb_otg_hs_hwmod, | ||
| 382 | .slave = &omap44xx_l3_main_2_hwmod, | ||
| 383 | .clk = "l3_div_ck", | ||
| 384 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 385 | }; | ||
| 386 | |||
| 289 | /* l3_main_2 slave ports */ | 387 | /* l3_main_2 slave ports */ |
| 290 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = { | 388 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = { |
| 291 | &omap44xx_dma_system__l3_main_2, | 389 | &omap44xx_dma_system__l3_main_2, |
| 390 | &omap44xx_hsi__l3_main_2, | ||
| 391 | &omap44xx_ipu__l3_main_2, | ||
| 392 | &omap44xx_iss__l3_main_2, | ||
| 292 | &omap44xx_iva__l3_main_2, | 393 | &omap44xx_iva__l3_main_2, |
| 293 | &omap44xx_l3_main_1__l3_main_2, | 394 | &omap44xx_l3_main_1__l3_main_2, |
| 294 | &omap44xx_l4_cfg__l3_main_2, | 395 | &omap44xx_l4_cfg__l3_main_2, |
| 396 | &omap44xx_usb_otg_hs__l3_main_2, | ||
| 295 | }; | 397 | }; |
| 296 | 398 | ||
| 297 | static struct omap_hwmod omap44xx_l3_main_2_hwmod = { | 399 | static struct omap_hwmod omap44xx_l3_main_2_hwmod = { |
| @@ -303,11 +405,21 @@ static struct omap_hwmod omap44xx_l3_main_2_hwmod = { | |||
| 303 | }; | 405 | }; |
| 304 | 406 | ||
| 305 | /* l3_main_3 interface data */ | 407 | /* l3_main_3 interface data */ |
| 408 | static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = { | ||
| 409 | { | ||
| 410 | .pa_start = 0x45000000, | ||
| 411 | .pa_end = 0x45000fff, | ||
| 412 | .flags = ADDR_TYPE_RT, | ||
| 413 | }, | ||
| 414 | }; | ||
| 415 | |||
| 306 | /* l3_main_1 -> l3_main_3 */ | 416 | /* l3_main_1 -> l3_main_3 */ |
| 307 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = { | 417 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = { |
| 308 | .master = &omap44xx_l3_main_1_hwmod, | 418 | .master = &omap44xx_l3_main_1_hwmod, |
| 309 | .slave = &omap44xx_l3_main_3_hwmod, | 419 | .slave = &omap44xx_l3_main_3_hwmod, |
| 310 | .clk = "l3_div_ck", | 420 | .clk = "l3_div_ck", |
| 421 | .addr = omap44xx_l3_main_3_addrs, | ||
| 422 | .addr_cnt = ARRAY_SIZE(omap44xx_l3_main_3_addrs), | ||
| 311 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 423 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 312 | }; | 424 | }; |
| 313 | 425 | ||
| @@ -351,6 +463,14 @@ static struct omap_hwmod_class omap44xx_l4_hwmod_class = { | |||
| 351 | }; | 463 | }; |
| 352 | 464 | ||
| 353 | /* l4_abe interface data */ | 465 | /* l4_abe interface data */ |
| 466 | /* aess -> l4_abe */ | ||
| 467 | static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = { | ||
| 468 | .master = &omap44xx_aess_hwmod, | ||
| 469 | .slave = &omap44xx_l4_abe_hwmod, | ||
| 470 | .clk = "ocp_abe_iclk", | ||
| 471 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 472 | }; | ||
| 473 | |||
| 354 | /* dsp -> l4_abe */ | 474 | /* dsp -> l4_abe */ |
| 355 | static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = { | 475 | static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = { |
| 356 | .master = &omap44xx_dsp_hwmod, | 476 | .master = &omap44xx_dsp_hwmod, |
| @@ -377,6 +497,7 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = { | |||
| 377 | 497 | ||
| 378 | /* l4_abe slave ports */ | 498 | /* l4_abe slave ports */ |
| 379 | static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = { | 499 | static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = { |
| 500 | &omap44xx_aess__l4_abe, | ||
| 380 | &omap44xx_dsp__l4_abe, | 501 | &omap44xx_dsp__l4_abe, |
| 381 | &omap44xx_l3_main_1__l4_abe, | 502 | &omap44xx_l3_main_1__l4_abe, |
| 382 | &omap44xx_mpu__l4_abe, | 503 | &omap44xx_mpu__l4_abe, |
| @@ -494,26 +615,15 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = { | |||
| 494 | * - They still need to be validated with the driver | 615 | * - They still need to be validated with the driver |
| 495 | * properly adapted to omap_hwmod / omap_device | 616 | * properly adapted to omap_hwmod / omap_device |
| 496 | * | 617 | * |
| 497 | * aess | ||
| 498 | * bandgap | ||
| 499 | * c2c | 618 | * c2c |
| 500 | * c2c_target_fw | 619 | * c2c_target_fw |
| 501 | * cm_core | 620 | * cm_core |
| 502 | * cm_core_aon | 621 | * cm_core_aon |
| 503 | * counter_32k | ||
| 504 | * ctrl_module_core | 622 | * ctrl_module_core |
| 505 | * ctrl_module_pad_core | 623 | * ctrl_module_pad_core |
| 506 | * ctrl_module_pad_wkup | 624 | * ctrl_module_pad_wkup |
| 507 | * ctrl_module_wkup | 625 | * ctrl_module_wkup |
| 508 | * debugss | 626 | * debugss |
| 509 | * dmic | ||
| 510 | * dss | ||
| 511 | * dss_dispc | ||
| 512 | * dss_dsi1 | ||
| 513 | * dss_dsi2 | ||
| 514 | * dss_hdmi | ||
| 515 | * dss_rfbi | ||
| 516 | * dss_venc | ||
| 517 | * efuse_ctrl_cust | 627 | * efuse_ctrl_cust |
| 518 | * efuse_ctrl_std | 628 | * efuse_ctrl_std |
| 519 | * elm | 629 | * elm |
| @@ -524,58 +634,211 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = { | |||
| 524 | * gpu | 634 | * gpu |
| 525 | * hdq1w | 635 | * hdq1w |
| 526 | * hsi | 636 | * hsi |
| 527 | * ipu | ||
| 528 | * iss | ||
| 529 | * kbd | ||
| 530 | * mailbox | ||
| 531 | * mcasp | ||
| 532 | * mcbsp1 | ||
| 533 | * mcbsp2 | ||
| 534 | * mcbsp3 | ||
| 535 | * mcbsp4 | ||
| 536 | * mcpdm | ||
| 537 | * mcspi1 | ||
| 538 | * mcspi2 | ||
| 539 | * mcspi3 | ||
| 540 | * mcspi4 | ||
| 541 | * mmc1 | ||
| 542 | * mmc2 | ||
| 543 | * mmc3 | ||
| 544 | * mmc4 | ||
| 545 | * mmc5 | ||
| 546 | * mpu_c0 | ||
| 547 | * mpu_c1 | ||
| 548 | * ocmc_ram | 637 | * ocmc_ram |
| 549 | * ocp2scp_usb_phy | 638 | * ocp2scp_usb_phy |
| 550 | * ocp_wp_noc | 639 | * ocp_wp_noc |
| 551 | * prcm | ||
| 552 | * prcm_mpu | 640 | * prcm_mpu |
| 553 | * prm | 641 | * prm |
| 554 | * scrm | 642 | * scrm |
| 555 | * sl2if | 643 | * sl2if |
| 556 | * slimbus1 | 644 | * slimbus1 |
| 557 | * slimbus2 | 645 | * slimbus2 |
| 558 | * spinlock | ||
| 559 | * timer1 | ||
| 560 | * timer10 | ||
| 561 | * timer11 | ||
| 562 | * timer2 | ||
| 563 | * timer3 | ||
| 564 | * timer4 | ||
| 565 | * timer5 | ||
| 566 | * timer6 | ||
| 567 | * timer7 | ||
| 568 | * timer8 | ||
| 569 | * timer9 | ||
| 570 | * usb_host_fs | 646 | * usb_host_fs |
| 571 | * usb_host_hs | 647 | * usb_host_hs |
| 572 | * usb_otg_hs | ||
| 573 | * usb_phy_cm | 648 | * usb_phy_cm |
| 574 | * usb_tll_hs | 649 | * usb_tll_hs |
| 575 | * usim | 650 | * usim |
| 576 | */ | 651 | */ |
| 577 | 652 | ||
| 578 | /* | 653 | /* |
| 654 | * 'aess' class | ||
| 655 | * audio engine sub system | ||
| 656 | */ | ||
| 657 | |||
| 658 | static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = { | ||
| 659 | .rev_offs = 0x0000, | ||
| 660 | .sysc_offs = 0x0010, | ||
| 661 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE), | ||
| 662 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 663 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
| 664 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
| 665 | }; | ||
| 666 | |||
| 667 | static struct omap_hwmod_class omap44xx_aess_hwmod_class = { | ||
| 668 | .name = "aess", | ||
| 669 | .sysc = &omap44xx_aess_sysc, | ||
| 670 | }; | ||
| 671 | |||
| 672 | /* aess */ | ||
| 673 | static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = { | ||
| 674 | { .irq = 99 + OMAP44XX_IRQ_GIC_START }, | ||
| 675 | }; | ||
| 676 | |||
| 677 | static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = { | ||
| 678 | { .name = "fifo0", .dma_req = 100 + OMAP44XX_DMA_REQ_START }, | ||
| 679 | { .name = "fifo1", .dma_req = 101 + OMAP44XX_DMA_REQ_START }, | ||
| 680 | { .name = "fifo2", .dma_req = 102 + OMAP44XX_DMA_REQ_START }, | ||
| 681 | { .name = "fifo3", .dma_req = 103 + OMAP44XX_DMA_REQ_START }, | ||
| 682 | { .name = "fifo4", .dma_req = 104 + OMAP44XX_DMA_REQ_START }, | ||
| 683 | { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START }, | ||
| 684 | { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START }, | ||
| 685 | { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START }, | ||
| 686 | }; | ||
| 687 | |||
| 688 | /* aess master ports */ | ||
| 689 | static struct omap_hwmod_ocp_if *omap44xx_aess_masters[] = { | ||
| 690 | &omap44xx_aess__l4_abe, | ||
| 691 | }; | ||
| 692 | |||
| 693 | static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = { | ||
| 694 | { | ||
| 695 | .pa_start = 0x401f1000, | ||
| 696 | .pa_end = 0x401f13ff, | ||
| 697 | .flags = ADDR_TYPE_RT | ||
| 698 | }, | ||
| 699 | }; | ||
| 700 | |||
| 701 | /* l4_abe -> aess */ | ||
| 702 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = { | ||
| 703 | .master = &omap44xx_l4_abe_hwmod, | ||
| 704 | .slave = &omap44xx_aess_hwmod, | ||
| 705 | .clk = "ocp_abe_iclk", | ||
| 706 | .addr = omap44xx_aess_addrs, | ||
| 707 | .addr_cnt = ARRAY_SIZE(omap44xx_aess_addrs), | ||
| 708 | .user = OCP_USER_MPU, | ||
| 709 | }; | ||
| 710 | |||
| 711 | static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = { | ||
| 712 | { | ||
| 713 | .pa_start = 0x490f1000, | ||
| 714 | .pa_end = 0x490f13ff, | ||
| 715 | .flags = ADDR_TYPE_RT | ||
| 716 | }, | ||
| 717 | }; | ||
| 718 | |||
| 719 | /* l4_abe -> aess (dma) */ | ||
| 720 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = { | ||
| 721 | .master = &omap44xx_l4_abe_hwmod, | ||
| 722 | .slave = &omap44xx_aess_hwmod, | ||
| 723 | .clk = "ocp_abe_iclk", | ||
| 724 | .addr = omap44xx_aess_dma_addrs, | ||
| 725 | .addr_cnt = ARRAY_SIZE(omap44xx_aess_dma_addrs), | ||
| 726 | .user = OCP_USER_SDMA, | ||
| 727 | }; | ||
| 728 | |||
| 729 | /* aess slave ports */ | ||
| 730 | static struct omap_hwmod_ocp_if *omap44xx_aess_slaves[] = { | ||
| 731 | &omap44xx_l4_abe__aess, | ||
| 732 | &omap44xx_l4_abe__aess_dma, | ||
| 733 | }; | ||
| 734 | |||
| 735 | static struct omap_hwmod omap44xx_aess_hwmod = { | ||
| 736 | .name = "aess", | ||
| 737 | .class = &omap44xx_aess_hwmod_class, | ||
| 738 | .mpu_irqs = omap44xx_aess_irqs, | ||
| 739 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_aess_irqs), | ||
| 740 | .sdma_reqs = omap44xx_aess_sdma_reqs, | ||
| 741 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_aess_sdma_reqs), | ||
| 742 | .main_clk = "aess_fck", | ||
| 743 | .prcm = { | ||
| 744 | .omap4 = { | ||
| 745 | .clkctrl_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL, | ||
| 746 | }, | ||
| 747 | }, | ||
| 748 | .slaves = omap44xx_aess_slaves, | ||
| 749 | .slaves_cnt = ARRAY_SIZE(omap44xx_aess_slaves), | ||
| 750 | .masters = omap44xx_aess_masters, | ||
| 751 | .masters_cnt = ARRAY_SIZE(omap44xx_aess_masters), | ||
| 752 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 753 | }; | ||
| 754 | |||
| 755 | /* | ||
| 756 | * 'bandgap' class | ||
| 757 | * bangap reference for ldo regulators | ||
| 758 | */ | ||
| 759 | |||
| 760 | static struct omap_hwmod_class omap44xx_bandgap_hwmod_class = { | ||
| 761 | .name = "bandgap", | ||
| 762 | }; | ||
| 763 | |||
| 764 | /* bandgap */ | ||
| 765 | static struct omap_hwmod_opt_clk bandgap_opt_clks[] = { | ||
| 766 | { .role = "fclk", .clk = "bandgap_fclk" }, | ||
| 767 | }; | ||
| 768 | |||
| 769 | static struct omap_hwmod omap44xx_bandgap_hwmod = { | ||
| 770 | .name = "bandgap", | ||
| 771 | .class = &omap44xx_bandgap_hwmod_class, | ||
| 772 | .prcm = { | ||
| 773 | .omap4 = { | ||
| 774 | .clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL, | ||
| 775 | }, | ||
| 776 | }, | ||
| 777 | .opt_clks = bandgap_opt_clks, | ||
| 778 | .opt_clks_cnt = ARRAY_SIZE(bandgap_opt_clks), | ||
| 779 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 780 | }; | ||
| 781 | |||
| 782 | /* | ||
| 783 | * 'counter' class | ||
| 784 | * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock | ||
| 785 | */ | ||
| 786 | |||
| 787 | static struct omap_hwmod_class_sysconfig omap44xx_counter_sysc = { | ||
| 788 | .rev_offs = 0x0000, | ||
| 789 | .sysc_offs = 0x0004, | ||
| 790 | .sysc_flags = SYSC_HAS_SIDLEMODE, | ||
| 791 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 792 | SIDLE_SMART_WKUP), | ||
| 793 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 794 | }; | ||
| 795 | |||
| 796 | static struct omap_hwmod_class omap44xx_counter_hwmod_class = { | ||
| 797 | .name = "counter", | ||
| 798 | .sysc = &omap44xx_counter_sysc, | ||
| 799 | }; | ||
| 800 | |||
| 801 | /* counter_32k */ | ||
| 802 | static struct omap_hwmod omap44xx_counter_32k_hwmod; | ||
| 803 | static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = { | ||
| 804 | { | ||
| 805 | .pa_start = 0x4a304000, | ||
| 806 | .pa_end = 0x4a30401f, | ||
| 807 | .flags = ADDR_TYPE_RT | ||
| 808 | }, | ||
| 809 | }; | ||
| 810 | |||
| 811 | /* l4_wkup -> counter_32k */ | ||
| 812 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = { | ||
| 813 | .master = &omap44xx_l4_wkup_hwmod, | ||
| 814 | .slave = &omap44xx_counter_32k_hwmod, | ||
| 815 | .clk = "l4_wkup_clk_mux_ck", | ||
| 816 | .addr = omap44xx_counter_32k_addrs, | ||
| 817 | .addr_cnt = ARRAY_SIZE(omap44xx_counter_32k_addrs), | ||
| 818 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 819 | }; | ||
| 820 | |||
| 821 | /* counter_32k slave ports */ | ||
| 822 | static struct omap_hwmod_ocp_if *omap44xx_counter_32k_slaves[] = { | ||
| 823 | &omap44xx_l4_wkup__counter_32k, | ||
| 824 | }; | ||
| 825 | |||
| 826 | static struct omap_hwmod omap44xx_counter_32k_hwmod = { | ||
| 827 | .name = "counter_32k", | ||
| 828 | .class = &omap44xx_counter_hwmod_class, | ||
| 829 | .flags = HWMOD_SWSUP_SIDLE, | ||
| 830 | .main_clk = "sys_32k_ck", | ||
| 831 | .prcm = { | ||
| 832 | .omap4 = { | ||
| 833 | .clkctrl_reg = OMAP4430_CM_WKUP_SYNCTIMER_CLKCTRL, | ||
| 834 | }, | ||
| 835 | }, | ||
| 836 | .slaves = omap44xx_counter_32k_slaves, | ||
| 837 | .slaves_cnt = ARRAY_SIZE(omap44xx_counter_32k_slaves), | ||
| 838 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 839 | }; | ||
| 840 | |||
| 841 | /* | ||
| 579 | * 'dma' class | 842 | * 'dma' class |
| 580 | * dma controller for data exchange between memory to memory (i.e. internal or | 843 | * dma controller for data exchange between memory to memory (i.e. internal or |
| 581 | * external memory) and gp peripherals to memory or memory to gp peripherals | 844 | * external memory) and gp peripherals to memory or memory to gp peripherals |
| @@ -662,6 +925,96 @@ static struct omap_hwmod omap44xx_dma_system_hwmod = { | |||
| 662 | }; | 925 | }; |
| 663 | 926 | ||
| 664 | /* | 927 | /* |
| 928 | * 'dmic' class | ||
| 929 | * digital microphone controller | ||
| 930 | */ | ||
| 931 | |||
| 932 | static struct omap_hwmod_class_sysconfig omap44xx_dmic_sysc = { | ||
| 933 | .rev_offs = 0x0000, | ||
| 934 | .sysc_offs = 0x0010, | ||
| 935 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS | | ||
| 936 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
| 937 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 938 | SIDLE_SMART_WKUP), | ||
| 939 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
| 940 | }; | ||
| 941 | |||
| 942 | static struct omap_hwmod_class omap44xx_dmic_hwmod_class = { | ||
| 943 | .name = "dmic", | ||
| 944 | .sysc = &omap44xx_dmic_sysc, | ||
| 945 | }; | ||
| 946 | |||
| 947 | /* dmic */ | ||
| 948 | static struct omap_hwmod omap44xx_dmic_hwmod; | ||
| 949 | static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = { | ||
| 950 | { .irq = 114 + OMAP44XX_IRQ_GIC_START }, | ||
| 951 | }; | ||
| 952 | |||
| 953 | static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = { | ||
| 954 | { .dma_req = 66 + OMAP44XX_DMA_REQ_START }, | ||
| 955 | }; | ||
| 956 | |||
| 957 | static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = { | ||
| 958 | { | ||
| 959 | .pa_start = 0x4012e000, | ||
| 960 | .pa_end = 0x4012e07f, | ||
| 961 | .flags = ADDR_TYPE_RT | ||
| 962 | }, | ||
| 963 | }; | ||
| 964 | |||
| 965 | /* l4_abe -> dmic */ | ||
| 966 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = { | ||
| 967 | .master = &omap44xx_l4_abe_hwmod, | ||
| 968 | .slave = &omap44xx_dmic_hwmod, | ||
| 969 | .clk = "ocp_abe_iclk", | ||
| 970 | .addr = omap44xx_dmic_addrs, | ||
| 971 | .addr_cnt = ARRAY_SIZE(omap44xx_dmic_addrs), | ||
| 972 | .user = OCP_USER_MPU, | ||
| 973 | }; | ||
| 974 | |||
| 975 | static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = { | ||
| 976 | { | ||
| 977 | .pa_start = 0x4902e000, | ||
| 978 | .pa_end = 0x4902e07f, | ||
| 979 | .flags = ADDR_TYPE_RT | ||
| 980 | }, | ||
| 981 | }; | ||
| 982 | |||
| 983 | /* l4_abe -> dmic (dma) */ | ||
| 984 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = { | ||
| 985 | .master = &omap44xx_l4_abe_hwmod, | ||
| 986 | .slave = &omap44xx_dmic_hwmod, | ||
| 987 | .clk = "ocp_abe_iclk", | ||
| 988 | .addr = omap44xx_dmic_dma_addrs, | ||
| 989 | .addr_cnt = ARRAY_SIZE(omap44xx_dmic_dma_addrs), | ||
| 990 | .user = OCP_USER_SDMA, | ||
| 991 | }; | ||
| 992 | |||
| 993 | /* dmic slave ports */ | ||
| 994 | static struct omap_hwmod_ocp_if *omap44xx_dmic_slaves[] = { | ||
| 995 | &omap44xx_l4_abe__dmic, | ||
| 996 | &omap44xx_l4_abe__dmic_dma, | ||
| 997 | }; | ||
| 998 | |||
| 999 | static struct omap_hwmod omap44xx_dmic_hwmod = { | ||
| 1000 | .name = "dmic", | ||
| 1001 | .class = &omap44xx_dmic_hwmod_class, | ||
| 1002 | .mpu_irqs = omap44xx_dmic_irqs, | ||
| 1003 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmic_irqs), | ||
| 1004 | .sdma_reqs = omap44xx_dmic_sdma_reqs, | ||
| 1005 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dmic_sdma_reqs), | ||
| 1006 | .main_clk = "dmic_fck", | ||
| 1007 | .prcm = { | ||
| 1008 | .omap4 = { | ||
| 1009 | .clkctrl_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL, | ||
| 1010 | }, | ||
| 1011 | }, | ||
| 1012 | .slaves = omap44xx_dmic_slaves, | ||
| 1013 | .slaves_cnt = ARRAY_SIZE(omap44xx_dmic_slaves), | ||
| 1014 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 1015 | }; | ||
| 1016 | |||
| 1017 | /* | ||
| 665 | * 'dsp' class | 1018 | * 'dsp' class |
| 666 | * dsp sub-system | 1019 | * dsp sub-system |
| 667 | */ | 1020 | */ |
| @@ -747,6 +1100,590 @@ static struct omap_hwmod omap44xx_dsp_hwmod = { | |||
| 747 | }; | 1100 | }; |
| 748 | 1101 | ||
| 749 | /* | 1102 | /* |
| 1103 | * 'dss' class | ||
| 1104 | * display sub-system | ||
| 1105 | */ | ||
| 1106 | |||
| 1107 | static struct omap_hwmod_class_sysconfig omap44xx_dss_sysc = { | ||
| 1108 | .rev_offs = 0x0000, | ||
| 1109 | .syss_offs = 0x0014, | ||
| 1110 | .sysc_flags = SYSS_HAS_RESET_STATUS, | ||
| 1111 | }; | ||
| 1112 | |||
| 1113 | static struct omap_hwmod_class omap44xx_dss_hwmod_class = { | ||
| 1114 | .name = "dss", | ||
| 1115 | .sysc = &omap44xx_dss_sysc, | ||
| 1116 | }; | ||
| 1117 | |||
| 1118 | /* dss */ | ||
| 1119 | /* dss master ports */ | ||
| 1120 | static struct omap_hwmod_ocp_if *omap44xx_dss_masters[] = { | ||
| 1121 | &omap44xx_dss__l3_main_1, | ||
| 1122 | }; | ||
| 1123 | |||
| 1124 | static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = { | ||
| 1125 | { | ||
| 1126 | .pa_start = 0x58000000, | ||
| 1127 | .pa_end = 0x5800007f, | ||
| 1128 | .flags = ADDR_TYPE_RT | ||
| 1129 | }, | ||
| 1130 | }; | ||
| 1131 | |||
| 1132 | /* l3_main_2 -> dss */ | ||
| 1133 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = { | ||
| 1134 | .master = &omap44xx_l3_main_2_hwmod, | ||
| 1135 | .slave = &omap44xx_dss_hwmod, | ||
| 1136 | .clk = "l3_div_ck", | ||
| 1137 | .addr = omap44xx_dss_dma_addrs, | ||
| 1138 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dma_addrs), | ||
| 1139 | .user = OCP_USER_SDMA, | ||
| 1140 | }; | ||
| 1141 | |||
| 1142 | static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = { | ||
| 1143 | { | ||
| 1144 | .pa_start = 0x48040000, | ||
| 1145 | .pa_end = 0x4804007f, | ||
| 1146 | .flags = ADDR_TYPE_RT | ||
| 1147 | }, | ||
| 1148 | }; | ||
| 1149 | |||
| 1150 | /* l4_per -> dss */ | ||
| 1151 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = { | ||
| 1152 | .master = &omap44xx_l4_per_hwmod, | ||
| 1153 | .slave = &omap44xx_dss_hwmod, | ||
| 1154 | .clk = "l4_div_ck", | ||
| 1155 | .addr = omap44xx_dss_addrs, | ||
| 1156 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_addrs), | ||
| 1157 | .user = OCP_USER_MPU, | ||
| 1158 | }; | ||
| 1159 | |||
| 1160 | /* dss slave ports */ | ||
| 1161 | static struct omap_hwmod_ocp_if *omap44xx_dss_slaves[] = { | ||
| 1162 | &omap44xx_l3_main_2__dss, | ||
| 1163 | &omap44xx_l4_per__dss, | ||
| 1164 | }; | ||
| 1165 | |||
| 1166 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | ||
| 1167 | { .role = "sys_clk", .clk = "dss_sys_clk" }, | ||
| 1168 | { .role = "tv_clk", .clk = "dss_tv_clk" }, | ||
| 1169 | { .role = "dss_clk", .clk = "dss_dss_clk" }, | ||
| 1170 | { .role = "video_clk", .clk = "dss_48mhz_clk" }, | ||
| 1171 | }; | ||
| 1172 | |||
| 1173 | static struct omap_hwmod omap44xx_dss_hwmod = { | ||
| 1174 | .name = "dss_core", | ||
| 1175 | .class = &omap44xx_dss_hwmod_class, | ||
| 1176 | .main_clk = "dss_fck", | ||
| 1177 | .prcm = { | ||
| 1178 | .omap4 = { | ||
| 1179 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
| 1180 | }, | ||
| 1181 | }, | ||
| 1182 | .opt_clks = dss_opt_clks, | ||
| 1183 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | ||
| 1184 | .slaves = omap44xx_dss_slaves, | ||
| 1185 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_slaves), | ||
| 1186 | .masters = omap44xx_dss_masters, | ||
| 1187 | .masters_cnt = ARRAY_SIZE(omap44xx_dss_masters), | ||
| 1188 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 1189 | }; | ||
| 1190 | |||
| 1191 | /* | ||
| 1192 | * 'dispc' class | ||
| 1193 | * display controller | ||
| 1194 | */ | ||
| 1195 | |||
| 1196 | static struct omap_hwmod_class_sysconfig omap44xx_dispc_sysc = { | ||
| 1197 | .rev_offs = 0x0000, | ||
| 1198 | .sysc_offs = 0x0010, | ||
| 1199 | .syss_offs = 0x0014, | ||
| 1200 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | | ||
| 1201 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE | | ||
| 1202 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
| 1203 | SYSS_HAS_RESET_STATUS), | ||
| 1204 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 1205 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
| 1206 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1207 | }; | ||
| 1208 | |||
| 1209 | static struct omap_hwmod_class omap44xx_dispc_hwmod_class = { | ||
| 1210 | .name = "dispc", | ||
| 1211 | .sysc = &omap44xx_dispc_sysc, | ||
| 1212 | }; | ||
| 1213 | |||
| 1214 | /* dss_dispc */ | ||
| 1215 | static struct omap_hwmod omap44xx_dss_dispc_hwmod; | ||
| 1216 | static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = { | ||
| 1217 | { .irq = 25 + OMAP44XX_IRQ_GIC_START }, | ||
| 1218 | }; | ||
| 1219 | |||
| 1220 | static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = { | ||
| 1221 | { .dma_req = 5 + OMAP44XX_DMA_REQ_START }, | ||
| 1222 | }; | ||
| 1223 | |||
| 1224 | static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = { | ||
| 1225 | { | ||
| 1226 | .pa_start = 0x58001000, | ||
| 1227 | .pa_end = 0x58001fff, | ||
| 1228 | .flags = ADDR_TYPE_RT | ||
| 1229 | }, | ||
| 1230 | }; | ||
| 1231 | |||
| 1232 | /* l3_main_2 -> dss_dispc */ | ||
| 1233 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = { | ||
| 1234 | .master = &omap44xx_l3_main_2_hwmod, | ||
| 1235 | .slave = &omap44xx_dss_dispc_hwmod, | ||
| 1236 | .clk = "l3_div_ck", | ||
| 1237 | .addr = omap44xx_dss_dispc_dma_addrs, | ||
| 1238 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dispc_dma_addrs), | ||
| 1239 | .user = OCP_USER_SDMA, | ||
| 1240 | }; | ||
| 1241 | |||
| 1242 | static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = { | ||
| 1243 | { | ||
| 1244 | .pa_start = 0x48041000, | ||
| 1245 | .pa_end = 0x48041fff, | ||
| 1246 | .flags = ADDR_TYPE_RT | ||
| 1247 | }, | ||
| 1248 | }; | ||
| 1249 | |||
| 1250 | /* l4_per -> dss_dispc */ | ||
| 1251 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = { | ||
| 1252 | .master = &omap44xx_l4_per_hwmod, | ||
| 1253 | .slave = &omap44xx_dss_dispc_hwmod, | ||
| 1254 | .clk = "l4_div_ck", | ||
| 1255 | .addr = omap44xx_dss_dispc_addrs, | ||
| 1256 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dispc_addrs), | ||
| 1257 | .user = OCP_USER_MPU, | ||
| 1258 | }; | ||
| 1259 | |||
| 1260 | /* dss_dispc slave ports */ | ||
| 1261 | static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = { | ||
| 1262 | &omap44xx_l3_main_2__dss_dispc, | ||
| 1263 | &omap44xx_l4_per__dss_dispc, | ||
| 1264 | }; | ||
| 1265 | |||
| 1266 | static struct omap_hwmod omap44xx_dss_dispc_hwmod = { | ||
| 1267 | .name = "dss_dispc", | ||
| 1268 | .class = &omap44xx_dispc_hwmod_class, | ||
| 1269 | .mpu_irqs = omap44xx_dss_dispc_irqs, | ||
| 1270 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dispc_irqs), | ||
| 1271 | .sdma_reqs = omap44xx_dss_dispc_sdma_reqs, | ||
| 1272 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dispc_sdma_reqs), | ||
| 1273 | .main_clk = "dss_fck", | ||
| 1274 | .prcm = { | ||
| 1275 | .omap4 = { | ||
| 1276 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
| 1277 | }, | ||
| 1278 | }, | ||
| 1279 | .slaves = omap44xx_dss_dispc_slaves, | ||
| 1280 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves), | ||
| 1281 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 1282 | }; | ||
| 1283 | |||
| 1284 | /* | ||
| 1285 | * 'dsi' class | ||
| 1286 | * display serial interface controller | ||
| 1287 | */ | ||
| 1288 | |||
| 1289 | static struct omap_hwmod_class_sysconfig omap44xx_dsi_sysc = { | ||
| 1290 | .rev_offs = 0x0000, | ||
| 1291 | .sysc_offs = 0x0010, | ||
| 1292 | .syss_offs = 0x0014, | ||
| 1293 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | | ||
| 1294 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | | ||
| 1295 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
| 1296 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 1297 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1298 | }; | ||
| 1299 | |||
| 1300 | static struct omap_hwmod_class omap44xx_dsi_hwmod_class = { | ||
| 1301 | .name = "dsi", | ||
| 1302 | .sysc = &omap44xx_dsi_sysc, | ||
| 1303 | }; | ||
| 1304 | |||
| 1305 | /* dss_dsi1 */ | ||
| 1306 | static struct omap_hwmod omap44xx_dss_dsi1_hwmod; | ||
| 1307 | static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = { | ||
| 1308 | { .irq = 53 + OMAP44XX_IRQ_GIC_START }, | ||
| 1309 | }; | ||
| 1310 | |||
| 1311 | static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = { | ||
| 1312 | { .dma_req = 74 + OMAP44XX_DMA_REQ_START }, | ||
| 1313 | }; | ||
| 1314 | |||
| 1315 | static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = { | ||
| 1316 | { | ||
| 1317 | .pa_start = 0x58004000, | ||
| 1318 | .pa_end = 0x580041ff, | ||
| 1319 | .flags = ADDR_TYPE_RT | ||
| 1320 | }, | ||
| 1321 | }; | ||
| 1322 | |||
| 1323 | /* l3_main_2 -> dss_dsi1 */ | ||
| 1324 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = { | ||
| 1325 | .master = &omap44xx_l3_main_2_hwmod, | ||
| 1326 | .slave = &omap44xx_dss_dsi1_hwmod, | ||
| 1327 | .clk = "l3_div_ck", | ||
| 1328 | .addr = omap44xx_dss_dsi1_dma_addrs, | ||
| 1329 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_dma_addrs), | ||
| 1330 | .user = OCP_USER_SDMA, | ||
| 1331 | }; | ||
| 1332 | |||
| 1333 | static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = { | ||
| 1334 | { | ||
| 1335 | .pa_start = 0x48044000, | ||
| 1336 | .pa_end = 0x480441ff, | ||
| 1337 | .flags = ADDR_TYPE_RT | ||
| 1338 | }, | ||
| 1339 | }; | ||
| 1340 | |||
| 1341 | /* l4_per -> dss_dsi1 */ | ||
| 1342 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = { | ||
| 1343 | .master = &omap44xx_l4_per_hwmod, | ||
| 1344 | .slave = &omap44xx_dss_dsi1_hwmod, | ||
| 1345 | .clk = "l4_div_ck", | ||
| 1346 | .addr = omap44xx_dss_dsi1_addrs, | ||
| 1347 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_addrs), | ||
| 1348 | .user = OCP_USER_MPU, | ||
| 1349 | }; | ||
| 1350 | |||
| 1351 | /* dss_dsi1 slave ports */ | ||
| 1352 | static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = { | ||
| 1353 | &omap44xx_l3_main_2__dss_dsi1, | ||
| 1354 | &omap44xx_l4_per__dss_dsi1, | ||
| 1355 | }; | ||
| 1356 | |||
| 1357 | static struct omap_hwmod omap44xx_dss_dsi1_hwmod = { | ||
| 1358 | .name = "dss_dsi1", | ||
| 1359 | .class = &omap44xx_dsi_hwmod_class, | ||
| 1360 | .mpu_irqs = omap44xx_dss_dsi1_irqs, | ||
| 1361 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_irqs), | ||
| 1362 | .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs, | ||
| 1363 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_sdma_reqs), | ||
| 1364 | .main_clk = "dss_fck", | ||
| 1365 | .prcm = { | ||
| 1366 | .omap4 = { | ||
| 1367 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
| 1368 | }, | ||
| 1369 | }, | ||
| 1370 | .slaves = omap44xx_dss_dsi1_slaves, | ||
| 1371 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves), | ||
| 1372 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 1373 | }; | ||
| 1374 | |||
| 1375 | /* dss_dsi2 */ | ||
| 1376 | static struct omap_hwmod omap44xx_dss_dsi2_hwmod; | ||
| 1377 | static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = { | ||
| 1378 | { .irq = 84 + OMAP44XX_IRQ_GIC_START }, | ||
| 1379 | }; | ||
| 1380 | |||
| 1381 | static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = { | ||
| 1382 | { .dma_req = 83 + OMAP44XX_DMA_REQ_START }, | ||
| 1383 | }; | ||
| 1384 | |||
| 1385 | static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = { | ||
| 1386 | { | ||
| 1387 | .pa_start = 0x58005000, | ||
| 1388 | .pa_end = 0x580051ff, | ||
| 1389 | .flags = ADDR_TYPE_RT | ||
| 1390 | }, | ||
| 1391 | }; | ||
| 1392 | |||
| 1393 | /* l3_main_2 -> dss_dsi2 */ | ||
| 1394 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = { | ||
| 1395 | .master = &omap44xx_l3_main_2_hwmod, | ||
| 1396 | .slave = &omap44xx_dss_dsi2_hwmod, | ||
| 1397 | .clk = "l3_div_ck", | ||
| 1398 | .addr = omap44xx_dss_dsi2_dma_addrs, | ||
| 1399 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_dma_addrs), | ||
| 1400 | .user = OCP_USER_SDMA, | ||
| 1401 | }; | ||
| 1402 | |||
| 1403 | static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = { | ||
| 1404 | { | ||
| 1405 | .pa_start = 0x48045000, | ||
| 1406 | .pa_end = 0x480451ff, | ||
| 1407 | .flags = ADDR_TYPE_RT | ||
| 1408 | }, | ||
| 1409 | }; | ||
| 1410 | |||
| 1411 | /* l4_per -> dss_dsi2 */ | ||
| 1412 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = { | ||
| 1413 | .master = &omap44xx_l4_per_hwmod, | ||
| 1414 | .slave = &omap44xx_dss_dsi2_hwmod, | ||
| 1415 | .clk = "l4_div_ck", | ||
| 1416 | .addr = omap44xx_dss_dsi2_addrs, | ||
| 1417 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_addrs), | ||
| 1418 | .user = OCP_USER_MPU, | ||
| 1419 | }; | ||
| 1420 | |||
| 1421 | /* dss_dsi2 slave ports */ | ||
| 1422 | static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = { | ||
| 1423 | &omap44xx_l3_main_2__dss_dsi2, | ||
| 1424 | &omap44xx_l4_per__dss_dsi2, | ||
| 1425 | }; | ||
| 1426 | |||
| 1427 | static struct omap_hwmod omap44xx_dss_dsi2_hwmod = { | ||
| 1428 | .name = "dss_dsi2", | ||
| 1429 | .class = &omap44xx_dsi_hwmod_class, | ||
| 1430 | .mpu_irqs = omap44xx_dss_dsi2_irqs, | ||
| 1431 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_irqs), | ||
| 1432 | .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs, | ||
| 1433 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_sdma_reqs), | ||
| 1434 | .main_clk = "dss_fck", | ||
| 1435 | .prcm = { | ||
| 1436 | .omap4 = { | ||
| 1437 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
| 1438 | }, | ||
| 1439 | }, | ||
| 1440 | .slaves = omap44xx_dss_dsi2_slaves, | ||
| 1441 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves), | ||
| 1442 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 1443 | }; | ||
| 1444 | |||
| 1445 | /* | ||
| 1446 | * 'hdmi' class | ||
| 1447 | * hdmi controller | ||
| 1448 | */ | ||
| 1449 | |||
| 1450 | static struct omap_hwmod_class_sysconfig omap44xx_hdmi_sysc = { | ||
| 1451 | .rev_offs = 0x0000, | ||
| 1452 | .sysc_offs = 0x0010, | ||
| 1453 | .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE | | ||
| 1454 | SYSC_HAS_SOFTRESET), | ||
| 1455 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 1456 | SIDLE_SMART_WKUP), | ||
| 1457 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
| 1458 | }; | ||
| 1459 | |||
| 1460 | static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = { | ||
| 1461 | .name = "hdmi", | ||
| 1462 | .sysc = &omap44xx_hdmi_sysc, | ||
| 1463 | }; | ||
| 1464 | |||
| 1465 | /* dss_hdmi */ | ||
| 1466 | static struct omap_hwmod omap44xx_dss_hdmi_hwmod; | ||
| 1467 | static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = { | ||
| 1468 | { .irq = 101 + OMAP44XX_IRQ_GIC_START }, | ||
| 1469 | }; | ||
| 1470 | |||
| 1471 | static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = { | ||
| 1472 | { .dma_req = 75 + OMAP44XX_DMA_REQ_START }, | ||
| 1473 | }; | ||
| 1474 | |||
| 1475 | static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = { | ||
| 1476 | { | ||
| 1477 | .pa_start = 0x58006000, | ||
| 1478 | .pa_end = 0x58006fff, | ||
| 1479 | .flags = ADDR_TYPE_RT | ||
| 1480 | }, | ||
| 1481 | }; | ||
| 1482 | |||
| 1483 | /* l3_main_2 -> dss_hdmi */ | ||
| 1484 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = { | ||
| 1485 | .master = &omap44xx_l3_main_2_hwmod, | ||
| 1486 | .slave = &omap44xx_dss_hdmi_hwmod, | ||
| 1487 | .clk = "l3_div_ck", | ||
| 1488 | .addr = omap44xx_dss_hdmi_dma_addrs, | ||
| 1489 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_dma_addrs), | ||
| 1490 | .user = OCP_USER_SDMA, | ||
| 1491 | }; | ||
| 1492 | |||
| 1493 | static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = { | ||
| 1494 | { | ||
| 1495 | .pa_start = 0x48046000, | ||
| 1496 | .pa_end = 0x48046fff, | ||
| 1497 | .flags = ADDR_TYPE_RT | ||
| 1498 | }, | ||
| 1499 | }; | ||
| 1500 | |||
| 1501 | /* l4_per -> dss_hdmi */ | ||
| 1502 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = { | ||
| 1503 | .master = &omap44xx_l4_per_hwmod, | ||
| 1504 | .slave = &omap44xx_dss_hdmi_hwmod, | ||
| 1505 | .clk = "l4_div_ck", | ||
| 1506 | .addr = omap44xx_dss_hdmi_addrs, | ||
| 1507 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_addrs), | ||
| 1508 | .user = OCP_USER_MPU, | ||
| 1509 | }; | ||
| 1510 | |||
| 1511 | /* dss_hdmi slave ports */ | ||
| 1512 | static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = { | ||
| 1513 | &omap44xx_l3_main_2__dss_hdmi, | ||
| 1514 | &omap44xx_l4_per__dss_hdmi, | ||
| 1515 | }; | ||
| 1516 | |||
| 1517 | static struct omap_hwmod omap44xx_dss_hdmi_hwmod = { | ||
| 1518 | .name = "dss_hdmi", | ||
| 1519 | .class = &omap44xx_hdmi_hwmod_class, | ||
| 1520 | .mpu_irqs = omap44xx_dss_hdmi_irqs, | ||
| 1521 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_irqs), | ||
| 1522 | .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs, | ||
| 1523 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_sdma_reqs), | ||
| 1524 | .main_clk = "dss_fck", | ||
| 1525 | .prcm = { | ||
| 1526 | .omap4 = { | ||
| 1527 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
| 1528 | }, | ||
| 1529 | }, | ||
| 1530 | .slaves = omap44xx_dss_hdmi_slaves, | ||
| 1531 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves), | ||
| 1532 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 1533 | }; | ||
| 1534 | |||
| 1535 | /* | ||
| 1536 | * 'rfbi' class | ||
| 1537 | * remote frame buffer interface | ||
| 1538 | */ | ||
| 1539 | |||
| 1540 | static struct omap_hwmod_class_sysconfig omap44xx_rfbi_sysc = { | ||
| 1541 | .rev_offs = 0x0000, | ||
| 1542 | .sysc_offs = 0x0010, | ||
| 1543 | .syss_offs = 0x0014, | ||
| 1544 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE | | ||
| 1545 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
| 1546 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 1547 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 1548 | }; | ||
| 1549 | |||
| 1550 | static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = { | ||
| 1551 | .name = "rfbi", | ||
| 1552 | .sysc = &omap44xx_rfbi_sysc, | ||
| 1553 | }; | ||
| 1554 | |||
| 1555 | /* dss_rfbi */ | ||
| 1556 | static struct omap_hwmod omap44xx_dss_rfbi_hwmod; | ||
| 1557 | static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = { | ||
| 1558 | { .dma_req = 13 + OMAP44XX_DMA_REQ_START }, | ||
| 1559 | }; | ||
| 1560 | |||
| 1561 | static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = { | ||
| 1562 | { | ||
| 1563 | .pa_start = 0x58002000, | ||
| 1564 | .pa_end = 0x580020ff, | ||
| 1565 | .flags = ADDR_TYPE_RT | ||
| 1566 | }, | ||
| 1567 | }; | ||
| 1568 | |||
| 1569 | /* l3_main_2 -> dss_rfbi */ | ||
| 1570 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = { | ||
| 1571 | .master = &omap44xx_l3_main_2_hwmod, | ||
| 1572 | .slave = &omap44xx_dss_rfbi_hwmod, | ||
| 1573 | .clk = "l3_div_ck", | ||
| 1574 | .addr = omap44xx_dss_rfbi_dma_addrs, | ||
| 1575 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_dma_addrs), | ||
| 1576 | .user = OCP_USER_SDMA, | ||
| 1577 | }; | ||
| 1578 | |||
| 1579 | static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = { | ||
| 1580 | { | ||
| 1581 | .pa_start = 0x48042000, | ||
| 1582 | .pa_end = 0x480420ff, | ||
| 1583 | .flags = ADDR_TYPE_RT | ||
| 1584 | }, | ||
| 1585 | }; | ||
| 1586 | |||
| 1587 | /* l4_per -> dss_rfbi */ | ||
| 1588 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = { | ||
| 1589 | .master = &omap44xx_l4_per_hwmod, | ||
| 1590 | .slave = &omap44xx_dss_rfbi_hwmod, | ||
| 1591 | .clk = "l4_div_ck", | ||
| 1592 | .addr = omap44xx_dss_rfbi_addrs, | ||
| 1593 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_addrs), | ||
| 1594 | .user = OCP_USER_MPU, | ||
| 1595 | }; | ||
| 1596 | |||
| 1597 | /* dss_rfbi slave ports */ | ||
| 1598 | static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = { | ||
| 1599 | &omap44xx_l3_main_2__dss_rfbi, | ||
| 1600 | &omap44xx_l4_per__dss_rfbi, | ||
| 1601 | }; | ||
| 1602 | |||
| 1603 | static struct omap_hwmod omap44xx_dss_rfbi_hwmod = { | ||
| 1604 | .name = "dss_rfbi", | ||
| 1605 | .class = &omap44xx_rfbi_hwmod_class, | ||
| 1606 | .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs, | ||
| 1607 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_sdma_reqs), | ||
| 1608 | .main_clk = "dss_fck", | ||
| 1609 | .prcm = { | ||
| 1610 | .omap4 = { | ||
| 1611 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
| 1612 | }, | ||
| 1613 | }, | ||
| 1614 | .slaves = omap44xx_dss_rfbi_slaves, | ||
| 1615 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves), | ||
| 1616 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 1617 | }; | ||
| 1618 | |||
| 1619 | /* | ||
| 1620 | * 'venc' class | ||
| 1621 | * video encoder | ||
| 1622 | */ | ||
| 1623 | |||
| 1624 | static struct omap_hwmod_class omap44xx_venc_hwmod_class = { | ||
| 1625 | .name = "venc", | ||
| 1626 | }; | ||
| 1627 | |||
| 1628 | /* dss_venc */ | ||
| 1629 | static struct omap_hwmod omap44xx_dss_venc_hwmod; | ||
| 1630 | static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = { | ||
| 1631 | { | ||
| 1632 | .pa_start = 0x58003000, | ||
| 1633 | .pa_end = 0x580030ff, | ||
| 1634 | .flags = ADDR_TYPE_RT | ||
| 1635 | }, | ||
| 1636 | }; | ||
| 1637 | |||
| 1638 | /* l3_main_2 -> dss_venc */ | ||
| 1639 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = { | ||
| 1640 | .master = &omap44xx_l3_main_2_hwmod, | ||
| 1641 | .slave = &omap44xx_dss_venc_hwmod, | ||
| 1642 | .clk = "l3_div_ck", | ||
| 1643 | .addr = omap44xx_dss_venc_dma_addrs, | ||
| 1644 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_venc_dma_addrs), | ||
| 1645 | .user = OCP_USER_SDMA, | ||
| 1646 | }; | ||
| 1647 | |||
| 1648 | static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = { | ||
| 1649 | { | ||
| 1650 | .pa_start = 0x48043000, | ||
| 1651 | .pa_end = 0x480430ff, | ||
| 1652 | .flags = ADDR_TYPE_RT | ||
| 1653 | }, | ||
| 1654 | }; | ||
| 1655 | |||
| 1656 | /* l4_per -> dss_venc */ | ||
| 1657 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = { | ||
| 1658 | .master = &omap44xx_l4_per_hwmod, | ||
| 1659 | .slave = &omap44xx_dss_venc_hwmod, | ||
| 1660 | .clk = "l4_div_ck", | ||
| 1661 | .addr = omap44xx_dss_venc_addrs, | ||
| 1662 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_venc_addrs), | ||
| 1663 | .user = OCP_USER_MPU, | ||
| 1664 | }; | ||
| 1665 | |||
| 1666 | /* dss_venc slave ports */ | ||
| 1667 | static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = { | ||
| 1668 | &omap44xx_l3_main_2__dss_venc, | ||
| 1669 | &omap44xx_l4_per__dss_venc, | ||
| 1670 | }; | ||
| 1671 | |||
| 1672 | static struct omap_hwmod omap44xx_dss_venc_hwmod = { | ||
| 1673 | .name = "dss_venc", | ||
| 1674 | .class = &omap44xx_venc_hwmod_class, | ||
| 1675 | .main_clk = "dss_fck", | ||
| 1676 | .prcm = { | ||
| 1677 | .omap4 = { | ||
| 1678 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
| 1679 | }, | ||
| 1680 | }, | ||
| 1681 | .slaves = omap44xx_dss_venc_slaves, | ||
| 1682 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_venc_slaves), | ||
| 1683 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 1684 | }; | ||
| 1685 | |||
| 1686 | /* | ||
| 750 | * 'gpio' class | 1687 | * 'gpio' class |
| 751 | * general purpose io module | 1688 | * general purpose io module |
| 752 | */ | 1689 | */ |
| @@ -1093,6 +2030,83 @@ static struct omap_hwmod omap44xx_gpio6_hwmod = { | |||
| 1093 | }; | 2030 | }; |
| 1094 | 2031 | ||
| 1095 | /* | 2032 | /* |
| 2033 | * 'hsi' class | ||
| 2034 | * mipi high-speed synchronous serial interface (multichannel and full-duplex | ||
| 2035 | * serial if) | ||
| 2036 | */ | ||
| 2037 | |||
| 2038 | static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = { | ||
| 2039 | .rev_offs = 0x0000, | ||
| 2040 | .sysc_offs = 0x0010, | ||
| 2041 | .syss_offs = 0x0014, | ||
| 2042 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_EMUFREE | | ||
| 2043 | SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | | ||
| 2044 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
| 2045 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 2046 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | ||
| 2047 | MSTANDBY_SMART), | ||
| 2048 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 2049 | }; | ||
| 2050 | |||
| 2051 | static struct omap_hwmod_class omap44xx_hsi_hwmod_class = { | ||
| 2052 | .name = "hsi", | ||
| 2053 | .sysc = &omap44xx_hsi_sysc, | ||
| 2054 | }; | ||
| 2055 | |||
| 2056 | /* hsi */ | ||
| 2057 | static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = { | ||
| 2058 | { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START }, | ||
| 2059 | { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START }, | ||
| 2060 | { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START }, | ||
| 2061 | }; | ||
| 2062 | |||
| 2063 | /* hsi master ports */ | ||
| 2064 | static struct omap_hwmod_ocp_if *omap44xx_hsi_masters[] = { | ||
| 2065 | &omap44xx_hsi__l3_main_2, | ||
| 2066 | }; | ||
| 2067 | |||
| 2068 | static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = { | ||
| 2069 | { | ||
| 2070 | .pa_start = 0x4a058000, | ||
| 2071 | .pa_end = 0x4a05bfff, | ||
| 2072 | .flags = ADDR_TYPE_RT | ||
| 2073 | }, | ||
| 2074 | }; | ||
| 2075 | |||
| 2076 | /* l4_cfg -> hsi */ | ||
| 2077 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = { | ||
| 2078 | .master = &omap44xx_l4_cfg_hwmod, | ||
| 2079 | .slave = &omap44xx_hsi_hwmod, | ||
| 2080 | .clk = "l4_div_ck", | ||
| 2081 | .addr = omap44xx_hsi_addrs, | ||
| 2082 | .addr_cnt = ARRAY_SIZE(omap44xx_hsi_addrs), | ||
| 2083 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2084 | }; | ||
| 2085 | |||
| 2086 | /* hsi slave ports */ | ||
| 2087 | static struct omap_hwmod_ocp_if *omap44xx_hsi_slaves[] = { | ||
| 2088 | &omap44xx_l4_cfg__hsi, | ||
| 2089 | }; | ||
| 2090 | |||
| 2091 | static struct omap_hwmod omap44xx_hsi_hwmod = { | ||
| 2092 | .name = "hsi", | ||
| 2093 | .class = &omap44xx_hsi_hwmod_class, | ||
| 2094 | .mpu_irqs = omap44xx_hsi_irqs, | ||
| 2095 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_hsi_irqs), | ||
| 2096 | .main_clk = "hsi_fck", | ||
| 2097 | .prcm = { | ||
| 2098 | .omap4 = { | ||
| 2099 | .clkctrl_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL, | ||
| 2100 | }, | ||
| 2101 | }, | ||
| 2102 | .slaves = omap44xx_hsi_slaves, | ||
| 2103 | .slaves_cnt = ARRAY_SIZE(omap44xx_hsi_slaves), | ||
| 2104 | .masters = omap44xx_hsi_masters, | ||
| 2105 | .masters_cnt = ARRAY_SIZE(omap44xx_hsi_masters), | ||
| 2106 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 2107 | }; | ||
| 2108 | |||
| 2109 | /* | ||
| 1096 | * 'i2c' class | 2110 | * 'i2c' class |
| 1097 | * multimaster high-speed i2c controller | 2111 | * multimaster high-speed i2c controller |
| 1098 | */ | 2112 | */ |
| @@ -1326,6 +2340,188 @@ static struct omap_hwmod omap44xx_i2c4_hwmod = { | |||
| 1326 | }; | 2340 | }; |
| 1327 | 2341 | ||
| 1328 | /* | 2342 | /* |
| 2343 | * 'ipu' class | ||
| 2344 | * imaging processor unit | ||
| 2345 | */ | ||
| 2346 | |||
| 2347 | static struct omap_hwmod_class omap44xx_ipu_hwmod_class = { | ||
| 2348 | .name = "ipu", | ||
| 2349 | }; | ||
| 2350 | |||
| 2351 | /* ipu */ | ||
| 2352 | static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = { | ||
| 2353 | { .irq = 100 + OMAP44XX_IRQ_GIC_START }, | ||
| 2354 | }; | ||
| 2355 | |||
| 2356 | static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = { | ||
| 2357 | { .name = "cpu0", .rst_shift = 0 }, | ||
| 2358 | }; | ||
| 2359 | |||
| 2360 | static struct omap_hwmod_rst_info omap44xx_ipu_c1_resets[] = { | ||
| 2361 | { .name = "cpu1", .rst_shift = 1 }, | ||
| 2362 | }; | ||
| 2363 | |||
| 2364 | static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = { | ||
| 2365 | { .name = "mmu_cache", .rst_shift = 2 }, | ||
| 2366 | }; | ||
| 2367 | |||
| 2368 | /* ipu master ports */ | ||
| 2369 | static struct omap_hwmod_ocp_if *omap44xx_ipu_masters[] = { | ||
| 2370 | &omap44xx_ipu__l3_main_2, | ||
| 2371 | }; | ||
| 2372 | |||
| 2373 | /* l3_main_2 -> ipu */ | ||
| 2374 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = { | ||
| 2375 | .master = &omap44xx_l3_main_2_hwmod, | ||
| 2376 | .slave = &omap44xx_ipu_hwmod, | ||
| 2377 | .clk = "l3_div_ck", | ||
| 2378 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2379 | }; | ||
| 2380 | |||
| 2381 | /* ipu slave ports */ | ||
| 2382 | static struct omap_hwmod_ocp_if *omap44xx_ipu_slaves[] = { | ||
| 2383 | &omap44xx_l3_main_2__ipu, | ||
| 2384 | }; | ||
| 2385 | |||
| 2386 | /* Pseudo hwmod for reset control purpose only */ | ||
| 2387 | static struct omap_hwmod omap44xx_ipu_c0_hwmod = { | ||
| 2388 | .name = "ipu_c0", | ||
| 2389 | .class = &omap44xx_ipu_hwmod_class, | ||
| 2390 | .flags = HWMOD_INIT_NO_RESET, | ||
| 2391 | .rst_lines = omap44xx_ipu_c0_resets, | ||
| 2392 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets), | ||
| 2393 | .prcm = { | ||
| 2394 | .omap4 = { | ||
| 2395 | .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, | ||
| 2396 | }, | ||
| 2397 | }, | ||
| 2398 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 2399 | }; | ||
| 2400 | |||
| 2401 | /* Pseudo hwmod for reset control purpose only */ | ||
| 2402 | static struct omap_hwmod omap44xx_ipu_c1_hwmod = { | ||
| 2403 | .name = "ipu_c1", | ||
| 2404 | .class = &omap44xx_ipu_hwmod_class, | ||
| 2405 | .flags = HWMOD_INIT_NO_RESET, | ||
| 2406 | .rst_lines = omap44xx_ipu_c1_resets, | ||
| 2407 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets), | ||
| 2408 | .prcm = { | ||
| 2409 | .omap4 = { | ||
| 2410 | .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, | ||
| 2411 | }, | ||
| 2412 | }, | ||
| 2413 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 2414 | }; | ||
| 2415 | |||
| 2416 | static struct omap_hwmod omap44xx_ipu_hwmod = { | ||
| 2417 | .name = "ipu", | ||
| 2418 | .class = &omap44xx_ipu_hwmod_class, | ||
| 2419 | .mpu_irqs = omap44xx_ipu_irqs, | ||
| 2420 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_ipu_irqs), | ||
| 2421 | .rst_lines = omap44xx_ipu_resets, | ||
| 2422 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets), | ||
| 2423 | .main_clk = "ipu_fck", | ||
| 2424 | .prcm = { | ||
| 2425 | .omap4 = { | ||
| 2426 | .clkctrl_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL, | ||
| 2427 | .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, | ||
| 2428 | }, | ||
| 2429 | }, | ||
| 2430 | .slaves = omap44xx_ipu_slaves, | ||
| 2431 | .slaves_cnt = ARRAY_SIZE(omap44xx_ipu_slaves), | ||
| 2432 | .masters = omap44xx_ipu_masters, | ||
| 2433 | .masters_cnt = ARRAY_SIZE(omap44xx_ipu_masters), | ||
| 2434 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 2435 | }; | ||
| 2436 | |||
| 2437 | /* | ||
| 2438 | * 'iss' class | ||
| 2439 | * external images sensor pixel data processor | ||
| 2440 | */ | ||
| 2441 | |||
| 2442 | static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = { | ||
| 2443 | .rev_offs = 0x0000, | ||
| 2444 | .sysc_offs = 0x0010, | ||
| 2445 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS | | ||
| 2446 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
| 2447 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 2448 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | ||
| 2449 | MSTANDBY_SMART), | ||
| 2450 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
| 2451 | }; | ||
| 2452 | |||
| 2453 | static struct omap_hwmod_class omap44xx_iss_hwmod_class = { | ||
| 2454 | .name = "iss", | ||
| 2455 | .sysc = &omap44xx_iss_sysc, | ||
| 2456 | }; | ||
| 2457 | |||
| 2458 | /* iss */ | ||
| 2459 | static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = { | ||
| 2460 | { .irq = 24 + OMAP44XX_IRQ_GIC_START }, | ||
| 2461 | }; | ||
| 2462 | |||
| 2463 | static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = { | ||
| 2464 | { .name = "1", .dma_req = 8 + OMAP44XX_DMA_REQ_START }, | ||
| 2465 | { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START }, | ||
| 2466 | { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START }, | ||
| 2467 | { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START }, | ||
| 2468 | }; | ||
| 2469 | |||
| 2470 | /* iss master ports */ | ||
| 2471 | static struct omap_hwmod_ocp_if *omap44xx_iss_masters[] = { | ||
| 2472 | &omap44xx_iss__l3_main_2, | ||
| 2473 | }; | ||
| 2474 | |||
| 2475 | static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = { | ||
| 2476 | { | ||
| 2477 | .pa_start = 0x52000000, | ||
| 2478 | .pa_end = 0x520000ff, | ||
| 2479 | .flags = ADDR_TYPE_RT | ||
| 2480 | }, | ||
| 2481 | }; | ||
| 2482 | |||
| 2483 | /* l3_main_2 -> iss */ | ||
| 2484 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = { | ||
| 2485 | .master = &omap44xx_l3_main_2_hwmod, | ||
| 2486 | .slave = &omap44xx_iss_hwmod, | ||
| 2487 | .clk = "l3_div_ck", | ||
| 2488 | .addr = omap44xx_iss_addrs, | ||
| 2489 | .addr_cnt = ARRAY_SIZE(omap44xx_iss_addrs), | ||
| 2490 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2491 | }; | ||
| 2492 | |||
| 2493 | /* iss slave ports */ | ||
| 2494 | static struct omap_hwmod_ocp_if *omap44xx_iss_slaves[] = { | ||
| 2495 | &omap44xx_l3_main_2__iss, | ||
| 2496 | }; | ||
| 2497 | |||
| 2498 | static struct omap_hwmod_opt_clk iss_opt_clks[] = { | ||
| 2499 | { .role = "ctrlclk", .clk = "iss_ctrlclk" }, | ||
| 2500 | }; | ||
| 2501 | |||
| 2502 | static struct omap_hwmod omap44xx_iss_hwmod = { | ||
| 2503 | .name = "iss", | ||
| 2504 | .class = &omap44xx_iss_hwmod_class, | ||
| 2505 | .mpu_irqs = omap44xx_iss_irqs, | ||
| 2506 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_iss_irqs), | ||
| 2507 | .sdma_reqs = omap44xx_iss_sdma_reqs, | ||
| 2508 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_iss_sdma_reqs), | ||
| 2509 | .main_clk = "iss_fck", | ||
| 2510 | .prcm = { | ||
| 2511 | .omap4 = { | ||
| 2512 | .clkctrl_reg = OMAP4430_CM_CAM_ISS_CLKCTRL, | ||
| 2513 | }, | ||
| 2514 | }, | ||
| 2515 | .opt_clks = iss_opt_clks, | ||
| 2516 | .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks), | ||
| 2517 | .slaves = omap44xx_iss_slaves, | ||
| 2518 | .slaves_cnt = ARRAY_SIZE(omap44xx_iss_slaves), | ||
| 2519 | .masters = omap44xx_iss_masters, | ||
| 2520 | .masters_cnt = ARRAY_SIZE(omap44xx_iss_masters), | ||
| 2521 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 2522 | }; | ||
| 2523 | |||
| 2524 | /* | ||
| 1329 | * 'iva' class | 2525 | * 'iva' class |
| 1330 | * multi-standard video encoder/decoder hardware accelerator | 2526 | * multi-standard video encoder/decoder hardware accelerator |
| 1331 | */ | 2527 | */ |
| @@ -1435,6 +2631,1084 @@ static struct omap_hwmod omap44xx_iva_hwmod = { | |||
| 1435 | }; | 2631 | }; |
| 1436 | 2632 | ||
| 1437 | /* | 2633 | /* |
| 2634 | * 'kbd' class | ||
| 2635 | * keyboard controller | ||
| 2636 | */ | ||
| 2637 | |||
| 2638 | static struct omap_hwmod_class_sysconfig omap44xx_kbd_sysc = { | ||
| 2639 | .rev_offs = 0x0000, | ||
| 2640 | .sysc_offs = 0x0010, | ||
| 2641 | .syss_offs = 0x0014, | ||
| 2642 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | | ||
| 2643 | SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP | | ||
| 2644 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
| 2645 | SYSS_HAS_RESET_STATUS), | ||
| 2646 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 2647 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 2648 | }; | ||
| 2649 | |||
| 2650 | static struct omap_hwmod_class omap44xx_kbd_hwmod_class = { | ||
| 2651 | .name = "kbd", | ||
| 2652 | .sysc = &omap44xx_kbd_sysc, | ||
| 2653 | }; | ||
| 2654 | |||
| 2655 | /* kbd */ | ||
| 2656 | static struct omap_hwmod omap44xx_kbd_hwmod; | ||
| 2657 | static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = { | ||
| 2658 | { .irq = 120 + OMAP44XX_IRQ_GIC_START }, | ||
| 2659 | }; | ||
| 2660 | |||
| 2661 | static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = { | ||
| 2662 | { | ||
| 2663 | .pa_start = 0x4a31c000, | ||
| 2664 | .pa_end = 0x4a31c07f, | ||
| 2665 | .flags = ADDR_TYPE_RT | ||
| 2666 | }, | ||
| 2667 | }; | ||
| 2668 | |||
| 2669 | /* l4_wkup -> kbd */ | ||
| 2670 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = { | ||
| 2671 | .master = &omap44xx_l4_wkup_hwmod, | ||
| 2672 | .slave = &omap44xx_kbd_hwmod, | ||
| 2673 | .clk = "l4_wkup_clk_mux_ck", | ||
| 2674 | .addr = omap44xx_kbd_addrs, | ||
| 2675 | .addr_cnt = ARRAY_SIZE(omap44xx_kbd_addrs), | ||
| 2676 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2677 | }; | ||
| 2678 | |||
| 2679 | /* kbd slave ports */ | ||
| 2680 | static struct omap_hwmod_ocp_if *omap44xx_kbd_slaves[] = { | ||
| 2681 | &omap44xx_l4_wkup__kbd, | ||
| 2682 | }; | ||
| 2683 | |||
| 2684 | static struct omap_hwmod omap44xx_kbd_hwmod = { | ||
| 2685 | .name = "kbd", | ||
| 2686 | .class = &omap44xx_kbd_hwmod_class, | ||
| 2687 | .mpu_irqs = omap44xx_kbd_irqs, | ||
| 2688 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_kbd_irqs), | ||
| 2689 | .main_clk = "kbd_fck", | ||
| 2690 | .prcm = { | ||
| 2691 | .omap4 = { | ||
| 2692 | .clkctrl_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL, | ||
| 2693 | }, | ||
| 2694 | }, | ||
| 2695 | .slaves = omap44xx_kbd_slaves, | ||
| 2696 | .slaves_cnt = ARRAY_SIZE(omap44xx_kbd_slaves), | ||
| 2697 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 2698 | }; | ||
| 2699 | |||
| 2700 | /* | ||
| 2701 | * 'mailbox' class | ||
| 2702 | * mailbox module allowing communication between the on-chip processors using a | ||
| 2703 | * queued mailbox-interrupt mechanism. | ||
| 2704 | */ | ||
| 2705 | |||
| 2706 | static struct omap_hwmod_class_sysconfig omap44xx_mailbox_sysc = { | ||
| 2707 | .rev_offs = 0x0000, | ||
| 2708 | .sysc_offs = 0x0010, | ||
| 2709 | .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE | | ||
| 2710 | SYSC_HAS_SOFTRESET), | ||
| 2711 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 2712 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
| 2713 | }; | ||
| 2714 | |||
| 2715 | static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = { | ||
| 2716 | .name = "mailbox", | ||
| 2717 | .sysc = &omap44xx_mailbox_sysc, | ||
| 2718 | }; | ||
| 2719 | |||
| 2720 | /* mailbox */ | ||
| 2721 | static struct omap_hwmod omap44xx_mailbox_hwmod; | ||
| 2722 | static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = { | ||
| 2723 | { .irq = 26 + OMAP44XX_IRQ_GIC_START }, | ||
| 2724 | }; | ||
| 2725 | |||
| 2726 | static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = { | ||
| 2727 | { | ||
| 2728 | .pa_start = 0x4a0f4000, | ||
| 2729 | .pa_end = 0x4a0f41ff, | ||
| 2730 | .flags = ADDR_TYPE_RT | ||
| 2731 | }, | ||
| 2732 | }; | ||
| 2733 | |||
| 2734 | /* l4_cfg -> mailbox */ | ||
| 2735 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = { | ||
| 2736 | .master = &omap44xx_l4_cfg_hwmod, | ||
| 2737 | .slave = &omap44xx_mailbox_hwmod, | ||
| 2738 | .clk = "l4_div_ck", | ||
| 2739 | .addr = omap44xx_mailbox_addrs, | ||
| 2740 | .addr_cnt = ARRAY_SIZE(omap44xx_mailbox_addrs), | ||
| 2741 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 2742 | }; | ||
| 2743 | |||
| 2744 | /* mailbox slave ports */ | ||
| 2745 | static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = { | ||
| 2746 | &omap44xx_l4_cfg__mailbox, | ||
| 2747 | }; | ||
| 2748 | |||
| 2749 | static struct omap_hwmod omap44xx_mailbox_hwmod = { | ||
| 2750 | .name = "mailbox", | ||
| 2751 | .class = &omap44xx_mailbox_hwmod_class, | ||
| 2752 | .mpu_irqs = omap44xx_mailbox_irqs, | ||
| 2753 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mailbox_irqs), | ||
| 2754 | .prcm = { | ||
| 2755 | .omap4 = { | ||
| 2756 | .clkctrl_reg = OMAP4430_CM_L4CFG_MAILBOX_CLKCTRL, | ||
| 2757 | }, | ||
| 2758 | }, | ||
| 2759 | .slaves = omap44xx_mailbox_slaves, | ||
| 2760 | .slaves_cnt = ARRAY_SIZE(omap44xx_mailbox_slaves), | ||
| 2761 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 2762 | }; | ||
| 2763 | |||
| 2764 | /* | ||
| 2765 | * 'mcbsp' class | ||
| 2766 | * multi channel buffered serial port controller | ||
| 2767 | */ | ||
| 2768 | |||
| 2769 | static struct omap_hwmod_class_sysconfig omap44xx_mcbsp_sysc = { | ||
| 2770 | .sysc_offs = 0x008c, | ||
| 2771 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP | | ||
| 2772 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
| 2773 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 2774 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 2775 | }; | ||
| 2776 | |||
| 2777 | static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = { | ||
| 2778 | .name = "mcbsp", | ||
| 2779 | .sysc = &omap44xx_mcbsp_sysc, | ||
| 2780 | .rev = MCBSP_CONFIG_TYPE4, | ||
| 2781 | }; | ||
| 2782 | |||
| 2783 | /* mcbsp1 */ | ||
| 2784 | static struct omap_hwmod omap44xx_mcbsp1_hwmod; | ||
| 2785 | static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = { | ||
| 2786 | { .irq = 17 + OMAP44XX_IRQ_GIC_START }, | ||
| 2787 | }; | ||
| 2788 | |||
| 2789 | static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = { | ||
| 2790 | { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START }, | ||
| 2791 | { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START }, | ||
| 2792 | }; | ||
| 2793 | |||
| 2794 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = { | ||
| 2795 | { | ||
| 2796 | .name = "mpu", | ||
| 2797 | .pa_start = 0x40122000, | ||
| 2798 | .pa_end = 0x401220ff, | ||
| 2799 | .flags = ADDR_TYPE_RT | ||
| 2800 | }, | ||
| 2801 | }; | ||
| 2802 | |||
| 2803 | /* l4_abe -> mcbsp1 */ | ||
| 2804 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = { | ||
| 2805 | .master = &omap44xx_l4_abe_hwmod, | ||
| 2806 | .slave = &omap44xx_mcbsp1_hwmod, | ||
| 2807 | .clk = "ocp_abe_iclk", | ||
| 2808 | .addr = omap44xx_mcbsp1_addrs, | ||
| 2809 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp1_addrs), | ||
| 2810 | .user = OCP_USER_MPU, | ||
| 2811 | }; | ||
| 2812 | |||
| 2813 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = { | ||
| 2814 | { | ||
| 2815 | .name = "dma", | ||
| 2816 | .pa_start = 0x49022000, | ||
| 2817 | .pa_end = 0x490220ff, | ||
| 2818 | .flags = ADDR_TYPE_RT | ||
| 2819 | }, | ||
| 2820 | }; | ||
| 2821 | |||
| 2822 | /* l4_abe -> mcbsp1 (dma) */ | ||
| 2823 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = { | ||
| 2824 | .master = &omap44xx_l4_abe_hwmod, | ||
| 2825 | .slave = &omap44xx_mcbsp1_hwmod, | ||
| 2826 | .clk = "ocp_abe_iclk", | ||
| 2827 | .addr = omap44xx_mcbsp1_dma_addrs, | ||
| 2828 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp1_dma_addrs), | ||
| 2829 | .user = OCP_USER_SDMA, | ||
| 2830 | }; | ||
| 2831 | |||
| 2832 | /* mcbsp1 slave ports */ | ||
| 2833 | static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = { | ||
| 2834 | &omap44xx_l4_abe__mcbsp1, | ||
| 2835 | &omap44xx_l4_abe__mcbsp1_dma, | ||
| 2836 | }; | ||
| 2837 | |||
| 2838 | static struct omap_hwmod omap44xx_mcbsp1_hwmod = { | ||
| 2839 | .name = "mcbsp1", | ||
| 2840 | .class = &omap44xx_mcbsp_hwmod_class, | ||
| 2841 | .mpu_irqs = omap44xx_mcbsp1_irqs, | ||
| 2842 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp1_irqs), | ||
| 2843 | .sdma_reqs = omap44xx_mcbsp1_sdma_reqs, | ||
| 2844 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp1_sdma_reqs), | ||
| 2845 | .main_clk = "mcbsp1_fck", | ||
| 2846 | .prcm = { | ||
| 2847 | .omap4 = { | ||
| 2848 | .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL, | ||
| 2849 | }, | ||
| 2850 | }, | ||
| 2851 | .slaves = omap44xx_mcbsp1_slaves, | ||
| 2852 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves), | ||
| 2853 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 2854 | }; | ||
| 2855 | |||
| 2856 | /* mcbsp2 */ | ||
| 2857 | static struct omap_hwmod omap44xx_mcbsp2_hwmod; | ||
| 2858 | static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = { | ||
| 2859 | { .irq = 22 + OMAP44XX_IRQ_GIC_START }, | ||
| 2860 | }; | ||
| 2861 | |||
| 2862 | static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = { | ||
| 2863 | { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START }, | ||
| 2864 | { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START }, | ||
| 2865 | }; | ||
| 2866 | |||
| 2867 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = { | ||
| 2868 | { | ||
| 2869 | .name = "mpu", | ||
| 2870 | .pa_start = 0x40124000, | ||
| 2871 | .pa_end = 0x401240ff, | ||
| 2872 | .flags = ADDR_TYPE_RT | ||
| 2873 | }, | ||
| 2874 | }; | ||
| 2875 | |||
| 2876 | /* l4_abe -> mcbsp2 */ | ||
| 2877 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = { | ||
| 2878 | .master = &omap44xx_l4_abe_hwmod, | ||
| 2879 | .slave = &omap44xx_mcbsp2_hwmod, | ||
| 2880 | .clk = "ocp_abe_iclk", | ||
| 2881 | .addr = omap44xx_mcbsp2_addrs, | ||
| 2882 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp2_addrs), | ||
| 2883 | .user = OCP_USER_MPU, | ||
| 2884 | }; | ||
| 2885 | |||
| 2886 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = { | ||
| 2887 | { | ||
| 2888 | .name = "dma", | ||
| 2889 | .pa_start = 0x49024000, | ||
| 2890 | .pa_end = 0x490240ff, | ||
| 2891 | .flags = ADDR_TYPE_RT | ||
| 2892 | }, | ||
| 2893 | }; | ||
| 2894 | |||
| 2895 | /* l4_abe -> mcbsp2 (dma) */ | ||
| 2896 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = { | ||
| 2897 | .master = &omap44xx_l4_abe_hwmod, | ||
| 2898 | .slave = &omap44xx_mcbsp2_hwmod, | ||
| 2899 | .clk = "ocp_abe_iclk", | ||
| 2900 | .addr = omap44xx_mcbsp2_dma_addrs, | ||
| 2901 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp2_dma_addrs), | ||
| 2902 | .user = OCP_USER_SDMA, | ||
| 2903 | }; | ||
| 2904 | |||
| 2905 | /* mcbsp2 slave ports */ | ||
| 2906 | static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = { | ||
| 2907 | &omap44xx_l4_abe__mcbsp2, | ||
| 2908 | &omap44xx_l4_abe__mcbsp2_dma, | ||
| 2909 | }; | ||
| 2910 | |||
| 2911 | static struct omap_hwmod omap44xx_mcbsp2_hwmod = { | ||
| 2912 | .name = "mcbsp2", | ||
| 2913 | .class = &omap44xx_mcbsp_hwmod_class, | ||
| 2914 | .mpu_irqs = omap44xx_mcbsp2_irqs, | ||
| 2915 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp2_irqs), | ||
| 2916 | .sdma_reqs = omap44xx_mcbsp2_sdma_reqs, | ||
| 2917 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp2_sdma_reqs), | ||
| 2918 | .main_clk = "mcbsp2_fck", | ||
| 2919 | .prcm = { | ||
| 2920 | .omap4 = { | ||
| 2921 | .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL, | ||
| 2922 | }, | ||
| 2923 | }, | ||
| 2924 | .slaves = omap44xx_mcbsp2_slaves, | ||
| 2925 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves), | ||
| 2926 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 2927 | }; | ||
| 2928 | |||
| 2929 | /* mcbsp3 */ | ||
| 2930 | static struct omap_hwmod omap44xx_mcbsp3_hwmod; | ||
| 2931 | static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = { | ||
| 2932 | { .irq = 23 + OMAP44XX_IRQ_GIC_START }, | ||
| 2933 | }; | ||
| 2934 | |||
| 2935 | static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = { | ||
| 2936 | { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START }, | ||
| 2937 | { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START }, | ||
| 2938 | }; | ||
| 2939 | |||
| 2940 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = { | ||
| 2941 | { | ||
| 2942 | .name = "mpu", | ||
| 2943 | .pa_start = 0x40126000, | ||
| 2944 | .pa_end = 0x401260ff, | ||
| 2945 | .flags = ADDR_TYPE_RT | ||
| 2946 | }, | ||
| 2947 | }; | ||
| 2948 | |||
| 2949 | /* l4_abe -> mcbsp3 */ | ||
| 2950 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = { | ||
| 2951 | .master = &omap44xx_l4_abe_hwmod, | ||
| 2952 | .slave = &omap44xx_mcbsp3_hwmod, | ||
| 2953 | .clk = "ocp_abe_iclk", | ||
| 2954 | .addr = omap44xx_mcbsp3_addrs, | ||
| 2955 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp3_addrs), | ||
| 2956 | .user = OCP_USER_MPU, | ||
| 2957 | }; | ||
| 2958 | |||
| 2959 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = { | ||
| 2960 | { | ||
| 2961 | .name = "dma", | ||
| 2962 | .pa_start = 0x49026000, | ||
| 2963 | .pa_end = 0x490260ff, | ||
| 2964 | .flags = ADDR_TYPE_RT | ||
| 2965 | }, | ||
| 2966 | }; | ||
| 2967 | |||
| 2968 | /* l4_abe -> mcbsp3 (dma) */ | ||
| 2969 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = { | ||
| 2970 | .master = &omap44xx_l4_abe_hwmod, | ||
| 2971 | .slave = &omap44xx_mcbsp3_hwmod, | ||
| 2972 | .clk = "ocp_abe_iclk", | ||
| 2973 | .addr = omap44xx_mcbsp3_dma_addrs, | ||
| 2974 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp3_dma_addrs), | ||
| 2975 | .user = OCP_USER_SDMA, | ||
| 2976 | }; | ||
| 2977 | |||
| 2978 | /* mcbsp3 slave ports */ | ||
| 2979 | static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = { | ||
| 2980 | &omap44xx_l4_abe__mcbsp3, | ||
| 2981 | &omap44xx_l4_abe__mcbsp3_dma, | ||
| 2982 | }; | ||
| 2983 | |||
| 2984 | static struct omap_hwmod omap44xx_mcbsp3_hwmod = { | ||
| 2985 | .name = "mcbsp3", | ||
| 2986 | .class = &omap44xx_mcbsp_hwmod_class, | ||
| 2987 | .mpu_irqs = omap44xx_mcbsp3_irqs, | ||
| 2988 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp3_irqs), | ||
| 2989 | .sdma_reqs = omap44xx_mcbsp3_sdma_reqs, | ||
| 2990 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp3_sdma_reqs), | ||
| 2991 | .main_clk = "mcbsp3_fck", | ||
| 2992 | .prcm = { | ||
| 2993 | .omap4 = { | ||
| 2994 | .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL, | ||
| 2995 | }, | ||
| 2996 | }, | ||
| 2997 | .slaves = omap44xx_mcbsp3_slaves, | ||
| 2998 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves), | ||
| 2999 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 3000 | }; | ||
| 3001 | |||
| 3002 | /* mcbsp4 */ | ||
| 3003 | static struct omap_hwmod omap44xx_mcbsp4_hwmod; | ||
| 3004 | static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = { | ||
| 3005 | { .irq = 16 + OMAP44XX_IRQ_GIC_START }, | ||
| 3006 | }; | ||
| 3007 | |||
| 3008 | static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = { | ||
| 3009 | { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START }, | ||
| 3010 | { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START }, | ||
| 3011 | }; | ||
| 3012 | |||
| 3013 | static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = { | ||
| 3014 | { | ||
| 3015 | .pa_start = 0x48096000, | ||
| 3016 | .pa_end = 0x480960ff, | ||
| 3017 | .flags = ADDR_TYPE_RT | ||
| 3018 | }, | ||
| 3019 | }; | ||
| 3020 | |||
| 3021 | /* l4_per -> mcbsp4 */ | ||
| 3022 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = { | ||
| 3023 | .master = &omap44xx_l4_per_hwmod, | ||
| 3024 | .slave = &omap44xx_mcbsp4_hwmod, | ||
| 3025 | .clk = "l4_div_ck", | ||
| 3026 | .addr = omap44xx_mcbsp4_addrs, | ||
| 3027 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp4_addrs), | ||
| 3028 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3029 | }; | ||
| 3030 | |||
| 3031 | /* mcbsp4 slave ports */ | ||
| 3032 | static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = { | ||
| 3033 | &omap44xx_l4_per__mcbsp4, | ||
| 3034 | }; | ||
| 3035 | |||
| 3036 | static struct omap_hwmod omap44xx_mcbsp4_hwmod = { | ||
| 3037 | .name = "mcbsp4", | ||
| 3038 | .class = &omap44xx_mcbsp_hwmod_class, | ||
| 3039 | .mpu_irqs = omap44xx_mcbsp4_irqs, | ||
| 3040 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp4_irqs), | ||
| 3041 | .sdma_reqs = omap44xx_mcbsp4_sdma_reqs, | ||
| 3042 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp4_sdma_reqs), | ||
| 3043 | .main_clk = "mcbsp4_fck", | ||
| 3044 | .prcm = { | ||
| 3045 | .omap4 = { | ||
| 3046 | .clkctrl_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL, | ||
| 3047 | }, | ||
| 3048 | }, | ||
| 3049 | .slaves = omap44xx_mcbsp4_slaves, | ||
| 3050 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves), | ||
| 3051 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 3052 | }; | ||
| 3053 | |||
| 3054 | /* | ||
| 3055 | * 'mcpdm' class | ||
| 3056 | * multi channel pdm controller (proprietary interface with phoenix power | ||
| 3057 | * ic) | ||
| 3058 | */ | ||
| 3059 | |||
| 3060 | static struct omap_hwmod_class_sysconfig omap44xx_mcpdm_sysc = { | ||
| 3061 | .rev_offs = 0x0000, | ||
| 3062 | .sysc_offs = 0x0010, | ||
| 3063 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS | | ||
| 3064 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
| 3065 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 3066 | SIDLE_SMART_WKUP), | ||
| 3067 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
| 3068 | }; | ||
| 3069 | |||
| 3070 | static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = { | ||
| 3071 | .name = "mcpdm", | ||
| 3072 | .sysc = &omap44xx_mcpdm_sysc, | ||
| 3073 | }; | ||
| 3074 | |||
| 3075 | /* mcpdm */ | ||
| 3076 | static struct omap_hwmod omap44xx_mcpdm_hwmod; | ||
| 3077 | static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = { | ||
| 3078 | { .irq = 112 + OMAP44XX_IRQ_GIC_START }, | ||
| 3079 | }; | ||
| 3080 | |||
| 3081 | static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = { | ||
| 3082 | { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START }, | ||
| 3083 | { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START }, | ||
| 3084 | }; | ||
| 3085 | |||
| 3086 | static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = { | ||
| 3087 | { | ||
| 3088 | .pa_start = 0x40132000, | ||
| 3089 | .pa_end = 0x4013207f, | ||
| 3090 | .flags = ADDR_TYPE_RT | ||
| 3091 | }, | ||
| 3092 | }; | ||
| 3093 | |||
| 3094 | /* l4_abe -> mcpdm */ | ||
| 3095 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = { | ||
| 3096 | .master = &omap44xx_l4_abe_hwmod, | ||
| 3097 | .slave = &omap44xx_mcpdm_hwmod, | ||
| 3098 | .clk = "ocp_abe_iclk", | ||
| 3099 | .addr = omap44xx_mcpdm_addrs, | ||
| 3100 | .addr_cnt = ARRAY_SIZE(omap44xx_mcpdm_addrs), | ||
| 3101 | .user = OCP_USER_MPU, | ||
| 3102 | }; | ||
| 3103 | |||
| 3104 | static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = { | ||
| 3105 | { | ||
| 3106 | .pa_start = 0x49032000, | ||
| 3107 | .pa_end = 0x4903207f, | ||
| 3108 | .flags = ADDR_TYPE_RT | ||
| 3109 | }, | ||
| 3110 | }; | ||
| 3111 | |||
| 3112 | /* l4_abe -> mcpdm (dma) */ | ||
| 3113 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = { | ||
| 3114 | .master = &omap44xx_l4_abe_hwmod, | ||
| 3115 | .slave = &omap44xx_mcpdm_hwmod, | ||
| 3116 | .clk = "ocp_abe_iclk", | ||
| 3117 | .addr = omap44xx_mcpdm_dma_addrs, | ||
| 3118 | .addr_cnt = ARRAY_SIZE(omap44xx_mcpdm_dma_addrs), | ||
| 3119 | .user = OCP_USER_SDMA, | ||
| 3120 | }; | ||
| 3121 | |||
| 3122 | /* mcpdm slave ports */ | ||
| 3123 | static struct omap_hwmod_ocp_if *omap44xx_mcpdm_slaves[] = { | ||
| 3124 | &omap44xx_l4_abe__mcpdm, | ||
| 3125 | &omap44xx_l4_abe__mcpdm_dma, | ||
| 3126 | }; | ||
| 3127 | |||
| 3128 | static struct omap_hwmod omap44xx_mcpdm_hwmod = { | ||
| 3129 | .name = "mcpdm", | ||
| 3130 | .class = &omap44xx_mcpdm_hwmod_class, | ||
| 3131 | .mpu_irqs = omap44xx_mcpdm_irqs, | ||
| 3132 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcpdm_irqs), | ||
| 3133 | .sdma_reqs = omap44xx_mcpdm_sdma_reqs, | ||
| 3134 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcpdm_sdma_reqs), | ||
| 3135 | .main_clk = "mcpdm_fck", | ||
| 3136 | .prcm = { | ||
| 3137 | .omap4 = { | ||
| 3138 | .clkctrl_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL, | ||
| 3139 | }, | ||
| 3140 | }, | ||
| 3141 | .slaves = omap44xx_mcpdm_slaves, | ||
| 3142 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcpdm_slaves), | ||
| 3143 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 3144 | }; | ||
| 3145 | |||
| 3146 | /* | ||
| 3147 | * 'mcspi' class | ||
| 3148 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | ||
| 3149 | * bus | ||
| 3150 | */ | ||
| 3151 | |||
| 3152 | static struct omap_hwmod_class_sysconfig omap44xx_mcspi_sysc = { | ||
| 3153 | .rev_offs = 0x0000, | ||
| 3154 | .sysc_offs = 0x0010, | ||
| 3155 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS | | ||
| 3156 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
| 3157 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 3158 | SIDLE_SMART_WKUP), | ||
| 3159 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
| 3160 | }; | ||
| 3161 | |||
| 3162 | static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = { | ||
| 3163 | .name = "mcspi", | ||
| 3164 | .sysc = &omap44xx_mcspi_sysc, | ||
| 3165 | .rev = OMAP4_MCSPI_REV, | ||
| 3166 | }; | ||
| 3167 | |||
| 3168 | /* mcspi1 */ | ||
| 3169 | static struct omap_hwmod omap44xx_mcspi1_hwmod; | ||
| 3170 | static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = { | ||
| 3171 | { .irq = 65 + OMAP44XX_IRQ_GIC_START }, | ||
| 3172 | }; | ||
| 3173 | |||
| 3174 | static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = { | ||
| 3175 | { .name = "tx0", .dma_req = 34 + OMAP44XX_DMA_REQ_START }, | ||
| 3176 | { .name = "rx0", .dma_req = 35 + OMAP44XX_DMA_REQ_START }, | ||
| 3177 | { .name = "tx1", .dma_req = 36 + OMAP44XX_DMA_REQ_START }, | ||
| 3178 | { .name = "rx1", .dma_req = 37 + OMAP44XX_DMA_REQ_START }, | ||
| 3179 | { .name = "tx2", .dma_req = 38 + OMAP44XX_DMA_REQ_START }, | ||
| 3180 | { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START }, | ||
| 3181 | { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START }, | ||
| 3182 | { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START }, | ||
| 3183 | }; | ||
| 3184 | |||
| 3185 | static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = { | ||
| 3186 | { | ||
| 3187 | .pa_start = 0x48098000, | ||
| 3188 | .pa_end = 0x480981ff, | ||
| 3189 | .flags = ADDR_TYPE_RT | ||
| 3190 | }, | ||
| 3191 | }; | ||
| 3192 | |||
| 3193 | /* l4_per -> mcspi1 */ | ||
| 3194 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = { | ||
| 3195 | .master = &omap44xx_l4_per_hwmod, | ||
| 3196 | .slave = &omap44xx_mcspi1_hwmod, | ||
| 3197 | .clk = "l4_div_ck", | ||
| 3198 | .addr = omap44xx_mcspi1_addrs, | ||
| 3199 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi1_addrs), | ||
| 3200 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3201 | }; | ||
| 3202 | |||
| 3203 | /* mcspi1 slave ports */ | ||
| 3204 | static struct omap_hwmod_ocp_if *omap44xx_mcspi1_slaves[] = { | ||
| 3205 | &omap44xx_l4_per__mcspi1, | ||
| 3206 | }; | ||
| 3207 | |||
| 3208 | /* mcspi1 dev_attr */ | ||
| 3209 | static struct omap2_mcspi_dev_attr mcspi1_dev_attr = { | ||
| 3210 | .num_chipselect = 4, | ||
| 3211 | }; | ||
| 3212 | |||
| 3213 | static struct omap_hwmod omap44xx_mcspi1_hwmod = { | ||
| 3214 | .name = "mcspi1", | ||
| 3215 | .class = &omap44xx_mcspi_hwmod_class, | ||
| 3216 | .mpu_irqs = omap44xx_mcspi1_irqs, | ||
| 3217 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi1_irqs), | ||
| 3218 | .sdma_reqs = omap44xx_mcspi1_sdma_reqs, | ||
| 3219 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi1_sdma_reqs), | ||
| 3220 | .main_clk = "mcspi1_fck", | ||
| 3221 | .prcm = { | ||
| 3222 | .omap4 = { | ||
| 3223 | .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI1_CLKCTRL, | ||
| 3224 | }, | ||
| 3225 | }, | ||
| 3226 | .dev_attr = &mcspi1_dev_attr, | ||
| 3227 | .slaves = omap44xx_mcspi1_slaves, | ||
| 3228 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi1_slaves), | ||
| 3229 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 3230 | }; | ||
| 3231 | |||
| 3232 | /* mcspi2 */ | ||
| 3233 | static struct omap_hwmod omap44xx_mcspi2_hwmod; | ||
| 3234 | static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = { | ||
| 3235 | { .irq = 66 + OMAP44XX_IRQ_GIC_START }, | ||
| 3236 | }; | ||
| 3237 | |||
| 3238 | static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = { | ||
| 3239 | { .name = "tx0", .dma_req = 42 + OMAP44XX_DMA_REQ_START }, | ||
| 3240 | { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START }, | ||
| 3241 | { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START }, | ||
| 3242 | { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START }, | ||
| 3243 | }; | ||
| 3244 | |||
| 3245 | static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = { | ||
| 3246 | { | ||
| 3247 | .pa_start = 0x4809a000, | ||
| 3248 | .pa_end = 0x4809a1ff, | ||
| 3249 | .flags = ADDR_TYPE_RT | ||
| 3250 | }, | ||
| 3251 | }; | ||
| 3252 | |||
| 3253 | /* l4_per -> mcspi2 */ | ||
| 3254 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = { | ||
| 3255 | .master = &omap44xx_l4_per_hwmod, | ||
| 3256 | .slave = &omap44xx_mcspi2_hwmod, | ||
| 3257 | .clk = "l4_div_ck", | ||
| 3258 | .addr = omap44xx_mcspi2_addrs, | ||
| 3259 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi2_addrs), | ||
| 3260 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3261 | }; | ||
| 3262 | |||
| 3263 | /* mcspi2 slave ports */ | ||
| 3264 | static struct omap_hwmod_ocp_if *omap44xx_mcspi2_slaves[] = { | ||
| 3265 | &omap44xx_l4_per__mcspi2, | ||
| 3266 | }; | ||
| 3267 | |||
| 3268 | /* mcspi2 dev_attr */ | ||
| 3269 | static struct omap2_mcspi_dev_attr mcspi2_dev_attr = { | ||
| 3270 | .num_chipselect = 2, | ||
| 3271 | }; | ||
| 3272 | |||
| 3273 | static struct omap_hwmod omap44xx_mcspi2_hwmod = { | ||
| 3274 | .name = "mcspi2", | ||
| 3275 | .class = &omap44xx_mcspi_hwmod_class, | ||
| 3276 | .mpu_irqs = omap44xx_mcspi2_irqs, | ||
| 3277 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi2_irqs), | ||
| 3278 | .sdma_reqs = omap44xx_mcspi2_sdma_reqs, | ||
| 3279 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi2_sdma_reqs), | ||
| 3280 | .main_clk = "mcspi2_fck", | ||
| 3281 | .prcm = { | ||
| 3282 | .omap4 = { | ||
| 3283 | .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI2_CLKCTRL, | ||
| 3284 | }, | ||
| 3285 | }, | ||
| 3286 | .dev_attr = &mcspi2_dev_attr, | ||
| 3287 | .slaves = omap44xx_mcspi2_slaves, | ||
| 3288 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi2_slaves), | ||
| 3289 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 3290 | }; | ||
| 3291 | |||
| 3292 | /* mcspi3 */ | ||
| 3293 | static struct omap_hwmod omap44xx_mcspi3_hwmod; | ||
| 3294 | static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = { | ||
| 3295 | { .irq = 91 + OMAP44XX_IRQ_GIC_START }, | ||
| 3296 | }; | ||
| 3297 | |||
| 3298 | static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = { | ||
| 3299 | { .name = "tx0", .dma_req = 14 + OMAP44XX_DMA_REQ_START }, | ||
| 3300 | { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START }, | ||
| 3301 | { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START }, | ||
| 3302 | { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START }, | ||
| 3303 | }; | ||
| 3304 | |||
| 3305 | static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = { | ||
| 3306 | { | ||
| 3307 | .pa_start = 0x480b8000, | ||
| 3308 | .pa_end = 0x480b81ff, | ||
| 3309 | .flags = ADDR_TYPE_RT | ||
| 3310 | }, | ||
| 3311 | }; | ||
| 3312 | |||
| 3313 | /* l4_per -> mcspi3 */ | ||
| 3314 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = { | ||
| 3315 | .master = &omap44xx_l4_per_hwmod, | ||
| 3316 | .slave = &omap44xx_mcspi3_hwmod, | ||
| 3317 | .clk = "l4_div_ck", | ||
| 3318 | .addr = omap44xx_mcspi3_addrs, | ||
| 3319 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi3_addrs), | ||
| 3320 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3321 | }; | ||
| 3322 | |||
| 3323 | /* mcspi3 slave ports */ | ||
| 3324 | static struct omap_hwmod_ocp_if *omap44xx_mcspi3_slaves[] = { | ||
| 3325 | &omap44xx_l4_per__mcspi3, | ||
| 3326 | }; | ||
| 3327 | |||
| 3328 | /* mcspi3 dev_attr */ | ||
| 3329 | static struct omap2_mcspi_dev_attr mcspi3_dev_attr = { | ||
| 3330 | .num_chipselect = 2, | ||
| 3331 | }; | ||
| 3332 | |||
| 3333 | static struct omap_hwmod omap44xx_mcspi3_hwmod = { | ||
| 3334 | .name = "mcspi3", | ||
| 3335 | .class = &omap44xx_mcspi_hwmod_class, | ||
| 3336 | .mpu_irqs = omap44xx_mcspi3_irqs, | ||
| 3337 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi3_irqs), | ||
| 3338 | .sdma_reqs = omap44xx_mcspi3_sdma_reqs, | ||
| 3339 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi3_sdma_reqs), | ||
| 3340 | .main_clk = "mcspi3_fck", | ||
| 3341 | .prcm = { | ||
| 3342 | .omap4 = { | ||
| 3343 | .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI3_CLKCTRL, | ||
| 3344 | }, | ||
| 3345 | }, | ||
| 3346 | .dev_attr = &mcspi3_dev_attr, | ||
| 3347 | .slaves = omap44xx_mcspi3_slaves, | ||
| 3348 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi3_slaves), | ||
| 3349 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 3350 | }; | ||
| 3351 | |||
| 3352 | /* mcspi4 */ | ||
| 3353 | static struct omap_hwmod omap44xx_mcspi4_hwmod; | ||
| 3354 | static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = { | ||
| 3355 | { .irq = 48 + OMAP44XX_IRQ_GIC_START }, | ||
| 3356 | }; | ||
| 3357 | |||
| 3358 | static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = { | ||
| 3359 | { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START }, | ||
| 3360 | { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START }, | ||
| 3361 | }; | ||
| 3362 | |||
| 3363 | static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = { | ||
| 3364 | { | ||
| 3365 | .pa_start = 0x480ba000, | ||
| 3366 | .pa_end = 0x480ba1ff, | ||
| 3367 | .flags = ADDR_TYPE_RT | ||
| 3368 | }, | ||
| 3369 | }; | ||
| 3370 | |||
| 3371 | /* l4_per -> mcspi4 */ | ||
| 3372 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = { | ||
| 3373 | .master = &omap44xx_l4_per_hwmod, | ||
| 3374 | .slave = &omap44xx_mcspi4_hwmod, | ||
| 3375 | .clk = "l4_div_ck", | ||
| 3376 | .addr = omap44xx_mcspi4_addrs, | ||
| 3377 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi4_addrs), | ||
| 3378 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3379 | }; | ||
| 3380 | |||
| 3381 | /* mcspi4 slave ports */ | ||
| 3382 | static struct omap_hwmod_ocp_if *omap44xx_mcspi4_slaves[] = { | ||
| 3383 | &omap44xx_l4_per__mcspi4, | ||
| 3384 | }; | ||
| 3385 | |||
| 3386 | /* mcspi4 dev_attr */ | ||
| 3387 | static struct omap2_mcspi_dev_attr mcspi4_dev_attr = { | ||
| 3388 | .num_chipselect = 1, | ||
| 3389 | }; | ||
| 3390 | |||
| 3391 | static struct omap_hwmod omap44xx_mcspi4_hwmod = { | ||
| 3392 | .name = "mcspi4", | ||
| 3393 | .class = &omap44xx_mcspi_hwmod_class, | ||
| 3394 | .mpu_irqs = omap44xx_mcspi4_irqs, | ||
| 3395 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi4_irqs), | ||
| 3396 | .sdma_reqs = omap44xx_mcspi4_sdma_reqs, | ||
| 3397 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi4_sdma_reqs), | ||
| 3398 | .main_clk = "mcspi4_fck", | ||
| 3399 | .prcm = { | ||
| 3400 | .omap4 = { | ||
| 3401 | .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI4_CLKCTRL, | ||
| 3402 | }, | ||
| 3403 | }, | ||
| 3404 | .dev_attr = &mcspi4_dev_attr, | ||
| 3405 | .slaves = omap44xx_mcspi4_slaves, | ||
| 3406 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi4_slaves), | ||
| 3407 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 3408 | }; | ||
| 3409 | |||
| 3410 | /* | ||
| 3411 | * 'mmc' class | ||
| 3412 | * multimedia card high-speed/sd/sdio (mmc/sd/sdio) host controller | ||
| 3413 | */ | ||
| 3414 | |||
| 3415 | static struct omap_hwmod_class_sysconfig omap44xx_mmc_sysc = { | ||
| 3416 | .rev_offs = 0x0000, | ||
| 3417 | .sysc_offs = 0x0010, | ||
| 3418 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE | | ||
| 3419 | SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE | | ||
| 3420 | SYSC_HAS_SOFTRESET), | ||
| 3421 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 3422 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | ||
| 3423 | MSTANDBY_SMART), | ||
| 3424 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
| 3425 | }; | ||
| 3426 | |||
| 3427 | static struct omap_hwmod_class omap44xx_mmc_hwmod_class = { | ||
| 3428 | .name = "mmc", | ||
| 3429 | .sysc = &omap44xx_mmc_sysc, | ||
| 3430 | }; | ||
| 3431 | |||
| 3432 | /* mmc1 */ | ||
| 3433 | |||
| 3434 | static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = { | ||
| 3435 | { .irq = 83 + OMAP44XX_IRQ_GIC_START }, | ||
| 3436 | }; | ||
| 3437 | |||
| 3438 | static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = { | ||
| 3439 | { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START }, | ||
| 3440 | { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START }, | ||
| 3441 | }; | ||
| 3442 | |||
| 3443 | /* mmc1 master ports */ | ||
| 3444 | static struct omap_hwmod_ocp_if *omap44xx_mmc1_masters[] = { | ||
| 3445 | &omap44xx_mmc1__l3_main_1, | ||
| 3446 | }; | ||
| 3447 | |||
| 3448 | static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = { | ||
| 3449 | { | ||
| 3450 | .pa_start = 0x4809c000, | ||
| 3451 | .pa_end = 0x4809c3ff, | ||
| 3452 | .flags = ADDR_TYPE_RT | ||
| 3453 | }, | ||
| 3454 | }; | ||
| 3455 | |||
| 3456 | /* l4_per -> mmc1 */ | ||
| 3457 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = { | ||
| 3458 | .master = &omap44xx_l4_per_hwmod, | ||
| 3459 | .slave = &omap44xx_mmc1_hwmod, | ||
| 3460 | .clk = "l4_div_ck", | ||
| 3461 | .addr = omap44xx_mmc1_addrs, | ||
| 3462 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc1_addrs), | ||
| 3463 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3464 | }; | ||
| 3465 | |||
| 3466 | /* mmc1 slave ports */ | ||
| 3467 | static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = { | ||
| 3468 | &omap44xx_l4_per__mmc1, | ||
| 3469 | }; | ||
| 3470 | |||
| 3471 | /* mmc1 dev_attr */ | ||
| 3472 | static struct omap_mmc_dev_attr mmc1_dev_attr = { | ||
| 3473 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, | ||
| 3474 | }; | ||
| 3475 | |||
| 3476 | static struct omap_hwmod omap44xx_mmc1_hwmod = { | ||
| 3477 | .name = "mmc1", | ||
| 3478 | .class = &omap44xx_mmc_hwmod_class, | ||
| 3479 | .mpu_irqs = omap44xx_mmc1_irqs, | ||
| 3480 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc1_irqs), | ||
| 3481 | .sdma_reqs = omap44xx_mmc1_sdma_reqs, | ||
| 3482 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc1_sdma_reqs), | ||
| 3483 | .main_clk = "mmc1_fck", | ||
| 3484 | .prcm = { | ||
| 3485 | .omap4 = { | ||
| 3486 | .clkctrl_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL, | ||
| 3487 | }, | ||
| 3488 | }, | ||
| 3489 | .dev_attr = &mmc1_dev_attr, | ||
| 3490 | .slaves = omap44xx_mmc1_slaves, | ||
| 3491 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves), | ||
| 3492 | .masters = omap44xx_mmc1_masters, | ||
| 3493 | .masters_cnt = ARRAY_SIZE(omap44xx_mmc1_masters), | ||
| 3494 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 3495 | }; | ||
| 3496 | |||
| 3497 | /* mmc2 */ | ||
| 3498 | static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = { | ||
| 3499 | { .irq = 86 + OMAP44XX_IRQ_GIC_START }, | ||
| 3500 | }; | ||
| 3501 | |||
| 3502 | static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = { | ||
| 3503 | { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START }, | ||
| 3504 | { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START }, | ||
| 3505 | }; | ||
| 3506 | |||
| 3507 | /* mmc2 master ports */ | ||
| 3508 | static struct omap_hwmod_ocp_if *omap44xx_mmc2_masters[] = { | ||
| 3509 | &omap44xx_mmc2__l3_main_1, | ||
| 3510 | }; | ||
| 3511 | |||
| 3512 | static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = { | ||
| 3513 | { | ||
| 3514 | .pa_start = 0x480b4000, | ||
| 3515 | .pa_end = 0x480b43ff, | ||
| 3516 | .flags = ADDR_TYPE_RT | ||
| 3517 | }, | ||
| 3518 | }; | ||
| 3519 | |||
| 3520 | /* l4_per -> mmc2 */ | ||
| 3521 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = { | ||
| 3522 | .master = &omap44xx_l4_per_hwmod, | ||
| 3523 | .slave = &omap44xx_mmc2_hwmod, | ||
| 3524 | .clk = "l4_div_ck", | ||
| 3525 | .addr = omap44xx_mmc2_addrs, | ||
| 3526 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc2_addrs), | ||
| 3527 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3528 | }; | ||
| 3529 | |||
| 3530 | /* mmc2 slave ports */ | ||
| 3531 | static struct omap_hwmod_ocp_if *omap44xx_mmc2_slaves[] = { | ||
| 3532 | &omap44xx_l4_per__mmc2, | ||
| 3533 | }; | ||
| 3534 | |||
| 3535 | static struct omap_hwmod omap44xx_mmc2_hwmod = { | ||
| 3536 | .name = "mmc2", | ||
| 3537 | .class = &omap44xx_mmc_hwmod_class, | ||
| 3538 | .mpu_irqs = omap44xx_mmc2_irqs, | ||
| 3539 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc2_irqs), | ||
| 3540 | .sdma_reqs = omap44xx_mmc2_sdma_reqs, | ||
| 3541 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc2_sdma_reqs), | ||
| 3542 | .main_clk = "mmc2_fck", | ||
| 3543 | .prcm = { | ||
| 3544 | .omap4 = { | ||
| 3545 | .clkctrl_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL, | ||
| 3546 | }, | ||
| 3547 | }, | ||
| 3548 | .slaves = omap44xx_mmc2_slaves, | ||
| 3549 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc2_slaves), | ||
| 3550 | .masters = omap44xx_mmc2_masters, | ||
| 3551 | .masters_cnt = ARRAY_SIZE(omap44xx_mmc2_masters), | ||
| 3552 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 3553 | }; | ||
| 3554 | |||
| 3555 | /* mmc3 */ | ||
| 3556 | static struct omap_hwmod omap44xx_mmc3_hwmod; | ||
| 3557 | static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = { | ||
| 3558 | { .irq = 94 + OMAP44XX_IRQ_GIC_START }, | ||
| 3559 | }; | ||
| 3560 | |||
| 3561 | static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = { | ||
| 3562 | { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START }, | ||
| 3563 | { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START }, | ||
| 3564 | }; | ||
| 3565 | |||
| 3566 | static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = { | ||
| 3567 | { | ||
| 3568 | .pa_start = 0x480ad000, | ||
| 3569 | .pa_end = 0x480ad3ff, | ||
| 3570 | .flags = ADDR_TYPE_RT | ||
| 3571 | }, | ||
| 3572 | }; | ||
| 3573 | |||
| 3574 | /* l4_per -> mmc3 */ | ||
| 3575 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = { | ||
| 3576 | .master = &omap44xx_l4_per_hwmod, | ||
| 3577 | .slave = &omap44xx_mmc3_hwmod, | ||
| 3578 | .clk = "l4_div_ck", | ||
| 3579 | .addr = omap44xx_mmc3_addrs, | ||
| 3580 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc3_addrs), | ||
| 3581 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3582 | }; | ||
| 3583 | |||
| 3584 | /* mmc3 slave ports */ | ||
| 3585 | static struct omap_hwmod_ocp_if *omap44xx_mmc3_slaves[] = { | ||
| 3586 | &omap44xx_l4_per__mmc3, | ||
| 3587 | }; | ||
| 3588 | |||
| 3589 | static struct omap_hwmod omap44xx_mmc3_hwmod = { | ||
| 3590 | .name = "mmc3", | ||
| 3591 | .class = &omap44xx_mmc_hwmod_class, | ||
| 3592 | .mpu_irqs = omap44xx_mmc3_irqs, | ||
| 3593 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc3_irqs), | ||
| 3594 | .sdma_reqs = omap44xx_mmc3_sdma_reqs, | ||
| 3595 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc3_sdma_reqs), | ||
| 3596 | .main_clk = "mmc3_fck", | ||
| 3597 | .prcm = { | ||
| 3598 | .omap4 = { | ||
| 3599 | .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD3_CLKCTRL, | ||
| 3600 | }, | ||
| 3601 | }, | ||
| 3602 | .slaves = omap44xx_mmc3_slaves, | ||
| 3603 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc3_slaves), | ||
| 3604 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 3605 | }; | ||
| 3606 | |||
| 3607 | /* mmc4 */ | ||
| 3608 | static struct omap_hwmod omap44xx_mmc4_hwmod; | ||
| 3609 | static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = { | ||
| 3610 | { .irq = 96 + OMAP44XX_IRQ_GIC_START }, | ||
| 3611 | }; | ||
| 3612 | |||
| 3613 | static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = { | ||
| 3614 | { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START }, | ||
| 3615 | { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START }, | ||
| 3616 | }; | ||
| 3617 | |||
| 3618 | static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = { | ||
| 3619 | { | ||
| 3620 | .pa_start = 0x480d1000, | ||
| 3621 | .pa_end = 0x480d13ff, | ||
| 3622 | .flags = ADDR_TYPE_RT | ||
| 3623 | }, | ||
| 3624 | }; | ||
| 3625 | |||
| 3626 | /* l4_per -> mmc4 */ | ||
| 3627 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = { | ||
| 3628 | .master = &omap44xx_l4_per_hwmod, | ||
| 3629 | .slave = &omap44xx_mmc4_hwmod, | ||
| 3630 | .clk = "l4_div_ck", | ||
| 3631 | .addr = omap44xx_mmc4_addrs, | ||
| 3632 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc4_addrs), | ||
| 3633 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3634 | }; | ||
| 3635 | |||
| 3636 | /* mmc4 slave ports */ | ||
| 3637 | static struct omap_hwmod_ocp_if *omap44xx_mmc4_slaves[] = { | ||
| 3638 | &omap44xx_l4_per__mmc4, | ||
| 3639 | }; | ||
| 3640 | |||
| 3641 | static struct omap_hwmod omap44xx_mmc4_hwmod = { | ||
| 3642 | .name = "mmc4", | ||
| 3643 | .class = &omap44xx_mmc_hwmod_class, | ||
| 3644 | .mpu_irqs = omap44xx_mmc4_irqs, | ||
| 3645 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc4_irqs), | ||
| 3646 | .sdma_reqs = omap44xx_mmc4_sdma_reqs, | ||
| 3647 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc4_sdma_reqs), | ||
| 3648 | .main_clk = "mmc4_fck", | ||
| 3649 | .prcm = { | ||
| 3650 | .omap4 = { | ||
| 3651 | .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD4_CLKCTRL, | ||
| 3652 | }, | ||
| 3653 | }, | ||
| 3654 | .slaves = omap44xx_mmc4_slaves, | ||
| 3655 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc4_slaves), | ||
| 3656 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 3657 | }; | ||
| 3658 | |||
| 3659 | /* mmc5 */ | ||
| 3660 | static struct omap_hwmod omap44xx_mmc5_hwmod; | ||
| 3661 | static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = { | ||
| 3662 | { .irq = 59 + OMAP44XX_IRQ_GIC_START }, | ||
| 3663 | }; | ||
| 3664 | |||
| 3665 | static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = { | ||
| 3666 | { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START }, | ||
| 3667 | { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START }, | ||
| 3668 | }; | ||
| 3669 | |||
| 3670 | static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = { | ||
| 3671 | { | ||
| 3672 | .pa_start = 0x480d5000, | ||
| 3673 | .pa_end = 0x480d53ff, | ||
| 3674 | .flags = ADDR_TYPE_RT | ||
| 3675 | }, | ||
| 3676 | }; | ||
| 3677 | |||
| 3678 | /* l4_per -> mmc5 */ | ||
| 3679 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = { | ||
| 3680 | .master = &omap44xx_l4_per_hwmod, | ||
| 3681 | .slave = &omap44xx_mmc5_hwmod, | ||
| 3682 | .clk = "l4_div_ck", | ||
| 3683 | .addr = omap44xx_mmc5_addrs, | ||
| 3684 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc5_addrs), | ||
| 3685 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3686 | }; | ||
| 3687 | |||
| 3688 | /* mmc5 slave ports */ | ||
| 3689 | static struct omap_hwmod_ocp_if *omap44xx_mmc5_slaves[] = { | ||
| 3690 | &omap44xx_l4_per__mmc5, | ||
| 3691 | }; | ||
| 3692 | |||
| 3693 | static struct omap_hwmod omap44xx_mmc5_hwmod = { | ||
| 3694 | .name = "mmc5", | ||
| 3695 | .class = &omap44xx_mmc_hwmod_class, | ||
| 3696 | .mpu_irqs = omap44xx_mmc5_irqs, | ||
| 3697 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc5_irqs), | ||
| 3698 | .sdma_reqs = omap44xx_mmc5_sdma_reqs, | ||
| 3699 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc5_sdma_reqs), | ||
| 3700 | .main_clk = "mmc5_fck", | ||
| 3701 | .prcm = { | ||
| 3702 | .omap4 = { | ||
| 3703 | .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD5_CLKCTRL, | ||
| 3704 | }, | ||
| 3705 | }, | ||
| 3706 | .slaves = omap44xx_mmc5_slaves, | ||
| 3707 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc5_slaves), | ||
| 3708 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 3709 | }; | ||
| 3710 | |||
| 3711 | /* | ||
| 1438 | * 'mpu' class | 3712 | * 'mpu' class |
| 1439 | * mpu sub-system | 3713 | * mpu sub-system |
| 1440 | */ | 3714 | */ |
| @@ -1639,6 +3913,676 @@ static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = { | |||
| 1639 | }; | 3913 | }; |
| 1640 | 3914 | ||
| 1641 | /* | 3915 | /* |
| 3916 | * 'spinlock' class | ||
| 3917 | * spinlock provides hardware assistance for synchronizing the processes | ||
| 3918 | * running on multiple processors | ||
| 3919 | */ | ||
| 3920 | |||
| 3921 | static struct omap_hwmod_class_sysconfig omap44xx_spinlock_sysc = { | ||
| 3922 | .rev_offs = 0x0000, | ||
| 3923 | .sysc_offs = 0x0010, | ||
| 3924 | .syss_offs = 0x0014, | ||
| 3925 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | | ||
| 3926 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | | ||
| 3927 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
| 3928 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 3929 | SIDLE_SMART_WKUP), | ||
| 3930 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 3931 | }; | ||
| 3932 | |||
| 3933 | static struct omap_hwmod_class omap44xx_spinlock_hwmod_class = { | ||
| 3934 | .name = "spinlock", | ||
| 3935 | .sysc = &omap44xx_spinlock_sysc, | ||
| 3936 | }; | ||
| 3937 | |||
| 3938 | /* spinlock */ | ||
| 3939 | static struct omap_hwmod omap44xx_spinlock_hwmod; | ||
| 3940 | static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = { | ||
| 3941 | { | ||
| 3942 | .pa_start = 0x4a0f6000, | ||
| 3943 | .pa_end = 0x4a0f6fff, | ||
| 3944 | .flags = ADDR_TYPE_RT | ||
| 3945 | }, | ||
| 3946 | }; | ||
| 3947 | |||
| 3948 | /* l4_cfg -> spinlock */ | ||
| 3949 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = { | ||
| 3950 | .master = &omap44xx_l4_cfg_hwmod, | ||
| 3951 | .slave = &omap44xx_spinlock_hwmod, | ||
| 3952 | .clk = "l4_div_ck", | ||
| 3953 | .addr = omap44xx_spinlock_addrs, | ||
| 3954 | .addr_cnt = ARRAY_SIZE(omap44xx_spinlock_addrs), | ||
| 3955 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 3956 | }; | ||
| 3957 | |||
| 3958 | /* spinlock slave ports */ | ||
| 3959 | static struct omap_hwmod_ocp_if *omap44xx_spinlock_slaves[] = { | ||
| 3960 | &omap44xx_l4_cfg__spinlock, | ||
| 3961 | }; | ||
| 3962 | |||
| 3963 | static struct omap_hwmod omap44xx_spinlock_hwmod = { | ||
| 3964 | .name = "spinlock", | ||
| 3965 | .class = &omap44xx_spinlock_hwmod_class, | ||
| 3966 | .prcm = { | ||
| 3967 | .omap4 = { | ||
| 3968 | .clkctrl_reg = OMAP4430_CM_L4CFG_HW_SEM_CLKCTRL, | ||
| 3969 | }, | ||
| 3970 | }, | ||
| 3971 | .slaves = omap44xx_spinlock_slaves, | ||
| 3972 | .slaves_cnt = ARRAY_SIZE(omap44xx_spinlock_slaves), | ||
| 3973 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 3974 | }; | ||
| 3975 | |||
| 3976 | /* | ||
| 3977 | * 'timer' class | ||
| 3978 | * general purpose timer module with accurate 1ms tick | ||
| 3979 | * This class contains several variants: ['timer_1ms', 'timer'] | ||
| 3980 | */ | ||
| 3981 | |||
| 3982 | static struct omap_hwmod_class_sysconfig omap44xx_timer_1ms_sysc = { | ||
| 3983 | .rev_offs = 0x0000, | ||
| 3984 | .sysc_offs = 0x0010, | ||
| 3985 | .syss_offs = 0x0014, | ||
| 3986 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | | ||
| 3987 | SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP | | ||
| 3988 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
| 3989 | SYSS_HAS_RESET_STATUS), | ||
| 3990 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 3991 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 3992 | }; | ||
| 3993 | |||
| 3994 | static struct omap_hwmod_class omap44xx_timer_1ms_hwmod_class = { | ||
| 3995 | .name = "timer", | ||
| 3996 | .sysc = &omap44xx_timer_1ms_sysc, | ||
| 3997 | }; | ||
| 3998 | |||
| 3999 | static struct omap_hwmod_class_sysconfig omap44xx_timer_sysc = { | ||
| 4000 | .rev_offs = 0x0000, | ||
| 4001 | .sysc_offs = 0x0010, | ||
| 4002 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS | | ||
| 4003 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
| 4004 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 4005 | SIDLE_SMART_WKUP), | ||
| 4006 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
| 4007 | }; | ||
| 4008 | |||
| 4009 | static struct omap_hwmod_class omap44xx_timer_hwmod_class = { | ||
| 4010 | .name = "timer", | ||
| 4011 | .sysc = &omap44xx_timer_sysc, | ||
| 4012 | }; | ||
| 4013 | |||
| 4014 | /* timer1 */ | ||
| 4015 | static struct omap_hwmod omap44xx_timer1_hwmod; | ||
| 4016 | static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = { | ||
| 4017 | { .irq = 37 + OMAP44XX_IRQ_GIC_START }, | ||
| 4018 | }; | ||
| 4019 | |||
| 4020 | static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = { | ||
| 4021 | { | ||
| 4022 | .pa_start = 0x4a318000, | ||
| 4023 | .pa_end = 0x4a31807f, | ||
| 4024 | .flags = ADDR_TYPE_RT | ||
| 4025 | }, | ||
| 4026 | }; | ||
| 4027 | |||
| 4028 | /* l4_wkup -> timer1 */ | ||
| 4029 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = { | ||
| 4030 | .master = &omap44xx_l4_wkup_hwmod, | ||
| 4031 | .slave = &omap44xx_timer1_hwmod, | ||
| 4032 | .clk = "l4_wkup_clk_mux_ck", | ||
| 4033 | .addr = omap44xx_timer1_addrs, | ||
| 4034 | .addr_cnt = ARRAY_SIZE(omap44xx_timer1_addrs), | ||
| 4035 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 4036 | }; | ||
| 4037 | |||
| 4038 | /* timer1 slave ports */ | ||
| 4039 | static struct omap_hwmod_ocp_if *omap44xx_timer1_slaves[] = { | ||
| 4040 | &omap44xx_l4_wkup__timer1, | ||
| 4041 | }; | ||
| 4042 | |||
| 4043 | static struct omap_hwmod omap44xx_timer1_hwmod = { | ||
| 4044 | .name = "timer1", | ||
| 4045 | .class = &omap44xx_timer_1ms_hwmod_class, | ||
| 4046 | .mpu_irqs = omap44xx_timer1_irqs, | ||
| 4047 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer1_irqs), | ||
| 4048 | .main_clk = "timer1_fck", | ||
| 4049 | .prcm = { | ||
| 4050 | .omap4 = { | ||
| 4051 | .clkctrl_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL, | ||
| 4052 | }, | ||
| 4053 | }, | ||
| 4054 | .slaves = omap44xx_timer1_slaves, | ||
| 4055 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer1_slaves), | ||
| 4056 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 4057 | }; | ||
| 4058 | |||
| 4059 | /* timer2 */ | ||
| 4060 | static struct omap_hwmod omap44xx_timer2_hwmod; | ||
| 4061 | static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = { | ||
| 4062 | { .irq = 38 + OMAP44XX_IRQ_GIC_START }, | ||
| 4063 | }; | ||
| 4064 | |||
| 4065 | static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = { | ||
| 4066 | { | ||
| 4067 | .pa_start = 0x48032000, | ||
| 4068 | .pa_end = 0x4803207f, | ||
| 4069 | .flags = ADDR_TYPE_RT | ||
| 4070 | }, | ||
| 4071 | }; | ||
| 4072 | |||
| 4073 | /* l4_per -> timer2 */ | ||
| 4074 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = { | ||
| 4075 | .master = &omap44xx_l4_per_hwmod, | ||
| 4076 | .slave = &omap44xx_timer2_hwmod, | ||
| 4077 | .clk = "l4_div_ck", | ||
| 4078 | .addr = omap44xx_timer2_addrs, | ||
| 4079 | .addr_cnt = ARRAY_SIZE(omap44xx_timer2_addrs), | ||
| 4080 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 4081 | }; | ||
| 4082 | |||
| 4083 | /* timer2 slave ports */ | ||
| 4084 | static struct omap_hwmod_ocp_if *omap44xx_timer2_slaves[] = { | ||
| 4085 | &omap44xx_l4_per__timer2, | ||
| 4086 | }; | ||
| 4087 | |||
| 4088 | static struct omap_hwmod omap44xx_timer2_hwmod = { | ||
| 4089 | .name = "timer2", | ||
| 4090 | .class = &omap44xx_timer_1ms_hwmod_class, | ||
| 4091 | .mpu_irqs = omap44xx_timer2_irqs, | ||
| 4092 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer2_irqs), | ||
| 4093 | .main_clk = "timer2_fck", | ||
| 4094 | .prcm = { | ||
| 4095 | .omap4 = { | ||
| 4096 | .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL, | ||
| 4097 | }, | ||
| 4098 | }, | ||
| 4099 | .slaves = omap44xx_timer2_slaves, | ||
| 4100 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer2_slaves), | ||
| 4101 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 4102 | }; | ||
| 4103 | |||
| 4104 | /* timer3 */ | ||
| 4105 | static struct omap_hwmod omap44xx_timer3_hwmod; | ||
| 4106 | static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = { | ||
| 4107 | { .irq = 39 + OMAP44XX_IRQ_GIC_START }, | ||
| 4108 | }; | ||
| 4109 | |||
| 4110 | static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = { | ||
| 4111 | { | ||
| 4112 | .pa_start = 0x48034000, | ||
| 4113 | .pa_end = 0x4803407f, | ||
| 4114 | .flags = ADDR_TYPE_RT | ||
| 4115 | }, | ||
| 4116 | }; | ||
| 4117 | |||
| 4118 | /* l4_per -> timer3 */ | ||
| 4119 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = { | ||
| 4120 | .master = &omap44xx_l4_per_hwmod, | ||
| 4121 | .slave = &omap44xx_timer3_hwmod, | ||
| 4122 | .clk = "l4_div_ck", | ||
| 4123 | .addr = omap44xx_timer3_addrs, | ||
| 4124 | .addr_cnt = ARRAY_SIZE(omap44xx_timer3_addrs), | ||
| 4125 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 4126 | }; | ||
| 4127 | |||
| 4128 | /* timer3 slave ports */ | ||
| 4129 | static struct omap_hwmod_ocp_if *omap44xx_timer3_slaves[] = { | ||
| 4130 | &omap44xx_l4_per__timer3, | ||
| 4131 | }; | ||
| 4132 | |||
| 4133 | static struct omap_hwmod omap44xx_timer3_hwmod = { | ||
| 4134 | .name = "timer3", | ||
| 4135 | .class = &omap44xx_timer_hwmod_class, | ||
| 4136 | .mpu_irqs = omap44xx_timer3_irqs, | ||
| 4137 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer3_irqs), | ||
| 4138 | .main_clk = "timer3_fck", | ||
| 4139 | .prcm = { | ||
| 4140 | .omap4 = { | ||
| 4141 | .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL, | ||
| 4142 | }, | ||
| 4143 | }, | ||
| 4144 | .slaves = omap44xx_timer3_slaves, | ||
| 4145 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer3_slaves), | ||
| 4146 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 4147 | }; | ||
| 4148 | |||
| 4149 | /* timer4 */ | ||
| 4150 | static struct omap_hwmod omap44xx_timer4_hwmod; | ||
| 4151 | static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = { | ||
| 4152 | { .irq = 40 + OMAP44XX_IRQ_GIC_START }, | ||
| 4153 | }; | ||
| 4154 | |||
| 4155 | static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = { | ||
| 4156 | { | ||
| 4157 | .pa_start = 0x48036000, | ||
| 4158 | .pa_end = 0x4803607f, | ||
| 4159 | .flags = ADDR_TYPE_RT | ||
| 4160 | }, | ||
| 4161 | }; | ||
| 4162 | |||
| 4163 | /* l4_per -> timer4 */ | ||
| 4164 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = { | ||
| 4165 | .master = &omap44xx_l4_per_hwmod, | ||
| 4166 | .slave = &omap44xx_timer4_hwmod, | ||
| 4167 | .clk = "l4_div_ck", | ||
| 4168 | .addr = omap44xx_timer4_addrs, | ||
| 4169 | .addr_cnt = ARRAY_SIZE(omap44xx_timer4_addrs), | ||
| 4170 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 4171 | }; | ||
| 4172 | |||
| 4173 | /* timer4 slave ports */ | ||
| 4174 | static struct omap_hwmod_ocp_if *omap44xx_timer4_slaves[] = { | ||
| 4175 | &omap44xx_l4_per__timer4, | ||
| 4176 | }; | ||
| 4177 | |||
| 4178 | static struct omap_hwmod omap44xx_timer4_hwmod = { | ||
| 4179 | .name = "timer4", | ||
| 4180 | .class = &omap44xx_timer_hwmod_class, | ||
| 4181 | .mpu_irqs = omap44xx_timer4_irqs, | ||
| 4182 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer4_irqs), | ||
| 4183 | .main_clk = "timer4_fck", | ||
| 4184 | .prcm = { | ||
| 4185 | .omap4 = { | ||
| 4186 | .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL, | ||
| 4187 | }, | ||
| 4188 | }, | ||
| 4189 | .slaves = omap44xx_timer4_slaves, | ||
| 4190 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer4_slaves), | ||
| 4191 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 4192 | }; | ||
| 4193 | |||
| 4194 | /* timer5 */ | ||
| 4195 | static struct omap_hwmod omap44xx_timer5_hwmod; | ||
| 4196 | static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = { | ||
| 4197 | { .irq = 41 + OMAP44XX_IRQ_GIC_START }, | ||
| 4198 | }; | ||
| 4199 | |||
| 4200 | static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = { | ||
| 4201 | { | ||
| 4202 | .pa_start = 0x40138000, | ||
| 4203 | .pa_end = 0x4013807f, | ||
| 4204 | .flags = ADDR_TYPE_RT | ||
| 4205 | }, | ||
| 4206 | }; | ||
| 4207 | |||
| 4208 | /* l4_abe -> timer5 */ | ||
| 4209 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = { | ||
| 4210 | .master = &omap44xx_l4_abe_hwmod, | ||
| 4211 | .slave = &omap44xx_timer5_hwmod, | ||
| 4212 | .clk = "ocp_abe_iclk", | ||
| 4213 | .addr = omap44xx_timer5_addrs, | ||
| 4214 | .addr_cnt = ARRAY_SIZE(omap44xx_timer5_addrs), | ||
| 4215 | .user = OCP_USER_MPU, | ||
| 4216 | }; | ||
| 4217 | |||
| 4218 | static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = { | ||
| 4219 | { | ||
| 4220 | .pa_start = 0x49038000, | ||
| 4221 | .pa_end = 0x4903807f, | ||
| 4222 | .flags = ADDR_TYPE_RT | ||
| 4223 | }, | ||
| 4224 | }; | ||
| 4225 | |||
| 4226 | /* l4_abe -> timer5 (dma) */ | ||
| 4227 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = { | ||
| 4228 | .master = &omap44xx_l4_abe_hwmod, | ||
| 4229 | .slave = &omap44xx_timer5_hwmod, | ||
| 4230 | .clk = "ocp_abe_iclk", | ||
| 4231 | .addr = omap44xx_timer5_dma_addrs, | ||
| 4232 | .addr_cnt = ARRAY_SIZE(omap44xx_timer5_dma_addrs), | ||
| 4233 | .user = OCP_USER_SDMA, | ||
| 4234 | }; | ||
| 4235 | |||
| 4236 | /* timer5 slave ports */ | ||
| 4237 | static struct omap_hwmod_ocp_if *omap44xx_timer5_slaves[] = { | ||
| 4238 | &omap44xx_l4_abe__timer5, | ||
| 4239 | &omap44xx_l4_abe__timer5_dma, | ||
| 4240 | }; | ||
| 4241 | |||
| 4242 | static struct omap_hwmod omap44xx_timer5_hwmod = { | ||
| 4243 | .name = "timer5", | ||
| 4244 | .class = &omap44xx_timer_hwmod_class, | ||
| 4245 | .mpu_irqs = omap44xx_timer5_irqs, | ||
| 4246 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer5_irqs), | ||
| 4247 | .main_clk = "timer5_fck", | ||
| 4248 | .prcm = { | ||
| 4249 | .omap4 = { | ||
| 4250 | .clkctrl_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL, | ||
| 4251 | }, | ||
| 4252 | }, | ||
| 4253 | .slaves = omap44xx_timer5_slaves, | ||
| 4254 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer5_slaves), | ||
| 4255 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 4256 | }; | ||
| 4257 | |||
| 4258 | /* timer6 */ | ||
| 4259 | static struct omap_hwmod omap44xx_timer6_hwmod; | ||
| 4260 | static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = { | ||
| 4261 | { .irq = 42 + OMAP44XX_IRQ_GIC_START }, | ||
| 4262 | }; | ||
| 4263 | |||
| 4264 | static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = { | ||
| 4265 | { | ||
| 4266 | .pa_start = 0x4013a000, | ||
| 4267 | .pa_end = 0x4013a07f, | ||
| 4268 | .flags = ADDR_TYPE_RT | ||
| 4269 | }, | ||
| 4270 | }; | ||
| 4271 | |||
| 4272 | /* l4_abe -> timer6 */ | ||
| 4273 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = { | ||
| 4274 | .master = &omap44xx_l4_abe_hwmod, | ||
| 4275 | .slave = &omap44xx_timer6_hwmod, | ||
| 4276 | .clk = "ocp_abe_iclk", | ||
| 4277 | .addr = omap44xx_timer6_addrs, | ||
| 4278 | .addr_cnt = ARRAY_SIZE(omap44xx_timer6_addrs), | ||
| 4279 | .user = OCP_USER_MPU, | ||
| 4280 | }; | ||
| 4281 | |||
| 4282 | static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = { | ||
| 4283 | { | ||
| 4284 | .pa_start = 0x4903a000, | ||
| 4285 | .pa_end = 0x4903a07f, | ||
| 4286 | .flags = ADDR_TYPE_RT | ||
| 4287 | }, | ||
| 4288 | }; | ||
| 4289 | |||
| 4290 | /* l4_abe -> timer6 (dma) */ | ||
| 4291 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = { | ||
| 4292 | .master = &omap44xx_l4_abe_hwmod, | ||
| 4293 | .slave = &omap44xx_timer6_hwmod, | ||
| 4294 | .clk = "ocp_abe_iclk", | ||
| 4295 | .addr = omap44xx_timer6_dma_addrs, | ||
| 4296 | .addr_cnt = ARRAY_SIZE(omap44xx_timer6_dma_addrs), | ||
| 4297 | .user = OCP_USER_SDMA, | ||
| 4298 | }; | ||
| 4299 | |||
| 4300 | /* timer6 slave ports */ | ||
| 4301 | static struct omap_hwmod_ocp_if *omap44xx_timer6_slaves[] = { | ||
| 4302 | &omap44xx_l4_abe__timer6, | ||
| 4303 | &omap44xx_l4_abe__timer6_dma, | ||
| 4304 | }; | ||
| 4305 | |||
| 4306 | static struct omap_hwmod omap44xx_timer6_hwmod = { | ||
| 4307 | .name = "timer6", | ||
| 4308 | .class = &omap44xx_timer_hwmod_class, | ||
| 4309 | .mpu_irqs = omap44xx_timer6_irqs, | ||
| 4310 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer6_irqs), | ||
| 4311 | .main_clk = "timer6_fck", | ||
| 4312 | .prcm = { | ||
| 4313 | .omap4 = { | ||
| 4314 | .clkctrl_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL, | ||
| 4315 | }, | ||
| 4316 | }, | ||
| 4317 | .slaves = omap44xx_timer6_slaves, | ||
| 4318 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer6_slaves), | ||
| 4319 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 4320 | }; | ||
| 4321 | |||
| 4322 | /* timer7 */ | ||
| 4323 | static struct omap_hwmod omap44xx_timer7_hwmod; | ||
| 4324 | static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = { | ||
| 4325 | { .irq = 43 + OMAP44XX_IRQ_GIC_START }, | ||
| 4326 | }; | ||
| 4327 | |||
| 4328 | static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = { | ||
| 4329 | { | ||
| 4330 | .pa_start = 0x4013c000, | ||
| 4331 | .pa_end = 0x4013c07f, | ||
| 4332 | .flags = ADDR_TYPE_RT | ||
| 4333 | }, | ||
| 4334 | }; | ||
| 4335 | |||
| 4336 | /* l4_abe -> timer7 */ | ||
| 4337 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = { | ||
| 4338 | .master = &omap44xx_l4_abe_hwmod, | ||
| 4339 | .slave = &omap44xx_timer7_hwmod, | ||
| 4340 | .clk = "ocp_abe_iclk", | ||
| 4341 | .addr = omap44xx_timer7_addrs, | ||
| 4342 | .addr_cnt = ARRAY_SIZE(omap44xx_timer7_addrs), | ||
| 4343 | .user = OCP_USER_MPU, | ||
| 4344 | }; | ||
| 4345 | |||
| 4346 | static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = { | ||
| 4347 | { | ||
| 4348 | .pa_start = 0x4903c000, | ||
| 4349 | .pa_end = 0x4903c07f, | ||
| 4350 | .flags = ADDR_TYPE_RT | ||
| 4351 | }, | ||
| 4352 | }; | ||
| 4353 | |||
| 4354 | /* l4_abe -> timer7 (dma) */ | ||
| 4355 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = { | ||
| 4356 | .master = &omap44xx_l4_abe_hwmod, | ||
| 4357 | .slave = &omap44xx_timer7_hwmod, | ||
| 4358 | .clk = "ocp_abe_iclk", | ||
| 4359 | .addr = omap44xx_timer7_dma_addrs, | ||
| 4360 | .addr_cnt = ARRAY_SIZE(omap44xx_timer7_dma_addrs), | ||
| 4361 | .user = OCP_USER_SDMA, | ||
| 4362 | }; | ||
| 4363 | |||
| 4364 | /* timer7 slave ports */ | ||
| 4365 | static struct omap_hwmod_ocp_if *omap44xx_timer7_slaves[] = { | ||
| 4366 | &omap44xx_l4_abe__timer7, | ||
| 4367 | &omap44xx_l4_abe__timer7_dma, | ||
| 4368 | }; | ||
| 4369 | |||
| 4370 | static struct omap_hwmod omap44xx_timer7_hwmod = { | ||
| 4371 | .name = "timer7", | ||
| 4372 | .class = &omap44xx_timer_hwmod_class, | ||
| 4373 | .mpu_irqs = omap44xx_timer7_irqs, | ||
| 4374 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer7_irqs), | ||
| 4375 | .main_clk = "timer7_fck", | ||
| 4376 | .prcm = { | ||
| 4377 | .omap4 = { | ||
| 4378 | .clkctrl_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL, | ||
| 4379 | }, | ||
| 4380 | }, | ||
| 4381 | .slaves = omap44xx_timer7_slaves, | ||
| 4382 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer7_slaves), | ||
| 4383 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 4384 | }; | ||
| 4385 | |||
| 4386 | /* timer8 */ | ||
| 4387 | static struct omap_hwmod omap44xx_timer8_hwmod; | ||
| 4388 | static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = { | ||
| 4389 | { .irq = 44 + OMAP44XX_IRQ_GIC_START }, | ||
| 4390 | }; | ||
| 4391 | |||
| 4392 | static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = { | ||
| 4393 | { | ||
| 4394 | .pa_start = 0x4013e000, | ||
| 4395 | .pa_end = 0x4013e07f, | ||
| 4396 | .flags = ADDR_TYPE_RT | ||
| 4397 | }, | ||
| 4398 | }; | ||
| 4399 | |||
| 4400 | /* l4_abe -> timer8 */ | ||
| 4401 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = { | ||
| 4402 | .master = &omap44xx_l4_abe_hwmod, | ||
| 4403 | .slave = &omap44xx_timer8_hwmod, | ||
| 4404 | .clk = "ocp_abe_iclk", | ||
| 4405 | .addr = omap44xx_timer8_addrs, | ||
| 4406 | .addr_cnt = ARRAY_SIZE(omap44xx_timer8_addrs), | ||
| 4407 | .user = OCP_USER_MPU, | ||
| 4408 | }; | ||
| 4409 | |||
| 4410 | static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = { | ||
| 4411 | { | ||
| 4412 | .pa_start = 0x4903e000, | ||
| 4413 | .pa_end = 0x4903e07f, | ||
| 4414 | .flags = ADDR_TYPE_RT | ||
| 4415 | }, | ||
| 4416 | }; | ||
| 4417 | |||
| 4418 | /* l4_abe -> timer8 (dma) */ | ||
| 4419 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = { | ||
| 4420 | .master = &omap44xx_l4_abe_hwmod, | ||
| 4421 | .slave = &omap44xx_timer8_hwmod, | ||
| 4422 | .clk = "ocp_abe_iclk", | ||
| 4423 | .addr = omap44xx_timer8_dma_addrs, | ||
| 4424 | .addr_cnt = ARRAY_SIZE(omap44xx_timer8_dma_addrs), | ||
| 4425 | .user = OCP_USER_SDMA, | ||
| 4426 | }; | ||
| 4427 | |||
| 4428 | /* timer8 slave ports */ | ||
| 4429 | static struct omap_hwmod_ocp_if *omap44xx_timer8_slaves[] = { | ||
| 4430 | &omap44xx_l4_abe__timer8, | ||
| 4431 | &omap44xx_l4_abe__timer8_dma, | ||
| 4432 | }; | ||
| 4433 | |||
| 4434 | static struct omap_hwmod omap44xx_timer8_hwmod = { | ||
| 4435 | .name = "timer8", | ||
| 4436 | .class = &omap44xx_timer_hwmod_class, | ||
| 4437 | .mpu_irqs = omap44xx_timer8_irqs, | ||
| 4438 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer8_irqs), | ||
| 4439 | .main_clk = "timer8_fck", | ||
| 4440 | .prcm = { | ||
| 4441 | .omap4 = { | ||
| 4442 | .clkctrl_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL, | ||
| 4443 | }, | ||
| 4444 | }, | ||
| 4445 | .slaves = omap44xx_timer8_slaves, | ||
| 4446 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer8_slaves), | ||
| 4447 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 4448 | }; | ||
| 4449 | |||
| 4450 | /* timer9 */ | ||
| 4451 | static struct omap_hwmod omap44xx_timer9_hwmod; | ||
| 4452 | static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = { | ||
| 4453 | { .irq = 45 + OMAP44XX_IRQ_GIC_START }, | ||
| 4454 | }; | ||
| 4455 | |||
| 4456 | static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = { | ||
| 4457 | { | ||
| 4458 | .pa_start = 0x4803e000, | ||
| 4459 | .pa_end = 0x4803e07f, | ||
| 4460 | .flags = ADDR_TYPE_RT | ||
| 4461 | }, | ||
| 4462 | }; | ||
| 4463 | |||
| 4464 | /* l4_per -> timer9 */ | ||
| 4465 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = { | ||
| 4466 | .master = &omap44xx_l4_per_hwmod, | ||
| 4467 | .slave = &omap44xx_timer9_hwmod, | ||
| 4468 | .clk = "l4_div_ck", | ||
| 4469 | .addr = omap44xx_timer9_addrs, | ||
| 4470 | .addr_cnt = ARRAY_SIZE(omap44xx_timer9_addrs), | ||
| 4471 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 4472 | }; | ||
| 4473 | |||
| 4474 | /* timer9 slave ports */ | ||
| 4475 | static struct omap_hwmod_ocp_if *omap44xx_timer9_slaves[] = { | ||
| 4476 | &omap44xx_l4_per__timer9, | ||
| 4477 | }; | ||
| 4478 | |||
| 4479 | static struct omap_hwmod omap44xx_timer9_hwmod = { | ||
| 4480 | .name = "timer9", | ||
| 4481 | .class = &omap44xx_timer_hwmod_class, | ||
| 4482 | .mpu_irqs = omap44xx_timer9_irqs, | ||
| 4483 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer9_irqs), | ||
| 4484 | .main_clk = "timer9_fck", | ||
| 4485 | .prcm = { | ||
| 4486 | .omap4 = { | ||
| 4487 | .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL, | ||
| 4488 | }, | ||
| 4489 | }, | ||
| 4490 | .slaves = omap44xx_timer9_slaves, | ||
| 4491 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer9_slaves), | ||
| 4492 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 4493 | }; | ||
| 4494 | |||
| 4495 | /* timer10 */ | ||
| 4496 | static struct omap_hwmod omap44xx_timer10_hwmod; | ||
| 4497 | static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = { | ||
| 4498 | { .irq = 46 + OMAP44XX_IRQ_GIC_START }, | ||
| 4499 | }; | ||
| 4500 | |||
| 4501 | static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = { | ||
| 4502 | { | ||
| 4503 | .pa_start = 0x48086000, | ||
| 4504 | .pa_end = 0x4808607f, | ||
| 4505 | .flags = ADDR_TYPE_RT | ||
| 4506 | }, | ||
| 4507 | }; | ||
| 4508 | |||
| 4509 | /* l4_per -> timer10 */ | ||
| 4510 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = { | ||
| 4511 | .master = &omap44xx_l4_per_hwmod, | ||
| 4512 | .slave = &omap44xx_timer10_hwmod, | ||
| 4513 | .clk = "l4_div_ck", | ||
| 4514 | .addr = omap44xx_timer10_addrs, | ||
| 4515 | .addr_cnt = ARRAY_SIZE(omap44xx_timer10_addrs), | ||
| 4516 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 4517 | }; | ||
| 4518 | |||
| 4519 | /* timer10 slave ports */ | ||
| 4520 | static struct omap_hwmod_ocp_if *omap44xx_timer10_slaves[] = { | ||
| 4521 | &omap44xx_l4_per__timer10, | ||
| 4522 | }; | ||
| 4523 | |||
| 4524 | static struct omap_hwmod omap44xx_timer10_hwmod = { | ||
| 4525 | .name = "timer10", | ||
| 4526 | .class = &omap44xx_timer_1ms_hwmod_class, | ||
| 4527 | .mpu_irqs = omap44xx_timer10_irqs, | ||
| 4528 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer10_irqs), | ||
| 4529 | .main_clk = "timer10_fck", | ||
| 4530 | .prcm = { | ||
| 4531 | .omap4 = { | ||
| 4532 | .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL, | ||
| 4533 | }, | ||
| 4534 | }, | ||
| 4535 | .slaves = omap44xx_timer10_slaves, | ||
| 4536 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer10_slaves), | ||
| 4537 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 4538 | }; | ||
| 4539 | |||
| 4540 | /* timer11 */ | ||
| 4541 | static struct omap_hwmod omap44xx_timer11_hwmod; | ||
| 4542 | static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = { | ||
| 4543 | { .irq = 47 + OMAP44XX_IRQ_GIC_START }, | ||
| 4544 | }; | ||
| 4545 | |||
| 4546 | static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = { | ||
| 4547 | { | ||
| 4548 | .pa_start = 0x48088000, | ||
| 4549 | .pa_end = 0x4808807f, | ||
| 4550 | .flags = ADDR_TYPE_RT | ||
| 4551 | }, | ||
| 4552 | }; | ||
| 4553 | |||
| 4554 | /* l4_per -> timer11 */ | ||
| 4555 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = { | ||
| 4556 | .master = &omap44xx_l4_per_hwmod, | ||
| 4557 | .slave = &omap44xx_timer11_hwmod, | ||
| 4558 | .clk = "l4_div_ck", | ||
| 4559 | .addr = omap44xx_timer11_addrs, | ||
| 4560 | .addr_cnt = ARRAY_SIZE(omap44xx_timer11_addrs), | ||
| 4561 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 4562 | }; | ||
| 4563 | |||
| 4564 | /* timer11 slave ports */ | ||
| 4565 | static struct omap_hwmod_ocp_if *omap44xx_timer11_slaves[] = { | ||
| 4566 | &omap44xx_l4_per__timer11, | ||
| 4567 | }; | ||
| 4568 | |||
| 4569 | static struct omap_hwmod omap44xx_timer11_hwmod = { | ||
| 4570 | .name = "timer11", | ||
| 4571 | .class = &omap44xx_timer_hwmod_class, | ||
| 4572 | .mpu_irqs = omap44xx_timer11_irqs, | ||
| 4573 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer11_irqs), | ||
| 4574 | .main_clk = "timer11_fck", | ||
| 4575 | .prcm = { | ||
| 4576 | .omap4 = { | ||
| 4577 | .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL, | ||
| 4578 | }, | ||
| 4579 | }, | ||
| 4580 | .slaves = omap44xx_timer11_slaves, | ||
| 4581 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer11_slaves), | ||
| 4582 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 4583 | }; | ||
| 4584 | |||
| 4585 | /* | ||
| 1642 | * 'uart' class | 4586 | * 'uart' class |
| 1643 | * universal asynchronous receiver/transmitter (uart) | 4587 | * universal asynchronous receiver/transmitter (uart) |
| 1644 | */ | 4588 | */ |
| @@ -1870,6 +4814,88 @@ static struct omap_hwmod omap44xx_uart4_hwmod = { | |||
| 1870 | }; | 4814 | }; |
| 1871 | 4815 | ||
| 1872 | /* | 4816 | /* |
| 4817 | * 'usb_otg_hs' class | ||
| 4818 | * high-speed on-the-go universal serial bus (usb_otg_hs) controller | ||
| 4819 | */ | ||
| 4820 | |||
| 4821 | static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = { | ||
| 4822 | .rev_offs = 0x0400, | ||
| 4823 | .sysc_offs = 0x0404, | ||
| 4824 | .syss_offs = 0x0408, | ||
| 4825 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP | | ||
| 4826 | SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | | ||
| 4827 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
| 4828 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
| 4829 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | ||
| 4830 | MSTANDBY_SMART), | ||
| 4831 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
| 4832 | }; | ||
| 4833 | |||
| 4834 | static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = { | ||
| 4835 | .name = "usb_otg_hs", | ||
| 4836 | .sysc = &omap44xx_usb_otg_hs_sysc, | ||
| 4837 | }; | ||
| 4838 | |||
| 4839 | /* usb_otg_hs */ | ||
| 4840 | static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = { | ||
| 4841 | { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START }, | ||
| 4842 | { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START }, | ||
| 4843 | }; | ||
| 4844 | |||
| 4845 | /* usb_otg_hs master ports */ | ||
| 4846 | static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = { | ||
| 4847 | &omap44xx_usb_otg_hs__l3_main_2, | ||
| 4848 | }; | ||
| 4849 | |||
| 4850 | static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = { | ||
| 4851 | { | ||
| 4852 | .pa_start = 0x4a0ab000, | ||
| 4853 | .pa_end = 0x4a0ab003, | ||
| 4854 | .flags = ADDR_TYPE_RT | ||
| 4855 | }, | ||
| 4856 | }; | ||
| 4857 | |||
| 4858 | /* l4_cfg -> usb_otg_hs */ | ||
| 4859 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = { | ||
| 4860 | .master = &omap44xx_l4_cfg_hwmod, | ||
| 4861 | .slave = &omap44xx_usb_otg_hs_hwmod, | ||
| 4862 | .clk = "l4_div_ck", | ||
| 4863 | .addr = omap44xx_usb_otg_hs_addrs, | ||
| 4864 | .addr_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_addrs), | ||
| 4865 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 4866 | }; | ||
| 4867 | |||
| 4868 | /* usb_otg_hs slave ports */ | ||
| 4869 | static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = { | ||
| 4870 | &omap44xx_l4_cfg__usb_otg_hs, | ||
| 4871 | }; | ||
| 4872 | |||
| 4873 | static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = { | ||
| 4874 | { .role = "xclk", .clk = "usb_otg_hs_xclk" }, | ||
| 4875 | }; | ||
| 4876 | |||
| 4877 | static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = { | ||
| 4878 | .name = "usb_otg_hs", | ||
| 4879 | .class = &omap44xx_usb_otg_hs_hwmod_class, | ||
| 4880 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, | ||
| 4881 | .mpu_irqs = omap44xx_usb_otg_hs_irqs, | ||
| 4882 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_irqs), | ||
| 4883 | .main_clk = "usb_otg_hs_ick", | ||
| 4884 | .prcm = { | ||
| 4885 | .omap4 = { | ||
| 4886 | .clkctrl_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL, | ||
| 4887 | }, | ||
| 4888 | }, | ||
| 4889 | .opt_clks = usb_otg_hs_opt_clks, | ||
| 4890 | .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks), | ||
| 4891 | .slaves = omap44xx_usb_otg_hs_slaves, | ||
| 4892 | .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves), | ||
| 4893 | .masters = omap44xx_usb_otg_hs_masters, | ||
| 4894 | .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters), | ||
| 4895 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
| 4896 | }; | ||
| 4897 | |||
| 4898 | /* | ||
| 1873 | * 'wd_timer' class | 4899 | * 'wd_timer' class |
| 1874 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on | 4900 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on |
| 1875 | * overflow condition | 4901 | * overflow condition |
| @@ -2024,13 +5050,34 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | |||
| 2024 | /* mpu_bus class */ | 5050 | /* mpu_bus class */ |
| 2025 | &omap44xx_mpu_private_hwmod, | 5051 | &omap44xx_mpu_private_hwmod, |
| 2026 | 5052 | ||
| 5053 | /* aess class */ | ||
| 5054 | /* &omap44xx_aess_hwmod, */ | ||
| 5055 | |||
| 5056 | /* bandgap class */ | ||
| 5057 | &omap44xx_bandgap_hwmod, | ||
| 5058 | |||
| 5059 | /* counter class */ | ||
| 5060 | /* &omap44xx_counter_32k_hwmod, */ | ||
| 5061 | |||
| 2027 | /* dma class */ | 5062 | /* dma class */ |
| 2028 | &omap44xx_dma_system_hwmod, | 5063 | &omap44xx_dma_system_hwmod, |
| 2029 | 5064 | ||
| 5065 | /* dmic class */ | ||
| 5066 | &omap44xx_dmic_hwmod, | ||
| 5067 | |||
| 2030 | /* dsp class */ | 5068 | /* dsp class */ |
| 2031 | &omap44xx_dsp_hwmod, | 5069 | &omap44xx_dsp_hwmod, |
| 2032 | &omap44xx_dsp_c0_hwmod, | 5070 | &omap44xx_dsp_c0_hwmod, |
| 2033 | 5071 | ||
| 5072 | /* dss class */ | ||
| 5073 | &omap44xx_dss_hwmod, | ||
| 5074 | &omap44xx_dss_dispc_hwmod, | ||
| 5075 | &omap44xx_dss_dsi1_hwmod, | ||
| 5076 | &omap44xx_dss_dsi2_hwmod, | ||
| 5077 | &omap44xx_dss_hdmi_hwmod, | ||
| 5078 | &omap44xx_dss_rfbi_hwmod, | ||
| 5079 | &omap44xx_dss_venc_hwmod, | ||
| 5080 | |||
| 2034 | /* gpio class */ | 5081 | /* gpio class */ |
| 2035 | &omap44xx_gpio1_hwmod, | 5082 | &omap44xx_gpio1_hwmod, |
| 2036 | &omap44xx_gpio2_hwmod, | 5083 | &omap44xx_gpio2_hwmod, |
| @@ -2039,17 +5086,56 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | |||
| 2039 | &omap44xx_gpio5_hwmod, | 5086 | &omap44xx_gpio5_hwmod, |
| 2040 | &omap44xx_gpio6_hwmod, | 5087 | &omap44xx_gpio6_hwmod, |
| 2041 | 5088 | ||
| 5089 | /* hsi class */ | ||
| 5090 | /* &omap44xx_hsi_hwmod, */ | ||
| 5091 | |||
| 2042 | /* i2c class */ | 5092 | /* i2c class */ |
| 2043 | &omap44xx_i2c1_hwmod, | 5093 | &omap44xx_i2c1_hwmod, |
| 2044 | &omap44xx_i2c2_hwmod, | 5094 | &omap44xx_i2c2_hwmod, |
| 2045 | &omap44xx_i2c3_hwmod, | 5095 | &omap44xx_i2c3_hwmod, |
| 2046 | &omap44xx_i2c4_hwmod, | 5096 | &omap44xx_i2c4_hwmod, |
| 2047 | 5097 | ||
| 5098 | /* ipu class */ | ||
| 5099 | &omap44xx_ipu_hwmod, | ||
| 5100 | &omap44xx_ipu_c0_hwmod, | ||
| 5101 | &omap44xx_ipu_c1_hwmod, | ||
| 5102 | |||
| 5103 | /* iss class */ | ||
| 5104 | /* &omap44xx_iss_hwmod, */ | ||
| 5105 | |||
| 2048 | /* iva class */ | 5106 | /* iva class */ |
| 2049 | &omap44xx_iva_hwmod, | 5107 | &omap44xx_iva_hwmod, |
| 2050 | &omap44xx_iva_seq0_hwmod, | 5108 | &omap44xx_iva_seq0_hwmod, |
| 2051 | &omap44xx_iva_seq1_hwmod, | 5109 | &omap44xx_iva_seq1_hwmod, |
| 2052 | 5110 | ||
| 5111 | /* kbd class */ | ||
| 5112 | /* &omap44xx_kbd_hwmod, */ | ||
| 5113 | |||
| 5114 | /* mailbox class */ | ||
| 5115 | &omap44xx_mailbox_hwmod, | ||
| 5116 | |||
| 5117 | /* mcbsp class */ | ||
| 5118 | &omap44xx_mcbsp1_hwmod, | ||
| 5119 | &omap44xx_mcbsp2_hwmod, | ||
| 5120 | &omap44xx_mcbsp3_hwmod, | ||
| 5121 | &omap44xx_mcbsp4_hwmod, | ||
| 5122 | |||
| 5123 | /* mcpdm class */ | ||
| 5124 | /* &omap44xx_mcpdm_hwmod, */ | ||
| 5125 | |||
| 5126 | /* mcspi class */ | ||
| 5127 | &omap44xx_mcspi1_hwmod, | ||
| 5128 | &omap44xx_mcspi2_hwmod, | ||
| 5129 | &omap44xx_mcspi3_hwmod, | ||
| 5130 | &omap44xx_mcspi4_hwmod, | ||
| 5131 | |||
| 5132 | /* mmc class */ | ||
| 5133 | &omap44xx_mmc1_hwmod, | ||
| 5134 | &omap44xx_mmc2_hwmod, | ||
| 5135 | &omap44xx_mmc3_hwmod, | ||
| 5136 | &omap44xx_mmc4_hwmod, | ||
| 5137 | &omap44xx_mmc5_hwmod, | ||
| 5138 | |||
| 2053 | /* mpu class */ | 5139 | /* mpu class */ |
| 2054 | &omap44xx_mpu_hwmod, | 5140 | &omap44xx_mpu_hwmod, |
| 2055 | 5141 | ||
| @@ -2058,12 +5144,31 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | |||
| 2058 | &omap44xx_smartreflex_iva_hwmod, | 5144 | &omap44xx_smartreflex_iva_hwmod, |
| 2059 | &omap44xx_smartreflex_mpu_hwmod, | 5145 | &omap44xx_smartreflex_mpu_hwmod, |
| 2060 | 5146 | ||
| 5147 | /* spinlock class */ | ||
| 5148 | &omap44xx_spinlock_hwmod, | ||
| 5149 | |||
| 5150 | /* timer class */ | ||
| 5151 | &omap44xx_timer1_hwmod, | ||
| 5152 | &omap44xx_timer2_hwmod, | ||
| 5153 | &omap44xx_timer3_hwmod, | ||
| 5154 | &omap44xx_timer4_hwmod, | ||
| 5155 | &omap44xx_timer5_hwmod, | ||
| 5156 | &omap44xx_timer6_hwmod, | ||
| 5157 | &omap44xx_timer7_hwmod, | ||
| 5158 | &omap44xx_timer8_hwmod, | ||
| 5159 | &omap44xx_timer9_hwmod, | ||
| 5160 | &omap44xx_timer10_hwmod, | ||
| 5161 | &omap44xx_timer11_hwmod, | ||
| 5162 | |||
| 2061 | /* uart class */ | 5163 | /* uart class */ |
| 2062 | &omap44xx_uart1_hwmod, | 5164 | &omap44xx_uart1_hwmod, |
| 2063 | &omap44xx_uart2_hwmod, | 5165 | &omap44xx_uart2_hwmod, |
| 2064 | &omap44xx_uart3_hwmod, | 5166 | &omap44xx_uart3_hwmod, |
| 2065 | &omap44xx_uart4_hwmod, | 5167 | &omap44xx_uart4_hwmod, |
| 2066 | 5168 | ||
| 5169 | /* usb_otg_hs class */ | ||
| 5170 | &omap44xx_usb_otg_hs_hwmod, | ||
| 5171 | |||
| 2067 | /* wd_timer class */ | 5172 | /* wd_timer class */ |
| 2068 | &omap44xx_wd_timer2_hwmod, | 5173 | &omap44xx_wd_timer2_hwmod, |
| 2069 | &omap44xx_wd_timer3_hwmod, | 5174 | &omap44xx_wd_timer3_hwmod, |
| @@ -2073,6 +5178,6 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | |||
| 2073 | 5178 | ||
| 2074 | int __init omap44xx_hwmod_init(void) | 5179 | int __init omap44xx_hwmod_init(void) |
| 2075 | { | 5180 | { |
| 2076 | return omap_hwmod_init(omap44xx_hwmods); | 5181 | return omap_hwmod_register(omap44xx_hwmods); |
| 2077 | } | 5182 | } |
| 2078 | 5183 | ||
diff --git a/arch/arm/mach-omap2/omap_l3_noc.c b/arch/arm/mach-omap2/omap_l3_noc.c new file mode 100644 index 000000000000..82632c24076f --- /dev/null +++ b/arch/arm/mach-omap2/omap_l3_noc.c | |||
| @@ -0,0 +1,253 @@ | |||
| 1 | /* | ||
| 2 | * OMAP4XXX L3 Interconnect error handling driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Texas Corporation | ||
| 5 | * Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
| 6 | * Sricharan <r.sricharan@ti.com> | ||
| 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 as published by | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 21 | * USA | ||
| 22 | */ | ||
| 23 | #include <linux/init.h> | ||
| 24 | #include <linux/io.h> | ||
| 25 | #include <linux/platform_device.h> | ||
| 26 | #include <linux/interrupt.h> | ||
| 27 | #include <linux/kernel.h> | ||
| 28 | #include <linux/slab.h> | ||
| 29 | |||
| 30 | #include "omap_l3_noc.h" | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Interrupt Handler for L3 error detection. | ||
| 34 | * 1) Identify the L3 clockdomain partition to which the error belongs to. | ||
| 35 | * 2) Identify the slave where the error information is logged | ||
| 36 | * 3) Print the logged information. | ||
| 37 | * 4) Add dump stack to provide kernel trace. | ||
| 38 | * | ||
| 39 | * Two Types of errors : | ||
| 40 | * 1) Custom errors in L3 : | ||
| 41 | * Target like DMM/FW/EMIF generates SRESP=ERR error | ||
| 42 | * 2) Standard L3 error: | ||
| 43 | * - Unsupported CMD. | ||
| 44 | * L3 tries to access target while it is idle | ||
| 45 | * - OCP disconnect. | ||
| 46 | * - Address hole error: | ||
| 47 | * If DSS/ISS/FDIF/USBHOSTFS access a target where they | ||
| 48 | * do not have connectivity, the error is logged in | ||
| 49 | * their default target which is DMM2. | ||
| 50 | * | ||
| 51 | * On High Secure devices, firewall errors are possible and those | ||
| 52 | * can be trapped as well. But the trapping is implemented as part | ||
| 53 | * secure software and hence need not be implemented here. | ||
| 54 | */ | ||
| 55 | static irqreturn_t l3_interrupt_handler(int irq, void *_l3) | ||
| 56 | { | ||
| 57 | |||
| 58 | struct omap4_l3 *l3 = _l3; | ||
| 59 | int inttype, i, j; | ||
| 60 | int err_src = 0; | ||
| 61 | u32 std_err_main_addr, std_err_main, err_reg; | ||
| 62 | u32 base, slave_addr, clear; | ||
| 63 | char *source_name; | ||
| 64 | |||
| 65 | /* Get the Type of interrupt */ | ||
| 66 | if (irq == l3->app_irq) | ||
| 67 | inttype = L3_APPLICATION_ERROR; | ||
| 68 | else | ||
| 69 | inttype = L3_DEBUG_ERROR; | ||
| 70 | |||
| 71 | for (i = 0; i < L3_MODULES; i++) { | ||
| 72 | /* | ||
| 73 | * Read the regerr register of the clock domain | ||
| 74 | * to determine the source | ||
| 75 | */ | ||
| 76 | base = (u32)l3->l3_base[i]; | ||
| 77 | err_reg = readl(base + l3_flagmux[i] + (inttype << 3)); | ||
| 78 | |||
| 79 | /* Get the corresponding error and analyse */ | ||
| 80 | if (err_reg) { | ||
| 81 | /* Identify the source from control status register */ | ||
| 82 | for (j = 0; !(err_reg & (1 << j)); j++) | ||
| 83 | ; | ||
| 84 | |||
| 85 | err_src = j; | ||
| 86 | /* Read the stderrlog_main_source from clk domain */ | ||
| 87 | std_err_main_addr = base + (*(l3_targ[i] + err_src)); | ||
| 88 | std_err_main = readl(std_err_main_addr); | ||
| 89 | |||
| 90 | switch ((std_err_main & CUSTOM_ERROR)) { | ||
| 91 | case STANDARD_ERROR: | ||
| 92 | source_name = | ||
| 93 | l3_targ_stderrlog_main_name[i][err_src]; | ||
| 94 | |||
| 95 | slave_addr = std_err_main_addr + | ||
| 96 | L3_SLAVE_ADDRESS_OFFSET; | ||
| 97 | WARN(true, "L3 standard error: SOURCE:%s at address 0x%x\n", | ||
| 98 | source_name, readl(slave_addr)); | ||
| 99 | /* clear the std error log*/ | ||
| 100 | clear = std_err_main | CLEAR_STDERR_LOG; | ||
| 101 | writel(clear, std_err_main_addr); | ||
| 102 | break; | ||
| 103 | |||
| 104 | case CUSTOM_ERROR: | ||
| 105 | source_name = | ||
| 106 | l3_targ_stderrlog_main_name[i][err_src]; | ||
| 107 | |||
| 108 | WARN(true, "CUSTOM SRESP error with SOURCE:%s\n", | ||
| 109 | source_name); | ||
| 110 | /* clear the std error log*/ | ||
| 111 | clear = std_err_main | CLEAR_STDERR_LOG; | ||
| 112 | writel(clear, std_err_main_addr); | ||
| 113 | break; | ||
| 114 | |||
| 115 | default: | ||
| 116 | /* Nothing to be handled here as of now */ | ||
| 117 | break; | ||
| 118 | } | ||
| 119 | /* Error found so break the for loop */ | ||
| 120 | break; | ||
| 121 | } | ||
| 122 | } | ||
| 123 | return IRQ_HANDLED; | ||
| 124 | } | ||
| 125 | |||
| 126 | static int __init omap4_l3_probe(struct platform_device *pdev) | ||
| 127 | { | ||
| 128 | static struct omap4_l3 *l3; | ||
| 129 | struct resource *res; | ||
| 130 | int ret; | ||
| 131 | int irq; | ||
| 132 | |||
| 133 | l3 = kzalloc(sizeof(*l3), GFP_KERNEL); | ||
| 134 | if (!l3) | ||
| 135 | ret = -ENOMEM; | ||
| 136 | |||
| 137 | platform_set_drvdata(pdev, l3); | ||
| 138 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
| 139 | if (!res) { | ||
| 140 | dev_err(&pdev->dev, "couldn't find resource 0\n"); | ||
| 141 | ret = -ENODEV; | ||
| 142 | goto err1; | ||
| 143 | } | ||
| 144 | |||
| 145 | l3->l3_base[0] = ioremap(res->start, resource_size(res)); | ||
| 146 | if (!(l3->l3_base[0])) { | ||
| 147 | dev_err(&pdev->dev, "ioremap failed\n"); | ||
| 148 | ret = -ENOMEM; | ||
| 149 | goto err2; | ||
| 150 | } | ||
| 151 | |||
| 152 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); | ||
| 153 | if (!res) { | ||
| 154 | dev_err(&pdev->dev, "couldn't find resource 1\n"); | ||
| 155 | ret = -ENODEV; | ||
| 156 | goto err3; | ||
| 157 | } | ||
| 158 | |||
| 159 | l3->l3_base[1] = ioremap(res->start, resource_size(res)); | ||
| 160 | if (!(l3->l3_base[1])) { | ||
| 161 | dev_err(&pdev->dev, "ioremap failed\n"); | ||
| 162 | ret = -ENOMEM; | ||
| 163 | goto err4; | ||
| 164 | } | ||
| 165 | |||
| 166 | res = platform_get_resource(pdev, IORESOURCE_MEM, 2); | ||
| 167 | if (!res) { | ||
| 168 | dev_err(&pdev->dev, "couldn't find resource 2\n"); | ||
| 169 | ret = -ENODEV; | ||
| 170 | goto err5; | ||
| 171 | } | ||
| 172 | |||
| 173 | l3->l3_base[2] = ioremap(res->start, resource_size(res)); | ||
| 174 | if (!(l3->l3_base[2])) { | ||
| 175 | dev_err(&pdev->dev, "ioremap failed\n"); | ||
| 176 | ret = -ENOMEM; | ||
| 177 | goto err6; | ||
| 178 | } | ||
| 179 | |||
| 180 | /* | ||
| 181 | * Setup interrupt Handlers | ||
| 182 | */ | ||
| 183 | irq = platform_get_irq(pdev, 0); | ||
| 184 | ret = request_irq(irq, | ||
| 185 | l3_interrupt_handler, | ||
| 186 | IRQF_DISABLED, "l3-dbg-irq", l3); | ||
| 187 | if (ret) { | ||
| 188 | pr_crit("L3: request_irq failed to register for 0x%x\n", | ||
| 189 | OMAP44XX_IRQ_L3_DBG); | ||
| 190 | goto err7; | ||
| 191 | } | ||
| 192 | l3->debug_irq = irq; | ||
| 193 | |||
| 194 | irq = platform_get_irq(pdev, 1); | ||
| 195 | ret = request_irq(irq, | ||
| 196 | l3_interrupt_handler, | ||
| 197 | IRQF_DISABLED, "l3-app-irq", l3); | ||
| 198 | if (ret) { | ||
| 199 | pr_crit("L3: request_irq failed to register for 0x%x\n", | ||
| 200 | OMAP44XX_IRQ_L3_APP); | ||
| 201 | goto err8; | ||
| 202 | } | ||
| 203 | l3->app_irq = irq; | ||
| 204 | |||
| 205 | goto err0; | ||
| 206 | err8: | ||
| 207 | err7: | ||
| 208 | iounmap(l3->l3_base[2]); | ||
| 209 | err6: | ||
| 210 | err5: | ||
| 211 | iounmap(l3->l3_base[1]); | ||
| 212 | err4: | ||
| 213 | err3: | ||
| 214 | iounmap(l3->l3_base[0]); | ||
| 215 | err2: | ||
| 216 | err1: | ||
| 217 | kfree(l3); | ||
| 218 | err0: | ||
| 219 | return ret; | ||
| 220 | } | ||
| 221 | |||
| 222 | static int __exit omap4_l3_remove(struct platform_device *pdev) | ||
| 223 | { | ||
| 224 | struct omap4_l3 *l3 = platform_get_drvdata(pdev); | ||
| 225 | |||
| 226 | free_irq(l3->app_irq, l3); | ||
| 227 | free_irq(l3->debug_irq, l3); | ||
| 228 | iounmap(l3->l3_base[0]); | ||
| 229 | iounmap(l3->l3_base[1]); | ||
| 230 | iounmap(l3->l3_base[2]); | ||
| 231 | kfree(l3); | ||
| 232 | |||
| 233 | return 0; | ||
| 234 | } | ||
| 235 | |||
| 236 | static struct platform_driver omap4_l3_driver = { | ||
| 237 | .remove = __exit_p(omap4_l3_remove), | ||
| 238 | .driver = { | ||
| 239 | .name = "omap_l3_noc", | ||
| 240 | }, | ||
| 241 | }; | ||
| 242 | |||
| 243 | static int __init omap4_l3_init(void) | ||
| 244 | { | ||
| 245 | return platform_driver_probe(&omap4_l3_driver, omap4_l3_probe); | ||
| 246 | } | ||
| 247 | postcore_initcall_sync(omap4_l3_init); | ||
| 248 | |||
| 249 | static void __exit omap4_l3_exit(void) | ||
| 250 | { | ||
| 251 | platform_driver_unregister(&omap4_l3_driver); | ||
| 252 | } | ||
| 253 | module_exit(omap4_l3_exit); | ||
diff --git a/arch/arm/mach-omap2/omap_l3_noc.h b/arch/arm/mach-omap2/omap_l3_noc.h new file mode 100644 index 000000000000..359b83348aed --- /dev/null +++ b/arch/arm/mach-omap2/omap_l3_noc.h | |||
| @@ -0,0 +1,132 @@ | |||
| 1 | /* | ||
| 2 | * OMAP4XXX L3 Interconnect error handling driver header | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Texas Corporation | ||
| 5 | * Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
| 6 | * sricharan <r.sricharan@ti.com> | ||
| 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 as published by | ||
| 10 | * the Free Software Foundation; either version 2 of the License, or | ||
| 11 | * (at your option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with this program; if not, write to the Free Software | ||
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 21 | * USA | ||
| 22 | */ | ||
| 23 | #ifndef __ARCH_ARM_MACH_OMAP2_L3_INTERCONNECT_3XXX_H | ||
| 24 | #define __ARCH_ARM_MACH_OMAP2_L3_INTERCONNECT_3XXX_H | ||
| 25 | |||
| 26 | /* | ||
| 27 | * L3 register offsets | ||
| 28 | */ | ||
| 29 | #define L3_MODULES 3 | ||
| 30 | #define CLEAR_STDERR_LOG (1 << 31) | ||
| 31 | #define CUSTOM_ERROR 0x2 | ||
| 32 | #define STANDARD_ERROR 0x0 | ||
| 33 | #define INBAND_ERROR 0x0 | ||
| 34 | #define EMIF_KERRLOG_OFFSET 0x10 | ||
| 35 | #define L3_SLAVE_ADDRESS_OFFSET 0x14 | ||
| 36 | #define LOGICAL_ADDR_ERRORLOG 0x4 | ||
| 37 | #define L3_APPLICATION_ERROR 0x0 | ||
| 38 | #define L3_DEBUG_ERROR 0x1 | ||
| 39 | |||
| 40 | u32 l3_flagmux[L3_MODULES] = { | ||
| 41 | 0x50C, | ||
| 42 | 0x100C, | ||
| 43 | 0X020C | ||
| 44 | }; | ||
| 45 | |||
| 46 | /* | ||
| 47 | * L3 Target standard Error register offsets | ||
| 48 | */ | ||
| 49 | u32 l3_targ_stderrlog_main_clk1[] = { | ||
| 50 | 0x148, /* DMM1 */ | ||
| 51 | 0x248, /* DMM2 */ | ||
| 52 | 0x348, /* ABE */ | ||
| 53 | 0x448, /* L4CFG */ | ||
| 54 | 0x648 /* CLK2 PWR DISC */ | ||
| 55 | }; | ||
| 56 | |||
| 57 | u32 l3_targ_stderrlog_main_clk2[] = { | ||
| 58 | 0x548, /* CORTEX M3 */ | ||
| 59 | 0x348, /* DSS */ | ||
| 60 | 0x148, /* GPMC */ | ||
| 61 | 0x448, /* ISS */ | ||
| 62 | 0x748, /* IVAHD */ | ||
| 63 | 0xD48, /* missing in TRM corresponds to AES1*/ | ||
| 64 | 0x948, /* L4 PER0*/ | ||
| 65 | 0x248, /* OCMRAM */ | ||
| 66 | 0x148, /* missing in TRM corresponds to GPMC sERROR*/ | ||
| 67 | 0x648, /* SGX */ | ||
| 68 | 0x848, /* SL2 */ | ||
| 69 | 0x1648, /* C2C */ | ||
| 70 | 0x1148, /* missing in TRM corresponds PWR DISC CLK1*/ | ||
| 71 | 0xF48, /* missing in TRM corrsponds to SHA1*/ | ||
| 72 | 0xE48, /* missing in TRM corresponds to AES2*/ | ||
| 73 | 0xC48, /* L4 PER3 */ | ||
| 74 | 0xA48, /* L4 PER1*/ | ||
| 75 | 0xB48 /* L4 PER2*/ | ||
| 76 | }; | ||
| 77 | |||
| 78 | u32 l3_targ_stderrlog_main_clk3[] = { | ||
| 79 | 0x0148 /* EMUSS */ | ||
| 80 | }; | ||
| 81 | |||
| 82 | char *l3_targ_stderrlog_main_name[L3_MODULES][18] = { | ||
| 83 | { | ||
| 84 | "DMM1", | ||
| 85 | "DMM2", | ||
| 86 | "ABE", | ||
| 87 | "L4CFG", | ||
| 88 | "CLK2 PWR DISC", | ||
| 89 | }, | ||
| 90 | { | ||
| 91 | "CORTEX M3" , | ||
| 92 | "DSS ", | ||
| 93 | "GPMC ", | ||
| 94 | "ISS ", | ||
| 95 | "IVAHD ", | ||
| 96 | "AES1", | ||
| 97 | "L4 PER0", | ||
| 98 | "OCMRAM ", | ||
| 99 | "GPMC sERROR", | ||
| 100 | "SGX ", | ||
| 101 | "SL2 ", | ||
| 102 | "C2C ", | ||
| 103 | "PWR DISC CLK1", | ||
| 104 | "SHA1", | ||
| 105 | "AES2", | ||
| 106 | "L4 PER3", | ||
| 107 | "L4 PER1", | ||
| 108 | "L4 PER2", | ||
| 109 | }, | ||
| 110 | { | ||
| 111 | "EMUSS", | ||
| 112 | }, | ||
| 113 | }; | ||
| 114 | |||
| 115 | u32 *l3_targ[L3_MODULES] = { | ||
| 116 | l3_targ_stderrlog_main_clk1, | ||
| 117 | l3_targ_stderrlog_main_clk2, | ||
| 118 | l3_targ_stderrlog_main_clk3, | ||
| 119 | }; | ||
| 120 | |||
| 121 | struct omap4_l3 { | ||
| 122 | struct device *dev; | ||
| 123 | struct clk *ick; | ||
| 124 | |||
| 125 | /* memory base */ | ||
| 126 | void __iomem *l3_base[4]; | ||
| 127 | |||
| 128 | int debug_irq; | ||
| 129 | int app_irq; | ||
| 130 | }; | ||
| 131 | |||
| 132 | #endif | ||
diff --git a/arch/arm/mach-omap2/omap_l3_smx.c b/arch/arm/mach-omap2/omap_l3_smx.c new file mode 100644 index 000000000000..265bff3acb9e --- /dev/null +++ b/arch/arm/mach-omap2/omap_l3_smx.c | |||
| @@ -0,0 +1,314 @@ | |||
| 1 | /* | ||
| 2 | * OMAP3XXX L3 Interconnect Driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Texas Corporation | ||
| 5 | * Felipe Balbi <balbi@ti.com> | ||
| 6 | * Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
| 7 | * Sricharan <r.sricharan@ti.com> | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 22 | * USA | ||
| 23 | */ | ||
| 24 | |||
| 25 | #include <linux/kernel.h> | ||
| 26 | #include <linux/slab.h> | ||
| 27 | #include <linux/platform_device.h> | ||
| 28 | #include <linux/interrupt.h> | ||
| 29 | #include <linux/io.h> | ||
| 30 | #include "omap_l3_smx.h" | ||
| 31 | |||
| 32 | static inline u64 omap3_l3_readll(void __iomem *base, u16 reg) | ||
| 33 | { | ||
| 34 | return __raw_readll(base + reg); | ||
| 35 | } | ||
| 36 | |||
| 37 | static inline void omap3_l3_writell(void __iomem *base, u16 reg, u64 value) | ||
| 38 | { | ||
| 39 | __raw_writell(value, base + reg); | ||
| 40 | } | ||
| 41 | |||
| 42 | static inline enum omap3_l3_code omap3_l3_decode_error_code(u64 error) | ||
| 43 | { | ||
| 44 | return (error & 0x0f000000) >> L3_ERROR_LOG_CODE; | ||
| 45 | } | ||
| 46 | |||
| 47 | static inline u32 omap3_l3_decode_addr(u64 error_addr) | ||
| 48 | { | ||
| 49 | return error_addr & 0xffffffff; | ||
| 50 | } | ||
| 51 | |||
| 52 | static inline unsigned omap3_l3_decode_cmd(u64 error) | ||
| 53 | { | ||
| 54 | return (error & 0x07) >> L3_ERROR_LOG_CMD; | ||
| 55 | } | ||
| 56 | |||
| 57 | static inline enum omap3_l3_initiator_id omap3_l3_decode_initid(u64 error) | ||
| 58 | { | ||
| 59 | return (error & 0xff00) >> L3_ERROR_LOG_INITID; | ||
| 60 | } | ||
| 61 | |||
| 62 | static inline unsigned omap3_l3_decode_req_info(u64 error) | ||
| 63 | { | ||
| 64 | return (error >> 32) & 0xffff; | ||
| 65 | } | ||
| 66 | |||
| 67 | static char *omap3_l3_code_string(u8 code) | ||
| 68 | { | ||
| 69 | switch (code) { | ||
| 70 | case OMAP_L3_CODE_NOERROR: | ||
| 71 | return "No Error"; | ||
| 72 | case OMAP_L3_CODE_UNSUP_CMD: | ||
| 73 | return "Unsupported Command"; | ||
| 74 | case OMAP_L3_CODE_ADDR_HOLE: | ||
| 75 | return "Address Hole"; | ||
| 76 | case OMAP_L3_CODE_PROTECT_VIOLATION: | ||
| 77 | return "Protection Violation"; | ||
| 78 | case OMAP_L3_CODE_IN_BAND_ERR: | ||
| 79 | return "In-band Error"; | ||
| 80 | case OMAP_L3_CODE_REQ_TOUT_NOT_ACCEPT: | ||
| 81 | return "Request Timeout Not Accepted"; | ||
| 82 | case OMAP_L3_CODE_REQ_TOUT_NO_RESP: | ||
| 83 | return "Request Timeout, no response"; | ||
| 84 | default: | ||
| 85 | return "UNKNOWN error"; | ||
| 86 | } | ||
| 87 | } | ||
| 88 | |||
| 89 | static char *omap3_l3_initiator_string(u8 initid) | ||
| 90 | { | ||
| 91 | switch (initid) { | ||
| 92 | case OMAP_L3_LCD: | ||
| 93 | return "LCD"; | ||
| 94 | case OMAP_L3_SAD2D: | ||
| 95 | return "SAD2D"; | ||
| 96 | case OMAP_L3_IA_MPU_SS_1: | ||
| 97 | case OMAP_L3_IA_MPU_SS_2: | ||
| 98 | case OMAP_L3_IA_MPU_SS_3: | ||
| 99 | case OMAP_L3_IA_MPU_SS_4: | ||
| 100 | case OMAP_L3_IA_MPU_SS_5: | ||
| 101 | return "MPU"; | ||
| 102 | case OMAP_L3_IA_IVA_SS_1: | ||
| 103 | case OMAP_L3_IA_IVA_SS_2: | ||
| 104 | case OMAP_L3_IA_IVA_SS_3: | ||
| 105 | return "IVA_SS"; | ||
| 106 | case OMAP_L3_IA_IVA_SS_DMA_1: | ||
| 107 | case OMAP_L3_IA_IVA_SS_DMA_2: | ||
| 108 | case OMAP_L3_IA_IVA_SS_DMA_3: | ||
| 109 | case OMAP_L3_IA_IVA_SS_DMA_4: | ||
| 110 | case OMAP_L3_IA_IVA_SS_DMA_5: | ||
| 111 | case OMAP_L3_IA_IVA_SS_DMA_6: | ||
| 112 | return "IVA_SS_DMA"; | ||
| 113 | case OMAP_L3_IA_SGX: | ||
| 114 | return "SGX"; | ||
| 115 | case OMAP_L3_IA_CAM_1: | ||
| 116 | case OMAP_L3_IA_CAM_2: | ||
| 117 | case OMAP_L3_IA_CAM_3: | ||
| 118 | return "CAM"; | ||
| 119 | case OMAP_L3_IA_DAP: | ||
| 120 | return "DAP"; | ||
| 121 | case OMAP_L3_SDMA_WR_1: | ||
| 122 | case OMAP_L3_SDMA_WR_2: | ||
| 123 | return "SDMA_WR"; | ||
| 124 | case OMAP_L3_SDMA_RD_1: | ||
| 125 | case OMAP_L3_SDMA_RD_2: | ||
| 126 | case OMAP_L3_SDMA_RD_3: | ||
| 127 | case OMAP_L3_SDMA_RD_4: | ||
| 128 | return "SDMA_RD"; | ||
| 129 | case OMAP_L3_USBOTG: | ||
| 130 | return "USB_OTG"; | ||
| 131 | case OMAP_L3_USBHOST: | ||
| 132 | return "USB_HOST"; | ||
| 133 | default: | ||
| 134 | return "UNKNOWN Initiator"; | ||
| 135 | } | ||
| 136 | } | ||
| 137 | |||
| 138 | /** | ||
| 139 | * omap3_l3_block_irq - handles a register block's irq | ||
| 140 | * @l3: struct omap3_l3 * | ||
| 141 | * @base: register block base address | ||
| 142 | * @error: L3_ERROR_LOG register of our block | ||
| 143 | * | ||
| 144 | * Called in hard-irq context. Caller should take care of locking | ||
| 145 | * | ||
| 146 | * OMAP36xx TRM gives, on page 2001, Figure 9-10, the Typical Error | ||
| 147 | * Analysis Sequence, we are following that sequence here, please | ||
| 148 | * refer to that Figure for more information on the subject. | ||
| 149 | */ | ||
| 150 | static irqreturn_t omap3_l3_block_irq(struct omap3_l3 *l3, | ||
| 151 | u64 error, int error_addr) | ||
| 152 | { | ||
| 153 | u8 code = omap3_l3_decode_error_code(error); | ||
| 154 | u8 initid = omap3_l3_decode_initid(error); | ||
| 155 | u8 multi = error & L3_ERROR_LOG_MULTI; | ||
| 156 | u32 address = omap3_l3_decode_addr(error_addr); | ||
| 157 | |||
| 158 | WARN(true, "%s Error seen by %s %s at address %x\n", | ||
| 159 | omap3_l3_code_string(code), | ||
| 160 | omap3_l3_initiator_string(initid), | ||
| 161 | multi ? "Multiple Errors" : "", | ||
| 162 | address); | ||
| 163 | |||
| 164 | return IRQ_HANDLED; | ||
| 165 | } | ||
| 166 | |||
| 167 | static irqreturn_t omap3_l3_app_irq(int irq, void *_l3) | ||
| 168 | { | ||
| 169 | struct omap3_l3 *l3 = _l3; | ||
| 170 | |||
| 171 | u64 status, clear; | ||
| 172 | u64 error; | ||
| 173 | u64 error_addr; | ||
| 174 | u64 err_source = 0; | ||
| 175 | void __iomem *base; | ||
| 176 | int int_type; | ||
| 177 | |||
| 178 | irqreturn_t ret = IRQ_NONE; | ||
| 179 | |||
| 180 | if (irq == l3->app_irq) | ||
| 181 | int_type = L3_APPLICATION_ERROR; | ||
| 182 | else | ||
| 183 | int_type = L3_DEBUG_ERROR; | ||
| 184 | |||
| 185 | if (!int_type) { | ||
| 186 | status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0); | ||
| 187 | /* | ||
| 188 | * if we have a timeout error, there's nothing we can | ||
| 189 | * do besides rebooting the board. So let's BUG on any | ||
| 190 | * of such errors and handle the others. timeout error | ||
| 191 | * is severe and not expected to occur. | ||
| 192 | */ | ||
| 193 | BUG_ON(status & L3_STATUS_0_TIMEOUT_MASK); | ||
| 194 | } else { | ||
| 195 | status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_1); | ||
| 196 | /* No timeout error for debug sources */ | ||
| 197 | } | ||
| 198 | |||
| 199 | base = ((l3->rt) + (*(omap3_l3_bases[int_type] + err_source))); | ||
| 200 | |||
| 201 | /* identify the error source */ | ||
| 202 | for (err_source = 0; !(status & (1 << err_source)); err_source++) | ||
| 203 | ; | ||
| 204 | error = omap3_l3_readll(base, L3_ERROR_LOG); | ||
| 205 | |||
| 206 | if (error) { | ||
| 207 | error_addr = omap3_l3_readll(base, L3_ERROR_LOG_ADDR); | ||
| 208 | |||
| 209 | ret |= omap3_l3_block_irq(l3, error, error_addr); | ||
| 210 | } | ||
| 211 | |||
| 212 | /* Clear the status register */ | ||
| 213 | clear = ((L3_AGENT_STATUS_CLEAR_IA << int_type) | | ||
| 214 | (L3_AGENT_STATUS_CLEAR_TA)); | ||
| 215 | |||
| 216 | omap3_l3_writell(base, L3_AGENT_STATUS, clear); | ||
| 217 | |||
| 218 | /* clear the error log register */ | ||
| 219 | omap3_l3_writell(base, L3_ERROR_LOG, error); | ||
| 220 | |||
| 221 | return ret; | ||
| 222 | } | ||
| 223 | |||
| 224 | static int __init omap3_l3_probe(struct platform_device *pdev) | ||
| 225 | { | ||
| 226 | struct omap3_l3 *l3; | ||
| 227 | struct resource *res; | ||
| 228 | int ret; | ||
| 229 | int irq; | ||
| 230 | |||
| 231 | l3 = kzalloc(sizeof(*l3), GFP_KERNEL); | ||
| 232 | if (!l3) { | ||
| 233 | ret = -ENOMEM; | ||
| 234 | goto err0; | ||
| 235 | } | ||
| 236 | |||
| 237 | platform_set_drvdata(pdev, l3); | ||
| 238 | |||
| 239 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
| 240 | if (!res) { | ||
| 241 | dev_err(&pdev->dev, "couldn't find resource\n"); | ||
| 242 | ret = -ENODEV; | ||
| 243 | goto err1; | ||
| 244 | } | ||
| 245 | l3->rt = ioremap(res->start, resource_size(res)); | ||
| 246 | if (!(l3->rt)) { | ||
| 247 | dev_err(&pdev->dev, "ioremap failed\n"); | ||
| 248 | ret = -ENOMEM; | ||
| 249 | goto err2; | ||
| 250 | } | ||
| 251 | |||
| 252 | irq = platform_get_irq(pdev, 0); | ||
| 253 | ret = request_irq(irq, omap3_l3_app_irq, | ||
| 254 | IRQF_DISABLED | IRQF_TRIGGER_RISING, | ||
| 255 | "l3-debug-irq", l3); | ||
| 256 | if (ret) { | ||
| 257 | dev_err(&pdev->dev, "couldn't request debug irq\n"); | ||
| 258 | goto err3; | ||
| 259 | } | ||
| 260 | l3->debug_irq = irq; | ||
| 261 | |||
| 262 | irq = platform_get_irq(pdev, 1); | ||
| 263 | ret = request_irq(irq, omap3_l3_app_irq, | ||
| 264 | IRQF_DISABLED | IRQF_TRIGGER_RISING, | ||
| 265 | "l3-app-irq", l3); | ||
| 266 | |||
| 267 | if (ret) { | ||
| 268 | dev_err(&pdev->dev, "couldn't request app irq\n"); | ||
| 269 | goto err4; | ||
| 270 | } | ||
| 271 | |||
| 272 | l3->app_irq = irq; | ||
| 273 | goto err0; | ||
| 274 | |||
| 275 | err4: | ||
| 276 | err3: | ||
| 277 | iounmap(l3->rt); | ||
| 278 | err2: | ||
| 279 | err1: | ||
| 280 | kfree(l3); | ||
| 281 | err0: | ||
| 282 | return ret; | ||
| 283 | } | ||
| 284 | |||
| 285 | static int __exit omap3_l3_remove(struct platform_device *pdev) | ||
| 286 | { | ||
| 287 | struct omap3_l3 *l3 = platform_get_drvdata(pdev); | ||
| 288 | |||
| 289 | free_irq(l3->app_irq, l3); | ||
| 290 | free_irq(l3->debug_irq, l3); | ||
| 291 | iounmap(l3->rt); | ||
| 292 | kfree(l3); | ||
| 293 | |||
| 294 | return 0; | ||
| 295 | } | ||
| 296 | |||
| 297 | static struct platform_driver omap3_l3_driver = { | ||
| 298 | .remove = __exit_p(omap3_l3_remove), | ||
| 299 | .driver = { | ||
| 300 | .name = "omap_l3_smx", | ||
| 301 | }, | ||
| 302 | }; | ||
| 303 | |||
| 304 | static int __init omap3_l3_init(void) | ||
| 305 | { | ||
| 306 | return platform_driver_probe(&omap3_l3_driver, omap3_l3_probe); | ||
| 307 | } | ||
| 308 | postcore_initcall_sync(omap3_l3_init); | ||
| 309 | |||
| 310 | static void __exit omap3_l3_exit(void) | ||
| 311 | { | ||
| 312 | platform_driver_unregister(&omap3_l3_driver); | ||
| 313 | } | ||
| 314 | module_exit(omap3_l3_exit); | ||
diff --git a/arch/arm/mach-omap2/omap_l3_smx.h b/arch/arm/mach-omap2/omap_l3_smx.h new file mode 100644 index 000000000000..ba2ed9a850cc --- /dev/null +++ b/arch/arm/mach-omap2/omap_l3_smx.h | |||
| @@ -0,0 +1,338 @@ | |||
| 1 | /* | ||
| 2 | * OMAP3XXX L3 Interconnect Driver header | ||
| 3 | * | ||
| 4 | * Copyright (C) 2011 Texas Corporation | ||
| 5 | * Felipe Balbi <balbi@ti.com> | ||
| 6 | * Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
| 7 | * sricharan <r.sricharan@ti.com> | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
| 22 | * USA | ||
| 23 | */ | ||
| 24 | #ifndef __ARCH_ARM_MACH_OMAP2_L3_INTERCONNECT_3XXX_H | ||
| 25 | #define __ARCH_ARM_MACH_OMAP2_L3_INTERCONNECT_3XXX_H | ||
| 26 | |||
| 27 | /* Register definitions. All 64-bit wide */ | ||
| 28 | #define L3_COMPONENT 0x000 | ||
| 29 | #define L3_CORE 0x018 | ||
| 30 | #define L3_AGENT_CONTROL 0x020 | ||
| 31 | #define L3_AGENT_STATUS 0x028 | ||
| 32 | #define L3_ERROR_LOG 0x058 | ||
| 33 | |||
| 34 | #define L3_ERROR_LOG_MULTI (1 << 31) | ||
| 35 | #define L3_ERROR_LOG_SECONDARY (1 << 30) | ||
| 36 | |||
| 37 | #define L3_ERROR_LOG_ADDR 0x060 | ||
| 38 | |||
| 39 | /* Register definitions for Sideband Interconnect */ | ||
| 40 | #define L3_SI_CONTROL 0x020 | ||
| 41 | #define L3_SI_FLAG_STATUS_0 0x510 | ||
| 42 | |||
| 43 | const u64 shift = 1; | ||
| 44 | |||
| 45 | #define L3_STATUS_0_MPUIA_BRST (shift << 0) | ||
| 46 | #define L3_STATUS_0_MPUIA_RSP (shift << 1) | ||
| 47 | #define L3_STATUS_0_MPUIA_INBAND (shift << 2) | ||
| 48 | #define L3_STATUS_0_IVAIA_BRST (shift << 6) | ||
| 49 | #define L3_STATUS_0_IVAIA_RSP (shift << 7) | ||
| 50 | #define L3_STATUS_0_IVAIA_INBAND (shift << 8) | ||
| 51 | #define L3_STATUS_0_SGXIA_BRST (shift << 9) | ||
| 52 | #define L3_STATUS_0_SGXIA_RSP (shift << 10) | ||
| 53 | #define L3_STATUS_0_SGXIA_MERROR (shift << 11) | ||
| 54 | #define L3_STATUS_0_CAMIA_BRST (shift << 12) | ||
| 55 | #define L3_STATUS_0_CAMIA_RSP (shift << 13) | ||
| 56 | #define L3_STATUS_0_CAMIA_INBAND (shift << 14) | ||
| 57 | #define L3_STATUS_0_DISPIA_BRST (shift << 15) | ||
| 58 | #define L3_STATUS_0_DISPIA_RSP (shift << 16) | ||
| 59 | #define L3_STATUS_0_DMARDIA_BRST (shift << 18) | ||
| 60 | #define L3_STATUS_0_DMARDIA_RSP (shift << 19) | ||
| 61 | #define L3_STATUS_0_DMAWRIA_BRST (shift << 21) | ||
| 62 | #define L3_STATUS_0_DMAWRIA_RSP (shift << 22) | ||
| 63 | #define L3_STATUS_0_USBOTGIA_BRST (shift << 24) | ||
| 64 | #define L3_STATUS_0_USBOTGIA_RSP (shift << 25) | ||
| 65 | #define L3_STATUS_0_USBOTGIA_INBAND (shift << 26) | ||
| 66 | #define L3_STATUS_0_USBHOSTIA_BRST (shift << 27) | ||
| 67 | #define L3_STATUS_0_USBHOSTIA_INBAND (shift << 28) | ||
| 68 | #define L3_STATUS_0_SMSTA_REQ (shift << 48) | ||
| 69 | #define L3_STATUS_0_GPMCTA_REQ (shift << 49) | ||
| 70 | #define L3_STATUS_0_OCMRAMTA_REQ (shift << 50) | ||
| 71 | #define L3_STATUS_0_OCMROMTA_REQ (shift << 51) | ||
| 72 | #define L3_STATUS_0_IVATA_REQ (shift << 54) | ||
| 73 | #define L3_STATUS_0_SGXTA_REQ (shift << 55) | ||
| 74 | #define L3_STATUS_0_SGXTA_SERROR (shift << 56) | ||
| 75 | #define L3_STATUS_0_GPMCTA_SERROR (shift << 57) | ||
| 76 | #define L3_STATUS_0_L4CORETA_REQ (shift << 58) | ||
| 77 | #define L3_STATUS_0_L4PERTA_REQ (shift << 59) | ||
| 78 | #define L3_STATUS_0_L4EMUTA_REQ (shift << 60) | ||
| 79 | #define L3_STATUS_0_MAD2DTA_REQ (shift << 61) | ||
| 80 | |||
| 81 | #define L3_STATUS_0_TIMEOUT_MASK (L3_STATUS_0_MPUIA_BRST \ | ||
| 82 | | L3_STATUS_0_MPUIA_RSP \ | ||
| 83 | | L3_STATUS_0_IVAIA_BRST \ | ||
| 84 | | L3_STATUS_0_IVAIA_RSP \ | ||
| 85 | | L3_STATUS_0_SGXIA_BRST \ | ||
| 86 | | L3_STATUS_0_SGXIA_RSP \ | ||
| 87 | | L3_STATUS_0_CAMIA_BRST \ | ||
| 88 | | L3_STATUS_0_CAMIA_RSP \ | ||
| 89 | | L3_STATUS_0_DISPIA_BRST \ | ||
| 90 | | L3_STATUS_0_DISPIA_RSP \ | ||
| 91 | | L3_STATUS_0_DMARDIA_BRST \ | ||
| 92 | | L3_STATUS_0_DMARDIA_RSP \ | ||
| 93 | | L3_STATUS_0_DMAWRIA_BRST \ | ||
| 94 | | L3_STATUS_0_DMAWRIA_RSP \ | ||
| 95 | | L3_STATUS_0_USBOTGIA_BRST \ | ||
| 96 | | L3_STATUS_0_USBOTGIA_RSP \ | ||
| 97 | | L3_STATUS_0_USBHOSTIA_BRST \ | ||
| 98 | | L3_STATUS_0_SMSTA_REQ \ | ||
| 99 | | L3_STATUS_0_GPMCTA_REQ \ | ||
| 100 | | L3_STATUS_0_OCMRAMTA_REQ \ | ||
| 101 | | L3_STATUS_0_OCMROMTA_REQ \ | ||
| 102 | | L3_STATUS_0_IVATA_REQ \ | ||
| 103 | | L3_STATUS_0_SGXTA_REQ \ | ||
| 104 | | L3_STATUS_0_L4CORETA_REQ \ | ||
| 105 | | L3_STATUS_0_L4PERTA_REQ \ | ||
| 106 | | L3_STATUS_0_L4EMUTA_REQ \ | ||
| 107 | | L3_STATUS_0_MAD2DTA_REQ) | ||
| 108 | |||
| 109 | #define L3_SI_FLAG_STATUS_1 0x530 | ||
| 110 | |||
| 111 | #define L3_STATUS_1_MPU_DATAIA (1 << 0) | ||
| 112 | #define L3_STATUS_1_DAPIA0 (1 << 3) | ||
| 113 | #define L3_STATUS_1_DAPIA1 (1 << 4) | ||
| 114 | #define L3_STATUS_1_IVAIA (1 << 6) | ||
| 115 | |||
| 116 | #define L3_PM_ERROR_LOG 0x020 | ||
| 117 | #define L3_PM_CONTROL 0x028 | ||
| 118 | #define L3_PM_ERROR_CLEAR_SINGLE 0x030 | ||
| 119 | #define L3_PM_ERROR_CLEAR_MULTI 0x038 | ||
| 120 | #define L3_PM_REQ_INFO_PERMISSION(n) (0x048 + (0x020 * n)) | ||
| 121 | #define L3_PM_READ_PERMISSION(n) (0x050 + (0x020 * n)) | ||
| 122 | #define L3_PM_WRITE_PERMISSION(n) (0x058 + (0x020 * n)) | ||
| 123 | #define L3_PM_ADDR_MATCH(n) (0x060 + (0x020 * n)) | ||
| 124 | |||
| 125 | /* L3 error log bit fields. Common for IA and TA */ | ||
| 126 | #define L3_ERROR_LOG_CODE 24 | ||
| 127 | #define L3_ERROR_LOG_INITID 8 | ||
| 128 | #define L3_ERROR_LOG_CMD 0 | ||
| 129 | |||
| 130 | /* L3 agent status bit fields. */ | ||
| 131 | #define L3_AGENT_STATUS_CLEAR_IA 0x10000000 | ||
| 132 | #define L3_AGENT_STATUS_CLEAR_TA 0x01000000 | ||
| 133 | |||
| 134 | #define OMAP34xx_IRQ_L3_APP 10 | ||
| 135 | #define L3_APPLICATION_ERROR 0x0 | ||
| 136 | #define L3_DEBUG_ERROR 0x1 | ||
| 137 | |||
| 138 | enum omap3_l3_initiator_id { | ||
| 139 | /* LCD has 1 ID */ | ||
| 140 | OMAP_L3_LCD = 29, | ||
| 141 | /* SAD2D has 1 ID */ | ||
| 142 | OMAP_L3_SAD2D = 28, | ||
| 143 | /* MPU has 5 IDs */ | ||
| 144 | OMAP_L3_IA_MPU_SS_1 = 27, | ||
| 145 | OMAP_L3_IA_MPU_SS_2 = 26, | ||
| 146 | OMAP_L3_IA_MPU_SS_3 = 25, | ||
| 147 | OMAP_L3_IA_MPU_SS_4 = 24, | ||
| 148 | OMAP_L3_IA_MPU_SS_5 = 23, | ||
| 149 | /* IVA2.2 SS has 3 IDs*/ | ||
| 150 | OMAP_L3_IA_IVA_SS_1 = 22, | ||
| 151 | OMAP_L3_IA_IVA_SS_2 = 21, | ||
| 152 | OMAP_L3_IA_IVA_SS_3 = 20, | ||
| 153 | /* IVA 2.2 SS DMA has 6 IDS */ | ||
| 154 | OMAP_L3_IA_IVA_SS_DMA_1 = 19, | ||
| 155 | OMAP_L3_IA_IVA_SS_DMA_2 = 18, | ||
| 156 | OMAP_L3_IA_IVA_SS_DMA_3 = 17, | ||
| 157 | OMAP_L3_IA_IVA_SS_DMA_4 = 16, | ||
| 158 | OMAP_L3_IA_IVA_SS_DMA_5 = 15, | ||
| 159 | OMAP_L3_IA_IVA_SS_DMA_6 = 14, | ||
| 160 | /* SGX has 1 ID */ | ||
| 161 | OMAP_L3_IA_SGX = 13, | ||
| 162 | /* CAM has 3 ID */ | ||
| 163 | OMAP_L3_IA_CAM_1 = 12, | ||
| 164 | OMAP_L3_IA_CAM_2 = 11, | ||
| 165 | OMAP_L3_IA_CAM_3 = 10, | ||
| 166 | /* DAP has 1 ID */ | ||
| 167 | OMAP_L3_IA_DAP = 9, | ||
| 168 | /* SDMA WR has 2 IDs */ | ||
| 169 | OMAP_L3_SDMA_WR_1 = 8, | ||
| 170 | OMAP_L3_SDMA_WR_2 = 7, | ||
| 171 | /* SDMA RD has 4 IDs */ | ||
| 172 | OMAP_L3_SDMA_RD_1 = 6, | ||
| 173 | OMAP_L3_SDMA_RD_2 = 5, | ||
| 174 | OMAP_L3_SDMA_RD_3 = 4, | ||
| 175 | OMAP_L3_SDMA_RD_4 = 3, | ||
| 176 | /* HSUSB OTG has 1 ID */ | ||
| 177 | OMAP_L3_USBOTG = 2, | ||
| 178 | /* HSUSB HOST has 1 ID */ | ||
| 179 | OMAP_L3_USBHOST = 1, | ||
| 180 | }; | ||
| 181 | |||
| 182 | enum omap3_l3_code { | ||
| 183 | OMAP_L3_CODE_NOERROR = 0, | ||
| 184 | OMAP_L3_CODE_UNSUP_CMD = 1, | ||
| 185 | OMAP_L3_CODE_ADDR_HOLE = 2, | ||
| 186 | OMAP_L3_CODE_PROTECT_VIOLATION = 3, | ||
| 187 | OMAP_L3_CODE_IN_BAND_ERR = 4, | ||
| 188 | /* codes 5 and 6 are reserved */ | ||
| 189 | OMAP_L3_CODE_REQ_TOUT_NOT_ACCEPT = 7, | ||
| 190 | OMAP_L3_CODE_REQ_TOUT_NO_RESP = 8, | ||
| 191 | /* codes 9 - 15 are also reserved */ | ||
| 192 | }; | ||
| 193 | |||
| 194 | struct omap3_l3 { | ||
| 195 | struct device *dev; | ||
| 196 | struct clk *ick; | ||
| 197 | |||
| 198 | /* memory base*/ | ||
| 199 | void __iomem *rt; | ||
| 200 | |||
| 201 | int debug_irq; | ||
| 202 | int app_irq; | ||
| 203 | |||
| 204 | /* true when and inband functional error occurs */ | ||
| 205 | unsigned inband:1; | ||
| 206 | }; | ||
| 207 | |||
| 208 | /* offsets for l3 agents in order with the Flag status register */ | ||
| 209 | unsigned int __iomem omap3_l3_app_bases[] = { | ||
| 210 | /* MPU IA */ | ||
| 211 | 0x1400, | ||
| 212 | 0x1400, | ||
| 213 | 0x1400, | ||
| 214 | /* RESERVED */ | ||
| 215 | 0, | ||
| 216 | 0, | ||
| 217 | 0, | ||
| 218 | /* IVA 2.2 IA */ | ||
| 219 | 0x1800, | ||
| 220 | 0x1800, | ||
| 221 | 0x1800, | ||
| 222 | /* SGX IA */ | ||
| 223 | 0x1c00, | ||
| 224 | 0x1c00, | ||
| 225 | /* RESERVED */ | ||
| 226 | 0, | ||
| 227 | /* CAMERA IA */ | ||
| 228 | 0x5800, | ||
| 229 | 0x5800, | ||
| 230 | 0x5800, | ||
| 231 | /* DISPLAY IA */ | ||
| 232 | 0x5400, | ||
| 233 | 0x5400, | ||
| 234 | /* RESERVED */ | ||
| 235 | 0, | ||
| 236 | /*SDMA RD IA */ | ||
| 237 | 0x4c00, | ||
| 238 | 0x4c00, | ||
| 239 | /* RESERVED */ | ||
| 240 | 0, | ||
| 241 | /* SDMA WR IA */ | ||
| 242 | 0x5000, | ||
| 243 | 0x5000, | ||
| 244 | /* RESERVED */ | ||
| 245 | 0, | ||
| 246 | /* USB OTG IA */ | ||
| 247 | 0x4400, | ||
| 248 | 0x4400, | ||
| 249 | 0x4400, | ||
| 250 | /* USB HOST IA */ | ||
| 251 | 0x4000, | ||
| 252 | 0x4000, | ||
| 253 | /* RESERVED */ | ||
| 254 | 0, | ||
| 255 | 0, | ||
| 256 | 0, | ||
| 257 | 0, | ||
| 258 | /* SAD2D IA */ | ||
| 259 | 0x3000, | ||
| 260 | 0x3000, | ||
| 261 | 0x3000, | ||
| 262 | /* RESERVED */ | ||
| 263 | 0, | ||
| 264 | 0, | ||
| 265 | 0, | ||
| 266 | 0, | ||
| 267 | 0, | ||
| 268 | 0, | ||
| 269 | 0, | ||
| 270 | 0, | ||
| 271 | 0, | ||
| 272 | 0, | ||
| 273 | 0, | ||
| 274 | 0, | ||
| 275 | /* SMA TA */ | ||
| 276 | 0x2000, | ||
| 277 | /* GPMC TA */ | ||
| 278 | 0x2400, | ||
| 279 | /* OCM RAM TA */ | ||
| 280 | 0x2800, | ||
| 281 | /* OCM ROM TA */ | ||
| 282 | 0x2C00, | ||
| 283 | /* L4 CORE TA */ | ||
| 284 | 0x6800, | ||
| 285 | /* L4 PER TA */ | ||
| 286 | 0x6c00, | ||
| 287 | /* IVA 2.2 TA */ | ||
| 288 | 0x6000, | ||
| 289 | /* SGX TA */ | ||
| 290 | 0x6400, | ||
| 291 | /* L4 EMU TA */ | ||
| 292 | 0x7000, | ||
| 293 | /* GPMC TA */ | ||
| 294 | 0x2400, | ||
| 295 | /* L4 CORE TA */ | ||
| 296 | 0x6800, | ||
| 297 | /* L4 PER TA */ | ||
| 298 | 0x6c00, | ||
| 299 | /* L4 EMU TA */ | ||
| 300 | 0x7000, | ||
| 301 | /* MAD2D TA */ | ||
| 302 | 0x3400, | ||
| 303 | /* RESERVED */ | ||
| 304 | 0, | ||
| 305 | 0, | ||
| 306 | }; | ||
| 307 | |||
| 308 | unsigned int __iomem omap3_l3_debug_bases[] = { | ||
| 309 | /* MPU DATA IA */ | ||
| 310 | 0x1400, | ||
| 311 | /* RESERVED */ | ||
| 312 | 0, | ||
| 313 | 0, | ||
| 314 | /* DAP IA */ | ||
| 315 | 0x5c00, | ||
| 316 | 0x5c00, | ||
| 317 | /* RESERVED */ | ||
| 318 | 0, | ||
| 319 | /* IVA 2.2 IA */ | ||
| 320 | 0x1800, | ||
| 321 | /* REST RESERVED */ | ||
| 322 | }; | ||
| 323 | |||
| 324 | u32 *omap3_l3_bases[] = { | ||
| 325 | omap3_l3_app_bases, | ||
| 326 | omap3_l3_debug_bases, | ||
| 327 | }; | ||
| 328 | |||
| 329 | /* | ||
| 330 | * REVISIT define __raw_readll/__raw_writell here, but move them to | ||
| 331 | * <asm/io.h> at some point | ||
| 332 | */ | ||
| 333 | #define __raw_writell(v, a) (__chk_io_ptr(a), \ | ||
| 334 | *(volatile u64 __force *)(a) = (v)) | ||
| 335 | #define __raw_readll(a) (__chk_io_ptr(a), \ | ||
| 336 | *(volatile u64 __force *)(a)) | ||
| 337 | |||
| 338 | #endif | ||
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c index 745252c60e32..f172ec06c06a 100644 --- a/arch/arm/mach-omap2/omap_phy_internal.c +++ b/arch/arm/mach-omap2/omap_phy_internal.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/usb.h> | 29 | #include <linux/usb.h> |
| 30 | 30 | ||
| 31 | #include <plat/usb.h> | 31 | #include <plat/usb.h> |
| 32 | #include "control.h" | ||
| 32 | 33 | ||
| 33 | /* OMAP control module register for UTMI PHY */ | 34 | /* OMAP control module register for UTMI PHY */ |
| 34 | #define CONTROL_DEV_CONF 0x300 | 35 | #define CONTROL_DEV_CONF 0x300 |
| @@ -147,3 +148,95 @@ int omap4430_phy_exit(struct device *dev) | |||
| 147 | 148 | ||
| 148 | return 0; | 149 | return 0; |
| 149 | } | 150 | } |
| 151 | |||
| 152 | void am35x_musb_reset(void) | ||
| 153 | { | ||
| 154 | u32 regval; | ||
| 155 | |||
| 156 | /* Reset the musb interface */ | ||
| 157 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | ||
| 158 | |||
| 159 | regval |= AM35XX_USBOTGSS_SW_RST; | ||
| 160 | omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET); | ||
| 161 | |||
| 162 | regval &= ~AM35XX_USBOTGSS_SW_RST; | ||
| 163 | omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET); | ||
| 164 | |||
| 165 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | ||
| 166 | } | ||
| 167 | |||
| 168 | void am35x_musb_phy_power(u8 on) | ||
| 169 | { | ||
| 170 | unsigned long timeout = jiffies + msecs_to_jiffies(100); | ||
| 171 | u32 devconf2; | ||
| 172 | |||
| 173 | if (on) { | ||
| 174 | /* | ||
| 175 | * Start the on-chip PHY and its PLL. | ||
| 176 | */ | ||
| 177 | devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); | ||
| 178 | |||
| 179 | devconf2 &= ~(CONF2_RESET | CONF2_PHYPWRDN | CONF2_OTGPWRDN); | ||
| 180 | devconf2 |= CONF2_PHY_PLLON; | ||
| 181 | |||
| 182 | omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); | ||
| 183 | |||
| 184 | pr_info(KERN_INFO "Waiting for PHY clock good...\n"); | ||
| 185 | while (!(omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2) | ||
| 186 | & CONF2_PHYCLKGD)) { | ||
| 187 | cpu_relax(); | ||
| 188 | |||
| 189 | if (time_after(jiffies, timeout)) { | ||
| 190 | pr_err(KERN_ERR "musb PHY clock good timed out\n"); | ||
| 191 | break; | ||
| 192 | } | ||
| 193 | } | ||
| 194 | } else { | ||
| 195 | /* | ||
| 196 | * Power down the on-chip PHY. | ||
| 197 | */ | ||
| 198 | devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); | ||
| 199 | |||
| 200 | devconf2 &= ~CONF2_PHY_PLLON; | ||
| 201 | devconf2 |= CONF2_PHYPWRDN | CONF2_OTGPWRDN; | ||
| 202 | omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); | ||
| 203 | } | ||
| 204 | } | ||
| 205 | |||
| 206 | void am35x_musb_clear_irq(void) | ||
| 207 | { | ||
| 208 | u32 regval; | ||
| 209 | |||
| 210 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
| 211 | regval |= AM35XX_USBOTGSS_INT_CLR; | ||
| 212 | omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
| 213 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
| 214 | } | ||
| 215 | |||
| 216 | void am35x_musb_set_mode(u8 musb_mode) | ||
| 217 | { | ||
| 218 | u32 devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); | ||
| 219 | |||
| 220 | devconf2 &= ~CONF2_OTGMODE; | ||
| 221 | switch (musb_mode) { | ||
| 222 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | ||
| 223 | case MUSB_HOST: /* Force VBUS valid, ID = 0 */ | ||
| 224 | devconf2 |= CONF2_FORCE_HOST; | ||
| 225 | break; | ||
| 226 | #endif | ||
| 227 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | ||
| 228 | case MUSB_PERIPHERAL: /* Force VBUS valid, ID = 1 */ | ||
| 229 | devconf2 |= CONF2_FORCE_DEVICE; | ||
| 230 | break; | ||
| 231 | #endif | ||
| 232 | #ifdef CONFIG_USB_MUSB_OTG | ||
| 233 | case MUSB_OTG: /* Don't override the VBUS/ID comparators */ | ||
| 234 | devconf2 |= CONF2_NO_OVERRIDE; | ||
| 235 | break; | ||
| 236 | #endif | ||
| 237 | default: | ||
| 238 | pr_info(KERN_INFO "Unsupported mode %u\n", musb_mode); | ||
| 239 | } | ||
| 240 | |||
| 241 | omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); | ||
| 242 | } | ||
diff --git a/arch/arm/mach-omap2/opp2xxx.h b/arch/arm/mach-omap2/opp2xxx.h index 38b730550506..8affc66a92c2 100644 --- a/arch/arm/mach-omap2/opp2xxx.h +++ b/arch/arm/mach-omap2/opp2xxx.h | |||
| @@ -418,7 +418,7 @@ struct prcm_config { | |||
| 418 | 418 | ||
| 419 | extern const struct prcm_config omap2420_rate_table[]; | 419 | extern const struct prcm_config omap2420_rate_table[]; |
| 420 | 420 | ||
| 421 | #ifdef CONFIG_ARCH_OMAP2430 | 421 | #ifdef CONFIG_SOC_OMAP2430 |
| 422 | extern const struct prcm_config omap2430_rate_table[]; | 422 | extern const struct prcm_config omap2430_rate_table[]; |
| 423 | #else | 423 | #else |
| 424 | #define omap2430_rate_table NULL | 424 | #define omap2430_rate_table NULL |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index d5a102c71989..7bb64d8121a7 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
| @@ -124,7 +124,7 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | |||
| 124 | (pwrdm->flags & PWRDM_HAS_LOWPOWERSTATECHANGE)) { | 124 | (pwrdm->flags & PWRDM_HAS_LOWPOWERSTATECHANGE)) { |
| 125 | sleep_switch = LOWPOWERSTATE_SWITCH; | 125 | sleep_switch = LOWPOWERSTATE_SWITCH; |
| 126 | } else { | 126 | } else { |
| 127 | omap2_clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); | 127 | clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); |
| 128 | pwrdm_wait_transition(pwrdm); | 128 | pwrdm_wait_transition(pwrdm); |
| 129 | sleep_switch = FORCEWAKEUP_SWITCH; | 129 | sleep_switch = FORCEWAKEUP_SWITCH; |
| 130 | } | 130 | } |
| @@ -140,9 +140,9 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | |||
| 140 | switch (sleep_switch) { | 140 | switch (sleep_switch) { |
| 141 | case FORCEWAKEUP_SWITCH: | 141 | case FORCEWAKEUP_SWITCH: |
| 142 | if (pwrdm->pwrdm_clkdms[0]->flags & CLKDM_CAN_ENABLE_AUTO) | 142 | if (pwrdm->pwrdm_clkdms[0]->flags & CLKDM_CAN_ENABLE_AUTO) |
| 143 | omap2_clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]); | 143 | clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]); |
| 144 | else | 144 | else |
| 145 | omap2_clkdm_sleep(pwrdm->pwrdm_clkdms[0]); | 145 | clkdm_sleep(pwrdm->pwrdm_clkdms[0]); |
| 146 | break; | 146 | break; |
| 147 | case LOWPOWERSTATE_SWITCH: | 147 | case LOWPOWERSTATE_SWITCH: |
| 148 | pwrdm_set_lowpwrstchange(pwrdm); | 148 | pwrdm_set_lowpwrstchange(pwrdm); |
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index 97feb3ab6a69..96907da1910a 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
| @@ -367,10 +367,10 @@ static int __init clkdms_setup(struct clockdomain *clkdm, void *unused) | |||
| 367 | clkdm_clear_all_sleepdeps(clkdm); | 367 | clkdm_clear_all_sleepdeps(clkdm); |
| 368 | 368 | ||
| 369 | if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO) | 369 | if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO) |
| 370 | omap2_clkdm_allow_idle(clkdm); | 370 | clkdm_allow_idle(clkdm); |
| 371 | else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP && | 371 | else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP && |
| 372 | atomic_read(&clkdm->usecount) == 0) | 372 | atomic_read(&clkdm->usecount) == 0) |
| 373 | omap2_clkdm_sleep(clkdm); | 373 | clkdm_sleep(clkdm); |
| 374 | return 0; | 374 | return 0; |
| 375 | } | 375 | } |
| 376 | 376 | ||
| @@ -379,7 +379,10 @@ static void __init prcm_setup_regs(void) | |||
| 379 | int i, num_mem_banks; | 379 | int i, num_mem_banks; |
| 380 | struct powerdomain *pwrdm; | 380 | struct powerdomain *pwrdm; |
| 381 | 381 | ||
| 382 | /* Enable autoidle */ | 382 | /* |
| 383 | * Enable autoidle | ||
| 384 | * XXX This should be handled by hwmod code or PRCM init code | ||
| 385 | */ | ||
| 383 | omap2_prm_write_mod_reg(OMAP24XX_AUTOIDLE_MASK, OCP_MOD, | 386 | omap2_prm_write_mod_reg(OMAP24XX_AUTOIDLE_MASK, OCP_MOD, |
| 384 | OMAP2_PRCM_SYSCONFIG_OFFSET); | 387 | OMAP2_PRCM_SYSCONFIG_OFFSET); |
| 385 | 388 | ||
| @@ -405,11 +408,11 @@ static void __init prcm_setup_regs(void) | |||
| 405 | 408 | ||
| 406 | pwrdm = clkdm_get_pwrdm(dsp_clkdm); | 409 | pwrdm = clkdm_get_pwrdm(dsp_clkdm); |
| 407 | pwrdm_set_next_pwrst(pwrdm, PWRDM_POWER_OFF); | 410 | pwrdm_set_next_pwrst(pwrdm, PWRDM_POWER_OFF); |
| 408 | omap2_clkdm_sleep(dsp_clkdm); | 411 | clkdm_sleep(dsp_clkdm); |
| 409 | 412 | ||
| 410 | pwrdm = clkdm_get_pwrdm(gfx_clkdm); | 413 | pwrdm = clkdm_get_pwrdm(gfx_clkdm); |
| 411 | pwrdm_set_next_pwrst(pwrdm, PWRDM_POWER_OFF); | 414 | pwrdm_set_next_pwrst(pwrdm, PWRDM_POWER_OFF); |
| 412 | omap2_clkdm_sleep(gfx_clkdm); | 415 | clkdm_sleep(gfx_clkdm); |
| 413 | 416 | ||
| 414 | /* | 417 | /* |
| 415 | * Clear clockdomain wakeup dependencies and enable | 418 | * Clear clockdomain wakeup dependencies and enable |
| @@ -418,70 +421,6 @@ static void __init prcm_setup_regs(void) | |||
| 418 | clkdm_for_each(clkdms_setup, NULL); | 421 | clkdm_for_each(clkdms_setup, NULL); |
| 419 | clkdm_add_wkdep(mpu_clkdm, wkup_clkdm); | 422 | clkdm_add_wkdep(mpu_clkdm, wkup_clkdm); |
| 420 | 423 | ||
| 421 | /* Enable clock autoidle for all domains */ | ||
| 422 | omap2_cm_write_mod_reg(OMAP24XX_AUTO_CAM_MASK | | ||
| 423 | OMAP24XX_AUTO_MAILBOXES_MASK | | ||
| 424 | OMAP24XX_AUTO_WDT4_MASK | | ||
| 425 | OMAP2420_AUTO_WDT3_MASK | | ||
| 426 | OMAP24XX_AUTO_MSPRO_MASK | | ||
| 427 | OMAP2420_AUTO_MMC_MASK | | ||
| 428 | OMAP24XX_AUTO_FAC_MASK | | ||
| 429 | OMAP2420_AUTO_EAC_MASK | | ||
| 430 | OMAP24XX_AUTO_HDQ_MASK | | ||
| 431 | OMAP24XX_AUTO_UART2_MASK | | ||
| 432 | OMAP24XX_AUTO_UART1_MASK | | ||
| 433 | OMAP24XX_AUTO_I2C2_MASK | | ||
| 434 | OMAP24XX_AUTO_I2C1_MASK | | ||
| 435 | OMAP24XX_AUTO_MCSPI2_MASK | | ||
| 436 | OMAP24XX_AUTO_MCSPI1_MASK | | ||
| 437 | OMAP24XX_AUTO_MCBSP2_MASK | | ||
| 438 | OMAP24XX_AUTO_MCBSP1_MASK | | ||
| 439 | OMAP24XX_AUTO_GPT12_MASK | | ||
| 440 | OMAP24XX_AUTO_GPT11_MASK | | ||
| 441 | OMAP24XX_AUTO_GPT10_MASK | | ||
| 442 | OMAP24XX_AUTO_GPT9_MASK | | ||
| 443 | OMAP24XX_AUTO_GPT8_MASK | | ||
| 444 | OMAP24XX_AUTO_GPT7_MASK | | ||
| 445 | OMAP24XX_AUTO_GPT6_MASK | | ||
| 446 | OMAP24XX_AUTO_GPT5_MASK | | ||
| 447 | OMAP24XX_AUTO_GPT4_MASK | | ||
| 448 | OMAP24XX_AUTO_GPT3_MASK | | ||
| 449 | OMAP24XX_AUTO_GPT2_MASK | | ||
| 450 | OMAP2420_AUTO_VLYNQ_MASK | | ||
| 451 | OMAP24XX_AUTO_DSS_MASK, | ||
| 452 | CORE_MOD, CM_AUTOIDLE1); | ||
| 453 | omap2_cm_write_mod_reg(OMAP24XX_AUTO_UART3_MASK | | ||
| 454 | OMAP24XX_AUTO_SSI_MASK | | ||
| 455 | OMAP24XX_AUTO_USB_MASK, | ||
| 456 | CORE_MOD, CM_AUTOIDLE2); | ||
| 457 | omap2_cm_write_mod_reg(OMAP24XX_AUTO_SDRC_MASK | | ||
| 458 | OMAP24XX_AUTO_GPMC_MASK | | ||
| 459 | OMAP24XX_AUTO_SDMA_MASK, | ||
| 460 | CORE_MOD, CM_AUTOIDLE3); | ||
| 461 | omap2_cm_write_mod_reg(OMAP24XX_AUTO_PKA_MASK | | ||
| 462 | OMAP24XX_AUTO_AES_MASK | | ||
| 463 | OMAP24XX_AUTO_RNG_MASK | | ||
| 464 | OMAP24XX_AUTO_SHA_MASK | | ||
| 465 | OMAP24XX_AUTO_DES_MASK, | ||
| 466 | CORE_MOD, OMAP24XX_CM_AUTOIDLE4); | ||
| 467 | |||
| 468 | omap2_cm_write_mod_reg(OMAP2420_AUTO_DSP_IPI_MASK, OMAP24XX_DSP_MOD, | ||
| 469 | CM_AUTOIDLE); | ||
| 470 | |||
| 471 | /* Put DPLL and both APLLs into autoidle mode */ | ||
| 472 | omap2_cm_write_mod_reg((0x03 << OMAP24XX_AUTO_DPLL_SHIFT) | | ||
| 473 | (0x03 << OMAP24XX_AUTO_96M_SHIFT) | | ||
| 474 | (0x03 << OMAP24XX_AUTO_54M_SHIFT), | ||
| 475 | PLL_MOD, CM_AUTOIDLE); | ||
| 476 | |||
| 477 | omap2_cm_write_mod_reg(OMAP24XX_AUTO_OMAPCTRL_MASK | | ||
| 478 | OMAP24XX_AUTO_WDT1_MASK | | ||
| 479 | OMAP24XX_AUTO_MPU_WDT_MASK | | ||
| 480 | OMAP24XX_AUTO_GPIOS_MASK | | ||
| 481 | OMAP24XX_AUTO_32KSYNC_MASK | | ||
| 482 | OMAP24XX_AUTO_GPT1_MASK, | ||
| 483 | WKUP_MOD, CM_AUTOIDLE); | ||
| 484 | |||
| 485 | /* REVISIT: Configure number of 32 kHz clock cycles for sys_clk | 424 | /* REVISIT: Configure number of 32 kHz clock cycles for sys_clk |
| 486 | * stabilisation */ | 425 | * stabilisation */ |
| 487 | omap2_prm_write_mod_reg(15 << OMAP_SETUP_TIME_SHIFT, OMAP24XX_GR_MOD, | 426 | omap2_prm_write_mod_reg(15 << OMAP_SETUP_TIME_SHIFT, OMAP24XX_GR_MOD, |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 2f864e4b085d..3d6a00e07a5b 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
| @@ -496,7 +496,7 @@ console_still_active: | |||
| 496 | 496 | ||
| 497 | pwrdm_post_transition(); | 497 | pwrdm_post_transition(); |
| 498 | 498 | ||
| 499 | omap2_clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]); | 499 | clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]); |
| 500 | } | 500 | } |
| 501 | 501 | ||
| 502 | int omap3_can_sleep(void) | 502 | int omap3_can_sleep(void) |
| @@ -688,14 +688,11 @@ static void __init omap3_d2d_idle(void) | |||
| 688 | 688 | ||
| 689 | static void __init prcm_setup_regs(void) | 689 | static void __init prcm_setup_regs(void) |
| 690 | { | 690 | { |
| 691 | u32 omap3630_auto_uart4_mask = cpu_is_omap3630() ? | ||
| 692 | OMAP3630_AUTO_UART4_MASK : 0; | ||
| 693 | u32 omap3630_en_uart4_mask = cpu_is_omap3630() ? | 691 | u32 omap3630_en_uart4_mask = cpu_is_omap3630() ? |
| 694 | OMAP3630_EN_UART4_MASK : 0; | 692 | OMAP3630_EN_UART4_MASK : 0; |
| 695 | u32 omap3630_grpsel_uart4_mask = cpu_is_omap3630() ? | 693 | u32 omap3630_grpsel_uart4_mask = cpu_is_omap3630() ? |
| 696 | OMAP3630_GRPSEL_UART4_MASK : 0; | 694 | OMAP3630_GRPSEL_UART4_MASK : 0; |
| 697 | 695 | ||
| 698 | |||
| 699 | /* XXX Reset all wkdeps. This should be done when initializing | 696 | /* XXX Reset all wkdeps. This should be done when initializing |
| 700 | * powerdomains */ | 697 | * powerdomains */ |
| 701 | omap2_prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP); | 698 | omap2_prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP); |
| @@ -710,127 +707,10 @@ static void __init prcm_setup_regs(void) | |||
| 710 | } else | 707 | } else |
| 711 | omap2_prm_write_mod_reg(0, GFX_MOD, PM_WKDEP); | 708 | omap2_prm_write_mod_reg(0, GFX_MOD, PM_WKDEP); |
| 712 | 709 | ||
| 713 | /* | 710 | /* XXX This should be handled by hwmod code or SCM init code */ |
| 714 | * Enable interface clock autoidle for all modules. | ||
| 715 | * Note that in the long run this should be done by clockfw | ||
| 716 | */ | ||
| 717 | omap2_cm_write_mod_reg( | ||
| 718 | OMAP3430_AUTO_MODEM_MASK | | ||
| 719 | OMAP3430ES2_AUTO_MMC3_MASK | | ||
| 720 | OMAP3430ES2_AUTO_ICR_MASK | | ||
| 721 | OMAP3430_AUTO_AES2_MASK | | ||
| 722 | OMAP3430_AUTO_SHA12_MASK | | ||
| 723 | OMAP3430_AUTO_DES2_MASK | | ||
| 724 | OMAP3430_AUTO_MMC2_MASK | | ||
| 725 | OMAP3430_AUTO_MMC1_MASK | | ||
| 726 | OMAP3430_AUTO_MSPRO_MASK | | ||
| 727 | OMAP3430_AUTO_HDQ_MASK | | ||
| 728 | OMAP3430_AUTO_MCSPI4_MASK | | ||
| 729 | OMAP3430_AUTO_MCSPI3_MASK | | ||
| 730 | OMAP3430_AUTO_MCSPI2_MASK | | ||
| 731 | OMAP3430_AUTO_MCSPI1_MASK | | ||
| 732 | OMAP3430_AUTO_I2C3_MASK | | ||
| 733 | OMAP3430_AUTO_I2C2_MASK | | ||
| 734 | OMAP3430_AUTO_I2C1_MASK | | ||
| 735 | OMAP3430_AUTO_UART2_MASK | | ||
| 736 | OMAP3430_AUTO_UART1_MASK | | ||
| 737 | OMAP3430_AUTO_GPT11_MASK | | ||
| 738 | OMAP3430_AUTO_GPT10_MASK | | ||
| 739 | OMAP3430_AUTO_MCBSP5_MASK | | ||
| 740 | OMAP3430_AUTO_MCBSP1_MASK | | ||
| 741 | OMAP3430ES1_AUTO_FAC_MASK | /* This is es1 only */ | ||
| 742 | OMAP3430_AUTO_MAILBOXES_MASK | | ||
| 743 | OMAP3430_AUTO_OMAPCTRL_MASK | | ||
| 744 | OMAP3430ES1_AUTO_FSHOSTUSB_MASK | | ||
| 745 | OMAP3430_AUTO_HSOTGUSB_MASK | | ||
| 746 | OMAP3430_AUTO_SAD2D_MASK | | ||
| 747 | OMAP3430_AUTO_SSI_MASK, | ||
| 748 | CORE_MOD, CM_AUTOIDLE1); | ||
| 749 | |||
| 750 | omap2_cm_write_mod_reg( | ||
| 751 | OMAP3430_AUTO_PKA_MASK | | ||
| 752 | OMAP3430_AUTO_AES1_MASK | | ||
| 753 | OMAP3430_AUTO_RNG_MASK | | ||
| 754 | OMAP3430_AUTO_SHA11_MASK | | ||
| 755 | OMAP3430_AUTO_DES1_MASK, | ||
| 756 | CORE_MOD, CM_AUTOIDLE2); | ||
| 757 | |||
| 758 | if (omap_rev() > OMAP3430_REV_ES1_0) { | ||
| 759 | omap2_cm_write_mod_reg( | ||
| 760 | OMAP3430_AUTO_MAD2D_MASK | | ||
| 761 | OMAP3430ES2_AUTO_USBTLL_MASK, | ||
| 762 | CORE_MOD, CM_AUTOIDLE3); | ||
| 763 | } | ||
| 764 | |||
| 765 | omap2_cm_write_mod_reg( | ||
| 766 | OMAP3430_AUTO_WDT2_MASK | | ||
| 767 | OMAP3430_AUTO_WDT1_MASK | | ||
| 768 | OMAP3430_AUTO_GPIO1_MASK | | ||
| 769 | OMAP3430_AUTO_32KSYNC_MASK | | ||
| 770 | OMAP3430_AUTO_GPT12_MASK | | ||
| 771 | OMAP3430_AUTO_GPT1_MASK, | ||
| 772 | WKUP_MOD, CM_AUTOIDLE); | ||
| 773 | |||
| 774 | omap2_cm_write_mod_reg( | ||
| 775 | OMAP3430_AUTO_DSS_MASK, | ||
| 776 | OMAP3430_DSS_MOD, | ||
| 777 | CM_AUTOIDLE); | ||
| 778 | |||
| 779 | omap2_cm_write_mod_reg( | ||
| 780 | OMAP3430_AUTO_CAM_MASK, | ||
| 781 | OMAP3430_CAM_MOD, | ||
| 782 | CM_AUTOIDLE); | ||
| 783 | |||
| 784 | omap2_cm_write_mod_reg( | ||
| 785 | omap3630_auto_uart4_mask | | ||
| 786 | OMAP3430_AUTO_GPIO6_MASK | | ||
| 787 | OMAP3430_AUTO_GPIO5_MASK | | ||
| 788 | OMAP3430_AUTO_GPIO4_MASK | | ||
| 789 | OMAP3430_AUTO_GPIO3_MASK | | ||
| 790 | OMAP3430_AUTO_GPIO2_MASK | | ||
| 791 | OMAP3430_AUTO_WDT3_MASK | | ||
| 792 | OMAP3430_AUTO_UART3_MASK | | ||
| 793 | OMAP3430_AUTO_GPT9_MASK | | ||
| 794 | OMAP3430_AUTO_GPT8_MASK | | ||
| 795 | OMAP3430_AUTO_GPT7_MASK | | ||
| 796 | OMAP3430_AUTO_GPT6_MASK | | ||
| 797 | OMAP3430_AUTO_GPT5_MASK | | ||
| 798 | OMAP3430_AUTO_GPT4_MASK | | ||
| 799 | OMAP3430_AUTO_GPT3_MASK | | ||
| 800 | OMAP3430_AUTO_GPT2_MASK | | ||
| 801 | OMAP3430_AUTO_MCBSP4_MASK | | ||
| 802 | OMAP3430_AUTO_MCBSP3_MASK | | ||
| 803 | OMAP3430_AUTO_MCBSP2_MASK, | ||
| 804 | OMAP3430_PER_MOD, | ||
| 805 | CM_AUTOIDLE); | ||
| 806 | |||
| 807 | if (omap_rev() > OMAP3430_REV_ES1_0) { | ||
| 808 | omap2_cm_write_mod_reg( | ||
| 809 | OMAP3430ES2_AUTO_USBHOST_MASK, | ||
| 810 | OMAP3430ES2_USBHOST_MOD, | ||
| 811 | CM_AUTOIDLE); | ||
| 812 | } | ||
| 813 | |||
| 814 | omap_ctrl_writel(OMAP3430_AUTOIDLE_MASK, OMAP2_CONTROL_SYSCONFIG); | 711 | omap_ctrl_writel(OMAP3430_AUTOIDLE_MASK, OMAP2_CONTROL_SYSCONFIG); |
| 815 | 712 | ||
| 816 | /* | 713 | /* |
| 817 | * Set all plls to autoidle. This is needed until autoidle is | ||
| 818 | * enabled by clockfw | ||
| 819 | */ | ||
| 820 | omap2_cm_write_mod_reg(1 << OMAP3430_AUTO_IVA2_DPLL_SHIFT, | ||
| 821 | OMAP3430_IVA2_MOD, CM_AUTOIDLE2); | ||
| 822 | omap2_cm_write_mod_reg(1 << OMAP3430_AUTO_MPU_DPLL_SHIFT, | ||
| 823 | MPU_MOD, | ||
| 824 | CM_AUTOIDLE2); | ||
| 825 | omap2_cm_write_mod_reg((1 << OMAP3430_AUTO_PERIPH_DPLL_SHIFT) | | ||
| 826 | (1 << OMAP3430_AUTO_CORE_DPLL_SHIFT), | ||
| 827 | PLL_MOD, | ||
| 828 | CM_AUTOIDLE); | ||
| 829 | omap2_cm_write_mod_reg(1 << OMAP3430ES2_AUTO_PERIPH2_DPLL_SHIFT, | ||
| 830 | PLL_MOD, | ||
| 831 | CM_AUTOIDLE2); | ||
| 832 | |||
| 833 | /* | ||
| 834 | * Enable control of expternal oscillator through | 714 | * Enable control of expternal oscillator through |
| 835 | * sys_clkreq. In the long run clock framework should | 715 | * sys_clkreq. In the long run clock framework should |
| 836 | * take care of this. | 716 | * take care of this. |
| @@ -990,10 +870,10 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) | |||
| 990 | static int __init clkdms_setup(struct clockdomain *clkdm, void *unused) | 870 | static int __init clkdms_setup(struct clockdomain *clkdm, void *unused) |
| 991 | { | 871 | { |
| 992 | if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO) | 872 | if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO) |
| 993 | omap2_clkdm_allow_idle(clkdm); | 873 | clkdm_allow_idle(clkdm); |
| 994 | else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP && | 874 | else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP && |
| 995 | atomic_read(&clkdm->usecount) == 0) | 875 | atomic_read(&clkdm->usecount) == 0) |
| 996 | omap2_clkdm_sleep(clkdm); | 876 | clkdm_sleep(clkdm); |
| 997 | return 0; | 877 | return 0; |
| 998 | } | 878 | } |
| 999 | 879 | ||
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index eaed0df16699..a11be81997c5 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * OMAP powerdomain control | 2 | * OMAP powerdomain control |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007-2008 Texas Instruments, Inc. | 4 | * Copyright (C) 2007-2008 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2007-2009 Nokia Corporation | 5 | * Copyright (C) 2007-2011 Nokia Corporation |
| 6 | * | 6 | * |
| 7 | * Written by Paul Walmsley | 7 | * Written by Paul Walmsley |
| 8 | * Added OMAP4 specific support by Abhijit Pagare <abhijitpagare@ti.com> | 8 | * Added OMAP4 specific support by Abhijit Pagare <abhijitpagare@ti.com> |
| @@ -938,3 +938,44 @@ u32 pwrdm_get_context_loss_count(struct powerdomain *pwrdm) | |||
| 938 | 938 | ||
| 939 | return count; | 939 | return count; |
| 940 | } | 940 | } |
| 941 | |||
| 942 | /** | ||
| 943 | * pwrdm_can_ever_lose_context - can this powerdomain ever lose context? | ||
| 944 | * @pwrdm: struct powerdomain * | ||
| 945 | * | ||
| 946 | * Given a struct powerdomain * @pwrdm, returns 1 if the powerdomain | ||
| 947 | * can lose either memory or logic context or if @pwrdm is invalid, or | ||
| 948 | * returns 0 otherwise. This function is not concerned with how the | ||
| 949 | * powerdomain registers are programmed (i.e., to go off or not); it's | ||
| 950 | * concerned with whether it's ever possible for this powerdomain to | ||
| 951 | * go off while some other part of the chip is active. This function | ||
| 952 | * assumes that every powerdomain can go to either ON or INACTIVE. | ||
| 953 | */ | ||
| 954 | bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm) | ||
| 955 | { | ||
| 956 | int i; | ||
| 957 | |||
| 958 | if (IS_ERR_OR_NULL(pwrdm)) { | ||
| 959 | pr_debug("powerdomain: %s: invalid powerdomain pointer\n", | ||
| 960 | __func__); | ||
| 961 | return 1; | ||
| 962 | } | ||
| 963 | |||
| 964 | if (pwrdm->pwrsts & PWRSTS_OFF) | ||
| 965 | return 1; | ||
| 966 | |||
| 967 | if (pwrdm->pwrsts & PWRSTS_RET) { | ||
| 968 | if (pwrdm->pwrsts_logic_ret & PWRSTS_OFF) | ||
| 969 | return 1; | ||
| 970 | |||
| 971 | for (i = 0; i < pwrdm->banks; i++) | ||
| 972 | if (pwrdm->pwrsts_mem_ret[i] & PWRSTS_OFF) | ||
| 973 | return 1; | ||
| 974 | } | ||
| 975 | |||
| 976 | for (i = 0; i < pwrdm->banks; i++) | ||
| 977 | if (pwrdm->pwrsts_mem_on[i] & PWRSTS_OFF) | ||
| 978 | return 1; | ||
| 979 | |||
| 980 | return 0; | ||
| 981 | } | ||
diff --git a/arch/arm/mach-omap2/powerdomain.h b/arch/arm/mach-omap2/powerdomain.h index c66431edfeb7..027f40bd235d 100644 --- a/arch/arm/mach-omap2/powerdomain.h +++ b/arch/arm/mach-omap2/powerdomain.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * OMAP2/3/4 powerdomain control | 2 | * OMAP2/3/4 powerdomain control |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007-2008, 2010 Texas Instruments, Inc. | 4 | * Copyright (C) 2007-2008, 2010 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2007-2010 Nokia Corporation | 5 | * Copyright (C) 2007-2011 Nokia Corporation |
| 6 | * | 6 | * |
| 7 | * Paul Walmsley | 7 | * Paul Walmsley |
| 8 | * | 8 | * |
| @@ -34,17 +34,14 @@ | |||
| 34 | 34 | ||
| 35 | /* Powerdomain allowable state bitfields */ | 35 | /* Powerdomain allowable state bitfields */ |
| 36 | #define PWRSTS_ON (1 << PWRDM_POWER_ON) | 36 | #define PWRSTS_ON (1 << PWRDM_POWER_ON) |
| 37 | #define PWRSTS_INACTIVE (1 << PWRDM_POWER_INACTIVE) | ||
| 38 | #define PWRSTS_RET (1 << PWRDM_POWER_RET) | ||
| 37 | #define PWRSTS_OFF (1 << PWRDM_POWER_OFF) | 39 | #define PWRSTS_OFF (1 << PWRDM_POWER_OFF) |
| 38 | #define PWRSTS_OFF_ON ((1 << PWRDM_POWER_OFF) | \ | ||
| 39 | (1 << PWRDM_POWER_ON)) | ||
| 40 | 40 | ||
| 41 | #define PWRSTS_OFF_RET ((1 << PWRDM_POWER_OFF) | \ | 41 | #define PWRSTS_OFF_ON (PWRSTS_OFF | PWRSTS_ON) |
| 42 | (1 << PWRDM_POWER_RET)) | 42 | #define PWRSTS_OFF_RET (PWRSTS_OFF | PWRSTS_RET) |
| 43 | 43 | #define PWRSTS_RET_ON (PWRSTS_RET | PWRSTS_ON) | |
| 44 | #define PWRSTS_RET_ON ((1 << PWRDM_POWER_RET) | \ | 44 | #define PWRSTS_OFF_RET_ON (PWRSTS_OFF_RET | PWRSTS_ON) |
| 45 | (1 << PWRDM_POWER_ON)) | ||
| 46 | |||
| 47 | #define PWRSTS_OFF_RET_ON (PWRSTS_OFF_RET | (1 << PWRDM_POWER_ON)) | ||
| 48 | 45 | ||
| 49 | 46 | ||
| 50 | /* Powerdomain flags */ | 47 | /* Powerdomain flags */ |
| @@ -165,7 +162,6 @@ struct pwrdm_ops { | |||
| 165 | int (*pwrdm_wait_transition)(struct powerdomain *pwrdm); | 162 | int (*pwrdm_wait_transition)(struct powerdomain *pwrdm); |
| 166 | }; | 163 | }; |
| 167 | 164 | ||
| 168 | void pwrdm_fw_init(void); | ||
| 169 | void pwrdm_init(struct powerdomain **pwrdm_list, struct pwrdm_ops *custom_funcs); | 165 | void pwrdm_init(struct powerdomain **pwrdm_list, struct pwrdm_ops *custom_funcs); |
| 170 | 166 | ||
| 171 | struct powerdomain *pwrdm_lookup(const char *name); | 167 | struct powerdomain *pwrdm_lookup(const char *name); |
| @@ -212,6 +208,7 @@ int pwrdm_pre_transition(void); | |||
| 212 | int pwrdm_post_transition(void); | 208 | int pwrdm_post_transition(void); |
| 213 | int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm); | 209 | int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm); |
| 214 | u32 pwrdm_get_context_loss_count(struct powerdomain *pwrdm); | 210 | u32 pwrdm_get_context_loss_count(struct powerdomain *pwrdm); |
| 211 | bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm); | ||
| 215 | 212 | ||
| 216 | extern void omap2xxx_powerdomains_init(void); | 213 | extern void omap2xxx_powerdomains_init(void); |
| 217 | extern void omap3xxx_powerdomains_init(void); | 214 | extern void omap3xxx_powerdomains_init(void); |
diff --git a/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c b/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c index 5b4dd971320a..4210c3399769 100644 --- a/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c +++ b/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * OMAP2/3 common powerdomain definitions | 2 | * OMAP2/3 common powerdomain definitions |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007-2008 Texas Instruments, Inc. | 4 | * Copyright (C) 2007-2008 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2007-2010 Nokia Corporation | 5 | * Copyright (C) 2007-2011 Nokia Corporation |
| 6 | * | 6 | * |
| 7 | * Paul Walmsley, Jouni Högander | 7 | * Paul Walmsley, Jouni Högander |
| 8 | * | 8 | * |
| @@ -62,13 +62,13 @@ struct powerdomain gfx_omap2_pwrdm = { | |||
| 62 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | | 62 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | |
| 63 | CHIP_IS_OMAP3430ES1), | 63 | CHIP_IS_OMAP3430ES1), |
| 64 | .pwrsts = PWRSTS_OFF_RET_ON, | 64 | .pwrsts = PWRSTS_OFF_RET_ON, |
| 65 | .pwrsts_logic_ret = PWRDM_POWER_RET, | 65 | .pwrsts_logic_ret = PWRSTS_RET, |
| 66 | .banks = 1, | 66 | .banks = 1, |
| 67 | .pwrsts_mem_ret = { | 67 | .pwrsts_mem_ret = { |
| 68 | [0] = PWRDM_POWER_RET, /* MEMRETSTATE */ | 68 | [0] = PWRSTS_RET, /* MEMRETSTATE */ |
| 69 | }, | 69 | }, |
| 70 | .pwrsts_mem_on = { | 70 | .pwrsts_mem_on = { |
| 71 | [0] = PWRDM_POWER_ON, /* MEMONSTATE */ | 71 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
| 72 | }, | 72 | }, |
| 73 | }; | 73 | }; |
| 74 | 74 | ||
| @@ -76,4 +76,5 @@ struct powerdomain wkup_omap2_pwrdm = { | |||
| 76 | .name = "wkup_pwrdm", | 76 | .name = "wkup_pwrdm", |
| 77 | .prcm_offs = WKUP_MOD, | 77 | .prcm_offs = WKUP_MOD, |
| 78 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | CHIP_IS_OMAP3430), | 78 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX | CHIP_IS_OMAP3430), |
| 79 | .pwrsts = PWRSTS_ON, | ||
| 79 | }; | 80 | }; |
diff --git a/arch/arm/mach-omap2/powerdomains2xxx_data.c b/arch/arm/mach-omap2/powerdomains2xxx_data.c index 9b1a33500577..cc389fb2005d 100644 --- a/arch/arm/mach-omap2/powerdomains2xxx_data.c +++ b/arch/arm/mach-omap2/powerdomains2xxx_data.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * OMAP2XXX powerdomain definitions | 2 | * OMAP2XXX powerdomain definitions |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007-2008 Texas Instruments, Inc. | 4 | * Copyright (C) 2007-2008 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2007-2010 Nokia Corporation | 5 | * Copyright (C) 2007-2011 Nokia Corporation |
| 6 | * | 6 | * |
| 7 | * Paul Walmsley, Jouni Högander | 7 | * Paul Walmsley, Jouni Högander |
| 8 | * | 8 | * |
| @@ -30,13 +30,13 @@ static struct powerdomain dsp_pwrdm = { | |||
| 30 | .prcm_offs = OMAP24XX_DSP_MOD, | 30 | .prcm_offs = OMAP24XX_DSP_MOD, |
| 31 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX), | 31 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP24XX), |
| 32 | .pwrsts = PWRSTS_OFF_RET_ON, | 32 | .pwrsts = PWRSTS_OFF_RET_ON, |
| 33 | .pwrsts_logic_ret = PWRDM_POWER_RET, | 33 | .pwrsts_logic_ret = PWRSTS_RET, |
| 34 | .banks = 1, | 34 | .banks = 1, |
| 35 | .pwrsts_mem_ret = { | 35 | .pwrsts_mem_ret = { |
| 36 | [0] = PWRDM_POWER_RET, | 36 | [0] = PWRSTS_RET, |
| 37 | }, | 37 | }, |
| 38 | .pwrsts_mem_on = { | 38 | .pwrsts_mem_on = { |
| 39 | [0] = PWRDM_POWER_ON, | 39 | [0] = PWRSTS_ON, |
| 40 | }, | 40 | }, |
| 41 | }; | 41 | }; |
| 42 | 42 | ||
| @@ -48,10 +48,10 @@ static struct powerdomain mpu_24xx_pwrdm = { | |||
| 48 | .pwrsts_logic_ret = PWRSTS_OFF_RET, | 48 | .pwrsts_logic_ret = PWRSTS_OFF_RET, |
| 49 | .banks = 1, | 49 | .banks = 1, |
| 50 | .pwrsts_mem_ret = { | 50 | .pwrsts_mem_ret = { |
| 51 | [0] = PWRDM_POWER_RET, | 51 | [0] = PWRSTS_RET, |
| 52 | }, | 52 | }, |
| 53 | .pwrsts_mem_on = { | 53 | .pwrsts_mem_on = { |
| 54 | [0] = PWRDM_POWER_ON, | 54 | [0] = PWRSTS_ON, |
| 55 | }, | 55 | }, |
| 56 | }; | 56 | }; |
| 57 | 57 | ||
| @@ -78,7 +78,7 @@ static struct powerdomain core_24xx_pwrdm = { | |||
| 78 | * 2430-specific powerdomains | 78 | * 2430-specific powerdomains |
| 79 | */ | 79 | */ |
| 80 | 80 | ||
| 81 | #ifdef CONFIG_ARCH_OMAP2430 | 81 | #ifdef CONFIG_SOC_OMAP2430 |
| 82 | 82 | ||
| 83 | /* XXX 2430 KILLDOMAINWKUP bit? No current users apparently */ | 83 | /* XXX 2430 KILLDOMAINWKUP bit? No current users apparently */ |
| 84 | 84 | ||
| @@ -87,17 +87,17 @@ static struct powerdomain mdm_pwrdm = { | |||
| 87 | .prcm_offs = OMAP2430_MDM_MOD, | 87 | .prcm_offs = OMAP2430_MDM_MOD, |
| 88 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 88 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
| 89 | .pwrsts = PWRSTS_OFF_RET_ON, | 89 | .pwrsts = PWRSTS_OFF_RET_ON, |
| 90 | .pwrsts_logic_ret = PWRDM_POWER_RET, | 90 | .pwrsts_logic_ret = PWRSTS_RET, |
| 91 | .banks = 1, | 91 | .banks = 1, |
| 92 | .pwrsts_mem_ret = { | 92 | .pwrsts_mem_ret = { |
| 93 | [0] = PWRDM_POWER_RET, /* MEMRETSTATE */ | 93 | [0] = PWRSTS_RET, /* MEMRETSTATE */ |
| 94 | }, | 94 | }, |
| 95 | .pwrsts_mem_on = { | 95 | .pwrsts_mem_on = { |
| 96 | [0] = PWRDM_POWER_ON, /* MEMONSTATE */ | 96 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
| 97 | }, | 97 | }, |
| 98 | }; | 98 | }; |
| 99 | 99 | ||
| 100 | #endif /* CONFIG_ARCH_OMAP2430 */ | 100 | #endif /* CONFIG_SOC_OMAP2430 */ |
| 101 | 101 | ||
| 102 | /* As powerdomains are added or removed above, this list must also be changed */ | 102 | /* As powerdomains are added or removed above, this list must also be changed */ |
| 103 | static struct powerdomain *powerdomains_omap2xxx[] __initdata = { | 103 | static struct powerdomain *powerdomains_omap2xxx[] __initdata = { |
| @@ -111,7 +111,7 @@ static struct powerdomain *powerdomains_omap2xxx[] __initdata = { | |||
| 111 | &core_24xx_pwrdm, | 111 | &core_24xx_pwrdm, |
| 112 | #endif | 112 | #endif |
| 113 | 113 | ||
| 114 | #ifdef CONFIG_ARCH_OMAP2430 | 114 | #ifdef CONFIG_SOC_OMAP2430 |
| 115 | &mdm_pwrdm, | 115 | &mdm_pwrdm, |
| 116 | #endif | 116 | #endif |
| 117 | NULL | 117 | NULL |
diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c b/arch/arm/mach-omap2/powerdomains3xxx_data.c index e1bec562625b..9c9c113788b9 100644 --- a/arch/arm/mach-omap2/powerdomains3xxx_data.c +++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * OMAP3 powerdomain definitions | 2 | * OMAP3 powerdomain definitions |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2007-2008 Texas Instruments, Inc. | 4 | * Copyright (C) 2007-2008 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2007-2010 Nokia Corporation | 5 | * Copyright (C) 2007-2011 Nokia Corporation |
| 6 | * | 6 | * |
| 7 | * Paul Walmsley, Jouni Högander | 7 | * Paul Walmsley, Jouni Högander |
| 8 | * | 8 | * |
| @@ -47,10 +47,10 @@ static struct powerdomain iva2_pwrdm = { | |||
| 47 | [3] = PWRSTS_OFF_RET, | 47 | [3] = PWRSTS_OFF_RET, |
| 48 | }, | 48 | }, |
| 49 | .pwrsts_mem_on = { | 49 | .pwrsts_mem_on = { |
| 50 | [0] = PWRDM_POWER_ON, | 50 | [0] = PWRSTS_ON, |
| 51 | [1] = PWRDM_POWER_ON, | 51 | [1] = PWRSTS_ON, |
| 52 | [2] = PWRSTS_OFF_ON, | 52 | [2] = PWRSTS_OFF_ON, |
| 53 | [3] = PWRDM_POWER_ON, | 53 | [3] = PWRSTS_ON, |
| 54 | }, | 54 | }, |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| @@ -128,13 +128,13 @@ static struct powerdomain dss_pwrdm = { | |||
| 128 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | 128 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
| 129 | .prcm_offs = OMAP3430_DSS_MOD, | 129 | .prcm_offs = OMAP3430_DSS_MOD, |
| 130 | .pwrsts = PWRSTS_OFF_RET_ON, | 130 | .pwrsts = PWRSTS_OFF_RET_ON, |
| 131 | .pwrsts_logic_ret = PWRDM_POWER_RET, | 131 | .pwrsts_logic_ret = PWRSTS_RET, |
| 132 | .banks = 1, | 132 | .banks = 1, |
| 133 | .pwrsts_mem_ret = { | 133 | .pwrsts_mem_ret = { |
| 134 | [0] = PWRDM_POWER_RET, /* MEMRETSTATE */ | 134 | [0] = PWRSTS_RET, /* MEMRETSTATE */ |
| 135 | }, | 135 | }, |
| 136 | .pwrsts_mem_on = { | 136 | .pwrsts_mem_on = { |
| 137 | [0] = PWRDM_POWER_ON, /* MEMONSTATE */ | 137 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
| 138 | }, | 138 | }, |
| 139 | }; | 139 | }; |
| 140 | 140 | ||
| @@ -149,13 +149,13 @@ static struct powerdomain sgx_pwrdm = { | |||
| 149 | .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2), | 149 | .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2), |
| 150 | /* XXX This is accurate for 3430 SGX, but what about GFX? */ | 150 | /* XXX This is accurate for 3430 SGX, but what about GFX? */ |
| 151 | .pwrsts = PWRSTS_OFF_ON, | 151 | .pwrsts = PWRSTS_OFF_ON, |
| 152 | .pwrsts_logic_ret = PWRDM_POWER_RET, | 152 | .pwrsts_logic_ret = PWRSTS_RET, |
| 153 | .banks = 1, | 153 | .banks = 1, |
| 154 | .pwrsts_mem_ret = { | 154 | .pwrsts_mem_ret = { |
| 155 | [0] = PWRDM_POWER_RET, /* MEMRETSTATE */ | 155 | [0] = PWRSTS_RET, /* MEMRETSTATE */ |
| 156 | }, | 156 | }, |
| 157 | .pwrsts_mem_on = { | 157 | .pwrsts_mem_on = { |
| 158 | [0] = PWRDM_POWER_ON, /* MEMONSTATE */ | 158 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
| 159 | }, | 159 | }, |
| 160 | }; | 160 | }; |
| 161 | 161 | ||
| @@ -164,13 +164,13 @@ static struct powerdomain cam_pwrdm = { | |||
| 164 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | 164 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
| 165 | .prcm_offs = OMAP3430_CAM_MOD, | 165 | .prcm_offs = OMAP3430_CAM_MOD, |
| 166 | .pwrsts = PWRSTS_OFF_RET_ON, | 166 | .pwrsts = PWRSTS_OFF_RET_ON, |
| 167 | .pwrsts_logic_ret = PWRDM_POWER_RET, | 167 | .pwrsts_logic_ret = PWRSTS_RET, |
| 168 | .banks = 1, | 168 | .banks = 1, |
| 169 | .pwrsts_mem_ret = { | 169 | .pwrsts_mem_ret = { |
| 170 | [0] = PWRDM_POWER_RET, /* MEMRETSTATE */ | 170 | [0] = PWRSTS_RET, /* MEMRETSTATE */ |
| 171 | }, | 171 | }, |
| 172 | .pwrsts_mem_on = { | 172 | .pwrsts_mem_on = { |
| 173 | [0] = PWRDM_POWER_ON, /* MEMONSTATE */ | 173 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
| 174 | }, | 174 | }, |
| 175 | }; | 175 | }; |
| 176 | 176 | ||
| @@ -182,10 +182,10 @@ static struct powerdomain per_pwrdm = { | |||
| 182 | .pwrsts_logic_ret = PWRSTS_OFF_RET, | 182 | .pwrsts_logic_ret = PWRSTS_OFF_RET, |
| 183 | .banks = 1, | 183 | .banks = 1, |
| 184 | .pwrsts_mem_ret = { | 184 | .pwrsts_mem_ret = { |
| 185 | [0] = PWRDM_POWER_RET, /* MEMRETSTATE */ | 185 | [0] = PWRSTS_RET, /* MEMRETSTATE */ |
| 186 | }, | 186 | }, |
| 187 | .pwrsts_mem_on = { | 187 | .pwrsts_mem_on = { |
| 188 | [0] = PWRDM_POWER_ON, /* MEMONSTATE */ | 188 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
| 189 | }, | 189 | }, |
| 190 | }; | 190 | }; |
| 191 | 191 | ||
| @@ -200,7 +200,7 @@ static struct powerdomain neon_pwrdm = { | |||
| 200 | .prcm_offs = OMAP3430_NEON_MOD, | 200 | .prcm_offs = OMAP3430_NEON_MOD, |
| 201 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | 201 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
| 202 | .pwrsts = PWRSTS_OFF_RET_ON, | 202 | .pwrsts = PWRSTS_OFF_RET_ON, |
| 203 | .pwrsts_logic_ret = PWRDM_POWER_RET, | 203 | .pwrsts_logic_ret = PWRSTS_RET, |
| 204 | }; | 204 | }; |
| 205 | 205 | ||
| 206 | static struct powerdomain usbhost_pwrdm = { | 206 | static struct powerdomain usbhost_pwrdm = { |
| @@ -208,7 +208,7 @@ static struct powerdomain usbhost_pwrdm = { | |||
| 208 | .prcm_offs = OMAP3430ES2_USBHOST_MOD, | 208 | .prcm_offs = OMAP3430ES2_USBHOST_MOD, |
| 209 | .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2), | 209 | .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2), |
| 210 | .pwrsts = PWRSTS_OFF_RET_ON, | 210 | .pwrsts = PWRSTS_OFF_RET_ON, |
| 211 | .pwrsts_logic_ret = PWRDM_POWER_RET, | 211 | .pwrsts_logic_ret = PWRSTS_RET, |
| 212 | /* | 212 | /* |
| 213 | * REVISIT: Enabling usb host save and restore mechanism seems to | 213 | * REVISIT: Enabling usb host save and restore mechanism seems to |
| 214 | * leave the usb host domain permanently in ACTIVE mode after | 214 | * leave the usb host domain permanently in ACTIVE mode after |
| @@ -218,10 +218,10 @@ static struct powerdomain usbhost_pwrdm = { | |||
| 218 | /*.flags = PWRDM_HAS_HDWR_SAR,*/ /* for USBHOST ctrlr only */ | 218 | /*.flags = PWRDM_HAS_HDWR_SAR,*/ /* for USBHOST ctrlr only */ |
| 219 | .banks = 1, | 219 | .banks = 1, |
| 220 | .pwrsts_mem_ret = { | 220 | .pwrsts_mem_ret = { |
| 221 | [0] = PWRDM_POWER_RET, /* MEMRETSTATE */ | 221 | [0] = PWRSTS_RET, /* MEMRETSTATE */ |
| 222 | }, | 222 | }, |
| 223 | .pwrsts_mem_on = { | 223 | .pwrsts_mem_on = { |
| 224 | [0] = PWRDM_POWER_ON, /* MEMONSTATE */ | 224 | [0] = PWRSTS_ON, /* MEMONSTATE */ |
| 225 | }, | 225 | }, |
| 226 | }; | 226 | }; |
| 227 | 227 | ||
diff --git a/arch/arm/mach-omap2/powerdomains44xx_data.c b/arch/arm/mach-omap2/powerdomains44xx_data.c index 26d7641076d7..c4222c7036a5 100644 --- a/arch/arm/mach-omap2/powerdomains44xx_data.c +++ b/arch/arm/mach-omap2/powerdomains44xx_data.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * OMAP4 Power domains framework | 2 | * OMAP4 Power domains framework |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. | 4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2009-2010 Nokia Corporation | 5 | * Copyright (C) 2009-2011 Nokia Corporation |
| 6 | * | 6 | * |
| 7 | * Abhijit Pagare (abhijitpagare@ti.com) | 7 | * Abhijit Pagare (abhijitpagare@ti.com) |
| 8 | * Benoit Cousson (b-cousson@ti.com) | 8 | * Benoit Cousson (b-cousson@ti.com) |
| @@ -40,18 +40,18 @@ static struct powerdomain core_44xx_pwrdm = { | |||
| 40 | .pwrsts_logic_ret = PWRSTS_OFF_RET, | 40 | .pwrsts_logic_ret = PWRSTS_OFF_RET, |
| 41 | .banks = 5, | 41 | .banks = 5, |
| 42 | .pwrsts_mem_ret = { | 42 | .pwrsts_mem_ret = { |
| 43 | [0] = PWRDM_POWER_OFF, /* core_nret_bank */ | 43 | [0] = PWRSTS_OFF, /* core_nret_bank */ |
| 44 | [1] = PWRSTS_OFF_RET, /* core_ocmram */ | 44 | [1] = PWRSTS_OFF_RET, /* core_ocmram */ |
| 45 | [2] = PWRDM_POWER_RET, /* core_other_bank */ | 45 | [2] = PWRSTS_RET, /* core_other_bank */ |
| 46 | [3] = PWRSTS_OFF_RET, /* ducati_l2ram */ | 46 | [3] = PWRSTS_OFF_RET, /* ducati_l2ram */ |
| 47 | [4] = PWRSTS_OFF_RET, /* ducati_unicache */ | 47 | [4] = PWRSTS_OFF_RET, /* ducati_unicache */ |
| 48 | }, | 48 | }, |
| 49 | .pwrsts_mem_on = { | 49 | .pwrsts_mem_on = { |
| 50 | [0] = PWRDM_POWER_ON, /* core_nret_bank */ | 50 | [0] = PWRSTS_ON, /* core_nret_bank */ |
| 51 | [1] = PWRSTS_OFF_RET, /* core_ocmram */ | 51 | [1] = PWRSTS_OFF_RET, /* core_ocmram */ |
| 52 | [2] = PWRDM_POWER_ON, /* core_other_bank */ | 52 | [2] = PWRSTS_ON, /* core_other_bank */ |
| 53 | [3] = PWRDM_POWER_ON, /* ducati_l2ram */ | 53 | [3] = PWRSTS_ON, /* ducati_l2ram */ |
| 54 | [4] = PWRDM_POWER_ON, /* ducati_unicache */ | 54 | [4] = PWRSTS_ON, /* ducati_unicache */ |
| 55 | }, | 55 | }, |
| 56 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 56 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
| 57 | }; | 57 | }; |
| @@ -65,10 +65,10 @@ static struct powerdomain gfx_44xx_pwrdm = { | |||
| 65 | .pwrsts = PWRSTS_OFF_ON, | 65 | .pwrsts = PWRSTS_OFF_ON, |
| 66 | .banks = 1, | 66 | .banks = 1, |
| 67 | .pwrsts_mem_ret = { | 67 | .pwrsts_mem_ret = { |
| 68 | [0] = PWRDM_POWER_OFF, /* gfx_mem */ | 68 | [0] = PWRSTS_OFF, /* gfx_mem */ |
| 69 | }, | 69 | }, |
| 70 | .pwrsts_mem_on = { | 70 | .pwrsts_mem_on = { |
| 71 | [0] = PWRDM_POWER_ON, /* gfx_mem */ | 71 | [0] = PWRSTS_ON, /* gfx_mem */ |
| 72 | }, | 72 | }, |
| 73 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 73 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
| 74 | }; | 74 | }; |
| @@ -80,15 +80,15 @@ static struct powerdomain abe_44xx_pwrdm = { | |||
| 80 | .prcm_partition = OMAP4430_PRM_PARTITION, | 80 | .prcm_partition = OMAP4430_PRM_PARTITION, |
| 81 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 81 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 82 | .pwrsts = PWRSTS_OFF_RET_ON, | 82 | .pwrsts = PWRSTS_OFF_RET_ON, |
| 83 | .pwrsts_logic_ret = PWRDM_POWER_OFF, | 83 | .pwrsts_logic_ret = PWRSTS_OFF, |
| 84 | .banks = 2, | 84 | .banks = 2, |
| 85 | .pwrsts_mem_ret = { | 85 | .pwrsts_mem_ret = { |
| 86 | [0] = PWRDM_POWER_RET, /* aessmem */ | 86 | [0] = PWRSTS_RET, /* aessmem */ |
| 87 | [1] = PWRDM_POWER_OFF, /* periphmem */ | 87 | [1] = PWRSTS_OFF, /* periphmem */ |
| 88 | }, | 88 | }, |
| 89 | .pwrsts_mem_on = { | 89 | .pwrsts_mem_on = { |
| 90 | [0] = PWRDM_POWER_ON, /* aessmem */ | 90 | [0] = PWRSTS_ON, /* aessmem */ |
| 91 | [1] = PWRDM_POWER_ON, /* periphmem */ | 91 | [1] = PWRSTS_ON, /* periphmem */ |
| 92 | }, | 92 | }, |
| 93 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 93 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
| 94 | }; | 94 | }; |
| @@ -103,10 +103,10 @@ static struct powerdomain dss_44xx_pwrdm = { | |||
| 103 | .pwrsts_logic_ret = PWRSTS_OFF, | 103 | .pwrsts_logic_ret = PWRSTS_OFF, |
| 104 | .banks = 1, | 104 | .banks = 1, |
| 105 | .pwrsts_mem_ret = { | 105 | .pwrsts_mem_ret = { |
| 106 | [0] = PWRDM_POWER_OFF, /* dss_mem */ | 106 | [0] = PWRSTS_OFF, /* dss_mem */ |
| 107 | }, | 107 | }, |
| 108 | .pwrsts_mem_on = { | 108 | .pwrsts_mem_on = { |
| 109 | [0] = PWRDM_POWER_ON, /* dss_mem */ | 109 | [0] = PWRSTS_ON, /* dss_mem */ |
| 110 | }, | 110 | }, |
| 111 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 111 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
| 112 | }; | 112 | }; |
| @@ -121,14 +121,14 @@ static struct powerdomain tesla_44xx_pwrdm = { | |||
| 121 | .pwrsts_logic_ret = PWRSTS_OFF_RET, | 121 | .pwrsts_logic_ret = PWRSTS_OFF_RET, |
| 122 | .banks = 3, | 122 | .banks = 3, |
| 123 | .pwrsts_mem_ret = { | 123 | .pwrsts_mem_ret = { |
| 124 | [0] = PWRDM_POWER_RET, /* tesla_edma */ | 124 | [0] = PWRSTS_RET, /* tesla_edma */ |
| 125 | [1] = PWRSTS_OFF_RET, /* tesla_l1 */ | 125 | [1] = PWRSTS_OFF_RET, /* tesla_l1 */ |
| 126 | [2] = PWRSTS_OFF_RET, /* tesla_l2 */ | 126 | [2] = PWRSTS_OFF_RET, /* tesla_l2 */ |
| 127 | }, | 127 | }, |
| 128 | .pwrsts_mem_on = { | 128 | .pwrsts_mem_on = { |
| 129 | [0] = PWRDM_POWER_ON, /* tesla_edma */ | 129 | [0] = PWRSTS_ON, /* tesla_edma */ |
| 130 | [1] = PWRDM_POWER_ON, /* tesla_l1 */ | 130 | [1] = PWRSTS_ON, /* tesla_l1 */ |
| 131 | [2] = PWRDM_POWER_ON, /* tesla_l2 */ | 131 | [2] = PWRSTS_ON, /* tesla_l2 */ |
| 132 | }, | 132 | }, |
| 133 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 133 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
| 134 | }; | 134 | }; |
| @@ -142,10 +142,10 @@ static struct powerdomain wkup_44xx_pwrdm = { | |||
| 142 | .pwrsts = PWRSTS_ON, | 142 | .pwrsts = PWRSTS_ON, |
| 143 | .banks = 1, | 143 | .banks = 1, |
| 144 | .pwrsts_mem_ret = { | 144 | .pwrsts_mem_ret = { |
| 145 | [0] = PWRDM_POWER_OFF, /* wkup_bank */ | 145 | [0] = PWRSTS_OFF, /* wkup_bank */ |
| 146 | }, | 146 | }, |
| 147 | .pwrsts_mem_on = { | 147 | .pwrsts_mem_on = { |
| 148 | [0] = PWRDM_POWER_ON, /* wkup_bank */ | 148 | [0] = PWRSTS_ON, /* wkup_bank */ |
| 149 | }, | 149 | }, |
| 150 | }; | 150 | }; |
| 151 | 151 | ||
| @@ -162,7 +162,7 @@ static struct powerdomain cpu0_44xx_pwrdm = { | |||
| 162 | [0] = PWRSTS_OFF_RET, /* cpu0_l1 */ | 162 | [0] = PWRSTS_OFF_RET, /* cpu0_l1 */ |
| 163 | }, | 163 | }, |
| 164 | .pwrsts_mem_on = { | 164 | .pwrsts_mem_on = { |
| 165 | [0] = PWRDM_POWER_ON, /* cpu0_l1 */ | 165 | [0] = PWRSTS_ON, /* cpu0_l1 */ |
| 166 | }, | 166 | }, |
| 167 | }; | 167 | }; |
| 168 | 168 | ||
| @@ -179,7 +179,7 @@ static struct powerdomain cpu1_44xx_pwrdm = { | |||
| 179 | [0] = PWRSTS_OFF_RET, /* cpu1_l1 */ | 179 | [0] = PWRSTS_OFF_RET, /* cpu1_l1 */ |
| 180 | }, | 180 | }, |
| 181 | .pwrsts_mem_on = { | 181 | .pwrsts_mem_on = { |
| 182 | [0] = PWRDM_POWER_ON, /* cpu1_l1 */ | 182 | [0] = PWRSTS_ON, /* cpu1_l1 */ |
| 183 | }, | 183 | }, |
| 184 | }; | 184 | }; |
| 185 | 185 | ||
| @@ -192,10 +192,10 @@ static struct powerdomain emu_44xx_pwrdm = { | |||
| 192 | .pwrsts = PWRSTS_OFF_ON, | 192 | .pwrsts = PWRSTS_OFF_ON, |
| 193 | .banks = 1, | 193 | .banks = 1, |
| 194 | .pwrsts_mem_ret = { | 194 | .pwrsts_mem_ret = { |
| 195 | [0] = PWRDM_POWER_OFF, /* emu_bank */ | 195 | [0] = PWRSTS_OFF, /* emu_bank */ |
| 196 | }, | 196 | }, |
| 197 | .pwrsts_mem_on = { | 197 | .pwrsts_mem_on = { |
| 198 | [0] = PWRDM_POWER_ON, /* emu_bank */ | 198 | [0] = PWRSTS_ON, /* emu_bank */ |
| 199 | }, | 199 | }, |
| 200 | }; | 200 | }; |
| 201 | 201 | ||
| @@ -211,12 +211,12 @@ static struct powerdomain mpu_44xx_pwrdm = { | |||
| 211 | .pwrsts_mem_ret = { | 211 | .pwrsts_mem_ret = { |
| 212 | [0] = PWRSTS_OFF_RET, /* mpu_l1 */ | 212 | [0] = PWRSTS_OFF_RET, /* mpu_l1 */ |
| 213 | [1] = PWRSTS_OFF_RET, /* mpu_l2 */ | 213 | [1] = PWRSTS_OFF_RET, /* mpu_l2 */ |
| 214 | [2] = PWRDM_POWER_RET, /* mpu_ram */ | 214 | [2] = PWRSTS_RET, /* mpu_ram */ |
| 215 | }, | 215 | }, |
| 216 | .pwrsts_mem_on = { | 216 | .pwrsts_mem_on = { |
| 217 | [0] = PWRDM_POWER_ON, /* mpu_l1 */ | 217 | [0] = PWRSTS_ON, /* mpu_l1 */ |
| 218 | [1] = PWRDM_POWER_ON, /* mpu_l2 */ | 218 | [1] = PWRSTS_ON, /* mpu_l2 */ |
| 219 | [2] = PWRDM_POWER_ON, /* mpu_ram */ | 219 | [2] = PWRSTS_ON, /* mpu_ram */ |
| 220 | }, | 220 | }, |
| 221 | }; | 221 | }; |
| 222 | 222 | ||
| @@ -227,19 +227,19 @@ static struct powerdomain ivahd_44xx_pwrdm = { | |||
| 227 | .prcm_partition = OMAP4430_PRM_PARTITION, | 227 | .prcm_partition = OMAP4430_PRM_PARTITION, |
| 228 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 228 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
| 229 | .pwrsts = PWRSTS_OFF_RET_ON, | 229 | .pwrsts = PWRSTS_OFF_RET_ON, |
| 230 | .pwrsts_logic_ret = PWRDM_POWER_OFF, | 230 | .pwrsts_logic_ret = PWRSTS_OFF, |
| 231 | .banks = 4, | 231 | .banks = 4, |
| 232 | .pwrsts_mem_ret = { | 232 | .pwrsts_mem_ret = { |
| 233 | [0] = PWRDM_POWER_OFF, /* hwa_mem */ | 233 | [0] = PWRSTS_OFF, /* hwa_mem */ |
| 234 | [1] = PWRSTS_OFF_RET, /* sl2_mem */ | 234 | [1] = PWRSTS_OFF_RET, /* sl2_mem */ |
| 235 | [2] = PWRSTS_OFF_RET, /* tcm1_mem */ | 235 | [2] = PWRSTS_OFF_RET, /* tcm1_mem */ |
| 236 | [3] = PWRSTS_OFF_RET, /* tcm2_mem */ | 236 | [3] = PWRSTS_OFF_RET, /* tcm2_mem */ |
| 237 | }, | 237 | }, |
| 238 | .pwrsts_mem_on = { | 238 | .pwrsts_mem_on = { |
| 239 | [0] = PWRDM_POWER_ON, /* hwa_mem */ | 239 | [0] = PWRSTS_ON, /* hwa_mem */ |
| 240 | [1] = PWRDM_POWER_ON, /* sl2_mem */ | 240 | [1] = PWRSTS_ON, /* sl2_mem */ |
| 241 | [2] = PWRDM_POWER_ON, /* tcm1_mem */ | 241 | [2] = PWRSTS_ON, /* tcm1_mem */ |
| 242 | [3] = PWRDM_POWER_ON, /* tcm2_mem */ | 242 | [3] = PWRSTS_ON, /* tcm2_mem */ |
| 243 | }, | 243 | }, |
| 244 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 244 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
| 245 | }; | 245 | }; |
| @@ -253,10 +253,10 @@ static struct powerdomain cam_44xx_pwrdm = { | |||
| 253 | .pwrsts = PWRSTS_OFF_ON, | 253 | .pwrsts = PWRSTS_OFF_ON, |
| 254 | .banks = 1, | 254 | .banks = 1, |
| 255 | .pwrsts_mem_ret = { | 255 | .pwrsts_mem_ret = { |
| 256 | [0] = PWRDM_POWER_OFF, /* cam_mem */ | 256 | [0] = PWRSTS_OFF, /* cam_mem */ |
| 257 | }, | 257 | }, |
| 258 | .pwrsts_mem_on = { | 258 | .pwrsts_mem_on = { |
| 259 | [0] = PWRDM_POWER_ON, /* cam_mem */ | 259 | [0] = PWRSTS_ON, /* cam_mem */ |
| 260 | }, | 260 | }, |
| 261 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 261 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
| 262 | }; | 262 | }; |
| @@ -271,10 +271,10 @@ static struct powerdomain l3init_44xx_pwrdm = { | |||
| 271 | .pwrsts_logic_ret = PWRSTS_OFF_RET, | 271 | .pwrsts_logic_ret = PWRSTS_OFF_RET, |
| 272 | .banks = 1, | 272 | .banks = 1, |
| 273 | .pwrsts_mem_ret = { | 273 | .pwrsts_mem_ret = { |
| 274 | [0] = PWRDM_POWER_OFF, /* l3init_bank1 */ | 274 | [0] = PWRSTS_OFF, /* l3init_bank1 */ |
| 275 | }, | 275 | }, |
| 276 | .pwrsts_mem_on = { | 276 | .pwrsts_mem_on = { |
| 277 | [0] = PWRDM_POWER_ON, /* l3init_bank1 */ | 277 | [0] = PWRSTS_ON, /* l3init_bank1 */ |
| 278 | }, | 278 | }, |
| 279 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 279 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
| 280 | }; | 280 | }; |
| @@ -289,12 +289,12 @@ static struct powerdomain l4per_44xx_pwrdm = { | |||
| 289 | .pwrsts_logic_ret = PWRSTS_OFF_RET, | 289 | .pwrsts_logic_ret = PWRSTS_OFF_RET, |
| 290 | .banks = 2, | 290 | .banks = 2, |
| 291 | .pwrsts_mem_ret = { | 291 | .pwrsts_mem_ret = { |
| 292 | [0] = PWRDM_POWER_OFF, /* nonretained_bank */ | 292 | [0] = PWRSTS_OFF, /* nonretained_bank */ |
| 293 | [1] = PWRDM_POWER_RET, /* retained_bank */ | 293 | [1] = PWRSTS_RET, /* retained_bank */ |
| 294 | }, | 294 | }, |
| 295 | .pwrsts_mem_on = { | 295 | .pwrsts_mem_on = { |
| 296 | [0] = PWRDM_POWER_ON, /* nonretained_bank */ | 296 | [0] = PWRSTS_ON, /* nonretained_bank */ |
| 297 | [1] = PWRDM_POWER_ON, /* retained_bank */ | 297 | [1] = PWRSTS_ON, /* retained_bank */ |
| 298 | }, | 298 | }, |
| 299 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 299 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
| 300 | }; | 300 | }; |
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h index 87486f559784..0363dcb0ef93 100644 --- a/arch/arm/mach-omap2/prcm-common.h +++ b/arch/arm/mach-omap2/prcm-common.h | |||
| @@ -121,6 +121,10 @@ | |||
| 121 | #define OMAP24XX_ST_MCSPI2_MASK (1 << 18) | 121 | #define OMAP24XX_ST_MCSPI2_MASK (1 << 18) |
| 122 | #define OMAP24XX_ST_MCSPI1_SHIFT 17 | 122 | #define OMAP24XX_ST_MCSPI1_SHIFT 17 |
| 123 | #define OMAP24XX_ST_MCSPI1_MASK (1 << 17) | 123 | #define OMAP24XX_ST_MCSPI1_MASK (1 << 17) |
| 124 | #define OMAP24XX_ST_MCBSP2_SHIFT 16 | ||
| 125 | #define OMAP24XX_ST_MCBSP2_MASK (1 << 16) | ||
| 126 | #define OMAP24XX_ST_MCBSP1_SHIFT 15 | ||
| 127 | #define OMAP24XX_ST_MCBSP1_MASK (1 << 15) | ||
| 124 | #define OMAP24XX_ST_GPT12_SHIFT 14 | 128 | #define OMAP24XX_ST_GPT12_SHIFT 14 |
| 125 | #define OMAP24XX_ST_GPT12_MASK (1 << 14) | 129 | #define OMAP24XX_ST_GPT12_MASK (1 << 14) |
| 126 | #define OMAP24XX_ST_GPT11_SHIFT 13 | 130 | #define OMAP24XX_ST_GPT11_SHIFT 13 |
| @@ -191,6 +195,8 @@ | |||
| 191 | #define OMAP3430_AUTOIDLE_MASK (1 << 0) | 195 | #define OMAP3430_AUTOIDLE_MASK (1 << 0) |
| 192 | 196 | ||
| 193 | /* CM_FCLKEN1_CORE, CM_ICLKEN1_CORE, PM_WKEN1_CORE shared bits */ | 197 | /* CM_FCLKEN1_CORE, CM_ICLKEN1_CORE, PM_WKEN1_CORE shared bits */ |
| 198 | #define OMAP3430_EN_MMC3_MASK (1 << 30) | ||
| 199 | #define OMAP3430_EN_MMC3_SHIFT 30 | ||
| 194 | #define OMAP3430_EN_MMC2_MASK (1 << 25) | 200 | #define OMAP3430_EN_MMC2_MASK (1 << 25) |
| 195 | #define OMAP3430_EN_MMC2_SHIFT 25 | 201 | #define OMAP3430_EN_MMC2_SHIFT 25 |
| 196 | #define OMAP3430_EN_MMC1_MASK (1 << 24) | 202 | #define OMAP3430_EN_MMC1_MASK (1 << 24) |
| @@ -231,6 +237,8 @@ | |||
| 231 | #define OMAP3430_EN_HSOTGUSB_SHIFT 4 | 237 | #define OMAP3430_EN_HSOTGUSB_SHIFT 4 |
| 232 | 238 | ||
| 233 | /* PM_WKST1_CORE, CM_IDLEST1_CORE shared bits */ | 239 | /* PM_WKST1_CORE, CM_IDLEST1_CORE shared bits */ |
| 240 | #define OMAP3430_ST_MMC3_SHIFT 30 | ||
| 241 | #define OMAP3430_ST_MMC3_MASK (1 << 30) | ||
| 234 | #define OMAP3430_ST_MMC2_SHIFT 25 | 242 | #define OMAP3430_ST_MMC2_SHIFT 25 |
| 235 | #define OMAP3430_ST_MMC2_MASK (1 << 25) | 243 | #define OMAP3430_ST_MMC2_MASK (1 << 25) |
| 236 | #define OMAP3430_ST_MMC1_SHIFT 24 | 244 | #define OMAP3430_ST_MMC1_SHIFT 24 |
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index 679bcd28576e..6be14389e4f3 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
| 25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
| 26 | 26 | ||
| 27 | #include <mach/system.h> | ||
| 27 | #include <plat/common.h> | 28 | #include <plat/common.h> |
| 28 | #include <plat/prcm.h> | 29 | #include <plat/prcm.h> |
| 29 | #include <plat/irqs.h> | 30 | #include <plat/irqs.h> |
| @@ -57,7 +58,7 @@ u32 omap_prcm_get_reset_sources(void) | |||
| 57 | EXPORT_SYMBOL(omap_prcm_get_reset_sources); | 58 | EXPORT_SYMBOL(omap_prcm_get_reset_sources); |
| 58 | 59 | ||
| 59 | /* Resets clock rates and reboots the system. Only called from system.h */ | 60 | /* Resets clock rates and reboots the system. Only called from system.h */ |
| 60 | void omap_prcm_arch_reset(char mode, const char *cmd) | 61 | static void omap_prcm_arch_reset(char mode, const char *cmd) |
| 61 | { | 62 | { |
| 62 | s16 prcm_offs = 0; | 63 | s16 prcm_offs = 0; |
| 63 | 64 | ||
| @@ -108,6 +109,8 @@ void omap_prcm_arch_reset(char mode, const char *cmd) | |||
| 108 | omap2_prm_read_mod_reg(prcm_offs, OMAP2_RM_RSTCTRL); /* OCP barrier */ | 109 | omap2_prm_read_mod_reg(prcm_offs, OMAP2_RM_RSTCTRL); /* OCP barrier */ |
| 109 | } | 110 | } |
| 110 | 111 | ||
| 112 | void (*arch_reset)(char, const char *) = omap_prcm_arch_reset; | ||
| 113 | |||
| 111 | /** | 114 | /** |
| 112 | * omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness | 115 | * omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness |
| 113 | * @reg: physical address of module IDLEST register | 116 | * @reg: physical address of module IDLEST register |
diff --git a/arch/arm/mach-omap2/prcm_mpu44xx.h b/arch/arm/mach-omap2/prcm_mpu44xx.h index 3300ff6e3cfe..d22d1b43bccd 100644 --- a/arch/arm/mach-omap2/prcm_mpu44xx.h +++ b/arch/arm/mach-omap2/prcm_mpu44xx.h | |||
| @@ -38,8 +38,8 @@ | |||
| 38 | #define OMAP4430_PRCM_MPU_CPU1_INST 0x0800 | 38 | #define OMAP4430_PRCM_MPU_CPU1_INST 0x0800 |
| 39 | 39 | ||
| 40 | /* PRCM_MPU clockdomain register offsets (from instance start) */ | 40 | /* PRCM_MPU clockdomain register offsets (from instance start) */ |
| 41 | #define OMAP4430_PRCM_MPU_CPU0_MPU_CDOFFS 0x0018 | 41 | #define OMAP4430_PRCM_MPU_CPU0_CPU0_CDOFFS 0x0018 |
| 42 | #define OMAP4430_PRCM_MPU_CPU1_MPU_CDOFFS 0x0018 | 42 | #define OMAP4430_PRCM_MPU_CPU1_CPU1_CDOFFS 0x0018 |
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | /* | 45 | /* |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 32e91a9c8b6b..1ac361b7b8cb 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
| @@ -486,7 +486,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart) | |||
| 486 | mod_timer(&uart->timer, jiffies + uart->timeout); | 486 | mod_timer(&uart->timer, jiffies + uart->timeout); |
| 487 | omap_uart_smart_idle_enable(uart, 0); | 487 | omap_uart_smart_idle_enable(uart, 0); |
| 488 | 488 | ||
| 489 | if (cpu_is_omap34xx()) { | 489 | if (cpu_is_omap34xx() && !cpu_is_ti816x()) { |
| 490 | u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD; | 490 | u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD; |
| 491 | u32 wk_mask = 0; | 491 | u32 wk_mask = 0; |
| 492 | u32 padconf = 0; | 492 | u32 padconf = 0; |
| @@ -655,7 +655,7 @@ static void serial_out_override(struct uart_port *up, int offset, int value) | |||
| 655 | } | 655 | } |
| 656 | #endif | 656 | #endif |
| 657 | 657 | ||
| 658 | void __init omap_serial_early_init(void) | 658 | static int __init omap_serial_early_init(void) |
| 659 | { | 659 | { |
| 660 | int i = 0; | 660 | int i = 0; |
| 661 | 661 | ||
| @@ -672,7 +672,7 @@ void __init omap_serial_early_init(void) | |||
| 672 | 672 | ||
| 673 | uart = kzalloc(sizeof(struct omap_uart_state), GFP_KERNEL); | 673 | uart = kzalloc(sizeof(struct omap_uart_state), GFP_KERNEL); |
| 674 | if (WARN_ON(!uart)) | 674 | if (WARN_ON(!uart)) |
| 675 | return; | 675 | return -ENODEV; |
| 676 | 676 | ||
| 677 | uart->oh = oh; | 677 | uart->oh = oh; |
| 678 | uart->num = i++; | 678 | uart->num = i++; |
| @@ -680,7 +680,7 @@ void __init omap_serial_early_init(void) | |||
| 680 | num_uarts++; | 680 | num_uarts++; |
| 681 | 681 | ||
| 682 | /* | 682 | /* |
| 683 | * NOTE: omap_hwmod_init() has not yet been called, | 683 | * NOTE: omap_hwmod_setup*() has not yet been called, |
| 684 | * so no hwmod functions will work yet. | 684 | * so no hwmod functions will work yet. |
| 685 | */ | 685 | */ |
| 686 | 686 | ||
| @@ -691,7 +691,10 @@ void __init omap_serial_early_init(void) | |||
| 691 | */ | 691 | */ |
| 692 | uart->oh->flags |= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET; | 692 | uart->oh->flags |= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET; |
| 693 | } while (1); | 693 | } while (1); |
| 694 | |||
| 695 | return 0; | ||
| 694 | } | 696 | } |
| 697 | core_initcall(omap_serial_early_init); | ||
| 695 | 698 | ||
| 696 | /** | 699 | /** |
| 697 | * omap_serial_init_port() - initialize single serial port | 700 | * omap_serial_init_port() - initialize single serial port |
| @@ -759,13 +762,13 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) | |||
| 759 | p->private_data = uart; | 762 | p->private_data = uart; |
| 760 | 763 | ||
| 761 | /* | 764 | /* |
| 762 | * omap44xx: Never read empty UART fifo | 765 | * omap44xx, ti816x: Never read empty UART fifo |
| 763 | * omap3xxx: Never read empty UART fifo on UARTs | 766 | * omap3xxx: Never read empty UART fifo on UARTs |
| 764 | * with IP rev >=0x52 | 767 | * with IP rev >=0x52 |
| 765 | */ | 768 | */ |
| 766 | uart->regshift = p->regshift; | 769 | uart->regshift = p->regshift; |
| 767 | uart->membase = p->membase; | 770 | uart->membase = p->membase; |
| 768 | if (cpu_is_omap44xx()) | 771 | if (cpu_is_omap44xx() || cpu_is_ti816x()) |
| 769 | uart->errata |= UART_ERRATA_FIFO_FULL_ABORT; | 772 | uart->errata |= UART_ERRATA_FIFO_FULL_ABORT; |
| 770 | else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF) | 773 | else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF) |
| 771 | >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV) | 774 | >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV) |
| @@ -847,7 +850,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) | |||
| 847 | } | 850 | } |
| 848 | 851 | ||
| 849 | /* Enable the MDR1 errata for OMAP3 */ | 852 | /* Enable the MDR1 errata for OMAP3 */ |
| 850 | if (cpu_is_omap34xx()) | 853 | if (cpu_is_omap34xx() && !cpu_is_ti816x()) |
| 851 | uart->errata |= UART_ERRATA_i202_MDR1_ACCESS; | 854 | uart->errata |= UART_ERRATA_i202_MDR1_ACCESS; |
| 852 | } | 855 | } |
| 853 | 856 | ||
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 0fc550e7e482..3b9cf85f4bb9 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
| @@ -40,10 +40,11 @@ | |||
| 40 | #include <plat/dmtimer.h> | 40 | #include <plat/dmtimer.h> |
| 41 | #include <asm/localtimer.h> | 41 | #include <asm/localtimer.h> |
| 42 | #include <asm/sched_clock.h> | 42 | #include <asm/sched_clock.h> |
| 43 | #include <plat/common.h> | ||
| 44 | #include <plat/omap_hwmod.h> | ||
| 43 | 45 | ||
| 44 | #include "timer-gp.h" | 46 | #include "timer-gp.h" |
| 45 | 47 | ||
| 46 | #include <plat/common.h> | ||
| 47 | 48 | ||
| 48 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ | 49 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ |
| 49 | #define MAX_GPTIMER_ID 12 | 50 | #define MAX_GPTIMER_ID 12 |
| @@ -133,9 +134,13 @@ static void __init omap2_gp_clockevent_init(void) | |||
| 133 | { | 134 | { |
| 134 | u32 tick_rate; | 135 | u32 tick_rate; |
| 135 | int src; | 136 | int src; |
| 137 | char clockevent_hwmod_name[8]; /* 8 = sizeof("timerXX0") */ | ||
| 136 | 138 | ||
| 137 | inited = 1; | 139 | inited = 1; |
| 138 | 140 | ||
| 141 | sprintf(clockevent_hwmod_name, "timer%d", gptimer_id); | ||
| 142 | omap_hwmod_setup_one(clockevent_hwmod_name); | ||
| 143 | |||
| 139 | gptimer = omap_dm_timer_request_specific(gptimer_id); | 144 | gptimer = omap_dm_timer_request_specific(gptimer_id); |
| 140 | BUG_ON(gptimer == NULL); | 145 | BUG_ON(gptimer == NULL); |
| 141 | gptimer_wakeup = gptimer; | 146 | gptimer_wakeup = gptimer; |
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 5298949d4b11..a9d4d143086d 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c | |||
| @@ -30,118 +30,11 @@ | |||
| 30 | #include <mach/irqs.h> | 30 | #include <mach/irqs.h> |
| 31 | #include <mach/am35xx.h> | 31 | #include <mach/am35xx.h> |
| 32 | #include <plat/usb.h> | 32 | #include <plat/usb.h> |
| 33 | #include "control.h" | 33 | #include <plat/omap_device.h> |
| 34 | #include "mux.h" | ||
| 34 | 35 | ||
| 35 | #if defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined (CONFIG_USB_MUSB_AM35X) | 36 | #if defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined (CONFIG_USB_MUSB_AM35X) |
| 36 | 37 | ||
| 37 | static void am35x_musb_reset(void) | ||
| 38 | { | ||
| 39 | u32 regval; | ||
| 40 | |||
| 41 | /* Reset the musb interface */ | ||
| 42 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | ||
| 43 | |||
| 44 | regval |= AM35XX_USBOTGSS_SW_RST; | ||
| 45 | omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET); | ||
| 46 | |||
| 47 | regval &= ~AM35XX_USBOTGSS_SW_RST; | ||
| 48 | omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET); | ||
| 49 | |||
| 50 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | ||
| 51 | } | ||
| 52 | |||
| 53 | static void am35x_musb_phy_power(u8 on) | ||
| 54 | { | ||
| 55 | unsigned long timeout = jiffies + msecs_to_jiffies(100); | ||
| 56 | u32 devconf2; | ||
| 57 | |||
| 58 | if (on) { | ||
| 59 | /* | ||
| 60 | * Start the on-chip PHY and its PLL. | ||
| 61 | */ | ||
| 62 | devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); | ||
| 63 | |||
| 64 | devconf2 &= ~(CONF2_RESET | CONF2_PHYPWRDN | CONF2_OTGPWRDN); | ||
| 65 | devconf2 |= CONF2_PHY_PLLON; | ||
| 66 | |||
| 67 | omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); | ||
| 68 | |||
| 69 | pr_info(KERN_INFO "Waiting for PHY clock good...\n"); | ||
| 70 | while (!(omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2) | ||
| 71 | & CONF2_PHYCLKGD)) { | ||
| 72 | cpu_relax(); | ||
| 73 | |||
| 74 | if (time_after(jiffies, timeout)) { | ||
| 75 | pr_err(KERN_ERR "musb PHY clock good timed out\n"); | ||
| 76 | break; | ||
| 77 | } | ||
| 78 | } | ||
| 79 | } else { | ||
| 80 | /* | ||
| 81 | * Power down the on-chip PHY. | ||
| 82 | */ | ||
| 83 | devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); | ||
| 84 | |||
| 85 | devconf2 &= ~CONF2_PHY_PLLON; | ||
| 86 | devconf2 |= CONF2_PHYPWRDN | CONF2_OTGPWRDN; | ||
| 87 | omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); | ||
| 88 | } | ||
| 89 | } | ||
| 90 | |||
| 91 | static void am35x_musb_clear_irq(void) | ||
| 92 | { | ||
| 93 | u32 regval; | ||
| 94 | |||
| 95 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
| 96 | regval |= AM35XX_USBOTGSS_INT_CLR; | ||
| 97 | omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
| 98 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
| 99 | } | ||
| 100 | |||
| 101 | static void am35x_musb_set_mode(u8 musb_mode) | ||
| 102 | { | ||
| 103 | u32 devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); | ||
| 104 | |||
| 105 | devconf2 &= ~CONF2_OTGMODE; | ||
| 106 | switch (musb_mode) { | ||
| 107 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | ||
| 108 | case MUSB_HOST: /* Force VBUS valid, ID = 0 */ | ||
| 109 | devconf2 |= CONF2_FORCE_HOST; | ||
| 110 | break; | ||
| 111 | #endif | ||
| 112 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | ||
| 113 | case MUSB_PERIPHERAL: /* Force VBUS valid, ID = 1 */ | ||
| 114 | devconf2 |= CONF2_FORCE_DEVICE; | ||
| 115 | break; | ||
| 116 | #endif | ||
| 117 | #ifdef CONFIG_USB_MUSB_OTG | ||
| 118 | case MUSB_OTG: /* Don't override the VBUS/ID comparators */ | ||
| 119 | devconf2 |= CONF2_NO_OVERRIDE; | ||
| 120 | break; | ||
| 121 | #endif | ||
| 122 | default: | ||
| 123 | pr_info(KERN_INFO "Unsupported mode %u\n", musb_mode); | ||
| 124 | } | ||
| 125 | |||
| 126 | omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); | ||
| 127 | } | ||
| 128 | |||
| 129 | static struct resource musb_resources[] = { | ||
| 130 | [0] = { /* start and end set dynamically */ | ||
| 131 | .flags = IORESOURCE_MEM, | ||
| 132 | }, | ||
| 133 | [1] = { /* general IRQ */ | ||
| 134 | .start = INT_243X_HS_USB_MC, | ||
| 135 | .flags = IORESOURCE_IRQ, | ||
| 136 | .name = "mc", | ||
| 137 | }, | ||
| 138 | [2] = { /* DMA IRQ */ | ||
| 139 | .start = INT_243X_HS_USB_DMA, | ||
| 140 | .flags = IORESOURCE_IRQ, | ||
| 141 | .name = "dma", | ||
| 142 | }, | ||
| 143 | }; | ||
| 144 | |||
| 145 | static struct musb_hdrc_config musb_config = { | 38 | static struct musb_hdrc_config musb_config = { |
| 146 | .multipoint = 1, | 39 | .multipoint = 1, |
| 147 | .dyn_fifo = 1, | 40 | .dyn_fifo = 1, |
| @@ -169,38 +62,65 @@ static struct musb_hdrc_platform_data musb_plat = { | |||
| 169 | 62 | ||
| 170 | static u64 musb_dmamask = DMA_BIT_MASK(32); | 63 | static u64 musb_dmamask = DMA_BIT_MASK(32); |
| 171 | 64 | ||
| 172 | static struct platform_device musb_device = { | 65 | static struct omap_device_pm_latency omap_musb_latency[] = { |
| 173 | .name = "musb-omap2430", | 66 | { |
| 174 | .id = -1, | 67 | .deactivate_func = omap_device_idle_hwmods, |
| 175 | .dev = { | 68 | .activate_func = omap_device_enable_hwmods, |
| 176 | .dma_mask = &musb_dmamask, | 69 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, |
| 177 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 178 | .platform_data = &musb_plat, | ||
| 179 | }, | 70 | }, |
| 180 | .num_resources = ARRAY_SIZE(musb_resources), | ||
| 181 | .resource = musb_resources, | ||
| 182 | }; | 71 | }; |
| 183 | 72 | ||
| 73 | static void usb_musb_mux_init(struct omap_musb_board_data *board_data) | ||
| 74 | { | ||
| 75 | switch (board_data->interface_type) { | ||
| 76 | case MUSB_INTERFACE_UTMI: | ||
| 77 | omap_mux_init_signal("usba0_otg_dp", OMAP_PIN_INPUT); | ||
| 78 | omap_mux_init_signal("usba0_otg_dm", OMAP_PIN_INPUT); | ||
| 79 | break; | ||
| 80 | case MUSB_INTERFACE_ULPI: | ||
| 81 | omap_mux_init_signal("usba0_ulpiphy_clk", | ||
| 82 | OMAP_PIN_INPUT_PULLDOWN); | ||
| 83 | omap_mux_init_signal("usba0_ulpiphy_stp", | ||
| 84 | OMAP_PIN_INPUT_PULLDOWN); | ||
| 85 | omap_mux_init_signal("usba0_ulpiphy_dir", | ||
| 86 | OMAP_PIN_INPUT_PULLDOWN); | ||
| 87 | omap_mux_init_signal("usba0_ulpiphy_nxt", | ||
| 88 | OMAP_PIN_INPUT_PULLDOWN); | ||
| 89 | omap_mux_init_signal("usba0_ulpiphy_dat0", | ||
| 90 | OMAP_PIN_INPUT_PULLDOWN); | ||
| 91 | omap_mux_init_signal("usba0_ulpiphy_dat1", | ||
| 92 | OMAP_PIN_INPUT_PULLDOWN); | ||
| 93 | omap_mux_init_signal("usba0_ulpiphy_dat2", | ||
| 94 | OMAP_PIN_INPUT_PULLDOWN); | ||
| 95 | omap_mux_init_signal("usba0_ulpiphy_dat3", | ||
| 96 | OMAP_PIN_INPUT_PULLDOWN); | ||
| 97 | omap_mux_init_signal("usba0_ulpiphy_dat4", | ||
| 98 | OMAP_PIN_INPUT_PULLDOWN); | ||
| 99 | omap_mux_init_signal("usba0_ulpiphy_dat5", | ||
| 100 | OMAP_PIN_INPUT_PULLDOWN); | ||
| 101 | omap_mux_init_signal("usba0_ulpiphy_dat6", | ||
| 102 | OMAP_PIN_INPUT_PULLDOWN); | ||
| 103 | omap_mux_init_signal("usba0_ulpiphy_dat7", | ||
| 104 | OMAP_PIN_INPUT_PULLDOWN); | ||
| 105 | break; | ||
| 106 | default: | ||
| 107 | break; | ||
| 108 | } | ||
| 109 | } | ||
| 110 | |||
| 184 | void __init usb_musb_init(struct omap_musb_board_data *board_data) | 111 | void __init usb_musb_init(struct omap_musb_board_data *board_data) |
| 185 | { | 112 | { |
| 186 | if (cpu_is_omap243x()) { | 113 | struct omap_hwmod *oh; |
| 187 | musb_resources[0].start = OMAP243X_HS_BASE; | 114 | struct omap_device *od; |
| 188 | } else if (cpu_is_omap3517() || cpu_is_omap3505()) { | 115 | struct platform_device *pdev; |
| 189 | musb_device.name = "musb-am35x"; | 116 | struct device *dev; |
| 190 | musb_resources[0].start = AM35XX_IPSS_USBOTGSS_BASE; | 117 | int bus_id = -1; |
| 191 | musb_resources[1].start = INT_35XX_USBOTG_IRQ; | 118 | const char *oh_name, *name; |
| 192 | board_data->set_phy_power = am35x_musb_phy_power; | 119 | |
| 193 | board_data->clear_irq = am35x_musb_clear_irq; | 120 | if (cpu_is_omap3517() || cpu_is_omap3505()) { |
| 194 | board_data->set_mode = am35x_musb_set_mode; | ||
| 195 | board_data->reset = am35x_musb_reset; | ||
| 196 | } else if (cpu_is_omap34xx()) { | ||
| 197 | musb_resources[0].start = OMAP34XX_HSUSB_OTG_BASE; | ||
| 198 | } else if (cpu_is_omap44xx()) { | 121 | } else if (cpu_is_omap44xx()) { |
| 199 | musb_resources[0].start = OMAP44XX_HSUSB_OTG_BASE; | 122 | usb_musb_mux_init(board_data); |
| 200 | musb_resources[1].start = OMAP44XX_IRQ_HS_USB_MC_N; | ||
| 201 | musb_resources[2].start = OMAP44XX_IRQ_HS_USB_DMA_N; | ||
| 202 | } | 123 | } |
| 203 | musb_resources[0].end = musb_resources[0].start + SZ_4K - 1; | ||
| 204 | 124 | ||
| 205 | /* | 125 | /* |
| 206 | * REVISIT: This line can be removed once all the platforms using | 126 | * REVISIT: This line can be removed once all the platforms using |
| @@ -212,8 +132,35 @@ void __init usb_musb_init(struct omap_musb_board_data *board_data) | |||
| 212 | musb_plat.mode = board_data->mode; | 132 | musb_plat.mode = board_data->mode; |
| 213 | musb_plat.extvbus = board_data->extvbus; | 133 | musb_plat.extvbus = board_data->extvbus; |
| 214 | 134 | ||
| 215 | if (platform_device_register(&musb_device) < 0) | 135 | if (cpu_is_omap3517() || cpu_is_omap3505()) { |
| 216 | printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); | 136 | oh_name = "am35x_otg_hs"; |
| 137 | name = "musb-am35x"; | ||
| 138 | } else { | ||
| 139 | oh_name = "usb_otg_hs"; | ||
| 140 | name = "musb-omap2430"; | ||
| 141 | } | ||
| 142 | |||
| 143 | oh = omap_hwmod_lookup(oh_name); | ||
| 144 | if (!oh) { | ||
| 145 | pr_err("Could not look up %s\n", oh_name); | ||
| 146 | return; | ||
| 147 | } | ||
| 148 | |||
| 149 | od = omap_device_build(name, bus_id, oh, &musb_plat, | ||
| 150 | sizeof(musb_plat), omap_musb_latency, | ||
| 151 | ARRAY_SIZE(omap_musb_latency), false); | ||
| 152 | if (IS_ERR(od)) { | ||
| 153 | pr_err("Could not build omap_device for %s %s\n", | ||
| 154 | name, oh_name); | ||
| 155 | return; | ||
| 156 | } | ||
| 157 | |||
| 158 | pdev = &od->pdev; | ||
| 159 | dev = &pdev->dev; | ||
| 160 | get_device(dev); | ||
| 161 | dev->dma_mask = &musb_dmamask; | ||
| 162 | dev->coherent_dma_mask = musb_dmamask; | ||
| 163 | put_device(dev); | ||
| 217 | } | 164 | } |
| 218 | 165 | ||
| 219 | #else | 166 | #else |
