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

Merge tag 'tags/cleanup2-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC late cleanups from Arnd Bergmann:
"These could not be part of the first cleanup branch, because they
either came too late in the cycle, or they have dependencies on other
branches. Important changes are:

- The integrator platform is almost multiplatform capable after some
reorganization (Linus Walleij)
- Minor cleanups on Zynq (Michal Simek)
- Lots of changes for Exynos and other Samsung platforms, including
further preparations for multiplatform support and the clocks
bindings are rearranged"

* tag 'tags/cleanup2-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits)
devicetree: fix newly added exynos sata bindings
ARM: EXYNOS: Fix compilation error in cpuidle.c
ARM: S5P64X0: Explicitly include linux/serial_s3c.h in mach/pm-core.h
ARM: EXYNOS: Remove hardware.h file
ARM: SAMSUNG: Remove hardware.h inclusion
ARM: S3C24XX: Remove invalid code from hardware.h
dt-bindings: clock: Move exynos-audss-clk.h to dt-bindings/clock
ARM: dts: Keep some essential LDOs enabled for arndale-octa board
ARM: dts: Disable MDMA1 node for arndale-octa board
ARM: S3C64XX: Fix build for implicit serial_s3c.h inclusion
serial: s3c: Fix build of header without serial_core.h preinclusion
ARM: EXYNOS: Allow wake-up using GIC interrupts
ARM: EXYNOS: Stop using legacy Samsung PM code
ARM: EXYNOS: Remove PM initcalls and useless indirection
ARM: EXYNOS: Fix abuse of CONFIG_PM
ARM: SAMSUNG: Move s3c_pm_check_* prototypes to plat/pm-common.h
ARM: SAMSUNG: Move common save/restore helpers to separate file
ARM: SAMSUNG: Move Samsung PM debug code into separate file
ARM: SAMSUNG: Consolidate PM debug functions
ARM: SAMSUNG: Use debug_ll_addr() to get UART base address
...

+1157 -1370
-14
Documentation/devicetree/bindings/ata/exynos-sata-phy.txt
··· 1 - * Samsung SATA PHY Controller 2 - 3 - SATA PHY nodes are defined to describe on-chip SATA Physical layer controllers. 4 - Each SATA PHY controller should have its own node. 5 - 6 - Required properties: 7 - - compatible : compatible list, contains "samsung,exynos5-sata-phy" 8 - - reg : <registers mapping> 9 - 10 - Example: 11 - sata@ffe07000 { 12 - compatible = "samsung,exynos5-sata-phy"; 13 - reg = <0xffe07000 0x1000>; 14 - };
+22 -9
Documentation/devicetree/bindings/ata/exynos-sata.txt
··· 4 4 Each SATA controller should have its own node. 5 5 6 6 Required properties: 7 - - compatible : compatible list, contains "samsung,exynos5-sata" 8 - - interrupts : <interrupt mapping for SATA IRQ> 9 - - reg : <registers mapping> 10 - - samsung,sata-freq : <frequency in MHz> 7 + - compatible : compatible list, contains "samsung,exynos5-sata" 8 + - interrupts : <interrupt mapping for SATA IRQ> 9 + - reg : <registers mapping> 10 + - samsung,sata-freq : <frequency in MHz> 11 + - phys : Must contain exactly one entry as specified 12 + in phy-bindings.txt 13 + - phy-names : Must be "sata-phy" 14 + 15 + Optional properties: 16 + - clocks : Must contain an entry for each entry in clock-names. 17 + - clock-names : Shall be "sata" for the external SATA bus clock, 18 + and "sclk_sata" for the internal controller clock. 11 19 12 20 Example: 13 - sata@ffe08000 { 14 - compatible = "samsung,exynos5-sata"; 15 - reg = <0xffe08000 0x1000>; 16 - interrupts = <115>; 17 - }; 21 + sata@122f0000 { 22 + compatible = "snps,dwc-ahci"; 23 + samsung,sata-freq = <66>; 24 + reg = <0x122f0000 0x1ff>; 25 + interrupts = <0 115 0>; 26 + clocks = <&clock 277>, <&clock 143>; 27 + clock-names = "sata", "sclk_sata"; 28 + phys = <&sata_phy>; 29 + phy-names = "sata-phy"; 30 + };
+3 -1
Documentation/devicetree/bindings/clock/zynq-7000.txt
··· 14 14 Required properties: 15 15 - #clock-cells : Must be 1 16 16 - compatible : "xlnx,ps7-clkc" 17 + - reg : SLCR offset and size taken via syscon < 0x100 0x100 > 17 18 - ps-clk-frequency : Frequency of the oscillator providing ps_clk in HZ 18 19 (usually 33 MHz oscillators are used for Zynq platforms) 19 20 - clock-output-names : List of strings used to name the clock outputs. Shall be ··· 88 87 47: dbg_apb 89 88 90 89 Example: 91 - clkc: clkc { 90 + clkc: clkc@100 { 92 91 #clock-cells = <1>; 93 92 compatible = "xlnx,ps7-clkc"; 94 93 ps-clk-frequency = <33333333>; 94 + reg = <0x100 0x100>; 95 95 clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x", 96 96 "cpu_3or2x", "cpu_2x", "cpu_1x", "ddr2x", "ddr3x", 97 97 "dci", "lqspi", "smc", "pcap", "gem0", "gem1",
+40
Documentation/devicetree/bindings/phy/samsung-phy.txt
··· 74 74 75 75 Refer to DT bindings documentation of particular PHY consumer devices for more 76 76 information about required PHYs and the way of specification. 77 + 78 + Samsung SATA PHY Controller 79 + --------------------------- 80 + 81 + SATA PHY nodes are defined to describe on-chip SATA Physical layer controllers. 82 + Each SATA PHY controller should have its own node. 83 + 84 + Required properties: 85 + - compatible : compatible list, contains "samsung,exynos5250-sata-phy" 86 + - reg : offset and length of the SATA PHY register set; 87 + - #phy-cells : must be zero 88 + - clocks : must be exactly one entry 89 + - clock-names : must be "sata_phyctrl" 90 + - samsung,exynos-sataphy-i2c-phandle : a phandle to the I2C device, no arguments 91 + - samsung,syscon-phandle : a phandle to the PMU system controller, no arguments 92 + 93 + Example: 94 + sata_phy: sata-phy@12170000 { 95 + compatible = "samsung,exynos5250-sata-phy"; 96 + reg = <0x12170000 0x1ff>; 97 + clocks = <&clock 287>; 98 + clock-names = "sata_phyctrl"; 99 + #phy-cells = <0>; 100 + samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>; 101 + samsung,syscon-phandle = <&pmu_syscon>; 102 + }; 103 + 104 + Device-Tree bindings for sataphy i2c client driver 105 + -------------------------------------------------- 106 + 107 + Required properties: 108 + compatible: Should be "samsung,exynos-sataphy-i2c" 109 + - reg: I2C address of the sataphy i2c device. 110 + 111 + Example: 112 + 113 + sata_phy_i2c:sata-phy@38 { 114 + compatible = "samsung,exynos-sataphy-i2c"; 115 + reg = <0x38>; 116 + };
+2 -2
arch/arm/Kconfig.debug
··· 1141 1141 1142 1142 config DEBUG_UNCOMPRESS 1143 1143 bool 1144 - depends on ARCH_MULTIPLATFORM || ARCH_MSM || ARCH_EXYNOS 1144 + depends on ARCH_MULTIPLATFORM || ARCH_MSM || PLAT_SAMSUNG 1145 1145 default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ 1146 1146 (!DEBUG_TEGRA_UART || !ZBOOT_ROM) 1147 1147 help ··· 1158 1158 config UNCOMPRESS_INCLUDE 1159 1159 string 1160 1160 default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \ 1161 - ARCH_EXYNOS || ARCH_EFM32 1161 + PLAT_SAMSUNG || ARCH_EFM32 1162 1162 default "mach/uncompress.h" 1163 1163 1164 1164 config EARLY_PRINTK
+5
arch/arm/boot/dts/exynos4.dtsi
··· 86 86 reg = <0x10023CE0 0x20>; 87 87 }; 88 88 89 + pd_gps_alive: gps-alive-power-domain@10023D00 { 90 + compatible = "samsung,exynos4210-pd"; 91 + reg = <0x10023D00 0x20>; 92 + }; 93 + 89 94 gic: interrupt-controller@10490000 { 90 95 compatible = "arm,cortex-a9-gic"; 91 96 #interrupt-cells = <3>;
+1 -1
arch/arm/boot/dts/exynos4210-origen.dts
··· 19 19 20 20 / { 21 21 model = "Insignal Origen evaluation board based on Exynos4210"; 22 - compatible = "insignal,origen", "samsung,exynos4210"; 22 + compatible = "insignal,origen", "samsung,exynos4210", "samsung,exynos4"; 23 23 24 24 memory { 25 25 reg = <0x40000000 0x10000000
+1 -1
arch/arm/boot/dts/exynos4210-smdkv310.dts
··· 19 19 20 20 / { 21 21 model = "Samsung smdkv310 evaluation board based on Exynos4210"; 22 - compatible = "samsung,smdkv310", "samsung,exynos4210"; 22 + compatible = "samsung,smdkv310", "samsung,exynos4210", "samsung,exynos4"; 23 23 24 24 memory { 25 25 reg = <0x40000000 0x80000000>;
+1 -1
arch/arm/boot/dts/exynos4210-trats.dts
··· 17 17 18 18 / { 19 19 model = "Samsung Trats based on Exynos4210"; 20 - compatible = "samsung,trats", "samsung,exynos4210"; 20 + compatible = "samsung,trats", "samsung,exynos4210", "samsung,exynos4"; 21 21 22 22 memory { 23 23 reg = <0x40000000 0x10000000
+1 -1
arch/arm/boot/dts/exynos4210-universal_c210.dts
··· 17 17 18 18 / { 19 19 model = "Samsung Universal C210 based on Exynos4210 rev0"; 20 - compatible = "samsung,universal_c210", "samsung,exynos4210"; 20 + compatible = "samsung,universal_c210", "samsung,exynos4210", "samsung,exynos4"; 21 21 22 22 memory { 23 23 reg = <0x40000000 0x10000000
+1 -1
arch/arm/boot/dts/exynos4210.dtsi
··· 23 23 #include "exynos4210-pinctrl.dtsi" 24 24 25 25 / { 26 - compatible = "samsung,exynos4210"; 26 + compatible = "samsung,exynos4210", "samsung,exynos4"; 27 27 28 28 aliases { 29 29 pinctrl0 = &pinctrl_0;
+5 -10
arch/arm/boot/dts/exynos4212.dtsi
··· 20 20 #include "exynos4x12.dtsi" 21 21 22 22 / { 23 - compatible = "samsung,exynos4212"; 23 + compatible = "samsung,exynos4212", "samsung,exynos4"; 24 + 25 + combiner: interrupt-controller@10440000 { 26 + samsung,combiner-nr = <18>; 27 + }; 24 28 25 29 gic: interrupt-controller@10490000 { 26 30 cpu-offset = <0x8000>; 27 - }; 28 - 29 - interrupt-controller@10440000 { 30 - samsung,combiner-nr = <18>; 31 - interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>, 32 - <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>, 33 - <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>, 34 - <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>, 35 - <0 107 0>, <0 108 0>; 36 31 }; 37 32 };
+1 -1
arch/arm/boot/dts/exynos4412-odroidx.dts
··· 16 16 17 17 / { 18 18 model = "Hardkernel ODROID-X board based on Exynos4412"; 19 - compatible = "hardkernel,odroid-x", "samsung,exynos4412"; 19 + compatible = "hardkernel,odroid-x", "samsung,exynos4412", "samsung,exynos4"; 20 20 21 21 memory { 22 22 reg = <0x40000000 0x40000000>;
+1 -1
arch/arm/boot/dts/exynos4412-origen.dts
··· 17 17 18 18 / { 19 19 model = "Insignal Origen evaluation board based on Exynos4412"; 20 - compatible = "insignal,origen4412", "samsung,exynos4412"; 20 + compatible = "insignal,origen4412", "samsung,exynos4412", "samsung,exynos4"; 21 21 22 22 memory { 23 23 reg = <0x40000000 0x40000000>;
+1 -1
arch/arm/boot/dts/exynos4412-smdk4412.dts
··· 17 17 18 18 / { 19 19 model = "Samsung SMDK evaluation board based on Exynos4412"; 20 - compatible = "samsung,smdk4412", "samsung,exynos4412"; 20 + compatible = "samsung,smdk4412", "samsung,exynos4412", "samsung,exynos4"; 21 21 22 22 memory { 23 23 reg = <0x40000000 0x40000000>;
+1 -1
arch/arm/boot/dts/exynos4412-tiny4412.dts
··· 16 16 17 17 / { 18 18 model = "FriendlyARM TINY4412 board based on Exynos4412"; 19 - compatible = "friendlyarm,tiny4412", "samsung,exynos4412"; 19 + compatible = "friendlyarm,tiny4412", "samsung,exynos4412", "samsung,exynos4"; 20 20 21 21 memory { 22 22 reg = <0x40000000 0x40000000>;
+22 -1
arch/arm/boot/dts/exynos4412-trats2.dts
··· 17 17 18 18 / { 19 19 model = "Samsung Trats 2 based on Exynos4412"; 20 - compatible = "samsung,trats2", "samsung,exynos4412"; 20 + compatible = "samsung,trats2", "samsung,exynos4412", "samsung,exynos4"; 21 21 22 22 aliases { 23 23 i2c8 = &i2c_ak8975; ··· 104 104 debounce-interval = <10>; 105 105 gpio-key,wakeup; 106 106 }; 107 + }; 108 + 109 + adc: adc@126C0000 { 110 + vdd-supply = <&ldo3_reg>; 111 + status = "okay"; 107 112 }; 108 113 109 114 i2c@13890000 { ··· 593 588 }; 594 589 }; 595 590 }; 591 + }; 592 + 593 + thermistor-ap@0 { 594 + compatible = "ntc,ncp15wb473"; 595 + pullup-uv = <1800000>; /* VCC_1.8V_AP */ 596 + pullup-ohm = <100000>; /* 100K */ 597 + pulldown-ohm = <100000>; /* 100K */ 598 + io-channels = <&adc 1>; /* AP temperature */ 599 + }; 600 + 601 + thermistor-battery@1 { 602 + compatible = "ntc,ncp15wb473"; 603 + pullup-uv = <1800000>; /* VCC_1.8V_AP */ 604 + pullup-ohm = <100000>; /* 100K */ 605 + pulldown-ohm = <100000>; /* 100K */ 606 + io-channels = <&adc 2>; /* Battery temperature */ 596 607 }; 597 608 };
+5 -11
arch/arm/boot/dts/exynos4412.dtsi
··· 20 20 #include "exynos4x12.dtsi" 21 21 22 22 / { 23 - compatible = "samsung,exynos4412"; 23 + compatible = "samsung,exynos4412", "samsung,exynos4"; 24 + 25 + combiner: interrupt-controller@10440000 { 26 + samsung,combiner-nr = <20>; 27 + }; 24 28 25 29 gic: interrupt-controller@10490000 { 26 30 cpu-offset = <0x4000>; 27 31 }; 28 - 29 - interrupt-controller@10440000 { 30 - samsung,combiner-nr = <20>; 31 - interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>, 32 - <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>, 33 - <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>, 34 - <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>, 35 - <0 107 0>, <0 108 0>, <0 48 0>, <0 42 0>; 36 - }; 37 - 38 32 };
+26
arch/arm/boot/dts/exynos4x12.dtsi
··· 31 31 mshc0 = &mshc_0; 32 32 }; 33 33 34 + pmu { 35 + compatible = "arm,cortex-a9-pmu"; 36 + interrupt-parent = <&combiner>; 37 + interrupts = <2 2>, <3 2>, <18 2>, <19 2>; 38 + }; 39 + 34 40 pd_isp: isp-power-domain@10023CA0 { 35 41 compatible = "samsung,exynos4210-pd"; 36 42 reg = <0x10023CA0 0x20>; ··· 68 62 }; 69 63 }; 70 64 65 + combiner: interrupt-controller@10440000 { 66 + interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>, 67 + <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>, 68 + <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>, 69 + <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>, 70 + <0 107 0>, <0 108 0>, <0 48 0>, <0 42 0>; 71 + }; 72 + 71 73 pinctrl_0: pinctrl@11400000 { 72 74 compatible = "samsung,exynos4x12-pinctrl"; 73 75 reg = <0x11400000 0x1000>; ··· 92 78 interrupt-parent = <&gic>; 93 79 interrupts = <0 32 0>; 94 80 }; 81 + }; 82 + 83 + adc: adc@126C0000 { 84 + compatible = "samsung,exynos-adc-v1"; 85 + reg = <0x126C0000 0x100>, <0x10020718 0x4>; 86 + interrupt-parent = <&combiner>; 87 + interrupts = <10 3>; 88 + clocks = <&clock CLK_TSADC>; 89 + clock-names = "adc"; 90 + #io-channel-cells = <1>; 91 + io-channel-ranges; 92 + status = "disabled"; 95 93 }; 96 94 97 95 pinctrl_2: pinctrl@03860000 {
+22 -1
arch/arm/boot/dts/exynos5250-arndale.dts
··· 15 15 16 16 / { 17 17 model = "Insignal Arndale evaluation board based on EXYNOS5250"; 18 - compatible = "insignal,arndale", "samsung,exynos5250"; 18 + compatible = "insignal,arndale", "samsung,exynos5250", "samsung,exynos5"; 19 19 20 20 memory { 21 21 reg = <0x40000000 0x80000000>; ··· 373 373 compatible = "samsung,exynos4212-hdmiphy"; 374 374 reg = <0x38>; 375 375 }; 376 + }; 377 + 378 + i2c@121D0000 { 379 + status = "okay"; 380 + samsung,i2c-sda-delay = <100>; 381 + samsung,i2c-max-bus-freq = <40000>; 382 + samsung,i2c-slave-addr = <0x38>; 383 + 384 + sata_phy_i2c:sata-phy@38 { 385 + compatible = "samsung,exynos-sataphy-i2c"; 386 + reg = <0x38>; 387 + }; 388 + }; 389 + 390 + sata@122F0000 { 391 + status = "okay"; 392 + }; 393 + 394 + sata-phy@12170000 { 395 + status = "okay"; 396 + samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>; 376 397 }; 377 398 378 399 mmc_0: mmc@12200000 {
+12 -11
arch/arm/boot/dts/exynos5250-smdk5250.dts
··· 14 14 15 15 / { 16 16 model = "SAMSUNG SMDK5250 board based on EXYNOS5250"; 17 - compatible = "samsung,smdk5250", "samsung,exynos5250"; 17 + compatible = "samsung,smdk5250", "samsung,exynos5250", "samsung,exynos5"; 18 18 19 19 aliases { 20 20 }; ··· 242 242 samsung,i2c-slave-addr = <0x38>; 243 243 status = "okay"; 244 244 245 - sata-phy { 246 - compatible = "samsung,sata-phy"; 245 + sata_phy_i2c:sata-phy@38 { 246 + compatible = "samsung,exynos-sataphy-i2c"; 247 247 reg = <0x38>; 248 248 }; 249 - }; 250 - 251 - sata@122F0000 { 252 - samsung,sata-freq = <66>; 253 249 }; 254 250 255 251 i2c@12C80000 { ··· 268 272 compatible = "samsung,exynos4212-hdmiphy"; 269 273 reg = <0x38>; 270 274 }; 275 + }; 276 + 277 + sata@122F0000 { 278 + status = "okay"; 279 + }; 280 + 281 + sata-phy@12170000 { 282 + status = "okay"; 283 + samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>; 271 284 }; 272 285 273 286 mmc@12200000 { ··· 313 308 bus-width = <4>; 314 309 disable-wp; 315 310 }; 316 - }; 317 - 318 - spi_0: spi@12d20000 { 319 - status = "disabled"; 320 311 }; 321 312 322 313 spi_1: spi@12d30000 {
+1 -1
arch/arm/boot/dts/exynos5250-snow.dts
··· 14 14 15 15 / { 16 16 model = "Google Snow"; 17 - compatible = "google,snow", "samsung,exynos5250"; 17 + compatible = "google,snow", "samsung,exynos5250", "samsung,exynos5"; 18 18 19 19 aliases { 20 20 i2c104 = &i2c_104;
+24 -6
arch/arm/boot/dts/exynos5250.dtsi
··· 21 21 #include "exynos5.dtsi" 22 22 #include "exynos5250-pinctrl.dtsi" 23 23 24 - #include <dt-bindings/clk/exynos-audss-clk.h> 24 + #include <dt-bindings/clock/exynos-audss-clk.h> 25 25 26 26 / { 27 - compatible = "samsung,exynos5250"; 27 + compatible = "samsung,exynos5250", "samsung,exynos5"; 28 28 29 29 aliases { 30 30 spi0 = &spi_0; ··· 47 47 i2c6 = &i2c_6; 48 48 i2c7 = &i2c_7; 49 49 i2c8 = &i2c_8; 50 + i2c9 = &i2c_9; 50 51 pinctrl0 = &pinctrl_0; 51 52 pinctrl1 = &pinctrl_1; 52 53 pinctrl2 = &pinctrl_2; ··· 236 235 }; 237 236 238 237 sata@122F0000 { 239 - compatible = "samsung,exynos5-sata-ahci"; 238 + compatible = "snps,dwc-ahci"; 239 + samsung,sata-freq = <66>; 240 240 reg = <0x122F0000 0x1ff>; 241 241 interrupts = <0 115 0>; 242 242 clocks = <&clock CLK_SATA>, <&clock CLK_SCLK_SATA>; 243 243 clock-names = "sata", "sclk_sata"; 244 + phys = <&sata_phy>; 245 + phy-names = "sata-phy"; 246 + status = "disabled"; 244 247 }; 245 248 246 - sata-phy@12170000 { 247 - compatible = "samsung,exynos5-sata-phy"; 249 + sata_phy: sata-phy@12170000 { 250 + compatible = "samsung,exynos5250-sata-phy"; 248 251 reg = <0x12170000 0x1ff>; 252 + clocks = <&clock 287>; 253 + clock-names = "sata_phyctrl"; 254 + #phy-cells = <0>; 255 + samsung,syscon-phandle = <&pmu_system_controller>; 256 + status = "disabled"; 249 257 }; 250 258 251 259 i2c_0: i2c@12C60000 { ··· 372 362 status = "disabled"; 373 363 }; 374 364 375 - i2c@121D0000 { 365 + i2c_9: i2c@121D0000 { 376 366 compatible = "samsung,exynos5-sata-phy-i2c"; 377 367 reg = <0x121D0000 0x100>; 378 368 #address-cells = <1>; ··· 727 717 #io-channel-cells = <1>; 728 718 io-channel-ranges; 729 719 status = "disabled"; 720 + }; 721 + 722 + sss@10830000 { 723 + compatible = "samsung,exynos4210-secss"; 724 + reg = <0x10830000 0x10000>; 725 + interrupts = <0 112 0>; 726 + clocks = <&clock 348>; 727 + clock-names = "secss"; 730 728 }; 731 729 };
+16 -1
arch/arm/boot/dts/exynos5420-arndale-octa.dts
··· 16 16 17 17 / { 18 18 model = "Insignal Arndale Octa evaluation board based on EXYNOS5420"; 19 - compatible = "insignal,arndale-octa", "samsung,exynos5420"; 19 + compatible = "insignal,arndale-octa", "samsung,exynos5420", "samsung,exynos5"; 20 20 21 21 memory { 22 22 reg = <0x20000000 0x80000000>; ··· 113 113 regulator-name = "PVDD_APIO_MMCON_1V8"; 114 114 regulator-min-microvolt = <1800000>; 115 115 regulator-max-microvolt = <1800000>; 116 + regulator-always-on; 116 117 }; 117 118 118 119 ldo4_reg: LDO4 { ··· 151 150 regulator-name = "PVDD_USB_3V3"; 152 151 regulator-min-microvolt = <3000000>; 153 152 regulator-max-microvolt = <3000000>; 153 + regulator-always-on; 154 154 }; 155 155 156 156 ldo10_reg: LDO10 { ··· 220 218 regulator-name = "PVDD_MIFS_1V1"; 221 219 regulator-min-microvolt = <1200000>; 222 220 regulator-max-microvolt = <1200000>; 221 + regulator-always-on; 223 222 }; 224 223 225 224 ldo24_reg: LDO24 { ··· 362 359 gpios = <&gpx2 7 1>; 363 360 linux,code = <KEY_WAKEUP>; 364 361 gpio-key,wakeup; 362 + }; 363 + }; 364 + 365 + amba { 366 + mdma1: mdma@11C10000 { 367 + /* 368 + * MDMA1 can support both secure and non-secure 369 + * AXI transactions. When this is enabled in the kernel 370 + * for boards that run in secure mode, we are getting 371 + * imprecise external aborts causing the kernel to oops. 372 + */ 373 + status = "disabled"; 365 374 }; 366 375 }; 367 376 };
+1 -1
arch/arm/boot/dts/exynos5420-smdk5420.dts
··· 14 14 15 15 / { 16 16 model = "Samsung SMDK5420 board based on EXYNOS5420"; 17 - compatible = "samsung,smdk5420", "samsung,exynos5420"; 17 + compatible = "samsung,smdk5420", "samsung,exynos5420", "samsung,exynos5"; 18 18 19 19 memory { 20 20 reg = <0x20000000 0x80000000>;
+11 -2
arch/arm/boot/dts/exynos5420.dtsi
··· 17 17 #include "exynos5.dtsi" 18 18 #include "exynos5420-pinctrl.dtsi" 19 19 20 - #include <dt-bindings/clk/exynos-audss-clk.h> 20 + #include <dt-bindings/clock/exynos-audss-clk.h> 21 21 22 22 / { 23 - compatible = "samsung,exynos5420"; 23 + compatible = "samsung,exynos5420", "samsung,exynos5"; 24 24 25 25 aliases { 26 26 mshc0 = &mmc_0; ··· 723 723 clock-names = "watchdog"; 724 724 samsung,syscon-phandle = <&pmu_system_controller>; 725 725 }; 726 + 727 + sss@10830000 { 728 + compatible = "samsung,exynos4210-secss"; 729 + reg = <0x10830000 0x10000>; 730 + interrupts = <0 112 0>; 731 + clocks = <&clock 471>; 732 + clock-names = "secss"; 733 + samsung,power-domain = <&g2d_pd>; 734 + }; 726 735 };
+1 -1
arch/arm/boot/dts/exynos5440-sd5v1.dts
··· 14 14 15 15 / { 16 16 model = "SAMSUNG SD5v1 board based on EXYNOS5440"; 17 - compatible = "samsung,sd5v1", "samsung,exynos5440"; 17 + compatible = "samsung,sd5v1", "samsung,exynos5440", "samsung,exynos5"; 18 18 19 19 chosen { 20 20 bootargs = "root=/dev/sda2 rw rootwait ignore_loglevel earlyprintk no_console_suspend mem=2048M@0x80000000 mem=6144M@0x100000000 console=ttySAC0,115200";
+1 -1
arch/arm/boot/dts/exynos5440-ssdk5440.dts
··· 14 14 15 15 / { 16 16 model = "SAMSUNG SSDK5440 board based on EXYNOS5440"; 17 - compatible = "samsung,ssdk5440", "samsung,exynos5440"; 17 + compatible = "samsung,ssdk5440", "samsung,exynos5440", "samsung,exynos5"; 18 18 19 19 chosen { 20 20 bootargs = "root=/dev/sda2 rw rootwait ignore_loglevel earlyprintk no_console_suspend mem=2048M@0x80000000 mem=6144M@0x100000000 console=ttySAC0,115200";
+1 -1
arch/arm/boot/dts/exynos5440.dtsi
··· 13 13 #include "skeleton.dtsi" 14 14 15 15 / { 16 - compatible = "samsung,exynos5440"; 16 + compatible = "samsung,exynos5440", "samsung,exynos5"; 17 17 18 18 interrupt-parent = <&gic>; 19 19
+21 -23
arch/arm/boot/dts/zynq-7000.dtsi
··· 129 129 } ; 130 130 131 131 slcr: slcr@f8000000 { 132 - compatible = "xlnx,zynq-slcr"; 132 + #address-cells = <1>; 133 + #size-cells = <1>; 134 + compatible = "xlnx,zynq-slcr", "syscon"; 133 135 reg = <0xF8000000 0x1000>; 134 - 135 - clocks { 136 - #address-cells = <1>; 137 - #size-cells = <0>; 138 - 139 - clkc: clkc { 140 - #clock-cells = <1>; 141 - compatible = "xlnx,ps7-clkc"; 142 - ps-clk-frequency = <33333333>; 143 - fclk-enable = <0>; 144 - clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x", 145 - "cpu_3or2x", "cpu_2x", "cpu_1x", "ddr2x", "ddr3x", 146 - "dci", "lqspi", "smc", "pcap", "gem0", "gem1", 147 - "fclk0", "fclk1", "fclk2", "fclk3", "can0", "can1", 148 - "sdio0", "sdio1", "uart0", "uart1", "spi0", "spi1", 149 - "dma", "usb0_aper", "usb1_aper", "gem0_aper", 150 - "gem1_aper", "sdio0_aper", "sdio1_aper", 151 - "spi0_aper", "spi1_aper", "can0_aper", "can1_aper", 152 - "i2c0_aper", "i2c1_aper", "uart0_aper", "uart1_aper", 153 - "gpio_aper", "lqspi_aper", "smc_aper", "swdt", 154 - "dbg_trc", "dbg_apb"; 155 - }; 136 + ranges; 137 + clkc: clkc@100 { 138 + #clock-cells = <1>; 139 + compatible = "xlnx,ps7-clkc"; 140 + ps-clk-frequency = <33333333>; 141 + fclk-enable = <0>; 142 + clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x", 143 + "cpu_3or2x", "cpu_2x", "cpu_1x", "ddr2x", "ddr3x", 144 + "dci", "lqspi", "smc", "pcap", "gem0", "gem1", 145 + "fclk0", "fclk1", "fclk2", "fclk3", "can0", "can1", 146 + "sdio0", "sdio1", "uart0", "uart1", "spi0", "spi1", 147 + "dma", "usb0_aper", "usb1_aper", "gem0_aper", 148 + "gem1_aper", "sdio0_aper", "sdio1_aper", 149 + "spi0_aper", "spi1_aper", "can0_aper", "can1_aper", 150 + "i2c0_aper", "i2c1_aper", "uart0_aper", "uart1_aper", 151 + "gpio_aper", "lqspi_aper", "smc_aper", "swdt", 152 + "dbg_trc", "dbg_apb"; 153 + reg = <0x100 0x100>; 156 154 }; 157 155 }; 158 156
+3
arch/arm/include/debug/zynq.S
··· 42 42 .endm 43 43 44 44 .macro waituart,rd,rx 45 + 1001: ldr \rd, [\rx, #UART_SR_OFFSET] 46 + tst \rd, #UART_SR_TXEMPTY 47 + beq 1001b 45 48 .endm 46 49 47 50 .macro busyuart,rd,rx
+4 -12
arch/arm/mach-exynos/Kconfig
··· 24 24 select HAVE_SMP 25 25 select MIGHT_HAVE_CACHE_L2X0 26 26 select PINCTRL 27 - select PM_GENERIC_DOMAINS if PM 27 + select PM_GENERIC_DOMAINS if PM_RUNTIME 28 28 select S5P_DEV_MFC 29 29 help 30 30 Samsung EXYNOS4 SoCs based systems ··· 46 46 default y 47 47 depends on ARCH_EXYNOS4 48 48 select ARCH_HAS_BANDGAP 49 - select ARM_CPU_SUSPEND if PM 49 + select ARM_CPU_SUSPEND if PM_SLEEP 50 50 select PINCTRL_EXYNOS 51 - select S5P_PM if PM 52 - select S5P_SLEEP if PM 53 51 select SAMSUNG_DMADEV 54 52 help 55 53 Enable EXYNOS4210 CPU support ··· 58 60 depends on ARCH_EXYNOS4 59 61 select ARCH_HAS_BANDGAP 60 62 select PINCTRL_EXYNOS 61 - select S5P_PM if PM 62 - select S5P_SLEEP if PM 63 63 select SAMSUNG_DMADEV 64 64 help 65 65 Enable EXYNOS4212 SoC support ··· 78 82 depends on ARCH_EXYNOS5 79 83 select ARCH_HAS_BANDGAP 80 84 select PINCTRL_EXYNOS 81 - select PM_GENERIC_DOMAINS if PM 82 - select S5P_PM if PM 83 - select S5P_SLEEP if PM 85 + select PM_GENERIC_DOMAINS if PM_RUNTIME 84 86 select S5P_DEV_MFC 85 87 select SAMSUNG_DMADEV 86 88 help ··· 88 94 bool "SAMSUNG EXYNOS5420" 89 95 default y 90 96 depends on ARCH_EXYNOS5 91 - select PM_GENERIC_DOMAINS if PM 92 - select S5P_PM if PM 93 - select S5P_SLEEP if PM 97 + select PM_GENERIC_DOMAINS if PM_RUNTIME 94 98 help 95 99 Enable EXYNOS5420 SoC support 96 100
+2 -7
arch/arm/mach-exynos/Makefile
··· 12 12 13 13 # Core 14 14 15 - obj-$(CONFIG_ARCH_EXYNOS) += common.o 15 + obj-$(CONFIG_ARCH_EXYNOS) += exynos.o 16 16 17 - obj-$(CONFIG_S5P_PM) += pm.o 17 + obj-$(CONFIG_PM_SLEEP) += pm.o sleep.o 18 18 obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o 19 19 obj-$(CONFIG_CPU_IDLE) += cpuidle.o 20 20 ··· 29 29 30 30 plus_sec := $(call as-instr,.arch_extension sec,+sec) 31 31 AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec) 32 - 33 - # machine support 34 - 35 - obj-$(CONFIG_ARCH_EXYNOS4) += mach-exynos4-dt.o 36 - obj-$(CONFIG_ARCH_EXYNOS5) += mach-exynos5-dt.o
+111 -120
arch/arm/mach-exynos/common.c arch/arm/mach-exynos/exynos.c
··· 1 1 /* 2 - * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. 3 - * http://www.samsung.com 2 + * SAMSUNG EXYNOS Flattened Device Tree enabled machine 4 3 * 5 - * Common Codes for EXYNOS 4 + * Copyright (c) 2010-2014 Samsung Electronics Co., Ltd. 5 + * http://www.samsung.com 6 6 * 7 7 * This program is free software; you can redistribute it and/or modify 8 8 * it under the terms of the GNU General Public License version 2 as 9 9 * published by the Free Software Foundation. 10 10 */ 11 11 12 - #include <linux/kernel.h> 13 - #include <linux/bitops.h> 14 - #include <linux/interrupt.h> 15 - #include <linux/irq.h> 16 - #include <linux/irqchip.h> 12 + #include <linux/init.h> 17 13 #include <linux/io.h> 18 - #include <linux/device.h> 19 - #include <linux/gpio.h> 20 - #include <clocksource/samsung_pwm.h> 21 - #include <linux/sched.h> 22 - #include <linux/serial_core.h> 14 + #include <linux/kernel.h> 23 15 #include <linux/serial_s3c.h> 24 16 #include <linux/of.h> 25 - #include <linux/of_fdt.h> 26 - #include <linux/of_irq.h> 27 - #include <linux/pm_domain.h> 28 - #include <linux/export.h> 29 - #include <linux/irqdomain.h> 30 17 #include <linux/of_address.h> 31 - #include <linux/irqchip/arm-gic.h> 32 - #include <linux/irqchip/chained_irq.h> 18 + #include <linux/of_fdt.h> 19 + #include <linux/of_platform.h> 33 20 #include <linux/platform_device.h> 21 + #include <linux/pm_domain.h> 34 22 35 - #include <asm/proc-fns.h> 36 - #include <asm/exception.h> 37 - #include <asm/hardware/cache-l2x0.h> 38 - #include <asm/mach/map.h> 39 - #include <asm/mach/irq.h> 40 23 #include <asm/cacheflush.h> 24 + #include <asm/hardware/cache-l2x0.h> 25 + #include <asm/mach/arch.h> 26 + #include <asm/mach/map.h> 27 + #include <asm/memory.h> 41 28 42 29 #include <plat/cpu.h> 43 - #include <plat/pm.h> 44 30 45 31 #include "common.h" 32 + #include "mfc.h" 46 33 #include "regs-pmu.h" 47 34 48 35 #define L2_AUX_VAL 0x7C470001 49 36 #define L2_AUX_MASK 0xC200ffff 50 - 51 - static const char name_exynos4210[] = "EXYNOS4210"; 52 - static const char name_exynos4212[] = "EXYNOS4212"; 53 - static const char name_exynos4412[] = "EXYNOS4412"; 54 - static const char name_exynos5250[] = "EXYNOS5250"; 55 - static const char name_exynos5420[] = "EXYNOS5420"; 56 - static const char name_exynos5440[] = "EXYNOS5440"; 57 - 58 - static void exynos4_map_io(void); 59 - static void exynos5_map_io(void); 60 - static int exynos_init(void); 61 - 62 - static struct cpu_table cpu_ids[] __initdata = { 63 - { 64 - .idcode = EXYNOS4210_CPU_ID, 65 - .idmask = EXYNOS4_CPU_MASK, 66 - .map_io = exynos4_map_io, 67 - .init = exynos_init, 68 - .name = name_exynos4210, 69 - }, { 70 - .idcode = EXYNOS4212_CPU_ID, 71 - .idmask = EXYNOS4_CPU_MASK, 72 - .map_io = exynos4_map_io, 73 - .init = exynos_init, 74 - .name = name_exynos4212, 75 - }, { 76 - .idcode = EXYNOS4412_CPU_ID, 77 - .idmask = EXYNOS4_CPU_MASK, 78 - .map_io = exynos4_map_io, 79 - .init = exynos_init, 80 - .name = name_exynos4412, 81 - }, { 82 - .idcode = EXYNOS5250_SOC_ID, 83 - .idmask = EXYNOS5_SOC_MASK, 84 - .map_io = exynos5_map_io, 85 - .init = exynos_init, 86 - .name = name_exynos5250, 87 - }, { 88 - .idcode = EXYNOS5420_SOC_ID, 89 - .idmask = EXYNOS5_SOC_MASK, 90 - .map_io = exynos5_map_io, 91 - .init = exynos_init, 92 - .name = name_exynos5420, 93 - }, { 94 - .idcode = EXYNOS5440_SOC_ID, 95 - .idmask = EXYNOS5_SOC_MASK, 96 - .init = exynos_init, 97 - .name = name_exynos5440, 98 - }, 99 - }; 100 - 101 - /* Initial IO mappings */ 102 37 103 38 static struct map_desc exynos4_iodesc[] __initdata = { 104 39 { ··· 198 263 }, 199 264 }; 200 265 201 - void exynos4_restart(enum reboot_mode mode, const char *cmd) 202 - { 203 - __raw_writel(0x1, S5P_SWRESET); 204 - } 205 - 206 - void exynos5_restart(enum reboot_mode mode, const char *cmd) 266 + void exynos_restart(enum reboot_mode mode, const char *cmd) 207 267 { 208 268 struct device_node *np; 209 - u32 val; 210 - void __iomem *addr; 211 - 212 - val = 0x1; 213 - addr = EXYNOS_SWRESET; 269 + u32 val = 0x1; 270 + void __iomem *addr = EXYNOS_SWRESET; 214 271 215 272 if (of_machine_is_compatible("samsung,exynos5440")) { 216 273 u32 status; ··· 242 315 return; 243 316 244 317 pm_genpd_poweroff_unused(); 318 + exynos_pm_init(); 245 319 } 246 320 247 321 static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname, ··· 273 345 * 274 346 * register the standard cpu IO areas 275 347 */ 348 + static void __init exynos_map_io(void) 349 + { 350 + if (soc_is_exynos4()) 351 + iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc)); 352 + 353 + if (soc_is_exynos5()) 354 + iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); 355 + 356 + if (soc_is_exynos4210()) { 357 + if (samsung_rev() == EXYNOS4210_REV_0) 358 + iotable_init(exynos4_iodesc0, 359 + ARRAY_SIZE(exynos4_iodesc0)); 360 + else 361 + iotable_init(exynos4_iodesc1, 362 + ARRAY_SIZE(exynos4_iodesc1)); 363 + iotable_init(exynos4210_iodesc, ARRAY_SIZE(exynos4210_iodesc)); 364 + } 365 + if (soc_is_exynos4212() || soc_is_exynos4412()) 366 + iotable_init(exynos4x12_iodesc, ARRAY_SIZE(exynos4x12_iodesc)); 367 + if (soc_is_exynos5250()) 368 + iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc)); 369 + } 276 370 277 371 void __init exynos_init_io(void) 278 372 { ··· 305 355 /* detect cpu id and rev. */ 306 356 s5p_init_cpu(S5P_VA_CHIPID); 307 357 308 - s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); 309 - } 310 - 311 - static void __init exynos4_map_io(void) 312 - { 313 - iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc)); 314 - 315 - if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_0) 316 - iotable_init(exynos4_iodesc0, ARRAY_SIZE(exynos4_iodesc0)); 317 - else 318 - iotable_init(exynos4_iodesc1, ARRAY_SIZE(exynos4_iodesc1)); 319 - 320 - if (soc_is_exynos4210()) 321 - iotable_init(exynos4210_iodesc, ARRAY_SIZE(exynos4210_iodesc)); 322 - if (soc_is_exynos4212() || soc_is_exynos4412()) 323 - iotable_init(exynos4x12_iodesc, ARRAY_SIZE(exynos4x12_iodesc)); 324 - } 325 - 326 - static void __init exynos5_map_io(void) 327 - { 328 - iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); 329 - 330 - if (soc_is_exynos5250()) 331 - iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc)); 358 + exynos_map_io(); 332 359 } 333 360 334 361 struct bus_type exynos_subsys = { 335 362 .name = "exynos-core", 336 363 .dev_name = "exynos-core", 337 - }; 338 - 339 - static struct device exynos4_dev = { 340 - .bus = &exynos_subsys, 341 364 }; 342 365 343 366 static int __init exynos_core_init(void) ··· 335 412 } 336 413 early_initcall(exynos4_l2x0_cache_init); 337 414 338 - static int __init exynos_init(void) 415 + static void __init exynos_dt_machine_init(void) 339 416 { 340 - printk(KERN_INFO "EXYNOS: Initializing architecture\n"); 417 + struct device_node *i2c_np; 418 + const char *i2c_compat = "samsung,s3c2440-i2c"; 419 + unsigned int tmp; 420 + int id; 341 421 342 - return device_register(&exynos4_dev); 422 + /* 423 + * Exynos5's legacy i2c controller and new high speed i2c 424 + * controller have muxed interrupt sources. By default the 425 + * interrupts for 4-channel HS-I2C controller are enabled. 426 + * If node for first four channels of legacy i2c controller 427 + * are available then re-configure the interrupts via the 428 + * system register. 429 + */ 430 + if (soc_is_exynos5()) { 431 + for_each_compatible_node(i2c_np, NULL, i2c_compat) { 432 + if (of_device_is_available(i2c_np)) { 433 + id = of_alias_get_id(i2c_np, "i2c"); 434 + if (id < 4) { 435 + tmp = readl(EXYNOS5_SYS_I2C_CFG); 436 + writel(tmp & ~(0x1 << id), 437 + EXYNOS5_SYS_I2C_CFG); 438 + } 439 + } 440 + } 441 + } 442 + 443 + exynos_cpuidle_init(); 444 + exynos_cpufreq_init(); 445 + 446 + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 343 447 } 448 + 449 + static char const *exynos_dt_compat[] __initconst = { 450 + "samsung,exynos4", 451 + "samsung,exynos4210", 452 + "samsung,exynos4212", 453 + "samsung,exynos4412", 454 + "samsung,exynos5", 455 + "samsung,exynos5250", 456 + "samsung,exynos5420", 457 + "samsung,exynos5440", 458 + NULL 459 + }; 460 + 461 + static void __init exynos_reserve(void) 462 + { 463 + #ifdef CONFIG_S5P_DEV_MFC 464 + int i; 465 + char *mfc_mem[] = { 466 + "samsung,mfc-v5", 467 + "samsung,mfc-v6", 468 + "samsung,mfc-v7", 469 + }; 470 + 471 + for (i = 0; i < ARRAY_SIZE(mfc_mem); i++) 472 + if (of_scan_flat_dt(s5p_fdt_alloc_mfc_mem, mfc_mem[i])) 473 + break; 474 + #endif 475 + } 476 + 477 + DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)") 478 + /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ 479 + /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ 480 + .smp = smp_ops(exynos_smp_ops), 481 + .map_io = exynos_init_io, 482 + .init_early = exynos_firmware_init, 483 + .init_machine = exynos_dt_machine_init, 484 + .init_late = exynos_init_late, 485 + .dt_compat = exynos_dt_compat, 486 + .restart = exynos_restart, 487 + .reserve = exynos_reserve, 488 + MACHINE_END
+15 -2
arch/arm/mach-exynos/common.h
··· 19 19 20 20 struct map_desc; 21 21 void exynos_init_io(void); 22 - void exynos4_restart(enum reboot_mode mode, const char *cmd); 23 - void exynos5_restart(enum reboot_mode mode, const char *cmd); 22 + void exynos_restart(enum reboot_mode mode, const char *cmd); 24 23 void exynos_cpuidle_init(void); 25 24 void exynos_cpufreq_init(void); 26 25 void exynos_init_late(void); 27 26 28 27 void exynos_firmware_init(void); 28 + 29 + #ifdef CONFIG_PINCTRL_EXYNOS 30 + extern u32 exynos_get_eint_wake_mask(void); 31 + #else 32 + static inline u32 exynos_get_eint_wake_mask(void) { return 0xffffffff; } 33 + #endif 34 + 35 + #ifdef CONFIG_PM_SLEEP 36 + extern void __init exynos_pm_init(void); 37 + #else 38 + static inline void exynos_pm_init(void) {} 39 + #endif 40 + 41 + extern void exynos_cpu_resume(void); 29 42 30 43 extern struct smp_operations exynos_smp_ops; 31 44
+1 -2
arch/arm/mach-exynos/cpuidle.c
··· 27 27 #include <plat/cpu.h> 28 28 #include <plat/pm.h> 29 29 30 - #include <mach/pm-core.h> 31 30 #include <mach/map.h> 32 31 33 32 #include "common.h" ··· 127 128 /* Set value of power down register for aftr mode */ 128 129 exynos_sys_powerdown_conf(SYS_AFTR); 129 130 130 - __raw_writel(virt_to_phys(s3c_cpu_resume), REG_DIRECTGO_ADDR); 131 + __raw_writel(virt_to_phys(exynos_cpu_resume), REG_DIRECTGO_ADDR); 131 132 __raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG); 132 133 133 134 save_cpu_arch_register();
-18
arch/arm/mach-exynos/include/mach/hardware.h
··· 1 - /* linux/arch/arm/mach-exynos4/include/mach/hardware.h 2 - * 3 - * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. 4 - * http://www.samsung.com 5 - * 6 - * EXYNOS4 - Hardware 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_ARCH_HARDWARE_H 14 - #define __ASM_ARCH_HARDWARE_H __FILE__ 15 - 16 - /* currently nothing here, placeholder */ 17 - 18 - #endif /* __ASM_ARCH_HARDWARE_H */
-75
arch/arm/mach-exynos/include/mach/pm-core.h
··· 1 - /* linux/arch/arm/mach-exynos4/include/mach/pm-core.h 2 - * 3 - * Copyright (c) 2011 Samsung Electronics Co., Ltd. 4 - * http://www.samsung.com 5 - * 6 - * Based on arch/arm/mach-s3c2410/include/mach/pm-core.h, 7 - * Copyright 2008 Simtec Electronics 8 - * Ben Dooks <ben@simtec.co.uk> 9 - * http://armlinux.simtec.co.uk/ 10 - * 11 - * EXYNOS4210 - PM core support for arch/arm/plat-s5p/pm.c 12 - * 13 - * This program is free software; you can redistribute it and/or modify 14 - * it under the terms of the GNU General Public License version 2 as 15 - * published by the Free Software Foundation. 16 - */ 17 - 18 - #ifndef __ASM_ARCH_PM_CORE_H 19 - #define __ASM_ARCH_PM_CORE_H __FILE__ 20 - 21 - #include <linux/of.h> 22 - #include <mach/map.h> 23 - 24 - #define S5P_EINT_WAKEUP_MASK (S5P_VA_PMU + 0x0604) 25 - #define S5P_WAKEUP_MASK (S5P_VA_PMU + 0x0608) 26 - 27 - #ifdef CONFIG_PINCTRL_EXYNOS 28 - extern u32 exynos_get_eint_wake_mask(void); 29 - #else 30 - static inline u32 exynos_get_eint_wake_mask(void) { return 0xffffffff; } 31 - #endif 32 - 33 - static inline void s3c_pm_debug_init_uart(void) 34 - { 35 - /* nothing here yet */ 36 - } 37 - 38 - static inline void s3c_pm_arch_prepare_irqs(void) 39 - { 40 - __raw_writel(exynos_get_eint_wake_mask(), S5P_EINT_WAKEUP_MASK); 41 - __raw_writel(s3c_irqwake_intmask & ~(1 << 31), S5P_WAKEUP_MASK); 42 - } 43 - 44 - static inline void s3c_pm_arch_stop_clocks(void) 45 - { 46 - /* nothing here yet */ 47 - } 48 - 49 - static inline void s3c_pm_arch_show_resume_irqs(void) 50 - { 51 - /* nothing here yet */ 52 - } 53 - 54 - static inline void s3c_pm_arch_update_uart(void __iomem *regs, 55 - struct pm_uart_save *save) 56 - { 57 - /* nothing here yet */ 58 - } 59 - 60 - static inline void s3c_pm_restored_gpios(void) 61 - { 62 - /* nothing here yet */ 63 - } 64 - 65 - static inline void samsung_pm_saved_gpios(void) 66 - { 67 - /* nothing here yet */ 68 - } 69 - 70 - /* Compatibility definitions to make plat-samsung/pm.c compile */ 71 - #define IRQ_EINT_BIT(x) 1 72 - #define s3c_irqwake_intallow 0 73 - #define s3c_irqwake_eintallow 0 74 - 75 - #endif /* __ASM_ARCH_PM_CORE_H */
-59
arch/arm/mach-exynos/mach-exynos4-dt.c
··· 1 - /* 2 - * Samsung's EXYNOS4 flattened device tree enabled machine 3 - * 4 - * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. 5 - * http://www.samsung.com 6 - * Copyright (c) 2010-2011 Linaro Ltd. 7 - * www.linaro.org 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 - #include <linux/of_platform.h> 15 - #include <linux/of_fdt.h> 16 - 17 - #include <asm/mach/arch.h> 18 - #include <plat/mfc.h> 19 - 20 - #include "common.h" 21 - 22 - static void __init exynos4_dt_machine_init(void) 23 - { 24 - exynos_cpuidle_init(); 25 - exynos_cpufreq_init(); 26 - 27 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 28 - } 29 - 30 - static char const *exynos4_dt_compat[] __initdata = { 31 - "samsung,exynos4210", 32 - "samsung,exynos4212", 33 - "samsung,exynos4412", 34 - NULL 35 - }; 36 - 37 - static void __init exynos4_reserve(void) 38 - { 39 - #ifdef CONFIG_S5P_DEV_MFC 40 - struct s5p_mfc_dt_meminfo mfc_mem; 41 - 42 - /* Reserve memory for MFC only if it's available */ 43 - mfc_mem.compatible = "samsung,mfc-v5"; 44 - if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem)) 45 - s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff, 46 - mfc_mem.lsize); 47 - #endif 48 - } 49 - DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") 50 - /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ 51 - .smp = smp_ops(exynos_smp_ops), 52 - .map_io = exynos_init_io, 53 - .init_early = exynos_firmware_init, 54 - .init_machine = exynos4_dt_machine_init, 55 - .init_late = exynos_init_late, 56 - .dt_compat = exynos4_dt_compat, 57 - .restart = exynos4_restart, 58 - .reserve = exynos4_reserve, 59 - MACHINE_END
-81
arch/arm/mach-exynos/mach-exynos5-dt.c
··· 1 - /* 2 - * SAMSUNG EXYNOS5250 Flattened Device Tree enabled machine 3 - * 4 - * Copyright (c) 2012 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 - #include <linux/of_platform.h> 13 - #include <linux/of_fdt.h> 14 - #include <linux/io.h> 15 - 16 - #include <asm/mach/arch.h> 17 - #include <plat/mfc.h> 18 - 19 - #include "common.h" 20 - #include "regs-pmu.h" 21 - 22 - static void __init exynos5_dt_machine_init(void) 23 - { 24 - struct device_node *i2c_np; 25 - const char *i2c_compat = "samsung,s3c2440-i2c"; 26 - unsigned int tmp; 27 - 28 - /* 29 - * Exynos5's legacy i2c controller and new high speed i2c 30 - * controller have muxed interrupt sources. By default the 31 - * interrupts for 4-channel HS-I2C controller are enabled. 32 - * If node for first four channels of legacy i2c controller 33 - * are available then re-configure the interrupts via the 34 - * system register. 35 - */ 36 - for_each_compatible_node(i2c_np, NULL, i2c_compat) { 37 - if (of_device_is_available(i2c_np)) { 38 - if (of_alias_get_id(i2c_np, "i2c") < 4) { 39 - tmp = readl(EXYNOS5_SYS_I2C_CFG); 40 - writel(tmp & ~(0x1 << of_alias_get_id(i2c_np, "i2c")), 41 - EXYNOS5_SYS_I2C_CFG); 42 - } 43 - } 44 - } 45 - 46 - exynos_cpuidle_init(); 47 - exynos_cpufreq_init(); 48 - 49 - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 50 - } 51 - 52 - static char const *exynos5_dt_compat[] __initdata = { 53 - "samsung,exynos5250", 54 - "samsung,exynos5420", 55 - "samsung,exynos5440", 56 - NULL 57 - }; 58 - 59 - static void __init exynos5_reserve(void) 60 - { 61 - #ifdef CONFIG_S5P_DEV_MFC 62 - struct s5p_mfc_dt_meminfo mfc_mem; 63 - 64 - /* Reserve memory for MFC only if it's available */ 65 - mfc_mem.compatible = "samsung,mfc-v6"; 66 - if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem)) 67 - s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff, 68 - mfc_mem.lsize); 69 - #endif 70 - } 71 - 72 - DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") 73 - /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ 74 - .smp = smp_ops(exynos_smp_ops), 75 - .map_io = exynos_init_io, 76 - .init_machine = exynos5_dt_machine_init, 77 - .init_late = exynos_init_late, 78 - .dt_compat = exynos5_dt_compat, 79 - .restart = exynos5_restart, 80 - .reserve = exynos5_reserve, 81 - MACHINE_END
+16
arch/arm/mach-exynos/mfc.h
··· 1 + /* 2 + * Copyright (C) 2013 Samsung Electronics Co.Ltd 3 + * 4 + * This program is free software; you can redistribute it and/or modify it 5 + * under the terms of the GNU General Public License as published by the 6 + * Free Software Foundation; either version 2 of the License, or (at your 7 + * option) any later version. 8 + */ 9 + 10 + #ifndef __MACH_EXYNOS_MFC_H 11 + #define __MACH_EXYNOS_MFC_H __FILE__ 12 + 13 + int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname, 14 + int depth, void *data); 15 + 16 + #endif /* __MACH_EXYNOS_MFC_H */
-2
arch/arm/mach-exynos/platsmp.c
··· 26 26 #include <asm/smp_scu.h> 27 27 #include <asm/firmware.h> 28 28 29 - #include <mach/hardware.h> 30 - 31 29 #include <plat/cpu.h> 32 30 33 31 #include "common.h"
+132 -42
arch/arm/mach-exynos/pm.c
··· 17 17 #include <linux/suspend.h> 18 18 #include <linux/syscore_ops.h> 19 19 #include <linux/io.h> 20 + #include <linux/irqchip/arm-gic.h> 20 21 #include <linux/err.h> 21 22 #include <linux/clk.h> 22 23 23 24 #include <asm/cacheflush.h> 24 25 #include <asm/hardware/cache-l2x0.h> 25 26 #include <asm/smp_scu.h> 27 + #include <asm/suspend.h> 26 28 27 29 #include <plat/cpu.h> 28 - #include <plat/pm.h> 30 + #include <plat/pm-common.h> 29 31 #include <plat/pll.h> 30 32 #include <plat/regs-srom.h> 31 33 32 34 #include <mach/map.h> 33 - #include <mach/pm-core.h> 34 35 35 36 #include "common.h" 36 37 #include "regs-pmu.h" 38 + 39 + /** 40 + * struct exynos_wkup_irq - Exynos GIC to PMU IRQ mapping 41 + * @hwirq: Hardware IRQ signal of the GIC 42 + * @mask: Mask in PMU wake-up mask register 43 + */ 44 + struct exynos_wkup_irq { 45 + unsigned int hwirq; 46 + u32 mask; 47 + }; 37 48 38 49 static struct sleep_save exynos5_sys_save[] = { 39 50 SAVE_ITEM(EXYNOS5_SYS_I2C_CFG), ··· 59 48 SAVE_ITEM(S5P_SROM_BC3), 60 49 }; 61 50 51 + /* 52 + * GIC wake-up support 53 + */ 54 + 55 + static u32 exynos_irqwake_intmask = 0xffffffff; 56 + 57 + static const struct exynos_wkup_irq exynos4_wkup_irq[] = { 58 + { 76, BIT(1) }, /* RTC alarm */ 59 + { 77, BIT(2) }, /* RTC tick */ 60 + { /* sentinel */ }, 61 + }; 62 + 63 + static const struct exynos_wkup_irq exynos5250_wkup_irq[] = { 64 + { 75, BIT(1) }, /* RTC alarm */ 65 + { 76, BIT(2) }, /* RTC tick */ 66 + { /* sentinel */ }, 67 + }; 68 + 69 + static int exynos_irq_set_wake(struct irq_data *data, unsigned int state) 70 + { 71 + const struct exynos_wkup_irq *wkup_irq; 72 + 73 + if (soc_is_exynos5250()) 74 + wkup_irq = exynos5250_wkup_irq; 75 + else 76 + wkup_irq = exynos4_wkup_irq; 77 + 78 + while (wkup_irq->mask) { 79 + if (wkup_irq->hwirq == data->hwirq) { 80 + if (!state) 81 + exynos_irqwake_intmask |= wkup_irq->mask; 82 + else 83 + exynos_irqwake_intmask &= ~wkup_irq->mask; 84 + return 0; 85 + } 86 + ++wkup_irq; 87 + } 88 + 89 + return -ENOENT; 90 + } 62 91 63 92 /* For Cortex-A9 Diagnostic and Power control register */ 64 93 static unsigned int save_arm_register[2]; ··· 123 72 { 124 73 unsigned int tmp; 125 74 75 + /* Set wake-up mask registers */ 76 + __raw_writel(exynos_get_eint_wake_mask(), S5P_EINT_WAKEUP_MASK); 77 + __raw_writel(exynos_irqwake_intmask & ~(1 << 31), S5P_WAKEUP_MASK); 78 + 126 79 s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save)); 127 80 128 81 if (soc_is_exynos5250()) { ··· 144 89 145 90 /* ensure at least INFORM0 has the resume address */ 146 91 147 - __raw_writel(virt_to_phys(s3c_cpu_resume), S5P_INFORM0); 92 + __raw_writel(virt_to_phys(exynos_cpu_resume), S5P_INFORM0); 148 93 } 149 - 150 - static int exynos_pm_add(struct device *dev, struct subsys_interface *sif) 151 - { 152 - pm_cpu_prep = exynos_pm_prepare; 153 - pm_cpu_sleep = exynos_cpu_suspend; 154 - 155 - return 0; 156 - } 157 - 158 - static struct subsys_interface exynos_pm_interface = { 159 - .name = "exynos_pm", 160 - .subsys = &exynos_subsys, 161 - .add_dev = exynos_pm_add, 162 - }; 163 - 164 - static __init int exynos_pm_drvinit(void) 165 - { 166 - unsigned int tmp; 167 - 168 - if (soc_is_exynos5440()) 169 - return 0; 170 - 171 - s3c_pm_init(); 172 - 173 - /* All wakeup disable */ 174 - 175 - tmp = __raw_readl(S5P_WAKEUP_MASK); 176 - tmp |= ((0xFF << 8) | (0x1F << 1)); 177 - __raw_writel(tmp, S5P_WAKEUP_MASK); 178 - 179 - return subsys_interface_register(&exynos_pm_interface); 180 - } 181 - arch_initcall(exynos_pm_drvinit); 182 94 183 95 static int exynos_pm_suspend(void) 184 96 { ··· 242 220 .resume = exynos_pm_resume, 243 221 }; 244 222 245 - static __init int exynos_pm_syscore_init(void) 246 - { 247 - if (soc_is_exynos5440()) 248 - return 0; 223 + /* 224 + * Suspend Ops 225 + */ 249 226 250 - register_syscore_ops(&exynos_pm_syscore_ops); 227 + static int exynos_suspend_enter(suspend_state_t state) 228 + { 229 + int ret; 230 + 231 + s3c_pm_debug_init(); 232 + 233 + S3C_PMDBG("%s: suspending the system...\n", __func__); 234 + 235 + S3C_PMDBG("%s: wakeup masks: %08x,%08x\n", __func__, 236 + exynos_irqwake_intmask, exynos_get_eint_wake_mask()); 237 + 238 + if (exynos_irqwake_intmask == -1U 239 + && exynos_get_eint_wake_mask() == -1U) { 240 + pr_err("%s: No wake-up sources!\n", __func__); 241 + pr_err("%s: Aborting sleep\n", __func__); 242 + return -EINVAL; 243 + } 244 + 245 + s3c_pm_save_uarts(); 246 + exynos_pm_prepare(); 247 + flush_cache_all(); 248 + s3c_pm_check_store(); 249 + 250 + ret = cpu_suspend(0, exynos_cpu_suspend); 251 + if (ret) 252 + return ret; 253 + 254 + s3c_pm_restore_uarts(); 255 + 256 + S3C_PMDBG("%s: wakeup stat: %08x\n", __func__, 257 + __raw_readl(S5P_WAKEUP_STAT)); 258 + 259 + s3c_pm_check_restore(); 260 + 261 + S3C_PMDBG("%s: resuming the system...\n", __func__); 262 + 251 263 return 0; 252 264 } 253 - arch_initcall(exynos_pm_syscore_init); 265 + 266 + static int exynos_suspend_prepare(void) 267 + { 268 + s3c_pm_check_prepare(); 269 + 270 + return 0; 271 + } 272 + 273 + static void exynos_suspend_finish(void) 274 + { 275 + s3c_pm_check_cleanup(); 276 + } 277 + 278 + static const struct platform_suspend_ops exynos_suspend_ops = { 279 + .enter = exynos_suspend_enter, 280 + .prepare = exynos_suspend_prepare, 281 + .finish = exynos_suspend_finish, 282 + .valid = suspend_valid_only_mem, 283 + }; 284 + 285 + void __init exynos_pm_init(void) 286 + { 287 + u32 tmp; 288 + 289 + /* Platform-specific GIC callback */ 290 + gic_arch_extn.irq_set_wake = exynos_irq_set_wake; 291 + 292 + /* All wakeup disable */ 293 + tmp = __raw_readl(S5P_WAKEUP_MASK); 294 + tmp |= ((0xFF << 8) | (0x1F << 1)); 295 + __raw_writel(tmp, S5P_WAKEUP_MASK); 296 + 297 + register_syscore_ops(&exynos_pm_syscore_ops); 298 + suspend_set_ops(&exynos_suspend_ops); 299 + }
+2 -1
arch/arm/mach-exynos/regs-pmu.h
··· 26 26 #define S5P_USE_STANDBY_WFI0 (1 << 16) 27 27 #define S5P_USE_STANDBY_WFE0 (1 << 24) 28 28 29 - #define S5P_SWRESET S5P_PMUREG(0x0400) 30 29 #define EXYNOS_SWRESET S5P_PMUREG(0x0400) 31 30 #define EXYNOS5440_SWRESET S5P_PMUREG(0x00C4) 32 31 33 32 #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) 33 + #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) 34 + #define S5P_WAKEUP_MASK S5P_PMUREG(0x0608) 34 35 35 36 #define S5P_INFORM0 S5P_PMUREG(0x0800) 36 37 #define S5P_INFORM1 S5P_PMUREG(0x0804)
+85
arch/arm/mach-exynos/sleep.S
··· 1 + /* 2 + * Copyright (c) 2013 Samsung Electronics Co., Ltd. 3 + * http://www.samsung.com 4 + * 5 + * Exynos low-level resume code 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 as published by 9 + * the Free Software Foundation; either version 2 of the License, or 10 + * (at your option) any later version. 11 + * 12 + * This program is distributed in the hope that it will be useful, 13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 + * GNU General Public License for more details. 16 + */ 17 + 18 + #include <linux/linkage.h> 19 + #include <asm/asm-offsets.h> 20 + #include <asm/hardware/cache-l2x0.h> 21 + 22 + #define CPU_MASK 0xff0ffff0 23 + #define CPU_CORTEX_A9 0x410fc090 24 + 25 + /* 26 + * The following code is located into the .data section. This is to 27 + * allow l2x0_regs_phys to be accessed with a relative load while we 28 + * can't rely on any MMU translation. We could have put l2x0_regs_phys 29 + * in the .text section as well, but some setups might insist on it to 30 + * be truly read-only. (Reference from: arch/arm/kernel/sleep.S) 31 + */ 32 + .data 33 + .align 34 + 35 + /* 36 + * sleep magic, to allow the bootloader to check for an valid 37 + * image to resume to. Must be the first word before the 38 + * exynos_cpu_resume entry. 39 + */ 40 + 41 + .word 0x2bedf00d 42 + 43 + /* 44 + * exynos_cpu_resume 45 + * 46 + * resume code entry for bootloader to call 47 + */ 48 + 49 + ENTRY(exynos_cpu_resume) 50 + #ifdef CONFIG_CACHE_L2X0 51 + mrc p15, 0, r0, c0, c0, 0 52 + ldr r1, =CPU_MASK 53 + and r0, r0, r1 54 + ldr r1, =CPU_CORTEX_A9 55 + cmp r0, r1 56 + bne skip_l2_resume 57 + adr r0, l2x0_regs_phys 58 + ldr r0, [r0] 59 + cmp r0, #0 60 + beq skip_l2_resume 61 + ldr r1, [r0, #L2X0_R_PHY_BASE] 62 + ldr r2, [r1, #L2X0_CTRL] 63 + tst r2, #0x1 64 + bne skip_l2_resume 65 + ldr r2, [r0, #L2X0_R_AUX_CTRL] 66 + str r2, [r1, #L2X0_AUX_CTRL] 67 + ldr r2, [r0, #L2X0_R_TAG_LATENCY] 68 + str r2, [r1, #L2X0_TAG_LATENCY_CTRL] 69 + ldr r2, [r0, #L2X0_R_DATA_LATENCY] 70 + str r2, [r1, #L2X0_DATA_LATENCY_CTRL] 71 + ldr r2, [r0, #L2X0_R_PREFETCH_CTRL] 72 + str r2, [r1, #L2X0_PREFETCH_CTRL] 73 + ldr r2, [r0, #L2X0_R_PWR_CTRL] 74 + str r2, [r1, #L2X0_POWER_CTRL] 75 + mov r2, #1 76 + str r2, [r1, #L2X0_CTRL] 77 + skip_l2_resume: 78 + #endif 79 + b cpu_resume 80 + ENDPROC(exynos_cpu_resume) 81 + #ifdef CONFIG_CACHE_L2X0 82 + .globl l2x0_regs_phys 83 + l2x0_regs_phys: 84 + .long 0 85 + #endif
+1 -3
arch/arm/mach-integrator/core.c
··· 25 25 #include <linux/of.h> 26 26 #include <linux/of_address.h> 27 27 28 - #include <mach/hardware.h> 29 - #include <mach/platform.h> 30 - 31 28 #include <asm/mach-types.h> 32 29 #include <asm/mach/time.h> 33 30 #include <asm/pgtable.h> 34 31 32 + #include "hardware.h" 35 33 #include "cm.h" 36 34 #include "common.h" 37 35
+2 -2
arch/arm/mach-integrator/impd1.c
··· 25 25 #include <linux/slab.h> 26 26 #include <linux/irqchip/arm-vic.h> 27 27 28 - #include <mach/lm.h> 29 - #include <mach/impd1.h> 30 28 #include <asm/sizes.h> 29 + #include "lm.h" 30 + #include "impd1.h" 31 31 32 32 static int module_id; 33 33
-45
arch/arm/mach-integrator/include/mach/hardware.h
··· 1 - /* 2 - * arch/arm/mach-integrator/include/mach/hardware.h 3 - * 4 - * This file contains the hardware definitions of the Integrator. 5 - * 6 - * Copyright (C) 1999 ARM Limited. 7 - * 8 - * This program is free software; you can redistribute it and/or modify 9 - * it under the terms of the GNU General Public License as published by 10 - * the Free Software Foundation; either version 2 of the License, or 11 - * (at your option) any later version. 12 - * 13 - * This program is distributed in the hope that it will be useful, 14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 - * GNU General Public License for more details. 17 - * 18 - * You should have received a copy of the GNU General Public License 19 - * along with this program; if not, write to the Free Software 20 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 - */ 22 - #ifndef __ASM_ARCH_HARDWARE_H 23 - #define __ASM_ARCH_HARDWARE_H 24 - 25 - #include <asm/sizes.h> 26 - 27 - /* 28 - * Where in virtual memory the IO devices (timers, system controllers 29 - * and so on) 30 - */ 31 - #define IO_BASE 0xF0000000 // VA of IO 32 - #define IO_SIZE 0x0B000000 // How much? 33 - #define IO_START INTEGRATOR_HDR_BASE // PA of IO 34 - 35 - /* macro to get at IO space when running virtually */ 36 - #ifdef CONFIG_MMU 37 - #define IO_ADDRESS(x) (((x) & 0x000fffff) | (((x) >> 4) & 0x0ff00000) | IO_BASE) 38 - #else 39 - #define IO_ADDRESS(x) (x) 40 - #endif 41 - 42 - #define __io_address(n) ((void __iomem *)IO_ADDRESS(n)) 43 - 44 - #endif 45 -
-4
arch/arm/mach-integrator/include/mach/impd1.h arch/arm/mach-integrator/impd1.h
··· 1 - #define IMPD1_OSC1 0x00 2 - #define IMPD1_OSC2 0x04 3 - #define IMPD1_LOCK 0x08 4 1 #define IMPD1_LEDS 0x0c 5 2 #define IMPD1_INT 0x10 6 3 #define IMPD1_SW 0x14 ··· 12 15 struct device; 13 16 14 17 void impd1_tweak_control(struct device *dev, u32 mask, u32 val); 15 -
arch/arm/mach-integrator/include/mach/lm.h arch/arm/mach-integrator/lm.h
+41 -69
arch/arm/mach-integrator/include/mach/platform.h arch/arm/mach-integrator/hardware.h
··· 1 1 /* 2 + * This file contains the hardware definitions of the Integrator. 3 + * 4 + * Copyright (C) 1998-1999 ARM Limited. 5 + * 2 6 * This program is free software; you can redistribute it and/or modify 3 7 * it under the terms of the GNU General Public License as published by 4 8 * the Free Software Foundation; either version 2 of the License, or ··· 17 13 * along with this program; if not, write to the Free Software 18 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 15 */ 20 - /************************************************************************** 21 - * * Copyright © ARM Limited 1998. All rights reserved. 22 - * ***********************************************************************/ 23 - /* ************************************************************************ 24 - * 25 - * Integrator address map 26 - * 27 - * ***********************************************************************/ 16 + #ifndef INTEGRATOR_HARDWARE_H 17 + #define INTEGRATOR_HARDWARE_H 28 18 29 - #ifndef __address_h 30 - #define __address_h 1 19 + /* 20 + * Where in virtual memory the IO devices (timers, system controllers 21 + * and so on) 22 + */ 23 + #define IO_BASE 0xF0000000 // VA of IO 24 + #define IO_SIZE 0x0B000000 // How much? 25 + #define IO_START INTEGRATOR_HDR_BASE // PA of IO 31 26 32 - /* ======================================================================== 33 - * Integrator definitions 34 - * ======================================================================== 35 - * ------------------------------------------------------------------------ 36 - * Memory definitions 37 - * ------------------------------------------------------------------------ 27 + /* macro to get at IO space when running virtually */ 28 + #ifdef CONFIG_MMU 29 + #define IO_ADDRESS(x) (((x) & 0x000fffff) | (((x) >> 4) & 0x0ff00000) | IO_BASE) 30 + #else 31 + #define IO_ADDRESS(x) (x) 32 + #endif 33 + 34 + #define __io_address(n) ((void __iomem *)IO_ADDRESS(n)) 35 + 36 + /* 38 37 * Integrator memory map 39 - * 40 38 */ 41 39 #define INTEGRATOR_BOOT_ROM_LO 0x00000000 42 40 #define INTEGRATOR_BOOT_ROM_HI 0x20000000 ··· 46 40 #define INTEGRATOR_BOOT_ROM_SIZE SZ_512K 47 41 48 42 /* 49 - * New Core Modules have different amounts of SSRAM, the amount of SSRAM 50 - * fitted can be found in HDR_STAT. 43 + * New Core Modules have different amounts of SSRAM, the amount of SSRAM 44 + * fitted can be found in HDR_STAT. 51 45 * 52 - * The symbol INTEGRATOR_SSRAM_SIZE is kept, however this now refers to 53 - * the minimum amount of SSRAM fitted on any core module. 46 + * The symbol INTEGRATOR_SSRAM_SIZE is kept, however this now refers to 47 + * the minimum amount of SSRAM fitted on any core module. 54 48 * 55 - * New Core Modules also alias the SSRAM. 49 + * New Core Modules also alias the SSRAM. 56 50 * 57 51 */ 58 52 #define INTEGRATOR_SSRAM_BASE 0x00000000 ··· 67 61 68 62 /* 69 63 * SDRAM is a SIMM therefore the size is not known. 70 - * 71 64 */ 72 65 #define INTEGRATOR_SDRAM_BASE 0x00040000 73 66 ··· 86 81 #define INTEGRATOR_LOGIC_MODULE2_BASE 0xE0000000 87 82 #define INTEGRATOR_LOGIC_MODULE3_BASE 0xF0000000 88 83 89 - /* ------------------------------------------------------------------------ 90 - * Integrator header card registers 91 - * ------------------------------------------------------------------------ 92 - * 84 + /* 85 + * Integrator header card registers 93 86 */ 94 87 #define INTEGRATOR_HDR_ID_OFFSET 0x00 95 88 #define INTEGRATOR_HDR_PROC_OFFSET 0x04 ··· 176 173 177 174 #define INTEGRATOR_HDR_SDRAM_SPD_OK (1 << 5) 178 175 179 - 180 - /* ------------------------------------------------------------------------ 181 - * Integrator system registers 182 - * ------------------------------------------------------------------------ 183 - * 176 + /* 177 + * Integrator system registers 184 178 */ 185 179 186 180 /* 187 181 * System Controller 188 - * 189 182 */ 190 183 #define INTEGRATOR_SC_ID_OFFSET 0x00 191 184 #define INTEGRATOR_SC_OSC_OFFSET 0x04 ··· 222 223 223 224 /* 224 225 * External Bus Interface 225 - * 226 226 */ 227 227 #define INTEGRATOR_EBI_BASE 0x12000000 228 228 ··· 270 272 271 273 /* 272 274 * LED's & Switches 273 - * 274 275 */ 275 276 #define INTEGRATOR_DBG_ALPHA_OFFSET 0x00 276 277 #define INTEGRATOR_DBG_LEDS_OFFSET 0x04 ··· 289 292 #define INTEGRATOR_CP_SIC_BASE 0xCA000000 /* SIC */ 290 293 #define INTEGRATOR_CP_CTL_BASE 0xCB000000 /* CP system control */ 291 294 292 - /* ------------------------------------------------------------------------ 293 - * KMI keyboard/mouse definitions 294 - * ------------------------------------------------------------------------ 295 - */ 296 295 /* PS2 Keyboard interface */ 297 296 #define KMI0_BASE INTEGRATOR_KBD_BASE 298 297 299 298 /* PS2 Mouse interface */ 300 299 #define KMI1_BASE INTEGRATOR_MOUSE_BASE 301 300 302 - /* KMI definitions are now in include/asm-arm/hardware/amba_kmi.h -- rmk */ 303 - 304 - /* ------------------------------------------------------------------------ 305 - * Integrator Interrupt Controllers 306 - * ------------------------------------------------------------------------ 301 + /* 302 + * Integrator Interrupt Controllers 307 303 * 308 - * Offsets from interrupt controller base 309 304 * 310 - * System Controller interrupt controller base is 305 + * Offsets from interrupt controller base 306 + * 307 + * System Controller interrupt controller base is 311 308 * 312 309 * INTEGRATOR_IC_BASE + (header_number << 6) 313 310 * 314 - * Core Module interrupt controller base is 311 + * Core Module interrupt controller base is 315 312 * 316 313 * INTEGRATOR_HDR_IC 317 - * 318 314 */ 319 315 #define IRQ_STATUS 0 320 316 #define IRQ_RAW_STATUS 0x04 ··· 325 335 #define FIQ_ENABLE_CLEAR 0x2C 326 336 327 337 328 - /* ------------------------------------------------------------------------ 329 - * Interrupts 330 - * ------------------------------------------------------------------------ 331 - * 332 - * 333 - * Each Core Module has two interrupts controllers, one on the core module 334 - * itself and one in the system controller on the motherboard. The 335 - * READ_INT macro in target.s reads both interrupt controllers and returns 336 - * a 32 bit bitmask, bits 0 to 23 are interrupts from the system controller 337 - * and bits 24 to 31 are from the core module. 338 - * 339 - * The following definitions relate to the bitmask returned by READ_INT. 340 - * 341 - */ 342 - 343 - /* ------------------------------------------------------------------------ 344 - * LED's 345 - * ------------------------------------------------------------------------ 346 - * 338 + /* 339 + * LED's 347 340 */ 348 341 #define GREEN_LED 0x01 349 342 #define YELLOW_LED 0x02 ··· 344 371 * 345 372 * Timer 0 runs at bus frequency 346 373 */ 347 - 348 374 #define INTEGRATOR_TIMER0_BASE INTEGRATOR_CT_BASE 349 375 #define INTEGRATOR_TIMER1_BASE (INTEGRATOR_CT_BASE + 0x100) 350 376 #define INTEGRATOR_TIMER2_BASE (INTEGRATOR_CT_BASE + 0x200) ··· 351 379 #define INTEGRATOR_CSR_BASE 0x10000000 352 380 #define INTEGRATOR_CSR_SIZE 0x10000000 353 381 354 - #endif 382 + #endif /* INTEGRATOR_HARDWARE_H */
+2 -4
arch/arm/mach-integrator/integrator_ap.c
··· 44 44 #include <linux/sched_clock.h> 45 45 #include <linux/clk-provider.h> 46 46 47 - #include <mach/hardware.h> 48 - #include <mach/platform.h> 49 47 #include <asm/hardware/arm_timer.h> 50 48 #include <asm/setup.h> 51 49 #include <asm/param.h> /* HZ */ 52 50 #include <asm/mach-types.h> 53 - 54 - #include <mach/lm.h> 55 51 56 52 #include <asm/mach/arch.h> 57 53 #include <asm/mach/irq.h> 58 54 #include <asm/mach/map.h> 59 55 #include <asm/mach/time.h> 60 56 57 + #include "hardware.h" 61 58 #include "cm.h" 62 59 #include "common.h" 63 60 #include "pci_v3.h" 61 + #include "lm.h" 64 62 65 63 /* Base address to the AP system controller */ 66 64 void __iomem *ap_syscon_base;
+8 -9
arch/arm/mach-integrator/integrator_cp.c
··· 27 27 #include <linux/of_address.h> 28 28 #include <linux/of_platform.h> 29 29 #include <linux/sys_soc.h> 30 + #include <linux/sched_clock.h> 30 31 31 - #include <mach/hardware.h> 32 - #include <mach/platform.h> 33 32 #include <asm/setup.h> 34 33 #include <asm/mach-types.h> 35 - 36 - #include <mach/lm.h> 37 - 38 34 #include <asm/mach/arch.h> 39 35 #include <asm/mach/irq.h> 40 36 #include <asm/mach/map.h> 41 37 #include <asm/mach/time.h> 42 38 43 39 #include <plat/clcd.h> 44 - #include <plat/sched_clock.h> 45 40 41 + #include "hardware.h" 46 42 #include "cm.h" 47 43 #include "common.h" 48 44 ··· 225 229 226 230 #define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) 227 231 232 + static u64 notrace intcp_read_sched_clock(void) 233 + { 234 + return readl(REFCOUNTER); 235 + } 236 + 228 237 static void __init intcp_init_early(void) 229 238 { 230 - #ifdef CONFIG_PLAT_VERSATILE_SCHED_CLOCK 231 - versatile_sched_clock_init(REFCOUNTER, 24000000); 232 - #endif 239 + sched_clock_register(intcp_read_sched_clock, 32, 24000000); 233 240 } 234 241 235 242 static const struct of_device_id fpga_irq_of_match[] __initconst = {
+1 -3
arch/arm/mach-integrator/leds.c
··· 11 11 #include <linux/slab.h> 12 12 #include <linux/leds.h> 13 13 14 - #include <mach/hardware.h> 15 - #include <mach/platform.h> 16 - 14 + #include "hardware.h" 17 15 #include "cm.h" 18 16 19 17 #if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS)
+1 -1
arch/arm/mach-integrator/lm.c
··· 12 12 #include <linux/device.h> 13 13 #include <linux/slab.h> 14 14 15 - #include <mach/lm.h> 15 + #include "lm.h" 16 16 17 17 #define to_lm_device(d) container_of(d, struct lm_device, dev) 18 18 #define to_lm_driver(d) container_of(d, struct lm_driver, drv)
+1 -3
arch/arm/mach-integrator/pci_v3.c
··· 34 34 #include <linux/of_pci.h> 35 35 #include <video/vga.h> 36 36 37 - #include <mach/hardware.h> 38 - #include <mach/platform.h> 39 - 40 37 #include <asm/mach/map.h> 41 38 #include <asm/signal.h> 42 39 #include <asm/mach/pci.h> 43 40 #include <asm/irq_regs.h> 44 41 45 42 #include "pci_v3.h" 43 + #include "hardware.h" 46 44 47 45 /* 48 46 * Where in the memory map does PCI live?
+1 -13
arch/arm/mach-s3c24xx/include/mach/hardware.h
··· 1 - /* arch/arm/mach-s3c2410/include/mach/hardware.h 2 - * 1 + /* 3 2 * Copyright (c) 2003 Simtec Electronics 4 3 * Ben Dooks <ben@simtec.co.uk> 5 4 * ··· 16 17 17 18 extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg); 18 19 19 - #ifdef CONFIG_CPU_S3C2440 20 - 21 - extern int s3c2440_set_dsc(unsigned int pin, unsigned int value); 22 - 23 - #endif /* CONFIG_CPU_S3C2440 */ 24 - 25 20 #endif /* __ASSEMBLY__ */ 26 21 27 22 #include <asm/sizes.h> 28 23 #include <mach/map.h> 29 - 30 - /* machine specific hardware definitions should go after this */ 31 - 32 - /* currently here until moved into config (todo) */ 33 - #define CONFIG_NO_MULTIWORD_IO 34 24 35 25 #endif /* __ASM_ARCH_HARDWARE_H */
-57
arch/arm/mach-s3c24xx/include/mach/uncompress.h
··· 1 - /* arch/arm/mach-s3c2410/include/mach/uncompress.h 2 - * 3 - * Copyright (c) 2003-2007 Simtec Electronics 4 - * http://armlinux.simtec.co.uk/ 5 - * Ben Dooks <ben@simtec.co.uk> 6 - * 7 - * S3C2410 - uncompress code 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 - #ifndef __ASM_ARCH_UNCOMPRESS_H 15 - #define __ASM_ARCH_UNCOMPRESS_H 16 - 17 - #include <mach/regs-gpio.h> 18 - #include <mach/map.h> 19 - 20 - /* working in physical space... */ 21 - #undef S3C2410_GPIOREG 22 - #define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x))) 23 - 24 - #include <plat/uncompress.h> 25 - 26 - static inline int is_arm926(void) 27 - { 28 - unsigned int cpuid; 29 - 30 - asm volatile ("mrc p15, 0, %0, c1, c0, 0" : "=r" (cpuid)); 31 - 32 - return ((cpuid & 0xff0) == 0x260); 33 - } 34 - 35 - static void arch_detect_cpu(void) 36 - { 37 - unsigned int cpuid; 38 - 39 - cpuid = *((volatile unsigned int *)S3C2410_GSTATUS1); 40 - cpuid &= S3C2410_GSTATUS1_IDMASK; 41 - 42 - if (is_arm926() || cpuid == S3C2410_GSTATUS1_2440 || 43 - cpuid == S3C2410_GSTATUS1_2442 || 44 - cpuid == S3C2410_GSTATUS1_2416 || 45 - cpuid == S3C2410_GSTATUS1_2450) { 46 - fifo_mask = S3C2440_UFSTAT_TXMASK; 47 - fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; 48 - } else { 49 - fifo_mask = S3C2410_UFSTAT_TXMASK; 50 - fifo_max = 15 << S3C2410_UFSTAT_TXSHIFT; 51 - } 52 - 53 - uart_base = (volatile u8 *) S3C_PA_UART + 54 - (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); 55 - } 56 - 57 - #endif /* __ASM_ARCH_UNCOMPRESS_H */
+2
arch/arm/mach-s3c64xx/include/mach/pm-core.h
··· 15 15 #ifndef __MACH_S3C64XX_PM_CORE_H 16 16 #define __MACH_S3C64XX_PM_CORE_H __FILE__ 17 17 18 + #include <linux/serial_s3c.h> 19 + 18 20 #include <mach/regs-gpio.h> 19 21 20 22 static inline void s3c_pm_debug_init_uart(void)
-31
arch/arm/mach-s3c64xx/include/mach/uncompress.h
··· 1 - /* arch/arm/mach-s3c6400/include/mach/uncompress.h 2 - * 3 - * Copyright 2008 Openmoko, Inc. 4 - * Copyright 2008 Simtec Electronics 5 - * http://armlinux.simtec.co.uk/ 6 - * Ben Dooks <ben@simtec.co.uk> 7 - * 8 - * S3C6400 - uncompress code 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 - #ifndef __ASM_ARCH_UNCOMPRESS_H 16 - #define __ASM_ARCH_UNCOMPRESS_H 17 - 18 - #include <mach/map.h> 19 - #include <plat/uncompress.h> 20 - 21 - static void arch_detect_cpu(void) 22 - { 23 - /* we do not need to do any cpu detection here at the moment. */ 24 - fifo_mask = S3C2440_UFSTAT_TXMASK; 25 - fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; 26 - 27 - uart_base = (volatile u8 *)S3C_PA_UART + 28 - (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); 29 - } 30 - 31 - #endif /* __ASM_ARCH_UNCOMPRESS_H */
-1
arch/arm/mach-s3c64xx/pm.c
··· 332 332 { 333 333 pm_cpu_prep = s3c64xx_pm_prepare; 334 334 pm_cpu_sleep = s3c64xx_cpu_suspend; 335 - pm_uart_udivslot = 1; 336 335 337 336 #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK 338 337 gpio_request(S3C64XX_GPN(12), "DEBUG_LED0");
+2
arch/arm/mach-s5p64x0/include/mach/pm-core.h
··· 12 12 * published by the Free Software Foundation. 13 13 */ 14 14 15 + #include <linux/serial_s3c.h> 16 + 15 17 #include <mach/regs-gpio.h> 16 18 17 19 static inline void s3c_pm_debug_init_uart(void)
-34
arch/arm/mach-s5p64x0/include/mach/uncompress.h
··· 1 - /* linux/arch/arm/mach-s5p64x0/include/mach/uncompress.h 2 - * 3 - * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. 4 - * http://www.samsung.com 5 - * 6 - * S5P64X0 - uncompress code 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_UNCOMPRESS_H 14 - #define __ASM_ARCH_UNCOMPRESS_H 15 - 16 - #include <mach/map.h> 17 - #include <plat/uncompress.h> 18 - 19 - static void arch_detect_cpu(void) 20 - { 21 - unsigned int chipid; 22 - 23 - chipid = *(const volatile unsigned int __force *) 0xE0100118; 24 - 25 - if ((chipid & 0xff000) == 0x50000) 26 - uart_base = (volatile u8 *)S5P6450_PA_UART(CONFIG_S3C_LOWLEVEL_UART_PORT); 27 - else 28 - uart_base = (volatile u8 *)S5P6440_PA_UART(CONFIG_S3C_LOWLEVEL_UART_PORT); 29 - 30 - fifo_mask = S3C2440_UFSTAT_TXMASK; 31 - fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; 32 - } 33 - 34 - #endif /* __ASM_ARCH_UNCOMPRESS_H */
-1
arch/arm/mach-s5p64x0/pm.c
··· 161 161 { 162 162 pm_cpu_prep = s5p64x0_pm_prepare; 163 163 pm_cpu_sleep = s5p64x0_cpu_suspend; 164 - pm_uart_udivslot = 1; 165 164 166 165 return 0; 167 166 }
-30
arch/arm/mach-s5pc100/include/mach/uncompress.h
··· 1 - /* arch/arm/mach-s5pc100/include/mach/uncompress.h 2 - * 3 - * Copyright 2009 Samsung Electronics Co. 4 - * Byungho Min <bhmin@samsung.com> 5 - * 6 - * S5PC100 - uncompress code 7 - * 8 - * Based on mach-s3c6400/include/mach/uncompress.h 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 - #ifndef __ASM_ARCH_UNCOMPRESS_H 16 - #define __ASM_ARCH_UNCOMPRESS_H 17 - 18 - #include <mach/map.h> 19 - #include <plat/uncompress.h> 20 - 21 - static void arch_detect_cpu(void) 22 - { 23 - /* we do not need to do any cpu detection here at the moment. */ 24 - fifo_mask = S3C2440_UFSTAT_TXMASK; 25 - fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; 26 - 27 - uart_base = (volatile u8 *)S5P_PA_UART(CONFIG_S3C_LOWLEVEL_UART_PORT); 28 - } 29 - 30 - #endif /* __ASM_ARCH_UNCOMPRESS_H */
-28
arch/arm/mach-s5pv210/include/mach/uncompress.h
··· 1 - /* linux/arch/arm/mach-s5pv210/include/mach/uncompress.h 2 - * 3 - * Copyright (c) 2010 Samsung Electronics Co., Ltd. 4 - * http://www.samsung.com/ 5 - * 6 - * S5PV210 - uncompress code 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_UNCOMPRESS_H 14 - #define __ASM_ARCH_UNCOMPRESS_H 15 - 16 - #include <mach/map.h> 17 - #include <plat/uncompress.h> 18 - 19 - static void arch_detect_cpu(void) 20 - { 21 - /* we do not need to do any cpu detection here at the moment. */ 22 - fifo_mask = S5PV210_UFSTAT_TXMASK; 23 - fifo_max = 63 << S5PV210_UFSTAT_TXSHIFT; 24 - 25 - uart_base = (volatile u8 *)S5P_PA_UART(CONFIG_S3C_LOWLEVEL_UART_PORT); 26 - } 27 - 28 - #endif /* __ASM_ARCH_UNCOMPRESS_H */
+1
arch/arm/mach-zynq/Kconfig
··· 9 9 select ICST 10 10 select CADENCE_TTC_TIMER 11 11 select ARM_GLOBAL_TIMER if !CPU_FREQ 12 + select MFD_SYSCON 12 13 help 13 14 Support for Xilinx Zynq ARM Cortex A9 Platform
+7 -1
arch/arm/mach-zynq/common.c
··· 19 19 #include <linux/cpumask.h> 20 20 #include <linux/platform_device.h> 21 21 #include <linux/clk.h> 22 + #include <linux/clk-provider.h> 22 23 #include <linux/clk/zynq.h> 23 24 #include <linux/clocksource.h> 24 25 #include <linux/of_address.h> ··· 76 75 77 76 platform_device_register(&zynq_cpuidle_device); 78 77 platform_device_register_full(&devinfo); 78 + 79 + zynq_slcr_init(); 79 80 } 80 81 81 82 static void __init zynq_timer_init(void) 82 83 { 83 - zynq_slcr_init(); 84 + zynq_early_slcr_init(); 85 + 86 + zynq_clock_init(); 87 + of_clk_init(NULL); 84 88 clocksource_of_init(); 85 89 } 86 90
+1 -1
arch/arm/mach-zynq/common.h
··· 20 20 void zynq_secondary_startup(void); 21 21 22 22 extern int zynq_slcr_init(void); 23 + extern int zynq_early_slcr_init(void); 23 24 extern void zynq_slcr_system_reset(void); 24 25 extern void zynq_slcr_cpu_stop(int cpu); 25 26 extern void zynq_slcr_cpu_start(int cpu); ··· 34 33 extern struct smp_operations zynq_smp_ops __initdata; 35 34 #endif 36 35 37 - extern void __iomem *zynq_slcr_base; 38 36 extern void __iomem *zynq_scu_base; 39 37 40 38 /* Hotplug */
+89 -15
arch/arm/mach-zynq/slcr.c
··· 15 15 */ 16 16 17 17 #include <linux/io.h> 18 + #include <linux/mfd/syscon.h> 18 19 #include <linux/of_address.h> 20 + #include <linux/regmap.h> 19 21 #include <linux/clk/zynq.h> 20 22 #include "common.h" 21 23 ··· 31 29 #define SLCR_A9_CPU_CLKSTOP 0x10 32 30 #define SLCR_A9_CPU_RST 0x1 33 31 34 - void __iomem *zynq_slcr_base; 32 + static void __iomem *zynq_slcr_base; 33 + static struct regmap *zynq_slcr_regmap; 34 + 35 + /** 36 + * zynq_slcr_write - Write to a register in SLCR block 37 + * 38 + * @val: Value to write to the register 39 + * @offset: Register offset in SLCR block 40 + * 41 + * Return: a negative value on error, 0 on success 42 + */ 43 + static int zynq_slcr_write(u32 val, u32 offset) 44 + { 45 + if (!zynq_slcr_regmap) { 46 + writel(val, zynq_slcr_base + offset); 47 + return 0; 48 + } 49 + 50 + return regmap_write(zynq_slcr_regmap, offset, val); 51 + } 52 + 53 + /** 54 + * zynq_slcr_read - Read a register in SLCR block 55 + * 56 + * @val: Pointer to value to be read from SLCR 57 + * @offset: Register offset in SLCR block 58 + * 59 + * Return: a negative value on error, 0 on success 60 + */ 61 + static int zynq_slcr_read(u32 *val, u32 offset) 62 + { 63 + if (zynq_slcr_regmap) 64 + return regmap_read(zynq_slcr_regmap, offset, val); 65 + 66 + *val = readl(zynq_slcr_base + offset); 67 + 68 + return 0; 69 + } 70 + 71 + /** 72 + * zynq_slcr_unlock - Unlock SLCR registers 73 + * 74 + * Return: a negative value on error, 0 on success 75 + */ 76 + static inline int zynq_slcr_unlock(void) 77 + { 78 + zynq_slcr_write(SLCR_UNLOCK_MAGIC, SLCR_UNLOCK_OFFSET); 79 + 80 + return 0; 81 + } 35 82 36 83 /** 37 84 * zynq_slcr_system_reset - Reset the entire system. ··· 94 43 * Note that this seems to require raw i/o 95 44 * functions or there's a lockup? 96 45 */ 97 - writel(SLCR_UNLOCK_MAGIC, zynq_slcr_base + SLCR_UNLOCK_OFFSET); 46 + zynq_slcr_unlock(); 98 47 99 48 /* 100 49 * Clear 0x0F000000 bits of reboot status register to workaround 101 50 * the FSBL not loading the bitstream after soft-reboot 102 51 * This is a temporary solution until we know more. 103 52 */ 104 - reboot = readl(zynq_slcr_base + SLCR_REBOOT_STATUS_OFFSET); 105 - writel(reboot & 0xF0FFFFFF, zynq_slcr_base + SLCR_REBOOT_STATUS_OFFSET); 106 - writel(1, zynq_slcr_base + SLCR_PS_RST_CTRL_OFFSET); 53 + zynq_slcr_read(&reboot, SLCR_REBOOT_STATUS_OFFSET); 54 + zynq_slcr_write(reboot & 0xF0FFFFFF, SLCR_REBOOT_STATUS_OFFSET); 55 + zynq_slcr_write(1, SLCR_PS_RST_CTRL_OFFSET); 107 56 } 108 57 109 58 /** ··· 112 61 */ 113 62 void zynq_slcr_cpu_start(int cpu) 114 63 { 115 - u32 reg = readl(zynq_slcr_base + SLCR_A9_CPU_RST_CTRL_OFFSET); 64 + u32 reg; 65 + 66 + zynq_slcr_read(&reg, SLCR_A9_CPU_RST_CTRL_OFFSET); 116 67 reg &= ~(SLCR_A9_CPU_RST << cpu); 117 - writel(reg, zynq_slcr_base + SLCR_A9_CPU_RST_CTRL_OFFSET); 68 + zynq_slcr_write(reg, SLCR_A9_CPU_RST_CTRL_OFFSET); 118 69 reg &= ~(SLCR_A9_CPU_CLKSTOP << cpu); 119 - writel(reg, zynq_slcr_base + SLCR_A9_CPU_RST_CTRL_OFFSET); 70 + zynq_slcr_write(reg, SLCR_A9_CPU_RST_CTRL_OFFSET); 120 71 } 121 72 122 73 /** ··· 127 74 */ 128 75 void zynq_slcr_cpu_stop(int cpu) 129 76 { 130 - u32 reg = readl(zynq_slcr_base + SLCR_A9_CPU_RST_CTRL_OFFSET); 77 + u32 reg; 78 + 79 + zynq_slcr_read(&reg, SLCR_A9_CPU_RST_CTRL_OFFSET); 131 80 reg |= (SLCR_A9_CPU_CLKSTOP | SLCR_A9_CPU_RST) << cpu; 132 - writel(reg, zynq_slcr_base + SLCR_A9_CPU_RST_CTRL_OFFSET); 81 + zynq_slcr_write(reg, SLCR_A9_CPU_RST_CTRL_OFFSET); 133 82 } 134 83 135 84 /** 136 - * zynq_slcr_init 137 - * Returns 0 on success, negative errno otherwise. 85 + * zynq_slcr_init - Regular slcr driver init 86 + * 87 + * Return: 0 on success, negative errno otherwise. 138 88 * 139 89 * Called early during boot from platform code to remap SLCR area. 140 90 */ 141 91 int __init zynq_slcr_init(void) 92 + { 93 + zynq_slcr_regmap = syscon_regmap_lookup_by_compatible("xlnx,zynq-slcr"); 94 + if (IS_ERR(zynq_slcr_regmap)) { 95 + pr_err("%s: failed to find zynq-slcr\n", __func__); 96 + return -ENODEV; 97 + } 98 + 99 + return 0; 100 + } 101 + 102 + /** 103 + * zynq_early_slcr_init - Early slcr init function 104 + * 105 + * Return: 0 on success, negative errno otherwise. 106 + * 107 + * Called very early during boot from platform code to unlock SLCR. 108 + */ 109 + int __init zynq_early_slcr_init(void) 142 110 { 143 111 struct device_node *np; 144 112 ··· 175 101 BUG(); 176 102 } 177 103 104 + np->data = (__force void *)zynq_slcr_base; 105 + 178 106 /* unlock the SLCR so that registers can be changed */ 179 - writel(SLCR_UNLOCK_MAGIC, zynq_slcr_base + SLCR_UNLOCK_OFFSET); 107 + zynq_slcr_unlock(); 180 108 181 109 pr_info("%s mapped to %p\n", np->name, zynq_slcr_base); 182 - 183 - zynq_clock_init(zynq_slcr_base); 184 110 185 111 of_node_put(np); 186 112
+2
arch/arm/plat-samsung/Makefile
··· 47 47 48 48 # PM support 49 49 50 + obj-$(CONFIG_PM_SLEEP) += pm-common.o 50 51 obj-$(CONFIG_SAMSUNG_PM) += pm.o 51 52 obj-$(CONFIG_SAMSUNG_PM_GPIO) += pm-gpio.o 52 53 obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o 54 + obj-$(CONFIG_SAMSUNG_PM_DEBUG) += pm-debug.o 53 55 54 56 obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o 55 57 obj-$(CONFIG_SAMSUNG_WDT_RESET) += watchdog-reset.o
-1
arch/arm/plat-samsung/clock.c
··· 43 43 #include <linux/debugfs.h> 44 44 #endif 45 45 46 - #include <mach/hardware.h> 47 46 #include <asm/irq.h> 48 47 49 48 #include <plat/cpu-freq.h>
+1 -1
arch/arm/plat-samsung/devs.c
··· 31 31 #include <linux/mtd/partitions.h> 32 32 #include <linux/mmc/host.h> 33 33 #include <linux/ioport.h> 34 + #include <linux/sizes.h> 34 35 #include <linux/platform_data/s3c-hsudc.h> 35 36 #include <linux/platform_data/s3c-hsotg.h> 36 37 #include <linux/platform_data/dma-s3c24xx.h> ··· 43 42 #include <asm/mach/map.h> 44 43 #include <asm/mach/irq.h> 45 44 46 - #include <mach/hardware.h> 47 45 #include <mach/dma.h> 48 46 #include <mach/irqs.h> 49 47 #include <mach/map.h>
+10
arch/arm/plat-samsung/include/plat/cpu.h
··· 20 20 21 21 extern unsigned long samsung_cpu_id; 22 22 23 + #define S3C2410_CPU_ID 0x32410000 24 + #define S3C2410_CPU_MASK 0xFFFFFFFF 25 + 23 26 #define S3C24XX_CPU_ID 0x32400000 24 27 #define S3C24XX_CPU_MASK 0xFFF00000 25 28 ··· 59 56 return ((samsung_cpu_id & mask) == (id & mask)); \ 60 57 } 61 58 59 + IS_SAMSUNG_CPU(s3c2410, S3C2410_CPU_ID, S3C2410_CPU_MASK) 62 60 IS_SAMSUNG_CPU(s3c24xx, S3C24XX_CPU_ID, S3C24XX_CPU_MASK) 63 61 IS_SAMSUNG_CPU(s3c2412, S3C2412_CPU_ID, S3C2412_CPU_MASK) 64 62 IS_SAMSUNG_CPU(s3c6400, S3C6400_CPU_ID, S3C64XX_CPU_MASK) ··· 80 76 defined(CONFIG_CPU_S3C2442) || defined(CONFIG_CPU_S3C244X) || \ 81 77 defined(CONFIG_CPU_S3C2443) 82 78 # define soc_is_s3c24xx() is_samsung_s3c24xx() 79 + # define soc_is_s3c2410() is_samsung_s3c2410() 83 80 #else 84 81 # define soc_is_s3c24xx() 0 82 + # define soc_is_s3c2410() 0 85 83 #endif 86 84 87 85 #if defined(CONFIG_CPU_S3C2412) ··· 165 159 #else 166 160 # define soc_is_exynos5440() 0 167 161 #endif 162 + 163 + #define soc_is_exynos4() (soc_is_exynos4210() || soc_is_exynos4212() || \ 164 + soc_is_exynos4412()) 165 + #define soc_is_exynos5() (soc_is_exynos5250() || soc_is_exynos5420()) 168 166 169 167 #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } 170 168
-3
arch/arm/plat-samsung/include/plat/mfc.h
··· 32 32 void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, 33 33 phys_addr_t lbase, unsigned int lsize); 34 34 35 - int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname, 36 - int depth, void *data); 37 - 38 35 #endif /* __PLAT_SAMSUNG_MFC_H */
+110
arch/arm/plat-samsung/include/plat/pm-common.h
··· 1 + /* 2 + * Copyright (C) 2013 Samsung Electronics Co., Ltd. 3 + * Tomasz Figa <t.figa@samsung.com> 4 + * Copyright (c) 2004 Simtec Electronics 5 + * http://armlinux.simtec.co.uk/ 6 + * Written by Ben Dooks, <ben@simtec.co.uk> 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 __PLAT_SAMSUNG_PM_COMMON_H 14 + #define __PLAT_SAMSUNG_PM_COMMON_H __FILE__ 15 + 16 + #include <linux/irq.h> 17 + 18 + /* sleep save info */ 19 + 20 + /** 21 + * struct sleep_save - save information for shared peripherals. 22 + * @reg: Pointer to the register to save. 23 + * @val: Holder for the value saved from reg. 24 + * 25 + * This describes a list of registers which is used by the pm core and 26 + * other subsystem to save and restore register values over suspend. 27 + */ 28 + struct sleep_save { 29 + void __iomem *reg; 30 + unsigned long val; 31 + }; 32 + 33 + #define SAVE_ITEM(x) \ 34 + { .reg = (x) } 35 + 36 + /* helper functions to save/restore lists of registers. */ 37 + 38 + extern void s3c_pm_do_save(struct sleep_save *ptr, int count); 39 + extern void s3c_pm_do_restore(const struct sleep_save *ptr, int count); 40 + extern void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count); 41 + 42 + /* PM debug functions */ 43 + 44 + /** 45 + * struct pm_uart_save - save block for core UART 46 + * @ulcon: Save value for S3C2410_ULCON 47 + * @ucon: Save value for S3C2410_UCON 48 + * @ufcon: Save value for S3C2410_UFCON 49 + * @umcon: Save value for S3C2410_UMCON 50 + * @ubrdiv: Save value for S3C2410_UBRDIV 51 + * 52 + * Save block for UART registers to be held over sleep and restored if they 53 + * are needed (say by debug). 54 + */ 55 + struct pm_uart_save { 56 + u32 ulcon; 57 + u32 ucon; 58 + u32 ufcon; 59 + u32 umcon; 60 + u32 ubrdiv; 61 + u32 udivslot; 62 + }; 63 + 64 + #ifdef CONFIG_SAMSUNG_PM_DEBUG 65 + /** 66 + * s3c_pm_dbg() - low level debug function for use in suspend/resume. 67 + * @msg: The message to print. 68 + * 69 + * This function is used mainly to debug the resume process before the system 70 + * can rely on printk/console output. It uses the low-level debugging output 71 + * routine printascii() to do its work. 72 + */ 73 + extern void s3c_pm_dbg(const char *msg, ...); 74 + 75 + /** 76 + * s3c_pm_debug_init() - suspend/resume low level debug initialization. 77 + * @base: Virtual base of UART to use for suspend/resume debugging. 78 + * 79 + * This function needs to be called before S3C_PMDBG() can be used, to set up 80 + * UART port base address and configuration. 81 + */ 82 + extern void s3c_pm_debug_init(void); 83 + 84 + #define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt) 85 + 86 + extern void s3c_pm_save_uarts(void); 87 + extern void s3c_pm_restore_uarts(void); 88 + #else 89 + #define S3C_PMDBG(fmt...) pr_debug(fmt) 90 + #define s3c_pm_debug_init() do { } while (0) 91 + 92 + static inline void s3c_pm_save_uarts(void) { } 93 + static inline void s3c_pm_restore_uarts(void) { } 94 + #endif 95 + 96 + /* suspend memory checking */ 97 + 98 + #ifdef CONFIG_SAMSUNG_PM_CHECK 99 + extern void s3c_pm_check_prepare(void); 100 + extern void s3c_pm_check_restore(void); 101 + extern void s3c_pm_check_cleanup(void); 102 + extern void s3c_pm_check_store(void); 103 + #else 104 + #define s3c_pm_check_prepare() do { } while (0) 105 + #define s3c_pm_check_restore() do { } while (0) 106 + #define s3c_pm_check_cleanup() do { } while (0) 107 + #define s3c_pm_check_store() do { } while (0) 108 + #endif 109 + 110 + #endif
+1 -79
arch/arm/plat-samsung/include/plat/pm.h
··· 15 15 * management 16 16 */ 17 17 18 - #include <linux/irq.h> 18 + #include <plat/pm-common.h> 19 19 20 20 struct device; 21 21 ··· 54 54 55 55 extern unsigned long s3c_pm_flags; 56 56 57 - extern unsigned char pm_uart_udivslot; /* true to save UART UDIVSLOT */ 58 - 59 57 /* from sleep.S */ 60 58 61 59 extern int s3c2410_cpu_suspend(unsigned long); 62 - 63 - /* sleep save info */ 64 - 65 - /** 66 - * struct sleep_save - save information for shared peripherals. 67 - * @reg: Pointer to the register to save. 68 - * @val: Holder for the value saved from reg. 69 - * 70 - * This describes a list of registers which is used by the pm core and 71 - * other subsystem to save and restore register values over suspend. 72 - */ 73 - struct sleep_save { 74 - void __iomem *reg; 75 - unsigned long val; 76 - }; 77 - 78 - #define SAVE_ITEM(x) \ 79 - { .reg = (x) } 80 - 81 - /** 82 - * struct pm_uart_save - save block for core UART 83 - * @ulcon: Save value for S3C2410_ULCON 84 - * @ucon: Save value for S3C2410_UCON 85 - * @ufcon: Save value for S3C2410_UFCON 86 - * @umcon: Save value for S3C2410_UMCON 87 - * @ubrdiv: Save value for S3C2410_UBRDIV 88 - * 89 - * Save block for UART registers to be held over sleep and restored if they 90 - * are needed (say by debug). 91 - */ 92 - struct pm_uart_save { 93 - u32 ulcon; 94 - u32 ucon; 95 - u32 ufcon; 96 - u32 umcon; 97 - u32 ubrdiv; 98 - u32 udivslot; 99 - }; 100 - 101 - /* helper functions to save/restore lists of registers. */ 102 - 103 - extern void s3c_pm_do_save(struct sleep_save *ptr, int count); 104 - extern void s3c_pm_do_restore(const struct sleep_save *ptr, int count); 105 - extern void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count); 106 60 107 61 #ifdef CONFIG_SAMSUNG_PM 108 62 extern int s3c_irq_wake(struct irq_data *data, unsigned int state); ··· 66 112 #define s3c_irq_wake NULL 67 113 #define s3c_irqext_wake NULL 68 114 #define s3c_cpu_resume NULL 69 - #endif 70 - 71 - /* PM debug functions */ 72 - 73 - #ifdef CONFIG_SAMSUNG_PM_DEBUG 74 - /** 75 - * s3c_pm_dbg() - low level debug function for use in suspend/resume. 76 - * @msg: The message to print. 77 - * 78 - * This function is used mainly to debug the resume process before the system 79 - * can rely on printk/console output. It uses the low-level debugging output 80 - * routine printascii() to do its work. 81 - */ 82 - extern void s3c_pm_dbg(const char *msg, ...); 83 - 84 - #define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt) 85 - #else 86 - #define S3C_PMDBG(fmt...) printk(KERN_DEBUG fmt) 87 115 #endif 88 116 89 117 #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK ··· 79 143 #else 80 144 static inline void s3c_pm_debug_smdkled(u32 set, u32 clear) { } 81 145 #endif /* CONFIG_S3C_PM_DEBUG_LED_SMDK */ 82 - 83 - /* suspend memory checking */ 84 - 85 - #ifdef CONFIG_SAMSUNG_PM_CHECK 86 - extern void s3c_pm_check_prepare(void); 87 - extern void s3c_pm_check_restore(void); 88 - extern void s3c_pm_check_cleanup(void); 89 - extern void s3c_pm_check_store(void); 90 - #else 91 - #define s3c_pm_check_prepare() do { } while(0) 92 - #define s3c_pm_check_restore() do { } while(0) 93 - #define s3c_pm_check_cleanup() do { } while(0) 94 - #define s3c_pm_check_store() do { } while(0) 95 - #endif 96 146 97 147 /** 98 148 * s3c_pm_configure_extint() - ensure pins are correctly set for IRQ
-175
arch/arm/plat-samsung/include/plat/uncompress.h
··· 1 - /* arch/arm/plat-samsung/include/plat/uncompress.h 2 - * 3 - * Copyright 2003, 2007 Simtec Electronics 4 - * http://armlinux.simtec.co.uk/ 5 - * Ben Dooks <ben@simtec.co.uk> 6 - * 7 - * S3C - uncompress code 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 - #ifndef __ASM_PLAT_UNCOMPRESS_H 15 - #define __ASM_PLAT_UNCOMPRESS_H 16 - 17 - typedef unsigned int upf_t; /* cannot include linux/serial_core.h */ 18 - 19 - /* uart setup */ 20 - 21 - unsigned int fifo_mask; 22 - unsigned int fifo_max; 23 - 24 - volatile u8 *uart_base; 25 - 26 - /* forward declerations */ 27 - 28 - static void arch_detect_cpu(void); 29 - 30 - /* defines for UART registers */ 31 - 32 - #include <linux/serial_s3c.h> 33 - 34 - /* working in physical space... */ 35 - #define S3C_WDOGREG(x) ((S3C_PA_WDT + (x))) 36 - 37 - #define S3C2410_WTCON S3C_WDOGREG(0x00) 38 - #define S3C2410_WTDAT S3C_WDOGREG(0x04) 39 - #define S3C2410_WTCNT S3C_WDOGREG(0x08) 40 - 41 - #define S3C2410_WTCON_RSTEN (1 << 0) 42 - #define S3C2410_WTCON_ENABLE (1 << 5) 43 - 44 - #define S3C2410_WTCON_DIV128 (3 << 3) 45 - 46 - #define S3C2410_WTCON_PRESCALE(x) ((x) << 8) 47 - 48 - /* how many bytes we allow into the FIFO at a time in FIFO mode */ 49 - #define FIFO_MAX (14) 50 - 51 - static __inline__ void 52 - uart_wr(unsigned int reg, unsigned int val) 53 - { 54 - volatile unsigned int *ptr; 55 - 56 - ptr = (volatile unsigned int *)(reg + uart_base); 57 - *ptr = val; 58 - } 59 - 60 - static __inline__ unsigned int 61 - uart_rd(unsigned int reg) 62 - { 63 - volatile unsigned int *ptr; 64 - 65 - ptr = (volatile unsigned int *)(reg + uart_base); 66 - return *ptr; 67 - } 68 - 69 - /* we can deal with the case the UARTs are being run 70 - * in FIFO mode, so that we don't hold up our execution 71 - * waiting for tx to happen... 72 - */ 73 - 74 - static void putc(int ch) 75 - { 76 - if (!config_enabled(CONFIG_DEBUG_LL)) 77 - return; 78 - 79 - if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) { 80 - int level; 81 - 82 - while (1) { 83 - level = uart_rd(S3C2410_UFSTAT); 84 - level &= fifo_mask; 85 - 86 - if (level < fifo_max) 87 - break; 88 - } 89 - 90 - } else { 91 - /* not using fifos */ 92 - 93 - while ((uart_rd(S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE) != S3C2410_UTRSTAT_TXE) 94 - barrier(); 95 - } 96 - 97 - /* write byte to transmission register */ 98 - uart_wr(S3C2410_UTXH, ch); 99 - } 100 - 101 - static inline void flush(void) 102 - { 103 - } 104 - 105 - #define __raw_writel(d, ad) \ 106 - do { \ 107 - *((volatile unsigned int __force *)(ad)) = (d); \ 108 - } while (0) 109 - 110 - #ifdef CONFIG_S3C_BOOT_ERROR_RESET 111 - 112 - static void arch_decomp_error(const char *x) 113 - { 114 - putstr("\n\n"); 115 - putstr(x); 116 - putstr("\n\n -- System resetting\n"); 117 - 118 - __raw_writel(0x4000, S3C2410_WTDAT); 119 - __raw_writel(0x4000, S3C2410_WTCNT); 120 - __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x40), S3C2410_WTCON); 121 - 122 - while(1); 123 - } 124 - 125 - #define arch_error arch_decomp_error 126 - #endif 127 - 128 - #ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO 129 - static inline void arch_enable_uart_fifo(void) 130 - { 131 - u32 fifocon; 132 - 133 - if (!config_enabled(CONFIG_DEBUG_LL)) 134 - return; 135 - 136 - fifocon = uart_rd(S3C2410_UFCON); 137 - 138 - if (!(fifocon & S3C2410_UFCON_FIFOMODE)) { 139 - fifocon |= S3C2410_UFCON_RESETBOTH; 140 - uart_wr(S3C2410_UFCON, fifocon); 141 - 142 - /* wait for fifo reset to complete */ 143 - while (1) { 144 - fifocon = uart_rd(S3C2410_UFCON); 145 - if (!(fifocon & S3C2410_UFCON_RESETBOTH)) 146 - break; 147 - } 148 - 149 - uart_wr(S3C2410_UFCON, S3C2410_UFCON_FIFOMODE); 150 - } 151 - } 152 - #else 153 - #define arch_enable_uart_fifo() do { } while(0) 154 - #endif 155 - 156 - 157 - static void 158 - arch_decomp_setup(void) 159 - { 160 - /* we may need to setup the uart(s) here if we are not running 161 - * on an BAST... the BAST will have left the uarts configured 162 - * after calling linux. 163 - */ 164 - 165 - arch_detect_cpu(); 166 - 167 - /* Enable the UART FIFOs if they where not enabled and our 168 - * configuration says we should turn them on. 169 - */ 170 - 171 - arch_enable_uart_fifo(); 172 - } 173 - 174 - 175 - #endif /* __ASM_PLAT_UNCOMPRESS_H */
-2
arch/arm/plat-samsung/init.c
··· 25 25 #include <linux/platform_device.h> 26 26 #include <linux/of.h> 27 27 28 - #include <mach/hardware.h> 29 - 30 28 #include <asm/mach/arch.h> 31 29 #include <asm/mach/map.h> 32 30
+1 -1
arch/arm/plat-samsung/pm-check.c
··· 19 19 #include <linux/ioport.h> 20 20 #include <linux/slab.h> 21 21 22 - #include <plat/pm.h> 22 + #include <plat/pm-common.h> 23 23 24 24 #if CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE < 1 25 25 #error CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE must be a positive non-zero value
+75
arch/arm/plat-samsung/pm-common.c
··· 1 + /* 2 + * Copyright (C) 2013 Samsung Electronics Co., Ltd. 3 + * Tomasz Figa <t.figa@samsung.com> 4 + * Copyright (C) 2008 Openmoko, Inc. 5 + * Copyright (C) 2004-2008 Simtec Electronics 6 + * Ben Dooks <ben@simtec.co.uk> 7 + * http://armlinux.simtec.co.uk/ 8 + * 9 + * Samsung common power management helper functions. 10 + * 11 + * This program is free software; you can redistribute it and/or modify 12 + * it under the terms of the GNU General Public License version 2 as 13 + * published by the Free Software Foundation. 14 + */ 15 + 16 + #include <linux/io.h> 17 + #include <linux/kernel.h> 18 + 19 + #include <plat/pm-common.h> 20 + 21 + /* helper functions to save and restore register state */ 22 + 23 + /** 24 + * s3c_pm_do_save() - save a set of registers for restoration on resume. 25 + * @ptr: Pointer to an array of registers. 26 + * @count: Size of the ptr array. 27 + * 28 + * Run through the list of registers given, saving their contents in the 29 + * array for later restoration when we wakeup. 30 + */ 31 + void s3c_pm_do_save(struct sleep_save *ptr, int count) 32 + { 33 + for (; count > 0; count--, ptr++) { 34 + ptr->val = __raw_readl(ptr->reg); 35 + S3C_PMDBG("saved %p value %08lx\n", ptr->reg, ptr->val); 36 + } 37 + } 38 + 39 + /** 40 + * s3c_pm_do_restore() - restore register values from the save list. 41 + * @ptr: Pointer to an array of registers. 42 + * @count: Size of the ptr array. 43 + * 44 + * Restore the register values saved from s3c_pm_do_save(). 45 + * 46 + * Note, we do not use S3C_PMDBG() in here, as the system may not have 47 + * restore the UARTs state yet 48 + */ 49 + 50 + void s3c_pm_do_restore(const struct sleep_save *ptr, int count) 51 + { 52 + for (; count > 0; count--, ptr++) { 53 + pr_debug("restore %p (restore %08lx, was %08x)\n", 54 + ptr->reg, ptr->val, __raw_readl(ptr->reg)); 55 + 56 + __raw_writel(ptr->val, ptr->reg); 57 + } 58 + } 59 + 60 + /** 61 + * s3c_pm_do_restore_core() - early restore register values from save list. 62 + * 63 + * This is similar to s3c_pm_do_restore() except we try and minimise the 64 + * side effects of the function in case registers that hardware might need 65 + * to work has been restored. 66 + * 67 + * WARNING: Do not put any debug in here that may effect memory or use 68 + * peripherals, as things may be changing! 69 + */ 70 + 71 + void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count) 72 + { 73 + for (; count > 0; count--, ptr++) 74 + __raw_writel(ptr->val, ptr->reg); 75 + }
+97
arch/arm/plat-samsung/pm-debug.c
··· 1 + /* 2 + * Copyright (C) 2013 Samsung Electronics Co., Ltd. 3 + * Tomasz Figa <t.figa@samsung.com> 4 + * Copyright (C) 2008 Openmoko, Inc. 5 + * Copyright (C) 2004-2008 Simtec Electronics 6 + * Ben Dooks <ben@simtec.co.uk> 7 + * http://armlinux.simtec.co.uk/ 8 + * 9 + * Samsung common power management (suspend to RAM) debug support 10 + * 11 + * This program is free software; you can redistribute it and/or modify 12 + * it under the terms of the GNU General Public License version 2 as 13 + * published by the Free Software Foundation. 14 + */ 15 + 16 + #include <linux/serial_core.h> 17 + #include <linux/io.h> 18 + 19 + #include <asm/mach/map.h> 20 + 21 + #include <plat/cpu.h> 22 + #include <plat/pm-common.h> 23 + 24 + #ifdef CONFIG_SAMSUNG_ATAGS 25 + #include <mach/pm-core.h> 26 + #else 27 + static inline void s3c_pm_debug_init_uart(void) {} 28 + static inline void s3c_pm_arch_update_uart(void __iomem *regs, 29 + struct pm_uart_save *save) {} 30 + #endif 31 + 32 + static struct pm_uart_save uart_save; 33 + 34 + extern void printascii(const char *); 35 + 36 + void s3c_pm_dbg(const char *fmt, ...) 37 + { 38 + va_list va; 39 + char buff[256]; 40 + 41 + va_start(va, fmt); 42 + vsnprintf(buff, sizeof(buff), fmt, va); 43 + va_end(va); 44 + 45 + printascii(buff); 46 + } 47 + 48 + void s3c_pm_debug_init(void) 49 + { 50 + /* restart uart clocks so we can use them to output */ 51 + s3c_pm_debug_init_uart(); 52 + } 53 + 54 + static inline void __iomem *s3c_pm_uart_base(void) 55 + { 56 + unsigned long paddr; 57 + unsigned long vaddr; 58 + 59 + debug_ll_addr(&paddr, &vaddr); 60 + 61 + return (void __iomem *)vaddr; 62 + } 63 + 64 + void s3c_pm_save_uarts(void) 65 + { 66 + void __iomem *regs = s3c_pm_uart_base(); 67 + struct pm_uart_save *save = &uart_save; 68 + 69 + save->ulcon = __raw_readl(regs + S3C2410_ULCON); 70 + save->ucon = __raw_readl(regs + S3C2410_UCON); 71 + save->ufcon = __raw_readl(regs + S3C2410_UFCON); 72 + save->umcon = __raw_readl(regs + S3C2410_UMCON); 73 + save->ubrdiv = __raw_readl(regs + S3C2410_UBRDIV); 74 + 75 + if (!soc_is_s3c2410()) 76 + save->udivslot = __raw_readl(regs + S3C2443_DIVSLOT); 77 + 78 + S3C_PMDBG("UART[%p]: ULCON=%04x, UCON=%04x, UFCON=%04x, UBRDIV=%04x\n", 79 + regs, save->ulcon, save->ucon, save->ufcon, save->ubrdiv); 80 + } 81 + 82 + void s3c_pm_restore_uarts(void) 83 + { 84 + void __iomem *regs = s3c_pm_uart_base(); 85 + struct pm_uart_save *save = &uart_save; 86 + 87 + s3c_pm_arch_update_uart(regs, save); 88 + 89 + __raw_writel(save->ulcon, regs + S3C2410_ULCON); 90 + __raw_writel(save->ucon, regs + S3C2410_UCON); 91 + __raw_writel(save->ufcon, regs + S3C2410_UFCON); 92 + __raw_writel(save->umcon, regs + S3C2410_UMCON); 93 + __raw_writel(save->ubrdiv, regs + S3C2410_UBRDIV); 94 + 95 + if (!soc_is_s3c2410()) 96 + __raw_writel(save->udivslot, regs + S3C2443_DIVSLOT); 97 + }
-145
arch/arm/plat-samsung/pm.c
··· 17 17 #include <linux/errno.h> 18 18 #include <linux/delay.h> 19 19 #include <linux/of.h> 20 - #include <linux/serial_core.h> 21 20 #include <linux/serial_s3c.h> 22 21 #include <linux/io.h> 23 22 ··· 24 25 #include <asm/suspend.h> 25 26 26 27 #ifdef CONFIG_SAMSUNG_ATAGS 27 - #include <mach/hardware.h> 28 28 #include <mach/map.h> 29 29 #ifndef CONFIG_ARCH_EXYNOS 30 30 #include <mach/regs-clock.h> ··· 40 42 /* for external use */ 41 43 42 44 unsigned long s3c_pm_flags; 43 - 44 - /* Debug code: 45 - * 46 - * This code supports debug output to the low level UARTs for use on 47 - * resume before the console layer is available. 48 - */ 49 - 50 - #ifdef CONFIG_SAMSUNG_PM_DEBUG 51 - extern void printascii(const char *); 52 - 53 - void s3c_pm_dbg(const char *fmt, ...) 54 - { 55 - va_list va; 56 - char buff[256]; 57 - 58 - va_start(va, fmt); 59 - vsnprintf(buff, sizeof(buff), fmt, va); 60 - va_end(va); 61 - 62 - printascii(buff); 63 - } 64 - 65 - static inline void s3c_pm_debug_init(void) 66 - { 67 - /* restart uart clocks so we can use them to output */ 68 - s3c_pm_debug_init_uart(); 69 - } 70 - 71 - #else 72 - #define s3c_pm_debug_init() do { } while(0) 73 - 74 - #endif /* CONFIG_SAMSUNG_PM_DEBUG */ 75 - 76 - /* Save the UART configurations if we are configured for debug. */ 77 - 78 - unsigned char pm_uart_udivslot; 79 - 80 - #ifdef CONFIG_SAMSUNG_PM_DEBUG 81 - 82 - static struct pm_uart_save uart_save; 83 - 84 - static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) 85 - { 86 - void __iomem *regs = S3C_VA_UARTx(uart); 87 - 88 - save->ulcon = __raw_readl(regs + S3C2410_ULCON); 89 - save->ucon = __raw_readl(regs + S3C2410_UCON); 90 - save->ufcon = __raw_readl(regs + S3C2410_UFCON); 91 - save->umcon = __raw_readl(regs + S3C2410_UMCON); 92 - save->ubrdiv = __raw_readl(regs + S3C2410_UBRDIV); 93 - 94 - if (pm_uart_udivslot) 95 - save->udivslot = __raw_readl(regs + S3C2443_DIVSLOT); 96 - 97 - S3C_PMDBG("UART[%d]: ULCON=%04x, UCON=%04x, UFCON=%04x, UBRDIV=%04x\n", 98 - uart, save->ulcon, save->ucon, save->ufcon, save->ubrdiv); 99 - } 100 - 101 - static void s3c_pm_save_uarts(void) 102 - { 103 - s3c_pm_save_uart(CONFIG_DEBUG_S3C_UART, &uart_save); 104 - } 105 - 106 - static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save) 107 - { 108 - void __iomem *regs = S3C_VA_UARTx(uart); 109 - 110 - s3c_pm_arch_update_uart(regs, save); 111 - 112 - __raw_writel(save->ulcon, regs + S3C2410_ULCON); 113 - __raw_writel(save->ucon, regs + S3C2410_UCON); 114 - __raw_writel(save->ufcon, regs + S3C2410_UFCON); 115 - __raw_writel(save->umcon, regs + S3C2410_UMCON); 116 - __raw_writel(save->ubrdiv, regs + S3C2410_UBRDIV); 117 - 118 - if (pm_uart_udivslot) 119 - __raw_writel(save->udivslot, regs + S3C2443_DIVSLOT); 120 - } 121 - 122 - static void s3c_pm_restore_uarts(void) 123 - { 124 - s3c_pm_restore_uart(CONFIG_DEBUG_S3C_UART, &uart_save); 125 - } 126 - #else 127 - static void s3c_pm_save_uarts(void) { } 128 - static void s3c_pm_restore_uarts(void) { } 129 - #endif 130 45 131 46 /* The IRQ ext-int code goes here, it is too small to currently bother 132 47 * with its own file. */ ··· 63 152 s3c_irqwake_eintmask &= ~bit; 64 153 65 154 return 0; 66 - } 67 - 68 - /* helper functions to save and restore register state */ 69 - 70 - /** 71 - * s3c_pm_do_save() - save a set of registers for restoration on resume. 72 - * @ptr: Pointer to an array of registers. 73 - * @count: Size of the ptr array. 74 - * 75 - * Run through the list of registers given, saving their contents in the 76 - * array for later restoration when we wakeup. 77 - */ 78 - void s3c_pm_do_save(struct sleep_save *ptr, int count) 79 - { 80 - for (; count > 0; count--, ptr++) { 81 - ptr->val = __raw_readl(ptr->reg); 82 - S3C_PMDBG("saved %p value %08lx\n", ptr->reg, ptr->val); 83 - } 84 - } 85 - 86 - /** 87 - * s3c_pm_do_restore() - restore register values from the save list. 88 - * @ptr: Pointer to an array of registers. 89 - * @count: Size of the ptr array. 90 - * 91 - * Restore the register values saved from s3c_pm_do_save(). 92 - * 93 - * Note, we do not use S3C_PMDBG() in here, as the system may not have 94 - * restore the UARTs state yet 95 - */ 96 - 97 - void s3c_pm_do_restore(const struct sleep_save *ptr, int count) 98 - { 99 - for (; count > 0; count--, ptr++) { 100 - printk(KERN_DEBUG "restore %p (restore %08lx, was %08x)\n", 101 - ptr->reg, ptr->val, __raw_readl(ptr->reg)); 102 - 103 - __raw_writel(ptr->val, ptr->reg); 104 - } 105 - } 106 - 107 - /** 108 - * s3c_pm_do_restore_core() - early restore register values from save list. 109 - * 110 - * This is similar to s3c_pm_do_restore() except we try and minimise the 111 - * side effects of the function in case registers that hardware might need 112 - * to work has been restored. 113 - * 114 - * WARNING: Do not put any debug in here that may effect memory or use 115 - * peripherals, as things may be changing! 116 - */ 117 - 118 - void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count) 119 - { 120 - for (; count > 0; count--, ptr++) 121 - __raw_writel(ptr->val, ptr->reg); 122 155 } 123 156 124 157 /* s3c2410_pm_show_resume_irqs
+10 -7
arch/arm/plat-samsung/s5p-dev-mfc.c
··· 122 122 #endif 123 123 124 124 #ifdef CONFIG_OF 125 - int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname, 125 + int __init s5p_fdt_alloc_mfc_mem(unsigned long node, const char *uname, 126 126 int depth, void *data) 127 127 { 128 128 __be32 *prop; 129 129 unsigned long len; 130 - struct s5p_mfc_dt_meminfo *mfc_mem = data; 130 + struct s5p_mfc_dt_meminfo mfc_mem; 131 131 132 132 if (!data) 133 133 return 0; 134 134 135 - if (!of_flat_dt_is_compatible(node, mfc_mem->compatible)) 135 + if (!of_flat_dt_is_compatible(node, data)) 136 136 return 0; 137 137 138 138 prop = of_get_flat_dt_prop(node, "samsung,mfc-l", &len); 139 139 if (!prop || (len != 2 * sizeof(unsigned long))) 140 140 return 0; 141 141 142 - mfc_mem->loff = be32_to_cpu(prop[0]); 143 - mfc_mem->lsize = be32_to_cpu(prop[1]); 142 + mfc_mem.loff = be32_to_cpu(prop[0]); 143 + mfc_mem.lsize = be32_to_cpu(prop[1]); 144 144 145 145 prop = of_get_flat_dt_prop(node, "samsung,mfc-r", &len); 146 146 if (!prop || (len != 2 * sizeof(unsigned long))) 147 147 return 0; 148 148 149 - mfc_mem->roff = be32_to_cpu(prop[0]); 150 - mfc_mem->rsize = be32_to_cpu(prop[1]); 149 + mfc_mem.roff = be32_to_cpu(prop[0]); 150 + mfc_mem.rsize = be32_to_cpu(prop[1]); 151 + 152 + s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, 153 + mfc_mem.loff, mfc_mem.lsize); 151 154 152 155 return 1; 153 156 }
-1
arch/arm/plat-samsung/s5p-dev-uart.c
··· 18 18 19 19 #include <asm/mach/arch.h> 20 20 #include <asm/mach/irq.h> 21 - #include <mach/hardware.h> 22 21 #include <mach/map.h> 23 22 24 23 #include <plat/devs.h>
-43
arch/arm/plat-samsung/s5p-sleep.S
··· 23 23 24 24 #include <linux/linkage.h> 25 25 #include <asm/asm-offsets.h> 26 - #include <asm/hardware/cache-l2x0.h> 27 26 28 - #define CPU_MASK 0xff0ffff0 29 - #define CPU_CORTEX_A9 0x410fc090 30 - 31 - /* 32 - * The following code is located into the .data section. This is to 33 - * allow l2x0_regs_phys to be accessed with a relative load while we 34 - * can't rely on any MMU translation. We could have put l2x0_regs_phys 35 - * in the .text section as well, but some setups might insist on it to 36 - * be truly read-only. (Reference from: arch/arm/kernel/sleep.S) 37 - */ 38 27 .data 39 28 .align 40 29 ··· 42 53 */ 43 54 44 55 ENTRY(s3c_cpu_resume) 45 - #ifdef CONFIG_CACHE_L2X0 46 - mrc p15, 0, r0, c0, c0, 0 47 - ldr r1, =CPU_MASK 48 - and r0, r0, r1 49 - ldr r1, =CPU_CORTEX_A9 50 - cmp r0, r1 51 - bne resume_l2on 52 - adr r0, l2x0_regs_phys 53 - ldr r0, [r0] 54 - ldr r1, [r0, #L2X0_R_PHY_BASE] 55 - ldr r2, [r1, #L2X0_CTRL] 56 - tst r2, #0x1 57 - bne resume_l2on 58 - ldr r2, [r0, #L2X0_R_AUX_CTRL] 59 - str r2, [r1, #L2X0_AUX_CTRL] 60 - ldr r2, [r0, #L2X0_R_TAG_LATENCY] 61 - str r2, [r1, #L2X0_TAG_LATENCY_CTRL] 62 - ldr r2, [r0, #L2X0_R_DATA_LATENCY] 63 - str r2, [r1, #L2X0_DATA_LATENCY_CTRL] 64 - ldr r2, [r0, #L2X0_R_PREFETCH_CTRL] 65 - str r2, [r1, #L2X0_PREFETCH_CTRL] 66 - ldr r2, [r0, #L2X0_R_PWR_CTRL] 67 - str r2, [r1, #L2X0_POWER_CTRL] 68 - mov r2, #1 69 - str r2, [r1, #L2X0_CTRL] 70 - resume_l2on: 71 - #endif 72 56 b cpu_resume 73 57 ENDPROC(s3c_cpu_resume) 74 - #ifdef CONFIG_CACHE_L2X0 75 - .globl l2x0_regs_phys 76 - l2x0_regs_phys: 77 - .long 0 78 - #endif
+1 -1
drivers/clk/samsung/clk-exynos-audss.c
··· 17 17 #include <linux/module.h> 18 18 #include <linux/platform_device.h> 19 19 20 - #include <dt-bindings/clk/exynos-audss-clk.h> 20 + #include <dt-bindings/clock/exynos-audss-clk.h> 21 21 22 22 enum exynos_audss_clk_type { 23 23 TYPE_EXYNOS4210,
+4 -2
drivers/clk/versatile/clk-impd1.c
··· 13 13 #include <linux/io.h> 14 14 #include <linux/platform_data/clk-integrator.h> 15 15 16 - #include <mach/impd1.h> 17 - 18 16 #include "clk-icst.h" 17 + 18 + #define IMPD1_OSC1 0x00 19 + #define IMPD1_OSC2 0x04 20 + #define IMPD1_LOCK 0x08 19 21 20 22 struct impd1_clk { 21 23 char *vco1name;
+61 -26
drivers/clk/zynq/clkc.c
··· 21 21 #include <linux/clk/zynq.h> 22 22 #include <linux/clk-provider.h> 23 23 #include <linux/of.h> 24 + #include <linux/of_address.h> 24 25 #include <linux/slab.h> 25 26 #include <linux/string.h> 26 27 #include <linux/io.h> 27 28 28 - static void __iomem *zynq_slcr_base_priv; 29 + static void __iomem *zynq_clkc_base; 29 30 30 - #define SLCR_ARMPLL_CTRL (zynq_slcr_base_priv + 0x100) 31 - #define SLCR_DDRPLL_CTRL (zynq_slcr_base_priv + 0x104) 32 - #define SLCR_IOPLL_CTRL (zynq_slcr_base_priv + 0x108) 33 - #define SLCR_PLL_STATUS (zynq_slcr_base_priv + 0x10c) 34 - #define SLCR_ARM_CLK_CTRL (zynq_slcr_base_priv + 0x120) 35 - #define SLCR_DDR_CLK_CTRL (zynq_slcr_base_priv + 0x124) 36 - #define SLCR_DCI_CLK_CTRL (zynq_slcr_base_priv + 0x128) 37 - #define SLCR_APER_CLK_CTRL (zynq_slcr_base_priv + 0x12c) 38 - #define SLCR_GEM0_CLK_CTRL (zynq_slcr_base_priv + 0x140) 39 - #define SLCR_GEM1_CLK_CTRL (zynq_slcr_base_priv + 0x144) 40 - #define SLCR_SMC_CLK_CTRL (zynq_slcr_base_priv + 0x148) 41 - #define SLCR_LQSPI_CLK_CTRL (zynq_slcr_base_priv + 0x14c) 42 - #define SLCR_SDIO_CLK_CTRL (zynq_slcr_base_priv + 0x150) 43 - #define SLCR_UART_CLK_CTRL (zynq_slcr_base_priv + 0x154) 44 - #define SLCR_SPI_CLK_CTRL (zynq_slcr_base_priv + 0x158) 45 - #define SLCR_CAN_CLK_CTRL (zynq_slcr_base_priv + 0x15c) 46 - #define SLCR_CAN_MIOCLK_CTRL (zynq_slcr_base_priv + 0x160) 47 - #define SLCR_DBG_CLK_CTRL (zynq_slcr_base_priv + 0x164) 48 - #define SLCR_PCAP_CLK_CTRL (zynq_slcr_base_priv + 0x168) 49 - #define SLCR_FPGA0_CLK_CTRL (zynq_slcr_base_priv + 0x170) 50 - #define SLCR_621_TRUE (zynq_slcr_base_priv + 0x1c4) 51 - #define SLCR_SWDT_CLK_SEL (zynq_slcr_base_priv + 0x304) 31 + #define SLCR_ARMPLL_CTRL (zynq_clkc_base + 0x00) 32 + #define SLCR_DDRPLL_CTRL (zynq_clkc_base + 0x04) 33 + #define SLCR_IOPLL_CTRL (zynq_clkc_base + 0x08) 34 + #define SLCR_PLL_STATUS (zynq_clkc_base + 0x0c) 35 + #define SLCR_ARM_CLK_CTRL (zynq_clkc_base + 0x20) 36 + #define SLCR_DDR_CLK_CTRL (zynq_clkc_base + 0x24) 37 + #define SLCR_DCI_CLK_CTRL (zynq_clkc_base + 0x28) 38 + #define SLCR_APER_CLK_CTRL (zynq_clkc_base + 0x2c) 39 + #define SLCR_GEM0_CLK_CTRL (zynq_clkc_base + 0x40) 40 + #define SLCR_GEM1_CLK_CTRL (zynq_clkc_base + 0x44) 41 + #define SLCR_SMC_CLK_CTRL (zynq_clkc_base + 0x48) 42 + #define SLCR_LQSPI_CLK_CTRL (zynq_clkc_base + 0x4c) 43 + #define SLCR_SDIO_CLK_CTRL (zynq_clkc_base + 0x50) 44 + #define SLCR_UART_CLK_CTRL (zynq_clkc_base + 0x54) 45 + #define SLCR_SPI_CLK_CTRL (zynq_clkc_base + 0x58) 46 + #define SLCR_CAN_CLK_CTRL (zynq_clkc_base + 0x5c) 47 + #define SLCR_CAN_MIOCLK_CTRL (zynq_clkc_base + 0x60) 48 + #define SLCR_DBG_CLK_CTRL (zynq_clkc_base + 0x64) 49 + #define SLCR_PCAP_CLK_CTRL (zynq_clkc_base + 0x68) 50 + #define SLCR_FPGA0_CLK_CTRL (zynq_clkc_base + 0x70) 51 + #define SLCR_621_TRUE (zynq_clkc_base + 0xc4) 52 + #define SLCR_SWDT_CLK_SEL (zynq_clkc_base + 0x204) 52 53 53 54 #define NUM_MIO_PINS 54 54 55 ··· 570 569 571 570 CLK_OF_DECLARE(zynq_clkc, "xlnx,ps7-clkc", zynq_clk_setup); 572 571 573 - void __init zynq_clock_init(void __iomem *slcr_base) 572 + void __init zynq_clock_init(void) 574 573 { 575 - zynq_slcr_base_priv = slcr_base; 576 - of_clk_init(NULL); 574 + struct device_node *np; 575 + struct device_node *slcr; 576 + struct resource res; 577 + 578 + np = of_find_compatible_node(NULL, NULL, "xlnx,ps7-clkc"); 579 + if (!np) { 580 + pr_err("%s: clkc node not found\n", __func__); 581 + goto np_err; 582 + } 583 + 584 + if (of_address_to_resource(np, 0, &res)) { 585 + pr_err("%s: failed to get resource\n", np->name); 586 + goto np_err; 587 + } 588 + 589 + slcr = of_get_parent(np); 590 + 591 + if (slcr->data) { 592 + zynq_clkc_base = (__force void __iomem *)slcr->data + res.start; 593 + } else { 594 + pr_err("%s: Unable to get I/O memory\n", np->name); 595 + of_node_put(slcr); 596 + goto np_err; 597 + } 598 + 599 + pr_info("%s: clkc starts at %p\n", __func__, zynq_clkc_base); 600 + 601 + of_node_put(slcr); 602 + of_node_put(np); 603 + 604 + return; 605 + 606 + np_err: 607 + of_node_put(np); 608 + BUG(); 609 + return; 577 610 }
include/dt-bindings/clk/exynos-audss-clk.h include/dt-bindings/clock/exynos-audss-clk.h
+1 -1
include/linux/clk/zynq.h
··· 22 22 23 23 #include <linux/spinlock.h> 24 24 25 - void zynq_clock_init(void __iomem *slcr); 25 + void zynq_clock_init(void); 26 26 27 27 struct clk *clk_register_zynq_pll(const char *name, const char *parent, 28 28 void __iomem *pll_ctrl, void __iomem *pll_status, u8 lock_index,
+2
include/linux/serial_s3c.h
··· 233 233 234 234 #ifndef __ASSEMBLY__ 235 235 236 + #include <linux/serial_core.h> 237 + 236 238 /* configuration structure for per-machine configurations for the 237 239 * serial port 238 240 *