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

Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull late ARM SoC updates from Kevin Hilman:
"This is a collection of a few late fixes and other misc stuff that had
dependencies on things being merged from other trees.

The bulk of the changes are for samsung/exynos SoCs for some changes
that needed a few minor reworks so ended up a bit late. The others
are mainly for qcom SoCs: a couple fixes and some DTS updates"

* tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (37 commits)
ARM: multi_v7_defconfig: Enable PBIAS regulator
soc: qcom: smd: Correct fBLOCKREADINTR handling
soc: qcom: smd: Use correct remote processor ID
soc: qcom: smem: Fix errant private access
ARM: dts: qcom: msm8974-sony-xperia-honami: Use stdout-path
ARM: dts: qcom: msm8960-cdp: Use stdout-path
ARM: dts: qcom: msm8660-surf: Use stdout-path
ARM: dts: qcom: ipq8064-ap148: Use stdout-path
ARM: dts: qcom: apq8084-mtp: Use stdout-path
ARM: dts: qcom: apq8084-ifc6540: Use stdout-path
ARM: dts: qcom: apq8074-dragonboard: Use stdout-path
ARM: dts: qcom: apq8064-ifc6410: Use stdout-path
ARM: dts: qcom: apq8064-cm-qs600: Use stdout-path
ARM: dts: qcom: Label serial nodes for aliasing and stdout-path
reset: ath79: Fix missing spin_lock_init
reset: Add (devm_)reset_control_get stub functions
ARM: EXYNOS: switch to using generic cpufreq driver for exynos4x12
cpufreq: exynos: Remove unselectable rule for arm-exynos-cpufreq.o
ARM: dts: add iommu property to JPEG device for exynos4
ARM: dts: enable SPI1 for exynos4412-odroidu3
...

+540 -853
+6
Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt
··· 37 37 Definition: the identifier of the remote processor in the smd channel 38 38 allocation table 39 39 40 + - qcom,remote-pid: 41 + Usage: optional 42 + Value type: <u32> 43 + Definition: the identifier for the remote processor as known by the rest 44 + of the system. 45 + 40 46 = SMD DEVICES 41 47 42 48 In turn, subnodes of the "edges" represent devices tied to SMD channels on that
+19
arch/arm/boot/dts/exynos3250-monk.dts
··· 116 116 min-microvolt = <1100000>; 117 117 max-microvolt = <2700000>; 118 118 }; 119 + 120 + thermal-zones { 121 + cpu_thermal: cpu-thermal { 122 + cooling-maps { 123 + map0 { 124 + /* Correspond to 500MHz at freq_table */ 125 + cooling-device = <&cpu0 5 5>; 126 + }; 127 + map1 { 128 + /* Correspond to 200MHz at freq_table */ 129 + cooling-device = <&cpu0 8 8>; 130 + }; 131 + }; 132 + }; 133 + }; 119 134 }; 120 135 121 136 &adc { ··· 154 139 pulldown-ohm = <100000>; 155 140 io-channels = <&adc 1>; 156 141 }; 142 + }; 143 + 144 + &cpu0 { 145 + cpu0-supply = <&buck2_reg>; 157 146 }; 158 147 159 148 &exynos_usbphy {
+19
arch/arm/boot/dts/exynos3250-rinato.dts
··· 107 107 min-microvolt = <1100000>; 108 108 max-microvolt = <2700000>; 109 109 }; 110 + 111 + thermal-zones { 112 + cpu_thermal: cpu-thermal { 113 + cooling-maps { 114 + map0 { 115 + /* Corresponds to 500MHz */ 116 + cooling-device = <&cpu0 5 5>; 117 + }; 118 + map1 { 119 + /* Corresponds to 200MHz */ 120 + cooling-device = <&cpu0 8 8>; 121 + }; 122 + }; 123 + }; 124 + }; 110 125 }; 111 126 112 127 &adc { ··· 145 130 pulldown-ohm = <100000>; 146 131 io-channels = <&adc 1>; 147 132 }; 133 + }; 134 + 135 + &cpu0 { 136 + cpu0-supply = <&buck2_reg>; 148 137 }; 149 138 150 139 &exynos_usbphy {
+16
arch/arm/boot/dts/exynos3250.dtsi
··· 53 53 compatible = "arm,cortex-a7"; 54 54 reg = <0>; 55 55 clock-frequency = <1000000000>; 56 + clocks = <&cmu CLK_ARM_CLK>; 57 + clock-names = "cpu"; 58 + #cooling-cells = <2>; 59 + 60 + operating-points = < 61 + 1000000 1150000 62 + 900000 1112500 63 + 800000 1075000 64 + 700000 1037500 65 + 600000 1000000 66 + 500000 962500 67 + 400000 925000 68 + 300000 887500 69 + 200000 850000 70 + 100000 850000 71 + >; 56 72 }; 57 73 58 74 cpu1: cpu@1 {
+1
arch/arm/boot/dts/exynos4.dtsi
··· 702 702 clocks = <&clock CLK_JPEG>; 703 703 clock-names = "jpeg"; 704 704 power-domains = <&pd_cam>; 705 + iommus = <&sysmmu_jpeg>; 705 706 }; 706 707 707 708 hdmi: hdmi@12D00000 {
+81
arch/arm/boot/dts/exynos4212.dtsi
··· 30 30 device_type = "cpu"; 31 31 compatible = "arm,cortex-a9"; 32 32 reg = <0xA00>; 33 + clocks = <&clock CLK_ARM_CLK>; 34 + clock-names = "cpu"; 35 + operating-points-v2 = <&cpu0_opp_table>; 33 36 cooling-min-level = <13>; 34 37 cooling-max-level = <7>; 35 38 #cooling-cells = <2>; /* min followed by max */ ··· 42 39 device_type = "cpu"; 43 40 compatible = "arm,cortex-a9"; 44 41 reg = <0xA01>; 42 + operating-points-v2 = <&cpu0_opp_table>; 43 + }; 44 + }; 45 + 46 + cpu0_opp_table: opp_table0 { 47 + compatible = "operating-points-v2"; 48 + opp-shared; 49 + 50 + opp00 { 51 + opp-hz = /bits/ 64 <200000000>; 52 + opp-microvolt = <900000>; 53 + clock-latency-ns = <200000>; 54 + }; 55 + opp01 { 56 + opp-hz = /bits/ 64 <300000000>; 57 + opp-microvolt = <900000>; 58 + clock-latency-ns = <200000>; 59 + }; 60 + opp02 { 61 + opp-hz = /bits/ 64 <400000000>; 62 + opp-microvolt = <925000>; 63 + clock-latency-ns = <200000>; 64 + }; 65 + opp03 { 66 + opp-hz = /bits/ 64 <500000000>; 67 + opp-microvolt = <950000>; 68 + clock-latency-ns = <200000>; 69 + }; 70 + opp04 { 71 + opp-hz = /bits/ 64 <600000000>; 72 + opp-microvolt = <975000>; 73 + clock-latency-ns = <200000>; 74 + }; 75 + opp05 { 76 + opp-hz = /bits/ 64 <700000000>; 77 + opp-microvolt = <987500>; 78 + clock-latency-ns = <200000>; 79 + }; 80 + opp06 { 81 + opp-hz = /bits/ 64 <800000000>; 82 + opp-microvolt = <1000000>; 83 + clock-latency-ns = <200000>; 84 + }; 85 + opp07 { 86 + opp-hz = /bits/ 64 <900000000>; 87 + opp-microvolt = <1037500>; 88 + clock-latency-ns = <200000>; 89 + }; 90 + opp08 { 91 + opp-hz = /bits/ 64 <1000000000>; 92 + opp-microvolt = <1087500>; 93 + clock-latency-ns = <200000>; 94 + }; 95 + opp09 { 96 + opp-hz = /bits/ 64 <1100000000>; 97 + opp-microvolt = <1137500>; 98 + clock-latency-ns = <200000>; 99 + }; 100 + opp10 { 101 + opp-hz = /bits/ 64 <1200000000>; 102 + opp-microvolt = <1187500>; 103 + clock-latency-ns = <200000>; 104 + }; 105 + opp11 { 106 + opp-hz = /bits/ 64 <1300000000>; 107 + opp-microvolt = <1250000>; 108 + clock-latency-ns = <200000>; 109 + }; 110 + opp12 { 111 + opp-hz = /bits/ 64 <1400000000>; 112 + opp-microvolt = <1287500>; 113 + clock-latency-ns = <200000>; 114 + }; 115 + opp13 { 116 + opp-hz = /bits/ 64 <1500000000>; 117 + opp-microvolt = <1350000>; 118 + clock-latency-ns = <200000>; 119 + turbo-mode; 45 120 }; 46 121 }; 47 122 };
+4
arch/arm/boot/dts/exynos4412-odroid-common.dtsi
··· 107 107 }; 108 108 }; 109 109 110 + &cpu0 { 111 + cpu0-supply = <&buck2_reg>; 112 + }; 113 + 110 114 /* RSTN signal for eMMC */ 111 115 &sd1_cd { 112 116 samsung,pin-pud = <0>;
+8
arch/arm/boot/dts/exynos4412-odroidu3.dts
··· 13 13 14 14 /dts-v1/; 15 15 #include "exynos4412-odroid-common.dtsi" 16 + #include <dt-bindings/gpio/gpio.h> 16 17 17 18 / { 18 19 model = "Hardkernel ODROID-U3 board based on Exynos4412"; ··· 61 60 "IN1", "Headphone Jack", 62 61 "Speakers", "SPKL", 63 62 "Speakers", "SPKR"; 63 + }; 64 + 65 + &spi_1 { 66 + pinctrl-names = "default"; 67 + pinctrl-0 = <&spi1_bus>; 68 + cs-gpios = <&gpb 5 GPIO_ACTIVE_HIGH>; 69 + status = "okay"; 64 70 };
+4
arch/arm/boot/dts/exynos4412-origen.dts
··· 78 78 }; 79 79 }; 80 80 81 + &cpu0 { 82 + cpu0-supply = <&buck2_reg>; 83 + }; 84 + 81 85 &fimd { 82 86 pinctrl-0 = <&lcd_clk &lcd_data24 &pwm1_out>; 83 87 pinctrl-names = "default";
+4
arch/arm/boot/dts/exynos4412-trats2.dts
··· 288 288 status = "okay"; 289 289 }; 290 290 291 + &cpu0 { 292 + cpu0-supply = <&buck2_reg>; 293 + }; 294 + 291 295 &csis_0 { 292 296 status = "okay"; 293 297 vddcore-supply = <&ldo8_reg>;
+83
arch/arm/boot/dts/exynos4412.dtsi
··· 30 30 device_type = "cpu"; 31 31 compatible = "arm,cortex-a9"; 32 32 reg = <0xA00>; 33 + clocks = <&clock CLK_ARM_CLK>; 34 + clock-names = "cpu"; 35 + operating-points-v2 = <&cpu0_opp_table>; 33 36 cooling-min-level = <13>; 34 37 cooling-max-level = <7>; 35 38 #cooling-cells = <2>; /* min followed by max */ ··· 42 39 device_type = "cpu"; 43 40 compatible = "arm,cortex-a9"; 44 41 reg = <0xA01>; 42 + operating-points-v2 = <&cpu0_opp_table>; 45 43 }; 46 44 47 45 cpu@A02 { 48 46 device_type = "cpu"; 49 47 compatible = "arm,cortex-a9"; 50 48 reg = <0xA02>; 49 + operating-points-v2 = <&cpu0_opp_table>; 51 50 }; 52 51 53 52 cpu@A03 { 54 53 device_type = "cpu"; 55 54 compatible = "arm,cortex-a9"; 56 55 reg = <0xA03>; 56 + operating-points-v2 = <&cpu0_opp_table>; 57 + }; 58 + }; 59 + 60 + cpu0_opp_table: opp_table0 { 61 + compatible = "operating-points-v2"; 62 + opp-shared; 63 + 64 + opp00 { 65 + opp-hz = /bits/ 64 <200000000>; 66 + opp-microvolt = <900000>; 67 + clock-latency-ns = <200000>; 68 + }; 69 + opp01 { 70 + opp-hz = /bits/ 64 <300000000>; 71 + opp-microvolt = <900000>; 72 + clock-latency-ns = <200000>; 73 + }; 74 + opp02 { 75 + opp-hz = /bits/ 64 <400000000>; 76 + opp-microvolt = <925000>; 77 + clock-latency-ns = <200000>; 78 + }; 79 + opp03 { 80 + opp-hz = /bits/ 64 <500000000>; 81 + opp-microvolt = <950000>; 82 + clock-latency-ns = <200000>; 83 + }; 84 + opp04 { 85 + opp-hz = /bits/ 64 <600000000>; 86 + opp-microvolt = <975000>; 87 + clock-latency-ns = <200000>; 88 + }; 89 + opp05 { 90 + opp-hz = /bits/ 64 <700000000>; 91 + opp-microvolt = <987500>; 92 + clock-latency-ns = <200000>; 93 + }; 94 + opp06 { 95 + opp-hz = /bits/ 64 <800000000>; 96 + opp-microvolt = <1000000>; 97 + clock-latency-ns = <200000>; 98 + }; 99 + opp07 { 100 + opp-hz = /bits/ 64 <900000000>; 101 + opp-microvolt = <1037500>; 102 + clock-latency-ns = <200000>; 103 + }; 104 + opp08 { 105 + opp-hz = /bits/ 64 <1000000000>; 106 + opp-microvolt = <1087500>; 107 + clock-latency-ns = <200000>; 108 + }; 109 + opp09 { 110 + opp-hz = /bits/ 64 <1100000000>; 111 + opp-microvolt = <1137500>; 112 + clock-latency-ns = <200000>; 113 + }; 114 + opp10 { 115 + opp-hz = /bits/ 64 <1200000000>; 116 + opp-microvolt = <1187500>; 117 + clock-latency-ns = <200000>; 118 + }; 119 + opp11 { 120 + opp-hz = /bits/ 64 <1300000000>; 121 + opp-microvolt = <1250000>; 122 + clock-latency-ns = <200000>; 123 + }; 124 + opp12 { 125 + opp-hz = /bits/ 64 <1400000000>; 126 + opp-microvolt = <1287500>; 127 + clock-latency-ns = <200000>; 128 + }; 129 + opp13 { 130 + opp-hz = /bits/ 64 <1500000000>; 131 + opp-microvolt = <1350000>; 132 + clock-latency-ns = <200000>; 133 + turbo-mode; 57 134 }; 58 135 }; 59 136
+4
arch/arm/boot/dts/exynos5250-arndale.dts
··· 117 117 }; 118 118 }; 119 119 120 + &cpu0 { 121 + cpu0-supply = <&buck2_reg>; 122 + }; 123 + 120 124 &dp { 121 125 status = "okay"; 122 126 samsung,color-space = <0>;
+4
arch/arm/boot/dts/exynos5250-smdk5250.dts
··· 74 74 }; 75 75 }; 76 76 77 + &cpu0 { 78 + cpu0-supply = <&buck2_reg>; 79 + }; 80 + 77 81 &dp { 78 82 samsung,color-space = <0>; 79 83 samsung,dynamic-range = <0>;
+5
arch/arm/boot/dts/exynos5250-snow.dts
··· 235 235 }; 236 236 }; 237 237 238 + &cpu0 { 239 + cpu0-supply = <&buck2_reg>; 240 + }; 241 + 238 242 &dp { 239 243 status = "okay"; 240 244 pinctrl-names = "default"; ··· 692 688 status = "okay"; 693 689 samsung,spi-src-clk = <0>; 694 690 num-cs = <1>; 691 + cs-gpios = <&gpa2 5 GPIO_ACTIVE_HIGH>; 695 692 }; 696 693 697 694 &usbdrd_dwc3 {
+4
arch/arm/boot/dts/exynos5250-spring.dts
··· 65 65 }; 66 66 }; 67 67 68 + &cpu0 { 69 + cpu0-supply = <&buck2_reg>; 70 + }; 71 + 68 72 &dp { 69 73 status = "okay"; 70 74 pinctrl-names = "default";
+22
arch/arm/boot/dts/exynos5250.dtsi
··· 62 62 compatible = "arm,cortex-a15"; 63 63 reg = <0>; 64 64 clock-frequency = <1700000000>; 65 + clocks = <&clock CLK_ARM_CLK>; 66 + clock-names = "cpu"; 67 + clock-latency = <140000>; 68 + 69 + operating-points = < 70 + 1700000 1300000 71 + 1600000 1250000 72 + 1500000 1225000 73 + 1400000 1200000 74 + 1300000 1150000 75 + 1200000 1125000 76 + 1100000 1100000 77 + 1000000 1075000 78 + 900000 1050000 79 + 800000 1025000 80 + 700000 1012500 81 + 600000 1000000 82 + 500000 975000 83 + 400000 950000 84 + 300000 937500 85 + 200000 925000 86 + >; 65 87 cooling-min-level = <15>; 66 88 cooling-max-level = <9>; 67 89 #cooling-cells = <2>; /* min followed by max */
+81
arch/arm/boot/dts/exynos5422-cpus.dtsi
··· 1 + /* 2 + * SAMSUNG EXYNOS5422 SoC cpu device tree source 3 + * 4 + * Copyright (c) 2015 Samsung Electronics Co., Ltd. 5 + * http://www.samsung.com 6 + * 7 + * The only difference between EXYNOS5422 and EXYNOS5800 is cpu ordering. The 8 + * EXYNOS5422 is booting from Cortex-A7 core while the EXYNOS5800 is booting 9 + * from Cortex-A15 core. 10 + * 11 + * EXYNOS5422 based board files can include this file to provide cpu ordering 12 + * which could boot a cortex-a7 from cpu0. 13 + * 14 + * This program is free software; you can redistribute it and/or modify 15 + * it under the terms of the GNU General Public License version 2 as 16 + * published by the Free Software Foundation. 17 + */ 18 + 19 + &cpu0 { 20 + device_type = "cpu"; 21 + compatible = "arm,cortex-a7"; 22 + reg = <0x100>; 23 + clock-frequency = <1000000000>; 24 + cci-control-port = <&cci_control0>; 25 + }; 26 + 27 + &cpu1 { 28 + device_type = "cpu"; 29 + compatible = "arm,cortex-a7"; 30 + reg = <0x101>; 31 + clock-frequency = <1000000000>; 32 + cci-control-port = <&cci_control0>; 33 + }; 34 + 35 + &cpu2 { 36 + device_type = "cpu"; 37 + compatible = "arm,cortex-a7"; 38 + reg = <0x102>; 39 + clock-frequency = <1000000000>; 40 + cci-control-port = <&cci_control0>; 41 + }; 42 + 43 + &cpu3 { 44 + device_type = "cpu"; 45 + compatible = "arm,cortex-a7"; 46 + reg = <0x103>; 47 + clock-frequency = <1000000000>; 48 + cci-control-port = <&cci_control0>; 49 + }; 50 + 51 + &cpu4 { 52 + device_type = "cpu"; 53 + compatible = "arm,cortex-a15"; 54 + reg = <0x0>; 55 + clock-frequency = <1800000000>; 56 + cci-control-port = <&cci_control1>; 57 + }; 58 + 59 + &cpu5 { 60 + device_type = "cpu"; 61 + compatible = "arm,cortex-a15"; 62 + reg = <0x1>; 63 + clock-frequency = <1800000000>; 64 + cci-control-port = <&cci_control1>; 65 + }; 66 + 67 + &cpu6 { 68 + device_type = "cpu"; 69 + compatible = "arm,cortex-a15"; 70 + reg = <0x2>; 71 + clock-frequency = <1800000000>; 72 + cci-control-port = <&cci_control1>; 73 + }; 74 + 75 + &cpu7 { 76 + device_type = "cpu"; 77 + compatible = "arm,cortex-a15"; 78 + reg = <0x3>; 79 + clock-frequency = <1800000000>; 80 + cci-control-port = <&cci_control1>; 81 + };
+1
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
··· 15 15 #include <dt-bindings/gpio/gpio.h> 16 16 #include <dt-bindings/sound/samsung-i2s.h> 17 17 #include "exynos5800.dtsi" 18 + #include "exynos5422-cpus.dtsi" 18 19 #include "exynos5422-cpu-thermal.dtsi" 19 20 20 21 / {
+8
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts
··· 4 4 model = "CompuLab CM-QS600"; 5 5 compatible = "qcom,apq8064-cm-qs600", "qcom,apq8064"; 6 6 7 + aliases { 8 + serial0 = &gsbi7_serial; 9 + }; 10 + 11 + chosen { 12 + stdout-path = "serial0:115200n8"; 13 + }; 14 + 7 15 soc { 8 16 pinctrl@800000 { 9 17 i2c1_pins: i2c1 {
+4
arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
··· 10 10 serial1 = &gsbi6_serial; 11 11 }; 12 12 13 + chosen { 14 + stdout-path = "serial0:115200n8"; 15 + }; 16 + 13 17 soc { 14 18 pinctrl@800000 { 15 19 card_detect: card_detect {
+8
arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
··· 6 6 model = "Qualcomm APQ8074 Dragonboard"; 7 7 compatible = "qcom,apq8074-dragonboard", "qcom,apq8074"; 8 8 9 + aliases { 10 + serial0 = &blsp1_uart2; 11 + }; 12 + 13 + chosen { 14 + stdout-path = "serial0:115200n8"; 15 + }; 16 + 9 17 soc { 10 18 serial@f991e000 { 11 19 status = "ok";
+8
arch/arm/boot/dts/qcom-apq8084-ifc6540.dts
··· 5 5 model = "Qualcomm APQ8084/IFC6540"; 6 6 compatible = "qcom,apq8084-ifc6540", "qcom,apq8084"; 7 7 8 + aliases { 9 + serial0 = &blsp2_uart2; 10 + }; 11 + 12 + chosen { 13 + stdout-path = "serial0:115200n8"; 14 + }; 15 + 8 16 soc { 9 17 serial@f995e000 { 10 18 status = "okay";
+8
arch/arm/boot/dts/qcom-apq8084-mtp.dts
··· 5 5 model = "Qualcomm APQ 8084-MTP"; 6 6 compatible = "qcom,apq8084-mtp", "qcom,apq8084"; 7 7 8 + aliases { 9 + serial0 = &blsp2_uart2; 10 + }; 11 + 12 + chosen { 13 + stdout-path = "serial0:115200n8"; 14 + }; 15 + 8 16 soc { 9 17 serial@f995e000 { 10 18 status = "okay";
+1 -1
arch/arm/boot/dts/qcom-apq8084.dtsi
··· 234 234 interrupts = <0 208 0>; 235 235 }; 236 236 237 - serial@f995e000 { 237 + blsp2_uart2: serial@f995e000 { 238 238 compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; 239 239 reg = <0xf995e000 0x1000>; 240 240 interrupts = <0 114 0x0>;
+8
arch/arm/boot/dts/qcom-ipq8064-ap148.dts
··· 4 4 model = "Qualcomm IPQ8064/AP148"; 5 5 compatible = "qcom,ipq8064-ap148", "qcom,ipq8064"; 6 6 7 + aliases { 8 + serial0 = &gsbi4_serial; 9 + }; 10 + 11 + chosen { 12 + stdout-path = "serial0:115200n8"; 13 + }; 14 + 7 15 reserved-memory { 8 16 #address-cells = <1>; 9 17 #size-cells = <1>;
+1 -1
arch/arm/boot/dts/qcom-ipq8064.dtsi
··· 197 197 198 198 syscon-tcsr = <&tcsr>; 199 199 200 - serial@16340000 { 200 + gsbi4_serial: serial@16340000 { 201 201 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; 202 202 reg = <0x16340000 0x1000>, 203 203 <0x16300000 0x1000>;
+8
arch/arm/boot/dts/qcom-msm8660-surf.dts
··· 6 6 model = "Qualcomm MSM8660 SURF"; 7 7 compatible = "qcom,msm8660-surf", "qcom,msm8660"; 8 8 9 + aliases { 10 + serial0 = &gsbi12_serial; 11 + }; 12 + 13 + chosen { 14 + stdout-path = "serial0:115200n8"; 15 + }; 16 + 9 17 soc { 10 18 gsbi@19c00000 { 11 19 status = "ok";
+1 -1
arch/arm/boot/dts/qcom-msm8660.dtsi
··· 98 98 99 99 syscon-tcsr = <&tcsr>; 100 100 101 - serial@19c40000 { 101 + gsbi12_serial: serial@19c40000 { 102 102 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; 103 103 reg = <0x19c40000 0x1000>, 104 104 <0x19c00000 0x1000>;
+8
arch/arm/boot/dts/qcom-msm8960-cdp.dts
··· 6 6 model = "Qualcomm MSM8960 CDP"; 7 7 compatible = "qcom,msm8960-cdp", "qcom,msm8960"; 8 8 9 + aliases { 10 + serial0 = &gsbi5_serial; 11 + }; 12 + 13 + chosen { 14 + stdout-path = "serial0:115200n8"; 15 + }; 16 + 9 17 soc { 10 18 gsbi@16400000 { 11 19 status = "ok";
+1 -1
arch/arm/boot/dts/qcom-msm8960.dtsi
··· 157 157 158 158 syscon-tcsr = <&tcsr>; 159 159 160 - serial@16440000 { 160 + gsbi5_serial: serial@16440000 { 161 161 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; 162 162 reg = <0x16440000 0x1000>, 163 163 <0x16400000 0x1000>;
+8
arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
··· 6 6 model = "Sony Xperia Z1"; 7 7 compatible = "sony,xperia-honami", "qcom,msm8974"; 8 8 9 + aliases { 10 + serial0 = &blsp1_uart2; 11 + }; 12 + 13 + chosen { 14 + stdout-path = "serial0:115200n8"; 15 + }; 16 + 9 17 memory@0 { 10 18 reg = <0 0x40000000>, <0x40000000 0x40000000>; 11 19 device_type = "memory";
+1 -1
arch/arm/boot/dts/qcom-msm8974.dtsi
··· 259 259 hwlocks = <&tcsr_mutex 3>; 260 260 }; 261 261 262 - serial@f991e000 { 262 + blsp1_uart2: serial@f991e000 { 263 263 compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; 264 264 reg = <0xf991e000 0x1000>; 265 265 interrupts = <0 108 0x0>;
+5
arch/arm/configs/exynos_defconfig
··· 27 27 CONFIG_ARM_ATAG_DTB_COMPAT=y 28 28 CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M" 29 29 CONFIG_CPU_FREQ=y 30 + CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y 31 + CONFIG_CPUFREQ_DT=y 30 32 CONFIG_CPU_IDLE=y 31 33 CONFIG_ARM_EXYNOS_CPUIDLE=y 32 34 CONFIG_VFP=y ··· 96 94 CONFIG_CHARGER_MAX77693=y 97 95 CONFIG_CHARGER_TPS65090=y 98 96 CONFIG_SENSORS_LM90=y 97 + CONFIG_SENSORS_NTC_THERMISTOR=y 99 98 CONFIG_SENSORS_PWM_FAN=y 100 99 CONFIG_SENSORS_INA2XX=y 101 100 CONFIG_THERMAL=y ··· 147 144 CONFIG_SND_SOC=y 148 145 CONFIG_SND_SOC_SAMSUNG=y 149 146 CONFIG_SND_SOC_SNOW=y 147 + CONFIG_SND_SOC_ODROIDX2=y 148 + CONFIG_SND_SIMPLE_CARD=y 150 149 CONFIG_USB=y 151 150 CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 152 151 CONFIG_USB_XHCI_HCD=y
+4 -2
arch/arm/configs/multi_v7_defconfig
··· 362 362 CONFIG_POWER_RESET_RMOBILE=y 363 363 CONFIG_SENSORS_LM90=y 364 364 CONFIG_SENSORS_LM95245=y 365 + CONFIG_SENSORS_NTC_THERMISTOR=m 365 366 CONFIG_THERMAL=y 366 367 CONFIG_CPU_THERMAL=y 367 368 CONFIG_RCAR_THERMAL=y ··· 411 410 CONFIG_REGULATOR_MAX8973=y 412 411 CONFIG_REGULATOR_MAX77686=y 413 412 CONFIG_REGULATOR_MAX77693=m 413 + CONFIG_REGULATOR_MAX77802=m 414 414 CONFIG_REGULATOR_PALMAS=y 415 + CONFIG_REGULATOR_PBIAS=y 415 416 CONFIG_REGULATOR_PWM=m 416 417 CONFIG_REGULATOR_S2MPS11=y 417 418 CONFIG_REGULATOR_S5M8767=y ··· 512 509 CONFIG_AB8500_USB=y 513 510 CONFIG_KEYSTONE_USB_PHY=y 514 511 CONFIG_OMAP_USB3=y 515 - CONFIG_SAMSUNG_USB2PHY=y 516 - CONFIG_SAMSUNG_USB3PHY=y 517 512 CONFIG_USB_GPIO_VBUS=y 518 513 CONFIG_USB_ISP1301=y 519 514 CONFIG_USB_MXS_PHY=y ··· 636 635 CONFIG_TI_AEMIF=y 637 636 CONFIG_IIO=y 638 637 CONFIG_AT91_ADC=m 638 + CONFIG_EXYNOS_ADC=m 639 639 CONFIG_XILINX_XADC=y 640 640 CONFIG_AK8975=y 641 641 CONFIG_PWM=y
+2
arch/arm/mach-exynos/Kconfig
··· 15 15 select ARM_AMBA 16 16 select ARM_GIC 17 17 select COMMON_CLK_SAMSUNG 18 + select EXYNOS_THERMAL 18 19 select HAVE_ARM_SCU if SMP 19 20 select HAVE_S3C2410_I2C if I2C 20 21 select HAVE_S3C2410_WATCHDOG if WATCHDOG ··· 25 24 select PM_GENERIC_DOMAINS if PM 26 25 select S5P_DEV_MFC 27 26 select SRAM 27 + select THERMAL 28 28 select MFD_SYSCON 29 29 help 30 30 Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)
+4
arch/arm/mach-exynos/exynos.c
··· 225 225 } 226 226 227 227 static const struct of_device_id exynos_cpufreq_matches[] = { 228 + { .compatible = "samsung,exynos3250", .data = "cpufreq-dt" }, 228 229 { .compatible = "samsung,exynos4210", .data = "cpufreq-dt" }, 230 + { .compatible = "samsung,exynos4212", .data = "cpufreq-dt" }, 231 + { .compatible = "samsung,exynos4412", .data = "cpufreq-dt" }, 232 + { .compatible = "samsung,exynos5250", .data = "cpufreq-dt" }, 229 233 { /* sentinel */ } 230 234 }; 231 235
+50
drivers/clk/samsung/clk-exynos4.c
··· 1398 1398 { 0 }, 1399 1399 }; 1400 1400 1401 + static const struct exynos_cpuclk_cfg_data e4212_armclk_d[] __initconst = { 1402 + { 1500000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4210_CPU_DIV1(2, 6), }, 1403 + { 1400000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4210_CPU_DIV1(2, 6), }, 1404 + { 1300000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4210_CPU_DIV1(2, 5), }, 1405 + { 1200000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4210_CPU_DIV1(2, 5), }, 1406 + { 1100000, E4210_CPU_DIV0(2, 1, 4, 0, 6, 3), E4210_CPU_DIV1(2, 4), }, 1407 + { 1000000, E4210_CPU_DIV0(1, 1, 4, 0, 5, 2), E4210_CPU_DIV1(2, 4), }, 1408 + { 900000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4210_CPU_DIV1(2, 3), }, 1409 + { 800000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4210_CPU_DIV1(2, 3), }, 1410 + { 700000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3), }, 1411 + { 600000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3), }, 1412 + { 500000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3), }, 1413 + { 400000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3), }, 1414 + { 300000, E4210_CPU_DIV0(1, 1, 2, 0, 4, 2), E4210_CPU_DIV1(2, 3), }, 1415 + { 200000, E4210_CPU_DIV0(1, 1, 1, 0, 3, 1), E4210_CPU_DIV1(2, 3), }, 1416 + { 0 }, 1417 + }; 1418 + 1419 + #define E4412_CPU_DIV1(cores, hpm, copy) \ 1420 + (((cores) << 8) | ((hpm) << 4) | ((copy) << 0)) 1421 + 1422 + static const struct exynos_cpuclk_cfg_data e4412_armclk_d[] __initconst = { 1423 + { 1500000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4412_CPU_DIV1(7, 0, 6), }, 1424 + { 1400000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4412_CPU_DIV1(6, 0, 6), }, 1425 + { 1300000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4412_CPU_DIV1(6, 0, 5), }, 1426 + { 1200000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4412_CPU_DIV1(5, 0, 5), }, 1427 + { 1100000, E4210_CPU_DIV0(2, 1, 4, 0, 6, 3), E4412_CPU_DIV1(5, 0, 4), }, 1428 + { 1000000, E4210_CPU_DIV0(1, 1, 4, 0, 5, 2), E4412_CPU_DIV1(4, 0, 4), }, 1429 + { 900000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4412_CPU_DIV1(4, 0, 3), }, 1430 + { 800000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4412_CPU_DIV1(3, 0, 3), }, 1431 + { 700000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(3, 0, 3), }, 1432 + { 600000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(2, 0, 3), }, 1433 + { 500000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(2, 0, 3), }, 1434 + { 400000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4412_CPU_DIV1(1, 0, 3), }, 1435 + { 300000, E4210_CPU_DIV0(1, 1, 2, 0, 4, 2), E4412_CPU_DIV1(1, 0, 3), }, 1436 + { 200000, E4210_CPU_DIV0(1, 1, 1, 0, 3, 1), E4412_CPU_DIV1(0, 0, 3), }, 1437 + { 0 }, 1438 + }; 1439 + 1401 1440 /* register exynos4 clocks */ 1402 1441 static void __init exynos4_clk_init(struct device_node *np, 1403 1442 enum exynos4_soc soc) ··· 1530 1491 samsung_clk_register_fixed_factor(ctx, 1531 1492 exynos4x12_fixed_factor_clks, 1532 1493 ARRAY_SIZE(exynos4x12_fixed_factor_clks)); 1494 + if (of_machine_is_compatible("samsung,exynos4412")) { 1495 + exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armclk", 1496 + mout_core_p4x12[0], mout_core_p4x12[1], 0x14200, 1497 + e4412_armclk_d, ARRAY_SIZE(e4412_armclk_d), 1498 + CLK_CPU_NEEDS_DEBUG_ALT_DIV | CLK_CPU_HAS_DIV1); 1499 + } else { 1500 + exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armclk", 1501 + mout_core_p4x12[0], mout_core_p4x12[1], 0x14200, 1502 + e4212_armclk_d, ARRAY_SIZE(e4212_armclk_d), 1503 + CLK_CPU_NEEDS_DEBUG_ALT_DIV | CLK_CPU_HAS_DIV1); 1504 + } 1533 1505 } 1534 1506 1535 1507 samsung_clk_register_alias(ctx, exynos4_aliases,
-49
drivers/cpufreq/Kconfig.arm
··· 24 24 This add the CPUfreq driver support for Versatile Express 25 25 big.LITTLE platforms using SPC for power management. 26 26 27 - 28 - config ARM_EXYNOS_CPUFREQ 29 - tristate "SAMSUNG EXYNOS CPUfreq Driver" 30 - depends on CPU_EXYNOS4210 || SOC_EXYNOS4212 || SOC_EXYNOS4412 || SOC_EXYNOS5250 31 - depends on THERMAL 32 - help 33 - This adds the CPUFreq driver for Samsung EXYNOS platforms. 34 - Supported SoC versions are: 35 - Exynos4210, Exynos4212, Exynos4412, and Exynos5250. 36 - 37 - If in doubt, say N. 38 - 39 - config ARM_EXYNOS4X12_CPUFREQ 40 - bool "SAMSUNG EXYNOS4x12" 41 - depends on SOC_EXYNOS4212 || SOC_EXYNOS4412 42 - depends on ARM_EXYNOS_CPUFREQ 43 - default y 44 - help 45 - This adds the CPUFreq driver for Samsung EXYNOS4X12 46 - SoC (EXYNOS4212 or EXYNOS4412). 47 - 48 - If in doubt, say N. 49 - 50 - config ARM_EXYNOS5250_CPUFREQ 51 - bool "SAMSUNG EXYNOS5250" 52 - depends on SOC_EXYNOS5250 53 - depends on ARM_EXYNOS_CPUFREQ 54 - default y 55 - help 56 - This adds the CPUFreq driver for Samsung EXYNOS5250 57 - SoC. 58 - 59 - If in doubt, say N. 60 - 61 - config ARM_EXYNOS_CPU_FREQ_BOOST_SW 62 - bool "EXYNOS Frequency Overclocking - Software" 63 - depends on ARM_EXYNOS_CPUFREQ && THERMAL 64 - select CPU_FREQ_BOOST_SW 65 - select EXYNOS_THERMAL 66 - help 67 - This driver supports software managed overclocking (BOOST). 68 - It allows usage of special frequencies for Samsung Exynos 69 - processors if thermal conditions are appropriate. 70 - 71 - It requires, for safe operation, thermal framework with properly 72 - defined trip points. 73 - 74 - If in doubt, say N. 75 - 76 27 config ARM_EXYNOS5440_CPUFREQ 77 28 tristate "SAMSUNG EXYNOS5440" 78 29 depends on SOC_EXYNOS5440
-4
drivers/cpufreq/Makefile
··· 52 52 53 53 obj-$(CONFIG_ARCH_DAVINCI) += davinci-cpufreq.o 54 54 obj-$(CONFIG_UX500_SOC_DB8500) += dbx500-cpufreq.o 55 - obj-$(CONFIG_ARM_EXYNOS_CPUFREQ) += arm-exynos-cpufreq.o 56 - arm-exynos-cpufreq-y := exynos-cpufreq.o 57 - arm-exynos-cpufreq-$(CONFIG_ARM_EXYNOS4X12_CPUFREQ) += exynos4x12-cpufreq.o 58 - arm-exynos-cpufreq-$(CONFIG_ARM_EXYNOS5250_CPUFREQ) += exynos5250-cpufreq.o 59 55 obj-$(CONFIG_ARM_EXYNOS5440_CPUFREQ) += exynos5440-cpufreq.o 60 56 obj-$(CONFIG_ARM_HIGHBANK_CPUFREQ) += highbank-cpufreq.o 61 57 obj-$(CONFIG_ARM_HISI_ACPU_CPUFREQ) += hisi-acpu-cpufreq.o
-239
drivers/cpufreq/exynos-cpufreq.c
··· 1 - /* 2 - * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. 3 - * http://www.samsung.com 4 - * 5 - * EXYNOS - CPU frequency scaling support for EXYNOS series 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/module.h> 14 - #include <linux/err.h> 15 - #include <linux/clk.h> 16 - #include <linux/io.h> 17 - #include <linux/slab.h> 18 - #include <linux/regulator/consumer.h> 19 - #include <linux/cpufreq.h> 20 - #include <linux/platform_device.h> 21 - #include <linux/of.h> 22 - #include <linux/cpu_cooling.h> 23 - #include <linux/cpu.h> 24 - 25 - #include "exynos-cpufreq.h" 26 - 27 - static struct exynos_dvfs_info *exynos_info; 28 - static struct thermal_cooling_device *cdev; 29 - static struct regulator *arm_regulator; 30 - static unsigned int locking_frequency; 31 - 32 - static int exynos_cpufreq_get_index(unsigned int freq) 33 - { 34 - struct cpufreq_frequency_table *freq_table = exynos_info->freq_table; 35 - struct cpufreq_frequency_table *pos; 36 - 37 - cpufreq_for_each_entry(pos, freq_table) 38 - if (pos->frequency == freq) 39 - break; 40 - 41 - if (pos->frequency == CPUFREQ_TABLE_END) 42 - return -EINVAL; 43 - 44 - return pos - freq_table; 45 - } 46 - 47 - static int exynos_cpufreq_scale(unsigned int target_freq) 48 - { 49 - struct cpufreq_frequency_table *freq_table = exynos_info->freq_table; 50 - unsigned int *volt_table = exynos_info->volt_table; 51 - struct cpufreq_policy *policy = cpufreq_cpu_get(0); 52 - unsigned int arm_volt, safe_arm_volt = 0; 53 - unsigned int mpll_freq_khz = exynos_info->mpll_freq_khz; 54 - struct device *dev = exynos_info->dev; 55 - unsigned int old_freq; 56 - int index, old_index; 57 - int ret = 0; 58 - 59 - old_freq = policy->cur; 60 - 61 - /* 62 - * The policy max have been changed so that we cannot get proper 63 - * old_index with cpufreq_frequency_table_target(). Thus, ignore 64 - * policy and get the index from the raw frequency table. 65 - */ 66 - old_index = exynos_cpufreq_get_index(old_freq); 67 - if (old_index < 0) { 68 - ret = old_index; 69 - goto out; 70 - } 71 - 72 - index = exynos_cpufreq_get_index(target_freq); 73 - if (index < 0) { 74 - ret = index; 75 - goto out; 76 - } 77 - 78 - /* 79 - * ARM clock source will be changed APLL to MPLL temporary 80 - * To support this level, need to control regulator for 81 - * required voltage level 82 - */ 83 - if (exynos_info->need_apll_change != NULL) { 84 - if (exynos_info->need_apll_change(old_index, index) && 85 - (freq_table[index].frequency < mpll_freq_khz) && 86 - (freq_table[old_index].frequency < mpll_freq_khz)) 87 - safe_arm_volt = volt_table[exynos_info->pll_safe_idx]; 88 - } 89 - arm_volt = volt_table[index]; 90 - 91 - /* When the new frequency is higher than current frequency */ 92 - if ((target_freq > old_freq) && !safe_arm_volt) { 93 - /* Firstly, voltage up to increase frequency */ 94 - ret = regulator_set_voltage(arm_regulator, arm_volt, arm_volt); 95 - if (ret) { 96 - dev_err(dev, "failed to set cpu voltage to %d\n", 97 - arm_volt); 98 - return ret; 99 - } 100 - } 101 - 102 - if (safe_arm_volt) { 103 - ret = regulator_set_voltage(arm_regulator, safe_arm_volt, 104 - safe_arm_volt); 105 - if (ret) { 106 - dev_err(dev, "failed to set cpu voltage to %d\n", 107 - safe_arm_volt); 108 - return ret; 109 - } 110 - } 111 - 112 - exynos_info->set_freq(old_index, index); 113 - 114 - /* When the new frequency is lower than current frequency */ 115 - if ((target_freq < old_freq) || 116 - ((target_freq > old_freq) && safe_arm_volt)) { 117 - /* down the voltage after frequency change */ 118 - ret = regulator_set_voltage(arm_regulator, arm_volt, 119 - arm_volt); 120 - if (ret) { 121 - dev_err(dev, "failed to set cpu voltage to %d\n", 122 - arm_volt); 123 - goto out; 124 - } 125 - } 126 - 127 - out: 128 - cpufreq_cpu_put(policy); 129 - 130 - return ret; 131 - } 132 - 133 - static int exynos_target(struct cpufreq_policy *policy, unsigned int index) 134 - { 135 - return exynos_cpufreq_scale(exynos_info->freq_table[index].frequency); 136 - } 137 - 138 - static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy) 139 - { 140 - policy->clk = exynos_info->cpu_clk; 141 - policy->suspend_freq = locking_frequency; 142 - return cpufreq_generic_init(policy, exynos_info->freq_table, 100000); 143 - } 144 - 145 - static struct cpufreq_driver exynos_driver = { 146 - .flags = CPUFREQ_STICKY | CPUFREQ_NEED_INITIAL_FREQ_CHECK, 147 - .verify = cpufreq_generic_frequency_table_verify, 148 - .target_index = exynos_target, 149 - .get = cpufreq_generic_get, 150 - .init = exynos_cpufreq_cpu_init, 151 - .name = "exynos_cpufreq", 152 - .attr = cpufreq_generic_attr, 153 - #ifdef CONFIG_ARM_EXYNOS_CPU_FREQ_BOOST_SW 154 - .boost_supported = true, 155 - #endif 156 - #ifdef CONFIG_PM 157 - .suspend = cpufreq_generic_suspend, 158 - #endif 159 - }; 160 - 161 - static int exynos_cpufreq_probe(struct platform_device *pdev) 162 - { 163 - struct device_node *cpu0; 164 - int ret = -EINVAL; 165 - 166 - exynos_info = kzalloc(sizeof(*exynos_info), GFP_KERNEL); 167 - if (!exynos_info) 168 - return -ENOMEM; 169 - 170 - exynos_info->dev = &pdev->dev; 171 - 172 - if (of_machine_is_compatible("samsung,exynos4212")) { 173 - exynos_info->type = EXYNOS_SOC_4212; 174 - ret = exynos4x12_cpufreq_init(exynos_info); 175 - } else if (of_machine_is_compatible("samsung,exynos4412")) { 176 - exynos_info->type = EXYNOS_SOC_4412; 177 - ret = exynos4x12_cpufreq_init(exynos_info); 178 - } else if (of_machine_is_compatible("samsung,exynos5250")) { 179 - exynos_info->type = EXYNOS_SOC_5250; 180 - ret = exynos5250_cpufreq_init(exynos_info); 181 - } else { 182 - pr_err("%s: Unknown SoC type\n", __func__); 183 - ret = -ENODEV; 184 - } 185 - 186 - if (ret) 187 - goto err_vdd_arm; 188 - 189 - if (exynos_info->set_freq == NULL) { 190 - dev_err(&pdev->dev, "No set_freq function (ERR)\n"); 191 - ret = -EINVAL; 192 - goto err_vdd_arm; 193 - } 194 - 195 - arm_regulator = regulator_get(NULL, "vdd_arm"); 196 - if (IS_ERR(arm_regulator)) { 197 - dev_err(&pdev->dev, "failed to get resource vdd_arm\n"); 198 - ret = -EINVAL; 199 - goto err_vdd_arm; 200 - } 201 - 202 - /* Done here as we want to capture boot frequency */ 203 - locking_frequency = clk_get_rate(exynos_info->cpu_clk) / 1000; 204 - 205 - ret = cpufreq_register_driver(&exynos_driver); 206 - if (ret) 207 - goto err_cpufreq_reg; 208 - 209 - cpu0 = of_get_cpu_node(0, NULL); 210 - if (!cpu0) { 211 - pr_err("failed to find cpu0 node\n"); 212 - return 0; 213 - } 214 - 215 - if (of_find_property(cpu0, "#cooling-cells", NULL)) { 216 - cdev = of_cpufreq_cooling_register(cpu0, 217 - cpu_present_mask); 218 - if (IS_ERR(cdev)) 219 - pr_err("running cpufreq without cooling device: %ld\n", 220 - PTR_ERR(cdev)); 221 - } 222 - 223 - return 0; 224 - 225 - err_cpufreq_reg: 226 - dev_err(&pdev->dev, "failed to register cpufreq driver\n"); 227 - regulator_put(arm_regulator); 228 - err_vdd_arm: 229 - kfree(exynos_info); 230 - return ret; 231 - } 232 - 233 - static struct platform_driver exynos_cpufreq_platdrv = { 234 - .driver = { 235 - .name = "exynos-cpufreq", 236 - }, 237 - .probe = exynos_cpufreq_probe, 238 - }; 239 - module_platform_driver(exynos_cpufreq_platdrv);
-89
drivers/cpufreq/exynos-cpufreq.h
··· 1 - /* 2 - * Copyright (c) 2010 Samsung Electronics Co., Ltd. 3 - * http://www.samsung.com 4 - * 5 - * EXYNOS - CPUFreq 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 - enum cpufreq_level_index { 13 - L0, L1, L2, L3, L4, 14 - L5, L6, L7, L8, L9, 15 - L10, L11, L12, L13, L14, 16 - L15, L16, L17, L18, L19, 17 - L20, 18 - }; 19 - 20 - enum exynos_soc_type { 21 - EXYNOS_SOC_4212, 22 - EXYNOS_SOC_4412, 23 - EXYNOS_SOC_5250, 24 - }; 25 - 26 - #define APLL_FREQ(f, a0, a1, a2, a3, a4, a5, a6, a7, b0, b1, b2, m, p, s) \ 27 - { \ 28 - .freq = (f) * 1000, \ 29 - .clk_div_cpu0 = ((a0) | (a1) << 4 | (a2) << 8 | (a3) << 12 | \ 30 - (a4) << 16 | (a5) << 20 | (a6) << 24 | (a7) << 28), \ 31 - .clk_div_cpu1 = (b0 << 0 | b1 << 4 | b2 << 8), \ 32 - .mps = ((m) << 16 | (p) << 8 | (s)), \ 33 - } 34 - 35 - struct apll_freq { 36 - unsigned int freq; 37 - u32 clk_div_cpu0; 38 - u32 clk_div_cpu1; 39 - u32 mps; 40 - }; 41 - 42 - struct exynos_dvfs_info { 43 - enum exynos_soc_type type; 44 - struct device *dev; 45 - unsigned long mpll_freq_khz; 46 - unsigned int pll_safe_idx; 47 - struct clk *cpu_clk; 48 - unsigned int *volt_table; 49 - struct cpufreq_frequency_table *freq_table; 50 - void (*set_freq)(unsigned int, unsigned int); 51 - bool (*need_apll_change)(unsigned int, unsigned int); 52 - void __iomem *cmu_regs; 53 - }; 54 - 55 - #ifdef CONFIG_ARM_EXYNOS4X12_CPUFREQ 56 - extern int exynos4x12_cpufreq_init(struct exynos_dvfs_info *); 57 - #else 58 - static inline int exynos4x12_cpufreq_init(struct exynos_dvfs_info *info) 59 - { 60 - return -EOPNOTSUPP; 61 - } 62 - #endif 63 - #ifdef CONFIG_ARM_EXYNOS5250_CPUFREQ 64 - extern int exynos5250_cpufreq_init(struct exynos_dvfs_info *); 65 - #else 66 - static inline int exynos5250_cpufreq_init(struct exynos_dvfs_info *info) 67 - { 68 - return -EOPNOTSUPP; 69 - } 70 - #endif 71 - 72 - #define EXYNOS4_CLKSRC_CPU 0x14200 73 - #define EXYNOS4_CLKMUX_STATCPU 0x14400 74 - 75 - #define EXYNOS4_CLKDIV_CPU 0x14500 76 - #define EXYNOS4_CLKDIV_CPU1 0x14504 77 - #define EXYNOS4_CLKDIV_STATCPU 0x14600 78 - #define EXYNOS4_CLKDIV_STATCPU1 0x14604 79 - 80 - #define EXYNOS4_CLKSRC_CPU_MUXCORE_SHIFT (16) 81 - #define EXYNOS4_CLKMUX_STATCPU_MUXCORE_MASK (0x7 << EXYNOS4_CLKSRC_CPU_MUXCORE_SHIFT) 82 - 83 - #define EXYNOS5_APLL_LOCK 0x00000 84 - #define EXYNOS5_APLL_CON0 0x00100 85 - #define EXYNOS5_CLKMUX_STATCPU 0x00400 86 - #define EXYNOS5_CLKDIV_CPU0 0x00500 87 - #define EXYNOS5_CLKDIV_CPU1 0x00504 88 - #define EXYNOS5_CLKDIV_STATCPU0 0x00600 89 - #define EXYNOS5_CLKDIV_STATCPU1 0x00604
-236
drivers/cpufreq/exynos4x12-cpufreq.c
··· 1 - /* 2 - * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd. 3 - * http://www.samsung.com 4 - * 5 - * EXYNOS4X12 - CPU frequency scaling 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/module.h> 13 - #include <linux/kernel.h> 14 - #include <linux/err.h> 15 - #include <linux/clk.h> 16 - #include <linux/io.h> 17 - #include <linux/slab.h> 18 - #include <linux/cpufreq.h> 19 - #include <linux/of.h> 20 - #include <linux/of_address.h> 21 - 22 - #include "exynos-cpufreq.h" 23 - 24 - static struct clk *cpu_clk; 25 - static struct clk *moutcore; 26 - static struct clk *mout_mpll; 27 - static struct clk *mout_apll; 28 - static struct exynos_dvfs_info *cpufreq; 29 - 30 - static unsigned int exynos4x12_volt_table[] = { 31 - 1350000, 1287500, 1250000, 1187500, 1137500, 1087500, 1037500, 32 - 1000000, 987500, 975000, 950000, 925000, 900000, 900000 33 - }; 34 - 35 - static struct cpufreq_frequency_table exynos4x12_freq_table[] = { 36 - {CPUFREQ_BOOST_FREQ, L0, 1500 * 1000}, 37 - {0, L1, 1400 * 1000}, 38 - {0, L2, 1300 * 1000}, 39 - {0, L3, 1200 * 1000}, 40 - {0, L4, 1100 * 1000}, 41 - {0, L5, 1000 * 1000}, 42 - {0, L6, 900 * 1000}, 43 - {0, L7, 800 * 1000}, 44 - {0, L8, 700 * 1000}, 45 - {0, L9, 600 * 1000}, 46 - {0, L10, 500 * 1000}, 47 - {0, L11, 400 * 1000}, 48 - {0, L12, 300 * 1000}, 49 - {0, L13, 200 * 1000}, 50 - {0, 0, CPUFREQ_TABLE_END}, 51 - }; 52 - 53 - static struct apll_freq *apll_freq_4x12; 54 - 55 - static struct apll_freq apll_freq_4212[] = { 56 - /* 57 - * values: 58 - * freq 59 - * clock divider for CORE, COREM0, COREM1, PERIPH, ATB, PCLK_DBG, APLL, CORE2 60 - * clock divider for COPY, HPM, RESERVED 61 - * PLL M, P, S 62 - */ 63 - APLL_FREQ(1500, 0, 3, 7, 0, 6, 1, 2, 0, 6, 2, 0, 250, 4, 0), 64 - APLL_FREQ(1400, 0, 3, 7, 0, 6, 1, 2, 0, 6, 2, 0, 175, 3, 0), 65 - APLL_FREQ(1300, 0, 3, 7, 0, 5, 1, 2, 0, 5, 2, 0, 325, 6, 0), 66 - APLL_FREQ(1200, 0, 3, 7, 0, 5, 1, 2, 0, 5, 2, 0, 200, 4, 0), 67 - APLL_FREQ(1100, 0, 3, 6, 0, 4, 1, 2, 0, 4, 2, 0, 275, 6, 0), 68 - APLL_FREQ(1000, 0, 2, 5, 0, 4, 1, 1, 0, 4, 2, 0, 125, 3, 0), 69 - APLL_FREQ(900, 0, 2, 5, 0, 3, 1, 1, 0, 3, 2, 0, 150, 4, 0), 70 - APLL_FREQ(800, 0, 2, 5, 0, 3, 1, 1, 0, 3, 2, 0, 100, 3, 0), 71 - APLL_FREQ(700, 0, 2, 4, 0, 3, 1, 1, 0, 3, 2, 0, 175, 3, 1), 72 - APLL_FREQ(600, 0, 2, 4, 0, 3, 1, 1, 0, 3, 2, 0, 200, 4, 1), 73 - APLL_FREQ(500, 0, 2, 4, 0, 3, 1, 1, 0, 3, 2, 0, 125, 3, 1), 74 - APLL_FREQ(400, 0, 2, 4, 0, 3, 1, 1, 0, 3, 2, 0, 100, 3, 1), 75 - APLL_FREQ(300, 0, 2, 4, 0, 2, 1, 1, 0, 3, 2, 0, 200, 4, 2), 76 - APLL_FREQ(200, 0, 1, 3, 0, 1, 1, 1, 0, 3, 2, 0, 100, 3, 2), 77 - }; 78 - 79 - static struct apll_freq apll_freq_4412[] = { 80 - /* 81 - * values: 82 - * freq 83 - * clock divider for CORE, COREM0, COREM1, PERIPH, ATB, PCLK_DBG, APLL, CORE2 84 - * clock divider for COPY, HPM, CORES 85 - * PLL M, P, S 86 - */ 87 - APLL_FREQ(1500, 0, 3, 7, 0, 6, 1, 2, 0, 6, 0, 7, 250, 4, 0), 88 - APLL_FREQ(1400, 0, 3, 7, 0, 6, 1, 2, 0, 6, 0, 6, 175, 3, 0), 89 - APLL_FREQ(1300, 0, 3, 7, 0, 5, 1, 2, 0, 5, 0, 6, 325, 6, 0), 90 - APLL_FREQ(1200, 0, 3, 7, 0, 5, 1, 2, 0, 5, 0, 5, 200, 4, 0), 91 - APLL_FREQ(1100, 0, 3, 6, 0, 4, 1, 2, 0, 4, 0, 5, 275, 6, 0), 92 - APLL_FREQ(1000, 0, 2, 5, 0, 4, 1, 1, 0, 4, 0, 4, 125, 3, 0), 93 - APLL_FREQ(900, 0, 2, 5, 0, 3, 1, 1, 0, 3, 0, 4, 150, 4, 0), 94 - APLL_FREQ(800, 0, 2, 5, 0, 3, 1, 1, 0, 3, 0, 3, 100, 3, 0), 95 - APLL_FREQ(700, 0, 2, 4, 0, 3, 1, 1, 0, 3, 0, 3, 175, 3, 1), 96 - APLL_FREQ(600, 0, 2, 4, 0, 3, 1, 1, 0, 3, 0, 2, 200, 4, 1), 97 - APLL_FREQ(500, 0, 2, 4, 0, 3, 1, 1, 0, 3, 0, 2, 125, 3, 1), 98 - APLL_FREQ(400, 0, 2, 4, 0, 3, 1, 1, 0, 3, 0, 1, 100, 3, 1), 99 - APLL_FREQ(300, 0, 2, 4, 0, 2, 1, 1, 0, 3, 0, 1, 200, 4, 2), 100 - APLL_FREQ(200, 0, 1, 3, 0, 1, 1, 1, 0, 3, 0, 0, 100, 3, 2), 101 - }; 102 - 103 - static void exynos4x12_set_clkdiv(unsigned int div_index) 104 - { 105 - unsigned int tmp; 106 - 107 - /* Change Divider - CPU0 */ 108 - 109 - tmp = apll_freq_4x12[div_index].clk_div_cpu0; 110 - 111 - __raw_writel(tmp, cpufreq->cmu_regs + EXYNOS4_CLKDIV_CPU); 112 - 113 - while (__raw_readl(cpufreq->cmu_regs + EXYNOS4_CLKDIV_STATCPU) 114 - & 0x11111111) 115 - cpu_relax(); 116 - 117 - /* Change Divider - CPU1 */ 118 - tmp = apll_freq_4x12[div_index].clk_div_cpu1; 119 - 120 - __raw_writel(tmp, cpufreq->cmu_regs + EXYNOS4_CLKDIV_CPU1); 121 - 122 - do { 123 - cpu_relax(); 124 - tmp = __raw_readl(cpufreq->cmu_regs + EXYNOS4_CLKDIV_STATCPU1); 125 - } while (tmp != 0x0); 126 - } 127 - 128 - static void exynos4x12_set_apll(unsigned int index) 129 - { 130 - unsigned int tmp, freq = apll_freq_4x12[index].freq; 131 - 132 - /* MUX_CORE_SEL = MPLL, ARMCLK uses MPLL for lock time */ 133 - clk_set_parent(moutcore, mout_mpll); 134 - 135 - do { 136 - cpu_relax(); 137 - tmp = (__raw_readl(cpufreq->cmu_regs + EXYNOS4_CLKMUX_STATCPU) 138 - >> EXYNOS4_CLKSRC_CPU_MUXCORE_SHIFT); 139 - tmp &= 0x7; 140 - } while (tmp != 0x2); 141 - 142 - clk_set_rate(mout_apll, freq * 1000); 143 - 144 - /* MUX_CORE_SEL = APLL */ 145 - clk_set_parent(moutcore, mout_apll); 146 - 147 - do { 148 - cpu_relax(); 149 - tmp = __raw_readl(cpufreq->cmu_regs + EXYNOS4_CLKMUX_STATCPU); 150 - tmp &= EXYNOS4_CLKMUX_STATCPU_MUXCORE_MASK; 151 - } while (tmp != (0x1 << EXYNOS4_CLKSRC_CPU_MUXCORE_SHIFT)); 152 - } 153 - 154 - static void exynos4x12_set_frequency(unsigned int old_index, 155 - unsigned int new_index) 156 - { 157 - if (old_index > new_index) { 158 - exynos4x12_set_clkdiv(new_index); 159 - exynos4x12_set_apll(new_index); 160 - } else if (old_index < new_index) { 161 - exynos4x12_set_apll(new_index); 162 - exynos4x12_set_clkdiv(new_index); 163 - } 164 - } 165 - 166 - int exynos4x12_cpufreq_init(struct exynos_dvfs_info *info) 167 - { 168 - struct device_node *np; 169 - unsigned long rate; 170 - 171 - /* 172 - * HACK: This is a temporary workaround to get access to clock 173 - * controller registers directly and remove static mappings and 174 - * dependencies on platform headers. It is necessary to enable 175 - * Exynos multi-platform support and will be removed together with 176 - * this whole driver as soon as Exynos gets migrated to use 177 - * cpufreq-dt driver. 178 - */ 179 - np = of_find_compatible_node(NULL, NULL, "samsung,exynos4412-clock"); 180 - if (!np) { 181 - pr_err("%s: failed to find clock controller DT node\n", 182 - __func__); 183 - return -ENODEV; 184 - } 185 - 186 - info->cmu_regs = of_iomap(np, 0); 187 - if (!info->cmu_regs) { 188 - pr_err("%s: failed to map CMU registers\n", __func__); 189 - return -EFAULT; 190 - } 191 - 192 - cpu_clk = clk_get(NULL, "armclk"); 193 - if (IS_ERR(cpu_clk)) 194 - return PTR_ERR(cpu_clk); 195 - 196 - moutcore = clk_get(NULL, "moutcore"); 197 - if (IS_ERR(moutcore)) 198 - goto err_moutcore; 199 - 200 - mout_mpll = clk_get(NULL, "mout_mpll"); 201 - if (IS_ERR(mout_mpll)) 202 - goto err_mout_mpll; 203 - 204 - rate = clk_get_rate(mout_mpll) / 1000; 205 - 206 - mout_apll = clk_get(NULL, "mout_apll"); 207 - if (IS_ERR(mout_apll)) 208 - goto err_mout_apll; 209 - 210 - if (info->type == EXYNOS_SOC_4212) 211 - apll_freq_4x12 = apll_freq_4212; 212 - else 213 - apll_freq_4x12 = apll_freq_4412; 214 - 215 - info->mpll_freq_khz = rate; 216 - /* 800Mhz */ 217 - info->pll_safe_idx = L7; 218 - info->cpu_clk = cpu_clk; 219 - info->volt_table = exynos4x12_volt_table; 220 - info->freq_table = exynos4x12_freq_table; 221 - info->set_freq = exynos4x12_set_frequency; 222 - 223 - cpufreq = info; 224 - 225 - return 0; 226 - 227 - err_mout_apll: 228 - clk_put(mout_mpll); 229 - err_mout_mpll: 230 - clk_put(moutcore); 231 - err_moutcore: 232 - clk_put(cpu_clk); 233 - 234 - pr_debug("%s: failed initialization\n", __func__); 235 - return -EINVAL; 236 - }
-210
drivers/cpufreq/exynos5250-cpufreq.c
··· 1 - /* 2 - * Copyright (c) 2010-20122Samsung Electronics Co., Ltd. 3 - * http://www.samsung.com 4 - * 5 - * EXYNOS5250 - CPU frequency scaling 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/module.h> 13 - #include <linux/kernel.h> 14 - #include <linux/err.h> 15 - #include <linux/clk.h> 16 - #include <linux/io.h> 17 - #include <linux/slab.h> 18 - #include <linux/cpufreq.h> 19 - #include <linux/of.h> 20 - #include <linux/of_address.h> 21 - 22 - #include "exynos-cpufreq.h" 23 - 24 - static struct clk *cpu_clk; 25 - static struct clk *moutcore; 26 - static struct clk *mout_mpll; 27 - static struct clk *mout_apll; 28 - static struct exynos_dvfs_info *cpufreq; 29 - 30 - static unsigned int exynos5250_volt_table[] = { 31 - 1300000, 1250000, 1225000, 1200000, 1150000, 32 - 1125000, 1100000, 1075000, 1050000, 1025000, 33 - 1012500, 1000000, 975000, 950000, 937500, 34 - 925000 35 - }; 36 - 37 - static struct cpufreq_frequency_table exynos5250_freq_table[] = { 38 - {0, L0, 1700 * 1000}, 39 - {0, L1, 1600 * 1000}, 40 - {0, L2, 1500 * 1000}, 41 - {0, L3, 1400 * 1000}, 42 - {0, L4, 1300 * 1000}, 43 - {0, L5, 1200 * 1000}, 44 - {0, L6, 1100 * 1000}, 45 - {0, L7, 1000 * 1000}, 46 - {0, L8, 900 * 1000}, 47 - {0, L9, 800 * 1000}, 48 - {0, L10, 700 * 1000}, 49 - {0, L11, 600 * 1000}, 50 - {0, L12, 500 * 1000}, 51 - {0, L13, 400 * 1000}, 52 - {0, L14, 300 * 1000}, 53 - {0, L15, 200 * 1000}, 54 - {0, 0, CPUFREQ_TABLE_END}, 55 - }; 56 - 57 - static struct apll_freq apll_freq_5250[] = { 58 - /* 59 - * values: 60 - * freq 61 - * clock divider for ARM, CPUD, ACP, PERIPH, ATB, PCLK_DBG, APLL, ARM2 62 - * clock divider for COPY, HPM, RESERVED 63 - * PLL M, P, S 64 - */ 65 - APLL_FREQ(1700, 0, 3, 7, 7, 7, 3, 5, 0, 0, 2, 0, 425, 6, 0), 66 - APLL_FREQ(1600, 0, 3, 7, 7, 7, 1, 4, 0, 0, 2, 0, 200, 3, 0), 67 - APLL_FREQ(1500, 0, 2, 7, 7, 7, 1, 4, 0, 0, 2, 0, 250, 4, 0), 68 - APLL_FREQ(1400, 0, 2, 7, 7, 6, 1, 4, 0, 0, 2, 0, 175, 3, 0), 69 - APLL_FREQ(1300, 0, 2, 7, 7, 6, 1, 3, 0, 0, 2, 0, 325, 6, 0), 70 - APLL_FREQ(1200, 0, 2, 7, 7, 5, 1, 3, 0, 0, 2, 0, 200, 4, 0), 71 - APLL_FREQ(1100, 0, 3, 7, 7, 5, 1, 3, 0, 0, 2, 0, 275, 6, 0), 72 - APLL_FREQ(1000, 0, 1, 7, 7, 4, 1, 2, 0, 0, 2, 0, 125, 3, 0), 73 - APLL_FREQ(900, 0, 1, 7, 7, 4, 1, 2, 0, 0, 2, 0, 150, 4, 0), 74 - APLL_FREQ(800, 0, 1, 7, 7, 4, 1, 2, 0, 0, 2, 0, 100, 3, 0), 75 - APLL_FREQ(700, 0, 1, 7, 7, 3, 1, 1, 0, 0, 2, 0, 175, 3, 1), 76 - APLL_FREQ(600, 0, 1, 7, 7, 3, 1, 1, 0, 0, 2, 0, 200, 4, 1), 77 - APLL_FREQ(500, 0, 1, 7, 7, 2, 1, 1, 0, 0, 2, 0, 125, 3, 1), 78 - APLL_FREQ(400, 0, 1, 7, 7, 2, 1, 1, 0, 0, 2, 0, 100, 3, 1), 79 - APLL_FREQ(300, 0, 1, 7, 7, 1, 1, 1, 0, 0, 2, 0, 200, 4, 2), 80 - APLL_FREQ(200, 0, 1, 7, 7, 1, 1, 1, 0, 0, 2, 0, 100, 3, 2), 81 - }; 82 - 83 - static void set_clkdiv(unsigned int div_index) 84 - { 85 - unsigned int tmp; 86 - 87 - /* Change Divider - CPU0 */ 88 - 89 - tmp = apll_freq_5250[div_index].clk_div_cpu0; 90 - 91 - __raw_writel(tmp, cpufreq->cmu_regs + EXYNOS5_CLKDIV_CPU0); 92 - 93 - while (__raw_readl(cpufreq->cmu_regs + EXYNOS5_CLKDIV_STATCPU0) 94 - & 0x11111111) 95 - cpu_relax(); 96 - 97 - /* Change Divider - CPU1 */ 98 - tmp = apll_freq_5250[div_index].clk_div_cpu1; 99 - 100 - __raw_writel(tmp, cpufreq->cmu_regs + EXYNOS5_CLKDIV_CPU1); 101 - 102 - while (__raw_readl(cpufreq->cmu_regs + EXYNOS5_CLKDIV_STATCPU1) & 0x11) 103 - cpu_relax(); 104 - } 105 - 106 - static void set_apll(unsigned int index) 107 - { 108 - unsigned int tmp; 109 - unsigned int freq = apll_freq_5250[index].freq; 110 - 111 - /* MUX_CORE_SEL = MPLL, ARMCLK uses MPLL for lock time */ 112 - clk_set_parent(moutcore, mout_mpll); 113 - 114 - do { 115 - cpu_relax(); 116 - tmp = (__raw_readl(cpufreq->cmu_regs + EXYNOS5_CLKMUX_STATCPU) 117 - >> 16); 118 - tmp &= 0x7; 119 - } while (tmp != 0x2); 120 - 121 - clk_set_rate(mout_apll, freq * 1000); 122 - 123 - /* MUX_CORE_SEL = APLL */ 124 - clk_set_parent(moutcore, mout_apll); 125 - 126 - do { 127 - cpu_relax(); 128 - tmp = __raw_readl(cpufreq->cmu_regs + EXYNOS5_CLKMUX_STATCPU); 129 - tmp &= (0x7 << 16); 130 - } while (tmp != (0x1 << 16)); 131 - } 132 - 133 - static void exynos5250_set_frequency(unsigned int old_index, 134 - unsigned int new_index) 135 - { 136 - if (old_index > new_index) { 137 - set_clkdiv(new_index); 138 - set_apll(new_index); 139 - } else if (old_index < new_index) { 140 - set_apll(new_index); 141 - set_clkdiv(new_index); 142 - } 143 - } 144 - 145 - int exynos5250_cpufreq_init(struct exynos_dvfs_info *info) 146 - { 147 - struct device_node *np; 148 - unsigned long rate; 149 - 150 - /* 151 - * HACK: This is a temporary workaround to get access to clock 152 - * controller registers directly and remove static mappings and 153 - * dependencies on platform headers. It is necessary to enable 154 - * Exynos multi-platform support and will be removed together with 155 - * this whole driver as soon as Exynos gets migrated to use 156 - * cpufreq-dt driver. 157 - */ 158 - np = of_find_compatible_node(NULL, NULL, "samsung,exynos5250-clock"); 159 - if (!np) { 160 - pr_err("%s: failed to find clock controller DT node\n", 161 - __func__); 162 - return -ENODEV; 163 - } 164 - 165 - info->cmu_regs = of_iomap(np, 0); 166 - if (!info->cmu_regs) { 167 - pr_err("%s: failed to map CMU registers\n", __func__); 168 - return -EFAULT; 169 - } 170 - 171 - cpu_clk = clk_get(NULL, "armclk"); 172 - if (IS_ERR(cpu_clk)) 173 - return PTR_ERR(cpu_clk); 174 - 175 - moutcore = clk_get(NULL, "mout_cpu"); 176 - if (IS_ERR(moutcore)) 177 - goto err_moutcore; 178 - 179 - mout_mpll = clk_get(NULL, "mout_mpll"); 180 - if (IS_ERR(mout_mpll)) 181 - goto err_mout_mpll; 182 - 183 - rate = clk_get_rate(mout_mpll) / 1000; 184 - 185 - mout_apll = clk_get(NULL, "mout_apll"); 186 - if (IS_ERR(mout_apll)) 187 - goto err_mout_apll; 188 - 189 - info->mpll_freq_khz = rate; 190 - /* 800Mhz */ 191 - info->pll_safe_idx = L9; 192 - info->cpu_clk = cpu_clk; 193 - info->volt_table = exynos5250_volt_table; 194 - info->freq_table = exynos5250_freq_table; 195 - info->set_freq = exynos5250_set_frequency; 196 - 197 - cpufreq = info; 198 - 199 - return 0; 200 - 201 - err_mout_apll: 202 - clk_put(mout_mpll); 203 - err_mout_mpll: 204 - clk_put(moutcore); 205 - err_moutcore: 206 - clk_put(cpu_clk); 207 - 208 - pr_err("%s: failed initialization\n", __func__); 209 - return -EINVAL; 210 - }
+1
drivers/reset/reset-ath79.c
··· 89 89 if (IS_ERR(ath79_reset->base)) 90 90 return PTR_ERR(ath79_reset->base); 91 91 92 + spin_lock_init(&ath79_reset->lock); 92 93 ath79_reset->rcdev.ops = &ath79_reset_ops; 93 94 ath79_reset->rcdev.owner = THIS_MODULE; 94 95 ath79_reset->rcdev.of_node = pdev->dev.of_node;
+15 -7
drivers/soc/qcom/smd.c
··· 96 96 * @smd: handle to qcom_smd 97 97 * @of_node: of_node handle for information related to this edge 98 98 * @edge_id: identifier of this edge 99 + * @remote_pid: identifier of remote processor 99 100 * @irq: interrupt for signals on this edge 100 101 * @ipc_regmap: regmap handle holding the outgoing ipc register 101 102 * @ipc_offset: offset within @ipc_regmap of the register for ipc ··· 112 111 struct qcom_smd *smd; 113 112 struct device_node *of_node; 114 113 unsigned edge_id; 114 + unsigned remote_pid; 115 115 116 116 int irq; 117 117 ··· 312 310 SET_TX_CHANNEL_INFO(channel, fHEAD, 0); 313 311 SET_TX_CHANNEL_INFO(channel, fTAIL, 0); 314 312 SET_TX_CHANNEL_INFO(channel, fSTATE, 1); 315 - SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 0); 313 + SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 1); 316 314 SET_TX_CHANNEL_INFO(channel, head, 0); 317 315 SET_TX_CHANNEL_INFO(channel, tail, 0); 318 316 ··· 574 572 * have to scan if the amount of available space in smem have changed 575 573 * since last scan. 576 574 */ 577 - available = qcom_smem_get_free_space(edge->edge_id); 575 + available = qcom_smem_get_free_space(edge->remote_pid); 578 576 if (available != edge->smem_available) { 579 577 edge->smem_available = available; 580 578 edge->need_rescan = true; ··· 683 681 goto out; 684 682 } 685 683 686 - SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 1); 684 + SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 0); 687 685 688 686 ret = wait_event_interruptible(channel->fblockread_event, 689 687 qcom_smd_get_tx_avail(channel) >= tlen || ··· 691 689 if (ret) 692 690 goto out; 693 691 694 - SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 0); 692 + SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 1); 695 693 } 696 694 697 695 SET_TX_CHANNEL_INFO(channel, fTAIL, 0); ··· 978 976 spin_lock_init(&channel->recv_lock); 979 977 init_waitqueue_head(&channel->fblockread_event); 980 978 981 - ret = qcom_smem_get(edge->edge_id, smem_info_item, (void **)&info, &info_size); 979 + ret = qcom_smem_get(edge->remote_pid, smem_info_item, (void **)&info, 980 + &info_size); 982 981 if (ret) 983 982 goto free_name_and_channel; 984 983 ··· 1000 997 goto free_name_and_channel; 1001 998 } 1002 999 1003 - ret = qcom_smem_get(edge->edge_id, smem_fifo_item, &fifo_base, &fifo_size); 1000 + ret = qcom_smem_get(edge->remote_pid, smem_fifo_item, &fifo_base, 1001 + &fifo_size); 1004 1002 if (ret) 1005 1003 goto free_name_and_channel; 1006 1004 ··· 1045 1041 int i; 1046 1042 1047 1043 for (tbl = 0; tbl < SMD_ALLOC_TBL_COUNT; tbl++) { 1048 - ret = qcom_smem_get(edge->edge_id, 1044 + ret = qcom_smem_get(edge->remote_pid, 1049 1045 smem_items[tbl].alloc_tbl_id, 1050 1046 (void **)&alloc_tbl, 1051 1047 NULL); ··· 1187 1183 dev_err(dev, "edge missing %s property\n", key); 1188 1184 return -EINVAL; 1189 1185 } 1186 + 1187 + edge->remote_pid = QCOM_SMEM_HOST_ANY; 1188 + key = "qcom,remote-pid"; 1189 + of_property_read_u32(node, key, &edge->remote_pid); 1190 1190 1191 1191 syscon_np = of_parse_phandle(node, "qcom,ipc", 0); 1192 1192 if (!syscon_np) {
+6 -12
drivers/soc/qcom/smem.c
··· 258 258 size_t alloc_size; 259 259 void *p; 260 260 261 - /* We're not going to find it if there's no matching partition */ 262 - if (host >= SMEM_HOST_COUNT || !smem->partitions[host]) 263 - return -ENOENT; 264 - 265 261 phdr = smem->partitions[host]; 266 262 267 263 p = (void *)phdr + sizeof(*phdr); ··· 367 371 if (ret) 368 372 return ret; 369 373 370 - ret = qcom_smem_alloc_private(__smem, host, item, size); 371 - if (ret == -ENOENT) 374 + if (host < SMEM_HOST_COUNT && __smem->partitions[host]) 375 + ret = qcom_smem_alloc_private(__smem, host, item, size); 376 + else 372 377 ret = qcom_smem_alloc_global(__smem, item, size); 373 378 374 379 hwspin_unlock_irqrestore(__smem->hwlock, &flags); ··· 425 428 struct smem_private_entry *hdr; 426 429 void *p; 427 430 428 - /* We're not going to find it if there's no matching partition */ 429 - if (host >= SMEM_HOST_COUNT || !smem->partitions[host]) 430 - return -ENOENT; 431 - 432 431 phdr = smem->partitions[host]; 433 432 434 433 p = (void *)phdr + sizeof(*phdr); ··· 477 484 if (ret) 478 485 return ret; 479 486 480 - ret = qcom_smem_get_private(__smem, host, item, ptr, size); 481 - if (ret == -ENOENT) 487 + if (host < SMEM_HOST_COUNT && __smem->partitions[host]) 488 + ret = qcom_smem_get_private(__smem, host, item, ptr, size); 489 + else 482 490 ret = qcom_smem_get_global(__smem, item, ptr, size); 483 491 484 492 hwspin_unlock_irqrestore(__smem->hwlock, &flags);
+14
include/linux/reset.h
··· 74 74 return -ENOSYS; 75 75 } 76 76 77 + static inline struct reset_control *__must_check reset_control_get( 78 + struct device *dev, const char *id) 79 + { 80 + WARN_ON(1); 81 + return ERR_PTR(-EINVAL); 82 + } 83 + 84 + static inline struct reset_control *__must_check devm_reset_control_get( 85 + struct device *dev, const char *id) 86 + { 87 + WARN_ON(1); 88 + return ERR_PTR(-EINVAL); 89 + } 90 + 77 91 static inline struct reset_control *reset_control_get_optional( 78 92 struct device *dev, const char *id) 79 93 {