diff options
149 files changed, 6962 insertions, 5558 deletions
diff --git a/Documentation/devicetree/bindings/arm/samsung/sysreg.txt b/Documentation/devicetree/bindings/arm/samsung/sysreg.txt new file mode 100644 index 000000000000..5039c0a12f55 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/samsung/sysreg.txt | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | SAMSUNG S5P/Exynos SoC series System Registers (SYSREG) | ||
| 2 | |||
| 3 | Properties: | ||
| 4 | - name : should be 'sysreg'; | ||
| 5 | - compatible : should contain "samsung,<chip name>-sysreg", "syscon"; | ||
| 6 | For Exynos4 SoC series it should be "samsung,exynos4-sysreg", "syscon"; | ||
| 7 | - reg : offset and length of the register set. | ||
diff --git a/Documentation/devicetree/bindings/clock/exynos4-clock.txt b/Documentation/devicetree/bindings/clock/exynos4-clock.txt new file mode 100644 index 000000000000..ea5e26f16aec --- /dev/null +++ b/Documentation/devicetree/bindings/clock/exynos4-clock.txt | |||
| @@ -0,0 +1,288 @@ | |||
| 1 | * Samsung Exynos4 Clock Controller | ||
| 2 | |||
| 3 | The Exynos4 clock controller generates and supplies clock to various controllers | ||
| 4 | within the Exynos4 SoC. The clock binding described here is applicable to all | ||
| 5 | SoC's in the Exynos4 family. | ||
| 6 | |||
| 7 | Required Properties: | ||
| 8 | |||
| 9 | - comptible: should be one of the following. | ||
| 10 | - "samsung,exynos4210-clock" - controller compatible with Exynos4210 SoC. | ||
| 11 | - "samsung,exynos4412-clock" - controller compatible with Exynos4412 SoC. | ||
| 12 | |||
| 13 | - reg: physical base address of the controller and length of memory mapped | ||
| 14 | region. | ||
| 15 | |||
| 16 | - #clock-cells: should be 1. | ||
| 17 | |||
| 18 | The following is the list of clocks generated by the controller. Each clock is | ||
| 19 | assigned an identifier and client nodes use this identifier to specify the | ||
| 20 | clock which they consume. Some of the clocks are available only on a particular | ||
| 21 | Exynos4 SoC and this is specified where applicable. | ||
| 22 | |||
| 23 | |||
| 24 | [Core Clocks] | ||
| 25 | |||
| 26 | Clock ID SoC (if specific) | ||
| 27 | ----------------------------------------------- | ||
| 28 | |||
| 29 | xxti 1 | ||
| 30 | xusbxti 2 | ||
| 31 | fin_pll 3 | ||
| 32 | fout_apll 4 | ||
| 33 | fout_mpll 5 | ||
| 34 | fout_epll 6 | ||
| 35 | fout_vpll 7 | ||
| 36 | sclk_apll 8 | ||
| 37 | sclk_mpll 9 | ||
| 38 | sclk_epll 10 | ||
| 39 | sclk_vpll 11 | ||
| 40 | arm_clk 12 | ||
| 41 | aclk200 13 | ||
| 42 | aclk100 14 | ||
| 43 | aclk160 15 | ||
| 44 | aclk133 16 | ||
| 45 | mout_mpll_user_t 17 Exynos4x12 | ||
| 46 | mout_mpll_user_c 18 Exynos4x12 | ||
| 47 | mout_core 19 | ||
| 48 | mout_apll 20 | ||
| 49 | |||
| 50 | |||
| 51 | [Clock Gate for Special Clocks] | ||
| 52 | |||
| 53 | Clock ID SoC (if specific) | ||
| 54 | ----------------------------------------------- | ||
| 55 | |||
| 56 | sclk_fimc0 128 | ||
| 57 | sclk_fimc1 129 | ||
| 58 | sclk_fimc2 130 | ||
| 59 | sclk_fimc3 131 | ||
| 60 | sclk_cam0 132 | ||
| 61 | sclk_cam1 133 | ||
| 62 | sclk_csis0 134 | ||
| 63 | sclk_csis1 135 | ||
| 64 | sclk_hdmi 136 | ||
| 65 | sclk_mixer 137 | ||
| 66 | sclk_dac 138 | ||
| 67 | sclk_pixel 139 | ||
| 68 | sclk_fimd0 140 | ||
| 69 | sclk_mdnie0 141 Exynos4412 | ||
| 70 | sclk_mdnie_pwm0 12 142 Exynos4412 | ||
| 71 | sclk_mipi0 143 | ||
| 72 | sclk_audio0 144 | ||
| 73 | sclk_mmc0 145 | ||
| 74 | sclk_mmc1 146 | ||
| 75 | sclk_mmc2 147 | ||
| 76 | sclk_mmc3 148 | ||
| 77 | sclk_mmc4 149 | ||
| 78 | sclk_sata 150 Exynos4210 | ||
| 79 | sclk_uart0 151 | ||
| 80 | sclk_uart1 152 | ||
| 81 | sclk_uart2 153 | ||
| 82 | sclk_uart3 154 | ||
| 83 | sclk_uart4 155 | ||
| 84 | sclk_audio1 156 | ||
| 85 | sclk_audio2 157 | ||
| 86 | sclk_spdif 158 | ||
| 87 | sclk_spi0 159 | ||
| 88 | sclk_spi1 160 | ||
| 89 | sclk_spi2 161 | ||
| 90 | sclk_slimbus 162 | ||
| 91 | sclk_fimd1 163 Exynos4210 | ||
| 92 | sclk_mipi1 164 Exynos4210 | ||
| 93 | sclk_pcm1 165 | ||
| 94 | sclk_pcm2 166 | ||
| 95 | sclk_i2s1 167 | ||
| 96 | sclk_i2s2 168 | ||
| 97 | sclk_mipihsi 169 Exynos4412 | ||
| 98 | sclk_mfc 170 | ||
| 99 | sclk_pcm0 171 | ||
| 100 | sclk_g3d 172 | ||
| 101 | sclk_pwm_isp 173 Exynos4x12 | ||
| 102 | sclk_spi0_isp 174 Exynos4x12 | ||
| 103 | sclk_spi1_isp 175 Exynos4x12 | ||
| 104 | sclk_uart_isp 176 Exynos4x12 | ||
| 105 | |||
| 106 | [Peripheral Clock Gates] | ||
| 107 | |||
| 108 | Clock ID SoC (if specific) | ||
| 109 | ----------------------------------------------- | ||
| 110 | |||
| 111 | fimc0 256 | ||
| 112 | fimc1 257 | ||
| 113 | fimc2 258 | ||
| 114 | fimc3 259 | ||
| 115 | csis0 260 | ||
| 116 | csis1 261 | ||
| 117 | jpeg 262 | ||
| 118 | smmu_fimc0 263 | ||
| 119 | smmu_fimc1 264 | ||
| 120 | smmu_fimc2 265 | ||
| 121 | smmu_fimc3 266 | ||
| 122 | smmu_jpeg 267 | ||
| 123 | vp 268 | ||
| 124 | mixer 269 | ||
| 125 | tvenc 270 Exynos4210 | ||
| 126 | hdmi 271 | ||
| 127 | smmu_tv 272 | ||
| 128 | mfc 273 | ||
| 129 | smmu_mfcl 274 | ||
| 130 | smmu_mfcr 275 | ||
| 131 | g3d 276 | ||
| 132 | g2d 277 Exynos4210 | ||
| 133 | rotator 278 Exynos4210 | ||
| 134 | mdma 279 Exynos4210 | ||
| 135 | smmu_g2d 280 Exynos4210 | ||
| 136 | smmu_rotator 281 Exynos4210 | ||
| 137 | smmu_mdma 282 Exynos4210 | ||
| 138 | fimd0 283 | ||
| 139 | mie0 284 | ||
| 140 | mdnie0 285 Exynos4412 | ||
| 141 | dsim0 286 | ||
| 142 | smmu_fimd0 287 | ||
| 143 | fimd1 288 Exynos4210 | ||
| 144 | mie1 289 Exynos4210 | ||
| 145 | dsim1 290 Exynos4210 | ||
| 146 | smmu_fimd1 291 Exynos4210 | ||
| 147 | pdma0 292 | ||
| 148 | pdma1 293 | ||
| 149 | pcie_phy 294 | ||
| 150 | sata_phy 295 Exynos4210 | ||
| 151 | tsi 296 | ||
| 152 | sdmmc0 297 | ||
| 153 | sdmmc1 298 | ||
| 154 | sdmmc2 299 | ||
| 155 | sdmmc3 300 | ||
| 156 | sdmmc4 301 | ||
| 157 | sata 302 Exynos4210 | ||
| 158 | sromc 303 | ||
| 159 | usb_host 304 | ||
| 160 | usb_device 305 | ||
| 161 | pcie 306 | ||
| 162 | onenand 307 | ||
| 163 | nfcon 308 | ||
| 164 | smmu_pcie 309 | ||
| 165 | gps 310 | ||
| 166 | smmu_gps 311 | ||
| 167 | uart0 312 | ||
| 168 | uart1 313 | ||
| 169 | uart2 314 | ||
| 170 | uart3 315 | ||
| 171 | uart4 316 | ||
| 172 | i2c0 317 | ||
| 173 | i2c1 318 | ||
| 174 | i2c2 319 | ||
| 175 | i2c3 320 | ||
| 176 | i2c4 321 | ||
| 177 | i2c5 322 | ||
| 178 | i2c6 323 | ||
| 179 | i2c7 324 | ||
| 180 | i2c_hdmi 325 | ||
| 181 | tsadc 326 | ||
| 182 | spi0 327 | ||
| 183 | spi1 328 | ||
| 184 | spi2 329 | ||
| 185 | i2s1 330 | ||
| 186 | i2s2 331 | ||
| 187 | pcm0 332 | ||
| 188 | i2s0 333 | ||
| 189 | pcm1 334 | ||
| 190 | pcm2 335 | ||
| 191 | pwm 336 | ||
| 192 | slimbus 337 | ||
| 193 | spdif 338 | ||
| 194 | ac97 339 | ||
| 195 | modemif 340 | ||
| 196 | chipid 341 | ||
| 197 | sysreg 342 | ||
| 198 | hdmi_cec 343 | ||
| 199 | mct 344 | ||
| 200 | wdt 345 | ||
| 201 | rtc 346 | ||
| 202 | keyif 347 | ||
| 203 | audss 348 | ||
| 204 | mipi_hsi 349 Exynos4210 | ||
| 205 | mdma2 350 Exynos4210 | ||
| 206 | pixelasyncm0 351 | ||
| 207 | pixelasyncm1 352 | ||
| 208 | fimc_lite0 353 Exynos4x12 | ||
| 209 | fimc_lite1 354 Exynos4x12 | ||
| 210 | ppmuispx 355 Exynos4x12 | ||
| 211 | ppmuispmx 356 Exynos4x12 | ||
| 212 | fimc_isp 357 Exynos4x12 | ||
| 213 | fimc_drc 358 Exynos4x12 | ||
| 214 | fimc_fd 359 Exynos4x12 | ||
| 215 | mcuisp 360 Exynos4x12 | ||
| 216 | gicisp 361 Exynos4x12 | ||
| 217 | smmu_isp 362 Exynos4x12 | ||
| 218 | smmu_drc 363 Exynos4x12 | ||
| 219 | smmu_fd 364 Exynos4x12 | ||
| 220 | smmu_lite0 365 Exynos4x12 | ||
| 221 | smmu_lite1 366 Exynos4x12 | ||
| 222 | mcuctl_isp 367 Exynos4x12 | ||
| 223 | mpwm_isp 368 Exynos4x12 | ||
| 224 | i2c0_isp 369 Exynos4x12 | ||
| 225 | i2c1_isp 370 Exynos4x12 | ||
| 226 | mtcadc_isp 371 Exynos4x12 | ||
| 227 | pwm_isp 372 Exynos4x12 | ||
| 228 | wdt_isp 373 Exynos4x12 | ||
| 229 | uart_isp 374 Exynos4x12 | ||
| 230 | asyncaxim 375 Exynos4x12 | ||
| 231 | smmu_ispcx 376 Exynos4x12 | ||
| 232 | spi0_isp 377 Exynos4x12 | ||
| 233 | spi1_isp 378 Exynos4x12 | ||
| 234 | pwm_isp_sclk 379 Exynos4x12 | ||
| 235 | spi0_isp_sclk 380 Exynos4x12 | ||
| 236 | spi1_isp_sclk 381 Exynos4x12 | ||
| 237 | uart_isp_sclk 382 Exynos4x12 | ||
| 238 | |||
| 239 | [Mux Clocks] | ||
| 240 | |||
| 241 | Clock ID SoC (if specific) | ||
| 242 | ----------------------------------------------- | ||
| 243 | |||
| 244 | mout_fimc0 384 | ||
| 245 | mout_fimc1 385 | ||
| 246 | mout_fimc2 386 | ||
| 247 | mout_fimc3 387 | ||
| 248 | mout_cam0 388 | ||
| 249 | mout_cam1 389 | ||
| 250 | mout_csis0 390 | ||
| 251 | mout_csis1 391 | ||
| 252 | mout_g3d0 392 | ||
| 253 | mout_g3d1 393 | ||
| 254 | mout_g3d 394 | ||
| 255 | aclk400_mcuisp 395 Exynos4x12 | ||
| 256 | |||
| 257 | [Div Clocks] | ||
| 258 | |||
| 259 | Clock ID SoC (if specific) | ||
| 260 | ----------------------------------------------- | ||
| 261 | |||
| 262 | div_isp0 450 Exynos4x12 | ||
| 263 | div_isp1 451 Exynos4x12 | ||
| 264 | div_mcuisp0 452 Exynos4x12 | ||
| 265 | div_mcuisp1 453 Exynos4x12 | ||
| 266 | div_aclk200 454 Exynos4x12 | ||
| 267 | div_aclk400_mcuisp 455 Exynos4x12 | ||
| 268 | |||
| 269 | |||
| 270 | Example 1: An example of a clock controller node is listed below. | ||
| 271 | |||
| 272 | clock: clock-controller@0x10030000 { | ||
| 273 | compatible = "samsung,exynos4210-clock"; | ||
| 274 | reg = <0x10030000 0x20000>; | ||
| 275 | #clock-cells = <1>; | ||
| 276 | }; | ||
| 277 | |||
| 278 | Example 2: UART controller node that consumes the clock generated by the clock | ||
| 279 | controller. Refer to the standard clock bindings for information | ||
| 280 | about 'clocks' and 'clock-names' property. | ||
| 281 | |||
| 282 | serial@13820000 { | ||
| 283 | compatible = "samsung,exynos4210-uart"; | ||
| 284 | reg = <0x13820000 0x100>; | ||
| 285 | interrupts = <0 54 0>; | ||
| 286 | clocks = <&clock 314>, <&clock 153>; | ||
| 287 | clock-names = "uart", "clk_uart_baud0"; | ||
| 288 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/exynos5250-clock.txt b/Documentation/devicetree/bindings/clock/exynos5250-clock.txt new file mode 100644 index 000000000000..781a6276adf7 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/exynos5250-clock.txt | |||
| @@ -0,0 +1,177 @@ | |||
| 1 | * Samsung Exynos5250 Clock Controller | ||
| 2 | |||
| 3 | The Exynos5250 clock controller generates and supplies clock to various | ||
| 4 | controllers within the Exynos5250 SoC. | ||
| 5 | |||
| 6 | Required Properties: | ||
| 7 | |||
| 8 | - comptible: should be one of the following. | ||
| 9 | - "samsung,exynos5250-clock" - controller compatible with Exynos5250 SoC. | ||
| 10 | |||
| 11 | - reg: physical base address of the controller and length of memory mapped | ||
| 12 | region. | ||
| 13 | |||
| 14 | - #clock-cells: should be 1. | ||
| 15 | |||
| 16 | The following is the list of clocks generated by the controller. Each clock is | ||
| 17 | assigned an identifier and client nodes use this identifier to specify the | ||
| 18 | clock which they consume. | ||
| 19 | |||
| 20 | |||
| 21 | [Core Clocks] | ||
| 22 | |||
| 23 | Clock ID | ||
| 24 | ---------------------------- | ||
| 25 | |||
| 26 | fin_pll 1 | ||
| 27 | |||
| 28 | [Clock Gate for Special Clocks] | ||
| 29 | |||
| 30 | Clock ID | ||
| 31 | ---------------------------- | ||
| 32 | |||
| 33 | sclk_cam_bayer 128 | ||
| 34 | sclk_cam0 129 | ||
| 35 | sclk_cam1 130 | ||
| 36 | sclk_gscl_wa 131 | ||
| 37 | sclk_gscl_wb 132 | ||
| 38 | sclk_fimd1 133 | ||
| 39 | sclk_mipi1 134 | ||
| 40 | sclk_dp 135 | ||
| 41 | sclk_hdmi 136 | ||
| 42 | sclk_pixel 137 | ||
| 43 | sclk_audio0 138 | ||
| 44 | sclk_mmc0 139 | ||
| 45 | sclk_mmc1 140 | ||
| 46 | sclk_mmc2 141 | ||
| 47 | sclk_mmc3 142 | ||
| 48 | sclk_sata 143 | ||
| 49 | sclk_usb3 144 | ||
| 50 | sclk_jpeg 145 | ||
| 51 | sclk_uart0 146 | ||
| 52 | sclk_uart1 147 | ||
| 53 | sclk_uart2 148 | ||
| 54 | sclk_uart3 149 | ||
| 55 | sclk_pwm 150 | ||
| 56 | sclk_audio1 151 | ||
| 57 | sclk_audio2 152 | ||
| 58 | sclk_spdif 153 | ||
| 59 | sclk_spi0 154 | ||
| 60 | sclk_spi1 155 | ||
| 61 | sclk_spi2 156 | ||
| 62 | |||
| 63 | |||
| 64 | [Peripheral Clock Gates] | ||
| 65 | |||
| 66 | Clock ID | ||
| 67 | ---------------------------- | ||
| 68 | |||
| 69 | gscl0 256 | ||
| 70 | gscl1 257 | ||
| 71 | gscl2 258 | ||
| 72 | gscl3 259 | ||
| 73 | gscl_wa 260 | ||
| 74 | gscl_wb 261 | ||
| 75 | smmu_gscl0 262 | ||
| 76 | smmu_gscl1 263 | ||
| 77 | smmu_gscl2 264 | ||
| 78 | smmu_gscl3 265 | ||
| 79 | mfc 266 | ||
| 80 | smmu_mfcl 267 | ||
| 81 | smmu_mfcr 268 | ||
| 82 | rotator 269 | ||
| 83 | jpeg 270 | ||
| 84 | mdma1 271 | ||
| 85 | smmu_rotator 272 | ||
| 86 | smmu_jpeg 273 | ||
| 87 | smmu_mdma1 274 | ||
| 88 | pdma0 275 | ||
| 89 | pdma1 276 | ||
| 90 | sata 277 | ||
| 91 | usbotg 278 | ||
| 92 | mipi_hsi 279 | ||
| 93 | sdmmc0 280 | ||
| 94 | sdmmc1 281 | ||
| 95 | sdmmc2 282 | ||
| 96 | sdmmc3 283 | ||
| 97 | sromc 284 | ||
| 98 | usb2 285 | ||
| 99 | usb3 286 | ||
| 100 | sata_phyctrl 287 | ||
| 101 | sata_phyi2c 288 | ||
| 102 | uart0 289 | ||
| 103 | uart1 290 | ||
| 104 | uart2 291 | ||
| 105 | uart3 292 | ||
| 106 | uart4 293 | ||
| 107 | i2c0 294 | ||
| 108 | i2c1 295 | ||
| 109 | i2c2 296 | ||
| 110 | i2c3 297 | ||
| 111 | i2c4 298 | ||
| 112 | i2c5 299 | ||
| 113 | i2c6 300 | ||
| 114 | i2c7 301 | ||
| 115 | i2c_hdmi 302 | ||
| 116 | adc 303 | ||
| 117 | spi0 304 | ||
| 118 | spi1 305 | ||
| 119 | spi2 306 | ||
| 120 | i2s1 307 | ||
| 121 | i2s2 308 | ||
| 122 | pcm1 309 | ||
| 123 | pcm2 310 | ||
| 124 | pwm 311 | ||
| 125 | spdif 312 | ||
| 126 | ac97 313 | ||
| 127 | hsi2c0 314 | ||
| 128 | hsi2c1 315 | ||
| 129 | hs12c2 316 | ||
| 130 | hs12c3 317 | ||
| 131 | chipid 318 | ||
| 132 | sysreg 319 | ||
| 133 | pmu 320 | ||
| 134 | cmu_top 321 | ||
| 135 | cmu_core 322 | ||
| 136 | cmu_mem 323 | ||
| 137 | tzpc0 324 | ||
| 138 | tzpc1 325 | ||
| 139 | tzpc2 326 | ||
| 140 | tzpc3 327 | ||
| 141 | tzpc4 328 | ||
| 142 | tzpc5 329 | ||
| 143 | tzpc6 330 | ||
| 144 | tzpc7 331 | ||
| 145 | tzpc8 332 | ||
| 146 | tzpc9 333 | ||
| 147 | hdmi_cec 334 | ||
| 148 | mct 335 | ||
| 149 | wdt 336 | ||
| 150 | rtc 337 | ||
| 151 | tmu 338 | ||
| 152 | fimd1 339 | ||
| 153 | mie1 340 | ||
| 154 | dsim0 341 | ||
| 155 | dp 342 | ||
| 156 | mixer 343 | ||
| 157 | hdmi 345 | ||
| 158 | |||
| 159 | Example 1: An example of a clock controller node is listed below. | ||
| 160 | |||
| 161 | clock: clock-controller@0x10010000 { | ||
| 162 | compatible = "samsung,exynos5250-clock"; | ||
| 163 | reg = <0x10010000 0x30000>; | ||
| 164 | #clock-cells = <1>; | ||
| 165 | }; | ||
| 166 | |||
| 167 | Example 2: UART controller node that consumes the clock generated by the clock | ||
| 168 | controller. Refer to the standard clock bindings for information | ||
| 169 | about 'clocks' and 'clock-names' property. | ||
| 170 | |||
| 171 | serial@13820000 { | ||
| 172 | compatible = "samsung,exynos4210-uart"; | ||
| 173 | reg = <0x13820000 0x100>; | ||
| 174 | interrupts = <0 54 0>; | ||
| 175 | clocks = <&clock 314>, <&clock 153>; | ||
| 176 | clock-names = "uart", "clk_uart_baud0"; | ||
| 177 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/exynos5440-clock.txt b/Documentation/devicetree/bindings/clock/exynos5440-clock.txt new file mode 100644 index 000000000000..4499e9966bc9 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/exynos5440-clock.txt | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | * Samsung Exynos5440 Clock Controller | ||
| 2 | |||
| 3 | The Exynos5440 clock controller generates and supplies clock to various | ||
| 4 | controllers within the Exynos5440 SoC. | ||
| 5 | |||
| 6 | Required Properties: | ||
| 7 | |||
| 8 | - comptible: should be "samsung,exynos5440-clock". | ||
| 9 | |||
| 10 | - reg: physical base address of the controller and length of memory mapped | ||
| 11 | region. | ||
| 12 | |||
| 13 | - #clock-cells: should be 1. | ||
| 14 | |||
| 15 | The following is the list of clocks generated by the controller. Each clock is | ||
| 16 | assigned an identifier and client nodes use this identifier to specify the | ||
| 17 | clock which they consume. | ||
| 18 | |||
| 19 | |||
| 20 | [Core Clocks] | ||
| 21 | |||
| 22 | Clock ID | ||
| 23 | ---------------------------- | ||
| 24 | |||
| 25 | xtal 1 | ||
| 26 | arm_clk 2 | ||
| 27 | |||
| 28 | [Peripheral Clock Gates] | ||
| 29 | |||
| 30 | Clock ID | ||
| 31 | ---------------------------- | ||
| 32 | |||
| 33 | spi_baud 16 | ||
| 34 | pb0_250 17 | ||
| 35 | pr0_250 18 | ||
| 36 | pr1_250 19 | ||
| 37 | b_250 20 | ||
| 38 | b_125 21 | ||
| 39 | b_200 22 | ||
| 40 | sata 23 | ||
| 41 | usb 24 | ||
| 42 | gmac0 25 | ||
| 43 | cs250 26 | ||
| 44 | pb0_250_o 27 | ||
| 45 | pr0_250_o 28 | ||
| 46 | pr1_250_o 29 | ||
| 47 | b_250_o 30 | ||
| 48 | b_125_o 31 | ||
| 49 | b_200_o 32 | ||
| 50 | sata_o 33 | ||
| 51 | usb_o 34 | ||
| 52 | gmac0_o 35 | ||
| 53 | cs250_o 36 | ||
| 54 | |||
| 55 | Example: An example of a clock controller node is listed below. | ||
| 56 | |||
| 57 | clock: clock-controller@0x10010000 { | ||
| 58 | compatible = "samsung,exynos5440-clock"; | ||
| 59 | reg = <0x160000 0x10000>; | ||
| 60 | #clock-cells = <1>; | ||
| 61 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpu/samsung-g2d.txt b/Documentation/devicetree/bindings/gpu/samsung-g2d.txt new file mode 100644 index 000000000000..2b14a940eb75 --- /dev/null +++ b/Documentation/devicetree/bindings/gpu/samsung-g2d.txt | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | * Samsung 2D Graphics Accelerator | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : value should be one among the following: | ||
| 5 | (a) "samsung,s5pv210-g2d" for G2D IP present in S5PV210 & Exynos4210 SoC | ||
| 6 | (b) "samsung,exynos4212-g2d" for G2D IP present in Exynos4x12 SoCs | ||
| 7 | (c) "samsung,exynos5250-g2d" for G2D IP present in Exynos5250 SoC | ||
| 8 | |||
| 9 | - reg : Physical base address of the IP registers and length of memory | ||
| 10 | mapped region. | ||
| 11 | |||
| 12 | - interrupts : G2D interrupt number to the CPU. | ||
| 13 | |||
| 14 | Example: | ||
| 15 | g2d@12800000 { | ||
| 16 | compatible = "samsung,s5pv210-g2d"; | ||
| 17 | reg = <0x12800000 0x1000>; | ||
| 18 | interrupts = <0 89 0>; | ||
| 19 | status = "disabled"; | ||
| 20 | }; | ||
diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt index 67ec3d4ccc7f..bf0182d8da25 100644 --- a/Documentation/devicetree/bindings/media/s5p-mfc.txt +++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt | |||
| @@ -21,3 +21,24 @@ Required properties: | |||
| 21 | 21 | ||
| 22 | - samsung,mfc-l : Base address of the second memory bank used by MFC | 22 | - samsung,mfc-l : Base address of the second memory bank used by MFC |
| 23 | for DMA contiguous memory allocation and its size. | 23 | for DMA contiguous memory allocation and its size. |
| 24 | |||
| 25 | Optional properties: | ||
| 26 | - samsung,power-domain : power-domain property defined with a phandle | ||
| 27 | to respective power domain. | ||
| 28 | |||
| 29 | Example: | ||
| 30 | SoC specific DT entry: | ||
| 31 | |||
| 32 | mfc: codec@13400000 { | ||
| 33 | compatible = "samsung,mfc-v5"; | ||
| 34 | reg = <0x13400000 0x10000>; | ||
| 35 | interrupts = <0 94 0>; | ||
| 36 | samsung,power-domain = <&pd_mfc>; | ||
| 37 | }; | ||
| 38 | |||
| 39 | Board specific DT entry: | ||
| 40 | |||
| 41 | codec@13400000 { | ||
| 42 | samsung,mfc-r = <0x43000000 0x800000>; | ||
| 43 | samsung,mfc-l = <0x51000000 0x800000>; | ||
| 44 | }; | ||
diff --git a/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.txt b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.txt new file mode 100644 index 000000000000..cb47bfbcaeea --- /dev/null +++ b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.txt | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | Samsung's Multi Core Timer (MCT) | ||
| 2 | |||
| 3 | The Samsung's Multi Core Timer (MCT) module includes two main blocks, the | ||
| 4 | global timer and CPU local timers. The global timer is a 64-bit free running | ||
| 5 | up-counter and can generate 4 interrupts when the counter reaches one of the | ||
| 6 | four preset counter values. The CPU local timers are 32-bit free running | ||
| 7 | down-counters and generate an interrupt when the counter expires. There is | ||
| 8 | one CPU local timer instantiated in MCT for every CPU in the system. | ||
| 9 | |||
| 10 | Required properties: | ||
| 11 | |||
| 12 | - compatible: should be "samsung,exynos4210-mct". | ||
| 13 | (a) "samsung,exynos4210-mct", for mct compatible with Exynos4210 mct. | ||
| 14 | (b) "samsung,exynos4412-mct", for mct compatible with Exynos4412 mct. | ||
| 15 | |||
| 16 | - reg: base address of the mct controller and length of the address space | ||
| 17 | it occupies. | ||
| 18 | |||
| 19 | - interrupts: the list of interrupts generated by the controller. The following | ||
| 20 | should be the order of the interrupts specified. The local timer interrupts | ||
| 21 | should be specified after the four global timer interrupts have been | ||
| 22 | specified. | ||
| 23 | |||
| 24 | 0: Global Timer Interrupt 0 | ||
| 25 | 1: Global Timer Interrupt 1 | ||
| 26 | 2: Global Timer Interrupt 2 | ||
| 27 | 3: Global Timer Interrupt 3 | ||
| 28 | 4: Local Timer Interrupt 0 | ||
| 29 | 5: Local Timer Interrupt 1 | ||
| 30 | 6: .. | ||
| 31 | 7: .. | ||
| 32 | i: Local Timer Interrupt n | ||
| 33 | |||
| 34 | Example 1: In this example, the system uses only the first global timer | ||
| 35 | interrupt generated by MCT and the remaining three global timer | ||
| 36 | interrupts are unused. Two local timer interrupts have been | ||
| 37 | specified. | ||
| 38 | |||
| 39 | mct@10050000 { | ||
| 40 | compatible = "samsung,exynos4210-mct"; | ||
| 41 | reg = <0x10050000 0x800>; | ||
| 42 | interrupts = <0 57 0>, <0 0 0>, <0 0 0>, <0 0 0>, | ||
| 43 | <0 42 0>, <0 48 0>; | ||
| 44 | }; | ||
| 45 | |||
| 46 | Example 2: In this example, the MCT global and local timer interrupts are | ||
| 47 | connected to two seperate interrupt controllers. Hence, an | ||
| 48 | interrupt-map is created to map the interrupts to the respective | ||
| 49 | interrupt controllers. | ||
| 50 | |||
| 51 | mct@101C0000 { | ||
| 52 | compatible = "samsung,exynos4210-mct"; | ||
| 53 | reg = <0x101C0000 0x800>; | ||
| 54 | interrupt-controller; | ||
| 55 | #interrups-cells = <2>; | ||
| 56 | interrupt-parent = <&mct_map>; | ||
| 57 | interrupts = <0 0>, <1 0>, <2 0>, <3 0>, | ||
| 58 | <4 0>, <5 0>; | ||
| 59 | |||
| 60 | mct_map: mct-map { | ||
| 61 | #interrupt-cells = <2>; | ||
| 62 | #address-cells = <0>; | ||
| 63 | #size-cells = <0>; | ||
| 64 | interrupt-map = <0x0 0 &combiner 23 3>, | ||
| 65 | <0x4 0 &gic 0 120 0>, | ||
| 66 | <0x5 0 &gic 0 121 0>; | ||
| 67 | }; | ||
| 68 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/exynos-usb.txt b/Documentation/devicetree/bindings/usb/exynos-usb.txt new file mode 100644 index 000000000000..b3abde736017 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/exynos-usb.txt | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | Samsung Exynos SoC USB controller | ||
| 2 | |||
| 3 | The USB devices interface with USB controllers on Exynos SOCs. | ||
| 4 | The device node has following properties. | ||
| 5 | |||
| 6 | EHCI | ||
| 7 | Required properties: | ||
| 8 | - compatible: should be "samsung,exynos4210-ehci" for USB 2.0 | ||
| 9 | EHCI controller in host mode. | ||
| 10 | - reg: physical base address of the controller and length of memory mapped | ||
| 11 | region. | ||
| 12 | - interrupts: interrupt number to the cpu. | ||
| 13 | - clocks: from common clock binding: handle to usb clock. | ||
| 14 | - clock-names: from common clock binding: Shall be "usbhost". | ||
| 15 | |||
| 16 | Optional properties: | ||
| 17 | - samsung,vbus-gpio: if present, specifies the GPIO that | ||
| 18 | needs to be pulled up for the bus to be powered. | ||
| 19 | |||
| 20 | Example: | ||
| 21 | |||
| 22 | usb@12110000 { | ||
| 23 | compatible = "samsung,exynos4210-ehci"; | ||
| 24 | reg = <0x12110000 0x100>; | ||
| 25 | interrupts = <0 71 0>; | ||
| 26 | samsung,vbus-gpio = <&gpx2 6 1 3 3>; | ||
| 27 | |||
| 28 | clocks = <&clock 285>; | ||
| 29 | clock-names = "usbhost"; | ||
| 30 | }; | ||
| 31 | |||
| 32 | OHCI | ||
| 33 | Required properties: | ||
| 34 | - compatible: should be "samsung,exynos4210-ohci" for USB 2.0 | ||
| 35 | OHCI companion controller in host mode. | ||
| 36 | - reg: physical base address of the controller and length of memory mapped | ||
| 37 | region. | ||
| 38 | - interrupts: interrupt number to the cpu. | ||
| 39 | - clocks: from common clock binding: handle to usb clock. | ||
| 40 | - clock-names: from common clock binding: Shall be "usbhost". | ||
| 41 | |||
| 42 | Example: | ||
| 43 | usb@12120000 { | ||
| 44 | compatible = "samsung,exynos4210-ohci"; | ||
| 45 | reg = <0x12120000 0x100>; | ||
| 46 | interrupts = <0 71 0>; | ||
| 47 | |||
| 48 | clocks = <&clock 285>; | ||
| 49 | clock-names = "usbhost"; | ||
| 50 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/samsung-fimd.txt b/Documentation/devicetree/bindings/video/samsung-fimd.txt new file mode 100644 index 000000000000..778838a0336a --- /dev/null +++ b/Documentation/devicetree/bindings/video/samsung-fimd.txt | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | Device-Tree bindings for Samsung SoC display controller (FIMD) | ||
| 2 | |||
| 3 | FIMD (Fully Interactive Mobile Display) is the Display Controller for the | ||
| 4 | Samsung series of SoCs which transfers the image data from a video memory | ||
| 5 | buffer to an external LCD interface. | ||
| 6 | |||
| 7 | Required properties: | ||
| 8 | - compatible: value should be one of the following | ||
| 9 | "samsung,s3c2443-fimd"; /* for S3C24XX SoCs */ | ||
| 10 | "samsung,s3c6400-fimd"; /* for S3C64XX SoCs */ | ||
| 11 | "samsung,s5p6440-fimd"; /* for S5P64X0 SoCs */ | ||
| 12 | "samsung,s5pc100-fimd"; /* for S5PC100 SoC */ | ||
| 13 | "samsung,s5pv210-fimd"; /* for S5PV210 SoC */ | ||
| 14 | "samsung,exynos4210-fimd"; /* for Exynos4 SoCs */ | ||
| 15 | "samsung,exynos5250-fimd"; /* for Exynos5 SoCs */ | ||
| 16 | |||
| 17 | - reg: physical base address and length of the FIMD registers set. | ||
| 18 | |||
| 19 | - interrupt-parent: should be the phandle of the fimd controller's | ||
| 20 | parent interrupt controller. | ||
| 21 | |||
| 22 | - interrupts: should contain a list of all FIMD IP block interrupts in the | ||
| 23 | order: FIFO Level, VSYNC, LCD_SYSTEM. The interrupt specifier | ||
| 24 | format depends on the interrupt controller used. | ||
| 25 | |||
| 26 | - interrupt-names: should contain the interrupt names: "fifo", "vsync", | ||
| 27 | "lcd_sys", in the same order as they were listed in the interrupts | ||
| 28 | property. | ||
| 29 | |||
| 30 | - pinctrl-0: pin control group to be used for this controller. | ||
| 31 | |||
| 32 | - pinctrl-names: must contain a "default" entry. | ||
| 33 | |||
| 34 | - clocks: must include clock specifiers corresponding to entries in the | ||
| 35 | clock-names property. | ||
| 36 | |||
| 37 | - clock-names: list of clock names sorted in the same order as the clocks | ||
| 38 | property. Must contain "sclk_fimd" and "fimd". | ||
| 39 | |||
| 40 | Optional Properties: | ||
| 41 | - samsung,power-domain: a phandle to FIMD power domain node. | ||
| 42 | |||
| 43 | Example: | ||
| 44 | |||
| 45 | SoC specific DT entry: | ||
| 46 | |||
| 47 | fimd@11c00000 { | ||
| 48 | compatible = "samsung,exynos4210-fimd"; | ||
| 49 | interrupt-parent = <&combiner>; | ||
| 50 | reg = <0x11c00000 0x20000>; | ||
| 51 | interrupt-names = "fifo", "vsync", "lcd_sys"; | ||
| 52 | interrupts = <11 0>, <11 1>, <11 2>; | ||
| 53 | clocks = <&clock 140>, <&clock 283>; | ||
| 54 | clock-names = "sclk_fimd", "fimd"; | ||
| 55 | samsung,power-domain = <&pd_lcd0>; | ||
| 56 | status = "disabled"; | ||
| 57 | }; | ||
| 58 | |||
| 59 | Board specific DT entry: | ||
| 60 | |||
| 61 | fimd@11c00000 { | ||
| 62 | pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>; | ||
| 63 | pinctrl-names = "default"; | ||
| 64 | status = "okay"; | ||
| 65 | }; | ||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 318c1f928920..135dff88e882 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -772,8 +772,10 @@ config ARCH_SA1100 | |||
| 772 | config ARCH_S3C24XX | 772 | config ARCH_S3C24XX |
| 773 | bool "Samsung S3C24XX SoCs" | 773 | bool "Samsung S3C24XX SoCs" |
| 774 | select ARCH_HAS_CPUFREQ | 774 | select ARCH_HAS_CPUFREQ |
| 775 | select ARCH_USES_GETTIMEOFFSET | ||
| 776 | select CLKDEV_LOOKUP | 775 | select CLKDEV_LOOKUP |
| 776 | select CLKSRC_MMIO | ||
| 777 | select GENERIC_CLOCKEVENTS | ||
| 778 | select GENERIC_GPIO | ||
| 777 | select HAVE_CLK | 779 | select HAVE_CLK |
| 778 | select HAVE_S3C2410_I2C if I2C | 780 | select HAVE_S3C2410_I2C if I2C |
| 779 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 781 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
| @@ -790,10 +792,11 @@ config ARCH_S3C64XX | |||
| 790 | bool "Samsung S3C64XX" | 792 | bool "Samsung S3C64XX" |
| 791 | select ARCH_HAS_CPUFREQ | 793 | select ARCH_HAS_CPUFREQ |
| 792 | select ARCH_REQUIRE_GPIOLIB | 794 | select ARCH_REQUIRE_GPIOLIB |
| 793 | select ARCH_USES_GETTIMEOFFSET | ||
| 794 | select ARM_VIC | 795 | select ARM_VIC |
| 795 | select CLKDEV_LOOKUP | 796 | select CLKDEV_LOOKUP |
| 797 | select CLKSRC_MMIO | ||
| 796 | select CPU_V6 | 798 | select CPU_V6 |
| 799 | select GENERIC_CLOCKEVENTS | ||
| 797 | select HAVE_CLK | 800 | select HAVE_CLK |
| 798 | select HAVE_S3C2410_I2C if I2C | 801 | select HAVE_S3C2410_I2C if I2C |
| 799 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 802 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
| @@ -827,9 +830,11 @@ config ARCH_S5P64X0 | |||
| 827 | 830 | ||
| 828 | config ARCH_S5PC100 | 831 | config ARCH_S5PC100 |
| 829 | bool "Samsung S5PC100" | 832 | bool "Samsung S5PC100" |
| 830 | select ARCH_USES_GETTIMEOFFSET | ||
| 831 | select CLKDEV_LOOKUP | 833 | select CLKDEV_LOOKUP |
| 834 | select CLKSRC_MMIO | ||
| 832 | select CPU_V7 | 835 | select CPU_V7 |
| 836 | select GENERIC_CLOCKEVENTS | ||
| 837 | select GENERIC_GPIO | ||
| 833 | select HAVE_CLK | 838 | select HAVE_CLK |
| 834 | select HAVE_S3C2410_I2C if I2C | 839 | select HAVE_S3C2410_I2C if I2C |
| 835 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 840 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
| @@ -862,6 +867,7 @@ config ARCH_EXYNOS | |||
| 862 | select ARCH_HAS_HOLES_MEMORYMODEL | 867 | select ARCH_HAS_HOLES_MEMORYMODEL |
| 863 | select ARCH_SPARSEMEM_ENABLE | 868 | select ARCH_SPARSEMEM_ENABLE |
| 864 | select CLKDEV_LOOKUP | 869 | select CLKDEV_LOOKUP |
| 870 | select COMMON_CLK | ||
| 865 | select CPU_V7 | 871 | select CPU_V7 |
| 866 | select GENERIC_CLOCKEVENTS | 872 | select GENERIC_CLOCKEVENTS |
| 867 | select HAVE_CLK | 873 | select HAVE_CLK |
| @@ -1650,7 +1656,7 @@ config LOCAL_TIMERS | |||
| 1650 | bool "Use local timer interrupts" | 1656 | bool "Use local timer interrupts" |
| 1651 | depends on SMP | 1657 | depends on SMP |
| 1652 | default y | 1658 | default y |
| 1653 | select HAVE_ARM_TWD if (!ARCH_MSM_SCORPIONMP && !EXYNOS4_MCT) | 1659 | select HAVE_ARM_TWD if (!ARCH_MSM_SCORPIONMP && !CLKSRC_EXYNOS_MCT) |
| 1654 | help | 1660 | help |
| 1655 | Enable support for local timers on SMP platforms, rather then the | 1661 | Enable support for local timers on SMP platforms, rather then the |
| 1656 | legacy IPI broadcast method. Local timers allows the system | 1662 | legacy IPI broadcast method. Local timers allows the system |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index f4c2dde779ba..6cecf1437ea0 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
| @@ -42,7 +42,11 @@ dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ | |||
| 42 | dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ | 42 | dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \ |
| 43 | exynos4210-smdkv310.dtb \ | 43 | exynos4210-smdkv310.dtb \ |
| 44 | exynos4210-trats.dtb \ | 44 | exynos4210-trats.dtb \ |
| 45 | exynos4412-odroidx.dtb \ | ||
| 45 | exynos4412-smdk4412.dtb \ | 46 | exynos4412-smdk4412.dtb \ |
| 47 | exynos4412-origen.dtb \ | ||
| 48 | exynos5250-arndale.dtb \ | ||
| 49 | exynos5440-sd5v1.dtb \ | ||
| 46 | exynos5250-smdk5250.dtb \ | 50 | exynos5250-smdk5250.dtb \ |
| 47 | exynos5250-snow.dtb \ | 51 | exynos5250-snow.dtb \ |
| 48 | exynos5440-ssdk5440.dtb | 52 | exynos5440-ssdk5440.dtb |
diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi index 46c098017036..8a5b3a6cdc58 100644 --- a/arch/arm/boot/dts/cros5250-common.dtsi +++ b/arch/arm/boot/dts/cros5250-common.dtsi | |||
| @@ -19,31 +19,168 @@ | |||
| 19 | chosen { | 19 | chosen { |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | pinctrl@11400000 { | ||
| 23 | /* | ||
| 24 | * Disabled pullups since external part has its own pullups and | ||
| 25 | * double-pulling gets us out of spec in some cases. | ||
| 26 | */ | ||
| 27 | i2c2_bus: i2c2-bus { | ||
| 28 | samsung,pin-pud = <0>; | ||
| 29 | }; | ||
| 30 | }; | ||
| 31 | |||
| 22 | i2c@12C60000 { | 32 | i2c@12C60000 { |
| 23 | samsung,i2c-sda-delay = <100>; | 33 | samsung,i2c-sda-delay = <100>; |
| 24 | samsung,i2c-max-bus-freq = <378000>; | 34 | samsung,i2c-max-bus-freq = <378000>; |
| 25 | gpios = <&gpb3 0 2 3 0>, | 35 | |
| 26 | <&gpb3 1 2 3 0>; | 36 | max77686@09 { |
| 37 | compatible = "maxim,max77686"; | ||
| 38 | reg = <0x09>; | ||
| 39 | |||
| 40 | voltage-regulators { | ||
| 41 | ldo1_reg: LDO1 { | ||
| 42 | regulator-name = "P1.0V_LDO_OUT1"; | ||
| 43 | regulator-min-microvolt = <1000000>; | ||
| 44 | regulator-max-microvolt = <1000000>; | ||
| 45 | regulator-always-on; | ||
| 46 | }; | ||
| 47 | |||
| 48 | ldo2_reg: LDO2 { | ||
| 49 | regulator-name = "P1.8V_LDO_OUT2"; | ||
| 50 | regulator-min-microvolt = <1800000>; | ||
| 51 | regulator-max-microvolt = <1800000>; | ||
| 52 | regulator-always-on; | ||
| 53 | }; | ||
| 54 | |||
| 55 | ldo3_reg: LDO3 { | ||
| 56 | regulator-name = "P1.8V_LDO_OUT3"; | ||
| 57 | regulator-min-microvolt = <1800000>; | ||
| 58 | regulator-max-microvolt = <1800000>; | ||
| 59 | regulator-always-on; | ||
| 60 | }; | ||
| 61 | |||
| 62 | ldo7_reg: LDO7 { | ||
| 63 | regulator-name = "P1.1V_LDO_OUT7"; | ||
| 64 | regulator-min-microvolt = <1100000>; | ||
| 65 | regulator-max-microvolt = <1100000>; | ||
| 66 | regulator-always-on; | ||
| 67 | }; | ||
| 68 | |||
| 69 | ldo8_reg: LDO8 { | ||
| 70 | regulator-name = "P1.0V_LDO_OUT8"; | ||
| 71 | regulator-min-microvolt = <1000000>; | ||
| 72 | regulator-max-microvolt = <1000000>; | ||
| 73 | regulator-always-on; | ||
| 74 | }; | ||
| 75 | |||
| 76 | ldo10_reg: LDO10 { | ||
| 77 | regulator-name = "P1.8V_LDO_OUT10"; | ||
| 78 | regulator-min-microvolt = <1800000>; | ||
| 79 | regulator-max-microvolt = <1800000>; | ||
| 80 | regulator-always-on; | ||
| 81 | }; | ||
| 82 | |||
| 83 | ldo12_reg: LDO12 { | ||
| 84 | regulator-name = "P3.0V_LDO_OUT12"; | ||
| 85 | regulator-min-microvolt = <3000000>; | ||
| 86 | regulator-max-microvolt = <3000000>; | ||
| 87 | regulator-always-on; | ||
| 88 | }; | ||
| 89 | |||
| 90 | ldo14_reg: LDO14 { | ||
| 91 | regulator-name = "P1.8V_LDO_OUT14"; | ||
| 92 | regulator-min-microvolt = <1800000>; | ||
| 93 | regulator-max-microvolt = <1800000>; | ||
| 94 | regulator-always-on; | ||
| 95 | }; | ||
| 96 | |||
| 97 | ldo15_reg: LDO15 { | ||
| 98 | regulator-name = "P1.0V_LDO_OUT15"; | ||
| 99 | regulator-min-microvolt = <1000000>; | ||
| 100 | regulator-max-microvolt = <1000000>; | ||
| 101 | regulator-always-on; | ||
| 102 | }; | ||
| 103 | |||
| 104 | ldo16_reg: LDO16 { | ||
| 105 | regulator-name = "P1.8V_LDO_OUT16"; | ||
| 106 | regulator-min-microvolt = <1800000>; | ||
| 107 | regulator-max-microvolt = <1800000>; | ||
| 108 | regulator-always-on; | ||
| 109 | }; | ||
| 110 | |||
| 111 | buck1_reg: BUCK1 { | ||
| 112 | regulator-name = "vdd_mif"; | ||
| 113 | regulator-min-microvolt = <950000>; | ||
| 114 | regulator-max-microvolt = <1300000>; | ||
| 115 | regulator-always-on; | ||
| 116 | regulator-boot-on; | ||
| 117 | }; | ||
| 118 | |||
| 119 | buck2_reg: BUCK2 { | ||
| 120 | regulator-name = "vdd_arm"; | ||
| 121 | regulator-min-microvolt = <850000>; | ||
| 122 | regulator-max-microvolt = <1350000>; | ||
| 123 | regulator-always-on; | ||
| 124 | regulator-boot-on; | ||
| 125 | }; | ||
| 126 | |||
| 127 | buck3_reg: BUCK3 { | ||
| 128 | regulator-name = "vdd_int"; | ||
| 129 | regulator-min-microvolt = <900000>; | ||
| 130 | regulator-max-microvolt = <1200000>; | ||
| 131 | regulator-always-on; | ||
| 132 | regulator-boot-on; | ||
| 133 | }; | ||
| 134 | |||
| 135 | buck4_reg: BUCK4 { | ||
| 136 | regulator-name = "vdd_g3d"; | ||
| 137 | regulator-min-microvolt = <850000>; | ||
| 138 | regulator-max-microvolt = <1300000>; | ||
| 139 | regulator-always-on; | ||
| 140 | regulator-boot-on; | ||
| 141 | }; | ||
| 142 | |||
| 143 | buck5_reg: BUCK5 { | ||
| 144 | regulator-name = "P1.8V_BUCK_OUT5"; | ||
| 145 | regulator-min-microvolt = <1800000>; | ||
| 146 | regulator-max-microvolt = <1800000>; | ||
| 147 | regulator-always-on; | ||
| 148 | regulator-boot-on; | ||
| 149 | }; | ||
| 150 | |||
| 151 | buck6_reg: BUCK6 { | ||
| 152 | regulator-name = "P1.35V_BUCK_OUT6"; | ||
| 153 | regulator-min-microvolt = <1350000>; | ||
| 154 | regulator-max-microvolt = <1350000>; | ||
| 155 | regulator-always-on; | ||
| 156 | }; | ||
| 157 | |||
| 158 | buck7_reg: BUCK7 { | ||
| 159 | regulator-name = "P2.0V_BUCK_OUT7"; | ||
| 160 | regulator-min-microvolt = <2000000>; | ||
| 161 | regulator-max-microvolt = <2000000>; | ||
| 162 | regulator-always-on; | ||
| 163 | }; | ||
| 164 | |||
| 165 | buck8_reg: BUCK8 { | ||
| 166 | regulator-name = "P2.85V_BUCK_OUT8"; | ||
| 167 | regulator-min-microvolt = <2850000>; | ||
| 168 | regulator-max-microvolt = <2850000>; | ||
| 169 | regulator-always-on; | ||
| 170 | }; | ||
| 171 | }; | ||
| 172 | }; | ||
| 27 | }; | 173 | }; |
| 28 | 174 | ||
| 29 | i2c@12C70000 { | 175 | i2c@12C70000 { |
| 30 | samsung,i2c-sda-delay = <100>; | 176 | samsung,i2c-sda-delay = <100>; |
| 31 | samsung,i2c-max-bus-freq = <378000>; | 177 | samsung,i2c-max-bus-freq = <378000>; |
| 32 | gpios = <&gpb3 2 2 3 0>, | ||
| 33 | <&gpb3 3 2 3 0>; | ||
| 34 | }; | 178 | }; |
| 35 | 179 | ||
| 36 | i2c@12C80000 { | 180 | i2c@12C80000 { |
| 37 | samsung,i2c-sda-delay = <100>; | 181 | samsung,i2c-sda-delay = <100>; |
| 38 | samsung,i2c-max-bus-freq = <66000>; | 182 | samsung,i2c-max-bus-freq = <66000>; |
| 39 | 183 | ||
| 40 | /* | ||
| 41 | * Disabled pullups since external part has its own pullups and | ||
| 42 | * double-pulling gets us out of spec in some cases. | ||
| 43 | */ | ||
| 44 | gpios = <&gpa0 6 3 0 0>, | ||
| 45 | <&gpa0 7 3 0 0>; | ||
| 46 | |||
| 47 | hdmiddc@50 { | 184 | hdmiddc@50 { |
| 48 | compatible = "samsung,exynos5-hdmiddc"; | 185 | compatible = "samsung,exynos5-hdmiddc"; |
| 49 | reg = <0x50>; | 186 | reg = <0x50>; |
| @@ -53,8 +190,6 @@ | |||
| 53 | i2c@12C90000 { | 190 | i2c@12C90000 { |
| 54 | samsung,i2c-sda-delay = <100>; | 191 | samsung,i2c-sda-delay = <100>; |
| 55 | samsung,i2c-max-bus-freq = <66000>; | 192 | samsung,i2c-max-bus-freq = <66000>; |
| 56 | gpios = <&gpa1 2 3 3 0>, | ||
| 57 | <&gpa1 3 3 3 0>; | ||
| 58 | }; | 193 | }; |
| 59 | 194 | ||
| 60 | i2c@12CA0000 { | 195 | i2c@12CA0000 { |
| @@ -64,8 +199,6 @@ | |||
| 64 | i2c@12CB0000 { | 199 | i2c@12CB0000 { |
| 65 | samsung,i2c-sda-delay = <100>; | 200 | samsung,i2c-sda-delay = <100>; |
| 66 | samsung,i2c-max-bus-freq = <66000>; | 201 | samsung,i2c-max-bus-freq = <66000>; |
| 67 | gpios = <&gpa2 2 3 3 0>, | ||
| 68 | <&gpa2 3 3 3 0>; | ||
| 69 | }; | 202 | }; |
| 70 | 203 | ||
| 71 | i2c@12CC0000 { | 204 | i2c@12CC0000 { |
| @@ -75,8 +208,6 @@ | |||
| 75 | i2c@12CD0000 { | 208 | i2c@12CD0000 { |
| 76 | samsung,i2c-sda-delay = <100>; | 209 | samsung,i2c-sda-delay = <100>; |
| 77 | samsung,i2c-max-bus-freq = <66000>; | 210 | samsung,i2c-max-bus-freq = <66000>; |
| 78 | gpios = <&gpb2 2 3 3 0>, | ||
| 79 | <&gpb2 3 3 3 0>; | ||
| 80 | }; | 211 | }; |
| 81 | 212 | ||
| 82 | i2c@12CE0000 { | 213 | i2c@12CE0000 { |
| @@ -98,15 +229,12 @@ | |||
| 98 | samsung,dw-mshc-ciu-div = <3>; | 229 | samsung,dw-mshc-ciu-div = <3>; |
| 99 | samsung,dw-mshc-sdr-timing = <2 3>; | 230 | samsung,dw-mshc-sdr-timing = <2 3>; |
| 100 | samsung,dw-mshc-ddr-timing = <1 2>; | 231 | samsung,dw-mshc-ddr-timing = <1 2>; |
| 232 | pinctrl-names = "default"; | ||
| 233 | pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus4 &sd0_bus8>; | ||
| 101 | 234 | ||
| 102 | slot@0 { | 235 | slot@0 { |
| 103 | reg = <0>; | 236 | reg = <0>; |
| 104 | bus-width = <8>; | 237 | bus-width = <8>; |
| 105 | gpios = <&gpc0 0 2 0 3>, <&gpc0 1 2 0 3>, | ||
| 106 | <&gpc1 0 2 3 3>, <&gpc1 1 2 3 3>, | ||
| 107 | <&gpc1 2 2 3 3>, <&gpc1 3 2 3 3>, | ||
| 108 | <&gpc0 3 2 3 3>, <&gpc0 4 2 3 3>, | ||
| 109 | <&gpc0 5 2 3 3>, <&gpc0 6 2 3 3>; | ||
| 110 | }; | 238 | }; |
| 111 | }; | 239 | }; |
| 112 | 240 | ||
| @@ -122,15 +250,13 @@ | |||
| 122 | samsung,dw-mshc-ciu-div = <3>; | 250 | samsung,dw-mshc-ciu-div = <3>; |
| 123 | samsung,dw-mshc-sdr-timing = <2 3>; | 251 | samsung,dw-mshc-sdr-timing = <2 3>; |
| 124 | samsung,dw-mshc-ddr-timing = <1 2>; | 252 | samsung,dw-mshc-ddr-timing = <1 2>; |
| 253 | pinctrl-names = "default"; | ||
| 254 | pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; | ||
| 125 | 255 | ||
| 126 | slot@0 { | 256 | slot@0 { |
| 127 | reg = <0>; | 257 | reg = <0>; |
| 128 | bus-width = <4>; | 258 | bus-width = <4>; |
| 129 | samsung,cd-pinmux-gpio = <&gpc3 2 2 3 3>; | 259 | wp-gpios = <&gpc2 1 0>; |
| 130 | wp-gpios = <&gpc2 1 0 0 3>; | ||
| 131 | gpios = <&gpc3 0 2 0 3>, <&gpc3 1 2 0 3>, | ||
| 132 | <&gpc3 3 2 3 3>, <&gpc3 4 2 3 3>, | ||
| 133 | <&gpc3 5 2 3 3>, <&gpc3 6 2 3 3>; | ||
| 134 | }; | 260 | }; |
| 135 | }; | 261 | }; |
| 136 | 262 | ||
| @@ -143,11 +269,11 @@ | |||
| 143 | samsung,dw-mshc-ciu-div = <3>; | 269 | samsung,dw-mshc-ciu-div = <3>; |
| 144 | samsung,dw-mshc-sdr-timing = <2 3>; | 270 | samsung,dw-mshc-sdr-timing = <2 3>; |
| 145 | samsung,dw-mshc-ddr-timing = <1 2>; | 271 | samsung,dw-mshc-ddr-timing = <1 2>; |
| 272 | /* See board-specific dts files for pin setup */ | ||
| 146 | 273 | ||
| 147 | slot@0 { | 274 | slot@0 { |
| 148 | reg = <0>; | 275 | reg = <0>; |
| 149 | bus-width = <4>; | 276 | bus-width = <4>; |
| 150 | /* See board-specific dts files for GPIOs */ | ||
| 151 | }; | 277 | }; |
| 152 | }; | 278 | }; |
| 153 | 279 | ||
| @@ -156,9 +282,6 @@ | |||
| 156 | }; | 282 | }; |
| 157 | 283 | ||
| 158 | spi_1: spi@12d30000 { | 284 | spi_1: spi@12d30000 { |
| 159 | gpios = <&gpa2 4 2 3 0>, | ||
| 160 | <&gpa2 6 2 3 0>, | ||
| 161 | <&gpa2 7 2 3 0>; | ||
| 162 | samsung,spi-src-clk = <0>; | 285 | samsung,spi-src-clk = <0>; |
| 163 | num-cs = <1>; | 286 | num-cs = <1>; |
| 164 | }; | 287 | }; |
| @@ -168,7 +291,7 @@ | |||
| 168 | }; | 291 | }; |
| 169 | 292 | ||
| 170 | hdmi { | 293 | hdmi { |
| 171 | hpd-gpio = <&gpx3 7 0xf 1 3>; | 294 | hpd-gpio = <&gpx3 7 0>; |
| 172 | }; | 295 | }; |
| 173 | 296 | ||
| 174 | gpio-keys { | 297 | gpio-keys { |
| @@ -176,7 +299,7 @@ | |||
| 176 | 299 | ||
| 177 | power { | 300 | power { |
| 178 | label = "Power"; | 301 | label = "Power"; |
| 179 | gpios = <&gpx1 3 0 0x10000 0>; | 302 | gpios = <&gpx1 3 1>; |
| 180 | linux,code = <116>; /* KEY_POWER */ | 303 | linux,code = <116>; /* KEY_POWER */ |
| 181 | gpio-key,wakeup; | 304 | gpio-key,wakeup; |
| 182 | }; | 305 | }; |
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index 1a62bcf18aa3..b8771c5cb2a3 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi | |||
| @@ -82,10 +82,17 @@ | |||
| 82 | reg = <0x10440000 0x1000>; | 82 | reg = <0x10440000 0x1000>; |
| 83 | }; | 83 | }; |
| 84 | 84 | ||
| 85 | sys_reg: sysreg { | ||
| 86 | compatible = "samsung,exynos4-sysreg", "syscon"; | ||
| 87 | reg = <0x10010000 0x400>; | ||
| 88 | }; | ||
| 89 | |||
| 85 | watchdog@10060000 { | 90 | watchdog@10060000 { |
| 86 | compatible = "samsung,s3c2410-wdt"; | 91 | compatible = "samsung,s3c2410-wdt"; |
| 87 | reg = <0x10060000 0x100>; | 92 | reg = <0x10060000 0x100>; |
| 88 | interrupts = <0 43 0>; | 93 | interrupts = <0 43 0>; |
| 94 | clocks = <&clock 345>; | ||
| 95 | clock-names = "watchdog"; | ||
| 89 | status = "disabled"; | 96 | status = "disabled"; |
| 90 | }; | 97 | }; |
| 91 | 98 | ||
| @@ -93,6 +100,8 @@ | |||
| 93 | compatible = "samsung,s3c6410-rtc"; | 100 | compatible = "samsung,s3c6410-rtc"; |
| 94 | reg = <0x10070000 0x100>; | 101 | reg = <0x10070000 0x100>; |
| 95 | interrupts = <0 44 0>, <0 45 0>; | 102 | interrupts = <0 44 0>, <0 45 0>; |
| 103 | clocks = <&clock 346>; | ||
| 104 | clock-names = "rtc"; | ||
| 96 | status = "disabled"; | 105 | status = "disabled"; |
| 97 | }; | 106 | }; |
| 98 | 107 | ||
| @@ -100,6 +109,8 @@ | |||
| 100 | compatible = "samsung,s5pv210-keypad"; | 109 | compatible = "samsung,s5pv210-keypad"; |
| 101 | reg = <0x100A0000 0x100>; | 110 | reg = <0x100A0000 0x100>; |
| 102 | interrupts = <0 109 0>; | 111 | interrupts = <0 109 0>; |
| 112 | clocks = <&clock 347>; | ||
| 113 | clock-names = "keypad"; | ||
| 103 | status = "disabled"; | 114 | status = "disabled"; |
| 104 | }; | 115 | }; |
| 105 | 116 | ||
| @@ -107,6 +118,8 @@ | |||
| 107 | compatible = "samsung,exynos4210-sdhci"; | 118 | compatible = "samsung,exynos4210-sdhci"; |
| 108 | reg = <0x12510000 0x100>; | 119 | reg = <0x12510000 0x100>; |
| 109 | interrupts = <0 73 0>; | 120 | interrupts = <0 73 0>; |
| 121 | clocks = <&clock 297>, <&clock 145>; | ||
| 122 | clock-names = "hsmmc", "mmc_busclk.2"; | ||
| 110 | status = "disabled"; | 123 | status = "disabled"; |
| 111 | }; | 124 | }; |
| 112 | 125 | ||
| @@ -114,6 +127,8 @@ | |||
| 114 | compatible = "samsung,exynos4210-sdhci"; | 127 | compatible = "samsung,exynos4210-sdhci"; |
| 115 | reg = <0x12520000 0x100>; | 128 | reg = <0x12520000 0x100>; |
| 116 | interrupts = <0 74 0>; | 129 | interrupts = <0 74 0>; |
| 130 | clocks = <&clock 298>, <&clock 146>; | ||
| 131 | clock-names = "hsmmc", "mmc_busclk.2"; | ||
| 117 | status = "disabled"; | 132 | status = "disabled"; |
| 118 | }; | 133 | }; |
| 119 | 134 | ||
| @@ -121,6 +136,8 @@ | |||
| 121 | compatible = "samsung,exynos4210-sdhci"; | 136 | compatible = "samsung,exynos4210-sdhci"; |
| 122 | reg = <0x12530000 0x100>; | 137 | reg = <0x12530000 0x100>; |
| 123 | interrupts = <0 75 0>; | 138 | interrupts = <0 75 0>; |
| 139 | clocks = <&clock 299>, <&clock 147>; | ||
| 140 | clock-names = "hsmmc", "mmc_busclk.2"; | ||
| 124 | status = "disabled"; | 141 | status = "disabled"; |
| 125 | }; | 142 | }; |
| 126 | 143 | ||
| @@ -128,6 +145,16 @@ | |||
| 128 | compatible = "samsung,exynos4210-sdhci"; | 145 | compatible = "samsung,exynos4210-sdhci"; |
| 129 | reg = <0x12540000 0x100>; | 146 | reg = <0x12540000 0x100>; |
| 130 | interrupts = <0 76 0>; | 147 | interrupts = <0 76 0>; |
| 148 | clocks = <&clock 300>, <&clock 148>; | ||
| 149 | clock-names = "hsmmc", "mmc_busclk.2"; | ||
| 150 | status = "disabled"; | ||
| 151 | }; | ||
| 152 | |||
| 153 | mfc: codec@13400000 { | ||
| 154 | compatible = "samsung,mfc-v5"; | ||
| 155 | reg = <0x13400000 0x10000>; | ||
| 156 | interrupts = <0 94 0>; | ||
| 157 | samsung,power-domain = <&pd_mfc>; | ||
| 131 | status = "disabled"; | 158 | status = "disabled"; |
| 132 | }; | 159 | }; |
| 133 | 160 | ||
| @@ -135,6 +162,8 @@ | |||
| 135 | compatible = "samsung,exynos4210-uart"; | 162 | compatible = "samsung,exynos4210-uart"; |
| 136 | reg = <0x13800000 0x100>; | 163 | reg = <0x13800000 0x100>; |
| 137 | interrupts = <0 52 0>; | 164 | interrupts = <0 52 0>; |
| 165 | clocks = <&clock 312>, <&clock 151>; | ||
| 166 | clock-names = "uart", "clk_uart_baud0"; | ||
| 138 | status = "disabled"; | 167 | status = "disabled"; |
| 139 | }; | 168 | }; |
| 140 | 169 | ||
| @@ -142,6 +171,8 @@ | |||
| 142 | compatible = "samsung,exynos4210-uart"; | 171 | compatible = "samsung,exynos4210-uart"; |
| 143 | reg = <0x13810000 0x100>; | 172 | reg = <0x13810000 0x100>; |
| 144 | interrupts = <0 53 0>; | 173 | interrupts = <0 53 0>; |
| 174 | clocks = <&clock 313>, <&clock 152>; | ||
| 175 | clock-names = "uart", "clk_uart_baud0"; | ||
| 145 | status = "disabled"; | 176 | status = "disabled"; |
| 146 | }; | 177 | }; |
| 147 | 178 | ||
| @@ -149,6 +180,8 @@ | |||
| 149 | compatible = "samsung,exynos4210-uart"; | 180 | compatible = "samsung,exynos4210-uart"; |
| 150 | reg = <0x13820000 0x100>; | 181 | reg = <0x13820000 0x100>; |
| 151 | interrupts = <0 54 0>; | 182 | interrupts = <0 54 0>; |
| 183 | clocks = <&clock 314>, <&clock 153>; | ||
| 184 | clock-names = "uart", "clk_uart_baud0"; | ||
| 152 | status = "disabled"; | 185 | status = "disabled"; |
| 153 | }; | 186 | }; |
| 154 | 187 | ||
| @@ -156,6 +189,8 @@ | |||
| 156 | compatible = "samsung,exynos4210-uart"; | 189 | compatible = "samsung,exynos4210-uart"; |
| 157 | reg = <0x13830000 0x100>; | 190 | reg = <0x13830000 0x100>; |
| 158 | interrupts = <0 55 0>; | 191 | interrupts = <0 55 0>; |
| 192 | clocks = <&clock 315>, <&clock 154>; | ||
| 193 | clock-names = "uart", "clk_uart_baud0"; | ||
| 159 | status = "disabled"; | 194 | status = "disabled"; |
| 160 | }; | 195 | }; |
| 161 | 196 | ||
| @@ -165,6 +200,10 @@ | |||
| 165 | compatible = "samsung,s3c2440-i2c"; | 200 | compatible = "samsung,s3c2440-i2c"; |
| 166 | reg = <0x13860000 0x100>; | 201 | reg = <0x13860000 0x100>; |
| 167 | interrupts = <0 58 0>; | 202 | interrupts = <0 58 0>; |
| 203 | clocks = <&clock 317>; | ||
| 204 | clock-names = "i2c"; | ||
| 205 | pinctrl-names = "default"; | ||
| 206 | pinctrl-0 = <&i2c0_bus>; | ||
| 168 | status = "disabled"; | 207 | status = "disabled"; |
| 169 | }; | 208 | }; |
| 170 | 209 | ||
| @@ -174,6 +213,10 @@ | |||
| 174 | compatible = "samsung,s3c2440-i2c"; | 213 | compatible = "samsung,s3c2440-i2c"; |
| 175 | reg = <0x13870000 0x100>; | 214 | reg = <0x13870000 0x100>; |
| 176 | interrupts = <0 59 0>; | 215 | interrupts = <0 59 0>; |
| 216 | clocks = <&clock 318>; | ||
| 217 | clock-names = "i2c"; | ||
| 218 | pinctrl-names = "default"; | ||
| 219 | pinctrl-0 = <&i2c1_bus>; | ||
| 177 | status = "disabled"; | 220 | status = "disabled"; |
| 178 | }; | 221 | }; |
| 179 | 222 | ||
| @@ -183,6 +226,8 @@ | |||
| 183 | compatible = "samsung,s3c2440-i2c"; | 226 | compatible = "samsung,s3c2440-i2c"; |
| 184 | reg = <0x13880000 0x100>; | 227 | reg = <0x13880000 0x100>; |
| 185 | interrupts = <0 60 0>; | 228 | interrupts = <0 60 0>; |
| 229 | clocks = <&clock 319>; | ||
| 230 | clock-names = "i2c"; | ||
| 186 | status = "disabled"; | 231 | status = "disabled"; |
| 187 | }; | 232 | }; |
| 188 | 233 | ||
| @@ -192,6 +237,8 @@ | |||
| 192 | compatible = "samsung,s3c2440-i2c"; | 237 | compatible = "samsung,s3c2440-i2c"; |
| 193 | reg = <0x13890000 0x100>; | 238 | reg = <0x13890000 0x100>; |
| 194 | interrupts = <0 61 0>; | 239 | interrupts = <0 61 0>; |
| 240 | clocks = <&clock 320>; | ||
| 241 | clock-names = "i2c"; | ||
| 195 | status = "disabled"; | 242 | status = "disabled"; |
| 196 | }; | 243 | }; |
| 197 | 244 | ||
| @@ -201,6 +248,8 @@ | |||
| 201 | compatible = "samsung,s3c2440-i2c"; | 248 | compatible = "samsung,s3c2440-i2c"; |
| 202 | reg = <0x138A0000 0x100>; | 249 | reg = <0x138A0000 0x100>; |
| 203 | interrupts = <0 62 0>; | 250 | interrupts = <0 62 0>; |
| 251 | clocks = <&clock 321>; | ||
| 252 | clock-names = "i2c"; | ||
| 204 | status = "disabled"; | 253 | status = "disabled"; |
| 205 | }; | 254 | }; |
| 206 | 255 | ||
| @@ -210,6 +259,8 @@ | |||
| 210 | compatible = "samsung,s3c2440-i2c"; | 259 | compatible = "samsung,s3c2440-i2c"; |
| 211 | reg = <0x138B0000 0x100>; | 260 | reg = <0x138B0000 0x100>; |
| 212 | interrupts = <0 63 0>; | 261 | interrupts = <0 63 0>; |
| 262 | clocks = <&clock 322>; | ||
| 263 | clock-names = "i2c"; | ||
| 213 | status = "disabled"; | 264 | status = "disabled"; |
| 214 | }; | 265 | }; |
| 215 | 266 | ||
| @@ -219,6 +270,8 @@ | |||
| 219 | compatible = "samsung,s3c2440-i2c"; | 270 | compatible = "samsung,s3c2440-i2c"; |
| 220 | reg = <0x138C0000 0x100>; | 271 | reg = <0x138C0000 0x100>; |
| 221 | interrupts = <0 64 0>; | 272 | interrupts = <0 64 0>; |
| 273 | clocks = <&clock 323>; | ||
| 274 | clock-names = "i2c"; | ||
| 222 | status = "disabled"; | 275 | status = "disabled"; |
| 223 | }; | 276 | }; |
| 224 | 277 | ||
| @@ -228,6 +281,8 @@ | |||
| 228 | compatible = "samsung,s3c2440-i2c"; | 281 | compatible = "samsung,s3c2440-i2c"; |
| 229 | reg = <0x138D0000 0x100>; | 282 | reg = <0x138D0000 0x100>; |
| 230 | interrupts = <0 65 0>; | 283 | interrupts = <0 65 0>; |
| 284 | clocks = <&clock 324>; | ||
| 285 | clock-names = "i2c"; | ||
| 231 | status = "disabled"; | 286 | status = "disabled"; |
| 232 | }; | 287 | }; |
| 233 | 288 | ||
| @@ -239,6 +294,10 @@ | |||
| 239 | rx-dma-channel = <&pdma0 6>; /* preliminary */ | 294 | rx-dma-channel = <&pdma0 6>; /* preliminary */ |
| 240 | #address-cells = <1>; | 295 | #address-cells = <1>; |
| 241 | #size-cells = <0>; | 296 | #size-cells = <0>; |
| 297 | clocks = <&clock 327>, <&clock 159>; | ||
| 298 | clock-names = "spi", "spi_busclk0"; | ||
| 299 | pinctrl-names = "default"; | ||
| 300 | pinctrl-0 = <&spi0_bus>; | ||
| 242 | status = "disabled"; | 301 | status = "disabled"; |
| 243 | }; | 302 | }; |
| 244 | 303 | ||
| @@ -250,6 +309,10 @@ | |||
| 250 | rx-dma-channel = <&pdma1 6>; /* preliminary */ | 309 | rx-dma-channel = <&pdma1 6>; /* preliminary */ |
| 251 | #address-cells = <1>; | 310 | #address-cells = <1>; |
| 252 | #size-cells = <0>; | 311 | #size-cells = <0>; |
| 312 | clocks = <&clock 328>, <&clock 160>; | ||
| 313 | clock-names = "spi", "spi_busclk0"; | ||
| 314 | pinctrl-names = "default"; | ||
| 315 | pinctrl-0 = <&spi1_bus>; | ||
| 253 | status = "disabled"; | 316 | status = "disabled"; |
| 254 | }; | 317 | }; |
| 255 | 318 | ||
| @@ -261,6 +324,10 @@ | |||
| 261 | rx-dma-channel = <&pdma0 8>; /* preliminary */ | 324 | rx-dma-channel = <&pdma0 8>; /* preliminary */ |
| 262 | #address-cells = <1>; | 325 | #address-cells = <1>; |
| 263 | #size-cells = <0>; | 326 | #size-cells = <0>; |
| 327 | clocks = <&clock 329>, <&clock 161>; | ||
| 328 | clock-names = "spi", "spi_busclk0"; | ||
| 329 | pinctrl-names = "default"; | ||
| 330 | pinctrl-0 = <&spi2_bus>; | ||
| 264 | status = "disabled"; | 331 | status = "disabled"; |
| 265 | }; | 332 | }; |
| 266 | 333 | ||
| @@ -275,6 +342,8 @@ | |||
| 275 | compatible = "arm,pl330", "arm,primecell"; | 342 | compatible = "arm,pl330", "arm,primecell"; |
| 276 | reg = <0x12680000 0x1000>; | 343 | reg = <0x12680000 0x1000>; |
| 277 | interrupts = <0 35 0>; | 344 | interrupts = <0 35 0>; |
| 345 | clocks = <&clock 292>; | ||
| 346 | clock-names = "apb_pclk"; | ||
| 278 | #dma-cells = <1>; | 347 | #dma-cells = <1>; |
| 279 | #dma-channels = <8>; | 348 | #dma-channels = <8>; |
| 280 | #dma-requests = <32>; | 349 | #dma-requests = <32>; |
| @@ -284,6 +353,8 @@ | |||
| 284 | compatible = "arm,pl330", "arm,primecell"; | 353 | compatible = "arm,pl330", "arm,primecell"; |
| 285 | reg = <0x12690000 0x1000>; | 354 | reg = <0x12690000 0x1000>; |
| 286 | interrupts = <0 36 0>; | 355 | interrupts = <0 36 0>; |
| 356 | clocks = <&clock 293>; | ||
| 357 | clock-names = "apb_pclk"; | ||
| 287 | #dma-cells = <1>; | 358 | #dma-cells = <1>; |
| 288 | #dma-channels = <8>; | 359 | #dma-channels = <8>; |
| 289 | #dma-requests = <32>; | 360 | #dma-requests = <32>; |
| @@ -293,9 +364,23 @@ | |||
| 293 | compatible = "arm,pl330", "arm,primecell"; | 364 | compatible = "arm,pl330", "arm,primecell"; |
| 294 | reg = <0x12850000 0x1000>; | 365 | reg = <0x12850000 0x1000>; |
| 295 | interrupts = <0 34 0>; | 366 | interrupts = <0 34 0>; |
| 367 | clocks = <&clock 279>; | ||
| 368 | clock-names = "apb_pclk"; | ||
| 296 | #dma-cells = <1>; | 369 | #dma-cells = <1>; |
| 297 | #dma-channels = <8>; | 370 | #dma-channels = <8>; |
| 298 | #dma-requests = <1>; | 371 | #dma-requests = <1>; |
| 299 | }; | 372 | }; |
| 300 | }; | 373 | }; |
| 374 | |||
| 375 | fimd: fimd@11c00000 { | ||
| 376 | compatible = "samsung,exynos4210-fimd"; | ||
| 377 | interrupt-parent = <&combiner>; | ||
| 378 | reg = <0x11c00000 0x20000>; | ||
| 379 | interrupt-names = "fifo", "vsync", "lcd_sys"; | ||
| 380 | interrupts = <11 0>, <11 1>, <11 2>; | ||
| 381 | clocks = <&clock 140>, <&clock 283>; | ||
| 382 | clock-names = "sclk_fimd", "fimd"; | ||
| 383 | samsung,power-domain = <&pd_lcd0>; | ||
| 384 | status = "disabled"; | ||
| 385 | }; | ||
| 301 | }; | 386 | }; |
diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts index f2710018e84e..524b90846df5 100644 --- a/arch/arm/boot/dts/exynos4210-origen.dts +++ b/arch/arm/boot/dts/exynos4210-origen.dts | |||
| @@ -57,6 +57,16 @@ | |||
| 57 | status = "okay"; | 57 | status = "okay"; |
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | g2d@12800000 { | ||
| 61 | status = "okay"; | ||
| 62 | }; | ||
| 63 | |||
| 64 | codec@13400000 { | ||
| 65 | samsung,mfc-r = <0x43000000 0x800000>; | ||
| 66 | samsung,mfc-l = <0x51000000 0x800000>; | ||
| 67 | status = "okay"; | ||
| 68 | }; | ||
| 69 | |||
| 60 | serial@13800000 { | 70 | serial@13800000 { |
| 61 | status = "okay"; | 71 | status = "okay"; |
| 62 | }; | 72 | }; |
| @@ -121,4 +131,16 @@ | |||
| 121 | linux,default-trigger = "heartbeat"; | 131 | linux,default-trigger = "heartbeat"; |
| 122 | }; | 132 | }; |
| 123 | }; | 133 | }; |
| 134 | |||
| 135 | fixed-rate-clocks { | ||
| 136 | xxti { | ||
| 137 | compatible = "samsung,clock-xxti"; | ||
| 138 | clock-frequency = <0>; | ||
| 139 | }; | ||
| 140 | |||
| 141 | xusbxti { | ||
| 142 | compatible = "samsung,clock-xusbxti"; | ||
| 143 | clock-frequency = <24000000>; | ||
| 144 | }; | ||
| 145 | }; | ||
| 124 | }; | 146 | }; |
diff --git a/arch/arm/boot/dts/exynos4210-smdkv310.dts b/arch/arm/boot/dts/exynos4210-smdkv310.dts index f63490707f3a..91332b72acf5 100644 --- a/arch/arm/boot/dts/exynos4210-smdkv310.dts +++ b/arch/arm/boot/dts/exynos4210-smdkv310.dts | |||
| @@ -30,16 +30,19 @@ | |||
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | sdhci@12530000 { | 32 | sdhci@12530000 { |
| 33 | samsung,sdhci-bus-width = <4>; | 33 | bus-width = <4>; |
| 34 | linux,mmc_cap_4_bit_data; | 34 | pinctrl-names = "default"; |
| 35 | samsung,sdhci-cd-internal; | 35 | pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; |
| 36 | gpio-cd = <&gpk2 2 2 3 3>; | 36 | status = "okay"; |
| 37 | gpios = <&gpk2 0 2 0 3>, | 37 | }; |
| 38 | <&gpk2 1 2 0 3>, | 38 | |
| 39 | <&gpk2 3 2 3 3>, | 39 | g2d@12800000 { |
| 40 | <&gpk2 4 2 3 3>, | 40 | status = "okay"; |
| 41 | <&gpk2 5 2 3 3>, | 41 | }; |
| 42 | <&gpk2 6 2 3 3>; | 42 | |
| 43 | codec@13400000 { | ||
| 44 | samsung,mfc-r = <0x43000000 0x800000>; | ||
| 45 | samsung,mfc-l = <0x51000000 0x800000>; | ||
| 43 | status = "okay"; | 46 | status = "okay"; |
| 44 | }; | 47 | }; |
| 45 | 48 | ||
| @@ -59,25 +62,32 @@ | |||
| 59 | status = "okay"; | 62 | status = "okay"; |
| 60 | }; | 63 | }; |
| 61 | 64 | ||
| 65 | pinctrl@11000000 { | ||
| 66 | keypad_rows: keypad-rows { | ||
| 67 | samsung,pins = "gpx2-0", "gpx2-1"; | ||
| 68 | samsung,pin-function = <3>; | ||
| 69 | samsung,pin-pud = <3>; | ||
| 70 | samsung,pin-drv = <0>; | ||
| 71 | }; | ||
| 72 | |||
| 73 | keypad_cols: keypad-cols { | ||
| 74 | samsung,pins = "gpx1-0", "gpx1-1", "gpx1-2", "gpx1-3", | ||
| 75 | "gpx1-4", "gpx1-5", "gpx1-6", "gpx1-7"; | ||
| 76 | samsung,pin-function = <3>; | ||
| 77 | samsung,pin-pud = <0>; | ||
| 78 | samsung,pin-drv = <0>; | ||
| 79 | }; | ||
| 80 | }; | ||
| 81 | |||
| 62 | keypad@100A0000 { | 82 | keypad@100A0000 { |
| 63 | samsung,keypad-num-rows = <2>; | 83 | samsung,keypad-num-rows = <2>; |
| 64 | samsung,keypad-num-columns = <8>; | 84 | samsung,keypad-num-columns = <8>; |
| 65 | linux,keypad-no-autorepeat; | 85 | linux,keypad-no-autorepeat; |
| 66 | linux,keypad-wakeup; | 86 | linux,keypad-wakeup; |
| 87 | pinctrl-names = "default"; | ||
| 88 | pinctrl-0 = <&keypad_rows &keypad_cols>; | ||
| 67 | status = "okay"; | 89 | status = "okay"; |
| 68 | 90 | ||
| 69 | row-gpios = <&gpx2 0 3 3 0>, | ||
| 70 | <&gpx2 1 3 3 0>; | ||
| 71 | |||
| 72 | col-gpios = <&gpx1 0 3 0 0>, | ||
| 73 | <&gpx1 1 3 0 0>, | ||
| 74 | <&gpx1 2 3 0 0>, | ||
| 75 | <&gpx1 3 3 0 0>, | ||
| 76 | <&gpx1 4 3 0 0>, | ||
| 77 | <&gpx1 5 3 0 0>, | ||
| 78 | <&gpx1 6 3 0 0>, | ||
| 79 | <&gpx1 7 3 0 0>; | ||
| 80 | |||
| 81 | key_1 { | 91 | key_1 { |
| 82 | keypad,row = <0>; | 92 | keypad,row = <0>; |
| 83 | keypad,column = <3>; | 93 | keypad,column = <3>; |
| @@ -143,9 +153,7 @@ | |||
| 143 | #address-cells = <1>; | 153 | #address-cells = <1>; |
| 144 | #size-cells = <0>; | 154 | #size-cells = <0>; |
| 145 | samsung,i2c-sda-delay = <100>; | 155 | samsung,i2c-sda-delay = <100>; |
| 146 | samsung,i2c-max-bus-freq = <20000>; | 156 | samsung,i2c-max-bus-freq = <100000>; |
| 147 | gpios = <&gpd1 0 2 3 0>, | ||
| 148 | <&gpd1 1 2 3 0>; | ||
| 149 | status = "okay"; | 157 | status = "okay"; |
| 150 | 158 | ||
| 151 | eeprom@50 { | 159 | eeprom@50 { |
| @@ -160,9 +168,6 @@ | |||
| 160 | }; | 168 | }; |
| 161 | 169 | ||
| 162 | spi_2: spi@13940000 { | 170 | spi_2: spi@13940000 { |
| 163 | gpios = <&gpc1 1 5 3 0>, | ||
| 164 | <&gpc1 3 5 3 0>, | ||
| 165 | <&gpc1 4 5 3 0>; | ||
| 166 | status = "okay"; | 171 | status = "okay"; |
| 167 | 172 | ||
| 168 | w25x80@0 { | 173 | w25x80@0 { |
| @@ -173,7 +178,7 @@ | |||
| 173 | spi-max-frequency = <1000000>; | 178 | spi-max-frequency = <1000000>; |
| 174 | 179 | ||
| 175 | controller-data { | 180 | controller-data { |
| 176 | cs-gpio = <&gpc1 2 1 0 3>; | 181 | cs-gpio = <&gpc1 2 0>; |
| 177 | samsung,spi-feedback-delay = <0>; | 182 | samsung,spi-feedback-delay = <0>; |
| 178 | }; | 183 | }; |
| 179 | 184 | ||
| @@ -189,4 +194,16 @@ | |||
| 189 | }; | 194 | }; |
| 190 | }; | 195 | }; |
| 191 | }; | 196 | }; |
| 197 | |||
| 198 | fixed-rate-clocks { | ||
| 199 | xxti { | ||
| 200 | compatible = "samsung,clock-xxti"; | ||
| 201 | clock-frequency = <12000000>; | ||
| 202 | }; | ||
| 203 | |||
| 204 | xusbxti { | ||
| 205 | compatible = "samsung,clock-xusbxti"; | ||
| 206 | clock-frequency = <24000000>; | ||
| 207 | }; | ||
| 208 | }; | ||
| 192 | }; | 209 | }; |
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts index c346b64dff55..9a14484c7bb1 100644 --- a/arch/arm/boot/dts/exynos4210-trats.dts +++ b/arch/arm/boot/dts/exynos4210-trats.dts | |||
| @@ -289,4 +289,16 @@ | |||
| 289 | }; | 289 | }; |
| 290 | }; | 290 | }; |
| 291 | }; | 291 | }; |
| 292 | |||
| 293 | fixed-rate-clocks { | ||
| 294 | xxti { | ||
| 295 | compatible = "samsung,clock-xxti"; | ||
| 296 | clock-frequency = <0>; | ||
| 297 | }; | ||
| 298 | |||
| 299 | xusbxti { | ||
| 300 | compatible = "samsung,clock-xusbxti"; | ||
| 301 | clock-frequency = <24000000>; | ||
| 302 | }; | ||
| 303 | }; | ||
| 292 | }; | 304 | }; |
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index 2feffc70814c..9e6f381fa835 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi | |||
| @@ -47,6 +47,36 @@ | |||
| 47 | <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>; | 47 | <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>; |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | mct@10050000 { | ||
| 51 | compatible = "samsung,exynos4210-mct"; | ||
| 52 | reg = <0x10050000 0x800>; | ||
| 53 | interrupt-controller; | ||
| 54 | #interrups-cells = <2>; | ||
| 55 | interrupt-parent = <&mct_map>; | ||
| 56 | interrupts = <0 0>, <1 0>, <2 0>, <3 0>, | ||
| 57 | <4 0>, <5 0>; | ||
| 58 | clocks = <&clock 3>, <&clock 344>; | ||
| 59 | clock-names = "fin_pll", "mct"; | ||
| 60 | |||
| 61 | mct_map: mct-map { | ||
| 62 | #interrupt-cells = <2>; | ||
| 63 | #address-cells = <0>; | ||
| 64 | #size-cells = <0>; | ||
| 65 | interrupt-map = <0x0 0 &gic 0 57 0>, | ||
| 66 | <0x1 0 &gic 0 69 0>, | ||
| 67 | <0x2 0 &combiner 12 6>, | ||
| 68 | <0x3 0 &combiner 12 7>, | ||
| 69 | <0x4 0 &gic 0 42 0>, | ||
| 70 | <0x5 0 &gic 0 48 0>; | ||
| 71 | }; | ||
| 72 | }; | ||
| 73 | |||
| 74 | clock: clock-controller@0x10030000 { | ||
| 75 | compatible = "samsung,exynos4210-clock"; | ||
| 76 | reg = <0x10030000 0x20000>; | ||
| 77 | #clock-cells = <1>; | ||
| 78 | }; | ||
| 79 | |||
| 50 | pinctrl_0: pinctrl@11400000 { | 80 | pinctrl_0: pinctrl@11400000 { |
| 51 | compatible = "samsung,exynos4210-pinctrl"; | 81 | compatible = "samsung,exynos4210-pinctrl"; |
| 52 | reg = <0x11400000 0x1000>; | 82 | reg = <0x11400000 0x1000>; |
| @@ -76,4 +106,11 @@ | |||
| 76 | reg = <0x100C0000 0x100>; | 106 | reg = <0x100C0000 0x100>; |
| 77 | interrupts = <2 4>; | 107 | interrupts = <2 4>; |
| 78 | }; | 108 | }; |
| 109 | |||
| 110 | g2d@12800000 { | ||
| 111 | compatible = "samsung,s5pv210-g2d"; | ||
| 112 | reg = <0x12800000 0x1000>; | ||
| 113 | interrupts = <0 89 0>; | ||
| 114 | status = "disabled"; | ||
| 115 | }; | ||
| 79 | }; | 116 | }; |
diff --git a/arch/arm/boot/dts/exynos4212.dtsi b/arch/arm/boot/dts/exynos4212.dtsi index c6ae2005961f..36d4299789ef 100644 --- a/arch/arm/boot/dts/exynos4212.dtsi +++ b/arch/arm/boot/dts/exynos4212.dtsi | |||
| @@ -25,4 +25,26 @@ | |||
| 25 | gic:interrupt-controller@10490000 { | 25 | gic:interrupt-controller@10490000 { |
| 26 | cpu-offset = <0x8000>; | 26 | cpu-offset = <0x8000>; |
| 27 | }; | 27 | }; |
| 28 | |||
| 29 | mct@10050000 { | ||
| 30 | compatible = "samsung,exynos4412-mct"; | ||
| 31 | reg = <0x10050000 0x800>; | ||
| 32 | interrupt-controller; | ||
| 33 | #interrups-cells = <2>; | ||
| 34 | interrupt-parent = <&mct_map>; | ||
| 35 | interrupts = <0 0>, <1 0>, <2 0>, <3 0>, | ||
| 36 | <4 0>, <5 0>; | ||
| 37 | |||
| 38 | mct_map: mct-map { | ||
| 39 | #interrupt-cells = <2>; | ||
| 40 | #address-cells = <0>; | ||
| 41 | #size-cells = <0>; | ||
| 42 | interrupt-map = <0x0 0 &gic 0 57 0>, | ||
| 43 | <0x1 0 &combiner 12 5>, | ||
| 44 | <0x2 0 &combiner 12 6>, | ||
| 45 | <0x3 0 &combiner 12 7>, | ||
| 46 | <0x4 0 &gic 1 12 0>, | ||
| 47 | <0x5 0 &gic 1 12 0>; | ||
| 48 | }; | ||
| 49 | }; | ||
| 28 | }; | 50 | }; |
diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts b/arch/arm/boot/dts/exynos4412-odroidx.dts new file mode 100644 index 000000000000..15dc0a38b96d --- /dev/null +++ b/arch/arm/boot/dts/exynos4412-odroidx.dts | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | /* | ||
| 2 | * Hardkernel's Exynos4412 based ODROID-X board device tree source | ||
| 3 | * | ||
| 4 | * Copyright (c) 2012 Dongjin Kim <tobetter@gmail.com> | ||
| 5 | * | ||
| 6 | * Device tree source file for Hardkernel's ODROID-X board which is based on | ||
| 7 | * Samsung's Exynos4412 SoC. | ||
| 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 version 2 as | ||
| 11 | * published by the Free Software Foundation. | ||
| 12 | */ | ||
| 13 | |||
| 14 | /dts-v1/; | ||
| 15 | /include/ "exynos4412.dtsi" | ||
| 16 | |||
| 17 | / { | ||
| 18 | model = "Hardkernel ODROID-X board based on Exynos4412"; | ||
| 19 | compatible = "hardkernel,odroid-x", "samsung,exynos4412"; | ||
| 20 | |||
| 21 | memory { | ||
| 22 | reg = <0x40000000 0x40000000>; | ||
| 23 | }; | ||
| 24 | |||
| 25 | leds { | ||
| 26 | compatible = "gpio-leds"; | ||
| 27 | led1 { | ||
| 28 | label = "led1:heart"; | ||
| 29 | gpios = <&gpc1 0 1>; | ||
| 30 | default-state = "on"; | ||
| 31 | linux,default-trigger = "heartbeat"; | ||
| 32 | }; | ||
| 33 | led2 { | ||
| 34 | label = "led2:mmc0"; | ||
| 35 | gpios = <&gpc1 2 1>; | ||
| 36 | default-state = "on"; | ||
| 37 | linux,default-trigger = "mmc0"; | ||
| 38 | }; | ||
| 39 | }; | ||
| 40 | |||
| 41 | mshc@12550000 { | ||
| 42 | pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; | ||
| 43 | pinctrl-names = "default"; | ||
| 44 | status = "okay"; | ||
| 45 | |||
| 46 | num-slots = <1>; | ||
| 47 | supports-highspeed; | ||
| 48 | broken-cd; | ||
| 49 | fifo-depth = <0x80>; | ||
| 50 | card-detect-delay = <200>; | ||
| 51 | samsung,dw-mshc-ciu-div = <3>; | ||
| 52 | samsung,dw-mshc-sdr-timing = <2 3>; | ||
| 53 | samsung,dw-mshc-ddr-timing = <1 2>; | ||
| 54 | |||
| 55 | slot@0 { | ||
| 56 | reg = <0>; | ||
| 57 | bus-width = <8>; | ||
| 58 | }; | ||
| 59 | }; | ||
| 60 | |||
| 61 | regulator_p3v3 { | ||
| 62 | compatible = "regulator-fixed"; | ||
| 63 | regulator-name = "p3v3_en"; | ||
| 64 | regulator-min-microvolt = <3300000>; | ||
| 65 | regulator-max-microvolt = <3300000>; | ||
| 66 | gpio = <&gpa1 1 1>; | ||
| 67 | enable-active-high; | ||
| 68 | regulator-boot-on; | ||
| 69 | }; | ||
| 70 | |||
| 71 | rtc@10070000 { | ||
| 72 | status = "okay"; | ||
| 73 | }; | ||
| 74 | |||
| 75 | sdhci@12530000 { | ||
| 76 | bus-width = <4>; | ||
| 77 | pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; | ||
| 78 | pinctrl-names = "default"; | ||
| 79 | status = "okay"; | ||
| 80 | }; | ||
| 81 | |||
| 82 | serial@13800000 { | ||
| 83 | status = "okay"; | ||
| 84 | }; | ||
| 85 | |||
| 86 | serial@13810000 { | ||
| 87 | status = "okay"; | ||
| 88 | }; | ||
| 89 | |||
| 90 | serial@13820000 { | ||
| 91 | status = "okay"; | ||
| 92 | }; | ||
| 93 | |||
| 94 | serial@13830000 { | ||
| 95 | status = "okay"; | ||
| 96 | }; | ||
| 97 | |||
| 98 | fixed-rate-clocks { | ||
| 99 | xxti { | ||
| 100 | compatible = "samsung,clock-xxti"; | ||
| 101 | clock-frequency = <0>; | ||
| 102 | }; | ||
| 103 | |||
| 104 | xusbxti { | ||
| 105 | compatible = "samsung,clock-xusbxti"; | ||
| 106 | clock-frequency = <24000000>; | ||
| 107 | }; | ||
| 108 | }; | ||
| 109 | }; | ||
diff --git a/arch/arm/boot/dts/exynos4412-origen.dts b/arch/arm/boot/dts/exynos4412-origen.dts new file mode 100644 index 000000000000..b39bffccde86 --- /dev/null +++ b/arch/arm/boot/dts/exynos4412-origen.dts | |||
| @@ -0,0 +1,451 @@ | |||
| 1 | /* | ||
| 2 | * Insignal's Exynos4412 based Origen board device tree source | ||
| 3 | * | ||
| 4 | * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. | ||
| 5 | * http://www.samsung.com | ||
| 6 | * | ||
| 7 | * Device tree source file for Insignal's Origen board which is based on | ||
| 8 | * Samsung's Exynos4412 SoC. | ||
| 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 | /dts-v1/; | ||
| 16 | /include/ "exynos4412.dtsi" | ||
| 17 | |||
| 18 | / { | ||
| 19 | model = "Insignal Origen evaluation board based on Exynos4412"; | ||
| 20 | compatible = "insignal,origen4412", "samsung,exynos4412"; | ||
| 21 | |||
| 22 | memory { | ||
| 23 | reg = <0x40000000 0x40000000>; | ||
| 24 | }; | ||
| 25 | |||
| 26 | chosen { | ||
| 27 | bootargs ="console=ttySAC2,115200"; | ||
| 28 | }; | ||
| 29 | |||
| 30 | mmc_reg: voltage-regulator { | ||
| 31 | compatible = "regulator-fixed"; | ||
| 32 | regulator-name = "VMEM_VDD_2.8V"; | ||
| 33 | regulator-min-microvolt = <2800000>; | ||
| 34 | regulator-max-microvolt = <2800000>; | ||
| 35 | gpio = <&gpx1 1 0>; | ||
| 36 | enable-active-high; | ||
| 37 | }; | ||
| 38 | |||
| 39 | sdhci@12530000 { | ||
| 40 | bus-width = <4>; | ||
| 41 | pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sd2_cd>; | ||
| 42 | pinctrl-names = "default"; | ||
| 43 | vmmc-supply = <&mmc_reg>; | ||
| 44 | status = "okay"; | ||
| 45 | }; | ||
| 46 | |||
| 47 | mshc@12550000 { | ||
| 48 | pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; | ||
| 49 | pinctrl-names = "default"; | ||
| 50 | status = "okay"; | ||
| 51 | |||
| 52 | num-slots = <1>; | ||
| 53 | supports-highspeed; | ||
| 54 | broken-cd; | ||
| 55 | fifo-depth = <0x80>; | ||
| 56 | card-detect-delay = <200>; | ||
| 57 | samsung,dw-mshc-ciu-div = <3>; | ||
| 58 | samsung,dw-mshc-sdr-timing = <2 3>; | ||
| 59 | samsung,dw-mshc-ddr-timing = <1 2>; | ||
| 60 | |||
| 61 | slot@0 { | ||
| 62 | reg = <0>; | ||
| 63 | bus-width = <8>; | ||
| 64 | }; | ||
| 65 | }; | ||
| 66 | |||
| 67 | codec@13400000 { | ||
| 68 | samsung,mfc-r = <0x43000000 0x800000>; | ||
| 69 | samsung,mfc-l = <0x51000000 0x800000>; | ||
| 70 | status = "okay"; | ||
| 71 | }; | ||
| 72 | |||
| 73 | fimd@11c00000 { | ||
| 74 | pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>; | ||
| 75 | pinctrl-names = "default"; | ||
| 76 | status = "okay"; | ||
| 77 | }; | ||
| 78 | |||
| 79 | display-timings { | ||
| 80 | native-mode = <&timing0>; | ||
| 81 | timing0: timing { | ||
| 82 | clock-frequency = <50000>; | ||
| 83 | hactive = <1024>; | ||
| 84 | vactive = <600>; | ||
| 85 | hfront-porch = <64>; | ||
| 86 | hback-porch = <16>; | ||
| 87 | hsync-len = <48>; | ||
| 88 | vback-porch = <64>; | ||
| 89 | vfront-porch = <16>; | ||
| 90 | vsync-len = <3>; | ||
| 91 | }; | ||
| 92 | }; | ||
| 93 | |||
| 94 | serial@13800000 { | ||
| 95 | status = "okay"; | ||
| 96 | }; | ||
| 97 | |||
| 98 | serial@13810000 { | ||
| 99 | status = "okay"; | ||
| 100 | }; | ||
| 101 | |||
| 102 | serial@13820000 { | ||
| 103 | status = "okay"; | ||
| 104 | }; | ||
| 105 | |||
| 106 | serial@13830000 { | ||
| 107 | status = "okay"; | ||
| 108 | }; | ||
| 109 | |||
| 110 | i2c@13860000 { | ||
| 111 | #address-cells = <1>; | ||
| 112 | #size-cells = <0>; | ||
| 113 | samsung,i2c-sda-delay = <100>; | ||
| 114 | samsung,i2c-max-bus-freq = <20000>; | ||
| 115 | pinctrl-0 = <&i2c0_bus>; | ||
| 116 | pinctrl-names = "default"; | ||
| 117 | status = "okay"; | ||
| 118 | |||
| 119 | s5m8767_pmic@66 { | ||
| 120 | compatible = "samsung,s5m8767-pmic"; | ||
| 121 | reg = <0x66>; | ||
| 122 | |||
| 123 | s5m8767,pmic-buck-default-dvs-idx = <3>; | ||
| 124 | |||
| 125 | s5m8767,pmic-buck-dvs-gpios = <&gpx2 3 0>, | ||
| 126 | <&gpx2 4 0>, | ||
| 127 | <&gpx2 5 0>; | ||
| 128 | |||
| 129 | s5m8767,pmic-buck-ds-gpios = <&gpm3 5 0>, | ||
| 130 | <&gpm3 6 0>, | ||
| 131 | <&gpm3 7 0>; | ||
| 132 | |||
| 133 | s5m8767,pmic-buck2-dvs-voltage = <1250000>, <1200000>, | ||
| 134 | <1200000>, <1200000>, | ||
| 135 | <1200000>, <1200000>, | ||
| 136 | <1200000>, <1200000>; | ||
| 137 | |||
| 138 | s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>, | ||
| 139 | <1100000>, <1100000>, | ||
| 140 | <1100000>, <1100000>, | ||
| 141 | <1100000>, <1100000>; | ||
| 142 | |||
| 143 | s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>, | ||
| 144 | <1200000>, <1200000>, | ||
| 145 | <1200000>, <1200000>, | ||
| 146 | <1200000>, <1200000>; | ||
| 147 | |||
| 148 | regulators { | ||
| 149 | ldo1_reg: LDO1 { | ||
| 150 | regulator-name = "VDD_ALIVE"; | ||
| 151 | regulator-min-microvolt = <1100000>; | ||
| 152 | regulator-max-microvolt = <1100000>; | ||
| 153 | regulator-always-on; | ||
| 154 | regulator-boot-on; | ||
| 155 | op_mode = <1>; /* Normal Mode */ | ||
| 156 | }; | ||
| 157 | |||
| 158 | ldo2_reg: LDO2 { | ||
| 159 | regulator-name = "VDDQ_M12"; | ||
| 160 | regulator-min-microvolt = <1200000>; | ||
| 161 | regulator-max-microvolt = <1200000>; | ||
| 162 | regulator-always-on; | ||
| 163 | op_mode = <1>; /* Normal Mode */ | ||
| 164 | }; | ||
| 165 | |||
| 166 | ldo3_reg: LDO3 { | ||
| 167 | regulator-name = "VDDIOAP_18"; | ||
| 168 | regulator-min-microvolt = <1800000>; | ||
| 169 | regulator-max-microvolt = <1800000>; | ||
| 170 | regulator-always-on; | ||
| 171 | op_mode = <1>; /* Normal Mode */ | ||
| 172 | }; | ||
| 173 | |||
| 174 | ldo4_reg: LDO4 { | ||
| 175 | regulator-name = "VDDQ_PRE"; | ||
| 176 | regulator-min-microvolt = <1800000>; | ||
| 177 | regulator-max-microvolt = <1800000>; | ||
| 178 | regulator-always-on; | ||
| 179 | op_mode = <1>; /* Normal Mode */ | ||
| 180 | }; | ||
| 181 | |||
| 182 | ldo5_reg: LDO5 { | ||
| 183 | regulator-name = "VDD18_2M"; | ||
| 184 | regulator-min-microvolt = <1800000>; | ||
| 185 | regulator-max-microvolt = <1800000>; | ||
| 186 | regulator-always-on; | ||
| 187 | op_mode = <1>; /* Normal Mode */ | ||
| 188 | }; | ||
| 189 | |||
| 190 | ldo6_reg: LDO6 { | ||
| 191 | regulator-name = "VDD10_MPLL"; | ||
| 192 | regulator-min-microvolt = <1000000>; | ||
| 193 | regulator-max-microvolt = <1000000>; | ||
| 194 | regulator-always-on; | ||
| 195 | op_mode = <1>; /* Normal Mode */ | ||
| 196 | }; | ||
| 197 | |||
| 198 | ldo7_reg: LDO7 { | ||
| 199 | regulator-name = "VDD10_XPLL"; | ||
| 200 | regulator-min-microvolt = <1000000>; | ||
| 201 | regulator-max-microvolt = <1000000>; | ||
| 202 | regulator-always-on; | ||
| 203 | op_mode = <1>; /* Normal Mode */ | ||
| 204 | }; | ||
| 205 | |||
| 206 | ldo8_reg: LDO8 { | ||
| 207 | regulator-name = "VDD10_MIPI"; | ||
| 208 | regulator-min-microvolt = <1000000>; | ||
| 209 | regulator-max-microvolt = <1000000>; | ||
| 210 | regulator-always-on; | ||
| 211 | op_mode = <1>; /* Normal Mode */ | ||
| 212 | }; | ||
| 213 | |||
| 214 | ldo9_reg: LDO9 { | ||
| 215 | regulator-name = "VDD33_LCD"; | ||
| 216 | regulator-min-microvolt = <3300000>; | ||
| 217 | regulator-max-microvolt = <3300000>; | ||
| 218 | regulator-always-on; | ||
| 219 | op_mode = <1>; /* Normal Mode */ | ||
| 220 | }; | ||
| 221 | |||
| 222 | ldo10_reg: LDO10 { | ||
| 223 | regulator-name = "VDD18_MIPI"; | ||
| 224 | regulator-min-microvolt = <1800000>; | ||
| 225 | regulator-max-microvolt = <1800000>; | ||
| 226 | regulator-always-on; | ||
| 227 | op_mode = <1>; /* Normal Mode */ | ||
| 228 | }; | ||
| 229 | |||
| 230 | ldo11_reg: LDO11 { | ||
| 231 | regulator-name = "VDD18_ABB1"; | ||
| 232 | regulator-min-microvolt = <1800000>; | ||
| 233 | regulator-max-microvolt = <1800000>; | ||
| 234 | regulator-always-on; | ||
| 235 | op_mode = <1>; /* Normal Mode */ | ||
| 236 | }; | ||
| 237 | |||
| 238 | ldo12_reg: LDO12 { | ||
| 239 | regulator-name = "VDD33_UOTG"; | ||
| 240 | regulator-min-microvolt = <3300000>; | ||
| 241 | regulator-max-microvolt = <3300000>; | ||
| 242 | regulator-always-on; | ||
| 243 | op_mode = <1>; /* Normal Mode */ | ||
| 244 | }; | ||
| 245 | |||
| 246 | ldo13_reg: LDO13 { | ||
| 247 | regulator-name = "VDDIOPERI_18"; | ||
| 248 | regulator-min-microvolt = <1800000>; | ||
| 249 | regulator-max-microvolt = <1800000>; | ||
| 250 | regulator-always-on; | ||
| 251 | op_mode = <1>; /* Normal Mode */ | ||
| 252 | }; | ||
| 253 | |||
| 254 | ldo14_reg: LDO14 { | ||
| 255 | regulator-name = "VDD18_ABB02"; | ||
| 256 | regulator-min-microvolt = <1800000>; | ||
| 257 | regulator-max-microvolt = <1800000>; | ||
| 258 | regulator-always-on; | ||
| 259 | op_mode = <1>; /* Normal Mode */ | ||
| 260 | }; | ||
| 261 | |||
| 262 | ldo15_reg: LDO15 { | ||
| 263 | regulator-name = "VDD10_USH"; | ||
| 264 | regulator-min-microvolt = <1000000>; | ||
| 265 | regulator-max-microvolt = <1000000>; | ||
| 266 | regulator-always-on; | ||
| 267 | op_mode = <1>; /* Normal Mode */ | ||
| 268 | }; | ||
| 269 | |||
| 270 | ldo16_reg: LDO16 { | ||
| 271 | regulator-name = "VDD18_HSIC"; | ||
| 272 | regulator-min-microvolt = <1800000>; | ||
| 273 | regulator-max-microvolt = <1800000>; | ||
| 274 | regulator-always-on; | ||
| 275 | op_mode = <1>; /* Normal Mode */ | ||
| 276 | }; | ||
| 277 | |||
| 278 | ldo17_reg: LDO17 { | ||
| 279 | regulator-name = "VDDIOAP_MMC012_28"; | ||
| 280 | regulator-min-microvolt = <2800000>; | ||
| 281 | regulator-max-microvolt = <2800000>; | ||
| 282 | regulator-always-on; | ||
| 283 | op_mode = <1>; /* Normal Mode */ | ||
| 284 | }; | ||
| 285 | |||
| 286 | ldo18_reg: LDO18 { | ||
| 287 | regulator-name = "VDDIOPERI_28"; | ||
| 288 | regulator-min-microvolt = <2800000>; | ||
| 289 | regulator-max-microvolt = <2800000>; | ||
| 290 | regulator-always-on; | ||
| 291 | op_mode = <1>; /* Normal Mode */ | ||
| 292 | }; | ||
| 293 | |||
| 294 | ldo19_reg: LDO19 { | ||
| 295 | regulator-name = "DVDD25"; | ||
| 296 | regulator-min-microvolt = <2500000>; | ||
| 297 | regulator-max-microvolt = <2500000>; | ||
| 298 | regulator-always-on; | ||
| 299 | op_mode = <1>; /* Normal Mode */ | ||
| 300 | }; | ||
| 301 | |||
| 302 | ldo20_reg: LDO20 { | ||
| 303 | regulator-name = "VDD28_CAM"; | ||
| 304 | regulator-min-microvolt = <2800000>; | ||
| 305 | regulator-max-microvolt = <2800000>; | ||
| 306 | regulator-always-on; | ||
| 307 | op_mode = <1>; /* Normal Mode */ | ||
| 308 | }; | ||
| 309 | |||
| 310 | ldo21_reg: LDO21 { | ||
| 311 | regulator-name = "VDD28_AF"; | ||
| 312 | regulator-min-microvolt = <2800000>; | ||
| 313 | regulator-max-microvolt = <2800000>; | ||
| 314 | regulator-always-on; | ||
| 315 | op_mode = <1>; /* Normal Mode */ | ||
| 316 | }; | ||
| 317 | |||
| 318 | ldo22_reg: LDO22 { | ||
| 319 | regulator-name = "VDDA28_2M"; | ||
| 320 | regulator-min-microvolt = <2800000>; | ||
| 321 | regulator-max-microvolt = <2800000>; | ||
| 322 | regulator-always-on; | ||
| 323 | op_mode = <1>; /* Normal Mode */ | ||
| 324 | }; | ||
| 325 | |||
| 326 | ldo23_reg: LDO23 { | ||
| 327 | regulator-name = "VDD28_TF"; | ||
| 328 | regulator-min-microvolt = <2800000>; | ||
| 329 | regulator-max-microvolt = <2800000>; | ||
| 330 | regulator-always-on; | ||
| 331 | op_mode = <1>; /* Normal Mode */ | ||
| 332 | }; | ||
| 333 | |||
| 334 | ldo24_reg: LDO24 { | ||
| 335 | regulator-name = "VDD33_A31"; | ||
| 336 | regulator-min-microvolt = <3300000>; | ||
| 337 | regulator-max-microvolt = <3300000>; | ||
| 338 | regulator-always-on; | ||
| 339 | op_mode = <1>; /* Normal Mode */ | ||
| 340 | }; | ||
| 341 | |||
| 342 | ldo25_reg: LDO25 { | ||
| 343 | regulator-name = "VDD18_CAM"; | ||
| 344 | regulator-min-microvolt = <1800000>; | ||
| 345 | regulator-max-microvolt = <1800000>; | ||
| 346 | regulator-always-on; | ||
| 347 | op_mode = <1>; /* Normal Mode */ | ||
| 348 | }; | ||
| 349 | |||
| 350 | ldo26_reg: LDO26 { | ||
| 351 | regulator-name = "VDD18_A31"; | ||
| 352 | regulator-min-microvolt = <1800000>; | ||
| 353 | regulator-max-microvolt = <1800000>; | ||
| 354 | regulator-always-on; | ||
| 355 | op_mode = <1>; /* Normal Mode */ | ||
| 356 | }; | ||
| 357 | |||
| 358 | ldo27_reg: LDO27 { | ||
| 359 | regulator-name = "GPS_1V8"; | ||
| 360 | regulator-min-microvolt = <1800000>; | ||
| 361 | regulator-max-microvolt = <1800000>; | ||
| 362 | regulator-always-on; | ||
| 363 | op_mode = <1>; /* Normal Mode */ | ||
| 364 | }; | ||
| 365 | |||
| 366 | ldo28_reg: LDO28 { | ||
| 367 | regulator-name = "DVDD12"; | ||
| 368 | regulator-min-microvolt = <1200000>; | ||
| 369 | regulator-max-microvolt = <1200000>; | ||
| 370 | regulator-always-on; | ||
| 371 | op_mode = <1>; /* Normal Mode */ | ||
| 372 | }; | ||
| 373 | |||
| 374 | buck1_reg: BUCK1 { | ||
| 375 | regulator-name = "vdd_mif"; | ||
| 376 | regulator-min-microvolt = <950000>; | ||
| 377 | regulator-max-microvolt = <1100000>; | ||
| 378 | regulator-always-on; | ||
| 379 | regulator-boot-on; | ||
| 380 | op_mode = <1>; /* Normal Mode */ | ||
| 381 | }; | ||
| 382 | |||
| 383 | buck2_reg: BUCK2 { | ||
| 384 | regulator-name = "vdd_arm"; | ||
| 385 | regulator-min-microvolt = <925000>; | ||
| 386 | regulator-max-microvolt = <1300000>; | ||
| 387 | regulator-always-on; | ||
| 388 | regulator-boot-on; | ||
| 389 | op_mode = <1>; /* Normal Mode */ | ||
| 390 | }; | ||
| 391 | |||
| 392 | buck3_reg: BUCK3 { | ||
| 393 | regulator-name = "vdd_int"; | ||
| 394 | regulator-min-microvolt = <900000>; | ||
| 395 | regulator-max-microvolt = <1200000>; | ||
| 396 | regulator-always-on; | ||
| 397 | regulator-boot-on; | ||
| 398 | op_mode = <1>; /* Normal Mode */ | ||
| 399 | }; | ||
| 400 | |||
| 401 | buck4_reg: BUCK4 { | ||
| 402 | regulator-name = "vdd_g3d"; | ||
| 403 | regulator-min-microvolt = <750000>; | ||
| 404 | regulator-max-microvolt = <1500000>; | ||
| 405 | regulator-always-on; | ||
| 406 | regulator-boot-on; | ||
| 407 | op_mode = <1>; /* Normal Mode */ | ||
| 408 | }; | ||
| 409 | |||
| 410 | buck5_reg: BUCK5 { | ||
| 411 | regulator-name = "vdd_m12"; | ||
| 412 | regulator-min-microvolt = <750000>; | ||
| 413 | regulator-max-microvolt = <1500000>; | ||
| 414 | regulator-always-on; | ||
| 415 | regulator-boot-on; | ||
| 416 | op_mode = <1>; /* Normal Mode */ | ||
| 417 | }; | ||
| 418 | |||
| 419 | buck6_reg: BUCK6 { | ||
| 420 | regulator-name = "vdd12_5m"; | ||
| 421 | regulator-min-microvolt = <750000>; | ||
| 422 | regulator-max-microvolt = <1500000>; | ||
| 423 | regulator-always-on; | ||
| 424 | regulator-boot-on; | ||
| 425 | op_mode = <1>; /* Normal Mode */ | ||
| 426 | }; | ||
| 427 | |||
| 428 | buck9_reg: BUCK9 { | ||
| 429 | regulator-name = "vddf28_emmc"; | ||
| 430 | regulator-min-microvolt = <750000>; | ||
| 431 | regulator-max-microvolt = <3000000>; | ||
| 432 | regulator-always-on; | ||
| 433 | regulator-boot-on; | ||
| 434 | op_mode = <1>; /* Normal Mode */ | ||
| 435 | }; | ||
| 436 | }; | ||
| 437 | }; | ||
| 438 | }; | ||
| 439 | |||
| 440 | fixed-rate-clocks { | ||
| 441 | xxti { | ||
| 442 | compatible = "samsung,clock-xxti"; | ||
| 443 | clock-frequency = <0>; | ||
| 444 | }; | ||
| 445 | |||
| 446 | xusbxti { | ||
| 447 | compatible = "samsung,clock-xusbxti"; | ||
| 448 | clock-frequency = <24000000>; | ||
| 449 | }; | ||
| 450 | }; | ||
| 451 | }; | ||
diff --git a/arch/arm/boot/dts/exynos4412-smdk4412.dts b/arch/arm/boot/dts/exynos4412-smdk4412.dts index f05bf575cc45..dd564310d4a5 100644 --- a/arch/arm/boot/dts/exynos4412-smdk4412.dts +++ b/arch/arm/boot/dts/exynos4412-smdk4412.dts | |||
| @@ -27,6 +27,27 @@ | |||
| 27 | bootargs ="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc"; | 27 | bootargs ="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc"; |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | g2d@10800000 { | ||
| 31 | status = "okay"; | ||
| 32 | }; | ||
| 33 | |||
| 34 | g2d@10800000 { | ||
| 35 | status = "okay"; | ||
| 36 | }; | ||
| 37 | |||
| 38 | sdhci@12530000 { | ||
| 39 | bus-width = <4>; | ||
| 40 | pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sd2_cd>; | ||
| 41 | pinctrl-names = "default"; | ||
| 42 | status = "okay"; | ||
| 43 | }; | ||
| 44 | |||
| 45 | codec@13400000 { | ||
| 46 | samsung,mfc-r = <0x43000000 0x800000>; | ||
| 47 | samsung,mfc-l = <0x51000000 0x800000>; | ||
| 48 | status = "okay"; | ||
| 49 | }; | ||
| 50 | |||
| 30 | serial@13800000 { | 51 | serial@13800000 { |
| 31 | status = "okay"; | 52 | status = "okay"; |
| 32 | }; | 53 | }; |
| @@ -42,4 +63,16 @@ | |||
| 42 | serial@13830000 { | 63 | serial@13830000 { |
| 43 | status = "okay"; | 64 | status = "okay"; |
| 44 | }; | 65 | }; |
| 66 | |||
| 67 | fixed-rate-clocks { | ||
| 68 | xxti { | ||
| 69 | compatible = "samsung,clock-xxti"; | ||
| 70 | clock-frequency = <0>; | ||
| 71 | }; | ||
| 72 | |||
| 73 | xusbxti { | ||
| 74 | compatible = "samsung,clock-xusbxti"; | ||
| 75 | clock-frequency = <24000000>; | ||
| 76 | }; | ||
| 77 | }; | ||
| 45 | }; | 78 | }; |
diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi index d7dfe312772a..d75c047e80a9 100644 --- a/arch/arm/boot/dts/exynos4412.dtsi +++ b/arch/arm/boot/dts/exynos4412.dtsi | |||
| @@ -25,4 +25,30 @@ | |||
| 25 | gic:interrupt-controller@10490000 { | 25 | gic:interrupt-controller@10490000 { |
| 26 | cpu-offset = <0x4000>; | 26 | cpu-offset = <0x4000>; |
| 27 | }; | 27 | }; |
| 28 | |||
| 29 | mct@10050000 { | ||
| 30 | compatible = "samsung,exynos4412-mct"; | ||
| 31 | reg = <0x10050000 0x800>; | ||
| 32 | interrupt-controller; | ||
| 33 | #interrups-cells = <2>; | ||
| 34 | interrupt-parent = <&mct_map>; | ||
| 35 | interrupts = <0 0>, <1 0>, <2 0>, <3 0>, | ||
| 36 | <4 0>, <5 0>, <6 0>, <7 0>; | ||
| 37 | clocks = <&clock 3>, <&clock 344>; | ||
| 38 | clock-names = "fin_pll", "mct"; | ||
| 39 | |||
| 40 | mct_map: mct-map { | ||
| 41 | #interrupt-cells = <2>; | ||
| 42 | #address-cells = <0>; | ||
| 43 | #size-cells = <0>; | ||
| 44 | interrupt-map = <0x0 0 &gic 0 57 0>, | ||
| 45 | <0x1 0 &combiner 12 5>, | ||
| 46 | <0x2 0 &combiner 12 6>, | ||
| 47 | <0x3 0 &combiner 12 7>, | ||
| 48 | <0x4 0 &gic 1 12 0>, | ||
| 49 | <0x5 0 &gic 1 12 0>, | ||
| 50 | <0x6 0 &gic 1 12 0>, | ||
| 51 | <0x7 0 &gic 1 12 0>; | ||
| 52 | }; | ||
| 53 | }; | ||
| 28 | }; | 54 | }; |
diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi index 9a8780694909..e3380a7a285c 100644 --- a/arch/arm/boot/dts/exynos4x12.dtsi +++ b/arch/arm/boot/dts/exynos4x12.dtsi | |||
| @@ -36,6 +36,12 @@ | |||
| 36 | <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>; | 36 | <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>; |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | clock: clock-controller@0x10030000 { | ||
| 40 | compatible = "samsung,exynos4412-clock"; | ||
| 41 | reg = <0x10030000 0x20000>; | ||
| 42 | #clock-cells = <1>; | ||
| 43 | }; | ||
| 44 | |||
| 39 | pinctrl_0: pinctrl@11400000 { | 45 | pinctrl_0: pinctrl@11400000 { |
| 40 | compatible = "samsung,exynos4x12-pinctrl"; | 46 | compatible = "samsung,exynos4x12-pinctrl"; |
| 41 | reg = <0x11400000 0x1000>; | 47 | reg = <0x11400000 0x1000>; |
| @@ -66,4 +72,11 @@ | |||
| 66 | reg = <0x106E0000 0x1000>; | 72 | reg = <0x106E0000 0x1000>; |
| 67 | interrupts = <0 72 0>; | 73 | interrupts = <0 72 0>; |
| 68 | }; | 74 | }; |
| 75 | |||
| 76 | g2d@10800000 { | ||
| 77 | compatible = "samsung,exynos4212-g2d"; | ||
| 78 | reg = <0x10800000 0x1000>; | ||
| 79 | interrupts = <0 89 0>; | ||
| 80 | status = "disabled"; | ||
| 81 | }; | ||
| 69 | }; | 82 | }; |
diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts new file mode 100644 index 000000000000..02cfc76d002f --- /dev/null +++ b/arch/arm/boot/dts/exynos5250-arndale.dts | |||
| @@ -0,0 +1,452 @@ | |||
| 1 | /* | ||
| 2 | * Samsung's Exynos5250 based Arndale board device tree source | ||
| 3 | * | ||
| 4 | * Copyright (c) 2013 Samsung Electronics Co., Ltd. | ||
| 5 | * http://www.samsung.com | ||
| 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 | /dts-v1/; | ||
| 13 | /include/ "exynos5250.dtsi" | ||
| 14 | |||
| 15 | / { | ||
| 16 | model = "Insignal Arndale evaluation board based on EXYNOS5250"; | ||
| 17 | compatible = "insignal,arndale", "samsung,exynos5250"; | ||
| 18 | |||
| 19 | memory { | ||
| 20 | reg = <0x40000000 0x80000000>; | ||
| 21 | }; | ||
| 22 | |||
| 23 | chosen { | ||
| 24 | bootargs = "console=ttySAC2,115200"; | ||
| 25 | }; | ||
| 26 | |||
| 27 | codec@11000000 { | ||
| 28 | samsung,mfc-r = <0x43000000 0x800000>; | ||
| 29 | samsung,mfc-l = <0x51000000 0x800000>; | ||
| 30 | }; | ||
| 31 | |||
| 32 | i2c@12C60000 { | ||
| 33 | samsung,i2c-sda-delay = <100>; | ||
| 34 | samsung,i2c-max-bus-freq = <20000>; | ||
| 35 | samsung,i2c-slave-addr = <0x66>; | ||
| 36 | |||
| 37 | s5m8767_pmic@66 { | ||
| 38 | compatible = "samsung,s5m8767-pmic"; | ||
| 39 | reg = <0x66>; | ||
| 40 | |||
| 41 | s5m8767,pmic-buck2-dvs-voltage = <1300000>; | ||
| 42 | s5m8767,pmic-buck3-dvs-voltage = <1100000>; | ||
| 43 | s5m8767,pmic-buck4-dvs-voltage = <1200000>; | ||
| 44 | s5m8767,pmic-buck-dvs-gpios = <&gpd1 0 0>, | ||
| 45 | <&gpd1 1 0>, | ||
| 46 | <&gpd1 2 0>; | ||
| 47 | s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, | ||
| 48 | <&gpx2 4 0>, | ||
| 49 | <&gpx2 5 0>; | ||
| 50 | regulators { | ||
| 51 | ldo1_reg: LDO1 { | ||
| 52 | regulator-name = "VDD_ALIVE_1.0V"; | ||
| 53 | regulator-min-microvolt = <1100000>; | ||
| 54 | regulator-max-microvolt = <1100000>; | ||
| 55 | regulator-always-on; | ||
| 56 | regulator-boot-on; | ||
| 57 | op_mode = <1>; | ||
| 58 | }; | ||
| 59 | |||
| 60 | ldo2_reg: LDO2 { | ||
| 61 | regulator-name = "VDD_28IO_DP_1.35V"; | ||
| 62 | regulator-min-microvolt = <1200000>; | ||
| 63 | regulator-max-microvolt = <1200000>; | ||
| 64 | regulator-always-on; | ||
| 65 | regulator-boot-on; | ||
| 66 | op_mode = <1>; | ||
| 67 | }; | ||
| 68 | |||
| 69 | ldo3_reg: LDO3 { | ||
| 70 | regulator-name = "VDD_COMMON1_1.8V"; | ||
| 71 | regulator-min-microvolt = <1800000>; | ||
| 72 | regulator-max-microvolt = <1800000>; | ||
| 73 | regulator-always-on; | ||
| 74 | regulator-boot-on; | ||
| 75 | op_mode = <1>; | ||
| 76 | }; | ||
| 77 | |||
| 78 | ldo4_reg: LDO4 { | ||
| 79 | regulator-name = "VDD_IOPERI_1.8V"; | ||
| 80 | regulator-min-microvolt = <1800000>; | ||
| 81 | regulator-max-microvolt = <1800000>; | ||
| 82 | op_mode = <1>; | ||
| 83 | }; | ||
| 84 | |||
| 85 | ldo5_reg: LDO5 { | ||
| 86 | regulator-name = "VDD_EXT_1.8V"; | ||
| 87 | regulator-min-microvolt = <1800000>; | ||
| 88 | regulator-max-microvolt = <1800000>; | ||
| 89 | regulator-always-on; | ||
| 90 | regulator-boot-on; | ||
| 91 | op_mode = <1>; | ||
| 92 | }; | ||
| 93 | |||
| 94 | ldo6_reg: LDO6 { | ||
| 95 | regulator-name = "VDD_MPLL_1.1V"; | ||
| 96 | regulator-min-microvolt = <1100000>; | ||
| 97 | regulator-max-microvolt = <1100000>; | ||
| 98 | regulator-always-on; | ||
| 99 | regulator-boot-on; | ||
| 100 | op_mode = <1>; | ||
| 101 | }; | ||
| 102 | |||
| 103 | ldo7_reg: LDO7 { | ||
| 104 | regulator-name = "VDD_XPLL_1.1V"; | ||
| 105 | regulator-min-microvolt = <1100000>; | ||
| 106 | regulator-max-microvolt = <1100000>; | ||
| 107 | regulator-always-on; | ||
| 108 | regulator-boot-on; | ||
| 109 | op_mode = <1>; | ||
| 110 | }; | ||
| 111 | |||
| 112 | ldo8_reg: LDO8 { | ||
| 113 | regulator-name = "VDD_COMMON2_1.0V"; | ||
| 114 | regulator-min-microvolt = <1000000>; | ||
| 115 | regulator-max-microvolt = <1000000>; | ||
| 116 | regulator-always-on; | ||
| 117 | regulator-boot-on; | ||
| 118 | op_mode = <1>; | ||
| 119 | }; | ||
| 120 | |||
| 121 | ldo9_reg: LDO9 { | ||
| 122 | regulator-name = "VDD_33ON_3.0V"; | ||
| 123 | regulator-min-microvolt = <3000000>; | ||
| 124 | regulator-max-microvolt = <3000000>; | ||
| 125 | op_mode = <1>; | ||
| 126 | }; | ||
| 127 | |||
| 128 | ldo10_reg: LDO10 { | ||
| 129 | regulator-name = "VDD_COMMON3_1.8V"; | ||
| 130 | regulator-min-microvolt = <1800000>; | ||
| 131 | regulator-max-microvolt = <1800000>; | ||
| 132 | regulator-always-on; | ||
| 133 | regulator-boot-on; | ||
| 134 | op_mode = <1>; | ||
| 135 | }; | ||
| 136 | |||
| 137 | ldo11_reg: LDO11 { | ||
| 138 | regulator-name = "VDD_ABB2_1.8V"; | ||
| 139 | regulator-min-microvolt = <1800000>; | ||
| 140 | regulator-max-microvolt = <1800000>; | ||
| 141 | regulator-always-on; | ||
| 142 | regulator-boot-on; | ||
| 143 | op_mode = <1>; | ||
| 144 | }; | ||
| 145 | |||
| 146 | ldo12_reg: LDO12 { | ||
| 147 | regulator-name = "VDD_USB_3.0V"; | ||
| 148 | regulator-min-microvolt = <3000000>; | ||
| 149 | regulator-max-microvolt = <3000000>; | ||
| 150 | regulator-always-on; | ||
| 151 | regulator-boot-on; | ||
| 152 | op_mode = <1>; | ||
| 153 | }; | ||
| 154 | |||
| 155 | ldo13_reg: LDO13 { | ||
| 156 | regulator-name = "VDDQ_C2C_W_1.8V"; | ||
| 157 | regulator-min-microvolt = <1800000>; | ||
| 158 | regulator-max-microvolt = <1800000>; | ||
| 159 | regulator-always-on; | ||
| 160 | regulator-boot-on; | ||
| 161 | op_mode = <1>; | ||
| 162 | }; | ||
| 163 | |||
| 164 | ldo14_reg: LDO14 { | ||
| 165 | regulator-name = "VDD18_ABB0_3_1.8V"; | ||
| 166 | regulator-min-microvolt = <1800000>; | ||
| 167 | regulator-max-microvolt = <1800000>; | ||
| 168 | regulator-always-on; | ||
| 169 | regulator-boot-on; | ||
| 170 | op_mode = <1>; | ||
| 171 | }; | ||
| 172 | |||
| 173 | ldo15_reg: LDO15 { | ||
| 174 | regulator-name = "VDD10_COMMON4_1.0V"; | ||
| 175 | regulator-min-microvolt = <1000000>; | ||
| 176 | regulator-max-microvolt = <1000000>; | ||
| 177 | regulator-always-on; | ||
| 178 | regulator-boot-on; | ||
| 179 | op_mode = <1>; | ||
| 180 | }; | ||
| 181 | |||
| 182 | ldo16_reg: LDO16 { | ||
| 183 | regulator-name = "VDD18_HSIC_1.8V"; | ||
| 184 | regulator-min-microvolt = <1800000>; | ||
| 185 | regulator-max-microvolt = <1800000>; | ||
| 186 | regulator-always-on; | ||
| 187 | regulator-boot-on; | ||
| 188 | op_mode = <1>; | ||
| 189 | }; | ||
| 190 | |||
| 191 | ldo17_reg: LDO17 { | ||
| 192 | regulator-name = "VDDQ_MMC2_3_2.8V"; | ||
| 193 | regulator-min-microvolt = <2800000>; | ||
| 194 | regulator-max-microvolt = <2800000>; | ||
| 195 | regulator-always-on; | ||
| 196 | regulator-boot-on; | ||
| 197 | op_mode = <1>; | ||
| 198 | }; | ||
| 199 | |||
| 200 | ldo18_reg: LDO18 { | ||
| 201 | regulator-name = "VDD_33ON_2.8V"; | ||
| 202 | regulator-min-microvolt = <2800000>; | ||
| 203 | regulator-max-microvolt = <2800000>; | ||
| 204 | op_mode = <1>; | ||
| 205 | }; | ||
| 206 | |||
| 207 | ldo22_reg: LDO22 { | ||
| 208 | regulator-name = "EXT_33_OFF"; | ||
| 209 | regulator-min-microvolt = <3300000>; | ||
| 210 | regulator-max-microvolt = <3300000>; | ||
| 211 | op_mode = <1>; | ||
| 212 | }; | ||
| 213 | |||
| 214 | ldo23_reg: LDO23 { | ||
| 215 | regulator-name = "EXT_28_OFF"; | ||
| 216 | regulator-min-microvolt = <2800000>; | ||
| 217 | regulator-max-microvolt = <2800000>; | ||
| 218 | op_mode = <1>; | ||
| 219 | }; | ||
| 220 | |||
| 221 | ldo25_reg: LDO25 { | ||
| 222 | regulator-name = "PVDD_LDO25"; | ||
| 223 | regulator-min-microvolt = <1200000>; | ||
| 224 | regulator-max-microvolt = <1200000>; | ||
| 225 | op_mode = <1>; | ||
| 226 | }; | ||
| 227 | |||
| 228 | ldo26_reg: LDO26 { | ||
| 229 | regulator-name = "EXT_18_OFF"; | ||
| 230 | regulator-min-microvolt = <1800000>; | ||
| 231 | regulator-max-microvolt = <1800000>; | ||
| 232 | op_mode = <1>; | ||
| 233 | }; | ||
| 234 | |||
| 235 | buck1_reg: BUCK1 { | ||
| 236 | regulator-name = "vdd_mif"; | ||
| 237 | regulator-min-microvolt = <950000>; | ||
| 238 | regulator-max-microvolt = <1200000>; | ||
| 239 | regulator-always-on; | ||
| 240 | regulator-boot-on; | ||
| 241 | op_mode = <1>; | ||
| 242 | }; | ||
| 243 | |||
| 244 | buck2_reg: BUCK2 { | ||
| 245 | regulator-name = "vdd_arm"; | ||
| 246 | regulator-min-microvolt = <925000>; | ||
| 247 | regulator-max-microvolt = <1300000>; | ||
| 248 | regulator-always-on; | ||
| 249 | regulator-boot-on; | ||
| 250 | op_mode = <1>; | ||
| 251 | }; | ||
| 252 | |||
| 253 | buck3_reg: BUCK3 { | ||
| 254 | regulator-name = "vdd_int"; | ||
| 255 | regulator-min-microvolt = <900000>; | ||
| 256 | regulator-max-microvolt = <1200000>; | ||
| 257 | regulator-always-on; | ||
| 258 | regulator-boot-on; | ||
| 259 | op_mode = <1>; | ||
| 260 | }; | ||
| 261 | |||
| 262 | buck4_reg: BUCK4 { | ||
| 263 | regulator-name = "vdd_g3d"; | ||
| 264 | regulator-min-microvolt = <1000000>; | ||
| 265 | regulator-max-microvolt = <1000000>; | ||
| 266 | regulator-boot-on; | ||
| 267 | op_mode = <1>; | ||
| 268 | }; | ||
| 269 | |||
| 270 | buck5_reg: BUCK5 { | ||
| 271 | regulator-name = "VDD_MEM_1.35V"; | ||
| 272 | regulator-min-microvolt = <750000>; | ||
| 273 | regulator-max-microvolt = <1355000>; | ||
| 274 | regulator-always-on; | ||
| 275 | regulator-boot-on; | ||
| 276 | op_mode = <1>; | ||
| 277 | }; | ||
| 278 | |||
| 279 | buck9_reg: BUCK9 { | ||
| 280 | regulator-name = "VDD_33_OFF_EXT1"; | ||
| 281 | regulator-min-microvolt = <750000>; | ||
| 282 | regulator-max-microvolt = <3000000>; | ||
| 283 | op_mode = <1>; | ||
| 284 | }; | ||
| 285 | }; | ||
| 286 | }; | ||
| 287 | }; | ||
| 288 | |||
| 289 | i2c@12C70000 { | ||
| 290 | status = "disabled"; | ||
| 291 | }; | ||
| 292 | |||
| 293 | i2c@12C80000 { | ||
| 294 | status = "disabled"; | ||
| 295 | }; | ||
| 296 | |||
| 297 | i2c@12C90000 { | ||
| 298 | status = "disabled"; | ||
| 299 | }; | ||
| 300 | |||
| 301 | i2c@12CA0000 { | ||
| 302 | status = "disabled"; | ||
| 303 | }; | ||
| 304 | |||
| 305 | i2c@12CB0000 { | ||
| 306 | status = "disabled"; | ||
| 307 | }; | ||
| 308 | |||
| 309 | i2c@12CC0000 { | ||
| 310 | status = "disabled"; | ||
| 311 | }; | ||
| 312 | |||
| 313 | i2c@12CD0000 { | ||
| 314 | status = "disabled"; | ||
| 315 | }; | ||
| 316 | |||
| 317 | i2c@121D0000 { | ||
| 318 | status = "disabled"; | ||
| 319 | }; | ||
| 320 | |||
| 321 | dwmmc_0: dwmmc0@12200000 { | ||
| 322 | num-slots = <1>; | ||
| 323 | supports-highspeed; | ||
| 324 | broken-cd; | ||
| 325 | fifo-depth = <0x80>; | ||
| 326 | card-detect-delay = <200>; | ||
| 327 | samsung,dw-mshc-ciu-div = <3>; | ||
| 328 | samsung,dw-mshc-sdr-timing = <2 3>; | ||
| 329 | samsung,dw-mshc-ddr-timing = <1 2>; | ||
| 330 | vmmc-supply = <&mmc_reg>; | ||
| 331 | pinctrl-names = "default"; | ||
| 332 | pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>; | ||
| 333 | |||
| 334 | slot@0 { | ||
| 335 | reg = <0>; | ||
| 336 | bus-width = <8>; | ||
| 337 | }; | ||
| 338 | }; | ||
| 339 | |||
| 340 | dwmmc_1: dwmmc1@12210000 { | ||
| 341 | status = "disabled"; | ||
| 342 | }; | ||
| 343 | |||
| 344 | dwmmc_2: dwmmc2@12220000 { | ||
| 345 | num-slots = <1>; | ||
| 346 | supports-highspeed; | ||
| 347 | fifo-depth = <0x80>; | ||
| 348 | card-detect-delay = <200>; | ||
| 349 | samsung,dw-mshc-ciu-div = <3>; | ||
| 350 | samsung,dw-mshc-sdr-timing = <2 3>; | ||
| 351 | samsung,dw-mshc-ddr-timing = <1 2>; | ||
| 352 | vmmc-supply = <&mmc_reg>; | ||
| 353 | pinctrl-names = "default"; | ||
| 354 | pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; | ||
| 355 | |||
| 356 | slot@0 { | ||
| 357 | reg = <0>; | ||
| 358 | bus-width = <4>; | ||
| 359 | disable-wp; | ||
| 360 | }; | ||
| 361 | }; | ||
| 362 | |||
| 363 | dwmmc_3: dwmmc3@12230000 { | ||
| 364 | status = "disabled"; | ||
| 365 | }; | ||
| 366 | |||
| 367 | spi_0: spi@12d20000 { | ||
| 368 | status = "disabled"; | ||
| 369 | }; | ||
| 370 | |||
| 371 | spi_1: spi@12d30000 { | ||
| 372 | status = "disabled"; | ||
| 373 | }; | ||
| 374 | |||
| 375 | spi_2: spi@12d40000 { | ||
| 376 | status = "disabled"; | ||
| 377 | }; | ||
| 378 | |||
| 379 | gpio_keys { | ||
| 380 | compatible = "gpio-keys"; | ||
| 381 | |||
| 382 | menu { | ||
| 383 | label = "SW-TACT2"; | ||
| 384 | gpios = <&gpx1 4 1>; | ||
| 385 | linux,code = <139>; | ||
| 386 | gpio-key,wakeup; | ||
| 387 | }; | ||
| 388 | |||
| 389 | home { | ||
| 390 | label = "SW-TACT3"; | ||
| 391 | gpios = <&gpx1 5 1>; | ||
| 392 | linux,code = <102>; | ||
| 393 | gpio-key,wakeup; | ||
| 394 | }; | ||
| 395 | |||
| 396 | up { | ||
| 397 | label = "SW-TACT4"; | ||
| 398 | gpios = <&gpx1 6 1>; | ||
| 399 | linux,code = <103>; | ||
| 400 | gpio-key,wakeup; | ||
| 401 | }; | ||
| 402 | |||
| 403 | down { | ||
| 404 | label = "SW-TACT5"; | ||
| 405 | gpios = <&gpx1 7 1>; | ||
| 406 | linux,code = <108>; | ||
| 407 | gpio-key,wakeup; | ||
| 408 | }; | ||
| 409 | |||
| 410 | back { | ||
| 411 | label = "SW-TACT6"; | ||
| 412 | gpios = <&gpx2 0 1>; | ||
| 413 | linux,code = <158>; | ||
| 414 | gpio-key,wakeup; | ||
| 415 | }; | ||
| 416 | |||
| 417 | wakeup { | ||
| 418 | label = "SW-TACT7"; | ||
| 419 | gpios = <&gpx2 1 1>; | ||
| 420 | linux,code = <143>; | ||
| 421 | gpio-key,wakeup; | ||
| 422 | }; | ||
| 423 | }; | ||
| 424 | |||
| 425 | hdmi { | ||
| 426 | hpd-gpio = <&gpx3 7 2>; | ||
| 427 | vdd_osc-supply = <&ldo10_reg>; | ||
| 428 | vdd_pll-supply = <&ldo8_reg>; | ||
| 429 | vdd-supply = <&ldo8_reg>; | ||
| 430 | }; | ||
| 431 | |||
| 432 | mmc_reg: voltage-regulator { | ||
| 433 | compatible = "regulator-fixed"; | ||
| 434 | regulator-name = "VDD_33ON_2.8V"; | ||
| 435 | regulator-min-microvolt = <2800000>; | ||
| 436 | regulator-max-microvolt = <2800000>; | ||
| 437 | gpio = <&gpx1 1 1>; | ||
| 438 | enable-active-high; | ||
| 439 | }; | ||
| 440 | |||
| 441 | reg_hdmi_en: fixedregulator@0 { | ||
| 442 | compatible = "regulator-fixed"; | ||
| 443 | regulator-name = "hdmi-en"; | ||
| 444 | }; | ||
| 445 | |||
| 446 | fixed-rate-clocks { | ||
| 447 | xxti { | ||
| 448 | compatible = "samsung,clock-xxti"; | ||
| 449 | clock-frequency = <24000000>; | ||
| 450 | }; | ||
| 451 | }; | ||
| 452 | }; | ||
diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi new file mode 100644 index 000000000000..d1650fb34c0a --- /dev/null +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi | |||
| @@ -0,0 +1,783 @@ | |||
| 1 | /* | ||
| 2 | * Samsung's Exynos5250 SoC pin-mux and pin-config device tree source | ||
| 3 | * | ||
| 4 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
| 5 | * http://www.samsung.com | ||
| 6 | * | ||
| 7 | * Samsung's Exynos5250 SoC pin-mux and pin-config optiosn are listed as device | ||
| 8 | * tree nodes are listed in this file. | ||
| 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 | / { | ||
| 16 | pinctrl@11400000 { | ||
| 17 | gpa0: gpa0 { | ||
| 18 | gpio-controller; | ||
| 19 | #gpio-cells = <2>; | ||
| 20 | |||
| 21 | interrupt-controller; | ||
| 22 | #interrupt-cells = <2>; | ||
| 23 | }; | ||
| 24 | |||
| 25 | gpa1: gpa1 { | ||
| 26 | gpio-controller; | ||
| 27 | #gpio-cells = <2>; | ||
| 28 | |||
| 29 | interrupt-controller; | ||
| 30 | #interrupt-cells = <2>; | ||
| 31 | }; | ||
| 32 | |||
| 33 | gpa2: gpa2 { | ||
| 34 | gpio-controller; | ||
| 35 | #gpio-cells = <2>; | ||
| 36 | |||
| 37 | interrupt-controller; | ||
| 38 | #interrupt-cells = <2>; | ||
| 39 | }; | ||
| 40 | |||
| 41 | gpb0: gpb0 { | ||
| 42 | gpio-controller; | ||
| 43 | #gpio-cells = <2>; | ||
| 44 | |||
| 45 | interrupt-controller; | ||
| 46 | #interrupt-cells = <2>; | ||
| 47 | }; | ||
| 48 | |||
| 49 | gpb1: gpb1 { | ||
| 50 | gpio-controller; | ||
| 51 | #gpio-cells = <2>; | ||
| 52 | |||
| 53 | interrupt-controller; | ||
| 54 | #interrupt-cells = <2>; | ||
| 55 | }; | ||
| 56 | |||
| 57 | gpb2: gpb2 { | ||
| 58 | gpio-controller; | ||
| 59 | #gpio-cells = <2>; | ||
| 60 | |||
| 61 | interrupt-controller; | ||
| 62 | #interrupt-cells = <2>; | ||
| 63 | }; | ||
| 64 | |||
| 65 | gpb3: gpb3 { | ||
| 66 | gpio-controller; | ||
| 67 | #gpio-cells = <2>; | ||
| 68 | |||
| 69 | interrupt-controller; | ||
| 70 | #interrupt-cells = <2>; | ||
| 71 | }; | ||
| 72 | |||
| 73 | gpc0: gpc0 { | ||
| 74 | gpio-controller; | ||
| 75 | #gpio-cells = <2>; | ||
| 76 | |||
| 77 | interrupt-controller; | ||
| 78 | #interrupt-cells = <2>; | ||
| 79 | }; | ||
| 80 | |||
| 81 | gpc1: gpc1 { | ||
| 82 | gpio-controller; | ||
| 83 | #gpio-cells = <2>; | ||
| 84 | |||
| 85 | interrupt-controller; | ||
| 86 | #interrupt-cells = <2>; | ||
| 87 | }; | ||
| 88 | |||
| 89 | gpc2: gpc2 { | ||
| 90 | gpio-controller; | ||
| 91 | #gpio-cells = <2>; | ||
| 92 | |||
| 93 | interrupt-controller; | ||
| 94 | #interrupt-cells = <2>; | ||
| 95 | }; | ||
| 96 | |||
| 97 | gpc3: gpc3 { | ||
| 98 | gpio-controller; | ||
| 99 | #gpio-cells = <2>; | ||
| 100 | |||
| 101 | interrupt-controller; | ||
| 102 | #interrupt-cells = <2>; | ||
| 103 | }; | ||
| 104 | |||
| 105 | gpd0: gpd0 { | ||
| 106 | gpio-controller; | ||
| 107 | #gpio-cells = <2>; | ||
| 108 | |||
| 109 | interrupt-controller; | ||
| 110 | #interrupt-cells = <2>; | ||
| 111 | }; | ||
| 112 | |||
| 113 | gpd1: gpd1 { | ||
| 114 | gpio-controller; | ||
| 115 | #gpio-cells = <2>; | ||
| 116 | |||
| 117 | interrupt-controller; | ||
| 118 | #interrupt-cells = <2>; | ||
| 119 | }; | ||
| 120 | |||
| 121 | gpy0: gpy0 { | ||
| 122 | gpio-controller; | ||
| 123 | #gpio-cells = <2>; | ||
| 124 | }; | ||
| 125 | |||
| 126 | gpy1: gpy1 { | ||
| 127 | gpio-controller; | ||
| 128 | #gpio-cells = <2>; | ||
| 129 | }; | ||
| 130 | |||
| 131 | gpy2: gpy2 { | ||
| 132 | gpio-controller; | ||
| 133 | #gpio-cells = <2>; | ||
| 134 | }; | ||
| 135 | |||
| 136 | gpy3: gpy3 { | ||
| 137 | gpio-controller; | ||
| 138 | #gpio-cells = <2>; | ||
| 139 | }; | ||
| 140 | |||
| 141 | gpy4: gpy4 { | ||
| 142 | gpio-controller; | ||
| 143 | #gpio-cells = <2>; | ||
| 144 | }; | ||
| 145 | |||
| 146 | gpy5: gpy5 { | ||
| 147 | gpio-controller; | ||
| 148 | #gpio-cells = <2>; | ||
| 149 | }; | ||
| 150 | |||
| 151 | gpy6: gpy6 { | ||
| 152 | gpio-controller; | ||
| 153 | #gpio-cells = <2>; | ||
| 154 | }; | ||
| 155 | |||
| 156 | gpc4: gpc4 { | ||
| 157 | gpio-controller; | ||
| 158 | #gpio-cells = <2>; | ||
| 159 | |||
| 160 | interrupt-controller; | ||
| 161 | #interrupt-cells = <2>; | ||
| 162 | }; | ||
| 163 | |||
| 164 | gpx0: gpx0 { | ||
| 165 | gpio-controller; | ||
| 166 | #gpio-cells = <2>; | ||
| 167 | |||
| 168 | interrupt-controller; | ||
| 169 | interrupt-parent = <&combiner>; | ||
| 170 | #interrupt-cells = <2>; | ||
| 171 | interrupts = <23 0>, <24 0>, <25 0>, <25 1>, | ||
| 172 | <26 0>, <26 1>, <27 0>, <27 1>; | ||
| 173 | }; | ||
| 174 | |||
| 175 | gpx1: gpx1 { | ||
| 176 | gpio-controller; | ||
| 177 | #gpio-cells = <2>; | ||
| 178 | |||
| 179 | interrupt-controller; | ||
| 180 | interrupt-parent = <&combiner>; | ||
| 181 | #interrupt-cells = <2>; | ||
| 182 | interrupts = <28 0>, <28 1>, <29 0>, <29 1>, | ||
| 183 | <30 0>, <30 1>, <31 0>, <31 1>; | ||
| 184 | }; | ||
| 185 | |||
| 186 | gpx2: gpx2 { | ||
| 187 | gpio-controller; | ||
| 188 | #gpio-cells = <2>; | ||
| 189 | |||
| 190 | interrupt-controller; | ||
| 191 | #interrupt-cells = <2>; | ||
| 192 | }; | ||
| 193 | |||
| 194 | gpx3: gpx3 { | ||
| 195 | gpio-controller; | ||
| 196 | #gpio-cells = <2>; | ||
| 197 | |||
| 198 | interrupt-controller; | ||
| 199 | #interrupt-cells = <2>; | ||
| 200 | }; | ||
| 201 | |||
| 202 | uart0_data: uart0-data { | ||
| 203 | samsung,pins = "gpa0-0", "gpa0-1"; | ||
| 204 | samsung,pin-function = <2>; | ||
| 205 | samsung,pin-pud = <0>; | ||
| 206 | samsung,pin-drv = <0>; | ||
| 207 | }; | ||
| 208 | |||
| 209 | uart0_fctl: uart0-fctl { | ||
| 210 | samsung,pins = "gpa0-2", "gpa0-3"; | ||
| 211 | samsung,pin-function = <2>; | ||
| 212 | samsung,pin-pud = <0>; | ||
| 213 | samaung,pin-drv = <0>; | ||
| 214 | }; | ||
| 215 | |||
| 216 | i2c2_bus: i2c2-bus { | ||
| 217 | samsung,pins = "gpa0-6", "gpa0-7"; | ||
| 218 | samsung,pin-function = <3>; | ||
| 219 | samsung,pin-pud = <3>; | ||
| 220 | samaung,pin-drv = <0>; | ||
| 221 | }; | ||
| 222 | |||
| 223 | i2c2_hs_bus: i2c2-hs-bus { | ||
| 224 | samsung,pins = "gpa0-6", "gpa0-7"; | ||
| 225 | samsung,pin-function = <4>; | ||
| 226 | samsung,pin-pud = <3>; | ||
| 227 | samaung,pin-drv = <0>; | ||
| 228 | }; | ||
| 229 | |||
| 230 | uart2_data: uart2-data { | ||
| 231 | samsung,pins = "gpa1-0", "gpa1-1"; | ||
| 232 | samsung,pin-function = <2>; | ||
| 233 | samsung,pin-pud = <0>; | ||
| 234 | samsung,pin-drv = <0>; | ||
| 235 | }; | ||
| 236 | |||
| 237 | uart2_fctl: uart2-fctl { | ||
| 238 | samsung,pins = "gpa1-2", "gpa1-3"; | ||
| 239 | samsung,pin-function = <2>; | ||
| 240 | samsung,pin-pud = <0>; | ||
| 241 | samaung,pin-drv = <0>; | ||
| 242 | }; | ||
| 243 | |||
| 244 | i2c3_bus: i2c3-bus { | ||
| 245 | samsung,pins = "gpa1-2", "gpa1-3"; | ||
| 246 | samsung,pin-function = <3>; | ||
| 247 | samsung,pin-pud = <3>; | ||
| 248 | samaung,pin-drv = <0>; | ||
| 249 | }; | ||
| 250 | |||
| 251 | i2c3_hs_bus: i2c3-hs-bus { | ||
| 252 | samsung,pins = "gpa1-2", "gpa1-3"; | ||
| 253 | samsung,pin-function = <4>; | ||
| 254 | samsung,pin-pud = <3>; | ||
| 255 | samaung,pin-drv = <0>; | ||
| 256 | }; | ||
| 257 | |||
| 258 | uart3_data: uart3-data { | ||
| 259 | samsung,pins = "gpa1-4", "gpa1-4"; | ||
| 260 | samsung,pin-function = <2>; | ||
| 261 | samsung,pin-pud = <0>; | ||
| 262 | samsung,pin-drv = <0>; | ||
| 263 | }; | ||
| 264 | |||
| 265 | spi0_bus: spi0-bus { | ||
| 266 | samsung,pins = "gpa2-0", "gpa2-2", "gpa2-3"; | ||
| 267 | samsung,pin-function = <2>; | ||
| 268 | samsung,pin-pud = <3>; | ||
| 269 | samsung,pin-drv = <0>; | ||
| 270 | }; | ||
| 271 | |||
| 272 | i2c4_bus: i2c4-bus { | ||
| 273 | samsung,pins = "gpa2-0", "gpa2-1"; | ||
| 274 | samsung,pin-function = <3>; | ||
| 275 | samsung,pin-pud = <3>; | ||
| 276 | samaung,pin-drv = <0>; | ||
| 277 | }; | ||
| 278 | |||
| 279 | i2c5_bus: i2c5-bus { | ||
| 280 | samsung,pins = "gpa2-2", "gpa2-3"; | ||
| 281 | samsung,pin-function = <3>; | ||
| 282 | samsung,pin-pud = <3>; | ||
| 283 | samaung,pin-drv = <0>; | ||
| 284 | }; | ||
| 285 | |||
| 286 | spi1_bus: spi1-bus { | ||
| 287 | samsung,pins = "gpa2-4", "gpa2-6", "gpa2-7"; | ||
| 288 | samsung,pin-function = <2>; | ||
| 289 | samsung,pin-pud = <3>; | ||
| 290 | samsung,pin-drv = <0>; | ||
| 291 | }; | ||
| 292 | |||
| 293 | i2s1_bus: i2s1-bus { | ||
| 294 | samsung,pins = "gpb0-0", "gpb0-1", "gpb0-2", "gpb0-3", | ||
| 295 | "gpb0-4"; | ||
| 296 | samsung,pin-function = <2>; | ||
| 297 | samsung,pin-pud = <0>; | ||
| 298 | samsung,pin-drv = <0>; | ||
| 299 | }; | ||
| 300 | |||
| 301 | pcm1_bus: pcm1-bus { | ||
| 302 | samsung,pins = "gpb0-0", "gpb0-1", "gpb0-2", "gpb0-3", | ||
| 303 | "gpb0-4"; | ||
| 304 | samsung,pin-function = <3>; | ||
| 305 | samsung,pin-pud = <0>; | ||
| 306 | samsung,pin-drv = <0>; | ||
| 307 | }; | ||
| 308 | |||
| 309 | ac97_bus: ac97-bus { | ||
| 310 | samsung,pins = "gpb0-0", "gpb0-1", "gpb0-2", "gpb0-3", | ||
| 311 | "gpb0-4"; | ||
| 312 | samsung,pin-function = <4>; | ||
| 313 | samsung,pin-pud = <0>; | ||
| 314 | samsung,pin-drv = <0>; | ||
| 315 | }; | ||
| 316 | |||
| 317 | i2s2_bus: i2s2-bus { | ||
| 318 | samsung,pins = "gpb1-0", "gpb1-1", "gpb1-2", "gpb1-3", | ||
| 319 | "gpb1-4"; | ||
| 320 | samsung,pin-function = <2>; | ||
| 321 | samsung,pin-pud = <0>; | ||
| 322 | samsung,pin-drv = <0>; | ||
| 323 | }; | ||
| 324 | |||
| 325 | pcm2_bus: pcm2-bus { | ||
| 326 | samsung,pins = "gpb1-0", "gpb1-1", "gpb1-2", "gpb1-3", | ||
| 327 | "gpb1-4"; | ||
| 328 | samsung,pin-function = <3>; | ||
| 329 | samsung,pin-pud = <0>; | ||
| 330 | samsung,pin-drv = <0>; | ||
| 331 | }; | ||
| 332 | |||
| 333 | spdif_bus: spdif-bus { | ||
| 334 | samsung,pins = "gpb1-0", "gpb1-1"; | ||
| 335 | samsung,pin-function = <4>; | ||
| 336 | samsung,pin-pud = <0>; | ||
| 337 | samsung,pin-drv = <0>; | ||
| 338 | }; | ||
| 339 | |||
| 340 | spi2_bus: spi2-bus { | ||
| 341 | samsung,pins = "gpb1-1", "gpb1-3", "gpb1-4"; | ||
| 342 | samsung,pin-function = <5>; | ||
| 343 | samsung,pin-pud = <3>; | ||
| 344 | samsung,pin-drv = <0>; | ||
| 345 | }; | ||
| 346 | |||
| 347 | i2c6_bus: i2c6-bus { | ||
| 348 | samsung,pins = "gpb1-3", "gpb1-4"; | ||
| 349 | samsung,pin-function = <4>; | ||
| 350 | samsung,pin-pud = <3>; | ||
| 351 | samsung,pin-drv = <0>; | ||
| 352 | }; | ||
| 353 | |||
| 354 | i2c7_bus: i2c7-bus { | ||
| 355 | samsung,pins = "gpb2-2", "gpb2-3"; | ||
| 356 | samsung,pin-function = <3>; | ||
| 357 | samsung,pin-pud = <3>; | ||
| 358 | samsung,pin-drv = <0>; | ||
| 359 | }; | ||
| 360 | |||
| 361 | i2c0_bus: i2c0-bus { | ||
| 362 | samsung,pins = "gpb3-0", "gpb3-1"; | ||
| 363 | samsung,pin-function = <2>; | ||
| 364 | samsung,pin-pud = <3>; | ||
| 365 | samsung,pin-drv = <0>; | ||
| 366 | }; | ||
| 367 | |||
| 368 | i2c1_bus: i2c1-bus { | ||
| 369 | samsung,pins = "gpb3-2", "gpb3-3"; | ||
| 370 | samsung,pin-function = <2>; | ||
| 371 | samsung,pin-pud = <3>; | ||
| 372 | samsung,pin-drv = <0>; | ||
| 373 | }; | ||
| 374 | |||
| 375 | i2c0_hs_bus: i2c0-hs-bus { | ||
| 376 | samsung,pins = "gpb3-0", "gpb3-1"; | ||
| 377 | samsung,pin-function = <4>; | ||
| 378 | samsung,pin-pud = <3>; | ||
| 379 | samaung,pin-drv = <0>; | ||
| 380 | }; | ||
| 381 | |||
| 382 | i2c1_hs_bus: i2c1-hs-bus { | ||
| 383 | samsung,pins = "gpb3-2", "gpb3-3"; | ||
| 384 | samsung,pin-function = <4>; | ||
| 385 | samsung,pin-pud = <3>; | ||
| 386 | samaung,pin-drv = <0>; | ||
| 387 | }; | ||
| 388 | |||
| 389 | sd0_clk: sd0-clk { | ||
| 390 | samsung,pins = "gpc0-0"; | ||
| 391 | samsung,pin-function = <2>; | ||
| 392 | samsung,pin-pud = <0>; | ||
| 393 | samsung,pin-drv = <3>; | ||
| 394 | }; | ||
| 395 | |||
| 396 | sd0_cmd: sd0-cmd { | ||
| 397 | samsung,pins = "gpc0-1"; | ||
| 398 | samsung,pin-function = <2>; | ||
| 399 | samsung,pin-pud = <0>; | ||
| 400 | samsung,pin-drv = <3>; | ||
| 401 | }; | ||
| 402 | |||
| 403 | sd0_cd: sd0-cd { | ||
| 404 | samsung,pins = "gpc0-2"; | ||
| 405 | samsung,pin-function = <2>; | ||
| 406 | samsung,pin-pud = <3>; | ||
| 407 | samsung,pin-drv = <3>; | ||
| 408 | }; | ||
| 409 | |||
| 410 | sd0_bus1: sd0-bus-width1 { | ||
| 411 | samsung,pins = "gpc0-3"; | ||
| 412 | samsung,pin-function = <2>; | ||
| 413 | samsung,pin-pud = <3>; | ||
| 414 | samsung,pin-drv = <3>; | ||
| 415 | }; | ||
| 416 | |||
| 417 | sd0_bus4: sd0-bus-width4 { | ||
| 418 | samsung,pins = "gpc0-3", "gpc0-4", "gpc0-5", "gpc0-6"; | ||
| 419 | samsung,pin-function = <2>; | ||
| 420 | samsung,pin-pud = <3>; | ||
| 421 | samsung,pin-drv = <3>; | ||
| 422 | }; | ||
| 423 | |||
| 424 | sd0_bus8: sd0-bus-width8 { | ||
| 425 | samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3"; | ||
| 426 | samsung,pin-function = <2>; | ||
| 427 | samsung,pin-pud = <3>; | ||
| 428 | samsung,pin-drv = <3>; | ||
| 429 | }; | ||
| 430 | |||
| 431 | sd1_clk: sd1-clk { | ||
| 432 | samsung,pins = "gpc2-0"; | ||
| 433 | samsung,pin-function = <2>; | ||
| 434 | samsung,pin-pud = <0>; | ||
| 435 | samsung,pin-drv = <3>; | ||
| 436 | }; | ||
| 437 | |||
| 438 | sd1_cmd: sd1-cmd { | ||
| 439 | samsung,pins = "gpc2-1"; | ||
| 440 | samsung,pin-function = <2>; | ||
| 441 | samsung,pin-pud = <0>; | ||
| 442 | samsung,pin-drv = <3>; | ||
| 443 | }; | ||
| 444 | |||
| 445 | sd1_cd: sd1-cd { | ||
| 446 | samsung,pins = "gpc2-2"; | ||
| 447 | samsung,pin-function = <2>; | ||
| 448 | samsung,pin-pud = <3>; | ||
| 449 | samsung,pin-drv = <3>; | ||
| 450 | }; | ||
| 451 | |||
| 452 | sd1_bus1: sd1-bus-width1 { | ||
| 453 | samsung,pins = "gpc2-3"; | ||
| 454 | samsung,pin-function = <2>; | ||
| 455 | samsung,pin-pud = <3>; | ||
| 456 | samsung,pin-drv = <3>; | ||
| 457 | }; | ||
| 458 | |||
| 459 | sd1_bus4: sd1-bus-width4 { | ||
| 460 | samsung,pins = "gpc2-3", "gpc2-4", "gpc2-5", "gpc2-6"; | ||
| 461 | samsung,pin-function = <2>; | ||
| 462 | samsung,pin-pud = <3>; | ||
| 463 | samsung,pin-drv = <3>; | ||
| 464 | }; | ||
| 465 | |||
| 466 | sd2_clk: sd2-clk { | ||
| 467 | samsung,pins = "gpc3-0"; | ||
| 468 | samsung,pin-function = <2>; | ||
| 469 | samsung,pin-pud = <0>; | ||
| 470 | samsung,pin-drv = <3>; | ||
| 471 | }; | ||
| 472 | |||
| 473 | sd2_cmd: sd2-cmd { | ||
| 474 | samsung,pins = "gpc3-1"; | ||
| 475 | samsung,pin-function = <2>; | ||
| 476 | samsung,pin-pud = <0>; | ||
| 477 | samsung,pin-drv = <3>; | ||
| 478 | }; | ||
| 479 | |||
| 480 | sd2_cd: sd2-cd { | ||
| 481 | samsung,pins = "gpc3-2"; | ||
| 482 | samsung,pin-function = <2>; | ||
| 483 | samsung,pin-pud = <3>; | ||
| 484 | samsung,pin-drv = <3>; | ||
| 485 | }; | ||
| 486 | |||
| 487 | sd2_bus1: sd2-bus-width1 { | ||
| 488 | samsung,pins = "gpc3-3"; | ||
| 489 | samsung,pin-function = <2>; | ||
| 490 | samsung,pin-pud = <3>; | ||
| 491 | samsung,pin-drv = <3>; | ||
| 492 | }; | ||
| 493 | |||
| 494 | sd2_bus4: sd2-bus-width4 { | ||
| 495 | samsung,pins = "gpc3-3", "gpc3-4", "gpc3-5", "gpc3-6"; | ||
| 496 | samsung,pin-function = <2>; | ||
| 497 | samsung,pin-pud = <3>; | ||
| 498 | samsung,pin-drv = <3>; | ||
| 499 | }; | ||
| 500 | |||
| 501 | sd2_bus8: sd2-bus-width8 { | ||
| 502 | samsung,pins = "gpc4-3", "gpc4-4", "gpc4-5", "gpc4-6"; | ||
| 503 | samsung,pin-function = <3>; | ||
| 504 | samsung,pin-pud = <3>; | ||
| 505 | samsung,pin-drv = <3>; | ||
| 506 | }; | ||
| 507 | |||
| 508 | sd3_clk: sd3-clk { | ||
| 509 | samsung,pins = "gpc4-0"; | ||
| 510 | samsung,pin-function = <2>; | ||
| 511 | samsung,pin-pud = <0>; | ||
| 512 | samsung,pin-drv = <3>; | ||
| 513 | }; | ||
| 514 | |||
| 515 | sd3_cmd: sd3-cmd { | ||
| 516 | samsung,pins = "gpc4-1"; | ||
| 517 | samsung,pin-function = <2>; | ||
| 518 | samsung,pin-pud = <0>; | ||
| 519 | samsung,pin-drv = <3>; | ||
| 520 | }; | ||
| 521 | |||
| 522 | sd3_cd: sd3-cd { | ||
| 523 | samsung,pins = "gpc4-2"; | ||
| 524 | samsung,pin-function = <2>; | ||
| 525 | samsung,pin-pud = <3>; | ||
| 526 | samsung,pin-drv = <3>; | ||
| 527 | }; | ||
| 528 | |||
| 529 | sd3_bus1: sd3-bus-width1 { | ||
| 530 | samsung,pins = "gpc4-3"; | ||
| 531 | samsung,pin-function = <2>; | ||
| 532 | samsung,pin-pud = <3>; | ||
| 533 | samsung,pin-drv = <3>; | ||
| 534 | }; | ||
| 535 | |||
| 536 | sd3_bus4: sd3-bus-width4 { | ||
| 537 | samsung,pins = "gpc4-3", "gpc4-4", "gpc4-5", "gpc4-6"; | ||
| 538 | samsung,pin-function = <2>; | ||
| 539 | samsung,pin-pud = <3>; | ||
| 540 | samsung,pin-drv = <3>; | ||
| 541 | }; | ||
| 542 | |||
| 543 | uart1_data: uart1-data { | ||
| 544 | samsung,pins = "gpd0-0", "gpd0-1"; | ||
| 545 | samsung,pin-function = <2>; | ||
| 546 | samsung,pin-pud = <0>; | ||
| 547 | samsung,pin-drv = <0>; | ||
| 548 | }; | ||
| 549 | |||
| 550 | uart1_fctl: uart1-fctl { | ||
| 551 | samsung,pins = "gpd0-2", "gpd0-3"; | ||
| 552 | samsung,pin-function = <2>; | ||
| 553 | samsung,pin-pud = <0>; | ||
| 554 | samaung,pin-drv = <0>; | ||
| 555 | }; | ||
| 556 | }; | ||
| 557 | |||
| 558 | pinctrl@13400000 { | ||
| 559 | gpe0: gpe0 { | ||
| 560 | gpio-controller; | ||
| 561 | #gpio-cells = <2>; | ||
| 562 | |||
| 563 | interrupt-controller; | ||
| 564 | #interrupt-cells = <2>; | ||
| 565 | }; | ||
| 566 | |||
| 567 | gpe1: gpe1 { | ||
| 568 | gpio-controller; | ||
| 569 | #gpio-cells = <2>; | ||
| 570 | |||
| 571 | interrupt-controller; | ||
| 572 | #interrupt-cells = <2>; | ||
| 573 | }; | ||
| 574 | |||
| 575 | gpf0: gpf0 { | ||
| 576 | gpio-controller; | ||
| 577 | #gpio-cells = <2>; | ||
| 578 | |||
| 579 | interrupt-controller; | ||
| 580 | #interrupt-cells = <2>; | ||
| 581 | }; | ||
| 582 | |||
| 583 | gpf1: gpf1 { | ||
| 584 | gpio-controller; | ||
| 585 | #gpio-cells = <2>; | ||
| 586 | |||
| 587 | interrupt-controller; | ||
| 588 | #interrupt-cells = <2>; | ||
| 589 | }; | ||
| 590 | |||
| 591 | gpg0: gpg0 { | ||
| 592 | gpio-controller; | ||
| 593 | #gpio-cells = <2>; | ||
| 594 | |||
| 595 | interrupt-controller; | ||
| 596 | #interrupt-cells = <2>; | ||
| 597 | }; | ||
| 598 | |||
| 599 | gpg1: gpg1 { | ||
| 600 | gpio-controller; | ||
| 601 | #gpio-cells = <2>; | ||
| 602 | |||
| 603 | interrupt-controller; | ||
| 604 | #interrupt-cells = <2>; | ||
| 605 | }; | ||
| 606 | |||
| 607 | gpg2: gpg2 { | ||
| 608 | gpio-controller; | ||
| 609 | #gpio-cells = <2>; | ||
| 610 | |||
| 611 | interrupt-controller; | ||
| 612 | #interrupt-cells = <2>; | ||
| 613 | }; | ||
| 614 | |||
| 615 | gph0: gph0 { | ||
| 616 | gpio-controller; | ||
| 617 | #gpio-cells = <2>; | ||
| 618 | |||
| 619 | interrupt-controller; | ||
| 620 | #interrupt-cells = <2>; | ||
| 621 | }; | ||
| 622 | |||
| 623 | gph1: gph1 { | ||
| 624 | gpio-controller; | ||
| 625 | #gpio-cells = <2>; | ||
| 626 | |||
| 627 | interrupt-controller; | ||
| 628 | #interrupt-cells = <2>; | ||
| 629 | }; | ||
| 630 | |||
| 631 | cam_gpio_a: cam-gpio-a { | ||
| 632 | samsung,pins = "gpe0-0", "gpe0-1", "gpe0-2", "gpe0-3", | ||
| 633 | "gpe0-4", "gpe0-5", "gpe0-6", "gpe0-7", | ||
| 634 | "gpe1-0", "gpe1-1"; | ||
| 635 | samsung,pin-function = <2>; | ||
| 636 | samsung,pin-pud = <0>; | ||
| 637 | samsung,pin-drv = <0>; | ||
| 638 | }; | ||
| 639 | |||
| 640 | cam_gpio_b: cam-gpio-b { | ||
| 641 | samsung,pins = "gpf0-0", "gpf0-1", "gpf0-2", "gpf0-3", | ||
| 642 | "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3"; | ||
| 643 | samsung,pin-function = <3>; | ||
| 644 | samsung,pin-pud = <0>; | ||
| 645 | samaung,pin-drv = <0>; | ||
| 646 | }; | ||
| 647 | |||
| 648 | cam_i2c2_bus: cam-i2c2-bus { | ||
| 649 | samsung,pins = "gpe0-6", "gpe1-0"; | ||
| 650 | samsung,pin-function = <4>; | ||
| 651 | samsung,pin-pud = <3>; | ||
| 652 | samaung,pin-drv = <0>; | ||
| 653 | }; | ||
| 654 | |||
| 655 | cam_spi1_bus: cam-spi1-bus { | ||
| 656 | samsung,pins = "gpe0-4", "gpe0-5", "gpf0-2", "gpf0-3"; | ||
| 657 | samsung,pin-function = <4>; | ||
| 658 | samsung,pin-pud = <0>; | ||
| 659 | samaung,pin-drv = <0>; | ||
| 660 | }; | ||
| 661 | |||
| 662 | cam_i2c1_bus: cam-i2c1-bus { | ||
| 663 | samsung,pins = "gpf0-2", "gpf0-3"; | ||
| 664 | samsung,pin-function = <2>; | ||
| 665 | samsung,pin-pud = <3>; | ||
| 666 | samaung,pin-drv = <0>; | ||
| 667 | }; | ||
| 668 | |||
| 669 | cam_i2c0_bus: cam-i2c0-bus { | ||
| 670 | samsung,pins = "gpf0-0", "gpf0-1"; | ||
| 671 | samsung,pin-function = <2>; | ||
| 672 | samsung,pin-pud = <3>; | ||
| 673 | samaung,pin-drv = <0>; | ||
| 674 | }; | ||
| 675 | |||
| 676 | cam_spi0_bus: cam-spi0-bus { | ||
| 677 | samsung,pins = "gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3"; | ||
| 678 | samsung,pin-function = <2>; | ||
| 679 | samsung,pin-pud = <0>; | ||
| 680 | samaung,pin-drv = <0>; | ||
| 681 | }; | ||
| 682 | |||
| 683 | cam_bayrgb_bus: cam-bayrgb-bus { | ||
| 684 | samsung,pins = "gpg0-0", "gpg0-1", "gpg0-2", "gpg0-3", | ||
| 685 | "gpg0-4", "gpg0-5", "gpg0-6", "gpg0-7", | ||
| 686 | "gpg1-0", "gpg1-1", "gpg1-2", "gpg1-3", | ||
| 687 | "gpg1-4", "gpg1-5", "gpg1-6", "gpg1-7", | ||
| 688 | "gpg2-0", "gpg2-1"; | ||
| 689 | samsung,pin-function = <2>; | ||
| 690 | samsung,pin-pud = <0>; | ||
| 691 | samaung,pin-drv = <0>; | ||
| 692 | }; | ||
| 693 | |||
| 694 | cam_port_a: cam-port-a { | ||
| 695 | samsung,pins = "gph0-0", "gph0-1", "gph0-2", "gph0-3", | ||
| 696 | "gph1-0", "gph1-1", "gph1-2", "gph1-3", | ||
| 697 | "gph1-4", "gph1-5", "gph1-6", "gph1-7"; | ||
| 698 | samsung,pin-function = <2>; | ||
| 699 | samsung,pin-pud = <0>; | ||
| 700 | samaung,pin-drv = <0>; | ||
| 701 | }; | ||
| 702 | }; | ||
| 703 | |||
| 704 | pinctrl@10d10000 { | ||
| 705 | gpv0: gpv0 { | ||
| 706 | gpio-controller; | ||
| 707 | #gpio-cells = <2>; | ||
| 708 | |||
| 709 | interrupt-controller; | ||
| 710 | #interrupt-cells = <2>; | ||
| 711 | }; | ||
| 712 | |||
| 713 | gpv1: gpv1 { | ||
| 714 | gpio-controller; | ||
| 715 | #gpio-cells = <2>; | ||
| 716 | |||
| 717 | interrupt-controller; | ||
| 718 | #interrupt-cells = <2>; | ||
| 719 | }; | ||
| 720 | |||
| 721 | gpv2: gpv2 { | ||
| 722 | gpio-controller; | ||
| 723 | #gpio-cells = <2>; | ||
| 724 | |||
| 725 | interrupt-controller; | ||
| 726 | #interrupt-cells = <2>; | ||
| 727 | }; | ||
| 728 | |||
| 729 | gpv3: gpv3 { | ||
| 730 | gpio-controller; | ||
| 731 | #gpio-cells = <2>; | ||
| 732 | |||
| 733 | interrupt-controller; | ||
| 734 | #interrupt-cells = <2>; | ||
| 735 | }; | ||
| 736 | |||
| 737 | gpv4: gpv4 { | ||
| 738 | gpio-controller; | ||
| 739 | #gpio-cells = <2>; | ||
| 740 | |||
| 741 | interrupt-controller; | ||
| 742 | #interrupt-cells = <2>; | ||
| 743 | }; | ||
| 744 | |||
| 745 | c2c_rxd: c2c-rxd { | ||
| 746 | samsung,pins = "gpv0-0", "gpv0-1", "gpv0-2", "gpv0-3", | ||
| 747 | "gpv0-4", "gpv0-5", "gpv0-6", "gpv0-7", | ||
| 748 | "gpv1-0", "gpv1-1", "gpv1-2", "gpv1-3", | ||
| 749 | "gpv1-4", "gpv1-5", "gpv1-6", "gpv1-7"; | ||
| 750 | samsung,pin-function = <2>; | ||
| 751 | samsung,pin-pud = <0>; | ||
| 752 | samaung,pin-drv = <0>; | ||
| 753 | }; | ||
| 754 | |||
| 755 | c2c_txd: c2c-txd { | ||
| 756 | samsung,pins = "gpv2-0", "gpv2-1", "gpv2-2", "gpv2-3", | ||
| 757 | "gpv2-4", "gpv2-5", "gpv2-6", "gpv2-7", | ||
| 758 | "gpv3-0", "gpv3-1", "gpv3-2", "gpv3-3", | ||
| 759 | "gpv3-4", "gpv3-5", "gpv3-6", "gpv3-7"; | ||
| 760 | samsung,pin-function = <2>; | ||
| 761 | samsung,pin-pud = <0>; | ||
| 762 | samaung,pin-drv = <0>; | ||
| 763 | }; | ||
| 764 | }; | ||
| 765 | |||
| 766 | pinctrl@03680000 { | ||
| 767 | gpz: gpz { | ||
| 768 | gpio-controller; | ||
| 769 | #gpio-cells = <2>; | ||
| 770 | |||
| 771 | interrupt-controller; | ||
| 772 | #interrupt-cells = <2>; | ||
| 773 | }; | ||
| 774 | |||
| 775 | i2s0_bus: i2s0-bus { | ||
| 776 | samsung,pins = "gpz-0", "gpz-1", "gpz-2", "gpz-3", | ||
| 777 | "gpz-4", "gpz-5", "gpz-6"; | ||
| 778 | samsung,pin-function = <2>; | ||
| 779 | samsung,pin-pud = <0>; | ||
| 780 | samsung,pin-drv = <0>; | ||
| 781 | }; | ||
| 782 | }; | ||
| 783 | }; | ||
diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index 1b8d4106d338..26d856ba50a1 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts | |||
| @@ -30,8 +30,6 @@ | |||
| 30 | i2c@12C60000 { | 30 | i2c@12C60000 { |
| 31 | samsung,i2c-sda-delay = <100>; | 31 | samsung,i2c-sda-delay = <100>; |
| 32 | samsung,i2c-max-bus-freq = <20000>; | 32 | samsung,i2c-max-bus-freq = <20000>; |
| 33 | gpios = <&gpb3 0 2 3 0>, | ||
| 34 | <&gpb3 1 2 3 0>; | ||
| 35 | 33 | ||
| 36 | eeprom@50 { | 34 | eeprom@50 { |
| 37 | compatible = "samsung,s524ad0xd1"; | 35 | compatible = "samsung,s524ad0xd1"; |
| @@ -42,8 +40,6 @@ | |||
| 42 | i2c@12C70000 { | 40 | i2c@12C70000 { |
| 43 | samsung,i2c-sda-delay = <100>; | 41 | samsung,i2c-sda-delay = <100>; |
| 44 | samsung,i2c-max-bus-freq = <20000>; | 42 | samsung,i2c-max-bus-freq = <20000>; |
| 45 | gpios = <&gpb3 2 2 3 0>, | ||
| 46 | <&gpb3 3 2 3 0>; | ||
| 47 | 43 | ||
| 48 | eeprom@51 { | 44 | eeprom@51 { |
| 49 | compatible = "samsung,s524ad0xd1"; | 45 | compatible = "samsung,s524ad0xd1"; |
| @@ -74,8 +70,6 @@ | |||
| 74 | i2c@12C80000 { | 70 | i2c@12C80000 { |
| 75 | samsung,i2c-sda-delay = <100>; | 71 | samsung,i2c-sda-delay = <100>; |
| 76 | samsung,i2c-max-bus-freq = <66000>; | 72 | samsung,i2c-max-bus-freq = <66000>; |
| 77 | gpios = <&gpa0 6 3 3 0>, | ||
| 78 | <&gpa0 7 3 3 0>; | ||
| 79 | 73 | ||
| 80 | hdmiddc@50 { | 74 | hdmiddc@50 { |
| 81 | compatible = "samsung,exynos5-hdmiddc"; | 75 | compatible = "samsung,exynos5-hdmiddc"; |
| @@ -122,15 +116,12 @@ | |||
| 122 | samsung,dw-mshc-ciu-div = <3>; | 116 | samsung,dw-mshc-ciu-div = <3>; |
| 123 | samsung,dw-mshc-sdr-timing = <2 3>; | 117 | samsung,dw-mshc-sdr-timing = <2 3>; |
| 124 | samsung,dw-mshc-ddr-timing = <1 2>; | 118 | samsung,dw-mshc-ddr-timing = <1 2>; |
| 119 | pinctrl-names = "default"; | ||
| 120 | pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>; | ||
| 125 | 121 | ||
| 126 | slot@0 { | 122 | slot@0 { |
| 127 | reg = <0>; | 123 | reg = <0>; |
| 128 | bus-width = <8>; | 124 | bus-width = <8>; |
| 129 | gpios = <&gpc0 0 2 0 3>, <&gpc0 1 2 0 3>, | ||
| 130 | <&gpc1 0 2 3 3>, <&gpc1 1 2 3 3>, | ||
| 131 | <&gpc1 2 2 3 3>, <&gpc1 3 2 3 3>, | ||
| 132 | <&gpc0 3 2 3 3>, <&gpc0 4 2 3 3>, | ||
| 133 | <&gpc0 5 2 3 3>, <&gpc0 6 2 3 3>; | ||
| 134 | }; | 125 | }; |
| 135 | }; | 126 | }; |
| 136 | 127 | ||
| @@ -146,17 +137,13 @@ | |||
| 146 | samsung,dw-mshc-ciu-div = <3>; | 137 | samsung,dw-mshc-ciu-div = <3>; |
| 147 | samsung,dw-mshc-sdr-timing = <2 3>; | 138 | samsung,dw-mshc-sdr-timing = <2 3>; |
| 148 | samsung,dw-mshc-ddr-timing = <1 2>; | 139 | samsung,dw-mshc-ddr-timing = <1 2>; |
| 140 | pinctrl-names = "default"; | ||
| 141 | pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; | ||
| 149 | 142 | ||
| 150 | slot@0 { | 143 | slot@0 { |
| 151 | reg = <0>; | 144 | reg = <0>; |
| 152 | bus-width = <4>; | 145 | bus-width = <4>; |
| 153 | samsung,cd-pinmux-gpio = <&gpc3 2 2 3 3>; | ||
| 154 | disable-wp; | 146 | disable-wp; |
| 155 | gpios = <&gpc3 0 2 0 3>, <&gpc3 1 2 0 3>, | ||
| 156 | <&gpc3 3 2 3 3>, <&gpc3 4 2 3 3>, | ||
| 157 | <&gpc3 5 2 3 3>, <&gpc3 6 2 3 3>, | ||
| 158 | <&gpc4 3 3 3 3>, <&gpc4 3 3 3 3>, | ||
| 159 | <&gpc4 5 3 3 3>, <&gpc4 6 3 3 3>; | ||
| 160 | }; | 147 | }; |
| 161 | }; | 148 | }; |
| 162 | 149 | ||
| @@ -169,10 +156,6 @@ | |||
| 169 | }; | 156 | }; |
| 170 | 157 | ||
| 171 | spi_1: spi@12d30000 { | 158 | spi_1: spi@12d30000 { |
| 172 | gpios = <&gpa2 4 2 3 0>, | ||
| 173 | <&gpa2 6 2 3 0>, | ||
| 174 | <&gpa2 7 2 3 0>; | ||
| 175 | |||
| 176 | w25q80bw@0 { | 159 | w25q80bw@0 { |
| 177 | #address-cells = <1>; | 160 | #address-cells = <1>; |
| 178 | #size-cells = <1>; | 161 | #size-cells = <1>; |
| @@ -181,7 +164,7 @@ | |||
| 181 | spi-max-frequency = <1000000>; | 164 | spi-max-frequency = <1000000>; |
| 182 | 165 | ||
| 183 | controller-data { | 166 | controller-data { |
| 184 | cs-gpio = <&gpa2 5 1 0 3>; | 167 | cs-gpio = <&gpa2 5 0>; |
| 185 | samsung,spi-feedback-delay = <0>; | 168 | samsung,spi-feedback-delay = <0>; |
| 186 | }; | 169 | }; |
| 187 | 170 | ||
| @@ -203,7 +186,7 @@ | |||
| 203 | }; | 186 | }; |
| 204 | 187 | ||
| 205 | hdmi { | 188 | hdmi { |
| 206 | hpd-gpio = <&gpx3 7 0xf 1 3>; | 189 | hpd-gpio = <&gpx3 7 0>; |
| 207 | }; | 190 | }; |
| 208 | 191 | ||
| 209 | codec@11000000 { | 192 | codec@11000000 { |
| @@ -212,9 +195,7 @@ | |||
| 212 | }; | 195 | }; |
| 213 | 196 | ||
| 214 | i2s0: i2s@03830000 { | 197 | i2s0: i2s@03830000 { |
| 215 | gpios = <&gpz 0 2 0 0>, <&gpz 1 2 0 0>, <&gpz 2 2 0 0>, | 198 | status = "okay"; |
| 216 | <&gpz 3 2 0 0>, <&gpz 4 2 0 0>, <&gpz 5 2 0 0>, | ||
| 217 | <&gpz 6 2 0 0>; | ||
| 218 | }; | 199 | }; |
| 219 | 200 | ||
| 220 | i2s1: i2s@12D60000 { | 201 | i2s1: i2s@12D60000 { |
| @@ -231,4 +212,40 @@ | |||
| 231 | samsung,i2s-controller = <&i2s0>; | 212 | samsung,i2s-controller = <&i2s0>; |
| 232 | samsung,audio-codec = <&wm8994>; | 213 | samsung,audio-codec = <&wm8994>; |
| 233 | }; | 214 | }; |
| 215 | |||
| 216 | usb@12110000 { | ||
| 217 | samsung,vbus-gpio = <&gpx2 6 1 3 3>; | ||
| 218 | }; | ||
| 219 | |||
| 220 | dp-controller { | ||
| 221 | samsung,color-space = <0>; | ||
| 222 | samsung,dynamic-range = <0>; | ||
| 223 | samsung,ycbcr-coeff = <0>; | ||
| 224 | samsung,color-depth = <1>; | ||
| 225 | samsung,link-rate = <0x0a>; | ||
| 226 | samsung,lane-count = <4>; | ||
| 227 | }; | ||
| 228 | |||
| 229 | display-timings { | ||
| 230 | native-mode = <&timing0>; | ||
| 231 | timing0: timing@0 { | ||
| 232 | /* 1280x800 */ | ||
| 233 | clock-frequency = <50000>; | ||
| 234 | hactive = <1280>; | ||
| 235 | vactive = <800>; | ||
| 236 | hfront-porch = <4>; | ||
| 237 | hback-porch = <4>; | ||
| 238 | hsync-len = <4>; | ||
| 239 | vback-porch = <4>; | ||
| 240 | vfront-porch = <4>; | ||
| 241 | vsync-len = <4>; | ||
| 242 | }; | ||
| 243 | }; | ||
| 244 | |||
| 245 | fixed-rate-clocks { | ||
| 246 | xxti { | ||
| 247 | compatible = "samsung,clock-xxti"; | ||
| 248 | clock-frequency = <24000000>; | ||
| 249 | }; | ||
| 250 | }; | ||
| 234 | }; | 251 | }; |
diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts index 17dd951c1cd2..581ffae27e13 100644 --- a/arch/arm/boot/dts/exynos5250-snow.dts +++ b/arch/arm/boot/dts/exynos5250-snow.dts | |||
| @@ -16,12 +16,27 @@ | |||
| 16 | model = "Google Snow"; | 16 | model = "Google Snow"; |
| 17 | compatible = "google,snow", "samsung,exynos5250"; | 17 | compatible = "google,snow", "samsung,exynos5250"; |
| 18 | 18 | ||
| 19 | pinctrl@11400000 { | ||
| 20 | sd3_clk: sd3-clk { | ||
| 21 | samsung,pin-drv = <0>; | ||
| 22 | }; | ||
| 23 | |||
| 24 | sd3_cmd: sd3-cmd { | ||
| 25 | samsung,pin-pud = <3>; | ||
| 26 | samsung,pin-drv = <0>; | ||
| 27 | }; | ||
| 28 | |||
| 29 | sd3_bus4: sd3-bus-width4 { | ||
| 30 | samsung,pin-drv = <0>; | ||
| 31 | }; | ||
| 32 | }; | ||
| 33 | |||
| 19 | gpio-keys { | 34 | gpio-keys { |
| 20 | compatible = "gpio-keys"; | 35 | compatible = "gpio-keys"; |
| 21 | 36 | ||
| 22 | lid-switch { | 37 | lid-switch { |
| 23 | label = "Lid"; | 38 | label = "Lid"; |
| 24 | gpios = <&gpx3 5 0 0x10000 0>; | 39 | gpios = <&gpx3 5 1>; |
| 25 | linux,input-type = <5>; /* EV_SW */ | 40 | linux,input-type = <5>; /* EV_SW */ |
| 26 | linux,code = <0>; /* SW_LID */ | 41 | linux,code = <0>; /* SW_LID */ |
| 27 | debounce-interval = <1>; | 42 | debounce-interval = <1>; |
| @@ -35,9 +50,19 @@ | |||
| 35 | */ | 50 | */ |
| 36 | dwmmc3@12230000 { | 51 | dwmmc3@12230000 { |
| 37 | slot@0 { | 52 | slot@0 { |
| 38 | gpios = <&gpc4 0 2 0 0>, <&gpc4 1 2 3 0>, | 53 | pinctrl-names = "default"; |
| 39 | <&gpc4 3 2 3 0>, <&gpc4 4 2 3 0>, | 54 | pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4>; |
| 40 | <&gpc4 5 2 3 0>, <&gpc4 6 2 3 0>; | 55 | }; |
| 56 | }; | ||
| 57 | |||
| 58 | usb@12110000 { | ||
| 59 | samsung,vbus-gpio = <&gpx1 1 1 3 3>; | ||
| 60 | }; | ||
| 61 | |||
| 62 | fixed-rate-clocks { | ||
| 63 | xxti { | ||
| 64 | compatible = "samsung,clock-xxti"; | ||
| 65 | clock-frequency = <24000000>; | ||
| 41 | }; | 66 | }; |
| 42 | }; | 67 | }; |
| 43 | }; | 68 | }; |
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index b1ac73e21c80..af66e6b7bc77 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| 20 | /include/ "skeleton.dtsi" | 20 | /include/ "skeleton.dtsi" |
| 21 | /include/ "exynos5250-pinctrl.dtsi" | ||
| 21 | 22 | ||
| 22 | / { | 23 | / { |
| 23 | compatible = "samsung,exynos5250"; | 24 | compatible = "samsung,exynos5250"; |
| @@ -44,13 +45,45 @@ | |||
| 44 | i2c6 = &i2c_6; | 45 | i2c6 = &i2c_6; |
| 45 | i2c7 = &i2c_7; | 46 | i2c7 = &i2c_7; |
| 46 | i2c8 = &i2c_8; | 47 | i2c8 = &i2c_8; |
| 48 | pinctrl0 = &pinctrl_0; | ||
| 49 | pinctrl1 = &pinctrl_1; | ||
| 50 | pinctrl2 = &pinctrl_2; | ||
| 51 | pinctrl3 = &pinctrl_3; | ||
| 52 | }; | ||
| 53 | |||
| 54 | pd_gsc: gsc-power-domain@0x10044000 { | ||
| 55 | compatible = "samsung,exynos4210-pd"; | ||
| 56 | reg = <0x10044000 0x20>; | ||
| 57 | }; | ||
| 58 | |||
| 59 | pd_mfc: mfc-power-domain@0x10044040 { | ||
| 60 | compatible = "samsung,exynos4210-pd"; | ||
| 61 | reg = <0x10044040 0x20>; | ||
| 62 | }; | ||
| 63 | |||
| 64 | clock: clock-controller@0x10010000 { | ||
| 65 | compatible = "samsung,exynos5250-clock"; | ||
| 66 | reg = <0x10010000 0x30000>; | ||
| 67 | #clock-cells = <1>; | ||
| 47 | }; | 68 | }; |
| 48 | 69 | ||
| 49 | gic:interrupt-controller@10481000 { | 70 | gic:interrupt-controller@10481000 { |
| 50 | compatible = "arm,cortex-a9-gic"; | 71 | compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic"; |
| 51 | #interrupt-cells = <3>; | 72 | #interrupt-cells = <3>; |
| 52 | interrupt-controller; | 73 | interrupt-controller; |
| 53 | reg = <0x10481000 0x1000>, <0x10482000 0x2000>; | 74 | reg = <0x10481000 0x1000>, |
| 75 | <0x10482000 0x1000>, | ||
| 76 | <0x10484000 0x2000>, | ||
| 77 | <0x10486000 0x2000>; | ||
| 78 | interrupts = <1 9 0xf04>; | ||
| 79 | }; | ||
| 80 | |||
| 81 | timer { | ||
| 82 | compatible = "arm,armv7-timer"; | ||
| 83 | interrupts = <1 13 0xf08>, | ||
| 84 | <1 14 0xf08>, | ||
| 85 | <1 11 0xf08>, | ||
| 86 | <1 10 0xf08>; | ||
| 54 | }; | 87 | }; |
| 55 | 88 | ||
| 56 | combiner:interrupt-controller@10440000 { | 89 | combiner:interrupt-controller@10440000 { |
| @@ -69,58 +102,129 @@ | |||
| 69 | <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>; | 102 | <0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>; |
| 70 | }; | 103 | }; |
| 71 | 104 | ||
| 105 | mct@101C0000 { | ||
| 106 | compatible = "samsung,exynos4210-mct"; | ||
| 107 | reg = <0x101C0000 0x800>; | ||
| 108 | interrupt-controller; | ||
| 109 | #interrups-cells = <2>; | ||
| 110 | interrupt-parent = <&mct_map>; | ||
| 111 | interrupts = <0 0>, <1 0>, <2 0>, <3 0>, | ||
| 112 | <4 0>, <5 0>; | ||
| 113 | clocks = <&clock 1>, <&clock 335>; | ||
| 114 | clock-names = "fin_pll", "mct"; | ||
| 115 | |||
| 116 | mct_map: mct-map { | ||
| 117 | #interrupt-cells = <2>; | ||
| 118 | #address-cells = <0>; | ||
| 119 | #size-cells = <0>; | ||
| 120 | interrupt-map = <0x0 0 &combiner 23 3>, | ||
| 121 | <0x1 0 &combiner 23 4>, | ||
| 122 | <0x2 0 &combiner 25 2>, | ||
| 123 | <0x3 0 &combiner 25 3>, | ||
| 124 | <0x4 0 &gic 0 120 0>, | ||
| 125 | <0x5 0 &gic 0 121 0>; | ||
| 126 | }; | ||
| 127 | }; | ||
| 128 | |||
| 129 | pinctrl_0: pinctrl@11400000 { | ||
| 130 | compatible = "samsung,exynos5250-pinctrl"; | ||
| 131 | reg = <0x11400000 0x1000>; | ||
| 132 | interrupts = <0 46 0>; | ||
| 133 | |||
| 134 | wakup_eint: wakeup-interrupt-controller { | ||
| 135 | compatible = "samsung,exynos4210-wakeup-eint"; | ||
| 136 | interrupt-parent = <&gic>; | ||
| 137 | interrupts = <0 32 0>; | ||
| 138 | }; | ||
| 139 | }; | ||
| 140 | |||
| 141 | pinctrl_1: pinctrl@13400000 { | ||
| 142 | compatible = "samsung,exynos5250-pinctrl"; | ||
| 143 | reg = <0x13400000 0x1000>; | ||
| 144 | interrupts = <0 45 0>; | ||
| 145 | }; | ||
| 146 | |||
| 147 | pinctrl_2: pinctrl@10d10000 { | ||
| 148 | compatible = "samsung,exynos5250-pinctrl"; | ||
| 149 | reg = <0x10d10000 0x1000>; | ||
| 150 | interrupts = <0 50 0>; | ||
| 151 | }; | ||
| 152 | |||
| 153 | pinctrl_3: pinctrl@03680000 { | ||
| 154 | compatible = "samsung,exynos5250-pinctrl"; | ||
| 155 | reg = <0x0368000 0x1000>; | ||
| 156 | interrupts = <0 47 0>; | ||
| 157 | }; | ||
| 158 | |||
| 72 | watchdog { | 159 | watchdog { |
| 73 | compatible = "samsung,s3c2410-wdt"; | 160 | compatible = "samsung,s3c2410-wdt"; |
| 74 | reg = <0x101D0000 0x100>; | 161 | reg = <0x101D0000 0x100>; |
| 75 | interrupts = <0 42 0>; | 162 | interrupts = <0 42 0>; |
| 163 | clocks = <&clock 336>; | ||
| 164 | clock-names = "watchdog"; | ||
| 76 | }; | 165 | }; |
| 77 | 166 | ||
| 78 | codec@11000000 { | 167 | codec@11000000 { |
| 79 | compatible = "samsung,mfc-v6"; | 168 | compatible = "samsung,mfc-v6"; |
| 80 | reg = <0x11000000 0x10000>; | 169 | reg = <0x11000000 0x10000>; |
| 81 | interrupts = <0 96 0>; | 170 | interrupts = <0 96 0>; |
| 171 | samsung,power-domain = <&pd_mfc>; | ||
| 82 | }; | 172 | }; |
| 83 | 173 | ||
| 84 | rtc { | 174 | rtc { |
| 85 | compatible = "samsung,s3c6410-rtc"; | 175 | compatible = "samsung,s3c6410-rtc"; |
| 86 | reg = <0x101E0000 0x100>; | 176 | reg = <0x101E0000 0x100>; |
| 87 | interrupts = <0 43 0>, <0 44 0>; | 177 | interrupts = <0 43 0>, <0 44 0>; |
| 178 | clocks = <&clock 337>; | ||
| 179 | clock-names = "rtc"; | ||
| 88 | }; | 180 | }; |
| 89 | 181 | ||
| 90 | tmu@10060000 { | 182 | tmu@10060000 { |
| 91 | compatible = "samsung,exynos5250-tmu"; | 183 | compatible = "samsung,exynos5250-tmu"; |
| 92 | reg = <0x10060000 0x100>; | 184 | reg = <0x10060000 0x100>; |
| 93 | interrupts = <0 65 0>; | 185 | interrupts = <0 65 0>; |
| 186 | clocks = <&clock 338>; | ||
| 187 | clock-names = "tmu_apbif"; | ||
| 94 | }; | 188 | }; |
| 95 | 189 | ||
| 96 | serial@12C00000 { | 190 | serial@12C00000 { |
| 97 | compatible = "samsung,exynos4210-uart"; | 191 | compatible = "samsung,exynos4210-uart"; |
| 98 | reg = <0x12C00000 0x100>; | 192 | reg = <0x12C00000 0x100>; |
| 99 | interrupts = <0 51 0>; | 193 | interrupts = <0 51 0>; |
| 194 | clocks = <&clock 289>, <&clock 146>; | ||
| 195 | clock-names = "uart", "clk_uart_baud0"; | ||
| 100 | }; | 196 | }; |
| 101 | 197 | ||
| 102 | serial@12C10000 { | 198 | serial@12C10000 { |
| 103 | compatible = "samsung,exynos4210-uart"; | 199 | compatible = "samsung,exynos4210-uart"; |
| 104 | reg = <0x12C10000 0x100>; | 200 | reg = <0x12C10000 0x100>; |
| 105 | interrupts = <0 52 0>; | 201 | interrupts = <0 52 0>; |
| 202 | clocks = <&clock 290>, <&clock 147>; | ||
| 203 | clock-names = "uart", "clk_uart_baud0"; | ||
| 106 | }; | 204 | }; |
| 107 | 205 | ||
| 108 | serial@12C20000 { | 206 | serial@12C20000 { |
| 109 | compatible = "samsung,exynos4210-uart"; | 207 | compatible = "samsung,exynos4210-uart"; |
| 110 | reg = <0x12C20000 0x100>; | 208 | reg = <0x12C20000 0x100>; |
| 111 | interrupts = <0 53 0>; | 209 | interrupts = <0 53 0>; |
| 210 | clocks = <&clock 291>, <&clock 148>; | ||
| 211 | clock-names = "uart", "clk_uart_baud0"; | ||
| 112 | }; | 212 | }; |
| 113 | 213 | ||
| 114 | serial@12C30000 { | 214 | serial@12C30000 { |
| 115 | compatible = "samsung,exynos4210-uart"; | 215 | compatible = "samsung,exynos4210-uart"; |
| 116 | reg = <0x12C30000 0x100>; | 216 | reg = <0x12C30000 0x100>; |
| 117 | interrupts = <0 54 0>; | 217 | interrupts = <0 54 0>; |
| 218 | clocks = <&clock 292>, <&clock 149>; | ||
| 219 | clock-names = "uart", "clk_uart_baud0"; | ||
| 118 | }; | 220 | }; |
| 119 | 221 | ||
| 120 | sata@122F0000 { | 222 | sata@122F0000 { |
| 121 | compatible = "samsung,exynos5-sata-ahci"; | 223 | compatible = "samsung,exynos5-sata-ahci"; |
| 122 | reg = <0x122F0000 0x1ff>; | 224 | reg = <0x122F0000 0x1ff>; |
| 123 | interrupts = <0 115 0>; | 225 | interrupts = <0 115 0>; |
| 226 | clocks = <&clock 277>, <&clock 143>; | ||
| 227 | clock-names = "sata", "sclk_sata"; | ||
| 124 | }; | 228 | }; |
| 125 | 229 | ||
| 126 | sata-phy@12170000 { | 230 | sata-phy@12170000 { |
| @@ -134,6 +238,10 @@ | |||
| 134 | interrupts = <0 56 0>; | 238 | interrupts = <0 56 0>; |
| 135 | #address-cells = <1>; | 239 | #address-cells = <1>; |
| 136 | #size-cells = <0>; | 240 | #size-cells = <0>; |
| 241 | clocks = <&clock 294>; | ||
| 242 | clock-names = "i2c"; | ||
| 243 | pinctrl-names = "default"; | ||
| 244 | pinctrl-0 = <&i2c0_bus>; | ||
| 137 | }; | 245 | }; |
| 138 | 246 | ||
| 139 | i2c_1: i2c@12C70000 { | 247 | i2c_1: i2c@12C70000 { |
| @@ -142,6 +250,10 @@ | |||
| 142 | interrupts = <0 57 0>; | 250 | interrupts = <0 57 0>; |
| 143 | #address-cells = <1>; | 251 | #address-cells = <1>; |
| 144 | #size-cells = <0>; | 252 | #size-cells = <0>; |
| 253 | clocks = <&clock 295>; | ||
| 254 | clock-names = "i2c"; | ||
| 255 | pinctrl-names = "default"; | ||
| 256 | pinctrl-0 = <&i2c1_bus>; | ||
| 145 | }; | 257 | }; |
| 146 | 258 | ||
| 147 | i2c_2: i2c@12C80000 { | 259 | i2c_2: i2c@12C80000 { |
| @@ -150,6 +262,10 @@ | |||
| 150 | interrupts = <0 58 0>; | 262 | interrupts = <0 58 0>; |
| 151 | #address-cells = <1>; | 263 | #address-cells = <1>; |
| 152 | #size-cells = <0>; | 264 | #size-cells = <0>; |
| 265 | clocks = <&clock 296>; | ||
| 266 | clock-names = "i2c"; | ||
| 267 | pinctrl-names = "default"; | ||
| 268 | pinctrl-0 = <&i2c2_bus>; | ||
| 153 | }; | 269 | }; |
| 154 | 270 | ||
| 155 | i2c_3: i2c@12C90000 { | 271 | i2c_3: i2c@12C90000 { |
| @@ -158,6 +274,10 @@ | |||
| 158 | interrupts = <0 59 0>; | 274 | interrupts = <0 59 0>; |
| 159 | #address-cells = <1>; | 275 | #address-cells = <1>; |
| 160 | #size-cells = <0>; | 276 | #size-cells = <0>; |
| 277 | clocks = <&clock 297>; | ||
| 278 | clock-names = "i2c"; | ||
| 279 | pinctrl-names = "default"; | ||
| 280 | pinctrl-0 = <&i2c3_bus>; | ||
| 161 | }; | 281 | }; |
| 162 | 282 | ||
| 163 | i2c_4: i2c@12CA0000 { | 283 | i2c_4: i2c@12CA0000 { |
| @@ -166,6 +286,10 @@ | |||
| 166 | interrupts = <0 60 0>; | 286 | interrupts = <0 60 0>; |
| 167 | #address-cells = <1>; | 287 | #address-cells = <1>; |
| 168 | #size-cells = <0>; | 288 | #size-cells = <0>; |
| 289 | clocks = <&clock 298>; | ||
| 290 | clock-names = "i2c"; | ||
| 291 | pinctrl-names = "default"; | ||
| 292 | pinctrl-0 = <&i2c4_bus>; | ||
| 169 | }; | 293 | }; |
| 170 | 294 | ||
| 171 | i2c_5: i2c@12CB0000 { | 295 | i2c_5: i2c@12CB0000 { |
| @@ -174,6 +298,10 @@ | |||
| 174 | interrupts = <0 61 0>; | 298 | interrupts = <0 61 0>; |
| 175 | #address-cells = <1>; | 299 | #address-cells = <1>; |
| 176 | #size-cells = <0>; | 300 | #size-cells = <0>; |
| 301 | clocks = <&clock 299>; | ||
| 302 | clock-names = "i2c"; | ||
| 303 | pinctrl-names = "default"; | ||
| 304 | pinctrl-0 = <&i2c5_bus>; | ||
| 177 | }; | 305 | }; |
| 178 | 306 | ||
| 179 | i2c_6: i2c@12CC0000 { | 307 | i2c_6: i2c@12CC0000 { |
| @@ -182,6 +310,10 @@ | |||
| 182 | interrupts = <0 62 0>; | 310 | interrupts = <0 62 0>; |
| 183 | #address-cells = <1>; | 311 | #address-cells = <1>; |
| 184 | #size-cells = <0>; | 312 | #size-cells = <0>; |
| 313 | clocks = <&clock 300>; | ||
| 314 | clock-names = "i2c"; | ||
| 315 | pinctrl-names = "default"; | ||
| 316 | pinctrl-0 = <&i2c6_bus>; | ||
| 185 | }; | 317 | }; |
| 186 | 318 | ||
| 187 | i2c_7: i2c@12CD0000 { | 319 | i2c_7: i2c@12CD0000 { |
| @@ -190,6 +322,10 @@ | |||
| 190 | interrupts = <0 63 0>; | 322 | interrupts = <0 63 0>; |
| 191 | #address-cells = <1>; | 323 | #address-cells = <1>; |
| 192 | #size-cells = <0>; | 324 | #size-cells = <0>; |
| 325 | clocks = <&clock 301>; | ||
| 326 | clock-names = "i2c"; | ||
| 327 | pinctrl-names = "default"; | ||
| 328 | pinctrl-0 = <&i2c7_bus>; | ||
| 193 | }; | 329 | }; |
| 194 | 330 | ||
| 195 | i2c_8: i2c@12CE0000 { | 331 | i2c_8: i2c@12CE0000 { |
| @@ -198,6 +334,8 @@ | |||
| 198 | interrupts = <0 64 0>; | 334 | interrupts = <0 64 0>; |
| 199 | #address-cells = <1>; | 335 | #address-cells = <1>; |
| 200 | #size-cells = <0>; | 336 | #size-cells = <0>; |
| 337 | clocks = <&clock 302>; | ||
| 338 | clock-names = "i2c"; | ||
| 201 | }; | 339 | }; |
| 202 | 340 | ||
| 203 | i2c@121D0000 { | 341 | i2c@121D0000 { |
| @@ -205,6 +343,8 @@ | |||
| 205 | reg = <0x121D0000 0x100>; | 343 | reg = <0x121D0000 0x100>; |
| 206 | #address-cells = <1>; | 344 | #address-cells = <1>; |
| 207 | #size-cells = <0>; | 345 | #size-cells = <0>; |
| 346 | clocks = <&clock 288>; | ||
| 347 | clock-names = "i2c"; | ||
| 208 | }; | 348 | }; |
| 209 | 349 | ||
| 210 | spi_0: spi@12d20000 { | 350 | spi_0: spi@12d20000 { |
| @@ -216,6 +356,10 @@ | |||
| 216 | dma-names = "tx", "rx"; | 356 | dma-names = "tx", "rx"; |
| 217 | #address-cells = <1>; | 357 | #address-cells = <1>; |
| 218 | #size-cells = <0>; | 358 | #size-cells = <0>; |
| 359 | clocks = <&clock 304>, <&clock 154>; | ||
| 360 | clock-names = "spi", "spi_busclk0"; | ||
| 361 | pinctrl-names = "default"; | ||
| 362 | pinctrl-0 = <&spi0_bus>; | ||
| 219 | }; | 363 | }; |
| 220 | 364 | ||
| 221 | spi_1: spi@12d30000 { | 365 | spi_1: spi@12d30000 { |
| @@ -227,6 +371,10 @@ | |||
| 227 | dma-names = "tx", "rx"; | 371 | dma-names = "tx", "rx"; |
| 228 | #address-cells = <1>; | 372 | #address-cells = <1>; |
| 229 | #size-cells = <0>; | 373 | #size-cells = <0>; |
| 374 | clocks = <&clock 305>, <&clock 155>; | ||
| 375 | clock-names = "spi", "spi_busclk0"; | ||
| 376 | pinctrl-names = "default"; | ||
| 377 | pinctrl-0 = <&spi1_bus>; | ||
| 230 | }; | 378 | }; |
| 231 | 379 | ||
| 232 | spi_2: spi@12d40000 { | 380 | spi_2: spi@12d40000 { |
| @@ -238,6 +386,10 @@ | |||
| 238 | dma-names = "tx", "rx"; | 386 | dma-names = "tx", "rx"; |
| 239 | #address-cells = <1>; | 387 | #address-cells = <1>; |
| 240 | #size-cells = <0>; | 388 | #size-cells = <0>; |
| 389 | clocks = <&clock 306>, <&clock 156>; | ||
| 390 | clock-names = "spi", "spi_busclk0"; | ||
| 391 | pinctrl-names = "default"; | ||
| 392 | pinctrl-0 = <&spi2_bus>; | ||
| 241 | }; | 393 | }; |
| 242 | 394 | ||
| 243 | dwmmc_0: dwmmc0@12200000 { | 395 | dwmmc_0: dwmmc0@12200000 { |
| @@ -246,6 +398,8 @@ | |||
| 246 | interrupts = <0 75 0>; | 398 | interrupts = <0 75 0>; |
| 247 | #address-cells = <1>; | 399 | #address-cells = <1>; |
| 248 | #size-cells = <0>; | 400 | #size-cells = <0>; |
| 401 | clocks = <&clock 280>, <&clock 139>; | ||
| 402 | clock-names = "biu", "ciu"; | ||
| 249 | }; | 403 | }; |
| 250 | 404 | ||
| 251 | dwmmc_1: dwmmc1@12210000 { | 405 | dwmmc_1: dwmmc1@12210000 { |
| @@ -254,6 +408,8 @@ | |||
| 254 | interrupts = <0 76 0>; | 408 | interrupts = <0 76 0>; |
| 255 | #address-cells = <1>; | 409 | #address-cells = <1>; |
| 256 | #size-cells = <0>; | 410 | #size-cells = <0>; |
| 411 | clocks = <&clock 281>, <&clock 140>; | ||
| 412 | clock-names = "biu", "ciu"; | ||
| 257 | }; | 413 | }; |
| 258 | 414 | ||
| 259 | dwmmc_2: dwmmc2@12220000 { | 415 | dwmmc_2: dwmmc2@12220000 { |
| @@ -262,6 +418,8 @@ | |||
| 262 | interrupts = <0 77 0>; | 418 | interrupts = <0 77 0>; |
| 263 | #address-cells = <1>; | 419 | #address-cells = <1>; |
| 264 | #size-cells = <0>; | 420 | #size-cells = <0>; |
| 421 | clocks = <&clock 282>, <&clock 141>; | ||
| 422 | clock-names = "biu", "ciu"; | ||
| 265 | }; | 423 | }; |
| 266 | 424 | ||
| 267 | dwmmc_3: dwmmc3@12230000 { | 425 | dwmmc_3: dwmmc3@12230000 { |
| @@ -270,6 +428,8 @@ | |||
| 270 | interrupts = <0 78 0>; | 428 | interrupts = <0 78 0>; |
| 271 | #address-cells = <1>; | 429 | #address-cells = <1>; |
| 272 | #size-cells = <0>; | 430 | #size-cells = <0>; |
| 431 | clocks = <&clock 283>, <&clock 142>; | ||
| 432 | clock-names = "biu", "ciu"; | ||
| 273 | }; | 433 | }; |
| 274 | 434 | ||
| 275 | i2s0: i2s@03830000 { | 435 | i2s0: i2s@03830000 { |
| @@ -283,6 +443,8 @@ | |||
| 283 | samsung,supports-rstclr; | 443 | samsung,supports-rstclr; |
| 284 | samsung,supports-secdai; | 444 | samsung,supports-secdai; |
| 285 | samsung,idma-addr = <0x03000000>; | 445 | samsung,idma-addr = <0x03000000>; |
| 446 | pinctrl-names = "default"; | ||
| 447 | pinctrl-0 = <&i2s0_bus>; | ||
| 286 | }; | 448 | }; |
| 287 | 449 | ||
| 288 | i2s1: i2s@12D60000 { | 450 | i2s1: i2s@12D60000 { |
| @@ -291,6 +453,8 @@ | |||
| 291 | dmas = <&pdma1 12 | 453 | dmas = <&pdma1 12 |
| 292 | &pdma1 11>; | 454 | &pdma1 11>; |
| 293 | dma-names = "tx", "rx"; | 455 | dma-names = "tx", "rx"; |
| 456 | pinctrl-names = "default"; | ||
| 457 | pinctrl-0 = <&i2s1_bus>; | ||
| 294 | }; | 458 | }; |
| 295 | 459 | ||
| 296 | i2s2: i2s@12D70000 { | 460 | i2s2: i2s@12D70000 { |
| @@ -299,6 +463,26 @@ | |||
| 299 | dmas = <&pdma0 12 | 463 | dmas = <&pdma0 12 |
| 300 | &pdma0 11>; | 464 | &pdma0 11>; |
| 301 | dma-names = "tx", "rx"; | 465 | dma-names = "tx", "rx"; |
| 466 | pinctrl-names = "default"; | ||
| 467 | pinctrl-0 = <&i2s2_bus>; | ||
| 468 | }; | ||
| 469 | |||
| 470 | usb@12110000 { | ||
| 471 | compatible = "samsung,exynos4210-ehci"; | ||
| 472 | reg = <0x12110000 0x100>; | ||
| 473 | interrupts = <0 71 0>; | ||
| 474 | |||
| 475 | clocks = <&clock 285>; | ||
| 476 | clock-names = "usbhost"; | ||
| 477 | }; | ||
| 478 | |||
| 479 | usb@12120000 { | ||
| 480 | compatible = "samsung,exynos4210-ohci"; | ||
| 481 | reg = <0x12120000 0x100>; | ||
| 482 | interrupts = <0 71 0>; | ||
| 483 | |||
| 484 | clocks = <&clock 285>; | ||
| 485 | clock-names = "usbhost"; | ||
| 302 | }; | 486 | }; |
| 303 | 487 | ||
| 304 | amba { | 488 | amba { |
| @@ -312,6 +496,8 @@ | |||
| 312 | compatible = "arm,pl330", "arm,primecell"; | 496 | compatible = "arm,pl330", "arm,primecell"; |
| 313 | reg = <0x121A0000 0x1000>; | 497 | reg = <0x121A0000 0x1000>; |
| 314 | interrupts = <0 34 0>; | 498 | interrupts = <0 34 0>; |
| 499 | clocks = <&clock 275>; | ||
| 500 | clock-names = "apb_pclk"; | ||
| 315 | #dma-cells = <1>; | 501 | #dma-cells = <1>; |
| 316 | #dma-channels = <8>; | 502 | #dma-channels = <8>; |
| 317 | #dma-requests = <32>; | 503 | #dma-requests = <32>; |
| @@ -321,6 +507,8 @@ | |||
| 321 | compatible = "arm,pl330", "arm,primecell"; | 507 | compatible = "arm,pl330", "arm,primecell"; |
| 322 | reg = <0x121B0000 0x1000>; | 508 | reg = <0x121B0000 0x1000>; |
| 323 | interrupts = <0 35 0>; | 509 | interrupts = <0 35 0>; |
| 510 | clocks = <&clock 276>; | ||
| 511 | clock-names = "apb_pclk"; | ||
| 324 | #dma-cells = <1>; | 512 | #dma-cells = <1>; |
| 325 | #dma-channels = <8>; | 513 | #dma-channels = <8>; |
| 326 | #dma-requests = <32>; | 514 | #dma-requests = <32>; |
| @@ -330,6 +518,8 @@ | |||
| 330 | compatible = "arm,pl330", "arm,primecell"; | 518 | compatible = "arm,pl330", "arm,primecell"; |
| 331 | reg = <0x10800000 0x1000>; | 519 | reg = <0x10800000 0x1000>; |
| 332 | interrupts = <0 33 0>; | 520 | interrupts = <0 33 0>; |
| 521 | clocks = <&clock 271>; | ||
| 522 | clock-names = "apb_pclk"; | ||
| 333 | #dma-cells = <1>; | 523 | #dma-cells = <1>; |
| 334 | #dma-channels = <8>; | 524 | #dma-channels = <8>; |
| 335 | #dma-requests = <1>; | 525 | #dma-requests = <1>; |
| @@ -339,287 +529,58 @@ | |||
| 339 | compatible = "arm,pl330", "arm,primecell"; | 529 | compatible = "arm,pl330", "arm,primecell"; |
| 340 | reg = <0x11C10000 0x1000>; | 530 | reg = <0x11C10000 0x1000>; |
| 341 | interrupts = <0 124 0>; | 531 | interrupts = <0 124 0>; |
| 532 | clocks = <&clock 271>; | ||
| 533 | clock-names = "apb_pclk"; | ||
| 342 | #dma-cells = <1>; | 534 | #dma-cells = <1>; |
| 343 | #dma-channels = <8>; | 535 | #dma-channels = <8>; |
| 344 | #dma-requests = <1>; | 536 | #dma-requests = <1>; |
| 345 | }; | 537 | }; |
| 346 | }; | 538 | }; |
| 347 | 539 | ||
| 348 | gpio-controllers { | ||
| 349 | #address-cells = <1>; | ||
| 350 | #size-cells = <1>; | ||
| 351 | gpio-controller; | ||
| 352 | ranges; | ||
| 353 | |||
| 354 | gpa0: gpio-controller@11400000 { | ||
| 355 | compatible = "samsung,exynos4-gpio"; | ||
| 356 | reg = <0x11400000 0x20>; | ||
| 357 | #gpio-cells = <4>; | ||
| 358 | }; | ||
| 359 | |||
| 360 | gpa1: gpio-controller@11400020 { | ||
| 361 | compatible = "samsung,exynos4-gpio"; | ||
| 362 | reg = <0x11400020 0x20>; | ||
| 363 | #gpio-cells = <4>; | ||
| 364 | }; | ||
| 365 | |||
| 366 | gpa2: gpio-controller@11400040 { | ||
| 367 | compatible = "samsung,exynos4-gpio"; | ||
| 368 | reg = <0x11400040 0x20>; | ||
| 369 | #gpio-cells = <4>; | ||
| 370 | }; | ||
| 371 | |||
| 372 | gpb0: gpio-controller@11400060 { | ||
| 373 | compatible = "samsung,exynos4-gpio"; | ||
| 374 | reg = <0x11400060 0x20>; | ||
| 375 | #gpio-cells = <4>; | ||
| 376 | }; | ||
| 377 | |||
| 378 | gpb1: gpio-controller@11400080 { | ||
| 379 | compatible = "samsung,exynos4-gpio"; | ||
| 380 | reg = <0x11400080 0x20>; | ||
| 381 | #gpio-cells = <4>; | ||
| 382 | }; | ||
| 383 | |||
| 384 | gpb2: gpio-controller@114000A0 { | ||
| 385 | compatible = "samsung,exynos4-gpio"; | ||
| 386 | reg = <0x114000A0 0x20>; | ||
| 387 | #gpio-cells = <4>; | ||
| 388 | }; | ||
| 389 | |||
| 390 | gpb3: gpio-controller@114000C0 { | ||
| 391 | compatible = "samsung,exynos4-gpio"; | ||
| 392 | reg = <0x114000C0 0x20>; | ||
| 393 | #gpio-cells = <4>; | ||
| 394 | }; | ||
| 395 | |||
| 396 | gpc0: gpio-controller@114000E0 { | ||
| 397 | compatible = "samsung,exynos4-gpio"; | ||
| 398 | reg = <0x114000E0 0x20>; | ||
| 399 | #gpio-cells = <4>; | ||
| 400 | }; | ||
| 401 | |||
| 402 | gpc1: gpio-controller@11400100 { | ||
| 403 | compatible = "samsung,exynos4-gpio"; | ||
| 404 | reg = <0x11400100 0x20>; | ||
| 405 | #gpio-cells = <4>; | ||
| 406 | }; | ||
| 407 | |||
| 408 | gpc2: gpio-controller@11400120 { | ||
| 409 | compatible = "samsung,exynos4-gpio"; | ||
| 410 | reg = <0x11400120 0x20>; | ||
| 411 | #gpio-cells = <4>; | ||
| 412 | }; | ||
| 413 | |||
| 414 | gpc3: gpio-controller@11400140 { | ||
| 415 | compatible = "samsung,exynos4-gpio"; | ||
| 416 | reg = <0x11400140 0x20>; | ||
| 417 | #gpio-cells = <4>; | ||
| 418 | }; | ||
| 419 | |||
| 420 | gpc4: gpio-controller@114002E0 { | ||
| 421 | compatible = "samsung,exynos4-gpio"; | ||
| 422 | reg = <0x114002E0 0x20>; | ||
| 423 | #gpio-cells = <4>; | ||
| 424 | }; | ||
| 425 | |||
| 426 | gpd0: gpio-controller@11400160 { | ||
| 427 | compatible = "samsung,exynos4-gpio"; | ||
| 428 | reg = <0x11400160 0x20>; | ||
| 429 | #gpio-cells = <4>; | ||
| 430 | }; | ||
| 431 | |||
| 432 | gpd1: gpio-controller@11400180 { | ||
| 433 | compatible = "samsung,exynos4-gpio"; | ||
| 434 | reg = <0x11400180 0x20>; | ||
| 435 | #gpio-cells = <4>; | ||
| 436 | }; | ||
| 437 | |||
| 438 | gpy0: gpio-controller@114001A0 { | ||
| 439 | compatible = "samsung,exynos4-gpio"; | ||
| 440 | reg = <0x114001A0 0x20>; | ||
| 441 | #gpio-cells = <4>; | ||
| 442 | }; | ||
| 443 | |||
| 444 | gpy1: gpio-controller@114001C0 { | ||
| 445 | compatible = "samsung,exynos4-gpio"; | ||
| 446 | reg = <0x114001C0 0x20>; | ||
| 447 | #gpio-cells = <4>; | ||
| 448 | }; | ||
| 449 | |||
| 450 | gpy2: gpio-controller@114001E0 { | ||
| 451 | compatible = "samsung,exynos4-gpio"; | ||
| 452 | reg = <0x114001E0 0x20>; | ||
| 453 | #gpio-cells = <4>; | ||
| 454 | }; | ||
| 455 | |||
| 456 | gpy3: gpio-controller@11400200 { | ||
| 457 | compatible = "samsung,exynos4-gpio"; | ||
| 458 | reg = <0x11400200 0x20>; | ||
| 459 | #gpio-cells = <4>; | ||
| 460 | }; | ||
| 461 | |||
| 462 | gpy4: gpio-controller@11400220 { | ||
| 463 | compatible = "samsung,exynos4-gpio"; | ||
| 464 | reg = <0x11400220 0x20>; | ||
| 465 | #gpio-cells = <4>; | ||
| 466 | }; | ||
| 467 | |||
| 468 | gpy5: gpio-controller@11400240 { | ||
| 469 | compatible = "samsung,exynos4-gpio"; | ||
| 470 | reg = <0x11400240 0x20>; | ||
| 471 | #gpio-cells = <4>; | ||
| 472 | }; | ||
| 473 | |||
| 474 | gpy6: gpio-controller@11400260 { | ||
| 475 | compatible = "samsung,exynos4-gpio"; | ||
| 476 | reg = <0x11400260 0x20>; | ||
| 477 | #gpio-cells = <4>; | ||
| 478 | }; | ||
| 479 | |||
| 480 | gpx0: gpio-controller@11400C00 { | ||
| 481 | compatible = "samsung,exynos4-gpio"; | ||
| 482 | reg = <0x11400C00 0x20>; | ||
| 483 | #gpio-cells = <4>; | ||
| 484 | }; | ||
| 485 | |||
| 486 | gpx1: gpio-controller@11400C20 { | ||
| 487 | compatible = "samsung,exynos4-gpio"; | ||
| 488 | reg = <0x11400C20 0x20>; | ||
| 489 | #gpio-cells = <4>; | ||
| 490 | }; | ||
| 491 | |||
| 492 | gpx2: gpio-controller@11400C40 { | ||
| 493 | compatible = "samsung,exynos4-gpio"; | ||
| 494 | reg = <0x11400C40 0x20>; | ||
| 495 | #gpio-cells = <4>; | ||
| 496 | }; | ||
| 497 | |||
| 498 | gpx3: gpio-controller@11400C60 { | ||
| 499 | compatible = "samsung,exynos4-gpio"; | ||
| 500 | reg = <0x11400C60 0x20>; | ||
| 501 | #gpio-cells = <4>; | ||
| 502 | }; | ||
| 503 | |||
| 504 | gpe0: gpio-controller@13400000 { | ||
| 505 | compatible = "samsung,exynos4-gpio"; | ||
| 506 | reg = <0x13400000 0x20>; | ||
| 507 | #gpio-cells = <4>; | ||
| 508 | }; | ||
| 509 | |||
| 510 | gpe1: gpio-controller@13400020 { | ||
| 511 | compatible = "samsung,exynos4-gpio"; | ||
| 512 | reg = <0x13400020 0x20>; | ||
| 513 | #gpio-cells = <4>; | ||
| 514 | }; | ||
| 515 | |||
| 516 | gpf0: gpio-controller@13400040 { | ||
| 517 | compatible = "samsung,exynos4-gpio"; | ||
| 518 | reg = <0x13400040 0x20>; | ||
| 519 | #gpio-cells = <4>; | ||
| 520 | }; | ||
| 521 | |||
| 522 | gpf1: gpio-controller@13400060 { | ||
| 523 | compatible = "samsung,exynos4-gpio"; | ||
| 524 | reg = <0x13400060 0x20>; | ||
| 525 | #gpio-cells = <4>; | ||
| 526 | }; | ||
| 527 | |||
| 528 | gpg0: gpio-controller@13400080 { | ||
| 529 | compatible = "samsung,exynos4-gpio"; | ||
| 530 | reg = <0x13400080 0x20>; | ||
| 531 | #gpio-cells = <4>; | ||
| 532 | }; | ||
| 533 | |||
| 534 | gpg1: gpio-controller@134000A0 { | ||
| 535 | compatible = "samsung,exynos4-gpio"; | ||
| 536 | reg = <0x134000A0 0x20>; | ||
| 537 | #gpio-cells = <4>; | ||
| 538 | }; | ||
| 539 | |||
| 540 | gpg2: gpio-controller@134000C0 { | ||
| 541 | compatible = "samsung,exynos4-gpio"; | ||
| 542 | reg = <0x134000C0 0x20>; | ||
| 543 | #gpio-cells = <4>; | ||
| 544 | }; | ||
| 545 | |||
| 546 | gph0: gpio-controller@134000E0 { | ||
| 547 | compatible = "samsung,exynos4-gpio"; | ||
| 548 | reg = <0x134000E0 0x20>; | ||
| 549 | #gpio-cells = <4>; | ||
| 550 | }; | ||
| 551 | |||
| 552 | gph1: gpio-controller@13400100 { | ||
| 553 | compatible = "samsung,exynos4-gpio"; | ||
| 554 | reg = <0x13400100 0x20>; | ||
| 555 | #gpio-cells = <4>; | ||
| 556 | }; | ||
| 557 | |||
| 558 | gpv0: gpio-controller@10D10000 { | ||
| 559 | compatible = "samsung,exynos4-gpio"; | ||
| 560 | reg = <0x10D10000 0x20>; | ||
| 561 | #gpio-cells = <4>; | ||
| 562 | }; | ||
| 563 | |||
| 564 | gpv1: gpio-controller@10D10020 { | ||
| 565 | compatible = "samsung,exynos4-gpio"; | ||
| 566 | reg = <0x10D10020 0x20>; | ||
| 567 | #gpio-cells = <4>; | ||
| 568 | }; | ||
| 569 | |||
| 570 | gpv2: gpio-controller@10D10040 { | ||
| 571 | compatible = "samsung,exynos4-gpio"; | ||
| 572 | reg = <0x10D10060 0x20>; | ||
| 573 | #gpio-cells = <4>; | ||
| 574 | }; | ||
| 575 | |||
| 576 | gpv3: gpio-controller@10D10060 { | ||
| 577 | compatible = "samsung,exynos4-gpio"; | ||
| 578 | reg = <0x10D10080 0x20>; | ||
| 579 | #gpio-cells = <4>; | ||
| 580 | }; | ||
| 581 | |||
| 582 | gpv4: gpio-controller@10D10080 { | ||
| 583 | compatible = "samsung,exynos4-gpio"; | ||
| 584 | reg = <0x10D100C0 0x20>; | ||
| 585 | #gpio-cells = <4>; | ||
| 586 | }; | ||
| 587 | |||
| 588 | gpz: gpio-controller@03860000 { | ||
| 589 | compatible = "samsung,exynos4-gpio"; | ||
| 590 | reg = <0x03860000 0x20>; | ||
| 591 | #gpio-cells = <4>; | ||
| 592 | }; | ||
| 593 | }; | ||
| 594 | |||
| 595 | gsc_0: gsc@0x13e00000 { | 540 | gsc_0: gsc@0x13e00000 { |
| 596 | compatible = "samsung,exynos5-gsc"; | 541 | compatible = "samsung,exynos5-gsc"; |
| 597 | reg = <0x13e00000 0x1000>; | 542 | reg = <0x13e00000 0x1000>; |
| 598 | interrupts = <0 85 0>; | 543 | interrupts = <0 85 0>; |
| 544 | samsung,power-domain = <&pd_gsc>; | ||
| 545 | clocks = <&clock 256>; | ||
| 546 | clock-names = "gscl"; | ||
| 599 | }; | 547 | }; |
| 600 | 548 | ||
| 601 | gsc_1: gsc@0x13e10000 { | 549 | gsc_1: gsc@0x13e10000 { |
| 602 | compatible = "samsung,exynos5-gsc"; | 550 | compatible = "samsung,exynos5-gsc"; |
| 603 | reg = <0x13e10000 0x1000>; | 551 | reg = <0x13e10000 0x1000>; |
| 604 | interrupts = <0 86 0>; | 552 | interrupts = <0 86 0>; |
| 553 | samsung,power-domain = <&pd_gsc>; | ||
| 554 | clocks = <&clock 257>; | ||
| 555 | clock-names = "gscl"; | ||
| 605 | }; | 556 | }; |
| 606 | 557 | ||
| 607 | gsc_2: gsc@0x13e20000 { | 558 | gsc_2: gsc@0x13e20000 { |
| 608 | compatible = "samsung,exynos5-gsc"; | 559 | compatible = "samsung,exynos5-gsc"; |
| 609 | reg = <0x13e20000 0x1000>; | 560 | reg = <0x13e20000 0x1000>; |
| 610 | interrupts = <0 87 0>; | 561 | interrupts = <0 87 0>; |
| 562 | samsung,power-domain = <&pd_gsc>; | ||
| 563 | clocks = <&clock 258>; | ||
| 564 | clock-names = "gscl"; | ||
| 611 | }; | 565 | }; |
| 612 | 566 | ||
| 613 | gsc_3: gsc@0x13e30000 { | 567 | gsc_3: gsc@0x13e30000 { |
| 614 | compatible = "samsung,exynos5-gsc"; | 568 | compatible = "samsung,exynos5-gsc"; |
| 615 | reg = <0x13e30000 0x1000>; | 569 | reg = <0x13e30000 0x1000>; |
| 616 | interrupts = <0 88 0>; | 570 | interrupts = <0 88 0>; |
| 571 | samsung,power-domain = <&pd_gsc>; | ||
| 572 | clocks = <&clock 259>; | ||
| 573 | clock-names = "gscl"; | ||
| 617 | }; | 574 | }; |
| 618 | 575 | ||
| 619 | hdmi { | 576 | hdmi { |
| 620 | compatible = "samsung,exynos5-hdmi"; | 577 | compatible = "samsung,exynos5-hdmi"; |
| 621 | reg = <0x14530000 0x70000>; | 578 | reg = <0x14530000 0x70000>; |
| 622 | interrupts = <0 95 0>; | 579 | interrupts = <0 95 0>; |
| 580 | clocks = <&clock 333>, <&clock 136>, <&clock 137>, | ||
| 581 | <&clock 333>, <&clock 333>; | ||
| 582 | clock-names = "hdmi", "sclk_hdmi", "sclk_pixel", | ||
| 583 | "sclk_hdmiphy", "hdmiphy"; | ||
| 623 | }; | 584 | }; |
| 624 | 585 | ||
| 625 | mixer { | 586 | mixer { |
| @@ -627,4 +588,28 @@ | |||
| 627 | reg = <0x14450000 0x10000>; | 588 | reg = <0x14450000 0x10000>; |
| 628 | interrupts = <0 94 0>; | 589 | interrupts = <0 94 0>; |
| 629 | }; | 590 | }; |
| 591 | |||
| 592 | dp-controller { | ||
| 593 | compatible = "samsung,exynos5-dp"; | ||
| 594 | reg = <0x145b0000 0x1000>; | ||
| 595 | interrupts = <10 3>; | ||
| 596 | interrupt-parent = <&combiner>; | ||
| 597 | #address-cells = <1>; | ||
| 598 | #size-cells = <0>; | ||
| 599 | |||
| 600 | dptx-phy { | ||
| 601 | reg = <0x10040720>; | ||
| 602 | samsung,enable-mask = <1>; | ||
| 603 | }; | ||
| 604 | }; | ||
| 605 | |||
| 606 | fimd { | ||
| 607 | compatible = "samsung,exynos5250-fimd"; | ||
| 608 | interrupt-parent = <&combiner>; | ||
| 609 | reg = <0x14400000 0x40000>; | ||
| 610 | interrupt-names = "fifo", "vsync", "lcd_sys"; | ||
| 611 | interrupts = <18 4>, <18 5>, <18 6>; | ||
| 612 | clocks = <&clock 133>, <&clock 339>; | ||
| 613 | clock-names = "sclk_fimd", "fimd"; | ||
| 614 | }; | ||
| 630 | }; | 615 | }; |
diff --git a/arch/arm/boot/dts/exynos5440-sd5v1.dts b/arch/arm/boot/dts/exynos5440-sd5v1.dts new file mode 100644 index 000000000000..ef747b52b674 --- /dev/null +++ b/arch/arm/boot/dts/exynos5440-sd5v1.dts | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | /* | ||
| 2 | * SAMSUNG SD5v1 board device tree source | ||
| 3 | * | ||
| 4 | * Copyright (c) 2013 Samsung Electronics Co., Ltd. | ||
| 5 | * http://www.samsung.com | ||
| 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 | /dts-v1/; | ||
| 13 | /include/ "exynos5440.dtsi" | ||
| 14 | |||
| 15 | / { | ||
| 16 | model = "SAMSUNG SD5v1 board based on EXYNOS5440"; | ||
| 17 | compatible = "samsung,sd5v1", "samsung,exynos5440"; | ||
| 18 | |||
| 19 | chosen { | ||
| 20 | bootargs = "root=/dev/sda2 rw rootwait ignore_loglevel early_printk no_console_suspend mem=2048M@0x80000000 console=ttySAC0,115200"; | ||
| 21 | }; | ||
| 22 | |||
| 23 | fixed-rate-clocks { | ||
| 24 | xtal { | ||
| 25 | compatible = "samsung,clock-xtal"; | ||
| 26 | clock-frequency = <50000000>; | ||
| 27 | }; | ||
| 28 | }; | ||
| 29 | |||
| 30 | gmac: ethernet@00230000 { | ||
| 31 | fixed_phy; | ||
| 32 | phy_addr = <1>; | ||
| 33 | }; | ||
| 34 | |||
| 35 | spi { | ||
| 36 | status = "disabled"; | ||
| 37 | }; | ||
| 38 | |||
| 39 | }; | ||
diff --git a/arch/arm/boot/dts/exynos5440-ssdk5440.dts b/arch/arm/boot/dts/exynos5440-ssdk5440.dts index 81e2c964a900..d55042beb5c5 100644 --- a/arch/arm/boot/dts/exynos5440-ssdk5440.dts +++ b/arch/arm/boot/dts/exynos5440-ssdk5440.dts | |||
| @@ -16,31 +16,18 @@ | |||
| 16 | model = "SAMSUNG SSDK5440 board based on EXYNOS5440"; | 16 | model = "SAMSUNG SSDK5440 board based on EXYNOS5440"; |
| 17 | compatible = "samsung,ssdk5440", "samsung,exynos5440"; | 17 | compatible = "samsung,ssdk5440", "samsung,exynos5440"; |
| 18 | 18 | ||
| 19 | memory { | ||
| 20 | reg = <0x80000000 0x80000000>; | ||
| 21 | }; | ||
| 22 | |||
| 23 | chosen { | 19 | chosen { |
| 24 | bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x81000000,8M console=ttySAC0,115200 init=/linuxrc"; | 20 | bootargs = "root=/dev/sda2 rw rootwait ignore_loglevel early_printk no_console_suspend mem=2048M@0x80000000 console=ttySAC0,115200"; |
| 25 | }; | 21 | }; |
| 26 | 22 | ||
| 27 | spi { | 23 | spi { |
| 28 | status = "disabled"; | 24 | status = "disabled"; |
| 29 | }; | 25 | }; |
| 30 | 26 | ||
| 31 | i2c@F0000 { | 27 | fixed-rate-clocks { |
| 32 | status = "disabled"; | 28 | xtal { |
| 33 | }; | 29 | compatible = "samsung,clock-xtal"; |
| 34 | 30 | clock-frequency = <50000000>; | |
| 35 | i2c@100000 { | 31 | }; |
| 36 | status = "disabled"; | ||
| 37 | }; | ||
| 38 | |||
| 39 | watchdog { | ||
| 40 | status = "disabled"; | ||
| 41 | }; | ||
| 42 | |||
| 43 | rtc { | ||
| 44 | status = "disabled"; | ||
| 45 | }; | 32 | }; |
| 46 | }; | 33 | }; |
diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi index 9a99755920c0..93e9028edaaf 100644 --- a/arch/arm/boot/dts/exynos5440.dtsi +++ b/arch/arm/boot/dts/exynos5440.dtsi | |||
| @@ -16,63 +16,89 @@ | |||
| 16 | 16 | ||
| 17 | interrupt-parent = <&gic>; | 17 | interrupt-parent = <&gic>; |
| 18 | 18 | ||
| 19 | clock: clock-controller@0x160000 { | ||
| 20 | compatible = "samsung,exynos5440-clock"; | ||
| 21 | reg = <0x160000 0x1000>; | ||
| 22 | #clock-cells = <1>; | ||
| 23 | }; | ||
| 24 | |||
| 19 | gic:interrupt-controller@2E0000 { | 25 | gic:interrupt-controller@2E0000 { |
| 20 | compatible = "arm,cortex-a15-gic"; | 26 | compatible = "arm,cortex-a15-gic"; |
| 21 | #interrupt-cells = <3>; | 27 | #interrupt-cells = <3>; |
| 22 | interrupt-controller; | 28 | interrupt-controller; |
| 23 | reg = <0x2E1000 0x1000>, <0x2E2000 0x1000>; | 29 | reg = <0x2E1000 0x1000>, |
| 30 | <0x2E2000 0x1000>, | ||
| 31 | <0x2E4000 0x2000>, | ||
| 32 | <0x2E6000 0x2000>; | ||
| 33 | interrupts = <1 9 0xf04>; | ||
| 24 | }; | 34 | }; |
| 25 | 35 | ||
| 26 | cpus { | 36 | cpus { |
| 37 | #address-cells = <1>; | ||
| 38 | #size-cells = <0>; | ||
| 39 | |||
| 27 | cpu@0 { | 40 | cpu@0 { |
| 28 | compatible = "arm,cortex-a15"; | 41 | compatible = "arm,cortex-a15"; |
| 29 | timer { | 42 | reg = <0>; |
| 30 | compatible = "arm,armv7-timer"; | ||
| 31 | interrupts = <1 13 0xf08>; | ||
| 32 | clock-frequency = <1000000>; | ||
| 33 | }; | ||
| 34 | }; | 43 | }; |
| 35 | cpu@1 { | 44 | cpu@1 { |
| 36 | compatible = "arm,cortex-a15"; | 45 | compatible = "arm,cortex-a15"; |
| 37 | timer { | 46 | reg = <1>; |
| 38 | compatible = "arm,armv7-timer"; | ||
| 39 | interrupts = <1 14 0xf08>; | ||
| 40 | clock-frequency = <1000000>; | ||
| 41 | }; | ||
| 42 | }; | 47 | }; |
| 43 | cpu@2 { | 48 | cpu@2 { |
| 44 | compatible = "arm,cortex-a15"; | 49 | compatible = "arm,cortex-a15"; |
| 45 | timer { | 50 | reg = <2>; |
| 46 | compatible = "arm,armv7-timer"; | ||
| 47 | interrupts = <1 14 0xf08>; | ||
| 48 | clock-frequency = <1000000>; | ||
| 49 | }; | ||
| 50 | }; | 51 | }; |
| 51 | cpu@3 { | 52 | cpu@3 { |
| 52 | compatible = "arm,cortex-a15"; | 53 | compatible = "arm,cortex-a15"; |
| 53 | timer { | 54 | reg = <3>; |
| 54 | compatible = "arm,armv7-timer"; | ||
| 55 | interrupts = <1 14 0xf08>; | ||
| 56 | clock-frequency = <1000000>; | ||
| 57 | }; | ||
| 58 | }; | 55 | }; |
| 59 | }; | 56 | }; |
| 60 | 57 | ||
| 61 | common { | 58 | arm-pmu { |
| 62 | compatible = "samsung,exynos5440"; | 59 | compatible = "arm,cortex-a15-pmu", "arm,cortex-a9-pmu"; |
| 60 | interrupts = <0 52 4>, | ||
| 61 | <0 53 4>, | ||
| 62 | <0 54 4>, | ||
| 63 | <0 55 4>; | ||
| 64 | }; | ||
| 65 | |||
| 66 | timer { | ||
| 67 | compatible = "arm,cortex-a15-timer", | ||
| 68 | "arm,armv7-timer"; | ||
| 69 | interrupts = <1 13 0xf08>, | ||
| 70 | <1 14 0xf08>, | ||
| 71 | <1 11 0xf08>, | ||
| 72 | <1 10 0xf08>; | ||
| 73 | clock-frequency = <50000000>; | ||
| 74 | }; | ||
| 63 | 75 | ||
| 76 | cpufreq@160000 { | ||
| 77 | compatible = "samsung,exynos5440-cpufreq"; | ||
| 78 | reg = <0x160000 0x1000>; | ||
| 79 | interrupts = <0 57 0>; | ||
| 80 | operating-points = < | ||
| 81 | /* KHz uV */ | ||
| 82 | 1200000 1025000 | ||
| 83 | 1000000 975000 | ||
| 84 | 800000 925000 | ||
| 85 | >; | ||
| 64 | }; | 86 | }; |
| 65 | 87 | ||
| 66 | serial@B0000 { | 88 | serial@B0000 { |
| 67 | compatible = "samsung,exynos4210-uart"; | 89 | compatible = "samsung,exynos4210-uart"; |
| 68 | reg = <0xB0000 0x1000>; | 90 | reg = <0xB0000 0x1000>; |
| 69 | interrupts = <0 2 0>; | 91 | interrupts = <0 2 0>; |
| 92 | clocks = <&clock 21>, <&clock 21>; | ||
| 93 | clock-names = "uart", "clk_uart_baud0"; | ||
| 70 | }; | 94 | }; |
| 71 | 95 | ||
| 72 | serial@C0000 { | 96 | serial@C0000 { |
| 73 | compatible = "samsung,exynos4210-uart"; | 97 | compatible = "samsung,exynos4210-uart"; |
| 74 | reg = <0xC0000 0x1000>; | 98 | reg = <0xC0000 0x1000>; |
| 75 | interrupts = <0 3 0>; | 99 | interrupts = <0 3 0>; |
| 100 | clocks = <&clock 21>, <&clock 21>; | ||
| 101 | clock-names = "uart", "clk_uart_baud0"; | ||
| 76 | }; | 102 | }; |
| 77 | 103 | ||
| 78 | spi { | 104 | spi { |
| @@ -83,11 +109,15 @@ | |||
| 83 | rx-dma-channel = <&pdma0 4>; /* preliminary */ | 109 | rx-dma-channel = <&pdma0 4>; /* preliminary */ |
| 84 | #address-cells = <1>; | 110 | #address-cells = <1>; |
| 85 | #size-cells = <0>; | 111 | #size-cells = <0>; |
| 112 | clocks = <&clock 21>, <&clock 16>; | ||
| 113 | clock-names = "spi", "spi_busclk0"; | ||
| 86 | }; | 114 | }; |
| 87 | 115 | ||
| 88 | pinctrl { | 116 | pinctrl { |
| 89 | compatible = "samsung,exynos5440-pinctrl"; | 117 | compatible = "samsung,exynos5440-pinctrl"; |
| 90 | reg = <0xE0000 0x1000>; | 118 | reg = <0xE0000 0x1000>; |
| 119 | interrupts = <0 37 0>, <0 38 0>, <0 39 0>, <0 40 0>, | ||
| 120 | <0 41 0>, <0 42 0>, <0 43 0>, <0 44 0>; | ||
| 91 | interrupt-controller; | 121 | interrupt-controller; |
| 92 | #interrupt-cells = <2>; | 122 | #interrupt-cells = <2>; |
| 93 | #gpio-cells = <2>; | 123 | #gpio-cells = <2>; |
| @@ -110,25 +140,42 @@ | |||
| 110 | }; | 140 | }; |
| 111 | 141 | ||
| 112 | i2c@F0000 { | 142 | i2c@F0000 { |
| 113 | compatible = "samsung,s3c2440-i2c"; | 143 | compatible = "samsung,exynos5440-i2c"; |
| 114 | reg = <0xF0000 0x1000>; | 144 | reg = <0xF0000 0x1000>; |
| 115 | interrupts = <0 5 0>; | 145 | interrupts = <0 5 0>; |
| 116 | #address-cells = <1>; | 146 | #address-cells = <1>; |
| 117 | #size-cells = <0>; | 147 | #size-cells = <0>; |
| 148 | clocks = <&clock 21>; | ||
| 149 | clock-names = "i2c"; | ||
| 118 | }; | 150 | }; |
| 119 | 151 | ||
| 120 | i2c@100000 { | 152 | i2c@100000 { |
| 121 | compatible = "samsung,s3c2440-i2c"; | 153 | compatible = "samsung,exynos5440-i2c"; |
| 122 | reg = <0x100000 0x1000>; | 154 | reg = <0x100000 0x1000>; |
| 123 | interrupts = <0 6 0>; | 155 | interrupts = <0 6 0>; |
| 124 | #address-cells = <1>; | 156 | #address-cells = <1>; |
| 125 | #size-cells = <0>; | 157 | #size-cells = <0>; |
| 158 | clocks = <&clock 21>; | ||
| 159 | clock-names = "i2c"; | ||
| 126 | }; | 160 | }; |
| 127 | 161 | ||
| 128 | watchdog { | 162 | watchdog { |
| 129 | compatible = "samsung,s3c2410-wdt"; | 163 | compatible = "samsung,s3c2410-wdt"; |
| 130 | reg = <0x110000 0x1000>; | 164 | reg = <0x110000 0x1000>; |
| 131 | interrupts = <0 1 0>; | 165 | interrupts = <0 1 0>; |
| 166 | clocks = <&clock 21>; | ||
| 167 | clock-names = "watchdog"; | ||
| 168 | }; | ||
| 169 | |||
| 170 | gmac: ethernet@00230000 { | ||
| 171 | compatible = "snps,dwmac-3.70a"; | ||
| 172 | reg = <0x00230000 0x8000>; | ||
| 173 | interrupt-parent = <&gic>; | ||
| 174 | interrupts = <0 31 4>; | ||
| 175 | interrupt-names = "macirq"; | ||
| 176 | phy-mode = "sgmii"; | ||
| 177 | clocks = <&clock 25>; | ||
| 178 | clock-names = "stmmaceth"; | ||
| 132 | }; | 179 | }; |
| 133 | 180 | ||
| 134 | amba { | 181 | amba { |
| @@ -138,19 +185,23 @@ | |||
| 138 | interrupt-parent = <&gic>; | 185 | interrupt-parent = <&gic>; |
| 139 | ranges; | 186 | ranges; |
| 140 | 187 | ||
| 141 | pdma0: pdma@121A0000 { | 188 | pdma0: pdma@00121000 { |
| 142 | compatible = "arm,pl330", "arm,primecell"; | 189 | compatible = "arm,pl330", "arm,primecell"; |
| 143 | reg = <0x120000 0x1000>; | 190 | reg = <0x121000 0x1000>; |
| 144 | interrupts = <0 34 0>; | 191 | interrupts = <0 46 0>; |
| 192 | clocks = <&clock 8>; | ||
| 193 | clock-names = "apb_pclk"; | ||
| 145 | #dma-cells = <1>; | 194 | #dma-cells = <1>; |
| 146 | #dma-channels = <8>; | 195 | #dma-channels = <8>; |
| 147 | #dma-requests = <32>; | 196 | #dma-requests = <32>; |
| 148 | }; | 197 | }; |
| 149 | 198 | ||
| 150 | pdma1: pdma@121B0000 { | 199 | pdma1: pdma@00120000 { |
| 151 | compatible = "arm,pl330", "arm,primecell"; | 200 | compatible = "arm,pl330", "arm,primecell"; |
| 152 | reg = <0x121000 0x1000>; | 201 | reg = <0x120000 0x1000>; |
| 153 | interrupts = <0 35 0>; | 202 | interrupts = <0 47 0>; |
| 203 | clocks = <&clock 8>; | ||
| 204 | clock-names = "apb_pclk"; | ||
| 154 | #dma-cells = <1>; | 205 | #dma-cells = <1>; |
| 155 | #dma-channels = <8>; | 206 | #dma-channels = <8>; |
| 156 | #dma-requests = <32>; | 207 | #dma-requests = <32>; |
| @@ -161,5 +212,7 @@ | |||
| 161 | compatible = "samsung,s3c6410-rtc"; | 212 | compatible = "samsung,s3c6410-rtc"; |
| 162 | reg = <0x130000 0x1000>; | 213 | reg = <0x130000 0x1000>; |
| 163 | interrupts = <0 17 0>, <0 16 0>; | 214 | interrupts = <0 17 0>, <0 16 0>; |
| 215 | clocks = <&clock 21>; | ||
| 216 | clock-names = "rtc"; | ||
| 164 | }; | 217 | }; |
| 165 | }; | 218 | }; |
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 70f94c87479d..ef3b69a6277c 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
| @@ -61,6 +61,7 @@ config SOC_EXYNOS5250 | |||
| 61 | bool "SAMSUNG EXYNOS5250" | 61 | bool "SAMSUNG EXYNOS5250" |
| 62 | default y | 62 | default y |
| 63 | depends on ARCH_EXYNOS5 | 63 | depends on ARCH_EXYNOS5 |
| 64 | select PM_GENERIC_DOMAINS if PM | ||
| 64 | select S5P_PM if PM | 65 | select S5P_PM if PM |
| 65 | select S5P_SLEEP if PM | 66 | select S5P_SLEEP if PM |
| 66 | select S5P_DEV_MFC | 67 | select S5P_DEV_MFC |
| @@ -79,12 +80,6 @@ config SOC_EXYNOS5440 | |||
| 79 | help | 80 | help |
| 80 | Enable EXYNOS5440 SoC support | 81 | Enable EXYNOS5440 SoC support |
| 81 | 82 | ||
| 82 | config EXYNOS4_MCT | ||
| 83 | bool | ||
| 84 | default y | ||
| 85 | help | ||
| 86 | Use MCT (Multi Core Timer) as kernel timers | ||
| 87 | |||
| 88 | config EXYNOS_DEV_DMA | 83 | config EXYNOS_DEV_DMA |
| 89 | bool | 84 | bool |
| 90 | help | 85 | help |
| @@ -276,8 +271,8 @@ config MACH_UNIVERSAL_C210 | |||
| 276 | select S5P_DEV_ONENAND | 271 | select S5P_DEV_ONENAND |
| 277 | select S5P_DEV_TV | 272 | select S5P_DEV_TV |
| 278 | select S5P_GPIO_INT | 273 | select S5P_GPIO_INT |
| 279 | select S5P_HRT | ||
| 280 | select S5P_SETUP_MIPIPHY | 274 | select S5P_SETUP_MIPIPHY |
| 275 | select SAMSUNG_HRT | ||
| 281 | help | 276 | help |
| 282 | Machine support for Samsung Mobile Universal S5PC210 Reference | 277 | Machine support for Samsung Mobile Universal S5PC210 Reference |
| 283 | Board. | 278 | Board. |
| @@ -406,10 +401,12 @@ config MACH_EXYNOS4_DT | |||
| 406 | bool "Samsung Exynos4 Machine using device tree" | 401 | bool "Samsung Exynos4 Machine using device tree" |
| 407 | depends on ARCH_EXYNOS4 | 402 | depends on ARCH_EXYNOS4 |
| 408 | select ARM_AMBA | 403 | select ARM_AMBA |
| 404 | select CLKSRC_OF | ||
| 409 | select CPU_EXYNOS4210 | 405 | select CPU_EXYNOS4210 |
| 410 | select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD | 406 | select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD |
| 411 | select PINCTRL | 407 | select PINCTRL |
| 412 | select PINCTRL_EXYNOS | 408 | select PINCTRL_EXYNOS |
| 409 | select S5P_DEV_MFC | ||
| 413 | select USE_OF | 410 | select USE_OF |
| 414 | help | 411 | help |
| 415 | Machine support for Samsung Exynos4 machine with device tree enabled. | 412 | Machine support for Samsung Exynos4 machine with device tree enabled. |
| @@ -422,6 +419,7 @@ config MACH_EXYNOS5_DT | |||
| 422 | default y | 419 | default y |
| 423 | depends on ARCH_EXYNOS5 | 420 | depends on ARCH_EXYNOS5 |
| 424 | select ARM_AMBA | 421 | select ARM_AMBA |
| 422 | select CLKSRC_OF | ||
| 425 | select USE_OF | 423 | select USE_OF |
| 426 | help | 424 | help |
| 427 | Machine support for Samsung EXYNOS5 machine with device tree enabled. | 425 | Machine support for Samsung EXYNOS5 machine with device tree enabled. |
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 435757e57bb4..d2f6b362b6dd 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile | |||
| @@ -13,10 +13,6 @@ obj- := | |||
| 13 | # Core | 13 | # Core |
| 14 | 14 | ||
| 15 | obj-$(CONFIG_ARCH_EXYNOS) += common.o | 15 | obj-$(CONFIG_ARCH_EXYNOS) += common.o |
| 16 | obj-$(CONFIG_ARCH_EXYNOS4) += clock-exynos4.o | ||
| 17 | obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o | ||
| 18 | obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o | ||
| 19 | obj-$(CONFIG_SOC_EXYNOS5250) += clock-exynos5.o | ||
| 20 | 16 | ||
| 21 | obj-$(CONFIG_PM) += pm.o | 17 | obj-$(CONFIG_PM) += pm.o |
| 22 | obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o | 18 | obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o |
| @@ -26,8 +22,6 @@ obj-$(CONFIG_ARCH_EXYNOS) += pmu.o | |||
| 26 | 22 | ||
| 27 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 23 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
| 28 | 24 | ||
| 29 | obj-$(CONFIG_EXYNOS4_MCT) += mct.o | ||
| 30 | |||
| 31 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 25 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
| 32 | 26 | ||
| 33 | # machine support | 27 | # machine support |
diff --git a/arch/arm/mach-exynos/clock-exynos4.c b/arch/arm/mach-exynos/clock-exynos4.c deleted file mode 100644 index 8a8468d83c8c..000000000000 --- a/arch/arm/mach-exynos/clock-exynos4.c +++ /dev/null | |||
| @@ -1,1601 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd. | ||
| 3 | * http://www.samsung.com | ||
| 4 | * | ||
| 5 | * EXYNOS4 - Clock support | ||
| 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/err.h> | ||
| 14 | #include <linux/io.h> | ||
| 15 | #include <linux/syscore_ops.h> | ||
| 16 | |||
| 17 | #include <plat/cpu-freq.h> | ||
| 18 | #include <plat/clock.h> | ||
| 19 | #include <plat/cpu.h> | ||
| 20 | #include <plat/pll.h> | ||
| 21 | #include <plat/s5p-clock.h> | ||
| 22 | #include <plat/clock-clksrc.h> | ||
| 23 | #include <plat/pm.h> | ||
| 24 | |||
| 25 | #include <mach/map.h> | ||
| 26 | #include <mach/regs-clock.h> | ||
| 27 | |||
| 28 | #include "common.h" | ||
| 29 | #include "clock-exynos4.h" | ||
| 30 | |||
| 31 | #ifdef CONFIG_PM_SLEEP | ||
| 32 | static struct sleep_save exynos4_clock_save[] = { | ||
| 33 | SAVE_ITEM(EXYNOS4_CLKDIV_LEFTBUS), | ||
| 34 | SAVE_ITEM(EXYNOS4_CLKGATE_IP_LEFTBUS), | ||
| 35 | SAVE_ITEM(EXYNOS4_CLKDIV_RIGHTBUS), | ||
| 36 | SAVE_ITEM(EXYNOS4_CLKGATE_IP_RIGHTBUS), | ||
| 37 | SAVE_ITEM(EXYNOS4_CLKSRC_TOP0), | ||
| 38 | SAVE_ITEM(EXYNOS4_CLKSRC_TOP1), | ||
| 39 | SAVE_ITEM(EXYNOS4_CLKSRC_CAM), | ||
| 40 | SAVE_ITEM(EXYNOS4_CLKSRC_TV), | ||
| 41 | SAVE_ITEM(EXYNOS4_CLKSRC_MFC), | ||
| 42 | SAVE_ITEM(EXYNOS4_CLKSRC_G3D), | ||
| 43 | SAVE_ITEM(EXYNOS4_CLKSRC_LCD0), | ||
| 44 | SAVE_ITEM(EXYNOS4_CLKSRC_MAUDIO), | ||
| 45 | SAVE_ITEM(EXYNOS4_CLKSRC_FSYS), | ||
| 46 | SAVE_ITEM(EXYNOS4_CLKSRC_PERIL0), | ||
| 47 | SAVE_ITEM(EXYNOS4_CLKSRC_PERIL1), | ||
| 48 | SAVE_ITEM(EXYNOS4_CLKDIV_CAM), | ||
| 49 | SAVE_ITEM(EXYNOS4_CLKDIV_TV), | ||
| 50 | SAVE_ITEM(EXYNOS4_CLKDIV_MFC), | ||
| 51 | SAVE_ITEM(EXYNOS4_CLKDIV_G3D), | ||
| 52 | SAVE_ITEM(EXYNOS4_CLKDIV_LCD0), | ||
| 53 | SAVE_ITEM(EXYNOS4_CLKDIV_MAUDIO), | ||
| 54 | SAVE_ITEM(EXYNOS4_CLKDIV_FSYS0), | ||
| 55 | SAVE_ITEM(EXYNOS4_CLKDIV_FSYS1), | ||
| 56 | SAVE_ITEM(EXYNOS4_CLKDIV_FSYS2), | ||
| 57 | SAVE_ITEM(EXYNOS4_CLKDIV_FSYS3), | ||
| 58 | SAVE_ITEM(EXYNOS4_CLKDIV_PERIL0), | ||
| 59 | SAVE_ITEM(EXYNOS4_CLKDIV_PERIL1), | ||
| 60 | SAVE_ITEM(EXYNOS4_CLKDIV_PERIL2), | ||
| 61 | SAVE_ITEM(EXYNOS4_CLKDIV_PERIL3), | ||
| 62 | SAVE_ITEM(EXYNOS4_CLKDIV_PERIL4), | ||
| 63 | SAVE_ITEM(EXYNOS4_CLKDIV_PERIL5), | ||
| 64 | SAVE_ITEM(EXYNOS4_CLKDIV_TOP), | ||
| 65 | SAVE_ITEM(EXYNOS4_CLKSRC_MASK_TOP), | ||
| 66 | SAVE_ITEM(EXYNOS4_CLKSRC_MASK_CAM), | ||
| 67 | SAVE_ITEM(EXYNOS4_CLKSRC_MASK_TV), | ||
| 68 | SAVE_ITEM(EXYNOS4_CLKSRC_MASK_LCD0), | ||
| 69 | SAVE_ITEM(EXYNOS4_CLKSRC_MASK_MAUDIO), | ||
| 70 | SAVE_ITEM(EXYNOS4_CLKSRC_MASK_FSYS), | ||
| 71 | SAVE_ITEM(EXYNOS4_CLKSRC_MASK_PERIL0), | ||
| 72 | SAVE_ITEM(EXYNOS4_CLKSRC_MASK_PERIL1), | ||
| 73 | SAVE_ITEM(EXYNOS4_CLKDIV2_RATIO), | ||
| 74 | SAVE_ITEM(EXYNOS4_CLKGATE_SCLKCAM), | ||
| 75 | SAVE_ITEM(EXYNOS4_CLKGATE_IP_CAM), | ||
| 76 | SAVE_ITEM(EXYNOS4_CLKGATE_IP_TV), | ||
| 77 | SAVE_ITEM(EXYNOS4_CLKGATE_IP_MFC), | ||
| 78 | SAVE_ITEM(EXYNOS4_CLKGATE_IP_G3D), | ||
| 79 | SAVE_ITEM(EXYNOS4_CLKGATE_IP_LCD0), | ||
| 80 | SAVE_ITEM(EXYNOS4_CLKGATE_IP_FSYS), | ||
| 81 | SAVE_ITEM(EXYNOS4_CLKGATE_IP_GPS), | ||
| 82 | SAVE_ITEM(EXYNOS4_CLKGATE_IP_PERIL), | ||
| 83 | SAVE_ITEM(EXYNOS4_CLKGATE_BLOCK), | ||
| 84 | SAVE_ITEM(EXYNOS4_CLKSRC_MASK_DMC), | ||
| 85 | SAVE_ITEM(EXYNOS4_CLKSRC_DMC), | ||
| 86 | SAVE_ITEM(EXYNOS4_CLKDIV_DMC0), | ||
| 87 | SAVE_ITEM(EXYNOS4_CLKDIV_DMC1), | ||
| 88 | SAVE_ITEM(EXYNOS4_CLKGATE_IP_DMC), | ||
| 89 | SAVE_ITEM(EXYNOS4_CLKSRC_CPU), | ||
| 90 | SAVE_ITEM(EXYNOS4_CLKDIV_CPU), | ||
| 91 | SAVE_ITEM(EXYNOS4_CLKDIV_CPU + 0x4), | ||
| 92 | SAVE_ITEM(EXYNOS4_CLKGATE_SCLKCPU), | ||
| 93 | SAVE_ITEM(EXYNOS4_CLKGATE_IP_CPU), | ||
| 94 | }; | ||
| 95 | #endif | ||
| 96 | |||
| 97 | static struct clk exynos4_clk_sclk_hdmi27m = { | ||
| 98 | .name = "sclk_hdmi27m", | ||
| 99 | .rate = 27000000, | ||
| 100 | }; | ||
| 101 | |||
| 102 | static struct clk exynos4_clk_sclk_hdmiphy = { | ||
| 103 | .name = "sclk_hdmiphy", | ||
| 104 | }; | ||
| 105 | |||
| 106 | static struct clk exynos4_clk_sclk_usbphy0 = { | ||
| 107 | .name = "sclk_usbphy0", | ||
| 108 | .rate = 27000000, | ||
| 109 | }; | ||
| 110 | |||
| 111 | static struct clk exynos4_clk_sclk_usbphy1 = { | ||
| 112 | .name = "sclk_usbphy1", | ||
| 113 | }; | ||
| 114 | |||
| 115 | static struct clk dummy_apb_pclk = { | ||
| 116 | .name = "apb_pclk", | ||
| 117 | .id = -1, | ||
| 118 | }; | ||
| 119 | |||
| 120 | static int exynos4_clksrc_mask_top_ctrl(struct clk *clk, int enable) | ||
| 121 | { | ||
| 122 | return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_TOP, clk, enable); | ||
| 123 | } | ||
| 124 | |||
| 125 | static int exynos4_clksrc_mask_cam_ctrl(struct clk *clk, int enable) | ||
| 126 | { | ||
| 127 | return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_CAM, clk, enable); | ||
| 128 | } | ||
| 129 | |||
| 130 | static int exynos4_clksrc_mask_lcd0_ctrl(struct clk *clk, int enable) | ||
| 131 | { | ||
| 132 | return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_LCD0, clk, enable); | ||
| 133 | } | ||
| 134 | |||
| 135 | int exynos4_clksrc_mask_fsys_ctrl(struct clk *clk, int enable) | ||
| 136 | { | ||
| 137 | return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_FSYS, clk, enable); | ||
| 138 | } | ||
| 139 | |||
| 140 | static int exynos4_clksrc_mask_peril0_ctrl(struct clk *clk, int enable) | ||
| 141 | { | ||
| 142 | return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_PERIL0, clk, enable); | ||
| 143 | } | ||
| 144 | |||
| 145 | static int exynos4_clksrc_mask_peril1_ctrl(struct clk *clk, int enable) | ||
| 146 | { | ||
| 147 | return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_PERIL1, clk, enable); | ||
| 148 | } | ||
| 149 | |||
| 150 | static int exynos4_clk_ip_mfc_ctrl(struct clk *clk, int enable) | ||
| 151 | { | ||
| 152 | return s5p_gatectrl(EXYNOS4_CLKGATE_IP_MFC, clk, enable); | ||
| 153 | } | ||
| 154 | |||
| 155 | static int exynos4_clksrc_mask_tv_ctrl(struct clk *clk, int enable) | ||
| 156 | { | ||
| 157 | return s5p_gatectrl(EXYNOS4_CLKSRC_MASK_TV, clk, enable); | ||
| 158 | } | ||
| 159 | |||
| 160 | static int exynos4_clk_ip_cam_ctrl(struct clk *clk, int enable) | ||
| 161 | { | ||
| 162 | return s5p_gatectrl(EXYNOS4_CLKGATE_IP_CAM, clk, enable); | ||
| 163 | } | ||
| 164 | |||
| 165 | static int exynos4_clk_ip_tv_ctrl(struct clk *clk, int enable) | ||
| 166 | { | ||
| 167 | return s5p_gatectrl(EXYNOS4_CLKGATE_IP_TV, clk, enable); | ||
| 168 | } | ||
| 169 | |||
| 170 | int exynos4_clk_ip_image_ctrl(struct clk *clk, int enable) | ||
| 171 | { | ||
| 172 | return s5p_gatectrl(EXYNOS4_CLKGATE_IP_IMAGE, clk, enable); | ||
| 173 | } | ||
| 174 | |||
| 175 | static int exynos4_clk_ip_lcd0_ctrl(struct clk *clk, int enable) | ||
| 176 | { | ||
| 177 | return s5p_gatectrl(EXYNOS4_CLKGATE_IP_LCD0, clk, enable); | ||
| 178 | } | ||
| 179 | |||
| 180 | int exynos4_clk_ip_lcd1_ctrl(struct clk *clk, int enable) | ||
| 181 | { | ||
| 182 | return s5p_gatectrl(EXYNOS4210_CLKGATE_IP_LCD1, clk, enable); | ||
| 183 | } | ||
| 184 | |||
| 185 | int exynos4_clk_ip_fsys_ctrl(struct clk *clk, int enable) | ||
| 186 | { | ||
| 187 | return s5p_gatectrl(EXYNOS4_CLKGATE_IP_FSYS, clk, enable); | ||
| 188 | } | ||
| 189 | |||
| 190 | static int exynos4_clk_ip_peril_ctrl(struct clk *clk, int enable) | ||
| 191 | { | ||
| 192 | return s5p_gatectrl(EXYNOS4_CLKGATE_IP_PERIL, clk, enable); | ||
| 193 | } | ||
| 194 | |||
| 195 | static int exynos4_clk_ip_perir_ctrl(struct clk *clk, int enable) | ||
| 196 | { | ||
| 197 | return s5p_gatectrl(EXYNOS4_CLKGATE_IP_PERIR, clk, enable); | ||
| 198 | } | ||
| 199 | |||
| 200 | int exynos4_clk_ip_dmc_ctrl(struct clk *clk, int enable) | ||
| 201 | { | ||
| 202 | return s5p_gatectrl(EXYNOS4_CLKGATE_IP_DMC, clk, enable); | ||
| 203 | } | ||
| 204 | |||
| 205 | static int exynos4_clk_hdmiphy_ctrl(struct clk *clk, int enable) | ||
| 206 | { | ||
| 207 | return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable); | ||
| 208 | } | ||
| 209 | |||
| 210 | static int exynos4_clk_dac_ctrl(struct clk *clk, int enable) | ||
| 211 | { | ||
| 212 | return s5p_gatectrl(S5P_DAC_PHY_CONTROL, clk, enable); | ||
| 213 | } | ||
| 214 | |||
| 215 | /* Core list of CMU_CPU side */ | ||
| 216 | |||
| 217 | static struct clksrc_clk exynos4_clk_mout_apll = { | ||
| 218 | .clk = { | ||
| 219 | .name = "mout_apll", | ||
| 220 | }, | ||
| 221 | .sources = &clk_src_apll, | ||
| 222 | .reg_src = { .reg = EXYNOS4_CLKSRC_CPU, .shift = 0, .size = 1 }, | ||
| 223 | }; | ||
| 224 | |||
| 225 | static struct clksrc_clk exynos4_clk_sclk_apll = { | ||
| 226 | .clk = { | ||
| 227 | .name = "sclk_apll", | ||
| 228 | .parent = &exynos4_clk_mout_apll.clk, | ||
| 229 | }, | ||
| 230 | .reg_div = { .reg = EXYNOS4_CLKDIV_CPU, .shift = 24, .size = 3 }, | ||
| 231 | }; | ||
| 232 | |||
| 233 | static struct clksrc_clk exynos4_clk_mout_epll = { | ||
| 234 | .clk = { | ||
| 235 | .name = "mout_epll", | ||
| 236 | }, | ||
| 237 | .sources = &clk_src_epll, | ||
| 238 | .reg_src = { .reg = EXYNOS4_CLKSRC_TOP0, .shift = 4, .size = 1 }, | ||
| 239 | }; | ||
| 240 | |||
| 241 | struct clksrc_clk exynos4_clk_mout_mpll = { | ||
| 242 | .clk = { | ||
| 243 | .name = "mout_mpll", | ||
| 244 | }, | ||
| 245 | .sources = &clk_src_mpll, | ||
| 246 | |||
| 247 | /* reg_src will be added in each SoCs' clock */ | ||
| 248 | }; | ||
| 249 | |||
| 250 | static struct clk *exynos4_clkset_moutcore_list[] = { | ||
| 251 | [0] = &exynos4_clk_mout_apll.clk, | ||
| 252 | [1] = &exynos4_clk_mout_mpll.clk, | ||
| 253 | }; | ||
| 254 | |||
| 255 | static struct clksrc_sources exynos4_clkset_moutcore = { | ||
| 256 | .sources = exynos4_clkset_moutcore_list, | ||
| 257 | .nr_sources = ARRAY_SIZE(exynos4_clkset_moutcore_list), | ||
| 258 | }; | ||
| 259 | |||
| 260 | static struct clksrc_clk exynos4_clk_moutcore = { | ||
| 261 | .clk = { | ||
| 262 | .name = "moutcore", | ||
| 263 | }, | ||
| 264 | .sources = &exynos4_clkset_moutcore, | ||
| 265 | .reg_src = { .reg = EXYNOS4_CLKSRC_CPU, .shift = 16, .size = 1 }, | ||
| 266 | }; | ||
| 267 | |||
| 268 | static struct clksrc_clk exynos4_clk_coreclk = { | ||
| 269 | .clk = { | ||
| 270 | .name = "core_clk", | ||
| 271 | .parent = &exynos4_clk_moutcore.clk, | ||
| 272 | }, | ||
| 273 | .reg_div = { .reg = EXYNOS4_CLKDIV_CPU, .shift = 0, .size = 3 }, | ||
| 274 | }; | ||
| 275 | |||
| 276 | static struct clksrc_clk exynos4_clk_armclk = { | ||
| 277 | .clk = { | ||
| 278 | .name = "armclk", | ||
| 279 | .parent = &exynos4_clk_coreclk.clk, | ||
| 280 | }, | ||
| 281 | }; | ||
| 282 | |||
| 283 | static struct clksrc_clk exynos4_clk_aclk_corem0 = { | ||
| 284 | .clk = { | ||
| 285 | .name = "aclk_corem0", | ||
| 286 | .parent = &exynos4_clk_coreclk.clk, | ||
| 287 | }, | ||
| 288 | .reg_div = { .reg = EXYNOS4_CLKDIV_CPU, .shift = 4, .size = 3 }, | ||
| 289 | }; | ||
| 290 | |||
| 291 | static struct clksrc_clk exynos4_clk_aclk_cores = { | ||
| 292 | .clk = { | ||
| 293 | .name = "aclk_cores", | ||
| 294 | .parent = &exynos4_clk_coreclk.clk, | ||
| 295 | }, | ||
| 296 | .reg_div = { .reg = EXYNOS4_CLKDIV_CPU, .shift = 4, .size = 3 }, | ||
| 297 | }; | ||
| 298 | |||
| 299 | static struct clksrc_clk exynos4_clk_aclk_corem1 = { | ||
| 300 | .clk = { | ||
| 301 | .name = "aclk_corem1", | ||
| 302 | .parent = &exynos4_clk_coreclk.clk, | ||
| 303 | }, | ||
| 304 | .reg_div = { .reg = EXYNOS4_CLKDIV_CPU, .shift = 8, .size = 3 }, | ||
| 305 | }; | ||
| 306 | |||
| 307 | static struct clksrc_clk exynos4_clk_periphclk = { | ||
| 308 | .clk = { | ||
| 309 | .name = "periphclk", | ||
| 310 | .parent = &exynos4_clk_coreclk.clk, | ||
| 311 | }, | ||
| 312 | .reg_div = { .reg = EXYNOS4_CLKDIV_CPU, .shift = 12, .size = 3 }, | ||
| 313 | }; | ||
| 314 | |||
| 315 | /* Core list of CMU_CORE side */ | ||
| 316 | |||
| 317 | static struct clk *exynos4_clkset_corebus_list[] = { | ||
| 318 | [0] = &exynos4_clk_mout_mpll.clk, | ||
| 319 | [1] = &exynos4_clk_sclk_apll.clk, | ||
| 320 | }; | ||
| 321 | |||
| 322 | struct clksrc_sources exynos4_clkset_mout_corebus = { | ||
| 323 | .sources = exynos4_clkset_corebus_list, | ||
| 324 | .nr_sources = ARRAY_SIZE(exynos4_clkset_corebus_list), | ||
| 325 | }; | ||
| 326 | |||
| 327 | static struct clksrc_clk exynos4_clk_mout_corebus = { | ||
| 328 | .clk = { | ||
| 329 | .name = "mout_corebus", | ||
| 330 | }, | ||
| 331 | .sources = &exynos4_clkset_mout_corebus, | ||
| 332 | .reg_src = { .reg = EXYNOS4_CLKSRC_DMC, .shift = 4, .size = 1 }, | ||
| 333 | }; | ||
| 334 | |||
| 335 | static struct clksrc_clk exynos4_clk_sclk_dmc = { | ||
| 336 | .clk = { | ||
| 337 | .name = "sclk_dmc", | ||
| 338 | .parent = &exynos4_clk_mout_corebus.clk, | ||
| 339 | }, | ||
| 340 | .reg_div = { .reg = EXYNOS4_CLKDIV_DMC0, .shift = 12, .size = 3 }, | ||
| 341 | }; | ||
| 342 | |||
| 343 | static struct clksrc_clk exynos4_clk_aclk_cored = { | ||
| 344 | .clk = { | ||
| 345 | .name = "aclk_cored", | ||
| 346 | .parent = &exynos4_clk_sclk_dmc.clk, | ||
| 347 | }, | ||
| 348 | .reg_div = { .reg = EXYNOS4_CLKDIV_DMC0, .shift = 16, .size = 3 }, | ||
| 349 | }; | ||
| 350 | |||
| 351 | static struct clksrc_clk exynos4_clk_aclk_corep = { | ||
| 352 | .clk = { | ||
| 353 | .name = "aclk_corep", | ||
| 354 | .parent = &exynos4_clk_aclk_cored.clk, | ||
| 355 | }, | ||
| 356 | .reg_div = { .reg = EXYNOS4_CLKDIV_DMC0, .shift = 20, .size = 3 }, | ||
| 357 | }; | ||
| 358 | |||
| 359 | static struct clksrc_clk exynos4_clk_aclk_acp = { | ||
| 360 | .clk = { | ||
| 361 | .name = "aclk_acp", | ||
| 362 | .parent = &exynos4_clk_mout_corebus.clk, | ||
| 363 | }, | ||
| 364 | .reg_div = { .reg = EXYNOS4_CLKDIV_DMC0, .shift = 0, .size = 3 }, | ||
| 365 | }; | ||
| 366 | |||
| 367 | static struct clksrc_clk exynos4_clk_pclk_acp = { | ||
| 368 | .clk = { | ||
| 369 | .name = "pclk_acp", | ||
| 370 | .parent = &exynos4_clk_aclk_acp.clk, | ||
| 371 | }, | ||
| 372 | .reg_div = { .reg = EXYNOS4_CLKDIV_DMC0, .shift = 4, .size = 3 }, | ||
| 373 | }; | ||
| 374 | |||
| 375 | /* Core list of CMU_TOP side */ | ||
| 376 | |||
| 377 | struct clk *exynos4_clkset_aclk_top_list[] = { | ||
| 378 | [0] = &exynos4_clk_mout_mpll.clk, | ||
| 379 | [1] = &exynos4_clk_sclk_apll.clk, | ||
| 380 | }; | ||
| 381 | |||
| 382 | static struct clksrc_sources exynos4_clkset_aclk = { | ||
| 383 | .sources = exynos4_clkset_aclk_top_list, | ||
| 384 | .nr_sources = ARRAY_SIZE(exynos4_clkset_aclk_top_list), | ||
| 385 | }; | ||
| 386 | |||
| 387 | static struct clksrc_clk exynos4_clk_aclk_200 = { | ||
| 388 | .clk = { | ||
| 389 | .name = "aclk_200", | ||
| 390 | }, | ||
| 391 | .sources = &exynos4_clkset_aclk, | ||
| 392 | .reg_src = { .reg = EXYNOS4_CLKSRC_TOP0, .shift = 12, .size = 1 }, | ||
| 393 | .reg_div = { .reg = EXYNOS4_CLKDIV_TOP, .shift = 0, .size = 3 }, | ||
| 394 | }; | ||
| 395 | |||
| 396 | static struct clksrc_clk exynos4_clk_aclk_100 = { | ||
| 397 | .clk = { | ||
| 398 | .name = "aclk_100", | ||
| 399 | }, | ||
| 400 | .sources = &exynos4_clkset_aclk, | ||
| 401 | .reg_src = { .reg = EXYNOS4_CLKSRC_TOP0, .shift = 16, .size = 1 }, | ||
| 402 | .reg_div = { .reg = EXYNOS4_CLKDIV_TOP, .shift = 4, .size = 4 }, | ||
| 403 | }; | ||
| 404 | |||
| 405 | static struct clksrc_clk exynos4_clk_aclk_160 = { | ||
| 406 | .clk = { | ||
| 407 | .name = "aclk_160", | ||
| 408 | }, | ||
| 409 | .sources = &exynos4_clkset_aclk, | ||
| 410 | .reg_src = { .reg = EXYNOS4_CLKSRC_TOP0, .shift = 20, .size = 1 }, | ||
| 411 | .reg_div = { .reg = EXYNOS4_CLKDIV_TOP, .shift = 8, .size = 3 }, | ||
| 412 | }; | ||
| 413 | |||
| 414 | struct clksrc_clk exynos4_clk_aclk_133 = { | ||
| 415 | .clk = { | ||
| 416 | .name = "aclk_133", | ||
| 417 | }, | ||
| 418 | .sources = &exynos4_clkset_aclk, | ||
| 419 | .reg_src = { .reg = EXYNOS4_CLKSRC_TOP0, .shift = 24, .size = 1 }, | ||
| 420 | .reg_div = { .reg = EXYNOS4_CLKDIV_TOP, .shift = 12, .size = 3 }, | ||
| 421 | }; | ||
| 422 | |||
| 423 | static struct clk *exynos4_clkset_vpllsrc_list[] = { | ||
| 424 | [0] = &clk_fin_vpll, | ||
| 425 | [1] = &exynos4_clk_sclk_hdmi27m, | ||
| 426 | }; | ||
| 427 | |||
| 428 | static struct clksrc_sources exynos4_clkset_vpllsrc = { | ||
| 429 | .sources = exynos4_clkset_vpllsrc_list, | ||
| 430 | .nr_sources = ARRAY_SIZE(exynos4_clkset_vpllsrc_list), | ||
| 431 | }; | ||
| 432 | |||
| 433 | static struct clksrc_clk exynos4_clk_vpllsrc = { | ||
| 434 | .clk = { | ||
| 435 | .name = "vpll_src", | ||
| 436 | .enable = exynos4_clksrc_mask_top_ctrl, | ||
| 437 | .ctrlbit = (1 << 0), | ||
| 438 | }, | ||
| 439 | .sources = &exynos4_clkset_vpllsrc, | ||
| 440 | .reg_src = { .reg = EXYNOS4_CLKSRC_TOP1, .shift = 0, .size = 1 }, | ||
| 441 | }; | ||
| 442 | |||
| 443 | static struct clk *exynos4_clkset_sclk_vpll_list[] = { | ||
| 444 | [0] = &exynos4_clk_vpllsrc.clk, | ||
| 445 | [1] = &clk_fout_vpll, | ||
| 446 | }; | ||
| 447 | |||
| 448 | static struct clksrc_sources exynos4_clkset_sclk_vpll = { | ||
| 449 | .sources = exynos4_clkset_sclk_vpll_list, | ||
| 450 | .nr_sources = ARRAY_SIZE(exynos4_clkset_sclk_vpll_list), | ||
| 451 | }; | ||
| 452 | |||
| 453 | static struct clksrc_clk exynos4_clk_sclk_vpll = { | ||
| 454 | .clk = { | ||
| 455 | .name = "sclk_vpll", | ||
| 456 | }, | ||
| 457 | .sources = &exynos4_clkset_sclk_vpll, | ||
| 458 | .reg_src = { .reg = EXYNOS4_CLKSRC_TOP0, .shift = 8, .size = 1 }, | ||
| 459 | }; | ||
| 460 | |||
| 461 | static struct clk exynos4_init_clocks_off[] = { | ||
| 462 | { | ||
| 463 | .name = "timers", | ||
| 464 | .parent = &exynos4_clk_aclk_100.clk, | ||
| 465 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 466 | .ctrlbit = (1<<24), | ||
| 467 | }, { | ||
| 468 | .name = "csis", | ||
| 469 | .devname = "s5p-mipi-csis.0", | ||
| 470 | .enable = exynos4_clk_ip_cam_ctrl, | ||
| 471 | .ctrlbit = (1 << 4), | ||
| 472 | }, { | ||
| 473 | .name = "csis", | ||
| 474 | .devname = "s5p-mipi-csis.1", | ||
| 475 | .enable = exynos4_clk_ip_cam_ctrl, | ||
| 476 | .ctrlbit = (1 << 5), | ||
| 477 | }, { | ||
| 478 | .name = "jpeg", | ||
| 479 | .id = 0, | ||
| 480 | .enable = exynos4_clk_ip_cam_ctrl, | ||
| 481 | .ctrlbit = (1 << 6), | ||
| 482 | }, { | ||
| 483 | .name = "fimc", | ||
| 484 | .devname = "exynos4-fimc.0", | ||
| 485 | .enable = exynos4_clk_ip_cam_ctrl, | ||
| 486 | .ctrlbit = (1 << 0), | ||
| 487 | }, { | ||
| 488 | .name = "fimc", | ||
| 489 | .devname = "exynos4-fimc.1", | ||
| 490 | .enable = exynos4_clk_ip_cam_ctrl, | ||
| 491 | .ctrlbit = (1 << 1), | ||
| 492 | }, { | ||
| 493 | .name = "fimc", | ||
| 494 | .devname = "exynos4-fimc.2", | ||
| 495 | .enable = exynos4_clk_ip_cam_ctrl, | ||
| 496 | .ctrlbit = (1 << 2), | ||
| 497 | }, { | ||
| 498 | .name = "fimc", | ||
| 499 | .devname = "exynos4-fimc.3", | ||
| 500 | .enable = exynos4_clk_ip_cam_ctrl, | ||
| 501 | .ctrlbit = (1 << 3), | ||
| 502 | }, { | ||
| 503 | .name = "tsi", | ||
| 504 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
| 505 | .ctrlbit = (1 << 4), | ||
| 506 | }, { | ||
| 507 | .name = "hsmmc", | ||
| 508 | .devname = "exynos4-sdhci.0", | ||
| 509 | .parent = &exynos4_clk_aclk_133.clk, | ||
| 510 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
| 511 | .ctrlbit = (1 << 5), | ||
| 512 | }, { | ||
| 513 | .name = "hsmmc", | ||
| 514 | .devname = "exynos4-sdhci.1", | ||
| 515 | .parent = &exynos4_clk_aclk_133.clk, | ||
| 516 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
| 517 | .ctrlbit = (1 << 6), | ||
| 518 | }, { | ||
| 519 | .name = "hsmmc", | ||
| 520 | .devname = "exynos4-sdhci.2", | ||
| 521 | .parent = &exynos4_clk_aclk_133.clk, | ||
| 522 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
| 523 | .ctrlbit = (1 << 7), | ||
| 524 | }, { | ||
| 525 | .name = "hsmmc", | ||
| 526 | .devname = "exynos4-sdhci.3", | ||
| 527 | .parent = &exynos4_clk_aclk_133.clk, | ||
| 528 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
| 529 | .ctrlbit = (1 << 8), | ||
| 530 | }, { | ||
| 531 | .name = "biu", | ||
| 532 | .parent = &exynos4_clk_aclk_133.clk, | ||
| 533 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
| 534 | .ctrlbit = (1 << 9), | ||
| 535 | }, { | ||
| 536 | .name = "onenand", | ||
| 537 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
| 538 | .ctrlbit = (1 << 15), | ||
| 539 | }, { | ||
| 540 | .name = "nfcon", | ||
| 541 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
| 542 | .ctrlbit = (1 << 16), | ||
| 543 | }, { | ||
| 544 | .name = "dac", | ||
| 545 | .devname = "s5p-sdo", | ||
| 546 | .enable = exynos4_clk_ip_tv_ctrl, | ||
| 547 | .ctrlbit = (1 << 2), | ||
| 548 | }, { | ||
| 549 | .name = "mixer", | ||
| 550 | .devname = "s5p-mixer", | ||
| 551 | .enable = exynos4_clk_ip_tv_ctrl, | ||
| 552 | .ctrlbit = (1 << 1), | ||
| 553 | }, { | ||
| 554 | .name = "vp", | ||
| 555 | .devname = "s5p-mixer", | ||
| 556 | .enable = exynos4_clk_ip_tv_ctrl, | ||
| 557 | .ctrlbit = (1 << 0), | ||
| 558 | }, { | ||
| 559 | .name = "hdmi", | ||
| 560 | .devname = "exynos4-hdmi", | ||
| 561 | .enable = exynos4_clk_ip_tv_ctrl, | ||
| 562 | .ctrlbit = (1 << 3), | ||
| 563 | }, { | ||
| 564 | .name = "hdmiphy", | ||
| 565 | .devname = "exynos4-hdmi", | ||
| 566 | .enable = exynos4_clk_hdmiphy_ctrl, | ||
| 567 | .ctrlbit = (1 << 0), | ||
| 568 | }, { | ||
| 569 | .name = "dacphy", | ||
| 570 | .devname = "s5p-sdo", | ||
| 571 | .enable = exynos4_clk_dac_ctrl, | ||
| 572 | .ctrlbit = (1 << 0), | ||
| 573 | }, { | ||
| 574 | .name = "adc", | ||
| 575 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 576 | .ctrlbit = (1 << 15), | ||
| 577 | }, { | ||
| 578 | .name = "tmu_apbif", | ||
| 579 | .enable = exynos4_clk_ip_perir_ctrl, | ||
| 580 | .ctrlbit = (1 << 17), | ||
| 581 | }, { | ||
| 582 | .name = "keypad", | ||
| 583 | .enable = exynos4_clk_ip_perir_ctrl, | ||
| 584 | .ctrlbit = (1 << 16), | ||
| 585 | }, { | ||
| 586 | .name = "rtc", | ||
| 587 | .enable = exynos4_clk_ip_perir_ctrl, | ||
| 588 | .ctrlbit = (1 << 15), | ||
| 589 | }, { | ||
| 590 | .name = "watchdog", | ||
| 591 | .parent = &exynos4_clk_aclk_100.clk, | ||
| 592 | .enable = exynos4_clk_ip_perir_ctrl, | ||
| 593 | .ctrlbit = (1 << 14), | ||
| 594 | }, { | ||
| 595 | .name = "usbhost", | ||
| 596 | .enable = exynos4_clk_ip_fsys_ctrl , | ||
| 597 | .ctrlbit = (1 << 12), | ||
| 598 | }, { | ||
| 599 | .name = "otg", | ||
| 600 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
| 601 | .ctrlbit = (1 << 13), | ||
| 602 | }, { | ||
| 603 | .name = "spi", | ||
| 604 | .devname = "exynos4210-spi.0", | ||
| 605 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 606 | .ctrlbit = (1 << 16), | ||
| 607 | }, { | ||
| 608 | .name = "spi", | ||
| 609 | .devname = "exynos4210-spi.1", | ||
| 610 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 611 | .ctrlbit = (1 << 17), | ||
| 612 | }, { | ||
| 613 | .name = "spi", | ||
| 614 | .devname = "exynos4210-spi.2", | ||
| 615 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 616 | .ctrlbit = (1 << 18), | ||
| 617 | }, { | ||
| 618 | .name = "iis", | ||
| 619 | .devname = "samsung-i2s.1", | ||
| 620 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 621 | .ctrlbit = (1 << 20), | ||
| 622 | }, { | ||
| 623 | .name = "iis", | ||
| 624 | .devname = "samsung-i2s.2", | ||
| 625 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 626 | .ctrlbit = (1 << 21), | ||
| 627 | }, { | ||
| 628 | .name = "pcm", | ||
| 629 | .devname = "samsung-pcm.1", | ||
| 630 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 631 | .ctrlbit = (1 << 22), | ||
| 632 | }, { | ||
| 633 | .name = "pcm", | ||
| 634 | .devname = "samsung-pcm.2", | ||
| 635 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 636 | .ctrlbit = (1 << 23), | ||
| 637 | }, { | ||
| 638 | .name = "slimbus", | ||
| 639 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 640 | .ctrlbit = (1 << 25), | ||
| 641 | }, { | ||
| 642 | .name = "spdif", | ||
| 643 | .devname = "samsung-spdif", | ||
| 644 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 645 | .ctrlbit = (1 << 26), | ||
| 646 | }, { | ||
| 647 | .name = "ac97", | ||
| 648 | .devname = "samsung-ac97", | ||
| 649 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 650 | .ctrlbit = (1 << 27), | ||
| 651 | }, { | ||
| 652 | .name = "mfc", | ||
| 653 | .devname = "s5p-mfc", | ||
| 654 | .enable = exynos4_clk_ip_mfc_ctrl, | ||
| 655 | .ctrlbit = (1 << 0), | ||
| 656 | }, { | ||
| 657 | .name = "i2c", | ||
| 658 | .devname = "s3c2440-i2c.0", | ||
| 659 | .parent = &exynos4_clk_aclk_100.clk, | ||
| 660 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 661 | .ctrlbit = (1 << 6), | ||
| 662 | }, { | ||
| 663 | .name = "i2c", | ||
| 664 | .devname = "s3c2440-i2c.1", | ||
| 665 | .parent = &exynos4_clk_aclk_100.clk, | ||
| 666 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 667 | .ctrlbit = (1 << 7), | ||
| 668 | }, { | ||
| 669 | .name = "i2c", | ||
| 670 | .devname = "s3c2440-i2c.2", | ||
| 671 | .parent = &exynos4_clk_aclk_100.clk, | ||
| 672 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 673 | .ctrlbit = (1 << 8), | ||
| 674 | }, { | ||
| 675 | .name = "i2c", | ||
| 676 | .devname = "s3c2440-i2c.3", | ||
| 677 | .parent = &exynos4_clk_aclk_100.clk, | ||
| 678 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 679 | .ctrlbit = (1 << 9), | ||
| 680 | }, { | ||
| 681 | .name = "i2c", | ||
| 682 | .devname = "s3c2440-i2c.4", | ||
| 683 | .parent = &exynos4_clk_aclk_100.clk, | ||
| 684 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 685 | .ctrlbit = (1 << 10), | ||
| 686 | }, { | ||
| 687 | .name = "i2c", | ||
| 688 | .devname = "s3c2440-i2c.5", | ||
| 689 | .parent = &exynos4_clk_aclk_100.clk, | ||
| 690 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 691 | .ctrlbit = (1 << 11), | ||
| 692 | }, { | ||
| 693 | .name = "i2c", | ||
| 694 | .devname = "s3c2440-i2c.6", | ||
| 695 | .parent = &exynos4_clk_aclk_100.clk, | ||
| 696 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 697 | .ctrlbit = (1 << 12), | ||
| 698 | }, { | ||
| 699 | .name = "i2c", | ||
| 700 | .devname = "s3c2440-i2c.7", | ||
| 701 | .parent = &exynos4_clk_aclk_100.clk, | ||
| 702 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 703 | .ctrlbit = (1 << 13), | ||
| 704 | }, { | ||
| 705 | .name = "i2c", | ||
| 706 | .devname = "s3c2440-hdmiphy-i2c", | ||
| 707 | .parent = &exynos4_clk_aclk_100.clk, | ||
| 708 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 709 | .ctrlbit = (1 << 14), | ||
| 710 | }, { | ||
| 711 | .name = "sysmmu", | ||
| 712 | .devname = "exynos-sysmmu.0", | ||
| 713 | .enable = exynos4_clk_ip_mfc_ctrl, | ||
| 714 | .ctrlbit = (1 << 1), | ||
| 715 | }, { | ||
| 716 | .name = "sysmmu", | ||
| 717 | .devname = "exynos-sysmmu.1", | ||
| 718 | .enable = exynos4_clk_ip_mfc_ctrl, | ||
| 719 | .ctrlbit = (1 << 2), | ||
| 720 | }, { | ||
| 721 | .name = "sysmmu", | ||
| 722 | .devname = "exynos-sysmmu.2", | ||
| 723 | .enable = exynos4_clk_ip_tv_ctrl, | ||
| 724 | .ctrlbit = (1 << 4), | ||
| 725 | }, { | ||
| 726 | .name = "sysmmu", | ||
| 727 | .devname = "exynos-sysmmu.3", | ||
| 728 | .enable = exynos4_clk_ip_cam_ctrl, | ||
| 729 | .ctrlbit = (1 << 11), | ||
| 730 | }, { | ||
| 731 | .name = "sysmmu", | ||
| 732 | .devname = "exynos-sysmmu.4", | ||
| 733 | .enable = exynos4_clk_ip_image_ctrl, | ||
| 734 | .ctrlbit = (1 << 4), | ||
| 735 | }, { | ||
| 736 | .name = "sysmmu", | ||
| 737 | .devname = "exynos-sysmmu.5", | ||
| 738 | .enable = exynos4_clk_ip_cam_ctrl, | ||
| 739 | .ctrlbit = (1 << 7), | ||
| 740 | }, { | ||
| 741 | .name = "sysmmu", | ||
| 742 | .devname = "exynos-sysmmu.6", | ||
| 743 | .enable = exynos4_clk_ip_cam_ctrl, | ||
| 744 | .ctrlbit = (1 << 8), | ||
| 745 | }, { | ||
| 746 | .name = "sysmmu", | ||
| 747 | .devname = "exynos-sysmmu.7", | ||
| 748 | .enable = exynos4_clk_ip_cam_ctrl, | ||
| 749 | .ctrlbit = (1 << 9), | ||
| 750 | }, { | ||
| 751 | .name = "sysmmu", | ||
| 752 | .devname = "exynos-sysmmu.8", | ||
| 753 | .enable = exynos4_clk_ip_cam_ctrl, | ||
| 754 | .ctrlbit = (1 << 10), | ||
| 755 | }, { | ||
| 756 | .name = "sysmmu", | ||
| 757 | .devname = "exynos-sysmmu.10", | ||
| 758 | .enable = exynos4_clk_ip_lcd0_ctrl, | ||
| 759 | .ctrlbit = (1 << 4), | ||
| 760 | } | ||
| 761 | }; | ||
| 762 | |||
| 763 | static struct clk exynos4_init_clocks_on[] = { | ||
| 764 | { | ||
| 765 | .name = "uart", | ||
| 766 | .devname = "s5pv210-uart.0", | ||
| 767 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 768 | .ctrlbit = (1 << 0), | ||
| 769 | }, { | ||
| 770 | .name = "uart", | ||
| 771 | .devname = "s5pv210-uart.1", | ||
| 772 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 773 | .ctrlbit = (1 << 1), | ||
| 774 | }, { | ||
| 775 | .name = "uart", | ||
| 776 | .devname = "s5pv210-uart.2", | ||
| 777 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 778 | .ctrlbit = (1 << 2), | ||
| 779 | }, { | ||
| 780 | .name = "uart", | ||
| 781 | .devname = "s5pv210-uart.3", | ||
| 782 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 783 | .ctrlbit = (1 << 3), | ||
| 784 | }, { | ||
| 785 | .name = "uart", | ||
| 786 | .devname = "s5pv210-uart.4", | ||
| 787 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 788 | .ctrlbit = (1 << 4), | ||
| 789 | }, { | ||
| 790 | .name = "uart", | ||
| 791 | .devname = "s5pv210-uart.5", | ||
| 792 | .enable = exynos4_clk_ip_peril_ctrl, | ||
| 793 | .ctrlbit = (1 << 5), | ||
| 794 | } | ||
| 795 | }; | ||
| 796 | |||
| 797 | static struct clk exynos4_clk_pdma0 = { | ||
| 798 | .name = "dma", | ||
| 799 | .devname = "dma-pl330.0", | ||
| 800 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
| 801 | .ctrlbit = (1 << 0), | ||
| 802 | }; | ||
| 803 | |||
| 804 | static struct clk exynos4_clk_pdma1 = { | ||
| 805 | .name = "dma", | ||
| 806 | .devname = "dma-pl330.1", | ||
| 807 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
| 808 | .ctrlbit = (1 << 1), | ||
| 809 | }; | ||
| 810 | |||
| 811 | static struct clk exynos4_clk_mdma1 = { | ||
| 812 | .name = "dma", | ||
| 813 | .devname = "dma-pl330.2", | ||
| 814 | .enable = exynos4_clk_ip_image_ctrl, | ||
| 815 | .ctrlbit = ((1 << 8) | (1 << 5) | (1 << 2)), | ||
| 816 | }; | ||
| 817 | |||
| 818 | static struct clk exynos4_clk_fimd0 = { | ||
| 819 | .name = "fimd", | ||
| 820 | .devname = "exynos4-fb.0", | ||
| 821 | .enable = exynos4_clk_ip_lcd0_ctrl, | ||
| 822 | .ctrlbit = (1 << 0), | ||
| 823 | }; | ||
| 824 | |||
| 825 | struct clk *exynos4_clkset_group_list[] = { | ||
| 826 | [0] = &clk_ext_xtal_mux, | ||
| 827 | [1] = &clk_xusbxti, | ||
| 828 | [2] = &exynos4_clk_sclk_hdmi27m, | ||
| 829 | [3] = &exynos4_clk_sclk_usbphy0, | ||
| 830 | [4] = &exynos4_clk_sclk_usbphy1, | ||
| 831 | [5] = &exynos4_clk_sclk_hdmiphy, | ||
| 832 | [6] = &exynos4_clk_mout_mpll.clk, | ||
| 833 | [7] = &exynos4_clk_mout_epll.clk, | ||
| 834 | [8] = &exynos4_clk_sclk_vpll.clk, | ||
| 835 | }; | ||
| 836 | |||
| 837 | struct clksrc_sources exynos4_clkset_group = { | ||
| 838 | .sources = exynos4_clkset_group_list, | ||
| 839 | .nr_sources = ARRAY_SIZE(exynos4_clkset_group_list), | ||
| 840 | }; | ||
| 841 | |||
| 842 | static struct clk *exynos4_clkset_mout_g2d0_list[] = { | ||
| 843 | [0] = &exynos4_clk_mout_mpll.clk, | ||
| 844 | [1] = &exynos4_clk_sclk_apll.clk, | ||
| 845 | }; | ||
| 846 | |||
| 847 | struct clksrc_sources exynos4_clkset_mout_g2d0 = { | ||
| 848 | .sources = exynos4_clkset_mout_g2d0_list, | ||
| 849 | .nr_sources = ARRAY_SIZE(exynos4_clkset_mout_g2d0_list), | ||
| 850 | }; | ||
| 851 | |||
| 852 | static struct clk *exynos4_clkset_mout_g2d1_list[] = { | ||
| 853 | [0] = &exynos4_clk_mout_epll.clk, | ||
| 854 | [1] = &exynos4_clk_sclk_vpll.clk, | ||
| 855 | }; | ||
| 856 | |||
| 857 | struct clksrc_sources exynos4_clkset_mout_g2d1 = { | ||
| 858 | .sources = exynos4_clkset_mout_g2d1_list, | ||
| 859 | .nr_sources = ARRAY_SIZE(exynos4_clkset_mout_g2d1_list), | ||
| 860 | }; | ||
| 861 | |||
| 862 | static struct clk *exynos4_clkset_mout_mfc0_list[] = { | ||
| 863 | [0] = &exynos4_clk_mout_mpll.clk, | ||
| 864 | [1] = &exynos4_clk_sclk_apll.clk, | ||
| 865 | }; | ||
| 866 | |||
| 867 | static struct clksrc_sources exynos4_clkset_mout_mfc0 = { | ||
| 868 | .sources = exynos4_clkset_mout_mfc0_list, | ||
| 869 | .nr_sources = ARRAY_SIZE(exynos4_clkset_mout_mfc0_list), | ||
| 870 | }; | ||
| 871 | |||
| 872 | static struct clksrc_clk exynos4_clk_mout_mfc0 = { | ||
| 873 | .clk = { | ||
| 874 | .name = "mout_mfc0", | ||
| 875 | }, | ||
| 876 | .sources = &exynos4_clkset_mout_mfc0, | ||
| 877 | .reg_src = { .reg = EXYNOS4_CLKSRC_MFC, .shift = 0, .size = 1 }, | ||
| 878 | }; | ||
| 879 | |||
| 880 | static struct clk *exynos4_clkset_mout_mfc1_list[] = { | ||
| 881 | [0] = &exynos4_clk_mout_epll.clk, | ||
| 882 | [1] = &exynos4_clk_sclk_vpll.clk, | ||
| 883 | }; | ||
| 884 | |||
| 885 | static struct clksrc_sources exynos4_clkset_mout_mfc1 = { | ||
| 886 | .sources = exynos4_clkset_mout_mfc1_list, | ||
| 887 | .nr_sources = ARRAY_SIZE(exynos4_clkset_mout_mfc1_list), | ||
| 888 | }; | ||
| 889 | |||
| 890 | static struct clksrc_clk exynos4_clk_mout_mfc1 = { | ||
| 891 | .clk = { | ||
| 892 | .name = "mout_mfc1", | ||
| 893 | }, | ||
| 894 | .sources = &exynos4_clkset_mout_mfc1, | ||
| 895 | .reg_src = { .reg = EXYNOS4_CLKSRC_MFC, .shift = 4, .size = 1 }, | ||
| 896 | }; | ||
| 897 | |||
| 898 | static struct clk *exynos4_clkset_mout_mfc_list[] = { | ||
| 899 | [0] = &exynos4_clk_mout_mfc0.clk, | ||
| 900 | [1] = &exynos4_clk_mout_mfc1.clk, | ||
| 901 | }; | ||
| 902 | |||
| 903 | static struct clksrc_sources exynos4_clkset_mout_mfc = { | ||
| 904 | .sources = exynos4_clkset_mout_mfc_list, | ||
| 905 | .nr_sources = ARRAY_SIZE(exynos4_clkset_mout_mfc_list), | ||
| 906 | }; | ||
| 907 | |||
| 908 | static struct clk *exynos4_clkset_sclk_dac_list[] = { | ||
| 909 | [0] = &exynos4_clk_sclk_vpll.clk, | ||
| 910 | [1] = &exynos4_clk_sclk_hdmiphy, | ||
| 911 | }; | ||
| 912 | |||
| 913 | static struct clksrc_sources exynos4_clkset_sclk_dac = { | ||
| 914 | .sources = exynos4_clkset_sclk_dac_list, | ||
| 915 | .nr_sources = ARRAY_SIZE(exynos4_clkset_sclk_dac_list), | ||
| 916 | }; | ||
| 917 | |||
| 918 | static struct clksrc_clk exynos4_clk_sclk_dac = { | ||
| 919 | .clk = { | ||
| 920 | .name = "sclk_dac", | ||
| 921 | .enable = exynos4_clksrc_mask_tv_ctrl, | ||
| 922 | .ctrlbit = (1 << 8), | ||
| 923 | }, | ||
| 924 | .sources = &exynos4_clkset_sclk_dac, | ||
| 925 | .reg_src = { .reg = EXYNOS4_CLKSRC_TV, .shift = 8, .size = 1 }, | ||
| 926 | }; | ||
| 927 | |||
| 928 | static struct clksrc_clk exynos4_clk_sclk_pixel = { | ||
| 929 | .clk = { | ||
| 930 | .name = "sclk_pixel", | ||
| 931 | .parent = &exynos4_clk_sclk_vpll.clk, | ||
| 932 | }, | ||
| 933 | .reg_div = { .reg = EXYNOS4_CLKDIV_TV, .shift = 0, .size = 4 }, | ||
| 934 | }; | ||
| 935 | |||
| 936 | static struct clk *exynos4_clkset_sclk_hdmi_list[] = { | ||
| 937 | [0] = &exynos4_clk_sclk_pixel.clk, | ||
| 938 | [1] = &exynos4_clk_sclk_hdmiphy, | ||
| 939 | }; | ||
| 940 | |||
| 941 | static struct clksrc_sources exynos4_clkset_sclk_hdmi = { | ||
| 942 | .sources = exynos4_clkset_sclk_hdmi_list, | ||
| 943 | .nr_sources = ARRAY_SIZE(exynos4_clkset_sclk_hdmi_list), | ||
| 944 | }; | ||
| 945 | |||
| 946 | static struct clksrc_clk exynos4_clk_sclk_hdmi = { | ||
| 947 | .clk = { | ||
| 948 | .name = "sclk_hdmi", | ||
| 949 | .enable = exynos4_clksrc_mask_tv_ctrl, | ||
| 950 | .ctrlbit = (1 << 0), | ||
| 951 | }, | ||
| 952 | .sources = &exynos4_clkset_sclk_hdmi, | ||
| 953 | .reg_src = { .reg = EXYNOS4_CLKSRC_TV, .shift = 0, .size = 1 }, | ||
| 954 | }; | ||
| 955 | |||
| 956 | static struct clk *exynos4_clkset_sclk_mixer_list[] = { | ||
| 957 | [0] = &exynos4_clk_sclk_dac.clk, | ||
| 958 | [1] = &exynos4_clk_sclk_hdmi.clk, | ||
| 959 | }; | ||
| 960 | |||
| 961 | static struct clksrc_sources exynos4_clkset_sclk_mixer = { | ||
| 962 | .sources = exynos4_clkset_sclk_mixer_list, | ||
| 963 | .nr_sources = ARRAY_SIZE(exynos4_clkset_sclk_mixer_list), | ||
| 964 | }; | ||
| 965 | |||
| 966 | static struct clksrc_clk exynos4_clk_sclk_mixer = { | ||
| 967 | .clk = { | ||
| 968 | .name = "sclk_mixer", | ||
| 969 | .enable = exynos4_clksrc_mask_tv_ctrl, | ||
| 970 | .ctrlbit = (1 << 4), | ||
| 971 | }, | ||
| 972 | .sources = &exynos4_clkset_sclk_mixer, | ||
| 973 | .reg_src = { .reg = EXYNOS4_CLKSRC_TV, .shift = 4, .size = 1 }, | ||
| 974 | }; | ||
| 975 | |||
| 976 | static struct clksrc_clk *exynos4_sclk_tv[] = { | ||
| 977 | &exynos4_clk_sclk_dac, | ||
| 978 | &exynos4_clk_sclk_pixel, | ||
| 979 | &exynos4_clk_sclk_hdmi, | ||
| 980 | &exynos4_clk_sclk_mixer, | ||
| 981 | }; | ||
| 982 | |||
| 983 | static struct clksrc_clk exynos4_clk_dout_mmc0 = { | ||
| 984 | .clk = { | ||
| 985 | .name = "dout_mmc0", | ||
| 986 | }, | ||
| 987 | .sources = &exynos4_clkset_group, | ||
| 988 | .reg_src = { .reg = EXYNOS4_CLKSRC_FSYS, .shift = 0, .size = 4 }, | ||
| 989 | .reg_div = { .reg = EXYNOS4_CLKDIV_FSYS1, .shift = 0, .size = 4 }, | ||
| 990 | }; | ||
| 991 | |||
| 992 | static struct clksrc_clk exynos4_clk_dout_mmc1 = { | ||
| 993 | .clk = { | ||
| 994 | .name = "dout_mmc1", | ||
| 995 | }, | ||
| 996 | .sources = &exynos4_clkset_group, | ||
| 997 | .reg_src = { .reg = EXYNOS4_CLKSRC_FSYS, .shift = 4, .size = 4 }, | ||
| 998 | .reg_div = { .reg = EXYNOS4_CLKDIV_FSYS1, .shift = 16, .size = 4 }, | ||
| 999 | }; | ||
| 1000 | |||
| 1001 | static struct clksrc_clk exynos4_clk_dout_mmc2 = { | ||
| 1002 | .clk = { | ||
| 1003 | .name = "dout_mmc2", | ||
| 1004 | }, | ||
| 1005 | .sources = &exynos4_clkset_group, | ||
| 1006 | .reg_src = { .reg = EXYNOS4_CLKSRC_FSYS, .shift = 8, .size = 4 }, | ||
| 1007 | .reg_div = { .reg = EXYNOS4_CLKDIV_FSYS2, .shift = 0, .size = 4 }, | ||
| 1008 | }; | ||
| 1009 | |||
| 1010 | static struct clksrc_clk exynos4_clk_dout_mmc3 = { | ||
| 1011 | .clk = { | ||
| 1012 | .name = "dout_mmc3", | ||
| 1013 | }, | ||
| 1014 | .sources = &exynos4_clkset_group, | ||
| 1015 | .reg_src = { .reg = EXYNOS4_CLKSRC_FSYS, .shift = 12, .size = 4 }, | ||
| 1016 | .reg_div = { .reg = EXYNOS4_CLKDIV_FSYS2, .shift = 16, .size = 4 }, | ||
| 1017 | }; | ||
| 1018 | |||
| 1019 | static struct clksrc_clk exynos4_clk_dout_mmc4 = { | ||
| 1020 | .clk = { | ||
| 1021 | .name = "dout_mmc4", | ||
| 1022 | }, | ||
| 1023 | .sources = &exynos4_clkset_group, | ||
| 1024 | .reg_src = { .reg = EXYNOS4_CLKSRC_FSYS, .shift = 16, .size = 4 }, | ||
| 1025 | .reg_div = { .reg = EXYNOS4_CLKDIV_FSYS3, .shift = 0, .size = 4 }, | ||
| 1026 | }; | ||
| 1027 | |||
| 1028 | static struct clksrc_clk exynos4_clksrcs[] = { | ||
| 1029 | { | ||
| 1030 | .clk = { | ||
| 1031 | .name = "sclk_pwm", | ||
| 1032 | .enable = exynos4_clksrc_mask_peril0_ctrl, | ||
| 1033 | .ctrlbit = (1 << 24), | ||
| 1034 | }, | ||
| 1035 | .sources = &exynos4_clkset_group, | ||
| 1036 | .reg_src = { .reg = EXYNOS4_CLKSRC_PERIL0, .shift = 24, .size = 4 }, | ||
| 1037 | .reg_div = { .reg = EXYNOS4_CLKDIV_PERIL3, .shift = 0, .size = 4 }, | ||
| 1038 | }, { | ||
| 1039 | .clk = { | ||
| 1040 | .name = "sclk_csis", | ||
| 1041 | .devname = "s5p-mipi-csis.0", | ||
| 1042 | .enable = exynos4_clksrc_mask_cam_ctrl, | ||
| 1043 | .ctrlbit = (1 << 24), | ||
| 1044 | }, | ||
| 1045 | .sources = &exynos4_clkset_group, | ||
| 1046 | .reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 24, .size = 4 }, | ||
| 1047 | .reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 24, .size = 4 }, | ||
| 1048 | }, { | ||
| 1049 | .clk = { | ||
| 1050 | .name = "sclk_csis", | ||
| 1051 | .devname = "s5p-mipi-csis.1", | ||
| 1052 | .enable = exynos4_clksrc_mask_cam_ctrl, | ||
| 1053 | .ctrlbit = (1 << 28), | ||
| 1054 | }, | ||
| 1055 | .sources = &exynos4_clkset_group, | ||
| 1056 | .reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 28, .size = 4 }, | ||
| 1057 | .reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 28, .size = 4 }, | ||
| 1058 | }, { | ||
| 1059 | .clk = { | ||
| 1060 | .name = "sclk_cam0", | ||
| 1061 | .enable = exynos4_clksrc_mask_cam_ctrl, | ||
| 1062 | .ctrlbit = (1 << 16), | ||
| 1063 | }, | ||
| 1064 | .sources = &exynos4_clkset_group, | ||
| 1065 | .reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 16, .size = 4 }, | ||
| 1066 | .reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 16, .size = 4 }, | ||
| 1067 | }, { | ||
| 1068 | .clk = { | ||
| 1069 | .name = "sclk_cam1", | ||
| 1070 | .enable = exynos4_clksrc_mask_cam_ctrl, | ||
| 1071 | .ctrlbit = (1 << 20), | ||
| 1072 | }, | ||
| 1073 | .sources = &exynos4_clkset_group, | ||
| 1074 | .reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 20, .size = 4 }, | ||
| 1075 | .reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 20, .size = 4 }, | ||
| 1076 | }, { | ||
| 1077 | .clk = { | ||
| 1078 | .name = "sclk_fimc", | ||
| 1079 | .devname = "exynos4-fimc.0", | ||
| 1080 | .enable = exynos4_clksrc_mask_cam_ctrl, | ||
| 1081 | .ctrlbit = (1 << 0), | ||
| 1082 | }, | ||
| 1083 | .sources = &exynos4_clkset_group, | ||
| 1084 | .reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 0, .size = 4 }, | ||
| 1085 | .reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 0, .size = 4 }, | ||
| 1086 | }, { | ||
| 1087 | .clk = { | ||
| 1088 | .name = "sclk_fimc", | ||
| 1089 | .devname = "exynos4-fimc.1", | ||
| 1090 | .enable = exynos4_clksrc_mask_cam_ctrl, | ||
| 1091 | .ctrlbit = (1 << 4), | ||
| 1092 | }, | ||
| 1093 | .sources = &exynos4_clkset_group, | ||
| 1094 | .reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 4, .size = 4 }, | ||
| 1095 | .reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 4, .size = 4 }, | ||
| 1096 | }, { | ||
| 1097 | .clk = { | ||
| 1098 | .name = "sclk_fimc", | ||
| 1099 | .devname = "exynos4-fimc.2", | ||
| 1100 | .enable = exynos4_clksrc_mask_cam_ctrl, | ||
| 1101 | .ctrlbit = (1 << 8), | ||
| 1102 | }, | ||
| 1103 | .sources = &exynos4_clkset_group, | ||
| 1104 | .reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 8, .size = 4 }, | ||
| 1105 | .reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 8, .size = 4 }, | ||
| 1106 | }, { | ||
| 1107 | .clk = { | ||
| 1108 | .name = "sclk_fimc", | ||
| 1109 | .devname = "exynos4-fimc.3", | ||
| 1110 | .enable = exynos4_clksrc_mask_cam_ctrl, | ||
| 1111 | .ctrlbit = (1 << 12), | ||
| 1112 | }, | ||
| 1113 | .sources = &exynos4_clkset_group, | ||
| 1114 | .reg_src = { .reg = EXYNOS4_CLKSRC_CAM, .shift = 12, .size = 4 }, | ||
| 1115 | .reg_div = { .reg = EXYNOS4_CLKDIV_CAM, .shift = 12, .size = 4 }, | ||
| 1116 | }, { | ||
| 1117 | .clk = { | ||
| 1118 | .name = "sclk_fimd", | ||
| 1119 | .devname = "exynos4-fb.0", | ||
| 1120 | .enable = exynos4_clksrc_mask_lcd0_ctrl, | ||
| 1121 | .ctrlbit = (1 << 0), | ||
| 1122 | }, | ||
| 1123 | .sources = &exynos4_clkset_group, | ||
| 1124 | .reg_src = { .reg = EXYNOS4_CLKSRC_LCD0, .shift = 0, .size = 4 }, | ||
| 1125 | .reg_div = { .reg = EXYNOS4_CLKDIV_LCD0, .shift = 0, .size = 4 }, | ||
| 1126 | }, { | ||
| 1127 | .clk = { | ||
| 1128 | .name = "sclk_mfc", | ||
| 1129 | .devname = "s5p-mfc", | ||
| 1130 | }, | ||
| 1131 | .sources = &exynos4_clkset_mout_mfc, | ||
| 1132 | .reg_src = { .reg = EXYNOS4_CLKSRC_MFC, .shift = 8, .size = 1 }, | ||
| 1133 | .reg_div = { .reg = EXYNOS4_CLKDIV_MFC, .shift = 0, .size = 4 }, | ||
| 1134 | }, { | ||
| 1135 | .clk = { | ||
| 1136 | .name = "ciu", | ||
| 1137 | .parent = &exynos4_clk_dout_mmc4.clk, | ||
| 1138 | .enable = exynos4_clksrc_mask_fsys_ctrl, | ||
| 1139 | .ctrlbit = (1 << 16), | ||
| 1140 | }, | ||
| 1141 | .reg_div = { .reg = EXYNOS4_CLKDIV_FSYS3, .shift = 8, .size = 8 }, | ||
| 1142 | } | ||
| 1143 | }; | ||
| 1144 | |||
| 1145 | static struct clksrc_clk exynos4_clk_sclk_uart0 = { | ||
| 1146 | .clk = { | ||
| 1147 | .name = "uclk1", | ||
| 1148 | .devname = "exynos4210-uart.0", | ||
| 1149 | .enable = exynos4_clksrc_mask_peril0_ctrl, | ||
| 1150 | .ctrlbit = (1 << 0), | ||
| 1151 | }, | ||
| 1152 | .sources = &exynos4_clkset_group, | ||
| 1153 | .reg_src = { .reg = EXYNOS4_CLKSRC_PERIL0, .shift = 0, .size = 4 }, | ||
| 1154 | .reg_div = { .reg = EXYNOS4_CLKDIV_PERIL0, .shift = 0, .size = 4 }, | ||
| 1155 | }; | ||
| 1156 | |||
| 1157 | static struct clksrc_clk exynos4_clk_sclk_uart1 = { | ||
| 1158 | .clk = { | ||
| 1159 | .name = "uclk1", | ||
| 1160 | .devname = "exynos4210-uart.1", | ||
| 1161 | .enable = exynos4_clksrc_mask_peril0_ctrl, | ||
| 1162 | .ctrlbit = (1 << 4), | ||
| 1163 | }, | ||
| 1164 | .sources = &exynos4_clkset_group, | ||
| 1165 | .reg_src = { .reg = EXYNOS4_CLKSRC_PERIL0, .shift = 4, .size = 4 }, | ||
| 1166 | .reg_div = { .reg = EXYNOS4_CLKDIV_PERIL0, .shift = 4, .size = 4 }, | ||
| 1167 | }; | ||
| 1168 | |||
| 1169 | static struct clksrc_clk exynos4_clk_sclk_uart2 = { | ||
| 1170 | .clk = { | ||
| 1171 | .name = "uclk1", | ||
| 1172 | .devname = "exynos4210-uart.2", | ||
| 1173 | .enable = exynos4_clksrc_mask_peril0_ctrl, | ||
| 1174 | .ctrlbit = (1 << 8), | ||
| 1175 | }, | ||
| 1176 | .sources = &exynos4_clkset_group, | ||
| 1177 | .reg_src = { .reg = EXYNOS4_CLKSRC_PERIL0, .shift = 8, .size = 4 }, | ||
| 1178 | .reg_div = { .reg = EXYNOS4_CLKDIV_PERIL0, .shift = 8, .size = 4 }, | ||
| 1179 | }; | ||
| 1180 | |||
| 1181 | static struct clksrc_clk exynos4_clk_sclk_uart3 = { | ||
| 1182 | .clk = { | ||
| 1183 | .name = "uclk1", | ||
| 1184 | .devname = "exynos4210-uart.3", | ||
| 1185 | .enable = exynos4_clksrc_mask_peril0_ctrl, | ||
| 1186 | .ctrlbit = (1 << 12), | ||
| 1187 | }, | ||
| 1188 | .sources = &exynos4_clkset_group, | ||
| 1189 | .reg_src = { .reg = EXYNOS4_CLKSRC_PERIL0, .shift = 12, .size = 4 }, | ||
| 1190 | .reg_div = { .reg = EXYNOS4_CLKDIV_PERIL0, .shift = 12, .size = 4 }, | ||
| 1191 | }; | ||
| 1192 | |||
| 1193 | static struct clksrc_clk exynos4_clk_sclk_mmc0 = { | ||
| 1194 | .clk = { | ||
| 1195 | .name = "sclk_mmc", | ||
| 1196 | .devname = "exynos4-sdhci.0", | ||
| 1197 | .parent = &exynos4_clk_dout_mmc0.clk, | ||
| 1198 | .enable = exynos4_clksrc_mask_fsys_ctrl, | ||
| 1199 | .ctrlbit = (1 << 0), | ||
| 1200 | }, | ||
| 1201 | .reg_div = { .reg = EXYNOS4_CLKDIV_FSYS1, .shift = 8, .size = 8 }, | ||
| 1202 | }; | ||
| 1203 | |||
| 1204 | static struct clksrc_clk exynos4_clk_sclk_mmc1 = { | ||
| 1205 | .clk = { | ||
| 1206 | .name = "sclk_mmc", | ||
| 1207 | .devname = "exynos4-sdhci.1", | ||
| 1208 | .parent = &exynos4_clk_dout_mmc1.clk, | ||
| 1209 | .enable = exynos4_clksrc_mask_fsys_ctrl, | ||
| 1210 | .ctrlbit = (1 << 4), | ||
| 1211 | }, | ||
| 1212 | .reg_div = { .reg = EXYNOS4_CLKDIV_FSYS1, .shift = 24, .size = 8 }, | ||
| 1213 | }; | ||
| 1214 | |||
| 1215 | static struct clksrc_clk exynos4_clk_sclk_mmc2 = { | ||
| 1216 | .clk = { | ||
| 1217 | .name = "sclk_mmc", | ||
| 1218 | .devname = "exynos4-sdhci.2", | ||
| 1219 | .parent = &exynos4_clk_dout_mmc2.clk, | ||
| 1220 | .enable = exynos4_clksrc_mask_fsys_ctrl, | ||
| 1221 | .ctrlbit = (1 << 8), | ||
| 1222 | }, | ||
| 1223 | .reg_div = { .reg = EXYNOS4_CLKDIV_FSYS2, .shift = 8, .size = 8 }, | ||
| 1224 | }; | ||
| 1225 | |||
| 1226 | static struct clksrc_clk exynos4_clk_sclk_mmc3 = { | ||
| 1227 | .clk = { | ||
| 1228 | .name = "sclk_mmc", | ||
| 1229 | .devname = "exynos4-sdhci.3", | ||
| 1230 | .parent = &exynos4_clk_dout_mmc3.clk, | ||
| 1231 | .enable = exynos4_clksrc_mask_fsys_ctrl, | ||
| 1232 | .ctrlbit = (1 << 12), | ||
| 1233 | }, | ||
| 1234 | .reg_div = { .reg = EXYNOS4_CLKDIV_FSYS2, .shift = 24, .size = 8 }, | ||
| 1235 | }; | ||
| 1236 | |||
| 1237 | static struct clksrc_clk exynos4_clk_mdout_spi0 = { | ||
| 1238 | .clk = { | ||
| 1239 | .name = "mdout_spi", | ||
| 1240 | .devname = "exynos4210-spi.0", | ||
| 1241 | }, | ||
| 1242 | .sources = &exynos4_clkset_group, | ||
| 1243 | .reg_src = { .reg = EXYNOS4_CLKSRC_PERIL1, .shift = 16, .size = 4 }, | ||
| 1244 | .reg_div = { .reg = EXYNOS4_CLKDIV_PERIL1, .shift = 0, .size = 4 }, | ||
| 1245 | }; | ||
| 1246 | |||
| 1247 | static struct clksrc_clk exynos4_clk_mdout_spi1 = { | ||
| 1248 | .clk = { | ||
| 1249 | .name = "mdout_spi", | ||
| 1250 | .devname = "exynos4210-spi.1", | ||
| 1251 | }, | ||
| 1252 | .sources = &exynos4_clkset_group, | ||
| 1253 | .reg_src = { .reg = EXYNOS4_CLKSRC_PERIL1, .shift = 20, .size = 4 }, | ||
| 1254 | .reg_div = { .reg = EXYNOS4_CLKDIV_PERIL1, .shift = 16, .size = 4 }, | ||
| 1255 | }; | ||
| 1256 | |||
| 1257 | static struct clksrc_clk exynos4_clk_mdout_spi2 = { | ||
| 1258 | .clk = { | ||
| 1259 | .name = "mdout_spi", | ||
| 1260 | .devname = "exynos4210-spi.2", | ||
| 1261 | }, | ||
| 1262 | .sources = &exynos4_clkset_group, | ||
| 1263 | .reg_src = { .reg = EXYNOS4_CLKSRC_PERIL1, .shift = 24, .size = 4 }, | ||
| 1264 | .reg_div = { .reg = EXYNOS4_CLKDIV_PERIL2, .shift = 0, .size = 4 }, | ||
| 1265 | }; | ||
| 1266 | |||
| 1267 | static struct clksrc_clk exynos4_clk_sclk_spi0 = { | ||
| 1268 | .clk = { | ||
| 1269 | .name = "sclk_spi", | ||
| 1270 | .devname = "exynos4210-spi.0", | ||
| 1271 | .parent = &exynos4_clk_mdout_spi0.clk, | ||
| 1272 | .enable = exynos4_clksrc_mask_peril1_ctrl, | ||
| 1273 | .ctrlbit = (1 << 16), | ||
| 1274 | }, | ||
| 1275 | .reg_div = { .reg = EXYNOS4_CLKDIV_PERIL1, .shift = 8, .size = 8 }, | ||
| 1276 | }; | ||
| 1277 | |||
| 1278 | static struct clksrc_clk exynos4_clk_sclk_spi1 = { | ||
| 1279 | .clk = { | ||
| 1280 | .name = "sclk_spi", | ||
| 1281 | .devname = "exynos4210-spi.1", | ||
| 1282 | .parent = &exynos4_clk_mdout_spi1.clk, | ||
| 1283 | .enable = exynos4_clksrc_mask_peril1_ctrl, | ||
| 1284 | .ctrlbit = (1 << 20), | ||
| 1285 | }, | ||
| 1286 | .reg_div = { .reg = EXYNOS4_CLKDIV_PERIL1, .shift = 24, .size = 8 }, | ||
| 1287 | }; | ||
| 1288 | |||
| 1289 | static struct clksrc_clk exynos4_clk_sclk_spi2 = { | ||
| 1290 | .clk = { | ||
| 1291 | .name = "sclk_spi", | ||
| 1292 | .devname = "exynos4210-spi.2", | ||
| 1293 | .parent = &exynos4_clk_mdout_spi2.clk, | ||
| 1294 | .enable = exynos4_clksrc_mask_peril1_ctrl, | ||
| 1295 | .ctrlbit = (1 << 24), | ||
| 1296 | }, | ||
| 1297 | .reg_div = { .reg = EXYNOS4_CLKDIV_PERIL2, .shift = 8, .size = 8 }, | ||
| 1298 | }; | ||
| 1299 | |||
| 1300 | /* Clock initialization code */ | ||
| 1301 | static struct clksrc_clk *exynos4_sysclks[] = { | ||
| 1302 | &exynos4_clk_mout_apll, | ||
| 1303 | &exynos4_clk_sclk_apll, | ||
| 1304 | &exynos4_clk_mout_epll, | ||
| 1305 | &exynos4_clk_mout_mpll, | ||
| 1306 | &exynos4_clk_moutcore, | ||
| 1307 | &exynos4_clk_coreclk, | ||
| 1308 | &exynos4_clk_armclk, | ||
| 1309 | &exynos4_clk_aclk_corem0, | ||
| 1310 | &exynos4_clk_aclk_cores, | ||
| 1311 | &exynos4_clk_aclk_corem1, | ||
| 1312 | &exynos4_clk_periphclk, | ||
| 1313 | &exynos4_clk_mout_corebus, | ||
| 1314 | &exynos4_clk_sclk_dmc, | ||
| 1315 | &exynos4_clk_aclk_cored, | ||
| 1316 | &exynos4_clk_aclk_corep, | ||
| 1317 | &exynos4_clk_aclk_acp, | ||
| 1318 | &exynos4_clk_pclk_acp, | ||
| 1319 | &exynos4_clk_vpllsrc, | ||
| 1320 | &exynos4_clk_sclk_vpll, | ||
| 1321 | &exynos4_clk_aclk_200, | ||
| 1322 | &exynos4_clk_aclk_100, | ||
| 1323 | &exynos4_clk_aclk_160, | ||
| 1324 | &exynos4_clk_aclk_133, | ||
| 1325 | &exynos4_clk_dout_mmc0, | ||
| 1326 | &exynos4_clk_dout_mmc1, | ||
| 1327 | &exynos4_clk_dout_mmc2, | ||
| 1328 | &exynos4_clk_dout_mmc3, | ||
| 1329 | &exynos4_clk_dout_mmc4, | ||
| 1330 | &exynos4_clk_mout_mfc0, | ||
| 1331 | &exynos4_clk_mout_mfc1, | ||
| 1332 | }; | ||
| 1333 | |||
| 1334 | static struct clk *exynos4_clk_cdev[] = { | ||
| 1335 | &exynos4_clk_pdma0, | ||
| 1336 | &exynos4_clk_pdma1, | ||
| 1337 | &exynos4_clk_mdma1, | ||
| 1338 | &exynos4_clk_fimd0, | ||
| 1339 | }; | ||
| 1340 | |||
| 1341 | static struct clksrc_clk *exynos4_clksrc_cdev[] = { | ||
| 1342 | &exynos4_clk_sclk_uart0, | ||
| 1343 | &exynos4_clk_sclk_uart1, | ||
| 1344 | &exynos4_clk_sclk_uart2, | ||
| 1345 | &exynos4_clk_sclk_uart3, | ||
| 1346 | &exynos4_clk_sclk_mmc0, | ||
| 1347 | &exynos4_clk_sclk_mmc1, | ||
| 1348 | &exynos4_clk_sclk_mmc2, | ||
| 1349 | &exynos4_clk_sclk_mmc3, | ||
| 1350 | &exynos4_clk_sclk_spi0, | ||
| 1351 | &exynos4_clk_sclk_spi1, | ||
| 1352 | &exynos4_clk_sclk_spi2, | ||
| 1353 | &exynos4_clk_mdout_spi0, | ||
| 1354 | &exynos4_clk_mdout_spi1, | ||
| 1355 | &exynos4_clk_mdout_spi2, | ||
| 1356 | }; | ||
| 1357 | |||
| 1358 | static struct clk_lookup exynos4_clk_lookup[] = { | ||
| 1359 | CLKDEV_INIT("exynos4210-uart.0", "clk_uart_baud0", &exynos4_clk_sclk_uart0.clk), | ||
| 1360 | CLKDEV_INIT("exynos4210-uart.1", "clk_uart_baud0", &exynos4_clk_sclk_uart1.clk), | ||
| 1361 | CLKDEV_INIT("exynos4210-uart.2", "clk_uart_baud0", &exynos4_clk_sclk_uart2.clk), | ||
| 1362 | CLKDEV_INIT("exynos4210-uart.3", "clk_uart_baud0", &exynos4_clk_sclk_uart3.clk), | ||
| 1363 | CLKDEV_INIT("exynos4-sdhci.0", "mmc_busclk.2", &exynos4_clk_sclk_mmc0.clk), | ||
| 1364 | CLKDEV_INIT("exynos4-sdhci.1", "mmc_busclk.2", &exynos4_clk_sclk_mmc1.clk), | ||
| 1365 | CLKDEV_INIT("exynos4-sdhci.2", "mmc_busclk.2", &exynos4_clk_sclk_mmc2.clk), | ||
| 1366 | CLKDEV_INIT("exynos4-sdhci.3", "mmc_busclk.2", &exynos4_clk_sclk_mmc3.clk), | ||
| 1367 | CLKDEV_INIT("exynos4-fb.0", "lcd", &exynos4_clk_fimd0), | ||
| 1368 | CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos4_clk_pdma0), | ||
| 1369 | CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos4_clk_pdma1), | ||
| 1370 | CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos4_clk_mdma1), | ||
| 1371 | CLKDEV_INIT("exynos4210-spi.0", "spi_busclk0", &exynos4_clk_sclk_spi0.clk), | ||
| 1372 | CLKDEV_INIT("exynos4210-spi.1", "spi_busclk0", &exynos4_clk_sclk_spi1.clk), | ||
| 1373 | CLKDEV_INIT("exynos4210-spi.2", "spi_busclk0", &exynos4_clk_sclk_spi2.clk), | ||
| 1374 | }; | ||
| 1375 | |||
| 1376 | static int xtal_rate; | ||
| 1377 | |||
| 1378 | static unsigned long exynos4_fout_apll_get_rate(struct clk *clk) | ||
| 1379 | { | ||
| 1380 | if (soc_is_exynos4210()) | ||
| 1381 | return s5p_get_pll45xx(xtal_rate, __raw_readl(EXYNOS4_APLL_CON0), | ||
| 1382 | pll_4508); | ||
| 1383 | else if (soc_is_exynos4212() || soc_is_exynos4412()) | ||
| 1384 | return s5p_get_pll35xx(xtal_rate, __raw_readl(EXYNOS4_APLL_CON0)); | ||
| 1385 | else | ||
| 1386 | return 0; | ||
| 1387 | } | ||
| 1388 | |||
| 1389 | static struct clk_ops exynos4_fout_apll_ops = { | ||
| 1390 | .get_rate = exynos4_fout_apll_get_rate, | ||
| 1391 | }; | ||
| 1392 | |||
| 1393 | static u32 exynos4_vpll_div[][8] = { | ||
| 1394 | { 54000000, 3, 53, 3, 1024, 0, 17, 0 }, | ||
| 1395 | { 108000000, 3, 53, 2, 1024, 0, 17, 0 }, | ||
| 1396 | }; | ||
| 1397 | |||
| 1398 | static unsigned long exynos4_vpll_get_rate(struct clk *clk) | ||
| 1399 | { | ||
| 1400 | return clk->rate; | ||
| 1401 | } | ||
| 1402 | |||
| 1403 | static int exynos4_vpll_set_rate(struct clk *clk, unsigned long rate) | ||
| 1404 | { | ||
| 1405 | unsigned int vpll_con0, vpll_con1 = 0; | ||
| 1406 | unsigned int i; | ||
| 1407 | |||
| 1408 | /* Return if nothing changed */ | ||
| 1409 | if (clk->rate == rate) | ||
| 1410 | return 0; | ||
| 1411 | |||
| 1412 | vpll_con0 = __raw_readl(EXYNOS4_VPLL_CON0); | ||
| 1413 | vpll_con0 &= ~(0x1 << 27 | \ | ||
| 1414 | PLL90XX_MDIV_MASK << PLL46XX_MDIV_SHIFT | \ | ||
| 1415 | PLL90XX_PDIV_MASK << PLL46XX_PDIV_SHIFT | \ | ||
| 1416 | PLL90XX_SDIV_MASK << PLL46XX_SDIV_SHIFT); | ||
| 1417 | |||
| 1418 | vpll_con1 = __raw_readl(EXYNOS4_VPLL_CON1); | ||
| 1419 | vpll_con1 &= ~(PLL46XX_MRR_MASK << PLL46XX_MRR_SHIFT | \ | ||
| 1420 | PLL46XX_MFR_MASK << PLL46XX_MFR_SHIFT | \ | ||
| 1421 | PLL4650C_KDIV_MASK << PLL46XX_KDIV_SHIFT); | ||
| 1422 | |||
| 1423 | for (i = 0; i < ARRAY_SIZE(exynos4_vpll_div); i++) { | ||
| 1424 | if (exynos4_vpll_div[i][0] == rate) { | ||
| 1425 | vpll_con0 |= exynos4_vpll_div[i][1] << PLL46XX_PDIV_SHIFT; | ||
| 1426 | vpll_con0 |= exynos4_vpll_div[i][2] << PLL46XX_MDIV_SHIFT; | ||
| 1427 | vpll_con0 |= exynos4_vpll_div[i][3] << PLL46XX_SDIV_SHIFT; | ||
| 1428 | vpll_con1 |= exynos4_vpll_div[i][4] << PLL46XX_KDIV_SHIFT; | ||
| 1429 | vpll_con1 |= exynos4_vpll_div[i][5] << PLL46XX_MFR_SHIFT; | ||
| 1430 | vpll_con1 |= exynos4_vpll_div[i][6] << PLL46XX_MRR_SHIFT; | ||
| 1431 | vpll_con0 |= exynos4_vpll_div[i][7] << 27; | ||
| 1432 | break; | ||
| 1433 | } | ||
| 1434 | } | ||
| 1435 | |||
| 1436 | if (i == ARRAY_SIZE(exynos4_vpll_div)) { | ||
| 1437 | printk(KERN_ERR "%s: Invalid Clock VPLL Frequency\n", | ||
| 1438 | __func__); | ||
| 1439 | return -EINVAL; | ||
| 1440 | } | ||
| 1441 | |||
| 1442 | __raw_writel(vpll_con0, EXYNOS4_VPLL_CON0); | ||
| 1443 | __raw_writel(vpll_con1, EXYNOS4_VPLL_CON1); | ||
| 1444 | |||
| 1445 | /* Wait for VPLL lock */ | ||
| 1446 | while (!(__raw_readl(EXYNOS4_VPLL_CON0) & (1 << PLL46XX_LOCKED_SHIFT))) | ||
| 1447 | continue; | ||
| 1448 | |||
| 1449 | clk->rate = rate; | ||
| 1450 | return 0; | ||
| 1451 | } | ||
| 1452 | |||
| 1453 | static struct clk_ops exynos4_vpll_ops = { | ||
| 1454 | .get_rate = exynos4_vpll_get_rate, | ||
| 1455 | .set_rate = exynos4_vpll_set_rate, | ||
| 1456 | }; | ||
| 1457 | |||
| 1458 | void __init_or_cpufreq exynos4_setup_clocks(void) | ||
| 1459 | { | ||
| 1460 | struct clk *xtal_clk; | ||
| 1461 | unsigned long apll = 0; | ||
| 1462 | unsigned long mpll = 0; | ||
| 1463 | unsigned long epll = 0; | ||
| 1464 | unsigned long vpll = 0; | ||
| 1465 | unsigned long vpllsrc; | ||
| 1466 | unsigned long xtal; | ||
| 1467 | unsigned long armclk; | ||
| 1468 | unsigned long sclk_dmc; | ||
| 1469 | unsigned long aclk_200; | ||
| 1470 | unsigned long aclk_100; | ||
| 1471 | unsigned long aclk_160; | ||
| 1472 | unsigned long aclk_133; | ||
| 1473 | unsigned int ptr; | ||
| 1474 | |||
| 1475 | printk(KERN_DEBUG "%s: registering clocks\n", __func__); | ||
| 1476 | |||
| 1477 | xtal_clk = clk_get(NULL, "xtal"); | ||
| 1478 | BUG_ON(IS_ERR(xtal_clk)); | ||
| 1479 | |||
| 1480 | xtal = clk_get_rate(xtal_clk); | ||
| 1481 | |||
| 1482 | xtal_rate = xtal; | ||
| 1483 | |||
| 1484 | clk_put(xtal_clk); | ||
| 1485 | |||
| 1486 | printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal); | ||
| 1487 | |||
| 1488 | if (soc_is_exynos4210()) { | ||
| 1489 | apll = s5p_get_pll45xx(xtal, __raw_readl(EXYNOS4_APLL_CON0), | ||
| 1490 | pll_4508); | ||
| 1491 | mpll = s5p_get_pll45xx(xtal, __raw_readl(EXYNOS4_MPLL_CON0), | ||
| 1492 | pll_4508); | ||
| 1493 | epll = s5p_get_pll46xx(xtal, __raw_readl(EXYNOS4_EPLL_CON0), | ||
| 1494 | __raw_readl(EXYNOS4_EPLL_CON1), pll_4600); | ||
| 1495 | |||
| 1496 | vpllsrc = clk_get_rate(&exynos4_clk_vpllsrc.clk); | ||
| 1497 | vpll = s5p_get_pll46xx(vpllsrc, __raw_readl(EXYNOS4_VPLL_CON0), | ||
| 1498 | __raw_readl(EXYNOS4_VPLL_CON1), pll_4650c); | ||
| 1499 | } else if (soc_is_exynos4212() || soc_is_exynos4412()) { | ||
| 1500 | apll = s5p_get_pll35xx(xtal, __raw_readl(EXYNOS4_APLL_CON0)); | ||
| 1501 | mpll = s5p_get_pll35xx(xtal, __raw_readl(EXYNOS4_MPLL_CON0)); | ||
| 1502 | epll = s5p_get_pll36xx(xtal, __raw_readl(EXYNOS4_EPLL_CON0), | ||
| 1503 | __raw_readl(EXYNOS4_EPLL_CON1)); | ||
| 1504 | |||
| 1505 | vpllsrc = clk_get_rate(&exynos4_clk_vpllsrc.clk); | ||
| 1506 | vpll = s5p_get_pll36xx(vpllsrc, __raw_readl(EXYNOS4_VPLL_CON0), | ||
| 1507 | __raw_readl(EXYNOS4_VPLL_CON1)); | ||
| 1508 | } else { | ||
| 1509 | /* nothing */ | ||
| 1510 | } | ||
| 1511 | |||
| 1512 | clk_fout_apll.ops = &exynos4_fout_apll_ops; | ||
| 1513 | clk_fout_mpll.rate = mpll; | ||
| 1514 | clk_fout_epll.rate = epll; | ||
| 1515 | clk_fout_vpll.ops = &exynos4_vpll_ops; | ||
| 1516 | clk_fout_vpll.rate = vpll; | ||
| 1517 | |||
| 1518 | printk(KERN_INFO "EXYNOS4: PLL settings, A=%ld, M=%ld, E=%ld V=%ld", | ||
| 1519 | apll, mpll, epll, vpll); | ||
| 1520 | |||
| 1521 | armclk = clk_get_rate(&exynos4_clk_armclk.clk); | ||
| 1522 | sclk_dmc = clk_get_rate(&exynos4_clk_sclk_dmc.clk); | ||
| 1523 | |||
| 1524 | aclk_200 = clk_get_rate(&exynos4_clk_aclk_200.clk); | ||
| 1525 | aclk_100 = clk_get_rate(&exynos4_clk_aclk_100.clk); | ||
| 1526 | aclk_160 = clk_get_rate(&exynos4_clk_aclk_160.clk); | ||
| 1527 | aclk_133 = clk_get_rate(&exynos4_clk_aclk_133.clk); | ||
| 1528 | |||
| 1529 | printk(KERN_INFO "EXYNOS4: ARMCLK=%ld, DMC=%ld, ACLK200=%ld\n" | ||
| 1530 | "ACLK100=%ld, ACLK160=%ld, ACLK133=%ld\n", | ||
| 1531 | armclk, sclk_dmc, aclk_200, | ||
| 1532 | aclk_100, aclk_160, aclk_133); | ||
| 1533 | |||
| 1534 | clk_f.rate = armclk; | ||
| 1535 | clk_h.rate = sclk_dmc; | ||
| 1536 | clk_p.rate = aclk_100; | ||
| 1537 | |||
| 1538 | for (ptr = 0; ptr < ARRAY_SIZE(exynos4_clksrcs); ptr++) | ||
| 1539 | s3c_set_clksrc(&exynos4_clksrcs[ptr], true); | ||
| 1540 | } | ||
| 1541 | |||
| 1542 | static struct clk *exynos4_clks[] __initdata = { | ||
| 1543 | &exynos4_clk_sclk_hdmi27m, | ||
| 1544 | &exynos4_clk_sclk_hdmiphy, | ||
| 1545 | &exynos4_clk_sclk_usbphy0, | ||
| 1546 | &exynos4_clk_sclk_usbphy1, | ||
| 1547 | }; | ||
| 1548 | |||
| 1549 | #ifdef CONFIG_PM_SLEEP | ||
| 1550 | static int exynos4_clock_suspend(void) | ||
| 1551 | { | ||
| 1552 | s3c_pm_do_save(exynos4_clock_save, ARRAY_SIZE(exynos4_clock_save)); | ||
| 1553 | return 0; | ||
| 1554 | } | ||
| 1555 | |||
| 1556 | static void exynos4_clock_resume(void) | ||
| 1557 | { | ||
| 1558 | s3c_pm_do_restore_core(exynos4_clock_save, ARRAY_SIZE(exynos4_clock_save)); | ||
| 1559 | } | ||
| 1560 | |||
| 1561 | #else | ||
| 1562 | #define exynos4_clock_suspend NULL | ||
| 1563 | #define exynos4_clock_resume NULL | ||
| 1564 | #endif | ||
| 1565 | |||
| 1566 | static struct syscore_ops exynos4_clock_syscore_ops = { | ||
| 1567 | .suspend = exynos4_clock_suspend, | ||
| 1568 | .resume = exynos4_clock_resume, | ||
| 1569 | }; | ||
| 1570 | |||
| 1571 | void __init exynos4_register_clocks(void) | ||
| 1572 | { | ||
| 1573 | int ptr; | ||
| 1574 | |||
| 1575 | s3c24xx_register_clocks(exynos4_clks, ARRAY_SIZE(exynos4_clks)); | ||
| 1576 | |||
| 1577 | for (ptr = 0; ptr < ARRAY_SIZE(exynos4_sysclks); ptr++) | ||
| 1578 | s3c_register_clksrc(exynos4_sysclks[ptr], 1); | ||
| 1579 | |||
| 1580 | for (ptr = 0; ptr < ARRAY_SIZE(exynos4_sclk_tv); ptr++) | ||
| 1581 | s3c_register_clksrc(exynos4_sclk_tv[ptr], 1); | ||
| 1582 | |||
| 1583 | for (ptr = 0; ptr < ARRAY_SIZE(exynos4_clksrc_cdev); ptr++) | ||
| 1584 | s3c_register_clksrc(exynos4_clksrc_cdev[ptr], 1); | ||
| 1585 | |||
| 1586 | s3c_register_clksrc(exynos4_clksrcs, ARRAY_SIZE(exynos4_clksrcs)); | ||
| 1587 | s3c_register_clocks(exynos4_init_clocks_on, ARRAY_SIZE(exynos4_init_clocks_on)); | ||
| 1588 | |||
| 1589 | s3c24xx_register_clocks(exynos4_clk_cdev, ARRAY_SIZE(exynos4_clk_cdev)); | ||
| 1590 | for (ptr = 0; ptr < ARRAY_SIZE(exynos4_clk_cdev); ptr++) | ||
| 1591 | s3c_disable_clocks(exynos4_clk_cdev[ptr], 1); | ||
| 1592 | |||
| 1593 | s3c_register_clocks(exynos4_init_clocks_off, ARRAY_SIZE(exynos4_init_clocks_off)); | ||
| 1594 | s3c_disable_clocks(exynos4_init_clocks_off, ARRAY_SIZE(exynos4_init_clocks_off)); | ||
| 1595 | clkdev_add_table(exynos4_clk_lookup, ARRAY_SIZE(exynos4_clk_lookup)); | ||
| 1596 | |||
| 1597 | register_syscore_ops(&exynos4_clock_syscore_ops); | ||
| 1598 | s3c24xx_register_clock(&dummy_apb_pclk); | ||
| 1599 | |||
| 1600 | s3c_pwmclk_init(); | ||
| 1601 | } | ||
diff --git a/arch/arm/mach-exynos/clock-exynos4.h b/arch/arm/mach-exynos/clock-exynos4.h deleted file mode 100644 index bd12d5f8b63d..000000000000 --- a/arch/arm/mach-exynos/clock-exynos4.h +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2011-2012 Samsung Electronics Co., Ltd. | ||
| 3 | * http://www.samsung.com | ||
| 4 | * | ||
| 5 | * Header file for exynos4 clock support | ||
| 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 | #ifndef __ASM_ARCH_CLOCK_H | ||
| 13 | #define __ASM_ARCH_CLOCK_H __FILE__ | ||
| 14 | |||
| 15 | #include <linux/clk.h> | ||
| 16 | |||
| 17 | extern struct clksrc_clk exynos4_clk_aclk_133; | ||
| 18 | extern struct clksrc_clk exynos4_clk_mout_mpll; | ||
| 19 | |||
| 20 | extern struct clksrc_sources exynos4_clkset_mout_corebus; | ||
| 21 | extern struct clksrc_sources exynos4_clkset_group; | ||
| 22 | |||
| 23 | extern struct clk *exynos4_clkset_aclk_top_list[]; | ||
| 24 | extern struct clk *exynos4_clkset_group_list[]; | ||
| 25 | |||
| 26 | extern struct clksrc_sources exynos4_clkset_mout_g2d0; | ||
| 27 | extern struct clksrc_sources exynos4_clkset_mout_g2d1; | ||
| 28 | |||
| 29 | extern int exynos4_clksrc_mask_fsys_ctrl(struct clk *clk, int enable); | ||
| 30 | extern int exynos4_clk_ip_fsys_ctrl(struct clk *clk, int enable); | ||
| 31 | extern int exynos4_clk_ip_lcd1_ctrl(struct clk *clk, int enable); | ||
| 32 | extern int exynos4_clk_ip_image_ctrl(struct clk *clk, int enable); | ||
| 33 | extern int exynos4_clk_ip_dmc_ctrl(struct clk *clk, int enable); | ||
| 34 | |||
| 35 | #endif /* __ASM_ARCH_CLOCK_H */ | ||
diff --git a/arch/arm/mach-exynos/clock-exynos4210.c b/arch/arm/mach-exynos/clock-exynos4210.c deleted file mode 100644 index 19af9f783c56..000000000000 --- a/arch/arm/mach-exynos/clock-exynos4210.c +++ /dev/null | |||
| @@ -1,187 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2011-2012 Samsung Electronics Co., Ltd. | ||
| 3 | * http://www.samsung.com | ||
| 4 | * | ||
| 5 | * EXYNOS4210 - Clock support | ||
| 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/err.h> | ||
| 14 | #include <linux/clk.h> | ||
| 15 | #include <linux/io.h> | ||
| 16 | #include <linux/syscore_ops.h> | ||
| 17 | |||
| 18 | #include <plat/cpu-freq.h> | ||
| 19 | #include <plat/clock.h> | ||
| 20 | #include <plat/cpu.h> | ||
| 21 | #include <plat/pll.h> | ||
| 22 | #include <plat/s5p-clock.h> | ||
| 23 | #include <plat/clock-clksrc.h> | ||
| 24 | #include <plat/pm.h> | ||
| 25 | |||
| 26 | #include <mach/hardware.h> | ||
| 27 | #include <mach/map.h> | ||
| 28 | #include <mach/regs-clock.h> | ||
| 29 | |||
| 30 | #include "common.h" | ||
| 31 | #include "clock-exynos4.h" | ||
| 32 | |||
| 33 | #ifdef CONFIG_PM_SLEEP | ||
| 34 | static struct sleep_save exynos4210_clock_save[] = { | ||
| 35 | SAVE_ITEM(EXYNOS4_CLKSRC_IMAGE), | ||
| 36 | SAVE_ITEM(EXYNOS4_CLKDIV_IMAGE), | ||
| 37 | SAVE_ITEM(EXYNOS4210_CLKSRC_LCD1), | ||
| 38 | SAVE_ITEM(EXYNOS4210_CLKDIV_LCD1), | ||
| 39 | SAVE_ITEM(EXYNOS4210_CLKSRC_MASK_LCD1), | ||
| 40 | SAVE_ITEM(EXYNOS4210_CLKGATE_IP_IMAGE), | ||
| 41 | SAVE_ITEM(EXYNOS4210_CLKGATE_IP_LCD1), | ||
| 42 | SAVE_ITEM(EXYNOS4210_CLKGATE_IP_PERIR), | ||
| 43 | }; | ||
| 44 | #endif | ||
| 45 | |||
| 46 | static struct clksrc_clk *sysclks[] = { | ||
| 47 | /* nothing here yet */ | ||
| 48 | }; | ||
| 49 | |||
| 50 | static struct clksrc_clk exynos4210_clk_mout_g2d0 = { | ||
| 51 | .clk = { | ||
| 52 | .name = "mout_g2d0", | ||
| 53 | }, | ||
| 54 | .sources = &exynos4_clkset_mout_g2d0, | ||
| 55 | .reg_src = { .reg = EXYNOS4_CLKSRC_IMAGE, .shift = 0, .size = 1 }, | ||
| 56 | }; | ||
| 57 | |||
| 58 | static struct clksrc_clk exynos4210_clk_mout_g2d1 = { | ||
| 59 | .clk = { | ||
| 60 | .name = "mout_g2d1", | ||
| 61 | }, | ||
| 62 | .sources = &exynos4_clkset_mout_g2d1, | ||
| 63 | .reg_src = { .reg = EXYNOS4_CLKSRC_IMAGE, .shift = 4, .size = 1 }, | ||
| 64 | }; | ||
| 65 | |||
| 66 | static struct clk *exynos4210_clkset_mout_g2d_list[] = { | ||
| 67 | [0] = &exynos4210_clk_mout_g2d0.clk, | ||
| 68 | [1] = &exynos4210_clk_mout_g2d1.clk, | ||
| 69 | }; | ||
| 70 | |||
| 71 | static struct clksrc_sources exynos4210_clkset_mout_g2d = { | ||
| 72 | .sources = exynos4210_clkset_mout_g2d_list, | ||
| 73 | .nr_sources = ARRAY_SIZE(exynos4210_clkset_mout_g2d_list), | ||
| 74 | }; | ||
| 75 | |||
| 76 | static int exynos4_clksrc_mask_lcd1_ctrl(struct clk *clk, int enable) | ||
| 77 | { | ||
| 78 | return s5p_gatectrl(EXYNOS4210_CLKSRC_MASK_LCD1, clk, enable); | ||
| 79 | } | ||
| 80 | |||
| 81 | static struct clksrc_clk clksrcs[] = { | ||
| 82 | { | ||
| 83 | .clk = { | ||
| 84 | .name = "sclk_sata", | ||
| 85 | .id = -1, | ||
| 86 | .enable = exynos4_clksrc_mask_fsys_ctrl, | ||
| 87 | .ctrlbit = (1 << 24), | ||
| 88 | }, | ||
| 89 | .sources = &exynos4_clkset_mout_corebus, | ||
| 90 | .reg_src = { .reg = EXYNOS4_CLKSRC_FSYS, .shift = 24, .size = 1 }, | ||
| 91 | .reg_div = { .reg = EXYNOS4_CLKDIV_FSYS0, .shift = 20, .size = 4 }, | ||
| 92 | }, { | ||
| 93 | .clk = { | ||
| 94 | .name = "sclk_fimd", | ||
| 95 | .devname = "exynos4-fb.1", | ||
| 96 | .enable = exynos4_clksrc_mask_lcd1_ctrl, | ||
| 97 | .ctrlbit = (1 << 0), | ||
| 98 | }, | ||
| 99 | .sources = &exynos4_clkset_group, | ||
| 100 | .reg_src = { .reg = EXYNOS4210_CLKSRC_LCD1, .shift = 0, .size = 4 }, | ||
| 101 | .reg_div = { .reg = EXYNOS4210_CLKDIV_LCD1, .shift = 0, .size = 4 }, | ||
| 102 | }, { | ||
| 103 | .clk = { | ||
| 104 | .name = "sclk_fimg2d", | ||
| 105 | }, | ||
| 106 | .sources = &exynos4210_clkset_mout_g2d, | ||
| 107 | .reg_src = { .reg = EXYNOS4_CLKSRC_IMAGE, .shift = 8, .size = 1 }, | ||
| 108 | .reg_div = { .reg = EXYNOS4_CLKDIV_IMAGE, .shift = 0, .size = 4 }, | ||
| 109 | }, | ||
| 110 | }; | ||
| 111 | |||
| 112 | static struct clk init_clocks_off[] = { | ||
| 113 | { | ||
| 114 | .name = "sataphy", | ||
| 115 | .id = -1, | ||
| 116 | .parent = &exynos4_clk_aclk_133.clk, | ||
| 117 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
| 118 | .ctrlbit = (1 << 3), | ||
| 119 | }, { | ||
| 120 | .name = "sata", | ||
| 121 | .id = -1, | ||
| 122 | .parent = &exynos4_clk_aclk_133.clk, | ||
| 123 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
| 124 | .ctrlbit = (1 << 10), | ||
| 125 | }, { | ||
| 126 | .name = "fimd", | ||
| 127 | .devname = "exynos4-fb.1", | ||
| 128 | .enable = exynos4_clk_ip_lcd1_ctrl, | ||
| 129 | .ctrlbit = (1 << 0), | ||
| 130 | }, { | ||
| 131 | .name = "sysmmu", | ||
| 132 | .devname = "exynos-sysmmu.9", | ||
| 133 | .enable = exynos4_clk_ip_image_ctrl, | ||
| 134 | .ctrlbit = (1 << 3), | ||
| 135 | }, { | ||
| 136 | .name = "sysmmu", | ||
| 137 | .devname = "exynos-sysmmu.11", | ||
| 138 | .enable = exynos4_clk_ip_lcd1_ctrl, | ||
| 139 | .ctrlbit = (1 << 4), | ||
| 140 | }, { | ||
| 141 | .name = "fimg2d", | ||
| 142 | .enable = exynos4_clk_ip_image_ctrl, | ||
| 143 | .ctrlbit = (1 << 0), | ||
| 144 | }, | ||
| 145 | }; | ||
| 146 | |||
| 147 | #ifdef CONFIG_PM_SLEEP | ||
| 148 | static int exynos4210_clock_suspend(void) | ||
| 149 | { | ||
| 150 | s3c_pm_do_save(exynos4210_clock_save, ARRAY_SIZE(exynos4210_clock_save)); | ||
| 151 | |||
| 152 | return 0; | ||
| 153 | } | ||
| 154 | |||
| 155 | static void exynos4210_clock_resume(void) | ||
| 156 | { | ||
| 157 | s3c_pm_do_restore_core(exynos4210_clock_save, ARRAY_SIZE(exynos4210_clock_save)); | ||
| 158 | } | ||
| 159 | |||
| 160 | #else | ||
| 161 | #define exynos4210_clock_suspend NULL | ||
| 162 | #define exynos4210_clock_resume NULL | ||
| 163 | #endif | ||
| 164 | |||
| 165 | static struct syscore_ops exynos4210_clock_syscore_ops = { | ||
| 166 | .suspend = exynos4210_clock_suspend, | ||
| 167 | .resume = exynos4210_clock_resume, | ||
| 168 | }; | ||
| 169 | |||
| 170 | void __init exynos4210_register_clocks(void) | ||
| 171 | { | ||
| 172 | int ptr; | ||
| 173 | |||
| 174 | exynos4_clk_mout_mpll.reg_src.reg = EXYNOS4_CLKSRC_CPU; | ||
| 175 | exynos4_clk_mout_mpll.reg_src.shift = 8; | ||
| 176 | exynos4_clk_mout_mpll.reg_src.size = 1; | ||
| 177 | |||
| 178 | for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) | ||
| 179 | s3c_register_clksrc(sysclks[ptr], 1); | ||
| 180 | |||
| 181 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | ||
| 182 | |||
| 183 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | ||
| 184 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | ||
| 185 | |||
| 186 | register_syscore_ops(&exynos4210_clock_syscore_ops); | ||
| 187 | } | ||
diff --git a/arch/arm/mach-exynos/clock-exynos4212.c b/arch/arm/mach-exynos/clock-exynos4212.c deleted file mode 100644 index 529476f8ec71..000000000000 --- a/arch/arm/mach-exynos/clock-exynos4212.c +++ /dev/null | |||
| @@ -1,201 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2011-2012 Samsung Electronics Co., Ltd. | ||
| 3 | * http://www.samsung.com | ||
| 4 | * | ||
| 5 | * EXYNOS4212 - Clock support | ||
| 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/err.h> | ||
| 14 | #include <linux/clk.h> | ||
| 15 | #include <linux/io.h> | ||
| 16 | #include <linux/syscore_ops.h> | ||
| 17 | |||
| 18 | #include <plat/cpu-freq.h> | ||
| 19 | #include <plat/clock.h> | ||
| 20 | #include <plat/cpu.h> | ||
| 21 | #include <plat/pll.h> | ||
| 22 | #include <plat/s5p-clock.h> | ||
| 23 | #include <plat/clock-clksrc.h> | ||
| 24 | #include <plat/pm.h> | ||
| 25 | |||
| 26 | #include <mach/hardware.h> | ||
| 27 | #include <mach/map.h> | ||
| 28 | #include <mach/regs-clock.h> | ||
| 29 | |||
| 30 | #include "common.h" | ||
| 31 | #include "clock-exynos4.h" | ||
| 32 | |||
| 33 | #ifdef CONFIG_PM_SLEEP | ||
| 34 | static struct sleep_save exynos4212_clock_save[] = { | ||
| 35 | SAVE_ITEM(EXYNOS4_CLKSRC_IMAGE), | ||
| 36 | SAVE_ITEM(EXYNOS4_CLKDIV_IMAGE), | ||
| 37 | SAVE_ITEM(EXYNOS4212_CLKGATE_IP_IMAGE), | ||
| 38 | SAVE_ITEM(EXYNOS4212_CLKGATE_IP_PERIR), | ||
| 39 | }; | ||
| 40 | #endif | ||
| 41 | |||
| 42 | static int exynos4212_clk_ip_isp0_ctrl(struct clk *clk, int enable) | ||
| 43 | { | ||
| 44 | return s5p_gatectrl(EXYNOS4_CLKGATE_IP_ISP0, clk, enable); | ||
| 45 | } | ||
| 46 | |||
| 47 | static int exynos4212_clk_ip_isp1_ctrl(struct clk *clk, int enable) | ||
| 48 | { | ||
| 49 | return s5p_gatectrl(EXYNOS4_CLKGATE_IP_ISP1, clk, enable); | ||
| 50 | } | ||
| 51 | |||
| 52 | static struct clk *clk_src_mpll_user_list[] = { | ||
| 53 | [0] = &clk_fin_mpll, | ||
| 54 | [1] = &exynos4_clk_mout_mpll.clk, | ||
| 55 | }; | ||
| 56 | |||
| 57 | static struct clksrc_sources clk_src_mpll_user = { | ||
| 58 | .sources = clk_src_mpll_user_list, | ||
| 59 | .nr_sources = ARRAY_SIZE(clk_src_mpll_user_list), | ||
| 60 | }; | ||
| 61 | |||
| 62 | static struct clksrc_clk clk_mout_mpll_user = { | ||
| 63 | .clk = { | ||
| 64 | .name = "mout_mpll_user", | ||
| 65 | }, | ||
| 66 | .sources = &clk_src_mpll_user, | ||
| 67 | .reg_src = { .reg = EXYNOS4_CLKSRC_CPU, .shift = 24, .size = 1 }, | ||
| 68 | }; | ||
| 69 | |||
| 70 | static struct clksrc_clk exynos4x12_clk_mout_g2d0 = { | ||
| 71 | .clk = { | ||
| 72 | .name = "mout_g2d0", | ||
| 73 | }, | ||
| 74 | .sources = &exynos4_clkset_mout_g2d0, | ||
| 75 | .reg_src = { .reg = EXYNOS4_CLKSRC_DMC, .shift = 20, .size = 1 }, | ||
| 76 | }; | ||
| 77 | |||
| 78 | static struct clksrc_clk exynos4x12_clk_mout_g2d1 = { | ||
| 79 | .clk = { | ||
| 80 | .name = "mout_g2d1", | ||
| 81 | }, | ||
| 82 | .sources = &exynos4_clkset_mout_g2d1, | ||
| 83 | .reg_src = { .reg = EXYNOS4_CLKSRC_DMC, .shift = 24, .size = 1 }, | ||
| 84 | }; | ||
| 85 | |||
| 86 | static struct clk *exynos4x12_clkset_mout_g2d_list[] = { | ||
| 87 | [0] = &exynos4x12_clk_mout_g2d0.clk, | ||
| 88 | [1] = &exynos4x12_clk_mout_g2d1.clk, | ||
| 89 | }; | ||
| 90 | |||
| 91 | static struct clksrc_sources exynos4x12_clkset_mout_g2d = { | ||
| 92 | .sources = exynos4x12_clkset_mout_g2d_list, | ||
| 93 | .nr_sources = ARRAY_SIZE(exynos4x12_clkset_mout_g2d_list), | ||
| 94 | }; | ||
| 95 | |||
| 96 | static struct clksrc_clk *sysclks[] = { | ||
| 97 | &clk_mout_mpll_user, | ||
| 98 | }; | ||
| 99 | |||
| 100 | static struct clksrc_clk clksrcs[] = { | ||
| 101 | { | ||
| 102 | .clk = { | ||
| 103 | .name = "sclk_fimg2d", | ||
| 104 | }, | ||
| 105 | .sources = &exynos4x12_clkset_mout_g2d, | ||
| 106 | .reg_src = { .reg = EXYNOS4_CLKSRC_DMC, .shift = 28, .size = 1 }, | ||
| 107 | .reg_div = { .reg = EXYNOS4_CLKDIV_DMC1, .shift = 0, .size = 4 }, | ||
| 108 | }, | ||
| 109 | }; | ||
| 110 | |||
| 111 | static struct clk init_clocks_off[] = { | ||
| 112 | { | ||
| 113 | .name = "sysmmu", | ||
| 114 | .devname = "exynos-sysmmu.9", | ||
| 115 | .enable = exynos4_clk_ip_dmc_ctrl, | ||
| 116 | .ctrlbit = (1 << 24), | ||
| 117 | }, { | ||
| 118 | .name = "sysmmu", | ||
| 119 | .devname = "exynos-sysmmu.12", | ||
| 120 | .enable = exynos4212_clk_ip_isp0_ctrl, | ||
| 121 | .ctrlbit = (7 << 8), | ||
| 122 | }, { | ||
| 123 | .name = "sysmmu", | ||
| 124 | .devname = "exynos-sysmmu.13", | ||
| 125 | .enable = exynos4212_clk_ip_isp1_ctrl, | ||
| 126 | .ctrlbit = (1 << 4), | ||
| 127 | }, { | ||
| 128 | .name = "sysmmu", | ||
| 129 | .devname = "exynos-sysmmu.14", | ||
| 130 | .enable = exynos4212_clk_ip_isp0_ctrl, | ||
| 131 | .ctrlbit = (1 << 11), | ||
| 132 | }, { | ||
| 133 | .name = "sysmmu", | ||
| 134 | .devname = "exynos-sysmmu.15", | ||
| 135 | .enable = exynos4212_clk_ip_isp0_ctrl, | ||
| 136 | .ctrlbit = (1 << 12), | ||
| 137 | }, { | ||
| 138 | .name = "flite", | ||
| 139 | .devname = "exynos-fimc-lite.0", | ||
| 140 | .enable = exynos4212_clk_ip_isp0_ctrl, | ||
| 141 | .ctrlbit = (1 << 4), | ||
| 142 | }, { | ||
| 143 | .name = "flite", | ||
| 144 | .devname = "exynos-fimc-lite.1", | ||
| 145 | .enable = exynos4212_clk_ip_isp0_ctrl, | ||
| 146 | .ctrlbit = (1 << 3), | ||
| 147 | }, { | ||
| 148 | .name = "fimg2d", | ||
| 149 | .enable = exynos4_clk_ip_dmc_ctrl, | ||
| 150 | .ctrlbit = (1 << 23), | ||
| 151 | }, | ||
| 152 | }; | ||
| 153 | |||
| 154 | #ifdef CONFIG_PM_SLEEP | ||
| 155 | static int exynos4212_clock_suspend(void) | ||
| 156 | { | ||
| 157 | s3c_pm_do_save(exynos4212_clock_save, ARRAY_SIZE(exynos4212_clock_save)); | ||
| 158 | |||
| 159 | return 0; | ||
| 160 | } | ||
| 161 | |||
| 162 | static void exynos4212_clock_resume(void) | ||
| 163 | { | ||
| 164 | s3c_pm_do_restore_core(exynos4212_clock_save, ARRAY_SIZE(exynos4212_clock_save)); | ||
| 165 | } | ||
| 166 | |||
| 167 | #else | ||
| 168 | #define exynos4212_clock_suspend NULL | ||
| 169 | #define exynos4212_clock_resume NULL | ||
| 170 | #endif | ||
| 171 | |||
| 172 | static struct syscore_ops exynos4212_clock_syscore_ops = { | ||
| 173 | .suspend = exynos4212_clock_suspend, | ||
| 174 | .resume = exynos4212_clock_resume, | ||
| 175 | }; | ||
| 176 | |||
| 177 | void __init exynos4212_register_clocks(void) | ||
| 178 | { | ||
| 179 | int ptr; | ||
| 180 | |||
| 181 | /* usbphy1 is removed */ | ||
| 182 | exynos4_clkset_group_list[4] = NULL; | ||
| 183 | |||
| 184 | /* mout_mpll_user is used */ | ||
| 185 | exynos4_clkset_group_list[6] = &clk_mout_mpll_user.clk; | ||
| 186 | exynos4_clkset_aclk_top_list[0] = &clk_mout_mpll_user.clk; | ||
| 187 | |||
| 188 | exynos4_clk_mout_mpll.reg_src.reg = EXYNOS4_CLKSRC_DMC; | ||
| 189 | exynos4_clk_mout_mpll.reg_src.shift = 12; | ||
| 190 | exynos4_clk_mout_mpll.reg_src.size = 1; | ||
| 191 | |||
| 192 | for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) | ||
| 193 | s3c_register_clksrc(sysclks[ptr], 1); | ||
| 194 | |||
| 195 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | ||
| 196 | |||
| 197 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | ||
| 198 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | ||
| 199 | |||
| 200 | register_syscore_ops(&exynos4212_clock_syscore_ops); | ||
| 201 | } | ||
diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c deleted file mode 100644 index b0ea31fc9fb8..000000000000 --- a/arch/arm/mach-exynos/clock-exynos5.c +++ /dev/null | |||
| @@ -1,1645 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2012 Samsung Electronics Co., Ltd. | ||
| 3 | * http://www.samsung.com | ||
| 4 | * | ||
| 5 | * Clock support for EXYNOS5 SoCs | ||
| 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/err.h> | ||
| 14 | #include <linux/io.h> | ||
| 15 | #include <linux/syscore_ops.h> | ||
| 16 | |||
| 17 | #include <plat/cpu-freq.h> | ||
| 18 | #include <plat/clock.h> | ||
| 19 | #include <plat/cpu.h> | ||
| 20 | #include <plat/pll.h> | ||
| 21 | #include <plat/s5p-clock.h> | ||
| 22 | #include <plat/clock-clksrc.h> | ||
| 23 | #include <plat/pm.h> | ||
| 24 | |||
| 25 | #include <mach/map.h> | ||
| 26 | #include <mach/regs-clock.h> | ||
| 27 | |||
| 28 | #include "common.h" | ||
| 29 | |||
| 30 | #ifdef CONFIG_PM_SLEEP | ||
| 31 | static struct sleep_save exynos5_clock_save[] = { | ||
| 32 | SAVE_ITEM(EXYNOS5_CLKSRC_MASK_TOP), | ||
| 33 | SAVE_ITEM(EXYNOS5_CLKSRC_MASK_GSCL), | ||
| 34 | SAVE_ITEM(EXYNOS5_CLKSRC_MASK_DISP1_0), | ||
| 35 | SAVE_ITEM(EXYNOS5_CLKSRC_MASK_FSYS), | ||
| 36 | SAVE_ITEM(EXYNOS5_CLKSRC_MASK_MAUDIO), | ||
| 37 | SAVE_ITEM(EXYNOS5_CLKSRC_MASK_PERIC0), | ||
| 38 | SAVE_ITEM(EXYNOS5_CLKSRC_MASK_PERIC1), | ||
| 39 | SAVE_ITEM(EXYNOS5_CLKGATE_IP_GSCL), | ||
| 40 | SAVE_ITEM(EXYNOS5_CLKGATE_IP_DISP1), | ||
| 41 | SAVE_ITEM(EXYNOS5_CLKGATE_IP_MFC), | ||
| 42 | SAVE_ITEM(EXYNOS5_CLKGATE_IP_G3D), | ||
| 43 | SAVE_ITEM(EXYNOS5_CLKGATE_IP_GEN), | ||
| 44 | SAVE_ITEM(EXYNOS5_CLKGATE_IP_FSYS), | ||
| 45 | SAVE_ITEM(EXYNOS5_CLKGATE_IP_PERIC), | ||
| 46 | SAVE_ITEM(EXYNOS5_CLKGATE_IP_PERIS), | ||
| 47 | SAVE_ITEM(EXYNOS5_CLKGATE_BLOCK), | ||
| 48 | SAVE_ITEM(EXYNOS5_CLKDIV_TOP0), | ||
| 49 | SAVE_ITEM(EXYNOS5_CLKDIV_TOP1), | ||
| 50 | SAVE_ITEM(EXYNOS5_CLKDIV_GSCL), | ||
| 51 | SAVE_ITEM(EXYNOS5_CLKDIV_DISP1_0), | ||
| 52 | SAVE_ITEM(EXYNOS5_CLKDIV_GEN), | ||
| 53 | SAVE_ITEM(EXYNOS5_CLKDIV_MAUDIO), | ||
| 54 | SAVE_ITEM(EXYNOS5_CLKDIV_FSYS0), | ||
| 55 | SAVE_ITEM(EXYNOS5_CLKDIV_FSYS1), | ||
| 56 | SAVE_ITEM(EXYNOS5_CLKDIV_FSYS2), | ||
| 57 | SAVE_ITEM(EXYNOS5_CLKDIV_FSYS3), | ||
| 58 | SAVE_ITEM(EXYNOS5_CLKDIV_PERIC0), | ||
| 59 | SAVE_ITEM(EXYNOS5_CLKDIV_PERIC1), | ||
| 60 | SAVE_ITEM(EXYNOS5_CLKDIV_PERIC2), | ||
| 61 | SAVE_ITEM(EXYNOS5_CLKDIV_PERIC3), | ||
| 62 | SAVE_ITEM(EXYNOS5_CLKDIV_PERIC4), | ||
| 63 | SAVE_ITEM(EXYNOS5_CLKDIV_PERIC5), | ||
| 64 | SAVE_ITEM(EXYNOS5_SCLK_DIV_ISP), | ||
| 65 | SAVE_ITEM(EXYNOS5_CLKSRC_TOP0), | ||
| 66 | SAVE_ITEM(EXYNOS5_CLKSRC_TOP1), | ||
| 67 | SAVE_ITEM(EXYNOS5_CLKSRC_TOP2), | ||
| 68 | SAVE_ITEM(EXYNOS5_CLKSRC_TOP3), | ||
| 69 | SAVE_ITEM(EXYNOS5_CLKSRC_GSCL), | ||
| 70 | SAVE_ITEM(EXYNOS5_CLKSRC_DISP1_0), | ||
| 71 | SAVE_ITEM(EXYNOS5_CLKSRC_MAUDIO), | ||
| 72 | SAVE_ITEM(EXYNOS5_CLKSRC_FSYS), | ||
| 73 | SAVE_ITEM(EXYNOS5_CLKSRC_PERIC0), | ||
| 74 | SAVE_ITEM(EXYNOS5_CLKSRC_PERIC1), | ||
| 75 | SAVE_ITEM(EXYNOS5_SCLK_SRC_ISP), | ||
| 76 | SAVE_ITEM(EXYNOS5_EPLL_CON0), | ||
| 77 | SAVE_ITEM(EXYNOS5_EPLL_CON1), | ||
| 78 | SAVE_ITEM(EXYNOS5_EPLL_CON2), | ||
| 79 | SAVE_ITEM(EXYNOS5_VPLL_CON0), | ||
| 80 | SAVE_ITEM(EXYNOS5_VPLL_CON1), | ||
| 81 | SAVE_ITEM(EXYNOS5_VPLL_CON2), | ||
| 82 | SAVE_ITEM(EXYNOS5_PWR_CTRL1), | ||
| 83 | SAVE_ITEM(EXYNOS5_PWR_CTRL2), | ||
| 84 | }; | ||
| 85 | #endif | ||
| 86 | |||
| 87 | static struct clk exynos5_clk_sclk_dptxphy = { | ||
| 88 | .name = "sclk_dptx", | ||
| 89 | }; | ||
| 90 | |||
| 91 | static struct clk exynos5_clk_sclk_hdmi24m = { | ||
| 92 | .name = "sclk_hdmi24m", | ||
| 93 | .rate = 24000000, | ||
| 94 | }; | ||
| 95 | |||
| 96 | static struct clk exynos5_clk_sclk_hdmi27m = { | ||
| 97 | .name = "sclk_hdmi27m", | ||
| 98 | .rate = 27000000, | ||
| 99 | }; | ||
| 100 | |||
| 101 | static struct clk exynos5_clk_sclk_hdmiphy = { | ||
| 102 | .name = "sclk_hdmiphy", | ||
| 103 | }; | ||
| 104 | |||
| 105 | static struct clk exynos5_clk_sclk_usbphy = { | ||
| 106 | .name = "sclk_usbphy", | ||
| 107 | .rate = 48000000, | ||
| 108 | }; | ||
| 109 | |||
| 110 | static int exynos5_clksrc_mask_top_ctrl(struct clk *clk, int enable) | ||
| 111 | { | ||
| 112 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_TOP, clk, enable); | ||
| 113 | } | ||
| 114 | |||
| 115 | static int exynos5_clksrc_mask_disp1_0_ctrl(struct clk *clk, int enable) | ||
| 116 | { | ||
| 117 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_DISP1_0, clk, enable); | ||
| 118 | } | ||
| 119 | |||
| 120 | static int exynos5_clksrc_mask_fsys_ctrl(struct clk *clk, int enable) | ||
| 121 | { | ||
| 122 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_FSYS, clk, enable); | ||
| 123 | } | ||
| 124 | |||
| 125 | static int exynos5_clksrc_mask_gscl_ctrl(struct clk *clk, int enable) | ||
| 126 | { | ||
| 127 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_GSCL, clk, enable); | ||
| 128 | } | ||
| 129 | |||
| 130 | static int exynos5_clksrc_mask_peric0_ctrl(struct clk *clk, int enable) | ||
| 131 | { | ||
| 132 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_PERIC0, clk, enable); | ||
| 133 | } | ||
| 134 | |||
| 135 | static int exynos5_clksrc_mask_peric1_ctrl(struct clk *clk, int enable) | ||
| 136 | { | ||
| 137 | return s5p_gatectrl(EXYNOS5_CLKSRC_MASK_PERIC1, clk, enable); | ||
| 138 | } | ||
| 139 | |||
| 140 | static int exynos5_clk_ip_acp_ctrl(struct clk *clk, int enable) | ||
| 141 | { | ||
| 142 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_ACP, clk, enable); | ||
| 143 | } | ||
| 144 | |||
| 145 | static int exynos5_clk_ip_core_ctrl(struct clk *clk, int enable) | ||
| 146 | { | ||
| 147 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_CORE, clk, enable); | ||
| 148 | } | ||
| 149 | |||
| 150 | static int exynos5_clk_ip_disp1_ctrl(struct clk *clk, int enable) | ||
| 151 | { | ||
| 152 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_DISP1, clk, enable); | ||
| 153 | } | ||
| 154 | |||
| 155 | static int exynos5_clk_ip_fsys_ctrl(struct clk *clk, int enable) | ||
| 156 | { | ||
| 157 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_FSYS, clk, enable); | ||
| 158 | } | ||
| 159 | |||
| 160 | static int exynos5_clk_block_ctrl(struct clk *clk, int enable) | ||
| 161 | { | ||
| 162 | return s5p_gatectrl(EXYNOS5_CLKGATE_BLOCK, clk, enable); | ||
| 163 | } | ||
| 164 | |||
| 165 | static int exynos5_clk_ip_gen_ctrl(struct clk *clk, int enable) | ||
| 166 | { | ||
| 167 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_GEN, clk, enable); | ||
| 168 | } | ||
| 169 | |||
| 170 | static int exynos5_clk_ip_mfc_ctrl(struct clk *clk, int enable) | ||
| 171 | { | ||
| 172 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_MFC, clk, enable); | ||
| 173 | } | ||
| 174 | |||
| 175 | static int exynos5_clk_ip_peric_ctrl(struct clk *clk, int enable) | ||
| 176 | { | ||
| 177 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_PERIC, clk, enable); | ||
| 178 | } | ||
| 179 | |||
| 180 | static int exynos5_clk_ip_peris_ctrl(struct clk *clk, int enable) | ||
| 181 | { | ||
| 182 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_PERIS, clk, enable); | ||
| 183 | } | ||
| 184 | |||
| 185 | static int exynos5_clk_ip_gscl_ctrl(struct clk *clk, int enable) | ||
| 186 | { | ||
| 187 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_GSCL, clk, enable); | ||
| 188 | } | ||
| 189 | |||
| 190 | static int exynos5_clk_ip_isp0_ctrl(struct clk *clk, int enable) | ||
| 191 | { | ||
| 192 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_ISP0, clk, enable); | ||
| 193 | } | ||
| 194 | |||
| 195 | static int exynos5_clk_ip_isp1_ctrl(struct clk *clk, int enable) | ||
| 196 | { | ||
| 197 | return s5p_gatectrl(EXYNOS5_CLKGATE_IP_ISP1, clk, enable); | ||
| 198 | } | ||
| 199 | |||
| 200 | static int exynos5_clk_hdmiphy_ctrl(struct clk *clk, int enable) | ||
| 201 | { | ||
| 202 | return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable); | ||
| 203 | } | ||
| 204 | |||
| 205 | /* Core list of CMU_CPU side */ | ||
| 206 | |||
| 207 | static struct clksrc_clk exynos5_clk_mout_apll = { | ||
| 208 | .clk = { | ||
| 209 | .name = "mout_apll", | ||
| 210 | }, | ||
| 211 | .sources = &clk_src_apll, | ||
| 212 | .reg_src = { .reg = EXYNOS5_CLKSRC_CPU, .shift = 0, .size = 1 }, | ||
| 213 | }; | ||
| 214 | |||
| 215 | static struct clksrc_clk exynos5_clk_sclk_apll = { | ||
| 216 | .clk = { | ||
| 217 | .name = "sclk_apll", | ||
| 218 | .parent = &exynos5_clk_mout_apll.clk, | ||
| 219 | }, | ||
| 220 | .reg_div = { .reg = EXYNOS5_CLKDIV_CPU0, .shift = 24, .size = 3 }, | ||
| 221 | }; | ||
| 222 | |||
| 223 | static struct clksrc_clk exynos5_clk_mout_bpll_fout = { | ||
| 224 | .clk = { | ||
| 225 | .name = "mout_bpll_fout", | ||
| 226 | }, | ||
| 227 | .sources = &clk_src_bpll_fout, | ||
| 228 | .reg_src = { .reg = EXYNOS5_PLL_DIV2_SEL, .shift = 0, .size = 1 }, | ||
| 229 | }; | ||
| 230 | |||
| 231 | static struct clk *exynos5_clk_src_bpll_list[] = { | ||
| 232 | [0] = &clk_fin_bpll, | ||
| 233 | [1] = &exynos5_clk_mout_bpll_fout.clk, | ||
| 234 | }; | ||
| 235 | |||
| 236 | static struct clksrc_sources exynos5_clk_src_bpll = { | ||
| 237 | .sources = exynos5_clk_src_bpll_list, | ||
| 238 | .nr_sources = ARRAY_SIZE(exynos5_clk_src_bpll_list), | ||
| 239 | }; | ||
| 240 | |||
| 241 | static struct clksrc_clk exynos5_clk_mout_bpll = { | ||
| 242 | .clk = { | ||
| 243 | .name = "mout_bpll", | ||
| 244 | }, | ||
| 245 | .sources = &exynos5_clk_src_bpll, | ||
| 246 | .reg_src = { .reg = EXYNOS5_CLKSRC_CDREX, .shift = 0, .size = 1 }, | ||
| 247 | }; | ||
| 248 | |||
| 249 | static struct clk *exynos5_clk_src_bpll_user_list[] = { | ||
| 250 | [0] = &clk_fin_mpll, | ||
| 251 | [1] = &exynos5_clk_mout_bpll.clk, | ||
| 252 | }; | ||
| 253 | |||
| 254 | static struct clksrc_sources exynos5_clk_src_bpll_user = { | ||
| 255 | .sources = exynos5_clk_src_bpll_user_list, | ||
| 256 | .nr_sources = ARRAY_SIZE(exynos5_clk_src_bpll_user_list), | ||
| 257 | }; | ||
| 258 | |||
| 259 | static struct clksrc_clk exynos5_clk_mout_bpll_user = { | ||
| 260 | .clk = { | ||
| 261 | .name = "mout_bpll_user", | ||
| 262 | }, | ||
| 263 | .sources = &exynos5_clk_src_bpll_user, | ||
| 264 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 24, .size = 1 }, | ||
| 265 | }; | ||
| 266 | |||
| 267 | static struct clksrc_clk exynos5_clk_mout_cpll = { | ||
| 268 | .clk = { | ||
| 269 | .name = "mout_cpll", | ||
| 270 | }, | ||
| 271 | .sources = &clk_src_cpll, | ||
| 272 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 8, .size = 1 }, | ||
| 273 | }; | ||
| 274 | |||
| 275 | static struct clksrc_clk exynos5_clk_mout_epll = { | ||
| 276 | .clk = { | ||
| 277 | .name = "mout_epll", | ||
| 278 | }, | ||
| 279 | .sources = &clk_src_epll, | ||
| 280 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 12, .size = 1 }, | ||
| 281 | }; | ||
| 282 | |||
| 283 | static struct clksrc_clk exynos5_clk_mout_mpll_fout = { | ||
| 284 | .clk = { | ||
| 285 | .name = "mout_mpll_fout", | ||
| 286 | }, | ||
| 287 | .sources = &clk_src_mpll_fout, | ||
| 288 | .reg_src = { .reg = EXYNOS5_PLL_DIV2_SEL, .shift = 4, .size = 1 }, | ||
| 289 | }; | ||
| 290 | |||
| 291 | static struct clk *exynos5_clk_src_mpll_list[] = { | ||
| 292 | [0] = &clk_fin_mpll, | ||
| 293 | [1] = &exynos5_clk_mout_mpll_fout.clk, | ||
| 294 | }; | ||
| 295 | |||
| 296 | static struct clksrc_sources exynos5_clk_src_mpll = { | ||
| 297 | .sources = exynos5_clk_src_mpll_list, | ||
| 298 | .nr_sources = ARRAY_SIZE(exynos5_clk_src_mpll_list), | ||
| 299 | }; | ||
| 300 | |||
| 301 | static struct clksrc_clk exynos5_clk_mout_mpll = { | ||
| 302 | .clk = { | ||
| 303 | .name = "mout_mpll", | ||
| 304 | }, | ||
| 305 | .sources = &exynos5_clk_src_mpll, | ||
| 306 | .reg_src = { .reg = EXYNOS5_CLKSRC_CORE1, .shift = 8, .size = 1 }, | ||
| 307 | }; | ||
| 308 | |||
| 309 | static struct clk *exynos_clkset_vpllsrc_list[] = { | ||
| 310 | [0] = &clk_fin_vpll, | ||
| 311 | [1] = &exynos5_clk_sclk_hdmi27m, | ||
| 312 | }; | ||
| 313 | |||
| 314 | static struct clksrc_sources exynos5_clkset_vpllsrc = { | ||
| 315 | .sources = exynos_clkset_vpllsrc_list, | ||
| 316 | .nr_sources = ARRAY_SIZE(exynos_clkset_vpllsrc_list), | ||
| 317 | }; | ||
| 318 | |||
| 319 | static struct clksrc_clk exynos5_clk_vpllsrc = { | ||
| 320 | .clk = { | ||
| 321 | .name = "vpll_src", | ||
| 322 | .enable = exynos5_clksrc_mask_top_ctrl, | ||
| 323 | .ctrlbit = (1 << 0), | ||
| 324 | }, | ||
| 325 | .sources = &exynos5_clkset_vpllsrc, | ||
| 326 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 0, .size = 1 }, | ||
| 327 | }; | ||
| 328 | |||
| 329 | static struct clk *exynos5_clkset_sclk_vpll_list[] = { | ||
| 330 | [0] = &exynos5_clk_vpllsrc.clk, | ||
| 331 | [1] = &clk_fout_vpll, | ||
| 332 | }; | ||
| 333 | |||
| 334 | static struct clksrc_sources exynos5_clkset_sclk_vpll = { | ||
| 335 | .sources = exynos5_clkset_sclk_vpll_list, | ||
| 336 | .nr_sources = ARRAY_SIZE(exynos5_clkset_sclk_vpll_list), | ||
| 337 | }; | ||
| 338 | |||
| 339 | static struct clksrc_clk exynos5_clk_sclk_vpll = { | ||
| 340 | .clk = { | ||
| 341 | .name = "sclk_vpll", | ||
| 342 | }, | ||
| 343 | .sources = &exynos5_clkset_sclk_vpll, | ||
| 344 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 16, .size = 1 }, | ||
| 345 | }; | ||
| 346 | |||
| 347 | static struct clksrc_clk exynos5_clk_sclk_pixel = { | ||
| 348 | .clk = { | ||
| 349 | .name = "sclk_pixel", | ||
| 350 | .parent = &exynos5_clk_sclk_vpll.clk, | ||
| 351 | }, | ||
| 352 | .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 28, .size = 4 }, | ||
| 353 | }; | ||
| 354 | |||
| 355 | static struct clk *exynos5_clkset_sclk_hdmi_list[] = { | ||
| 356 | [0] = &exynos5_clk_sclk_pixel.clk, | ||
| 357 | [1] = &exynos5_clk_sclk_hdmiphy, | ||
| 358 | }; | ||
| 359 | |||
| 360 | static struct clksrc_sources exynos5_clkset_sclk_hdmi = { | ||
| 361 | .sources = exynos5_clkset_sclk_hdmi_list, | ||
| 362 | .nr_sources = ARRAY_SIZE(exynos5_clkset_sclk_hdmi_list), | ||
| 363 | }; | ||
| 364 | |||
| 365 | static struct clksrc_clk exynos5_clk_sclk_hdmi = { | ||
| 366 | .clk = { | ||
| 367 | .name = "sclk_hdmi", | ||
| 368 | .enable = exynos5_clksrc_mask_disp1_0_ctrl, | ||
| 369 | .ctrlbit = (1 << 20), | ||
| 370 | }, | ||
| 371 | .sources = &exynos5_clkset_sclk_hdmi, | ||
| 372 | .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 20, .size = 1 }, | ||
| 373 | }; | ||
| 374 | |||
| 375 | static struct clksrc_clk *exynos5_sclk_tv[] = { | ||
| 376 | &exynos5_clk_sclk_pixel, | ||
| 377 | &exynos5_clk_sclk_hdmi, | ||
| 378 | }; | ||
| 379 | |||
| 380 | static struct clk *exynos5_clk_src_mpll_user_list[] = { | ||
| 381 | [0] = &clk_fin_mpll, | ||
| 382 | [1] = &exynos5_clk_mout_mpll.clk, | ||
| 383 | }; | ||
| 384 | |||
| 385 | static struct clksrc_sources exynos5_clk_src_mpll_user = { | ||
| 386 | .sources = exynos5_clk_src_mpll_user_list, | ||
| 387 | .nr_sources = ARRAY_SIZE(exynos5_clk_src_mpll_user_list), | ||
| 388 | }; | ||
| 389 | |||
| 390 | static struct clksrc_clk exynos5_clk_mout_mpll_user = { | ||
| 391 | .clk = { | ||
| 392 | .name = "mout_mpll_user", | ||
| 393 | }, | ||
| 394 | .sources = &exynos5_clk_src_mpll_user, | ||
| 395 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP2, .shift = 20, .size = 1 }, | ||
| 396 | }; | ||
| 397 | |||
| 398 | static struct clk *exynos5_clkset_mout_cpu_list[] = { | ||
| 399 | [0] = &exynos5_clk_mout_apll.clk, | ||
| 400 | [1] = &exynos5_clk_mout_mpll.clk, | ||
| 401 | }; | ||
| 402 | |||
| 403 | static struct clksrc_sources exynos5_clkset_mout_cpu = { | ||
| 404 | .sources = exynos5_clkset_mout_cpu_list, | ||
| 405 | .nr_sources = ARRAY_SIZE(exynos5_clkset_mout_cpu_list), | ||
| 406 | }; | ||
| 407 | |||
| 408 | static struct clksrc_clk exynos5_clk_mout_cpu = { | ||
| 409 | .clk = { | ||
| 410 | .name = "mout_cpu", | ||
| 411 | }, | ||
| 412 | .sources = &exynos5_clkset_mout_cpu, | ||
| 413 | .reg_src = { .reg = EXYNOS5_CLKSRC_CPU, .shift = 16, .size = 1 }, | ||
| 414 | }; | ||
| 415 | |||
| 416 | static struct clksrc_clk exynos5_clk_dout_armclk = { | ||
| 417 | .clk = { | ||
| 418 | .name = "dout_armclk", | ||
| 419 | .parent = &exynos5_clk_mout_cpu.clk, | ||
| 420 | }, | ||
| 421 | .reg_div = { .reg = EXYNOS5_CLKDIV_CPU0, .shift = 0, .size = 3 }, | ||
| 422 | }; | ||
| 423 | |||
| 424 | static struct clksrc_clk exynos5_clk_dout_arm2clk = { | ||
| 425 | .clk = { | ||
| 426 | .name = "dout_arm2clk", | ||
| 427 | .parent = &exynos5_clk_dout_armclk.clk, | ||
| 428 | }, | ||
| 429 | .reg_div = { .reg = EXYNOS5_CLKDIV_CPU0, .shift = 28, .size = 3 }, | ||
| 430 | }; | ||
| 431 | |||
| 432 | static struct clk exynos5_clk_armclk = { | ||
| 433 | .name = "armclk", | ||
| 434 | .parent = &exynos5_clk_dout_arm2clk.clk, | ||
| 435 | }; | ||
| 436 | |||
| 437 | /* Core list of CMU_CDREX side */ | ||
| 438 | |||
| 439 | static struct clk *exynos5_clkset_cdrex_list[] = { | ||
| 440 | [0] = &exynos5_clk_mout_mpll.clk, | ||
| 441 | [1] = &exynos5_clk_mout_bpll.clk, | ||
| 442 | }; | ||
| 443 | |||
| 444 | static struct clksrc_sources exynos5_clkset_cdrex = { | ||
| 445 | .sources = exynos5_clkset_cdrex_list, | ||
| 446 | .nr_sources = ARRAY_SIZE(exynos5_clkset_cdrex_list), | ||
| 447 | }; | ||
| 448 | |||
| 449 | static struct clksrc_clk exynos5_clk_cdrex = { | ||
| 450 | .clk = { | ||
| 451 | .name = "clk_cdrex", | ||
| 452 | }, | ||
| 453 | .sources = &exynos5_clkset_cdrex, | ||
| 454 | .reg_src = { .reg = EXYNOS5_CLKSRC_CDREX, .shift = 4, .size = 1 }, | ||
| 455 | .reg_div = { .reg = EXYNOS5_CLKDIV_CDREX, .shift = 16, .size = 3 }, | ||
| 456 | }; | ||
| 457 | |||
| 458 | static struct clksrc_clk exynos5_clk_aclk_acp = { | ||
| 459 | .clk = { | ||
| 460 | .name = "aclk_acp", | ||
| 461 | .parent = &exynos5_clk_mout_mpll.clk, | ||
| 462 | }, | ||
| 463 | .reg_div = { .reg = EXYNOS5_CLKDIV_ACP, .shift = 0, .size = 3 }, | ||
| 464 | }; | ||
| 465 | |||
| 466 | static struct clksrc_clk exynos5_clk_pclk_acp = { | ||
| 467 | .clk = { | ||
| 468 | .name = "pclk_acp", | ||
| 469 | .parent = &exynos5_clk_aclk_acp.clk, | ||
| 470 | }, | ||
| 471 | .reg_div = { .reg = EXYNOS5_CLKDIV_ACP, .shift = 4, .size = 3 }, | ||
| 472 | }; | ||
| 473 | |||
| 474 | /* Core list of CMU_TOP side */ | ||
| 475 | |||
| 476 | static struct clk *exynos5_clkset_aclk_top_list[] = { | ||
| 477 | [0] = &exynos5_clk_mout_mpll_user.clk, | ||
| 478 | [1] = &exynos5_clk_mout_bpll_user.clk, | ||
| 479 | }; | ||
| 480 | |||
| 481 | static struct clksrc_sources exynos5_clkset_aclk = { | ||
| 482 | .sources = exynos5_clkset_aclk_top_list, | ||
| 483 | .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_top_list), | ||
| 484 | }; | ||
| 485 | |||
| 486 | static struct clksrc_clk exynos5_clk_aclk_400 = { | ||
| 487 | .clk = { | ||
| 488 | .name = "aclk_400", | ||
| 489 | }, | ||
| 490 | .sources = &exynos5_clkset_aclk, | ||
| 491 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP0, .shift = 20, .size = 1 }, | ||
| 492 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 24, .size = 3 }, | ||
| 493 | }; | ||
| 494 | |||
| 495 | static struct clk *exynos5_clkset_aclk_333_166_list[] = { | ||
| 496 | [0] = &exynos5_clk_mout_cpll.clk, | ||
| 497 | [1] = &exynos5_clk_mout_mpll_user.clk, | ||
| 498 | }; | ||
| 499 | |||
| 500 | static struct clksrc_sources exynos5_clkset_aclk_333_166 = { | ||
| 501 | .sources = exynos5_clkset_aclk_333_166_list, | ||
| 502 | .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_333_166_list), | ||
| 503 | }; | ||
| 504 | |||
| 505 | static struct clksrc_clk exynos5_clk_aclk_333 = { | ||
| 506 | .clk = { | ||
| 507 | .name = "aclk_333", | ||
| 508 | }, | ||
| 509 | .sources = &exynos5_clkset_aclk_333_166, | ||
| 510 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP0, .shift = 16, .size = 1 }, | ||
| 511 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 20, .size = 3 }, | ||
| 512 | }; | ||
| 513 | |||
| 514 | static struct clksrc_clk exynos5_clk_aclk_166 = { | ||
| 515 | .clk = { | ||
| 516 | .name = "aclk_166", | ||
| 517 | }, | ||
| 518 | .sources = &exynos5_clkset_aclk_333_166, | ||
| 519 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP0, .shift = 8, .size = 1 }, | ||
| 520 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 8, .size = 3 }, | ||
| 521 | }; | ||
| 522 | |||
| 523 | static struct clksrc_clk exynos5_clk_aclk_266 = { | ||
| 524 | .clk = { | ||
| 525 | .name = "aclk_266", | ||
| 526 | .parent = &exynos5_clk_mout_mpll_user.clk, | ||
| 527 | }, | ||
| 528 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 16, .size = 3 }, | ||
| 529 | }; | ||
| 530 | |||
| 531 | static struct clksrc_clk exynos5_clk_aclk_200 = { | ||
| 532 | .clk = { | ||
| 533 | .name = "aclk_200", | ||
| 534 | }, | ||
| 535 | .sources = &exynos5_clkset_aclk, | ||
| 536 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP0, .shift = 12, .size = 1 }, | ||
| 537 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 12, .size = 3 }, | ||
| 538 | }; | ||
| 539 | |||
| 540 | static struct clksrc_clk exynos5_clk_aclk_66_pre = { | ||
| 541 | .clk = { | ||
| 542 | .name = "aclk_66_pre", | ||
| 543 | .parent = &exynos5_clk_mout_mpll_user.clk, | ||
| 544 | }, | ||
| 545 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP1, .shift = 24, .size = 3 }, | ||
| 546 | }; | ||
| 547 | |||
| 548 | static struct clksrc_clk exynos5_clk_aclk_66 = { | ||
| 549 | .clk = { | ||
| 550 | .name = "aclk_66", | ||
| 551 | .parent = &exynos5_clk_aclk_66_pre.clk, | ||
| 552 | }, | ||
| 553 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 0, .size = 3 }, | ||
| 554 | }; | ||
| 555 | |||
| 556 | static struct clksrc_clk exynos5_clk_mout_aclk_300_gscl_mid = { | ||
| 557 | .clk = { | ||
| 558 | .name = "mout_aclk_300_gscl_mid", | ||
| 559 | }, | ||
| 560 | .sources = &exynos5_clkset_aclk, | ||
| 561 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP0, .shift = 24, .size = 1 }, | ||
| 562 | }; | ||
| 563 | |||
| 564 | static struct clk *exynos5_clkset_aclk_300_mid1_list[] = { | ||
| 565 | [0] = &exynos5_clk_sclk_vpll.clk, | ||
| 566 | [1] = &exynos5_clk_mout_cpll.clk, | ||
| 567 | }; | ||
| 568 | |||
| 569 | static struct clksrc_sources exynos5_clkset_aclk_300_gscl_mid1 = { | ||
| 570 | .sources = exynos5_clkset_aclk_300_mid1_list, | ||
| 571 | .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_300_mid1_list), | ||
| 572 | }; | ||
| 573 | |||
| 574 | static struct clksrc_clk exynos5_clk_mout_aclk_300_gscl_mid1 = { | ||
| 575 | .clk = { | ||
| 576 | .name = "mout_aclk_300_gscl_mid1", | ||
| 577 | }, | ||
| 578 | .sources = &exynos5_clkset_aclk_300_gscl_mid1, | ||
| 579 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP1, .shift = 12, .size = 1 }, | ||
| 580 | }; | ||
| 581 | |||
| 582 | static struct clk *exynos5_clkset_aclk_300_gscl_list[] = { | ||
| 583 | [0] = &exynos5_clk_mout_aclk_300_gscl_mid.clk, | ||
| 584 | [1] = &exynos5_clk_mout_aclk_300_gscl_mid1.clk, | ||
| 585 | }; | ||
| 586 | |||
| 587 | static struct clksrc_sources exynos5_clkset_aclk_300_gscl = { | ||
| 588 | .sources = exynos5_clkset_aclk_300_gscl_list, | ||
| 589 | .nr_sources = ARRAY_SIZE(exynos5_clkset_aclk_300_gscl_list), | ||
| 590 | }; | ||
| 591 | |||
| 592 | static struct clksrc_clk exynos5_clk_mout_aclk_300_gscl = { | ||
| 593 | .clk = { | ||
| 594 | .name = "mout_aclk_300_gscl", | ||
| 595 | }, | ||
| 596 | .sources = &exynos5_clkset_aclk_300_gscl, | ||
| 597 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP0, .shift = 25, .size = 1 }, | ||
| 598 | }; | ||
| 599 | |||
| 600 | static struct clk *exynos5_clk_src_gscl_300_list[] = { | ||
| 601 | [0] = &clk_ext_xtal_mux, | ||
| 602 | [1] = &exynos5_clk_mout_aclk_300_gscl.clk, | ||
| 603 | }; | ||
| 604 | |||
| 605 | static struct clksrc_sources exynos5_clk_src_gscl_300 = { | ||
| 606 | .sources = exynos5_clk_src_gscl_300_list, | ||
| 607 | .nr_sources = ARRAY_SIZE(exynos5_clk_src_gscl_300_list), | ||
| 608 | }; | ||
| 609 | |||
| 610 | static struct clksrc_clk exynos5_clk_aclk_300_gscl = { | ||
| 611 | .clk = { | ||
| 612 | .name = "aclk_300_gscl", | ||
| 613 | }, | ||
| 614 | .sources = &exynos5_clk_src_gscl_300, | ||
| 615 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP3, .shift = 10, .size = 1 }, | ||
| 616 | }; | ||
| 617 | |||
| 618 | static struct clk exynos5_init_clocks_off[] = { | ||
| 619 | { | ||
| 620 | .name = "timers", | ||
| 621 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 622 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 623 | .ctrlbit = (1 << 24), | ||
| 624 | }, { | ||
| 625 | .name = "tmu_apbif", | ||
| 626 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 627 | .enable = exynos5_clk_ip_peris_ctrl, | ||
| 628 | .ctrlbit = (1 << 21), | ||
| 629 | }, { | ||
| 630 | .name = "rtc", | ||
| 631 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 632 | .enable = exynos5_clk_ip_peris_ctrl, | ||
| 633 | .ctrlbit = (1 << 20), | ||
| 634 | }, { | ||
| 635 | .name = "watchdog", | ||
| 636 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 637 | .enable = exynos5_clk_ip_peris_ctrl, | ||
| 638 | .ctrlbit = (1 << 19), | ||
| 639 | }, { | ||
| 640 | .name = "biu", /* bus interface unit clock */ | ||
| 641 | .devname = "dw_mmc.0", | ||
| 642 | .parent = &exynos5_clk_aclk_200.clk, | ||
| 643 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
| 644 | .ctrlbit = (1 << 12), | ||
| 645 | }, { | ||
| 646 | .name = "biu", | ||
| 647 | .devname = "dw_mmc.1", | ||
| 648 | .parent = &exynos5_clk_aclk_200.clk, | ||
| 649 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
| 650 | .ctrlbit = (1 << 13), | ||
| 651 | }, { | ||
| 652 | .name = "biu", | ||
| 653 | .devname = "dw_mmc.2", | ||
| 654 | .parent = &exynos5_clk_aclk_200.clk, | ||
| 655 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
| 656 | .ctrlbit = (1 << 14), | ||
| 657 | }, { | ||
| 658 | .name = "biu", | ||
| 659 | .devname = "dw_mmc.3", | ||
| 660 | .parent = &exynos5_clk_aclk_200.clk, | ||
| 661 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
| 662 | .ctrlbit = (1 << 15), | ||
| 663 | }, { | ||
| 664 | .name = "sata", | ||
| 665 | .devname = "exynos5-sata", | ||
| 666 | .parent = &exynos5_clk_aclk_200.clk, | ||
| 667 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
| 668 | .ctrlbit = (1 << 6), | ||
| 669 | }, { | ||
| 670 | .name = "sata-phy", | ||
| 671 | .devname = "exynos5-sata-phy", | ||
| 672 | .parent = &exynos5_clk_aclk_200.clk, | ||
| 673 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
| 674 | .ctrlbit = (1 << 24), | ||
| 675 | }, { | ||
| 676 | .name = "i2c", | ||
| 677 | .devname = "exynos5-sata-phy-i2c", | ||
| 678 | .parent = &exynos5_clk_aclk_200.clk, | ||
| 679 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
| 680 | .ctrlbit = (1 << 25), | ||
| 681 | }, { | ||
| 682 | .name = "mfc", | ||
| 683 | .devname = "s5p-mfc-v6", | ||
| 684 | .enable = exynos5_clk_ip_mfc_ctrl, | ||
| 685 | .ctrlbit = (1 << 0), | ||
| 686 | }, { | ||
| 687 | .name = "hdmi", | ||
| 688 | .devname = "exynos5-hdmi", | ||
| 689 | .enable = exynos5_clk_ip_disp1_ctrl, | ||
| 690 | .ctrlbit = (1 << 6), | ||
| 691 | }, { | ||
| 692 | .name = "hdmiphy", | ||
| 693 | .devname = "exynos5-hdmi", | ||
| 694 | .enable = exynos5_clk_hdmiphy_ctrl, | ||
| 695 | .ctrlbit = (1 << 0), | ||
| 696 | }, { | ||
| 697 | .name = "mixer", | ||
| 698 | .devname = "exynos5-mixer", | ||
| 699 | .enable = exynos5_clk_ip_disp1_ctrl, | ||
| 700 | .ctrlbit = (1 << 5), | ||
| 701 | }, { | ||
| 702 | .name = "dp", | ||
| 703 | .devname = "exynos-dp", | ||
| 704 | .enable = exynos5_clk_ip_disp1_ctrl, | ||
| 705 | .ctrlbit = (1 << 4), | ||
| 706 | }, { | ||
| 707 | .name = "jpeg", | ||
| 708 | .enable = exynos5_clk_ip_gen_ctrl, | ||
| 709 | .ctrlbit = (1 << 2), | ||
| 710 | }, { | ||
| 711 | .name = "dsim0", | ||
| 712 | .enable = exynos5_clk_ip_disp1_ctrl, | ||
| 713 | .ctrlbit = (1 << 3), | ||
| 714 | }, { | ||
| 715 | .name = "iis", | ||
| 716 | .devname = "samsung-i2s.1", | ||
| 717 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 718 | .ctrlbit = (1 << 20), | ||
| 719 | }, { | ||
| 720 | .name = "iis", | ||
| 721 | .devname = "samsung-i2s.2", | ||
| 722 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 723 | .ctrlbit = (1 << 21), | ||
| 724 | }, { | ||
| 725 | .name = "pcm", | ||
| 726 | .devname = "samsung-pcm.1", | ||
| 727 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 728 | .ctrlbit = (1 << 22), | ||
| 729 | }, { | ||
| 730 | .name = "pcm", | ||
| 731 | .devname = "samsung-pcm.2", | ||
| 732 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 733 | .ctrlbit = (1 << 23), | ||
| 734 | }, { | ||
| 735 | .name = "spdif", | ||
| 736 | .devname = "samsung-spdif", | ||
| 737 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 738 | .ctrlbit = (1 << 26), | ||
| 739 | }, { | ||
| 740 | .name = "ac97", | ||
| 741 | .devname = "samsung-ac97", | ||
| 742 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 743 | .ctrlbit = (1 << 27), | ||
| 744 | }, { | ||
| 745 | .name = "usbhost", | ||
| 746 | .enable = exynos5_clk_ip_fsys_ctrl , | ||
| 747 | .ctrlbit = (1 << 18), | ||
| 748 | }, { | ||
| 749 | .name = "usbotg", | ||
| 750 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
| 751 | .ctrlbit = (1 << 7), | ||
| 752 | }, { | ||
| 753 | .name = "nfcon", | ||
| 754 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
| 755 | .ctrlbit = (1 << 22), | ||
| 756 | }, { | ||
| 757 | .name = "iop", | ||
| 758 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
| 759 | .ctrlbit = ((1 << 30) | (1 << 26) | (1 << 23)), | ||
| 760 | }, { | ||
| 761 | .name = "core_iop", | ||
| 762 | .enable = exynos5_clk_ip_core_ctrl, | ||
| 763 | .ctrlbit = ((1 << 21) | (1 << 3)), | ||
| 764 | }, { | ||
| 765 | .name = "mcu_iop", | ||
| 766 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
| 767 | .ctrlbit = (1 << 0), | ||
| 768 | }, { | ||
| 769 | .name = "i2c", | ||
| 770 | .devname = "s3c2440-i2c.0", | ||
| 771 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 772 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 773 | .ctrlbit = (1 << 6), | ||
| 774 | }, { | ||
| 775 | .name = "i2c", | ||
| 776 | .devname = "s3c2440-i2c.1", | ||
| 777 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 778 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 779 | .ctrlbit = (1 << 7), | ||
| 780 | }, { | ||
| 781 | .name = "i2c", | ||
| 782 | .devname = "s3c2440-i2c.2", | ||
| 783 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 784 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 785 | .ctrlbit = (1 << 8), | ||
| 786 | }, { | ||
| 787 | .name = "i2c", | ||
| 788 | .devname = "s3c2440-i2c.3", | ||
| 789 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 790 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 791 | .ctrlbit = (1 << 9), | ||
| 792 | }, { | ||
| 793 | .name = "i2c", | ||
| 794 | .devname = "s3c2440-i2c.4", | ||
| 795 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 796 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 797 | .ctrlbit = (1 << 10), | ||
| 798 | }, { | ||
| 799 | .name = "i2c", | ||
| 800 | .devname = "s3c2440-i2c.5", | ||
| 801 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 802 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 803 | .ctrlbit = (1 << 11), | ||
| 804 | }, { | ||
| 805 | .name = "i2c", | ||
| 806 | .devname = "s3c2440-i2c.6", | ||
| 807 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 808 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 809 | .ctrlbit = (1 << 12), | ||
| 810 | }, { | ||
| 811 | .name = "i2c", | ||
| 812 | .devname = "s3c2440-i2c.7", | ||
| 813 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 814 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 815 | .ctrlbit = (1 << 13), | ||
| 816 | }, { | ||
| 817 | .name = "i2c", | ||
| 818 | .devname = "s3c2440-hdmiphy-i2c", | ||
| 819 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 820 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 821 | .ctrlbit = (1 << 14), | ||
| 822 | }, { | ||
| 823 | .name = "spi", | ||
| 824 | .devname = "exynos4210-spi.0", | ||
| 825 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 826 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 827 | .ctrlbit = (1 << 16), | ||
| 828 | }, { | ||
| 829 | .name = "spi", | ||
| 830 | .devname = "exynos4210-spi.1", | ||
| 831 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 832 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 833 | .ctrlbit = (1 << 17), | ||
| 834 | }, { | ||
| 835 | .name = "spi", | ||
| 836 | .devname = "exynos4210-spi.2", | ||
| 837 | .parent = &exynos5_clk_aclk_66.clk, | ||
| 838 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 839 | .ctrlbit = (1 << 18), | ||
| 840 | }, { | ||
| 841 | .name = "gscl", | ||
| 842 | .devname = "exynos-gsc.0", | ||
| 843 | .enable = exynos5_clk_ip_gscl_ctrl, | ||
| 844 | .ctrlbit = (1 << 0), | ||
| 845 | }, { | ||
| 846 | .name = "gscl", | ||
| 847 | .devname = "exynos-gsc.1", | ||
| 848 | .enable = exynos5_clk_ip_gscl_ctrl, | ||
| 849 | .ctrlbit = (1 << 1), | ||
| 850 | }, { | ||
| 851 | .name = "gscl", | ||
| 852 | .devname = "exynos-gsc.2", | ||
| 853 | .enable = exynos5_clk_ip_gscl_ctrl, | ||
| 854 | .ctrlbit = (1 << 2), | ||
| 855 | }, { | ||
| 856 | .name = "gscl", | ||
| 857 | .devname = "exynos-gsc.3", | ||
| 858 | .enable = exynos5_clk_ip_gscl_ctrl, | ||
| 859 | .ctrlbit = (1 << 3), | ||
| 860 | }, { | ||
| 861 | .name = "sysmmu", | ||
| 862 | .devname = "exynos-sysmmu.1", | ||
| 863 | .enable = &exynos5_clk_ip_mfc_ctrl, | ||
| 864 | .ctrlbit = (1 << 1), | ||
| 865 | }, { | ||
| 866 | .name = "sysmmu", | ||
| 867 | .devname = "exynos-sysmmu.0", | ||
| 868 | .enable = &exynos5_clk_ip_mfc_ctrl, | ||
| 869 | .ctrlbit = (1 << 2), | ||
| 870 | }, { | ||
| 871 | .name = "sysmmu", | ||
| 872 | .devname = "exynos-sysmmu.2", | ||
| 873 | .enable = &exynos5_clk_ip_disp1_ctrl, | ||
| 874 | .ctrlbit = (1 << 9) | ||
| 875 | }, { | ||
| 876 | .name = "sysmmu", | ||
| 877 | .devname = "exynos-sysmmu.3", | ||
| 878 | .enable = &exynos5_clk_ip_gen_ctrl, | ||
| 879 | .ctrlbit = (1 << 7), | ||
| 880 | }, { | ||
| 881 | .name = "sysmmu", | ||
| 882 | .devname = "exynos-sysmmu.4", | ||
| 883 | .enable = &exynos5_clk_ip_gen_ctrl, | ||
| 884 | .ctrlbit = (1 << 6) | ||
| 885 | }, { | ||
| 886 | .name = "sysmmu", | ||
| 887 | .devname = "exynos-sysmmu.5", | ||
| 888 | .enable = &exynos5_clk_ip_gscl_ctrl, | ||
| 889 | .ctrlbit = (1 << 7), | ||
| 890 | }, { | ||
| 891 | .name = "sysmmu", | ||
| 892 | .devname = "exynos-sysmmu.6", | ||
| 893 | .enable = &exynos5_clk_ip_gscl_ctrl, | ||
| 894 | .ctrlbit = (1 << 8), | ||
| 895 | }, { | ||
| 896 | .name = "sysmmu", | ||
| 897 | .devname = "exynos-sysmmu.7", | ||
| 898 | .enable = &exynos5_clk_ip_gscl_ctrl, | ||
| 899 | .ctrlbit = (1 << 9), | ||
| 900 | }, { | ||
| 901 | .name = "sysmmu", | ||
| 902 | .devname = "exynos-sysmmu.8", | ||
| 903 | .enable = &exynos5_clk_ip_gscl_ctrl, | ||
| 904 | .ctrlbit = (1 << 10), | ||
| 905 | }, { | ||
| 906 | .name = "sysmmu", | ||
| 907 | .devname = "exynos-sysmmu.9", | ||
| 908 | .enable = &exynos5_clk_ip_isp0_ctrl, | ||
| 909 | .ctrlbit = (0x3F << 8), | ||
| 910 | }, { | ||
| 911 | .name = "sysmmu", | ||
| 912 | .devname = "exynos-sysmmu.10", | ||
| 913 | .enable = &exynos5_clk_ip_isp1_ctrl, | ||
| 914 | .ctrlbit = (0xF << 4), | ||
| 915 | }, { | ||
| 916 | .name = "sysmmu", | ||
| 917 | .devname = "exynos-sysmmu.11", | ||
| 918 | .enable = &exynos5_clk_ip_disp1_ctrl, | ||
| 919 | .ctrlbit = (1 << 8) | ||
| 920 | }, { | ||
| 921 | .name = "sysmmu", | ||
| 922 | .devname = "exynos-sysmmu.12", | ||
| 923 | .enable = &exynos5_clk_ip_gscl_ctrl, | ||
| 924 | .ctrlbit = (1 << 11), | ||
| 925 | }, { | ||
| 926 | .name = "sysmmu", | ||
| 927 | .devname = "exynos-sysmmu.13", | ||
| 928 | .enable = &exynos5_clk_ip_gscl_ctrl, | ||
| 929 | .ctrlbit = (1 << 12), | ||
| 930 | }, { | ||
| 931 | .name = "sysmmu", | ||
| 932 | .devname = "exynos-sysmmu.14", | ||
| 933 | .enable = &exynos5_clk_ip_acp_ctrl, | ||
| 934 | .ctrlbit = (1 << 7) | ||
| 935 | } | ||
| 936 | }; | ||
| 937 | |||
| 938 | static struct clk exynos5_init_clocks_on[] = { | ||
| 939 | { | ||
| 940 | .name = "uart", | ||
| 941 | .devname = "s5pv210-uart.0", | ||
| 942 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 943 | .ctrlbit = (1 << 0), | ||
| 944 | }, { | ||
| 945 | .name = "uart", | ||
| 946 | .devname = "s5pv210-uart.1", | ||
| 947 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 948 | .ctrlbit = (1 << 1), | ||
| 949 | }, { | ||
| 950 | .name = "uart", | ||
| 951 | .devname = "s5pv210-uart.2", | ||
| 952 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 953 | .ctrlbit = (1 << 2), | ||
| 954 | }, { | ||
| 955 | .name = "uart", | ||
| 956 | .devname = "s5pv210-uart.3", | ||
| 957 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 958 | .ctrlbit = (1 << 3), | ||
| 959 | }, { | ||
| 960 | .name = "uart", | ||
| 961 | .devname = "s5pv210-uart.4", | ||
| 962 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 963 | .ctrlbit = (1 << 4), | ||
| 964 | }, { | ||
| 965 | .name = "uart", | ||
| 966 | .devname = "s5pv210-uart.5", | ||
| 967 | .enable = exynos5_clk_ip_peric_ctrl, | ||
| 968 | .ctrlbit = (1 << 5), | ||
| 969 | } | ||
| 970 | }; | ||
| 971 | |||
| 972 | static struct clk exynos5_clk_pdma0 = { | ||
| 973 | .name = "dma", | ||
| 974 | .devname = "dma-pl330.0", | ||
| 975 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
| 976 | .ctrlbit = (1 << 1), | ||
| 977 | }; | ||
| 978 | |||
| 979 | static struct clk exynos5_clk_pdma1 = { | ||
| 980 | .name = "dma", | ||
| 981 | .devname = "dma-pl330.1", | ||
| 982 | .enable = exynos5_clk_ip_fsys_ctrl, | ||
| 983 | .ctrlbit = (1 << 2), | ||
| 984 | }; | ||
| 985 | |||
| 986 | static struct clk exynos5_clk_mdma1 = { | ||
| 987 | .name = "dma", | ||
| 988 | .devname = "dma-pl330.2", | ||
| 989 | .enable = exynos5_clk_ip_gen_ctrl, | ||
| 990 | .ctrlbit = (1 << 4), | ||
| 991 | }; | ||
| 992 | |||
| 993 | static struct clk exynos5_clk_fimd1 = { | ||
| 994 | .name = "fimd", | ||
| 995 | .devname = "exynos5-fb.1", | ||
| 996 | .enable = exynos5_clk_ip_disp1_ctrl, | ||
| 997 | .ctrlbit = (1 << 0), | ||
| 998 | }; | ||
| 999 | |||
| 1000 | static struct clk *exynos5_clkset_group_list[] = { | ||
| 1001 | [0] = &clk_ext_xtal_mux, | ||
| 1002 | [1] = NULL, | ||
| 1003 | [2] = &exynos5_clk_sclk_hdmi24m, | ||
| 1004 | [3] = &exynos5_clk_sclk_dptxphy, | ||
| 1005 | [4] = &exynos5_clk_sclk_usbphy, | ||
| 1006 | [5] = &exynos5_clk_sclk_hdmiphy, | ||
| 1007 | [6] = &exynos5_clk_mout_mpll_user.clk, | ||
| 1008 | [7] = &exynos5_clk_mout_epll.clk, | ||
| 1009 | [8] = &exynos5_clk_sclk_vpll.clk, | ||
| 1010 | [9] = &exynos5_clk_mout_cpll.clk, | ||
| 1011 | }; | ||
| 1012 | |||
| 1013 | static struct clksrc_sources exynos5_clkset_group = { | ||
| 1014 | .sources = exynos5_clkset_group_list, | ||
| 1015 | .nr_sources = ARRAY_SIZE(exynos5_clkset_group_list), | ||
| 1016 | }; | ||
| 1017 | |||
| 1018 | /* Possible clock sources for aclk_266_gscl_sub Mux */ | ||
| 1019 | static struct clk *clk_src_gscl_266_list[] = { | ||
| 1020 | [0] = &clk_ext_xtal_mux, | ||
| 1021 | [1] = &exynos5_clk_aclk_266.clk, | ||
| 1022 | }; | ||
| 1023 | |||
| 1024 | static struct clksrc_sources clk_src_gscl_266 = { | ||
| 1025 | .sources = clk_src_gscl_266_list, | ||
| 1026 | .nr_sources = ARRAY_SIZE(clk_src_gscl_266_list), | ||
| 1027 | }; | ||
| 1028 | |||
| 1029 | static struct clksrc_clk exynos5_clk_dout_mmc0 = { | ||
| 1030 | .clk = { | ||
| 1031 | .name = "dout_mmc0", | ||
| 1032 | }, | ||
| 1033 | .sources = &exynos5_clkset_group, | ||
| 1034 | .reg_src = { .reg = EXYNOS5_CLKSRC_FSYS, .shift = 0, .size = 4 }, | ||
| 1035 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS1, .shift = 0, .size = 4 }, | ||
| 1036 | }; | ||
| 1037 | |||
| 1038 | static struct clksrc_clk exynos5_clk_dout_mmc1 = { | ||
| 1039 | .clk = { | ||
| 1040 | .name = "dout_mmc1", | ||
| 1041 | }, | ||
| 1042 | .sources = &exynos5_clkset_group, | ||
| 1043 | .reg_src = { .reg = EXYNOS5_CLKSRC_FSYS, .shift = 4, .size = 4 }, | ||
| 1044 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS1, .shift = 16, .size = 4 }, | ||
| 1045 | }; | ||
| 1046 | |||
| 1047 | static struct clksrc_clk exynos5_clk_dout_mmc2 = { | ||
| 1048 | .clk = { | ||
| 1049 | .name = "dout_mmc2", | ||
| 1050 | }, | ||
| 1051 | .sources = &exynos5_clkset_group, | ||
| 1052 | .reg_src = { .reg = EXYNOS5_CLKSRC_FSYS, .shift = 8, .size = 4 }, | ||
| 1053 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS2, .shift = 0, .size = 4 }, | ||
| 1054 | }; | ||
| 1055 | |||
| 1056 | static struct clksrc_clk exynos5_clk_dout_mmc3 = { | ||
| 1057 | .clk = { | ||
| 1058 | .name = "dout_mmc3", | ||
| 1059 | }, | ||
| 1060 | .sources = &exynos5_clkset_group, | ||
| 1061 | .reg_src = { .reg = EXYNOS5_CLKSRC_FSYS, .shift = 12, .size = 4 }, | ||
| 1062 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS2, .shift = 16, .size = 4 }, | ||
| 1063 | }; | ||
| 1064 | |||
| 1065 | static struct clksrc_clk exynos5_clk_dout_mmc4 = { | ||
| 1066 | .clk = { | ||
| 1067 | .name = "dout_mmc4", | ||
| 1068 | }, | ||
| 1069 | .sources = &exynos5_clkset_group, | ||
| 1070 | .reg_src = { .reg = EXYNOS5_CLKSRC_FSYS, .shift = 16, .size = 4 }, | ||
| 1071 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS3, .shift = 0, .size = 4 }, | ||
| 1072 | }; | ||
| 1073 | |||
| 1074 | static struct clksrc_clk exynos5_clk_sclk_uart0 = { | ||
| 1075 | .clk = { | ||
| 1076 | .name = "uclk1", | ||
| 1077 | .devname = "exynos4210-uart.0", | ||
| 1078 | .enable = exynos5_clksrc_mask_peric0_ctrl, | ||
| 1079 | .ctrlbit = (1 << 0), | ||
| 1080 | }, | ||
| 1081 | .sources = &exynos5_clkset_group, | ||
| 1082 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC0, .shift = 0, .size = 4 }, | ||
| 1083 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC0, .shift = 0, .size = 4 }, | ||
| 1084 | }; | ||
| 1085 | |||
| 1086 | static struct clksrc_clk exynos5_clk_sclk_uart1 = { | ||
| 1087 | .clk = { | ||
| 1088 | .name = "uclk1", | ||
| 1089 | .devname = "exynos4210-uart.1", | ||
| 1090 | .enable = exynos5_clksrc_mask_peric0_ctrl, | ||
| 1091 | .ctrlbit = (1 << 4), | ||
| 1092 | }, | ||
| 1093 | .sources = &exynos5_clkset_group, | ||
| 1094 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC0, .shift = 4, .size = 4 }, | ||
| 1095 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC0, .shift = 4, .size = 4 }, | ||
| 1096 | }; | ||
| 1097 | |||
| 1098 | static struct clksrc_clk exynos5_clk_sclk_uart2 = { | ||
| 1099 | .clk = { | ||
| 1100 | .name = "uclk1", | ||
| 1101 | .devname = "exynos4210-uart.2", | ||
| 1102 | .enable = exynos5_clksrc_mask_peric0_ctrl, | ||
| 1103 | .ctrlbit = (1 << 8), | ||
| 1104 | }, | ||
| 1105 | .sources = &exynos5_clkset_group, | ||
| 1106 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC0, .shift = 8, .size = 4 }, | ||
| 1107 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC0, .shift = 8, .size = 4 }, | ||
| 1108 | }; | ||
| 1109 | |||
| 1110 | static struct clksrc_clk exynos5_clk_sclk_uart3 = { | ||
| 1111 | .clk = { | ||
| 1112 | .name = "uclk1", | ||
| 1113 | .devname = "exynos4210-uart.3", | ||
| 1114 | .enable = exynos5_clksrc_mask_peric0_ctrl, | ||
| 1115 | .ctrlbit = (1 << 12), | ||
| 1116 | }, | ||
| 1117 | .sources = &exynos5_clkset_group, | ||
| 1118 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC0, .shift = 12, .size = 4 }, | ||
| 1119 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC0, .shift = 12, .size = 4 }, | ||
| 1120 | }; | ||
| 1121 | |||
| 1122 | static struct clksrc_clk exynos5_clk_sclk_mmc0 = { | ||
| 1123 | .clk = { | ||
| 1124 | .name = "ciu", /* card interface unit clock */ | ||
| 1125 | .devname = "dw_mmc.0", | ||
| 1126 | .parent = &exynos5_clk_dout_mmc0.clk, | ||
| 1127 | .enable = exynos5_clksrc_mask_fsys_ctrl, | ||
| 1128 | .ctrlbit = (1 << 0), | ||
| 1129 | }, | ||
| 1130 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS1, .shift = 8, .size = 8 }, | ||
| 1131 | }; | ||
| 1132 | |||
| 1133 | static struct clksrc_clk exynos5_clk_sclk_mmc1 = { | ||
| 1134 | .clk = { | ||
| 1135 | .name = "ciu", | ||
| 1136 | .devname = "dw_mmc.1", | ||
| 1137 | .parent = &exynos5_clk_dout_mmc1.clk, | ||
| 1138 | .enable = exynos5_clksrc_mask_fsys_ctrl, | ||
| 1139 | .ctrlbit = (1 << 4), | ||
| 1140 | }, | ||
| 1141 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS1, .shift = 24, .size = 8 }, | ||
| 1142 | }; | ||
| 1143 | |||
| 1144 | static struct clksrc_clk exynos5_clk_sclk_mmc2 = { | ||
| 1145 | .clk = { | ||
| 1146 | .name = "ciu", | ||
| 1147 | .devname = "dw_mmc.2", | ||
| 1148 | .parent = &exynos5_clk_dout_mmc2.clk, | ||
| 1149 | .enable = exynos5_clksrc_mask_fsys_ctrl, | ||
| 1150 | .ctrlbit = (1 << 8), | ||
| 1151 | }, | ||
| 1152 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS2, .shift = 8, .size = 8 }, | ||
| 1153 | }; | ||
| 1154 | |||
| 1155 | static struct clksrc_clk exynos5_clk_sclk_mmc3 = { | ||
| 1156 | .clk = { | ||
| 1157 | .name = "ciu", | ||
| 1158 | .devname = "dw_mmc.3", | ||
| 1159 | .parent = &exynos5_clk_dout_mmc3.clk, | ||
| 1160 | .enable = exynos5_clksrc_mask_fsys_ctrl, | ||
| 1161 | .ctrlbit = (1 << 12), | ||
| 1162 | }, | ||
| 1163 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS2, .shift = 24, .size = 8 }, | ||
| 1164 | }; | ||
| 1165 | |||
| 1166 | static struct clksrc_clk exynos5_clk_mdout_spi0 = { | ||
| 1167 | .clk = { | ||
| 1168 | .name = "mdout_spi", | ||
| 1169 | .devname = "exynos4210-spi.0", | ||
| 1170 | }, | ||
| 1171 | .sources = &exynos5_clkset_group, | ||
| 1172 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC1, .shift = 16, .size = 4 }, | ||
| 1173 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC1, .shift = 0, .size = 4 }, | ||
| 1174 | }; | ||
| 1175 | |||
| 1176 | static struct clksrc_clk exynos5_clk_mdout_spi1 = { | ||
| 1177 | .clk = { | ||
| 1178 | .name = "mdout_spi", | ||
| 1179 | .devname = "exynos4210-spi.1", | ||
| 1180 | }, | ||
| 1181 | .sources = &exynos5_clkset_group, | ||
| 1182 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC1, .shift = 20, .size = 4 }, | ||
| 1183 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC1, .shift = 16, .size = 4 }, | ||
| 1184 | }; | ||
| 1185 | |||
| 1186 | static struct clksrc_clk exynos5_clk_mdout_spi2 = { | ||
| 1187 | .clk = { | ||
| 1188 | .name = "mdout_spi", | ||
| 1189 | .devname = "exynos4210-spi.2", | ||
| 1190 | }, | ||
| 1191 | .sources = &exynos5_clkset_group, | ||
| 1192 | .reg_src = { .reg = EXYNOS5_CLKSRC_PERIC1, .shift = 24, .size = 4 }, | ||
| 1193 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC2, .shift = 0, .size = 4 }, | ||
| 1194 | }; | ||
| 1195 | |||
| 1196 | static struct clksrc_clk exynos5_clk_sclk_spi0 = { | ||
| 1197 | .clk = { | ||
| 1198 | .name = "sclk_spi", | ||
| 1199 | .devname = "exynos4210-spi.0", | ||
| 1200 | .parent = &exynos5_clk_mdout_spi0.clk, | ||
| 1201 | .enable = exynos5_clksrc_mask_peric1_ctrl, | ||
| 1202 | .ctrlbit = (1 << 16), | ||
| 1203 | }, | ||
| 1204 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC1, .shift = 8, .size = 8 }, | ||
| 1205 | }; | ||
| 1206 | |||
| 1207 | static struct clksrc_clk exynos5_clk_sclk_spi1 = { | ||
| 1208 | .clk = { | ||
| 1209 | .name = "sclk_spi", | ||
| 1210 | .devname = "exynos4210-spi.1", | ||
| 1211 | .parent = &exynos5_clk_mdout_spi1.clk, | ||
| 1212 | .enable = exynos5_clksrc_mask_peric1_ctrl, | ||
| 1213 | .ctrlbit = (1 << 20), | ||
| 1214 | }, | ||
| 1215 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC1, .shift = 24, .size = 8 }, | ||
| 1216 | }; | ||
| 1217 | |||
| 1218 | static struct clksrc_clk exynos5_clk_sclk_spi2 = { | ||
| 1219 | .clk = { | ||
| 1220 | .name = "sclk_spi", | ||
| 1221 | .devname = "exynos4210-spi.2", | ||
| 1222 | .parent = &exynos5_clk_mdout_spi2.clk, | ||
| 1223 | .enable = exynos5_clksrc_mask_peric1_ctrl, | ||
| 1224 | .ctrlbit = (1 << 24), | ||
| 1225 | }, | ||
| 1226 | .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC2, .shift = 8, .size = 8 }, | ||
| 1227 | }; | ||
| 1228 | |||
| 1229 | static struct clksrc_clk exynos5_clk_sclk_fimd1 = { | ||
| 1230 | .clk = { | ||
| 1231 | .name = "sclk_fimd", | ||
| 1232 | .devname = "exynos5-fb.1", | ||
| 1233 | .enable = exynos5_clksrc_mask_disp1_0_ctrl, | ||
| 1234 | .ctrlbit = (1 << 0), | ||
| 1235 | }, | ||
| 1236 | .sources = &exynos5_clkset_group, | ||
| 1237 | .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 0, .size = 4 }, | ||
| 1238 | .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 0, .size = 4 }, | ||
| 1239 | }; | ||
| 1240 | |||
| 1241 | static struct clksrc_clk exynos5_clksrcs[] = { | ||
| 1242 | { | ||
| 1243 | .clk = { | ||
| 1244 | .name = "aclk_266_gscl", | ||
| 1245 | }, | ||
| 1246 | .sources = &clk_src_gscl_266, | ||
| 1247 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP3, .shift = 8, .size = 1 }, | ||
| 1248 | }, { | ||
| 1249 | .clk = { | ||
| 1250 | .name = "sclk_g3d", | ||
| 1251 | .devname = "mali-t604.0", | ||
| 1252 | .enable = exynos5_clk_block_ctrl, | ||
| 1253 | .ctrlbit = (1 << 1), | ||
| 1254 | }, | ||
| 1255 | .sources = &exynos5_clkset_aclk, | ||
| 1256 | .reg_src = { .reg = EXYNOS5_CLKSRC_TOP0, .shift = 20, .size = 1 }, | ||
| 1257 | .reg_div = { .reg = EXYNOS5_CLKDIV_TOP0, .shift = 24, .size = 3 }, | ||
| 1258 | }, { | ||
| 1259 | .clk = { | ||
| 1260 | .name = "sclk_sata", | ||
| 1261 | .devname = "exynos5-sata", | ||
| 1262 | .enable = exynos5_clksrc_mask_fsys_ctrl, | ||
| 1263 | .ctrlbit = (1 << 24), | ||
| 1264 | }, | ||
| 1265 | .sources = &exynos5_clkset_aclk, | ||
| 1266 | .reg_src = { .reg = EXYNOS5_CLKSRC_FSYS, .shift = 24, .size = 1 }, | ||
| 1267 | .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS0, .shift = 20, .size = 4 }, | ||
| 1268 | }, { | ||
| 1269 | .clk = { | ||
| 1270 | .name = "sclk_gscl_wrap", | ||
| 1271 | .devname = "s5p-mipi-csis.0", | ||
| 1272 | .enable = exynos5_clksrc_mask_gscl_ctrl, | ||
| 1273 | .ctrlbit = (1 << 24), | ||
| 1274 | }, | ||
| 1275 | .sources = &exynos5_clkset_group, | ||
| 1276 | .reg_src = { .reg = EXYNOS5_CLKSRC_GSCL, .shift = 24, .size = 4 }, | ||
| 1277 | .reg_div = { .reg = EXYNOS5_CLKDIV_GSCL, .shift = 24, .size = 4 }, | ||
| 1278 | }, { | ||
| 1279 | .clk = { | ||
| 1280 | .name = "sclk_gscl_wrap", | ||
| 1281 | .devname = "s5p-mipi-csis.1", | ||
| 1282 | .enable = exynos5_clksrc_mask_gscl_ctrl, | ||
| 1283 | .ctrlbit = (1 << 28), | ||
| 1284 | }, | ||
| 1285 | .sources = &exynos5_clkset_group, | ||
| 1286 | .reg_src = { .reg = EXYNOS5_CLKSRC_GSCL, .shift = 28, .size = 4 }, | ||
| 1287 | .reg_div = { .reg = EXYNOS5_CLKDIV_GSCL, .shift = 28, .size = 4 }, | ||
| 1288 | }, { | ||
| 1289 | .clk = { | ||
| 1290 | .name = "sclk_cam0", | ||
| 1291 | .enable = exynos5_clksrc_mask_gscl_ctrl, | ||
| 1292 | .ctrlbit = (1 << 16), | ||
| 1293 | }, | ||
| 1294 | .sources = &exynos5_clkset_group, | ||
| 1295 | .reg_src = { .reg = EXYNOS5_CLKSRC_GSCL, .shift = 16, .size = 4 }, | ||
| 1296 | .reg_div = { .reg = EXYNOS5_CLKDIV_GSCL, .shift = 16, .size = 4 }, | ||
| 1297 | }, { | ||
| 1298 | .clk = { | ||
| 1299 | .name = "sclk_cam1", | ||
| 1300 | .enable = exynos5_clksrc_mask_gscl_ctrl, | ||
| 1301 | .ctrlbit = (1 << 20), | ||
| 1302 | }, | ||
| 1303 | .sources = &exynos5_clkset_group, | ||
| 1304 | .reg_src = { .reg = EXYNOS5_CLKSRC_GSCL, .shift = 20, .size = 4 }, | ||
| 1305 | .reg_div = { .reg = EXYNOS5_CLKDIV_GSCL, .shift = 20, .size = 4 }, | ||
| 1306 | }, { | ||
| 1307 | .clk = { | ||
| 1308 | .name = "sclk_jpeg", | ||
| 1309 | .parent = &exynos5_clk_mout_cpll.clk, | ||
| 1310 | }, | ||
| 1311 | .reg_div = { .reg = EXYNOS5_CLKDIV_GEN, .shift = 4, .size = 3 }, | ||
| 1312 | }, | ||
| 1313 | }; | ||
| 1314 | |||
| 1315 | /* Clock initialization code */ | ||
| 1316 | static struct clksrc_clk *exynos5_sysclks[] = { | ||
| 1317 | &exynos5_clk_mout_apll, | ||
| 1318 | &exynos5_clk_sclk_apll, | ||
| 1319 | &exynos5_clk_mout_bpll, | ||
| 1320 | &exynos5_clk_mout_bpll_fout, | ||
| 1321 | &exynos5_clk_mout_bpll_user, | ||
| 1322 | &exynos5_clk_mout_cpll, | ||
| 1323 | &exynos5_clk_mout_epll, | ||
| 1324 | &exynos5_clk_mout_mpll, | ||
| 1325 | &exynos5_clk_mout_mpll_fout, | ||
| 1326 | &exynos5_clk_mout_mpll_user, | ||
| 1327 | &exynos5_clk_vpllsrc, | ||
| 1328 | &exynos5_clk_sclk_vpll, | ||
| 1329 | &exynos5_clk_mout_cpu, | ||
| 1330 | &exynos5_clk_dout_armclk, | ||
| 1331 | &exynos5_clk_dout_arm2clk, | ||
| 1332 | &exynos5_clk_cdrex, | ||
| 1333 | &exynos5_clk_aclk_400, | ||
| 1334 | &exynos5_clk_aclk_333, | ||
| 1335 | &exynos5_clk_aclk_266, | ||
| 1336 | &exynos5_clk_aclk_200, | ||
| 1337 | &exynos5_clk_aclk_166, | ||
| 1338 | &exynos5_clk_aclk_300_gscl, | ||
| 1339 | &exynos5_clk_mout_aclk_300_gscl, | ||
| 1340 | &exynos5_clk_mout_aclk_300_gscl_mid, | ||
| 1341 | &exynos5_clk_mout_aclk_300_gscl_mid1, | ||
| 1342 | &exynos5_clk_aclk_66_pre, | ||
| 1343 | &exynos5_clk_aclk_66, | ||
| 1344 | &exynos5_clk_dout_mmc0, | ||
| 1345 | &exynos5_clk_dout_mmc1, | ||
| 1346 | &exynos5_clk_dout_mmc2, | ||
| 1347 | &exynos5_clk_dout_mmc3, | ||
| 1348 | &exynos5_clk_dout_mmc4, | ||
| 1349 | &exynos5_clk_aclk_acp, | ||
| 1350 | &exynos5_clk_pclk_acp, | ||
| 1351 | &exynos5_clk_sclk_spi0, | ||
| 1352 | &exynos5_clk_sclk_spi1, | ||
| 1353 | &exynos5_clk_sclk_spi2, | ||
| 1354 | &exynos5_clk_mdout_spi0, | ||
| 1355 | &exynos5_clk_mdout_spi1, | ||
| 1356 | &exynos5_clk_mdout_spi2, | ||
| 1357 | &exynos5_clk_sclk_fimd1, | ||
| 1358 | }; | ||
| 1359 | |||
| 1360 | static struct clk *exynos5_clk_cdev[] = { | ||
| 1361 | &exynos5_clk_pdma0, | ||
| 1362 | &exynos5_clk_pdma1, | ||
| 1363 | &exynos5_clk_mdma1, | ||
| 1364 | &exynos5_clk_fimd1, | ||
| 1365 | }; | ||
| 1366 | |||
| 1367 | static struct clksrc_clk *exynos5_clksrc_cdev[] = { | ||
| 1368 | &exynos5_clk_sclk_uart0, | ||
| 1369 | &exynos5_clk_sclk_uart1, | ||
| 1370 | &exynos5_clk_sclk_uart2, | ||
| 1371 | &exynos5_clk_sclk_uart3, | ||
| 1372 | &exynos5_clk_sclk_mmc0, | ||
| 1373 | &exynos5_clk_sclk_mmc1, | ||
| 1374 | &exynos5_clk_sclk_mmc2, | ||
| 1375 | &exynos5_clk_sclk_mmc3, | ||
| 1376 | }; | ||
| 1377 | |||
| 1378 | static struct clk_lookup exynos5_clk_lookup[] = { | ||
| 1379 | CLKDEV_INIT("exynos4210-uart.0", "clk_uart_baud0", &exynos5_clk_sclk_uart0.clk), | ||
| 1380 | CLKDEV_INIT("exynos4210-uart.1", "clk_uart_baud0", &exynos5_clk_sclk_uart1.clk), | ||
| 1381 | CLKDEV_INIT("exynos4210-uart.2", "clk_uart_baud0", &exynos5_clk_sclk_uart2.clk), | ||
| 1382 | CLKDEV_INIT("exynos4210-uart.3", "clk_uart_baud0", &exynos5_clk_sclk_uart3.clk), | ||
| 1383 | CLKDEV_INIT("exynos4-sdhci.0", "mmc_busclk.2", &exynos5_clk_sclk_mmc0.clk), | ||
| 1384 | CLKDEV_INIT("exynos4-sdhci.1", "mmc_busclk.2", &exynos5_clk_sclk_mmc1.clk), | ||
| 1385 | CLKDEV_INIT("exynos4-sdhci.2", "mmc_busclk.2", &exynos5_clk_sclk_mmc2.clk), | ||
| 1386 | CLKDEV_INIT("exynos4-sdhci.3", "mmc_busclk.2", &exynos5_clk_sclk_mmc3.clk), | ||
| 1387 | CLKDEV_INIT("exynos4210-spi.0", "spi_busclk0", &exynos5_clk_sclk_spi0.clk), | ||
| 1388 | CLKDEV_INIT("exynos4210-spi.1", "spi_busclk0", &exynos5_clk_sclk_spi1.clk), | ||
| 1389 | CLKDEV_INIT("exynos4210-spi.2", "spi_busclk0", &exynos5_clk_sclk_spi2.clk), | ||
| 1390 | CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos5_clk_pdma0), | ||
| 1391 | CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos5_clk_pdma1), | ||
| 1392 | CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos5_clk_mdma1), | ||
| 1393 | CLKDEV_INIT("exynos5-fb.1", "lcd", &exynos5_clk_fimd1), | ||
| 1394 | }; | ||
| 1395 | |||
| 1396 | static unsigned long exynos5_epll_get_rate(struct clk *clk) | ||
| 1397 | { | ||
| 1398 | return clk->rate; | ||
| 1399 | } | ||
| 1400 | |||
| 1401 | static struct clk *exynos5_clks[] __initdata = { | ||
| 1402 | &exynos5_clk_sclk_hdmi27m, | ||
| 1403 | &exynos5_clk_sclk_hdmiphy, | ||
| 1404 | &clk_fout_bpll, | ||
| 1405 | &clk_fout_bpll_div2, | ||
| 1406 | &clk_fout_cpll, | ||
| 1407 | &clk_fout_mpll_div2, | ||
| 1408 | &exynos5_clk_armclk, | ||
| 1409 | }; | ||
| 1410 | |||
| 1411 | static u32 epll_div[][6] = { | ||
| 1412 | { 192000000, 0, 48, 3, 1, 0 }, | ||
| 1413 | { 180000000, 0, 45, 3, 1, 0 }, | ||
| 1414 | { 73728000, 1, 73, 3, 3, 47710 }, | ||
| 1415 | { 67737600, 1, 90, 4, 3, 20762 }, | ||
| 1416 | { 49152000, 0, 49, 3, 3, 9961 }, | ||
| 1417 | { 45158400, 0, 45, 3, 3, 10381 }, | ||
| 1418 | { 180633600, 0, 45, 3, 1, 10381 }, | ||
| 1419 | }; | ||
| 1420 | |||
| 1421 | static int exynos5_epll_set_rate(struct clk *clk, unsigned long rate) | ||
| 1422 | { | ||
| 1423 | unsigned int epll_con, epll_con_k; | ||
| 1424 | unsigned int i; | ||
| 1425 | unsigned int tmp; | ||
| 1426 | unsigned int epll_rate; | ||
| 1427 | unsigned int locktime; | ||
| 1428 | unsigned int lockcnt; | ||
| 1429 | |||
| 1430 | /* Return if nothing changed */ | ||
| 1431 | if (clk->rate == rate) | ||
| 1432 | return 0; | ||
| 1433 | |||
| 1434 | if (clk->parent) | ||
| 1435 | epll_rate = clk_get_rate(clk->parent); | ||
| 1436 | else | ||
| 1437 | epll_rate = clk_ext_xtal_mux.rate; | ||
| 1438 | |||
| 1439 | if (epll_rate != 24000000) { | ||
| 1440 | pr_err("Invalid Clock : recommended clock is 24MHz.\n"); | ||
| 1441 | return -EINVAL; | ||
| 1442 | } | ||
| 1443 | |||
| 1444 | epll_con = __raw_readl(EXYNOS5_EPLL_CON0); | ||
| 1445 | epll_con &= ~(0x1 << 27 | \ | ||
| 1446 | PLL46XX_MDIV_MASK << PLL46XX_MDIV_SHIFT | \ | ||
| 1447 | PLL46XX_PDIV_MASK << PLL46XX_PDIV_SHIFT | \ | ||
| 1448 | PLL46XX_SDIV_MASK << PLL46XX_SDIV_SHIFT); | ||
| 1449 | |||
| 1450 | for (i = 0; i < ARRAY_SIZE(epll_div); i++) { | ||
| 1451 | if (epll_div[i][0] == rate) { | ||
| 1452 | epll_con_k = epll_div[i][5] << 0; | ||
| 1453 | epll_con |= epll_div[i][1] << 27; | ||
| 1454 | epll_con |= epll_div[i][2] << PLL46XX_MDIV_SHIFT; | ||
| 1455 | epll_con |= epll_div[i][3] << PLL46XX_PDIV_SHIFT; | ||
| 1456 | epll_con |= epll_div[i][4] << PLL46XX_SDIV_SHIFT; | ||
| 1457 | break; | ||
| 1458 | } | ||
| 1459 | } | ||
| 1460 | |||
| 1461 | if (i == ARRAY_SIZE(epll_div)) { | ||
| 1462 | printk(KERN_ERR "%s: Invalid Clock EPLL Frequency\n", | ||
| 1463 | __func__); | ||
| 1464 | return -EINVAL; | ||
| 1465 | } | ||
| 1466 | |||
| 1467 | epll_rate /= 1000000; | ||
| 1468 | |||
| 1469 | /* 3000 max_cycls : specification data */ | ||
| 1470 | locktime = 3000 / epll_rate * epll_div[i][3]; | ||
| 1471 | lockcnt = locktime * 10000 / (10000 / epll_rate); | ||
| 1472 | |||
| 1473 | __raw_writel(lockcnt, EXYNOS5_EPLL_LOCK); | ||
| 1474 | |||
| 1475 | __raw_writel(epll_con, EXYNOS5_EPLL_CON0); | ||
| 1476 | __raw_writel(epll_con_k, EXYNOS5_EPLL_CON1); | ||
| 1477 | |||
| 1478 | do { | ||
| 1479 | tmp = __raw_readl(EXYNOS5_EPLL_CON0); | ||
| 1480 | } while (!(tmp & 0x1 << EXYNOS5_EPLLCON0_LOCKED_SHIFT)); | ||
| 1481 | |||
| 1482 | clk->rate = rate; | ||
| 1483 | |||
| 1484 | return 0; | ||
| 1485 | } | ||
| 1486 | |||
| 1487 | static struct clk_ops exynos5_epll_ops = { | ||
| 1488 | .get_rate = exynos5_epll_get_rate, | ||
| 1489 | .set_rate = exynos5_epll_set_rate, | ||
| 1490 | }; | ||
| 1491 | |||
| 1492 | static int xtal_rate; | ||
| 1493 | |||
| 1494 | static unsigned long exynos5_fout_apll_get_rate(struct clk *clk) | ||
| 1495 | { | ||
| 1496 | return s5p_get_pll35xx(xtal_rate, __raw_readl(EXYNOS5_APLL_CON0)); | ||
| 1497 | } | ||
| 1498 | |||
| 1499 | static struct clk_ops exynos5_fout_apll_ops = { | ||
| 1500 | .get_rate = exynos5_fout_apll_get_rate, | ||
| 1501 | }; | ||
| 1502 | |||
| 1503 | #ifdef CONFIG_PM | ||
| 1504 | static int exynos5_clock_suspend(void) | ||
| 1505 | { | ||
| 1506 | s3c_pm_do_save(exynos5_clock_save, ARRAY_SIZE(exynos5_clock_save)); | ||
| 1507 | |||
| 1508 | return 0; | ||
| 1509 | } | ||
| 1510 | |||
| 1511 | static void exynos5_clock_resume(void) | ||
| 1512 | { | ||
| 1513 | s3c_pm_do_restore_core(exynos5_clock_save, ARRAY_SIZE(exynos5_clock_save)); | ||
| 1514 | } | ||
| 1515 | #else | ||
| 1516 | #define exynos5_clock_suspend NULL | ||
| 1517 | #define exynos5_clock_resume NULL | ||
| 1518 | #endif | ||
| 1519 | |||
| 1520 | static struct syscore_ops exynos5_clock_syscore_ops = { | ||
| 1521 | .suspend = exynos5_clock_suspend, | ||
| 1522 | .resume = exynos5_clock_resume, | ||
| 1523 | }; | ||
| 1524 | |||
| 1525 | void __init_or_cpufreq exynos5_setup_clocks(void) | ||
| 1526 | { | ||
| 1527 | struct clk *xtal_clk; | ||
| 1528 | unsigned long apll; | ||
| 1529 | unsigned long bpll; | ||
| 1530 | unsigned long cpll; | ||
| 1531 | unsigned long mpll; | ||
| 1532 | unsigned long epll; | ||
| 1533 | unsigned long vpll; | ||
| 1534 | unsigned long vpllsrc; | ||
| 1535 | unsigned long xtal; | ||
| 1536 | unsigned long armclk; | ||
| 1537 | unsigned long mout_cdrex; | ||
| 1538 | unsigned long aclk_400; | ||
| 1539 | unsigned long aclk_333; | ||
| 1540 | unsigned long aclk_266; | ||
| 1541 | unsigned long aclk_200; | ||
| 1542 | unsigned long aclk_166; | ||
| 1543 | unsigned long aclk_66; | ||
| 1544 | unsigned int ptr; | ||
| 1545 | |||
| 1546 | printk(KERN_DEBUG "%s: registering clocks\n", __func__); | ||
| 1547 | |||
| 1548 | xtal_clk = clk_get(NULL, "xtal"); | ||
| 1549 | BUG_ON(IS_ERR(xtal_clk)); | ||
| 1550 | |||
| 1551 | xtal = clk_get_rate(xtal_clk); | ||
| 1552 | |||
| 1553 | xtal_rate = xtal; | ||
| 1554 | |||
| 1555 | clk_put(xtal_clk); | ||
| 1556 | |||
| 1557 | printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal); | ||
| 1558 | |||
| 1559 | apll = s5p_get_pll35xx(xtal, __raw_readl(EXYNOS5_APLL_CON0)); | ||
| 1560 | bpll = s5p_get_pll35xx(xtal, __raw_readl(EXYNOS5_BPLL_CON0)); | ||
| 1561 | cpll = s5p_get_pll35xx(xtal, __raw_readl(EXYNOS5_CPLL_CON0)); | ||
| 1562 | mpll = s5p_get_pll35xx(xtal, __raw_readl(EXYNOS5_MPLL_CON0)); | ||
| 1563 | epll = s5p_get_pll36xx(xtal, __raw_readl(EXYNOS5_EPLL_CON0), | ||
| 1564 | __raw_readl(EXYNOS5_EPLL_CON1)); | ||
| 1565 | |||
| 1566 | vpllsrc = clk_get_rate(&exynos5_clk_vpllsrc.clk); | ||
| 1567 | vpll = s5p_get_pll36xx(vpllsrc, __raw_readl(EXYNOS5_VPLL_CON0), | ||
| 1568 | __raw_readl(EXYNOS5_VPLL_CON1)); | ||
| 1569 | |||
| 1570 | clk_fout_apll.ops = &exynos5_fout_apll_ops; | ||
| 1571 | clk_fout_bpll.rate = bpll; | ||
| 1572 | clk_fout_bpll_div2.rate = bpll >> 1; | ||
| 1573 | clk_fout_cpll.rate = cpll; | ||
| 1574 | clk_fout_mpll.rate = mpll; | ||
| 1575 | clk_fout_mpll_div2.rate = mpll >> 1; | ||
| 1576 | clk_fout_epll.rate = epll; | ||
| 1577 | clk_fout_vpll.rate = vpll; | ||
| 1578 | |||
| 1579 | printk(KERN_INFO "EXYNOS5: PLL settings, A=%ld, B=%ld, C=%ld\n" | ||
| 1580 | "M=%ld, E=%ld V=%ld", | ||
| 1581 | apll, bpll, cpll, mpll, epll, vpll); | ||
| 1582 | |||
| 1583 | armclk = clk_get_rate(&exynos5_clk_armclk); | ||
| 1584 | mout_cdrex = clk_get_rate(&exynos5_clk_cdrex.clk); | ||
| 1585 | |||
| 1586 | aclk_400 = clk_get_rate(&exynos5_clk_aclk_400.clk); | ||
| 1587 | aclk_333 = clk_get_rate(&exynos5_clk_aclk_333.clk); | ||
| 1588 | aclk_266 = clk_get_rate(&exynos5_clk_aclk_266.clk); | ||
| 1589 | aclk_200 = clk_get_rate(&exynos5_clk_aclk_200.clk); | ||
| 1590 | aclk_166 = clk_get_rate(&exynos5_clk_aclk_166.clk); | ||
| 1591 | aclk_66 = clk_get_rate(&exynos5_clk_aclk_66.clk); | ||
| 1592 | |||
| 1593 | printk(KERN_INFO "EXYNOS5: ARMCLK=%ld, CDREX=%ld, ACLK400=%ld\n" | ||
| 1594 | "ACLK333=%ld, ACLK266=%ld, ACLK200=%ld\n" | ||
| 1595 | "ACLK166=%ld, ACLK66=%ld\n", | ||
| 1596 | armclk, mout_cdrex, aclk_400, | ||
| 1597 | aclk_333, aclk_266, aclk_200, | ||
| 1598 | aclk_166, aclk_66); | ||
| 1599 | |||
| 1600 | |||
| 1601 | clk_fout_epll.ops = &exynos5_epll_ops; | ||
| 1602 | |||
| 1603 | if (clk_set_parent(&exynos5_clk_mout_epll.clk, &clk_fout_epll)) | ||
| 1604 | printk(KERN_ERR "Unable to set parent %s of clock %s.\n", | ||
| 1605 | clk_fout_epll.name, exynos5_clk_mout_epll.clk.name); | ||
| 1606 | |||
| 1607 | clk_set_rate(&exynos5_clk_sclk_apll.clk, 100000000); | ||
| 1608 | clk_set_rate(&exynos5_clk_aclk_266.clk, 300000000); | ||
| 1609 | |||
| 1610 | clk_set_rate(&exynos5_clk_aclk_acp.clk, 267000000); | ||
| 1611 | clk_set_rate(&exynos5_clk_pclk_acp.clk, 134000000); | ||
| 1612 | |||
| 1613 | for (ptr = 0; ptr < ARRAY_SIZE(exynos5_clksrcs); ptr++) | ||
| 1614 | s3c_set_clksrc(&exynos5_clksrcs[ptr], true); | ||
| 1615 | } | ||
| 1616 | |||
| 1617 | void __init exynos5_register_clocks(void) | ||
| 1618 | { | ||
| 1619 | int ptr; | ||
| 1620 | |||
| 1621 | s3c24xx_register_clocks(exynos5_clks, ARRAY_SIZE(exynos5_clks)); | ||
| 1622 | |||
| 1623 | for (ptr = 0; ptr < ARRAY_SIZE(exynos5_sysclks); ptr++) | ||
| 1624 | s3c_register_clksrc(exynos5_sysclks[ptr], 1); | ||
| 1625 | |||
| 1626 | for (ptr = 0; ptr < ARRAY_SIZE(exynos5_sclk_tv); ptr++) | ||
| 1627 | s3c_register_clksrc(exynos5_sclk_tv[ptr], 1); | ||
| 1628 | |||
| 1629 | for (ptr = 0; ptr < ARRAY_SIZE(exynos5_clksrc_cdev); ptr++) | ||
| 1630 | s3c_register_clksrc(exynos5_clksrc_cdev[ptr], 1); | ||
| 1631 | |||
| 1632 | s3c_register_clksrc(exynos5_clksrcs, ARRAY_SIZE(exynos5_clksrcs)); | ||
| 1633 | s3c_register_clocks(exynos5_init_clocks_on, ARRAY_SIZE(exynos5_init_clocks_on)); | ||
| 1634 | |||
| 1635 | s3c24xx_register_clocks(exynos5_clk_cdev, ARRAY_SIZE(exynos5_clk_cdev)); | ||
| 1636 | for (ptr = 0; ptr < ARRAY_SIZE(exynos5_clk_cdev); ptr++) | ||
| 1637 | s3c_disable_clocks(exynos5_clk_cdev[ptr], 1); | ||
| 1638 | |||
| 1639 | s3c_register_clocks(exynos5_init_clocks_off, ARRAY_SIZE(exynos5_init_clocks_off)); | ||
| 1640 | s3c_disable_clocks(exynos5_init_clocks_off, ARRAY_SIZE(exynos5_init_clocks_off)); | ||
| 1641 | clkdev_add_table(exynos5_clk_lookup, ARRAY_SIZE(exynos5_clk_lookup)); | ||
| 1642 | |||
| 1643 | register_syscore_ops(&exynos5_clock_syscore_ops); | ||
| 1644 | s3c_pwmclk_init(); | ||
| 1645 | } | ||
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index d63d399c7bae..02e35abd136b 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | #include <linux/irqdomain.h> | 25 | #include <linux/irqdomain.h> |
| 26 | #include <linux/irqchip.h> | 26 | #include <linux/irqchip.h> |
| 27 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
| 28 | #include <linux/clocksource.h> | ||
| 29 | #include <linux/clk-provider.h> | ||
| 28 | #include <linux/irqchip/arm-gic.h> | 30 | #include <linux/irqchip/arm-gic.h> |
| 29 | 31 | ||
| 30 | #include <asm/proc-fns.h> | 32 | #include <asm/proc-fns.h> |
| @@ -39,7 +41,6 @@ | |||
| 39 | #include <mach/regs-gpio.h> | 41 | #include <mach/regs-gpio.h> |
| 40 | 42 | ||
| 41 | #include <plat/cpu.h> | 43 | #include <plat/cpu.h> |
| 42 | #include <plat/clock.h> | ||
| 43 | #include <plat/devs.h> | 44 | #include <plat/devs.h> |
| 44 | #include <plat/pm.h> | 45 | #include <plat/pm.h> |
| 45 | #include <plat/sdhci.h> | 46 | #include <plat/sdhci.h> |
| @@ -65,17 +66,16 @@ static const char name_exynos5440[] = "EXYNOS5440"; | |||
| 65 | static void exynos4_map_io(void); | 66 | static void exynos4_map_io(void); |
| 66 | static void exynos5_map_io(void); | 67 | static void exynos5_map_io(void); |
| 67 | static void exynos5440_map_io(void); | 68 | static void exynos5440_map_io(void); |
| 68 | static void exynos4_init_clocks(int xtal); | ||
| 69 | static void exynos5_init_clocks(int xtal); | ||
| 70 | static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 69 | static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
| 71 | static int exynos_init(void); | 70 | static int exynos_init(void); |
| 72 | 71 | ||
| 72 | unsigned long xxti_f = 0, xusbxti_f = 0; | ||
| 73 | |||
| 73 | static struct cpu_table cpu_ids[] __initdata = { | 74 | static struct cpu_table cpu_ids[] __initdata = { |
| 74 | { | 75 | { |
| 75 | .idcode = EXYNOS4210_CPU_ID, | 76 | .idcode = EXYNOS4210_CPU_ID, |
| 76 | .idmask = EXYNOS4_CPU_MASK, | 77 | .idmask = EXYNOS4_CPU_MASK, |
| 77 | .map_io = exynos4_map_io, | 78 | .map_io = exynos4_map_io, |
| 78 | .init_clocks = exynos4_init_clocks, | ||
| 79 | .init_uarts = exynos4_init_uarts, | 79 | .init_uarts = exynos4_init_uarts, |
| 80 | .init = exynos_init, | 80 | .init = exynos_init, |
| 81 | .name = name_exynos4210, | 81 | .name = name_exynos4210, |
| @@ -83,7 +83,6 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
| 83 | .idcode = EXYNOS4212_CPU_ID, | 83 | .idcode = EXYNOS4212_CPU_ID, |
| 84 | .idmask = EXYNOS4_CPU_MASK, | 84 | .idmask = EXYNOS4_CPU_MASK, |
| 85 | .map_io = exynos4_map_io, | 85 | .map_io = exynos4_map_io, |
| 86 | .init_clocks = exynos4_init_clocks, | ||
| 87 | .init_uarts = exynos4_init_uarts, | 86 | .init_uarts = exynos4_init_uarts, |
| 88 | .init = exynos_init, | 87 | .init = exynos_init, |
| 89 | .name = name_exynos4212, | 88 | .name = name_exynos4212, |
| @@ -91,7 +90,6 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
| 91 | .idcode = EXYNOS4412_CPU_ID, | 90 | .idcode = EXYNOS4412_CPU_ID, |
| 92 | .idmask = EXYNOS4_CPU_MASK, | 91 | .idmask = EXYNOS4_CPU_MASK, |
| 93 | .map_io = exynos4_map_io, | 92 | .map_io = exynos4_map_io, |
| 94 | .init_clocks = exynos4_init_clocks, | ||
| 95 | .init_uarts = exynos4_init_uarts, | 93 | .init_uarts = exynos4_init_uarts, |
| 96 | .init = exynos_init, | 94 | .init = exynos_init, |
| 97 | .name = name_exynos4412, | 95 | .name = name_exynos4412, |
| @@ -99,7 +97,6 @@ static struct cpu_table cpu_ids[] __initdata = { | |||
| 99 | .idcode = EXYNOS5250_SOC_ID, | 97 | .idcode = EXYNOS5250_SOC_ID, |
| 100 | .idmask = EXYNOS5_SOC_MASK, | 98 | .idmask = EXYNOS5_SOC_MASK, |
| 101 | .map_io = exynos5_map_io, | 99 | .map_io = exynos5_map_io, |
| 102 | .init_clocks = exynos5_init_clocks, | ||
| 103 | .init = exynos_init, | 100 | .init = exynos_init, |
| 104 | .name = name_exynos5250, | 101 | .name = name_exynos5250, |
| 105 | }, { | 102 | }, { |
| @@ -257,11 +254,6 @@ static struct map_desc exynos5_iodesc[] __initdata = { | |||
| 257 | .length = SZ_4K, | 254 | .length = SZ_4K, |
| 258 | .type = MT_DEVICE, | 255 | .type = MT_DEVICE, |
| 259 | }, { | 256 | }, { |
| 260 | .virtual = (unsigned long)S5P_VA_SYSTIMER, | ||
| 261 | .pfn = __phys_to_pfn(EXYNOS5_PA_SYSTIMER), | ||
| 262 | .length = SZ_4K, | ||
| 263 | .type = MT_DEVICE, | ||
| 264 | }, { | ||
| 265 | .virtual = (unsigned long)S5P_VA_SYSRAM, | 257 | .virtual = (unsigned long)S5P_VA_SYSRAM, |
| 266 | .pfn = __phys_to_pfn(EXYNOS5_PA_SYSRAM), | 258 | .pfn = __phys_to_pfn(EXYNOS5_PA_SYSRAM), |
| 267 | .length = SZ_4K, | 259 | .length = SZ_4K, |
| @@ -402,43 +394,26 @@ static void __init exynos5_map_io(void) | |||
| 402 | iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); | 394 | iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); |
| 403 | } | 395 | } |
| 404 | 396 | ||
| 405 | static void __init exynos4_init_clocks(int xtal) | ||
| 406 | { | ||
| 407 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); | ||
| 408 | |||
| 409 | s3c24xx_register_baseclocks(xtal); | ||
| 410 | s5p_register_clocks(xtal); | ||
| 411 | |||
| 412 | if (soc_is_exynos4210()) | ||
| 413 | exynos4210_register_clocks(); | ||
| 414 | else if (soc_is_exynos4212() || soc_is_exynos4412()) | ||
| 415 | exynos4212_register_clocks(); | ||
| 416 | |||
| 417 | exynos4_register_clocks(); | ||
| 418 | exynos4_setup_clocks(); | ||
| 419 | } | ||
| 420 | |||
| 421 | static void __init exynos5440_map_io(void) | 397 | static void __init exynos5440_map_io(void) |
| 422 | { | 398 | { |
| 423 | iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0)); | 399 | iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0)); |
| 424 | } | 400 | } |
| 425 | 401 | ||
| 426 | static void __init exynos5_init_clocks(int xtal) | 402 | void __init exynos_init_time(void) |
| 427 | { | 403 | { |
| 428 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); | 404 | if (of_have_populated_dt()) { |
| 429 | 405 | #ifdef CONFIG_OF | |
| 430 | /* EXYNOS5440 can support only common clock framework */ | 406 | of_clk_init(NULL); |
| 431 | 407 | clocksource_of_init(); | |
| 432 | if (soc_is_exynos5440()) | ||
| 433 | return; | ||
| 434 | |||
| 435 | #ifdef CONFIG_SOC_EXYNOS5250 | ||
| 436 | s3c24xx_register_baseclocks(xtal); | ||
| 437 | s5p_register_clocks(xtal); | ||
| 438 | |||
| 439 | exynos5_register_clocks(); | ||
| 440 | exynos5_setup_clocks(); | ||
| 441 | #endif | 408 | #endif |
| 409 | } else { | ||
| 410 | /* todo: remove after migrating legacy E4 platforms to dt */ | ||
| 411 | #ifdef CONFIG_ARCH_EXYNOS4 | ||
| 412 | exynos4_clk_init(NULL); | ||
| 413 | exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f); | ||
| 414 | #endif | ||
| 415 | mct_init(); | ||
| 416 | } | ||
| 442 | } | 417 | } |
| 443 | 418 | ||
| 444 | void __init exynos4_init_irq(void) | 419 | void __init exynos4_init_irq(void) |
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index 9339bb8954be..cb89ab886950 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h | |||
| @@ -12,7 +12,11 @@ | |||
| 12 | #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H | 12 | #ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H |
| 13 | #define __ARCH_ARM_MACH_EXYNOS_COMMON_H | 13 | #define __ARCH_ARM_MACH_EXYNOS_COMMON_H |
| 14 | 14 | ||
| 15 | extern void exynos4_timer_init(void); | 15 | #include <linux/of.h> |
| 16 | |||
| 17 | extern void mct_init(void); | ||
| 18 | void exynos_init_time(void); | ||
| 19 | extern unsigned long xxti_f, xusbxti_f; | ||
| 16 | 20 | ||
| 17 | struct map_desc; | 21 | struct map_desc; |
| 18 | void exynos_init_io(struct map_desc *mach_desc, int size); | 22 | void exynos_init_io(struct map_desc *mach_desc, int size); |
| @@ -22,6 +26,10 @@ void exynos4_restart(char mode, const char *cmd); | |||
| 22 | void exynos5_restart(char mode, const char *cmd); | 26 | void exynos5_restart(char mode, const char *cmd); |
| 23 | void exynos_init_late(void); | 27 | void exynos_init_late(void); |
| 24 | 28 | ||
| 29 | /* ToDo: remove these after migrating legacy exynos4 platforms to dt */ | ||
| 30 | void exynos4_clk_init(struct device_node *np); | ||
| 31 | void exynos4_clk_register_fixed_ext(unsigned long, unsigned long); | ||
| 32 | |||
| 25 | #ifdef CONFIG_PM_GENERIC_DOMAINS | 33 | #ifdef CONFIG_PM_GENERIC_DOMAINS |
| 26 | int exynos_pm_late_initcall(void); | 34 | int exynos_pm_late_initcall(void); |
| 27 | #else | 35 | #else |
diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h index 1f4dc35cd4b9..c0e75d8dd737 100644 --- a/arch/arm/mach-exynos/include/mach/irqs.h +++ b/arch/arm/mach-exynos/include/mach/irqs.h | |||
| @@ -30,8 +30,6 @@ | |||
| 30 | 30 | ||
| 31 | /* For EXYNOS4 and EXYNOS5 */ | 31 | /* For EXYNOS4 and EXYNOS5 */ |
| 32 | 32 | ||
| 33 | #define EXYNOS_IRQ_MCT_LOCALTIMER IRQ_PPI(12) | ||
| 34 | |||
| 35 | #define EXYNOS_IRQ_EINT16_31 IRQ_SPI(32) | 33 | #define EXYNOS_IRQ_EINT16_31 IRQ_SPI(32) |
| 36 | 34 | ||
| 37 | /* For EXYNOS4 SoCs */ | 35 | /* For EXYNOS4 SoCs */ |
| @@ -323,8 +321,6 @@ | |||
| 323 | #define EXYNOS5_IRQ_CEC IRQ_SPI(114) | 321 | #define EXYNOS5_IRQ_CEC IRQ_SPI(114) |
| 324 | #define EXYNOS5_IRQ_SATA IRQ_SPI(115) | 322 | #define EXYNOS5_IRQ_SATA IRQ_SPI(115) |
| 325 | 323 | ||
| 326 | #define EXYNOS5_IRQ_MCT_L0 IRQ_SPI(120) | ||
| 327 | #define EXYNOS5_IRQ_MCT_L1 IRQ_SPI(121) | ||
| 328 | #define EXYNOS5_IRQ_MMC44 IRQ_SPI(123) | 324 | #define EXYNOS5_IRQ_MMC44 IRQ_SPI(123) |
| 329 | #define EXYNOS5_IRQ_MDMA1 IRQ_SPI(124) | 325 | #define EXYNOS5_IRQ_MDMA1 IRQ_SPI(124) |
| 330 | #define EXYNOS5_IRQ_FIMC_LITE0 IRQ_SPI(125) | 326 | #define EXYNOS5_IRQ_FIMC_LITE0 IRQ_SPI(125) |
| @@ -419,8 +415,6 @@ | |||
| 419 | #define EXYNOS5_IRQ_PMU_CPU1 COMBINER_IRQ(22, 4) | 415 | #define EXYNOS5_IRQ_PMU_CPU1 COMBINER_IRQ(22, 4) |
| 420 | 416 | ||
| 421 | #define EXYNOS5_IRQ_EINT0 COMBINER_IRQ(23, 0) | 417 | #define EXYNOS5_IRQ_EINT0 COMBINER_IRQ(23, 0) |
| 422 | #define EXYNOS5_IRQ_MCT_G0 COMBINER_IRQ(23, 3) | ||
| 423 | #define EXYNOS5_IRQ_MCT_G1 COMBINER_IRQ(23, 4) | ||
| 424 | 418 | ||
| 425 | #define EXYNOS5_IRQ_EINT1 COMBINER_IRQ(24, 0) | 419 | #define EXYNOS5_IRQ_EINT1 COMBINER_IRQ(24, 0) |
| 426 | #define EXYNOS5_IRQ_SYSMMU_LITE1_0 COMBINER_IRQ(24, 1) | 420 | #define EXYNOS5_IRQ_SYSMMU_LITE1_0 COMBINER_IRQ(24, 1) |
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 1df6abbf53b8..7f99b7b187d6 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h | |||
| @@ -65,7 +65,6 @@ | |||
| 65 | #define EXYNOS5_PA_CMU 0x10010000 | 65 | #define EXYNOS5_PA_CMU 0x10010000 |
| 66 | 66 | ||
| 67 | #define EXYNOS4_PA_SYSTIMER 0x10050000 | 67 | #define EXYNOS4_PA_SYSTIMER 0x10050000 |
| 68 | #define EXYNOS5_PA_SYSTIMER 0x101C0000 | ||
| 69 | 68 | ||
| 70 | #define EXYNOS4_PA_WATCHDOG 0x10060000 | 69 | #define EXYNOS4_PA_WATCHDOG 0x10060000 |
| 71 | #define EXYNOS5_PA_WATCHDOG 0x101D0000 | 70 | #define EXYNOS5_PA_WATCHDOG 0x101D0000 |
diff --git a/arch/arm/mach-exynos/include/mach/regs-clock.h b/arch/arm/mach-exynos/include/mach/regs-clock.h index d36ad76ad6a4..20fbbdddd105 100644 --- a/arch/arm/mach-exynos/include/mach/regs-clock.h +++ b/arch/arm/mach-exynos/include/mach/regs-clock.h | |||
| @@ -256,113 +256,6 @@ | |||
| 256 | #define EXYNOS4_CLKDIV_CAM1_JPEG_SHIFT (0) | 256 | #define EXYNOS4_CLKDIV_CAM1_JPEG_SHIFT (0) |
| 257 | #define EXYNOS4_CLKDIV_CAM1_JPEG_MASK (0xf << EXYNOS4_CLKDIV_CAM1_JPEG_SHIFT) | 257 | #define EXYNOS4_CLKDIV_CAM1_JPEG_MASK (0xf << EXYNOS4_CLKDIV_CAM1_JPEG_SHIFT) |
| 258 | 258 | ||
| 259 | /* For EXYNOS5250 */ | ||
| 260 | |||
| 261 | #define EXYNOS5_APLL_LOCK EXYNOS_CLKREG(0x00000) | ||
| 262 | #define EXYNOS5_APLL_CON0 EXYNOS_CLKREG(0x00100) | ||
| 263 | #define EXYNOS5_CLKSRC_CPU EXYNOS_CLKREG(0x00200) | ||
| 264 | #define EXYNOS5_CLKMUX_STATCPU EXYNOS_CLKREG(0x00400) | ||
| 265 | #define EXYNOS5_CLKDIV_CPU0 EXYNOS_CLKREG(0x00500) | ||
| 266 | #define EXYNOS5_CLKDIV_CPU1 EXYNOS_CLKREG(0x00504) | ||
| 267 | #define EXYNOS5_CLKDIV_STATCPU0 EXYNOS_CLKREG(0x00600) | ||
| 268 | #define EXYNOS5_CLKDIV_STATCPU1 EXYNOS_CLKREG(0x00604) | ||
| 269 | |||
| 270 | #define EXYNOS5_PWR_CTRL1 EXYNOS_CLKREG(0x01020) | ||
| 271 | #define EXYNOS5_PWR_CTRL2 EXYNOS_CLKREG(0x01024) | ||
| 272 | |||
| 273 | #define EXYNOS5_MPLL_CON0 EXYNOS_CLKREG(0x04100) | ||
| 274 | #define EXYNOS5_CLKSRC_CORE1 EXYNOS_CLKREG(0x04204) | ||
| 275 | |||
| 276 | #define EXYNOS5_CLKGATE_IP_CORE EXYNOS_CLKREG(0x04900) | ||
| 277 | |||
| 278 | #define EXYNOS5_CLKDIV_ACP EXYNOS_CLKREG(0x08500) | ||
| 279 | |||
| 280 | #define EXYNOS5_EPLL_CON0 EXYNOS_CLKREG(0x10130) | ||
| 281 | #define EXYNOS5_EPLL_CON1 EXYNOS_CLKREG(0x10134) | ||
| 282 | #define EXYNOS5_EPLL_CON2 EXYNOS_CLKREG(0x10138) | ||
| 283 | #define EXYNOS5_VPLL_CON0 EXYNOS_CLKREG(0x10140) | ||
| 284 | #define EXYNOS5_VPLL_CON1 EXYNOS_CLKREG(0x10144) | ||
| 285 | #define EXYNOS5_VPLL_CON2 EXYNOS_CLKREG(0x10148) | ||
| 286 | #define EXYNOS5_CPLL_CON0 EXYNOS_CLKREG(0x10120) | ||
| 287 | |||
| 288 | #define EXYNOS5_CLKSRC_TOP0 EXYNOS_CLKREG(0x10210) | ||
| 289 | #define EXYNOS5_CLKSRC_TOP1 EXYNOS_CLKREG(0x10214) | ||
| 290 | #define EXYNOS5_CLKSRC_TOP2 EXYNOS_CLKREG(0x10218) | ||
| 291 | #define EXYNOS5_CLKSRC_TOP3 EXYNOS_CLKREG(0x1021C) | ||
| 292 | #define EXYNOS5_CLKSRC_GSCL EXYNOS_CLKREG(0x10220) | ||
| 293 | #define EXYNOS5_CLKSRC_DISP1_0 EXYNOS_CLKREG(0x1022C) | ||
| 294 | #define EXYNOS5_CLKSRC_MAUDIO EXYNOS_CLKREG(0x10240) | ||
| 295 | #define EXYNOS5_CLKSRC_FSYS EXYNOS_CLKREG(0x10244) | ||
| 296 | #define EXYNOS5_CLKSRC_PERIC0 EXYNOS_CLKREG(0x10250) | ||
| 297 | #define EXYNOS5_CLKSRC_PERIC1 EXYNOS_CLKREG(0x10254) | ||
| 298 | #define EXYNOS5_SCLK_SRC_ISP EXYNOS_CLKREG(0x10270) | ||
| 299 | |||
| 300 | #define EXYNOS5_CLKSRC_MASK_TOP EXYNOS_CLKREG(0x10310) | ||
| 301 | #define EXYNOS5_CLKSRC_MASK_GSCL EXYNOS_CLKREG(0x10320) | ||
| 302 | #define EXYNOS5_CLKSRC_MASK_DISP1_0 EXYNOS_CLKREG(0x1032C) | ||
| 303 | #define EXYNOS5_CLKSRC_MASK_MAUDIO EXYNOS_CLKREG(0x10334) | ||
| 304 | #define EXYNOS5_CLKSRC_MASK_FSYS EXYNOS_CLKREG(0x10340) | ||
| 305 | #define EXYNOS5_CLKSRC_MASK_PERIC0 EXYNOS_CLKREG(0x10350) | ||
| 306 | #define EXYNOS5_CLKSRC_MASK_PERIC1 EXYNOS_CLKREG(0x10354) | ||
| 307 | |||
| 308 | #define EXYNOS5_CLKDIV_TOP0 EXYNOS_CLKREG(0x10510) | ||
| 309 | #define EXYNOS5_CLKDIV_TOP1 EXYNOS_CLKREG(0x10514) | ||
| 310 | #define EXYNOS5_CLKDIV_GSCL EXYNOS_CLKREG(0x10520) | ||
| 311 | #define EXYNOS5_CLKDIV_DISP1_0 EXYNOS_CLKREG(0x1052C) | ||
| 312 | #define EXYNOS5_CLKDIV_GEN EXYNOS_CLKREG(0x1053C) | ||
| 313 | #define EXYNOS5_CLKDIV_MAUDIO EXYNOS_CLKREG(0x10544) | ||
| 314 | #define EXYNOS5_CLKDIV_FSYS0 EXYNOS_CLKREG(0x10548) | ||
| 315 | #define EXYNOS5_CLKDIV_FSYS1 EXYNOS_CLKREG(0x1054C) | ||
| 316 | #define EXYNOS5_CLKDIV_FSYS2 EXYNOS_CLKREG(0x10550) | ||
| 317 | #define EXYNOS5_CLKDIV_FSYS3 EXYNOS_CLKREG(0x10554) | ||
| 318 | #define EXYNOS5_CLKDIV_PERIC0 EXYNOS_CLKREG(0x10558) | ||
| 319 | #define EXYNOS5_CLKDIV_PERIC1 EXYNOS_CLKREG(0x1055C) | ||
| 320 | #define EXYNOS5_CLKDIV_PERIC2 EXYNOS_CLKREG(0x10560) | ||
| 321 | #define EXYNOS5_CLKDIV_PERIC3 EXYNOS_CLKREG(0x10564) | ||
| 322 | #define EXYNOS5_CLKDIV_PERIC4 EXYNOS_CLKREG(0x10568) | ||
| 323 | #define EXYNOS5_CLKDIV_PERIC5 EXYNOS_CLKREG(0x1056C) | ||
| 324 | #define EXYNOS5_SCLK_DIV_ISP EXYNOS_CLKREG(0x10580) | ||
| 325 | |||
| 326 | #define EXYNOS5_CLKGATE_IP_ACP EXYNOS_CLKREG(0x08800) | ||
| 327 | #define EXYNOS5_CLKGATE_IP_ISP0 EXYNOS_CLKREG(0x0C800) | ||
| 328 | #define EXYNOS5_CLKGATE_IP_ISP1 EXYNOS_CLKREG(0x0C804) | ||
| 329 | #define EXYNOS5_CLKGATE_IP_GSCL EXYNOS_CLKREG(0x10920) | ||
| 330 | #define EXYNOS5_CLKGATE_IP_DISP1 EXYNOS_CLKREG(0x10928) | ||
| 331 | #define EXYNOS5_CLKGATE_IP_MFC EXYNOS_CLKREG(0x1092C) | ||
| 332 | #define EXYNOS5_CLKGATE_IP_G3D EXYNOS_CLKREG(0x10930) | ||
| 333 | #define EXYNOS5_CLKGATE_IP_GEN EXYNOS_CLKREG(0x10934) | ||
| 334 | #define EXYNOS5_CLKGATE_IP_FSYS EXYNOS_CLKREG(0x10944) | ||
| 335 | #define EXYNOS5_CLKGATE_IP_GPS EXYNOS_CLKREG(0x1094C) | ||
| 336 | #define EXYNOS5_CLKGATE_IP_PERIC EXYNOS_CLKREG(0x10950) | ||
| 337 | #define EXYNOS5_CLKGATE_IP_PERIS EXYNOS_CLKREG(0x10960) | ||
| 338 | #define EXYNOS5_CLKGATE_BLOCK EXYNOS_CLKREG(0x10980) | ||
| 339 | |||
| 340 | #define EXYNOS5_BPLL_CON0 EXYNOS_CLKREG(0x20110) | ||
| 341 | #define EXYNOS5_CLKSRC_CDREX EXYNOS_CLKREG(0x20200) | ||
| 342 | #define EXYNOS5_CLKDIV_CDREX EXYNOS_CLKREG(0x20500) | ||
| 343 | |||
| 344 | #define EXYNOS5_PLL_DIV2_SEL EXYNOS_CLKREG(0x20A24) | ||
| 345 | |||
| 346 | #define EXYNOS5_EPLL_LOCK EXYNOS_CLKREG(0x10030) | ||
| 347 | |||
| 348 | #define EXYNOS5_EPLLCON0_LOCKED_SHIFT (29) | ||
| 349 | |||
| 350 | #define PWR_CTRL1_CORE2_DOWN_RATIO (7 << 28) | ||
| 351 | #define PWR_CTRL1_CORE1_DOWN_RATIO (7 << 16) | ||
| 352 | #define PWR_CTRL1_DIV2_DOWN_EN (1 << 9) | ||
| 353 | #define PWR_CTRL1_DIV1_DOWN_EN (1 << 8) | ||
| 354 | #define PWR_CTRL1_USE_CORE1_WFE (1 << 5) | ||
| 355 | #define PWR_CTRL1_USE_CORE0_WFE (1 << 4) | ||
| 356 | #define PWR_CTRL1_USE_CORE1_WFI (1 << 1) | ||
| 357 | #define PWR_CTRL1_USE_CORE0_WFI (1 << 0) | ||
| 358 | |||
| 359 | #define PWR_CTRL2_DIV2_UP_EN (1 << 25) | ||
| 360 | #define PWR_CTRL2_DIV1_UP_EN (1 << 24) | ||
| 361 | #define PWR_CTRL2_DUR_STANDBY2_VAL (1 << 16) | ||
| 362 | #define PWR_CTRL2_DUR_STANDBY1_VAL (1 << 8) | ||
| 363 | #define PWR_CTRL2_CORE2_UP_RATIO (1 << 4) | ||
| 364 | #define PWR_CTRL2_CORE1_UP_RATIO (1 << 0) | ||
| 365 | |||
| 366 | /* Compatibility defines and inclusion */ | 259 | /* Compatibility defines and inclusion */ |
| 367 | 260 | ||
| 368 | #include <mach/regs-pmu.h> | 261 | #include <mach/regs-pmu.h> |
diff --git a/arch/arm/mach-exynos/include/mach/regs-mct.h b/arch/arm/mach-exynos/include/mach/regs-mct.h deleted file mode 100644 index 80dd02ad6d61..000000000000 --- a/arch/arm/mach-exynos/include/mach/regs-mct.h +++ /dev/null | |||
| @@ -1,53 +0,0 @@ | |||
| 1 | /* arch/arm/mach-exynos4/include/mach/regs-mct.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | ||
| 4 | * http://www.samsung.com | ||
| 5 | * | ||
| 6 | * EXYNOS4 MCT configutation | ||
| 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 | |||
| 13 | #ifndef __ASM_ARCH_REGS_MCT_H | ||
| 14 | #define __ASM_ARCH_REGS_MCT_H __FILE__ | ||
| 15 | |||
| 16 | #include <mach/map.h> | ||
| 17 | |||
| 18 | #define EXYNOS4_MCTREG(x) (S5P_VA_SYSTIMER + (x)) | ||
| 19 | |||
| 20 | #define EXYNOS4_MCT_G_CNT_L EXYNOS4_MCTREG(0x100) | ||
| 21 | #define EXYNOS4_MCT_G_CNT_U EXYNOS4_MCTREG(0x104) | ||
| 22 | #define EXYNOS4_MCT_G_CNT_WSTAT EXYNOS4_MCTREG(0x110) | ||
| 23 | |||
| 24 | #define EXYNOS4_MCT_G_COMP0_L EXYNOS4_MCTREG(0x200) | ||
| 25 | #define EXYNOS4_MCT_G_COMP0_U EXYNOS4_MCTREG(0x204) | ||
| 26 | #define EXYNOS4_MCT_G_COMP0_ADD_INCR EXYNOS4_MCTREG(0x208) | ||
| 27 | |||
| 28 | #define EXYNOS4_MCT_G_TCON EXYNOS4_MCTREG(0x240) | ||
| 29 | |||
| 30 | #define EXYNOS4_MCT_G_INT_CSTAT EXYNOS4_MCTREG(0x244) | ||
| 31 | #define EXYNOS4_MCT_G_INT_ENB EXYNOS4_MCTREG(0x248) | ||
| 32 | #define EXYNOS4_MCT_G_WSTAT EXYNOS4_MCTREG(0x24C) | ||
| 33 | |||
| 34 | #define _EXYNOS4_MCT_L_BASE EXYNOS4_MCTREG(0x300) | ||
| 35 | #define EXYNOS4_MCT_L_BASE(x) (_EXYNOS4_MCT_L_BASE + (0x100 * x)) | ||
| 36 | #define EXYNOS4_MCT_L_MASK (0xffffff00) | ||
| 37 | |||
| 38 | #define MCT_L_TCNTB_OFFSET (0x00) | ||
| 39 | #define MCT_L_ICNTB_OFFSET (0x08) | ||
| 40 | #define MCT_L_TCON_OFFSET (0x20) | ||
| 41 | #define MCT_L_INT_CSTAT_OFFSET (0x30) | ||
| 42 | #define MCT_L_INT_ENB_OFFSET (0x34) | ||
| 43 | #define MCT_L_WSTAT_OFFSET (0x40) | ||
| 44 | |||
| 45 | #define MCT_G_TCON_START (1 << 8) | ||
| 46 | #define MCT_G_TCON_COMP0_AUTO_INC (1 << 1) | ||
| 47 | #define MCT_G_TCON_COMP0_ENABLE (1 << 0) | ||
| 48 | |||
| 49 | #define MCT_L_TCON_INTERVAL_MODE (1 << 2) | ||
| 50 | #define MCT_L_TCON_INT_START (1 << 1) | ||
| 51 | #define MCT_L_TCON_TIMER_START (1 << 0) | ||
| 52 | |||
| 53 | #endif /* __ASM_ARCH_REGS_MCT_H */ | ||
diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c index 685f29173afa..2c23b659ae3e 100644 --- a/arch/arm/mach-exynos/mach-armlex4210.c +++ b/arch/arm/mach-exynos/mach-armlex4210.c | |||
| @@ -177,7 +177,6 @@ static void __init armlex4210_smsc911x_init(void) | |||
| 177 | static void __init armlex4210_map_io(void) | 177 | static void __init armlex4210_map_io(void) |
| 178 | { | 178 | { |
| 179 | exynos_init_io(NULL, 0); | 179 | exynos_init_io(NULL, 0); |
| 180 | s3c24xx_init_clocks(24000000); | ||
| 181 | s3c24xx_init_uarts(armlex4210_uartcfgs, | 180 | s3c24xx_init_uarts(armlex4210_uartcfgs, |
| 182 | ARRAY_SIZE(armlex4210_uartcfgs)); | 181 | ARRAY_SIZE(armlex4210_uartcfgs)); |
| 183 | } | 182 | } |
| @@ -202,6 +201,6 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210") | |||
| 202 | .map_io = armlex4210_map_io, | 201 | .map_io = armlex4210_map_io, |
| 203 | .init_machine = armlex4210_machine_init, | 202 | .init_machine = armlex4210_machine_init, |
| 204 | .init_late = exynos_init_late, | 203 | .init_late = exynos_init_late, |
| 205 | .init_time = exynos4_timer_init, | 204 | .init_time = exynos_init_time, |
| 206 | .restart = exynos4_restart, | 205 | .restart = exynos4_restart, |
| 207 | MACHINE_END | 206 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index 3358088c822a..ac27f3cd121f 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c | |||
| @@ -11,121 +11,26 @@ | |||
| 11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #include <linux/kernel.h> | ||
| 14 | #include <linux/of_platform.h> | 15 | #include <linux/of_platform.h> |
| 16 | #include <linux/of_fdt.h> | ||
| 15 | #include <linux/serial_core.h> | 17 | #include <linux/serial_core.h> |
| 18 | #include <linux/memblock.h> | ||
| 19 | #include <linux/clocksource.h> | ||
| 16 | 20 | ||
| 17 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
| 18 | #include <mach/map.h> | 22 | #include <plat/mfc.h> |
| 19 | |||
| 20 | #include <plat/cpu.h> | ||
| 21 | #include <plat/regs-serial.h> | ||
| 22 | 23 | ||
| 23 | #include "common.h" | 24 | #include "common.h" |
| 24 | 25 | ||
| 25 | /* | ||
| 26 | * The following lookup table is used to override device names when devices | ||
| 27 | * are registered from device tree. This is temporarily added to enable | ||
| 28 | * device tree support addition for the Exynos4 architecture. | ||
| 29 | * | ||
| 30 | * For drivers that require platform data to be provided from the machine | ||
| 31 | * file, a platform data pointer can also be supplied along with the | ||
| 32 | * devices names. Usually, the platform data elements that cannot be parsed | ||
| 33 | * from the device tree by the drivers (example: function pointers) are | ||
| 34 | * supplied. But it should be noted that this is a temporary mechanism and | ||
| 35 | * at some point, the drivers should be capable of parsing all the platform | ||
| 36 | * data from the device tree. | ||
| 37 | */ | ||
| 38 | static const struct of_dev_auxdata exynos4_auxdata_lookup[] __initconst = { | ||
| 39 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS4_PA_UART0, | ||
| 40 | "exynos4210-uart.0", NULL), | ||
| 41 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS4_PA_UART1, | ||
| 42 | "exynos4210-uart.1", NULL), | ||
| 43 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS4_PA_UART2, | ||
| 44 | "exynos4210-uart.2", NULL), | ||
| 45 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS4_PA_UART3, | ||
| 46 | "exynos4210-uart.3", NULL), | ||
| 47 | OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(0), | ||
| 48 | "exynos4-sdhci.0", NULL), | ||
| 49 | OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(1), | ||
| 50 | "exynos4-sdhci.1", NULL), | ||
| 51 | OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(2), | ||
| 52 | "exynos4-sdhci.2", NULL), | ||
| 53 | OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(3), | ||
| 54 | "exynos4-sdhci.3", NULL), | ||
| 55 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(0), | ||
| 56 | "s3c2440-i2c.0", NULL), | ||
| 57 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(1), | ||
| 58 | "s3c2440-i2c.1", NULL), | ||
| 59 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(2), | ||
| 60 | "s3c2440-i2c.2", NULL), | ||
| 61 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(3), | ||
| 62 | "s3c2440-i2c.3", NULL), | ||
| 63 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(4), | ||
| 64 | "s3c2440-i2c.4", NULL), | ||
| 65 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(5), | ||
| 66 | "s3c2440-i2c.5", NULL), | ||
| 67 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(6), | ||
| 68 | "s3c2440-i2c.6", NULL), | ||
| 69 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(7), | ||
| 70 | "s3c2440-i2c.7", NULL), | ||
| 71 | OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS4_PA_SPI0, | ||
| 72 | "exynos4210-spi.0", NULL), | ||
| 73 | OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS4_PA_SPI1, | ||
| 74 | "exynos4210-spi.1", NULL), | ||
| 75 | OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS4_PA_SPI2, | ||
| 76 | "exynos4210-spi.2", NULL), | ||
| 77 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA0, "dma-pl330.0", NULL), | ||
| 78 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA1, "dma-pl330.1", NULL), | ||
| 79 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_MDMA1, "dma-pl330.2", NULL), | ||
| 80 | OF_DEV_AUXDATA("samsung,exynos4210-tmu", EXYNOS4_PA_TMU, | ||
| 81 | "exynos-tmu", NULL), | ||
| 82 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x13620000, | ||
| 83 | "exynos-sysmmu.0", NULL), /* MFC_L */ | ||
| 84 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x13630000, | ||
| 85 | "exynos-sysmmu.1", NULL), /* MFC_R */ | ||
| 86 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x13E20000, | ||
| 87 | "exynos-sysmmu.2", NULL), /* TV */ | ||
| 88 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11A60000, | ||
| 89 | "exynos-sysmmu.3", NULL), /* JPEG */ | ||
| 90 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x12A30000, | ||
| 91 | "exynos-sysmmu.4", NULL), /* ROTATOR */ | ||
| 92 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11A20000, | ||
| 93 | "exynos-sysmmu.5", NULL), /* FIMC0 */ | ||
| 94 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11A30000, | ||
| 95 | "exynos-sysmmu.6", NULL), /* FIMC1 */ | ||
| 96 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11A40000, | ||
| 97 | "exynos-sysmmu.7", NULL), /* FIMC2 */ | ||
| 98 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11A50000, | ||
| 99 | "exynos-sysmmu.8", NULL), /* FIMC3 */ | ||
| 100 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x12A20000, | ||
| 101 | "exynos-sysmmu.9", NULL), /* G2D(4210) */ | ||
| 102 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x10A40000, | ||
| 103 | "exynos-sysmmu.9", NULL), /* G2D(4x12) */ | ||
| 104 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11E20000, | ||
| 105 | "exynos-sysmmu.10", NULL), /* FIMD0 */ | ||
| 106 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x12220000, | ||
| 107 | "exynos-sysmmu.11", NULL), /* FIMD1(4210) */ | ||
| 108 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x12260000, | ||
| 109 | "exynos-sysmmu.12", NULL), /* IS0(4x12) */ | ||
| 110 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x122B0000, | ||
| 111 | "exynos-sysmmu.13", NULL), /* IS1(4x12) */ | ||
| 112 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x123B0000, | ||
| 113 | "exynos-sysmmu.14", NULL), /* FIMC-LITE0(4x12) */ | ||
| 114 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x123C0000, | ||
| 115 | "exynos-sysmmu.15", NULL), /* FIMC-LITE1(4x12) */ | ||
| 116 | {}, | ||
| 117 | }; | ||
| 118 | |||
| 119 | static void __init exynos4_dt_map_io(void) | 26 | static void __init exynos4_dt_map_io(void) |
| 120 | { | 27 | { |
| 121 | exynos_init_io(NULL, 0); | 28 | exynos_init_io(NULL, 0); |
| 122 | s3c24xx_init_clocks(24000000); | ||
| 123 | } | 29 | } |
| 124 | 30 | ||
| 125 | static void __init exynos4_dt_machine_init(void) | 31 | static void __init exynos4_dt_machine_init(void) |
| 126 | { | 32 | { |
| 127 | of_platform_populate(NULL, of_default_bus_match_table, | 33 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
| 128 | exynos4_auxdata_lookup, NULL); | ||
| 129 | } | 34 | } |
| 130 | 35 | ||
| 131 | static char const *exynos4_dt_compat[] __initdata = { | 36 | static char const *exynos4_dt_compat[] __initdata = { |
| @@ -135,6 +40,18 @@ static char const *exynos4_dt_compat[] __initdata = { | |||
| 135 | NULL | 40 | NULL |
| 136 | }; | 41 | }; |
| 137 | 42 | ||
| 43 | static void __init exynos4_reserve(void) | ||
| 44 | { | ||
| 45 | #ifdef CONFIG_S5P_DEV_MFC | ||
| 46 | struct s5p_mfc_dt_meminfo mfc_mem; | ||
| 47 | |||
| 48 | /* Reserve memory for MFC only if it's available */ | ||
| 49 | mfc_mem.compatible = "samsung,mfc-v5"; | ||
| 50 | if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem)) | ||
| 51 | s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff, | ||
| 52 | mfc_mem.lsize); | ||
| 53 | #endif | ||
| 54 | } | ||
| 138 | DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") | 55 | DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") |
| 139 | /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ | 56 | /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ |
| 140 | .smp = smp_ops(exynos_smp_ops), | 57 | .smp = smp_ops(exynos_smp_ops), |
| @@ -142,7 +59,8 @@ DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") | |||
| 142 | .map_io = exynos4_dt_map_io, | 59 | .map_io = exynos4_dt_map_io, |
| 143 | .init_machine = exynos4_dt_machine_init, | 60 | .init_machine = exynos4_dt_machine_init, |
| 144 | .init_late = exynos_init_late, | 61 | .init_late = exynos_init_late, |
| 145 | .init_time = exynos4_timer_init, | 62 | .init_time = exynos_init_time, |
| 146 | .dt_compat = exynos4_dt_compat, | 63 | .dt_compat = exynos4_dt_compat, |
| 147 | .restart = exynos4_restart, | 64 | .restart = exynos4_restart, |
| 65 | .reserve = exynos4_reserve, | ||
| 148 | MACHINE_END | 66 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index acaeb14db54b..753b94f3fca7 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c | |||
| @@ -11,151 +11,21 @@ | |||
| 11 | 11 | ||
| 12 | #include <linux/of_platform.h> | 12 | #include <linux/of_platform.h> |
| 13 | #include <linux/of_fdt.h> | 13 | #include <linux/of_fdt.h> |
| 14 | #include <linux/serial_core.h> | ||
| 15 | #include <linux/memblock.h> | 14 | #include <linux/memblock.h> |
| 16 | #include <linux/io.h> | 15 | #include <linux/io.h> |
| 16 | #include <linux/clocksource.h> | ||
| 17 | 17 | ||
| 18 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
| 19 | #include <mach/map.h> | ||
| 20 | #include <mach/regs-pmu.h> | 19 | #include <mach/regs-pmu.h> |
| 21 | 20 | ||
| 22 | #include <plat/cpu.h> | 21 | #include <plat/cpu.h> |
| 23 | #include <plat/regs-serial.h> | ||
| 24 | #include <plat/mfc.h> | 22 | #include <plat/mfc.h> |
| 25 | 23 | ||
| 26 | #include "common.h" | 24 | #include "common.h" |
| 27 | 25 | ||
| 28 | /* | ||
| 29 | * The following lookup table is used to override device names when devices | ||
| 30 | * are registered from device tree. This is temporarily added to enable | ||
| 31 | * device tree support addition for the EXYNOS5 architecture. | ||
| 32 | * | ||
| 33 | * For drivers that require platform data to be provided from the machine | ||
| 34 | * file, a platform data pointer can also be supplied along with the | ||
| 35 | * devices names. Usually, the platform data elements that cannot be parsed | ||
| 36 | * from the device tree by the drivers (example: function pointers) are | ||
| 37 | * supplied. But it should be noted that this is a temporary mechanism and | ||
| 38 | * at some point, the drivers should be capable of parsing all the platform | ||
| 39 | * data from the device tree. | ||
| 40 | */ | ||
| 41 | static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { | ||
| 42 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART0, | ||
| 43 | "exynos4210-uart.0", NULL), | ||
| 44 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART1, | ||
| 45 | "exynos4210-uart.1", NULL), | ||
| 46 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART2, | ||
| 47 | "exynos4210-uart.2", NULL), | ||
| 48 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5_PA_UART3, | ||
| 49 | "exynos4210-uart.3", NULL), | ||
| 50 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(0), | ||
| 51 | "s3c2440-i2c.0", NULL), | ||
| 52 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(1), | ||
| 53 | "s3c2440-i2c.1", NULL), | ||
| 54 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(2), | ||
| 55 | "s3c2440-i2c.2", NULL), | ||
| 56 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(3), | ||
| 57 | "s3c2440-i2c.3", NULL), | ||
| 58 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(4), | ||
| 59 | "s3c2440-i2c.4", NULL), | ||
| 60 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(5), | ||
| 61 | "s3c2440-i2c.5", NULL), | ||
| 62 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(6), | ||
| 63 | "s3c2440-i2c.6", NULL), | ||
| 64 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS5_PA_IIC(7), | ||
| 65 | "s3c2440-i2c.7", NULL), | ||
| 66 | OF_DEV_AUXDATA("samsung,s3c2440-hdmiphy-i2c", EXYNOS5_PA_IIC(8), | ||
| 67 | "s3c2440-hdmiphy-i2c", NULL), | ||
| 68 | OF_DEV_AUXDATA("samsung,exynos5250-dw-mshc", EXYNOS5_PA_DWMCI0, | ||
| 69 | "dw_mmc.0", NULL), | ||
| 70 | OF_DEV_AUXDATA("samsung,exynos5250-dw-mshc", EXYNOS5_PA_DWMCI1, | ||
| 71 | "dw_mmc.1", NULL), | ||
| 72 | OF_DEV_AUXDATA("samsung,exynos5250-dw-mshc", EXYNOS5_PA_DWMCI2, | ||
| 73 | "dw_mmc.2", NULL), | ||
| 74 | OF_DEV_AUXDATA("samsung,exynos5250-dw-mshc", EXYNOS5_PA_DWMCI3, | ||
| 75 | "dw_mmc.3", NULL), | ||
| 76 | OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS5_PA_SPI0, | ||
| 77 | "exynos4210-spi.0", NULL), | ||
| 78 | OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS5_PA_SPI1, | ||
| 79 | "exynos4210-spi.1", NULL), | ||
| 80 | OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS5_PA_SPI2, | ||
| 81 | "exynos4210-spi.2", NULL), | ||
| 82 | OF_DEV_AUXDATA("samsung,exynos5-sata-ahci", 0x122F0000, | ||
| 83 | "exynos5-sata", NULL), | ||
| 84 | OF_DEV_AUXDATA("samsung,exynos5-sata-phy", 0x12170000, | ||
| 85 | "exynos5-sata-phy", NULL), | ||
| 86 | OF_DEV_AUXDATA("samsung,exynos5-sata-phy-i2c", 0x121D0000, | ||
| 87 | "exynos5-sata-phy-i2c", NULL), | ||
| 88 | OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA0, "dma-pl330.0", NULL), | ||
| 89 | OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA1, "dma-pl330.1", NULL), | ||
| 90 | OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_MDMA1, "dma-pl330.2", NULL), | ||
| 91 | OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC0, | ||
| 92 | "exynos-gsc.0", NULL), | ||
| 93 | OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC1, | ||
| 94 | "exynos-gsc.1", NULL), | ||
| 95 | OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC2, | ||
| 96 | "exynos-gsc.2", NULL), | ||
| 97 | OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC3, | ||
| 98 | "exynos-gsc.3", NULL), | ||
| 99 | OF_DEV_AUXDATA("samsung,exynos5-hdmi", 0x14530000, | ||
| 100 | "exynos5-hdmi", NULL), | ||
| 101 | OF_DEV_AUXDATA("samsung,exynos5-mixer", 0x14450000, | ||
| 102 | "exynos5-mixer", NULL), | ||
| 103 | OF_DEV_AUXDATA("samsung,mfc-v6", 0x11000000, "s5p-mfc-v6", NULL), | ||
| 104 | OF_DEV_AUXDATA("samsung,exynos5250-tmu", 0x10060000, | ||
| 105 | "exynos-tmu", NULL), | ||
| 106 | OF_DEV_AUXDATA("samsung,i2s-v5", 0x03830000, | ||
| 107 | "samsung-i2s.0", NULL), | ||
| 108 | OF_DEV_AUXDATA("samsung,i2s-v5", 0x12D60000, | ||
| 109 | "samsung-i2s.1", NULL), | ||
| 110 | OF_DEV_AUXDATA("samsung,i2s-v5", 0x12D70000, | ||
| 111 | "samsung-i2s.2", NULL), | ||
| 112 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11210000, | ||
| 113 | "exynos-sysmmu.0", "mfc"), /* MFC_L */ | ||
| 114 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11200000, | ||
| 115 | "exynos-sysmmu.1", "mfc"), /* MFC_R */ | ||
| 116 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x14650000, | ||
| 117 | "exynos-sysmmu.2", NULL), /* TV */ | ||
| 118 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11F20000, | ||
| 119 | "exynos-sysmmu.3", "jpeg"), /* JPEG */ | ||
| 120 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x11D40000, | ||
| 121 | "exynos-sysmmu.4", NULL), /* ROTATOR */ | ||
| 122 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x13E80000, | ||
| 123 | "exynos-sysmmu.5", "gscl"), /* GSCL0 */ | ||
| 124 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x13E90000, | ||
| 125 | "exynos-sysmmu.6", "gscl"), /* GSCL1 */ | ||
| 126 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x13EA0000, | ||
| 127 | "exynos-sysmmu.7", "gscl"), /* GSCL2 */ | ||
| 128 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x13EB0000, | ||
| 129 | "exynos-sysmmu.8", "gscl"), /* GSCL3 */ | ||
| 130 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x13260000, | ||
| 131 | "exynos-sysmmu.9", NULL), /* FIMC-IS0 */ | ||
| 132 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x132C0000, | ||
| 133 | "exynos-sysmmu.10", NULL), /* FIMC-IS1 */ | ||
| 134 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x14640000, | ||
| 135 | "exynos-sysmmu.11", NULL), /* FIMD1 */ | ||
| 136 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x13C40000, | ||
| 137 | "exynos-sysmmu.12", NULL), /* FIMC-LITE0 */ | ||
| 138 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x13C50000, | ||
| 139 | "exynos-sysmmu.13", NULL), /* FIMC-LITE1 */ | ||
| 140 | OF_DEV_AUXDATA("samsung,exynos-sysmmu", 0x10A60000, | ||
| 141 | "exynos-sysmmu.14", NULL), /* G2D */ | ||
| 142 | {}, | ||
| 143 | }; | ||
| 144 | |||
| 145 | static const struct of_dev_auxdata exynos5440_auxdata_lookup[] __initconst = { | ||
| 146 | OF_DEV_AUXDATA("samsung,exynos4210-uart", EXYNOS5440_PA_UART0, | ||
| 147 | "exynos4210-uart.0", NULL), | ||
| 148 | {}, | ||
| 149 | }; | ||
| 150 | |||
| 151 | static void __init exynos5_dt_map_io(void) | 26 | static void __init exynos5_dt_map_io(void) |
| 152 | { | 27 | { |
| 153 | unsigned long root = of_get_flat_dt_root(); | ||
| 154 | |||
| 155 | exynos_init_io(NULL, 0); | 28 | exynos_init_io(NULL, 0); |
| 156 | |||
| 157 | if (of_flat_dt_is_compatible(root, "samsung,exynos5250")) | ||
| 158 | s3c24xx_init_clocks(24000000); | ||
| 159 | } | 29 | } |
| 160 | 30 | ||
| 161 | static void __init exynos5_dt_machine_init(void) | 31 | static void __init exynos5_dt_machine_init(void) |
| @@ -182,12 +52,7 @@ static void __init exynos5_dt_machine_init(void) | |||
| 182 | } | 52 | } |
| 183 | } | 53 | } |
| 184 | 54 | ||
| 185 | if (of_machine_is_compatible("samsung,exynos5250")) | 55 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
| 186 | of_platform_populate(NULL, of_default_bus_match_table, | ||
| 187 | exynos5250_auxdata_lookup, NULL); | ||
| 188 | else if (of_machine_is_compatible("samsung,exynos5440")) | ||
| 189 | of_platform_populate(NULL, of_default_bus_match_table, | ||
| 190 | exynos5440_auxdata_lookup, NULL); | ||
| 191 | } | 56 | } |
| 192 | 57 | ||
| 193 | static char const *exynos5_dt_compat[] __initdata = { | 58 | static char const *exynos5_dt_compat[] __initdata = { |
| @@ -216,7 +81,7 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") | |||
| 216 | .map_io = exynos5_dt_map_io, | 81 | .map_io = exynos5_dt_map_io, |
| 217 | .init_machine = exynos5_dt_machine_init, | 82 | .init_machine = exynos5_dt_machine_init, |
| 218 | .init_late = exynos_init_late, | 83 | .init_late = exynos_init_late, |
| 219 | .init_time = exynos4_timer_init, | 84 | .init_time = exynos_init_time, |
| 220 | .dt_compat = exynos5_dt_compat, | 85 | .dt_compat = exynos5_dt_compat, |
| 221 | .restart = exynos5_restart, | 86 | .restart = exynos5_restart, |
| 222 | .reserve = exynos5_reserve, | 87 | .reserve = exynos5_reserve, |
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index 1ea79730187f..0c10852423c3 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c | |||
| @@ -1330,8 +1330,9 @@ static struct platform_device *nuri_devices[] __initdata = { | |||
| 1330 | static void __init nuri_map_io(void) | 1330 | static void __init nuri_map_io(void) |
| 1331 | { | 1331 | { |
| 1332 | exynos_init_io(NULL, 0); | 1332 | exynos_init_io(NULL, 0); |
| 1333 | s3c24xx_init_clocks(clk_xusbxti.rate); | ||
| 1334 | s3c24xx_init_uarts(nuri_uartcfgs, ARRAY_SIZE(nuri_uartcfgs)); | 1333 | s3c24xx_init_uarts(nuri_uartcfgs, ARRAY_SIZE(nuri_uartcfgs)); |
| 1334 | xxti_f = 0; | ||
| 1335 | xusbxti_f = 24000000; | ||
| 1335 | } | 1336 | } |
| 1336 | 1337 | ||
| 1337 | static void __init nuri_reserve(void) | 1338 | static void __init nuri_reserve(void) |
| @@ -1380,7 +1381,7 @@ MACHINE_START(NURI, "NURI") | |||
| 1380 | .map_io = nuri_map_io, | 1381 | .map_io = nuri_map_io, |
| 1381 | .init_machine = nuri_machine_init, | 1382 | .init_machine = nuri_machine_init, |
| 1382 | .init_late = exynos_init_late, | 1383 | .init_late = exynos_init_late, |
| 1383 | .init_time = exynos4_timer_init, | 1384 | .init_time = exynos_init_time, |
| 1384 | .reserve = &nuri_reserve, | 1385 | .reserve = &nuri_reserve, |
| 1385 | .restart = exynos4_restart, | 1386 | .restart = exynos4_restart, |
| 1386 | MACHINE_END | 1387 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index 579d2d171daa..a9aa5c034b23 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c | |||
| @@ -754,8 +754,9 @@ static void s5p_tv_setup(void) | |||
| 754 | static void __init origen_map_io(void) | 754 | static void __init origen_map_io(void) |
| 755 | { | 755 | { |
| 756 | exynos_init_io(NULL, 0); | 756 | exynos_init_io(NULL, 0); |
| 757 | s3c24xx_init_clocks(clk_xusbxti.rate); | ||
| 758 | s3c24xx_init_uarts(origen_uartcfgs, ARRAY_SIZE(origen_uartcfgs)); | 757 | s3c24xx_init_uarts(origen_uartcfgs, ARRAY_SIZE(origen_uartcfgs)); |
| 758 | xxti_f = 0; | ||
| 759 | xusbxti_f = 24000000; | ||
| 759 | } | 760 | } |
| 760 | 761 | ||
| 761 | static void __init origen_power_init(void) | 762 | static void __init origen_power_init(void) |
| @@ -815,7 +816,7 @@ MACHINE_START(ORIGEN, "ORIGEN") | |||
| 815 | .map_io = origen_map_io, | 816 | .map_io = origen_map_io, |
| 816 | .init_machine = origen_machine_init, | 817 | .init_machine = origen_machine_init, |
| 817 | .init_late = exynos_init_late, | 818 | .init_late = exynos_init_late, |
| 818 | .init_time = exynos4_timer_init, | 819 | .init_time = exynos_init_time, |
| 819 | .reserve = &origen_reserve, | 820 | .reserve = &origen_reserve, |
| 820 | .restart = exynos4_restart, | 821 | .restart = exynos4_restart, |
| 821 | MACHINE_END | 822 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index fe6149624b84..184faa3bd93a 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c | |||
| @@ -322,7 +322,6 @@ static struct platform_device *smdk4x12_devices[] __initdata = { | |||
| 322 | static void __init smdk4x12_map_io(void) | 322 | static void __init smdk4x12_map_io(void) |
| 323 | { | 323 | { |
| 324 | exynos_init_io(NULL, 0); | 324 | exynos_init_io(NULL, 0); |
| 325 | s3c24xx_init_clocks(clk_xusbxti.rate); | ||
| 326 | s3c24xx_init_uarts(smdk4x12_uartcfgs, ARRAY_SIZE(smdk4x12_uartcfgs)); | 325 | s3c24xx_init_uarts(smdk4x12_uartcfgs, ARRAY_SIZE(smdk4x12_uartcfgs)); |
| 327 | } | 326 | } |
| 328 | 327 | ||
| @@ -376,7 +375,7 @@ MACHINE_START(SMDK4212, "SMDK4212") | |||
| 376 | .init_irq = exynos4_init_irq, | 375 | .init_irq = exynos4_init_irq, |
| 377 | .map_io = smdk4x12_map_io, | 376 | .map_io = smdk4x12_map_io, |
| 378 | .init_machine = smdk4x12_machine_init, | 377 | .init_machine = smdk4x12_machine_init, |
| 379 | .init_time = exynos4_timer_init, | 378 | .init_time = exynos_init_time, |
| 380 | .restart = exynos4_restart, | 379 | .restart = exynos4_restart, |
| 381 | .reserve = &smdk4x12_reserve, | 380 | .reserve = &smdk4x12_reserve, |
| 382 | MACHINE_END | 381 | MACHINE_END |
| @@ -390,7 +389,7 @@ MACHINE_START(SMDK4412, "SMDK4412") | |||
| 390 | .map_io = smdk4x12_map_io, | 389 | .map_io = smdk4x12_map_io, |
| 391 | .init_machine = smdk4x12_machine_init, | 390 | .init_machine = smdk4x12_machine_init, |
| 392 | .init_late = exynos_init_late, | 391 | .init_late = exynos_init_late, |
| 393 | .init_time = exynos4_timer_init, | 392 | .init_time = exynos_init_time, |
| 394 | .restart = exynos4_restart, | 393 | .restart = exynos4_restart, |
| 395 | .reserve = &smdk4x12_reserve, | 394 | .reserve = &smdk4x12_reserve, |
| 396 | MACHINE_END | 395 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index d71672922b19..75eca7d4e128 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c | |||
| @@ -371,8 +371,9 @@ static void s5p_tv_setup(void) | |||
| 371 | static void __init smdkv310_map_io(void) | 371 | static void __init smdkv310_map_io(void) |
| 372 | { | 372 | { |
| 373 | exynos_init_io(NULL, 0); | 373 | exynos_init_io(NULL, 0); |
| 374 | s3c24xx_init_clocks(clk_xusbxti.rate); | ||
| 375 | s3c24xx_init_uarts(smdkv310_uartcfgs, ARRAY_SIZE(smdkv310_uartcfgs)); | 374 | s3c24xx_init_uarts(smdkv310_uartcfgs, ARRAY_SIZE(smdkv310_uartcfgs)); |
| 375 | xxti_f = 12000000; | ||
| 376 | xusbxti_f = 24000000; | ||
| 376 | } | 377 | } |
| 377 | 378 | ||
| 378 | static void __init smdkv310_reserve(void) | 379 | static void __init smdkv310_reserve(void) |
| @@ -423,7 +424,7 @@ MACHINE_START(SMDKV310, "SMDKV310") | |||
| 423 | .init_irq = exynos4_init_irq, | 424 | .init_irq = exynos4_init_irq, |
| 424 | .map_io = smdkv310_map_io, | 425 | .map_io = smdkv310_map_io, |
| 425 | .init_machine = smdkv310_machine_init, | 426 | .init_machine = smdkv310_machine_init, |
| 426 | .init_time = exynos4_timer_init, | 427 | .init_time = exynos_init_time, |
| 427 | .reserve = &smdkv310_reserve, | 428 | .reserve = &smdkv310_reserve, |
| 428 | .restart = exynos4_restart, | 429 | .restart = exynos4_restart, |
| 429 | MACHINE_END | 430 | MACHINE_END |
| @@ -436,7 +437,7 @@ MACHINE_START(SMDKC210, "SMDKC210") | |||
| 436 | .map_io = smdkv310_map_io, | 437 | .map_io = smdkv310_map_io, |
| 437 | .init_machine = smdkv310_machine_init, | 438 | .init_machine = smdkv310_machine_init, |
| 438 | .init_late = exynos_init_late, | 439 | .init_late = exynos_init_late, |
| 439 | .init_time = exynos4_timer_init, | 440 | .init_time = exynos_init_time, |
| 440 | .reserve = &smdkv310_reserve, | 441 | .reserve = &smdkv310_reserve, |
| 441 | .restart = exynos4_restart, | 442 | .restart = exynos4_restart, |
| 442 | MACHINE_END | 443 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index 497fcb793dc1..72f08fd7cfa9 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | #include <plat/mfc.h> | 41 | #include <plat/mfc.h> |
| 42 | #include <plat/sdhci.h> | 42 | #include <plat/sdhci.h> |
| 43 | #include <plat/fimc-core.h> | 43 | #include <plat/fimc-core.h> |
| 44 | #include <plat/s5p-time.h> | 44 | #include <plat/samsung-time.h> |
| 45 | #include <plat/camport.h> | 45 | #include <plat/camport.h> |
| 46 | 46 | ||
| 47 | #include <mach/map.h> | 47 | #include <mach/map.h> |
| @@ -1092,9 +1092,10 @@ static struct platform_device *universal_devices[] __initdata = { | |||
| 1092 | static void __init universal_map_io(void) | 1092 | static void __init universal_map_io(void) |
| 1093 | { | 1093 | { |
| 1094 | exynos_init_io(NULL, 0); | 1094 | exynos_init_io(NULL, 0); |
| 1095 | s3c24xx_init_clocks(clk_xusbxti.rate); | ||
| 1096 | s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs)); | 1095 | s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs)); |
| 1097 | s5p_set_timer_source(S5P_PWM2, S5P_PWM4); | 1096 | samsung_set_timer_source(SAMSUNG_PWM2, SAMSUNG_PWM4); |
| 1097 | xxti_f = 0; | ||
| 1098 | xusbxti_f = 24000000; | ||
| 1098 | } | 1099 | } |
| 1099 | 1100 | ||
| 1100 | static void s5p_tv_setup(void) | 1101 | static void s5p_tv_setup(void) |
| @@ -1152,7 +1153,7 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") | |||
| 1152 | .map_io = universal_map_io, | 1153 | .map_io = universal_map_io, |
| 1153 | .init_machine = universal_machine_init, | 1154 | .init_machine = universal_machine_init, |
| 1154 | .init_late = exynos_init_late, | 1155 | .init_late = exynos_init_late, |
| 1155 | .init_time = s5p_timer_init, | 1156 | .init_time = samsung_timer_init, |
| 1156 | .reserve = &universal_reserve, | 1157 | .reserve = &universal_reserve, |
| 1157 | .restart = exynos4_restart, | 1158 | .restart = exynos4_restart, |
| 1158 | MACHINE_END | 1159 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index 37f513d1588e..0c5e4fb61117 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig | |||
| @@ -30,6 +30,7 @@ config CPU_S3C2410 | |||
| 30 | select S3C2410_CLOCK | 30 | select S3C2410_CLOCK |
| 31 | select S3C2410_CPUFREQ if CPU_FREQ_S3C24XX | 31 | select S3C2410_CPUFREQ if CPU_FREQ_S3C24XX |
| 32 | select S3C2410_PM if PM | 32 | select S3C2410_PM if PM |
| 33 | select SAMSUNG_HRT | ||
| 33 | help | 34 | help |
| 34 | Support for S3C2410 and S3C2410A family from the S3C24XX line | 35 | Support for S3C2410 and S3C2410A family from the S3C24XX line |
| 35 | of Samsung Mobile CPUs. | 36 | of Samsung Mobile CPUs. |
| @@ -41,6 +42,7 @@ config CPU_S3C2412 | |||
| 41 | select CPU_LLSERIAL_S3C2440 | 42 | select CPU_LLSERIAL_S3C2440 |
| 42 | select S3C2412_DMA if S3C24XX_DMA | 43 | select S3C2412_DMA if S3C24XX_DMA |
| 43 | select S3C2412_PM if PM | 44 | select S3C2412_PM if PM |
| 45 | select SAMSUNG_HRT | ||
| 44 | help | 46 | help |
| 45 | Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line | 47 | Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line |
| 46 | 48 | ||
| @@ -53,6 +55,7 @@ config CPU_S3C2416 | |||
| 53 | select S3C2443_COMMON | 55 | select S3C2443_COMMON |
| 54 | select S3C2443_DMA if S3C24XX_DMA | 56 | select S3C2443_DMA if S3C24XX_DMA |
| 55 | select SAMSUNG_CLKSRC | 57 | select SAMSUNG_CLKSRC |
| 58 | select SAMSUNG_HRT | ||
| 56 | help | 59 | help |
| 57 | Support for the S3C2416 SoC from the S3C24XX line | 60 | Support for the S3C2416 SoC from the S3C24XX line |
| 58 | 61 | ||
| @@ -63,6 +66,7 @@ config CPU_S3C2440 | |||
| 63 | select S3C2410_CLOCK | 66 | select S3C2410_CLOCK |
| 64 | select S3C2410_PM if PM | 67 | select S3C2410_PM if PM |
| 65 | select S3C2440_DMA if S3C24XX_DMA | 68 | select S3C2440_DMA if S3C24XX_DMA |
| 69 | select SAMSUNG_HRT | ||
| 66 | help | 70 | help |
| 67 | Support for S3C2440 Samsung Mobile CPU based systems. | 71 | Support for S3C2440 Samsung Mobile CPU based systems. |
| 68 | 72 | ||
| @@ -72,6 +76,7 @@ config CPU_S3C2442 | |||
| 72 | select CPU_LLSERIAL_S3C2440 | 76 | select CPU_LLSERIAL_S3C2440 |
| 73 | select S3C2410_CLOCK | 77 | select S3C2410_CLOCK |
| 74 | select S3C2410_PM if PM | 78 | select S3C2410_PM if PM |
| 79 | select SAMSUNG_HRT | ||
| 75 | help | 80 | help |
| 76 | Support for S3C2442 Samsung Mobile CPU based systems. | 81 | Support for S3C2442 Samsung Mobile CPU based systems. |
| 77 | 82 | ||
| @@ -87,6 +92,7 @@ config CPU_S3C2443 | |||
| 87 | select S3C2443_COMMON | 92 | select S3C2443_COMMON |
| 88 | select S3C2443_DMA if S3C24XX_DMA | 93 | select S3C2443_DMA if S3C24XX_DMA |
| 89 | select SAMSUNG_CLKSRC | 94 | select SAMSUNG_CLKSRC |
| 95 | select SAMSUNG_HRT | ||
| 90 | help | 96 | help |
| 91 | Support for the S3C2443 SoC from the S3C24XX line | 97 | Support for the S3C2443 SoC from the S3C24XX line |
| 92 | 98 | ||
diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c24xx/bast-irq.c index c0daa9590b4c..cb1b791954de 100644 --- a/arch/arm/mach-s3c24xx/bast-irq.c +++ b/arch/arm/mach-s3c24xx/bast-irq.c | |||
| @@ -34,8 +34,6 @@ | |||
| 34 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
| 35 | #include <mach/regs-irq.h> | 35 | #include <mach/regs-irq.h> |
| 36 | 36 | ||
| 37 | #include <plat/irq.h> | ||
| 38 | |||
| 39 | #include "bast.h" | 37 | #include "bast.h" |
| 40 | 38 | ||
| 41 | #define irqdbf(x...) | 39 | #define irqdbf(x...) |
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2410.c b/arch/arm/mach-s3c24xx/clock-s3c2410.c index 641266f3d152..34fffdf6fc1d 100644 --- a/arch/arm/mach-s3c24xx/clock-s3c2410.c +++ b/arch/arm/mach-s3c24xx/clock-s3c2410.c | |||
| @@ -40,7 +40,6 @@ | |||
| 40 | #include <mach/regs-clock.h> | 40 | #include <mach/regs-clock.h> |
| 41 | #include <mach/regs-gpio.h> | 41 | #include <mach/regs-gpio.h> |
| 42 | 42 | ||
| 43 | #include <plat/s3c2410.h> | ||
| 44 | #include <plat/clock.h> | 43 | #include <plat/clock.h> |
| 45 | #include <plat/cpu.h> | 44 | #include <plat/cpu.h> |
| 46 | 45 | ||
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2412.c b/arch/arm/mach-s3c24xx/clock-s3c2412.c index d10b695a9066..2cc017da88fe 100644 --- a/arch/arm/mach-s3c24xx/clock-s3c2412.c +++ b/arch/arm/mach-s3c24xx/clock-s3c2412.c | |||
| @@ -41,7 +41,6 @@ | |||
| 41 | #include <mach/regs-clock.h> | 41 | #include <mach/regs-clock.h> |
| 42 | #include <mach/regs-gpio.h> | 42 | #include <mach/regs-gpio.h> |
| 43 | 43 | ||
| 44 | #include <plat/s3c2412.h> | ||
| 45 | #include <plat/clock.h> | 44 | #include <plat/clock.h> |
| 46 | #include <plat/cpu.h> | 45 | #include <plat/cpu.h> |
| 47 | 46 | ||
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2416.c b/arch/arm/mach-s3c24xx/clock-s3c2416.c index 14a81c2317a4..036056cea57c 100644 --- a/arch/arm/mach-s3c24xx/clock-s3c2416.c +++ b/arch/arm/mach-s3c24xx/clock-s3c2416.c | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 15 | #include <linux/clk.h> | 15 | #include <linux/clk.h> |
| 16 | 16 | ||
| 17 | #include <plat/s3c2416.h> | ||
| 18 | #include <plat/clock.h> | 17 | #include <plat/clock.h> |
| 19 | #include <plat/clock-clksrc.h> | 18 | #include <plat/clock-clksrc.h> |
| 20 | #include <plat/cpu.h> | 19 | #include <plat/cpu.h> |
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c b/arch/arm/mach-s3c24xx/clock-s3c2443.c index bdaba59b42dc..0a53051b0787 100644 --- a/arch/arm/mach-s3c24xx/clock-s3c2443.c +++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c | |||
| @@ -41,7 +41,6 @@ | |||
| 41 | 41 | ||
| 42 | #include <plat/cpu-freq.h> | 42 | #include <plat/cpu-freq.h> |
| 43 | 43 | ||
| 44 | #include <plat/s3c2443.h> | ||
| 45 | #include <plat/clock.h> | 44 | #include <plat/clock.h> |
| 46 | #include <plat/clock-clksrc.h> | 45 | #include <plat/clock-clksrc.h> |
| 47 | #include <plat/cpu.h> | 46 | #include <plat/cpu.h> |
diff --git a/arch/arm/mach-s3c24xx/common-smdk.c b/arch/arm/mach-s3c24xx/common-smdk.c index 3b2cf6db3634..404444dd3840 100644 --- a/arch/arm/mach-s3c24xx/common-smdk.c +++ b/arch/arm/mach-s3c24xx/common-smdk.c | |||
| @@ -41,11 +41,12 @@ | |||
| 41 | 41 | ||
| 42 | #include <linux/platform_data/mtd-nand-s3c2410.h> | 42 | #include <linux/platform_data/mtd-nand-s3c2410.h> |
| 43 | 43 | ||
| 44 | #include <plat/common-smdk.h> | ||
| 45 | #include <plat/gpio-cfg.h> | 44 | #include <plat/gpio-cfg.h> |
| 46 | #include <plat/devs.h> | 45 | #include <plat/devs.h> |
| 47 | #include <plat/pm.h> | 46 | #include <plat/pm.h> |
| 48 | 47 | ||
| 48 | #include "common-smdk.h" | ||
| 49 | |||
| 49 | /* LED devices */ | 50 | /* LED devices */ |
| 50 | 51 | ||
| 51 | static struct s3c24xx_led_platdata smdk_pdata_led4 = { | 52 | static struct s3c24xx_led_platdata smdk_pdata_led4 = { |
diff --git a/arch/arm/plat-samsung/include/plat/common-smdk.h b/arch/arm/mach-s3c24xx/common-smdk.h index ba028f1ed30b..98f733e1cb42 100644 --- a/arch/arm/plat-samsung/include/plat/common-smdk.h +++ b/arch/arm/mach-s3c24xx/common-smdk.h | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/common-smdk.h | 1 | /* |
| 2 | * | ||
| 3 | * Copyright (c) 2006 Simtec Electronics | 2 | * Copyright (c) 2006 Simtec Electronics |
| 4 | * Ben Dooks <ben@simtec.co.uk> | 3 | * Ben Dooks <ben@simtec.co.uk> |
| 5 | * | 4 | * |
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c index 6bcf87f65f9e..d97533d21ac4 100644 --- a/arch/arm/mach-s3c24xx/common.c +++ b/arch/arm/mach-s3c24xx/common.c | |||
| @@ -47,14 +47,11 @@ | |||
| 47 | #include <plat/cpu.h> | 47 | #include <plat/cpu.h> |
| 48 | #include <plat/devs.h> | 48 | #include <plat/devs.h> |
| 49 | #include <plat/clock.h> | 49 | #include <plat/clock.h> |
| 50 | #include <plat/s3c2410.h> | ||
| 51 | #include <plat/s3c2412.h> | ||
| 52 | #include <plat/s3c2416.h> | ||
| 53 | #include <plat/s3c244x.h> | ||
| 54 | #include <plat/s3c2443.h> | ||
| 55 | #include <plat/cpu-freq.h> | 50 | #include <plat/cpu-freq.h> |
| 56 | #include <plat/pll.h> | 51 | #include <plat/pll.h> |
| 57 | 52 | ||
| 53 | #include "common.h" | ||
| 54 | |||
| 58 | /* table of supported CPUs */ | 55 | /* table of supported CPUs */ |
| 59 | 56 | ||
| 60 | static const char name_s3c2410[] = "S3C2410"; | 57 | static const char name_s3c2410[] = "S3C2410"; |
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h index ed6276fcaa3b..8a2b4137ddb6 100644 --- a/arch/arm/mach-s3c24xx/common.h +++ b/arch/arm/mach-s3c24xx/common.h | |||
| @@ -12,8 +12,94 @@ | |||
| 12 | #ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H | 12 | #ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H |
| 13 | #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__ | 13 | #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__ |
| 14 | 14 | ||
| 15 | void s3c2410_restart(char mode, const char *cmd); | 15 | struct s3c2410_uartcfg; |
| 16 | void s3c244x_restart(char mode, const char *cmd); | 16 | |
| 17 | #ifdef CONFIG_CPU_S3C2410 | ||
| 18 | extern int s3c2410_init(void); | ||
| 19 | extern int s3c2410a_init(void); | ||
| 20 | extern void s3c2410_map_io(void); | ||
| 21 | extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
| 22 | extern void s3c2410_init_clocks(int xtal); | ||
| 23 | extern void s3c2410_restart(char mode, const char *cmd); | ||
| 24 | #else | ||
| 25 | #define s3c2410_init_clocks NULL | ||
| 26 | #define s3c2410_init_uarts NULL | ||
| 27 | #define s3c2410_map_io NULL | ||
| 28 | #define s3c2410_init NULL | ||
| 29 | #define s3c2410a_init NULL | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #ifdef CONFIG_CPU_S3C2412 | ||
| 33 | extern int s3c2412_init(void); | ||
| 34 | extern void s3c2412_map_io(void); | ||
| 35 | extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
| 36 | extern void s3c2412_init_clocks(int xtal); | ||
| 37 | extern int s3c2412_baseclk_add(void); | ||
| 38 | extern void s3c2412_restart(char mode, const char *cmd); | ||
| 39 | #else | ||
| 40 | #define s3c2412_init_clocks NULL | ||
| 41 | #define s3c2412_init_uarts NULL | ||
| 42 | #define s3c2412_map_io NULL | ||
| 43 | #define s3c2412_init NULL | ||
| 44 | #endif | ||
| 45 | |||
| 46 | #ifdef CONFIG_CPU_S3C2416 | ||
| 47 | extern int s3c2416_init(void); | ||
| 48 | extern void s3c2416_map_io(void); | ||
| 49 | extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
| 50 | extern void s3c2416_init_clocks(int xtal); | ||
| 51 | extern int s3c2416_baseclk_add(void); | ||
| 52 | extern void s3c2416_restart(char mode, const char *cmd); | ||
| 53 | extern void s3c2416_init_irq(void); | ||
| 54 | |||
| 55 | extern struct syscore_ops s3c2416_irq_syscore_ops; | ||
| 56 | #else | ||
| 57 | #define s3c2416_init_clocks NULL | ||
| 58 | #define s3c2416_init_uarts NULL | ||
| 59 | #define s3c2416_map_io NULL | ||
| 60 | #define s3c2416_init NULL | ||
| 61 | #endif | ||
| 62 | |||
| 63 | #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) | ||
| 64 | extern void s3c244x_map_io(void); | ||
| 65 | extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
| 66 | extern void s3c244x_init_clocks(int xtal); | ||
| 67 | extern void s3c244x_restart(char mode, const char *cmd); | ||
| 68 | #else | ||
| 69 | #define s3c244x_init_clocks NULL | ||
| 70 | #define s3c244x_init_uarts NULL | ||
| 71 | #endif | ||
| 72 | |||
| 73 | #ifdef CONFIG_CPU_S3C2440 | ||
| 74 | extern int s3c2440_init(void); | ||
| 75 | extern void s3c2440_map_io(void); | ||
| 76 | #else | ||
| 77 | #define s3c2440_init NULL | ||
| 78 | #define s3c2440_map_io NULL | ||
| 79 | #endif | ||
| 80 | |||
| 81 | #ifdef CONFIG_CPU_S3C2442 | ||
| 82 | extern int s3c2442_init(void); | ||
| 83 | extern void s3c2442_map_io(void); | ||
| 84 | #else | ||
| 85 | #define s3c2442_init NULL | ||
| 86 | #define s3c2442_map_io NULL | ||
| 87 | #endif | ||
| 88 | |||
| 89 | #ifdef CONFIG_CPU_S3C2443 | ||
| 90 | extern int s3c2443_init(void); | ||
| 91 | extern void s3c2443_map_io(void); | ||
| 92 | extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
| 93 | extern void s3c2443_init_clocks(int xtal); | ||
| 94 | extern int s3c2443_baseclk_add(void); | ||
| 95 | extern void s3c2443_restart(char mode, const char *cmd); | ||
| 96 | extern void s3c2443_init_irq(void); | ||
| 97 | #else | ||
| 98 | #define s3c2443_init_clocks NULL | ||
| 99 | #define s3c2443_init_uarts NULL | ||
| 100 | #define s3c2443_map_io NULL | ||
| 101 | #define s3c2443_init NULL | ||
| 102 | #endif | ||
| 17 | 103 | ||
| 18 | extern struct syscore_ops s3c24xx_irq_syscore_ops; | 104 | extern struct syscore_ops s3c24xx_irq_syscore_ops; |
| 19 | 105 | ||
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2410.c b/arch/arm/mach-s3c24xx/dma-s3c2410.c index 25d085adc93c..a6c94b820954 100644 --- a/arch/arm/mach-s3c24xx/dma-s3c2410.c +++ b/arch/arm/mach-s3c24xx/dma-s3c2410.c | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | #include <plat/regs-ac97.h> | 28 | #include <plat/regs-ac97.h> |
| 29 | #include <plat/regs-dma.h> | 29 | #include <plat/regs-dma.h> |
| 30 | #include <mach/regs-lcd.h> | 30 | #include <mach/regs-lcd.h> |
| 31 | #include <mach/regs-sdi.h> | ||
| 32 | #include <plat/regs-iis.h> | 31 | #include <plat/regs-iis.h> |
| 33 | #include <plat/regs-spi.h> | 32 | #include <plat/regs-spi.h> |
| 34 | 33 | ||
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2412.c b/arch/arm/mach-s3c24xx/dma-s3c2412.c index d2408ba372cb..c0e8c3f5057e 100644 --- a/arch/arm/mach-s3c24xx/dma-s3c2412.c +++ b/arch/arm/mach-s3c24xx/dma-s3c2412.c | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | #include <plat/regs-ac97.h> | 28 | #include <plat/regs-ac97.h> |
| 29 | #include <plat/regs-dma.h> | 29 | #include <plat/regs-dma.h> |
| 30 | #include <mach/regs-lcd.h> | 30 | #include <mach/regs-lcd.h> |
| 31 | #include <mach/regs-sdi.h> | ||
| 32 | #include <plat/regs-iis.h> | 31 | #include <plat/regs-iis.h> |
| 33 | #include <plat/regs-spi.h> | 32 | #include <plat/regs-spi.h> |
| 34 | 33 | ||
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2440.c b/arch/arm/mach-s3c24xx/dma-s3c2440.c index 0b86e74d104f..1c08eccd9425 100644 --- a/arch/arm/mach-s3c24xx/dma-s3c2440.c +++ b/arch/arm/mach-s3c24xx/dma-s3c2440.c | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | #include <plat/regs-ac97.h> | 28 | #include <plat/regs-ac97.h> |
| 29 | #include <plat/regs-dma.h> | 29 | #include <plat/regs-dma.h> |
| 30 | #include <mach/regs-lcd.h> | 30 | #include <mach/regs-lcd.h> |
| 31 | #include <mach/regs-sdi.h> | ||
| 32 | #include <plat/regs-iis.h> | 31 | #include <plat/regs-iis.h> |
| 33 | #include <plat/regs-spi.h> | 32 | #include <plat/regs-spi.h> |
| 34 | 33 | ||
diff --git a/arch/arm/mach-s3c24xx/dma-s3c2443.c b/arch/arm/mach-s3c24xx/dma-s3c2443.c index 05536254a3f8..000e4c69fce9 100644 --- a/arch/arm/mach-s3c24xx/dma-s3c2443.c +++ b/arch/arm/mach-s3c24xx/dma-s3c2443.c | |||
| @@ -28,7 +28,6 @@ | |||
| 28 | #include <plat/regs-ac97.h> | 28 | #include <plat/regs-ac97.h> |
| 29 | #include <plat/regs-dma.h> | 29 | #include <plat/regs-dma.h> |
| 30 | #include <mach/regs-lcd.h> | 30 | #include <mach/regs-lcd.h> |
| 31 | #include <mach/regs-sdi.h> | ||
| 32 | #include <plat/regs-iis.h> | 31 | #include <plat/regs-iis.h> |
| 33 | #include <plat/regs-spi.h> | 32 | #include <plat/regs-spi.h> |
| 34 | 33 | ||
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-sdi.h b/arch/arm/mach-s3c24xx/include/mach/regs-sdi.h deleted file mode 100644 index cbf2d8884e30..000000000000 --- a/arch/arm/mach-s3c24xx/include/mach/regs-sdi.h +++ /dev/null | |||
| @@ -1,127 +0,0 @@ | |||
| 1 | /* arch/arm/mach-s3c2410/include/mach/regs-sdi.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk> | ||
| 4 | * http://www.simtec.co.uk/products/SWLINUX/ | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * S3C2410 MMC/SDIO register definitions | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __ASM_ARM_REGS_SDI | ||
| 14 | #define __ASM_ARM_REGS_SDI "regs-sdi.h" | ||
| 15 | |||
| 16 | #define S3C2410_SDICON (0x00) | ||
| 17 | #define S3C2410_SDIPRE (0x04) | ||
| 18 | #define S3C2410_SDICMDARG (0x08) | ||
| 19 | #define S3C2410_SDICMDCON (0x0C) | ||
| 20 | #define S3C2410_SDICMDSTAT (0x10) | ||
| 21 | #define S3C2410_SDIRSP0 (0x14) | ||
| 22 | #define S3C2410_SDIRSP1 (0x18) | ||
| 23 | #define S3C2410_SDIRSP2 (0x1C) | ||
| 24 | #define S3C2410_SDIRSP3 (0x20) | ||
| 25 | #define S3C2410_SDITIMER (0x24) | ||
| 26 | #define S3C2410_SDIBSIZE (0x28) | ||
| 27 | #define S3C2410_SDIDCON (0x2C) | ||
| 28 | #define S3C2410_SDIDCNT (0x30) | ||
| 29 | #define S3C2410_SDIDSTA (0x34) | ||
| 30 | #define S3C2410_SDIFSTA (0x38) | ||
| 31 | |||
| 32 | #define S3C2410_SDIDATA (0x3C) | ||
| 33 | #define S3C2410_SDIIMSK (0x40) | ||
| 34 | |||
| 35 | #define S3C2440_SDIDATA (0x40) | ||
| 36 | #define S3C2440_SDIIMSK (0x3C) | ||
| 37 | |||
| 38 | #define S3C2440_SDICON_SDRESET (1<<8) | ||
| 39 | #define S3C2440_SDICON_MMCCLOCK (1<<5) | ||
| 40 | #define S3C2410_SDICON_BYTEORDER (1<<4) | ||
| 41 | #define S3C2410_SDICON_SDIOIRQ (1<<3) | ||
| 42 | #define S3C2410_SDICON_RWAITEN (1<<2) | ||
| 43 | #define S3C2410_SDICON_FIFORESET (1<<1) | ||
| 44 | #define S3C2410_SDICON_CLOCKTYPE (1<<0) | ||
| 45 | |||
| 46 | #define S3C2410_SDICMDCON_ABORT (1<<12) | ||
| 47 | #define S3C2410_SDICMDCON_WITHDATA (1<<11) | ||
| 48 | #define S3C2410_SDICMDCON_LONGRSP (1<<10) | ||
| 49 | #define S3C2410_SDICMDCON_WAITRSP (1<<9) | ||
| 50 | #define S3C2410_SDICMDCON_CMDSTART (1<<8) | ||
| 51 | #define S3C2410_SDICMDCON_SENDERHOST (1<<6) | ||
| 52 | #define S3C2410_SDICMDCON_INDEX (0x3f) | ||
| 53 | |||
| 54 | #define S3C2410_SDICMDSTAT_CRCFAIL (1<<12) | ||
| 55 | #define S3C2410_SDICMDSTAT_CMDSENT (1<<11) | ||
| 56 | #define S3C2410_SDICMDSTAT_CMDTIMEOUT (1<<10) | ||
| 57 | #define S3C2410_SDICMDSTAT_RSPFIN (1<<9) | ||
| 58 | #define S3C2410_SDICMDSTAT_XFERING (1<<8) | ||
| 59 | #define S3C2410_SDICMDSTAT_INDEX (0xff) | ||
| 60 | |||
| 61 | #define S3C2440_SDIDCON_DS_BYTE (0<<22) | ||
| 62 | #define S3C2440_SDIDCON_DS_HALFWORD (1<<22) | ||
| 63 | #define S3C2440_SDIDCON_DS_WORD (2<<22) | ||
| 64 | #define S3C2410_SDIDCON_IRQPERIOD (1<<21) | ||
| 65 | #define S3C2410_SDIDCON_TXAFTERRESP (1<<20) | ||
| 66 | #define S3C2410_SDIDCON_RXAFTERCMD (1<<19) | ||
| 67 | #define S3C2410_SDIDCON_BUSYAFTERCMD (1<<18) | ||
| 68 | #define S3C2410_SDIDCON_BLOCKMODE (1<<17) | ||
| 69 | #define S3C2410_SDIDCON_WIDEBUS (1<<16) | ||
| 70 | #define S3C2410_SDIDCON_DMAEN (1<<15) | ||
| 71 | #define S3C2410_SDIDCON_STOP (1<<14) | ||
| 72 | #define S3C2440_SDIDCON_DATSTART (1<<14) | ||
| 73 | #define S3C2410_SDIDCON_DATMODE (3<<12) | ||
| 74 | #define S3C2410_SDIDCON_BLKNUM (0x7ff) | ||
| 75 | |||
| 76 | /* constants for S3C2410_SDIDCON_DATMODE */ | ||
| 77 | #define S3C2410_SDIDCON_XFER_READY (0<<12) | ||
| 78 | #define S3C2410_SDIDCON_XFER_CHKSTART (1<<12) | ||
| 79 | #define S3C2410_SDIDCON_XFER_RXSTART (2<<12) | ||
| 80 | #define S3C2410_SDIDCON_XFER_TXSTART (3<<12) | ||
| 81 | |||
| 82 | #define S3C2410_SDIDCON_BLKNUM_MASK (0xFFF) | ||
| 83 | #define S3C2410_SDIDCNT_BLKNUM_SHIFT (12) | ||
| 84 | |||
| 85 | #define S3C2410_SDIDSTA_RDYWAITREQ (1<<10) | ||
| 86 | #define S3C2410_SDIDSTA_SDIOIRQDETECT (1<<9) | ||
| 87 | #define S3C2410_SDIDSTA_FIFOFAIL (1<<8) /* reserved on 2440 */ | ||
| 88 | #define S3C2410_SDIDSTA_CRCFAIL (1<<7) | ||
| 89 | #define S3C2410_SDIDSTA_RXCRCFAIL (1<<6) | ||
| 90 | #define S3C2410_SDIDSTA_DATATIMEOUT (1<<5) | ||
| 91 | #define S3C2410_SDIDSTA_XFERFINISH (1<<4) | ||
| 92 | #define S3C2410_SDIDSTA_BUSYFINISH (1<<3) | ||
| 93 | #define S3C2410_SDIDSTA_SBITERR (1<<2) /* reserved on 2410a/2440 */ | ||
| 94 | #define S3C2410_SDIDSTA_TXDATAON (1<<1) | ||
| 95 | #define S3C2410_SDIDSTA_RXDATAON (1<<0) | ||
| 96 | |||
| 97 | #define S3C2440_SDIFSTA_FIFORESET (1<<16) | ||
| 98 | #define S3C2440_SDIFSTA_FIFOFAIL (3<<14) /* 3 is correct (2 bits) */ | ||
| 99 | #define S3C2410_SDIFSTA_TFDET (1<<13) | ||
| 100 | #define S3C2410_SDIFSTA_RFDET (1<<12) | ||
| 101 | #define S3C2410_SDIFSTA_TFHALF (1<<11) | ||
| 102 | #define S3C2410_SDIFSTA_TFEMPTY (1<<10) | ||
| 103 | #define S3C2410_SDIFSTA_RFLAST (1<<9) | ||
| 104 | #define S3C2410_SDIFSTA_RFFULL (1<<8) | ||
| 105 | #define S3C2410_SDIFSTA_RFHALF (1<<7) | ||
| 106 | #define S3C2410_SDIFSTA_COUNTMASK (0x7f) | ||
| 107 | |||
| 108 | #define S3C2410_SDIIMSK_RESPONSECRC (1<<17) | ||
| 109 | #define S3C2410_SDIIMSK_CMDSENT (1<<16) | ||
| 110 | #define S3C2410_SDIIMSK_CMDTIMEOUT (1<<15) | ||
| 111 | #define S3C2410_SDIIMSK_RESPONSEND (1<<14) | ||
| 112 | #define S3C2410_SDIIMSK_READWAIT (1<<13) | ||
| 113 | #define S3C2410_SDIIMSK_SDIOIRQ (1<<12) | ||
| 114 | #define S3C2410_SDIIMSK_FIFOFAIL (1<<11) | ||
| 115 | #define S3C2410_SDIIMSK_CRCSTATUS (1<<10) | ||
| 116 | #define S3C2410_SDIIMSK_DATACRC (1<<9) | ||
| 117 | #define S3C2410_SDIIMSK_DATATIMEOUT (1<<8) | ||
| 118 | #define S3C2410_SDIIMSK_DATAFINISH (1<<7) | ||
| 119 | #define S3C2410_SDIIMSK_BUSYFINISH (1<<6) | ||
| 120 | #define S3C2410_SDIIMSK_SBITERR (1<<5) /* reserved 2440/2410a */ | ||
| 121 | #define S3C2410_SDIIMSK_TXFIFOHALF (1<<4) | ||
| 122 | #define S3C2410_SDIIMSK_TXFIFOEMPTY (1<<3) | ||
| 123 | #define S3C2410_SDIIMSK_RXFIFOLAST (1<<2) | ||
| 124 | #define S3C2410_SDIIMSK_RXFIFOFULL (1<<1) | ||
| 125 | #define S3C2410_SDIIMSK_RXFIFOHALF (1<<0) | ||
| 126 | |||
| 127 | #endif /* __ASM_ARM_REGS_SDI */ | ||
diff --git a/arch/arm/mach-s3c24xx/irq-pm.c b/arch/arm/mach-s3c24xx/irq-pm.c index e1199599873e..b91341ef2b2e 100644 --- a/arch/arm/mach-s3c24xx/irq-pm.c +++ b/arch/arm/mach-s3c24xx/irq-pm.c | |||
| @@ -16,10 +16,15 @@ | |||
| 16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
| 17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
| 18 | #include <linux/syscore_ops.h> | 18 | #include <linux/syscore_ops.h> |
| 19 | #include <linux/io.h> | ||
| 19 | 20 | ||
| 20 | #include <plat/cpu.h> | 21 | #include <plat/cpu.h> |
| 21 | #include <plat/pm.h> | 22 | #include <plat/pm.h> |
| 22 | #include <plat/irq.h> | 23 | #include <plat/map-base.h> |
| 24 | #include <plat/map-s3c.h> | ||
| 25 | |||
| 26 | #include <mach/regs-irq.h> | ||
| 27 | #include <mach/regs-gpio.h> | ||
| 23 | 28 | ||
| 24 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
| 25 | 30 | ||
diff --git a/arch/arm/mach-s3c24xx/irq.c b/arch/arm/mach-s3c24xx/irq.c index cb9f5e011e73..c1b96f7cc587 100644 --- a/arch/arm/mach-s3c24xx/irq.c +++ b/arch/arm/mach-s3c24xx/irq.c | |||
| @@ -34,7 +34,6 @@ | |||
| 34 | #include <plat/cpu.h> | 34 | #include <plat/cpu.h> |
| 35 | #include <plat/regs-irqtype.h> | 35 | #include <plat/regs-irqtype.h> |
| 36 | #include <plat/pm.h> | 36 | #include <plat/pm.h> |
| 37 | #include <plat/irq.h> | ||
| 38 | 37 | ||
| 39 | #define S3C_IRQTYPE_NONE 0 | 38 | #define S3C_IRQTYPE_NONE 0 |
| 40 | #define S3C_IRQTYPE_EINT 1 | 39 | #define S3C_IRQTYPE_EINT 1 |
| @@ -175,8 +174,7 @@ static int s3c_irqext_type_set(void __iomem *gpcon_reg, | |||
| 175 | return 0; | 174 | return 0; |
| 176 | } | 175 | } |
| 177 | 176 | ||
| 178 | /* FIXME: make static when it's out of plat-samsung/irq.h */ | 177 | static int s3c_irqext_type(struct irq_data *data, unsigned int type) |
| 179 | int s3c_irqext_type(struct irq_data *data, unsigned int type) | ||
| 180 | { | 178 | { |
| 181 | void __iomem *extint_reg; | 179 | void __iomem *extint_reg; |
| 182 | void __iomem *gpcon_reg; | 180 | void __iomem *gpcon_reg; |
| @@ -224,7 +222,7 @@ static int s3c_irqext0_type(struct irq_data *data, unsigned int type) | |||
| 224 | extint_offset, type); | 222 | extint_offset, type); |
| 225 | } | 223 | } |
| 226 | 224 | ||
| 227 | struct irq_chip s3c_irq_chip = { | 225 | static struct irq_chip s3c_irq_chip = { |
| 228 | .name = "s3c", | 226 | .name = "s3c", |
| 229 | .irq_ack = s3c_irq_ack, | 227 | .irq_ack = s3c_irq_ack, |
| 230 | .irq_mask = s3c_irq_mask, | 228 | .irq_mask = s3c_irq_mask, |
| @@ -232,7 +230,7 @@ struct irq_chip s3c_irq_chip = { | |||
| 232 | .irq_set_wake = s3c_irq_wake | 230 | .irq_set_wake = s3c_irq_wake |
| 233 | }; | 231 | }; |
| 234 | 232 | ||
| 235 | struct irq_chip s3c_irq_level_chip = { | 233 | static struct irq_chip s3c_irq_level_chip = { |
| 236 | .name = "s3c-level", | 234 | .name = "s3c-level", |
| 237 | .irq_mask = s3c_irq_mask, | 235 | .irq_mask = s3c_irq_mask, |
| 238 | .irq_unmask = s3c_irq_unmask, | 236 | .irq_unmask = s3c_irq_unmask, |
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c index 0e0279e79150..432144cb54ae 100644 --- a/arch/arm/mach-s3c24xx/mach-amlm5900.c +++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c | |||
| @@ -63,6 +63,8 @@ | |||
| 63 | #include <linux/mtd/map.h> | 63 | #include <linux/mtd/map.h> |
| 64 | #include <linux/mtd/physmap.h> | 64 | #include <linux/mtd/physmap.h> |
| 65 | 65 | ||
| 66 | #include <plat/samsung-time.h> | ||
| 67 | |||
| 66 | #include "common.h" | 68 | #include "common.h" |
| 67 | 69 | ||
| 68 | static struct resource amlm5900_nor_resource = | 70 | static struct resource amlm5900_nor_resource = |
| @@ -160,6 +162,7 @@ static void __init amlm5900_map_io(void) | |||
| 160 | s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc)); | 162 | s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc)); |
| 161 | s3c24xx_init_clocks(0); | 163 | s3c24xx_init_clocks(0); |
| 162 | s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs)); | 164 | s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs)); |
| 165 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 163 | } | 166 | } |
| 164 | 167 | ||
| 165 | #ifdef CONFIG_FB_S3C2410 | 168 | #ifdef CONFIG_FB_S3C2410 |
| @@ -237,6 +240,6 @@ MACHINE_START(AML_M5900, "AML_M5900") | |||
| 237 | .map_io = amlm5900_map_io, | 240 | .map_io = amlm5900_map_io, |
| 238 | .init_irq = s3c24xx_init_irq, | 241 | .init_irq = s3c24xx_init_irq, |
| 239 | .init_machine = amlm5900_init, | 242 | .init_machine = amlm5900_init, |
| 240 | .init_time = s3c24xx_timer_init, | 243 | .init_time = samsung_timer_init, |
| 241 | .restart = s3c2410_restart, | 244 | .restart = s3c2410_restart, |
| 242 | MACHINE_END | 245 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c index bb595f15ce36..24f1a04ccc88 100644 --- a/arch/arm/mach-s3c24xx/mach-anubis.c +++ b/arch/arm/mach-s3c24xx/mach-anubis.c | |||
| @@ -49,6 +49,7 @@ | |||
| 49 | #include <plat/devs.h> | 49 | #include <plat/devs.h> |
| 50 | #include <plat/cpu.h> | 50 | #include <plat/cpu.h> |
| 51 | #include <linux/platform_data/asoc-s3c24xx_simtec.h> | 51 | #include <linux/platform_data/asoc-s3c24xx_simtec.h> |
| 52 | #include <plat/samsung-time.h> | ||
| 52 | 53 | ||
| 53 | #include "anubis.h" | 54 | #include "anubis.h" |
| 54 | #include "common.h" | 55 | #include "common.h" |
| @@ -410,6 +411,7 @@ static void __init anubis_map_io(void) | |||
| 410 | s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc)); | 411 | s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc)); |
| 411 | s3c24xx_init_clocks(0); | 412 | s3c24xx_init_clocks(0); |
| 412 | s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs)); | 413 | s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs)); |
| 414 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 413 | 415 | ||
| 414 | /* check for the newer revision boards with large page nand */ | 416 | /* check for the newer revision boards with large page nand */ |
| 415 | 417 | ||
| @@ -444,6 +446,6 @@ MACHINE_START(ANUBIS, "Simtec-Anubis") | |||
| 444 | .map_io = anubis_map_io, | 446 | .map_io = anubis_map_io, |
| 445 | .init_machine = anubis_init, | 447 | .init_machine = anubis_init, |
| 446 | .init_irq = s3c24xx_init_irq, | 448 | .init_irq = s3c24xx_init_irq, |
| 447 | .init_time = s3c24xx_timer_init, | 449 | .init_time = samsung_timer_init, |
| 448 | .restart = s3c244x_restart, | 450 | .restart = s3c244x_restart, |
| 449 | MACHINE_END | 451 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c index b4bc60c78ebb..2bf6c8c24317 100644 --- a/arch/arm/mach-s3c24xx/mach-at2440evb.c +++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c | |||
| @@ -48,6 +48,7 @@ | |||
| 48 | #include <plat/devs.h> | 48 | #include <plat/devs.h> |
| 49 | #include <plat/cpu.h> | 49 | #include <plat/cpu.h> |
| 50 | #include <linux/platform_data/mmc-s3cmci.h> | 50 | #include <linux/platform_data/mmc-s3cmci.h> |
| 51 | #include <plat/samsung-time.h> | ||
| 51 | 52 | ||
| 52 | #include "common.h" | 53 | #include "common.h" |
| 53 | 54 | ||
| @@ -192,6 +193,7 @@ static void __init at2440evb_map_io(void) | |||
| 192 | s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc)); | 193 | s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc)); |
| 193 | s3c24xx_init_clocks(16934400); | 194 | s3c24xx_init_clocks(16934400); |
| 194 | s3c24xx_init_uarts(at2440evb_uartcfgs, ARRAY_SIZE(at2440evb_uartcfgs)); | 195 | s3c24xx_init_uarts(at2440evb_uartcfgs, ARRAY_SIZE(at2440evb_uartcfgs)); |
| 196 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 195 | } | 197 | } |
| 196 | 198 | ||
| 197 | static void __init at2440evb_init(void) | 199 | static void __init at2440evb_init(void) |
| @@ -210,6 +212,6 @@ MACHINE_START(AT2440EVB, "AT2440EVB") | |||
| 210 | .map_io = at2440evb_map_io, | 212 | .map_io = at2440evb_map_io, |
| 211 | .init_machine = at2440evb_init, | 213 | .init_machine = at2440evb_init, |
| 212 | .init_irq = s3c24xx_init_irq, | 214 | .init_irq = s3c24xx_init_irq, |
| 213 | .init_time = s3c24xx_timer_init, | 215 | .init_time = samsung_timer_init, |
| 214 | .restart = s3c244x_restart, | 216 | .restart = s3c244x_restart, |
| 215 | MACHINE_END | 217 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c index ca6618081041..eabe2db42ef6 100644 --- a/arch/arm/mach-s3c24xx/mach-bast.c +++ b/arch/arm/mach-s3c24xx/mach-bast.c | |||
| @@ -55,6 +55,7 @@ | |||
| 55 | #include <plat/devs.h> | 55 | #include <plat/devs.h> |
| 56 | #include <plat/gpio-cfg.h> | 56 | #include <plat/gpio-cfg.h> |
| 57 | #include <plat/regs-serial.h> | 57 | #include <plat/regs-serial.h> |
| 58 | #include <plat/samsung-time.h> | ||
| 58 | 59 | ||
| 59 | #include "bast.h" | 60 | #include "bast.h" |
| 60 | #include "common.h" | 61 | #include "common.h" |
| @@ -576,6 +577,7 @@ static void __init bast_map_io(void) | |||
| 576 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); | 577 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); |
| 577 | s3c24xx_init_clocks(0); | 578 | s3c24xx_init_clocks(0); |
| 578 | s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs)); | 579 | s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs)); |
| 580 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 579 | } | 581 | } |
| 580 | 582 | ||
| 581 | static void __init bast_init(void) | 583 | static void __init bast_init(void) |
| @@ -605,6 +607,6 @@ MACHINE_START(BAST, "Simtec-BAST") | |||
| 605 | .map_io = bast_map_io, | 607 | .map_io = bast_map_io, |
| 606 | .init_irq = s3c24xx_init_irq, | 608 | .init_irq = s3c24xx_init_irq, |
| 607 | .init_machine = bast_init, | 609 | .init_machine = bast_init, |
| 608 | .init_time = s3c24xx_timer_init, | 610 | .init_time = samsung_timer_init, |
| 609 | .restart = s3c2410_restart, | 611 | .restart = s3c2410_restart, |
| 610 | MACHINE_END | 612 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c index a25e8c5a7b4c..84a750d46d4b 100644 --- a/arch/arm/mach-s3c24xx/mach-gta02.c +++ b/arch/arm/mach-s3c24xx/mach-gta02.c | |||
| @@ -81,6 +81,7 @@ | |||
| 81 | #include <plat/gpio-cfg.h> | 81 | #include <plat/gpio-cfg.h> |
| 82 | #include <plat/pm.h> | 82 | #include <plat/pm.h> |
| 83 | #include <plat/regs-serial.h> | 83 | #include <plat/regs-serial.h> |
| 84 | #include <plat/samsung-time.h> | ||
| 84 | 85 | ||
| 85 | #include "common.h" | 86 | #include "common.h" |
| 86 | #include "gta02.h" | 87 | #include "gta02.h" |
| @@ -501,6 +502,7 @@ static void __init gta02_map_io(void) | |||
| 501 | s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc)); | 502 | s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc)); |
| 502 | s3c24xx_init_clocks(12000000); | 503 | s3c24xx_init_clocks(12000000); |
| 503 | s3c24xx_init_uarts(gta02_uartcfgs, ARRAY_SIZE(gta02_uartcfgs)); | 504 | s3c24xx_init_uarts(gta02_uartcfgs, ARRAY_SIZE(gta02_uartcfgs)); |
| 505 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 504 | } | 506 | } |
| 505 | 507 | ||
| 506 | 508 | ||
| @@ -589,6 +591,6 @@ MACHINE_START(NEO1973_GTA02, "GTA02") | |||
| 589 | .map_io = gta02_map_io, | 591 | .map_io = gta02_map_io, |
| 590 | .init_irq = s3c24xx_init_irq, | 592 | .init_irq = s3c24xx_init_irq, |
| 591 | .init_machine = gta02_machine_init, | 593 | .init_machine = gta02_machine_init, |
| 592 | .init_time = s3c24xx_timer_init, | 594 | .init_time = samsung_timer_init, |
| 593 | .restart = s3c244x_restart, | 595 | .restart = s3c244x_restart, |
| 594 | MACHINE_END | 596 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c index 79bc0830d740..8dd660102846 100644 --- a/arch/arm/mach-s3c24xx/mach-h1940.c +++ b/arch/arm/mach-s3c24xx/mach-h1940.c | |||
| @@ -62,7 +62,7 @@ | |||
| 62 | #include <plat/pll.h> | 62 | #include <plat/pll.h> |
| 63 | #include <plat/pm.h> | 63 | #include <plat/pm.h> |
| 64 | #include <plat/regs-serial.h> | 64 | #include <plat/regs-serial.h> |
| 65 | 65 | #include <plat/samsung-time.h> | |
| 66 | 66 | ||
| 67 | #include "common.h" | 67 | #include "common.h" |
| 68 | #include "h1940.h" | 68 | #include "h1940.h" |
| @@ -646,6 +646,7 @@ static void __init h1940_map_io(void) | |||
| 646 | s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc)); | 646 | s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc)); |
| 647 | s3c24xx_init_clocks(0); | 647 | s3c24xx_init_clocks(0); |
| 648 | s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs)); | 648 | s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs)); |
| 649 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 649 | 650 | ||
| 650 | /* setup PM */ | 651 | /* setup PM */ |
| 651 | 652 | ||
| @@ -741,6 +742,6 @@ MACHINE_START(H1940, "IPAQ-H1940") | |||
| 741 | .reserve = h1940_reserve, | 742 | .reserve = h1940_reserve, |
| 742 | .init_irq = h1940_init_irq, | 743 | .init_irq = h1940_init_irq, |
| 743 | .init_machine = h1940_init, | 744 | .init_machine = h1940_init, |
| 744 | .init_time = s3c24xx_timer_init, | 745 | .init_time = samsung_timer_init, |
| 745 | .restart = s3c2410_restart, | 746 | .restart = s3c2410_restart, |
| 746 | MACHINE_END | 747 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c index 54e83c1f780c..aade943288c7 100644 --- a/arch/arm/mach-s3c24xx/mach-jive.c +++ b/arch/arm/mach-s3c24xx/mach-jive.c | |||
| @@ -46,14 +46,15 @@ | |||
| 46 | #include <linux/mtd/nand_ecc.h> | 46 | #include <linux/mtd/nand_ecc.h> |
| 47 | #include <linux/mtd/partitions.h> | 47 | #include <linux/mtd/partitions.h> |
| 48 | 48 | ||
| 49 | #include <plat/s3c2412.h> | ||
| 50 | #include <plat/gpio-cfg.h> | 49 | #include <plat/gpio-cfg.h> |
| 51 | #include <plat/clock.h> | 50 | #include <plat/clock.h> |
| 52 | #include <plat/devs.h> | 51 | #include <plat/devs.h> |
| 53 | #include <plat/cpu.h> | 52 | #include <plat/cpu.h> |
| 54 | #include <plat/pm.h> | 53 | #include <plat/pm.h> |
| 55 | #include <linux/platform_data/usb-s3c2410_udc.h> | 54 | #include <linux/platform_data/usb-s3c2410_udc.h> |
| 55 | #include <plat/samsung-time.h> | ||
| 56 | 56 | ||
| 57 | #include "common.h" | ||
| 57 | #include "s3c2412-power.h" | 58 | #include "s3c2412-power.h" |
| 58 | 59 | ||
| 59 | static struct map_desc jive_iodesc[] __initdata = { | 60 | static struct map_desc jive_iodesc[] __initdata = { |
| @@ -506,6 +507,7 @@ static void __init jive_map_io(void) | |||
| 506 | s3c24xx_init_io(jive_iodesc, ARRAY_SIZE(jive_iodesc)); | 507 | s3c24xx_init_io(jive_iodesc, ARRAY_SIZE(jive_iodesc)); |
| 507 | s3c24xx_init_clocks(12000000); | 508 | s3c24xx_init_clocks(12000000); |
| 508 | s3c24xx_init_uarts(jive_uartcfgs, ARRAY_SIZE(jive_uartcfgs)); | 509 | s3c24xx_init_uarts(jive_uartcfgs, ARRAY_SIZE(jive_uartcfgs)); |
| 510 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 509 | } | 511 | } |
| 510 | 512 | ||
| 511 | static void jive_power_off(void) | 513 | static void jive_power_off(void) |
| @@ -661,6 +663,6 @@ MACHINE_START(JIVE, "JIVE") | |||
| 661 | .init_irq = s3c24xx_init_irq, | 663 | .init_irq = s3c24xx_init_irq, |
| 662 | .map_io = jive_map_io, | 664 | .map_io = jive_map_io, |
| 663 | .init_machine = jive_machine_init, | 665 | .init_machine = jive_machine_init, |
| 664 | .init_time = s3c24xx_timer_init, | 666 | .init_time = samsung_timer_init, |
| 665 | .restart = s3c2412_restart, | 667 | .restart = s3c2412_restart, |
| 666 | MACHINE_END | 668 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c index 2865e5919f2c..29f106cb370e 100644 --- a/arch/arm/mach-s3c24xx/mach-mini2440.c +++ b/arch/arm/mach-s3c24xx/mach-mini2440.c | |||
| @@ -56,6 +56,7 @@ | |||
| 56 | #include <plat/clock.h> | 56 | #include <plat/clock.h> |
| 57 | #include <plat/devs.h> | 57 | #include <plat/devs.h> |
| 58 | #include <plat/cpu.h> | 58 | #include <plat/cpu.h> |
| 59 | #include <plat/samsung-time.h> | ||
| 59 | 60 | ||
| 60 | #include <sound/s3c24xx_uda134x.h> | 61 | #include <sound/s3c24xx_uda134x.h> |
| 61 | 62 | ||
| @@ -525,6 +526,7 @@ static void __init mini2440_map_io(void) | |||
| 525 | s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc)); | 526 | s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc)); |
| 526 | s3c24xx_init_clocks(12000000); | 527 | s3c24xx_init_clocks(12000000); |
| 527 | s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs)); | 528 | s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs)); |
| 529 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 528 | } | 530 | } |
| 529 | 531 | ||
| 530 | /* | 532 | /* |
| @@ -687,6 +689,6 @@ MACHINE_START(MINI2440, "MINI2440") | |||
| 687 | .map_io = mini2440_map_io, | 689 | .map_io = mini2440_map_io, |
| 688 | .init_machine = mini2440_init, | 690 | .init_machine = mini2440_init, |
| 689 | .init_irq = s3c24xx_init_irq, | 691 | .init_irq = s3c24xx_init_irq, |
| 690 | .init_time = s3c24xx_timer_init, | 692 | .init_time = samsung_timer_init, |
| 691 | .restart = s3c244x_restart, | 693 | .restart = s3c244x_restart, |
| 692 | MACHINE_END | 694 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c index d9d04b240295..73a690f431e6 100644 --- a/arch/arm/mach-s3c24xx/mach-n30.c +++ b/arch/arm/mach-s3c24xx/mach-n30.c | |||
| @@ -48,8 +48,8 @@ | |||
| 48 | #include <plat/cpu.h> | 48 | #include <plat/cpu.h> |
| 49 | #include <plat/devs.h> | 49 | #include <plat/devs.h> |
| 50 | #include <linux/platform_data/mmc-s3cmci.h> | 50 | #include <linux/platform_data/mmc-s3cmci.h> |
| 51 | #include <plat/s3c2410.h> | ||
| 52 | #include <linux/platform_data/usb-s3c2410_udc.h> | 51 | #include <linux/platform_data/usb-s3c2410_udc.h> |
| 52 | #include <plat/samsung-time.h> | ||
| 53 | 53 | ||
| 54 | #include "common.h" | 54 | #include "common.h" |
| 55 | 55 | ||
| @@ -536,6 +536,7 @@ static void __init n30_map_io(void) | |||
| 536 | n30_hwinit(); | 536 | n30_hwinit(); |
| 537 | s3c24xx_init_clocks(0); | 537 | s3c24xx_init_clocks(0); |
| 538 | s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs)); | 538 | s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs)); |
| 539 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 539 | } | 540 | } |
| 540 | 541 | ||
| 541 | /* GPB3 is the line that controls the pull-up for the USB D+ line */ | 542 | /* GPB3 is the line that controls the pull-up for the USB D+ line */ |
| @@ -589,7 +590,7 @@ MACHINE_START(N30, "Acer-N30") | |||
| 589 | Ben Dooks <ben-linux@fluff.org> | 590 | Ben Dooks <ben-linux@fluff.org> |
| 590 | */ | 591 | */ |
| 591 | .atag_offset = 0x100, | 592 | .atag_offset = 0x100, |
| 592 | .init_time = s3c24xx_timer_init, | 593 | .init_time = samsung_timer_init, |
| 593 | .init_machine = n30_init, | 594 | .init_machine = n30_init, |
| 594 | .init_irq = s3c24xx_init_irq, | 595 | .init_irq = s3c24xx_init_irq, |
| 595 | .map_io = n30_map_io, | 596 | .map_io = n30_map_io, |
| @@ -600,7 +601,7 @@ MACHINE_START(N35, "Acer-N35") | |||
| 600 | /* Maintainer: Christer Weinigel <christer@weinigel.se> | 601 | /* Maintainer: Christer Weinigel <christer@weinigel.se> |
| 601 | */ | 602 | */ |
| 602 | .atag_offset = 0x100, | 603 | .atag_offset = 0x100, |
| 603 | .init_time = s3c24xx_timer_init, | 604 | .init_time = samsung_timer_init, |
| 604 | .init_machine = n30_init, | 605 | .init_machine = n30_init, |
| 605 | .init_irq = s3c24xx_init_irq, | 606 | .init_irq = s3c24xx_init_irq, |
| 606 | .map_io = n30_map_io, | 607 | .map_io = n30_map_io, |
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c24xx/mach-nexcoder.c index a454e2461860..5c826d10a66d 100644 --- a/arch/arm/mach-s3c24xx/mach-nexcoder.c +++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c | |||
| @@ -41,11 +41,10 @@ | |||
| 41 | #include <linux/platform_data/i2c-s3c2410.h> | 41 | #include <linux/platform_data/i2c-s3c2410.h> |
| 42 | 42 | ||
| 43 | #include <plat/gpio-cfg.h> | 43 | #include <plat/gpio-cfg.h> |
| 44 | #include <plat/s3c2410.h> | ||
| 45 | #include <plat/s3c244x.h> | ||
| 46 | #include <plat/clock.h> | 44 | #include <plat/clock.h> |
| 47 | #include <plat/devs.h> | 45 | #include <plat/devs.h> |
| 48 | #include <plat/cpu.h> | 46 | #include <plat/cpu.h> |
| 47 | #include <plat/samsung-time.h> | ||
| 49 | 48 | ||
| 50 | #include "common.h" | 49 | #include "common.h" |
| 51 | 50 | ||
| @@ -137,6 +136,7 @@ static void __init nexcoder_map_io(void) | |||
| 137 | s3c24xx_init_io(nexcoder_iodesc, ARRAY_SIZE(nexcoder_iodesc)); | 136 | s3c24xx_init_io(nexcoder_iodesc, ARRAY_SIZE(nexcoder_iodesc)); |
| 138 | s3c24xx_init_clocks(0); | 137 | s3c24xx_init_clocks(0); |
| 139 | s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs)); | 138 | s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs)); |
| 139 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 140 | 140 | ||
| 141 | nexcoder_sensorboard_init(); | 141 | nexcoder_sensorboard_init(); |
| 142 | } | 142 | } |
| @@ -153,6 +153,6 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") | |||
| 153 | .map_io = nexcoder_map_io, | 153 | .map_io = nexcoder_map_io, |
| 154 | .init_machine = nexcoder_init, | 154 | .init_machine = nexcoder_init, |
| 155 | .init_irq = s3c24xx_init_irq, | 155 | .init_irq = s3c24xx_init_irq, |
| 156 | .init_time = s3c24xx_timer_init, | 156 | .init_time = samsung_timer_init, |
| 157 | .restart = s3c244x_restart, | 157 | .restart = s3c244x_restart, |
| 158 | MACHINE_END | 158 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c index ae2cbdf3e3ca..4c90ffda4e11 100644 --- a/arch/arm/mach-s3c24xx/mach-osiris.c +++ b/arch/arm/mach-s3c24xx/mach-osiris.c | |||
| @@ -45,6 +45,7 @@ | |||
| 45 | #include <plat/devs.h> | 45 | #include <plat/devs.h> |
| 46 | #include <plat/gpio-cfg.h> | 46 | #include <plat/gpio-cfg.h> |
| 47 | #include <plat/regs-serial.h> | 47 | #include <plat/regs-serial.h> |
| 48 | #include <plat/samsung-time.h> | ||
| 48 | 49 | ||
| 49 | #include <mach/hardware.h> | 50 | #include <mach/hardware.h> |
| 50 | #include <mach/regs-gpio.h> | 51 | #include <mach/regs-gpio.h> |
| @@ -384,6 +385,7 @@ static void __init osiris_map_io(void) | |||
| 384 | s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc)); | 385 | s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc)); |
| 385 | s3c24xx_init_clocks(0); | 386 | s3c24xx_init_clocks(0); |
| 386 | s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs)); | 387 | s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs)); |
| 388 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 387 | 389 | ||
| 388 | /* check for the newer revision boards with large page nand */ | 390 | /* check for the newer revision boards with large page nand */ |
| 389 | 391 | ||
| @@ -426,6 +428,6 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS") | |||
| 426 | .map_io = osiris_map_io, | 428 | .map_io = osiris_map_io, |
| 427 | .init_irq = s3c24xx_init_irq, | 429 | .init_irq = s3c24xx_init_irq, |
| 428 | .init_machine = osiris_init, | 430 | .init_machine = osiris_init, |
| 429 | .init_time = s3c24xx_timer_init, | 431 | .init_time = samsung_timer_init, |
| 430 | .restart = s3c244x_restart, | 432 | .restart = s3c244x_restart, |
| 431 | MACHINE_END | 433 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c24xx/mach-otom.c index 40a47d6c6a85..7b8670746b6a 100644 --- a/arch/arm/mach-s3c24xx/mach-otom.c +++ b/arch/arm/mach-s3c24xx/mach-otom.c | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | #include <plat/cpu.h> | 33 | #include <plat/cpu.h> |
| 34 | #include <plat/devs.h> | 34 | #include <plat/devs.h> |
| 35 | #include <plat/regs-serial.h> | 35 | #include <plat/regs-serial.h> |
| 36 | #include <plat/s3c2410.h> | 36 | #include <plat/samsung-time.h> |
| 37 | 37 | ||
| 38 | #include "common.h" | 38 | #include "common.h" |
| 39 | #include "otom.h" | 39 | #include "otom.h" |
| @@ -102,6 +102,7 @@ static void __init otom11_map_io(void) | |||
| 102 | s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc)); | 102 | s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc)); |
| 103 | s3c24xx_init_clocks(0); | 103 | s3c24xx_init_clocks(0); |
| 104 | s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs)); | 104 | s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs)); |
| 105 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 105 | } | 106 | } |
| 106 | 107 | ||
| 107 | static void __init otom11_init(void) | 108 | static void __init otom11_init(void) |
| @@ -116,6 +117,6 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1") | |||
| 116 | .map_io = otom11_map_io, | 117 | .map_io = otom11_map_io, |
| 117 | .init_machine = otom11_init, | 118 | .init_machine = otom11_init, |
| 118 | .init_irq = s3c24xx_init_irq, | 119 | .init_irq = s3c24xx_init_irq, |
| 119 | .init_time = s3c24xx_timer_init, | 120 | .init_time = samsung_timer_init, |
| 120 | .restart = s3c2410_restart, | 121 | .restart = s3c2410_restart, |
| 121 | MACHINE_END | 122 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c index 56175f0941b1..71cf29b12d1f 100644 --- a/arch/arm/mach-s3c24xx/mach-qt2410.c +++ b/arch/arm/mach-s3c24xx/mach-qt2410.c | |||
| @@ -55,13 +55,14 @@ | |||
| 55 | #include <linux/platform_data/usb-s3c2410_udc.h> | 55 | #include <linux/platform_data/usb-s3c2410_udc.h> |
| 56 | #include <linux/platform_data/i2c-s3c2410.h> | 56 | #include <linux/platform_data/i2c-s3c2410.h> |
| 57 | 57 | ||
| 58 | #include <plat/common-smdk.h> | ||
| 59 | #include <plat/gpio-cfg.h> | 58 | #include <plat/gpio-cfg.h> |
| 60 | #include <plat/devs.h> | 59 | #include <plat/devs.h> |
| 61 | #include <plat/cpu.h> | 60 | #include <plat/cpu.h> |
| 62 | #include <plat/pm.h> | 61 | #include <plat/pm.h> |
| 62 | #include <plat/samsung-time.h> | ||
| 63 | 63 | ||
| 64 | #include "common.h" | 64 | #include "common.h" |
| 65 | #include "common-smdk.h" | ||
| 65 | 66 | ||
| 66 | static struct map_desc qt2410_iodesc[] __initdata = { | 67 | static struct map_desc qt2410_iodesc[] __initdata = { |
| 67 | { 0xe0000000, __phys_to_pfn(S3C2410_CS3+0x01000000), SZ_1M, MT_DEVICE } | 68 | { 0xe0000000, __phys_to_pfn(S3C2410_CS3+0x01000000), SZ_1M, MT_DEVICE } |
| @@ -304,6 +305,7 @@ static void __init qt2410_map_io(void) | |||
| 304 | s3c24xx_init_io(qt2410_iodesc, ARRAY_SIZE(qt2410_iodesc)); | 305 | s3c24xx_init_io(qt2410_iodesc, ARRAY_SIZE(qt2410_iodesc)); |
| 305 | s3c24xx_init_clocks(12*1000*1000); | 306 | s3c24xx_init_clocks(12*1000*1000); |
| 306 | s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); | 307 | s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); |
| 308 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 307 | } | 309 | } |
| 308 | 310 | ||
| 309 | static void __init qt2410_machine_init(void) | 311 | static void __init qt2410_machine_init(void) |
| @@ -343,6 +345,6 @@ MACHINE_START(QT2410, "QT2410") | |||
| 343 | .map_io = qt2410_map_io, | 345 | .map_io = qt2410_map_io, |
| 344 | .init_irq = s3c24xx_init_irq, | 346 | .init_irq = s3c24xx_init_irq, |
| 345 | .init_machine = qt2410_machine_init, | 347 | .init_machine = qt2410_machine_init, |
| 346 | .init_time = s3c24xx_timer_init, | 348 | .init_time = samsung_timer_init, |
| 347 | .restart = s3c2410_restart, | 349 | .restart = s3c2410_restart, |
| 348 | MACHINE_END | 350 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c index 1f9ba2ae5288..799af43b4e6a 100644 --- a/arch/arm/mach-s3c24xx/mach-rx1950.c +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c | |||
| @@ -58,6 +58,7 @@ | |||
| 58 | #include <plat/pm.h> | 58 | #include <plat/pm.h> |
| 59 | #include <plat/regs-iic.h> | 59 | #include <plat/regs-iic.h> |
| 60 | #include <plat/regs-serial.h> | 60 | #include <plat/regs-serial.h> |
| 61 | #include <plat/samsung-time.h> | ||
| 61 | 62 | ||
| 62 | #include "common.h" | 63 | #include "common.h" |
| 63 | #include "h1940.h" | 64 | #include "h1940.h" |
| @@ -741,6 +742,7 @@ static void __init rx1950_map_io(void) | |||
| 741 | s3c24xx_init_io(rx1950_iodesc, ARRAY_SIZE(rx1950_iodesc)); | 742 | s3c24xx_init_io(rx1950_iodesc, ARRAY_SIZE(rx1950_iodesc)); |
| 742 | s3c24xx_init_clocks(16934000); | 743 | s3c24xx_init_clocks(16934000); |
| 743 | s3c24xx_init_uarts(rx1950_uartcfgs, ARRAY_SIZE(rx1950_uartcfgs)); | 744 | s3c24xx_init_uarts(rx1950_uartcfgs, ARRAY_SIZE(rx1950_uartcfgs)); |
| 745 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 744 | 746 | ||
| 745 | /* setup PM */ | 747 | /* setup PM */ |
| 746 | 748 | ||
| @@ -813,6 +815,6 @@ MACHINE_START(RX1950, "HP iPAQ RX1950") | |||
| 813 | .reserve = rx1950_reserve, | 815 | .reserve = rx1950_reserve, |
| 814 | .init_irq = s3c24xx_init_irq, | 816 | .init_irq = s3c24xx_init_irq, |
| 815 | .init_machine = rx1950_init_machine, | 817 | .init_machine = rx1950_init_machine, |
| 816 | .init_time = s3c24xx_timer_init, | 818 | .init_time = samsung_timer_init, |
| 817 | .restart = s3c244x_restart, | 819 | .restart = s3c244x_restart, |
| 818 | MACHINE_END | 820 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24xx/mach-rx3715.c index f20418a2fb1b..0a3c96452f0f 100644 --- a/arch/arm/mach-s3c24xx/mach-rx3715.c +++ b/arch/arm/mach-s3c24xx/mach-rx3715.c | |||
| @@ -49,6 +49,7 @@ | |||
| 49 | #include <plat/devs.h> | 49 | #include <plat/devs.h> |
| 50 | #include <plat/pm.h> | 50 | #include <plat/pm.h> |
| 51 | #include <plat/regs-serial.h> | 51 | #include <plat/regs-serial.h> |
| 52 | #include <plat/samsung-time.h> | ||
| 52 | 53 | ||
| 53 | #include "common.h" | 54 | #include "common.h" |
| 54 | #include "h1940.h" | 55 | #include "h1940.h" |
| @@ -179,6 +180,7 @@ static void __init rx3715_map_io(void) | |||
| 179 | s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc)); | 180 | s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc)); |
| 180 | s3c24xx_init_clocks(16934000); | 181 | s3c24xx_init_clocks(16934000); |
| 181 | s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs)); | 182 | s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs)); |
| 183 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 182 | } | 184 | } |
| 183 | 185 | ||
| 184 | /* H1940 and RX3715 need to reserve this for suspend */ | 186 | /* H1940 and RX3715 need to reserve this for suspend */ |
| @@ -212,6 +214,6 @@ MACHINE_START(RX3715, "IPAQ-RX3715") | |||
| 212 | .reserve = rx3715_reserve, | 214 | .reserve = rx3715_reserve, |
| 213 | .init_irq = rx3715_init_irq, | 215 | .init_irq = rx3715_init_irq, |
| 214 | .init_machine = rx3715_init_machine, | 216 | .init_machine = rx3715_init_machine, |
| 215 | .init_time = s3c24xx_timer_init, | 217 | .init_time = samsung_timer_init, |
| 216 | .restart = s3c244x_restart, | 218 | .restart = s3c244x_restart, |
| 217 | MACHINE_END | 219 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2410.c b/arch/arm/mach-s3c24xx/mach-smdk2410.c index e184bfa9613a..fd96f7fc330c 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2410.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2410.c | |||
| @@ -51,10 +51,10 @@ | |||
| 51 | 51 | ||
| 52 | #include <plat/devs.h> | 52 | #include <plat/devs.h> |
| 53 | #include <plat/cpu.h> | 53 | #include <plat/cpu.h> |
| 54 | 54 | #include <plat/samsung-time.h> | |
| 55 | #include <plat/common-smdk.h> | ||
| 56 | 55 | ||
| 57 | #include "common.h" | 56 | #include "common.h" |
| 57 | #include "common-smdk.h" | ||
| 58 | 58 | ||
| 59 | static struct map_desc smdk2410_iodesc[] __initdata = { | 59 | static struct map_desc smdk2410_iodesc[] __initdata = { |
| 60 | /* nothing here yet */ | 60 | /* nothing here yet */ |
| @@ -101,6 +101,7 @@ static void __init smdk2410_map_io(void) | |||
| 101 | s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc)); | 101 | s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc)); |
| 102 | s3c24xx_init_clocks(0); | 102 | s3c24xx_init_clocks(0); |
| 103 | s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); | 103 | s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); |
| 104 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 104 | } | 105 | } |
| 105 | 106 | ||
| 106 | static void __init smdk2410_init(void) | 107 | static void __init smdk2410_init(void) |
| @@ -117,6 +118,6 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc | |||
| 117 | .map_io = smdk2410_map_io, | 118 | .map_io = smdk2410_map_io, |
| 118 | .init_irq = s3c24xx_init_irq, | 119 | .init_irq = s3c24xx_init_irq, |
| 119 | .init_machine = smdk2410_init, | 120 | .init_machine = smdk2410_init, |
| 120 | .init_time = s3c24xx_timer_init, | 121 | .init_time = samsung_timer_init, |
| 121 | .restart = s3c2410_restart, | 122 | .restart = s3c2410_restart, |
| 122 | MACHINE_END | 123 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c24xx/mach-smdk2413.c index 86d7847c9d45..8e3f1d9bbb7c 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2413.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c | |||
| @@ -41,13 +41,13 @@ | |||
| 41 | #include <linux/platform_data/i2c-s3c2410.h> | 41 | #include <linux/platform_data/i2c-s3c2410.h> |
| 42 | #include <mach/fb.h> | 42 | #include <mach/fb.h> |
| 43 | 43 | ||
| 44 | #include <plat/s3c2410.h> | ||
| 45 | #include <plat/s3c2412.h> | ||
| 46 | #include <plat/clock.h> | 44 | #include <plat/clock.h> |
| 47 | #include <plat/devs.h> | 45 | #include <plat/devs.h> |
| 48 | #include <plat/cpu.h> | 46 | #include <plat/cpu.h> |
| 47 | #include <plat/samsung-time.h> | ||
| 49 | 48 | ||
| 50 | #include <plat/common-smdk.h> | 49 | #include "common.h" |
| 50 | #include "common-smdk.h" | ||
| 51 | 51 | ||
| 52 | static struct map_desc smdk2413_iodesc[] __initdata = { | 52 | static struct map_desc smdk2413_iodesc[] __initdata = { |
| 53 | }; | 53 | }; |
| @@ -106,6 +106,7 @@ static void __init smdk2413_map_io(void) | |||
| 106 | s3c24xx_init_io(smdk2413_iodesc, ARRAY_SIZE(smdk2413_iodesc)); | 106 | s3c24xx_init_io(smdk2413_iodesc, ARRAY_SIZE(smdk2413_iodesc)); |
| 107 | s3c24xx_init_clocks(12000000); | 107 | s3c24xx_init_clocks(12000000); |
| 108 | s3c24xx_init_uarts(smdk2413_uartcfgs, ARRAY_SIZE(smdk2413_uartcfgs)); | 108 | s3c24xx_init_uarts(smdk2413_uartcfgs, ARRAY_SIZE(smdk2413_uartcfgs)); |
| 109 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 109 | } | 110 | } |
| 110 | 111 | ||
| 111 | static void __init smdk2413_machine_init(void) | 112 | static void __init smdk2413_machine_init(void) |
| @@ -132,7 +133,7 @@ MACHINE_START(S3C2413, "S3C2413") | |||
| 132 | .init_irq = s3c24xx_init_irq, | 133 | .init_irq = s3c24xx_init_irq, |
| 133 | .map_io = smdk2413_map_io, | 134 | .map_io = smdk2413_map_io, |
| 134 | .init_machine = smdk2413_machine_init, | 135 | .init_machine = smdk2413_machine_init, |
| 135 | .init_time = s3c24xx_timer_init, | 136 | .init_time = samsung_timer_init, |
| 136 | .restart = s3c2412_restart, | 137 | .restart = s3c2412_restart, |
| 137 | MACHINE_END | 138 | MACHINE_END |
| 138 | 139 | ||
| @@ -144,7 +145,7 @@ MACHINE_START(SMDK2412, "SMDK2412") | |||
| 144 | .init_irq = s3c24xx_init_irq, | 145 | .init_irq = s3c24xx_init_irq, |
| 145 | .map_io = smdk2413_map_io, | 146 | .map_io = smdk2413_map_io, |
| 146 | .init_machine = smdk2413_machine_init, | 147 | .init_machine = smdk2413_machine_init, |
| 147 | .init_time = s3c24xx_timer_init, | 148 | .init_time = samsung_timer_init, |
| 148 | .restart = s3c2412_restart, | 149 | .restart = s3c2412_restart, |
| 149 | MACHINE_END | 150 | MACHINE_END |
| 150 | 151 | ||
| @@ -156,6 +157,6 @@ MACHINE_START(SMDK2413, "SMDK2413") | |||
| 156 | .init_irq = s3c24xx_init_irq, | 157 | .init_irq = s3c24xx_init_irq, |
| 157 | .map_io = smdk2413_map_io, | 158 | .map_io = smdk2413_map_io, |
| 158 | .init_machine = smdk2413_machine_init, | 159 | .init_machine = smdk2413_machine_init, |
| 159 | .init_time = s3c24xx_timer_init, | 160 | .init_time = samsung_timer_init, |
| 160 | .restart = s3c2412_restart, | 161 | .restart = s3c2412_restart, |
| 161 | MACHINE_END | 162 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c index ebb2e61f3d07..cb46847c66b4 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2416.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c | |||
| @@ -42,7 +42,6 @@ | |||
| 42 | #include <linux/platform_data/leds-s3c24xx.h> | 42 | #include <linux/platform_data/leds-s3c24xx.h> |
| 43 | #include <linux/platform_data/i2c-s3c2410.h> | 43 | #include <linux/platform_data/i2c-s3c2410.h> |
| 44 | 44 | ||
| 45 | #include <plat/s3c2416.h> | ||
| 46 | #include <plat/gpio-cfg.h> | 45 | #include <plat/gpio-cfg.h> |
| 47 | #include <plat/clock.h> | 46 | #include <plat/clock.h> |
| 48 | #include <plat/devs.h> | 47 | #include <plat/devs.h> |
| @@ -51,10 +50,12 @@ | |||
| 51 | #include <plat/sdhci.h> | 50 | #include <plat/sdhci.h> |
| 52 | #include <linux/platform_data/usb-s3c2410_udc.h> | 51 | #include <linux/platform_data/usb-s3c2410_udc.h> |
| 53 | #include <linux/platform_data/s3c-hsudc.h> | 52 | #include <linux/platform_data/s3c-hsudc.h> |
| 53 | #include <plat/samsung-time.h> | ||
| 54 | 54 | ||
| 55 | #include <plat/fb.h> | 55 | #include <plat/fb.h> |
| 56 | 56 | ||
| 57 | #include <plat/common-smdk.h> | 57 | #include "common.h" |
| 58 | #include "common-smdk.h" | ||
| 58 | 59 | ||
| 59 | static struct map_desc smdk2416_iodesc[] __initdata = { | 60 | static struct map_desc smdk2416_iodesc[] __initdata = { |
| 60 | /* ISA IO Space map (memory space selected by A24) */ | 61 | /* ISA IO Space map (memory space selected by A24) */ |
| @@ -221,6 +222,7 @@ static void __init smdk2416_map_io(void) | |||
| 221 | s3c24xx_init_io(smdk2416_iodesc, ARRAY_SIZE(smdk2416_iodesc)); | 222 | s3c24xx_init_io(smdk2416_iodesc, ARRAY_SIZE(smdk2416_iodesc)); |
| 222 | s3c24xx_init_clocks(12000000); | 223 | s3c24xx_init_clocks(12000000); |
| 223 | s3c24xx_init_uarts(smdk2416_uartcfgs, ARRAY_SIZE(smdk2416_uartcfgs)); | 224 | s3c24xx_init_uarts(smdk2416_uartcfgs, ARRAY_SIZE(smdk2416_uartcfgs)); |
| 225 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 224 | } | 226 | } |
| 225 | 227 | ||
| 226 | static void __init smdk2416_machine_init(void) | 228 | static void __init smdk2416_machine_init(void) |
| @@ -253,6 +255,6 @@ MACHINE_START(SMDK2416, "SMDK2416") | |||
| 253 | .init_irq = s3c2416_init_irq, | 255 | .init_irq = s3c2416_init_irq, |
| 254 | .map_io = smdk2416_map_io, | 256 | .map_io = smdk2416_map_io, |
| 255 | .init_machine = smdk2416_machine_init, | 257 | .init_machine = smdk2416_machine_init, |
| 256 | .init_time = s3c24xx_timer_init, | 258 | .init_time = samsung_timer_init, |
| 257 | .restart = s3c2416_restart, | 259 | .restart = s3c2416_restart, |
| 258 | MACHINE_END | 260 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c24xx/mach-smdk2440.c index 08cc38c8a4ae..f56cb08e6d1c 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2440.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c | |||
| @@ -38,15 +38,13 @@ | |||
| 38 | #include <mach/fb.h> | 38 | #include <mach/fb.h> |
| 39 | #include <linux/platform_data/i2c-s3c2410.h> | 39 | #include <linux/platform_data/i2c-s3c2410.h> |
| 40 | 40 | ||
| 41 | #include <plat/s3c2410.h> | ||
| 42 | #include <plat/s3c244x.h> | ||
| 43 | #include <plat/clock.h> | 41 | #include <plat/clock.h> |
| 44 | #include <plat/devs.h> | 42 | #include <plat/devs.h> |
| 45 | #include <plat/cpu.h> | 43 | #include <plat/cpu.h> |
| 46 | 44 | #include <plat/samsung-time.h> | |
| 47 | #include <plat/common-smdk.h> | ||
| 48 | 45 | ||
| 49 | #include "common.h" | 46 | #include "common.h" |
| 47 | #include "common-smdk.h" | ||
| 50 | 48 | ||
| 51 | static struct map_desc smdk2440_iodesc[] __initdata = { | 49 | static struct map_desc smdk2440_iodesc[] __initdata = { |
| 52 | /* ISA IO Space map (memory space selected by A24) */ | 50 | /* ISA IO Space map (memory space selected by A24) */ |
| @@ -163,6 +161,7 @@ static void __init smdk2440_map_io(void) | |||
| 163 | s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc)); | 161 | s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc)); |
| 164 | s3c24xx_init_clocks(16934400); | 162 | s3c24xx_init_clocks(16934400); |
| 165 | s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs)); | 163 | s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs)); |
| 164 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 166 | } | 165 | } |
| 167 | 166 | ||
| 168 | static void __init smdk2440_machine_init(void) | 167 | static void __init smdk2440_machine_init(void) |
| @@ -181,6 +180,6 @@ MACHINE_START(S3C2440, "SMDK2440") | |||
| 181 | .init_irq = s3c24xx_init_irq, | 180 | .init_irq = s3c24xx_init_irq, |
| 182 | .map_io = smdk2440_map_io, | 181 | .map_io = smdk2440_map_io, |
| 183 | .init_machine = smdk2440_machine_init, | 182 | .init_machine = smdk2440_machine_init, |
| 184 | .init_time = s3c24xx_timer_init, | 183 | .init_time = samsung_timer_init, |
| 185 | .restart = s3c244x_restart, | 184 | .restart = s3c244x_restart, |
| 186 | MACHINE_END | 185 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c24xx/mach-smdk2443.c index fc65d74d3c73..9435c3bef18a 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2443.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2443.c | |||
| @@ -38,13 +38,13 @@ | |||
| 38 | #include <mach/fb.h> | 38 | #include <mach/fb.h> |
| 39 | #include <linux/platform_data/i2c-s3c2410.h> | 39 | #include <linux/platform_data/i2c-s3c2410.h> |
| 40 | 40 | ||
| 41 | #include <plat/s3c2410.h> | ||
| 42 | #include <plat/s3c2443.h> | ||
| 43 | #include <plat/clock.h> | 41 | #include <plat/clock.h> |
| 44 | #include <plat/devs.h> | 42 | #include <plat/devs.h> |
| 45 | #include <plat/cpu.h> | 43 | #include <plat/cpu.h> |
| 44 | #include <plat/samsung-time.h> | ||
| 46 | 45 | ||
| 47 | #include <plat/common-smdk.h> | 46 | #include "common.h" |
| 47 | #include "common-smdk.h" | ||
| 48 | 48 | ||
| 49 | static struct map_desc smdk2443_iodesc[] __initdata = { | 49 | static struct map_desc smdk2443_iodesc[] __initdata = { |
| 50 | /* ISA IO Space map (memory space selected by A24) */ | 50 | /* ISA IO Space map (memory space selected by A24) */ |
| @@ -122,6 +122,7 @@ static void __init smdk2443_map_io(void) | |||
| 122 | s3c24xx_init_io(smdk2443_iodesc, ARRAY_SIZE(smdk2443_iodesc)); | 122 | s3c24xx_init_io(smdk2443_iodesc, ARRAY_SIZE(smdk2443_iodesc)); |
| 123 | s3c24xx_init_clocks(12000000); | 123 | s3c24xx_init_clocks(12000000); |
| 124 | s3c24xx_init_uarts(smdk2443_uartcfgs, ARRAY_SIZE(smdk2443_uartcfgs)); | 124 | s3c24xx_init_uarts(smdk2443_uartcfgs, ARRAY_SIZE(smdk2443_uartcfgs)); |
| 125 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 125 | } | 126 | } |
| 126 | 127 | ||
| 127 | static void __init smdk2443_machine_init(void) | 128 | static void __init smdk2443_machine_init(void) |
| @@ -143,6 +144,6 @@ MACHINE_START(SMDK2443, "SMDK2443") | |||
| 143 | .init_irq = s3c2443_init_irq, | 144 | .init_irq = s3c2443_init_irq, |
| 144 | .map_io = smdk2443_map_io, | 145 | .map_io = smdk2443_map_io, |
| 145 | .init_machine = smdk2443_machine_init, | 146 | .init_machine = smdk2443_machine_init, |
| 146 | .init_time = s3c24xx_timer_init, | 147 | .init_time = samsung_timer_init, |
| 147 | .restart = s3c2443_restart, | 148 | .restart = s3c2443_restart, |
| 148 | MACHINE_END | 149 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c24xx/mach-tct_hammer.c index 24b3d79e7b2c..31dfe589e349 100644 --- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c +++ b/arch/arm/mach-s3c24xx/mach-tct_hammer.c | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | #include <linux/mtd/partitions.h> | 53 | #include <linux/mtd/partitions.h> |
| 54 | #include <linux/mtd/map.h> | 54 | #include <linux/mtd/map.h> |
| 55 | #include <linux/mtd/physmap.h> | 55 | #include <linux/mtd/physmap.h> |
| 56 | #include <plat/samsung-time.h> | ||
| 56 | 57 | ||
| 57 | #include "common.h" | 58 | #include "common.h" |
| 58 | 59 | ||
| @@ -136,6 +137,7 @@ static void __init tct_hammer_map_io(void) | |||
| 136 | s3c24xx_init_io(tct_hammer_iodesc, ARRAY_SIZE(tct_hammer_iodesc)); | 137 | s3c24xx_init_io(tct_hammer_iodesc, ARRAY_SIZE(tct_hammer_iodesc)); |
| 137 | s3c24xx_init_clocks(0); | 138 | s3c24xx_init_clocks(0); |
| 138 | s3c24xx_init_uarts(tct_hammer_uartcfgs, ARRAY_SIZE(tct_hammer_uartcfgs)); | 139 | s3c24xx_init_uarts(tct_hammer_uartcfgs, ARRAY_SIZE(tct_hammer_uartcfgs)); |
| 140 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 139 | } | 141 | } |
| 140 | 142 | ||
| 141 | static void __init tct_hammer_init(void) | 143 | static void __init tct_hammer_init(void) |
| @@ -149,6 +151,6 @@ MACHINE_START(TCT_HAMMER, "TCT_HAMMER") | |||
| 149 | .map_io = tct_hammer_map_io, | 151 | .map_io = tct_hammer_map_io, |
| 150 | .init_irq = s3c24xx_init_irq, | 152 | .init_irq = s3c24xx_init_irq, |
| 151 | .init_machine = tct_hammer_init, | 153 | .init_machine = tct_hammer_init, |
| 152 | .init_time = s3c24xx_timer_init, | 154 | .init_time = samsung_timer_init, |
| 153 | .restart = s3c2410_restart, | 155 | .restart = s3c2410_restart, |
| 154 | MACHINE_END | 156 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c24xx/mach-vr1000.c index ec42d1e4e465..deeb8a0a4034 100644 --- a/arch/arm/mach-s3c24xx/mach-vr1000.c +++ b/arch/arm/mach-s3c24xx/mach-vr1000.c | |||
| @@ -45,6 +45,7 @@ | |||
| 45 | #include <plat/cpu.h> | 45 | #include <plat/cpu.h> |
| 46 | #include <plat/devs.h> | 46 | #include <plat/devs.h> |
| 47 | #include <plat/regs-serial.h> | 47 | #include <plat/regs-serial.h> |
| 48 | #include <plat/samsung-time.h> | ||
| 48 | 49 | ||
| 49 | #include "bast.h" | 50 | #include "bast.h" |
| 50 | #include "common.h" | 51 | #include "common.h" |
| @@ -332,6 +333,7 @@ static void __init vr1000_map_io(void) | |||
| 332 | s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); | 333 | s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); |
| 333 | s3c24xx_init_clocks(0); | 334 | s3c24xx_init_clocks(0); |
| 334 | s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs)); | 335 | s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs)); |
| 336 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 335 | } | 337 | } |
| 336 | 338 | ||
| 337 | static void __init vr1000_init(void) | 339 | static void __init vr1000_init(void) |
| @@ -354,6 +356,6 @@ MACHINE_START(VR1000, "Thorcom-VR1000") | |||
| 354 | .map_io = vr1000_map_io, | 356 | .map_io = vr1000_map_io, |
| 355 | .init_machine = vr1000_init, | 357 | .init_machine = vr1000_init, |
| 356 | .init_irq = s3c24xx_init_irq, | 358 | .init_irq = s3c24xx_init_irq, |
| 357 | .init_time = s3c24xx_timer_init, | 359 | .init_time = samsung_timer_init, |
| 358 | .restart = s3c2410_restart, | 360 | .restart = s3c2410_restart, |
| 359 | MACHINE_END | 361 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx/mach-vstms.c index 3e2bfddc9df1..622a1ed24509 100644 --- a/arch/arm/mach-s3c24xx/mach-vstms.c +++ b/arch/arm/mach-s3c24xx/mach-vstms.c | |||
| @@ -41,12 +41,12 @@ | |||
| 41 | #include <linux/platform_data/i2c-s3c2410.h> | 41 | #include <linux/platform_data/i2c-s3c2410.h> |
| 42 | #include <linux/platform_data/mtd-nand-s3c2410.h> | 42 | #include <linux/platform_data/mtd-nand-s3c2410.h> |
| 43 | 43 | ||
| 44 | #include <plat/s3c2410.h> | ||
| 45 | #include <plat/s3c2412.h> | ||
| 46 | #include <plat/clock.h> | 44 | #include <plat/clock.h> |
| 47 | #include <plat/devs.h> | 45 | #include <plat/devs.h> |
| 48 | #include <plat/cpu.h> | 46 | #include <plat/cpu.h> |
| 47 | #include <plat/samsung-time.h> | ||
| 49 | 48 | ||
| 49 | #include "common.h" | ||
| 50 | 50 | ||
| 51 | static struct map_desc vstms_iodesc[] __initdata = { | 51 | static struct map_desc vstms_iodesc[] __initdata = { |
| 52 | }; | 52 | }; |
| @@ -143,6 +143,7 @@ static void __init vstms_map_io(void) | |||
| 143 | s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc)); | 143 | s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc)); |
| 144 | s3c24xx_init_clocks(12000000); | 144 | s3c24xx_init_clocks(12000000); |
| 145 | s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs)); | 145 | s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs)); |
| 146 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 146 | } | 147 | } |
| 147 | 148 | ||
| 148 | static void __init vstms_init(void) | 149 | static void __init vstms_init(void) |
| @@ -160,6 +161,6 @@ MACHINE_START(VSTMS, "VSTMS") | |||
| 160 | .init_irq = s3c24xx_init_irq, | 161 | .init_irq = s3c24xx_init_irq, |
| 161 | .init_machine = vstms_init, | 162 | .init_machine = vstms_init, |
| 162 | .map_io = vstms_map_io, | 163 | .map_io = vstms_map_io, |
| 163 | .init_time = s3c24xx_timer_init, | 164 | .init_time = samsung_timer_init, |
| 164 | .restart = s3c2412_restart, | 165 | .restart = s3c2412_restart, |
| 165 | MACHINE_END | 166 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2412.c b/arch/arm/mach-s3c24xx/pm-s3c2412.c index 668a78a8b195..4c4bc1c83b77 100644 --- a/arch/arm/mach-s3c24xx/pm-s3c2412.c +++ b/arch/arm/mach-s3c24xx/pm-s3c2412.c | |||
| @@ -29,7 +29,6 @@ | |||
| 29 | 29 | ||
| 30 | #include <plat/cpu.h> | 30 | #include <plat/cpu.h> |
| 31 | #include <plat/pm.h> | 31 | #include <plat/pm.h> |
| 32 | #include <plat/s3c2412.h> | ||
| 33 | 32 | ||
| 34 | #include "regs-dsc.h" | 33 | #include "regs-dsc.h" |
| 35 | #include "s3c2412-power.h" | 34 | #include "s3c2412-power.h" |
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c index 9ebef95da721..d850ea5adac2 100644 --- a/arch/arm/mach-s3c24xx/s3c2410.c +++ b/arch/arm/mach-s3c24xx/s3c2410.c | |||
| @@ -37,7 +37,6 @@ | |||
| 37 | #include <mach/regs-clock.h> | 37 | #include <mach/regs-clock.h> |
| 38 | #include <plat/regs-serial.h> | 38 | #include <plat/regs-serial.h> |
| 39 | 39 | ||
| 40 | #include <plat/s3c2410.h> | ||
| 41 | #include <plat/cpu.h> | 40 | #include <plat/cpu.h> |
| 42 | #include <plat/devs.h> | 41 | #include <plat/devs.h> |
| 43 | #include <plat/clock.h> | 42 | #include <plat/clock.h> |
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c index 0d592159a5c3..0f864d4c97de 100644 --- a/arch/arm/mach-s3c24xx/s3c2412.c +++ b/arch/arm/mach-s3c24xx/s3c2412.c | |||
| @@ -44,7 +44,6 @@ | |||
| 44 | #include <plat/pm.h> | 44 | #include <plat/pm.h> |
| 45 | #include <plat/regs-serial.h> | 45 | #include <plat/regs-serial.h> |
| 46 | #include <plat/regs-spi.h> | 46 | #include <plat/regs-spi.h> |
| 47 | #include <plat/s3c2412.h> | ||
| 48 | 47 | ||
| 49 | #include "common.h" | 48 | #include "common.h" |
| 50 | #include "regs-dsc.h" | 49 | #include "regs-dsc.h" |
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c index e30476db0295..b9c5d382dafb 100644 --- a/arch/arm/mach-s3c24xx/s3c2416.c +++ b/arch/arm/mach-s3c24xx/s3c2416.c | |||
| @@ -50,7 +50,6 @@ | |||
| 50 | #include <plat/gpio-core.h> | 50 | #include <plat/gpio-core.h> |
| 51 | #include <plat/gpio-cfg.h> | 51 | #include <plat/gpio-cfg.h> |
| 52 | #include <plat/gpio-cfg-helpers.h> | 52 | #include <plat/gpio-cfg-helpers.h> |
| 53 | #include <plat/s3c2416.h> | ||
| 54 | #include <plat/devs.h> | 53 | #include <plat/devs.h> |
| 55 | #include <plat/cpu.h> | 54 | #include <plat/cpu.h> |
| 56 | #include <plat/sdhci.h> | 55 | #include <plat/sdhci.h> |
diff --git a/arch/arm/mach-s3c24xx/s3c2440.c b/arch/arm/mach-s3c24xx/s3c2440.c index 559e394e8989..5f9d6569475d 100644 --- a/arch/arm/mach-s3c24xx/s3c2440.c +++ b/arch/arm/mach-s3c24xx/s3c2440.c | |||
| @@ -33,7 +33,6 @@ | |||
| 33 | 33 | ||
| 34 | #include <plat/devs.h> | 34 | #include <plat/devs.h> |
| 35 | #include <plat/cpu.h> | 35 | #include <plat/cpu.h> |
| 36 | #include <plat/s3c244x.h> | ||
| 37 | #include <plat/pm.h> | 36 | #include <plat/pm.h> |
| 38 | 37 | ||
| 39 | #include <plat/gpio-core.h> | 38 | #include <plat/gpio-core.h> |
diff --git a/arch/arm/mach-s3c24xx/s3c2442.c b/arch/arm/mach-s3c24xx/s3c2442.c index f732826c2359..6819961f6b19 100644 --- a/arch/arm/mach-s3c24xx/s3c2442.c +++ b/arch/arm/mach-s3c24xx/s3c2442.c | |||
| @@ -44,7 +44,6 @@ | |||
| 44 | 44 | ||
| 45 | #include <plat/clock.h> | 45 | #include <plat/clock.h> |
| 46 | #include <plat/cpu.h> | 46 | #include <plat/cpu.h> |
| 47 | #include <plat/s3c244x.h> | ||
| 48 | #include <plat/pm.h> | 47 | #include <plat/pm.h> |
| 49 | 48 | ||
| 50 | #include <plat/gpio-core.h> | 49 | #include <plat/gpio-core.h> |
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c index 165b6a6b3daa..8328cd65bf3d 100644 --- a/arch/arm/mach-s3c24xx/s3c2443.c +++ b/arch/arm/mach-s3c24xx/s3c2443.c | |||
| @@ -36,7 +36,6 @@ | |||
| 36 | #include <plat/gpio-core.h> | 36 | #include <plat/gpio-core.h> |
| 37 | #include <plat/gpio-cfg.h> | 37 | #include <plat/gpio-cfg.h> |
| 38 | #include <plat/gpio-cfg-helpers.h> | 38 | #include <plat/gpio-cfg-helpers.h> |
| 39 | #include <plat/s3c2443.h> | ||
| 40 | #include <plat/devs.h> | 39 | #include <plat/devs.h> |
| 41 | #include <plat/cpu.h> | 40 | #include <plat/cpu.h> |
| 42 | #include <plat/fb-core.h> | 41 | #include <plat/fb-core.h> |
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c index ad2671baa910..2a35edb67354 100644 --- a/arch/arm/mach-s3c24xx/s3c244x.c +++ b/arch/arm/mach-s3c24xx/s3c244x.c | |||
| @@ -37,8 +37,6 @@ | |||
| 37 | #include <plat/regs-serial.h> | 37 | #include <plat/regs-serial.h> |
| 38 | #include <mach/regs-gpio.h> | 38 | #include <mach/regs-gpio.h> |
| 39 | 39 | ||
| 40 | #include <plat/s3c2410.h> | ||
| 41 | #include <plat/s3c244x.h> | ||
| 42 | #include <plat/clock.h> | 40 | #include <plat/clock.h> |
| 43 | #include <plat/devs.h> | 41 | #include <plat/devs.h> |
| 44 | #include <plat/cpu.h> | 42 | #include <plat/cpu.h> |
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index 131c86284711..283cb77d4721 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig | |||
| @@ -17,11 +17,13 @@ config PLAT_S3C64XX | |||
| 17 | # Configuration options for the S3C6410 CPU | 17 | # Configuration options for the S3C6410 CPU |
| 18 | 18 | ||
| 19 | config CPU_S3C6400 | 19 | config CPU_S3C6400 |
| 20 | select SAMSUNG_HRT | ||
| 20 | bool | 21 | bool |
| 21 | help | 22 | help |
| 22 | Enable S3C6400 CPU support | 23 | Enable S3C6400 CPU support |
| 23 | 24 | ||
| 24 | config CPU_S3C6410 | 25 | config CPU_S3C6410 |
| 26 | select SAMSUNG_HRT | ||
| 25 | bool | 27 | bool |
| 26 | help | 28 | help |
| 27 | Enable S3C6410 CPU support | 29 | Enable S3C6410 CPU support |
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c index 728eef3296b2..35e3f54574ef 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c | |||
| @@ -49,6 +49,7 @@ | |||
| 49 | #include <plat/devs.h> | 49 | #include <plat/devs.h> |
| 50 | #include <plat/cpu.h> | 50 | #include <plat/cpu.h> |
| 51 | #include <mach/regs-gpio.h> | 51 | #include <mach/regs-gpio.h> |
| 52 | #include <plat/samsung-time.h> | ||
| 52 | 53 | ||
| 53 | #include "common.h" | 54 | #include "common.h" |
| 54 | #include "regs-modem.h" | 55 | #include "regs-modem.h" |
| @@ -208,6 +209,7 @@ static void __init anw6410_map_io(void) | |||
| 208 | s3c64xx_init_io(anw6410_iodesc, ARRAY_SIZE(anw6410_iodesc)); | 209 | s3c64xx_init_io(anw6410_iodesc, ARRAY_SIZE(anw6410_iodesc)); |
| 209 | s3c24xx_init_clocks(12000000); | 210 | s3c24xx_init_clocks(12000000); |
| 210 | s3c24xx_init_uarts(anw6410_uartcfgs, ARRAY_SIZE(anw6410_uartcfgs)); | 211 | s3c24xx_init_uarts(anw6410_uartcfgs, ARRAY_SIZE(anw6410_uartcfgs)); |
| 212 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 211 | 213 | ||
| 212 | anw6410_lcd_mode_set(); | 214 | anw6410_lcd_mode_set(); |
| 213 | } | 215 | } |
| @@ -232,6 +234,6 @@ MACHINE_START(ANW6410, "A&W6410") | |||
| 232 | .map_io = anw6410_map_io, | 234 | .map_io = anw6410_map_io, |
| 233 | .init_machine = anw6410_machine_init, | 235 | .init_machine = anw6410_machine_init, |
| 234 | .init_late = s3c64xx_init_late, | 236 | .init_late = s3c64xx_init_late, |
| 235 | .init_time = s3c24xx_timer_init, | 237 | .init_time = samsung_timer_init, |
| 236 | .restart = s3c64xx_restart, | 238 | .restart = s3c64xx_restart, |
| 237 | MACHINE_END | 239 | MACHINE_END |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 1acf02bace57..8ad88ace795a 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c | |||
| @@ -64,6 +64,7 @@ | |||
| 64 | #include <plat/adc.h> | 64 | #include <plat/adc.h> |
| 65 | #include <linux/platform_data/i2c-s3c2410.h> | 65 | #include <linux/platform_data/i2c-s3c2410.h> |
| 66 | #include <plat/pm.h> | 66 | #include <plat/pm.h> |
| 67 | #include <plat/samsung-time.h> | ||
| 67 | 68 | ||
| 68 | #include "common.h" | 69 | #include "common.h" |
| 69 | #include "crag6410.h" | 70 | #include "crag6410.h" |
| @@ -744,6 +745,7 @@ static void __init crag6410_map_io(void) | |||
| 744 | s3c64xx_init_io(NULL, 0); | 745 | s3c64xx_init_io(NULL, 0); |
| 745 | s3c24xx_init_clocks(12000000); | 746 | s3c24xx_init_clocks(12000000); |
| 746 | s3c24xx_init_uarts(crag6410_uartcfgs, ARRAY_SIZE(crag6410_uartcfgs)); | 747 | s3c24xx_init_uarts(crag6410_uartcfgs, ARRAY_SIZE(crag6410_uartcfgs)); |
| 748 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 747 | 749 | ||
| 748 | /* LCD type and Bypass set by bootloader */ | 750 | /* LCD type and Bypass set by bootloader */ |
| 749 | } | 751 | } |
| @@ -868,6 +870,6 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410") | |||
| 868 | .map_io = crag6410_map_io, | 870 | .map_io = crag6410_map_io, |
| 869 | .init_machine = crag6410_machine_init, | 871 | .init_machine = crag6410_machine_init, |
| 870 | .init_late = s3c64xx_init_late, | 872 | .init_late = s3c64xx_init_late, |
| 871 | .init_time = s3c24xx_timer_init, | 873 | .init_time = samsung_timer_init, |
| 872 | .restart = s3c64xx_restart, | 874 | .restart = s3c64xx_restart, |
| 873 | MACHINE_END | 875 | MACHINE_END |
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index 7212eb9cfeb9..5b7f357d8c22 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | #include <plat/clock.h> | 41 | #include <plat/clock.h> |
| 42 | #include <plat/devs.h> | 42 | #include <plat/devs.h> |
| 43 | #include <plat/cpu.h> | 43 | #include <plat/cpu.h> |
| 44 | #include <plat/samsung-time.h> | ||
| 44 | 45 | ||
| 45 | #include "common.h" | 46 | #include "common.h" |
| 46 | 47 | ||
| @@ -248,6 +249,7 @@ static void __init hmt_map_io(void) | |||
| 248 | s3c64xx_init_io(hmt_iodesc, ARRAY_SIZE(hmt_iodesc)); | 249 | s3c64xx_init_io(hmt_iodesc, ARRAY_SIZE(hmt_iodesc)); |
| 249 | s3c24xx_init_clocks(12000000); | 250 | s3c24xx_init_clocks(12000000); |
| 250 | s3c24xx_init_uarts(hmt_uartcfgs, ARRAY_SIZE(hmt_uartcfgs)); | 251 | s3c24xx_init_uarts(hmt_uartcfgs, ARRAY_SIZE(hmt_uartcfgs)); |
| 252 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 251 | } | 253 | } |
| 252 | 254 | ||
| 253 | static void __init hmt_machine_init(void) | 255 | static void __init hmt_machine_init(void) |
| @@ -275,6 +277,6 @@ MACHINE_START(HMT, "Airgoo-HMT") | |||
| 275 | .map_io = hmt_map_io, | 277 | .map_io = hmt_map_io, |
| 276 | .init_machine = hmt_machine_init, | 278 | .init_machine = hmt_machine_init, |
| 277 | .init_late = s3c64xx_init_late, | 279 | .init_late = s3c64xx_init_late, |
| 278 | .init_time = s3c24xx_timer_init, | 280 | .init_time = samsung_timer_init, |
| 279 | .restart = s3c64xx_restart, | 281 | .restart = s3c64xx_restart, |
| 280 | MACHINE_END | 282 | MACHINE_END |
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index 4b41fcdaa7b6..fc043e3ecdf8 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | 41 | ||
| 42 | #include <video/platform_lcd.h> | 42 | #include <video/platform_lcd.h> |
| 43 | #include <video/samsung_fimd.h> | 43 | #include <video/samsung_fimd.h> |
| 44 | #include <plat/samsung-time.h> | ||
| 44 | 45 | ||
| 45 | #include "common.h" | 46 | #include "common.h" |
| 46 | #include "regs-modem.h" | 47 | #include "regs-modem.h" |
| @@ -232,6 +233,7 @@ static void __init mini6410_map_io(void) | |||
| 232 | s3c64xx_init_io(NULL, 0); | 233 | s3c64xx_init_io(NULL, 0); |
| 233 | s3c24xx_init_clocks(12000000); | 234 | s3c24xx_init_clocks(12000000); |
| 234 | s3c24xx_init_uarts(mini6410_uartcfgs, ARRAY_SIZE(mini6410_uartcfgs)); | 235 | s3c24xx_init_uarts(mini6410_uartcfgs, ARRAY_SIZE(mini6410_uartcfgs)); |
| 236 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 235 | 237 | ||
| 236 | /* set the LCD type */ | 238 | /* set the LCD type */ |
| 237 | tmp = __raw_readl(S3C64XX_SPCON); | 239 | tmp = __raw_readl(S3C64XX_SPCON); |
| @@ -354,6 +356,6 @@ MACHINE_START(MINI6410, "MINI6410") | |||
| 354 | .map_io = mini6410_map_io, | 356 | .map_io = mini6410_map_io, |
| 355 | .init_machine = mini6410_machine_init, | 357 | .init_machine = mini6410_machine_init, |
| 356 | .init_late = s3c64xx_init_late, | 358 | .init_late = s3c64xx_init_late, |
| 357 | .init_time = s3c24xx_timer_init, | 359 | .init_time = samsung_timer_init, |
| 358 | .restart = s3c64xx_restart, | 360 | .restart = s3c64xx_restart, |
| 359 | MACHINE_END | 361 | MACHINE_END |
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c index 8d3cedd995ff..7e2c3908f1f8 100644 --- a/arch/arm/mach-s3c64xx/mach-ncp.c +++ b/arch/arm/mach-s3c64xx/mach-ncp.c | |||
| @@ -43,6 +43,7 @@ | |||
| 43 | #include <plat/clock.h> | 43 | #include <plat/clock.h> |
| 44 | #include <plat/devs.h> | 44 | #include <plat/devs.h> |
| 45 | #include <plat/cpu.h> | 45 | #include <plat/cpu.h> |
| 46 | #include <plat/samsung-time.h> | ||
| 46 | 47 | ||
| 47 | #include "common.h" | 48 | #include "common.h" |
| 48 | 49 | ||
| @@ -87,6 +88,7 @@ static void __init ncp_map_io(void) | |||
| 87 | s3c64xx_init_io(ncp_iodesc, ARRAY_SIZE(ncp_iodesc)); | 88 | s3c64xx_init_io(ncp_iodesc, ARRAY_SIZE(ncp_iodesc)); |
| 88 | s3c24xx_init_clocks(12000000); | 89 | s3c24xx_init_clocks(12000000); |
| 89 | s3c24xx_init_uarts(ncp_uartcfgs, ARRAY_SIZE(ncp_uartcfgs)); | 90 | s3c24xx_init_uarts(ncp_uartcfgs, ARRAY_SIZE(ncp_uartcfgs)); |
| 91 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 90 | } | 92 | } |
| 91 | 93 | ||
| 92 | static void __init ncp_machine_init(void) | 94 | static void __init ncp_machine_init(void) |
| @@ -103,6 +105,6 @@ MACHINE_START(NCP, "NCP") | |||
| 103 | .map_io = ncp_map_io, | 105 | .map_io = ncp_map_io, |
| 104 | .init_machine = ncp_machine_init, | 106 | .init_machine = ncp_machine_init, |
| 105 | .init_late = s3c64xx_init_late, | 107 | .init_late = s3c64xx_init_late, |
| 106 | .init_time = s3c24xx_timer_init, | 108 | .init_time = samsung_timer_init, |
| 107 | .restart = s3c64xx_restart, | 109 | .restart = s3c64xx_restart, |
| 108 | MACHINE_END | 110 | MACHINE_END |
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c index fa12bd21ad82..8bed37b3d5ac 100644 --- a/arch/arm/mach-s3c64xx/mach-real6410.c +++ b/arch/arm/mach-s3c64xx/mach-real6410.c | |||
| @@ -42,6 +42,7 @@ | |||
| 42 | 42 | ||
| 43 | #include <video/platform_lcd.h> | 43 | #include <video/platform_lcd.h> |
| 44 | #include <video/samsung_fimd.h> | 44 | #include <video/samsung_fimd.h> |
| 45 | #include <plat/samsung-time.h> | ||
| 45 | 46 | ||
| 46 | #include "common.h" | 47 | #include "common.h" |
| 47 | #include "regs-modem.h" | 48 | #include "regs-modem.h" |
| @@ -211,6 +212,7 @@ static void __init real6410_map_io(void) | |||
| 211 | s3c64xx_init_io(NULL, 0); | 212 | s3c64xx_init_io(NULL, 0); |
| 212 | s3c24xx_init_clocks(12000000); | 213 | s3c24xx_init_clocks(12000000); |
| 213 | s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs)); | 214 | s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs)); |
| 215 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 214 | 216 | ||
| 215 | /* set the LCD type */ | 217 | /* set the LCD type */ |
| 216 | tmp = __raw_readl(S3C64XX_SPCON); | 218 | tmp = __raw_readl(S3C64XX_SPCON); |
| @@ -333,6 +335,6 @@ MACHINE_START(REAL6410, "REAL6410") | |||
| 333 | .map_io = real6410_map_io, | 335 | .map_io = real6410_map_io, |
| 334 | .init_machine = real6410_machine_init, | 336 | .init_machine = real6410_machine_init, |
| 335 | .init_late = s3c64xx_init_late, | 337 | .init_late = s3c64xx_init_late, |
| 336 | .init_time = s3c24xx_timer_init, | 338 | .init_time = samsung_timer_init, |
| 337 | .restart = s3c64xx_restart, | 339 | .restart = s3c64xx_restart, |
| 338 | MACHINE_END | 340 | MACHINE_END |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c index fc3e9b32e26f..58ac99041274 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq.c +++ b/arch/arm/mach-s3c64xx/mach-smartq.c | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #include <linux/platform_data/touchscreen-s3c2410.h> | 38 | #include <linux/platform_data/touchscreen-s3c2410.h> |
| 39 | 39 | ||
| 40 | #include <video/platform_lcd.h> | 40 | #include <video/platform_lcd.h> |
| 41 | #include <plat/samsung-time.h> | ||
| 41 | 42 | ||
| 42 | #include "common.h" | 43 | #include "common.h" |
| 43 | #include "regs-modem.h" | 44 | #include "regs-modem.h" |
| @@ -378,6 +379,7 @@ void __init smartq_map_io(void) | |||
| 378 | s3c64xx_init_io(smartq_iodesc, ARRAY_SIZE(smartq_iodesc)); | 379 | s3c64xx_init_io(smartq_iodesc, ARRAY_SIZE(smartq_iodesc)); |
| 379 | s3c24xx_init_clocks(12000000); | 380 | s3c24xx_init_clocks(12000000); |
| 380 | s3c24xx_init_uarts(smartq_uartcfgs, ARRAY_SIZE(smartq_uartcfgs)); | 381 | s3c24xx_init_uarts(smartq_uartcfgs, ARRAY_SIZE(smartq_uartcfgs)); |
| 382 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 381 | 383 | ||
| 382 | smartq_lcd_mode_set(); | 384 | smartq_lcd_mode_set(); |
| 383 | } | 385 | } |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c index ca2afcfce573..8aca5daf3d05 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq5.c +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <plat/devs.h> | 28 | #include <plat/devs.h> |
| 29 | #include <plat/fb.h> | 29 | #include <plat/fb.h> |
| 30 | #include <plat/gpio-cfg.h> | 30 | #include <plat/gpio-cfg.h> |
| 31 | #include <plat/samsung-time.h> | ||
| 31 | 32 | ||
| 32 | #include "common.h" | 33 | #include "common.h" |
| 33 | #include "mach-smartq.h" | 34 | #include "mach-smartq.h" |
| @@ -155,6 +156,6 @@ MACHINE_START(SMARTQ5, "SmartQ 5") | |||
| 155 | .map_io = smartq_map_io, | 156 | .map_io = smartq_map_io, |
| 156 | .init_machine = smartq5_machine_init, | 157 | .init_machine = smartq5_machine_init, |
| 157 | .init_late = s3c64xx_init_late, | 158 | .init_late = s3c64xx_init_late, |
| 158 | .init_time = s3c24xx_timer_init, | 159 | .init_time = samsung_timer_init, |
| 159 | .restart = s3c64xx_restart, | 160 | .restart = s3c64xx_restart, |
| 160 | MACHINE_END | 161 | MACHINE_END |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c index 37bb0c632a5e..a052e107c0b4 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq7.c +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <plat/devs.h> | 28 | #include <plat/devs.h> |
| 29 | #include <plat/fb.h> | 29 | #include <plat/fb.h> |
| 30 | #include <plat/gpio-cfg.h> | 30 | #include <plat/gpio-cfg.h> |
| 31 | #include <plat/samsung-time.h> | ||
| 31 | 32 | ||
| 32 | #include "common.h" | 33 | #include "common.h" |
| 33 | #include "mach-smartq.h" | 34 | #include "mach-smartq.h" |
| @@ -171,6 +172,6 @@ MACHINE_START(SMARTQ7, "SmartQ 7") | |||
| 171 | .map_io = smartq_map_io, | 172 | .map_io = smartq_map_io, |
| 172 | .init_machine = smartq7_machine_init, | 173 | .init_machine = smartq7_machine_init, |
| 173 | .init_late = s3c64xx_init_late, | 174 | .init_late = s3c64xx_init_late, |
| 174 | .init_time = s3c24xx_timer_init, | 175 | .init_time = samsung_timer_init, |
| 175 | .restart = s3c64xx_restart, | 176 | .restart = s3c64xx_restart, |
| 176 | MACHINE_END | 177 | MACHINE_END |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c index a392869c8342..d70c0843aea2 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6400.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <plat/devs.h> | 35 | #include <plat/devs.h> |
| 36 | #include <plat/cpu.h> | 36 | #include <plat/cpu.h> |
| 37 | #include <linux/platform_data/i2c-s3c2410.h> | 37 | #include <linux/platform_data/i2c-s3c2410.h> |
| 38 | #include <plat/samsung-time.h> | ||
| 38 | 39 | ||
| 39 | #include "common.h" | 40 | #include "common.h" |
| 40 | 41 | ||
| @@ -66,6 +67,7 @@ static void __init smdk6400_map_io(void) | |||
| 66 | s3c64xx_init_io(smdk6400_iodesc, ARRAY_SIZE(smdk6400_iodesc)); | 67 | s3c64xx_init_io(smdk6400_iodesc, ARRAY_SIZE(smdk6400_iodesc)); |
| 67 | s3c24xx_init_clocks(12000000); | 68 | s3c24xx_init_clocks(12000000); |
| 68 | s3c24xx_init_uarts(smdk6400_uartcfgs, ARRAY_SIZE(smdk6400_uartcfgs)); | 69 | s3c24xx_init_uarts(smdk6400_uartcfgs, ARRAY_SIZE(smdk6400_uartcfgs)); |
| 70 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 69 | } | 71 | } |
| 70 | 72 | ||
| 71 | static struct platform_device *smdk6400_devices[] __initdata = { | 73 | static struct platform_device *smdk6400_devices[] __initdata = { |
| @@ -92,6 +94,6 @@ MACHINE_START(SMDK6400, "SMDK6400") | |||
| 92 | .map_io = smdk6400_map_io, | 94 | .map_io = smdk6400_map_io, |
| 93 | .init_machine = smdk6400_machine_init, | 95 | .init_machine = smdk6400_machine_init, |
| 94 | .init_late = s3c64xx_init_late, | 96 | .init_late = s3c64xx_init_late, |
| 95 | .init_time = s3c24xx_timer_init, | 97 | .init_time = samsung_timer_init, |
| 96 | .restart = s3c64xx_restart, | 98 | .restart = s3c64xx_restart, |
| 97 | MACHINE_END | 99 | MACHINE_END |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index ba7544e2d04d..bd3295a19ad7 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
| @@ -69,6 +69,7 @@ | |||
| 69 | #include <linux/platform_data/touchscreen-s3c2410.h> | 69 | #include <linux/platform_data/touchscreen-s3c2410.h> |
| 70 | #include <plat/keypad.h> | 70 | #include <plat/keypad.h> |
| 71 | #include <plat/backlight.h> | 71 | #include <plat/backlight.h> |
| 72 | #include <plat/samsung-time.h> | ||
| 72 | 73 | ||
| 73 | #include "common.h" | 74 | #include "common.h" |
| 74 | #include "regs-modem.h" | 75 | #include "regs-modem.h" |
| @@ -634,6 +635,7 @@ static void __init smdk6410_map_io(void) | |||
| 634 | s3c64xx_init_io(smdk6410_iodesc, ARRAY_SIZE(smdk6410_iodesc)); | 635 | s3c64xx_init_io(smdk6410_iodesc, ARRAY_SIZE(smdk6410_iodesc)); |
| 635 | s3c24xx_init_clocks(12000000); | 636 | s3c24xx_init_clocks(12000000); |
| 636 | s3c24xx_init_uarts(smdk6410_uartcfgs, ARRAY_SIZE(smdk6410_uartcfgs)); | 637 | s3c24xx_init_uarts(smdk6410_uartcfgs, ARRAY_SIZE(smdk6410_uartcfgs)); |
| 638 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 637 | 639 | ||
| 638 | /* set the LCD type */ | 640 | /* set the LCD type */ |
| 639 | 641 | ||
| @@ -702,6 +704,6 @@ MACHINE_START(SMDK6410, "SMDK6410") | |||
| 702 | .map_io = smdk6410_map_io, | 704 | .map_io = smdk6410_map_io, |
| 703 | .init_machine = smdk6410_machine_init, | 705 | .init_machine = smdk6410_machine_init, |
| 704 | .init_late = s3c64xx_init_late, | 706 | .init_late = s3c64xx_init_late, |
| 705 | .init_time = s3c24xx_timer_init, | 707 | .init_time = samsung_timer_init, |
| 706 | .restart = s3c64xx_restart, | 708 | .restart = s3c64xx_restart, |
| 707 | MACHINE_END | 709 | MACHINE_END |
diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig index e8742cb7ddd9..5a707bdb9ea0 100644 --- a/arch/arm/mach-s5p64x0/Kconfig +++ b/arch/arm/mach-s5p64x0/Kconfig | |||
| @@ -9,16 +9,16 @@ if ARCH_S5P64X0 | |||
| 9 | 9 | ||
| 10 | config CPU_S5P6440 | 10 | config CPU_S5P6440 |
| 11 | bool | 11 | bool |
| 12 | select S5P_HRT | ||
| 13 | select S5P_SLEEP if PM | 12 | select S5P_SLEEP if PM |
| 14 | select SAMSUNG_DMADEV | 13 | select SAMSUNG_DMADEV |
| 14 | select SAMSUNG_HRT | ||
| 15 | select SAMSUNG_WAKEMASK if PM | 15 | select SAMSUNG_WAKEMASK if PM |
| 16 | help | 16 | help |
| 17 | Enable S5P6440 CPU support | 17 | Enable S5P6440 CPU support |
| 18 | 18 | ||
| 19 | config CPU_S5P6450 | 19 | config CPU_S5P6450 |
| 20 | bool | 20 | bool |
| 21 | select S5P_HRT | 21 | select SAMSUNG_HRT |
| 22 | select S5P_SLEEP if PM | 22 | select S5P_SLEEP if PM |
| 23 | select SAMSUNG_DMADEV | 23 | select SAMSUNG_DMADEV |
| 24 | select SAMSUNG_WAKEMASK if PM | 24 | select SAMSUNG_WAKEMASK if PM |
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c index e23723a5a214..73f71a698a34 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6440.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | #include <plat/pll.h> | 48 | #include <plat/pll.h> |
| 49 | #include <plat/adc.h> | 49 | #include <plat/adc.h> |
| 50 | #include <linux/platform_data/touchscreen-s3c2410.h> | 50 | #include <linux/platform_data/touchscreen-s3c2410.h> |
| 51 | #include <plat/s5p-time.h> | 51 | #include <plat/samsung-time.h> |
| 52 | #include <plat/backlight.h> | 52 | #include <plat/backlight.h> |
| 53 | #include <plat/fb.h> | 53 | #include <plat/fb.h> |
| 54 | #include <plat/sdhci.h> | 54 | #include <plat/sdhci.h> |
| @@ -229,7 +229,7 @@ static void __init smdk6440_map_io(void) | |||
| 229 | s5p64x0_init_io(NULL, 0); | 229 | s5p64x0_init_io(NULL, 0); |
| 230 | s3c24xx_init_clocks(12000000); | 230 | s3c24xx_init_clocks(12000000); |
| 231 | s3c24xx_init_uarts(smdk6440_uartcfgs, ARRAY_SIZE(smdk6440_uartcfgs)); | 231 | s3c24xx_init_uarts(smdk6440_uartcfgs, ARRAY_SIZE(smdk6440_uartcfgs)); |
| 232 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); | 232 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | static void s5p6440_set_lcd_interface(void) | 235 | static void s5p6440_set_lcd_interface(void) |
| @@ -273,6 +273,6 @@ MACHINE_START(SMDK6440, "SMDK6440") | |||
| 273 | .init_irq = s5p6440_init_irq, | 273 | .init_irq = s5p6440_init_irq, |
| 274 | .map_io = smdk6440_map_io, | 274 | .map_io = smdk6440_map_io, |
| 275 | .init_machine = smdk6440_machine_init, | 275 | .init_machine = smdk6440_machine_init, |
| 276 | .init_time = s5p_timer_init, | 276 | .init_time = samsung_timer_init, |
| 277 | .restart = s5p64x0_restart, | 277 | .restart = s5p64x0_restart, |
| 278 | MACHINE_END | 278 | MACHINE_END |
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c index ca10963a959e..18303e12019f 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6450.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | #include <plat/pll.h> | 48 | #include <plat/pll.h> |
| 49 | #include <plat/adc.h> | 49 | #include <plat/adc.h> |
| 50 | #include <linux/platform_data/touchscreen-s3c2410.h> | 50 | #include <linux/platform_data/touchscreen-s3c2410.h> |
| 51 | #include <plat/s5p-time.h> | 51 | #include <plat/samsung-time.h> |
| 52 | #include <plat/backlight.h> | 52 | #include <plat/backlight.h> |
| 53 | #include <plat/fb.h> | 53 | #include <plat/fb.h> |
| 54 | #include <plat/sdhci.h> | 54 | #include <plat/sdhci.h> |
| @@ -248,7 +248,7 @@ static void __init smdk6450_map_io(void) | |||
| 248 | s5p64x0_init_io(NULL, 0); | 248 | s5p64x0_init_io(NULL, 0); |
| 249 | s3c24xx_init_clocks(19200000); | 249 | s3c24xx_init_clocks(19200000); |
| 250 | s3c24xx_init_uarts(smdk6450_uartcfgs, ARRAY_SIZE(smdk6450_uartcfgs)); | 250 | s3c24xx_init_uarts(smdk6450_uartcfgs, ARRAY_SIZE(smdk6450_uartcfgs)); |
| 251 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); | 251 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | static void s5p6450_set_lcd_interface(void) | 254 | static void s5p6450_set_lcd_interface(void) |
| @@ -292,6 +292,6 @@ MACHINE_START(SMDK6450, "SMDK6450") | |||
| 292 | .init_irq = s5p6450_init_irq, | 292 | .init_irq = s5p6450_init_irq, |
| 293 | .map_io = smdk6450_map_io, | 293 | .map_io = smdk6450_map_io, |
| 294 | .init_machine = smdk6450_machine_init, | 294 | .init_machine = smdk6450_machine_init, |
| 295 | .init_time = s5p_timer_init, | 295 | .init_time = samsung_timer_init, |
| 296 | .restart = s5p64x0_restart, | 296 | .restart = s5p64x0_restart, |
| 297 | MACHINE_END | 297 | MACHINE_END |
diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig index 15170be97a74..2f456a4533ba 100644 --- a/arch/arm/mach-s5pc100/Kconfig +++ b/arch/arm/mach-s5pc100/Kconfig | |||
| @@ -11,6 +11,7 @@ config CPU_S5PC100 | |||
| 11 | bool | 11 | bool |
| 12 | select S5P_EXT_INT | 12 | select S5P_EXT_INT |
| 13 | select SAMSUNG_DMADEV | 13 | select SAMSUNG_DMADEV |
| 14 | select SAMSUNG_HRT | ||
| 14 | help | 15 | help |
| 15 | Enable S5PC100 CPU support | 16 | Enable S5PC100 CPU support |
| 16 | 17 | ||
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c index 185a19583898..8c880f76f274 100644 --- a/arch/arm/mach-s5pc100/mach-smdkc100.c +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c | |||
| @@ -51,6 +51,7 @@ | |||
| 51 | #include <linux/platform_data/touchscreen-s3c2410.h> | 51 | #include <linux/platform_data/touchscreen-s3c2410.h> |
| 52 | #include <linux/platform_data/asoc-s3c.h> | 52 | #include <linux/platform_data/asoc-s3c.h> |
| 53 | #include <plat/backlight.h> | 53 | #include <plat/backlight.h> |
| 54 | #include <plat/samsung-time.h> | ||
| 54 | 55 | ||
| 55 | #include "common.h" | 56 | #include "common.h" |
| 56 | 57 | ||
| @@ -221,6 +222,7 @@ static void __init smdkc100_map_io(void) | |||
| 221 | s5pc100_init_io(NULL, 0); | 222 | s5pc100_init_io(NULL, 0); |
| 222 | s3c24xx_init_clocks(12000000); | 223 | s3c24xx_init_clocks(12000000); |
| 223 | s3c24xx_init_uarts(smdkc100_uartcfgs, ARRAY_SIZE(smdkc100_uartcfgs)); | 224 | s3c24xx_init_uarts(smdkc100_uartcfgs, ARRAY_SIZE(smdkc100_uartcfgs)); |
| 225 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); | ||
| 224 | } | 226 | } |
| 225 | 227 | ||
| 226 | static void __init smdkc100_machine_init(void) | 228 | static void __init smdkc100_machine_init(void) |
| @@ -255,6 +257,6 @@ MACHINE_START(SMDKC100, "SMDKC100") | |||
| 255 | .init_irq = s5pc100_init_irq, | 257 | .init_irq = s5pc100_init_irq, |
| 256 | .map_io = smdkc100_map_io, | 258 | .map_io = smdkc100_map_io, |
| 257 | .init_machine = smdkc100_machine_init, | 259 | .init_machine = smdkc100_machine_init, |
| 258 | .init_time = s3c24xx_timer_init, | 260 | .init_time = samsung_timer_init, |
| 259 | .restart = s5pc100_restart, | 261 | .restart = s5pc100_restart, |
| 260 | MACHINE_END | 262 | MACHINE_END |
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index 92ad72f0ef98..0963283a7c5d 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig | |||
| @@ -12,10 +12,10 @@ if ARCH_S5PV210 | |||
| 12 | config CPU_S5PV210 | 12 | config CPU_S5PV210 |
| 13 | bool | 13 | bool |
| 14 | select S5P_EXT_INT | 14 | select S5P_EXT_INT |
| 15 | select S5P_HRT | ||
| 16 | select S5P_PM if PM | 15 | select S5P_PM if PM |
| 17 | select S5P_SLEEP if PM | 16 | select S5P_SLEEP if PM |
| 18 | select SAMSUNG_DMADEV | 17 | select SAMSUNG_DMADEV |
| 18 | select SAMSUNG_HRT | ||
| 19 | help | 19 | help |
| 20 | Enable S5PV210 CPU support | 20 | Enable S5PV210 CPU support |
| 21 | 21 | ||
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c index 11900a8e88a3..ed2b85485b9d 100644 --- a/arch/arm/mach-s5pv210/mach-aquila.c +++ b/arch/arm/mach-s5pv210/mach-aquila.c | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | #include <plat/fb.h> | 38 | #include <plat/fb.h> |
| 39 | #include <plat/fimc-core.h> | 39 | #include <plat/fimc-core.h> |
| 40 | #include <plat/sdhci.h> | 40 | #include <plat/sdhci.h> |
| 41 | #include <plat/s5p-time.h> | 41 | #include <plat/samsung-time.h> |
| 42 | 42 | ||
| 43 | #include "common.h" | 43 | #include "common.h" |
| 44 | 44 | ||
| @@ -651,7 +651,7 @@ static void __init aquila_map_io(void) | |||
| 651 | s5pv210_init_io(NULL, 0); | 651 | s5pv210_init_io(NULL, 0); |
| 652 | s3c24xx_init_clocks(24000000); | 652 | s3c24xx_init_clocks(24000000); |
| 653 | s3c24xx_init_uarts(aquila_uartcfgs, ARRAY_SIZE(aquila_uartcfgs)); | 653 | s3c24xx_init_uarts(aquila_uartcfgs, ARRAY_SIZE(aquila_uartcfgs)); |
| 654 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); | 654 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); |
| 655 | } | 655 | } |
| 656 | 656 | ||
| 657 | static void __init aquila_machine_init(void) | 657 | static void __init aquila_machine_init(void) |
| @@ -686,6 +686,6 @@ MACHINE_START(AQUILA, "Aquila") | |||
| 686 | .init_irq = s5pv210_init_irq, | 686 | .init_irq = s5pv210_init_irq, |
| 687 | .map_io = aquila_map_io, | 687 | .map_io = aquila_map_io, |
| 688 | .init_machine = aquila_machine_init, | 688 | .init_machine = aquila_machine_init, |
| 689 | .init_time = s5p_timer_init, | 689 | .init_time = samsung_timer_init, |
| 690 | .restart = s5pv210_restart, | 690 | .restart = s5pv210_restart, |
| 691 | MACHINE_END | 691 | MACHINE_END |
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index e373de44a8b6..30b24ad84f49 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | #include <plat/keypad.h> | 47 | #include <plat/keypad.h> |
| 48 | #include <plat/sdhci.h> | 48 | #include <plat/sdhci.h> |
| 49 | #include <plat/clock.h> | 49 | #include <plat/clock.h> |
| 50 | #include <plat/s5p-time.h> | 50 | #include <plat/samsung-time.h> |
| 51 | #include <plat/mfc.h> | 51 | #include <plat/mfc.h> |
| 52 | #include <plat/camport.h> | 52 | #include <plat/camport.h> |
| 53 | 53 | ||
| @@ -908,7 +908,7 @@ static void __init goni_map_io(void) | |||
| 908 | s5pv210_init_io(NULL, 0); | 908 | s5pv210_init_io(NULL, 0); |
| 909 | s3c24xx_init_clocks(clk_xusbxti.rate); | 909 | s3c24xx_init_clocks(clk_xusbxti.rate); |
| 910 | s3c24xx_init_uarts(goni_uartcfgs, ARRAY_SIZE(goni_uartcfgs)); | 910 | s3c24xx_init_uarts(goni_uartcfgs, ARRAY_SIZE(goni_uartcfgs)); |
| 911 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); | 911 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); |
| 912 | } | 912 | } |
| 913 | 913 | ||
| 914 | static void __init goni_reserve(void) | 914 | static void __init goni_reserve(void) |
| @@ -973,7 +973,7 @@ MACHINE_START(GONI, "GONI") | |||
| 973 | .init_irq = s5pv210_init_irq, | 973 | .init_irq = s5pv210_init_irq, |
| 974 | .map_io = goni_map_io, | 974 | .map_io = goni_map_io, |
| 975 | .init_machine = goni_machine_init, | 975 | .init_machine = goni_machine_init, |
| 976 | .init_time = s5p_timer_init, | 976 | .init_time = samsung_timer_init, |
| 977 | .reserve = &goni_reserve, | 977 | .reserve = &goni_reserve, |
| 978 | .restart = s5pv210_restart, | 978 | .restart = s5pv210_restart, |
| 979 | MACHINE_END | 979 | MACHINE_END |
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c index 28bd0248a3e2..7c0ed07a78a3 100644 --- a/arch/arm/mach-s5pv210/mach-smdkc110.c +++ b/arch/arm/mach-s5pv210/mach-smdkc110.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #include <linux/platform_data/ata-samsung_cf.h> | 29 | #include <linux/platform_data/ata-samsung_cf.h> |
| 30 | #include <linux/platform_data/i2c-s3c2410.h> | 30 | #include <linux/platform_data/i2c-s3c2410.h> |
| 31 | #include <plat/pm.h> | 31 | #include <plat/pm.h> |
| 32 | #include <plat/s5p-time.h> | 32 | #include <plat/samsung-time.h> |
| 33 | #include <plat/mfc.h> | 33 | #include <plat/mfc.h> |
| 34 | 34 | ||
| 35 | #include "common.h" | 35 | #include "common.h" |
| @@ -120,7 +120,7 @@ static void __init smdkc110_map_io(void) | |||
| 120 | s5pv210_init_io(NULL, 0); | 120 | s5pv210_init_io(NULL, 0); |
| 121 | s3c24xx_init_clocks(24000000); | 121 | s3c24xx_init_clocks(24000000); |
| 122 | s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs)); | 122 | s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs)); |
| 123 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); | 123 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | static void __init smdkc110_reserve(void) | 126 | static void __init smdkc110_reserve(void) |
| @@ -153,7 +153,7 @@ MACHINE_START(SMDKC110, "SMDKC110") | |||
| 153 | .init_irq = s5pv210_init_irq, | 153 | .init_irq = s5pv210_init_irq, |
| 154 | .map_io = smdkc110_map_io, | 154 | .map_io = smdkc110_map_io, |
| 155 | .init_machine = smdkc110_machine_init, | 155 | .init_machine = smdkc110_machine_init, |
| 156 | .init_time = s5p_timer_init, | 156 | .init_time = samsung_timer_init, |
| 157 | .restart = s5pv210_restart, | 157 | .restart = s5pv210_restart, |
| 158 | .reserve = &smdkc110_reserve, | 158 | .reserve = &smdkc110_reserve, |
| 159 | MACHINE_END | 159 | MACHINE_END |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index 3c73f36869bb..d50b6f124465 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | #include <plat/keypad.h> | 44 | #include <plat/keypad.h> |
| 45 | #include <plat/pm.h> | 45 | #include <plat/pm.h> |
| 46 | #include <plat/fb.h> | 46 | #include <plat/fb.h> |
| 47 | #include <plat/s5p-time.h> | 47 | #include <plat/samsung-time.h> |
| 48 | #include <plat/backlight.h> | 48 | #include <plat/backlight.h> |
| 49 | #include <plat/mfc.h> | 49 | #include <plat/mfc.h> |
| 50 | #include <plat/clock.h> | 50 | #include <plat/clock.h> |
| @@ -285,7 +285,7 @@ static void __init smdkv210_map_io(void) | |||
| 285 | s5pv210_init_io(NULL, 0); | 285 | s5pv210_init_io(NULL, 0); |
| 286 | s3c24xx_init_clocks(clk_xusbxti.rate); | 286 | s3c24xx_init_clocks(clk_xusbxti.rate); |
| 287 | s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs)); | 287 | s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs)); |
| 288 | s5p_set_timer_source(S5P_PWM2, S5P_PWM4); | 288 | samsung_set_timer_source(SAMSUNG_PWM2, SAMSUNG_PWM4); |
| 289 | } | 289 | } |
| 290 | 290 | ||
| 291 | static void __init smdkv210_reserve(void) | 291 | static void __init smdkv210_reserve(void) |
| @@ -329,7 +329,7 @@ MACHINE_START(SMDKV210, "SMDKV210") | |||
| 329 | .init_irq = s5pv210_init_irq, | 329 | .init_irq = s5pv210_init_irq, |
| 330 | .map_io = smdkv210_map_io, | 330 | .map_io = smdkv210_map_io, |
| 331 | .init_machine = smdkv210_machine_init, | 331 | .init_machine = smdkv210_machine_init, |
| 332 | .init_time = s5p_timer_init, | 332 | .init_time = samsung_timer_init, |
| 333 | .restart = s5pv210_restart, | 333 | .restart = s5pv210_restart, |
| 334 | .reserve = &smdkv210_reserve, | 334 | .reserve = &smdkv210_reserve, |
| 335 | MACHINE_END | 335 | MACHINE_END |
diff --git a/arch/arm/mach-s5pv210/mach-torbreck.c b/arch/arm/mach-s5pv210/mach-torbreck.c index 2d4c5531819c..579afe89842a 100644 --- a/arch/arm/mach-s5pv210/mach-torbreck.c +++ b/arch/arm/mach-s5pv210/mach-torbreck.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | #include <plat/devs.h> | 26 | #include <plat/devs.h> |
| 27 | #include <plat/cpu.h> | 27 | #include <plat/cpu.h> |
| 28 | #include <linux/platform_data/i2c-s3c2410.h> | 28 | #include <linux/platform_data/i2c-s3c2410.h> |
| 29 | #include <plat/s5p-time.h> | 29 | #include <plat/samsung-time.h> |
| 30 | 30 | ||
| 31 | #include "common.h" | 31 | #include "common.h" |
| 32 | 32 | ||
| @@ -106,7 +106,7 @@ static void __init torbreck_map_io(void) | |||
| 106 | s5pv210_init_io(NULL, 0); | 106 | s5pv210_init_io(NULL, 0); |
| 107 | s3c24xx_init_clocks(24000000); | 107 | s3c24xx_init_clocks(24000000); |
| 108 | s3c24xx_init_uarts(torbreck_uartcfgs, ARRAY_SIZE(torbreck_uartcfgs)); | 108 | s3c24xx_init_uarts(torbreck_uartcfgs, ARRAY_SIZE(torbreck_uartcfgs)); |
| 109 | s5p_set_timer_source(S5P_PWM3, S5P_PWM4); | 109 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | static void __init torbreck_machine_init(void) | 112 | static void __init torbreck_machine_init(void) |
| @@ -130,6 +130,6 @@ MACHINE_START(TORBRECK, "TORBRECK") | |||
| 130 | .init_irq = s5pv210_init_irq, | 130 | .init_irq = s5pv210_init_irq, |
| 131 | .map_io = torbreck_map_io, | 131 | .map_io = torbreck_map_io, |
| 132 | .init_machine = torbreck_machine_init, | 132 | .init_machine = torbreck_machine_init, |
| 133 | .init_time = s5p_timer_init, | 133 | .init_time = samsung_timer_init, |
| 134 | .restart = s5pv210_restart, | 134 | .restart = s5pv210_restart, |
| 135 | MACHINE_END | 135 | MACHINE_END |
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index a9d52167e16e..6cb19c6aa9d6 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
| @@ -25,7 +25,7 @@ config PLAT_S5P | |||
| 25 | select PLAT_SAMSUNG | 25 | select PLAT_SAMSUNG |
| 26 | select S3C_GPIO_TRACK | 26 | select S3C_GPIO_TRACK |
| 27 | select S5P_GPIO_DRVSTR | 27 | select S5P_GPIO_DRVSTR |
| 28 | select SAMSUNG_CLKSRC | 28 | select SAMSUNG_CLKSRC if !COMMON_CLK |
| 29 | select SAMSUNG_GPIOLIB_4BIT | 29 | select SAMSUNG_GPIOLIB_4BIT |
| 30 | select SAMSUNG_IRQ_VIC_TIMER | 30 | select SAMSUNG_IRQ_VIC_TIMER |
| 31 | help | 31 | help |
| @@ -70,7 +70,7 @@ config S3C_LOWLEVEL_UART_PORT | |||
| 70 | 70 | ||
| 71 | # timer options | 71 | # timer options |
| 72 | 72 | ||
| 73 | config S5P_HRT | 73 | config SAMSUNG_HRT |
| 74 | bool | 74 | bool |
| 75 | select SAMSUNG_DEV_PWM | 75 | select SAMSUNG_DEV_PWM |
| 76 | help | 76 | help |
| @@ -89,7 +89,7 @@ config SAMSUNG_CLKSRC | |||
| 89 | used by newer systems such as the S3C64XX. | 89 | used by newer systems such as the S3C64XX. |
| 90 | 90 | ||
| 91 | config S5P_CLOCK | 91 | config S5P_CLOCK |
| 92 | def_bool (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS) | 92 | def_bool (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210) |
| 93 | help | 93 | help |
| 94 | Support common clock part for ARCH_S5P and ARCH_EXYNOS SoCs | 94 | Support common clock part for ARCH_S5P and ARCH_EXYNOS SoCs |
| 95 | 95 | ||
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index 3a7c64d1814a..a23c460299a1 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile | |||
| @@ -12,8 +12,7 @@ obj- := | |||
| 12 | # Objects we always build independent of SoC choice | 12 | # Objects we always build independent of SoC choice |
| 13 | 13 | ||
| 14 | obj-y += init.o cpu.o | 14 | obj-y += init.o cpu.o |
| 15 | obj-$(CONFIG_ARCH_USES_GETTIMEOFFSET) += time.o | 15 | obj-$(CONFIG_SAMSUNG_HRT) += samsung-time.o |
| 16 | obj-$(CONFIG_S5P_HRT) += s5p-time.o | ||
| 17 | 16 | ||
| 18 | obj-$(CONFIG_SAMSUNG_CLOCK) += clock.o | 17 | obj-$(CONFIG_SAMSUNG_CLOCK) += clock.o |
| 19 | obj-$(CONFIG_SAMSUNG_CLOCK) += pwm-clock.o | 18 | obj-$(CONFIG_SAMSUNG_CLOCK) += pwm-clock.o |
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index 37703ef6dfc7..e126644cadf4 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h | |||
| @@ -192,10 +192,6 @@ extern void s3c24xx_init_uartdevs(char *name, | |||
| 192 | struct s3c24xx_uart_resources *res, | 192 | struct s3c24xx_uart_resources *res, |
| 193 | struct s3c2410_uartcfg *cfg, int no); | 193 | struct s3c2410_uartcfg *cfg, int no); |
| 194 | 194 | ||
| 195 | /* timer for 2410/2440 */ | ||
| 196 | |||
| 197 | extern void s3c24xx_timer_init(void); | ||
| 198 | |||
| 199 | extern struct syscore_ops s3c2410_pm_syscore_ops; | 195 | extern struct syscore_ops s3c2410_pm_syscore_ops; |
| 200 | extern struct syscore_ops s3c2412_pm_syscore_ops; | 196 | extern struct syscore_ops s3c2412_pm_syscore_ops; |
| 201 | extern struct syscore_ops s3c2416_pm_syscore_ops; | 197 | extern struct syscore_ops s3c2416_pm_syscore_ops; |
diff --git a/arch/arm/plat-samsung/include/plat/irq.h b/arch/arm/plat-samsung/include/plat/irq.h deleted file mode 100644 index e21a89bc26c9..000000000000 --- a/arch/arm/plat-samsung/include/plat/irq.h +++ /dev/null | |||
| @@ -1,116 +0,0 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/irq.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
| 4 | * Ben Dooks <ben@simtec.co.uk> | ||
| 5 | * | ||
| 6 | * Header file for S3C24XX CPU IRQ support | ||
| 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 | |||
| 13 | #include <linux/io.h> | ||
| 14 | |||
| 15 | #include <mach/hardware.h> | ||
| 16 | #include <mach/regs-irq.h> | ||
| 17 | #include <mach/regs-gpio.h> | ||
| 18 | |||
| 19 | #define irqdbf(x...) | ||
| 20 | #define irqdbf2(x...) | ||
| 21 | |||
| 22 | #define EXTINT_OFF (IRQ_EINT4 - 4) | ||
| 23 | |||
| 24 | /* these are exported for arch/arm/mach-* usage */ | ||
| 25 | extern struct irq_chip s3c_irq_level_chip; | ||
| 26 | extern struct irq_chip s3c_irq_chip; | ||
| 27 | |||
| 28 | static inline void s3c_irqsub_mask(unsigned int irqno, | ||
| 29 | unsigned int parentbit, | ||
| 30 | int subcheck) | ||
| 31 | { | ||
| 32 | unsigned long mask; | ||
| 33 | unsigned long submask; | ||
| 34 | |||
| 35 | submask = __raw_readl(S3C2410_INTSUBMSK); | ||
| 36 | mask = __raw_readl(S3C2410_INTMSK); | ||
| 37 | |||
| 38 | submask |= (1UL << (irqno - IRQ_S3CUART_RX0)); | ||
| 39 | |||
| 40 | /* check to see if we need to mask the parent IRQ */ | ||
| 41 | |||
| 42 | if ((submask & subcheck) == subcheck) | ||
| 43 | __raw_writel(mask | parentbit, S3C2410_INTMSK); | ||
| 44 | |||
| 45 | /* write back masks */ | ||
| 46 | __raw_writel(submask, S3C2410_INTSUBMSK); | ||
| 47 | |||
| 48 | } | ||
| 49 | |||
| 50 | static inline void s3c_irqsub_unmask(unsigned int irqno, | ||
| 51 | unsigned int parentbit) | ||
| 52 | { | ||
| 53 | unsigned long mask; | ||
| 54 | unsigned long submask; | ||
| 55 | |||
| 56 | submask = __raw_readl(S3C2410_INTSUBMSK); | ||
| 57 | mask = __raw_readl(S3C2410_INTMSK); | ||
| 58 | |||
| 59 | submask &= ~(1UL << (irqno - IRQ_S3CUART_RX0)); | ||
| 60 | mask &= ~parentbit; | ||
| 61 | |||
| 62 | /* write back masks */ | ||
| 63 | __raw_writel(submask, S3C2410_INTSUBMSK); | ||
| 64 | __raw_writel(mask, S3C2410_INTMSK); | ||
| 65 | } | ||
| 66 | |||
| 67 | |||
| 68 | static inline void s3c_irqsub_maskack(unsigned int irqno, | ||
| 69 | unsigned int parentmask, | ||
| 70 | unsigned int group) | ||
| 71 | { | ||
| 72 | unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0); | ||
| 73 | |||
| 74 | s3c_irqsub_mask(irqno, parentmask, group); | ||
| 75 | |||
| 76 | __raw_writel(bit, S3C2410_SUBSRCPND); | ||
| 77 | |||
| 78 | /* only ack parent if we've got all the irqs (seems we must | ||
| 79 | * ack, all and hope that the irq system retriggers ok when | ||
| 80 | * the interrupt goes off again) | ||
| 81 | */ | ||
| 82 | |||
| 83 | if (1) { | ||
| 84 | __raw_writel(parentmask, S3C2410_SRCPND); | ||
| 85 | __raw_writel(parentmask, S3C2410_INTPND); | ||
| 86 | } | ||
| 87 | } | ||
| 88 | |||
| 89 | static inline void s3c_irqsub_ack(unsigned int irqno, | ||
| 90 | unsigned int parentmask, | ||
| 91 | unsigned int group) | ||
| 92 | { | ||
| 93 | unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0); | ||
| 94 | |||
| 95 | __raw_writel(bit, S3C2410_SUBSRCPND); | ||
| 96 | |||
| 97 | /* only ack parent if we've got all the irqs (seems we must | ||
| 98 | * ack, all and hope that the irq system retriggers ok when | ||
| 99 | * the interrupt goes off again) | ||
| 100 | */ | ||
| 101 | |||
| 102 | if (1) { | ||
| 103 | __raw_writel(parentmask, S3C2410_SRCPND); | ||
| 104 | __raw_writel(parentmask, S3C2410_INTPND); | ||
| 105 | } | ||
| 106 | } | ||
| 107 | |||
| 108 | /* exported for use in arch/arm/mach-s3c2410 */ | ||
| 109 | |||
| 110 | #ifdef CONFIG_PM | ||
| 111 | extern int s3c_irq_wake(struct irq_data *data, unsigned int state); | ||
| 112 | #else | ||
| 113 | #define s3c_irq_wake NULL | ||
| 114 | #endif | ||
| 115 | |||
| 116 | extern int s3c_irqext_type(struct irq_data *d, unsigned int type); | ||
diff --git a/arch/arm/plat-samsung/include/plat/s3c2410.h b/arch/arm/plat-samsung/include/plat/s3c2410.h deleted file mode 100644 index 55b0e5f51e97..000000000000 --- a/arch/arm/plat-samsung/include/plat/s3c2410.h +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/s3c2410.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2004 Simtec Electronics | ||
| 4 | * Ben Dooks <ben@simtec.co.uk> | ||
| 5 | * | ||
| 6 | * Header file for s3c2410 machine directory | ||
| 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 | */ | ||
| 13 | |||
| 14 | #ifdef CONFIG_CPU_S3C2410 | ||
| 15 | |||
| 16 | extern int s3c2410_init(void); | ||
| 17 | extern int s3c2410a_init(void); | ||
| 18 | |||
| 19 | extern void s3c2410_map_io(void); | ||
| 20 | |||
| 21 | extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
| 22 | |||
| 23 | extern void s3c2410_init_clocks(int xtal); | ||
| 24 | |||
| 25 | #else | ||
| 26 | #define s3c2410_init_clocks NULL | ||
| 27 | #define s3c2410_init_uarts NULL | ||
| 28 | #define s3c2410_map_io NULL | ||
| 29 | #define s3c2410_init NULL | ||
| 30 | #define s3c2410a_init NULL | ||
| 31 | #endif | ||
diff --git a/arch/arm/plat-samsung/include/plat/s3c2412.h b/arch/arm/plat-samsung/include/plat/s3c2412.h deleted file mode 100644 index cbae50ddacc8..000000000000 --- a/arch/arm/plat-samsung/include/plat/s3c2412.h +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/s3c2412.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2006 Simtec Electronics | ||
| 4 | * Ben Dooks <ben@simtec.co.uk> | ||
| 5 | * | ||
| 6 | * Header file for s3c2412 cpu support | ||
| 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 | |||
| 13 | #ifdef CONFIG_CPU_S3C2412 | ||
| 14 | |||
| 15 | extern int s3c2412_init(void); | ||
| 16 | |||
| 17 | extern void s3c2412_map_io(void); | ||
| 18 | |||
| 19 | extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
| 20 | |||
| 21 | extern void s3c2412_init_clocks(int xtal); | ||
| 22 | |||
| 23 | extern int s3c2412_baseclk_add(void); | ||
| 24 | |||
| 25 | extern void s3c2412_restart(char mode, const char *cmd); | ||
| 26 | #else | ||
| 27 | #define s3c2412_init_clocks NULL | ||
| 28 | #define s3c2412_init_uarts NULL | ||
| 29 | #define s3c2412_map_io NULL | ||
| 30 | #define s3c2412_init NULL | ||
| 31 | #define s3c2412_restart NULL | ||
| 32 | #endif | ||
diff --git a/arch/arm/plat-samsung/include/plat/s3c2416.h b/arch/arm/plat-samsung/include/plat/s3c2416.h deleted file mode 100644 index f27399a3c68d..000000000000 --- a/arch/arm/plat-samsung/include/plat/s3c2416.h +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/s3c2416.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2009 Yauhen Kharuzhy <jekhor@gmail.com> | ||
| 4 | * | ||
| 5 | * Header file for s3c2416 cpu support | ||
| 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 | #ifdef CONFIG_CPU_S3C2416 | ||
| 13 | |||
| 14 | struct s3c2410_uartcfg; | ||
| 15 | |||
| 16 | extern int s3c2416_init(void); | ||
| 17 | |||
| 18 | extern void s3c2416_map_io(void); | ||
| 19 | |||
| 20 | extern void s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
| 21 | |||
| 22 | extern void s3c2416_init_clocks(int xtal); | ||
| 23 | |||
| 24 | extern int s3c2416_baseclk_add(void); | ||
| 25 | |||
| 26 | extern void s3c2416_restart(char mode, const char *cmd); | ||
| 27 | |||
| 28 | extern void s3c2416_init_irq(void); | ||
| 29 | extern struct syscore_ops s3c2416_irq_syscore_ops; | ||
| 30 | |||
| 31 | #else | ||
| 32 | #define s3c2416_init_clocks NULL | ||
| 33 | #define s3c2416_init_uarts NULL | ||
| 34 | #define s3c2416_map_io NULL | ||
| 35 | #define s3c2416_init NULL | ||
| 36 | #define s3c2416_restart NULL | ||
| 37 | #endif | ||
diff --git a/arch/arm/plat-samsung/include/plat/s3c2443.h b/arch/arm/plat-samsung/include/plat/s3c2443.h deleted file mode 100644 index 71b88ec48956..000000000000 --- a/arch/arm/plat-samsung/include/plat/s3c2443.h +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/s3c2443.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
| 4 | * Ben Dooks <ben@simtec.co.uk> | ||
| 5 | * | ||
| 6 | * Header file for s3c2443 cpu support | ||
| 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 | |||
| 13 | #ifdef CONFIG_CPU_S3C2443 | ||
| 14 | |||
| 15 | struct s3c2410_uartcfg; | ||
| 16 | |||
| 17 | extern int s3c2443_init(void); | ||
| 18 | |||
| 19 | extern void s3c2443_map_io(void); | ||
| 20 | |||
| 21 | extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
| 22 | |||
| 23 | extern void s3c2443_init_clocks(int xtal); | ||
| 24 | |||
| 25 | extern int s3c2443_baseclk_add(void); | ||
| 26 | |||
| 27 | extern void s3c2443_restart(char mode, const char *cmd); | ||
| 28 | |||
| 29 | extern void s3c2443_init_irq(void); | ||
| 30 | #else | ||
| 31 | #define s3c2443_init_clocks NULL | ||
| 32 | #define s3c2443_init_uarts NULL | ||
| 33 | #define s3c2443_map_io NULL | ||
| 34 | #define s3c2443_init NULL | ||
| 35 | #define s3c2443_restart NULL | ||
| 36 | #endif | ||
diff --git a/arch/arm/plat-samsung/include/plat/s3c244x.h b/arch/arm/plat-samsung/include/plat/s3c244x.h deleted file mode 100644 index ea0c961b7603..000000000000 --- a/arch/arm/plat-samsung/include/plat/s3c244x.h +++ /dev/null | |||
| @@ -1,42 +0,0 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/s3c244x.h | ||
| 2 | * | ||
| 3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
| 4 | * Ben Dooks <ben@simtec.co.uk> | ||
| 5 | * | ||
| 6 | * Header file for S3C2440 and S3C2442 cpu support | ||
| 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 | |||
| 13 | #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) | ||
| 14 | |||
| 15 | extern void s3c244x_map_io(void); | ||
| 16 | |||
| 17 | extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
| 18 | |||
| 19 | extern void s3c244x_init_clocks(int xtal); | ||
| 20 | |||
| 21 | #else | ||
| 22 | #define s3c244x_init_clocks NULL | ||
| 23 | #define s3c244x_init_uarts NULL | ||
| 24 | #endif | ||
| 25 | |||
| 26 | #ifdef CONFIG_CPU_S3C2440 | ||
| 27 | extern int s3c2440_init(void); | ||
| 28 | |||
| 29 | extern void s3c2440_map_io(void); | ||
| 30 | #else | ||
| 31 | #define s3c2440_init NULL | ||
| 32 | #define s3c2440_map_io NULL | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #ifdef CONFIG_CPU_S3C2442 | ||
| 36 | extern int s3c2442_init(void); | ||
| 37 | |||
| 38 | extern void s3c2442_map_io(void); | ||
| 39 | #else | ||
| 40 | #define s3c2442_init NULL | ||
| 41 | #define s3c2442_map_io NULL | ||
| 42 | #endif | ||
diff --git a/arch/arm/plat-samsung/include/plat/s5p-time.h b/arch/arm/plat-samsung/include/plat/s5p-time.h deleted file mode 100644 index 9c96f3586ce0..000000000000 --- a/arch/arm/plat-samsung/include/plat/s5p-time.h +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/s5p-time.h | ||
| 2 | * | ||
| 3 | * Copyright 2011 Samsung Electronics Co., Ltd. | ||
| 4 | * http://www.samsung.com/ | ||
| 5 | * | ||
| 6 | * Header file for s5p time support | ||
| 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 | |||
| 13 | #ifndef __ASM_PLAT_S5P_TIME_H | ||
| 14 | #define __ASM_PLAT_S5P_TIME_H __FILE__ | ||
| 15 | |||
| 16 | /* S5P HR-Timer Clock mode */ | ||
| 17 | enum s5p_timer_mode { | ||
| 18 | S5P_PWM0, | ||
| 19 | S5P_PWM1, | ||
| 20 | S5P_PWM2, | ||
| 21 | S5P_PWM3, | ||
| 22 | S5P_PWM4, | ||
| 23 | }; | ||
| 24 | |||
| 25 | struct s5p_timer_source { | ||
| 26 | unsigned int event_id; | ||
| 27 | unsigned int source_id; | ||
| 28 | }; | ||
| 29 | |||
| 30 | /* Be able to sleep for atleast 4 seconds (usually more) */ | ||
| 31 | #define S5PTIMER_MIN_RANGE 4 | ||
| 32 | |||
| 33 | #define TCNT_MAX 0xffffffff | ||
| 34 | #define NON_PERIODIC 0 | ||
| 35 | #define PERIODIC 1 | ||
| 36 | |||
| 37 | extern void __init s5p_set_timer_source(enum s5p_timer_mode event, | ||
| 38 | enum s5p_timer_mode source); | ||
| 39 | extern void s5p_timer_init(void); | ||
| 40 | #endif /* __ASM_PLAT_S5P_TIME_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/samsung-time.h b/arch/arm/plat-samsung/include/plat/samsung-time.h new file mode 100644 index 000000000000..4cc99bb1f176 --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/samsung-time.h | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/include/plat/samsung-time.h | ||
| 2 | * | ||
| 3 | * Copyright 2011 Samsung Electronics Co., Ltd. | ||
| 4 | * http://www.samsung.com/ | ||
| 5 | * | ||
| 6 | * Header file for samsung s3c and s5p time support | ||
| 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 | |||
| 13 | #ifndef __ASM_PLAT_SAMSUNG_TIME_H | ||
| 14 | #define __ASM_PLAT_SAMSUNG_TIME_H __FILE__ | ||
| 15 | |||
| 16 | /* SAMSUNG HR-Timer Clock mode */ | ||
| 17 | enum samsung_timer_mode { | ||
| 18 | SAMSUNG_PWM0, | ||
| 19 | SAMSUNG_PWM1, | ||
| 20 | SAMSUNG_PWM2, | ||
| 21 | SAMSUNG_PWM3, | ||
| 22 | SAMSUNG_PWM4, | ||
| 23 | }; | ||
| 24 | |||
| 25 | struct samsung_timer_source { | ||
| 26 | unsigned int event_id; | ||
| 27 | unsigned int source_id; | ||
| 28 | }; | ||
| 29 | |||
| 30 | /* Be able to sleep for atleast 4 seconds (usually more) */ | ||
| 31 | #define SAMSUNG_TIMER_MIN_RANGE 4 | ||
| 32 | |||
| 33 | #if defined(CONFIG_ARCH_S3C24XX) || defined(CONFIG_ARCH_S5PC100) | ||
| 34 | #define TCNT_MAX 0xffff | ||
| 35 | #define TSCALER_DIV 25 | ||
| 36 | #define TDIV 50 | ||
| 37 | #define TSIZE 16 | ||
| 38 | #else | ||
| 39 | #define TCNT_MAX 0xffffffff | ||
| 40 | #define TSCALER_DIV 2 | ||
| 41 | #define TDIV 2 | ||
| 42 | #define TSIZE 32 | ||
| 43 | #endif | ||
| 44 | |||
| 45 | #define NON_PERIODIC 0 | ||
| 46 | #define PERIODIC 1 | ||
| 47 | |||
| 48 | extern void __init samsung_set_timer_source(enum samsung_timer_mode event, | ||
| 49 | enum samsung_timer_mode source); | ||
| 50 | |||
| 51 | extern void __init samsung_timer_init(void); | ||
| 52 | |||
| 53 | #endif /* __ASM_PLAT_SAMSUNG_TIME_H */ | ||
diff --git a/arch/arm/plat-samsung/s5p-time.c b/arch/arm/plat-samsung/samsung-time.c index e92510cf82ee..f899cbc9b288 100644 --- a/arch/arm/plat-samsung/s5p-time.c +++ b/arch/arm/plat-samsung/samsung-time.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | 2 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. |
| 3 | * http://www.samsung.com/ | 3 | * http://www.samsung.com/ |
| 4 | * | 4 | * |
| 5 | * S5P - Common hr-timer support | 5 | * samsung - Common hr-timer support (s3c and s5p) |
| 6 | * | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify | 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 | 8 | * it under the terms of the GNU General Public License version 2 as |
| @@ -25,41 +25,41 @@ | |||
| 25 | #include <mach/map.h> | 25 | #include <mach/map.h> |
| 26 | #include <plat/devs.h> | 26 | #include <plat/devs.h> |
| 27 | #include <plat/regs-timer.h> | 27 | #include <plat/regs-timer.h> |
| 28 | #include <plat/s5p-time.h> | 28 | #include <plat/samsung-time.h> |
| 29 | 29 | ||
| 30 | static struct clk *tin_event; | 30 | static struct clk *tin_event; |
| 31 | static struct clk *tin_source; | 31 | static struct clk *tin_source; |
| 32 | static struct clk *tdiv_event; | 32 | static struct clk *tdiv_event; |
| 33 | static struct clk *tdiv_source; | 33 | static struct clk *tdiv_source; |
| 34 | static struct clk *timerclk; | 34 | static struct clk *timerclk; |
| 35 | static struct s5p_timer_source timer_source; | 35 | static struct samsung_timer_source timer_source; |
| 36 | static unsigned long clock_count_per_tick; | 36 | static unsigned long clock_count_per_tick; |
| 37 | static void s5p_timer_resume(void); | 37 | static void samsung_timer_resume(void); |
| 38 | 38 | ||
| 39 | static void s5p_time_stop(enum s5p_timer_mode mode) | 39 | static void samsung_time_stop(enum samsung_timer_mode mode) |
| 40 | { | 40 | { |
| 41 | unsigned long tcon; | 41 | unsigned long tcon; |
| 42 | 42 | ||
| 43 | tcon = __raw_readl(S3C2410_TCON); | 43 | tcon = __raw_readl(S3C2410_TCON); |
| 44 | 44 | ||
| 45 | switch (mode) { | 45 | switch (mode) { |
| 46 | case S5P_PWM0: | 46 | case SAMSUNG_PWM0: |
| 47 | tcon &= ~S3C2410_TCON_T0START; | 47 | tcon &= ~S3C2410_TCON_T0START; |
| 48 | break; | 48 | break; |
| 49 | 49 | ||
| 50 | case S5P_PWM1: | 50 | case SAMSUNG_PWM1: |
| 51 | tcon &= ~S3C2410_TCON_T1START; | 51 | tcon &= ~S3C2410_TCON_T1START; |
| 52 | break; | 52 | break; |
| 53 | 53 | ||
| 54 | case S5P_PWM2: | 54 | case SAMSUNG_PWM2: |
| 55 | tcon &= ~S3C2410_TCON_T2START; | 55 | tcon &= ~S3C2410_TCON_T2START; |
| 56 | break; | 56 | break; |
| 57 | 57 | ||
| 58 | case S5P_PWM3: | 58 | case SAMSUNG_PWM3: |
| 59 | tcon &= ~S3C2410_TCON_T3START; | 59 | tcon &= ~S3C2410_TCON_T3START; |
| 60 | break; | 60 | break; |
| 61 | 61 | ||
| 62 | case S5P_PWM4: | 62 | case SAMSUNG_PWM4: |
| 63 | tcon &= ~S3C2410_TCON_T4START; | 63 | tcon &= ~S3C2410_TCON_T4START; |
| 64 | break; | 64 | break; |
| 65 | 65 | ||
| @@ -70,7 +70,7 @@ static void s5p_time_stop(enum s5p_timer_mode mode) | |||
| 70 | __raw_writel(tcon, S3C2410_TCON); | 70 | __raw_writel(tcon, S3C2410_TCON); |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | static void s5p_time_setup(enum s5p_timer_mode mode, unsigned long tcnt) | 73 | static void samsung_time_setup(enum samsung_timer_mode mode, unsigned long tcnt) |
| 74 | { | 74 | { |
| 75 | unsigned long tcon; | 75 | unsigned long tcon; |
| 76 | 76 | ||
| @@ -79,27 +79,27 @@ static void s5p_time_setup(enum s5p_timer_mode mode, unsigned long tcnt) | |||
| 79 | tcnt--; | 79 | tcnt--; |
| 80 | 80 | ||
| 81 | switch (mode) { | 81 | switch (mode) { |
| 82 | case S5P_PWM0: | 82 | case SAMSUNG_PWM0: |
| 83 | tcon &= ~(0x0f << 0); | 83 | tcon &= ~(0x0f << 0); |
| 84 | tcon |= S3C2410_TCON_T0MANUALUPD; | 84 | tcon |= S3C2410_TCON_T0MANUALUPD; |
| 85 | break; | 85 | break; |
| 86 | 86 | ||
| 87 | case S5P_PWM1: | 87 | case SAMSUNG_PWM1: |
| 88 | tcon &= ~(0x0f << 8); | 88 | tcon &= ~(0x0f << 8); |
| 89 | tcon |= S3C2410_TCON_T1MANUALUPD; | 89 | tcon |= S3C2410_TCON_T1MANUALUPD; |
| 90 | break; | 90 | break; |
| 91 | 91 | ||
| 92 | case S5P_PWM2: | 92 | case SAMSUNG_PWM2: |
| 93 | tcon &= ~(0x0f << 12); | 93 | tcon &= ~(0x0f << 12); |
| 94 | tcon |= S3C2410_TCON_T2MANUALUPD; | 94 | tcon |= S3C2410_TCON_T2MANUALUPD; |
| 95 | break; | 95 | break; |
| 96 | 96 | ||
| 97 | case S5P_PWM3: | 97 | case SAMSUNG_PWM3: |
| 98 | tcon &= ~(0x0f << 16); | 98 | tcon &= ~(0x0f << 16); |
| 99 | tcon |= S3C2410_TCON_T3MANUALUPD; | 99 | tcon |= S3C2410_TCON_T3MANUALUPD; |
| 100 | break; | 100 | break; |
| 101 | 101 | ||
| 102 | case S5P_PWM4: | 102 | case SAMSUNG_PWM4: |
| 103 | tcon &= ~(0x07 << 20); | 103 | tcon &= ~(0x07 << 20); |
| 104 | tcon |= S3C2410_TCON_T4MANUALUPD; | 104 | tcon |= S3C2410_TCON_T4MANUALUPD; |
| 105 | break; | 105 | break; |
| @@ -114,14 +114,14 @@ static void s5p_time_setup(enum s5p_timer_mode mode, unsigned long tcnt) | |||
| 114 | __raw_writel(tcon, S3C2410_TCON); | 114 | __raw_writel(tcon, S3C2410_TCON); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | static void s5p_time_start(enum s5p_timer_mode mode, bool periodic) | 117 | static void samsung_time_start(enum samsung_timer_mode mode, bool periodic) |
| 118 | { | 118 | { |
| 119 | unsigned long tcon; | 119 | unsigned long tcon; |
| 120 | 120 | ||
| 121 | tcon = __raw_readl(S3C2410_TCON); | 121 | tcon = __raw_readl(S3C2410_TCON); |
| 122 | 122 | ||
| 123 | switch (mode) { | 123 | switch (mode) { |
| 124 | case S5P_PWM0: | 124 | case SAMSUNG_PWM0: |
| 125 | tcon |= S3C2410_TCON_T0START; | 125 | tcon |= S3C2410_TCON_T0START; |
| 126 | tcon &= ~S3C2410_TCON_T0MANUALUPD; | 126 | tcon &= ~S3C2410_TCON_T0MANUALUPD; |
| 127 | 127 | ||
| @@ -131,7 +131,7 @@ static void s5p_time_start(enum s5p_timer_mode mode, bool periodic) | |||
| 131 | tcon &= ~S3C2410_TCON_T0RELOAD; | 131 | tcon &= ~S3C2410_TCON_T0RELOAD; |
| 132 | break; | 132 | break; |
| 133 | 133 | ||
| 134 | case S5P_PWM1: | 134 | case SAMSUNG_PWM1: |
| 135 | tcon |= S3C2410_TCON_T1START; | 135 | tcon |= S3C2410_TCON_T1START; |
| 136 | tcon &= ~S3C2410_TCON_T1MANUALUPD; | 136 | tcon &= ~S3C2410_TCON_T1MANUALUPD; |
| 137 | 137 | ||
| @@ -141,7 +141,7 @@ static void s5p_time_start(enum s5p_timer_mode mode, bool periodic) | |||
| 141 | tcon &= ~S3C2410_TCON_T1RELOAD; | 141 | tcon &= ~S3C2410_TCON_T1RELOAD; |
| 142 | break; | 142 | break; |
| 143 | 143 | ||
| 144 | case S5P_PWM2: | 144 | case SAMSUNG_PWM2: |
| 145 | tcon |= S3C2410_TCON_T2START; | 145 | tcon |= S3C2410_TCON_T2START; |
| 146 | tcon &= ~S3C2410_TCON_T2MANUALUPD; | 146 | tcon &= ~S3C2410_TCON_T2MANUALUPD; |
| 147 | 147 | ||
| @@ -151,7 +151,7 @@ static void s5p_time_start(enum s5p_timer_mode mode, bool periodic) | |||
| 151 | tcon &= ~S3C2410_TCON_T2RELOAD; | 151 | tcon &= ~S3C2410_TCON_T2RELOAD; |
| 152 | break; | 152 | break; |
| 153 | 153 | ||
| 154 | case S5P_PWM3: | 154 | case SAMSUNG_PWM3: |
| 155 | tcon |= S3C2410_TCON_T3START; | 155 | tcon |= S3C2410_TCON_T3START; |
| 156 | tcon &= ~S3C2410_TCON_T3MANUALUPD; | 156 | tcon &= ~S3C2410_TCON_T3MANUALUPD; |
| 157 | 157 | ||
| @@ -161,7 +161,7 @@ static void s5p_time_start(enum s5p_timer_mode mode, bool periodic) | |||
| 161 | tcon &= ~S3C2410_TCON_T3RELOAD; | 161 | tcon &= ~S3C2410_TCON_T3RELOAD; |
| 162 | break; | 162 | break; |
| 163 | 163 | ||
| 164 | case S5P_PWM4: | 164 | case SAMSUNG_PWM4: |
| 165 | tcon |= S3C2410_TCON_T4START; | 165 | tcon |= S3C2410_TCON_T4START; |
| 166 | tcon &= ~S3C2410_TCON_T4MANUALUPD; | 166 | tcon &= ~S3C2410_TCON_T4MANUALUPD; |
| 167 | 167 | ||
| @@ -178,24 +178,24 @@ static void s5p_time_start(enum s5p_timer_mode mode, bool periodic) | |||
| 178 | __raw_writel(tcon, S3C2410_TCON); | 178 | __raw_writel(tcon, S3C2410_TCON); |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | static int s5p_set_next_event(unsigned long cycles, | 181 | static int samsung_set_next_event(unsigned long cycles, |
| 182 | struct clock_event_device *evt) | 182 | struct clock_event_device *evt) |
| 183 | { | 183 | { |
| 184 | s5p_time_setup(timer_source.event_id, cycles); | 184 | samsung_time_setup(timer_source.event_id, cycles); |
| 185 | s5p_time_start(timer_source.event_id, NON_PERIODIC); | 185 | samsung_time_start(timer_source.event_id, NON_PERIODIC); |
| 186 | 186 | ||
| 187 | return 0; | 187 | return 0; |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | static void s5p_set_mode(enum clock_event_mode mode, | 190 | static void samsung_set_mode(enum clock_event_mode mode, |
| 191 | struct clock_event_device *evt) | 191 | struct clock_event_device *evt) |
| 192 | { | 192 | { |
| 193 | s5p_time_stop(timer_source.event_id); | 193 | samsung_time_stop(timer_source.event_id); |
| 194 | 194 | ||
| 195 | switch (mode) { | 195 | switch (mode) { |
| 196 | case CLOCK_EVT_MODE_PERIODIC: | 196 | case CLOCK_EVT_MODE_PERIODIC: |
| 197 | s5p_time_setup(timer_source.event_id, clock_count_per_tick); | 197 | samsung_time_setup(timer_source.event_id, clock_count_per_tick); |
| 198 | s5p_time_start(timer_source.event_id, PERIODIC); | 198 | samsung_time_start(timer_source.event_id, PERIODIC); |
| 199 | break; | 199 | break; |
| 200 | 200 | ||
| 201 | case CLOCK_EVT_MODE_ONESHOT: | 201 | case CLOCK_EVT_MODE_ONESHOT: |
| @@ -206,24 +206,24 @@ static void s5p_set_mode(enum clock_event_mode mode, | |||
| 206 | break; | 206 | break; |
| 207 | 207 | ||
| 208 | case CLOCK_EVT_MODE_RESUME: | 208 | case CLOCK_EVT_MODE_RESUME: |
| 209 | s5p_timer_resume(); | 209 | samsung_timer_resume(); |
| 210 | break; | 210 | break; |
| 211 | } | 211 | } |
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | static void s5p_timer_resume(void) | 214 | static void samsung_timer_resume(void) |
| 215 | { | 215 | { |
| 216 | /* event timer restart */ | 216 | /* event timer restart */ |
| 217 | s5p_time_setup(timer_source.event_id, clock_count_per_tick); | 217 | samsung_time_setup(timer_source.event_id, clock_count_per_tick); |
| 218 | s5p_time_start(timer_source.event_id, PERIODIC); | 218 | samsung_time_start(timer_source.event_id, PERIODIC); |
| 219 | 219 | ||
| 220 | /* source timer restart */ | 220 | /* source timer restart */ |
| 221 | s5p_time_setup(timer_source.source_id, TCNT_MAX); | 221 | samsung_time_setup(timer_source.source_id, TCNT_MAX); |
| 222 | s5p_time_start(timer_source.source_id, PERIODIC); | 222 | samsung_time_start(timer_source.source_id, PERIODIC); |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | void __init s5p_set_timer_source(enum s5p_timer_mode event, | 225 | void __init samsung_set_timer_source(enum samsung_timer_mode event, |
| 226 | enum s5p_timer_mode source) | 226 | enum samsung_timer_mode source) |
| 227 | { | 227 | { |
| 228 | s3c_device_timer[event].dev.bus = &platform_bus_type; | 228 | s3c_device_timer[event].dev.bus = &platform_bus_type; |
| 229 | s3c_device_timer[source].dev.bus = &platform_bus_type; | 229 | s3c_device_timer[source].dev.bus = &platform_bus_type; |
| @@ -233,14 +233,14 @@ void __init s5p_set_timer_source(enum s5p_timer_mode event, | |||
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | static struct clock_event_device time_event_device = { | 235 | static struct clock_event_device time_event_device = { |
| 236 | .name = "s5p_event_timer", | 236 | .name = "samsung_event_timer", |
| 237 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | 237 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, |
| 238 | .rating = 200, | 238 | .rating = 200, |
| 239 | .set_next_event = s5p_set_next_event, | 239 | .set_next_event = samsung_set_next_event, |
| 240 | .set_mode = s5p_set_mode, | 240 | .set_mode = samsung_set_mode, |
| 241 | }; | 241 | }; |
| 242 | 242 | ||
| 243 | static irqreturn_t s5p_clock_event_isr(int irq, void *dev_id) | 243 | static irqreturn_t samsung_clock_event_isr(int irq, void *dev_id) |
| 244 | { | 244 | { |
| 245 | struct clock_event_device *evt = dev_id; | 245 | struct clock_event_device *evt = dev_id; |
| 246 | 246 | ||
| @@ -249,14 +249,14 @@ static irqreturn_t s5p_clock_event_isr(int irq, void *dev_id) | |||
| 249 | return IRQ_HANDLED; | 249 | return IRQ_HANDLED; |
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | static struct irqaction s5p_clock_event_irq = { | 252 | static struct irqaction samsung_clock_event_irq = { |
| 253 | .name = "s5p_time_irq", | 253 | .name = "samsung_time_irq", |
| 254 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | 254 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, |
| 255 | .handler = s5p_clock_event_isr, | 255 | .handler = samsung_clock_event_isr, |
| 256 | .dev_id = &time_event_device, | 256 | .dev_id = &time_event_device, |
| 257 | }; | 257 | }; |
| 258 | 258 | ||
| 259 | static void __init s5p_clockevent_init(void) | 259 | static void __init samsung_clockevent_init(void) |
| 260 | { | 260 | { |
| 261 | unsigned long pclk; | 261 | unsigned long pclk; |
| 262 | unsigned long clock_rate; | 262 | unsigned long clock_rate; |
| @@ -267,8 +267,8 @@ static void __init s5p_clockevent_init(void) | |||
| 267 | 267 | ||
| 268 | tscaler = clk_get_parent(tdiv_event); | 268 | tscaler = clk_get_parent(tdiv_event); |
| 269 | 269 | ||
| 270 | clk_set_rate(tscaler, pclk / 2); | 270 | clk_set_rate(tscaler, pclk / TSCALER_DIV); |
| 271 | clk_set_rate(tdiv_event, pclk / 2); | 271 | clk_set_rate(tdiv_event, pclk / TDIV); |
| 272 | clk_set_parent(tin_event, tdiv_event); | 272 | clk_set_parent(tin_event, tdiv_event); |
| 273 | 273 | ||
| 274 | clock_rate = clk_get_rate(tin_event); | 274 | clock_rate = clk_get_rate(tin_event); |
| @@ -278,22 +278,22 @@ static void __init s5p_clockevent_init(void) | |||
| 278 | clockevents_config_and_register(&time_event_device, clock_rate, 1, -1); | 278 | clockevents_config_and_register(&time_event_device, clock_rate, 1, -1); |
| 279 | 279 | ||
| 280 | irq_number = timer_source.event_id + IRQ_TIMER0; | 280 | irq_number = timer_source.event_id + IRQ_TIMER0; |
| 281 | setup_irq(irq_number, &s5p_clock_event_irq); | 281 | setup_irq(irq_number, &samsung_clock_event_irq); |
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | static void __iomem *s5p_timer_reg(void) | 284 | static void __iomem *samsung_timer_reg(void) |
| 285 | { | 285 | { |
| 286 | unsigned long offset = 0; | 286 | unsigned long offset = 0; |
| 287 | 287 | ||
| 288 | switch (timer_source.source_id) { | 288 | switch (timer_source.source_id) { |
| 289 | case S5P_PWM0: | 289 | case SAMSUNG_PWM0: |
| 290 | case S5P_PWM1: | 290 | case SAMSUNG_PWM1: |
| 291 | case S5P_PWM2: | 291 | case SAMSUNG_PWM2: |
| 292 | case S5P_PWM3: | 292 | case SAMSUNG_PWM3: |
| 293 | offset = (timer_source.source_id * 0x0c) + 0x14; | 293 | offset = (timer_source.source_id * 0x0c) + 0x14; |
| 294 | break; | 294 | break; |
| 295 | 295 | ||
| 296 | case S5P_PWM4: | 296 | case SAMSUNG_PWM4: |
| 297 | offset = 0x40; | 297 | offset = 0x40; |
| 298 | break; | 298 | break; |
| 299 | 299 | ||
| @@ -312,9 +312,9 @@ static void __iomem *s5p_timer_reg(void) | |||
| 312 | * this wraps around for now, since it is just a relative time | 312 | * this wraps around for now, since it is just a relative time |
| 313 | * stamp. (Inspired by U300 implementation.) | 313 | * stamp. (Inspired by U300 implementation.) |
| 314 | */ | 314 | */ |
| 315 | static u32 notrace s5p_read_sched_clock(void) | 315 | static u32 notrace samsung_read_sched_clock(void) |
| 316 | { | 316 | { |
| 317 | void __iomem *reg = s5p_timer_reg(); | 317 | void __iomem *reg = samsung_timer_reg(); |
| 318 | 318 | ||
| 319 | if (!reg) | 319 | if (!reg) |
| 320 | return 0; | 320 | return 0; |
| @@ -322,29 +322,29 @@ static u32 notrace s5p_read_sched_clock(void) | |||
| 322 | return ~__raw_readl(reg); | 322 | return ~__raw_readl(reg); |
| 323 | } | 323 | } |
| 324 | 324 | ||
| 325 | static void __init s5p_clocksource_init(void) | 325 | static void __init samsung_clocksource_init(void) |
| 326 | { | 326 | { |
| 327 | unsigned long pclk; | 327 | unsigned long pclk; |
| 328 | unsigned long clock_rate; | 328 | unsigned long clock_rate; |
| 329 | 329 | ||
| 330 | pclk = clk_get_rate(timerclk); | 330 | pclk = clk_get_rate(timerclk); |
| 331 | 331 | ||
| 332 | clk_set_rate(tdiv_source, pclk / 2); | 332 | clk_set_rate(tdiv_source, pclk / TDIV); |
| 333 | clk_set_parent(tin_source, tdiv_source); | 333 | clk_set_parent(tin_source, tdiv_source); |
| 334 | 334 | ||
| 335 | clock_rate = clk_get_rate(tin_source); | 335 | clock_rate = clk_get_rate(tin_source); |
| 336 | 336 | ||
| 337 | s5p_time_setup(timer_source.source_id, TCNT_MAX); | 337 | samsung_time_setup(timer_source.source_id, TCNT_MAX); |
| 338 | s5p_time_start(timer_source.source_id, PERIODIC); | 338 | samsung_time_start(timer_source.source_id, PERIODIC); |
| 339 | 339 | ||
| 340 | setup_sched_clock(s5p_read_sched_clock, 32, clock_rate); | 340 | setup_sched_clock(samsung_read_sched_clock, TSIZE, clock_rate); |
| 341 | 341 | ||
| 342 | if (clocksource_mmio_init(s5p_timer_reg(), "s5p_clocksource_timer", | 342 | if (clocksource_mmio_init(samsung_timer_reg(), "samsung_clocksource_timer", |
| 343 | clock_rate, 250, 32, clocksource_mmio_readl_down)) | 343 | clock_rate, 250, TSIZE, clocksource_mmio_readl_down)) |
| 344 | panic("s5p_clocksource_timer: can't register clocksource\n"); | 344 | panic("samsung_clocksource_timer: can't register clocksource\n"); |
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | static void __init s5p_timer_resources(void) | 347 | static void __init samsung_timer_resources(void) |
| 348 | { | 348 | { |
| 349 | 349 | ||
| 350 | unsigned long event_id = timer_source.event_id; | 350 | unsigned long event_id = timer_source.event_id; |
| @@ -386,9 +386,9 @@ static void __init s5p_timer_resources(void) | |||
| 386 | clk_enable(tin_source); | 386 | clk_enable(tin_source); |
| 387 | } | 387 | } |
| 388 | 388 | ||
| 389 | void __init s5p_timer_init(void) | 389 | void __init samsung_timer_init(void) |
| 390 | { | 390 | { |
| 391 | s5p_timer_resources(); | 391 | samsung_timer_resources(); |
| 392 | s5p_clockevent_init(); | 392 | samsung_clockevent_init(); |
| 393 | s5p_clocksource_init(); | 393 | samsung_clocksource_init(); |
| 394 | } | 394 | } |
diff --git a/arch/arm/plat-samsung/time.c b/arch/arm/plat-samsung/time.c deleted file mode 100644 index 73defd00c3e4..000000000000 --- a/arch/arm/plat-samsung/time.c +++ /dev/null | |||
| @@ -1,287 +0,0 @@ | |||
| 1 | /* linux/arch/arm/plat-samsung/time.c | ||
| 2 | * | ||
| 3 | * Copyright (C) 2003-2005 Simtec Electronics | ||
| 4 | * Ben Dooks, <ben@simtec.co.uk> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/kernel.h> | ||
| 22 | #include <linux/sched.h> | ||
| 23 | #include <linux/init.h> | ||
| 24 | #include <linux/interrupt.h> | ||
| 25 | #include <linux/irq.h> | ||
| 26 | #include <linux/err.h> | ||
| 27 | #include <linux/clk.h> | ||
| 28 | #include <linux/io.h> | ||
| 29 | #include <linux/platform_device.h> | ||
| 30 | #include <linux/syscore_ops.h> | ||
| 31 | |||
| 32 | #include <asm/mach-types.h> | ||
| 33 | |||
| 34 | #include <asm/irq.h> | ||
| 35 | #include <mach/map.h> | ||
| 36 | #include <plat/regs-timer.h> | ||
| 37 | #include <mach/regs-irq.h> | ||
| 38 | #include <asm/mach/time.h> | ||
| 39 | #include <mach/tick.h> | ||
| 40 | |||
| 41 | #include <plat/clock.h> | ||
| 42 | #include <plat/cpu.h> | ||
| 43 | |||
| 44 | static unsigned long timer_startval; | ||
| 45 | static unsigned long timer_usec_ticks; | ||
| 46 | |||
| 47 | #ifndef TICK_MAX | ||
| 48 | #define TICK_MAX (0xffff) | ||
| 49 | #endif | ||
| 50 | |||
| 51 | #define TIMER_USEC_SHIFT 16 | ||
| 52 | |||
| 53 | /* we use the shifted arithmetic to work out the ratio of timer ticks | ||
| 54 | * to usecs, as often the peripheral clock is not a nice even multiple | ||
| 55 | * of 1MHz. | ||
| 56 | * | ||
| 57 | * shift of 14 and 15 are too low for the 12MHz, 16 seems to be ok | ||
| 58 | * for the current HZ value of 200 without producing overflows. | ||
| 59 | * | ||
| 60 | * Original patch by Dimitry Andric, updated by Ben Dooks | ||
| 61 | */ | ||
| 62 | |||
| 63 | |||
| 64 | /* timer_mask_usec_ticks | ||
| 65 | * | ||
| 66 | * given a clock and divisor, make the value to pass into timer_ticks_to_usec | ||
| 67 | * to scale the ticks into usecs | ||
| 68 | */ | ||
| 69 | |||
| 70 | static inline unsigned long | ||
| 71 | timer_mask_usec_ticks(unsigned long scaler, unsigned long pclk) | ||
| 72 | { | ||
| 73 | unsigned long den = pclk / 1000; | ||
| 74 | |||
| 75 | return ((1000 << TIMER_USEC_SHIFT) * scaler + (den >> 1)) / den; | ||
| 76 | } | ||
| 77 | |||
| 78 | /* timer_ticks_to_usec | ||
| 79 | * | ||
| 80 | * convert timer ticks to usec. | ||
| 81 | */ | ||
| 82 | |||
| 83 | static inline unsigned long timer_ticks_to_usec(unsigned long ticks) | ||
| 84 | { | ||
| 85 | unsigned long res; | ||
| 86 | |||
| 87 | res = ticks * timer_usec_ticks; | ||
| 88 | res += 1 << (TIMER_USEC_SHIFT - 4); /* round up slightly */ | ||
| 89 | |||
| 90 | return res >> TIMER_USEC_SHIFT; | ||
| 91 | } | ||
| 92 | |||
| 93 | /*** | ||
| 94 | * Returns microsecond since last clock interrupt. Note that interrupts | ||
| 95 | * will have been disabled by do_gettimeoffset() | ||
| 96 | * IRQs are disabled before entering here from do_gettimeofday() | ||
| 97 | */ | ||
| 98 | |||
| 99 | static u32 s3c2410_gettimeoffset(void) | ||
| 100 | { | ||
| 101 | unsigned long tdone; | ||
| 102 | unsigned long tval; | ||
| 103 | |||
| 104 | /* work out how many ticks have gone since last timer interrupt */ | ||
| 105 | |||
| 106 | tval = __raw_readl(S3C2410_TCNTO(4)); | ||
| 107 | tdone = timer_startval - tval; | ||
| 108 | |||
| 109 | /* check to see if there is an interrupt pending */ | ||
| 110 | |||
| 111 | if (s3c24xx_ostimer_pending()) { | ||
| 112 | /* re-read the timer, and try and fix up for the missed | ||
| 113 | * interrupt. Note, the interrupt may go off before the | ||
| 114 | * timer has re-loaded from wrapping. | ||
| 115 | */ | ||
| 116 | |||
| 117 | tval = __raw_readl(S3C2410_TCNTO(4)); | ||
| 118 | tdone = timer_startval - tval; | ||
| 119 | |||
| 120 | if (tval != 0) | ||
| 121 | tdone += timer_startval; | ||
| 122 | } | ||
| 123 | |||
| 124 | return timer_ticks_to_usec(tdone) * 1000; | ||
| 125 | } | ||
| 126 | |||
| 127 | |||
| 128 | /* | ||
| 129 | * IRQ handler for the timer | ||
| 130 | */ | ||
| 131 | static irqreturn_t | ||
| 132 | s3c2410_timer_interrupt(int irq, void *dev_id) | ||
| 133 | { | ||
| 134 | timer_tick(); | ||
| 135 | return IRQ_HANDLED; | ||
| 136 | } | ||
| 137 | |||
| 138 | static struct irqaction s3c2410_timer_irq = { | ||
| 139 | .name = "S3C2410 Timer Tick", | ||
| 140 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
| 141 | .handler = s3c2410_timer_interrupt, | ||
| 142 | }; | ||
| 143 | |||
| 144 | #define use_tclk1_12() ( \ | ||
| 145 | machine_is_bast() || \ | ||
| 146 | machine_is_vr1000() || \ | ||
| 147 | machine_is_anubis() || \ | ||
| 148 | machine_is_osiris()) | ||
| 149 | |||
| 150 | static struct clk *tin; | ||
| 151 | static struct clk *tdiv; | ||
| 152 | static struct clk *timerclk; | ||
| 153 | |||
| 154 | /* | ||
| 155 | * Set up timer interrupt, and return the current time in seconds. | ||
| 156 | * | ||
| 157 | * Currently we only use timer4, as it is the only timer which has no | ||
| 158 | * other function that can be exploited externally | ||
| 159 | */ | ||
| 160 | static void s3c2410_timer_setup (void) | ||
| 161 | { | ||
| 162 | unsigned long tcon; | ||
| 163 | unsigned long tcnt; | ||
| 164 | unsigned long tcfg1; | ||
| 165 | unsigned long tcfg0; | ||
| 166 | |||
| 167 | tcnt = TICK_MAX; /* default value for tcnt */ | ||
| 168 | |||
| 169 | /* configure the system for whichever machine is in use */ | ||
| 170 | |||
| 171 | if (use_tclk1_12()) { | ||
| 172 | /* timer is at 12MHz, scaler is 1 */ | ||
| 173 | timer_usec_ticks = timer_mask_usec_ticks(1, 12000000); | ||
| 174 | tcnt = 12000000 / HZ; | ||
| 175 | |||
| 176 | tcfg1 = __raw_readl(S3C2410_TCFG1); | ||
| 177 | tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK; | ||
| 178 | tcfg1 |= S3C2410_TCFG1_MUX4_TCLK1; | ||
| 179 | __raw_writel(tcfg1, S3C2410_TCFG1); | ||
| 180 | } else { | ||
| 181 | unsigned long pclk; | ||
| 182 | struct clk *tscaler; | ||
| 183 | |||
| 184 | /* for the h1940 (and others), we use the pclk from the core | ||
| 185 | * to generate the timer values. since values around 50 to | ||
| 186 | * 70MHz are not values we can directly generate the timer | ||
| 187 | * value from, we need to pre-scale and divide before using it. | ||
| 188 | * | ||
| 189 | * for instance, using 50.7MHz and dividing by 6 gives 8.45MHz | ||
| 190 | * (8.45 ticks per usec) | ||
| 191 | */ | ||
| 192 | |||
| 193 | pclk = clk_get_rate(timerclk); | ||
| 194 | |||
| 195 | /* configure clock tick */ | ||
| 196 | |||
| 197 | timer_usec_ticks = timer_mask_usec_ticks(6, pclk); | ||
| 198 | |||
| 199 | tscaler = clk_get_parent(tdiv); | ||
| 200 | |||
| 201 | clk_set_rate(tscaler, pclk / 3); | ||
| 202 | clk_set_rate(tdiv, pclk / 6); | ||
| 203 | clk_set_parent(tin, tdiv); | ||
| 204 | |||
| 205 | tcnt = clk_get_rate(tin) / HZ; | ||
| 206 | } | ||
| 207 | |||
| 208 | tcon = __raw_readl(S3C2410_TCON); | ||
| 209 | tcfg0 = __raw_readl(S3C2410_TCFG0); | ||
| 210 | tcfg1 = __raw_readl(S3C2410_TCFG1); | ||
| 211 | |||
| 212 | /* timers reload after counting zero, so reduce the count by 1 */ | ||
| 213 | |||
| 214 | tcnt--; | ||
| 215 | |||
| 216 | printk(KERN_DEBUG "timer tcon=%08lx, tcnt %04lx, tcfg %08lx,%08lx, usec %08lx\n", | ||
| 217 | tcon, tcnt, tcfg0, tcfg1, timer_usec_ticks); | ||
| 218 | |||
| 219 | /* check to see if timer is within 16bit range... */ | ||
| 220 | if (tcnt > TICK_MAX) { | ||
| 221 | panic("setup_timer: HZ is too small, cannot configure timer!"); | ||
| 222 | return; | ||
| 223 | } | ||
| 224 | |||
| 225 | __raw_writel(tcfg1, S3C2410_TCFG1); | ||
| 226 | __raw_writel(tcfg0, S3C2410_TCFG0); | ||
| 227 | |||
| 228 | timer_startval = tcnt; | ||
| 229 | __raw_writel(tcnt, S3C2410_TCNTB(4)); | ||
| 230 | |||
| 231 | /* ensure timer is stopped... */ | ||
| 232 | |||
| 233 | tcon &= ~(7<<20); | ||
| 234 | tcon |= S3C2410_TCON_T4RELOAD; | ||
| 235 | tcon |= S3C2410_TCON_T4MANUALUPD; | ||
| 236 | |||
| 237 | __raw_writel(tcon, S3C2410_TCON); | ||
| 238 | __raw_writel(tcnt, S3C2410_TCNTB(4)); | ||
| 239 | __raw_writel(tcnt, S3C2410_TCMPB(4)); | ||
| 240 | |||
| 241 | /* start the timer running */ | ||
| 242 | tcon |= S3C2410_TCON_T4START; | ||
| 243 | tcon &= ~S3C2410_TCON_T4MANUALUPD; | ||
| 244 | __raw_writel(tcon, S3C2410_TCON); | ||
| 245 | } | ||
| 246 | |||
| 247 | static void __init s3c2410_timer_resources(void) | ||
| 248 | { | ||
| 249 | struct platform_device tmpdev; | ||
| 250 | |||
| 251 | tmpdev.dev.bus = &platform_bus_type; | ||
| 252 | tmpdev.id = 4; | ||
| 253 | |||
| 254 | timerclk = clk_get(NULL, "timers"); | ||
| 255 | if (IS_ERR(timerclk)) | ||
| 256 | panic("failed to get clock for system timer"); | ||
| 257 | |||
| 258 | clk_enable(timerclk); | ||
| 259 | |||
| 260 | if (!use_tclk1_12()) { | ||
| 261 | tmpdev.id = 4; | ||
| 262 | tmpdev.dev.init_name = "s3c24xx-pwm.4"; | ||
| 263 | tin = clk_get(&tmpdev.dev, "pwm-tin"); | ||
| 264 | if (IS_ERR(tin)) | ||
| 265 | panic("failed to get pwm-tin clock for system timer"); | ||
| 266 | |||
| 267 | tdiv = clk_get(&tmpdev.dev, "pwm-tdiv"); | ||
| 268 | if (IS_ERR(tdiv)) | ||
| 269 | panic("failed to get pwm-tdiv clock for system timer"); | ||
| 270 | } | ||
| 271 | |||
| 272 | clk_enable(tin); | ||
| 273 | } | ||
| 274 | |||
| 275 | static struct syscore_ops s3c24xx_syscore_ops = { | ||
| 276 | .resume = s3c2410_timer_setup, | ||
| 277 | }; | ||
| 278 | |||
| 279 | void __init s3c24xx_timer_init(void) | ||
| 280 | { | ||
| 281 | arch_gettimeoffset = s3c2410_gettimeoffset; | ||
| 282 | |||
| 283 | s3c2410_timer_resources(); | ||
| 284 | s3c2410_timer_setup(); | ||
| 285 | setup_irq(IRQ_TIMER4, &s3c2410_timer_irq); | ||
| 286 | register_syscore_ops(&s3c24xx_syscore_ops); | ||
| 287 | } | ||
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index 79e98e416724..17e8dc4e417c 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile | |||
| @@ -29,6 +29,7 @@ obj-$(CONFIG_ARCH_U8500) += ux500/ | |||
| 29 | obj-$(CONFIG_ARCH_VT8500) += clk-vt8500.o | 29 | obj-$(CONFIG_ARCH_VT8500) += clk-vt8500.o |
| 30 | obj-$(CONFIG_ARCH_ZYNQ) += clk-zynq.o | 30 | obj-$(CONFIG_ARCH_ZYNQ) += clk-zynq.o |
| 31 | obj-$(CONFIG_ARCH_TEGRA) += tegra/ | 31 | obj-$(CONFIG_ARCH_TEGRA) += tegra/ |
| 32 | obj-$(CONFIG_PLAT_SAMSUNG) += samsung/ | ||
| 32 | 33 | ||
| 33 | obj-$(CONFIG_X86) += x86/ | 34 | obj-$(CONFIG_X86) += x86/ |
| 34 | 35 | ||
diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile new file mode 100644 index 000000000000..b7c232e67425 --- /dev/null +++ b/drivers/clk/samsung/Makefile | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | # | ||
| 2 | # Samsung Clock specific Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | obj-$(CONFIG_COMMON_CLK) += clk.o clk-pll.o | ||
| 6 | obj-$(CONFIG_ARCH_EXYNOS4) += clk-exynos4.o | ||
| 7 | obj-$(CONFIG_SOC_EXYNOS5250) += clk-exynos5250.o | ||
| 8 | obj-$(CONFIG_SOC_EXYNOS5440) += clk-exynos5440.o | ||
diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c new file mode 100644 index 000000000000..71046694d9dd --- /dev/null +++ b/drivers/clk/samsung/clk-exynos4.c | |||
| @@ -0,0 +1,1091 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Samsung Electronics Co., Ltd. | ||
| 3 | * Copyright (c) 2013 Linaro Ltd. | ||
| 4 | * Author: Thomas Abraham <thomas.ab@samsung.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * Common Clock Framework support for all Exynos4 SoCs. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <linux/clk.h> | ||
| 14 | #include <linux/clkdev.h> | ||
| 15 | #include <linux/clk-provider.h> | ||
| 16 | #include <linux/of.h> | ||
| 17 | #include <linux/of_address.h> | ||
| 18 | |||
| 19 | #include <plat/cpu.h> | ||
| 20 | #include "clk.h" | ||
| 21 | #include "clk-pll.h" | ||
| 22 | |||
| 23 | /* Exynos4 clock controller register offsets */ | ||
| 24 | #define SRC_LEFTBUS 0x4200 | ||
| 25 | #define DIV_LEFTBUS 0x4500 | ||
| 26 | #define GATE_IP_LEFTBUS 0x4800 | ||
| 27 | #define E4X12_GATE_IP_IMAGE 0x4930 | ||
| 28 | #define SRC_RIGHTBUS 0x8200 | ||
| 29 | #define DIV_RIGHTBUS 0x8500 | ||
| 30 | #define GATE_IP_RIGHTBUS 0x8800 | ||
| 31 | #define E4X12_GATE_IP_PERIR 0x8960 | ||
| 32 | #define EPLL_LOCK 0xc010 | ||
| 33 | #define VPLL_LOCK 0xc020 | ||
| 34 | #define EPLL_CON0 0xc110 | ||
| 35 | #define EPLL_CON1 0xc114 | ||
| 36 | #define EPLL_CON2 0xc118 | ||
| 37 | #define VPLL_CON0 0xc120 | ||
| 38 | #define VPLL_CON1 0xc124 | ||
| 39 | #define VPLL_CON2 0xc128 | ||
| 40 | #define SRC_TOP0 0xc210 | ||
| 41 | #define SRC_TOP1 0xc214 | ||
| 42 | #define SRC_CAM 0xc220 | ||
| 43 | #define SRC_TV 0xc224 | ||
| 44 | #define SRC_MFC 0xcc28 | ||
| 45 | #define SRC_G3D 0xc22c | ||
| 46 | #define E4210_SRC_IMAGE 0xc230 | ||
| 47 | #define SRC_LCD0 0xc234 | ||
| 48 | #define E4210_SRC_LCD1 0xc238 | ||
| 49 | #define E4X12_SRC_ISP 0xc238 | ||
| 50 | #define SRC_MAUDIO 0xc23c | ||
| 51 | #define SRC_FSYS 0xc240 | ||
| 52 | #define SRC_PERIL0 0xc250 | ||
| 53 | #define SRC_PERIL1 0xc254 | ||
| 54 | #define E4X12_SRC_CAM1 0xc258 | ||
| 55 | #define SRC_MASK_TOP 0xc310 | ||
| 56 | #define SRC_MASK_CAM 0xc320 | ||
| 57 | #define SRC_MASK_TV 0xc324 | ||
| 58 | #define SRC_MASK_LCD0 0xc334 | ||
| 59 | #define E4210_SRC_MASK_LCD1 0xc338 | ||
| 60 | #define E4X12_SRC_MASK_ISP 0xc338 | ||
| 61 | #define SRC_MASK_MAUDIO 0xc33c | ||
| 62 | #define SRC_MASK_FSYS 0xc340 | ||
| 63 | #define SRC_MASK_PERIL0 0xc350 | ||
| 64 | #define SRC_MASK_PERIL1 0xc354 | ||
| 65 | #define DIV_TOP 0xc510 | ||
| 66 | #define DIV_CAM 0xc520 | ||
| 67 | #define DIV_TV 0xc524 | ||
| 68 | #define DIV_MFC 0xc528 | ||
| 69 | #define DIV_G3D 0xc52c | ||
| 70 | #define DIV_IMAGE 0xc530 | ||
| 71 | #define DIV_LCD0 0xc534 | ||
| 72 | #define E4210_DIV_LCD1 0xc538 | ||
| 73 | #define E4X12_DIV_ISP 0xc538 | ||
| 74 | #define DIV_MAUDIO 0xc53c | ||
| 75 | #define DIV_FSYS0 0xc540 | ||
| 76 | #define DIV_FSYS1 0xc544 | ||
| 77 | #define DIV_FSYS2 0xc548 | ||
| 78 | #define DIV_FSYS3 0xc54c | ||
| 79 | #define DIV_PERIL0 0xc550 | ||
| 80 | #define DIV_PERIL1 0xc554 | ||
| 81 | #define DIV_PERIL2 0xc558 | ||
| 82 | #define DIV_PERIL3 0xc55c | ||
| 83 | #define DIV_PERIL4 0xc560 | ||
| 84 | #define DIV_PERIL5 0xc564 | ||
| 85 | #define E4X12_DIV_CAM1 0xc568 | ||
| 86 | #define GATE_SCLK_CAM 0xc820 | ||
| 87 | #define GATE_IP_CAM 0xc920 | ||
| 88 | #define GATE_IP_TV 0xc924 | ||
| 89 | #define GATE_IP_MFC 0xc928 | ||
| 90 | #define GATE_IP_G3D 0xc92c | ||
| 91 | #define E4210_GATE_IP_IMAGE 0xc930 | ||
| 92 | #define GATE_IP_LCD0 0xc934 | ||
| 93 | #define E4210_GATE_IP_LCD1 0xc938 | ||
| 94 | #define E4X12_GATE_IP_ISP 0xc938 | ||
| 95 | #define E4X12_GATE_IP_MAUDIO 0xc93c | ||
| 96 | #define GATE_IP_FSYS 0xc940 | ||
| 97 | #define GATE_IP_GPS 0xc94c | ||
| 98 | #define GATE_IP_PERIL 0xc950 | ||
| 99 | #define E4210_GATE_IP_PERIR 0xc960 | ||
| 100 | #define GATE_BLOCK 0xc970 | ||
| 101 | #define E4X12_MPLL_CON0 0x10108 | ||
| 102 | #define SRC_DMC 0x10200 | ||
| 103 | #define SRC_MASK_DMC 0x10300 | ||
| 104 | #define DIV_DMC0 0x10500 | ||
| 105 | #define DIV_DMC1 0x10504 | ||
| 106 | #define GATE_IP_DMC 0x10900 | ||
| 107 | #define APLL_CON0 0x14100 | ||
| 108 | #define E4210_MPLL_CON0 0x14108 | ||
| 109 | #define SRC_CPU 0x14200 | ||
| 110 | #define DIV_CPU0 0x14500 | ||
| 111 | #define DIV_CPU1 0x14504 | ||
| 112 | #define GATE_SCLK_CPU 0x14800 | ||
| 113 | #define GATE_IP_CPU 0x14900 | ||
| 114 | #define E4X12_DIV_ISP0 0x18300 | ||
| 115 | #define E4X12_DIV_ISP1 0x18304 | ||
| 116 | #define E4X12_GATE_ISP0 0x18800 | ||
| 117 | #define E4X12_GATE_ISP1 0x18804 | ||
| 118 | |||
| 119 | /* the exynos4 soc type */ | ||
| 120 | enum exynos4_soc { | ||
| 121 | EXYNOS4210, | ||
| 122 | EXYNOS4X12, | ||
| 123 | }; | ||
| 124 | |||
| 125 | /* | ||
| 126 | * Let each supported clock get a unique id. This id is used to lookup the clock | ||
| 127 | * for device tree based platforms. The clocks are categorized into three | ||
| 128 | * sections: core, sclk gate and bus interface gate clocks. | ||
| 129 | * | ||
| 130 | * When adding a new clock to this list, it is advised to choose a clock | ||
| 131 | * category and add it to the end of that category. That is because the the | ||
| 132 | * device tree source file is referring to these ids and any change in the | ||
| 133 | * sequence number of existing clocks will require corresponding change in the | ||
| 134 | * device tree files. This limitation would go away when pre-processor support | ||
| 135 | * for dtc would be available. | ||
| 136 | */ | ||
| 137 | enum exynos4_clks { | ||
| 138 | none, | ||
| 139 | |||
| 140 | /* core clocks */ | ||
| 141 | xxti, xusbxti, fin_pll, fout_apll, fout_mpll, fout_epll, fout_vpll, | ||
| 142 | sclk_apll, sclk_mpll, sclk_epll, sclk_vpll, arm_clk, aclk200, aclk100, | ||
| 143 | aclk160, aclk133, mout_mpll_user_t, mout_mpll_user_c, mout_core, | ||
| 144 | mout_apll, /* 20 */ | ||
| 145 | |||
| 146 | /* gate for special clocks (sclk) */ | ||
| 147 | sclk_fimc0 = 128, sclk_fimc1, sclk_fimc2, sclk_fimc3, sclk_cam0, | ||
| 148 | sclk_cam1, sclk_csis0, sclk_csis1, sclk_hdmi, sclk_mixer, sclk_dac, | ||
| 149 | sclk_pixel, sclk_fimd0, sclk_mdnie0, sclk_mdnie_pwm0, sclk_mipi0, | ||
| 150 | sclk_audio0, sclk_mmc0, sclk_mmc1, sclk_mmc2, sclk_mmc3, sclk_mmc4, | ||
| 151 | sclk_sata, sclk_uart0, sclk_uart1, sclk_uart2, sclk_uart3, sclk_uart4, | ||
| 152 | sclk_audio1, sclk_audio2, sclk_spdif, sclk_spi0, sclk_spi1, sclk_spi2, | ||
| 153 | sclk_slimbus, sclk_fimd1, sclk_mipi1, sclk_pcm1, sclk_pcm2, sclk_i2s1, | ||
| 154 | sclk_i2s2, sclk_mipihsi, sclk_mfc, sclk_pcm0, sclk_g3d, sclk_pwm_isp, | ||
| 155 | sclk_spi0_isp, sclk_spi1_isp, sclk_uart_isp, | ||
| 156 | |||
| 157 | /* gate clocks */ | ||
| 158 | fimc0 = 256, fimc1, fimc2, fimc3, csis0, csis1, jpeg, smmu_fimc0, | ||
| 159 | smmu_fimc1, smmu_fimc2, smmu_fimc3, smmu_jpeg, vp, mixer, tvenc, hdmi, | ||
| 160 | smmu_tv, mfc, smmu_mfcl, smmu_mfcr, g3d, g2d, rotator, mdma, smmu_g2d, | ||
| 161 | smmu_rotator, smmu_mdma, fimd0, mie0, mdnie0, dsim0, smmu_fimd0, fimd1, | ||
| 162 | mie1, dsim1, smmu_fimd1, pdma0, pdma1, pcie_phy, sata_phy, tsi, sdmmc0, | ||
| 163 | sdmmc1, sdmmc2, sdmmc3, sdmmc4, sata, sromc, usb_host, usb_device, pcie, | ||
| 164 | onenand, nfcon, smmu_pcie, gps, smmu_gps, uart0, uart1, uart2, uart3, | ||
| 165 | uart4, i2c0, i2c1, i2c2, i2c3, i2c4, i2c5, i2c6, i2c7, i2c_hdmi, tsadc, | ||
| 166 | spi0, spi1, spi2, i2s1, i2s2, pcm0, i2s0, pcm1, pcm2, pwm, slimbus, | ||
| 167 | spdif, ac97, modemif, chipid, sysreg, hdmi_cec, mct, wdt, rtc, keyif, | ||
| 168 | audss, mipi_hsi, mdma2, pixelasyncm0, pixelasyncm1, fimc_lite0, | ||
| 169 | fimc_lite1, ppmuispx, ppmuispmx, fimc_isp, fimc_drc, fimc_fd, mcuisp, | ||
| 170 | gicisp, smmu_isp, smmu_drc, smmu_fd, smmu_lite0, smmu_lite1, mcuctl_isp, | ||
| 171 | mpwm_isp, i2c0_isp, i2c1_isp, mtcadc_isp, pwm_isp, wdt_isp, uart_isp, | ||
| 172 | asyncaxim, smmu_ispcx, spi0_isp, spi1_isp, pwm_isp_sclk, spi0_isp_sclk, | ||
| 173 | spi1_isp_sclk, uart_isp_sclk, | ||
| 174 | |||
| 175 | /* mux clocks */ | ||
| 176 | mout_fimc0 = 384, mout_fimc1, mout_fimc2, mout_fimc3, mout_cam0, | ||
| 177 | mout_cam1, mout_csis0, mout_csis1, mout_g3d0, mout_g3d1, mout_g3d, | ||
| 178 | aclk400_mcuisp, | ||
| 179 | |||
| 180 | /* div clocks */ | ||
| 181 | div_isp0 = 450, div_isp1, div_mcuisp0, div_mcuisp1, div_aclk200, | ||
| 182 | div_aclk400_mcuisp, | ||
| 183 | |||
| 184 | nr_clks, | ||
| 185 | }; | ||
| 186 | |||
| 187 | /* | ||
| 188 | * list of controller registers to be saved and restored during a | ||
| 189 | * suspend/resume cycle. | ||
| 190 | */ | ||
| 191 | static __initdata unsigned long exynos4210_clk_save[] = { | ||
| 192 | E4210_SRC_IMAGE, | ||
| 193 | E4210_SRC_LCD1, | ||
| 194 | E4210_SRC_MASK_LCD1, | ||
| 195 | E4210_DIV_LCD1, | ||
| 196 | E4210_GATE_IP_IMAGE, | ||
| 197 | E4210_GATE_IP_LCD1, | ||
| 198 | E4210_GATE_IP_PERIR, | ||
| 199 | E4210_MPLL_CON0, | ||
| 200 | }; | ||
| 201 | |||
| 202 | static __initdata unsigned long exynos4x12_clk_save[] = { | ||
| 203 | E4X12_GATE_IP_IMAGE, | ||
| 204 | E4X12_GATE_IP_PERIR, | ||
| 205 | E4X12_SRC_CAM1, | ||
| 206 | E4X12_DIV_ISP, | ||
| 207 | E4X12_DIV_CAM1, | ||
| 208 | E4X12_MPLL_CON0, | ||
| 209 | }; | ||
| 210 | |||
| 211 | static __initdata unsigned long exynos4_clk_regs[] = { | ||
| 212 | SRC_LEFTBUS, | ||
| 213 | DIV_LEFTBUS, | ||
| 214 | GATE_IP_LEFTBUS, | ||
| 215 | SRC_RIGHTBUS, | ||
| 216 | DIV_RIGHTBUS, | ||
| 217 | GATE_IP_RIGHTBUS, | ||
| 218 | EPLL_CON0, | ||
| 219 | EPLL_CON1, | ||
| 220 | EPLL_CON2, | ||
| 221 | VPLL_CON0, | ||
| 222 | VPLL_CON1, | ||
| 223 | VPLL_CON2, | ||
| 224 | SRC_TOP0, | ||
| 225 | SRC_TOP1, | ||
| 226 | SRC_CAM, | ||
| 227 | SRC_TV, | ||
| 228 | SRC_MFC, | ||
| 229 | SRC_G3D, | ||
| 230 | SRC_LCD0, | ||
| 231 | SRC_MAUDIO, | ||
| 232 | SRC_FSYS, | ||
| 233 | SRC_PERIL0, | ||
| 234 | SRC_PERIL1, | ||
| 235 | SRC_MASK_TOP, | ||
| 236 | SRC_MASK_CAM, | ||
| 237 | SRC_MASK_TV, | ||
| 238 | SRC_MASK_LCD0, | ||
| 239 | SRC_MASK_MAUDIO, | ||
| 240 | SRC_MASK_FSYS, | ||
| 241 | SRC_MASK_PERIL0, | ||
| 242 | SRC_MASK_PERIL1, | ||
| 243 | DIV_TOP, | ||
| 244 | DIV_CAM, | ||
| 245 | DIV_TV, | ||
| 246 | DIV_MFC, | ||
| 247 | DIV_G3D, | ||
| 248 | DIV_IMAGE, | ||
| 249 | DIV_LCD0, | ||
| 250 | DIV_MAUDIO, | ||
| 251 | DIV_FSYS0, | ||
| 252 | DIV_FSYS1, | ||
| 253 | DIV_FSYS2, | ||
| 254 | DIV_FSYS3, | ||
| 255 | DIV_PERIL0, | ||
| 256 | DIV_PERIL1, | ||
| 257 | DIV_PERIL2, | ||
| 258 | DIV_PERIL3, | ||
| 259 | DIV_PERIL4, | ||
| 260 | DIV_PERIL5, | ||
| 261 | GATE_SCLK_CAM, | ||
| 262 | GATE_IP_CAM, | ||
| 263 | GATE_IP_TV, | ||
| 264 | GATE_IP_MFC, | ||
| 265 | GATE_IP_G3D, | ||
| 266 | GATE_IP_LCD0, | ||
| 267 | GATE_IP_FSYS, | ||
| 268 | GATE_IP_GPS, | ||
| 269 | GATE_IP_PERIL, | ||
| 270 | GATE_BLOCK, | ||
| 271 | SRC_MASK_DMC, | ||
| 272 | SRC_DMC, | ||
| 273 | DIV_DMC0, | ||
| 274 | DIV_DMC1, | ||
| 275 | GATE_IP_DMC, | ||
| 276 | APLL_CON0, | ||
| 277 | SRC_CPU, | ||
| 278 | DIV_CPU0, | ||
| 279 | DIV_CPU1, | ||
| 280 | GATE_SCLK_CPU, | ||
| 281 | GATE_IP_CPU, | ||
| 282 | }; | ||
| 283 | |||
| 284 | /* list of all parent clock list */ | ||
| 285 | PNAME(mout_apll_p) = { "fin_pll", "fout_apll", }; | ||
| 286 | PNAME(mout_mpll_p) = { "fin_pll", "fout_mpll", }; | ||
| 287 | PNAME(mout_epll_p) = { "fin_pll", "fout_epll", }; | ||
| 288 | PNAME(mout_vpllsrc_p) = { "fin_pll", "sclk_hdmi24m", }; | ||
| 289 | PNAME(mout_vpll_p) = { "fin_pll", "fout_vpll", }; | ||
| 290 | PNAME(sclk_evpll_p) = { "sclk_epll", "sclk_vpll", }; | ||
| 291 | PNAME(mout_mfc_p) = { "mout_mfc0", "mout_mfc1", }; | ||
| 292 | PNAME(mout_g3d_p) = { "mout_g3d0", "mout_g3d1", }; | ||
| 293 | PNAME(mout_g2d_p) = { "mout_g2d0", "mout_g2d1", }; | ||
| 294 | PNAME(mout_hdmi_p) = { "sclk_pixel", "sclk_hdmiphy", }; | ||
| 295 | PNAME(mout_jpeg_p) = { "mout_jpeg0", "mout_jpeg1", }; | ||
| 296 | PNAME(mout_spdif_p) = { "sclk_audio0", "sclk_audio1", "sclk_audio2", | ||
| 297 | "spdif_extclk", }; | ||
| 298 | PNAME(mout_onenand_p) = {"aclk133", "aclk160", }; | ||
| 299 | PNAME(mout_onenand1_p) = {"mout_onenand", "sclk_vpll", }; | ||
| 300 | |||
| 301 | /* Exynos 4210-specific parent groups */ | ||
| 302 | PNAME(sclk_vpll_p4210) = { "mout_vpllsrc", "fout_vpll", }; | ||
| 303 | PNAME(mout_core_p4210) = { "mout_apll", "sclk_mpll", }; | ||
| 304 | PNAME(sclk_ampll_p4210) = { "sclk_mpll", "sclk_apll", }; | ||
| 305 | PNAME(group1_p4210) = { "xxti", "xusbxti", "sclk_hdmi24m", | ||
| 306 | "sclk_usbphy0", "none", "sclk_hdmiphy", | ||
| 307 | "sclk_mpll", "sclk_epll", "sclk_vpll", }; | ||
| 308 | PNAME(mout_audio0_p4210) = { "cdclk0", "none", "sclk_hdmi24m", | ||
| 309 | "sclk_usbphy0", "xxti", "xusbxti", "sclk_mpll", | ||
| 310 | "sclk_epll", "sclk_vpll" }; | ||
| 311 | PNAME(mout_audio1_p4210) = { "cdclk1", "none", "sclk_hdmi24m", | ||
| 312 | "sclk_usbphy0", "xxti", "xusbxti", "sclk_mpll", | ||
| 313 | "sclk_epll", "sclk_vpll", }; | ||
| 314 | PNAME(mout_audio2_p4210) = { "cdclk2", "none", "sclk_hdmi24m", | ||
| 315 | "sclk_usbphy0", "xxti", "xusbxti", "sclk_mpll", | ||
| 316 | "sclk_epll", "sclk_vpll", }; | ||
| 317 | PNAME(mout_mixer_p4210) = { "sclk_dac", "sclk_hdmi", }; | ||
| 318 | PNAME(mout_dac_p4210) = { "sclk_vpll", "sclk_hdmiphy", }; | ||
| 319 | |||
| 320 | /* Exynos 4x12-specific parent groups */ | ||
| 321 | PNAME(mout_mpll_user_p4x12) = { "fin_pll", "sclk_mpll", }; | ||
| 322 | PNAME(mout_core_p4x12) = { "mout_apll", "mout_mpll_user_c", }; | ||
| 323 | PNAME(sclk_ampll_p4x12) = { "mout_mpll_user_t", "sclk_apll", }; | ||
| 324 | PNAME(group1_p4x12) = { "xxti", "xusbxti", "sclk_hdmi24m", "sclk_usbphy0", | ||
| 325 | "none", "sclk_hdmiphy", "mout_mpll_user_t", | ||
| 326 | "sclk_epll", "sclk_vpll", }; | ||
| 327 | PNAME(mout_audio0_p4x12) = { "cdclk0", "none", "sclk_hdmi24m", | ||
| 328 | "sclk_usbphy0", "xxti", "xusbxti", | ||
| 329 | "mout_mpll_user_t", "sclk_epll", "sclk_vpll" }; | ||
| 330 | PNAME(mout_audio1_p4x12) = { "cdclk1", "none", "sclk_hdmi24m", | ||
| 331 | "sclk_usbphy0", "xxti", "xusbxti", | ||
| 332 | "mout_mpll_user_t", "sclk_epll", "sclk_vpll", }; | ||
| 333 | PNAME(mout_audio2_p4x12) = { "cdclk2", "none", "sclk_hdmi24m", | ||
| 334 | "sclk_usbphy0", "xxti", "xusbxti", | ||
| 335 | "mout_mpll_user_t", "sclk_epll", "sclk_vpll", }; | ||
| 336 | PNAME(aclk_p4412) = { "mout_mpll_user_t", "sclk_apll", }; | ||
| 337 | PNAME(mout_user_aclk400_mcuisp_p4x12) = {"fin_pll", "div_aclk400_mcuisp", }; | ||
| 338 | PNAME(mout_user_aclk200_p4x12) = {"fin_pll", "div_aclk200", }; | ||
| 339 | PNAME(mout_user_aclk266_gps_p4x12) = {"fin_pll", "div_aclk266_gps", }; | ||
| 340 | |||
| 341 | /* fixed rate clocks generated outside the soc */ | ||
| 342 | struct samsung_fixed_rate_clock exynos4_fixed_rate_ext_clks[] __initdata = { | ||
| 343 | FRATE(xxti, "xxti", NULL, CLK_IS_ROOT, 0), | ||
| 344 | FRATE(xusbxti, "xusbxti", NULL, CLK_IS_ROOT, 0), | ||
| 345 | }; | ||
| 346 | |||
| 347 | /* fixed rate clocks generated inside the soc */ | ||
| 348 | struct samsung_fixed_rate_clock exynos4_fixed_rate_clks[] __initdata = { | ||
| 349 | FRATE(none, "sclk_hdmi24m", NULL, CLK_IS_ROOT, 24000000), | ||
| 350 | FRATE(none, "sclk_hdmiphy", NULL, CLK_IS_ROOT, 27000000), | ||
| 351 | FRATE(none, "sclk_usbphy0", NULL, CLK_IS_ROOT, 48000000), | ||
| 352 | }; | ||
| 353 | |||
| 354 | struct samsung_fixed_rate_clock exynos4210_fixed_rate_clks[] __initdata = { | ||
| 355 | FRATE(none, "sclk_usbphy1", NULL, CLK_IS_ROOT, 48000000), | ||
| 356 | }; | ||
| 357 | |||
| 358 | /* list of mux clocks supported in all exynos4 soc's */ | ||
| 359 | struct samsung_mux_clock exynos4_mux_clks[] __initdata = { | ||
| 360 | MUX_F(mout_apll, "mout_apll", mout_apll_p, SRC_CPU, 0, 1, | ||
| 361 | CLK_SET_RATE_PARENT, 0), | ||
| 362 | MUX(none, "mout_hdmi", mout_hdmi_p, SRC_TV, 0, 1), | ||
| 363 | MUX(none, "mout_mfc1", sclk_evpll_p, SRC_MFC, 4, 1), | ||
| 364 | MUX(none, "mout_mfc", mout_mfc_p, SRC_MFC, 8, 1), | ||
| 365 | MUX_F(mout_g3d1, "mout_g3d1", sclk_evpll_p, SRC_G3D, 4, 1, | ||
| 366 | CLK_SET_RATE_PARENT, 0), | ||
| 367 | MUX_F(mout_g3d, "mout_g3d", mout_g3d_p, SRC_G3D, 8, 1, | ||
| 368 | CLK_SET_RATE_PARENT, 0), | ||
| 369 | MUX(none, "mout_spdif", mout_spdif_p, SRC_PERIL1, 8, 2), | ||
| 370 | MUX(none, "mout_onenand1", mout_onenand1_p, SRC_TOP0, 0, 1), | ||
| 371 | MUX_A(sclk_epll, "sclk_epll", mout_epll_p, SRC_TOP0, 4, 1, "sclk_epll"), | ||
| 372 | MUX(none, "mout_onenand", mout_onenand_p, SRC_TOP0, 28, 1), | ||
| 373 | }; | ||
| 374 | |||
| 375 | /* list of mux clocks supported in exynos4210 soc */ | ||
| 376 | struct samsung_mux_clock exynos4210_mux_clks[] __initdata = { | ||
| 377 | MUX(none, "mout_aclk200", sclk_ampll_p4210, SRC_TOP0, 12, 1), | ||
| 378 | MUX(none, "mout_aclk100", sclk_ampll_p4210, SRC_TOP0, 16, 1), | ||
| 379 | MUX(none, "mout_aclk160", sclk_ampll_p4210, SRC_TOP0, 20, 1), | ||
| 380 | MUX(none, "mout_aclk133", sclk_ampll_p4210, SRC_TOP0, 24, 1), | ||
| 381 | MUX(none, "mout_vpllsrc", mout_vpllsrc_p, SRC_TOP1, 0, 1), | ||
| 382 | MUX(none, "mout_mixer", mout_mixer_p4210, SRC_TV, 4, 1), | ||
| 383 | MUX(none, "mout_dac", mout_dac_p4210, SRC_TV, 8, 1), | ||
| 384 | MUX(none, "mout_g2d0", sclk_ampll_p4210, E4210_SRC_IMAGE, 0, 1), | ||
| 385 | MUX(none, "mout_g2d1", sclk_evpll_p, E4210_SRC_IMAGE, 4, 1), | ||
| 386 | MUX(none, "mout_g2d", mout_g2d_p, E4210_SRC_IMAGE, 8, 1), | ||
| 387 | MUX(none, "mout_fimd1", group1_p4210, E4210_SRC_LCD1, 0, 4), | ||
| 388 | MUX(none, "mout_mipi1", group1_p4210, E4210_SRC_LCD1, 12, 4), | ||
| 389 | MUX_A(sclk_mpll, "sclk_mpll", mout_mpll_p, SRC_CPU, 8, 1, "sclk_mpll"), | ||
| 390 | MUX_A(mout_core, "mout_core", mout_core_p4210, | ||
| 391 | SRC_CPU, 16, 1, "mout_core"), | ||
| 392 | MUX_A(sclk_vpll, "sclk_vpll", sclk_vpll_p4210, | ||
| 393 | SRC_TOP0, 8, 1, "sclk_vpll"), | ||
| 394 | MUX(mout_fimc0, "mout_fimc0", group1_p4210, SRC_CAM, 0, 4), | ||
| 395 | MUX(mout_fimc1, "mout_fimc1", group1_p4210, SRC_CAM, 4, 4), | ||
| 396 | MUX(mout_fimc2, "mout_fimc2", group1_p4210, SRC_CAM, 8, 4), | ||
| 397 | MUX(mout_fimc3, "mout_fimc3", group1_p4210, SRC_CAM, 12, 4), | ||
| 398 | MUX(mout_cam0, "mout_cam0", group1_p4210, SRC_CAM, 16, 4), | ||
| 399 | MUX(mout_cam1, "mout_cam1", group1_p4210, SRC_CAM, 20, 4), | ||
| 400 | MUX(mout_csis0, "mout_csis0", group1_p4210, SRC_CAM, 24, 4), | ||
| 401 | MUX(mout_csis1, "mout_csis1", group1_p4210, SRC_CAM, 28, 4), | ||
| 402 | MUX(none, "mout_mfc0", sclk_ampll_p4210, SRC_MFC, 0, 1), | ||
| 403 | MUX_F(mout_g3d0, "mout_g3d0", sclk_ampll_p4210, SRC_G3D, 0, 1, | ||
| 404 | CLK_SET_RATE_PARENT, 0), | ||
| 405 | MUX(none, "mout_fimd0", group1_p4210, SRC_LCD0, 0, 4), | ||
| 406 | MUX(none, "mout_mipi0", group1_p4210, SRC_LCD0, 12, 4), | ||
| 407 | MUX(none, "mout_audio0", mout_audio0_p4210, SRC_MAUDIO, 0, 4), | ||
| 408 | MUX(none, "mout_mmc0", group1_p4210, SRC_FSYS, 0, 4), | ||
| 409 | MUX(none, "mout_mmc1", group1_p4210, SRC_FSYS, 4, 4), | ||
| 410 | MUX(none, "mout_mmc2", group1_p4210, SRC_FSYS, 8, 4), | ||
| 411 | MUX(none, "mout_mmc3", group1_p4210, SRC_FSYS, 12, 4), | ||
| 412 | MUX(none, "mout_mmc4", group1_p4210, SRC_FSYS, 16, 4), | ||
| 413 | MUX(none, "mout_sata", sclk_ampll_p4210, SRC_FSYS, 24, 1), | ||
| 414 | MUX(none, "mout_uart0", group1_p4210, SRC_PERIL0, 0, 4), | ||
| 415 | MUX(none, "mout_uart1", group1_p4210, SRC_PERIL0, 4, 4), | ||
| 416 | MUX(none, "mout_uart2", group1_p4210, SRC_PERIL0, 8, 4), | ||
| 417 | MUX(none, "mout_uart3", group1_p4210, SRC_PERIL0, 12, 4), | ||
| 418 | MUX(none, "mout_uart4", group1_p4210, SRC_PERIL0, 16, 4), | ||
| 419 | MUX(none, "mout_audio1", mout_audio1_p4210, SRC_PERIL1, 0, 4), | ||
| 420 | MUX(none, "mout_audio2", mout_audio2_p4210, SRC_PERIL1, 4, 4), | ||
| 421 | MUX(none, "mout_spi0", group1_p4210, SRC_PERIL1, 16, 4), | ||
| 422 | MUX(none, "mout_spi1", group1_p4210, SRC_PERIL1, 20, 4), | ||
| 423 | MUX(none, "mout_spi2", group1_p4210, SRC_PERIL1, 24, 4), | ||
| 424 | }; | ||
| 425 | |||
| 426 | /* list of mux clocks supported in exynos4x12 soc */ | ||
| 427 | struct samsung_mux_clock exynos4x12_mux_clks[] __initdata = { | ||
| 428 | MUX(mout_mpll_user_c, "mout_mpll_user_c", mout_mpll_user_p4x12, | ||
| 429 | SRC_CPU, 24, 1), | ||
| 430 | MUX(none, "mout_aclk266_gps", aclk_p4412, SRC_TOP1, 4, 1), | ||
| 431 | MUX(none, "mout_aclk400_mcuisp", aclk_p4412, SRC_TOP1, 8, 1), | ||
| 432 | MUX(mout_mpll_user_t, "mout_mpll_user_t", mout_mpll_user_p4x12, | ||
| 433 | SRC_TOP1, 12, 1), | ||
| 434 | MUX(none, "mout_user_aclk266_gps", mout_user_aclk266_gps_p4x12, | ||
| 435 | SRC_TOP1, 16, 1), | ||
| 436 | MUX(aclk200, "aclk200", mout_user_aclk200_p4x12, SRC_TOP1, 20, 1), | ||
| 437 | MUX(aclk400_mcuisp, "aclk400_mcuisp", mout_user_aclk400_mcuisp_p4x12, | ||
| 438 | SRC_TOP1, 24, 1), | ||
| 439 | MUX(none, "mout_aclk200", aclk_p4412, SRC_TOP0, 12, 1), | ||
| 440 | MUX(none, "mout_aclk100", aclk_p4412, SRC_TOP0, 16, 1), | ||
| 441 | MUX(none, "mout_aclk160", aclk_p4412, SRC_TOP0, 20, 1), | ||
| 442 | MUX(none, "mout_aclk133", aclk_p4412, SRC_TOP0, 24, 1), | ||
| 443 | MUX(none, "mout_mdnie0", group1_p4x12, SRC_LCD0, 4, 4), | ||
| 444 | MUX(none, "mout_mdnie_pwm0", group1_p4x12, SRC_LCD0, 8, 4), | ||
| 445 | MUX(none, "mout_sata", sclk_ampll_p4x12, SRC_FSYS, 24, 1), | ||
| 446 | MUX(none, "mout_jpeg0", sclk_ampll_p4x12, E4X12_SRC_CAM1, 0, 1), | ||
| 447 | MUX(none, "mout_jpeg1", sclk_evpll_p, E4X12_SRC_CAM1, 4, 1), | ||
| 448 | MUX(none, "mout_jpeg", mout_jpeg_p, E4X12_SRC_CAM1, 8, 1), | ||
| 449 | MUX_A(sclk_mpll, "sclk_mpll", mout_mpll_p, | ||
| 450 | SRC_DMC, 12, 1, "sclk_mpll"), | ||
| 451 | MUX_A(sclk_vpll, "sclk_vpll", mout_vpll_p, | ||
| 452 | SRC_TOP0, 8, 1, "sclk_vpll"), | ||
| 453 | MUX(mout_core, "mout_core", mout_core_p4x12, SRC_CPU, 16, 1), | ||
| 454 | MUX(mout_fimc0, "mout_fimc0", group1_p4x12, SRC_CAM, 0, 4), | ||
| 455 | MUX(mout_fimc1, "mout_fimc1", group1_p4x12, SRC_CAM, 4, 4), | ||
| 456 | MUX(mout_fimc2, "mout_fimc2", group1_p4x12, SRC_CAM, 8, 4), | ||
| 457 | MUX(mout_fimc3, "mout_fimc3", group1_p4x12, SRC_CAM, 12, 4), | ||
| 458 | MUX(mout_cam0, "mout_cam0", group1_p4x12, SRC_CAM, 16, 4), | ||
| 459 | MUX(mout_cam1, "mout_cam1", group1_p4x12, SRC_CAM, 20, 4), | ||
| 460 | MUX(mout_csis0, "mout_csis0", group1_p4x12, SRC_CAM, 24, 4), | ||
| 461 | MUX(mout_csis1, "mout_csis1", group1_p4x12, SRC_CAM, 28, 4), | ||
| 462 | MUX(none, "mout_mfc0", sclk_ampll_p4x12, SRC_MFC, 0, 1), | ||
| 463 | MUX_F(mout_g3d0, "mout_g3d0", sclk_ampll_p4x12, SRC_G3D, 0, 1, | ||
| 464 | CLK_SET_RATE_PARENT, 0), | ||
| 465 | MUX(none, "mout_fimd0", group1_p4x12, SRC_LCD0, 0, 4), | ||
| 466 | MUX(none, "mout_mipi0", group1_p4x12, SRC_LCD0, 12, 4), | ||
| 467 | MUX(none, "mout_audio0", mout_audio0_p4x12, SRC_MAUDIO, 0, 4), | ||
| 468 | MUX(none, "mout_mmc0", group1_p4x12, SRC_FSYS, 0, 4), | ||
| 469 | MUX(none, "mout_mmc1", group1_p4x12, SRC_FSYS, 4, 4), | ||
| 470 | MUX(none, "mout_mmc2", group1_p4x12, SRC_FSYS, 8, 4), | ||
| 471 | MUX(none, "mout_mmc3", group1_p4x12, SRC_FSYS, 12, 4), | ||
| 472 | MUX(none, "mout_mmc4", group1_p4x12, SRC_FSYS, 16, 4), | ||
| 473 | MUX(none, "mout_mipihsi", aclk_p4412, SRC_FSYS, 24, 1), | ||
| 474 | MUX(none, "mout_uart0", group1_p4x12, SRC_PERIL0, 0, 4), | ||
| 475 | MUX(none, "mout_uart1", group1_p4x12, SRC_PERIL0, 4, 4), | ||
| 476 | MUX(none, "mout_uart2", group1_p4x12, SRC_PERIL0, 8, 4), | ||
| 477 | MUX(none, "mout_uart3", group1_p4x12, SRC_PERIL0, 12, 4), | ||
| 478 | MUX(none, "mout_uart4", group1_p4x12, SRC_PERIL0, 16, 4), | ||
| 479 | MUX(none, "mout_audio1", mout_audio1_p4x12, SRC_PERIL1, 0, 4), | ||
| 480 | MUX(none, "mout_audio2", mout_audio2_p4x12, SRC_PERIL1, 4, 4), | ||
| 481 | MUX(none, "mout_spi0", group1_p4x12, SRC_PERIL1, 16, 4), | ||
| 482 | MUX(none, "mout_spi1", group1_p4x12, SRC_PERIL1, 20, 4), | ||
| 483 | MUX(none, "mout_spi2", group1_p4x12, SRC_PERIL1, 24, 4), | ||
| 484 | MUX(none, "mout_pwm_isp", group1_p4x12, E4X12_SRC_ISP, 0, 4), | ||
| 485 | MUX(none, "mout_spi0_isp", group1_p4x12, E4X12_SRC_ISP, 4, 4), | ||
| 486 | MUX(none, "mout_spi1_isp", group1_p4x12, E4X12_SRC_ISP, 8, 4), | ||
| 487 | MUX(none, "mout_uart_isp", group1_p4x12, E4X12_SRC_ISP, 12, 4), | ||
| 488 | }; | ||
| 489 | |||
| 490 | /* list of divider clocks supported in all exynos4 soc's */ | ||
| 491 | struct samsung_div_clock exynos4_div_clks[] __initdata = { | ||
| 492 | DIV(none, "div_core", "mout_core", DIV_CPU0, 0, 3), | ||
| 493 | DIV(none, "div_core2", "div_core", DIV_CPU0, 28, 3), | ||
| 494 | DIV(none, "div_fimc0", "mout_fimc0", DIV_CAM, 0, 4), | ||
| 495 | DIV(none, "div_fimc1", "mout_fimc1", DIV_CAM, 4, 4), | ||
| 496 | DIV(none, "div_fimc2", "mout_fimc2", DIV_CAM, 8, 4), | ||
| 497 | DIV(none, "div_fimc3", "mout_fimc3", DIV_CAM, 12, 4), | ||
| 498 | DIV(none, "div_cam0", "mout_cam0", DIV_CAM, 16, 4), | ||
| 499 | DIV(none, "div_cam1", "mout_cam1", DIV_CAM, 20, 4), | ||
| 500 | DIV(none, "div_csis0", "mout_csis0", DIV_CAM, 24, 4), | ||
| 501 | DIV(none, "div_csis1", "mout_csis1", DIV_CAM, 28, 4), | ||
| 502 | DIV(sclk_mfc, "sclk_mfc", "mout_mfc", DIV_MFC, 0, 4), | ||
| 503 | DIV_F(none, "div_g3d", "mout_g3d", DIV_G3D, 0, 4, | ||
| 504 | CLK_SET_RATE_PARENT, 0), | ||
| 505 | DIV(none, "div_fimd0", "mout_fimd0", DIV_LCD0, 0, 4), | ||
| 506 | DIV(none, "div_mipi0", "mout_mipi0", DIV_LCD0, 16, 4), | ||
| 507 | DIV(none, "div_audio0", "mout_audio0", DIV_MAUDIO, 0, 4), | ||
| 508 | DIV(sclk_pcm0, "sclk_pcm0", "sclk_audio0", DIV_MAUDIO, 4, 8), | ||
| 509 | DIV(none, "div_mmc0", "mout_mmc0", DIV_FSYS1, 0, 4), | ||
| 510 | DIV(none, "div_mmc1", "mout_mmc1", DIV_FSYS1, 16, 4), | ||
| 511 | DIV(none, "div_mmc2", "mout_mmc2", DIV_FSYS2, 0, 4), | ||
| 512 | DIV(none, "div_mmc3", "mout_mmc3", DIV_FSYS2, 16, 4), | ||
| 513 | DIV(sclk_pixel, "sclk_pixel", "sclk_vpll", DIV_TV, 0, 4), | ||
| 514 | DIV(aclk100, "aclk100", "mout_aclk100", DIV_TOP, 4, 4), | ||
| 515 | DIV(aclk160, "aclk160", "mout_aclk160", DIV_TOP, 8, 3), | ||
| 516 | DIV(aclk133, "aclk133", "mout_aclk133", DIV_TOP, 12, 3), | ||
| 517 | DIV(none, "div_onenand", "mout_onenand1", DIV_TOP, 16, 3), | ||
| 518 | DIV(sclk_slimbus, "sclk_slimbus", "sclk_epll", DIV_PERIL3, 4, 4), | ||
| 519 | DIV(sclk_pcm1, "sclk_pcm1", "sclk_audio1", DIV_PERIL4, 4, 8), | ||
| 520 | DIV(sclk_pcm2, "sclk_pcm2", "sclk_audio2", DIV_PERIL4, 20, 8), | ||
| 521 | DIV(sclk_i2s1, "sclk_i2s1", "sclk_audio1", DIV_PERIL5, 0, 6), | ||
| 522 | DIV(sclk_i2s2, "sclk_i2s2", "sclk_audio2", DIV_PERIL5, 8, 6), | ||
| 523 | DIV(none, "div_mmc4", "mout_mmc4", DIV_FSYS3, 0, 4), | ||
| 524 | DIV(none, "div_mmc_pre4", "div_mmc4", DIV_FSYS3, 8, 8), | ||
| 525 | DIV(none, "div_uart0", "mout_uart0", DIV_PERIL0, 0, 4), | ||
| 526 | DIV(none, "div_uart1", "mout_uart1", DIV_PERIL0, 4, 4), | ||
| 527 | DIV(none, "div_uart2", "mout_uart2", DIV_PERIL0, 8, 4), | ||
| 528 | DIV(none, "div_uart3", "mout_uart3", DIV_PERIL0, 12, 4), | ||
| 529 | DIV(none, "div_uart4", "mout_uart4", DIV_PERIL0, 16, 4), | ||
| 530 | DIV(none, "div_spi0", "mout_spi0", DIV_PERIL1, 0, 4), | ||
| 531 | DIV(none, "div_spi_pre0", "div_spi0", DIV_PERIL1, 8, 8), | ||
| 532 | DIV(none, "div_spi1", "mout_spi1", DIV_PERIL1, 16, 4), | ||
| 533 | DIV(none, "div_spi_pre1", "div_spi1", DIV_PERIL1, 24, 8), | ||
| 534 | DIV(none, "div_spi2", "mout_spi2", DIV_PERIL2, 0, 4), | ||
| 535 | DIV(none, "div_spi_pre2", "div_spi2", DIV_PERIL2, 8, 8), | ||
| 536 | DIV(none, "div_audio1", "mout_audio1", DIV_PERIL4, 0, 4), | ||
| 537 | DIV(none, "div_audio2", "mout_audio2", DIV_PERIL4, 16, 4), | ||
| 538 | DIV_A(arm_clk, "arm_clk", "div_core2", DIV_CPU0, 28, 3, "arm_clk"), | ||
| 539 | DIV_A(sclk_apll, "sclk_apll", "mout_apll", | ||
| 540 | DIV_CPU0, 24, 3, "sclk_apll"), | ||
| 541 | DIV_F(none, "div_mipi_pre0", "div_mipi0", DIV_LCD0, 20, 4, | ||
| 542 | CLK_SET_RATE_PARENT, 0), | ||
| 543 | DIV_F(none, "div_mmc_pre0", "div_mmc0", DIV_FSYS1, 8, 8, | ||
| 544 | CLK_SET_RATE_PARENT, 0), | ||
| 545 | DIV_F(none, "div_mmc_pre1", "div_mmc1", DIV_FSYS1, 24, 8, | ||
| 546 | CLK_SET_RATE_PARENT, 0), | ||
| 547 | DIV_F(none, "div_mmc_pre2", "div_mmc2", DIV_FSYS2, 8, 8, | ||
| 548 | CLK_SET_RATE_PARENT, 0), | ||
| 549 | DIV_F(none, "div_mmc_pre3", "div_mmc3", DIV_FSYS2, 24, 8, | ||
| 550 | CLK_SET_RATE_PARENT, 0), | ||
| 551 | }; | ||
| 552 | |||
| 553 | /* list of divider clocks supported in exynos4210 soc */ | ||
| 554 | struct samsung_div_clock exynos4210_div_clks[] __initdata = { | ||
| 555 | DIV(aclk200, "aclk200", "mout_aclk200", DIV_TOP, 0, 3), | ||
| 556 | DIV(none, "div_g2d", "mout_g2d", DIV_IMAGE, 0, 4), | ||
| 557 | DIV(none, "div_fimd1", "mout_fimd1", E4210_DIV_LCD1, 0, 4), | ||
| 558 | DIV(none, "div_mipi1", "mout_mipi1", E4210_DIV_LCD1, 16, 4), | ||
| 559 | DIV(none, "div_sata", "mout_sata", DIV_FSYS0, 20, 4), | ||
| 560 | DIV_F(none, "div_mipi_pre1", "div_mipi1", E4210_DIV_LCD1, 20, 4, | ||
| 561 | CLK_SET_RATE_PARENT, 0), | ||
| 562 | }; | ||
| 563 | |||
| 564 | /* list of divider clocks supported in exynos4x12 soc */ | ||
| 565 | struct samsung_div_clock exynos4x12_div_clks[] __initdata = { | ||
| 566 | DIV(none, "div_mdnie0", "mout_mdnie0", DIV_LCD0, 4, 4), | ||
| 567 | DIV(none, "div_mdnie_pwm0", "mout_mdnie_pwm0", DIV_LCD0, 8, 4), | ||
| 568 | DIV(none, "div_mdnie_pwm_pre0", "div_mdnie_pwm0", DIV_LCD0, 12, 4), | ||
| 569 | DIV(none, "div_mipihsi", "mout_mipihsi", DIV_FSYS0, 20, 4), | ||
| 570 | DIV(none, "div_jpeg", "mout_jpeg", E4X12_DIV_CAM1, 0, 4), | ||
| 571 | DIV(div_aclk200, "div_aclk200", "mout_aclk200", DIV_TOP, 0, 3), | ||
| 572 | DIV(none, "div_aclk266_gps", "mout_aclk266_gps", DIV_TOP, 20, 3), | ||
| 573 | DIV(div_aclk400_mcuisp, "div_aclk400_mcuisp", "mout_aclk400_mcuisp", | ||
| 574 | DIV_TOP, 24, 3), | ||
| 575 | DIV(none, "div_pwm_isp", "mout_pwm_isp", E4X12_DIV_ISP, 0, 4), | ||
| 576 | DIV(none, "div_spi0_isp", "mout_spi0_isp", E4X12_DIV_ISP, 4, 4), | ||
| 577 | DIV(none, "div_spi0_isp_pre", "div_spi0_isp", E4X12_DIV_ISP, 8, 8), | ||
| 578 | DIV(none, "div_spi1_isp", "mout_spi1_isp", E4X12_DIV_ISP, 16, 4), | ||
| 579 | DIV(none, "div_spi1_isp_pre", "div_spi1_isp", E4X12_DIV_ISP, 20, 8), | ||
| 580 | DIV(none, "div_uart_isp", "mout_uart_isp", E4X12_DIV_ISP, 28, 4), | ||
| 581 | DIV(div_isp0, "div_isp0", "aclk200", E4X12_DIV_ISP0, 0, 3), | ||
| 582 | DIV(div_isp1, "div_isp1", "aclk200", E4X12_DIV_ISP0, 4, 3), | ||
| 583 | DIV(none, "div_mpwm", "div_isp1", E4X12_DIV_ISP1, 0, 3), | ||
| 584 | DIV(div_mcuisp0, "div_mcuisp0", "aclk400_mcuisp", E4X12_DIV_ISP1, 4, 3), | ||
| 585 | DIV(div_mcuisp1, "div_mcuisp1", "div_mcuisp0", E4X12_DIV_ISP1, 8, 3), | ||
| 586 | }; | ||
| 587 | |||
| 588 | /* list of gate clocks supported in all exynos4 soc's */ | ||
| 589 | struct samsung_gate_clock exynos4_gate_clks[] __initdata = { | ||
| 590 | /* | ||
| 591 | * After all Exynos4 based platforms are migrated to use device tree, | ||
| 592 | * the device name and clock alias names specified below for some | ||
| 593 | * of the clocks can be removed. | ||
| 594 | */ | ||
| 595 | GATE(sclk_hdmi, "sclk_hdmi", "mout_hdmi", SRC_MASK_TV, 0, 0, 0), | ||
| 596 | GATE(sclk_spdif, "sclk_spdif", "mout_spdif", SRC_MASK_PERIL1, 8, 0, 0), | ||
| 597 | GATE(jpeg, "jpeg", "aclk160", GATE_IP_CAM, 6, 0, 0), | ||
| 598 | GATE(mie0, "mie0", "aclk160", GATE_IP_LCD0, 1, 0, 0), | ||
| 599 | GATE(dsim0, "dsim0", "aclk160", GATE_IP_LCD0, 3, 0, 0), | ||
| 600 | GATE(fimd1, "fimd1", "aclk160", E4210_GATE_IP_LCD1, 0, 0, 0), | ||
| 601 | GATE(mie1, "mie1", "aclk160", E4210_GATE_IP_LCD1, 1, 0, 0), | ||
| 602 | GATE(dsim1, "dsim1", "aclk160", E4210_GATE_IP_LCD1, 3, 0, 0), | ||
| 603 | GATE(smmu_fimd1, "smmu_fimd1", "aclk160", E4210_GATE_IP_LCD1, 4, 0, 0), | ||
| 604 | GATE(tsi, "tsi", "aclk133", GATE_IP_FSYS, 4, 0, 0), | ||
| 605 | GATE(sromc, "sromc", "aclk133", GATE_IP_FSYS, 11, 0, 0), | ||
| 606 | GATE(sclk_g3d, "sclk_g3d", "div_g3d", GATE_IP_G3D, 0, | ||
| 607 | CLK_SET_RATE_PARENT, 0), | ||
| 608 | GATE(usb_device, "usb_device", "aclk133", GATE_IP_FSYS, 13, 0, 0), | ||
| 609 | GATE(onenand, "onenand", "aclk133", GATE_IP_FSYS, 15, 0, 0), | ||
| 610 | GATE(nfcon, "nfcon", "aclk133", GATE_IP_FSYS, 16, 0, 0), | ||
| 611 | GATE(gps, "gps", "aclk133", GATE_IP_GPS, 0, 0, 0), | ||
| 612 | GATE(smmu_gps, "smmu_gps", "aclk133", GATE_IP_GPS, 1, 0, 0), | ||
| 613 | GATE(slimbus, "slimbus", "aclk100", GATE_IP_PERIL, 25, 0, 0), | ||
| 614 | GATE(sclk_cam0, "sclk_cam0", "div_cam0", GATE_SCLK_CAM, 4, | ||
| 615 | CLK_SET_RATE_PARENT, 0), | ||
| 616 | GATE(sclk_cam1, "sclk_cam1", "div_cam1", GATE_SCLK_CAM, 5, | ||
| 617 | CLK_SET_RATE_PARENT, 0), | ||
| 618 | GATE(sclk_mipi0, "sclk_mipi0", "div_mipi_pre0", | ||
| 619 | SRC_MASK_LCD0, 12, CLK_SET_RATE_PARENT, 0), | ||
| 620 | GATE(sclk_audio0, "sclk_audio0", "div_audio0", SRC_MASK_MAUDIO, 0, | ||
| 621 | CLK_SET_RATE_PARENT, 0), | ||
| 622 | GATE(sclk_audio1, "sclk_audio1", "div_audio1", SRC_MASK_PERIL1, 0, | ||
| 623 | CLK_SET_RATE_PARENT, 0), | ||
| 624 | GATE_D(vp, "s5p-mixer", "vp", "aclk160", GATE_IP_TV, 0, 0, 0), | ||
| 625 | GATE_D(mixer, "s5p-mixer", "mixer", "aclk160", GATE_IP_TV, 1, 0, 0), | ||
| 626 | GATE_D(hdmi, "exynos4-hdmi", "hdmi", "aclk160", GATE_IP_TV, 3, 0, 0), | ||
| 627 | GATE_A(pwm, "pwm", "aclk100", GATE_IP_PERIL, 24, 0, 0, "timers"), | ||
| 628 | GATE_A(sdmmc4, "sdmmc4", "aclk133", GATE_IP_FSYS, 9, 0, 0, "biu"), | ||
| 629 | GATE_A(usb_host, "usb_host", "aclk133", | ||
| 630 | GATE_IP_FSYS, 12, 0, 0, "usbhost"), | ||
| 631 | GATE_DA(sclk_fimc0, "exynos4-fimc.0", "sclk_fimc0", "div_fimc0", | ||
| 632 | SRC_MASK_CAM, 0, CLK_SET_RATE_PARENT, 0, "sclk_fimc"), | ||
| 633 | GATE_DA(sclk_fimc1, "exynos4-fimc.1", "sclk_fimc1", "div_fimc1", | ||
| 634 | SRC_MASK_CAM, 4, CLK_SET_RATE_PARENT, 0, "sclk_fimc"), | ||
| 635 | GATE_DA(sclk_fimc2, "exynos4-fimc.2", "sclk_fimc2", "div_fimc2", | ||
| 636 | SRC_MASK_CAM, 8, CLK_SET_RATE_PARENT, 0, "sclk_fimc"), | ||
| 637 | GATE_DA(sclk_fimc3, "exynos4-fimc.3", "sclk_fimc3", "div_fimc3", | ||
| 638 | SRC_MASK_CAM, 12, CLK_SET_RATE_PARENT, 0, "sclk_fimc"), | ||
| 639 | GATE_DA(sclk_csis0, "s5p-mipi-csis.0", "sclk_csis0", "div_csis0", | ||
| 640 | SRC_MASK_CAM, 24, CLK_SET_RATE_PARENT, 0, "sclk_csis"), | ||
| 641 | GATE_DA(sclk_csis1, "s5p-mipi-csis.1", "sclk_csis1", "div_csis1", | ||
| 642 | SRC_MASK_CAM, 28, CLK_SET_RATE_PARENT, 0, "sclk_csis"), | ||
| 643 | GATE_DA(sclk_fimd0, "exynos4-fb.0", "sclk_fimd0", "div_fimd0", | ||
| 644 | SRC_MASK_LCD0, 0, CLK_SET_RATE_PARENT, 0, "sclk_fimd"), | ||
| 645 | GATE_DA(sclk_mmc0, "exynos4-sdhci.0", "sclk_mmc0", "div_mmc_pre0", | ||
| 646 | SRC_MASK_FSYS, 0, CLK_SET_RATE_PARENT, 0, | ||
| 647 | "mmc_busclk.2"), | ||
| 648 | GATE_DA(sclk_mmc1, "exynos4-sdhci.1", "sclk_mmc1", "div_mmc_pre1", | ||
| 649 | SRC_MASK_FSYS, 4, CLK_SET_RATE_PARENT, 0, | ||
| 650 | "mmc_busclk.2"), | ||
| 651 | GATE_DA(sclk_mmc2, "exynos4-sdhci.2", "sclk_mmc2", "div_mmc_pre2", | ||
| 652 | SRC_MASK_FSYS, 8, CLK_SET_RATE_PARENT, 0, | ||
| 653 | "mmc_busclk.2"), | ||
| 654 | GATE_DA(sclk_mmc3, "exynos4-sdhci.3", "sclk_mmc3", "div_mmc_pre3", | ||
| 655 | SRC_MASK_FSYS, 12, CLK_SET_RATE_PARENT, 0, | ||
| 656 | "mmc_busclk.2"), | ||
| 657 | GATE_DA(sclk_mmc4, NULL, "sclk_mmc4", "div_mmc_pre4", | ||
| 658 | SRC_MASK_FSYS, 16, CLK_SET_RATE_PARENT, 0, "ciu"), | ||
| 659 | GATE_DA(sclk_uart0, "exynos4210-uart.0", "uclk0", "div_uart0", | ||
| 660 | SRC_MASK_PERIL0, 0, CLK_SET_RATE_PARENT, | ||
| 661 | 0, "clk_uart_baud0"), | ||
| 662 | GATE_DA(sclk_uart1, "exynos4210-uart.1", "uclk1", "div_uart1", | ||
| 663 | SRC_MASK_PERIL0, 4, CLK_SET_RATE_PARENT, | ||
| 664 | 0, "clk_uart_baud0"), | ||
| 665 | GATE_DA(sclk_uart2, "exynos4210-uart.2", "uclk2", "div_uart2", | ||
| 666 | SRC_MASK_PERIL0, 8, CLK_SET_RATE_PARENT, | ||
| 667 | 0, "clk_uart_baud0"), | ||
| 668 | GATE_DA(sclk_uart3, "exynos4210-uart.3", "uclk3", "div_uart3", | ||
| 669 | SRC_MASK_PERIL0, 12, CLK_SET_RATE_PARENT, | ||
| 670 | 0, "clk_uart_baud0"), | ||
| 671 | GATE_DA(sclk_uart4, "exynos4210-uart.4", "uclk4", "div_uart4", | ||
| 672 | SRC_MASK_PERIL0, 16, CLK_SET_RATE_PARENT, | ||
| 673 | 0, "clk_uart_baud0"), | ||
| 674 | GATE(sclk_audio2, "sclk_audio2", "div_audio2", SRC_MASK_PERIL1, 4, | ||
| 675 | CLK_SET_RATE_PARENT, 0), | ||
| 676 | GATE_DA(sclk_spi0, "exynos4210-spi.0", "sclk_spi0", "div_spi_pre0", | ||
| 677 | SRC_MASK_PERIL1, 16, CLK_SET_RATE_PARENT, | ||
| 678 | 0, "spi_busclk0"), | ||
| 679 | GATE_DA(sclk_spi1, "exynos4210-spi.1", "sclk_spi1", "div_spi_pre1", | ||
| 680 | SRC_MASK_PERIL1, 20, CLK_SET_RATE_PARENT, | ||
| 681 | 0, "spi_busclk0"), | ||
| 682 | GATE_DA(sclk_spi2, "exynos4210-spi.2", "sclk_spi2", "div_spi_pre2", | ||
| 683 | SRC_MASK_PERIL1, 24, CLK_SET_RATE_PARENT, | ||
| 684 | 0, "spi_busclk0"), | ||
| 685 | GATE_DA(fimc0, "exynos4-fimc.0", "fimc0", "aclk160", | ||
| 686 | GATE_IP_CAM, 0, 0, 0, "fimc"), | ||
| 687 | GATE_DA(fimc1, "exynos4-fimc.1", "fimc1", "aclk160", | ||
| 688 | GATE_IP_CAM, 1, 0, 0, "fimc"), | ||
| 689 | GATE_DA(fimc2, "exynos4-fimc.2", "fimc2", "aclk160", | ||
| 690 | GATE_IP_CAM, 2, 0, 0, "fimc"), | ||
| 691 | GATE_DA(fimc3, "exynos4-fimc.3", "fimc3", "aclk160", | ||
| 692 | GATE_IP_CAM, 3, 0, 0, "fimc"), | ||
| 693 | GATE_DA(csis0, "s5p-mipi-csis.0", "csis0", "aclk160", | ||
| 694 | GATE_IP_CAM, 4, 0, 0, "fimc"), | ||
| 695 | GATE_DA(csis1, "s5p-mipi-csis.1", "csis1", "aclk160", | ||
| 696 | GATE_IP_CAM, 5, 0, 0, "fimc"), | ||
| 697 | GATE_DA(smmu_fimc0, "exynos-sysmmu.5", "smmu_fimc0", "aclk160", | ||
| 698 | GATE_IP_CAM, 7, 0, 0, "sysmmu"), | ||
| 699 | GATE_DA(smmu_fimc1, "exynos-sysmmu.6", "smmu_fimc1", "aclk160", | ||
| 700 | GATE_IP_CAM, 8, 0, 0, "sysmmu"), | ||
| 701 | GATE_DA(smmu_fimc2, "exynos-sysmmu.7", "smmu_fimc2", "aclk160", | ||
| 702 | GATE_IP_CAM, 9, 0, 0, "sysmmu"), | ||
| 703 | GATE_DA(smmu_fimc3, "exynos-sysmmu.8", "smmu_fimc3", "aclk160", | ||
| 704 | GATE_IP_CAM, 10, 0, 0, "sysmmu"), | ||
| 705 | GATE_DA(smmu_jpeg, "exynos-sysmmu.3", "smmu_jpeg", "aclk160", | ||
| 706 | GATE_IP_CAM, 11, 0, 0, "sysmmu"), | ||
| 707 | GATE(pixelasyncm0, "pxl_async0", "aclk160", GATE_IP_CAM, 17, 0, 0), | ||
| 708 | GATE(pixelasyncm1, "pxl_async1", "aclk160", GATE_IP_CAM, 18, 0, 0), | ||
| 709 | GATE_DA(smmu_tv, "exynos-sysmmu.2", "smmu_tv", "aclk160", | ||
| 710 | GATE_IP_TV, 4, 0, 0, "sysmmu"), | ||
| 711 | GATE_DA(mfc, "s5p-mfc", "mfc", "aclk100", GATE_IP_MFC, 0, 0, 0, "mfc"), | ||
| 712 | GATE_DA(smmu_mfcl, "exynos-sysmmu.0", "smmu_mfcl", "aclk100", | ||
| 713 | GATE_IP_MFC, 1, 0, 0, "sysmmu"), | ||
| 714 | GATE_DA(smmu_mfcr, "exynos-sysmmu.1", "smmu_mfcr", "aclk100", | ||
| 715 | GATE_IP_MFC, 2, 0, 0, "sysmmu"), | ||
| 716 | GATE_DA(fimd0, "exynos4-fb.0", "fimd0", "aclk160", | ||
| 717 | GATE_IP_LCD0, 0, 0, 0, "fimd"), | ||
| 718 | GATE_DA(smmu_fimd0, "exynos-sysmmu.10", "smmu_fimd0", "aclk160", | ||
| 719 | GATE_IP_LCD0, 4, 0, 0, "sysmmu"), | ||
| 720 | GATE_DA(pdma0, "dma-pl330.0", "pdma0", "aclk133", | ||
| 721 | GATE_IP_FSYS, 0, 0, 0, "dma"), | ||
| 722 | GATE_DA(pdma1, "dma-pl330.1", "pdma1", "aclk133", | ||
| 723 | GATE_IP_FSYS, 1, 0, 0, "dma"), | ||
| 724 | GATE_DA(sdmmc0, "exynos4-sdhci.0", "sdmmc0", "aclk133", | ||
| 725 | GATE_IP_FSYS, 5, 0, 0, "hsmmc"), | ||
| 726 | GATE_DA(sdmmc1, "exynos4-sdhci.1", "sdmmc1", "aclk133", | ||
| 727 | GATE_IP_FSYS, 6, 0, 0, "hsmmc"), | ||
| 728 | GATE_DA(sdmmc2, "exynos4-sdhci.2", "sdmmc2", "aclk133", | ||
| 729 | GATE_IP_FSYS, 7, 0, 0, "hsmmc"), | ||
| 730 | GATE_DA(sdmmc3, "exynos4-sdhci.3", "sdmmc3", "aclk133", | ||
| 731 | GATE_IP_FSYS, 8, 0, 0, "hsmmc"), | ||
| 732 | GATE_DA(uart0, "exynos4210-uart.0", "uart0", "aclk100", | ||
| 733 | GATE_IP_PERIL, 0, 0, 0, "uart"), | ||
| 734 | GATE_DA(uart1, "exynos4210-uart.1", "uart1", "aclk100", | ||
| 735 | GATE_IP_PERIL, 1, 0, 0, "uart"), | ||
| 736 | GATE_DA(uart2, "exynos4210-uart.2", "uart2", "aclk100", | ||
| 737 | GATE_IP_PERIL, 2, 0, 0, "uart"), | ||
| 738 | GATE_DA(uart3, "exynos4210-uart.3", "uart3", "aclk100", | ||
| 739 | GATE_IP_PERIL, 3, 0, 0, "uart"), | ||
| 740 | GATE_DA(uart4, "exynos4210-uart.4", "uart4", "aclk100", | ||
| 741 | GATE_IP_PERIL, 4, 0, 0, "uart"), | ||
| 742 | GATE_DA(i2c0, "s3c2440-i2c.0", "i2c0", "aclk100", | ||
| 743 | GATE_IP_PERIL, 6, 0, 0, "i2c"), | ||
| 744 | GATE_DA(i2c1, "s3c2440-i2c.1", "i2c1", "aclk100", | ||
| 745 | GATE_IP_PERIL, 7, 0, 0, "i2c"), | ||
| 746 | GATE_DA(i2c2, "s3c2440-i2c.2", "i2c2", "aclk100", | ||
| 747 | GATE_IP_PERIL, 8, 0, 0, "i2c"), | ||
| 748 | GATE_DA(i2c3, "s3c2440-i2c.3", "i2c3", "aclk100", | ||
| 749 | GATE_IP_PERIL, 9, 0, 0, "i2c"), | ||
| 750 | GATE_DA(i2c4, "s3c2440-i2c.4", "i2c4", "aclk100", | ||
| 751 | GATE_IP_PERIL, 10, 0, 0, "i2c"), | ||
| 752 | GATE_DA(i2c5, "s3c2440-i2c.5", "i2c5", "aclk100", | ||
| 753 | GATE_IP_PERIL, 11, 0, 0, "i2c"), | ||
| 754 | GATE_DA(i2c6, "s3c2440-i2c.6", "i2c6", "aclk100", | ||
| 755 | GATE_IP_PERIL, 12, 0, 0, "i2c"), | ||
| 756 | GATE_DA(i2c7, "s3c2440-i2c.7", "i2c7", "aclk100", | ||
| 757 | GATE_IP_PERIL, 13, 0, 0, "i2c"), | ||
| 758 | GATE_DA(i2c_hdmi, "s3c2440-hdmiphy-i2c", "i2c-hdmi", "aclk100", | ||
| 759 | GATE_IP_PERIL, 14, 0, 0, "i2c"), | ||
| 760 | GATE_DA(spi0, "exynos4210-spi.0", "spi0", "aclk100", | ||
| 761 | GATE_IP_PERIL, 16, 0, 0, "spi"), | ||
| 762 | GATE_DA(spi1, "exynos4210-spi.1", "spi1", "aclk100", | ||
| 763 | GATE_IP_PERIL, 17, 0, 0, "spi"), | ||
| 764 | GATE_DA(spi2, "exynos4210-spi.2", "spi2", "aclk100", | ||
| 765 | GATE_IP_PERIL, 18, 0, 0, "spi"), | ||
| 766 | GATE_DA(i2s1, "samsung-i2s.1", "i2s1", "aclk100", | ||
| 767 | GATE_IP_PERIL, 20, 0, 0, "iis"), | ||
| 768 | GATE_DA(i2s2, "samsung-i2s.2", "i2s2", "aclk100", | ||
| 769 | GATE_IP_PERIL, 21, 0, 0, "iis"), | ||
| 770 | GATE_DA(pcm1, "samsung-pcm.1", "pcm1", "aclk100", | ||
| 771 | GATE_IP_PERIL, 22, 0, 0, "pcm"), | ||
| 772 | GATE_DA(pcm2, "samsung-pcm.2", "pcm2", "aclk100", | ||
| 773 | GATE_IP_PERIL, 23, 0, 0, "pcm"), | ||
| 774 | GATE_DA(spdif, "samsung-spdif", "spdif", "aclk100", | ||
| 775 | GATE_IP_PERIL, 26, 0, 0, "spdif"), | ||
| 776 | GATE_DA(ac97, "samsung-ac97", "ac97", "aclk100", | ||
| 777 | GATE_IP_PERIL, 27, 0, 0, "ac97"), | ||
| 778 | }; | ||
| 779 | |||
| 780 | /* list of gate clocks supported in exynos4210 soc */ | ||
| 781 | struct samsung_gate_clock exynos4210_gate_clks[] __initdata = { | ||
| 782 | GATE(tvenc, "tvenc", "aclk160", GATE_IP_TV, 2, 0, 0), | ||
| 783 | GATE(g2d, "g2d", "aclk200", E4210_GATE_IP_IMAGE, 0, 0, 0), | ||
| 784 | GATE(rotator, "rotator", "aclk200", E4210_GATE_IP_IMAGE, 1, 0, 0), | ||
| 785 | GATE(mdma, "mdma", "aclk200", E4210_GATE_IP_IMAGE, 2, 0, 0), | ||
| 786 | GATE(smmu_g2d, "smmu_g2d", "aclk200", E4210_GATE_IP_IMAGE, 3, 0, 0), | ||
| 787 | GATE(smmu_mdma, "smmu_mdma", "aclk200", E4210_GATE_IP_IMAGE, 5, 0, 0), | ||
| 788 | GATE(pcie_phy, "pcie_phy", "aclk133", GATE_IP_FSYS, 2, 0, 0), | ||
| 789 | GATE(sata_phy, "sata_phy", "aclk133", GATE_IP_FSYS, 3, 0, 0), | ||
| 790 | GATE(sata, "sata", "aclk133", GATE_IP_FSYS, 10, 0, 0), | ||
| 791 | GATE(pcie, "pcie", "aclk133", GATE_IP_FSYS, 14, 0, 0), | ||
| 792 | GATE(smmu_pcie, "smmu_pcie", "aclk133", GATE_IP_FSYS, 18, 0, 0), | ||
| 793 | GATE(modemif, "modemif", "aclk100", GATE_IP_PERIL, 28, 0, 0), | ||
| 794 | GATE(chipid, "chipid", "aclk100", E4210_GATE_IP_PERIR, 0, 0, 0), | ||
| 795 | GATE(sysreg, "sysreg", "aclk100", E4210_GATE_IP_PERIR, 0, 0, 0), | ||
| 796 | GATE(hdmi_cec, "hdmi_cec", "aclk100", E4210_GATE_IP_PERIR, 11, 0, 0), | ||
| 797 | GATE(smmu_rotator, "smmu_rotator", "aclk200", | ||
| 798 | E4210_GATE_IP_IMAGE, 4, 0, 0), | ||
| 799 | GATE(sclk_mipi1, "sclk_mipi1", "div_mipi_pre1", | ||
| 800 | E4210_SRC_MASK_LCD1, 12, CLK_SET_RATE_PARENT, 0), | ||
| 801 | GATE(sclk_sata, "sclk_sata", "div_sata", | ||
| 802 | SRC_MASK_FSYS, 24, CLK_SET_RATE_PARENT, 0), | ||
| 803 | GATE(sclk_mixer, "sclk_mixer", "mout_mixer", SRC_MASK_TV, 4, 0, 0), | ||
| 804 | GATE(sclk_dac, "sclk_dac", "mout_dac", SRC_MASK_TV, 8, 0, 0), | ||
| 805 | GATE_A(tsadc, "tsadc", "aclk100", GATE_IP_PERIL, 15, 0, 0, "adc"), | ||
| 806 | GATE_A(mct, "mct", "aclk100", E4210_GATE_IP_PERIR, 13, 0, 0, "mct"), | ||
| 807 | GATE_A(wdt, "watchdog", "aclk100", E4210_GATE_IP_PERIR, 14, 0, 0, "watchdog"), | ||
| 808 | GATE_A(rtc, "rtc", "aclk100", E4210_GATE_IP_PERIR, 15, 0, 0, "rtc"), | ||
| 809 | GATE_A(keyif, "keyif", "aclk100", E4210_GATE_IP_PERIR, 16, 0, 0, "keypad"), | ||
| 810 | GATE_DA(sclk_fimd1, "exynos4-fb.1", "sclk_fimd1", "div_fimd1", | ||
| 811 | E4210_SRC_MASK_LCD1, 0, CLK_SET_RATE_PARENT, 0, "sclk_fimd"), | ||
| 812 | }; | ||
| 813 | |||
| 814 | /* list of gate clocks supported in exynos4x12 soc */ | ||
| 815 | struct samsung_gate_clock exynos4x12_gate_clks[] __initdata = { | ||
| 816 | GATE(audss, "audss", "sclk_epll", E4X12_GATE_IP_MAUDIO, 0, 0, 0), | ||
| 817 | GATE(mdnie0, "mdnie0", "aclk160", GATE_IP_LCD0, 2, 0, 0), | ||
| 818 | GATE(rotator, "rotator", "aclk200", E4X12_GATE_IP_IMAGE, 1, 0, 0), | ||
| 819 | GATE(mdma2, "mdma2", "aclk200", E4X12_GATE_IP_IMAGE, 2, 0, 0), | ||
| 820 | GATE(smmu_mdma, "smmu_mdma", "aclk200", E4X12_GATE_IP_IMAGE, 5, 0, 0), | ||
| 821 | GATE(mipi_hsi, "mipi_hsi", "aclk133", GATE_IP_FSYS, 10, 0, 0), | ||
| 822 | GATE(chipid, "chipid", "aclk100", E4X12_GATE_IP_PERIR, 0, 0, 0), | ||
| 823 | GATE(sysreg, "sysreg", "aclk100", E4X12_GATE_IP_PERIR, 1, 0, 0), | ||
| 824 | GATE(hdmi_cec, "hdmi_cec", "aclk100", E4X12_GATE_IP_PERIR, 11, 0, 0), | ||
| 825 | GATE(sclk_mdnie0, "sclk_mdnie0", "div_mdnie0", | ||
| 826 | SRC_MASK_LCD0, 4, CLK_SET_RATE_PARENT, 0), | ||
| 827 | GATE(sclk_mdnie_pwm0, "sclk_mdnie_pwm0", "div_mdnie_pwm_pre0", | ||
| 828 | SRC_MASK_LCD0, 8, CLK_SET_RATE_PARENT, 0), | ||
| 829 | GATE(sclk_mipihsi, "sclk_mipihsi", "div_mipihsi", | ||
| 830 | SRC_MASK_FSYS, 24, CLK_SET_RATE_PARENT, 0), | ||
| 831 | GATE(smmu_rotator, "smmu_rotator", "aclk200", | ||
| 832 | E4X12_GATE_IP_IMAGE, 4, 0, 0), | ||
| 833 | GATE_A(mct, "mct", "aclk100", E4X12_GATE_IP_PERIR, 13, 0, 0, "mct"), | ||
| 834 | GATE_A(rtc, "rtc", "aclk100", E4X12_GATE_IP_PERIR, 15, 0, 0, "rtc"), | ||
| 835 | GATE_A(keyif, "keyif", "aclk100", | ||
| 836 | E4X12_GATE_IP_PERIR, 16, 0, 0, "keypad"), | ||
| 837 | GATE(sclk_pwm_isp, "sclk_pwm_isp", "div_pwm_isp", | ||
| 838 | E4X12_SRC_MASK_ISP, 0, CLK_SET_RATE_PARENT, 0), | ||
| 839 | GATE(sclk_spi0_isp, "sclk_spi0_isp", "div_spi0_isp_pre", | ||
| 840 | E4X12_SRC_MASK_ISP, 4, CLK_SET_RATE_PARENT, 0), | ||
| 841 | GATE(sclk_spi1_isp, "sclk_spi1_isp", "div_spi1_isp_pre", | ||
| 842 | E4X12_SRC_MASK_ISP, 8, CLK_SET_RATE_PARENT, 0), | ||
| 843 | GATE(sclk_uart_isp, "sclk_uart_isp", "div_uart_isp", | ||
| 844 | E4X12_SRC_MASK_ISP, 12, CLK_SET_RATE_PARENT, 0), | ||
| 845 | GATE(pwm_isp_sclk, "pwm_isp_sclk", "sclk_pwm_isp", | ||
| 846 | E4X12_GATE_IP_ISP, 0, 0, 0), | ||
| 847 | GATE(spi0_isp_sclk, "spi0_isp_sclk", "sclk_spi0_isp", | ||
| 848 | E4X12_GATE_IP_ISP, 1, 0, 0), | ||
| 849 | GATE(spi1_isp_sclk, "spi1_isp_sclk", "sclk_spi1_isp", | ||
| 850 | E4X12_GATE_IP_ISP, 2, 0, 0), | ||
| 851 | GATE(uart_isp_sclk, "uart_isp_sclk", "sclk_uart_isp", | ||
| 852 | E4X12_GATE_IP_ISP, 3, 0, 0), | ||
| 853 | GATE_A(wdt, "watchdog", "aclk100", | ||
| 854 | E4X12_GATE_IP_PERIR, 14, 0, 0, "watchdog"), | ||
| 855 | GATE_DA(pcm0, "samsung-pcm.0", "pcm0", "aclk100", | ||
| 856 | E4X12_GATE_IP_MAUDIO, 2, 0, 0, "pcm"), | ||
| 857 | GATE_DA(i2s0, "samsung-i2s.0", "i2s0", "aclk100", | ||
| 858 | E4X12_GATE_IP_MAUDIO, 3, 0, 0, "iis"), | ||
| 859 | GATE(fimc_isp, "isp", "aclk200", E4X12_GATE_ISP0, 0, | ||
| 860 | CLK_IGNORE_UNUSED, 0), | ||
| 861 | GATE(fimc_drc, "drc", "aclk200", E4X12_GATE_ISP0, 1, | ||
| 862 | CLK_IGNORE_UNUSED, 0), | ||
| 863 | GATE(fimc_fd, "fd", "aclk200", E4X12_GATE_ISP0, 2, | ||
| 864 | CLK_IGNORE_UNUSED, 0), | ||
| 865 | GATE(fimc_lite0, "lite0", "aclk200", E4X12_GATE_ISP0, 3, | ||
| 866 | CLK_IGNORE_UNUSED, 0), | ||
| 867 | GATE(fimc_lite1, "lite1", "aclk200", E4X12_GATE_ISP0, 4, | ||
| 868 | CLK_IGNORE_UNUSED, 0), | ||
| 869 | GATE(mcuisp, "mcuisp", "aclk200", E4X12_GATE_ISP0, 5, | ||
| 870 | CLK_IGNORE_UNUSED, 0), | ||
| 871 | GATE(gicisp, "gicisp", "aclk200", E4X12_GATE_ISP0, 7, | ||
| 872 | CLK_IGNORE_UNUSED, 0), | ||
| 873 | GATE(smmu_isp, "smmu_isp", "aclk200", E4X12_GATE_ISP0, 8, | ||
| 874 | CLK_IGNORE_UNUSED, 0), | ||
| 875 | GATE(smmu_drc, "smmu_drc", "aclk200", E4X12_GATE_ISP0, 9, | ||
| 876 | CLK_IGNORE_UNUSED, 0), | ||
| 877 | GATE(smmu_fd, "smmu_fd", "aclk200", E4X12_GATE_ISP0, 10, | ||
| 878 | CLK_IGNORE_UNUSED, 0), | ||
| 879 | GATE(smmu_lite0, "smmu_lite0", "aclk200", E4X12_GATE_ISP0, 11, | ||
| 880 | CLK_IGNORE_UNUSED, 0), | ||
| 881 | GATE(smmu_lite1, "smmu_lite1", "aclk200", E4X12_GATE_ISP0, 12, | ||
| 882 | CLK_IGNORE_UNUSED, 0), | ||
| 883 | GATE(ppmuispmx, "ppmuispmx", "aclk200", E4X12_GATE_ISP0, 20, | ||
| 884 | CLK_IGNORE_UNUSED, 0), | ||
| 885 | GATE(ppmuispx, "ppmuispx", "aclk200", E4X12_GATE_ISP0, 21, | ||
| 886 | CLK_IGNORE_UNUSED, 0), | ||
| 887 | GATE(mcuctl_isp, "mcuctl_isp", "aclk200", E4X12_GATE_ISP0, 23, | ||
| 888 | CLK_IGNORE_UNUSED, 0), | ||
| 889 | GATE(mpwm_isp, "mpwm_isp", "aclk200", E4X12_GATE_ISP0, 24, | ||
| 890 | CLK_IGNORE_UNUSED, 0), | ||
| 891 | GATE(i2c0_isp, "i2c0_isp", "aclk200", E4X12_GATE_ISP0, 25, | ||
| 892 | CLK_IGNORE_UNUSED, 0), | ||
| 893 | GATE(i2c1_isp, "i2c1_isp", "aclk200", E4X12_GATE_ISP0, 26, | ||
| 894 | CLK_IGNORE_UNUSED, 0), | ||
| 895 | GATE(mtcadc_isp, "mtcadc_isp", "aclk200", E4X12_GATE_ISP0, 27, | ||
| 896 | CLK_IGNORE_UNUSED, 0), | ||
| 897 | GATE(pwm_isp, "pwm_isp", "aclk200", E4X12_GATE_ISP0, 28, | ||
| 898 | CLK_IGNORE_UNUSED, 0), | ||
| 899 | GATE(wdt_isp, "wdt_isp", "aclk200", E4X12_GATE_ISP0, 30, | ||
| 900 | CLK_IGNORE_UNUSED, 0), | ||
| 901 | GATE(uart_isp, "uart_isp", "aclk200", E4X12_GATE_ISP0, 31, | ||
| 902 | CLK_IGNORE_UNUSED, 0), | ||
| 903 | GATE(asyncaxim, "asyncaxim", "aclk200", E4X12_GATE_ISP1, 0, | ||
| 904 | CLK_IGNORE_UNUSED, 0), | ||
| 905 | GATE(smmu_ispcx, "smmu_ispcx", "aclk200", E4X12_GATE_ISP1, 4, | ||
| 906 | CLK_IGNORE_UNUSED, 0), | ||
| 907 | GATE(spi0_isp, "spi0_isp", "aclk200", E4X12_GATE_ISP1, 12, | ||
| 908 | CLK_IGNORE_UNUSED, 0), | ||
| 909 | GATE(spi1_isp, "spi1_isp", "aclk200", E4X12_GATE_ISP1, 13, | ||
| 910 | CLK_IGNORE_UNUSED, 0), | ||
| 911 | }; | ||
| 912 | |||
| 913 | #ifdef CONFIG_OF | ||
| 914 | static struct of_device_id exynos4_clk_ids[] __initdata = { | ||
| 915 | { .compatible = "samsung,exynos4210-clock", | ||
| 916 | .data = (void *)EXYNOS4210, }, | ||
| 917 | { .compatible = "samsung,exynos4412-clock", | ||
| 918 | .data = (void *)EXYNOS4X12, }, | ||
| 919 | { }, | ||
| 920 | }; | ||
| 921 | #endif | ||
| 922 | |||
| 923 | /* | ||
| 924 | * The parent of the fin_pll clock is selected by the XOM[0] bit. This bit | ||
| 925 | * resides in chipid register space, outside of the clock controller memory | ||
| 926 | * mapped space. So to determine the parent of fin_pll clock, the chipid | ||
| 927 | * controller is first remapped and the value of XOM[0] bit is read to | ||
| 928 | * determine the parent clock. | ||
| 929 | */ | ||
| 930 | static void __init exynos4_clk_register_finpll(void) | ||
| 931 | { | ||
| 932 | struct samsung_fixed_rate_clock fclk; | ||
| 933 | struct device_node *np; | ||
| 934 | struct clk *clk; | ||
| 935 | void __iomem *chipid_base = S5P_VA_CHIPID; | ||
| 936 | unsigned long xom, finpll_f = 24000000; | ||
| 937 | char *parent_name; | ||
| 938 | |||
| 939 | np = of_find_compatible_node(NULL, NULL, "samsung,exynos4210-chipid"); | ||
| 940 | if (np) | ||
| 941 | chipid_base = of_iomap(np, 0); | ||
| 942 | |||
| 943 | if (chipid_base) { | ||
| 944 | xom = readl(chipid_base + 8); | ||
| 945 | parent_name = xom & 1 ? "xusbxti" : "xxti"; | ||
| 946 | clk = clk_get(NULL, parent_name); | ||
| 947 | if (IS_ERR(clk)) { | ||
| 948 | pr_err("%s: failed to lookup parent clock %s, assuming " | ||
| 949 | "fin_pll clock frequency is 24MHz\n", __func__, | ||
| 950 | parent_name); | ||
| 951 | } else { | ||
| 952 | finpll_f = clk_get_rate(clk); | ||
| 953 | } | ||
| 954 | } else { | ||
| 955 | pr_err("%s: failed to map chipid registers, assuming " | ||
| 956 | "fin_pll clock frequency is 24MHz\n", __func__); | ||
| 957 | } | ||
| 958 | |||
| 959 | fclk.id = fin_pll; | ||
| 960 | fclk.name = "fin_pll"; | ||
| 961 | fclk.parent_name = NULL; | ||
| 962 | fclk.flags = CLK_IS_ROOT; | ||
| 963 | fclk.fixed_rate = finpll_f; | ||
| 964 | samsung_clk_register_fixed_rate(&fclk, 1); | ||
| 965 | |||
| 966 | if (np) | ||
| 967 | iounmap(chipid_base); | ||
| 968 | } | ||
| 969 | |||
| 970 | /* | ||
| 971 | * This function allows non-dt platforms to specify the clock speed of the | ||
| 972 | * xxti and xusbxti clocks. These clocks are then registered with the specified | ||
| 973 | * clock speed. | ||
| 974 | */ | ||
| 975 | void __init exynos4_clk_register_fixed_ext(unsigned long xxti_f, | ||
| 976 | unsigned long xusbxti_f) | ||
| 977 | { | ||
| 978 | exynos4_fixed_rate_ext_clks[0].fixed_rate = xxti_f; | ||
| 979 | exynos4_fixed_rate_ext_clks[1].fixed_rate = xusbxti_f; | ||
| 980 | samsung_clk_register_fixed_rate(exynos4_fixed_rate_ext_clks, | ||
| 981 | ARRAY_SIZE(exynos4_fixed_rate_ext_clks)); | ||
| 982 | } | ||
| 983 | |||
| 984 | static __initdata struct of_device_id ext_clk_match[] = { | ||
| 985 | { .compatible = "samsung,clock-xxti", .data = (void *)0, }, | ||
| 986 | { .compatible = "samsung,clock-xusbxti", .data = (void *)1, }, | ||
| 987 | {}, | ||
| 988 | }; | ||
| 989 | |||
| 990 | /* register exynos4 clocks */ | ||
| 991 | void __init exynos4_clk_init(struct device_node *np) | ||
| 992 | { | ||
| 993 | void __iomem *reg_base; | ||
| 994 | struct clk *apll, *mpll, *epll, *vpll; | ||
| 995 | u32 exynos4_soc; | ||
| 996 | |||
| 997 | if (np) { | ||
| 998 | const struct of_device_id *match; | ||
| 999 | match = of_match_node(exynos4_clk_ids, np); | ||
| 1000 | exynos4_soc = (u32)match->data; | ||
| 1001 | |||
| 1002 | reg_base = of_iomap(np, 0); | ||
| 1003 | if (!reg_base) | ||
| 1004 | panic("%s: failed to map registers\n", __func__); | ||
| 1005 | } else { | ||
| 1006 | reg_base = S5P_VA_CMU; | ||
| 1007 | if (soc_is_exynos4210()) | ||
| 1008 | exynos4_soc = EXYNOS4210; | ||
| 1009 | else if (soc_is_exynos4212() || soc_is_exynos4412()) | ||
| 1010 | exynos4_soc = EXYNOS4X12; | ||
| 1011 | else | ||
| 1012 | panic("%s: unable to determine soc\n", __func__); | ||
| 1013 | } | ||
| 1014 | |||
| 1015 | if (exynos4_soc == EXYNOS4210) | ||
| 1016 | samsung_clk_init(np, reg_base, nr_clks, | ||
| 1017 | exynos4_clk_regs, ARRAY_SIZE(exynos4_clk_regs), | ||
| 1018 | exynos4210_clk_save, ARRAY_SIZE(exynos4210_clk_save)); | ||
| 1019 | else | ||
| 1020 | samsung_clk_init(np, reg_base, nr_clks, | ||
| 1021 | exynos4_clk_regs, ARRAY_SIZE(exynos4_clk_regs), | ||
| 1022 | exynos4x12_clk_save, ARRAY_SIZE(exynos4x12_clk_save)); | ||
| 1023 | |||
| 1024 | if (np) | ||
| 1025 | samsung_clk_of_register_fixed_ext(exynos4_fixed_rate_ext_clks, | ||
| 1026 | ARRAY_SIZE(exynos4_fixed_rate_ext_clks), | ||
| 1027 | ext_clk_match); | ||
| 1028 | |||
| 1029 | exynos4_clk_register_finpll(); | ||
| 1030 | |||
| 1031 | if (exynos4_soc == EXYNOS4210) { | ||
| 1032 | apll = samsung_clk_register_pll45xx("fout_apll", "fin_pll", | ||
| 1033 | reg_base + APLL_CON0, pll_4508); | ||
| 1034 | mpll = samsung_clk_register_pll45xx("fout_mpll", "fin_pll", | ||
| 1035 | reg_base + E4210_MPLL_CON0, pll_4508); | ||
| 1036 | epll = samsung_clk_register_pll46xx("fout_epll", "fin_pll", | ||
| 1037 | reg_base + EPLL_CON0, pll_4600); | ||
| 1038 | vpll = samsung_clk_register_pll46xx("fout_vpll", "mout_vpllsrc", | ||
| 1039 | reg_base + VPLL_CON0, pll_4650c); | ||
| 1040 | } else { | ||
| 1041 | apll = samsung_clk_register_pll35xx("fout_apll", "fin_pll", | ||
| 1042 | reg_base + APLL_CON0); | ||
| 1043 | mpll = samsung_clk_register_pll35xx("fout_mpll", "fin_pll", | ||
| 1044 | reg_base + E4X12_MPLL_CON0); | ||
| 1045 | epll = samsung_clk_register_pll36xx("fout_epll", "fin_pll", | ||
| 1046 | reg_base + EPLL_CON0); | ||
| 1047 | vpll = samsung_clk_register_pll36xx("fout_vpll", "fin_pll", | ||
| 1048 | reg_base + VPLL_CON0); | ||
| 1049 | } | ||
| 1050 | |||
| 1051 | samsung_clk_add_lookup(apll, fout_apll); | ||
| 1052 | samsung_clk_add_lookup(mpll, fout_mpll); | ||
| 1053 | samsung_clk_add_lookup(epll, fout_epll); | ||
| 1054 | samsung_clk_add_lookup(vpll, fout_vpll); | ||
| 1055 | |||
| 1056 | samsung_clk_register_fixed_rate(exynos4_fixed_rate_clks, | ||
| 1057 | ARRAY_SIZE(exynos4_fixed_rate_clks)); | ||
| 1058 | samsung_clk_register_mux(exynos4_mux_clks, | ||
| 1059 | ARRAY_SIZE(exynos4_mux_clks)); | ||
| 1060 | samsung_clk_register_div(exynos4_div_clks, | ||
| 1061 | ARRAY_SIZE(exynos4_div_clks)); | ||
| 1062 | samsung_clk_register_gate(exynos4_gate_clks, | ||
| 1063 | ARRAY_SIZE(exynos4_gate_clks)); | ||
| 1064 | |||
| 1065 | if (exynos4_soc == EXYNOS4210) { | ||
| 1066 | samsung_clk_register_fixed_rate(exynos4210_fixed_rate_clks, | ||
| 1067 | ARRAY_SIZE(exynos4210_fixed_rate_clks)); | ||
| 1068 | samsung_clk_register_mux(exynos4210_mux_clks, | ||
| 1069 | ARRAY_SIZE(exynos4210_mux_clks)); | ||
| 1070 | samsung_clk_register_div(exynos4210_div_clks, | ||
| 1071 | ARRAY_SIZE(exynos4210_div_clks)); | ||
| 1072 | samsung_clk_register_gate(exynos4210_gate_clks, | ||
| 1073 | ARRAY_SIZE(exynos4210_gate_clks)); | ||
| 1074 | } else { | ||
| 1075 | samsung_clk_register_mux(exynos4x12_mux_clks, | ||
| 1076 | ARRAY_SIZE(exynos4x12_mux_clks)); | ||
| 1077 | samsung_clk_register_div(exynos4x12_div_clks, | ||
| 1078 | ARRAY_SIZE(exynos4x12_div_clks)); | ||
| 1079 | samsung_clk_register_gate(exynos4x12_gate_clks, | ||
| 1080 | ARRAY_SIZE(exynos4x12_gate_clks)); | ||
| 1081 | } | ||
| 1082 | |||
| 1083 | pr_info("%s clocks: sclk_apll = %ld, sclk_mpll = %ld\n" | ||
| 1084 | "\tsclk_epll = %ld, sclk_vpll = %ld, arm_clk = %ld\n", | ||
| 1085 | exynos4_soc == EXYNOS4210 ? "Exynos4210" : "Exynos4x12", | ||
| 1086 | _get_rate("sclk_apll"), _get_rate("sclk_mpll"), | ||
| 1087 | _get_rate("sclk_epll"), _get_rate("sclk_vpll"), | ||
| 1088 | _get_rate("arm_clk")); | ||
| 1089 | } | ||
| 1090 | CLK_OF_DECLARE(exynos4210_clk, "samsung,exynos4210-clock", exynos4_clk_init); | ||
| 1091 | CLK_OF_DECLARE(exynos4412_clk, "samsung,exynos4412-clock", exynos4_clk_init); | ||
diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c new file mode 100644 index 000000000000..7290faa518d2 --- /dev/null +++ b/drivers/clk/samsung/clk-exynos5250.c | |||
| @@ -0,0 +1,523 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Samsung Electronics Co., Ltd. | ||
| 3 | * Copyright (c) 2013 Linaro Ltd. | ||
| 4 | * Author: Thomas Abraham <thomas.ab@samsung.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * Common Clock Framework support for Exynos5250 SoC. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include <linux/clk.h> | ||
| 14 | #include <linux/clkdev.h> | ||
| 15 | #include <linux/clk-provider.h> | ||
| 16 | #include <linux/of.h> | ||
| 17 | #include <linux/of_address.h> | ||
| 18 | |||
| 19 | #include <plat/cpu.h> | ||
| 20 | #include "clk.h" | ||
| 21 | #include "clk-pll.h" | ||
| 22 | |||
| 23 | #define SRC_CPU 0x200 | ||
| 24 | #define DIV_CPU0 0x500 | ||
| 25 | #define SRC_CORE1 0x4204 | ||
| 26 | #define SRC_TOP0 0x10210 | ||
| 27 | #define SRC_TOP2 0x10218 | ||
| 28 | #define SRC_GSCL 0x10220 | ||
| 29 | #define SRC_DISP1_0 0x1022c | ||
| 30 | #define SRC_MAU 0x10240 | ||
| 31 | #define SRC_FSYS 0x10244 | ||
| 32 | #define SRC_GEN 0x10248 | ||
| 33 | #define SRC_PERIC0 0x10250 | ||
| 34 | #define SRC_PERIC1 0x10254 | ||
| 35 | #define SRC_MASK_GSCL 0x10320 | ||
| 36 | #define SRC_MASK_DISP1_0 0x1032c | ||
| 37 | #define SRC_MASK_MAU 0x10334 | ||
| 38 | #define SRC_MASK_FSYS 0x10340 | ||
| 39 | #define SRC_MASK_GEN 0x10344 | ||
| 40 | #define SRC_MASK_PERIC0 0x10350 | ||
| 41 | #define SRC_MASK_PERIC1 0x10354 | ||
| 42 | #define DIV_TOP0 0x10510 | ||
| 43 | #define DIV_TOP1 0x10514 | ||
| 44 | #define DIV_GSCL 0x10520 | ||
| 45 | #define DIV_DISP1_0 0x1052c | ||
| 46 | #define DIV_GEN 0x1053c | ||
| 47 | #define DIV_MAU 0x10544 | ||
| 48 | #define DIV_FSYS0 0x10548 | ||
| 49 | #define DIV_FSYS1 0x1054c | ||
| 50 | #define DIV_FSYS2 0x10550 | ||
| 51 | #define DIV_PERIC0 0x10558 | ||
| 52 | #define DIV_PERIC1 0x1055c | ||
| 53 | #define DIV_PERIC2 0x10560 | ||
| 54 | #define DIV_PERIC3 0x10564 | ||
| 55 | #define DIV_PERIC4 0x10568 | ||
| 56 | #define DIV_PERIC5 0x1056c | ||
| 57 | #define GATE_IP_GSCL 0x10920 | ||
| 58 | #define GATE_IP_MFC 0x1092c | ||
| 59 | #define GATE_IP_GEN 0x10934 | ||
| 60 | #define GATE_IP_FSYS 0x10944 | ||
| 61 | #define GATE_IP_PERIC 0x10950 | ||
| 62 | #define GATE_IP_PERIS 0x10960 | ||
| 63 | #define SRC_CDREX 0x20200 | ||
| 64 | #define PLL_DIV2_SEL 0x20a24 | ||
| 65 | #define GATE_IP_DISP1 0x10928 | ||
| 66 | |||
| 67 | /* | ||
| 68 | * Let each supported clock get a unique id. This id is used to lookup the clock | ||
| 69 | * for device tree based platforms. The clocks are categorized into three | ||
| 70 | * sections: core, sclk gate and bus interface gate clocks. | ||
| 71 | * | ||
| 72 | * When adding a new clock to this list, it is advised to choose a clock | ||
| 73 | * category and add it to the end of that category. That is because the the | ||
| 74 | * device tree source file is referring to these ids and any change in the | ||
| 75 | * sequence number of existing clocks will require corresponding change in the | ||
| 76 | * device tree files. This limitation would go away when pre-processor support | ||
| 77 | * for dtc would be available. | ||
| 78 | */ | ||
| 79 | enum exynos5250_clks { | ||
| 80 | none, | ||
| 81 | |||
| 82 | /* core clocks */ | ||
| 83 | fin_pll, | ||
| 84 | |||
| 85 | /* gate for special clocks (sclk) */ | ||
| 86 | sclk_cam_bayer = 128, sclk_cam0, sclk_cam1, sclk_gscl_wa, sclk_gscl_wb, | ||
| 87 | sclk_fimd1, sclk_mipi1, sclk_dp, sclk_hdmi, sclk_pixel, sclk_audio0, | ||
| 88 | sclk_mmc0, sclk_mmc1, sclk_mmc2, sclk_mmc3, sclk_sata, sclk_usb3, | ||
| 89 | sclk_jpeg, sclk_uart0, sclk_uart1, sclk_uart2, sclk_uart3, sclk_pwm, | ||
| 90 | sclk_audio1, sclk_audio2, sclk_spdif, sclk_spi0, sclk_spi1, sclk_spi2, | ||
| 91 | |||
| 92 | /* gate clocks */ | ||
| 93 | gscl0 = 256, gscl1, gscl2, gscl3, gscl_wa, gscl_wb, smmu_gscl0, | ||
| 94 | smmu_gscl1, smmu_gscl2, smmu_gscl3, mfc, smmu_mfcl, smmu_mfcr, rotator, | ||
| 95 | jpeg, mdma1, smmu_rotator, smmu_jpeg, smmu_mdma1, pdma0, pdma1, sata, | ||
| 96 | usbotg, mipi_hsi, sdmmc0, sdmmc1, sdmmc2, sdmmc3, sromc, usb2, usb3, | ||
| 97 | sata_phyctrl, sata_phyi2c, uart0, uart1, uart2, uart3, uart4, i2c0, | ||
| 98 | i2c1, i2c2, i2c3, i2c4, i2c5, i2c6, i2c7, i2c_hdmi, adc, spi0, spi1, | ||
| 99 | spi2, i2s1, i2s2, pcm1, pcm2, pwm, spdif, ac97, hsi2c0, hsi2c1, hsi2c2, | ||
| 100 | hsi2c3, chipid, sysreg, pmu, cmu_top, cmu_core, cmu_mem, tzpc0, tzpc1, | ||
| 101 | tzpc2, tzpc3, tzpc4, tzpc5, tzpc6, tzpc7, tzpc8, tzpc9, hdmi_cec, mct, | ||
| 102 | wdt, rtc, tmu, fimd1, mie1, dsim0, dp, mixer, hdmi, | ||
| 103 | |||
| 104 | nr_clks, | ||
| 105 | }; | ||
| 106 | |||
| 107 | /* | ||
| 108 | * list of controller registers to be saved and restored during a | ||
| 109 | * suspend/resume cycle. | ||
| 110 | */ | ||
| 111 | static __initdata unsigned long exynos5250_clk_regs[] = { | ||
| 112 | SRC_CPU, | ||
| 113 | DIV_CPU0, | ||
| 114 | SRC_CORE1, | ||
| 115 | SRC_TOP0, | ||
| 116 | SRC_TOP2, | ||
| 117 | SRC_GSCL, | ||
| 118 | SRC_DISP1_0, | ||
| 119 | SRC_MAU, | ||
| 120 | SRC_FSYS, | ||
| 121 | SRC_GEN, | ||
| 122 | SRC_PERIC0, | ||
| 123 | SRC_PERIC1, | ||
| 124 | SRC_MASK_GSCL, | ||
| 125 | SRC_MASK_DISP1_0, | ||
| 126 | SRC_MASK_MAU, | ||
| 127 | SRC_MASK_FSYS, | ||
| 128 | SRC_MASK_GEN, | ||
| 129 | SRC_MASK_PERIC0, | ||
| 130 | SRC_MASK_PERIC1, | ||
| 131 | DIV_TOP0, | ||
| 132 | DIV_TOP1, | ||
| 133 | DIV_GSCL, | ||
| 134 | DIV_DISP1_0, | ||
| 135 | DIV_GEN, | ||
| 136 | DIV_MAU, | ||
| 137 | DIV_FSYS0, | ||
| 138 | DIV_FSYS1, | ||
| 139 | DIV_FSYS2, | ||
| 140 | DIV_PERIC0, | ||
| 141 | DIV_PERIC1, | ||
| 142 | DIV_PERIC2, | ||
| 143 | DIV_PERIC3, | ||
| 144 | DIV_PERIC4, | ||
| 145 | DIV_PERIC5, | ||
| 146 | GATE_IP_GSCL, | ||
| 147 | GATE_IP_MFC, | ||
| 148 | GATE_IP_GEN, | ||
| 149 | GATE_IP_FSYS, | ||
| 150 | GATE_IP_PERIC, | ||
| 151 | GATE_IP_PERIS, | ||
| 152 | SRC_CDREX, | ||
| 153 | PLL_DIV2_SEL, | ||
| 154 | GATE_IP_DISP1, | ||
| 155 | }; | ||
| 156 | |||
| 157 | /* list of all parent clock list */ | ||
| 158 | PNAME(mout_apll_p) = { "fin_pll", "fout_apll", }; | ||
| 159 | PNAME(mout_cpu_p) = { "mout_apll", "mout_mpll", }; | ||
| 160 | PNAME(mout_mpll_fout_p) = { "fout_mplldiv2", "fout_mpll" }; | ||
| 161 | PNAME(mout_mpll_p) = { "fin_pll", "mout_mpll_fout" }; | ||
| 162 | PNAME(mout_bpll_fout_p) = { "fout_bplldiv2", "fout_bpll" }; | ||
| 163 | PNAME(mout_bpll_p) = { "fin_pll", "mout_bpll_fout" }; | ||
| 164 | PNAME(mout_vpllsrc_p) = { "fin_pll", "sclk_hdmi27m" }; | ||
| 165 | PNAME(mout_vpll_p) = { "mout_vpllsrc", "fout_vpll" }; | ||
| 166 | PNAME(mout_cpll_p) = { "fin_pll", "fout_cpll" }; | ||
| 167 | PNAME(mout_epll_p) = { "fin_pll", "fout_epll" }; | ||
| 168 | PNAME(mout_mpll_user_p) = { "fin_pll", "sclk_mpll" }; | ||
| 169 | PNAME(mout_bpll_user_p) = { "fin_pll", "sclk_bpll" }; | ||
| 170 | PNAME(mout_aclk166_p) = { "sclk_cpll", "sclk_mpll_user" }; | ||
| 171 | PNAME(mout_aclk200_p) = { "sclk_mpll_user", "sclk_bpll_user" }; | ||
| 172 | PNAME(mout_hdmi_p) = { "div_hdmi_pixel", "sclk_hdmiphy" }; | ||
| 173 | PNAME(mout_usb3_p) = { "sclk_mpll_user", "sclk_cpll" }; | ||
| 174 | PNAME(mout_group1_p) = { "fin_pll", "fin_pll", "sclk_hdmi27m", | ||
| 175 | "sclk_dptxphy", "sclk_uhostphy", "sclk_hdmiphy", | ||
| 176 | "sclk_mpll_user", "sclk_epll", "sclk_vpll", | ||
| 177 | "sclk_cpll" }; | ||
| 178 | PNAME(mout_audio0_p) = { "cdclk0", "fin_pll", "sclk_hdmi27m", "sclk_dptxphy", | ||
| 179 | "sclk_uhostphy", "sclk_hdmiphy", | ||
| 180 | "sclk_mpll_user", "sclk_epll", "sclk_vpll", | ||
| 181 | "sclk_cpll" }; | ||
| 182 | PNAME(mout_audio1_p) = { "cdclk1", "fin_pll", "sclk_hdmi27m", "sclk_dptxphy", | ||
| 183 | "sclk_uhostphy", "sclk_hdmiphy", | ||
| 184 | "sclk_mpll_user", "sclk_epll", "sclk_vpll", | ||
| 185 | "sclk_cpll" }; | ||
| 186 | PNAME(mout_audio2_p) = { "cdclk2", "fin_pll", "sclk_hdmi27m", "sclk_dptxphy", | ||
| 187 | "sclk_uhostphy", "sclk_hdmiphy", | ||
| 188 | "sclk_mpll_user", "sclk_epll", "sclk_vpll", | ||
| 189 | "sclk_cpll" }; | ||
| 190 | PNAME(mout_spdif_p) = { "sclk_audio0", "sclk_audio1", "sclk_audio2", | ||
| 191 | "spdif_extclk" }; | ||
| 192 | |||
| 193 | /* fixed rate clocks generated outside the soc */ | ||
| 194 | struct samsung_fixed_rate_clock exynos5250_fixed_rate_ext_clks[] __initdata = { | ||
| 195 | FRATE(fin_pll, "fin_pll", NULL, CLK_IS_ROOT, 0), | ||
| 196 | }; | ||
| 197 | |||
| 198 | /* fixed rate clocks generated inside the soc */ | ||
| 199 | struct samsung_fixed_rate_clock exynos5250_fixed_rate_clks[] __initdata = { | ||
| 200 | FRATE(none, "sclk_hdmiphy", NULL, CLK_IS_ROOT, 24000000), | ||
| 201 | FRATE(none, "sclk_hdmi27m", NULL, CLK_IS_ROOT, 27000000), | ||
| 202 | FRATE(none, "sclk_dptxphy", NULL, CLK_IS_ROOT, 24000000), | ||
| 203 | FRATE(none, "sclk_uhostphy", NULL, CLK_IS_ROOT, 48000000), | ||
| 204 | }; | ||
| 205 | |||
| 206 | struct samsung_fixed_factor_clock exynos5250_fixed_factor_clks[] __initdata = { | ||
| 207 | FFACTOR(none, "fout_mplldiv2", "fout_mpll", 1, 2, 0), | ||
| 208 | FFACTOR(none, "fout_bplldiv2", "fout_bpll", 1, 2, 0), | ||
| 209 | }; | ||
| 210 | |||
| 211 | struct samsung_mux_clock exynos5250_mux_clks[] __initdata = { | ||
| 212 | MUX(none, "mout_apll", mout_apll_p, SRC_CPU, 0, 1), | ||
| 213 | MUX(none, "mout_cpu", mout_cpu_p, SRC_CPU, 16, 1), | ||
| 214 | MUX(none, "mout_mpll_fout", mout_mpll_fout_p, PLL_DIV2_SEL, 4, 1), | ||
| 215 | MUX(none, "sclk_mpll", mout_mpll_p, SRC_CORE1, 8, 1), | ||
| 216 | MUX(none, "mout_bpll_fout", mout_bpll_fout_p, PLL_DIV2_SEL, 0, 1), | ||
| 217 | MUX(none, "sclk_bpll", mout_bpll_p, SRC_CDREX, 0, 1), | ||
| 218 | MUX(none, "mout_vpllsrc", mout_vpllsrc_p, SRC_TOP2, 0, 1), | ||
| 219 | MUX(none, "sclk_vpll", mout_vpll_p, SRC_TOP2, 16, 1), | ||
| 220 | MUX(none, "sclk_epll", mout_epll_p, SRC_TOP2, 12, 1), | ||
| 221 | MUX(none, "sclk_cpll", mout_cpll_p, SRC_TOP2, 8, 1), | ||
| 222 | MUX(none, "sclk_mpll_user", mout_mpll_user_p, SRC_TOP2, 20, 1), | ||
| 223 | MUX(none, "sclk_bpll_user", mout_bpll_user_p, SRC_TOP2, 24, 1), | ||
| 224 | MUX(none, "mout_aclk166", mout_aclk166_p, SRC_TOP0, 8, 1), | ||
| 225 | MUX(none, "mout_aclk333", mout_aclk166_p, SRC_TOP0, 16, 1), | ||
| 226 | MUX(none, "mout_aclk200", mout_aclk200_p, SRC_TOP0, 12, 1), | ||
| 227 | MUX(none, "mout_cam_bayer", mout_group1_p, SRC_GSCL, 12, 4), | ||
| 228 | MUX(none, "mout_cam0", mout_group1_p, SRC_GSCL, 16, 4), | ||
| 229 | MUX(none, "mout_cam1", mout_group1_p, SRC_GSCL, 20, 4), | ||
| 230 | MUX(none, "mout_gscl_wa", mout_group1_p, SRC_GSCL, 24, 4), | ||
| 231 | MUX(none, "mout_gscl_wb", mout_group1_p, SRC_GSCL, 28, 4), | ||
| 232 | MUX(none, "mout_fimd1", mout_group1_p, SRC_DISP1_0, 0, 4), | ||
| 233 | MUX(none, "mout_mipi1", mout_group1_p, SRC_DISP1_0, 12, 4), | ||
| 234 | MUX(none, "mout_dp", mout_group1_p, SRC_DISP1_0, 16, 4), | ||
| 235 | MUX(none, "mout_hdmi", mout_hdmi_p, SRC_DISP1_0, 20, 1), | ||
| 236 | MUX(none, "mout_audio0", mout_audio0_p, SRC_MAU, 0, 4), | ||
| 237 | MUX(none, "mout_mmc0", mout_group1_p, SRC_FSYS, 0, 4), | ||
| 238 | MUX(none, "mout_mmc1", mout_group1_p, SRC_FSYS, 4, 4), | ||
| 239 | MUX(none, "mout_mmc2", mout_group1_p, SRC_FSYS, 8, 4), | ||
| 240 | MUX(none, "mout_mmc3", mout_group1_p, SRC_FSYS, 12, 4), | ||
| 241 | MUX(none, "mout_sata", mout_aclk200_p, SRC_FSYS, 24, 1), | ||
| 242 | MUX(none, "mout_usb3", mout_usb3_p, SRC_FSYS, 28, 1), | ||
| 243 | MUX(none, "mout_jpeg", mout_group1_p, SRC_GEN, 0, 4), | ||
| 244 | MUX(none, "mout_uart0", mout_group1_p, SRC_PERIC0, 0, 4), | ||
| 245 | MUX(none, "mout_uart1", mout_group1_p, SRC_PERIC0, 4, 4), | ||
| 246 | MUX(none, "mout_uart2", mout_group1_p, SRC_PERIC0, 8, 4), | ||
| 247 | MUX(none, "mout_uart3", mout_group1_p, SRC_PERIC0, 12, 4), | ||
| 248 | MUX(none, "mout_pwm", mout_group1_p, SRC_PERIC0, 24, 4), | ||
| 249 | MUX(none, "mout_audio1", mout_audio1_p, SRC_PERIC1, 0, 4), | ||
| 250 | MUX(none, "mout_audio2", mout_audio2_p, SRC_PERIC1, 4, 4), | ||
| 251 | MUX(none, "mout_spdif", mout_spdif_p, SRC_PERIC1, 8, 2), | ||
| 252 | MUX(none, "mout_spi0", mout_group1_p, SRC_PERIC1, 16, 4), | ||
| 253 | MUX(none, "mout_spi1", mout_group1_p, SRC_PERIC1, 20, 4), | ||
| 254 | MUX(none, "mout_spi2", mout_group1_p, SRC_PERIC1, 24, 4), | ||
| 255 | }; | ||
| 256 | |||
| 257 | struct samsung_div_clock exynos5250_div_clks[] __initdata = { | ||
| 258 | DIV(none, "div_arm", "mout_cpu", DIV_CPU0, 0, 3), | ||
| 259 | DIV(none, "sclk_apll", "mout_apll", DIV_CPU0, 24, 3), | ||
| 260 | DIV(none, "aclk66_pre", "sclk_mpll_user", DIV_TOP1, 24, 3), | ||
| 261 | DIV(none, "aclk66", "aclk66_pre", DIV_TOP0, 0, 3), | ||
| 262 | DIV(none, "aclk266", "sclk_mpll_user", DIV_TOP0, 16, 3), | ||
| 263 | DIV(none, "aclk166", "mout_aclk166", DIV_TOP0, 8, 3), | ||
| 264 | DIV(none, "aclk333", "mout_aclk333", DIV_TOP0, 20, 3), | ||
| 265 | DIV(none, "aclk200", "mout_aclk200", DIV_TOP0, 12, 3), | ||
| 266 | DIV(none, "div_cam_bayer", "mout_cam_bayer", DIV_GSCL, 12, 4), | ||
| 267 | DIV(none, "div_cam0", "mout_cam0", DIV_GSCL, 16, 4), | ||
| 268 | DIV(none, "div_cam1", "mout_cam1", DIV_GSCL, 20, 4), | ||
| 269 | DIV(none, "div_gscl_wa", "mout_gscl_wa", DIV_GSCL, 24, 4), | ||
| 270 | DIV(none, "div_gscl_wb", "mout_gscl_wb", DIV_GSCL, 28, 4), | ||
| 271 | DIV(none, "div_fimd1", "mout_fimd1", DIV_DISP1_0, 0, 4), | ||
| 272 | DIV(none, "div_mipi1", "mout_mipi1", DIV_DISP1_0, 16, 4), | ||
| 273 | DIV(none, "div_dp", "mout_dp", DIV_DISP1_0, 24, 4), | ||
| 274 | DIV(none, "div_jpeg", "mout_jpeg", DIV_GEN, 4, 4), | ||
| 275 | DIV(none, "div_audio0", "mout_audio0", DIV_MAU, 0, 4), | ||
| 276 | DIV(none, "div_pcm0", "sclk_audio0", DIV_MAU, 4, 8), | ||
| 277 | DIV(none, "div_sata", "mout_sata", DIV_FSYS0, 20, 4), | ||
| 278 | DIV(none, "div_usb3", "mout_usb3", DIV_FSYS0, 24, 4), | ||
| 279 | DIV(none, "div_mmc0", "mout_mmc0", DIV_FSYS1, 8, 8), | ||
| 280 | DIV(none, "div_mmc1", "mout_mmc1", DIV_FSYS1, 24, 8), | ||
| 281 | DIV(none, "div_mmc2", "mout_mmc2", DIV_FSYS2, 8, 8), | ||
| 282 | DIV(none, "div_mmc3", "mout_mmc3", DIV_FSYS2, 24, 8), | ||
| 283 | DIV(none, "div_uart0", "mout_uart0", DIV_PERIC0, 0, 4), | ||
| 284 | DIV(none, "div_uart1", "mout_uart1", DIV_PERIC0, 4, 4), | ||
| 285 | DIV(none, "div_uart2", "mout_uart2", DIV_PERIC0, 8, 4), | ||
| 286 | DIV(none, "div_uart3", "mout_uart3", DIV_PERIC0, 12, 4), | ||
| 287 | DIV(none, "div_spi0", "mout_spi0", DIV_PERIC1, 0, 4), | ||
| 288 | DIV(none, "div_spi1", "mout_spi1", DIV_PERIC1, 16, 4), | ||
| 289 | DIV(none, "div_spi2", "mout_spi2", DIV_PERIC2, 0, 4), | ||
| 290 | DIV(none, "div_pwm", "mout_pwm", DIV_PERIC3, 0, 4), | ||
| 291 | DIV(none, "div_audio1", "mout_audio1", DIV_PERIC4, 0, 4), | ||
| 292 | DIV(none, "div_pcm1", "sclk_audio1", DIV_PERIC4, 4, 8), | ||
| 293 | DIV(none, "div_audio2", "mout_audio2", DIV_PERIC4, 16, 4), | ||
| 294 | DIV(none, "div_pcm2", "sclk_audio2", DIV_PERIC4, 20, 8), | ||
| 295 | DIV(none, "div_i2s1", "sclk_audio1", DIV_PERIC5, 0, 6), | ||
| 296 | DIV(none, "div_i2s2", "sclk_audio2", DIV_PERIC5, 8, 6), | ||
| 297 | DIV(sclk_pixel, "div_hdmi_pixel", "sclk_vpll", DIV_DISP1_0, 28, 4), | ||
| 298 | DIV_A(none, "armclk", "div_arm", DIV_CPU0, 28, 3, "armclk"), | ||
| 299 | DIV_F(none, "div_mipi1_pre", "div_mipi1", | ||
| 300 | DIV_DISP1_0, 20, 4, CLK_SET_RATE_PARENT, 0), | ||
| 301 | DIV_F(none, "div_mmc_pre0", "div_mmc0", | ||
| 302 | DIV_FSYS1, 8, 8, CLK_SET_RATE_PARENT, 0), | ||
| 303 | DIV_F(none, "div_mmc_pre1", "div_mmc1", | ||
| 304 | DIV_FSYS1, 24, 8, CLK_SET_RATE_PARENT, 0), | ||
| 305 | DIV_F(none, "div_mmc_pre2", "div_mmc2", | ||
| 306 | DIV_FSYS2, 8, 8, CLK_SET_RATE_PARENT, 0), | ||
| 307 | DIV_F(none, "div_mmc_pre3", "div_mmc3", | ||
| 308 | DIV_FSYS2, 24, 8, CLK_SET_RATE_PARENT, 0), | ||
| 309 | DIV_F(none, "div_spi_pre0", "div_spi0", | ||
| 310 | DIV_PERIC1, 8, 8, CLK_SET_RATE_PARENT, 0), | ||
| 311 | DIV_F(none, "div_spi_pre1", "div_spi1", | ||
| 312 | DIV_PERIC1, 24, 8, CLK_SET_RATE_PARENT, 0), | ||
| 313 | DIV_F(none, "div_spi_pre2", "div_spi2", | ||
| 314 | DIV_PERIC2, 8, 8, CLK_SET_RATE_PARENT, 0), | ||
| 315 | }; | ||
| 316 | |||
| 317 | struct samsung_gate_clock exynos5250_gate_clks[] __initdata = { | ||
| 318 | GATE(gscl0, "gscl0", "none", GATE_IP_GSCL, 0, 0, 0), | ||
| 319 | GATE(gscl1, "gscl1", "none", GATE_IP_GSCL, 1, 0, 0), | ||
| 320 | GATE(gscl2, "gscl2", "aclk266", GATE_IP_GSCL, 2, 0, 0), | ||
| 321 | GATE(gscl3, "gscl3", "aclk266", GATE_IP_GSCL, 3, 0, 0), | ||
| 322 | GATE(gscl_wa, "gscl_wa", "div_gscl_wa", GATE_IP_GSCL, 5, 0, 0), | ||
| 323 | GATE(gscl_wb, "gscl_wb", "div_gscl_wb", GATE_IP_GSCL, 6, 0, 0), | ||
| 324 | GATE(smmu_gscl0, "smmu_gscl0", "aclk266", GATE_IP_GSCL, 7, 0, 0), | ||
| 325 | GATE(smmu_gscl1, "smmu_gscl1", "aclk266", GATE_IP_GSCL, 8, 0, 0), | ||
| 326 | GATE(smmu_gscl2, "smmu_gscl2", "aclk266", GATE_IP_GSCL, 9, 0, 0), | ||
| 327 | GATE(smmu_gscl3, "smmu_gscl3", "aclk266", GATE_IP_GSCL, 10, 0, 0), | ||
| 328 | GATE(mfc, "mfc", "aclk333", GATE_IP_MFC, 0, 0, 0), | ||
| 329 | GATE(smmu_mfcl, "smmu_mfcl", "aclk333", GATE_IP_MFC, 1, 0, 0), | ||
| 330 | GATE(smmu_mfcr, "smmu_mfcr", "aclk333", GATE_IP_MFC, 2, 0, 0), | ||
| 331 | GATE(rotator, "rotator", "aclk266", GATE_IP_GEN, 1, 0, 0), | ||
| 332 | GATE(jpeg, "jpeg", "aclk166", GATE_IP_GEN, 2, 0, 0), | ||
| 333 | GATE(mdma1, "mdma1", "aclk266", GATE_IP_GEN, 4, 0, 0), | ||
| 334 | GATE(smmu_rotator, "smmu_rotator", "aclk266", GATE_IP_GEN, 6, 0, 0), | ||
| 335 | GATE(smmu_jpeg, "smmu_jpeg", "aclk166", GATE_IP_GEN, 7, 0, 0), | ||
| 336 | GATE(smmu_mdma1, "smmu_mdma1", "aclk266", GATE_IP_GEN, 9, 0, 0), | ||
| 337 | GATE(pdma0, "pdma0", "aclk200", GATE_IP_FSYS, 1, 0, 0), | ||
| 338 | GATE(pdma1, "pdma1", "aclk200", GATE_IP_FSYS, 2, 0, 0), | ||
| 339 | GATE(sata, "sata", "aclk200", GATE_IP_FSYS, 6, 0, 0), | ||
| 340 | GATE(usbotg, "usbotg", "aclk200", GATE_IP_FSYS, 7, 0, 0), | ||
| 341 | GATE(mipi_hsi, "mipi_hsi", "aclk200", GATE_IP_FSYS, 8, 0, 0), | ||
| 342 | GATE(sdmmc0, "sdmmc0", "aclk200", GATE_IP_FSYS, 12, 0, 0), | ||
| 343 | GATE(sdmmc1, "sdmmc1", "aclk200", GATE_IP_FSYS, 13, 0, 0), | ||
| 344 | GATE(sdmmc2, "sdmmc2", "aclk200", GATE_IP_FSYS, 14, 0, 0), | ||
| 345 | GATE(sdmmc3, "sdmmc3", "aclk200", GATE_IP_FSYS, 15, 0, 0), | ||
| 346 | GATE(sromc, "sromc", "aclk200", GATE_IP_FSYS, 17, 0, 0), | ||
| 347 | GATE(usb2, "usb2", "aclk200", GATE_IP_FSYS, 18, 0, 0), | ||
| 348 | GATE(usb3, "usb3", "aclk200", GATE_IP_FSYS, 19, 0, 0), | ||
| 349 | GATE(sata_phyctrl, "sata_phyctrl", "aclk200", GATE_IP_FSYS, 24, 0, 0), | ||
| 350 | GATE(sata_phyi2c, "sata_phyi2c", "aclk200", GATE_IP_FSYS, 25, 0, 0), | ||
| 351 | GATE(uart0, "uart0", "aclk66", GATE_IP_PERIC, 0, 0, 0), | ||
| 352 | GATE(uart1, "uart1", "aclk66", GATE_IP_PERIC, 1, 0, 0), | ||
| 353 | GATE(uart2, "uart2", "aclk66", GATE_IP_PERIC, 2, 0, 0), | ||
| 354 | GATE(uart3, "uart3", "aclk66", GATE_IP_PERIC, 3, 0, 0), | ||
| 355 | GATE(uart4, "uart4", "aclk66", GATE_IP_PERIC, 4, 0, 0), | ||
| 356 | GATE(i2c0, "i2c0", "aclk66", GATE_IP_PERIC, 6, 0, 0), | ||
| 357 | GATE(i2c1, "i2c1", "aclk66", GATE_IP_PERIC, 7, 0, 0), | ||
| 358 | GATE(i2c2, "i2c2", "aclk66", GATE_IP_PERIC, 8, 0, 0), | ||
| 359 | GATE(i2c3, "i2c3", "aclk66", GATE_IP_PERIC, 9, 0, 0), | ||
| 360 | GATE(i2c4, "i2c4", "aclk66", GATE_IP_PERIC, 10, 0, 0), | ||
| 361 | GATE(i2c5, "i2c5", "aclk66", GATE_IP_PERIC, 11, 0, 0), | ||
| 362 | GATE(i2c6, "i2c6", "aclk66", GATE_IP_PERIC, 12, 0, 0), | ||
| 363 | GATE(i2c7, "i2c7", "aclk66", GATE_IP_PERIC, 13, 0, 0), | ||
| 364 | GATE(i2c_hdmi, "i2c_hdmi", "aclk66", GATE_IP_PERIC, 14, 0, 0), | ||
| 365 | GATE(adc, "adc", "aclk66", GATE_IP_PERIC, 15, 0, 0), | ||
| 366 | GATE(spi0, "spi0", "aclk66", GATE_IP_PERIC, 16, 0, 0), | ||
| 367 | GATE(spi1, "spi1", "aclk66", GATE_IP_PERIC, 17, 0, 0), | ||
| 368 | GATE(spi2, "spi2", "aclk66", GATE_IP_PERIC, 18, 0, 0), | ||
| 369 | GATE(i2s1, "i2s1", "aclk66", GATE_IP_PERIC, 20, 0, 0), | ||
| 370 | GATE(i2s2, "i2s2", "aclk66", GATE_IP_PERIC, 21, 0, 0), | ||
| 371 | GATE(pcm1, "pcm1", "aclk66", GATE_IP_PERIC, 22, 0, 0), | ||
| 372 | GATE(pcm2, "pcm2", "aclk66", GATE_IP_PERIC, 23, 0, 0), | ||
| 373 | GATE(pwm, "pwm", "aclk66", GATE_IP_PERIC, 24, 0, 0), | ||
| 374 | GATE(spdif, "spdif", "aclk66", GATE_IP_PERIC, 26, 0, 0), | ||
| 375 | GATE(ac97, "ac97", "aclk66", GATE_IP_PERIC, 27, 0, 0), | ||
| 376 | GATE(hsi2c0, "hsi2c0", "aclk66", GATE_IP_PERIC, 28, 0, 0), | ||
| 377 | GATE(hsi2c1, "hsi2c1", "aclk66", GATE_IP_PERIC, 29, 0, 0), | ||
| 378 | GATE(hsi2c2, "hsi2c2", "aclk66", GATE_IP_PERIC, 30, 0, 0), | ||
| 379 | GATE(hsi2c3, "hsi2c3", "aclk66", GATE_IP_PERIC, 31, 0, 0), | ||
| 380 | GATE(chipid, "chipid", "aclk66", GATE_IP_PERIS, 0, 0, 0), | ||
| 381 | GATE(sysreg, "sysreg", "aclk66", GATE_IP_PERIS, 1, 0, 0), | ||
| 382 | GATE(pmu, "pmu", "aclk66", GATE_IP_PERIS, 2, 0, 0), | ||
| 383 | GATE(tzpc0, "tzpc0", "aclk66", GATE_IP_PERIS, 6, 0, 0), | ||
| 384 | GATE(tzpc1, "tzpc1", "aclk66", GATE_IP_PERIS, 7, 0, 0), | ||
| 385 | GATE(tzpc2, "tzpc2", "aclk66", GATE_IP_PERIS, 8, 0, 0), | ||
| 386 | GATE(tzpc3, "tzpc3", "aclk66", GATE_IP_PERIS, 9, 0, 0), | ||
| 387 | GATE(tzpc4, "tzpc4", "aclk66", GATE_IP_PERIS, 10, 0, 0), | ||
| 388 | GATE(tzpc5, "tzpc5", "aclk66", GATE_IP_PERIS, 11, 0, 0), | ||
| 389 | GATE(tzpc6, "tzpc6", "aclk66", GATE_IP_PERIS, 12, 0, 0), | ||
| 390 | GATE(tzpc7, "tzpc7", "aclk66", GATE_IP_PERIS, 13, 0, 0), | ||
| 391 | GATE(tzpc8, "tzpc8", "aclk66", GATE_IP_PERIS, 14, 0, 0), | ||
| 392 | GATE(tzpc9, "tzpc9", "aclk66", GATE_IP_PERIS, 15, 0, 0), | ||
| 393 | GATE(hdmi_cec, "hdmi_cec", "aclk66", GATE_IP_PERIS, 16, 0, 0), | ||
| 394 | GATE(mct, "mct", "aclk66", GATE_IP_PERIS, 18, 0, 0), | ||
| 395 | GATE(wdt, "wdt", "aclk66", GATE_IP_PERIS, 19, 0, 0), | ||
| 396 | GATE(rtc, "rtc", "aclk66", GATE_IP_PERIS, 20, 0, 0), | ||
| 397 | GATE(tmu, "tmu", "aclk66", GATE_IP_PERIS, 21, 0, 0), | ||
| 398 | GATE(cmu_top, "cmu_top", "aclk66", | ||
| 399 | GATE_IP_PERIS, 3, CLK_IGNORE_UNUSED, 0), | ||
| 400 | GATE(cmu_core, "cmu_core", "aclk66", | ||
| 401 | GATE_IP_PERIS, 4, CLK_IGNORE_UNUSED, 0), | ||
| 402 | GATE(cmu_mem, "cmu_mem", "aclk66", | ||
| 403 | GATE_IP_PERIS, 5, CLK_IGNORE_UNUSED, 0), | ||
| 404 | GATE(sclk_cam_bayer, "sclk_cam_bayer", "div_cam_bayer", | ||
| 405 | SRC_MASK_GSCL, 12, CLK_SET_RATE_PARENT, 0), | ||
| 406 | GATE(sclk_cam0, "sclk_cam0", "div_cam0", | ||
| 407 | SRC_MASK_GSCL, 16, CLK_SET_RATE_PARENT, 0), | ||
| 408 | GATE(sclk_cam1, "sclk_cam1", "div_cam1", | ||
| 409 | SRC_MASK_GSCL, 20, CLK_SET_RATE_PARENT, 0), | ||
| 410 | GATE(sclk_gscl_wa, "sclk_gscl_wa", "div_gscl_wa", | ||
| 411 | SRC_MASK_GSCL, 24, CLK_SET_RATE_PARENT, 0), | ||
| 412 | GATE(sclk_gscl_wb, "sclk_gscl_wb", "div_gscl_wb", | ||
| 413 | SRC_MASK_GSCL, 28, CLK_SET_RATE_PARENT, 0), | ||
| 414 | GATE(sclk_fimd1, "sclk_fimd1", "div_fimd1", | ||
| 415 | SRC_MASK_DISP1_0, 0, CLK_SET_RATE_PARENT, 0), | ||
| 416 | GATE(sclk_mipi1, "sclk_mipi1", "div_mipi1", | ||
| 417 | SRC_MASK_DISP1_0, 12, CLK_SET_RATE_PARENT, 0), | ||
| 418 | GATE(sclk_dp, "sclk_dp", "div_dp", | ||
| 419 | SRC_MASK_DISP1_0, 16, CLK_SET_RATE_PARENT, 0), | ||
| 420 | GATE(sclk_hdmi, "sclk_hdmi", "mout_hdmi", | ||
| 421 | SRC_MASK_DISP1_0, 20, 0, 0), | ||
| 422 | GATE(sclk_audio0, "sclk_audio0", "div_audio0", | ||
| 423 | SRC_MASK_MAU, 0, CLK_SET_RATE_PARENT, 0), | ||
| 424 | GATE(sclk_mmc0, "sclk_mmc0", "div_mmc0", | ||
| 425 | SRC_MASK_FSYS, 0, CLK_SET_RATE_PARENT, 0), | ||
| 426 | GATE(sclk_mmc1, "sclk_mmc1", "div_mmc1", | ||
| 427 | SRC_MASK_FSYS, 4, CLK_SET_RATE_PARENT, 0), | ||
| 428 | GATE(sclk_mmc2, "sclk_mmc2", "div_mmc2", | ||
| 429 | SRC_MASK_FSYS, 8, CLK_SET_RATE_PARENT, 0), | ||
| 430 | GATE(sclk_mmc3, "sclk_mmc3", "div_mmc3", | ||
| 431 | SRC_MASK_FSYS, 12, CLK_SET_RATE_PARENT, 0), | ||
| 432 | GATE(sclk_sata, "sclk_sata", "div_sata", | ||
| 433 | SRC_MASK_FSYS, 24, CLK_SET_RATE_PARENT, 0), | ||
| 434 | GATE(sclk_usb3, "sclk_usb3", "div_usb3", | ||
| 435 | SRC_MASK_FSYS, 28, CLK_SET_RATE_PARENT, 0), | ||
| 436 | GATE(sclk_jpeg, "sclk_jpeg", "div_jpeg", | ||
| 437 | SRC_MASK_GEN, 0, CLK_SET_RATE_PARENT, 0), | ||
| 438 | GATE(sclk_uart0, "sclk_uart0", "div_uart0", | ||
| 439 | SRC_MASK_PERIC0, 0, CLK_SET_RATE_PARENT, 0), | ||
| 440 | GATE(sclk_uart1, "sclk_uart1", "div_uart1", | ||
| 441 | SRC_MASK_PERIC0, 4, CLK_SET_RATE_PARENT, 0), | ||
| 442 | GATE(sclk_uart2, "sclk_uart2", "div_uart2", | ||
| 443 | SRC_MASK_PERIC0, 8, CLK_SET_RATE_PARENT, 0), | ||
| 444 | GATE(sclk_uart3, "sclk_uart3", "div_uart3", | ||
| 445 | SRC_MASK_PERIC0, 12, CLK_SET_RATE_PARENT, 0), | ||
| 446 | GATE(sclk_pwm, "sclk_pwm", "div_pwm", | ||
| 447 | SRC_MASK_PERIC0, 24, CLK_SET_RATE_PARENT, 0), | ||
| 448 | GATE(sclk_audio1, "sclk_audio1", "div_audio1", | ||
| 449 | SRC_MASK_PERIC1, 0, CLK_SET_RATE_PARENT, 0), | ||
| 450 | GATE(sclk_audio2, "sclk_audio2", "div_audio2", | ||
| 451 | SRC_MASK_PERIC1, 4, CLK_SET_RATE_PARENT, 0), | ||
| 452 | GATE(sclk_spdif, "sclk_spdif", "mout_spdif", | ||
| 453 | SRC_MASK_PERIC1, 4, 0, 0), | ||
| 454 | GATE(sclk_spi0, "sclk_spi0", "div_spi_pre0", | ||
| 455 | SRC_MASK_PERIC1, 16, CLK_SET_RATE_PARENT, 0), | ||
| 456 | GATE(sclk_spi1, "sclk_spi1", "div_spi_pre1", | ||
| 457 | SRC_MASK_PERIC1, 20, CLK_SET_RATE_PARENT, 0), | ||
| 458 | GATE(sclk_spi2, "sclk_spi2", "div_spi_pre2", | ||
| 459 | SRC_MASK_PERIC1, 24, CLK_SET_RATE_PARENT, 0), | ||
| 460 | GATE(fimd1, "fimd1", "aclk200", GATE_IP_DISP1, 0, 0, 0), | ||
| 461 | GATE(mie1, "mie1", "aclk200", GATE_IP_DISP1, 1, 0, 0), | ||
| 462 | GATE(dsim0, "dsim0", "aclk200", GATE_IP_DISP1, 3, 0, 0), | ||
| 463 | GATE(dp, "dp", "aclk200", GATE_IP_DISP1, 4, 0, 0), | ||
| 464 | GATE(mixer, "mixer", "aclk200", GATE_IP_DISP1, 5, 0, 0), | ||
| 465 | GATE(hdmi, "hdmi", "aclk200", GATE_IP_DISP1, 6, 0, 0), | ||
| 466 | }; | ||
| 467 | |||
| 468 | static __initdata struct of_device_id ext_clk_match[] = { | ||
| 469 | { .compatible = "samsung,clock-xxti", .data = (void *)0, }, | ||
| 470 | { }, | ||
| 471 | }; | ||
| 472 | |||
| 473 | /* register exynox5250 clocks */ | ||
| 474 | void __init exynos5250_clk_init(struct device_node *np) | ||
| 475 | { | ||
| 476 | void __iomem *reg_base; | ||
| 477 | struct clk *apll, *mpll, *epll, *vpll, *bpll, *gpll, *cpll; | ||
| 478 | |||
| 479 | if (np) { | ||
| 480 | reg_base = of_iomap(np, 0); | ||
| 481 | if (!reg_base) | ||
| 482 | panic("%s: failed to map registers\n", __func__); | ||
| 483 | } else { | ||
| 484 | panic("%s: unable to determine soc\n", __func__); | ||
| 485 | } | ||
| 486 | |||
| 487 | samsung_clk_init(np, reg_base, nr_clks, | ||
| 488 | exynos5250_clk_regs, ARRAY_SIZE(exynos5250_clk_regs), | ||
| 489 | NULL, 0); | ||
| 490 | samsung_clk_of_register_fixed_ext(exynos5250_fixed_rate_ext_clks, | ||
| 491 | ARRAY_SIZE(exynos5250_fixed_rate_ext_clks), | ||
| 492 | ext_clk_match); | ||
| 493 | |||
| 494 | apll = samsung_clk_register_pll35xx("fout_apll", "fin_pll", | ||
| 495 | reg_base + 0x100); | ||
| 496 | mpll = samsung_clk_register_pll35xx("fout_mpll", "fin_pll", | ||
| 497 | reg_base + 0x4100); | ||
| 498 | bpll = samsung_clk_register_pll35xx("fout_bpll", "fin_pll", | ||
| 499 | reg_base + 0x20110); | ||
| 500 | gpll = samsung_clk_register_pll35xx("fout_gpll", "fin_pll", | ||
| 501 | reg_base + 0x10150); | ||
| 502 | cpll = samsung_clk_register_pll35xx("fout_cpll", "fin_pll", | ||
| 503 | reg_base + 0x10120); | ||
| 504 | epll = samsung_clk_register_pll36xx("fout_epll", "fin_pll", | ||
| 505 | reg_base + 0x10130); | ||
| 506 | vpll = samsung_clk_register_pll36xx("fout_vpll", "mout_vpllsrc", | ||
| 507 | reg_base + 0x10140); | ||
| 508 | |||
| 509 | samsung_clk_register_fixed_rate(exynos5250_fixed_rate_clks, | ||
| 510 | ARRAY_SIZE(exynos5250_fixed_rate_clks)); | ||
| 511 | samsung_clk_register_fixed_factor(exynos5250_fixed_factor_clks, | ||
| 512 | ARRAY_SIZE(exynos5250_fixed_factor_clks)); | ||
| 513 | samsung_clk_register_mux(exynos5250_mux_clks, | ||
| 514 | ARRAY_SIZE(exynos5250_mux_clks)); | ||
| 515 | samsung_clk_register_div(exynos5250_div_clks, | ||
| 516 | ARRAY_SIZE(exynos5250_div_clks)); | ||
| 517 | samsung_clk_register_gate(exynos5250_gate_clks, | ||
| 518 | ARRAY_SIZE(exynos5250_gate_clks)); | ||
| 519 | |||
| 520 | pr_info("Exynos5250: clock setup completed, armclk=%ld\n", | ||
| 521 | _get_rate("armclk")); | ||
| 522 | } | ||
| 523 | CLK_OF_DECLARE(exynos5250_clk, "samsung,exynos5250-clock", exynos5250_clk_init); | ||
diff --git a/drivers/clk/samsung/clk-exynos5440.c b/drivers/clk/samsung/clk-exynos5440.c new file mode 100644 index 000000000000..a0a094c06f19 --- /dev/null +++ b/drivers/clk/samsung/clk-exynos5440.c | |||
| @@ -0,0 +1,139 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Samsung Electronics Co., Ltd. | ||
| 3 | * Author: Thomas Abraham <thomas.ab@samsung.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * Common Clock Framework support for Exynos5440 SoC. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/clk.h> | ||
| 13 | #include <linux/clkdev.h> | ||
| 14 | #include <linux/clk-provider.h> | ||
| 15 | #include <linux/of.h> | ||
| 16 | #include <linux/of_address.h> | ||
| 17 | |||
| 18 | #include <plat/cpu.h> | ||
| 19 | #include "clk.h" | ||
| 20 | #include "clk-pll.h" | ||
| 21 | |||
| 22 | #define CLKEN_OV_VAL 0xf8 | ||
| 23 | #define CPU_CLK_STATUS 0xfc | ||
| 24 | #define MISC_DOUT1 0x558 | ||
| 25 | |||
| 26 | /* | ||
| 27 | * Let each supported clock get a unique id. This id is used to lookup the clock | ||
| 28 | * for device tree based platforms. | ||
| 29 | */ | ||
| 30 | enum exynos5440_clks { | ||
| 31 | none, xtal, arm_clk, | ||
| 32 | |||
| 33 | spi_baud = 16, pb0_250, pr0_250, pr1_250, b_250, b_125, b_200, sata, | ||
| 34 | usb, gmac0, cs250, pb0_250_o, pr0_250_o, pr1_250_o, b_250_o, b_125_o, | ||
| 35 | b_200_o, sata_o, usb_o, gmac0_o, cs250_o, | ||
| 36 | |||
| 37 | nr_clks, | ||
| 38 | }; | ||
| 39 | |||
| 40 | /* parent clock name list */ | ||
| 41 | PNAME(mout_armclk_p) = { "cplla", "cpllb" }; | ||
| 42 | PNAME(mout_spi_p) = { "div125", "div200" }; | ||
| 43 | |||
| 44 | /* fixed rate clocks generated outside the soc */ | ||
| 45 | struct samsung_fixed_rate_clock exynos5440_fixed_rate_ext_clks[] __initdata = { | ||
| 46 | FRATE(none, "xtal", NULL, CLK_IS_ROOT, 0), | ||
| 47 | }; | ||
| 48 | |||
| 49 | /* fixed rate clocks */ | ||
| 50 | struct samsung_fixed_rate_clock exynos5440_fixed_rate_clks[] __initdata = { | ||
| 51 | FRATE(none, "ppll", NULL, CLK_IS_ROOT, 1000000000), | ||
| 52 | FRATE(none, "usb_phy0", NULL, CLK_IS_ROOT, 60000000), | ||
| 53 | FRATE(none, "usb_phy1", NULL, CLK_IS_ROOT, 60000000), | ||
| 54 | FRATE(none, "usb_ohci12", NULL, CLK_IS_ROOT, 12000000), | ||
| 55 | FRATE(none, "usb_ohci48", NULL, CLK_IS_ROOT, 48000000), | ||
| 56 | }; | ||
| 57 | |||
| 58 | /* fixed factor clocks */ | ||
| 59 | struct samsung_fixed_factor_clock exynos5440_fixed_factor_clks[] __initdata = { | ||
| 60 | FFACTOR(none, "div250", "ppll", 1, 4, 0), | ||
| 61 | FFACTOR(none, "div200", "ppll", 1, 5, 0), | ||
| 62 | FFACTOR(none, "div125", "div250", 1, 2, 0), | ||
| 63 | }; | ||
| 64 | |||
| 65 | /* mux clocks */ | ||
| 66 | struct samsung_mux_clock exynos5440_mux_clks[] __initdata = { | ||
| 67 | MUX(none, "mout_spi", mout_spi_p, MISC_DOUT1, 5, 1), | ||
| 68 | MUX_A(arm_clk, "arm_clk", mout_armclk_p, | ||
| 69 | CPU_CLK_STATUS, 0, 1, "armclk"), | ||
| 70 | }; | ||
| 71 | |||
| 72 | /* divider clocks */ | ||
| 73 | struct samsung_div_clock exynos5440_div_clks[] __initdata = { | ||
| 74 | DIV(spi_baud, "div_spi", "mout_spi", MISC_DOUT1, 3, 2), | ||
| 75 | }; | ||
| 76 | |||
| 77 | /* gate clocks */ | ||
| 78 | struct samsung_gate_clock exynos5440_gate_clks[] __initdata = { | ||
| 79 | GATE(pb0_250, "pb0_250", "div250", CLKEN_OV_VAL, 3, 0, 0), | ||
| 80 | GATE(pr0_250, "pr0_250", "div250", CLKEN_OV_VAL, 4, 0, 0), | ||
| 81 | GATE(pr1_250, "pr1_250", "div250", CLKEN_OV_VAL, 5, 0, 0), | ||
| 82 | GATE(b_250, "b_250", "div250", CLKEN_OV_VAL, 9, 0, 0), | ||
| 83 | GATE(b_125, "b_125", "div125", CLKEN_OV_VAL, 10, 0, 0), | ||
| 84 | GATE(b_200, "b_200", "div200", CLKEN_OV_VAL, 11, 0, 0), | ||
| 85 | GATE(sata, "sata", "div200", CLKEN_OV_VAL, 12, 0, 0), | ||
| 86 | GATE(usb, "usb", "div200", CLKEN_OV_VAL, 13, 0, 0), | ||
| 87 | GATE(gmac0, "gmac0", "div200", CLKEN_OV_VAL, 14, 0, 0), | ||
| 88 | GATE(cs250, "cs250", "div250", CLKEN_OV_VAL, 19, 0, 0), | ||
| 89 | GATE(pb0_250_o, "pb0_250_o", "pb0_250", CLKEN_OV_VAL, 3, 0, 0), | ||
| 90 | GATE(pr0_250_o, "pr0_250_o", "pr0_250", CLKEN_OV_VAL, 4, 0, 0), | ||
| 91 | GATE(pr1_250_o, "pr1_250_o", "pr1_250", CLKEN_OV_VAL, 5, 0, 0), | ||
| 92 | GATE(b_250_o, "b_250_o", "b_250", CLKEN_OV_VAL, 9, 0, 0), | ||
| 93 | GATE(b_125_o, "b_125_o", "b_125", CLKEN_OV_VAL, 10, 0, 0), | ||
| 94 | GATE(b_200_o, "b_200_o", "b_200", CLKEN_OV_VAL, 11, 0, 0), | ||
| 95 | GATE(sata_o, "sata_o", "sata", CLKEN_OV_VAL, 12, 0, 0), | ||
| 96 | GATE(usb_o, "usb_o", "usb", CLKEN_OV_VAL, 13, 0, 0), | ||
| 97 | GATE(gmac0_o, "gmac0_o", "gmac", CLKEN_OV_VAL, 14, 0, 0), | ||
| 98 | GATE(cs250_o, "cs250_o", "cs250", CLKEN_OV_VAL, 19, 0, 0), | ||
| 99 | }; | ||
| 100 | |||
| 101 | static __initdata struct of_device_id ext_clk_match[] = { | ||
| 102 | { .compatible = "samsung,clock-xtal", .data = (void *)0, }, | ||
| 103 | {}, | ||
| 104 | }; | ||
| 105 | |||
| 106 | /* register exynos5440 clocks */ | ||
| 107 | void __init exynos5440_clk_init(struct device_node *np) | ||
| 108 | { | ||
| 109 | void __iomem *reg_base; | ||
| 110 | |||
| 111 | reg_base = of_iomap(np, 0); | ||
| 112 | if (!reg_base) { | ||
| 113 | pr_err("%s: failed to map clock controller registers," | ||
| 114 | " aborting clock initialization\n", __func__); | ||
| 115 | return; | ||
| 116 | } | ||
| 117 | |||
| 118 | samsung_clk_init(np, reg_base, nr_clks, NULL, 0, NULL, 0); | ||
| 119 | samsung_clk_of_register_fixed_ext(exynos5440_fixed_rate_ext_clks, | ||
| 120 | ARRAY_SIZE(exynos5440_fixed_rate_ext_clks), ext_clk_match); | ||
| 121 | |||
| 122 | samsung_clk_register_pll2550x("cplla", "xtal", reg_base + 0x1c, 0x10); | ||
| 123 | samsung_clk_register_pll2550x("cpllb", "xtal", reg_base + 0x20, 0x10); | ||
| 124 | |||
| 125 | samsung_clk_register_fixed_rate(exynos5440_fixed_rate_clks, | ||
| 126 | ARRAY_SIZE(exynos5440_fixed_rate_clks)); | ||
| 127 | samsung_clk_register_fixed_factor(exynos5440_fixed_factor_clks, | ||
| 128 | ARRAY_SIZE(exynos5440_fixed_factor_clks)); | ||
| 129 | samsung_clk_register_mux(exynos5440_mux_clks, | ||
| 130 | ARRAY_SIZE(exynos5440_mux_clks)); | ||
| 131 | samsung_clk_register_div(exynos5440_div_clks, | ||
| 132 | ARRAY_SIZE(exynos5440_div_clks)); | ||
| 133 | samsung_clk_register_gate(exynos5440_gate_clks, | ||
| 134 | ARRAY_SIZE(exynos5440_gate_clks)); | ||
| 135 | |||
| 136 | pr_info("Exynos5440: arm_clk = %ldHz\n", _get_rate("armclk")); | ||
| 137 | pr_info("exynos5440 clock initialization complete\n"); | ||
| 138 | } | ||
| 139 | CLK_OF_DECLARE(exynos5440_clk, "samsung,exynos5440-clock", exynos5440_clk_init); | ||
diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c new file mode 100644 index 000000000000..89135f6be116 --- /dev/null +++ b/drivers/clk/samsung/clk-pll.c | |||
| @@ -0,0 +1,419 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Samsung Electronics Co., Ltd. | ||
| 3 | * Copyright (c) 2013 Linaro Ltd. | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This file contains the utility functions to register the pll clocks. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/errno.h> | ||
| 13 | #include "clk.h" | ||
| 14 | #include "clk-pll.h" | ||
| 15 | |||
| 16 | /* | ||
| 17 | * PLL35xx Clock Type | ||
| 18 | */ | ||
| 19 | |||
| 20 | #define PLL35XX_MDIV_MASK (0x3FF) | ||
| 21 | #define PLL35XX_PDIV_MASK (0x3F) | ||
| 22 | #define PLL35XX_SDIV_MASK (0x7) | ||
| 23 | #define PLL35XX_MDIV_SHIFT (16) | ||
| 24 | #define PLL35XX_PDIV_SHIFT (8) | ||
| 25 | #define PLL35XX_SDIV_SHIFT (0) | ||
| 26 | |||
| 27 | struct samsung_clk_pll35xx { | ||
| 28 | struct clk_hw hw; | ||
| 29 | const void __iomem *con_reg; | ||
| 30 | }; | ||
| 31 | |||
| 32 | #define to_clk_pll35xx(_hw) container_of(_hw, struct samsung_clk_pll35xx, hw) | ||
| 33 | |||
| 34 | static unsigned long samsung_pll35xx_recalc_rate(struct clk_hw *hw, | ||
| 35 | unsigned long parent_rate) | ||
| 36 | { | ||
| 37 | struct samsung_clk_pll35xx *pll = to_clk_pll35xx(hw); | ||
| 38 | u32 mdiv, pdiv, sdiv, pll_con; | ||
| 39 | u64 fvco = parent_rate; | ||
| 40 | |||
| 41 | pll_con = __raw_readl(pll->con_reg); | ||
| 42 | mdiv = (pll_con >> PLL35XX_MDIV_SHIFT) & PLL35XX_MDIV_MASK; | ||
| 43 | pdiv = (pll_con >> PLL35XX_PDIV_SHIFT) & PLL35XX_PDIV_MASK; | ||
| 44 | sdiv = (pll_con >> PLL35XX_SDIV_SHIFT) & PLL35XX_SDIV_MASK; | ||
| 45 | |||
| 46 | fvco *= mdiv; | ||
| 47 | do_div(fvco, (pdiv << sdiv)); | ||
| 48 | |||
| 49 | return (unsigned long)fvco; | ||
| 50 | } | ||
| 51 | |||
| 52 | static const struct clk_ops samsung_pll35xx_clk_ops = { | ||
| 53 | .recalc_rate = samsung_pll35xx_recalc_rate, | ||
| 54 | }; | ||
| 55 | |||
| 56 | struct clk * __init samsung_clk_register_pll35xx(const char *name, | ||
| 57 | const char *pname, const void __iomem *con_reg) | ||
| 58 | { | ||
| 59 | struct samsung_clk_pll35xx *pll; | ||
| 60 | struct clk *clk; | ||
| 61 | struct clk_init_data init; | ||
| 62 | |||
| 63 | pll = kzalloc(sizeof(*pll), GFP_KERNEL); | ||
| 64 | if (!pll) { | ||
| 65 | pr_err("%s: could not allocate pll clk %s\n", __func__, name); | ||
| 66 | return NULL; | ||
| 67 | } | ||
| 68 | |||
| 69 | init.name = name; | ||
| 70 | init.ops = &samsung_pll35xx_clk_ops; | ||
| 71 | init.flags = CLK_GET_RATE_NOCACHE; | ||
| 72 | init.parent_names = &pname; | ||
| 73 | init.num_parents = 1; | ||
| 74 | |||
| 75 | pll->hw.init = &init; | ||
| 76 | pll->con_reg = con_reg; | ||
| 77 | |||
| 78 | clk = clk_register(NULL, &pll->hw); | ||
| 79 | if (IS_ERR(clk)) { | ||
| 80 | pr_err("%s: failed to register pll clock %s\n", __func__, | ||
| 81 | name); | ||
| 82 | kfree(pll); | ||
| 83 | } | ||
| 84 | |||
| 85 | if (clk_register_clkdev(clk, name, NULL)) | ||
| 86 | pr_err("%s: failed to register lookup for %s", __func__, name); | ||
| 87 | |||
| 88 | return clk; | ||
| 89 | } | ||
| 90 | |||
| 91 | /* | ||
| 92 | * PLL36xx Clock Type | ||
| 93 | */ | ||
| 94 | |||
| 95 | #define PLL36XX_KDIV_MASK (0xFFFF) | ||
| 96 | #define PLL36XX_MDIV_MASK (0x1FF) | ||
| 97 | #define PLL36XX_PDIV_MASK (0x3F) | ||
| 98 | #define PLL36XX_SDIV_MASK (0x7) | ||
| 99 | #define PLL36XX_MDIV_SHIFT (16) | ||
| 100 | #define PLL36XX_PDIV_SHIFT (8) | ||
| 101 | #define PLL36XX_SDIV_SHIFT (0) | ||
| 102 | |||
| 103 | struct samsung_clk_pll36xx { | ||
| 104 | struct clk_hw hw; | ||
| 105 | const void __iomem *con_reg; | ||
| 106 | }; | ||
| 107 | |||
| 108 | #define to_clk_pll36xx(_hw) container_of(_hw, struct samsung_clk_pll36xx, hw) | ||
| 109 | |||
| 110 | static unsigned long samsung_pll36xx_recalc_rate(struct clk_hw *hw, | ||
| 111 | unsigned long parent_rate) | ||
| 112 | { | ||
| 113 | struct samsung_clk_pll36xx *pll = to_clk_pll36xx(hw); | ||
| 114 | u32 mdiv, pdiv, sdiv, kdiv, pll_con0, pll_con1; | ||
| 115 | u64 fvco = parent_rate; | ||
| 116 | |||
| 117 | pll_con0 = __raw_readl(pll->con_reg); | ||
| 118 | pll_con1 = __raw_readl(pll->con_reg + 4); | ||
| 119 | mdiv = (pll_con0 >> PLL36XX_MDIV_SHIFT) & PLL36XX_MDIV_MASK; | ||
| 120 | pdiv = (pll_con0 >> PLL36XX_PDIV_SHIFT) & PLL36XX_PDIV_MASK; | ||
| 121 | sdiv = (pll_con0 >> PLL36XX_SDIV_SHIFT) & PLL36XX_SDIV_MASK; | ||
| 122 | kdiv = pll_con1 & PLL36XX_KDIV_MASK; | ||
| 123 | |||
| 124 | fvco *= (mdiv << 16) + kdiv; | ||
| 125 | do_div(fvco, (pdiv << sdiv)); | ||
| 126 | fvco >>= 16; | ||
| 127 | |||
| 128 | return (unsigned long)fvco; | ||
| 129 | } | ||
| 130 | |||
| 131 | static const struct clk_ops samsung_pll36xx_clk_ops = { | ||
| 132 | .recalc_rate = samsung_pll36xx_recalc_rate, | ||
| 133 | }; | ||
| 134 | |||
| 135 | struct clk * __init samsung_clk_register_pll36xx(const char *name, | ||
| 136 | const char *pname, const void __iomem *con_reg) | ||
| 137 | { | ||
| 138 | struct samsung_clk_pll36xx *pll; | ||
| 139 | struct clk *clk; | ||
| 140 | struct clk_init_data init; | ||
| 141 | |||
| 142 | pll = kzalloc(sizeof(*pll), GFP_KERNEL); | ||
| 143 | if (!pll) { | ||
| 144 | pr_err("%s: could not allocate pll clk %s\n", __func__, name); | ||
| 145 | return NULL; | ||
| 146 | } | ||
| 147 | |||
| 148 | init.name = name; | ||
| 149 | init.ops = &samsung_pll36xx_clk_ops; | ||
| 150 | init.flags = CLK_GET_RATE_NOCACHE; | ||
| 151 | init.parent_names = &pname; | ||
| 152 | init.num_parents = 1; | ||
| 153 | |||
| 154 | pll->hw.init = &init; | ||
| 155 | pll->con_reg = con_reg; | ||
| 156 | |||
| 157 | clk = clk_register(NULL, &pll->hw); | ||
| 158 | if (IS_ERR(clk)) { | ||
| 159 | pr_err("%s: failed to register pll clock %s\n", __func__, | ||
| 160 | name); | ||
| 161 | kfree(pll); | ||
| 162 | } | ||
| 163 | |||
| 164 | if (clk_register_clkdev(clk, name, NULL)) | ||
| 165 | pr_err("%s: failed to register lookup for %s", __func__, name); | ||
| 166 | |||
| 167 | return clk; | ||
| 168 | } | ||
| 169 | |||
| 170 | /* | ||
| 171 | * PLL45xx Clock Type | ||
| 172 | */ | ||
| 173 | |||
| 174 | #define PLL45XX_MDIV_MASK (0x3FF) | ||
| 175 | #define PLL45XX_PDIV_MASK (0x3F) | ||
| 176 | #define PLL45XX_SDIV_MASK (0x7) | ||
| 177 | #define PLL45XX_MDIV_SHIFT (16) | ||
| 178 | #define PLL45XX_PDIV_SHIFT (8) | ||
| 179 | #define PLL45XX_SDIV_SHIFT (0) | ||
| 180 | |||
| 181 | struct samsung_clk_pll45xx { | ||
| 182 | struct clk_hw hw; | ||
| 183 | enum pll45xx_type type; | ||
| 184 | const void __iomem *con_reg; | ||
| 185 | }; | ||
| 186 | |||
| 187 | #define to_clk_pll45xx(_hw) container_of(_hw, struct samsung_clk_pll45xx, hw) | ||
| 188 | |||
| 189 | static unsigned long samsung_pll45xx_recalc_rate(struct clk_hw *hw, | ||
| 190 | unsigned long parent_rate) | ||
| 191 | { | ||
| 192 | struct samsung_clk_pll45xx *pll = to_clk_pll45xx(hw); | ||
| 193 | u32 mdiv, pdiv, sdiv, pll_con; | ||
| 194 | u64 fvco = parent_rate; | ||
| 195 | |||
| 196 | pll_con = __raw_readl(pll->con_reg); | ||
| 197 | mdiv = (pll_con >> PLL45XX_MDIV_SHIFT) & PLL45XX_MDIV_MASK; | ||
| 198 | pdiv = (pll_con >> PLL45XX_PDIV_SHIFT) & PLL45XX_PDIV_MASK; | ||
| 199 | sdiv = (pll_con >> PLL45XX_SDIV_SHIFT) & PLL45XX_SDIV_MASK; | ||
| 200 | |||
| 201 | if (pll->type == pll_4508) | ||
| 202 | sdiv = sdiv - 1; | ||
| 203 | |||
| 204 | fvco *= mdiv; | ||
| 205 | do_div(fvco, (pdiv << sdiv)); | ||
| 206 | |||
| 207 | return (unsigned long)fvco; | ||
| 208 | } | ||
| 209 | |||
| 210 | static const struct clk_ops samsung_pll45xx_clk_ops = { | ||
| 211 | .recalc_rate = samsung_pll45xx_recalc_rate, | ||
| 212 | }; | ||
| 213 | |||
| 214 | struct clk * __init samsung_clk_register_pll45xx(const char *name, | ||
| 215 | const char *pname, const void __iomem *con_reg, | ||
| 216 | enum pll45xx_type type) | ||
| 217 | { | ||
| 218 | struct samsung_clk_pll45xx *pll; | ||
| 219 | struct clk *clk; | ||
| 220 | struct clk_init_data init; | ||
| 221 | |||
| 222 | pll = kzalloc(sizeof(*pll), GFP_KERNEL); | ||
| 223 | if (!pll) { | ||
| 224 | pr_err("%s: could not allocate pll clk %s\n", __func__, name); | ||
| 225 | return NULL; | ||
| 226 | } | ||
| 227 | |||
| 228 | init.name = name; | ||
| 229 | init.ops = &samsung_pll45xx_clk_ops; | ||
| 230 | init.flags = CLK_GET_RATE_NOCACHE; | ||
| 231 | init.parent_names = &pname; | ||
| 232 | init.num_parents = 1; | ||
| 233 | |||
| 234 | pll->hw.init = &init; | ||
| 235 | pll->con_reg = con_reg; | ||
| 236 | pll->type = type; | ||
| 237 | |||
| 238 | clk = clk_register(NULL, &pll->hw); | ||
| 239 | if (IS_ERR(clk)) { | ||
| 240 | pr_err("%s: failed to register pll clock %s\n", __func__, | ||
| 241 | name); | ||
| 242 | kfree(pll); | ||
| 243 | } | ||
| 244 | |||
| 245 | if (clk_register_clkdev(clk, name, NULL)) | ||
| 246 | pr_err("%s: failed to register lookup for %s", __func__, name); | ||
| 247 | |||
| 248 | return clk; | ||
| 249 | } | ||
| 250 | |||
| 251 | /* | ||
| 252 | * PLL46xx Clock Type | ||
| 253 | */ | ||
| 254 | |||
| 255 | #define PLL46XX_MDIV_MASK (0x1FF) | ||
| 256 | #define PLL46XX_PDIV_MASK (0x3F) | ||
| 257 | #define PLL46XX_SDIV_MASK (0x7) | ||
| 258 | #define PLL46XX_MDIV_SHIFT (16) | ||
| 259 | #define PLL46XX_PDIV_SHIFT (8) | ||
| 260 | #define PLL46XX_SDIV_SHIFT (0) | ||
| 261 | |||
| 262 | #define PLL46XX_KDIV_MASK (0xFFFF) | ||
| 263 | #define PLL4650C_KDIV_MASK (0xFFF) | ||
| 264 | #define PLL46XX_KDIV_SHIFT (0) | ||
| 265 | |||
| 266 | struct samsung_clk_pll46xx { | ||
| 267 | struct clk_hw hw; | ||
| 268 | enum pll46xx_type type; | ||
| 269 | const void __iomem *con_reg; | ||
| 270 | }; | ||
| 271 | |||
| 272 | #define to_clk_pll46xx(_hw) container_of(_hw, struct samsung_clk_pll46xx, hw) | ||
| 273 | |||
| 274 | static unsigned long samsung_pll46xx_recalc_rate(struct clk_hw *hw, | ||
| 275 | unsigned long parent_rate) | ||
| 276 | { | ||
| 277 | struct samsung_clk_pll46xx *pll = to_clk_pll46xx(hw); | ||
| 278 | u32 mdiv, pdiv, sdiv, kdiv, pll_con0, pll_con1, shift; | ||
| 279 | u64 fvco = parent_rate; | ||
| 280 | |||
| 281 | pll_con0 = __raw_readl(pll->con_reg); | ||
| 282 | pll_con1 = __raw_readl(pll->con_reg + 4); | ||
| 283 | mdiv = (pll_con0 >> PLL46XX_MDIV_SHIFT) & PLL46XX_MDIV_MASK; | ||
| 284 | pdiv = (pll_con0 >> PLL46XX_PDIV_SHIFT) & PLL46XX_PDIV_MASK; | ||
| 285 | sdiv = (pll_con0 >> PLL46XX_SDIV_SHIFT) & PLL46XX_SDIV_MASK; | ||
| 286 | kdiv = pll->type == pll_4650c ? pll_con1 & PLL4650C_KDIV_MASK : | ||
| 287 | pll_con1 & PLL46XX_KDIV_MASK; | ||
| 288 | |||
| 289 | shift = pll->type == pll_4600 ? 16 : 10; | ||
| 290 | fvco *= (mdiv << shift) + kdiv; | ||
| 291 | do_div(fvco, (pdiv << sdiv)); | ||
| 292 | fvco >>= shift; | ||
| 293 | |||
| 294 | return (unsigned long)fvco; | ||
| 295 | } | ||
| 296 | |||
| 297 | static const struct clk_ops samsung_pll46xx_clk_ops = { | ||
| 298 | .recalc_rate = samsung_pll46xx_recalc_rate, | ||
| 299 | }; | ||
| 300 | |||
| 301 | struct clk * __init samsung_clk_register_pll46xx(const char *name, | ||
| 302 | const char *pname, const void __iomem *con_reg, | ||
| 303 | enum pll46xx_type type) | ||
| 304 | { | ||
| 305 | struct samsung_clk_pll46xx *pll; | ||
| 306 | struct clk *clk; | ||
| 307 | struct clk_init_data init; | ||
| 308 | |||
| 309 | pll = kzalloc(sizeof(*pll), GFP_KERNEL); | ||
| 310 | if (!pll) { | ||
| 311 | pr_err("%s: could not allocate pll clk %s\n", __func__, name); | ||
| 312 | return NULL; | ||
| 313 | } | ||
| 314 | |||
| 315 | init.name = name; | ||
| 316 | init.ops = &samsung_pll46xx_clk_ops; | ||
| 317 | init.flags = CLK_GET_RATE_NOCACHE; | ||
| 318 | init.parent_names = &pname; | ||
| 319 | init.num_parents = 1; | ||
| 320 | |||
| 321 | pll->hw.init = &init; | ||
| 322 | pll->con_reg = con_reg; | ||
| 323 | pll->type = type; | ||
| 324 | |||
| 325 | clk = clk_register(NULL, &pll->hw); | ||
| 326 | if (IS_ERR(clk)) { | ||
| 327 | pr_err("%s: failed to register pll clock %s\n", __func__, | ||
| 328 | name); | ||
| 329 | kfree(pll); | ||
| 330 | } | ||
| 331 | |||
| 332 | if (clk_register_clkdev(clk, name, NULL)) | ||
| 333 | pr_err("%s: failed to register lookup for %s", __func__, name); | ||
| 334 | |||
| 335 | return clk; | ||
| 336 | } | ||
| 337 | |||
| 338 | /* | ||
| 339 | * PLL2550x Clock Type | ||
| 340 | */ | ||
| 341 | |||
| 342 | #define PLL2550X_R_MASK (0x1) | ||
| 343 | #define PLL2550X_P_MASK (0x3F) | ||
| 344 | #define PLL2550X_M_MASK (0x3FF) | ||
| 345 | #define PLL2550X_S_MASK (0x7) | ||
| 346 | #define PLL2550X_R_SHIFT (20) | ||
| 347 | #define PLL2550X_P_SHIFT (14) | ||
| 348 | #define PLL2550X_M_SHIFT (4) | ||
| 349 | #define PLL2550X_S_SHIFT (0) | ||
| 350 | |||
| 351 | struct samsung_clk_pll2550x { | ||
| 352 | struct clk_hw hw; | ||
| 353 | const void __iomem *reg_base; | ||
| 354 | unsigned long offset; | ||
| 355 | }; | ||
| 356 | |||
| 357 | #define to_clk_pll2550x(_hw) container_of(_hw, struct samsung_clk_pll2550x, hw) | ||
| 358 | |||
| 359 | static unsigned long samsung_pll2550x_recalc_rate(struct clk_hw *hw, | ||
| 360 | unsigned long parent_rate) | ||
| 361 | { | ||
| 362 | struct samsung_clk_pll2550x *pll = to_clk_pll2550x(hw); | ||
| 363 | u32 r, p, m, s, pll_stat; | ||
| 364 | u64 fvco = parent_rate; | ||
| 365 | |||
| 366 | pll_stat = __raw_readl(pll->reg_base + pll->offset * 3); | ||
| 367 | r = (pll_stat >> PLL2550X_R_SHIFT) & PLL2550X_R_MASK; | ||
| 368 | if (!r) | ||
| 369 | return 0; | ||
| 370 | p = (pll_stat >> PLL2550X_P_SHIFT) & PLL2550X_P_MASK; | ||
| 371 | m = (pll_stat >> PLL2550X_M_SHIFT) & PLL2550X_M_MASK; | ||
| 372 | s = (pll_stat >> PLL2550X_S_SHIFT) & PLL2550X_S_MASK; | ||
| 373 | |||
| 374 | fvco *= m; | ||
| 375 | do_div(fvco, (p << s)); | ||
| 376 | |||
| 377 | return (unsigned long)fvco; | ||
| 378 | } | ||
| 379 | |||
| 380 | static const struct clk_ops samsung_pll2550x_clk_ops = { | ||
| 381 | .recalc_rate = samsung_pll2550x_recalc_rate, | ||
| 382 | }; | ||
| 383 | |||
| 384 | struct clk * __init samsung_clk_register_pll2550x(const char *name, | ||
| 385 | const char *pname, const void __iomem *reg_base, | ||
| 386 | const unsigned long offset) | ||
| 387 | { | ||
| 388 | struct samsung_clk_pll2550x *pll; | ||
| 389 | struct clk *clk; | ||
| 390 | struct clk_init_data init; | ||
| 391 | |||
| 392 | pll = kzalloc(sizeof(*pll), GFP_KERNEL); | ||
| 393 | if (!pll) { | ||
| 394 | pr_err("%s: could not allocate pll clk %s\n", __func__, name); | ||
| 395 | return NULL; | ||
| 396 | } | ||
| 397 | |||
| 398 | init.name = name; | ||
| 399 | init.ops = &samsung_pll2550x_clk_ops; | ||
| 400 | init.flags = CLK_GET_RATE_NOCACHE; | ||
| 401 | init.parent_names = &pname; | ||
| 402 | init.num_parents = 1; | ||
| 403 | |||
| 404 | pll->hw.init = &init; | ||
| 405 | pll->reg_base = reg_base; | ||
| 406 | pll->offset = offset; | ||
| 407 | |||
| 408 | clk = clk_register(NULL, &pll->hw); | ||
| 409 | if (IS_ERR(clk)) { | ||
| 410 | pr_err("%s: failed to register pll clock %s\n", __func__, | ||
| 411 | name); | ||
| 412 | kfree(pll); | ||
| 413 | } | ||
| 414 | |||
| 415 | if (clk_register_clkdev(clk, name, NULL)) | ||
| 416 | pr_err("%s: failed to register lookup for %s", __func__, name); | ||
| 417 | |||
| 418 | return clk; | ||
| 419 | } | ||
diff --git a/drivers/clk/samsung/clk-pll.h b/drivers/clk/samsung/clk-pll.h new file mode 100644 index 000000000000..f33786e9a78b --- /dev/null +++ b/drivers/clk/samsung/clk-pll.h | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Samsung Electronics Co., Ltd. | ||
| 3 | * Copyright (c) 2013 Linaro Ltd. | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * Common Clock Framework support for all PLL's in Samsung platforms | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __SAMSUNG_CLK_PLL_H | ||
| 13 | #define __SAMSUNG_CLK_PLL_H | ||
| 14 | |||
| 15 | enum pll45xx_type { | ||
| 16 | pll_4500, | ||
| 17 | pll_4502, | ||
| 18 | pll_4508 | ||
| 19 | }; | ||
| 20 | |||
| 21 | enum pll46xx_type { | ||
| 22 | pll_4600, | ||
| 23 | pll_4650, | ||
| 24 | pll_4650c, | ||
| 25 | }; | ||
| 26 | |||
| 27 | extern struct clk * __init samsung_clk_register_pll35xx(const char *name, | ||
| 28 | const char *pname, const void __iomem *con_reg); | ||
| 29 | extern struct clk * __init samsung_clk_register_pll36xx(const char *name, | ||
| 30 | const char *pname, const void __iomem *con_reg); | ||
| 31 | extern struct clk * __init samsung_clk_register_pll45xx(const char *name, | ||
| 32 | const char *pname, const void __iomem *con_reg, | ||
| 33 | enum pll45xx_type type); | ||
| 34 | extern struct clk * __init samsung_clk_register_pll46xx(const char *name, | ||
| 35 | const char *pname, const void __iomem *con_reg, | ||
| 36 | enum pll46xx_type type); | ||
| 37 | extern struct clk * __init samsung_clk_register_pll2550x(const char *name, | ||
| 38 | const char *pname, const void __iomem *reg_base, | ||
| 39 | const unsigned long offset); | ||
| 40 | |||
| 41 | #endif /* __SAMSUNG_CLK_PLL_H */ | ||
diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c new file mode 100644 index 000000000000..cd3c40ab50f3 --- /dev/null +++ b/drivers/clk/samsung/clk.c | |||
| @@ -0,0 +1,320 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Samsung Electronics Co., Ltd. | ||
| 3 | * Copyright (c) 2013 Linaro Ltd. | ||
| 4 | * Author: Thomas Abraham <thomas.ab@samsung.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * This file includes utility functions to register clocks to common | ||
| 11 | * clock framework for Samsung platforms. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/syscore_ops.h> | ||
| 15 | #include "clk.h" | ||
| 16 | |||
| 17 | static DEFINE_SPINLOCK(lock); | ||
| 18 | static struct clk **clk_table; | ||
| 19 | static void __iomem *reg_base; | ||
| 20 | #ifdef CONFIG_OF | ||
| 21 | static struct clk_onecell_data clk_data; | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #ifdef CONFIG_PM_SLEEP | ||
| 25 | static struct samsung_clk_reg_dump *reg_dump; | ||
| 26 | static unsigned long nr_reg_dump; | ||
| 27 | |||
| 28 | static int samsung_clk_suspend(void) | ||
| 29 | { | ||
| 30 | struct samsung_clk_reg_dump *rd = reg_dump; | ||
| 31 | unsigned long i; | ||
| 32 | |||
| 33 | for (i = 0; i < nr_reg_dump; i++, rd++) | ||
| 34 | rd->value = __raw_readl(reg_base + rd->offset); | ||
| 35 | |||
| 36 | return 0; | ||
| 37 | } | ||
| 38 | |||
| 39 | static void samsung_clk_resume(void) | ||
| 40 | { | ||
| 41 | struct samsung_clk_reg_dump *rd = reg_dump; | ||
| 42 | unsigned long i; | ||
| 43 | |||
| 44 | for (i = 0; i < nr_reg_dump; i++, rd++) | ||
| 45 | __raw_writel(rd->value, reg_base + rd->offset); | ||
| 46 | } | ||
| 47 | |||
| 48 | static struct syscore_ops samsung_clk_syscore_ops = { | ||
| 49 | .suspend = samsung_clk_suspend, | ||
| 50 | .resume = samsung_clk_resume, | ||
| 51 | }; | ||
| 52 | #endif /* CONFIG_PM_SLEEP */ | ||
| 53 | |||
| 54 | /* setup the essentials required to support clock lookup using ccf */ | ||
| 55 | void __init samsung_clk_init(struct device_node *np, void __iomem *base, | ||
| 56 | unsigned long nr_clks, unsigned long *rdump, | ||
| 57 | unsigned long nr_rdump, unsigned long *soc_rdump, | ||
| 58 | unsigned long nr_soc_rdump) | ||
| 59 | { | ||
| 60 | reg_base = base; | ||
| 61 | |||
| 62 | #ifdef CONFIG_PM_SLEEP | ||
| 63 | if (rdump && nr_rdump) { | ||
| 64 | unsigned int idx; | ||
| 65 | reg_dump = kzalloc(sizeof(struct samsung_clk_reg_dump) | ||
| 66 | * (nr_rdump + nr_soc_rdump), GFP_KERNEL); | ||
| 67 | if (!reg_dump) { | ||
| 68 | pr_err("%s: memory alloc for register dump failed\n", | ||
| 69 | __func__); | ||
| 70 | return; | ||
| 71 | } | ||
| 72 | |||
| 73 | for (idx = 0; idx < nr_rdump; idx++) | ||
| 74 | reg_dump[idx].offset = rdump[idx]; | ||
| 75 | for (idx = 0; idx < nr_soc_rdump; idx++) | ||
| 76 | reg_dump[nr_rdump + idx].offset = soc_rdump[idx]; | ||
| 77 | nr_reg_dump = nr_rdump + nr_soc_rdump; | ||
| 78 | register_syscore_ops(&samsung_clk_syscore_ops); | ||
| 79 | } | ||
| 80 | #endif | ||
| 81 | |||
| 82 | clk_table = kzalloc(sizeof(struct clk *) * nr_clks, GFP_KERNEL); | ||
| 83 | if (!clk_table) | ||
| 84 | panic("could not allocate clock lookup table\n"); | ||
| 85 | |||
| 86 | if (!np) | ||
| 87 | return; | ||
| 88 | |||
| 89 | #ifdef CONFIG_OF | ||
| 90 | clk_data.clks = clk_table; | ||
| 91 | clk_data.clk_num = nr_clks; | ||
| 92 | of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); | ||
| 93 | #endif | ||
| 94 | } | ||
| 95 | |||
| 96 | /* add a clock instance to the clock lookup table used for dt based lookup */ | ||
| 97 | void samsung_clk_add_lookup(struct clk *clk, unsigned int id) | ||
| 98 | { | ||
| 99 | if (clk_table && id) | ||
| 100 | clk_table[id] = clk; | ||
| 101 | } | ||
| 102 | |||
| 103 | /* register a list of aliases */ | ||
| 104 | void __init samsung_clk_register_alias(struct samsung_clock_alias *list, | ||
| 105 | unsigned int nr_clk) | ||
| 106 | { | ||
| 107 | struct clk *clk; | ||
| 108 | unsigned int idx, ret; | ||
| 109 | |||
| 110 | if (!clk_table) { | ||
| 111 | pr_err("%s: clock table missing\n", __func__); | ||
| 112 | return; | ||
| 113 | } | ||
| 114 | |||
| 115 | for (idx = 0; idx < nr_clk; idx++, list++) { | ||
| 116 | if (!list->id) { | ||
| 117 | pr_err("%s: clock id missing for index %d\n", __func__, | ||
| 118 | idx); | ||
| 119 | continue; | ||
| 120 | } | ||
| 121 | |||
| 122 | clk = clk_table[list->id]; | ||
| 123 | if (!clk) { | ||
| 124 | pr_err("%s: failed to find clock %d\n", __func__, | ||
| 125 | list->id); | ||
| 126 | continue; | ||
| 127 | } | ||
| 128 | |||
| 129 | ret = clk_register_clkdev(clk, list->alias, list->dev_name); | ||
| 130 | if (ret) | ||
| 131 | pr_err("%s: failed to register lookup %s\n", | ||
| 132 | __func__, list->alias); | ||
| 133 | } | ||
| 134 | } | ||
| 135 | |||
| 136 | /* register a list of fixed clocks */ | ||
| 137 | void __init samsung_clk_register_fixed_rate( | ||
| 138 | struct samsung_fixed_rate_clock *list, unsigned int nr_clk) | ||
| 139 | { | ||
| 140 | struct clk *clk; | ||
| 141 | unsigned int idx, ret; | ||
| 142 | |||
| 143 | for (idx = 0; idx < nr_clk; idx++, list++) { | ||
| 144 | clk = clk_register_fixed_rate(NULL, list->name, | ||
| 145 | list->parent_name, list->flags, list->fixed_rate); | ||
| 146 | if (IS_ERR(clk)) { | ||
| 147 | pr_err("%s: failed to register clock %s\n", __func__, | ||
| 148 | list->name); | ||
| 149 | continue; | ||
| 150 | } | ||
| 151 | |||
| 152 | samsung_clk_add_lookup(clk, list->id); | ||
| 153 | |||
| 154 | /* | ||
| 155 | * Unconditionally add a clock lookup for the fixed rate clocks. | ||
| 156 | * There are not many of these on any of Samsung platforms. | ||
| 157 | */ | ||
| 158 | ret = clk_register_clkdev(clk, list->name, NULL); | ||
| 159 | if (ret) | ||
| 160 | pr_err("%s: failed to register clock lookup for %s", | ||
| 161 | __func__, list->name); | ||
| 162 | } | ||
| 163 | } | ||
| 164 | |||
| 165 | /* register a list of fixed factor clocks */ | ||
| 166 | void __init samsung_clk_register_fixed_factor( | ||
| 167 | struct samsung_fixed_factor_clock *list, unsigned int nr_clk) | ||
| 168 | { | ||
| 169 | struct clk *clk; | ||
| 170 | unsigned int idx; | ||
| 171 | |||
| 172 | for (idx = 0; idx < nr_clk; idx++, list++) { | ||
| 173 | clk = clk_register_fixed_factor(NULL, list->name, | ||
| 174 | list->parent_name, list->flags, list->mult, list->div); | ||
| 175 | if (IS_ERR(clk)) { | ||
| 176 | pr_err("%s: failed to register clock %s\n", __func__, | ||
| 177 | list->name); | ||
| 178 | continue; | ||
| 179 | } | ||
| 180 | |||
| 181 | samsung_clk_add_lookup(clk, list->id); | ||
| 182 | } | ||
| 183 | } | ||
| 184 | |||
| 185 | /* register a list of mux clocks */ | ||
| 186 | void __init samsung_clk_register_mux(struct samsung_mux_clock *list, | ||
| 187 | unsigned int nr_clk) | ||
| 188 | { | ||
| 189 | struct clk *clk; | ||
| 190 | unsigned int idx, ret; | ||
| 191 | |||
| 192 | for (idx = 0; idx < nr_clk; idx++, list++) { | ||
| 193 | clk = clk_register_mux(NULL, list->name, list->parent_names, | ||
| 194 | list->num_parents, list->flags, reg_base + list->offset, | ||
| 195 | list->shift, list->width, list->mux_flags, &lock); | ||
| 196 | if (IS_ERR(clk)) { | ||
| 197 | pr_err("%s: failed to register clock %s\n", __func__, | ||
| 198 | list->name); | ||
| 199 | continue; | ||
| 200 | } | ||
| 201 | |||
| 202 | samsung_clk_add_lookup(clk, list->id); | ||
| 203 | |||
| 204 | /* register a clock lookup only if a clock alias is specified */ | ||
| 205 | if (list->alias) { | ||
| 206 | ret = clk_register_clkdev(clk, list->alias, | ||
| 207 | list->dev_name); | ||
| 208 | if (ret) | ||
| 209 | pr_err("%s: failed to register lookup %s\n", | ||
| 210 | __func__, list->alias); | ||
| 211 | } | ||
| 212 | } | ||
| 213 | } | ||
| 214 | |||
| 215 | /* register a list of div clocks */ | ||
| 216 | void __init samsung_clk_register_div(struct samsung_div_clock *list, | ||
| 217 | unsigned int nr_clk) | ||
| 218 | { | ||
| 219 | struct clk *clk; | ||
| 220 | unsigned int idx, ret; | ||
| 221 | |||
| 222 | for (idx = 0; idx < nr_clk; idx++, list++) { | ||
| 223 | if (list->table) | ||
| 224 | clk = clk_register_divider_table(NULL, list->name, | ||
| 225 | list->parent_name, list->flags, | ||
| 226 | reg_base + list->offset, list->shift, | ||
| 227 | list->width, list->div_flags, | ||
| 228 | list->table, &lock); | ||
| 229 | else | ||
| 230 | clk = clk_register_divider(NULL, list->name, | ||
| 231 | list->parent_name, list->flags, | ||
| 232 | reg_base + list->offset, list->shift, | ||
| 233 | list->width, list->div_flags, &lock); | ||
| 234 | if (IS_ERR(clk)) { | ||
| 235 | pr_err("%s: failed to register clock %s\n", __func__, | ||
| 236 | list->name); | ||
| 237 | continue; | ||
| 238 | } | ||
| 239 | |||
| 240 | samsung_clk_add_lookup(clk, list->id); | ||
| 241 | |||
| 242 | /* register a clock lookup only if a clock alias is specified */ | ||
| 243 | if (list->alias) { | ||
| 244 | ret = clk_register_clkdev(clk, list->alias, | ||
| 245 | list->dev_name); | ||
| 246 | if (ret) | ||
| 247 | pr_err("%s: failed to register lookup %s\n", | ||
| 248 | __func__, list->alias); | ||
| 249 | } | ||
| 250 | } | ||
| 251 | } | ||
| 252 | |||
| 253 | /* register a list of gate clocks */ | ||
| 254 | void __init samsung_clk_register_gate(struct samsung_gate_clock *list, | ||
| 255 | unsigned int nr_clk) | ||
| 256 | { | ||
| 257 | struct clk *clk; | ||
| 258 | unsigned int idx, ret; | ||
| 259 | |||
| 260 | for (idx = 0; idx < nr_clk; idx++, list++) { | ||
| 261 | clk = clk_register_gate(NULL, list->name, list->parent_name, | ||
| 262 | list->flags, reg_base + list->offset, | ||
| 263 | list->bit_idx, list->gate_flags, &lock); | ||
| 264 | if (IS_ERR(clk)) { | ||
| 265 | pr_err("%s: failed to register clock %s\n", __func__, | ||
| 266 | list->name); | ||
| 267 | continue; | ||
| 268 | } | ||
| 269 | |||
| 270 | /* register a clock lookup only if a clock alias is specified */ | ||
| 271 | if (list->alias) { | ||
| 272 | ret = clk_register_clkdev(clk, list->alias, | ||
| 273 | list->dev_name); | ||
| 274 | if (ret) | ||
| 275 | pr_err("%s: failed to register lookup %s\n", | ||
| 276 | __func__, list->alias); | ||
| 277 | } | ||
| 278 | |||
| 279 | samsung_clk_add_lookup(clk, list->id); | ||
| 280 | } | ||
| 281 | } | ||
| 282 | |||
| 283 | /* | ||
| 284 | * obtain the clock speed of all external fixed clock sources from device | ||
| 285 | * tree and register it | ||
| 286 | */ | ||
| 287 | #ifdef CONFIG_OF | ||
| 288 | void __init samsung_clk_of_register_fixed_ext( | ||
| 289 | struct samsung_fixed_rate_clock *fixed_rate_clk, | ||
| 290 | unsigned int nr_fixed_rate_clk, | ||
| 291 | struct of_device_id *clk_matches) | ||
| 292 | { | ||
| 293 | const struct of_device_id *match; | ||
| 294 | struct device_node *np; | ||
| 295 | u32 freq; | ||
| 296 | |||
| 297 | for_each_matching_node_and_match(np, clk_matches, &match) { | ||
| 298 | if (of_property_read_u32(np, "clock-frequency", &freq)) | ||
| 299 | continue; | ||
| 300 | fixed_rate_clk[(u32)match->data].fixed_rate = freq; | ||
| 301 | } | ||
| 302 | samsung_clk_register_fixed_rate(fixed_rate_clk, nr_fixed_rate_clk); | ||
| 303 | } | ||
| 304 | #endif | ||
| 305 | |||
| 306 | /* utility function to get the rate of a specified clock */ | ||
| 307 | unsigned long _get_rate(const char *clk_name) | ||
| 308 | { | ||
| 309 | struct clk *clk; | ||
| 310 | unsigned long rate; | ||
| 311 | |||
| 312 | clk = clk_get(NULL, clk_name); | ||
| 313 | if (IS_ERR(clk)) { | ||
| 314 | pr_err("%s: could not find clock %s\n", __func__, clk_name); | ||
| 315 | return 0; | ||
| 316 | } | ||
| 317 | rate = clk_get_rate(clk); | ||
| 318 | clk_put(clk); | ||
| 319 | return rate; | ||
| 320 | } | ||
diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h new file mode 100644 index 000000000000..10b2111f0c0f --- /dev/null +++ b/drivers/clk/samsung/clk.h | |||
| @@ -0,0 +1,289 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Samsung Electronics Co., Ltd. | ||
| 3 | * Copyright (c) 2013 Linaro Ltd. | ||
| 4 | * Author: Thomas Abraham <thomas.ab@samsung.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * Common Clock Framework support for all Samsung platforms | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __SAMSUNG_CLK_H | ||
| 14 | #define __SAMSUNG_CLK_H | ||
| 15 | |||
| 16 | #include <linux/clk.h> | ||
| 17 | #include <linux/clkdev.h> | ||
| 18 | #include <linux/io.h> | ||
| 19 | #include <linux/clk-provider.h> | ||
| 20 | #include <linux/of.h> | ||
| 21 | #include <linux/of_address.h> | ||
| 22 | |||
| 23 | #include <mach/map.h> | ||
| 24 | |||
| 25 | /** | ||
| 26 | * struct samsung_clock_alias: information about mux clock | ||
| 27 | * @id: platform specific id of the clock. | ||
| 28 | * @dev_name: name of the device to which this clock belongs. | ||
| 29 | * @alias: optional clock alias name to be assigned to this clock. | ||
| 30 | */ | ||
| 31 | struct samsung_clock_alias { | ||
| 32 | unsigned int id; | ||
| 33 | const char *dev_name; | ||
| 34 | const char *alias; | ||
| 35 | }; | ||
| 36 | |||
| 37 | #define ALIAS(_id, dname, a) \ | ||
| 38 | { \ | ||
| 39 | .id = _id, \ | ||
| 40 | .dev_name = dname, \ | ||
| 41 | .alias = a, \ | ||
| 42 | } | ||
| 43 | |||
| 44 | /** | ||
| 45 | * struct samsung_fixed_rate_clock: information about fixed-rate clock | ||
| 46 | * @id: platform specific id of the clock. | ||
| 47 | * @name: name of this fixed-rate clock. | ||
| 48 | * @parent_name: optional parent clock name. | ||
| 49 | * @flags: optional fixed-rate clock flags. | ||
| 50 | * @fixed-rate: fixed clock rate of this clock. | ||
| 51 | */ | ||
| 52 | struct samsung_fixed_rate_clock { | ||
| 53 | unsigned int id; | ||
| 54 | char *name; | ||
| 55 | const char *parent_name; | ||
| 56 | unsigned long flags; | ||
| 57 | unsigned long fixed_rate; | ||
| 58 | }; | ||
| 59 | |||
| 60 | #define FRATE(_id, cname, pname, f, frate) \ | ||
| 61 | { \ | ||
| 62 | .id = _id, \ | ||
| 63 | .name = cname, \ | ||
| 64 | .parent_name = pname, \ | ||
| 65 | .flags = f, \ | ||
| 66 | .fixed_rate = frate, \ | ||
| 67 | } | ||
| 68 | |||
| 69 | /* | ||
| 70 | * struct samsung_fixed_factor_clock: information about fixed-factor clock | ||
| 71 | * @id: platform specific id of the clock. | ||
| 72 | * @name: name of this fixed-factor clock. | ||
| 73 | * @parent_name: parent clock name. | ||
| 74 | * @mult: fixed multiplication factor. | ||
| 75 | * @div: fixed division factor. | ||
| 76 | * @flags: optional fixed-factor clock flags. | ||
| 77 | */ | ||
| 78 | struct samsung_fixed_factor_clock { | ||
| 79 | unsigned int id; | ||
| 80 | char *name; | ||
| 81 | const char *parent_name; | ||
| 82 | unsigned long mult; | ||
| 83 | unsigned long div; | ||
| 84 | unsigned long flags; | ||
| 85 | }; | ||
| 86 | |||
| 87 | #define FFACTOR(_id, cname, pname, m, d, f) \ | ||
| 88 | { \ | ||
| 89 | .id = _id, \ | ||
| 90 | .name = cname, \ | ||
| 91 | .parent_name = pname, \ | ||
| 92 | .mult = m, \ | ||
| 93 | .div = d, \ | ||
| 94 | .flags = f, \ | ||
| 95 | } | ||
| 96 | |||
| 97 | /** | ||
| 98 | * struct samsung_mux_clock: information about mux clock | ||
| 99 | * @id: platform specific id of the clock. | ||
| 100 | * @dev_name: name of the device to which this clock belongs. | ||
| 101 | * @name: name of this mux clock. | ||
| 102 | * @parent_names: array of pointer to parent clock names. | ||
| 103 | * @num_parents: number of parents listed in @parent_names. | ||
| 104 | * @flags: optional flags for basic clock. | ||
| 105 | * @offset: offset of the register for configuring the mux. | ||
| 106 | * @shift: starting bit location of the mux control bit-field in @reg. | ||
| 107 | * @width: width of the mux control bit-field in @reg. | ||
| 108 | * @mux_flags: flags for mux-type clock. | ||
| 109 | * @alias: optional clock alias name to be assigned to this clock. | ||
| 110 | */ | ||
| 111 | struct samsung_mux_clock { | ||
| 112 | unsigned int id; | ||
| 113 | const char *dev_name; | ||
| 114 | const char *name; | ||
| 115 | const char **parent_names; | ||
| 116 | u8 num_parents; | ||
| 117 | unsigned long flags; | ||
| 118 | unsigned long offset; | ||
| 119 | u8 shift; | ||
| 120 | u8 width; | ||
| 121 | u8 mux_flags; | ||
| 122 | const char *alias; | ||
| 123 | }; | ||
| 124 | |||
| 125 | #define __MUX(_id, dname, cname, pnames, o, s, w, f, mf, a) \ | ||
| 126 | { \ | ||
| 127 | .id = _id, \ | ||
| 128 | .dev_name = dname, \ | ||
| 129 | .name = cname, \ | ||
| 130 | .parent_names = pnames, \ | ||
| 131 | .num_parents = ARRAY_SIZE(pnames), \ | ||
| 132 | .flags = f, \ | ||
| 133 | .offset = o, \ | ||
| 134 | .shift = s, \ | ||
| 135 | .width = w, \ | ||
| 136 | .mux_flags = mf, \ | ||
| 137 | .alias = a, \ | ||
| 138 | } | ||
| 139 | |||
| 140 | #define MUX(_id, cname, pnames, o, s, w) \ | ||
| 141 | __MUX(_id, NULL, cname, pnames, o, s, w, 0, 0, NULL) | ||
| 142 | |||
| 143 | #define MUX_A(_id, cname, pnames, o, s, w, a) \ | ||
| 144 | __MUX(_id, NULL, cname, pnames, o, s, w, 0, 0, a) | ||
| 145 | |||
| 146 | #define MUX_F(_id, cname, pnames, o, s, w, f, mf) \ | ||
| 147 | __MUX(_id, NULL, cname, pnames, o, s, w, f, mf, NULL) | ||
| 148 | |||
| 149 | /** | ||
| 150 | * @id: platform specific id of the clock. | ||
| 151 | * struct samsung_div_clock: information about div clock | ||
| 152 | * @dev_name: name of the device to which this clock belongs. | ||
| 153 | * @name: name of this div clock. | ||
| 154 | * @parent_name: name of the parent clock. | ||
| 155 | * @flags: optional flags for basic clock. | ||
| 156 | * @offset: offset of the register for configuring the div. | ||
| 157 | * @shift: starting bit location of the div control bit-field in @reg. | ||
| 158 | * @div_flags: flags for div-type clock. | ||
| 159 | * @alias: optional clock alias name to be assigned to this clock. | ||
| 160 | */ | ||
| 161 | struct samsung_div_clock { | ||
| 162 | unsigned int id; | ||
| 163 | const char *dev_name; | ||
| 164 | const char *name; | ||
| 165 | const char *parent_name; | ||
| 166 | unsigned long flags; | ||
| 167 | unsigned long offset; | ||
| 168 | u8 shift; | ||
| 169 | u8 width; | ||
| 170 | u8 div_flags; | ||
| 171 | const char *alias; | ||
| 172 | struct clk_div_table *table; | ||
| 173 | }; | ||
| 174 | |||
| 175 | #define __DIV(_id, dname, cname, pname, o, s, w, f, df, a, t) \ | ||
| 176 | { \ | ||
| 177 | .id = _id, \ | ||
| 178 | .dev_name = dname, \ | ||
| 179 | .name = cname, \ | ||
| 180 | .parent_name = pname, \ | ||
| 181 | .flags = f, \ | ||
| 182 | .offset = o, \ | ||
| 183 | .shift = s, \ | ||
| 184 | .width = w, \ | ||
| 185 | .div_flags = df, \ | ||
| 186 | .alias = a, \ | ||
| 187 | .table = t, \ | ||
| 188 | } | ||
| 189 | |||
| 190 | #define DIV(_id, cname, pname, o, s, w) \ | ||
| 191 | __DIV(_id, NULL, cname, pname, o, s, w, 0, 0, NULL, NULL) | ||
| 192 | |||
| 193 | #define DIV_A(_id, cname, pname, o, s, w, a) \ | ||
| 194 | __DIV(_id, NULL, cname, pname, o, s, w, 0, 0, a, NULL) | ||
| 195 | |||
| 196 | #define DIV_F(_id, cname, pname, o, s, w, f, df) \ | ||
| 197 | __DIV(_id, NULL, cname, pname, o, s, w, f, df, NULL, NULL) | ||
| 198 | |||
| 199 | #define DIV_T(_id, cname, pname, o, s, w, t) \ | ||
| 200 | __DIV(_id, NULL, cname, pname, o, s, w, 0, 0, NULL, t) | ||
| 201 | |||
| 202 | /** | ||
| 203 | * struct samsung_gate_clock: information about gate clock | ||
| 204 | * @id: platform specific id of the clock. | ||
| 205 | * @dev_name: name of the device to which this clock belongs. | ||
| 206 | * @name: name of this gate clock. | ||
| 207 | * @parent_name: name of the parent clock. | ||
| 208 | * @flags: optional flags for basic clock. | ||
| 209 | * @offset: offset of the register for configuring the gate. | ||
| 210 | * @bit_idx: bit index of the gate control bit-field in @reg. | ||
| 211 | * @gate_flags: flags for gate-type clock. | ||
| 212 | * @alias: optional clock alias name to be assigned to this clock. | ||
| 213 | */ | ||
| 214 | struct samsung_gate_clock { | ||
| 215 | unsigned int id; | ||
| 216 | const char *dev_name; | ||
| 217 | const char *name; | ||
| 218 | const char *parent_name; | ||
| 219 | unsigned long flags; | ||
| 220 | unsigned long offset; | ||
| 221 | u8 bit_idx; | ||
| 222 | u8 gate_flags; | ||
| 223 | const char *alias; | ||
| 224 | }; | ||
| 225 | |||
| 226 | #define __GATE(_id, dname, cname, pname, o, b, f, gf, a) \ | ||
| 227 | { \ | ||
| 228 | .id = _id, \ | ||
| 229 | .dev_name = dname, \ | ||
| 230 | .name = cname, \ | ||
| 231 | .parent_name = pname, \ | ||
| 232 | .flags = f, \ | ||
| 233 | .offset = o, \ | ||
| 234 | .bit_idx = b, \ | ||
| 235 | .gate_flags = gf, \ | ||
| 236 | .alias = a, \ | ||
| 237 | } | ||
| 238 | |||
| 239 | #define GATE(_id, cname, pname, o, b, f, gf) \ | ||
| 240 | __GATE(_id, NULL, cname, pname, o, b, f, gf, NULL) | ||
| 241 | |||
| 242 | #define GATE_A(_id, cname, pname, o, b, f, gf, a) \ | ||
| 243 | __GATE(_id, NULL, cname, pname, o, b, f, gf, a) | ||
| 244 | |||
| 245 | #define GATE_D(_id, dname, cname, pname, o, b, f, gf) \ | ||
| 246 | __GATE(_id, dname, cname, pname, o, b, f, gf, NULL) | ||
| 247 | |||
| 248 | #define GATE_DA(_id, dname, cname, pname, o, b, f, gf, a) \ | ||
| 249 | __GATE(_id, dname, cname, pname, o, b, f, gf, a) | ||
| 250 | |||
| 251 | #define PNAME(x) static const char *x[] __initdata | ||
| 252 | |||
| 253 | /** | ||
| 254 | * struct samsung_clk_reg_dump: register dump of clock controller registers. | ||
| 255 | * @offset: clock register offset from the controller base address. | ||
| 256 | * @value: the value to be register at offset. | ||
| 257 | */ | ||
| 258 | struct samsung_clk_reg_dump { | ||
| 259 | u32 offset; | ||
| 260 | u32 value; | ||
| 261 | }; | ||
| 262 | |||
| 263 | extern void __init samsung_clk_init(struct device_node *np, void __iomem *base, | ||
| 264 | unsigned long nr_clks, unsigned long *rdump, | ||
| 265 | unsigned long nr_rdump, unsigned long *soc_rdump, | ||
| 266 | unsigned long nr_soc_rdump); | ||
| 267 | extern void __init samsung_clk_of_register_fixed_ext( | ||
| 268 | struct samsung_fixed_rate_clock *fixed_rate_clk, | ||
| 269 | unsigned int nr_fixed_rate_clk, | ||
| 270 | struct of_device_id *clk_matches); | ||
| 271 | |||
| 272 | extern void samsung_clk_add_lookup(struct clk *clk, unsigned int id); | ||
| 273 | |||
| 274 | extern void samsung_clk_register_alias(struct samsung_clock_alias *list, | ||
| 275 | unsigned int nr_clk); | ||
| 276 | extern void __init samsung_clk_register_fixed_rate( | ||
| 277 | struct samsung_fixed_rate_clock *clk_list, unsigned int nr_clk); | ||
| 278 | extern void __init samsung_clk_register_fixed_factor( | ||
| 279 | struct samsung_fixed_factor_clock *list, unsigned int nr_clk); | ||
| 280 | extern void __init samsung_clk_register_mux(struct samsung_mux_clock *clk_list, | ||
| 281 | unsigned int nr_clk); | ||
| 282 | extern void __init samsung_clk_register_div(struct samsung_div_clock *clk_list, | ||
| 283 | unsigned int nr_clk); | ||
| 284 | extern void __init samsung_clk_register_gate( | ||
| 285 | struct samsung_gate_clock *clk_list, unsigned int nr_clk); | ||
| 286 | |||
| 287 | extern unsigned long _get_rate(const char *clk_name); | ||
| 288 | |||
| 289 | #endif /* __SAMSUNG_CLK_H */ | ||
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index e507ab7df60b..e8c453285151 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig | |||
| @@ -67,3 +67,8 @@ config CLKSRC_METAG_GENERIC | |||
| 67 | def_bool y if METAG | 67 | def_bool y if METAG |
| 68 | help | 68 | help |
| 69 | This option enables support for the Meta per-thread timers. | 69 | This option enables support for the Meta per-thread timers. |
| 70 | |||
| 71 | config CLKSRC_EXYNOS_MCT | ||
| 72 | def_bool y if ARCH_EXYNOS | ||
| 73 | help | ||
| 74 | Support for Multi Core Timer controller on Exynos SoCs. | ||
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile index 89c5adc498b3..7c88173295aa 100644 --- a/drivers/clocksource/Makefile +++ b/drivers/clocksource/Makefile | |||
| @@ -20,6 +20,7 @@ obj-$(CONFIG_ARCH_MXS) += mxs_timer.o | |||
| 20 | obj-$(CONFIG_SUNXI_TIMER) += sunxi_timer.o | 20 | obj-$(CONFIG_SUNXI_TIMER) += sunxi_timer.o |
| 21 | obj-$(CONFIG_ARCH_TEGRA) += tegra20_timer.o | 21 | obj-$(CONFIG_ARCH_TEGRA) += tegra20_timer.o |
| 22 | obj-$(CONFIG_VT8500_TIMER) += vt8500_timer.o | 22 | obj-$(CONFIG_VT8500_TIMER) += vt8500_timer.o |
| 23 | obj-$(CONFIG_CLKSRC_EXYNOS_MCT) += exynos_mct.o | ||
| 23 | 24 | ||
| 24 | obj-$(CONFIG_ARM_ARCH_TIMER) += arm_arch_timer.o | 25 | obj-$(CONFIG_ARM_ARCH_TIMER) += arm_arch_timer.o |
| 25 | obj-$(CONFIG_CLKSRC_METAG_GENERIC) += metag_generic.o | 26 | obj-$(CONFIG_CLKSRC_METAG_GENERIC) += metag_generic.o |
diff --git a/arch/arm/mach-exynos/mct.c b/drivers/clocksource/exynos_mct.c index c9d6650f9b5d..203ac05e2b3d 100644 --- a/arch/arm/mach-exynos/mct.c +++ b/drivers/clocksource/exynos_mct.c | |||
| @@ -20,6 +20,9 @@ | |||
| 20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
| 21 | #include <linux/percpu.h> | 21 | #include <linux/percpu.h> |
| 22 | #include <linux/of.h> | 22 | #include <linux/of.h> |
| 23 | #include <linux/of_irq.h> | ||
| 24 | #include <linux/of_address.h> | ||
| 25 | #include <linux/clocksource.h> | ||
| 23 | 26 | ||
| 24 | #include <asm/arch_timer.h> | 27 | #include <asm/arch_timer.h> |
| 25 | #include <asm/localtimer.h> | 28 | #include <asm/localtimer.h> |
| @@ -28,9 +31,36 @@ | |||
| 28 | 31 | ||
| 29 | #include <mach/map.h> | 32 | #include <mach/map.h> |
| 30 | #include <mach/irqs.h> | 33 | #include <mach/irqs.h> |
| 31 | #include <mach/regs-mct.h> | ||
| 32 | #include <asm/mach/time.h> | 34 | #include <asm/mach/time.h> |
| 33 | 35 | ||
| 36 | #define EXYNOS4_MCTREG(x) (x) | ||
| 37 | #define EXYNOS4_MCT_G_CNT_L EXYNOS4_MCTREG(0x100) | ||
| 38 | #define EXYNOS4_MCT_G_CNT_U EXYNOS4_MCTREG(0x104) | ||
| 39 | #define EXYNOS4_MCT_G_CNT_WSTAT EXYNOS4_MCTREG(0x110) | ||
| 40 | #define EXYNOS4_MCT_G_COMP0_L EXYNOS4_MCTREG(0x200) | ||
| 41 | #define EXYNOS4_MCT_G_COMP0_U EXYNOS4_MCTREG(0x204) | ||
| 42 | #define EXYNOS4_MCT_G_COMP0_ADD_INCR EXYNOS4_MCTREG(0x208) | ||
| 43 | #define EXYNOS4_MCT_G_TCON EXYNOS4_MCTREG(0x240) | ||
| 44 | #define EXYNOS4_MCT_G_INT_CSTAT EXYNOS4_MCTREG(0x244) | ||
| 45 | #define EXYNOS4_MCT_G_INT_ENB EXYNOS4_MCTREG(0x248) | ||
| 46 | #define EXYNOS4_MCT_G_WSTAT EXYNOS4_MCTREG(0x24C) | ||
| 47 | #define _EXYNOS4_MCT_L_BASE EXYNOS4_MCTREG(0x300) | ||
| 48 | #define EXYNOS4_MCT_L_BASE(x) (_EXYNOS4_MCT_L_BASE + (0x100 * x)) | ||
| 49 | #define EXYNOS4_MCT_L_MASK (0xffffff00) | ||
| 50 | |||
| 51 | #define MCT_L_TCNTB_OFFSET (0x00) | ||
| 52 | #define MCT_L_ICNTB_OFFSET (0x08) | ||
| 53 | #define MCT_L_TCON_OFFSET (0x20) | ||
| 54 | #define MCT_L_INT_CSTAT_OFFSET (0x30) | ||
| 55 | #define MCT_L_INT_ENB_OFFSET (0x34) | ||
| 56 | #define MCT_L_WSTAT_OFFSET (0x40) | ||
| 57 | #define MCT_G_TCON_START (1 << 8) | ||
| 58 | #define MCT_G_TCON_COMP0_AUTO_INC (1 << 1) | ||
| 59 | #define MCT_G_TCON_COMP0_ENABLE (1 << 0) | ||
| 60 | #define MCT_L_TCON_INTERVAL_MODE (1 << 2) | ||
| 61 | #define MCT_L_TCON_INT_START (1 << 1) | ||
| 62 | #define MCT_L_TCON_TIMER_START (1 << 0) | ||
| 63 | |||
| 34 | #define TICK_BASE_CNT 1 | 64 | #define TICK_BASE_CNT 1 |
| 35 | 65 | ||
| 36 | enum { | 66 | enum { |
| @@ -38,64 +68,75 @@ enum { | |||
| 38 | MCT_INT_PPI | 68 | MCT_INT_PPI |
| 39 | }; | 69 | }; |
| 40 | 70 | ||
| 71 | enum { | ||
| 72 | MCT_G0_IRQ, | ||
| 73 | MCT_G1_IRQ, | ||
| 74 | MCT_G2_IRQ, | ||
| 75 | MCT_G3_IRQ, | ||
| 76 | MCT_L0_IRQ, | ||
| 77 | MCT_L1_IRQ, | ||
| 78 | MCT_L2_IRQ, | ||
| 79 | MCT_L3_IRQ, | ||
| 80 | MCT_NR_IRQS, | ||
| 81 | }; | ||
| 82 | |||
| 83 | static void __iomem *reg_base; | ||
| 41 | static unsigned long clk_rate; | 84 | static unsigned long clk_rate; |
| 42 | static unsigned int mct_int_type; | 85 | static unsigned int mct_int_type; |
| 86 | static int mct_irqs[MCT_NR_IRQS]; | ||
| 43 | 87 | ||
| 44 | struct mct_clock_event_device { | 88 | struct mct_clock_event_device { |
| 45 | struct clock_event_device *evt; | 89 | struct clock_event_device *evt; |
| 46 | void __iomem *base; | 90 | unsigned long base; |
| 47 | char name[10]; | 91 | char name[10]; |
| 48 | }; | 92 | }; |
| 49 | 93 | ||
| 50 | static void exynos4_mct_write(unsigned int value, void *addr) | 94 | static void exynos4_mct_write(unsigned int value, unsigned long offset) |
| 51 | { | 95 | { |
| 52 | void __iomem *stat_addr; | 96 | unsigned long stat_addr; |
| 53 | u32 mask; | 97 | u32 mask; |
| 54 | u32 i; | 98 | u32 i; |
| 55 | 99 | ||
| 56 | __raw_writel(value, addr); | 100 | __raw_writel(value, reg_base + offset); |
| 57 | 101 | ||
| 58 | if (likely(addr >= EXYNOS4_MCT_L_BASE(0))) { | 102 | if (likely(offset >= EXYNOS4_MCT_L_BASE(0))) { |
| 59 | u32 base = (u32) addr & EXYNOS4_MCT_L_MASK; | 103 | stat_addr = (offset & ~EXYNOS4_MCT_L_MASK) + MCT_L_WSTAT_OFFSET; |
| 60 | switch ((u32) addr & ~EXYNOS4_MCT_L_MASK) { | 104 | switch (offset & EXYNOS4_MCT_L_MASK) { |
| 61 | case (u32) MCT_L_TCON_OFFSET: | 105 | case MCT_L_TCON_OFFSET: |
| 62 | stat_addr = (void __iomem *) base + MCT_L_WSTAT_OFFSET; | ||
| 63 | mask = 1 << 3; /* L_TCON write status */ | 106 | mask = 1 << 3; /* L_TCON write status */ |
| 64 | break; | 107 | break; |
| 65 | case (u32) MCT_L_ICNTB_OFFSET: | 108 | case MCT_L_ICNTB_OFFSET: |
| 66 | stat_addr = (void __iomem *) base + MCT_L_WSTAT_OFFSET; | ||
| 67 | mask = 1 << 1; /* L_ICNTB write status */ | 109 | mask = 1 << 1; /* L_ICNTB write status */ |
| 68 | break; | 110 | break; |
| 69 | case (u32) MCT_L_TCNTB_OFFSET: | 111 | case MCT_L_TCNTB_OFFSET: |
| 70 | stat_addr = (void __iomem *) base + MCT_L_WSTAT_OFFSET; | ||
| 71 | mask = 1 << 0; /* L_TCNTB write status */ | 112 | mask = 1 << 0; /* L_TCNTB write status */ |
| 72 | break; | 113 | break; |
| 73 | default: | 114 | default: |
| 74 | return; | 115 | return; |
| 75 | } | 116 | } |
| 76 | } else { | 117 | } else { |
| 77 | switch ((u32) addr) { | 118 | switch (offset) { |
| 78 | case (u32) EXYNOS4_MCT_G_TCON: | 119 | case EXYNOS4_MCT_G_TCON: |
| 79 | stat_addr = EXYNOS4_MCT_G_WSTAT; | 120 | stat_addr = EXYNOS4_MCT_G_WSTAT; |
| 80 | mask = 1 << 16; /* G_TCON write status */ | 121 | mask = 1 << 16; /* G_TCON write status */ |
| 81 | break; | 122 | break; |
| 82 | case (u32) EXYNOS4_MCT_G_COMP0_L: | 123 | case EXYNOS4_MCT_G_COMP0_L: |
| 83 | stat_addr = EXYNOS4_MCT_G_WSTAT; | 124 | stat_addr = EXYNOS4_MCT_G_WSTAT; |
| 84 | mask = 1 << 0; /* G_COMP0_L write status */ | 125 | mask = 1 << 0; /* G_COMP0_L write status */ |
| 85 | break; | 126 | break; |
| 86 | case (u32) EXYNOS4_MCT_G_COMP0_U: | 127 | case EXYNOS4_MCT_G_COMP0_U: |
| 87 | stat_addr = EXYNOS4_MCT_G_WSTAT; | 128 | stat_addr = EXYNOS4_MCT_G_WSTAT; |
| 88 | mask = 1 << 1; /* G_COMP0_U write status */ | 129 | mask = 1 << 1; /* G_COMP0_U write status */ |
| 89 | break; | 130 | break; |
| 90 | case (u32) EXYNOS4_MCT_G_COMP0_ADD_INCR: | 131 | case EXYNOS4_MCT_G_COMP0_ADD_INCR: |
| 91 | stat_addr = EXYNOS4_MCT_G_WSTAT; | 132 | stat_addr = EXYNOS4_MCT_G_WSTAT; |
| 92 | mask = 1 << 2; /* G_COMP0_ADD_INCR w status */ | 133 | mask = 1 << 2; /* G_COMP0_ADD_INCR w status */ |
| 93 | break; | 134 | break; |
| 94 | case (u32) EXYNOS4_MCT_G_CNT_L: | 135 | case EXYNOS4_MCT_G_CNT_L: |
| 95 | stat_addr = EXYNOS4_MCT_G_CNT_WSTAT; | 136 | stat_addr = EXYNOS4_MCT_G_CNT_WSTAT; |
| 96 | mask = 1 << 0; /* G_CNT_L write status */ | 137 | mask = 1 << 0; /* G_CNT_L write status */ |
| 97 | break; | 138 | break; |
| 98 | case (u32) EXYNOS4_MCT_G_CNT_U: | 139 | case EXYNOS4_MCT_G_CNT_U: |
| 99 | stat_addr = EXYNOS4_MCT_G_CNT_WSTAT; | 140 | stat_addr = EXYNOS4_MCT_G_CNT_WSTAT; |
| 100 | mask = 1 << 1; /* G_CNT_U write status */ | 141 | mask = 1 << 1; /* G_CNT_U write status */ |
| 101 | break; | 142 | break; |
| @@ -106,12 +147,12 @@ static void exynos4_mct_write(unsigned int value, void *addr) | |||
| 106 | 147 | ||
| 107 | /* Wait maximum 1 ms until written values are applied */ | 148 | /* Wait maximum 1 ms until written values are applied */ |
| 108 | for (i = 0; i < loops_per_jiffy / 1000 * HZ; i++) | 149 | for (i = 0; i < loops_per_jiffy / 1000 * HZ; i++) |
| 109 | if (__raw_readl(stat_addr) & mask) { | 150 | if (__raw_readl(reg_base + stat_addr) & mask) { |
| 110 | __raw_writel(mask, stat_addr); | 151 | __raw_writel(mask, reg_base + stat_addr); |
| 111 | return; | 152 | return; |
| 112 | } | 153 | } |
| 113 | 154 | ||
| 114 | panic("MCT hangs after writing %d (addr:0x%08x)\n", value, (u32)addr); | 155 | panic("MCT hangs after writing %d (offset:0x%lx)\n", value, offset); |
| 115 | } | 156 | } |
| 116 | 157 | ||
| 117 | /* Clocksource handling */ | 158 | /* Clocksource handling */ |
| @@ -122,7 +163,7 @@ static void exynos4_mct_frc_start(u32 hi, u32 lo) | |||
| 122 | exynos4_mct_write(lo, EXYNOS4_MCT_G_CNT_L); | 163 | exynos4_mct_write(lo, EXYNOS4_MCT_G_CNT_L); |
| 123 | exynos4_mct_write(hi, EXYNOS4_MCT_G_CNT_U); | 164 | exynos4_mct_write(hi, EXYNOS4_MCT_G_CNT_U); |
| 124 | 165 | ||
| 125 | reg = __raw_readl(EXYNOS4_MCT_G_TCON); | 166 | reg = __raw_readl(reg_base + EXYNOS4_MCT_G_TCON); |
| 126 | reg |= MCT_G_TCON_START; | 167 | reg |= MCT_G_TCON_START; |
| 127 | exynos4_mct_write(reg, EXYNOS4_MCT_G_TCON); | 168 | exynos4_mct_write(reg, EXYNOS4_MCT_G_TCON); |
| 128 | } | 169 | } |
| @@ -130,12 +171,12 @@ static void exynos4_mct_frc_start(u32 hi, u32 lo) | |||
| 130 | static cycle_t exynos4_frc_read(struct clocksource *cs) | 171 | static cycle_t exynos4_frc_read(struct clocksource *cs) |
| 131 | { | 172 | { |
| 132 | unsigned int lo, hi; | 173 | unsigned int lo, hi; |
| 133 | u32 hi2 = __raw_readl(EXYNOS4_MCT_G_CNT_U); | 174 | u32 hi2 = __raw_readl(reg_base + EXYNOS4_MCT_G_CNT_U); |
| 134 | 175 | ||
| 135 | do { | 176 | do { |
| 136 | hi = hi2; | 177 | hi = hi2; |
| 137 | lo = __raw_readl(EXYNOS4_MCT_G_CNT_L); | 178 | lo = __raw_readl(reg_base + EXYNOS4_MCT_G_CNT_L); |
| 138 | hi2 = __raw_readl(EXYNOS4_MCT_G_CNT_U); | 179 | hi2 = __raw_readl(reg_base + EXYNOS4_MCT_G_CNT_U); |
| 139 | } while (hi != hi2); | 180 | } while (hi != hi2); |
| 140 | 181 | ||
| 141 | return ((cycle_t)hi << 32) | lo; | 182 | return ((cycle_t)hi << 32) | lo; |
| @@ -167,7 +208,7 @@ static void exynos4_mct_comp0_stop(void) | |||
| 167 | { | 208 | { |
| 168 | unsigned int tcon; | 209 | unsigned int tcon; |
| 169 | 210 | ||
| 170 | tcon = __raw_readl(EXYNOS4_MCT_G_TCON); | 211 | tcon = __raw_readl(reg_base + EXYNOS4_MCT_G_TCON); |
| 171 | tcon &= ~(MCT_G_TCON_COMP0_ENABLE | MCT_G_TCON_COMP0_AUTO_INC); | 212 | tcon &= ~(MCT_G_TCON_COMP0_ENABLE | MCT_G_TCON_COMP0_AUTO_INC); |
| 172 | 213 | ||
| 173 | exynos4_mct_write(tcon, EXYNOS4_MCT_G_TCON); | 214 | exynos4_mct_write(tcon, EXYNOS4_MCT_G_TCON); |
| @@ -180,7 +221,7 @@ static void exynos4_mct_comp0_start(enum clock_event_mode mode, | |||
| 180 | unsigned int tcon; | 221 | unsigned int tcon; |
| 181 | cycle_t comp_cycle; | 222 | cycle_t comp_cycle; |
| 182 | 223 | ||
| 183 | tcon = __raw_readl(EXYNOS4_MCT_G_TCON); | 224 | tcon = __raw_readl(reg_base + EXYNOS4_MCT_G_TCON); |
| 184 | 225 | ||
| 185 | if (mode == CLOCK_EVT_MODE_PERIODIC) { | 226 | if (mode == CLOCK_EVT_MODE_PERIODIC) { |
| 186 | tcon |= MCT_G_TCON_COMP0_AUTO_INC; | 227 | tcon |= MCT_G_TCON_COMP0_AUTO_INC; |
| @@ -257,11 +298,7 @@ static void exynos4_clockevent_init(void) | |||
| 257 | mct_comp_device.cpumask = cpumask_of(0); | 298 | mct_comp_device.cpumask = cpumask_of(0); |
| 258 | clockevents_config_and_register(&mct_comp_device, clk_rate, | 299 | clockevents_config_and_register(&mct_comp_device, clk_rate, |
| 259 | 0xf, 0xffffffff); | 300 | 0xf, 0xffffffff); |
| 260 | 301 | setup_irq(mct_irqs[MCT_G0_IRQ], &mct_comp_event_irq); | |
| 261 | if (soc_is_exynos5250()) | ||
| 262 | setup_irq(EXYNOS5_IRQ_MCT_G0, &mct_comp_event_irq); | ||
| 263 | else | ||
| 264 | setup_irq(EXYNOS4_IRQ_MCT_G0, &mct_comp_event_irq); | ||
| 265 | } | 302 | } |
| 266 | 303 | ||
| 267 | #ifdef CONFIG_LOCAL_TIMERS | 304 | #ifdef CONFIG_LOCAL_TIMERS |
| @@ -273,12 +310,12 @@ static void exynos4_mct_tick_stop(struct mct_clock_event_device *mevt) | |||
| 273 | { | 310 | { |
| 274 | unsigned long tmp; | 311 | unsigned long tmp; |
| 275 | unsigned long mask = MCT_L_TCON_INT_START | MCT_L_TCON_TIMER_START; | 312 | unsigned long mask = MCT_L_TCON_INT_START | MCT_L_TCON_TIMER_START; |
| 276 | void __iomem *addr = mevt->base + MCT_L_TCON_OFFSET; | 313 | unsigned long offset = mevt->base + MCT_L_TCON_OFFSET; |
| 277 | 314 | ||
| 278 | tmp = __raw_readl(addr); | 315 | tmp = __raw_readl(reg_base + offset); |
| 279 | if (tmp & mask) { | 316 | if (tmp & mask) { |
| 280 | tmp &= ~mask; | 317 | tmp &= ~mask; |
| 281 | exynos4_mct_write(tmp, addr); | 318 | exynos4_mct_write(tmp, offset); |
| 282 | } | 319 | } |
| 283 | } | 320 | } |
| 284 | 321 | ||
| @@ -297,7 +334,7 @@ static void exynos4_mct_tick_start(unsigned long cycles, | |||
| 297 | /* enable MCT tick interrupt */ | 334 | /* enable MCT tick interrupt */ |
| 298 | exynos4_mct_write(0x1, mevt->base + MCT_L_INT_ENB_OFFSET); | 335 | exynos4_mct_write(0x1, mevt->base + MCT_L_INT_ENB_OFFSET); |
| 299 | 336 | ||
| 300 | tmp = __raw_readl(mevt->base + MCT_L_TCON_OFFSET); | 337 | tmp = __raw_readl(reg_base + mevt->base + MCT_L_TCON_OFFSET); |
| 301 | tmp |= MCT_L_TCON_INT_START | MCT_L_TCON_TIMER_START | | 338 | tmp |= MCT_L_TCON_INT_START | MCT_L_TCON_TIMER_START | |
| 302 | MCT_L_TCON_INTERVAL_MODE; | 339 | MCT_L_TCON_INTERVAL_MODE; |
| 303 | exynos4_mct_write(tmp, mevt->base + MCT_L_TCON_OFFSET); | 340 | exynos4_mct_write(tmp, mevt->base + MCT_L_TCON_OFFSET); |
| @@ -349,7 +386,7 @@ static int exynos4_mct_tick_clear(struct mct_clock_event_device *mevt) | |||
| 349 | exynos4_mct_tick_stop(mevt); | 386 | exynos4_mct_tick_stop(mevt); |
| 350 | 387 | ||
| 351 | /* Clear the MCT tick interrupt */ | 388 | /* Clear the MCT tick interrupt */ |
| 352 | if (__raw_readl(mevt->base + MCT_L_INT_CSTAT_OFFSET) & 1) { | 389 | if (__raw_readl(reg_base + mevt->base + MCT_L_INT_CSTAT_OFFSET) & 1) { |
| 353 | exynos4_mct_write(0x1, mevt->base + MCT_L_INT_CSTAT_OFFSET); | 390 | exynos4_mct_write(0x1, mevt->base + MCT_L_INT_CSTAT_OFFSET); |
| 354 | return 1; | 391 | return 1; |
| 355 | } else { | 392 | } else { |
| @@ -385,7 +422,6 @@ static int __cpuinit exynos4_local_timer_setup(struct clock_event_device *evt) | |||
| 385 | { | 422 | { |
| 386 | struct mct_clock_event_device *mevt; | 423 | struct mct_clock_event_device *mevt; |
| 387 | unsigned int cpu = smp_processor_id(); | 424 | unsigned int cpu = smp_processor_id(); |
| 388 | int mct_lx_irq; | ||
| 389 | 425 | ||
| 390 | mevt = this_cpu_ptr(&percpu_mct_tick); | 426 | mevt = this_cpu_ptr(&percpu_mct_tick); |
| 391 | mevt->evt = evt; | 427 | mevt->evt = evt; |
| @@ -406,21 +442,17 @@ static int __cpuinit exynos4_local_timer_setup(struct clock_event_device *evt) | |||
| 406 | 442 | ||
| 407 | if (mct_int_type == MCT_INT_SPI) { | 443 | if (mct_int_type == MCT_INT_SPI) { |
| 408 | if (cpu == 0) { | 444 | if (cpu == 0) { |
| 409 | mct_lx_irq = soc_is_exynos4210() ? EXYNOS4_IRQ_MCT_L0 : | ||
| 410 | EXYNOS5_IRQ_MCT_L0; | ||
| 411 | mct_tick0_event_irq.dev_id = mevt; | 445 | mct_tick0_event_irq.dev_id = mevt; |
| 412 | evt->irq = mct_lx_irq; | 446 | evt->irq = mct_irqs[MCT_L0_IRQ]; |
| 413 | setup_irq(mct_lx_irq, &mct_tick0_event_irq); | 447 | setup_irq(evt->irq, &mct_tick0_event_irq); |
| 414 | } else { | 448 | } else { |
| 415 | mct_lx_irq = soc_is_exynos4210() ? EXYNOS4_IRQ_MCT_L1 : | ||
| 416 | EXYNOS5_IRQ_MCT_L1; | ||
| 417 | mct_tick1_event_irq.dev_id = mevt; | 449 | mct_tick1_event_irq.dev_id = mevt; |
| 418 | evt->irq = mct_lx_irq; | 450 | evt->irq = mct_irqs[MCT_L1_IRQ]; |
| 419 | setup_irq(mct_lx_irq, &mct_tick1_event_irq); | 451 | setup_irq(evt->irq, &mct_tick1_event_irq); |
| 420 | irq_set_affinity(mct_lx_irq, cpumask_of(1)); | 452 | irq_set_affinity(evt->irq, cpumask_of(1)); |
| 421 | } | 453 | } |
| 422 | } else { | 454 | } else { |
| 423 | enable_percpu_irq(EXYNOS_IRQ_MCT_LOCALTIMER, 0); | 455 | enable_percpu_irq(mct_irqs[MCT_L0_IRQ], 0); |
| 424 | } | 456 | } |
| 425 | 457 | ||
| 426 | return 0; | 458 | return 0; |
| @@ -436,7 +468,7 @@ static void exynos4_local_timer_stop(struct clock_event_device *evt) | |||
| 436 | else | 468 | else |
| 437 | remove_irq(evt->irq, &mct_tick1_event_irq); | 469 | remove_irq(evt->irq, &mct_tick1_event_irq); |
| 438 | else | 470 | else |
| 439 | disable_percpu_irq(EXYNOS_IRQ_MCT_LOCALTIMER); | 471 | disable_percpu_irq(mct_irqs[MCT_L0_IRQ]); |
| 440 | } | 472 | } |
| 441 | 473 | ||
| 442 | static struct local_timer_ops exynos4_mct_tick_ops __cpuinitdata = { | 474 | static struct local_timer_ops exynos4_mct_tick_ops __cpuinitdata = { |
| @@ -445,41 +477,82 @@ static struct local_timer_ops exynos4_mct_tick_ops __cpuinitdata = { | |||
| 445 | }; | 477 | }; |
| 446 | #endif /* CONFIG_LOCAL_TIMERS */ | 478 | #endif /* CONFIG_LOCAL_TIMERS */ |
| 447 | 479 | ||
| 448 | static void __init exynos4_timer_resources(void) | 480 | static void __init exynos4_timer_resources(struct device_node *np) |
| 449 | { | 481 | { |
| 450 | struct clk *mct_clk; | 482 | struct clk *mct_clk, *tick_clk; |
| 451 | mct_clk = clk_get(NULL, "xtal"); | 483 | |
| 484 | tick_clk = np ? of_clk_get_by_name(np, "fin_pll") : | ||
| 485 | clk_get(NULL, "fin_pll"); | ||
| 486 | if (IS_ERR(tick_clk)) | ||
| 487 | panic("%s: unable to determine tick clock rate\n", __func__); | ||
| 488 | clk_rate = clk_get_rate(tick_clk); | ||
| 489 | |||
| 490 | mct_clk = np ? of_clk_get_by_name(np, "mct") : clk_get(NULL, "mct"); | ||
| 491 | if (IS_ERR(mct_clk)) | ||
| 492 | panic("%s: unable to retrieve mct clock instance\n", __func__); | ||
| 493 | clk_prepare_enable(mct_clk); | ||
| 452 | 494 | ||
| 453 | clk_rate = clk_get_rate(mct_clk); | 495 | reg_base = np ? of_iomap(np, 0) : S5P_VA_SYSTIMER; |
| 496 | if (!reg_base) | ||
| 497 | panic("%s: unable to ioremap mct address space\n", __func__); | ||
| 454 | 498 | ||
| 455 | #ifdef CONFIG_LOCAL_TIMERS | 499 | #ifdef CONFIG_LOCAL_TIMERS |
| 456 | if (mct_int_type == MCT_INT_PPI) { | 500 | if (mct_int_type == MCT_INT_PPI) { |
| 457 | int err; | 501 | int err; |
| 458 | 502 | ||
| 459 | err = request_percpu_irq(EXYNOS_IRQ_MCT_LOCALTIMER, | 503 | err = request_percpu_irq(mct_irqs[MCT_L0_IRQ], |
| 460 | exynos4_mct_tick_isr, "MCT", | 504 | exynos4_mct_tick_isr, "MCT", |
| 461 | &percpu_mct_tick); | 505 | &percpu_mct_tick); |
| 462 | WARN(err, "MCT: can't request IRQ %d (%d)\n", | 506 | WARN(err, "MCT: can't request IRQ %d (%d)\n", |
| 463 | EXYNOS_IRQ_MCT_LOCALTIMER, err); | 507 | mct_irqs[MCT_L0_IRQ], err); |
| 464 | } | 508 | } |
| 465 | 509 | ||
| 466 | local_timer_register(&exynos4_mct_tick_ops); | 510 | local_timer_register(&exynos4_mct_tick_ops); |
| 467 | #endif /* CONFIG_LOCAL_TIMERS */ | 511 | #endif /* CONFIG_LOCAL_TIMERS */ |
| 468 | } | 512 | } |
| 469 | 513 | ||
| 470 | void __init exynos4_timer_init(void) | 514 | static const struct of_device_id exynos_mct_ids[] = { |
| 471 | { | 515 | { .compatible = "samsung,exynos4210-mct", .data = (void *)MCT_INT_SPI }, |
| 472 | if (soc_is_exynos5440()) { | 516 | { .compatible = "samsung,exynos4412-mct", .data = (void *)MCT_INT_PPI }, |
| 473 | arch_timer_of_register(); | 517 | }; |
| 474 | return; | ||
| 475 | } | ||
| 476 | 518 | ||
| 477 | if ((soc_is_exynos4210()) || (soc_is_exynos5250())) | 519 | void __init mct_init(void) |
| 520 | { | ||
| 521 | struct device_node *np = NULL; | ||
| 522 | const struct of_device_id *match; | ||
| 523 | u32 nr_irqs, i; | ||
| 524 | |||
| 525 | #ifdef CONFIG_OF | ||
| 526 | np = of_find_matching_node_and_match(NULL, exynos_mct_ids, &match); | ||
| 527 | #endif | ||
| 528 | if (np) { | ||
| 529 | mct_int_type = (u32)(match->data); | ||
| 530 | |||
| 531 | /* This driver uses only one global timer interrupt */ | ||
| 532 | mct_irqs[MCT_G0_IRQ] = irq_of_parse_and_map(np, MCT_G0_IRQ); | ||
| 533 | |||
| 534 | /* | ||
| 535 | * Find out the number of local irqs specified. The local | ||
| 536 | * timer irqs are specified after the four global timer | ||
| 537 | * irqs are specified. | ||
| 538 | */ | ||
| 539 | #ifdef CONFIG_OF | ||
| 540 | nr_irqs = of_irq_count(np); | ||
| 541 | #endif | ||
| 542 | for (i = MCT_L0_IRQ; i < nr_irqs; i++) | ||
| 543 | mct_irqs[i] = irq_of_parse_and_map(np, i); | ||
| 544 | } else if (soc_is_exynos4210()) { | ||
| 545 | mct_irqs[MCT_G0_IRQ] = EXYNOS4_IRQ_MCT_G0; | ||
| 546 | mct_irqs[MCT_L0_IRQ] = EXYNOS4_IRQ_MCT_L0; | ||
| 547 | mct_irqs[MCT_L1_IRQ] = EXYNOS4_IRQ_MCT_L1; | ||
| 478 | mct_int_type = MCT_INT_SPI; | 548 | mct_int_type = MCT_INT_SPI; |
| 479 | else | 549 | } else { |
| 480 | mct_int_type = MCT_INT_PPI; | 550 | panic("unable to determine mct controller type\n"); |
| 551 | } | ||
| 481 | 552 | ||
| 482 | exynos4_timer_resources(); | 553 | exynos4_timer_resources(np); |
| 483 | exynos4_clocksource_init(); | 554 | exynos4_clocksource_init(); |
| 484 | exynos4_clockevent_init(); | 555 | exynos4_clockevent_init(); |
| 485 | } | 556 | } |
| 557 | CLOCKSOURCE_OF_DECLARE(exynos4210, "samsung,exynos4210-mct", mct_init) | ||
| 558 | CLOCKSOURCE_OF_DECLARE(exynos4412, "samsung,exynos4412-mct", mct_init) | ||
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 63fb265e0da6..8d6794cdf899 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c | |||
| @@ -25,14 +25,93 @@ | |||
| 25 | 25 | ||
| 26 | #include <mach/dma.h> | 26 | #include <mach/dma.h> |
| 27 | 27 | ||
| 28 | #include <mach/regs-sdi.h> | ||
| 29 | |||
| 30 | #include <linux/platform_data/mmc-s3cmci.h> | 28 | #include <linux/platform_data/mmc-s3cmci.h> |
| 31 | 29 | ||
| 32 | #include "s3cmci.h" | 30 | #include "s3cmci.h" |
| 33 | 31 | ||
| 34 | #define DRIVER_NAME "s3c-mci" | 32 | #define DRIVER_NAME "s3c-mci" |
| 35 | 33 | ||
| 34 | #define S3C2410_SDICON (0x00) | ||
| 35 | #define S3C2410_SDIPRE (0x04) | ||
| 36 | #define S3C2410_SDICMDARG (0x08) | ||
| 37 | #define S3C2410_SDICMDCON (0x0C) | ||
| 38 | #define S3C2410_SDICMDSTAT (0x10) | ||
| 39 | #define S3C2410_SDIRSP0 (0x14) | ||
| 40 | #define S3C2410_SDIRSP1 (0x18) | ||
| 41 | #define S3C2410_SDIRSP2 (0x1C) | ||
| 42 | #define S3C2410_SDIRSP3 (0x20) | ||
| 43 | #define S3C2410_SDITIMER (0x24) | ||
| 44 | #define S3C2410_SDIBSIZE (0x28) | ||
| 45 | #define S3C2410_SDIDCON (0x2C) | ||
| 46 | #define S3C2410_SDIDCNT (0x30) | ||
| 47 | #define S3C2410_SDIDSTA (0x34) | ||
| 48 | #define S3C2410_SDIFSTA (0x38) | ||
| 49 | |||
| 50 | #define S3C2410_SDIDATA (0x3C) | ||
| 51 | #define S3C2410_SDIIMSK (0x40) | ||
| 52 | |||
| 53 | #define S3C2440_SDIDATA (0x40) | ||
| 54 | #define S3C2440_SDIIMSK (0x3C) | ||
| 55 | |||
| 56 | #define S3C2440_SDICON_SDRESET (1 << 8) | ||
| 57 | #define S3C2410_SDICON_SDIOIRQ (1 << 3) | ||
| 58 | #define S3C2410_SDICON_FIFORESET (1 << 1) | ||
| 59 | #define S3C2410_SDICON_CLOCKTYPE (1 << 0) | ||
| 60 | |||
| 61 | #define S3C2410_SDICMDCON_LONGRSP (1 << 10) | ||
| 62 | #define S3C2410_SDICMDCON_WAITRSP (1 << 9) | ||
| 63 | #define S3C2410_SDICMDCON_CMDSTART (1 << 8) | ||
| 64 | #define S3C2410_SDICMDCON_SENDERHOST (1 << 6) | ||
| 65 | #define S3C2410_SDICMDCON_INDEX (0x3f) | ||
| 66 | |||
| 67 | #define S3C2410_SDICMDSTAT_CRCFAIL (1 << 12) | ||
| 68 | #define S3C2410_SDICMDSTAT_CMDSENT (1 << 11) | ||
| 69 | #define S3C2410_SDICMDSTAT_CMDTIMEOUT (1 << 10) | ||
| 70 | #define S3C2410_SDICMDSTAT_RSPFIN (1 << 9) | ||
| 71 | |||
| 72 | #define S3C2440_SDIDCON_DS_WORD (2 << 22) | ||
| 73 | #define S3C2410_SDIDCON_TXAFTERRESP (1 << 20) | ||
| 74 | #define S3C2410_SDIDCON_RXAFTERCMD (1 << 19) | ||
| 75 | #define S3C2410_SDIDCON_BLOCKMODE (1 << 17) | ||
| 76 | #define S3C2410_SDIDCON_WIDEBUS (1 << 16) | ||
| 77 | #define S3C2410_SDIDCON_DMAEN (1 << 15) | ||
| 78 | #define S3C2410_SDIDCON_STOP (1 << 14) | ||
| 79 | #define S3C2440_SDIDCON_DATSTART (1 << 14) | ||
| 80 | |||
| 81 | #define S3C2410_SDIDCON_XFER_RXSTART (2 << 12) | ||
| 82 | #define S3C2410_SDIDCON_XFER_TXSTART (3 << 12) | ||
| 83 | |||
| 84 | #define S3C2410_SDIDCON_BLKNUM_MASK (0xFFF) | ||
| 85 | |||
| 86 | #define S3C2410_SDIDSTA_SDIOIRQDETECT (1 << 9) | ||
| 87 | #define S3C2410_SDIDSTA_FIFOFAIL (1 << 8) | ||
| 88 | #define S3C2410_SDIDSTA_CRCFAIL (1 << 7) | ||
| 89 | #define S3C2410_SDIDSTA_RXCRCFAIL (1 << 6) | ||
| 90 | #define S3C2410_SDIDSTA_DATATIMEOUT (1 << 5) | ||
| 91 | #define S3C2410_SDIDSTA_XFERFINISH (1 << 4) | ||
| 92 | #define S3C2410_SDIDSTA_TXDATAON (1 << 1) | ||
| 93 | #define S3C2410_SDIDSTA_RXDATAON (1 << 0) | ||
| 94 | |||
| 95 | #define S3C2440_SDIFSTA_FIFORESET (1 << 16) | ||
| 96 | #define S3C2440_SDIFSTA_FIFOFAIL (3 << 14) | ||
| 97 | #define S3C2410_SDIFSTA_TFDET (1 << 13) | ||
| 98 | #define S3C2410_SDIFSTA_RFDET (1 << 12) | ||
| 99 | #define S3C2410_SDIFSTA_COUNTMASK (0x7f) | ||
| 100 | |||
| 101 | #define S3C2410_SDIIMSK_RESPONSECRC (1 << 17) | ||
| 102 | #define S3C2410_SDIIMSK_CMDSENT (1 << 16) | ||
| 103 | #define S3C2410_SDIIMSK_CMDTIMEOUT (1 << 15) | ||
| 104 | #define S3C2410_SDIIMSK_RESPONSEND (1 << 14) | ||
| 105 | #define S3C2410_SDIIMSK_SDIOIRQ (1 << 12) | ||
| 106 | #define S3C2410_SDIIMSK_FIFOFAIL (1 << 11) | ||
| 107 | #define S3C2410_SDIIMSK_CRCSTATUS (1 << 10) | ||
| 108 | #define S3C2410_SDIIMSK_DATACRC (1 << 9) | ||
| 109 | #define S3C2410_SDIIMSK_DATATIMEOUT (1 << 8) | ||
| 110 | #define S3C2410_SDIIMSK_DATAFINISH (1 << 7) | ||
| 111 | #define S3C2410_SDIIMSK_TXFIFOHALF (1 << 4) | ||
| 112 | #define S3C2410_SDIIMSK_RXFIFOLAST (1 << 2) | ||
| 113 | #define S3C2410_SDIIMSK_RXFIFOHALF (1 << 0) | ||
| 114 | |||
| 36 | enum dbg_channels { | 115 | enum dbg_channels { |
| 37 | dbg_err = (1 << 0), | 116 | dbg_err = (1 << 0), |
| 38 | dbg_debug = (1 << 1), | 117 | dbg_debug = (1 << 1), |
