Merge branches 'samsung/cleanup', 'samsung/exynos-clk' and 'samsung/exynos-clk2'...
authorArnd Bergmann <arnd@arndb.de>
Sat, 29 Mar 2014 00:51:51 +0000 (01:51 +0100)
committerArnd Bergmann <arnd@arndb.de>
Sat, 29 Mar 2014 00:51:51 +0000 (01:51 +0100)
These are dependencies for the following Samsung branches

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
118 files changed:
Documentation/devicetree/bindings/arm/samsung/pmu.txt [new file with mode: 0644]
Documentation/devicetree/bindings/clock/exynos4-clock.txt
Documentation/devicetree/bindings/clock/exynos5250-clock.txt
Documentation/devicetree/bindings/clock/exynos5420-clock.txt
Documentation/devicetree/bindings/clock/exynos5440-clock.txt
arch/arm/Kconfig.debug
arch/arm/boot/dts/exynos4.dtsi
arch/arm/boot/dts/exynos4210.dtsi
arch/arm/boot/dts/exynos4412-odroidx.dts
arch/arm/boot/dts/exynos4412-origen.dts
arch/arm/boot/dts/exynos4x12.dtsi
arch/arm/boot/dts/exynos5.dtsi
arch/arm/boot/dts/exynos5250-arndale.dts
arch/arm/boot/dts/exynos5250-smdk5250.dts
arch/arm/boot/dts/exynos5250-snow.dts
arch/arm/boot/dts/exynos5250.dtsi
arch/arm/boot/dts/exynos5420-arndale-octa.dts
arch/arm/boot/dts/exynos5420-smdk5420.dts
arch/arm/boot/dts/exynos5420.dtsi
arch/arm/boot/dts/exynos5440.dtsi
arch/arm/include/debug/samsung.S
arch/arm/mach-exynos/common.c
arch/arm/mach-exynos/include/mach/uncompress.h [deleted file]
arch/arm/mach-exynos/pm.c
arch/arm/mach-exynos/pm_domains.c
arch/arm/mach-s3c24xx/Kconfig
arch/arm/mach-s3c24xx/clock-s3c2410.c
arch/arm/mach-s3c24xx/clock-s3c2412.c
arch/arm/mach-s3c24xx/clock-s3c2440.c
arch/arm/mach-s3c24xx/common.c
arch/arm/mach-s3c24xx/dma-s3c2410.c
arch/arm/mach-s3c24xx/dma-s3c2412.c
arch/arm/mach-s3c24xx/dma-s3c2440.c
arch/arm/mach-s3c24xx/dma-s3c2443.c
arch/arm/mach-s3c24xx/include/mach/debug-macro.S
arch/arm/mach-s3c24xx/include/mach/rtc-core.h [new file with mode: 0644]
arch/arm/mach-s3c24xx/include/mach/tick.h [deleted file]
arch/arm/mach-s3c24xx/mach-amlm5900.c
arch/arm/mach-s3c24xx/mach-anubis.c
arch/arm/mach-s3c24xx/mach-at2440evb.c
arch/arm/mach-s3c24xx/mach-bast.c
arch/arm/mach-s3c24xx/mach-gta02.c
arch/arm/mach-s3c24xx/mach-h1940.c
arch/arm/mach-s3c24xx/mach-jive.c
arch/arm/mach-s3c24xx/mach-mini2440.c
arch/arm/mach-s3c24xx/mach-n30.c
arch/arm/mach-s3c24xx/mach-nexcoder.c
arch/arm/mach-s3c24xx/mach-osiris.c
arch/arm/mach-s3c24xx/mach-otom.c
arch/arm/mach-s3c24xx/mach-qt2410.c
arch/arm/mach-s3c24xx/mach-rx1950.c
arch/arm/mach-s3c24xx/mach-rx3715.c
arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
arch/arm/mach-s3c24xx/mach-smdk2410.c
arch/arm/mach-s3c24xx/mach-smdk2413.c
arch/arm/mach-s3c24xx/mach-smdk2416.c
arch/arm/mach-s3c24xx/mach-smdk2440.c
arch/arm/mach-s3c24xx/mach-smdk2443.c
arch/arm/mach-s3c24xx/mach-tct_hammer.c
arch/arm/mach-s3c24xx/mach-vr1000.c
arch/arm/mach-s3c24xx/mach-vstms.c
arch/arm/mach-s3c24xx/pm.c
arch/arm/mach-s3c24xx/s3c2410.c
arch/arm/mach-s3c24xx/s3c2412.c
arch/arm/mach-s3c24xx/s3c2416.c
arch/arm/mach-s3c24xx/s3c2443.c
arch/arm/mach-s3c24xx/s3c244x.c
arch/arm/mach-s3c24xx/sleep-s3c2410.S
arch/arm/mach-s3c24xx/sleep.S
arch/arm/mach-s3c64xx/common.c
arch/arm/mach-s3c64xx/include/mach/debug-macro.S
arch/arm/mach-s3c64xx/include/mach/tick.h [deleted file]
arch/arm/mach-s3c64xx/irq-pm.c
arch/arm/mach-s3c64xx/mach-anw6410.c
arch/arm/mach-s3c64xx/mach-crag6410.c
arch/arm/mach-s3c64xx/mach-hmt.c
arch/arm/mach-s3c64xx/mach-mini6410.c
arch/arm/mach-s3c64xx/mach-ncp.c
arch/arm/mach-s3c64xx/mach-real6410.c
arch/arm/mach-s3c64xx/mach-smartq.c
arch/arm/mach-s3c64xx/mach-smdk6400.c
arch/arm/mach-s3c64xx/mach-smdk6410.c
arch/arm/mach-s3c64xx/s3c6400.c
arch/arm/mach-s3c64xx/s3c6410.c
arch/arm/mach-s5p64x0/common.c
arch/arm/mach-s5p64x0/include/mach/debug-macro.S
arch/arm/mach-s5p64x0/irq-pm.c
arch/arm/mach-s5p64x0/mach-smdk6440.c
arch/arm/mach-s5p64x0/mach-smdk6450.c
arch/arm/mach-s5pc100/common.c
arch/arm/mach-s5pc100/include/mach/debug-macro.S
arch/arm/mach-s5pc100/include/mach/tick.h [deleted file]
arch/arm/mach-s5pc100/mach-smdkc100.c
arch/arm/mach-s5pv210/common.c
arch/arm/mach-s5pv210/include/mach/debug-macro.S
arch/arm/mach-s5pv210/mach-aquila.c
arch/arm/mach-s5pv210/mach-goni.c
arch/arm/mach-s5pv210/mach-smdkc110.c
arch/arm/mach-s5pv210/mach-smdkv210.c
arch/arm/mach-s5pv210/mach-torbreck.c
arch/arm/plat-samsung/clock.c
arch/arm/plat-samsung/cpu.c
arch/arm/plat-samsung/devs.c
arch/arm/plat-samsung/include/plat/cpu.h
arch/arm/plat-samsung/include/plat/regs-serial.h [deleted file]
arch/arm/plat-samsung/include/plat/rtc-core.h [deleted file]
arch/arm/plat-samsung/include/plat/uncompress.h
arch/arm/plat-samsung/init.c
arch/arm/plat-samsung/pm-gpio.c
arch/arm/plat-samsung/pm.c
arch/arm/plat-samsung/s5p-irq-pm.c
drivers/clk/samsung/clk-exynos4.c
drivers/clk/samsung/clk-exynos5250.c
drivers/clk/samsung/clk-exynos5420.c
drivers/clk/samsung/clk-exynos5440.c
drivers/clk/samsung/clk-s3c64xx.c
drivers/clk/samsung/clk.c
drivers/clk/samsung/clk.h

diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.txt b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
new file mode 100644 (file)
index 0000000..f1f1552
--- /dev/null
@@ -0,0 +1,15 @@
+SAMSUNG Exynos SoC series PMU Registers
+
+Properties:
+ - compatible : should contain two values. First value must be one from following list:
+                  - "samsung,exynos5250-pmu" - for Exynos5250 SoC,
+                  - "samsung,exynos5420-pmu" - for Exynos5420 SoC.
+               second value must be always "syscon".
+
+ - reg : offset and length of the register set.
+
+Example :
+pmu_system_controller: system-controller@10040000 {
+       compatible = "samsung,exynos5250-pmu", "syscon";
+       reg = <0x10040000 0x5000>;
+};
index a2ac2d9..f5a5b19 100644 (file)
@@ -15,259 +15,12 @@ Required Properties:
 
 - #clock-cells: should be 1.
 
-The following is the list of clocks generated by the controller. Each clock is
-assigned an identifier and client nodes use this identifier to specify the
-clock which they consume. Some of the clocks are available only on a particular
-Exynos4 SoC and this is specified where applicable.
-
-
-                [Core Clocks]
-
-  Clock               ID      SoC (if specific)
-  -----------------------------------------------
-
-  xxti                1
-  xusbxti             2
-  fin_pll             3
-  fout_apll           4
-  fout_mpll           5
-  fout_epll           6
-  fout_vpll           7
-  sclk_apll           8
-  sclk_mpll           9
-  sclk_epll           10
-  sclk_vpll           11
-  arm_clk             12
-  aclk200             13
-  aclk100             14
-  aclk160             15
-  aclk133             16
-  mout_mpll_user_t    17      Exynos4x12
-  mout_mpll_user_c    18      Exynos4x12
-  mout_core           19
-  mout_apll           20
-
-
-            [Clock Gate for Special Clocks]
-
-  Clock               ID      SoC (if specific)
-  -----------------------------------------------
-
-  sclk_fimc0          128
-  sclk_fimc1          129
-  sclk_fimc2          130
-  sclk_fimc3          131
-  sclk_cam0           132
-  sclk_cam1           133
-  sclk_csis0          134
-  sclk_csis1          135
-  sclk_hdmi           136
-  sclk_mixer          137
-  sclk_dac            138
-  sclk_pixel          139
-  sclk_fimd0          140
-  sclk_mdnie0         141     Exynos4412
-  sclk_mdnie_pwm0 12  142     Exynos4412
-  sclk_mipi0          143
-  sclk_audio0         144
-  sclk_mmc0           145
-  sclk_mmc1           146
-  sclk_mmc2           147
-  sclk_mmc3           148
-  sclk_mmc4           149
-  sclk_sata           150     Exynos4210
-  sclk_uart0          151
-  sclk_uart1          152
-  sclk_uart2          153
-  sclk_uart3          154
-  sclk_uart4          155
-  sclk_audio1         156
-  sclk_audio2         157
-  sclk_spdif          158
-  sclk_spi0           159
-  sclk_spi1           160
-  sclk_spi2           161
-  sclk_slimbus        162
-  sclk_fimd1          163     Exynos4210
-  sclk_mipi1          164     Exynos4210
-  sclk_pcm1           165
-  sclk_pcm2           166
-  sclk_i2s1           167
-  sclk_i2s2           168
-  sclk_mipihsi        169     Exynos4412
-  sclk_mfc            170
-  sclk_pcm0           171
-  sclk_g3d            172
-  sclk_pwm_isp        173     Exynos4x12
-  sclk_spi0_isp       174     Exynos4x12
-  sclk_spi1_isp       175     Exynos4x12
-  sclk_uart_isp       176     Exynos4x12
-  sclk_fimg2d         177
-
-             [Peripheral Clock Gates]
-
-  Clock               ID      SoC (if specific)
-  -----------------------------------------------
-
-  fimc0               256
-  fimc1               257
-  fimc2               258
-  fimc3               259
-  csis0               260
-  csis1               261
-  jpeg                262
-  smmu_fimc0          263
-  smmu_fimc1          264
-  smmu_fimc2          265
-  smmu_fimc3          266
-  smmu_jpeg           267
-  vp                  268
-  mixer               269
-  tvenc               270     Exynos4210
-  hdmi                271
-  smmu_tv             272
-  mfc                 273
-  smmu_mfcl           274
-  smmu_mfcr           275
-  g3d                 276
-  g2d                 277
-  rotator             278     Exynos4210
-  mdma                279     Exynos4210
-  smmu_g2d            280     Exynos4210
-  smmu_rotator        281     Exynos4210
-  smmu_mdma           282     Exynos4210
-  fimd0               283
-  mie0                284
-  mdnie0              285     Exynos4412
-  dsim0               286
-  smmu_fimd0          287
-  fimd1               288     Exynos4210
-  mie1                289     Exynos4210
-  dsim1               290     Exynos4210
-  smmu_fimd1          291     Exynos4210
-  pdma0               292
-  pdma1               293
-  pcie_phy            294
-  sata_phy            295     Exynos4210
-  tsi                 296
-  sdmmc0              297
-  sdmmc1              298
-  sdmmc2              299
-  sdmmc3              300
-  sdmmc4              301
-  sata                302     Exynos4210
-  sromc               303
-  usb_host            304
-  usb_device          305
-  pcie                306
-  onenand             307
-  nfcon               308
-  smmu_pcie           309
-  gps                 310
-  smmu_gps            311
-  uart0               312
-  uart1               313
-  uart2               314
-  uart3               315
-  uart4               316
-  i2c0                317
-  i2c1                318
-  i2c2                319
-  i2c3                320
-  i2c4                321
-  i2c5                322
-  i2c6                323
-  i2c7                324
-  i2c_hdmi            325
-  tsadc               326
-  spi0                327
-  spi1                328
-  spi2                329
-  i2s1                330
-  i2s2                331
-  pcm0                332
-  i2s0                333
-  pcm1                334
-  pcm2                335
-  pwm                 336
-  slimbus             337
-  spdif               338
-  ac97                339
-  modemif             340
-  chipid              341
-  sysreg              342
-  hdmi_cec            343
-  mct                 344
-  wdt                 345
-  rtc                 346
-  keyif               347
-  audss               348
-  mipi_hsi            349     Exynos4210
-  mdma2               350     Exynos4210
-  pixelasyncm0        351
-  pixelasyncm1        352
-  fimc_lite0          353     Exynos4x12
-  fimc_lite1          354     Exynos4x12
-  ppmuispx            355     Exynos4x12
-  ppmuispmx           356     Exynos4x12
-  fimc_isp            357     Exynos4x12
-  fimc_drc            358     Exynos4x12
-  fimc_fd             359     Exynos4x12
-  mcuisp              360     Exynos4x12
-  gicisp              361     Exynos4x12
-  smmu_isp            362     Exynos4x12
-  smmu_drc            363     Exynos4x12
-  smmu_fd             364     Exynos4x12
-  smmu_lite0          365     Exynos4x12
-  smmu_lite1          366     Exynos4x12
-  mcuctl_isp          367     Exynos4x12
-  mpwm_isp            368     Exynos4x12
-  i2c0_isp            369     Exynos4x12
-  i2c1_isp            370     Exynos4x12
-  mtcadc_isp          371     Exynos4x12
-  pwm_isp             372     Exynos4x12
-  wdt_isp             373     Exynos4x12
-  uart_isp            374     Exynos4x12
-  asyncaxim           375     Exynos4x12
-  smmu_ispcx          376     Exynos4x12
-  spi0_isp            377     Exynos4x12
-  spi1_isp            378     Exynos4x12
-  pwm_isp_sclk        379     Exynos4x12
-  spi0_isp_sclk       380     Exynos4x12
-  spi1_isp_sclk       381     Exynos4x12
-  uart_isp_sclk       382     Exynos4x12
-  tmu_apbif           383
-
-               [Mux Clocks]
-
-  Clock                        ID      SoC (if specific)
-  -----------------------------------------------
-
-  mout_fimc0           384
-  mout_fimc1           385
-  mout_fimc2           386
-  mout_fimc3           387
-  mout_cam0            388
-  mout_cam1            389
-  mout_csis0           390
-  mout_csis1           391
-  mout_g3d0            392
-  mout_g3d1            393
-  mout_g3d             394
-  aclk400_mcuisp       395     Exynos4x12
-
-               [Div Clocks]
-
-  Clock                        ID      SoC (if specific)
-  -----------------------------------------------
-
-  div_isp0             450     Exynos4x12
-  div_isp1             451     Exynos4x12
-  div_mcuisp0          452     Exynos4x12
-  div_mcuisp1          453     Exynos4x12
-  div_aclk200          454     Exynos4x12
-  div_aclk400_mcuisp   455     Exynos4x12
+Each clock is assigned an identifier and client nodes can use this identifier
+to specify the clock which they consume.
 
+All available clocks are defined as preprocessor macros in
+dt-bindings/clock/exynos4.h header and can be used in device
+tree sources.
 
 Example 1: An example of a clock controller node is listed below.
 
@@ -285,6 +38,6 @@ Example 2: UART controller node that consumes the clock generated by the clock
                compatible = "samsung,exynos4210-uart";
                reg = <0x13820000 0x100>;
                interrupts = <0 54 0>;
-               clocks = <&clock 314>, <&clock 153>;
+               clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
                clock-names = "uart", "clk_uart_baud0";
        };
index 72ce617..536eacd 100644 (file)
@@ -13,163 +13,12 @@ Required Properties:
 
 - #clock-cells: should be 1.
 
-The following is the list of clocks generated by the controller. Each clock is
-assigned an identifier and client nodes use this identifier to specify the
-clock which they consume.
-
-
-       [Core Clocks]
-
-  Clock                        ID
-  ----------------------------
-
-  fin_pll              1
-
-  [Clock Gate for Special Clocks]
-
-  Clock                        ID
-  ----------------------------
-
-  sclk_cam_bayer       128
-  sclk_cam0            129
-  sclk_cam1            130
-  sclk_gscl_wa         131
-  sclk_gscl_wb         132
-  sclk_fimd1           133
-  sclk_mipi1           134
-  sclk_dp              135
-  sclk_hdmi            136
-  sclk_pixel           137
-  sclk_audio0          138
-  sclk_mmc0            139
-  sclk_mmc1            140
-  sclk_mmc2            141
-  sclk_mmc3            142
-  sclk_sata            143
-  sclk_usb3            144
-  sclk_jpeg            145
-  sclk_uart0           146
-  sclk_uart1           147
-  sclk_uart2           148
-  sclk_uart3           149
-  sclk_pwm             150
-  sclk_audio1          151
-  sclk_audio2          152
-  sclk_spdif           153
-  sclk_spi0            154
-  sclk_spi1            155
-  sclk_spi2            156
-  div_i2s1             157
-  div_i2s2             158
-  sclk_hdmiphy         159
-  div_pcm0             160
-
-
-   [Peripheral Clock Gates]
-
-  Clock                        ID
-  ----------------------------
-
-  gscl0                        256
-  gscl1                        257
-  gscl2                        258
-  gscl3                        259
-  gscl_wa              260
-  gscl_wb              261
-  smmu_gscl0           262
-  smmu_gscl1           263
-  smmu_gscl2           264
-  smmu_gscl3           265
-  mfc                  266
-  smmu_mfcl            267
-  smmu_mfcr            268
-  rotator              269
-  jpeg                 270
-  mdma1                        271
-  smmu_rotator         272
-  smmu_jpeg            273
-  smmu_mdma1           274
-  pdma0                        275
-  pdma1                        276
-  sata                 277
-  usbotg               278
-  mipi_hsi             279
-  sdmmc0               280
-  sdmmc1               281
-  sdmmc2               282
-  sdmmc3               283
-  sromc                        284
-  usb2                 285
-  usb3                 286
-  sata_phyctrl         287
-  sata_phyi2c          288
-  uart0                        289
-  uart1                        290
-  uart2                        291
-  uart3                        292
-  uart4                        293
-  i2c0                 294
-  i2c1                 295
-  i2c2                 296
-  i2c3                 297
-  i2c4                 298
-  i2c5                 299
-  i2c6                 300
-  i2c7                 301
-  i2c_hdmi             302
-  adc                  303
-  spi0                 304
-  spi1                 305
-  spi2                 306
-  i2s1                 307
-  i2s2                 308
-  pcm1                 309
-  pcm2                 310
-  pwm                  311
-  spdif                        312
-  ac97                 313
-  hsi2c0               314
-  hsi2c1               315
-  hs12c2               316
-  hs12c3               317
-  chipid               318
-  sysreg               319
-  pmu                  320
-  cmu_top              321
-  cmu_core             322
-  cmu_mem              323
-  tzpc0                        324
-  tzpc1                        325
-  tzpc2                        326
-  tzpc3                        327
-  tzpc4                        328
-  tzpc5                        329
-  tzpc6                        330
-  tzpc7                        331
-  tzpc8                        332
-  tzpc9                        333
-  hdmi_cec             334
-  mct                  335
-  wdt                  336
-  rtc                  337
-  tmu                  338
-  fimd1                        339
-  mie1                 340
-  dsim0                        341
-  dp                   342
-  mixer                        343
-  hdmi                 344
-  g2d                  345
-  mdma0                        346
-  smmu_mdma0           347
-
-
-   [Clock Muxes]
-
-  Clock                        ID
-  ----------------------------
-  mout_hdmi            1024
+Each clock is assigned an identifier and client nodes can use this identifier
+to specify the clock which they consume.
 
+All available clocks are defined as preprocessor macros in
+dt-bindings/clock/exynos5250.h header and can be used in device
+tree sources.
 
 Example 1: An example of a clock controller node is listed below.
 
@@ -187,6 +36,6 @@ Example 2: UART controller node that consumes the clock generated by the clock
                compatible = "samsung,exynos4210-uart";
                reg = <0x13820000 0x100>;
                interrupts = <0 54 0>;
-               clocks = <&clock 314>, <&clock 153>;
+               clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
                clock-names = "uart", "clk_uart_baud0";
        };
index 458f347..ca88c97 100644 (file)
@@ -13,184 +13,12 @@ Required Properties:
 
 - #clock-cells: should be 1.
 
-The following is the list of clocks generated by the controller. Each clock is
-assigned an identifier and client nodes use this identifier to specify the
-clock which they consume.
+Each clock is assigned an identifier and client nodes can use this identifier
+to specify the clock which they consume.
 
-
-       [Core Clocks]
-
-  Clock                        ID
-  ----------------------------
-
-  fin_pll              1
-
-  [Clock Gate for Special Clocks]
-
-  Clock                        ID
-  ----------------------------
-  sclk_uart0           128
-  sclk_uart1           129
-  sclk_uart2           130
-  sclk_uart3           131
-  sclk_mmc0            132
-  sclk_mmc1            133
-  sclk_mmc2            134
-  sclk_spi0            135
-  sclk_spi1            136
-  sclk_spi2            137
-  sclk_i2s1            138
-  sclk_i2s2            139
-  sclk_pcm1            140
-  sclk_pcm2            141
-  sclk_spdif           142
-  sclk_hdmi            143
-  sclk_pixel           144
-  sclk_dp1             145
-  sclk_mipi1           146
-  sclk_fimd1           147
-  sclk_maudio0         148
-  sclk_maupcm0         149
-  sclk_usbd300         150
-  sclk_usbd301         151
-  sclk_usbphy300       152
-  sclk_usbphy301       153
-  sclk_unipro          154
-  sclk_pwm             155
-  sclk_gscl_wa         156
-  sclk_gscl_wb         157
-  sclk_hdmiphy         158
-
-   [Peripheral Clock Gates]
-
-  Clock                        ID
-  ----------------------------
-
-  aclk66_peric         256
-  uart0                        257
-  uart1                        258
-  uart2                        259
-  uart3                        260
-  i2c0                 261
-  i2c1                 262
-  i2c2                 263
-  i2c3                 264
-  i2c4                 265
-  i2c5                 266
-  i2c6                 267
-  i2c7                 268
-  i2c_hdmi             269
-  tsadc                        270
-  spi0                 271
-  spi1                 272
-  spi2                 273
-  keyif                        274
-  i2s1                 275
-  i2s2                 276
-  pcm1                 277
-  pcm2                 278
-  pwm                  279
-  spdif                        280
-  i2c8                 281
-  i2c9                 282
-  i2c10                        283
-  aclk66_psgen         300
-  chipid               301
-  sysreg               302
-  tzpc0                        303
-  tzpc1                        304
-  tzpc2                        305
-  tzpc3                        306
-  tzpc4                        307
-  tzpc5                        308
-  tzpc6                        309
-  tzpc7                        310
-  tzpc8                        311
-  tzpc9                        312
-  hdmi_cec             313
-  seckey               314
-  mct                  315
-  wdt                  316
-  rtc                  317
-  tmu                  318
-  tmu_gpu              319
-  pclk66_gpio          330
-  aclk200_fsys2                350
-  mmc0                 351
-  mmc1                 352
-  mmc2                 353
-  sromc                        354
-  ufs                  355
-  aclk200_fsys         360
-  tsi                  361
-  pdma0                        362
-  pdma1                        363
-  rtic                 364
-  usbh20               365
-  usbd300              366
-  usbd301              377
-  aclk400_mscl         380
-  mscl0                        381
-  mscl1                        382
-  mscl2                        383
-  smmu_mscl0           384
-  smmu_mscl1           385
-  smmu_mscl2           386
-  aclk333              400
-  mfc                  401
-  smmu_mfcl            402
-  smmu_mfcr            403
-  aclk200_disp1                410
-  dsim1                        411
-  dp1                  412
-  hdmi                 413
-  aclk300_disp1                420
-  fimd1                        421
-  smmu_fimd1           422
-  aclk166              430
-  mixer                        431
-  aclk266              440
-  rotator              441
-  mdma1                        442
-  smmu_rotator         443
-  smmu_mdma1           444
-  aclk300_jpeg         450
-  jpeg                 451
-  jpeg2                        452
-  smmu_jpeg            453
-  aclk300_gscl         460
-  smmu_gscl0           461
-  smmu_gscl1           462
-  gscl_wa              463
-  gscl_wb              464
-  gscl0                        465
-  gscl1                        466
-  clk_3aa              467
-  aclk266_g2d          470
-  sss                  471
-  slim_sss             472
-  mdma0                        473
-  aclk333_g2d          480
-  g2d                  481
-  aclk333_432_gscl     490
-  smmu_3aa             491
-  smmu_fimcl0          492
-  smmu_fimcl1          493
-  smmu_fimcl3          494
-  fimc_lite3           495
-  aclk_g3d             500
-  g3d                  501
-  smmu_mixer           502
-
-  Mux                  ID
-  ----------------------------
-
-  mout_hdmi            640
-
-  Divider              ID
-  ----------------------------
-
-  dout_pixel           768
+All available clocks are defined as preprocessor macros in
+dt-bindings/clock/exynos5420.h header and can be used in device
+tree sources.
 
 Example 1: An example of a clock controller node is listed below.
 
@@ -208,6 +36,6 @@ Example 2: UART controller node that consumes the clock generated by the clock
                compatible = "samsung,exynos4210-uart";
                reg = <0x13820000 0x100>;
                interrupts = <0 54 0>;
-               clocks = <&clock 259>, <&clock 130>;
+               clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
                clock-names = "uart", "clk_uart_baud0";
        };
index 9955dc9..5f7005f 100644 (file)
@@ -12,45 +12,12 @@ Required Properties:
 
 - #clock-cells: should be 1.
 
-The following is the list of clocks generated by the controller. Each clock is
-assigned an identifier and client nodes use this identifier to specify the
-clock which they consume.
-
-
-       [Core Clocks]
-
-  Clock                        ID
-  ----------------------------
-
-  xtal                 1
-  arm_clk              2
-
-   [Peripheral Clock Gates]
-
-  Clock                        ID
-  ----------------------------
-
-  spi_baud             16
-  pb0_250              17
-  pr0_250              18
-  pr1_250              19
-  b_250                        20
-  b_125                        21
-  b_200                        22
-  sata                 23
-  usb                  24
-  gmac0                        25
-  cs250                        26
-  pb0_250_o            27
-  pr0_250_o            28
-  pr1_250_o            29
-  b_250_o              30
-  b_125_o              31
-  b_200_o              32
-  sata_o               33
-  usb_o                        34
-  gmac0_o              35
-  cs250_o              36
+Each clock is assigned an identifier and client nodes can use this identifier
+to specify the clock which they consume.
+
+All available clocks are defined as preprocessor macros in
+dt-bindings/clock/exynos5440.h header and can be used in device
+tree sources.
 
 Example: An example of a clock controller node is listed below.
 
index 0531da8..3e988f6 100644 (file)
@@ -1145,7 +1145,7 @@ config DEBUG_UART_8250_FLOW_CONTROL
 
 config DEBUG_UNCOMPRESS
        bool
-       depends on ARCH_MULTIPLATFORM || ARCH_MSM
+       depends on ARCH_MULTIPLATFORM || ARCH_MSM || ARCH_EXYNOS
        default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
                     (!DEBUG_TEGRA_UART || !ZBOOT_ROM)
        help
@@ -1161,7 +1161,8 @@ config DEBUG_UNCOMPRESS
 
 config UNCOMPRESS_INCLUDE
        string
-       default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM
+       default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \
+                                       ARCH_EXYNOS
        default "mach/uncompress.h"
 
 config EARLY_PRINTK
index 08452e1..28b5ec7 100644 (file)
@@ -19,6 +19,7 @@
  * published by the Free Software Foundation.
  */
 
+#include <dt-bindings/clock/exynos4.h>
 #include "skeleton.dtsi"
 
 / {
                        compatible = "samsung,exynos4210-fimc";
                        reg = <0x11800000 0x1000>;
                        interrupts = <0 84 0>;
-                       clocks = <&clock 256>, <&clock 128>;
+                       clocks = <&clock CLK_FIMC0>, <&clock CLK_SCLK_FIMC0>;
                        clock-names = "fimc", "sclk_fimc";
                        samsung,power-domain = <&pd_cam>;
                        samsung,sysreg = <&sys_reg>;
                        compatible = "samsung,exynos4210-fimc";
                        reg = <0x11810000 0x1000>;
                        interrupts = <0 85 0>;
-                       clocks = <&clock 257>, <&clock 129>;
+                       clocks = <&clock CLK_FIMC1>, <&clock CLK_SCLK_FIMC1>;
                        clock-names = "fimc", "sclk_fimc";
                        samsung,power-domain = <&pd_cam>;
                        samsung,sysreg = <&sys_reg>;
                        compatible = "samsung,exynos4210-fimc";
                        reg = <0x11820000 0x1000>;
                        interrupts = <0 86 0>;
-                       clocks = <&clock 258>, <&clock 130>;
+                       clocks = <&clock CLK_FIMC2>, <&clock CLK_SCLK_FIMC2>;
                        clock-names = "fimc", "sclk_fimc";
                        samsung,power-domain = <&pd_cam>;
                        samsung,sysreg = <&sys_reg>;
                        compatible = "samsung,exynos4210-fimc";
                        reg = <0x11830000 0x1000>;
                        interrupts = <0 87 0>;
-                       clocks = <&clock 259>, <&clock 131>;
+                       clocks = <&clock CLK_FIMC3>, <&clock CLK_SCLK_FIMC3>;
                        clock-names = "fimc", "sclk_fimc";
                        samsung,power-domain = <&pd_cam>;
                        samsung,sysreg = <&sys_reg>;
                        compatible = "samsung,exynos4210-csis";
                        reg = <0x11880000 0x4000>;
                        interrupts = <0 78 0>;
-                       clocks = <&clock 260>, <&clock 134>;
+                       clocks = <&clock CLK_CSIS0>, <&clock CLK_SCLK_CSIS0>;
                        clock-names = "csis", "sclk_csis";
                        bus-width = <4>;
                        samsung,power-domain = <&pd_cam>;
                        compatible = "samsung,exynos4210-csis";
                        reg = <0x11890000 0x4000>;
                        interrupts = <0 80 0>;
-                       clocks = <&clock 261>, <&clock 135>;
+                       clocks = <&clock CLK_CSIS1>, <&clock CLK_SCLK_CSIS1>;
                        clock-names = "csis", "sclk_csis";
                        bus-width = <2>;
                        samsung,power-domain = <&pd_cam>;
                compatible = "samsung,s3c2410-wdt";
                reg = <0x10060000 0x100>;
                interrupts = <0 43 0>;
-               clocks = <&clock 345>;
+               clocks = <&clock CLK_WDT>;
                clock-names = "watchdog";
                status = "disabled";
        };
                compatible = "samsung,s3c6410-rtc";
                reg = <0x10070000 0x100>;
                interrupts = <0 44 0>, <0 45 0>;
-               clocks = <&clock 346>;
+               clocks = <&clock CLK_RTC>;
                clock-names = "rtc";
                status = "disabled";
        };
                compatible = "samsung,s5pv210-keypad";
                reg = <0x100A0000 0x100>;
                interrupts = <0 109 0>;
-               clocks = <&clock 347>;
+               clocks = <&clock CLK_KEYIF>;
                clock-names = "keypad";
                status = "disabled";
        };
                compatible = "samsung,exynos4210-sdhci";
                reg = <0x12510000 0x100>;
                interrupts = <0 73 0>;
-               clocks = <&clock 297>, <&clock 145>;
+               clocks = <&clock CLK_SDMMC0>, <&clock CLK_SCLK_MMC0>;
                clock-names = "hsmmc", "mmc_busclk.2";
                status = "disabled";
        };
                compatible = "samsung,exynos4210-sdhci";
                reg = <0x12520000 0x100>;
                interrupts = <0 74 0>;
-               clocks = <&clock 298>, <&clock 146>;
+               clocks = <&clock CLK_SDMMC1>, <&clock CLK_SCLK_MMC1>;
                clock-names = "hsmmc", "mmc_busclk.2";
                status = "disabled";
        };
                compatible = "samsung,exynos4210-sdhci";
                reg = <0x12530000 0x100>;
                interrupts = <0 75 0>;
-               clocks = <&clock 299>, <&clock 147>;
+               clocks = <&clock CLK_SDMMC2>, <&clock CLK_SCLK_MMC2>;
                clock-names = "hsmmc", "mmc_busclk.2";
                status = "disabled";
        };
                compatible = "samsung,exynos4210-sdhci";
                reg = <0x12540000 0x100>;
                interrupts = <0 76 0>;
-               clocks = <&clock 300>, <&clock 148>;
+               clocks = <&clock CLK_SDMMC3>, <&clock CLK_SCLK_MMC3>;
                clock-names = "hsmmc", "mmc_busclk.2";
                status = "disabled";
        };
                compatible = "samsung,exynos4210-ehci";
                reg = <0x12580000 0x100>;
                interrupts = <0 70 0>;
-               clocks = <&clock 304>;
+               clocks = <&clock CLK_USB_HOST>;
                clock-names = "usbhost";
                status = "disabled";
        };
                compatible = "samsung,exynos4210-ohci";
                reg = <0x12590000 0x100>;
                interrupts = <0 70 0>;
-               clocks = <&clock 304>;
+               clocks = <&clock CLK_USB_HOST>;
                clock-names = "usbhost";
                status = "disabled";
        };
                reg = <0x13400000 0x10000>;
                interrupts = <0 94 0>;
                samsung,power-domain = <&pd_mfc>;
-               clocks = <&clock 273>;
+               clocks = <&clock CLK_MFC>;
                clock-names = "mfc";
                status = "disabled";
        };
                compatible = "samsung,exynos4210-uart";
                reg = <0x13800000 0x100>;
                interrupts = <0 52 0>;
-               clocks = <&clock 312>, <&clock 151>;
+               clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
                clock-names = "uart", "clk_uart_baud0";
                status = "disabled";
        };
                compatible = "samsung,exynos4210-uart";
                reg = <0x13810000 0x100>;
                interrupts = <0 53 0>;
-               clocks = <&clock 313>, <&clock 152>;
+               clocks = <&clock CLK_UART1>, <&clock CLK_SCLK_UART1>;
                clock-names = "uart", "clk_uart_baud0";
                status = "disabled";
        };
                compatible = "samsung,exynos4210-uart";
                reg = <0x13820000 0x100>;
                interrupts = <0 54 0>;
-               clocks = <&clock 314>, <&clock 153>;
+               clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
                clock-names = "uart", "clk_uart_baud0";
                status = "disabled";
        };
                compatible = "samsung,exynos4210-uart";
                reg = <0x13830000 0x100>;
                interrupts = <0 55 0>;
-               clocks = <&clock 315>, <&clock 154>;
+               clocks = <&clock CLK_UART3>, <&clock CLK_SCLK_UART3>;
                clock-names = "uart", "clk_uart_baud0";
                status = "disabled";
        };
                compatible = "samsung,s3c2440-i2c";
                reg = <0x13860000 0x100>;
                interrupts = <0 58 0>;
-               clocks = <&clock 317>;
+               clocks = <&clock CLK_I2C0>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c0_bus>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x13870000 0x100>;
                interrupts = <0 59 0>;
-               clocks = <&clock 318>;
+               clocks = <&clock CLK_I2C1>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c1_bus>;
                compatible = "samsung,s3c2440-i2c";
                reg = <0x13880000 0x100>;
                interrupts = <0 60 0>;
-               clocks = <&clock 319>;
+               clocks = <&clock CLK_I2C2>;
                clock-names = "i2c";
                status = "disabled";
        };
                compatible = "samsung,s3c2440-i2c";
                reg = <0x13890000 0x100>;
                interrupts = <0 61 0>;
-               clocks = <&clock 320>;
+               clocks = <&clock CLK_I2C3>;
                clock-names = "i2c";
                status = "disabled";
        };
                compatible = "samsung,s3c2440-i2c";
                reg = <0x138A0000 0x100>;
                interrupts = <0 62 0>;
-               clocks = <&clock 321>;
+               clocks = <&clock CLK_I2C4>;
                clock-names = "i2c";
                status = "disabled";
        };
                compatible = "samsung,s3c2440-i2c";
                reg = <0x138B0000 0x100>;
                interrupts = <0 63 0>;
-               clocks = <&clock 322>;
+               clocks = <&clock CLK_I2C5>;
                clock-names = "i2c";
                status = "disabled";
        };
                compatible = "samsung,s3c2440-i2c";
                reg = <0x138C0000 0x100>;
                interrupts = <0 64 0>;
-               clocks = <&clock 323>;
+               clocks = <&clock CLK_I2C6>;
                clock-names = "i2c";
                status = "disabled";
        };
                compatible = "samsung,s3c2440-i2c";
                reg = <0x138D0000 0x100>;
                interrupts = <0 65 0>;
-               clocks = <&clock 324>;
+               clocks = <&clock CLK_I2C7>;
                clock-names = "i2c";
                status = "disabled";
        };
                dma-names = "tx", "rx";
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 327>, <&clock 159>;
+               clocks = <&clock CLK_SPI0>, <&clock CLK_SCLK_SPI0>;
                clock-names = "spi", "spi_busclk0";
                pinctrl-names = "default";
                pinctrl-0 = <&spi0_bus>;
                dma-names = "tx", "rx";
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 328>, <&clock 160>;
+               clocks = <&clock CLK_SPI1>, <&clock CLK_SCLK_SPI1>;
                clock-names = "spi", "spi_busclk0";
                pinctrl-names = "default";
                pinctrl-0 = <&spi1_bus>;
                dma-names = "tx", "rx";
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 329>, <&clock 161>;
+               clocks = <&clock CLK_SPI2>, <&clock CLK_SCLK_SPI2>;
                clock-names = "spi", "spi_busclk0";
                pinctrl-names = "default";
                pinctrl-0 = <&spi2_bus>;
                compatible = "samsung,exynos4210-pwm";
                reg = <0x139D0000 0x1000>;
                interrupts = <0 37 0>, <0 38 0>, <0 39 0>, <0 40 0>, <0 41 0>;
-               clocks = <&clock 336>;
+               clocks = <&clock CLK_PWM>;
                clock-names = "timers";
                #pwm-cells = <2>;
                status = "disabled";
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x12680000 0x1000>;
                        interrupts = <0 35 0>;
-                       clocks = <&clock 292>;
+                       clocks = <&clock CLK_PDMA0>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
                        #dma-channels = <8>;
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x12690000 0x1000>;
                        interrupts = <0 36 0>;
-                       clocks = <&clock 293>;
+                       clocks = <&clock CLK_PDMA1>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
                        #dma-channels = <8>;
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x12850000 0x1000>;
                        interrupts = <0 34 0>;
-                       clocks = <&clock 279>;
+                       clocks = <&clock CLK_MDMA>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
                        #dma-channels = <8>;
                reg = <0x11c00000 0x20000>;
                interrupt-names = "fifo", "vsync", "lcd_sys";
                interrupts = <11 0>, <11 1>, <11 2>;
-               clocks = <&clock 140>, <&clock 283>;
+               clocks = <&clock CLK_SCLK_FIMD0>, <&clock CLK_FIMD0>;
                clock-names = "sclk_fimd", "fimd";
                samsung,power-domain = <&pd_lcd0>;
                status = "disabled";
index 48ecd7a..cb0e768 100644 (file)
@@ -53,7 +53,7 @@
                reg = <0x10050000 0x800>;
                interrupt-parent = <&mct_map>;
                interrupts = <0>, <1>, <2>, <3>, <4>, <5>;
-               clocks = <&clock 3>, <&clock 344>;
+               clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>;
                clock-names = "fin_pll", "mct";
 
                mct_map: mct-map {
                interrupt-parent = <&combiner>;
                reg = <0x100C0000 0x100>;
                interrupts = <2 4>;
-               clocks = <&clock 383>;
+               clocks = <&clock CLK_TMU_APBIF>;
                clock-names = "tmu_apbif";
                status = "disabled";
        };
                compatible = "samsung,s5pv210-g2d";
                reg = <0x12800000 0x1000>;
                interrupts = <0 89 0>;
-               clocks = <&clock 177>, <&clock 277>;
+               clocks = <&clock CLK_SCLK_FIMG2D>, <&clock CLK_G2D>;
                clock-names = "sclk_fimg2d", "fimg2d";
                status = "disabled";
        };
 
        camera {
-               clocks = <&clock 132>, <&clock 133>, <&clock 351>, <&clock 352>;
+               clocks = <&clock CLK_SCLK_CAM0>, <&clock CLK_SCLK_CAM1>,
+                        <&clock CLK_PIXELASYNCM0>, <&clock CLK_PIXELASYNCM1>;
                clock-names = "sclk_cam0", "sclk_cam1", "pxl_async0", "pxl_async1";
 
                fimc_0: fimc@11800000 {
index 9804fcb..12459b0 100644 (file)
                                buck2_reg: BUCK2 {
                                        regulator-name = "vdd_arm";
                                        regulator-min-microvolt = <900000>;
-                                       regulator-max-microvolt = <1300000>;
+                                       regulator-max-microvolt = <1350000>;
                                        regulator-always-on;
                                        regulator-boot-on;
                                };
index 6bc0539..388f035 100644 (file)
 
                                buck2_reg: BUCK2 {
                                        regulator-name = "vdd_arm";
-                                       regulator-min-microvolt = <925000>;
-                                       regulator-max-microvolt = <1300000>;
+                                       regulator-min-microvolt = <900000>;
+                                       regulator-max-microvolt = <1350000>;
                                        regulator-always-on;
                                        regulator-boot-on;
                                        op_mode = <1>; /* Normal Mode */
index 5c412aa..e0eb6bb 100644 (file)
@@ -47,7 +47,7 @@
                reg = <0x10050000 0x800>;
                interrupt-parent = <&mct_map>;
                interrupts = <0>, <1>, <2>, <3>, <4>;
-               clocks = <&clock 3>, <&clock 344>;
+               clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>;
                clock-names = "fin_pll", "mct";
 
                mct_map: mct-map {
                compatible = "samsung,exynos4212-g2d";
                reg = <0x10800000 0x1000>;
                interrupts = <0 89 0>;
-               clocks = <&clock 177>, <&clock 277>;
+               clocks = <&clock CLK_SCLK_FIMG2D>, <&clock CLK_G2D>;
                clock-names = "sclk_fimg2d", "fimg2d";
                status = "disabled";
        };
 
        camera {
-               clocks = <&clock 132>, <&clock 133>, <&clock 351>, <&clock 352>;
+               clocks = <&clock CLK_SCLK_CAM0>, <&clock CLK_SCLK_CAM1>,
+                        <&clock CLK_PIXELASYNCM0>, <&clock CLK_PIXELASYNCM1>;
                clock-names = "sclk_cam0", "sclk_cam1", "pxl_async0", "pxl_async1";
 
                fimc_0: fimc@11800000 {
                        reg = <0x12390000 0x1000>;
                        interrupts = <0 105 0>;
                        samsung,power-domain = <&pd_isp>;
-                       clocks = <&clock 353>;
+                       clocks = <&clock CLK_FIMC_LITE0>;
                        clock-names = "flite";
                        status = "disabled";
                };
                        reg = <0x123A0000 0x1000>;
                        interrupts = <0 106 0>;
                        samsung,power-domain = <&pd_isp>;
-                       clocks = <&clock 354>;
+                       clocks = <&clock CLK_FIMC_LITE1>;
                        clock-names = "flite";
                        status = "disabled";
                };
                        reg = <0x12000000 0x260000>;
                        interrupts = <0 90 0>, <0 95 0>;
                        samsung,power-domain = <&pd_isp>;
-                       clocks = <&clock 353>, <&clock 354>, <&clock 355>,
-                               <&clock 356>, <&clock 17>, <&clock 357>,
-                               <&clock 358>, <&clock 359>, <&clock 360>,
-                               <&clock 450>,<&clock 451>, <&clock 452>,
-                               <&clock 453>, <&clock 176>, <&clock 13>,
-                               <&clock 454>, <&clock 395>, <&clock 455>;
+                       clocks = <&clock CLK_FIMC_LITE0>,
+                                <&clock CLK_FIMC_LITE1>, <&clock CLK_PPMUISPX>,
+                                <&clock CLK_PPMUISPMX>,
+                                <&clock CLK_MOUT_MPLL_USER_T>,
+                                <&clock CLK_FIMC_ISP>, <&clock CLK_FIMC_DRC>,
+                                <&clock CLK_FIMC_FD>, <&clock CLK_MCUISP>,
+                                <&clock CLK_DIV_ISP0>,<&clock CLK_DIV_ISP1>,
+                                <&clock CLK_DIV_MCUISP0>,
+                                <&clock CLK_DIV_MCUISP1>,
+                                <&clock CLK_SCLK_UART_ISP>,
+                                <&clock CLK_ACLK200>, <&clock CLK_DIV_ACLK200>,
+                                <&clock CLK_ACLK400_MCUISP>,
+                                <&clock CLK_DIV_ACLK400_MCUISP>;
                        clock-names = "lite0", "lite1", "ppmuispx",
                                      "ppmuispmx", "mpll", "isp",
                                      "drc", "fd", "mcuisp",
                        i2c1_isp: i2c-isp@12140000 {
                                compatible = "samsung,exynos4212-i2c-isp";
                                reg = <0x12140000 0x100>;
-                               clocks = <&clock 370>;
+                               clocks = <&clock CLK_I2C1_ISP>;
                                clock-names = "i2c_isp";
                                #address-cells = <1>;
                                #size-cells = <0>;
                #address-cells = <1>;
                #size-cells = <0>;
                fifo-depth = <0x80>;
-               clocks = <&clock 301>, <&clock 149>;
+               clocks = <&clock CLK_SDMMC4>, <&clock CLK_SCLK_MMC4>;
                clock-names = "biu", "ciu";
                status = "disabled";
        };
index 258dca4..79d0608 100644 (file)
                status = "disabled";
        };
 
-       watchdog {
-               compatible = "samsung,s3c2410-wdt";
-               reg = <0x101D0000 0x100>;
-               interrupts = <0 42 0>;
-               status = "disabled";
-       };
-
        fimd@14400000 {
                compatible = "samsung,exynos5250-fimd";
                interrupt-parent = <&combiner>;
index b42e658..56c4078 100644 (file)
                bootargs = "console=ttySAC2,115200";
        };
 
+       rtc@101E0000 {
+               status = "okay";
+       };
+
        codec@11000000 {
                samsung,mfc-r = <0x43000000 0x800000>;
                samsung,mfc-l = <0x51000000 0x800000>;
index 3e69837..f76946e 100644 (file)
                bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC2,115200 init=/linuxrc";
        };
 
+       rtc@101E0000 {
+               status = "okay";
+       };
+
        i2c@12C60000 {
                samsung,i2c-sda-delay = <100>;
                samsung,i2c-max-bus-freq = <20000>;
                        compatible = "samsung,s524ad0xd1";
                        reg = <0x50>;
                };
+
+               max77686@09 {
+                       compatible = "maxim,max77686";
+                       reg = <0x09>;
+
+                       voltage-regulators {
+                               ldo1_reg: LDO1 {
+                                       regulator-name = "P1.0V_LDO_OUT1";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo2_reg: LDO2 {
+                                       regulator-name = "P1.2V_LDO_OUT2";
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo3_reg: LDO3 {
+                                       regulator-name = "P1.8V_LDO_OUT3";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo4_reg: LDO4 {
+                                       regulator-name = "P2.8V_LDO_OUT4";
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <2800000>;
+                               };
+
+                               ldo5_reg: LDO5 {
+                                       regulator-name = "P1.8V_LDO_OUT5";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo6_reg: LDO6 {
+                                       regulator-name = "P1.1V_LDO_OUT6";
+                                       regulator-min-microvolt = <1100000>;
+                                       regulator-max-microvolt = <1100000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo7_reg: LDO7 {
+                                       regulator-name = "P1.1V_LDO_OUT7";
+                                       regulator-min-microvolt = <1100000>;
+                                       regulator-max-microvolt = <1100000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo8_reg: LDO8 {
+                                       regulator-name = "P1.0V_LDO_OUT8";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                               };
+
+                               ldo10_reg: LDO10 {
+                                       regulator-name = "P1.8V_LDO_OUT10";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo11_reg: LDO11 {
+                                       regulator-name = "P1.8V_LDO_OUT11";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo12_reg: LDO12 {
+                                       regulator-name = "P3.0V_LDO_OUT12";
+                                       regulator-min-microvolt = <3000000>;
+                                       regulator-max-microvolt = <3000000>;
+                               };
+
+                               ldo13_reg: LDO13 {
+                                       regulator-name = "P1.8V_LDO_OUT13";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo14_reg: LDO14 {
+                                       regulator-name = "P1.8V_LDO_OUT14";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo15_reg: LDO15 {
+                                       regulator-name = "P1.0V_LDO_OUT15";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                               };
+
+                               ldo16_reg: LDO16 {
+                                       regulator-name = "P1.8V_LDO_OUT16";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               buck1_reg: BUCK1 {
+                                       regulator-name = "vdd_mif";
+                                       regulator-min-microvolt = <950000>;
+                                       regulator-max-microvolt = <1300000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck2_reg: BUCK2 {
+                                       regulator-name = "vdd_arm";
+                                       regulator-min-microvolt = <850000>;
+                                       regulator-max-microvolt = <1350000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck3_reg: BUCK3 {
+                                       regulator-name = "vdd_int";
+                                       regulator-min-microvolt = <900000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck4_reg: BUCK4 {
+                                       regulator-name = "vdd_g3d";
+                                       regulator-min-microvolt = <850000>;
+                                       regulator-max-microvolt = <1300000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck5_reg: BUCK5 {
+                                       regulator-name = "P1.8V_BUCK_OUT5";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+                       };
+               };
        };
 
        vdd: fixed-regulator@0 {
index 7e45eea..b13bf49 100644 (file)
                i2c104 = &i2c_104;
        };
 
+       rtc@101E0000 {
+               status = "okay";
+       };
+
        pinctrl@11400000 {
                sd3_clk: sd3-clk {
                        samsung,pin-drv = <0>;
index b7dec41..987cfbe 100644 (file)
@@ -17,6 +17,7 @@
  * published by the Free Software Foundation.
 */
 
+#include <dt-bindings/clock/exynos5250.h>
 #include "exynos5.dtsi"
 #include "exynos5250-pinctrl.dtsi"
 
@@ -90,7 +91,8 @@
                compatible = "samsung,exynos5250-audss-clock";
                reg = <0x03810000 0x0C>;
                #clock-cells = <1>;
-               clocks = <&clock 1>, <&clock 7>, <&clock 138>, <&clock 160>;
+               clocks = <&clock CLK_FIN_PLL>, <&clock CLK_FOUT_EPLL>,
+                        <&clock CLK_SCLK_AUDIO0>, <&clock CLK_DIV_PCM0>;
                clock-names = "pll_ref", "pll_in", "sclk_audio", "sclk_pcm_in";
        };
 
                interrupt-parent = <&mct_map>;
                interrupts = <0 0>, <1 0>, <2 0>, <3 0>,
                             <4 0>, <5 0>;
-               clocks = <&clock 1>, <&clock 335>;
+               clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>;
                clock-names = "fin_pll", "mct";
 
                mct_map: mct-map {
                interrupts = <0 47 0>;
        };
 
-       watchdog {
-               clocks = <&clock 336>;
+       pmu_system_controller: system-controller@10040000 {
+               compatible = "samsung,exynos5250-pmu", "syscon";
+               reg = <0x10040000 0x5000>;
+       };
+
+       watchdog@101D0000 {
+               compatible = "samsung,exynos5250-wdt";
+               reg = <0x101D0000 0x100>;
+               interrupts = <0 42 0>;
+               clocks = <&clock CLK_WDT>;
                clock-names = "watchdog";
+               samsung,syscon-phandle = <&pmu_system_controller>;
        };
 
        g2d@10850000 {
                compatible = "samsung,exynos5250-g2d";
                reg = <0x10850000 0x1000>;
                interrupts = <0 91 0>;
-               clocks = <&clock 345>;
+               clocks = <&clock CLK_G2D>;
                clock-names = "fimg2d";
        };
 
                reg = <0x11000000 0x10000>;
                interrupts = <0 96 0>;
                samsung,power-domain = <&pd_mfc>;
-               clocks = <&clock 266>;
+               clocks = <&clock CLK_MFC>;
                clock-names = "mfc";
        };
 
        rtc@101E0000 {
-               clocks = <&clock 337>;
+               clocks = <&clock CLK_RTC>;
                clock-names = "rtc";
-               status = "okay";
+               status = "disabled";
        };
 
        tmu@10060000 {
                compatible = "samsung,exynos5250-tmu";
                reg = <0x10060000 0x100>;
                interrupts = <0 65 0>;
-               clocks = <&clock 338>;
+               clocks = <&clock CLK_TMU>;
                clock-names = "tmu_apbif";
        };
 
        serial@12C00000 {
-               clocks = <&clock 289>, <&clock 146>;
+               clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
                clock-names = "uart", "clk_uart_baud0";
        };
 
        serial@12C10000 {
-               clocks = <&clock 290>, <&clock 147>;
+               clocks = <&clock CLK_UART1>, <&clock CLK_SCLK_UART1>;
                clock-names = "uart", "clk_uart_baud0";
        };
 
        serial@12C20000 {
-               clocks = <&clock 291>, <&clock 148>;
+               clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
                clock-names = "uart", "clk_uart_baud0";
        };
 
        serial@12C30000 {
-               clocks = <&clock 292>, <&clock 149>;
+               clocks = <&clock CLK_UART3>, <&clock CLK_SCLK_UART3>;
                clock-names = "uart", "clk_uart_baud0";
        };
 
                compatible = "samsung,exynos5-sata-ahci";
                reg = <0x122F0000 0x1ff>;
                interrupts = <0 115 0>;
-               clocks = <&clock 277>, <&clock 143>;
+               clocks = <&clock CLK_SATA>, <&clock CLK_SCLK_SATA>;
                clock-names = "sata", "sclk_sata";
        };
 
                interrupts = <0 56 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 294>;
+               clocks = <&clock CLK_I2C0>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c0_bus>;
                interrupts = <0 57 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 295>;
+               clocks = <&clock CLK_I2C1>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c1_bus>;
                interrupts = <0 58 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 296>;
+               clocks = <&clock CLK_I2C2>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c2_bus>;
                interrupts = <0 59 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 297>;
+               clocks = <&clock CLK_I2C3>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c3_bus>;
                interrupts = <0 60 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 298>;
+               clocks = <&clock CLK_I2C4>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c4_bus>;
                interrupts = <0 61 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 299>;
+               clocks = <&clock CLK_I2C5>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c5_bus>;
                interrupts = <0 62 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 300>;
+               clocks = <&clock CLK_I2C6>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c6_bus>;
                interrupts = <0 63 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 301>;
+               clocks = <&clock CLK_I2C7>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c7_bus>;
                interrupts = <0 64 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 302>;
+               clocks = <&clock CLK_I2C_HDMI>;
                clock-names = "i2c";
                status = "disabled";
        };
                 reg = <0x121D0000 0x100>;
                 #address-cells = <1>;
                 #size-cells = <0>;
-               clocks = <&clock 288>;
+               clocks = <&clock CLK_SATA_PHYI2C>;
                clock-names = "i2c";
                status = "disabled";
        };
                dma-names = "tx", "rx";
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 304>, <&clock 154>;
+               clocks = <&clock CLK_SPI0>, <&clock CLK_SCLK_SPI0>;
                clock-names = "spi", "spi_busclk0";
                pinctrl-names = "default";
                pinctrl-0 = <&spi0_bus>;
                dma-names = "tx", "rx";
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 305>, <&clock 155>;
+               clocks = <&clock CLK_SPI1>, <&clock CLK_SCLK_SPI1>;
                clock-names = "spi", "spi_busclk0";
                pinctrl-names = "default";
                pinctrl-0 = <&spi1_bus>;
                dma-names = "tx", "rx";
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 306>, <&clock 156>;
+               clocks = <&clock CLK_SPI2>, <&clock CLK_SCLK_SPI2>;
                clock-names = "spi", "spi_busclk0";
                pinctrl-names = "default";
                pinctrl-0 = <&spi2_bus>;
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x12200000 0x1000>;
-               clocks = <&clock 280>, <&clock 139>;
+               clocks = <&clock CLK_SDMMC0>, <&clock CLK_SCLK_MMC0>;
                clock-names = "biu", "ciu";
                fifo-depth = <0x80>;
                status = "disabled";
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x12210000 0x1000>;
-               clocks = <&clock 281>, <&clock 140>;
+               clocks = <&clock CLK_SDMMC1>, <&clock CLK_SCLK_MMC1>;
                clock-names = "biu", "ciu";
                fifo-depth = <0x80>;
                status = "disabled";
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x12220000 0x1000>;
-               clocks = <&clock 282>, <&clock 141>;
+               clocks = <&clock CLK_SDMMC2>, <&clock CLK_SCLK_MMC2>;
                clock-names = "biu", "ciu";
                fifo-depth = <0x80>;
                status = "disabled";
                interrupts = <0 78 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 283>, <&clock 142>;
+               clocks = <&clock CLK_SDMMC3>, <&clock CLK_SCLK_MMC3>;
                clock-names = "biu", "ciu";
                fifo-depth = <0x80>;
                status = "disabled";
                dmas = <&pdma1 12
                        &pdma1 11>;
                dma-names = "tx", "rx";
-               clocks = <&clock 307>, <&clock 157>;
+               clocks = <&clock CLK_I2S1>, <&clock CLK_DIV_I2S1>;
                clock-names = "iis", "i2s_opclk0";
                pinctrl-names = "default";
                pinctrl-0 = <&i2s1_bus>;
                dmas = <&pdma0 12
                        &pdma0 11>;
                dma-names = "tx", "rx";
-               clocks = <&clock 308>, <&clock 158>;
+               clocks = <&clock CLK_I2S2>, <&clock CLK_DIV_I2S2>;
                clock-names = "iis", "i2s_opclk0";
                pinctrl-names = "default";
                pinctrl-0 = <&i2s2_bus>;
 
        usb@12000000 {
                compatible = "samsung,exynos5250-dwusb3";
-               clocks = <&clock 286>;
+               clocks = <&clock CLK_USB3>;
                clock-names = "usbdrd30";
                #address-cells = <1>;
                #size-cells = <1>;
        usb3_phy: usbphy@12100000 {
                compatible = "samsung,exynos5250-usb3phy";
                reg = <0x12100000 0x100>;
-               clocks = <&clock 1>, <&clock 286>;
+               clocks = <&clock CLK_FIN_PLL>, <&clock CLK_USB3>;
                clock-names = "ext_xtal", "usbdrd30";
                #address-cells = <1>;
                #size-cells = <1>;
                reg = <0x12110000 0x100>;
                interrupts = <0 71 0>;
 
-               clocks = <&clock 285>;
+               clocks = <&clock CLK_USB2>;
                clock-names = "usbhost";
        };
 
                reg = <0x12120000 0x100>;
                interrupts = <0 71 0>;
 
-               clocks = <&clock 285>;
+               clocks = <&clock CLK_USB2>;
                clock-names = "usbhost";
        };
 
        usb2_phy: usbphy@12130000 {
                compatible = "samsung,exynos5250-usb2phy";
                reg = <0x12130000 0x100>;
-               clocks = <&clock 1>, <&clock 285>;
+               clocks = <&clock CLK_FIN_PLL>, <&clock CLK_USB2>;
                clock-names = "ext_xtal", "usbhost";
                #address-cells = <1>;
                #size-cells = <1>;
                reg = <0x12dd0000 0x100>;
                samsung,pwm-outputs = <0>, <1>, <2>, <3>;
                #pwm-cells = <3>;
-               clocks = <&clock 311>;
+               clocks = <&clock CLK_PWM>;
                clock-names = "timers";
        };
 
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x121A0000 0x1000>;
                        interrupts = <0 34 0>;
-                       clocks = <&clock 275>;
+                       clocks = <&clock CLK_PDMA0>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
                        #dma-channels = <8>;
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x121B0000 0x1000>;
                        interrupts = <0 35 0>;
-                       clocks = <&clock 276>;
+                       clocks = <&clock CLK_PDMA1>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
                        #dma-channels = <8>;
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x10800000 0x1000>;
                        interrupts = <0 33 0>;
-                       clocks = <&clock 346>;
+                       clocks = <&clock CLK_MDMA0>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
                        #dma-channels = <8>;
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x11C10000 0x1000>;
                        interrupts = <0 124 0>;
-                       clocks = <&clock 271>;
+                       clocks = <&clock CLK_MDMA1>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
                        #dma-channels = <8>;
                reg = <0x13e00000 0x1000>;
                interrupts = <0 85 0>;
                samsung,power-domain = <&pd_gsc>;
-               clocks = <&clock 256>;
+               clocks = <&clock CLK_GSCL0>;
                clock-names = "gscl";
        };
 
                reg = <0x13e10000 0x1000>;
                interrupts = <0 86 0>;
                samsung,power-domain = <&pd_gsc>;
-               clocks = <&clock 257>;
+               clocks = <&clock CLK_GSCL1>;
                clock-names = "gscl";
        };
 
                reg = <0x13e20000 0x1000>;
                interrupts = <0 87 0>;
                samsung,power-domain = <&pd_gsc>;
-               clocks = <&clock 258>;
+               clocks = <&clock CLK_GSCL2>;
                clock-names = "gscl";
        };
 
                reg = <0x13e30000 0x1000>;
                interrupts = <0 88 0>;
                samsung,power-domain = <&pd_gsc>;
-               clocks = <&clock 259>;
+               clocks = <&clock CLK_GSCL3>;
                clock-names = "gscl";
        };
 
                compatible = "samsung,exynos4212-hdmi";
                reg = <0x14530000 0x70000>;
                interrupts = <0 95 0>;
-               clocks = <&clock 344>, <&clock 136>, <&clock 137>,
-                               <&clock 159>, <&clock 1024>;
+               clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>,
+                        <&clock CLK_SCLK_PIXEL>, <&clock CLK_SCLK_HDMIPHY>,
+                        <&clock CLK_MOUT_HDMI>;
                clock-names = "hdmi", "sclk_hdmi", "sclk_pixel",
                                "sclk_hdmiphy", "mout_hdmi";
        };
                compatible = "samsung,exynos5250-mixer";
                reg = <0x14450000 0x10000>;
                interrupts = <0 94 0>;
-               clocks = <&clock 343>, <&clock 136>;
+               clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>;
                clock-names = "mixer", "sclk_hdmi";
        };
 
        };
 
        dp-controller@145B0000 {
-               clocks = <&clock 342>;
+               clocks = <&clock CLK_DP>;
                clock-names = "dp";
                phys = <&dp_phy>;
                phy-names = "dp";
        };
 
        fimd@14400000 {
-               clocks = <&clock 133>, <&clock 339>;
+               clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>;
                clock-names = "sclk_fimd", "fimd";
        };
 
                compatible = "samsung,exynos-adc-v1";
                reg = <0x12D10000 0x100>, <0x10040718 0x4>;
                interrupts = <0 106 0>;
-               clocks = <&clock 303>;
+               clocks = <&clock CLK_ADC>;
                clock-names = "adc";
                #io-channel-cells = <1>;
                io-channel-ranges;
index 7340745..f509e8f 100644 (file)
@@ -11,6 +11,8 @@
 
 /dts-v1/;
 #include "exynos5420.dtsi"
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/input/input.h>
 
 / {
        model = "Insignal Arndale Octa evaluation board based on EXYNOS5420";
                };
        };
 
+       rtc@101E0000 {
+               status = "okay";
+       };
+
        mmc@12200000 {
                status = "okay";
                broken-cd;
@@ -41,6 +47,7 @@
                samsung,dw-mshc-ddr-timing = <0 2>;
                pinctrl-names = "default";
                pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>;
+               vmmc-supply = <&ldo10_reg>;
 
                slot@0 {
                        reg = <0>;
                samsung,dw-mshc-ddr-timing = <1 2>;
                pinctrl-names = "default";
                pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
+               vmmc-supply = <&ldo10_reg>;
 
                slot@0 {
                        reg = <0>;
                        bus-width = <4>;
                };
        };
+
+       hsi2c_4: i2c@12CA0000 {
+               status = "okay";
+
+               s2mps11_pmic@66 {
+                       compatible = "samsung,s2mps11-pmic";
+                       reg = <0x66>;
+                       s2mps11,buck2-ramp-delay = <12>;
+                       s2mps11,buck34-ramp-delay = <12>;
+                       s2mps11,buck16-ramp-delay = <12>;
+                       s2mps11,buck6-ramp-enable = <1>;
+                       s2mps11,buck2-ramp-enable = <1>;
+                       s2mps11,buck3-ramp-enable = <1>;
+                       s2mps11,buck4-ramp-enable = <1>;
+
+                       interrupt-parent = <&gpx3>;
+                       interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+
+                       s2mps11_osc: clocks {
+                               #clock-cells = <1>;
+                               clock-output-names = "s2mps11_ap",
+                                               "s2mps11_cp", "s2mps11_bt";
+                       };
+
+                       regulators {
+                               ldo1_reg: LDO1 {
+                                       regulator-name = "PVDD_ALIVE_1V0";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo2_reg: LDO2 {
+                                       regulator-name = "PVDD_APIO_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo3_reg: LDO3 {
+                                       regulator-name = "PVDD_APIO_MMCON_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo4_reg: LDO4 {
+                                       regulator-name = "PVDD_ADC_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo5_reg: LDO5 {
+                                       regulator-name = "PVDD_PLL_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo6_reg: LDO6 {
+                                       regulator-name = "PVDD_ANAIP_1V0";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                               };
+
+                               ldo7_reg: LDO7 {
+                                       regulator-name = "PVDD_ANAIP_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo8_reg: LDO8 {
+                                       regulator-name = "PVDD_ABB_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo9_reg: LDO9 {
+                                       regulator-name = "PVDD_USB_3V3";
+                                       regulator-min-microvolt = <3000000>;
+                                       regulator-max-microvolt = <3000000>;
+                               };
+
+                               ldo10_reg: LDO10 {
+                                       regulator-name = "PVDD_PRE_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo11_reg: LDO11 {
+                                       regulator-name = "PVDD_USB_1V0";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo12_reg: LDO12 {
+                                       regulator-name = "PVDD_HSIC_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo13_reg: LDO13 {
+                                       regulator-name = "PVDD_APIO_MMCOFF_2V8";
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <2800000>;
+                               };
+
+                               ldo15_reg: LDO15 {
+                                       regulator-name = "PVDD_PERI_2V8";
+                                       regulator-min-microvolt = <3300000>;
+                                       regulator-max-microvolt = <3300000>;
+                               };
+
+                               ldo16_reg: LDO16 {
+                                       regulator-name = "PVDD_PERI_3V3";
+                                       regulator-min-microvolt = <2200000>;
+                                       regulator-max-microvolt = <2200000>;
+                               };
+
+                               ldo18_reg: LDO18 {
+                                       regulator-name = "PVDD_EMMC_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo19_reg: LDO19 {
+                                       regulator-name = "PVDD_TFLASH_2V8";
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <2800000>;
+                               };
+
+                               ldo20_reg: LDO20 {
+                                       regulator-name = "PVDD_BTWIFI_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo21_reg: LDO21 {
+                                       regulator-name = "PVDD_CAM1IO_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo23_reg: LDO23 {
+                                       regulator-name = "PVDD_MIFS_1V1";
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                               };
+
+                               ldo24_reg: LDO24 {
+                                       regulator-name = "PVDD_CAM1_AVDD_2V8";
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <2800000>;
+                               };
+
+                               ldo26_reg: LDO26 {
+                                       regulator-name = "PVDD_CAM0_AF_2V8";
+                                       regulator-min-microvolt = <3000000>;
+                                       regulator-max-microvolt = <3000000>;
+                               };
+
+                               ldo27_reg: LDO27 {
+                                       regulator-name = "PVDD_G3DS_1V0";
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                               };
+
+                               ldo28_reg: LDO28 {
+                                       regulator-name = "PVDD_TSP_3V3";
+                                       regulator-min-microvolt = <3300000>;
+                                       regulator-max-microvolt = <3300000>;
+                               };
+
+                               ldo29_reg: LDO29 {
+                                       regulator-name = "PVDD_AUDIO_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo31_reg: LDO31 {
+                                       regulator-name = "PVDD_PERI_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo32_reg: LDO32 {
+                                       regulator-name = "PVDD_LCD_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo33_reg: LDO33 {
+                                       regulator-name = "PVDD_CAM0IO_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                               };
+
+                               ldo35_reg: LDO35 {
+                                       regulator-name = "PVDD_CAM0_DVDD_1V2";
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                               };
+
+                               ldo38_reg: LDO38 {
+                                       regulator-name = "PVDD_CAM0_AVDD_2V8";
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <2800000>;
+                               };
+
+                               buck1_reg: BUCK1 {
+                                       regulator-name = "PVDD_MIF_1V1";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1100000>;
+                                       regulator-always-on;
+                               };
+
+                               buck2_reg: BUCK2 {
+                                       regulator-name = "vdd_arm";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               buck3_reg: BUCK3 {
+                                       regulator-name = "PVDD_INT_1V0";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               buck4_reg: BUCK4 {
+                                       regulator-name = "PVDD_G3D_1V0";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1000000>;
+                               };
+
+                               buck5_reg: BUCK5 {
+                                       regulator-name = "PVDD_LPDDR3_1V2";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       regulator-always-on;
+                               };
+
+                               buck6_reg: BUCK6 {
+                                       regulator-name = "PVDD_KFC_1V0";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               buck7_reg: BUCK7 {
+                                       regulator-name = "VIN_LLDO_1V4";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1400000>;
+                                       regulator-always-on;
+                               };
+
+                               buck8_reg: BUCK8 {
+                                       regulator-name = "VIN_MLDO_2V0";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <2000000>;
+                                       regulator-always-on;
+                               };
+
+                               buck9_reg: BUCK9 {
+                                       regulator-name = "VIN_HLDO_3V5";
+                                       regulator-min-microvolt = <3000000>;
+                                       regulator-max-microvolt = <3500000>;
+                                       regulator-always-on;
+                               };
+
+                               buck10_reg: BUCK10 {
+                                       regulator-name = "PVDD_EMMCF_2V8";
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <2800000>;
+                               };
+                       };
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               wakeup {
+                       label = "SW-TACT1";
+                       gpios = <&gpx2 7 1>;
+                       linux,code = <KEY_WAKEUP>;
+                       gpio-key,wakeup;
+               };
+       };
 };
index fb5a1e2..ae1ee04 100644 (file)
                };
        };
 
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               vdd: fixed-regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       regulator-name = "vdd-supply";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       regulator-always-on;
+               };
+
+               dbvdd: fixed-regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       regulator-name = "dbvdd-supply";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-always-on;
+               };
+
+               spkvdd: fixed-regulator@2 {
+                       compatible = "regulator-fixed";
+                       reg = <2>;
+                       regulator-name = "spkvdd-supply";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       regulator-always-on;
+               };
+       };
+
+       rtc@101E0000 {
+               status = "okay";
+       };
+
        mmc@12200000 {
                status = "okay";
                broken-cd;
                        reg = <0x50>;
                };
        };
+
+       hsi2c_4: i2c@12CA0000 {
+               status = "okay";
+
+               s2mps11_pmic@66 {
+                       compatible = "samsung,s2mps11-pmic";
+                       reg = <0x66>;
+                       s2mps11,buck2-ramp-delay = <12>;
+                       s2mps11,buck34-ramp-delay = <12>;
+                       s2mps11,buck16-ramp-delay = <12>;
+                       s2mps11,buck6-ramp-enable = <1>;
+                       s2mps11,buck2-ramp-enable = <1>;
+                       s2mps11,buck3-ramp-enable = <1>;
+                       s2mps11,buck4-ramp-enable = <1>;
+
+                       s2mps11_osc: clocks {
+                               #clock-cells = <1>;
+                               clock-output-names = "s2mps11_ap",
+                                               "s2mps11_cp", "s2mps11_bt";
+                       };
+
+                       regulators {
+                               ldo1_reg: LDO1 {
+                                       regulator-name = "vdd_ldo1";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo3_reg: LDO3 {
+                                       regulator-name = "vdd_ldo3";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo5_reg: LDO5 {
+                                       regulator-name = "vdd_ldo5";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo6_reg: LDO6 {
+                                       regulator-name = "vdd_ldo6";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo7_reg: LDO7 {
+                                       regulator-name = "vdd_ldo7";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo8_reg: LDO8 {
+                                       regulator-name = "vdd_ldo8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo9_reg: LDO9 {
+                                       regulator-name = "vdd_ldo9";
+                                       regulator-min-microvolt = <3000000>;
+                                       regulator-max-microvolt = <3000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo10_reg: LDO10 {
+                                       regulator-name = "vdd_ldo10";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo11_reg: LDO11 {
+                                       regulator-name = "vdd_ldo11";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo12_reg: LDO12 {
+                                       regulator-name = "vdd_ldo12";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo13_reg: LDO13 {
+                                       regulator-name = "vdd_ldo13";
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <2800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo15_reg: LDO15 {
+                                       regulator-name = "vdd_ldo15";
+                                       regulator-min-microvolt = <3100000>;
+                                       regulator-max-microvolt = <3100000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo16_reg: LDO16 {
+                                       regulator-name = "vdd_ldo16";
+                                       regulator-min-microvolt = <2200000>;
+                                       regulator-max-microvolt = <2200000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo17_reg: LDO17 {
+                                       regulator-name = "tsp_avdd";
+                                       regulator-min-microvolt = <3300000>;
+                                       regulator-max-microvolt = <3300000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo19_reg: LDO19 {
+                                       regulator-name = "vdd_sd";
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <2800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo24_reg: LDO24 {
+                                       regulator-name = "tsp_io";
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <2800000>;
+                                       regulator-always-on;
+                               };
+
+                               buck1_reg: BUCK1 {
+                                       regulator-name = "vdd_mif";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1300000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck2_reg: BUCK2 {
+                                       regulator-name = "vdd_arm";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1500000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck3_reg: BUCK3 {
+                                       regulator-name = "vdd_int";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1400000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck4_reg: BUCK4 {
+                                       regulator-name = "vdd_g3d";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1400000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck5_reg: BUCK5 {
+                                       regulator-name = "vdd_mem";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1400000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck6_reg: BUCK6 {
+                                       regulator-name = "vdd_kfc";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1500000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck7_reg: BUCK7 {
+                                       regulator-name = "vdd_1.0v_ldo";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1500000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck8_reg: BUCK8 {
+                                       regulator-name = "vdd_1.8v_ldo";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1500000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck9_reg: BUCK9 {
+                                       regulator-name = "vdd_2.8v_ldo";
+                                       regulator-min-microvolt = <3000000>;
+                                       regulator-max-microvolt = <3750000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck10_reg: BUCK10 {
+                                       regulator-name = "vdd_vmem";
+                                       regulator-min-microvolt = <2850000>;
+                                       regulator-max-microvolt = <2850000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+                       };
+               };
+       };
 };
index 8db792b..e3329af 100644 (file)
@@ -13,6 +13,7 @@
  * published by the Free Software Foundation.
  */
 
+#include <dt-bindings/clock/exynos5420.h>
 #include "exynos5.dtsi"
 #include "exynos5420-pinctrl.dtsi"
 
                compatible = "samsung,exynos5420-audss-clock";
                reg = <0x03810000 0x0C>;
                #clock-cells = <1>;
-               clocks = <&clock 1>, <&clock 5>, <&clock 148>, <&clock 149>;
+               clocks = <&clock CLK_FIN_PLL>, <&clock CLK_FOUT_EPLL>,
+                        <&clock CLK_SCLK_MAUDIO0>, <&clock CLK_SCLK_MAUPCM0>;
                clock-names = "pll_ref", "pll_in", "sclk_audio", "sclk_pcm_in";
        };
 
                compatible = "samsung,mfc-v7";
                reg = <0x11000000 0x10000>;
                interrupts = <0 96 0>;
-               clocks = <&clock 401>;
+               clocks = <&clock CLK_MFC>;
                clock-names = "mfc";
        };
 
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x12200000 0x2000>;
-               clocks = <&clock 351>, <&clock 132>;
+               clocks = <&clock CLK_MMC0>, <&clock CLK_SCLK_MMC0>;
                clock-names = "biu", "ciu";
                fifo-depth = <0x40>;
                status = "disabled";
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x12210000 0x2000>;
-               clocks = <&clock 352>, <&clock 133>;
+               clocks = <&clock CLK_MMC1>, <&clock CLK_SCLK_MMC1>;
                clock-names = "biu", "ciu";
                fifo-depth = <0x40>;
                status = "disabled";
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x12220000 0x1000>;
-               clocks = <&clock 353>, <&clock 134>;
+               clocks = <&clock CLK_MMC2>, <&clock CLK_SCLK_MMC2>;
                clock-names = "biu", "ciu";
                fifo-depth = <0x40>;
                status = "disabled";
                interrupt-parent = <&mct_map>;
                interrupts = <0>, <1>, <2>, <3>, <4>, <5>, <6>, <7>,
                                <8>, <9>, <10>, <11>;
-               clocks = <&clock 1>, <&clock 315>;
+               clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>;
                clock-names = "fin_pll", "mct";
 
                mct_map: mct-map {
        };
 
        rtc@101E0000 {
-               clocks = <&clock 317>;
+               clocks = <&clock CLK_RTC>;
                clock-names = "rtc";
-               status = "okay";
+               status = "disabled";
        };
 
        amba {
                interrupt-parent = <&gic>;
                ranges;
 
+               adma: adma@03880000 {
+                       compatible = "arm,pl330", "arm,primecell";
+                       reg = <0x03880000 0x1000>;
+                       interrupts = <0 110 0>;
+                       clocks = <&clock_audss EXYNOS_ADMA>;
+                       clock-names = "apb_pclk";
+                       #dma-cells = <1>;
+                       #dma-channels = <6>;
+                       #dma-requests = <16>;
+               };
+
                pdma0: pdma@121A0000 {
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x121A0000 0x1000>;
                        interrupts = <0 34 0>;
-                       clocks = <&clock 362>;
+                       clocks = <&clock CLK_PDMA0>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
                        #dma-channels = <8>;
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x121B0000 0x1000>;
                        interrupts = <0 35 0>;
-                       clocks = <&clock 363>;
+                       clocks = <&clock CLK_PDMA1>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
                        #dma-channels = <8>;
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x10800000 0x1000>;
                        interrupts = <0 33 0>;
-                       clocks = <&clock 473>;
+                       clocks = <&clock CLK_MDMA0>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
                        #dma-channels = <8>;
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x11C10000 0x1000>;
                        interrupts = <0 124 0>;
-                       clocks = <&clock 442>;
+                       clocks = <&clock CLK_MDMA1>;
                        clock-names = "apb_pclk";
                        #dma-cells = <1>;
                        #dma-channels = <8>;
                };
        };
 
+       i2s0: i2s@03830000 {
+               compatible = "samsung,exynos5420-i2s";
+               reg = <0x03830000 0x100>;
+               dmas = <&adma 0
+                       &adma 2
+                       &adma 1>;
+               dma-names = "tx", "rx", "tx-sec";
+               clocks = <&clock_audss EXYNOS_I2S_BUS>,
+                       <&clock_audss EXYNOS_I2S_BUS>,
+                       <&clock_audss EXYNOS_SCLK_I2S>;
+               clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
+               samsung,idma-addr = <0x03000000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2s0_bus>;
+               status = "disabled";
+       };
+
+       i2s1: i2s@12D60000 {
+               compatible = "samsung,exynos5420-i2s";
+               reg = <0x12D60000 0x100>;
+               dmas = <&pdma1 12
+                       &pdma1 11>;
+               dma-names = "tx", "rx";
+               clocks = <&clock CLK_I2S1>, <&clock CLK_SCLK_I2S1>;
+               clock-names = "iis", "i2s_opclk0";
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2s1_bus>;
+               status = "disabled";
+       };
+
+       i2s2: i2s@12D70000 {
+               compatible = "samsung,exynos5420-i2s";
+               reg = <0x12D70000 0x100>;
+               dmas = <&pdma0 12
+                       &pdma0 11>;
+               dma-names = "tx", "rx";
+               clocks = <&clock CLK_I2S2>, <&clock CLK_SCLK_I2S2>;
+               clock-names = "iis", "i2s_opclk0";
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2s2_bus>;
+               status = "disabled";
+       };
+
        spi_0: spi@12d20000 {
                compatible = "samsung,exynos4210-spi";
                reg = <0x12d20000 0x100>;
                #size-cells = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&spi0_bus>;
-               clocks = <&clock 271>, <&clock 135>;
+               clocks = <&clock CLK_SPI0>, <&clock CLK_SCLK_SPI0>;
                clock-names = "spi", "spi_busclk0";
                status = "disabled";
        };
                #size-cells = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&spi1_bus>;
-               clocks = <&clock 272>, <&clock 136>;
+               clocks = <&clock CLK_SPI1>, <&clock CLK_SCLK_SPI1>;
                clock-names = "spi", "spi_busclk0";
                status = "disabled";
        };
                #size-cells = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&spi2_bus>;
-               clocks = <&clock 273>, <&clock 137>;
+               clocks = <&clock CLK_SPI2>, <&clock CLK_SCLK_SPI2>;
                clock-names = "spi", "spi_busclk0";
                status = "disabled";
        };
 
        serial@12C00000 {
-               clocks = <&clock 257>, <&clock 128>;
+               clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
                clock-names = "uart", "clk_uart_baud0";
        };
 
        serial@12C10000 {
-               clocks = <&clock 258>, <&clock 129>;
+               clocks = <&clock CLK_UART1>, <&clock CLK_SCLK_UART1>;
                clock-names = "uart", "clk_uart_baud0";
        };
 
        serial@12C20000 {
-               clocks = <&clock 259>, <&clock 130>;
+               clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
                clock-names = "uart", "clk_uart_baud0";
        };
 
        serial@12C30000 {
-               clocks = <&clock 260>, <&clock 131>;
+               clocks = <&clock CLK_UART3>, <&clock CLK_SCLK_UART3>;
                clock-names = "uart", "clk_uart_baud0";
        };
 
                reg = <0x12dd0000 0x100>;
                samsung,pwm-outputs = <0>, <1>, <2>, <3>;
                #pwm-cells = <3>;
-               clocks = <&clock 279>;
+               clocks = <&clock CLK_PWM>;
                clock-names = "timers";
        };
 
        };
 
        dp-controller@145B0000 {
-               clocks = <&clock 412>;
+               clocks = <&clock CLK_DP1>;
                clock-names = "dp";
                phys = <&dp_phy>;
                phy-names = "dp";
 
        fimd@14400000 {
                samsung,power-domain = <&disp_pd>;
-               clocks = <&clock 147>, <&clock 421>;
+               clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>;
                clock-names = "sclk_fimd", "fimd";
        };
 
                compatible = "samsung,exynos-adc-v2";
                reg = <0x12D10000 0x100>, <0x10040720 0x4>;
                interrupts = <0 106 0>;
-               clocks = <&clock 270>;
+               clocks = <&clock CLK_TSADC>;
                clock-names = "adc";
                #io-channel-cells = <1>;
                io-channel-ranges;
                interrupts = <0 56 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 261>;
+               clocks = <&clock CLK_I2C0>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c0_bus>;
                interrupts = <0 57 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 262>;
+               clocks = <&clock CLK_I2C1>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c1_bus>;
                interrupts = <0 58 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 263>;
+               clocks = <&clock CLK_I2C2>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c2_bus>;
                interrupts = <0 59 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 264>;
+               clocks = <&clock CLK_I2C3>;
                clock-names = "i2c";
                pinctrl-names = "default";
                pinctrl-0 = <&i2c3_bus>;
                #size-cells = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&i2c4_hs_bus>;
-               clocks = <&clock 265>;
+               clocks = <&clock CLK_I2C4>;
                clock-names = "hsi2c";
                status = "disabled";
        };
                #size-cells = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&i2c5_hs_bus>;
-               clocks = <&clock 266>;
+               clocks = <&clock CLK_I2C5>;
                clock-names = "hsi2c";
                status = "disabled";
        };
                #size-cells = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&i2c6_hs_bus>;
-               clocks = <&clock 267>;
+               clocks = <&clock CLK_I2C6>;
                clock-names = "hsi2c";
                status = "disabled";
        };
                #size-cells = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&i2c7_hs_bus>;
-               clocks = <&clock 268>;
+               clocks = <&clock CLK_I2C7>;
                clock-names = "hsi2c";
                status = "disabled";
        };
                #size-cells = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&i2c8_hs_bus>;
-               clocks = <&clock 281>;
+               clocks = <&clock CLK_I2C8>;
                clock-names = "hsi2c";
                status = "disabled";
        };
                #size-cells = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&i2c9_hs_bus>;
-               clocks = <&clock 282>;
+               clocks = <&clock CLK_I2C9>;
                clock-names = "hsi2c";
                status = "disabled";
        };
                #size-cells = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&i2c10_hs_bus>;
-               clocks = <&clock 283>;
+               clocks = <&clock CLK_I2C10>;
                clock-names = "hsi2c";
                status = "disabled";
        };
                compatible = "samsung,exynos4212-hdmi";
                reg = <0x14530000 0x70000>;
                interrupts = <0 95 0>;
-               clocks = <&clock 413>, <&clock 143>, <&clock 768>,
-                       <&clock 158>, <&clock 640>;
+               clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>,
+                        <&clock CLK_DOUT_PIXEL>, <&clock CLK_SCLK_HDMIPHY>,
+                        <&clock CLK_MOUT_HDMI>;
                clock-names = "hdmi", "sclk_hdmi", "sclk_pixel",
                        "sclk_hdmiphy", "mout_hdmi";
                status = "disabled";
                compatible = "samsung,exynos5420-mixer";
                reg = <0x14450000 0x10000>;
                interrupts = <0 94 0>;
-               clocks = <&clock 431>, <&clock 143>;
+               clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>;
                clock-names = "mixer", "sclk_hdmi";
        };
 
                compatible = "samsung,exynos5-gsc";
                reg = <0x13e00000 0x1000>;
                interrupts = <0 85 0>;
-               clocks = <&clock 465>;
+               clocks = <&clock CLK_GSCL0>;
                clock-names = "gscl";
                samsung,power-domain = <&gsc_pd>;
        };
                compatible = "samsung,exynos5-gsc";
                reg = <0x13e10000 0x1000>;
                interrupts = <0 86 0>;
-               clocks = <&clock 466>;
+               clocks = <&clock CLK_GSCL1>;
                clock-names = "gscl";
                samsung,power-domain = <&gsc_pd>;
        };
 
+       pmu_system_controller: system-controller@10040000 {
+               compatible = "samsung,exynos5420-pmu", "syscon";
+               reg = <0x10040000 0x5000>;
+       };
+
        tmu_cpu0: tmu@10060000 {
                compatible = "samsung,exynos5420-tmu";
                reg = <0x10060000 0x100>;
                interrupts = <0 65 0>;
-               clocks = <&clock 318>;
+               clocks = <&clock CLK_TMU>;
                clock-names = "tmu_apbif";
        };
 
                compatible = "samsung,exynos5420-tmu";
                reg = <0x10064000 0x100>;
                interrupts = <0 183 0>;
-               clocks = <&clock 318>;
+               clocks = <&clock CLK_TMU>;
                clock-names = "tmu_apbif";
        };
 
                compatible = "samsung,exynos5420-tmu-ext-triminfo";
                reg = <0x10068000 0x100>, <0x1006c000 0x4>;
                interrupts = <0 184 0>;
-               clocks = <&clock 318>, <&clock 318>;
+               clocks = <&clock CLK_TMU>, <&clock CLK_TMU>;
                clock-names = "tmu_apbif", "tmu_triminfo_apbif";
        };
 
                compatible = "samsung,exynos5420-tmu-ext-triminfo";
                reg = <0x1006c000 0x100>, <0x100a0000 0x4>;
                interrupts = <0 185 0>;
-               clocks = <&clock 318>, <&clock 319>;
+               clocks = <&clock CLK_TMU>, <&clock CLK_TMU_GPU>;
                clock-names = "tmu_apbif", "tmu_triminfo_apbif";
        };
 
                compatible = "samsung,exynos5420-tmu-ext-triminfo";
                reg = <0x100a0000 0x100>, <0x10068000 0x4>;
                interrupts = <0 215 0>;
-               clocks = <&clock 319>, <&clock 318>;
+               clocks = <&clock CLK_TMU_GPU>, <&clock CLK_TMU>;
                clock-names = "tmu_apbif", "tmu_triminfo_apbif";
        };
+
+        watchdog@101D0000 {
+               compatible = "samsung,exynos5420-wdt";
+               reg = <0x101D0000 0x100>;
+               interrupts = <0 42 0>;
+               clocks = <&clock CLK_WDT>;
+               clock-names = "watchdog";
+               samsung,syscon-phandle = <&pmu_system_controller>;
+        };
 };
index 02a0a12..75c7b89 100644 (file)
@@ -9,6 +9,7 @@
  * published by the Free Software Foundation.
 */
 
+#include <dt-bindings/clock/exynos5440.h>
 #include "skeleton.dtsi"
 
 / {
                compatible = "samsung,exynos4210-uart";
                reg = <0xB0000 0x1000>;
                interrupts = <0 2 0>;
-               clocks = <&clock 21>, <&clock 21>;
+               clocks = <&clock CLK_B_125>, <&clock CLK_B_125>;
                clock-names = "uart", "clk_uart_baud0";
        };
 
                compatible = "samsung,exynos4210-uart";
                reg = <0xC0000 0x1000>;
                interrupts = <0 3 0>;
-               clocks = <&clock 21>, <&clock 21>;
+               clocks = <&clock CLK_B_125>, <&clock CLK_B_125>;
                clock-names = "uart", "clk_uart_baud0";
        };
 
                #size-cells = <0>;
                samsung,spi-src-clk = <0>;
                num-cs = <1>;
-               clocks = <&clock 21>, <&clock 16>;
+               clocks = <&clock CLK_B_125>, <&clock CLK_SPI_BAUD>;
                clock-names = "spi", "spi_busclk0";
        };
 
                interrupts = <0 5 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 21>;
+               clocks = <&clock CLK_B_125>;
                clock-names = "i2c";
        };
 
                interrupts = <0 6 0>;
                #address-cells = <1>;
                #size-cells = <0>;
-               clocks = <&clock 21>;
+               clocks = <&clock CLK_B_125>;
                clock-names = "i2c";
        };
 
                compatible = "samsung,s3c2410-wdt";
                reg = <0x110000 0x1000>;
                interrupts = <0 1 0>;
-               clocks = <&clock 21>;
+               clocks = <&clock CLK_B_125>;
                clock-names = "watchdog";
        };
 
                interrupts = <0 31 4>;
                interrupt-names = "macirq";
                phy-mode = "sgmii";
-               clocks = <&clock 25>;
+               clocks = <&clock CLK_GMAC0>;
                clock-names = "stmmaceth";
        };
 
                compatible = "samsung,s3c6410-rtc";
                reg = <0x130000 0x1000>;
                interrupts = <0 17 0>, <0 16 0>;
-               clocks = <&clock 21>;
+               clocks = <&clock CLK_B_125>;
                clock-names = "rtc";
        };
 
                compatible = "samsung,exynos5440-tmu";
                reg = <0x160118 0x230>, <0x160368 0x10>;
                interrupts = <0 58 0>;
-               clocks = <&clock 21>;
+               clocks = <&clock CLK_B_125>;
                clock-names = "tmu_apbif";
        };
 
                compatible = "samsung,exynos5440-tmu";
                reg = <0x16011C 0x230>, <0x160368 0x10>;
                interrupts = <0 58 0>;
-               clocks = <&clock 21>;
+               clocks = <&clock CLK_B_125>;
                clock-names = "tmu_apbif";
        };
 
                compatible = "samsung,exynos5440-tmu";
                reg = <0x160120 0x230>, <0x160368 0x10>;
                interrupts = <0 58 0>;
-               clocks = <&clock 21>;
+               clocks = <&clock CLK_B_125>;
                clock-names = "tmu_apbif";
        };
 
                compatible = "snps,exynos5440-ahci";
                reg = <0x210000 0x10000>;
                interrupts = <0 30 0>;
-               clocks = <&clock 23>;
+               clocks = <&clock CLK_SATA>;
                clock-names = "sata";
        };
 
                compatible = "samsung,exynos5440-ohci";
                reg = <0x220000 0x1000>;
                interrupts = <0 29 0>;
-               clocks = <&clock 24>;
+               clocks = <&clock CLK_USB>;
                clock-names = "usbhost";
        };
 
                compatible = "samsung,exynos5440-ehci";
                reg = <0x221000 0x1000>;
                interrupts = <0 29 0>;
-               clocks = <&clock 24>;
+               clocks = <&clock CLK_USB>;
                clock-names = "usbhost";
        };
 
                        0x270000 0x1000
                        0x271000 0x40>;
                interrupts = <0 20 0>, <0 21 0>, <0 22 0>;
-               clocks = <&clock 28>, <&clock 27>;
+               clocks = <&clock CLK_PR0_250_O>, <&clock CLK_PB0_250_O>;
                clock-names = "pcie", "pcie_bus";
                #address-cells = <3>;
                #size-cells = <2>;
                        0x272000 0x1000
                        0x271040 0x40>;
                interrupts = <0 23 0>, <0 24 0>, <0 25 0>;
-               clocks = <&clock 29>, <&clock 27>;
+               clocks = <&clock CLK_PR1_250_O>, <&clock CLK_PB0_250_O>;
                clock-names = "pcie", "pcie_bus";
                #address-cells = <3>;
                #size-cells = <2>;
index f3a9cff..8d8d922 100644 (file)
@@ -9,7 +9,7 @@
  * published by the Free Software Foundation.
 */
 
-#include <plat/regs-serial.h>
+#include <linux/serial_s3c.h>
 
 /* The S5PV210/S5PC110 implementations are as belows. */
 
index f18be40..025fd82 100644 (file)
@@ -20,6 +20,7 @@
 #include <clocksource/samsung_pwm.h>
 #include <linux/sched.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/of.h>
 #include <linux/of_fdt.h>
 #include <linux/of_irq.h>
@@ -40,7 +41,6 @@
 
 #include <plat/cpu.h>
 #include <plat/pm.h>
-#include <plat/regs-serial.h>
 
 #include "common.h"
 #include "regs-pmu.h"
diff --git a/arch/arm/mach-exynos/include/mach/uncompress.h b/arch/arm/mach-exynos/include/mach/uncompress.h
deleted file mode 100644 (file)
index 5d7ce36..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd.
- *             http://www.samsung.com
- *
- * EXYNOS - uncompress code
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_UNCOMPRESS_H
-#define __ASM_ARCH_UNCOMPRESS_H __FILE__
-
-#include <asm/mach-types.h>
-
-#include <mach/map.h>
-#include <plat/uncompress.h>
-
-static unsigned int __raw_readl(unsigned int ptr)
-{
-       return *((volatile unsigned int *)ptr);
-}
-
-static void arch_detect_cpu(void)
-{
-       u32 chip_id = __raw_readl(EXYNOS_PA_CHIPID);
-
-       /*
-        * product_id is bits 31:12
-        * bits 23:20 describe the exynosX family
-        * bits 27:24 describe the exynosX family in exynos5420
-        */
-       chip_id >>= 20;
-
-       if ((chip_id & 0x0f) == 0x5 || (chip_id & 0xf0) == 0x50)
-               uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
-       else
-               uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
-
-       /*
-        * For preventing FIFO overrun or infinite loop of UART console,
-        * fifo_max should be the minimum fifo size of all of the UART channels
-        */
-       fifo_mask = S5PV210_UFSTAT_TXMASK;
-       fifo_max = 15 << S5PV210_UFSTAT_TXSHIFT;
-}
-#endif /* __ASM_ARCH_UNCOMPRESS_H */
index e00025b..ba18214 100644 (file)
 #include "common.h"
 #include "regs-pmu.h"
 
-#define EXYNOS4_EPLL_LOCK                      (S5P_VA_CMU + 0x0C010)
-#define EXYNOS4_VPLL_LOCK                      (S5P_VA_CMU + 0x0C020)
-
-#define EXYNOS4_EPLL_CON0                      (S5P_VA_CMU + 0x0C110)
-#define EXYNOS4_EPLL_CON1                      (S5P_VA_CMU + 0x0C114)
-#define EXYNOS4_VPLL_CON0                      (S5P_VA_CMU + 0x0C120)
-#define EXYNOS4_VPLL_CON1                      (S5P_VA_CMU + 0x0C124)
-
-#define EXYNOS4_CLKSRC_MASK_TOP                        (S5P_VA_CMU + 0x0C310)
-#define EXYNOS4_CLKSRC_MASK_CAM                        (S5P_VA_CMU + 0x0C320)
-#define EXYNOS4_CLKSRC_MASK_TV                 (S5P_VA_CMU + 0x0C324)
-#define EXYNOS4_CLKSRC_MASK_LCD0               (S5P_VA_CMU + 0x0C334)
-#define EXYNOS4_CLKSRC_MASK_MAUDIO             (S5P_VA_CMU + 0x0C33C)
-#define EXYNOS4_CLKSRC_MASK_FSYS               (S5P_VA_CMU + 0x0C340)
-#define EXYNOS4_CLKSRC_MASK_PERIL0             (S5P_VA_CMU + 0x0C350)
-#define EXYNOS4_CLKSRC_MASK_PERIL1             (S5P_VA_CMU + 0x0C354)
-
-#define EXYNOS4_CLKSRC_MASK_DMC                        (S5P_VA_CMU + 0x10300)
-
-#define EXYNOS4_EPLLCON0_LOCKED_SHIFT          (29)
-#define EXYNOS4_VPLLCON0_LOCKED_SHIFT          (29)
-
-#define EXYNOS4210_CLKSRC_MASK_LCD1            (S5P_VA_CMU + 0x0C338)
-
-static const struct sleep_save exynos4_set_clksrc[] = {
-       { .reg = EXYNOS4_CLKSRC_MASK_TOP                , .val = 0x00000001, },
-       { .reg = EXYNOS4_CLKSRC_MASK_CAM                , .val = 0x11111111, },
-       { .reg = EXYNOS4_CLKSRC_MASK_TV                 , .val = 0x00000111, },
-       { .reg = EXYNOS4_CLKSRC_MASK_LCD0               , .val = 0x00001111, },
-       { .reg = EXYNOS4_CLKSRC_MASK_MAUDIO             , .val = 0x00000001, },
-       { .reg = EXYNOS4_CLKSRC_MASK_FSYS               , .val = 0x01011111, },
-       { .reg = EXYNOS4_CLKSRC_MASK_PERIL0             , .val = 0x01111111, },
-       { .reg = EXYNOS4_CLKSRC_MASK_PERIL1             , .val = 0x01110111, },
-       { .reg = EXYNOS4_CLKSRC_MASK_DMC                , .val = 0x00010000, },
-};
-
-static const struct sleep_save exynos4210_set_clksrc[] = {
-       { .reg = EXYNOS4210_CLKSRC_MASK_LCD1            , .val = 0x00001111, },
-};
-
-static struct sleep_save exynos4_epll_save[] = {
-       SAVE_ITEM(EXYNOS4_EPLL_CON0),
-       SAVE_ITEM(EXYNOS4_EPLL_CON1),
-};
-
-static struct sleep_save exynos4_vpll_save[] = {
-       SAVE_ITEM(EXYNOS4_VPLL_CON0),
-       SAVE_ITEM(EXYNOS4_VPLL_CON1),
-};
-
 static struct sleep_save exynos5_sys_save[] = {
        SAVE_ITEM(EXYNOS5_SYS_I2C_CFG),
 };
@@ -124,10 +74,7 @@ static void exynos_pm_prepare(void)
 
        s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save));
 
-       if (!soc_is_exynos5250()) {
-               s3c_pm_do_save(exynos4_epll_save, ARRAY_SIZE(exynos4_epll_save));
-               s3c_pm_do_save(exynos4_vpll_save, ARRAY_SIZE(exynos4_vpll_save));
-       } else {
+       if (soc_is_exynos5250()) {
                s3c_pm_do_save(exynos5_sys_save, ARRAY_SIZE(exynos5_sys_save));
                /* Disable USE_RETENTION of JPEG_MEM_OPTION */
                tmp = __raw_readl(EXYNOS5_JPEG_MEM_OPTION);
@@ -143,15 +90,6 @@ static void exynos_pm_prepare(void)
        /* ensure at least INFORM0 has the resume address */
 
        __raw_writel(virt_to_phys(s3c_cpu_resume), S5P_INFORM0);
-
-       /* Before enter central sequence mode, clock src register have to set */
-
-       if (!soc_is_exynos5250())
-               s3c_pm_do_restore_core(exynos4_set_clksrc, ARRAY_SIZE(exynos4_set_clksrc));
-
-       if (soc_is_exynos4210())
-               s3c_pm_do_restore_core(exynos4210_set_clksrc, ARRAY_SIZE(exynos4210_set_clksrc));
-
 }
 
 static int exynos_pm_add(struct device *dev, struct subsys_interface *sif)
@@ -162,73 +100,6 @@ static int exynos_pm_add(struct device *dev, struct subsys_interface *sif)
        return 0;
 }
 
-static unsigned long pll_base_rate;
-
-static void exynos4_restore_pll(void)
-{
-       unsigned long pll_con, locktime, lockcnt;
-       unsigned long pll_in_rate;
-       unsigned int p_div, epll_wait = 0, vpll_wait = 0;
-
-       if (pll_base_rate == 0)
-               return;
-
-       pll_in_rate = pll_base_rate;
-
-       /* EPLL */
-       pll_con = exynos4_epll_save[0].val;
-
-       if (pll_con & (1 << 31)) {
-               pll_con &= (PLL46XX_PDIV_MASK << PLL46XX_PDIV_SHIFT);
-               p_div = (pll_con >> PLL46XX_PDIV_SHIFT);
-
-               pll_in_rate /= 1000000;
-
-               locktime = (3000 / pll_in_rate) * p_div;
-               lockcnt = locktime * 10000 / (10000 / pll_in_rate);
-
-               __raw_writel(lockcnt, EXYNOS4_EPLL_LOCK);
-
-               s3c_pm_do_restore_core(exynos4_epll_save,
-                                       ARRAY_SIZE(exynos4_epll_save));
-               epll_wait = 1;
-       }
-
-       pll_in_rate = pll_base_rate;
-
-       /* VPLL */
-       pll_con = exynos4_vpll_save[0].val;
-
-       if (pll_con & (1 << 31)) {
-               pll_in_rate /= 1000000;
-               /* 750us */
-               locktime = 750;
-               lockcnt = locktime * 10000 / (10000 / pll_in_rate);
-
-               __raw_writel(lockcnt, EXYNOS4_VPLL_LOCK);
-
-               s3c_pm_do_restore_core(exynos4_vpll_save,
-                                       ARRAY_SIZE(exynos4_vpll_save));
-               vpll_wait = 1;
-       }
-
-       /* Wait PLL locking */
-
-       do {
-               if (epll_wait) {
-                       pll_con = __raw_readl(EXYNOS4_EPLL_CON0);
-                       if (pll_con & (1 << EXYNOS4_EPLLCON0_LOCKED_SHIFT))
-                               epll_wait = 0;
-               }
-
-               if (vpll_wait) {
-                       pll_con = __raw_readl(EXYNOS4_VPLL_CON0);
-                       if (pll_con & (1 << EXYNOS4_VPLLCON0_LOCKED_SHIFT))
-                               vpll_wait = 0;
-               }
-       } while (epll_wait || vpll_wait);
-}
-
 static struct subsys_interface exynos_pm_interface = {
        .name           = "exynos_pm",
        .subsys         = &exynos_subsys,
@@ -237,7 +108,6 @@ static struct subsys_interface exynos_pm_interface = {
 
 static __init int exynos_pm_drvinit(void)
 {
-       struct clk *pll_base;
        unsigned int tmp;
 
        if (soc_is_exynos5440())
@@ -251,15 +121,6 @@ static __init int exynos_pm_drvinit(void)
        tmp |= ((0xFF << 8) | (0x1F << 1));
        __raw_writel(tmp, S5P_WAKEUP_MASK);
 
-       if (!soc_is_exynos5250()) {
-               pll_base = clk_get(NULL, "xtal");
-
-               if (!IS_ERR(pll_base)) {
-                       pll_base_rate = clk_get_rate(pll_base);
-                       clk_put(pll_base);
-               }
-       }
-
        return subsys_interface_register(&exynos_pm_interface);
 }
 arch_initcall(exynos_pm_drvinit);
@@ -343,13 +204,8 @@ static void exynos_pm_resume(void)
 
        s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save));
 
-       if (!soc_is_exynos5250()) {
-               exynos4_restore_pll();
-
-#ifdef CONFIG_SMP
+       if (IS_ENABLED(CONFIG_SMP) && !soc_is_exynos5250())
                scu_enable(S5P_VA_SCU);
-#endif
-       }
 
 early_wakeup:
 
index 8fd2488..fe6570e 100644 (file)
@@ -22,8 +22,6 @@
 #include <linux/of_platform.h>
 #include <linux/sched.h>
 
-#include <plat/devs.h>
-
 #include "regs-pmu.h"
 
 /*
index d876431..bb1fa60 100644 (file)
@@ -521,7 +521,6 @@ config MACH_ANUBIS
        select HAVE_PATA_PLATFORM
        select S3C2440_XTAL_12000000
        select S3C24XX_DCLK
-       select S3C24XX_GPIO_EXTRA64
        select S3C24XX_SIMTEC_PM if PM
        select S3C_DEV_USB_HOST
        help
@@ -562,7 +561,6 @@ config MACH_OSIRIS
        select S3C2410_IOTIMING if ARM_S3C2440_CPUFREQ
        select S3C2440_XTAL_12000000
        select S3C24XX_DCLK
-       select S3C24XX_GPIO_EXTRA128
        select S3C24XX_SIMTEC_PM if PM
        select S3C_DEV_NAND
        select S3C_DEV_USB_HOST
index d39d3c7..d1afcf9 100644 (file)
 #include <linux/mutex.h>
 #include <linux/delay.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/io.h>
 
 #include <asm/mach/map.h>
 
 #include <mach/hardware.h>
-
-#include <plat/regs-serial.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 
index 11b3b28..192a5b2 100644 (file)
 #include <linux/mutex.h>
 #include <linux/delay.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/io.h>
 
 #include <asm/mach/map.h>
 
 #include <mach/hardware.h>
-
-#include <plat/regs-serial.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 
index aaf006d..5527226 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 
 #include <mach/hardware.h>
 #include <linux/atomic.h>
@@ -43,7 +44,6 @@
 
 #include <plat/clock.h>
 #include <plat/cpu.h>
-#include <plat/regs-serial.h>
 
 /* S3C2440 extended clock support */
 
index 4adaa4b..64b6eda 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <clocksource/samsung_pwm.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
@@ -44,7 +45,6 @@
 #include <asm/mach/map.h>
 
 #include <mach/regs-gpio.h>
-#include <plat/regs-serial.h>
 #include <mach/dma.h>
 
 #include <plat/cpu.h>
@@ -240,7 +240,6 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
        } else {
                samsung_cpu_id = s3c24xx_read_idcode_v4();
        }
-       s3c24xx_init_cpu();
 
        s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
 
index 30aa53f..09aa12d 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 
 #include <mach/map.h>
 #include <mach/dma.h>
@@ -23,7 +24,6 @@
 #include <plat/cpu.h>
 #include <plat/dma-s3c24xx.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <plat/regs-dma.h>
 #include <mach/regs-lcd.h>
index b7e0946..0c0106d 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/io.h>
 
 #include <mach/dma.h>
@@ -23,7 +24,6 @@
 #include <plat/dma-s3c24xx.h>
 #include <plat/cpu.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <plat/regs-dma.h>
 #include <mach/regs-lcd.h>
index cd25de2..2f8e8a3 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 
 #include <mach/map.h>
 #include <mach/dma.h>
@@ -23,7 +24,6 @@
 #include <plat/dma-s3c24xx.h>
 #include <plat/cpu.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <plat/regs-dma.h>
 #include <mach/regs-lcd.h>
index 95b9f75..f4096ec 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/io.h>
 
 #include <mach/dma.h>
@@ -23,7 +24,6 @@
 #include <plat/dma-s3c24xx.h>
 #include <plat/cpu.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <plat/regs-dma.h>
 #include <mach/regs-lcd.h>
index 2558952..2f39737 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <mach/map.h>
 #include <mach/regs-gpio.h>
-#include <plat/regs-serial.h>
+#include <linux/serial_s3c.h>
 
 #define S3C2410_UART1_OFF (0x4000)
 #define SHIFT_2440TXF (14-9)
diff --git a/arch/arm/mach-s3c24xx/include/mach/rtc-core.h b/arch/arm/mach-s3c24xx/include/mach/rtc-core.h
new file mode 100644 (file)
index 0000000..4d5f576
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2011 Heiko Stuebner <heiko@sntech.de>
+ *
+ * Samsung RTC Controller core functions
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#ifndef __RTC_CORE_H
+#define __RTC_CORE_H __FILE__
+
+/* These functions are only for use with the core support code, such as
+ * the cpu specific initialisation code
+ */
+
+extern struct platform_device s3c_device_rtc;
+
+/* re-define device name depending on support. */
+static inline void s3c_rtc_setname(char *name)
+{
+       s3c_device_rtc.name = name;
+}
+
+#endif /* __RTC_CORE_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/tick.h b/arch/arm/mach-s3c24xx/include/mach/tick.h
deleted file mode 100644 (file)
index 544da41..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/* linux/arch/arm/mach-s3c2410/include/mach/tick.h
- *
- * Copyright 2008 Simtec Electronics
- *      Ben Dooks <ben@simtec.co.uk>
- *      http://armlinux.simtec.co.uk/
- *
- * S3C2410 - timer tick support
- */
-
-#define SRCPND_TIMER4 (1<<(IRQ_TIMER4 - IRQ_EINT0))
-
-static inline int s3c24xx_ostimer_pending(void)
-{
-       return __raw_readl(S3C2410_SRCPND) & SRCPND_TIMER4;
-}
index 284ea1f..8ac9554 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/platform_device.h>
 #include <linux/proc_fs.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/io.h>
 
 #include <asm/mach/arch.h>
@@ -49,7 +50,6 @@
 #include <asm/mach-types.h>
 #include <mach/fb.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-lcd.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
index 2a16f8f..81a270a 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/gpio.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/ata_platform.h>
 #include <linux/i2c.h>
@@ -32,7 +33,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
index 6beab67..d8f6bb1 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/init.h>
 #include <linux/io.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/dm9000.h>
 #include <linux/platform_device.h>
 
@@ -33,7 +34,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
index 981ba1e..e371ff5 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/gpio.h>
 #include <linux/syscore_ops.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/dm9000.h>
 #include <linux/ata_platform.h>
@@ -55,7 +56,6 @@
 #include <plat/cpu-freq.h>
 #include <plat/devs.h>
 #include <plat/gpio-cfg.h>
-#include <plat/regs-serial.h>
 #include <plat/samsung-time.h>
 
 #include "bast.h"
index d9170e9..8e05813 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/workqueue.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/input.h>
 #include <linux/io.h>
 #include <linux/i2c.h>
@@ -81,7 +82,6 @@
 #include <plat/devs.h>
 #include <plat/gpio-cfg.h>
 #include <plat/pm.h>
-#include <plat/regs-serial.h>
 #include <plat/samsung-time.h>
 
 #include "common.h"
index de08321..e453acd 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/gpio.h>
@@ -62,7 +63,6 @@
 #include <plat/gpio-cfg.h>
 #include <plat/pll.h>
 #include <plat/pm.h>
-#include <plat/regs-serial.h>
 #include <plat/samsung-time.h>
 
 #include "common.h"
index 67cb8e9..5faa723 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/gpio.h>
 #include <linux/syscore_ops.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/i2c.h>
 
@@ -31,7 +32,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <plat/regs-serial.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
index 1f15597..9e57fd9 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/input.h>
 #include <linux/io.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/dm9000.h>
 #include <linux/platform_data/at24.h>
 #include <linux/platform_device.h>
@@ -37,7 +38,6 @@
 #include <mach/fb.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <linux/platform_data/leds-s3c24xx.h>
 #include <mach/regs-lcd.h>
index 997684f..4cccaad 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/timer.h>
 #include <linux/io.h>
 #include <linux/mmc/host.h>
@@ -43,7 +44,6 @@
 #include <asm/mach/map.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/regs-serial.h>
 
 #include <plat/clock.h>
 #include <plat/cpu.h>
index 575d28c..3066851 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/gpio.h>
 #include <linux/string.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 
@@ -38,7 +39,6 @@
 //#include <asm/debug-ll.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
-#include <plat/regs-serial.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
 #include <plat/gpio-cfg.h>
index f84f2a4..a4ae4bb 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/device.h>
 #include <linux/syscore_ops.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/clk.h>
 #include <linux/i2c.h>
 #include <linux/io.h>
@@ -44,7 +45,6 @@
 #include <plat/cpu-freq.h>
 #include <plat/devs.h>
 #include <plat/gpio-cfg.h>
-#include <plat/regs-serial.h>
 #include <plat/samsung-time.h>
 
 #include <mach/hardware.h>
index 7e16b07..bdb3faa 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 
@@ -32,7 +33,6 @@
 #include <plat/clock.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
-#include <plat/regs-serial.h>
 #include <plat/samsung-time.h>
 
 #include "common.h"
index b534b76..8c12787 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/device.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/spi_gpio.h>
 #include <linux/io.h>
@@ -49,7 +50,6 @@
 
 #include <linux/platform_data/leds-s3c24xx.h>
 #include <mach/regs-lcd.h>
-#include <plat/regs-serial.h>
 #include <mach/fb.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
index 0a5456c..afb784e 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/gpio.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
 #include <linux/device.h>
@@ -57,7 +58,6 @@
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/pm.h>
-#include <plat/regs-serial.h>
 #include <plat/samsung-time.h>
 #include <plat/gpio-cfg.h>
 
index b36edce..e6535ce 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/device.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/serial.h>
 #include <linux/io.h>
 #include <linux/mtd/mtd.h>
@@ -49,7 +50,6 @@
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/pm.h>
-#include <plat/regs-serial.h>
 #include <plat/samsung-time.h>
 
 #include "common.h"
index f50454a..70f0900 100644 (file)
 #include <linux/irqchip.h>
 #include <linux/of_platform.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 
 #include <asm/mach/arch.h>
 #include <mach/map.h>
 
 #include <plat/cpu.h>
 #include <plat/pm.h>
-#include <plat/regs-serial.h>
 
 #include "common.h"
 
index a773789..f32924e 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 
@@ -46,7 +47,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
 #include <plat/devs.h>
index f5bc721..233fe52 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/init.h>
 #include <linux/gpio.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 
@@ -33,7 +34,6 @@
 #include <asm/mach-types.h>
 
 //#include <asm/debug-ll.h>
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
 
index 12023ca..b3b54d8 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/mtd/partitions.h>
@@ -34,7 +35,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
 #include <mach/regs-s3c2443-clock.h>
index de2e5d3..d071dcf 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 
@@ -31,7 +32,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
 
index d9933fc..06c4d77 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 
@@ -31,7 +32,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
 
index 7fad8f0..4108b2f 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/device.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/io.h>
 
 #include <asm/mach/arch.h>
@@ -44,7 +45,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
index 755df48..1cc5b1b 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/tty.h>
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
+#include <linux/serial_s3c.h>
 #include <linux/io.h>
 
 #include <asm/mach/arch.h>
@@ -45,7 +46,6 @@
 #include <plat/clock.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
-#include <plat/regs-serial.h>
 #include <plat/samsung-time.h>
 
 #include "bast.h"
index f7ec9c5..40868c0 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/mtd/mtd.h>
@@ -32,7 +33,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
 
index 052ca23..68ea5b7 100644 (file)
@@ -33,9 +33,9 @@
 #include <linux/gpio.h>
 #include <linux/interrupt.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/io.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-irq.h>
index ffb92cb..04b58cb 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/device.h>
 #include <linux/syscore_ops.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/reboot.h>
 #include <linux/io.h>
@@ -37,7 +38,6 @@
 #include <plat/cpu-freq.h>
 
 #include <mach/regs-clock.h>
-#include <plat/regs-serial.h>
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
index 0251650..657cbac 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/device.h>
 #include <linux/syscore_ops.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/reboot.h>
@@ -43,7 +44,6 @@
 #include <plat/nand-core.h>
 #include <plat/pll.h>
 #include <plat/pm.h>
-#include <plat/regs-serial.h>
 #include <plat/regs-spi.h>
 
 #include "common.h"
index 8e01b4f..9fe260a 100644 (file)
@@ -48,6 +48,7 @@
 #include <asm/system_misc.h>
 
 #include <mach/regs-s3c2443-clock.h>
+#include <mach/rtc-core.h>
 
 #include <plat/gpio-core.h>
 #include <plat/gpio-cfg.h>
@@ -61,7 +62,6 @@
 #include <plat/fb-core.h>
 #include <plat/nand-core.h>
 #include <plat/adc-core.h>
-#include <plat/rtc-core.h>
 #include <plat/spi-core.h>
 
 #include "common.h"
index 886c214..c7a804d 100644 (file)
@@ -34,6 +34,7 @@
 #include <asm/system_misc.h>
 
 #include <mach/regs-s3c2443-clock.h>
+#include <mach/rtc-core.h>
 
 #include <plat/gpio-core.h>
 #include <plat/gpio-cfg.h>
@@ -43,7 +44,6 @@
 #include <plat/fb-core.h>
 #include <plat/nand-core.h>
 #include <plat/adc-core.h>
-#include <plat/rtc-core.h>
 #include <plat/spi-core.h>
 
 static struct map_desc s3c2443_iodesc[] __initdata = {
index 911b555..fe30ebb 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/reboot.h>
 #include <linux/device.h>
@@ -35,7 +36,6 @@
 #include <plat/cpu-freq.h>
 
 #include <mach/regs-clock.h>
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 
 #include <plat/clock.h>
index dd47c8f..c9b9122 100644 (file)
 */
 
 #include <linux/linkage.h>
+#include <linux/serial_s3c.h>
 #include <asm/assembler.h>
 #include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <mach/regs-gpio.h>
 #include <mach/regs-clock.h>
-#include <plat/regs-serial.h>
 
 #include "regs-mem.h"
 
index 7f378b6..d833d61 100644 (file)
 */
 
 #include <linux/linkage.h>
+#include <linux/serial_s3c.h>
 #include <asm/assembler.h>
 #include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <mach/regs-gpio.h>
 #include <mach/regs-clock.h>
-#include <plat/regs-serial.h>
 
 /* CONFIG_DEBUG_RESUME is dangerous if your bootloader does not
  * reset the UART configuration, only enable if you really need this!
index 76ab595..5c45aae 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/reboot.h>
 #include <linux/io.h>
@@ -50,7 +51,6 @@
 #include <plat/irq-uart.h>
 #include <plat/pwm-core.h>
 #include <plat/regs-irqtype.h>
-#include <plat/regs-serial.h>
 #include <plat/watchdog-reset.h>
 
 #include "common.h"
index dd9ccca..c9b9532 100644 (file)
@@ -12,8 +12,8 @@
 
 /* pull in the relevant register and map files. */
 
+#include <linux/serial_s3c.h>
 #include <mach/map.h>
-#include <plat/regs-serial.h>
 
        /* note, for the boot process to work we have to keep the UART
         * virtual address aligned to an 1MiB boundary for the L1
diff --git a/arch/arm/mach-s3c64xx/include/mach/tick.h b/arch/arm/mach-s3c64xx/include/mach/tick.h
deleted file mode 100644 (file)
index db9c1b1..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* linux/arch/arm/mach-s3c6400/include/mach/tick.h
- *
- * Copyright 2008 Openmoko, Inc.
- * Copyright 2008 Simtec Electronics
- *     http://armlinux.simtec.co.uk/
- *     Ben Dooks <ben@simtec.co.uk>
- *
- * S3C64XX - Timer tick support definitions
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_TICK_H
-#define __ASM_ARCH_TICK_H __FILE__
-
-#include <linux/irqchip/arm-vic.h>
-
-/* note, the timer interrutps turn up in 2 places, the vic and then
- * the timer block. We take the VIC as the base at the moment.
- */
-static inline u32 s3c24xx_ostimer_pending(void)
-{
-       u32 pend = __raw_readl(VA_VIC0 + VIC_RAW_STATUS);
-       return pend & 1 << (IRQ_TIMER4_VIC - S3C64XX_IRQ_VIC0(0));
-}
-
-#define TICK_MAX       (0xffffffff)
-
-#endif /* __ASM_ARCH_6400_TICK_H */
index 1649c0d..a61247b 100644 (file)
 #include <linux/syscore_ops.h>
 #include <linux/interrupt.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/irq.h>
 #include <linux/io.h>
 #include <linux/of.h>
 
 #include <mach/map.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <plat/cpu.h>
 #include <plat/pm.h>
index ddeb0e5..55eb6a6 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/i2c.h>
@@ -41,7 +42,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <plat/fb.h>
 
index 3df3c37..4b0199f 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/fb.h>
 #include <linux/io.h>
@@ -51,7 +52,6 @@
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
-#include <plat/regs-serial.h>
 #include <plat/fb.h>
 #include <plat/sdhci.h>
 #include <plat/gpio-cfg.h>
index 0431016..72cee08 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/i2c.h>
@@ -33,7 +34,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <mach/gpio-samsung.h>
 #include <plat/fb.h>
index 8d553a4..9cbc076 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/types.h>
 
 #include <asm/mach-types.h>
@@ -38,7 +39,6 @@
 #include <plat/fb.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/mmc-sdhci-s3c.h>
-#include <plat/regs-serial.h>
 #include <plat/sdhci.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
 
index 2067b0b..67f06a9 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/i2c.h>
@@ -36,7 +37,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <plat/fb.h>
 
index 5152026..fbad2af 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/types.h>
 
 #include <asm/mach-types.h>
@@ -38,7 +39,6 @@
 #include <plat/devs.h>
 #include <plat/fb.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
-#include <plat/regs-serial.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
 
 #include <video/platform_lcd.h>
index 6e72bd5..78dd6f7 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/platform_device.h>
 #include <linux/pwm_backlight.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/spi/spi_gpio.h>
 #include <linux/usb/gpio_vbus.h>
 #include <linux/platform_data/s3c-hsotg.h>
@@ -33,7 +34,6 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <plat/gpio-cfg.h>
 #include <linux/platform_data/hwmon-s3c.h>
-#include <plat/regs-serial.h>
 #include <linux/platform_data/usb-ohci-s3c2410.h>
 #include <plat/sdhci.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
index 150f55f..c85d1cb 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/i2c.h>
 #include <linux/io.h>
@@ -29,8 +30,6 @@
 #include <mach/hardware.h>
 #include <mach/map.h>
 
-#include <plat/regs-serial.h>
-
 #include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
index 43261d2..c6a8b2a 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/init.h>
 #include <linux/input.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/i2c.h>
@@ -55,7 +56,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 #include <linux/platform_data/ata-samsung_cf.h>
index 3db0c98..8c42807 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/io.h>
 #include <linux/device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
 
@@ -34,7 +35,6 @@
 #include <asm/irq.h>
 
 #include <plat/cpu-freq.h>
-#include <plat/regs-serial.h>
 #include <mach/regs-clock.h>
 
 #include <plat/cpu.h>
index 72b2278..5be3f09 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/io.h>
 #include <linux/device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
 
@@ -35,7 +36,6 @@
 #include <asm/irq.h>
 
 #include <plat/cpu-freq.h>
-#include <plat/regs-serial.h>
 #include <mach/regs-clock.h>
 
 #include <plat/cpu.h>
index 42e14f2..eb2ad14 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/io.h>
 #include <linux/device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <clocksource/samsung_pwm.h>
 #include <linux/platform_device.h>
 #include <linux/sched.h>
@@ -50,7 +51,6 @@
 #include <plat/gpio-cfg.h>
 #include <plat/pwm-core.h>
 #include <plat/regs-irqtype.h>
-#include <plat/regs-serial.h>
 #include <plat/watchdog-reset.h>
 
 #include "common.h"
index 5e2916f..8759e78 100644 (file)
 
 /* pull in the relevant register and map files. */
 
+#include <linux/serial_s3c.h>
 #include <plat/map-base.h>
 #include <plat/map-s5p.h>
 
-#include <plat/regs-serial.h>
-
        .macro addruart, rp, rv, tmp
                mov     \rp, #0xE0000000
                orr     \rp, \rp, #0x00100000
index 3e6f245..1c83d28 100644 (file)
@@ -14,9 +14,9 @@
 
 #include <linux/syscore_ops.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/io.h>
 
-#include <plat/regs-serial.h>
 #include <plat/pm.h>
 
 #include <mach/regs-gpio.h>
index 9efdcc0..6840e19 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/i2c.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/module.h>
@@ -39,7 +40,6 @@
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 
-#include <plat/regs-serial.h>
 #include <plat/gpio-cfg.h>
 #include <plat/clock.h>
 #include <plat/devs.h>
index c3cacc0..fa1341c 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/i2c.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/module.h>
@@ -39,7 +40,6 @@
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 
-#include <plat/regs-serial.h>
 #include <plat/gpio-cfg.h>
 #include <plat/clock.h>
 #include <plat/devs.h>
index c5a8eea..6a41bf7 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/io.h>
 #include <linux/device.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <clocksource/samsung_pwm.h>
 #include <linux/platform_device.h>
 #include <linux/sched.h>
@@ -49,7 +50,6 @@
 #include <plat/onenand-core.h>
 #include <plat/pwm-core.h>
 #include <plat/spi-core.h>
-#include <plat/regs-serial.h>
 #include <plat/watchdog-reset.h>
 
 #include "common.h"
index 66cb7f1..22c2385 100644 (file)
@@ -13,8 +13,8 @@
 
 /* pull in the relevant register and map files. */
 
+#include <linux/serial_s3c.h>
 #include <mach/map.h>
-#include <plat/regs-serial.h>
 
        /* note, for the boot process to work we have to keep the UART
         * virtual address aligned to an 1MiB boundary for the L1
diff --git a/arch/arm/mach-s5pc100/include/mach/tick.h b/arch/arm/mach-s5pc100/include/mach/tick.h
deleted file mode 100644 (file)
index 0af8e41..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* linux/arch/arm/mach-s5pc100/include/mach/tick.h
- *
- * Copyright 2009 Samsung Electronics Co.
- *     Byungho Min <bhmin@samsung.com>
- *
- * S3C64XX - Timer tick support definitions
- *
- * Based on mach-s3c6400/include/mach/tick.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_TICK_H
-#define __ASM_ARCH_TICK_H __FILE__
-
-#include <linux/irqchip/arm-vic.h>
-
-/* note, the timer interrutps turn up in 2 places, the vic and then
- * the timer block. We take the VIC as the base at the moment.
- */
-static inline u32 s3c24xx_ostimer_pending(void)
-{
-       u32 pend = __raw_readl(VA_VIC0 + VIC_RAW_STATUS);
-       return pend & (1 << (IRQ_TIMER4_VIC - S5P_IRQ_VIC0(0)));
-}
-
-#define TICK_MAX       (0xffffffff)
-
-#endif /* __ASM_ARCH_TICK_H */
index 9e256b9..668af3a 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/gpio.h>
@@ -37,7 +38,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <plat/regs-serial.h>
 #include <plat/gpio-cfg.h>
 
 #include <plat/clock.h>
index 26027a2..7024dcd 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/sched.h>
 #include <linux/dma-mapping.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 
 #include <asm/proc-fns.h>
 #include <asm/mach/arch.h>
@@ -46,7 +47,6 @@
 #include <plat/pwm-core.h>
 #include <plat/tv-core.h>
 #include <plat/spi-core.h>
-#include <plat/regs-serial.h>
 
 #include "common.h"
 
index 80c2199..30b511a 100644 (file)
@@ -12,8 +12,8 @@
 
 /* pull in the relevant register and map files. */
 
+#include <linux/serial_s3c.h>
 #include <mach/map.h>
-#include <plat/regs-serial.h>
 
        /* note, for the boot process to work we have to keep the UART
         * virtual address aligned to an 1MiB boundary for the L1
index ad40ab0..cc37eda 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/fb.h>
 #include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
@@ -32,7 +33,6 @@
 #include <mach/regs-clock.h>
 
 #include <plat/gpio-cfg.h>
-#include <plat/regs-serial.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <plat/fb.h>
index e5cd9fb..b41a38a 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/fb.h>
 #include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
@@ -39,7 +40,6 @@
 #include <mach/regs-clock.h>
 
 #include <plat/gpio-cfg.h>
-#include <plat/regs-serial.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <plat/fb.h>
index 7c0ed07..448e1d2 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/i2c.h>
 #include <linux/device.h>
 
@@ -23,7 +24,6 @@
 #include <mach/map.h>
 #include <mach/regs-clock.h>
 
-#include <plat/regs-serial.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <linux/platform_data/ata-samsung_cf.h>
index f52cc15..2a6655f 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/device.h>
 #include <linux/dm9000.h>
 #include <linux/fb.h>
@@ -32,7 +33,6 @@
 #include <mach/map.h>
 #include <mach/regs-clock.h>
 
-#include <plat/regs-serial.h>
 #include <plat/regs-srom.h>
 #include <plat/gpio-cfg.h>
 #include <plat/devs.h>
index 579afe8..1578055 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -22,7 +23,6 @@
 #include <mach/map.h>
 #include <mach/regs-clock.h>
 
-#include <plat/regs-serial.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <linux/platform_data/i2c-s3c2410.h>
index 47c9fad..ddfebdd 100644 (file)
@@ -52,7 +52,7 @@
 #include <plat/cpu.h>
 
 #include <linux/serial_core.h>
-#include <plat/regs-serial.h> /* for s3c24xx_uart_devs */
+#include <linux/serial_s3c.h> /* for s3c24xx_uart_devs */
 
 /* clock information */
 
index 46b426e..364963a 100644 (file)
@@ -28,13 +28,6 @@ unsigned int samsung_rev(void)
 }
 EXPORT_SYMBOL(samsung_rev);
 
-void __init s3c24xx_init_cpu(void)
-{
-       /* nothing here yet */
-
-       samsung_cpu_rev = 0;
-}
-
 void __init s3c64xx_init_cpu(void)
 {
        samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0x118);
index ac07e87..c64a39a 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/slab.h>
@@ -64,7 +65,6 @@
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/usb-ohci-s3c2410.h>
 #include <plat/usb-phy.h>
-#include <plat/regs-serial.h>
 #include <plat/regs-spi.h>
 #include <linux/platform_data/spi-s3c64xx.h>
 
@@ -744,10 +744,7 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd)
        if (!pd) {
                pd = &default_i2c_data;
 
-               if (soc_is_exynos4210() ||
-                   soc_is_exynos4212() || soc_is_exynos4412())
-                       pd->bus_num = 8;
-               else if (soc_is_s5pv210())
+               if (soc_is_s5pv210())
                        pd->bus_num = 3;
                else
                        pd->bus_num = 0;
@@ -764,10 +761,7 @@ void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info,
 {
        struct s5p_hdmi_platform_data *pd = &s5p_hdmi_def_platdata;
 
-       if (soc_is_exynos4210() ||
-           soc_is_exynos4212() || soc_is_exynos4412())
-               pd->hdmiphy_bus = 8;
-       else if (soc_is_s5pv210())
+       if (soc_is_s5pv210())
                pd->hdmiphy_bus = 3;
        else
                pd->hdmiphy_bus = 0;
index 335beb3..31164b3 100644 (file)
@@ -199,7 +199,6 @@ extern void s5p_init_irq(u32 *vic, u32 num_vic);
 
 extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
 
-extern void s3c24xx_init_cpu(void);
 extern void s3c64xx_init_cpu(void);
 extern void s5p_init_cpu(void __iomem *cpuid_addr);
 
diff --git a/arch/arm/plat-samsung/include/plat/regs-serial.h b/arch/arm/plat-samsung/include/plat/regs-serial.h
deleted file mode 100644 (file)
index f05f2af..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <linux/serial_s3c.h>
diff --git a/arch/arm/plat-samsung/include/plat/rtc-core.h b/arch/arm/plat-samsung/include/plat/rtc-core.h
deleted file mode 100644 (file)
index 7b542f7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* linux/arch/arm/plat-samsung/include/plat/rtc-core.h
- *
- * Copyright (c) 2011 Heiko Stuebner <heiko@sntech.de>
- *
- * Samsung RTC Controller core functions
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_PLAT_RTC_CORE_H
-#define __ASM_PLAT_RTC_CORE_H __FILE__
-
-/* These functions are only for use with the core support code, such as
- * the cpu specific initialisation code
- */
-
-/* re-define device name depending on support. */
-static inline void s3c_rtc_setname(char *name)
-{
-#if defined(CONFIG_S3C_DEV_RTC) || defined(CONFIG_PLAT_S3C24XX)
-       s3c_device_rtc.name = name;
-#endif
-}
-
-#endif /* __ASM_PLAT_RTC_CORE_H */
index f48dc0a..61054fd 100644 (file)
@@ -29,7 +29,7 @@ static void arch_detect_cpu(void);
 
 /* defines for UART registers */
 
-#include <plat/regs-serial.h>
+#include <linux/serial_s3c.h>
 
 /* working in physical space... */
 #define S3C_WDOGREG(x) ((S3C_PA_WDT + (x)))
index aa9511b..0ffc84a 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
 
@@ -33,8 +34,6 @@
 #include <plat/devs.h>
 #include <plat/clock.h>
 
-#include <plat/regs-serial.h>
-
 static struct cpu_table *cpu;
 
 static struct cpu_table * __init s3c_lookup_cpu(unsigned long idcode,
index dd4c15d..da26881 100644 (file)
@@ -196,8 +196,7 @@ struct samsung_gpio_pm samsung_gpio_pm_2bit = {
        .resume = samsung_gpio_pm_2bit_resume,
 };
 
-#if defined(CONFIG_ARCH_S3C64XX) || defined(CONFIG_PLAT_S5P) \
-       || defined(CONFIG_ARCH_EXYNOS)
+#if defined(CONFIG_ARCH_S3C64XX) || defined(CONFIG_PLAT_S5P)
 static void samsung_gpio_pm_4bit_save(struct samsung_gpio_chip *chip)
 {
        chip->pm_save[1] = __raw_readl(chip->base + OFFS_CON);
@@ -307,7 +306,7 @@ struct samsung_gpio_pm samsung_gpio_pm_4bit = {
        .save   = samsung_gpio_pm_4bit_save,
        .resume = samsung_gpio_pm_4bit_resume,
 };
-#endif /* CONFIG_ARCH_S3C64XX || CONFIG_PLAT_S5P || CONFIG_ARCH_EXYNOS */
+#endif /* CONFIG_ARCH_S3C64XX || CONFIG_PLAT_S5P */
 
 /**
  * samsung_pm_save_gpio() - save gpio chip data for suspend
index e5b0f2c..ae9baa2 100644 (file)
 #include <linux/delay.h>
 #include <linux/of.h>
 #include <linux/serial_core.h>
+#include <linux/serial_s3c.h>
 #include <linux/io.h>
 
 #include <asm/cacheflush.h>
 #include <asm/suspend.h>
 
-#include <plat/regs-serial.h>
-
 #ifdef CONFIG_SAMSUNG_ATAGS
 #include <mach/hardware.h>
 #include <mach/map.h>
index 5914980..52b1694 100644 (file)
 #include <mach/map.h>
 
 #include <mach/regs-gpio.h>
-
-#ifndef CONFIG_ARCH_EXYNOS
 #include <mach/regs-irq.h>
-#endif
 
 /* state for IRQs over sleep */
 
@@ -43,18 +40,8 @@ int s3c_irq_wake(struct irq_data *data, unsigned int state)
        unsigned long irqbit;
        unsigned int irq_rtc_tic, irq_rtc_alarm;
 
-#ifdef CONFIG_ARCH_EXYNOS
-       if (soc_is_exynos5250()) {
-               irq_rtc_tic = EXYNOS5_IRQ_RTC_TIC;
-               irq_rtc_alarm = EXYNOS5_IRQ_RTC_ALARM;
-       } else {
-               irq_rtc_tic = EXYNOS4_IRQ_RTC_TIC;
-               irq_rtc_alarm = EXYNOS4_IRQ_RTC_ALARM;
-       }
-#else
        irq_rtc_tic = IRQ_RTC_TIC;
        irq_rtc_alarm = IRQ_RTC_ALARM;
-#endif
 
        if (data->irq == irq_rtc_tic || data->irq == irq_rtc_alarm) {
                irqbit = 1 << (data->irq + 1 - irq_rtc_alarm);
index 010f071..b4f9672 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/clk-provider.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
+#include <linux/syscore_ops.h>
 
 #include "clk.h"
 
@@ -130,6 +131,17 @@ enum exynos4_plls {
        nr_plls                 /* number of PLLs */
 };
 
+static void __iomem *reg_base;
+static enum exynos4_soc exynos4_soc;
+
+/*
+ * Support for CMU save/restore across system suspends
+ */
+#ifdef CONFIG_PM_SLEEP
+static struct samsung_clk_reg_dump *exynos4_save_common;
+static struct samsung_clk_reg_dump *exynos4_save_soc;
+static struct samsung_clk_reg_dump *exynos4_save_pll;
+
 /*
  * list of controller registers to be saved and restored during a
  * suspend/resume cycle.
@@ -154,6 +166,17 @@ static unsigned long exynos4x12_clk_save[] __initdata = {
        E4X12_MPLL_CON0,
 };
 
+static unsigned long exynos4_clk_pll_regs[] __initdata = {
+       EPLL_LOCK,
+       VPLL_LOCK,
+       EPLL_CON0,
+       EPLL_CON1,
+       EPLL_CON2,
+       VPLL_CON0,
+       VPLL_CON1,
+       VPLL_CON2,
+};
+
 static unsigned long exynos4_clk_regs[] __initdata = {
        SRC_LEFTBUS,
        DIV_LEFTBUS,
@@ -161,12 +184,6 @@ static unsigned long exynos4_clk_regs[] __initdata = {
        SRC_RIGHTBUS,
        DIV_RIGHTBUS,
        GATE_IP_RIGHTBUS,
-       EPLL_CON0,
-       EPLL_CON1,
-       EPLL_CON2,
-       VPLL_CON0,
-       VPLL_CON1,
-       VPLL_CON2,
        SRC_TOP0,
        SRC_TOP1,
        SRC_CAM,
@@ -227,6 +244,124 @@ static unsigned long exynos4_clk_regs[] __initdata = {
        GATE_IP_CPU,
 };
 
+static const struct samsung_clk_reg_dump src_mask_suspend[] = {
+       { .offset = SRC_MASK_TOP,               .value = 0x00000001, },
+       { .offset = SRC_MASK_CAM,               .value = 0x11111111, },
+       { .offset = SRC_MASK_TV,                .value = 0x00000111, },
+       { .offset = SRC_MASK_LCD0,              .value = 0x00001111, },
+       { .offset = SRC_MASK_MAUDIO,            .value = 0x00000001, },
+       { .offset = SRC_MASK_FSYS,              .value = 0x01011111, },
+       { .offset = SRC_MASK_PERIL0,            .value = 0x01111111, },
+       { .offset = SRC_MASK_PERIL1,            .value = 0x01110111, },
+       { .offset = SRC_MASK_DMC,               .value = 0x00010000, },
+};
+
+static const struct samsung_clk_reg_dump src_mask_suspend_e4210[] = {
+       { .offset = E4210_SRC_MASK_LCD1,        .value = 0x00001111, },
+};
+
+#define PLL_ENABLED    (1 << 31)
+#define PLL_LOCKED     (1 << 29)
+
+static void exynos4_clk_wait_for_pll(u32 reg)
+{
+       u32 pll_con;
+
+       pll_con = readl(reg_base + reg);
+       if (!(pll_con & PLL_ENABLED))
+               return;
+
+       while (!(pll_con & PLL_LOCKED)) {
+               cpu_relax();
+               pll_con = readl(reg_base + reg);
+       }
+}
+
+static int exynos4_clk_suspend(void)
+{
+       samsung_clk_save(reg_base, exynos4_save_common,
+                               ARRAY_SIZE(exynos4_clk_regs));
+       samsung_clk_save(reg_base, exynos4_save_pll,
+                               ARRAY_SIZE(exynos4_clk_pll_regs));
+
+       if (exynos4_soc == EXYNOS4210) {
+               samsung_clk_save(reg_base, exynos4_save_soc,
+                                       ARRAY_SIZE(exynos4210_clk_save));
+               samsung_clk_restore(reg_base, src_mask_suspend_e4210,
+                                       ARRAY_SIZE(src_mask_suspend_e4210));
+       } else {
+               samsung_clk_save(reg_base, exynos4_save_soc,
+                                       ARRAY_SIZE(exynos4x12_clk_save));
+       }
+
+       samsung_clk_restore(reg_base, src_mask_suspend,
+                                       ARRAY_SIZE(src_mask_suspend));
+
+       return 0;
+}
+
+static void exynos4_clk_resume(void)
+{
+       samsung_clk_restore(reg_base, exynos4_save_pll,
+                               ARRAY_SIZE(exynos4_clk_pll_regs));
+
+       exynos4_clk_wait_for_pll(EPLL_CON0);
+       exynos4_clk_wait_for_pll(VPLL_CON0);
+
+       samsung_clk_restore(reg_base, exynos4_save_common,
+                               ARRAY_SIZE(exynos4_clk_regs));
+
+       if (exynos4_soc == EXYNOS4210)
+               samsung_clk_restore(reg_base, exynos4_save_soc,
+                                       ARRAY_SIZE(exynos4210_clk_save));
+       else
+               samsung_clk_restore(reg_base, exynos4_save_soc,
+                                       ARRAY_SIZE(exynos4x12_clk_save));
+}
+
+static struct syscore_ops exynos4_clk_syscore_ops = {
+       .suspend = exynos4_clk_suspend,
+       .resume = exynos4_clk_resume,
+};
+
+static void exynos4_clk_sleep_init(void)
+{
+       exynos4_save_common = samsung_clk_alloc_reg_dump(exynos4_clk_regs,
+                                       ARRAY_SIZE(exynos4_clk_regs));
+       if (!exynos4_save_common)
+               goto err_warn;
+
+       if (exynos4_soc == EXYNOS4210)
+               exynos4_save_soc = samsung_clk_alloc_reg_dump(
+                                       exynos4210_clk_save,
+                                       ARRAY_SIZE(exynos4210_clk_save));
+       else
+               exynos4_save_soc = samsung_clk_alloc_reg_dump(
+                                       exynos4x12_clk_save,
+                                       ARRAY_SIZE(exynos4x12_clk_save));
+       if (!exynos4_save_soc)
+               goto err_common;
+
+       exynos4_save_pll = samsung_clk_alloc_reg_dump(exynos4_clk_pll_regs,
+                                       ARRAY_SIZE(exynos4_clk_pll_regs));
+       if (!exynos4_save_pll)
+               goto err_soc;
+
+       register_syscore_ops(&exynos4_clk_syscore_ops);
+       return;
+
+err_soc:
+       kfree(exynos4_save_soc);
+err_common:
+       kfree(exynos4_save_common);
+err_warn:
+       pr_warn("%s: failed to allocate sleep save data, no sleep support!\n",
+               __func__);
+}
+#else
+static void exynos4_clk_sleep_init(void) {}
+#endif
+
 /* list of all parent clock list */
 PNAME(mout_apll_p)     = { "fin_pll", "fout_apll", };
 PNAME(mout_mpll_p)     = { "fin_pll", "fout_mpll", };
@@ -908,12 +1043,13 @@ static unsigned long exynos4_get_xom(void)
        return xom;
 }
 
-static void __init exynos4_clk_register_finpll(unsigned long xom)
+static void __init exynos4_clk_register_finpll(void)
 {
        struct samsung_fixed_rate_clock fclk;
        struct clk *clk;
        unsigned long finpll_f = 24000000;
        char *parent_name;
+       unsigned int xom = exynos4_get_xom();
 
        parent_name = xom & 1 ? "xusbxti" : "xxti";
        clk = clk_get(NULL, parent_name);
@@ -1038,27 +1174,21 @@ static struct samsung_pll_clock exynos4x12_plls[nr_plls] __initdata = {
 
 /* register exynos4 clocks */
 static void __init exynos4_clk_init(struct device_node *np,
-                                   enum exynos4_soc exynos4_soc,
-                                   void __iomem *reg_base, unsigned long xom)
+                                   enum exynos4_soc soc)
 {
+       exynos4_soc = soc;
+
        reg_base = of_iomap(np, 0);
        if (!reg_base)
                panic("%s: failed to map registers\n", __func__);
 
-       if (exynos4_soc == EXYNOS4210)
-               samsung_clk_init(np, reg_base, CLK_NR_CLKS,
-                       exynos4_clk_regs, ARRAY_SIZE(exynos4_clk_regs),
-                       exynos4210_clk_save, ARRAY_SIZE(exynos4210_clk_save));
-       else
-               samsung_clk_init(np, reg_base, CLK_NR_CLKS,
-                       exynos4_clk_regs, ARRAY_SIZE(exynos4_clk_regs),
-                       exynos4x12_clk_save, ARRAY_SIZE(exynos4x12_clk_save));
+       samsung_clk_init(np, reg_base, CLK_NR_CLKS);
 
        samsung_clk_of_register_fixed_ext(exynos4_fixed_rate_ext_clks,
                        ARRAY_SIZE(exynos4_fixed_rate_ext_clks),
                        ext_clk_match);
 
-       exynos4_clk_register_finpll(xom);
+       exynos4_clk_register_finpll();
 
        if (exynos4_soc == EXYNOS4210) {
                samsung_clk_register_mux(exynos4210_mux_early,
@@ -1125,6 +1255,8 @@ static void __init exynos4_clk_init(struct device_node *np,
        samsung_clk_register_alias(exynos4_aliases,
                        ARRAY_SIZE(exynos4_aliases));
 
+       exynos4_clk_sleep_init();
+
        pr_info("%s clocks: sclk_apll = %ld, sclk_mpll = %ld\n"
                "\tsclk_epll = %ld, sclk_vpll = %ld, arm_clk = %ld\n",
                exynos4_soc == EXYNOS4210 ? "Exynos4210" : "Exynos4x12",
@@ -1136,12 +1268,12 @@ static void __init exynos4_clk_init(struct device_node *np,
 
 static void __init exynos4210_clk_init(struct device_node *np)
 {
-       exynos4_clk_init(np, EXYNOS4210, NULL, exynos4_get_xom());
+       exynos4_clk_init(np, EXYNOS4210);
 }
 CLK_OF_DECLARE(exynos4210_clk, "samsung,exynos4210-clock", exynos4210_clk_init);
 
 static void __init exynos4412_clk_init(struct device_node *np)
 {
-       exynos4_clk_init(np, EXYNOS4X12, NULL, exynos4_get_xom());
+       exynos4_clk_init(np, EXYNOS4X12);
 }
 CLK_OF_DECLARE(exynos4412_clk, "samsung,exynos4412-clock", exynos4412_clk_init);
index ff4beeb..e7ee442 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/clk-provider.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
+#include <linux/syscore_ops.h>
 
 #include "clk.h"
 
@@ -85,6 +86,11 @@ enum exynos5250_plls {
        nr_plls                 /* number of PLLs */
 };
 
+static void __iomem *reg_base;
+
+#ifdef CONFIG_PM_SLEEP
+static struct samsung_clk_reg_dump *exynos5250_save;
+
 /*
  * list of controller registers to be saved and restored during a
  * suspend/resume cycle.
@@ -137,6 +143,41 @@ static unsigned long exynos5250_clk_regs[] __initdata = {
        GATE_IP_ACP,
 };
 
+static int exynos5250_clk_suspend(void)
+{
+       samsung_clk_save(reg_base, exynos5250_save,
+                               ARRAY_SIZE(exynos5250_clk_regs));
+
+       return 0;
+}
+
+static void exynos5250_clk_resume(void)
+{
+       samsung_clk_restore(reg_base, exynos5250_save,
+                               ARRAY_SIZE(exynos5250_clk_regs));
+}
+
+static struct syscore_ops exynos5250_clk_syscore_ops = {
+       .suspend = exynos5250_clk_suspend,
+       .resume = exynos5250_clk_resume,
+};
+
+static void exynos5250_clk_sleep_init(void)
+{
+       exynos5250_save = samsung_clk_alloc_reg_dump(exynos5250_clk_regs,
+                                       ARRAY_SIZE(exynos5250_clk_regs));
+       if (!exynos5250_save) {
+               pr_warn("%s: failed to allocate sleep save data, no sleep support!\n",
+                       __func__);
+               return;
+       }
+
+       register_syscore_ops(&exynos5250_clk_syscore_ops);
+}
+#else
+static void exynos5250_clk_sleep_init(void) {}
+#endif
+
 /* list of all parent clock list */
 PNAME(mout_apll_p)     = { "fin_pll", "fout_apll", };
 PNAME(mout_cpu_p)      = { "mout_apll", "mout_mpll", };
@@ -645,8 +686,6 @@ static struct of_device_id ext_clk_match[] __initdata = {
 /* register exynox5250 clocks */
 static void __init exynos5250_clk_init(struct device_node *np)
 {
-       void __iomem *reg_base;
-
        if (np) {
                reg_base = of_iomap(np, 0);
                if (!reg_base)
@@ -655,9 +694,7 @@ static void __init exynos5250_clk_init(struct device_node *np)
                panic("%s: unable to determine soc\n", __func__);
        }
 
-       samsung_clk_init(np, reg_base, CLK_NR_CLKS,
-                       exynos5250_clk_regs, ARRAY_SIZE(exynos5250_clk_regs),
-                       NULL, 0);
+       samsung_clk_init(np, reg_base, CLK_NR_CLKS);
        samsung_clk_of_register_fixed_ext(exynos5250_fixed_rate_ext_clks,
                        ARRAY_SIZE(exynos5250_fixed_rate_ext_clks),
                        ext_clk_match);
@@ -685,6 +722,8 @@ static void __init exynos5250_clk_init(struct device_node *np)
        samsung_clk_register_gate(exynos5250_gate_clks,
                        ARRAY_SIZE(exynos5250_gate_clks));
 
+       exynos5250_clk_sleep_init();
+
        pr_info("Exynos5250: clock setup completed, armclk=%ld\n",
                        _get_rate("div_arm2"));
 }
index ab4f2f7..60b2681 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/clk-provider.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
+#include <linux/syscore_ops.h>
 
 #include "clk.h"
 
@@ -108,6 +109,11 @@ enum exynos5420_plls {
        nr_plls                 /* number of PLLs */
 };
 
+static void __iomem *reg_base;
+
+#ifdef CONFIG_PM_SLEEP
+static struct samsung_clk_reg_dump *exynos5420_save;
+
 /*
  * list of controller registers to be saved and restored during a
  * suspend/resume cycle.
@@ -174,6 +180,41 @@ static unsigned long exynos5420_clk_regs[] __initdata = {
        DIV_KFC0,
 };
 
+static int exynos5420_clk_suspend(void)
+{
+       samsung_clk_save(reg_base, exynos5420_save,
+                               ARRAY_SIZE(exynos5420_clk_regs));
+
+       return 0;
+}
+
+static void exynos5420_clk_resume(void)
+{
+       samsung_clk_restore(reg_base, exynos5420_save,
+                               ARRAY_SIZE(exynos5420_clk_regs));
+}
+
+static struct syscore_ops exynos5420_clk_syscore_ops = {
+       .suspend = exynos5420_clk_suspend,
+       .resume = exynos5420_clk_resume,
+};
+
+static void exynos5420_clk_sleep_init(void)
+{
+       exynos5420_save = samsung_clk_alloc_reg_dump(exynos5420_clk_regs,
+                                       ARRAY_SIZE(exynos5420_clk_regs));
+       if (!exynos5420_save) {
+               pr_warn("%s: failed to allocate sleep save data, no sleep support!\n",
+                       __func__);
+               return;
+       }
+
+       register_syscore_ops(&exynos5420_clk_syscore_ops);
+}
+#else
+static void exynos5420_clk_sleep_init(void) {}
+#endif
+
 /* list of all parent clocks */
 PNAME(mspll_cpu_p)     = { "sclk_cpll", "sclk_dpll",
                                "sclk_mpll", "sclk_spll" };
@@ -737,8 +778,6 @@ static struct of_device_id ext_clk_match[] __initdata = {
 /* register exynos5420 clocks */
 static void __init exynos5420_clk_init(struct device_node *np)
 {
-       void __iomem *reg_base;
-
        if (np) {
                reg_base = of_iomap(np, 0);
                if (!reg_base)
@@ -747,9 +786,7 @@ static void __init exynos5420_clk_init(struct device_node *np)
                panic("%s: unable to determine soc\n", __func__);
        }
 
-       samsung_clk_init(np, reg_base, CLK_NR_CLKS,
-                       exynos5420_clk_regs, ARRAY_SIZE(exynos5420_clk_regs),
-                       NULL, 0);
+       samsung_clk_init(np, reg_base, CLK_NR_CLKS);
        samsung_clk_of_register_fixed_ext(exynos5420_fixed_rate_ext_clks,
                        ARRAY_SIZE(exynos5420_fixed_rate_ext_clks),
                        ext_clk_match);
@@ -765,5 +802,7 @@ static void __init exynos5420_clk_init(struct device_node *np)
                        ARRAY_SIZE(exynos5420_div_clks));
        samsung_clk_register_gate(exynos5420_gate_clks,
                        ARRAY_SIZE(exynos5420_gate_clks));
+
+       exynos5420_clk_sleep_init();
 }
 CLK_OF_DECLARE(exynos5420_clk, "samsung,exynos5420-clock", exynos5420_clk_init);
index cbc15b5..2bfad5a 100644 (file)
@@ -101,7 +101,7 @@ static void __init exynos5440_clk_init(struct device_node *np)
                return;
        }
 
-       samsung_clk_init(np, reg_base, CLK_NR_CLKS, NULL, 0, NULL, 0);
+       samsung_clk_init(np, reg_base, CLK_NR_CLKS);
        samsung_clk_of_register_fixed_ext(exynos5440_fixed_rate_ext_clks,
                ARRAY_SIZE(exynos5440_fixed_rate_ext_clks), ext_clk_match);
 
index 8e27aee..8bda658 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/clk-provider.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
+#include <linux/syscore_ops.h>
 
 #include <dt-bindings/clock/samsung,s3c64xx-clock.h>
 
@@ -61,6 +62,13 @@ enum s3c64xx_plls {
        apll, mpll, epll,
 };
 
+static void __iomem *reg_base;
+static bool is_s3c6400;
+
+#ifdef CONFIG_PM_SLEEP
+static struct samsung_clk_reg_dump *s3c64xx_save_common;
+static struct samsung_clk_reg_dump *s3c64xx_save_soc;
+
 /*
  * List of controller registers to be saved and restored during
  * a suspend/resume cycle.
@@ -87,6 +95,60 @@ static unsigned long s3c6410_clk_regs[] __initdata = {
        MEM0_GATE,
 };
 
+static int s3c64xx_clk_suspend(void)
+{
+       samsung_clk_save(reg_base, s3c64xx_save_common,
+                               ARRAY_SIZE(s3c64xx_clk_regs));
+
+       if (!is_s3c6400)
+               samsung_clk_save(reg_base, s3c64xx_save_soc,
+                                       ARRAY_SIZE(s3c6410_clk_regs));
+
+       return 0;
+}
+
+static void s3c64xx_clk_resume(void)
+{
+       samsung_clk_restore(reg_base, s3c64xx_save_common,
+                               ARRAY_SIZE(s3c64xx_clk_regs));
+
+       if (!is_s3c6400)
+               samsung_clk_restore(reg_base, s3c64xx_save_soc,
+                                       ARRAY_SIZE(s3c6410_clk_regs));
+}
+
+static struct syscore_ops s3c64xx_clk_syscore_ops = {
+       .suspend = s3c64xx_clk_suspend,
+       .resume = s3c64xx_clk_resume,
+};
+
+static void s3c64xx_clk_sleep_init(void)
+{
+       s3c64xx_save_common = samsung_clk_alloc_reg_dump(s3c64xx_clk_regs,
+                                               ARRAY_SIZE(s3c64xx_clk_regs));
+       if (!s3c64xx_save_common)
+               goto err_warn;
+
+       if (!is_s3c6400) {
+               s3c64xx_save_soc = samsung_clk_alloc_reg_dump(s3c6410_clk_regs,
+                                               ARRAY_SIZE(s3c6410_clk_regs));
+               if (!s3c64xx_save_soc)
+                       goto err_soc;
+       }
+
+       register_syscore_ops(&s3c64xx_clk_syscore_ops);
+       return;
+
+err_soc:
+       kfree(s3c64xx_save_common);
+err_warn:
+       pr_warn("%s: failed to allocate sleep save data, no sleep support!\n",
+               __func__);
+}
+#else
+static void s3c64xx_clk_sleep_init(void) {}
+#endif
+
 /* List of parent clocks common for all S3C64xx SoCs. */
 PNAME(spi_mmc_p)       = { "mout_epll", "dout_mpll", "fin_pll", "clk27m" };
 PNAME(uart_p)          = { "mout_epll", "dout_mpll" };
@@ -391,11 +453,11 @@ static void __init s3c64xx_clk_register_fixed_ext(unsigned long fin_pll_f,
 
 /* Register s3c64xx clocks. */
 void __init s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f,
-                            unsigned long xusbxti_f, bool is_s3c6400,
-                            void __iomem *reg_base)
+                            unsigned long xusbxti_f, bool s3c6400,
+                            void __iomem *base)
 {
-       unsigned long *soc_regs = NULL;
-       unsigned long nr_soc_regs = 0;
+       reg_base = base;
+       is_s3c6400 = s3c6400;
 
        if (np) {
                reg_base = of_iomap(np, 0);
@@ -403,13 +465,7 @@ void __init s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f,
                        panic("%s: failed to map registers\n", __func__);
        }
 
-       if (!is_s3c6400) {
-               soc_regs = s3c6410_clk_regs;
-               nr_soc_regs = ARRAY_SIZE(s3c6410_clk_regs);
-       }
-
-       samsung_clk_init(np, reg_base, NR_CLKS, s3c64xx_clk_regs,
-                       ARRAY_SIZE(s3c64xx_clk_regs), soc_regs, nr_soc_regs);
+       samsung_clk_init(np, reg_base, NR_CLKS);
 
        /* Register external clocks. */
        if (!np)
@@ -452,6 +508,7 @@ void __init s3c64xx_clk_init(struct device_node *np, unsigned long xtal_f,
 
        samsung_clk_register_alias(s3c64xx_clock_aliases,
                                        ARRAY_SIZE(s3c64xx_clock_aliases));
+       s3c64xx_clk_sleep_init();
 
        pr_info("%s clocks: apll = %lu, mpll = %lu\n"
                "\tepll = %lu, arm_clk = %lu\n",
index f503f32..91bec3e 100644 (file)
@@ -21,64 +21,45 @@ static void __iomem *reg_base;
 static struct clk_onecell_data clk_data;
 #endif
 
-#ifdef CONFIG_PM_SLEEP
-static struct samsung_clk_reg_dump *reg_dump;
-static unsigned long nr_reg_dump;
-
-static int samsung_clk_suspend(void)
+void samsung_clk_save(void __iomem *base,
+                                   struct samsung_clk_reg_dump *rd,
+                                   unsigned int num_regs)
 {
-       struct samsung_clk_reg_dump *rd = reg_dump;
-       unsigned long i;
-
-       for (i = 0; i < nr_reg_dump; i++, rd++)
-               rd->value = __raw_readl(reg_base + rd->offset);
+       for (; num_regs > 0; --num_regs, ++rd)
+               rd->value = readl(base + rd->offset);
+}
 
-       return 0;
+void samsung_clk_restore(void __iomem *base,
+                                     const struct samsung_clk_reg_dump *rd,
+                                     unsigned int num_regs)
+{
+       for (; num_regs > 0; --num_regs, ++rd)
+               writel(rd->value, base + rd->offset);
 }
 
-static void samsung_clk_resume(void)
+struct samsung_clk_reg_dump *samsung_clk_alloc_reg_dump(
+                                               const unsigned long *rdump,
+                                               unsigned long nr_rdump)
 {
-       struct samsung_clk_reg_dump *rd = reg_dump;
-       unsigned long i;
+       struct samsung_clk_reg_dump *rd;
+       unsigned int i;
 
-       for (i = 0; i < nr_reg_dump; i++, rd++)
-               __raw_writel(rd->value, reg_base + rd->offset);
-}
+       rd = kcalloc(nr_rdump, sizeof(*rd), GFP_KERNEL);
+       if (!rd)
+               return NULL;
+
+       for (i = 0; i < nr_rdump; ++i)
+               rd[i].offset = rdump[i];
 
-static struct syscore_ops samsung_clk_syscore_ops = {
-       .suspend        = samsung_clk_suspend,
-       .resume         = samsung_clk_resume,
-};
-#endif /* CONFIG_PM_SLEEP */
+       return rd;
+}
 
 /* setup the essentials required to support clock lookup using ccf */
 void __init samsung_clk_init(struct device_node *np, void __iomem *base,
-               unsigned long nr_clks, unsigned long *rdump,
-               unsigned long nr_rdump, unsigned long *soc_rdump,
-               unsigned long nr_soc_rdump)
+                            unsigned long nr_clks)
 {
        reg_base = base;
 
-#ifdef CONFIG_PM_SLEEP
-       if (rdump && nr_rdump) {
-               unsigned int idx;
-               reg_dump = kzalloc(sizeof(struct samsung_clk_reg_dump)
-                               * (nr_rdump + nr_soc_rdump), GFP_KERNEL);
-               if (!reg_dump) {
-                       pr_err("%s: memory alloc for register dump failed\n",
-                                       __func__);
-                       return;
-               }
-
-               for (idx = 0; idx < nr_rdump; idx++)
-                       reg_dump[idx].offset = rdump[idx];
-               for (idx = 0; idx < nr_soc_rdump; idx++)
-                       reg_dump[nr_rdump + idx].offset = soc_rdump[idx];
-               nr_reg_dump = nr_rdump + nr_soc_rdump;
-               register_syscore_ops(&samsung_clk_syscore_ops);
-       }
-#endif
-
        clk_table = kzalloc(sizeof(struct clk *) * nr_clks, GFP_KERNEL);
        if (!clk_table)
                panic("could not allocate clock lookup table\n");
index 31b4174..c7141ba 100644 (file)
@@ -313,9 +313,7 @@ struct samsung_pll_clock {
                _lock, _con, _rtable, _alias)
 
 extern void __init samsung_clk_init(struct device_node *np, void __iomem *base,
-               unsigned long nr_clks, unsigned long *rdump,
-               unsigned long nr_rdump, unsigned long *soc_rdump,
-               unsigned long nr_soc_rdump);
+                                   unsigned long nr_clks);
 extern void __init samsung_clk_of_register_fixed_ext(
                struct samsung_fixed_rate_clock *fixed_rate_clk,
                unsigned int nr_fixed_rate_clk,
@@ -340,4 +338,14 @@ extern void __init samsung_clk_register_pll(struct samsung_pll_clock *pll_list,
 
 extern unsigned long _get_rate(const char *clk_name);
 
+extern void samsung_clk_save(void __iomem *base,
+                            struct samsung_clk_reg_dump *rd,
+                            unsigned int num_regs);
+extern void samsung_clk_restore(void __iomem *base,
+                               const struct samsung_clk_reg_dump *rd,
+                               unsigned int num_regs);
+extern struct samsung_clk_reg_dump *samsung_clk_alloc_reg_dump(
+                                               const unsigned long *rdump,
+                                               unsigned long nr_rdump);
+
 #endif /* __SAMSUNG_CLK_H */