Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: mx5: Replace clk_register_clkdev with clock DT lookup

Similarly as it was done for mx6q, use a DT lookup in order to make maintainance
task for the clock devices easier.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

authored by

Fabio Estevam and committed by
Sascha Hauer
f40f38d1 d6aef84a

+293 -70
+191
Documentation/devicetree/bindings/clock/imx5-clock.txt
··· 1 + * Clock bindings for Freescale i.MX5 2 + 3 + Required properties: 4 + - compatible: Should be "fsl,<soc>-ccm" , where <soc> can be imx51 or imx53 5 + - reg: Address and length of the register set 6 + - interrupts: Should contain CCM interrupt 7 + - #clock-cells: Should be <1> 8 + 9 + The clock consumer should specify the desired clock by having the clock 10 + ID in its "clocks" phandle cell. The following is a full list of i.MX5 11 + clocks and IDs. 12 + 13 + Clock ID 14 + --------------------------- 15 + dummy 0 16 + ckil 1 17 + osc 2 18 + ckih1 3 19 + ckih2 4 20 + ahb 5 21 + ipg 6 22 + axi_a 7 23 + axi_b 8 24 + uart_pred 9 25 + uart_root 10 26 + esdhc_a_pred 11 27 + esdhc_b_pred 12 28 + esdhc_c_s 13 29 + esdhc_d_s 14 30 + emi_sel 15 31 + emi_slow_podf 16 32 + nfc_podf 17 33 + ecspi_pred 18 34 + ecspi_podf 19 35 + usboh3_pred 20 36 + usboh3_podf 21 37 + usb_phy_pred 22 38 + usb_phy_podf 23 39 + cpu_podf 24 40 + di_pred 25 41 + tve_di 26 42 + tve_s 27 43 + uart1_ipg_gate 28 44 + uart1_per_gate 29 45 + uart2_ipg_gate 30 46 + uart2_per_gate 31 47 + uart3_ipg_gate 32 48 + uart3_per_gate 33 49 + i2c1_gate 34 50 + i2c2_gate 35 51 + gpt_ipg_gate 36 52 + pwm1_ipg_gate 37 53 + pwm1_hf_gate 38 54 + pwm2_ipg_gate 39 55 + pwm2_hf_gate 40 56 + gpt_hf_gate 41 57 + fec_gate 42 58 + usboh3_per_gate 43 59 + esdhc1_ipg_gate 44 60 + esdhc2_ipg_gate 45 61 + esdhc3_ipg_gate 46 62 + esdhc4_ipg_gate 47 63 + ssi1_ipg_gate 48 64 + ssi2_ipg_gate 49 65 + ssi3_ipg_gate 50 66 + ecspi1_ipg_gate 51 67 + ecspi1_per_gate 52 68 + ecspi2_ipg_gate 53 69 + ecspi2_per_gate 54 70 + cspi_ipg_gate 55 71 + sdma_gate 56 72 + emi_slow_gate 57 73 + ipu_s 58 74 + ipu_gate 59 75 + nfc_gate 60 76 + ipu_di1_gate 61 77 + vpu_s 62 78 + vpu_gate 63 79 + vpu_reference_gate 64 80 + uart4_ipg_gate 65 81 + uart4_per_gate 66 82 + uart5_ipg_gate 67 83 + uart5_per_gate 68 84 + tve_gate 69 85 + tve_pred 70 86 + esdhc1_per_gate 71 87 + esdhc2_per_gate 72 88 + esdhc3_per_gate 73 89 + esdhc4_per_gate 74 90 + usb_phy_gate 75 91 + hsi2c_gate 76 92 + mipi_hsc1_gate 77 93 + mipi_hsc2_gate 78 94 + mipi_esc_gate 79 95 + mipi_hsp_gate 80 96 + ldb_di1_div_3_5 81 97 + ldb_di1_div 82 98 + ldb_di0_div_3_5 83 99 + ldb_di0_div 84 100 + ldb_di1_gate 85 101 + can2_serial_gate 86 102 + can2_ipg_gate 87 103 + i2c3_gate 88 104 + lp_apm 89 105 + periph_apm 90 106 + main_bus 91 107 + ahb_max 92 108 + aips_tz1 93 109 + aips_tz2 94 110 + tmax1 95 111 + tmax2 96 112 + tmax3 97 113 + spba 98 114 + uart_sel 99 115 + esdhc_a_sel 100 116 + esdhc_b_sel 101 117 + esdhc_a_podf 102 118 + esdhc_b_podf 103 119 + ecspi_sel 104 120 + usboh3_sel 105 121 + usb_phy_sel 106 122 + iim_gate 107 123 + usboh3_gate 108 124 + emi_fast_gate 109 125 + ipu_di0_gate 110 126 + gpc_dvfs 111 127 + pll1_sw 112 128 + pll2_sw 113 129 + pll3_sw 114 130 + ipu_di0_sel 115 131 + ipu_di1_sel 116 132 + tve_ext_sel 117 133 + mx51_mipi 118 134 + pll4_sw 119 135 + ldb_di1_sel 120 136 + di_pll4_podf 121 137 + ldb_di0_sel 122 138 + ldb_di0_gate 123 139 + usb_phy1_gate 124 140 + usb_phy2_gate 125 141 + per_lp_apm 126 142 + per_pred1 127 143 + per_pred2 128 144 + per_podf 129 145 + per_root 130 146 + ssi_apm 131 147 + ssi1_root_sel 132 148 + ssi2_root_sel 133 149 + ssi3_root_sel 134 150 + ssi_ext1_sel 135 151 + ssi_ext2_sel 136 152 + ssi_ext1_com_sel 137 153 + ssi_ext2_com_sel 138 154 + ssi1_root_pred 139 155 + ssi1_root_podf 140 156 + ssi2_root_pred 141 157 + ssi2_root_podf 142 158 + ssi_ext1_pred 143 159 + ssi_ext1_podf 144 160 + ssi_ext2_pred 145 161 + ssi_ext2_podf 146 162 + ssi1_root_gate 147 163 + ssi2_root_gate 148 164 + ssi3_root_gate 149 165 + ssi_ext1_gate 150 166 + ssi_ext2_gate 151 167 + epit1_ipg_gate 152 168 + epit1_hf_gate 153 169 + epit2_ipg_gate 154 170 + epit2_hf_gate 155 171 + can_sel 156 172 + can1_serial_gate 157 173 + can1_ipg_gate 158 174 + 175 + Examples (for mx53): 176 + 177 + clks: ccm@53fd4000{ 178 + compatible = "fsl,imx53-ccm"; 179 + reg = <0x53fd4000 0x4000>; 180 + interrupts = <0 71 0x04 0 72 0x04>; 181 + #clock-cells = <1>; 182 + }; 183 + 184 + can1: can@53fc8000 { 185 + compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; 186 + reg = <0x53fc8000 0x4000>; 187 + interrupts = <82>; 188 + clocks = <&clks 158>, <&clks 157>; 189 + clock-names = "ipg", "per"; 190 + status = "disabled"; 191 + };
+39
arch/arm/boot/dts/imx51.dtsi
··· 87 87 compatible = "fsl,imx51-esdhc"; 88 88 reg = <0x70004000 0x4000>; 89 89 interrupts = <1>; 90 + clocks = <&clks 44>, <&clks 0>, <&clks 71>; 91 + clock-names = "ipg", "ahb", "per"; 90 92 status = "disabled"; 91 93 }; 92 94 ··· 96 94 compatible = "fsl,imx51-esdhc"; 97 95 reg = <0x70008000 0x4000>; 98 96 interrupts = <2>; 97 + clocks = <&clks 45>, <&clks 0>, <&clks 72>; 98 + clock-names = "ipg", "ahb", "per"; 99 99 status = "disabled"; 100 100 }; 101 101 ··· 105 101 compatible = "fsl,imx51-uart", "fsl,imx21-uart"; 106 102 reg = <0x7000c000 0x4000>; 107 103 interrupts = <33>; 104 + clocks = <&clks 32>, <&clks 33>; 105 + clock-names = "ipg", "per"; 108 106 status = "disabled"; 109 107 }; 110 108 ··· 116 110 compatible = "fsl,imx51-ecspi"; 117 111 reg = <0x70010000 0x4000>; 118 112 interrupts = <36>; 113 + clocks = <&clks 51>, <&clks 52>; 114 + clock-names = "ipg", "per"; 119 115 status = "disabled"; 120 116 }; 121 117 ··· 125 117 compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; 126 118 reg = <0x70014000 0x4000>; 127 119 interrupts = <30>; 120 + clocks = <&clks 49>; 128 121 fsl,fifo-depth = <15>; 129 122 fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */ 130 123 status = "disabled"; ··· 135 126 compatible = "fsl,imx51-esdhc"; 136 127 reg = <0x70020000 0x4000>; 137 128 interrupts = <3>; 129 + clocks = <&clks 46>, <&clks 0>, <&clks 73>; 130 + clock-names = "ipg", "ahb", "per"; 138 131 status = "disabled"; 139 132 }; 140 133 ··· 144 133 compatible = "fsl,imx51-esdhc"; 145 134 reg = <0x70024000 0x4000>; 146 135 interrupts = <4>; 136 + clocks = <&clks 47>, <&clks 0>, <&clks 74>; 137 + clock-names = "ipg", "ahb", "per"; 147 138 status = "disabled"; 148 139 }; 149 140 }; ··· 222 209 compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; 223 210 reg = <0x73f98000 0x4000>; 224 211 interrupts = <58>; 212 + clocks = <&clks 0>; 225 213 }; 226 214 227 215 wdog@73f9c000 { /* WDOG2 */ 228 216 compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; 229 217 reg = <0x73f9c000 0x4000>; 230 218 interrupts = <59>; 219 + clocks = <&clks 0>; 231 220 status = "disabled"; 232 221 }; 233 222 ··· 413 398 compatible = "fsl,imx51-uart", "fsl,imx21-uart"; 414 399 reg = <0x73fbc000 0x4000>; 415 400 interrupts = <31>; 401 + clocks = <&clks 28>, <&clks 29>; 402 + clock-names = "ipg", "per"; 416 403 status = "disabled"; 417 404 }; 418 405 ··· 422 405 compatible = "fsl,imx51-uart", "fsl,imx21-uart"; 423 406 reg = <0x73fc0000 0x4000>; 424 407 interrupts = <32>; 408 + clocks = <&clks 30>, <&clks 31>; 409 + clock-names = "ipg", "per"; 425 410 status = "disabled"; 411 + }; 412 + 413 + clks: ccm@73fd4000{ 414 + compatible = "fsl,imx51-ccm"; 415 + reg = <0x73fd4000 0x4000>; 416 + interrupts = <0 71 0x04 0 72 0x04>; 417 + #clock-cells = <1>; 426 418 }; 427 419 }; 428 420 ··· 448 422 compatible = "fsl,imx51-ecspi"; 449 423 reg = <0x83fac000 0x4000>; 450 424 interrupts = <37>; 425 + clocks = <&clks 53>, <&clks 54>; 426 + clock-names = "ipg", "per"; 451 427 status = "disabled"; 452 428 }; 453 429 ··· 457 429 compatible = "fsl,imx51-sdma", "fsl,imx35-sdma"; 458 430 reg = <0x83fb0000 0x4000>; 459 431 interrupts = <6>; 432 + clocks = <&clks 56>, <&clks 56>; 433 + clock-names = "ipg", "ahb"; 460 434 fsl,sdma-ram-script-name = "imx/sdma/sdma-imx51.bin"; 461 435 }; 462 436 ··· 468 438 compatible = "fsl,imx51-cspi", "fsl,imx35-cspi"; 469 439 reg = <0x83fc0000 0x4000>; 470 440 interrupts = <38>; 441 + clocks = <&clks 55>, <&clks 0>; 442 + clock-names = "ipg", "per"; 471 443 status = "disabled"; 472 444 }; 473 445 ··· 479 447 compatible = "fsl,imx51-i2c", "fsl,imx21-i2c"; 480 448 reg = <0x83fc4000 0x4000>; 481 449 interrupts = <63>; 450 + clocks = <&clks 35>; 482 451 status = "disabled"; 483 452 }; 484 453 ··· 489 456 compatible = "fsl,imx51-i2c", "fsl,imx21-i2c"; 490 457 reg = <0x83fc8000 0x4000>; 491 458 interrupts = <62>; 459 + clocks = <&clks 34>; 492 460 status = "disabled"; 493 461 }; 494 462 ··· 497 463 compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; 498 464 reg = <0x83fcc000 0x4000>; 499 465 interrupts = <29>; 466 + clocks = <&clks 48>; 500 467 fsl,fifo-depth = <15>; 501 468 fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */ 502 469 status = "disabled"; ··· 513 478 compatible = "fsl,imx51-nand"; 514 479 reg = <0x83fdb000 0x1000 0xcfff0000 0x10000>; 515 480 interrupts = <8>; 481 + clocks = <&clks 60>; 516 482 status = "disabled"; 517 483 }; 518 484 ··· 521 485 compatible = "fsl,imx51-ssi", "fsl,imx21-ssi"; 522 486 reg = <0x83fe8000 0x4000>; 523 487 interrupts = <96>; 488 + clocks = <&clks 50>; 524 489 fsl,fifo-depth = <15>; 525 490 fsl,ssi-dma-events = <47 46 37 35>; /* TX0 RX0 TX1 RX1 */ 526 491 status = "disabled"; ··· 531 494 compatible = "fsl,imx51-fec", "fsl,imx27-fec"; 532 495 reg = <0x83fec000 0x4000>; 533 496 interrupts = <87>; 497 + clocks = <&clks 42>, <&clks 42>, <&clks 42>; 498 + clock-names = "ipg", "ahb", "ptp"; 534 499 status = "disabled"; 535 500 }; 536 501 };
+48
arch/arm/boot/dts/imx53.dtsi
··· 92 92 compatible = "fsl,imx53-esdhc"; 93 93 reg = <0x50004000 0x4000>; 94 94 interrupts = <1>; 95 + clocks = <&clks 44>, <&clks 0>, <&clks 71>; 96 + clock-names = "ipg", "ahb", "per"; 95 97 status = "disabled"; 96 98 }; 97 99 ··· 101 99 compatible = "fsl,imx53-esdhc"; 102 100 reg = <0x50008000 0x4000>; 103 101 interrupts = <2>; 102 + clocks = <&clks 45>, <&clks 0>, <&clks 72>; 103 + clock-names = "ipg", "ahb", "per"; 104 104 status = "disabled"; 105 105 }; 106 106 ··· 110 106 compatible = "fsl,imx53-uart", "fsl,imx21-uart"; 111 107 reg = <0x5000c000 0x4000>; 112 108 interrupts = <33>; 109 + clocks = <&clks 32>, <&clks 33>; 110 + clock-names = "ipg", "per"; 113 111 status = "disabled"; 114 112 }; 115 113 ··· 121 115 compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi"; 122 116 reg = <0x50010000 0x4000>; 123 117 interrupts = <36>; 118 + clocks = <&clks 51>, <&clks 52>; 119 + clock-names = "ipg", "per"; 124 120 status = "disabled"; 125 121 }; 126 122 ··· 130 122 compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; 131 123 reg = <0x50014000 0x4000>; 132 124 interrupts = <30>; 125 + clocks = <&clks 49>; 133 126 fsl,fifo-depth = <15>; 134 127 fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */ 135 128 status = "disabled"; ··· 140 131 compatible = "fsl,imx53-esdhc"; 141 132 reg = <0x50020000 0x4000>; 142 133 interrupts = <3>; 134 + clocks = <&clks 46>, <&clks 0>, <&clks 73>; 135 + clock-names = "ipg", "ahb", "per"; 143 136 status = "disabled"; 144 137 }; 145 138 ··· 149 138 compatible = "fsl,imx53-esdhc"; 150 139 reg = <0x50024000 0x4000>; 151 140 interrupts = <4>; 141 + clocks = <&clks 47>, <&clks 0>, <&clks 74>; 142 + clock-names = "ipg", "ahb", "per"; 152 143 status = "disabled"; 153 144 }; 154 145 }; ··· 227 214 compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; 228 215 reg = <0x53f98000 0x4000>; 229 216 interrupts = <58>; 217 + clocks = <&clks 0>; 230 218 }; 231 219 232 220 wdog@53f9c000 { /* WDOG2 */ 233 221 compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; 234 222 reg = <0x53f9c000 0x4000>; 235 223 interrupts = <59>; 224 + clocks = <&clks 0>; 236 225 status = "disabled"; 237 226 }; 238 227 ··· 397 382 compatible = "fsl,imx53-uart", "fsl,imx21-uart"; 398 383 reg = <0x53fbc000 0x4000>; 399 384 interrupts = <31>; 385 + clocks = <&clks 28>, <&clks 29>; 386 + clock-names = "ipg", "per"; 400 387 status = "disabled"; 401 388 }; 402 389 ··· 406 389 compatible = "fsl,imx53-uart", "fsl,imx21-uart"; 407 390 reg = <0x53fc0000 0x4000>; 408 391 interrupts = <32>; 392 + clocks = <&clks 30>, <&clks 31>; 393 + clock-names = "ipg", "per"; 409 394 status = "disabled"; 410 395 }; 411 396 ··· 415 396 compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; 416 397 reg = <0x53fc8000 0x4000>; 417 398 interrupts = <82>; 399 + clocks = <&clks 158>, <&clks 157>; 400 + clock-names = "ipg", "per"; 418 401 status = "disabled"; 419 402 }; 420 403 ··· 424 403 compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; 425 404 reg = <0x53fcc000 0x4000>; 426 405 interrupts = <83>; 406 + clocks = <&clks 158>, <&clks 157>; 407 + clock-names = "ipg", "per"; 427 408 status = "disabled"; 409 + }; 410 + 411 + clks: ccm@53fd4000{ 412 + compatible = "fsl,imx53-ccm"; 413 + reg = <0x53fd4000 0x4000>; 414 + interrupts = <0 71 0x04 0 72 0x04>; 415 + #clock-cells = <1>; 428 416 }; 429 417 430 418 gpio5: gpio@53fdc000 { ··· 472 442 compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; 473 443 reg = <0x53fec000 0x4000>; 474 444 interrupts = <64>; 445 + clocks = <&clks 88>; 475 446 status = "disabled"; 476 447 }; 477 448 ··· 480 449 compatible = "fsl,imx53-uart", "fsl,imx21-uart"; 481 450 reg = <0x53ff0000 0x4000>; 482 451 interrupts = <13>; 452 + clocks = <&clks 65>, <&clks 66>; 453 + clock-names = "ipg", "per"; 483 454 status = "disabled"; 484 455 }; 485 456 }; ··· 497 464 compatible = "fsl,imx53-uart", "fsl,imx21-uart"; 498 465 reg = <0x63f90000 0x4000>; 499 466 interrupts = <86>; 467 + clocks = <&clks 67>, <&clks 68>; 468 + clock-names = "ipg", "per"; 500 469 status = "disabled"; 501 470 }; 502 471 ··· 508 473 compatible = "fsl,imx53-ecspi", "fsl,imx51-ecspi"; 509 474 reg = <0x63fac000 0x4000>; 510 475 interrupts = <37>; 476 + clocks = <&clks 53>, <&clks 54>; 477 + clock-names = "ipg", "per"; 511 478 status = "disabled"; 512 479 }; 513 480 ··· 517 480 compatible = "fsl,imx53-sdma", "fsl,imx35-sdma"; 518 481 reg = <0x63fb0000 0x4000>; 519 482 interrupts = <6>; 483 + clocks = <&clks 56>, <&clks 56>; 484 + clock-names = "ipg", "ahb"; 520 485 fsl,sdma-ram-script-name = "imx/sdma/sdma-imx53.bin"; 521 486 }; 522 487 ··· 528 489 compatible = "fsl,imx53-cspi", "fsl,imx35-cspi"; 529 490 reg = <0x63fc0000 0x4000>; 530 491 interrupts = <38>; 492 + clocks = <&clks 55>, <&clks 0>; 493 + clock-names = "ipg", "per"; 531 494 status = "disabled"; 532 495 }; 533 496 ··· 539 498 compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; 540 499 reg = <0x63fc4000 0x4000>; 541 500 interrupts = <63>; 501 + clocks = <&clks 35>; 542 502 status = "disabled"; 543 503 }; 544 504 ··· 549 507 compatible = "fsl,imx53-i2c", "fsl,imx21-i2c"; 550 508 reg = <0x63fc8000 0x4000>; 551 509 interrupts = <62>; 510 + clocks = <&clks 34>; 552 511 status = "disabled"; 553 512 }; 554 513 ··· 557 514 compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; 558 515 reg = <0x63fcc000 0x4000>; 559 516 interrupts = <29>; 517 + clocks = <&clks 48>; 560 518 fsl,fifo-depth = <15>; 561 519 fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */ 562 520 status = "disabled"; ··· 573 529 compatible = "fsl,imx53-nand"; 574 530 reg = <0x63fdb000 0x1000 0xf7ff0000 0x10000>; 575 531 interrupts = <8>; 532 + clocks = <&clks 60>; 576 533 status = "disabled"; 577 534 }; 578 535 ··· 581 536 compatible = "fsl,imx53-ssi", "fsl,imx21-ssi"; 582 537 reg = <0x63fe8000 0x4000>; 583 538 interrupts = <96>; 539 + clocks = <&clks 50>; 584 540 fsl,fifo-depth = <15>; 585 541 fsl,ssi-dma-events = <47 46 45 44>; /* TX0 RX0 TX1 RX1 */ 586 542 status = "disabled"; ··· 591 545 compatible = "fsl,imx53-fec", "fsl,imx25-fec"; 592 546 reg = <0x63fec000 0x4000>; 593 547 interrupts = <87>; 548 + clocks = <&clks 42>, <&clks 42>, <&clks 42>; 549 + clock-names = "ipg", "ahb", "ptp"; 594 550 status = "disabled"; 595 551 }; 596 552 };
+13 -13
arch/arm/mach-imx/clk-imx51-imx53.c
··· 87 87 }; 88 88 89 89 static struct clk *clk[clk_max]; 90 + static struct clk_onecell_data clk_data; 90 91 91 92 static void __init mx5_clocks_common_init(unsigned long rate_ckil, 92 93 unsigned long rate_osc, unsigned long rate_ckih1, ··· 319 318 unsigned long rate_ckih1, unsigned long rate_ckih2) 320 319 { 321 320 int i; 321 + struct device_node *np; 322 322 323 323 clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX51_DPLL1_BASE); 324 324 clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX51_DPLL2_BASE); ··· 348 346 pr_err("i.MX51 clk %d: register failed with %ld\n", 349 347 i, PTR_ERR(clk[i])); 350 348 349 + np = of_find_compatible_node(NULL, NULL, "fsl,imx51-ccm"); 350 + clk_data.clks = clk; 351 + clk_data.clk_num = ARRAY_SIZE(clk); 352 + of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); 353 + 351 354 mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); 352 355 353 356 clk_register_clkdev(clk[hsi2c_gate], NULL, "imx21-i2c.2"); ··· 375 368 clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx51.3"); 376 369 clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.3"); 377 370 clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx51.3"); 378 - clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "83fcc000.ssi"); 379 - clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "70014000.ssi"); 380 - clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "83fe8000.ssi"); 381 - clk_register_clkdev(clk[nfc_gate], NULL, "83fdb000.nand"); 382 371 383 372 /* set the usboh3 parent to pll2_sw */ 384 373 clk_set_parent(clk[usboh3_sel], clk[pll2_sw]); ··· 398 395 { 399 396 int i; 400 397 unsigned long r; 398 + struct device_node *np; 401 399 402 400 clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); 403 401 clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); ··· 443 439 pr_err("i.MX53 clk %d: register failed with %ld\n", 444 440 i, PTR_ERR(clk[i])); 445 441 442 + np = of_find_compatible_node(NULL, NULL, "fsl,imx53-ccm"); 443 + clk_data.clks = clk; 444 + clk_data.clk_num = ARRAY_SIZE(clk); 445 + of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); 446 + 446 447 mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); 447 448 448 449 clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); ··· 470 461 clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx53.3"); 471 462 clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.3"); 472 463 clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx53.3"); 473 - clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "63fcc000.ssi"); 474 - clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "50014000.ssi"); 475 - clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "63fd0000.ssi"); 476 - clk_register_clkdev(clk[nfc_gate], NULL, "63fdb000.nand"); 477 - clk_register_clkdev(clk[can1_ipg_gate], "ipg", "53fc8000.can"); 478 - clk_register_clkdev(clk[can1_serial_gate], "per", "53fc8000.can"); 479 - clk_register_clkdev(clk[can2_ipg_gate], "ipg", "53fcc000.can"); 480 - clk_register_clkdev(clk[can2_serial_gate], "per", "53fcc000.can"); 481 - clk_register_clkdev(clk[dummy], NULL, "53fa4000.rtc"); 482 464 483 465 /* set SDHC root clock to 200MHZ*/ 484 466 clk_set_rate(clk[esdhc_a_podf], 200000000);
+1 -27
arch/arm/mach-imx/imx51-dt.c
··· 19 19 #include "common.h" 20 20 #include "mx51.h" 21 21 22 - /* 23 - * Lookup table for attaching a specific name and platform_data pointer to 24 - * devices as they get created by of_platform_populate(). Ideally this table 25 - * would not exist, but the current clock implementation depends on some devices 26 - * having a specific name. 27 - */ 28 - static const struct of_dev_auxdata imx51_auxdata_lookup[] __initconst = { 29 - OF_DEV_AUXDATA("fsl,imx51-uart", MX51_UART1_BASE_ADDR, "imx21-uart.0", NULL), 30 - OF_DEV_AUXDATA("fsl,imx51-uart", MX51_UART2_BASE_ADDR, "imx21-uart.1", NULL), 31 - OF_DEV_AUXDATA("fsl,imx51-uart", MX51_UART3_BASE_ADDR, "imx21-uart.2", NULL), 32 - OF_DEV_AUXDATA("fsl,imx51-fec", MX51_FEC_BASE_ADDR, "imx27-fec.0", NULL), 33 - OF_DEV_AUXDATA("fsl,imx51-esdhc", MX51_ESDHC1_BASE_ADDR, "sdhci-esdhc-imx51.0", NULL), 34 - OF_DEV_AUXDATA("fsl,imx51-esdhc", MX51_ESDHC2_BASE_ADDR, "sdhci-esdhc-imx51.1", NULL), 35 - OF_DEV_AUXDATA("fsl,imx51-esdhc", MX51_ESDHC3_BASE_ADDR, "sdhci-esdhc-imx51.2", NULL), 36 - OF_DEV_AUXDATA("fsl,imx51-esdhc", MX51_ESDHC4_BASE_ADDR, "sdhci-esdhc-imx51.3", NULL), 37 - OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL), 38 - OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL), 39 - OF_DEV_AUXDATA("fsl,imx51-cspi", MX51_CSPI_BASE_ADDR, "imx35-cspi.0", NULL), 40 - OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C1_BASE_ADDR, "imx21-i2c.0", NULL), 41 - OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C2_BASE_ADDR, "imx21-i2c.1", NULL), 42 - OF_DEV_AUXDATA("fsl,imx51-sdma", MX51_SDMA_BASE_ADDR, "imx35-sdma", NULL), 43 - OF_DEV_AUXDATA("fsl,imx51-wdt", MX51_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL), 44 - { /* sentinel */ } 45 - }; 46 - 47 22 static void __init imx51_dt_init(void) 48 23 { 49 - of_platform_populate(NULL, of_default_bus_match_table, 50 - imx51_auxdata_lookup, NULL); 24 + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 51 25 } 52 26 53 27 static void __init imx51_timer_init(void)
+1 -30
arch/arm/mach-imx/mach-imx53.c
··· 23 23 #include "common.h" 24 24 #include "mx53.h" 25 25 26 - /* 27 - * Lookup table for attaching a specific name and platform_data pointer to 28 - * devices as they get created by of_platform_populate(). Ideally this table 29 - * would not exist, but the current clock implementation depends on some devices 30 - * having a specific name. 31 - */ 32 - static const struct of_dev_auxdata imx53_auxdata_lookup[] __initconst = { 33 - OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART1_BASE_ADDR, "imx21-uart.0", NULL), 34 - OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART2_BASE_ADDR, "imx21-uart.1", NULL), 35 - OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART3_BASE_ADDR, "imx21-uart.2", NULL), 36 - OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART4_BASE_ADDR, "imx21-uart.3", NULL), 37 - OF_DEV_AUXDATA("fsl,imx53-uart", MX53_UART5_BASE_ADDR, "imx21-uart.4", NULL), 38 - OF_DEV_AUXDATA("fsl,imx53-fec", MX53_FEC_BASE_ADDR, "imx25-fec.0", NULL), 39 - OF_DEV_AUXDATA("fsl,imx53-esdhc", MX53_ESDHC1_BASE_ADDR, "sdhci-esdhc-imx53.0", NULL), 40 - OF_DEV_AUXDATA("fsl,imx53-esdhc", MX53_ESDHC2_BASE_ADDR, "sdhci-esdhc-imx53.1", NULL), 41 - OF_DEV_AUXDATA("fsl,imx53-esdhc", MX53_ESDHC3_BASE_ADDR, "sdhci-esdhc-imx53.2", NULL), 42 - OF_DEV_AUXDATA("fsl,imx53-esdhc", MX53_ESDHC4_BASE_ADDR, "sdhci-esdhc-imx53.3", NULL), 43 - OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL), 44 - OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL), 45 - OF_DEV_AUXDATA("fsl,imx53-cspi", MX53_CSPI_BASE_ADDR, "imx35-cspi.0", NULL), 46 - OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C1_BASE_ADDR, "imx21-i2c.0", NULL), 47 - OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C2_BASE_ADDR, "imx21-i2c.1", NULL), 48 - OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C3_BASE_ADDR, "imx21-i2c.2", NULL), 49 - OF_DEV_AUXDATA("fsl,imx53-sdma", MX53_SDMA_BASE_ADDR, "imx35-sdma", NULL), 50 - OF_DEV_AUXDATA("fsl,imx53-wdt", MX53_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL), 51 - { /* sentinel */ } 52 - }; 53 - 54 26 static void __init imx53_qsb_init(void) 55 27 { 56 28 struct clk *clk; ··· 41 69 if (of_machine_is_compatible("fsl,imx53-qsb")) 42 70 imx53_qsb_init(); 43 71 44 - of_platform_populate(NULL, of_default_bus_match_table, 45 - imx53_auxdata_lookup, NULL); 72 + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 46 73 } 47 74 48 75 static void __init imx53_timer_init(void)