Skip to contentSkip to conversation

ARM: SAMSUNG: S5PV210 platform clean-up

PATCH In review Tomasz Figa 7 participants 67 messages Jul 4, 2014 – Sep 24, 2014

Subsystems (16)
lore
Share & tools
lore
#0 lore raw

cover ARM: SAMSUNG: S5PV210 platform clean-up

This huge series is a (hopefully final) attempt to convert Samsung S5PV210 into a DT-only and multiplatform-aware platform. It consists of several steps to gradually replace legacy code with one meeting current standards and then finally remove unused remnants.

Patches 1-6 migrate the platform to fully use the Common Clock Framework and get rid of legacy private clock code, of which s5pv210 was the last user. Then patch 7 adds generic PHY driver for USB PHY on S5PV210 to allow USB to be supported when using DT. Further three patches (8-10) add DT support for mach-s5pv210 and necessary DT sources for currently supported boards. Patch 11 removes board files and code directly related to them, effectively making s5pv210 a DT-only platform. In next step, patches 12-15 prepare remaining code for multiplatform enablement, which is finally done in patch 16. Patches 17-19 are a final clean-up, which remove a lot of unused code left after making the last S5P platform DT-only.

Build tested patch by patch on following configs:
- s3c2410_defconfig (with DT support enabled),
- s3c6400_defconfig (with DT support enabled),
- s5pv210_defconfig (with DT support enabled after patches adding it),
- exynos_defconfig,
- exynos_defconfig with S5PV210 enabled in multiplatform configuration.

Boot tested on s5pv210-goni board.

Note that support for smdkc110, smdkv210 and torbreck boards is provided by moving data from existing board files to new device tree sources. No testing was performed due to mentioned board not being available anymore. However I believe we agreed on this approach, because apparently there are no active users of them. See the RFC from August 2013 asking for removal of the whole platform [1].

[1] http://www.mail-archive.com/linux-samsung-soc%40vger.kernel.org/msg21882.html

Mateusz Krawczuk (6):
clk: samsung: Add clock driver for S5PV210 and compatible SoCs
ARM: s5pv210: Migrate clock handling to Common Clock Framework
phy: Add support for S5PV210 to the Exynos USB 2.0 PHY driver
ARM: s5pv210: Add board file for boot using Device Tree
ARM: Samsung: DT: Add Device tree for s5pv210
ARM: Samsung: DT: Add Device tree for S5PC110/S5PV210 Boards

Tomasz Figa (13):
cpufreq: s3c24xx: Remove some dead code
serial: samsung: Remove support for legacy clock code
ARM: SAMSUNG: Remove legacy clock code
clk: samsung: Add S5PV210 Audio Subsystem clock driver
ARM: S5PV210: Remove support for board files
ARM: S5PV210: Untie PM support from legacy code
ARM: s5pv210: move debug-macro.S into the common space
ARM: s5pv210: Register cpufreq platform device
cpufreq: s5pv210: Make the driver multiplatform aware
ARM: s5pv210: Enable multi-platform build support
gpio: samsung: Remove legacy support of S5PV210
ARM: SAMSUNG: Remove remaining legacy code
clk: samsung: s5pv210: Remove legacy board support

 .../bindings/clock/clk-s5pv210-audss.txt           |   53 +
 .../bindings/clock/samsung,s5pv210-clock.txt       |   78 ++
 .../devicetree/bindings/phy/samsung-phy.txt        |    1 +
 arch/arm/Kconfig                                   |   22 +-
 arch/arm/Kconfig.debug                             |   12 +-
 arch/arm/Makefile                                  |    4 +-
 arch/arm/boot/dts/Makefile                         |    5 +
 arch/arm/boot/dts/s5pv210-aquila.dts               |  392 ++++++
 arch/arm/boot/dts/s5pv210-goni.dts                 |  449 +++++++
 arch/arm/boot/dts/s5pv210-pinctrl.dtsi             |  839 ++++++++++++
 arch/arm/boot/dts/s5pv210-smdkc110.dts             |   78 ++
 arch/arm/boot/dts/s5pv210-smdkv210.dts             |  238 ++++
 arch/arm/boot/dts/s5pv210-torbreck.dts             |   92 ++
 arch/arm/boot/dts/s5pv210.dtsi                     |  633 +++++++++
 arch/arm/include/debug/s5pv210.S                   |   34 +
 arch/arm/mach-exynos/pm.c                          |    1 -
 arch/arm/mach-s3c24xx/common.c                     |    2 -
 arch/arm/mach-s3c24xx/iotiming-s3c2412.c           |    1 -
 arch/arm/mach-s3c24xx/mach-h1940.c                 |    5 +-
 arch/arm/mach-s3c24xx/mach-jive.c                  |    1 -
 arch/arm/mach-s3c24xx/mach-smdk2413.c              |    1 -
 arch/arm/mach-s3c24xx/mach-smdk2416.c              |    1 -
 arch/arm/mach-s3c24xx/mach-smdk2443.c              |    1 -
 arch/arm/mach-s3c24xx/mach-vstms.c                 |    1 -
 arch/arm/mach-s3c24xx/s3c2410.c                    |    6 -
 arch/arm/mach-s3c24xx/s3c2412.c                    |    6 -
 arch/arm/mach-s3c24xx/s3c2442.c                    |    1 -
 arch/arm/mach-s3c24xx/s3c244x.c                    |    6 -
 arch/arm/mach-s3c64xx/mach-anw6410.c               |    1 -
 arch/arm/mach-s3c64xx/mach-crag6410.c              |    1 -
 arch/arm/mach-s3c64xx/mach-hmt.c                   |    1 -
 arch/arm/mach-s3c64xx/mach-ncp.c                   |    1 -
 arch/arm/mach-s3c64xx/mach-smartq.c                |    1 -
 arch/arm/mach-s3c64xx/mach-smdk6400.c              |    1 -
 arch/arm/mach-s3c64xx/mach-smdk6410.c              |    1 -
 arch/arm/mach-s3c64xx/s3c6400.c                    |    1 -
 arch/arm/mach-s3c64xx/s3c6410.c                    |    1 -
 arch/arm/mach-s5pv210/Kconfig                      |  197 +--
 arch/arm/mach-s5pv210/Makefile                     |   29 +-
 arch/arm/mach-s5pv210/Makefile.boot                |    2 -
 arch/arm/mach-s5pv210/clock.c                      | 1365 --------------------
 arch/arm/mach-s5pv210/common.c                     |  279 ----
 arch/arm/mach-s5pv210/common.h                     |   21 +-
 arch/arm/mach-s5pv210/dev-audio.c                  |  246 ----
 arch/arm/mach-s5pv210/dma.c                        |  130 --
 arch/arm/mach-s5pv210/include/mach/debug-macro.S   |   41 -
 arch/arm/mach-s5pv210/include/mach/dma.h           |   26 -
 arch/arm/mach-s5pv210/include/mach/gpio.h          |  140 --
 arch/arm/mach-s5pv210/include/mach/hardware.h      |   18 -
 arch/arm/mach-s5pv210/include/mach/irqs.h          |  137 --
 arch/arm/mach-s5pv210/include/mach/map.h           |  158 ---
 arch/arm/mach-s5pv210/include/mach/memory.h        |   27 -
 arch/arm/mach-s5pv210/include/mach/pm-core.h       |   46 -
 arch/arm/mach-s5pv210/include/mach/regs-clock.h    |    2 +-
 arch/arm/mach-s5pv210/include/mach/regs-gpio.h     |   41 -
 arch/arm/mach-s5pv210/include/mach/regs-irq.h      |   18 -
 arch/arm/mach-s5pv210/mach-aquila.c                |  687 ----------
 arch/arm/mach-s5pv210/mach-goni.c                  |  916 -------------
 arch/arm/mach-s5pv210/mach-smdkc110.c              |  159 ---
 arch/arm/mach-s5pv210/mach-smdkv210.c              |  337 -----
 arch/arm/mach-s5pv210/mach-torbreck.c              |  135 --
 arch/arm/mach-s5pv210/pm.c                         |  147 ++-
 arch/arm/mach-s5pv210/s5pv210.c                    |   77 ++
 arch/arm/mach-s5pv210/setup-fb-24bpp.c             |   49 -
 arch/arm/mach-s5pv210/setup-fimc.c                 |   43 -
 arch/arm/mach-s5pv210/setup-i2c0.c                 |   28 -
 arch/arm/mach-s5pv210/setup-i2c1.c                 |   28 -
 arch/arm/mach-s5pv210/setup-i2c2.c                 |   28 -
 arch/arm/mach-s5pv210/setup-ide.c                  |   39 -
 arch/arm/mach-s5pv210/setup-keypad.c               |   24 -
 arch/arm/mach-s5pv210/setup-sdhci-gpio.c           |  103 --
 arch/arm/mach-s5pv210/setup-spi.c                  |   34 -
 arch/arm/mach-s5pv210/setup-usb-phy.c              |   95 --
 arch/arm/mach-s5pv210/sleep.S                      |   36 +
 arch/arm/plat-samsung/Kconfig                      |  143 +-
 arch/arm/plat-samsung/Makefile                     |   15 -
 arch/arm/plat-samsung/clock-clksrc.c               |  212 ---
 arch/arm/plat-samsung/clock.c                      |  539 --------
 arch/arm/plat-samsung/cpu.c                        |    3 +-
 arch/arm/plat-samsung/devs.c                       |  330 -----
 arch/arm/plat-samsung/include/plat/camport.h       |   28 -
 arch/arm/plat-samsung/include/plat/clock-clksrc.h  |   83 --
 arch/arm/plat-samsung/include/plat/clock.h         |  152 ---
 arch/arm/plat-samsung/include/plat/cpu-freq-core.h |    3 -
 arch/arm/plat-samsung/include/plat/cpu.h           |   13 -
 arch/arm/plat-samsung/include/plat/devs.h          |   42 -
 arch/arm/plat-samsung/include/plat/fb-core.h       |   15 -
 arch/arm/plat-samsung/include/plat/fb.h            |   22 -
 arch/arm/plat-samsung/include/plat/fimc-core.h     |   51 -
 arch/arm/plat-samsung/include/plat/gpio-cfg.h      |   64 -
 arch/arm/plat-samsung/include/plat/hdmi.h          |   16 -
 arch/arm/plat-samsung/include/plat/irqs.h          |   72 --
 arch/arm/plat-samsung/include/plat/mfc.h           |   35 -
 arch/arm/plat-samsung/include/plat/pll.h           |  323 -----
 arch/arm/plat-samsung/include/plat/s5p-clock.h     |   65 -
 arch/arm/plat-samsung/include/plat/sdhci.h         |   47 -
 arch/arm/plat-samsung/include/plat/tv-core.h       |   44 -
 arch/arm/plat-samsung/init.c                       |    1 -
 arch/arm/plat-samsung/pm-gpio.c                    |    4 +-
 arch/arm/plat-samsung/s5p-clock.c                  |  294 -----
 arch/arm/plat-samsung/s5p-dev-mfc.c                |   81 +-
 arch/arm/plat-samsung/s5p-dev-uart.c               |   88 --
 arch/arm/plat-samsung/s5p-irq-eint.c               |  221 ----
 arch/arm/plat-samsung/s5p-irq-gpioint.c            |  218 ----
 arch/arm/plat-samsung/s5p-irq-pm.c                 |   92 --
 arch/arm/plat-samsung/s5p-irq.c                    |   31 -
 arch/arm/plat-samsung/s5p-pm.c                     |   40 -
 arch/arm/plat-samsung/s5p-sleep.S                  |   45 -
 drivers/clk/samsung/Makefile                       |    1 +
 drivers/clk/samsung/clk-s5pv210-audss.c            |  241 ++++
 drivers/clk/samsung/clk-s5pv210.c                  |  856 ++++++++++++
 drivers/cpufreq/s3c2410-cpufreq.c                  |    2 -
 drivers/cpufreq/s3c2412-cpufreq.c                  |    3 -
 drivers/cpufreq/s3c2440-cpufreq.c                  |    3 -
 drivers/cpufreq/s3c24xx-cpufreq.c                  |    1 -
 drivers/cpufreq/s5pv210-cpufreq.c                  |  131 +-
 drivers/gpio/gpio-samsung.c                        |  240 ----
 drivers/phy/Kconfig                                |   10 +
 drivers/phy/Makefile                               |    1 +
 drivers/phy/phy-s5pv210-usb2.c                     |  187 +++
 drivers/phy/phy-samsung-usb2.c                     |    6 +
 drivers/phy/phy-samsung-usb2.h                     |    1 +
 drivers/tty/serial/samsung.c                       |    4 -
 include/dt-bindings/clock/s5pv210-audss.h          |   34 +
 include/dt-bindings/clock/s5pv210.h                |  239 ++++
 125 files changed, 4843 insertions(+), 9409 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/clk-s5pv210-audss.txt
 create mode 100644 Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.txt
 create mode 100644 arch/arm/boot/dts/s5pv210-aquila.dts
 create mode 100644 arch/arm/boot/dts/s5pv210-goni.dts
 create mode 100644 arch/arm/boot/dts/s5pv210-pinctrl.dtsi
 create mode 100644 arch/arm/boot/dts/s5pv210-smdkc110.dts
 create mode 100644 arch/arm/boot/dts/s5pv210-smdkv210.dts
 create mode 100644 arch/arm/boot/dts/s5pv210-torbreck.dts
 create mode 100644 arch/arm/boot/dts/s5pv210.dtsi
 create mode 100644 arch/arm/include/debug/s5pv210.S
 delete mode 100644 arch/arm/mach-s5pv210/Makefile.boot
 delete mode 100644 arch/arm/mach-s5pv210/clock.c
 delete mode 100644 arch/arm/mach-s5pv210/common.c
 delete mode 100644 arch/arm/mach-s5pv210/dev-audio.c
 delete mode 100644 arch/arm/mach-s5pv210/dma.c
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/dma.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/gpio.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/map.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/memory.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/pm-core.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/regs-gpio.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/regs-irq.h
 delete mode 100644 arch/arm/mach-s5pv210/mach-aquila.c
 delete mode 100644 arch/arm/mach-s5pv210/mach-goni.c
 delete mode 100644 arch/arm/mach-s5pv210/mach-smdkc110.c
 delete mode 100644 arch/arm/mach-s5pv210/mach-smdkv210.c
 delete mode 100644 arch/arm/mach-s5pv210/mach-torbreck.c
 create mode 100644 arch/arm/mach-s5pv210/s5pv210.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-fb-24bpp.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-fimc.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-i2c0.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-i2c1.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-i2c2.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-ide.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-keypad.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-sdhci-gpio.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-spi.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-usb-phy.c
 create mode 100644 arch/arm/mach-s5pv210/sleep.S
 delete mode 100644 arch/arm/plat-samsung/clock-clksrc.c
 delete mode 100644 arch/arm/plat-samsung/clock.c
 delete mode 100644 arch/arm/plat-samsung/include/plat/camport.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/clock-clksrc.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/clock.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/fimc-core.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/hdmi.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/irqs.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/mfc.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/pll.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/s5p-clock.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/tv-core.h
 delete mode 100644 arch/arm/plat-samsung/s5p-clock.c
 delete mode 100644 arch/arm/plat-samsung/s5p-dev-uart.c
 delete mode 100644 arch/arm/plat-samsung/s5p-irq-eint.c
 delete mode 100644 arch/arm/plat-samsung/s5p-irq-gpioint.c
 delete mode 100644 arch/arm/plat-samsung/s5p-irq-pm.c
 delete mode 100644 arch/arm/plat-samsung/s5p-irq.c
 delete mode 100644 arch/arm/plat-samsung/s5p-pm.c
 delete mode 100644 arch/arm/plat-samsung/s5p-sleep.S
 create mode 100644 drivers/clk/samsung/clk-s5pv210-audss.c
 create mode 100644 drivers/clk/samsung/clk-s5pv210.c
 create mode 100644 drivers/phy/phy-s5pv210-usb2.c
 create mode 100644 include/dt-bindings/clock/s5pv210-audss.h
 create mode 100644 include/dt-bindings/clock/s5pv210.h
Signature · 1 line
1.9.3
#1 lore raw

PATCH 1/19 clk: samsung: Add clock driver for S5PV210 and compatible SoCs

From: Mateusz Krawczuk <[email protected]>

This patch adds new, Common Clock Framework-based clock driver for Samsung S5PV210 and compatible SoCs. The driver is just added, without enabling it yet.

[t.figa: Added support for other SoC variants and clock output. Fixed remaining minor issues.]

Cc Mike Turquette <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Rob Herring <[email protected]>
Cc devicetree at vger.kernel.org
---
 .../bindings/clock/samsung,s5pv210-clock.txt       |  78 ++
 drivers/clk/samsung/Makefile                       |   1 +
 drivers/clk/samsung/clk-s5pv210.c                  | 976 +++++++++++++++++++++
 include/dt-bindings/clock/s5pv210.h                | 239 +++++
 4 files changed, 1294 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.txt
 create mode 100644 drivers/clk/samsung/clk-s5pv210.c
 create mode 100644 include/dt-bindings/clock/s5pv210.h
Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.txt new file +78 -0
new file mode 100644
index 0000000..effd940
@@ -0,0 +1,78 @@
+* Samsung S5P6442/S5PC110/S5PV210 Clock Controller
+
+Samsung S5P6442, S5PC110 and S5PV210 SoCs contain integrated clock
+controller, which generates and supplies clock to various controllers
+within the SoC.
+
+Required Properties:
+
+- compatible: should be one of following:
+	- "samsung,s5pv210-clock" : for clock controller of Samsung
+	  S5PC110/S5PV210 SoCs,
+	- "samsung,s5p6442-clock" : for clock controller of Samsung
+	  S5P6442 SoC.
+
+- reg: physical base address of the controller and length of memory mapped
+  region.
+
+- #clock-cells: should be 1.
+
+All available clocks are defined as preprocessor macros in
+dt-bindings/clock/s5pv210.h header and can be used in device tree sources.
+
+External clocks:
+
+There are several clocks that are generated outside the SoC. It is expected
+that they are defined using standard clock bindings with following
+clock-output-names:
+ - "xxti": external crystal oscillator connected to XXTI and XXTO pins of
+the SoC,
+ - "xusbxti": external crystal oscillator connected to XUSBXTI and XUSBXTO
+pins of the SoC,
+
+A subset of above clocks available on given board shall be specified in
+board device tree, including the system base clock, as selected by XOM[0]
+pin of the SoC. Refer to generic fixed rate clock bindings
+documentation[1] for more information how to specify these clocks.
+
+[1] Documentation/devicetree/bindings/clock/fixed-clock.txt
+
+Example: Clock controller node:
+
+	clock: clock-controller at 7e00f000 {
+		compatible = "samsung,s5pv210-clock";
+		reg = <0x7e00f000 0x1000>;
+		#clock-cells = <1>;
+	};
+
+Example: Required external clocks:
+
+	xxti: clock-xxti {
+		compatible = "fixed-clock";
+		clock-output-names = "xxti";
+		clock-frequency = <24000000>;
+		#clock-cells = <0>;
+	};
+
+	xusbxti: clock-xusbxti {
+		compatible = "fixed-clock";
+		clock-output-names = "xusbxti";
+		clock-frequency = <24000000>;
+		#clock-cells = <0>;
+	};
+
+Example: UART controller node that consumes the clock generated by the clock
+  controller (refer to the standard clock bindings for information about
+  "clocks" and "clock-names" properties):
+
+	uart0: serial at e2900000 {
+		compatible = "samsung,s5pv210-uart";
+		reg = <0xe2900000 0x400>;
+		interrupt-parent = <&vic1>;
+		interrupts = <10>;
+		clock-names = "uart", "clk_uart_baud0",
+				"clk_uart_baud1";
+		clocks = <&clocks UART0>, <&clocks UART0>,
+				<&clocks SCLK_UART0>;
+		status = "disabled";
+	};
drivers/clk/samsung/Makefile +1 -0
index 69e8177..49d6ce1 100644
@@ -16,3 +16,4 @@ obj-$(CONFIG_S3C2410_COMMON_DCLK)+= clk-s3c2410-dclk.o
 obj-$(CONFIG_S3C2412_COMMON_CLK)+= clk-s3c2412.o
 obj-$(CONFIG_S3C2443_COMMON_CLK)+= clk-s3c2443.o
 obj-$(CONFIG_ARCH_S3C64XX)	+= clk-s3c64xx.o
+obj-$(CONFIG_ARCH_S5PV210)	+= clk-s5pv210.o
drivers/clk/samsung/clk-s5pv210.c new file +976 -0

976 lines not on this page · raw message

include/dt-bindings/clock/s5pv210.h new file +239 -0

239 lines not on this page · raw message

Signature · 1 line
1.9.3
#2 lore raw

PATCH 2/19 ARM: s5pv210: Migrate clock handling to Common Clock Framework

In reply to Tomasz Figa

From: Mateusz Krawczuk <[email protected]>

This patch migrates the s5pv210 platform to use new clock driver using Common Clock Framework.

[t.figa: Rebased and fixed merge conflicts.]
---
 arch/arm/mach-s5pv210/Kconfig         |  9 +++++++++
 arch/arm/mach-s5pv210/Makefile        |  4 ++--
 arch/arm/mach-s5pv210/common.c        | 16 ++++++++++++++++
 arch/arm/mach-s5pv210/common.h        |  9 +++++++++
 arch/arm/mach-s5pv210/mach-goni.c     |  2 +-
 arch/arm/mach-s5pv210/mach-smdkv210.c |  2 +-
 arch/arm/plat-samsung/Kconfig         |  2 +-
 7 files changed, 39 insertions(+), 5 deletions(-)
arch/arm/mach-s5pv210/Kconfig +9 -0
index f60f286..60785ce 100644
@@ -13,6 +13,7 @@ config CPU_S5PV210
 	bool
 	select ARM_AMBA
 	select PL330_DMA if DMADEVICES
+	select S5P_CLOCK if !COMMON_CLK
 	select S5P_EXT_INT
 	select S5P_PM if PM
 	select S5P_SLEEP if PM
@@ -70,6 +71,14 @@ config S5PV210_SETUP_USB_PHY
 	help
 	  Common setup code for USB PHY controller
 
+config COMMON_CLK_S5PV210
+	bool "Common Clock Framework support"
+	default y
+	select COMMON_CLK_SAMSUNG
+	help
+	  Enable this option to use new clock driver
+	  based on Common Clock Framework.
+
 menu "S5PC110 Machines"
 
 config MACH_AQUILA
arch/arm/mach-s5pv210/Makefile +2 -2
index 1c4e419..d1a493a 100644
@@ -12,8 +12,8 @@ obj-				:=
 
 # Core
 
-obj-y				+= common.o clock.o
-
+obj-y				+= common.o
+obj-$(CONFIG_S5P_CLOCK)		+= clock.o
 obj-$(CONFIG_PM)		+= pm.o
 
 obj-y				+= dma.o
arch/arm/mach-s5pv210/common.c +16 -0
index 7024dcd..2e2202a 100644
@@ -25,6 +25,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/serial_core.h>
 #include <linux/serial_s3c.h>
+#include <linux/of.h>
 
 #include <asm/proc-fns.h>
 #include <asm/mach/arch.h>
@@ -35,7 +36,13 @@
 #include <mach/regs-clock.h>
 
 #include <plat/cpu.h>
+
+#ifdef CONFIG_S5P_CLOCK
 #include <plat/clock.h>
+#else
+#include <linux/clk-provider.h>
+#endif
+
 #include <plat/devs.h>
 #include <plat/sdhci.h>
 #include <plat/adc-core.h>
@@ -50,6 +57,9 @@
 
 #include "common.h"
 
+/* External clock frequency */
+static unsigned long xusbxti_f;
+
 static const char name_s5pv210[] = "S5PV210/S5PC110";
 
 static struct cpu_table cpu_ids[] __initdata = {
@@ -229,18 +239,24 @@ void __init s5pv210_map_io(void)
 
 void __init s5pv210_init_clocks(int xtal)
 {
+#ifdef CONFIG_S5P_CLOCK
 	printk(KERN_DEBUG "%s: initializing clocks\n", __func__);
 
 	s3c24xx_register_baseclocks(xtal);
 	s5p_register_clocks(xtal);
 	s5pv210_register_clocks();
 	s5pv210_setup_clocks();
+#else
+	xusbxti_f = xtal;
+#endif
 }
 
 void __init s5pv210_init_irq(void)
 {
 	u32 vic[4];	/* S5PV210 supports 4 VIC */
 
+	s5pv210_clk_init(0, xusbxti_f, S3C_VA_SYS);
+
 	/* All the VICs are fully populated. */
 	vic[0] = ~0;
 	vic[1] = ~0;
arch/arm/mach-s5pv210/common.h +9 -0
index fe1beb5..a2e85cb 100644
@@ -14,6 +14,15 @@
 
 #include <linux/reboot.h>
 
+#ifdef CONFIG_COMMON_CLK_S5PV210
+void s5pv210_clk_init(unsigned long xxti_f, unsigned long xusbxti_f,
+		      void __iomem *reg_base);
+#else
+static inline void s5pv210_clk_init(unsigned long xxti_f,
+				    unsigned long xusbxti_f,
+				    void __iomem *reg_base) {}
+#endif
+
 void s5pv210_init_io(struct map_desc *mach_desc, int size);
 void s5pv210_init_irq(void);
 
arch/arm/mach-s5pv210/mach-goni.c +1 -1
index c1ce921..0fc71be 100644
@@ -849,7 +849,7 @@ static void __init goni_sound_init(void)
 static void __init goni_map_io(void)
 {
 	s5pv210_init_io(NULL, 0);
-	s3c24xx_init_clocks(clk_xusbxti.rate);
+	s3c24xx_init_clocks(24000000);
 	s3c24xx_init_uarts(goni_uartcfgs, ARRAY_SIZE(goni_uartcfgs));
 	samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
 }
arch/arm/mach-s5pv210/mach-smdkv210.c +1 -1
index 2a6655f..1bde3a3 100644
@@ -285,7 +285,7 @@ static struct platform_pwm_backlight_data smdkv210_bl_data = {
 static void __init smdkv210_map_io(void)
 {
 	s5pv210_init_io(NULL, 0);
-	s3c24xx_init_clocks(clk_xusbxti.rate);
+	s3c24xx_init_clocks(24000000);
 	s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs));
 	samsung_set_timer_source(SAMSUNG_PWM2, SAMSUNG_PWM4);
 }
arch/arm/plat-samsung/Kconfig +1 -1
index 1c629c2..42f5d5b 100644
@@ -78,7 +78,7 @@ config SAMSUNG_CLKSRC
 	  used by newer systems such as the S3C64XX.
 
 config S5P_CLOCK
-	def_bool ARCH_S5PV210
+	bool
 	help
 	  Support common clock part for ARCH_S5P and ARCH_EXYNOS SoCs
 
Signature · 1 line
1.9.3
#3 lore raw

PATCH 3/19 cpufreq: s3c24xx: Remove some dead code

In reply to Tomasz Figa

There is no use for the .resume_clocks() callback now and in fact all the provided functions are empty, so this patch just removes it in preparation for further patches.

Cc Rafael J. Wysocki <[email protected]>
Cc Viresh Kumar <[email protected]>
Cc linux-pm at vger.kernel.org
---
 drivers/cpufreq/s3c2410-cpufreq.c | 2 --
 drivers/cpufreq/s3c2412-cpufreq.c | 3 ---
 drivers/cpufreq/s3c2440-cpufreq.c | 3 ---
 drivers/cpufreq/s3c24xx-cpufreq.c | 1 -
 4 files changed, 9 deletions(-)
drivers/cpufreq/s3c2410-cpufreq.c +0 -2
index cfa0dd8..b8e5da8 100644
@@ -26,7 +26,6 @@
 #include <mach/regs-clock.h>
 
 #include <plat/cpu.h>
-#include <plat/clock.h>
 #include <plat/cpu-freq-core.h>
 
 /* Note, 2410A has an extra mode for 1:4:4 ratio, bit 2 of CLKDIV */
@@ -104,7 +103,6 @@ static struct s3c_cpufreq_info s3c2410_cpufreq_info = {
 	.calc_iotiming	= s3c2410_iotiming_calc,
 	.set_iotiming	= s3c2410_iotiming_set,
 	.get_iotiming	= s3c2410_iotiming_get,
-	.resume_clocks	= s3c2410_setup_clocks,
 
 	.set_fvco	= s3c2410_set_fvco,
 	.set_refresh	= s3c2410_cpufreq_setrefresh,
drivers/cpufreq/s3c2412-cpufreq.c +0 -3
index 4645b48..eb26213 100644
@@ -28,7 +28,6 @@
 #include <mach/s3c2412.h>
 
 #include <plat/cpu.h>
-#include <plat/clock.h>
 #include <plat/cpu-freq-core.h>
 
 /* our clock resources. */
@@ -188,8 +187,6 @@ static struct s3c_cpufreq_info s3c2412_cpufreq_info = {
 	.set_iotiming	= s3c2412_iotiming_set,
 	.get_iotiming	= s3c2412_iotiming_get,
 
-	.resume_clocks	= s3c2412_setup_clocks,
-
 	.debug_io_show  = s3c_cpufreq_debugfs_call(s3c2412_iotiming_debugfs),
 };
 
drivers/cpufreq/s3c2440-cpufreq.c +0 -3
index f84ed10..0129f5c 100644
@@ -29,7 +29,6 @@
 
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
-#include <plat/clock.h>
 
 static struct clk *xtal;
 static struct clk *fclk;
@@ -262,8 +261,6 @@ static struct s3c_cpufreq_info s3c2440_cpufreq_info = {
 	.calc_divs	= s3c2440_cpufreq_calcdivs,
 	.calc_freqtable	= s3c2440_cpufreq_calctable,
 
-	.resume_clocks	= s3c244x_setup_clocks,
-
 	.debug_io_show  = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs),
 };
 
drivers/cpufreq/s3c24xx-cpufreq.c +0 -1
index 227ebf7..d00f1ce 100644
@@ -27,7 +27,6 @@
 #include <asm/mach/map.h>
 
 #include <plat/cpu.h>
-#include <plat/clock.h>
 #include <plat/cpu-freq-core.h>
 
 #include <mach/regs-clock.h>
Signature · 1 line
1.9.3
#4 lore raw

PATCH 4/19 serial: samsung: Remove support for legacy clock code

In reply to Tomasz Figa

All Samsung platforms are now using the Common Clock Framework and the legacy clock code is being removed, so remove related dead code from samsung-serial driver as well.

Cc Greg Kroah-Hartman <[email protected]> (maintainer:SERIAL DRIVERS)
Cc Jiri Slaby <[email protected]> (supporter:TTY LAYER)
Cc linux-serial at vger.kernel.org (open list:SERIAL DRIVERS)
---
 drivers/tty/serial/samsung.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/tty/serial/samsung.c +0 -4
index 36c7747..cae8ebd 100644
@@ -47,10 +47,6 @@
 
 #include <asm/irq.h>
 
-#ifdef CONFIG_SAMSUNG_CLOCK
-#include <plat/clock.h>
-#endif
-
 #include "samsung.h"
 
 #if	defined(CONFIG_SERIAL_SAMSUNG_DEBUG) &&	\
Signature · 1 line
1.9.3
#5 lore raw

Re: [PATCH 04/19] serial: samsung: Remove support for legacy clock code

Quoted 4 lines · Tomasz Figa

All Samsung platforms are now using the Common Clock Framework and the legacy clock code is being removed, so remove related dead code from samsung-serial driver as well.

Quoted 8 lines
Cc Greg Kroah-Hartman <[email protected]> (maintainer:SERIAL DRIVERS)
Cc Jiri Slaby <[email protected]> (supporter:TTY LAYER)
Cc linux-serial at vger.kernel.org (open list:SERIAL DRIVERS)
---
 drivers/tty/serial/samsung.c | 4 ----
 1 file changed, 4 deletions(-)

This just entered linux-next (see next-20140716).

Quoted 5 lines
drivers/tty/serial/samsung.c +0 -0
index 36c7747..cae8ebd 100644

drivers/tty/serial/samsung.c line 52

Quoted 10 lines
drivers/tty/serial/samsung.c +0 -4
@@ -47,10 +47,6 @@
 
 #include <asm/irq.h>
 
-#ifdef CONFIG_SAMSUNG_CLOCK
-#include <plat/clock.h>
-#endif
-
 #include "samsung.h"
 
 #if	defined(CONFIG_SERIAL_SAMSUNG_DEBUG) &&	\

There are three further references to CONFIG_SAMSUNG_CLOCK in this file. Those should be removed too, shouldn't they?

Paul Bolle

#6 lore raw

Re: [PATCH 04/19] serial: samsung: Remove support for legacy clock code

Quoted 30 lines · Paul Bolle
Quoted 4 lines · Tomasz Figa

All Samsung platforms are now using the Common Clock Framework and the legacy clock code is being removed, so remove related dead code from samsung-serial driver as well.

Quoted 8 lines
Cc Greg Kroah-Hartman <[email protected]> (maintainer:SERIAL DRIVERS)
Cc Jiri Slaby <[email protected]> (supporter:TTY LAYER)
Cc linux-serial at vger.kernel.org (open list:SERIAL DRIVERS)
---
 drivers/tty/serial/samsung.c | 4 ----
 1 file changed, 4 deletions(-)

This just entered linux-next (see next-20140716).

Quoted 14 lines
drivers/tty/serial/samsung.c +0 -4
index 36c7747..cae8ebd 100644
@@ -47,10 +47,6 @@
 
 #include <asm/irq.h>
 
-#ifdef CONFIG_SAMSUNG_CLOCK
-#include <plat/clock.h>
-#endif
-
 #include "samsung.h"
 
Quoted 4 lines

drivers/tty/serial/samsung.c line 52

Quoted 1 line
drivers/tty/serial/samsung.c +0 -0
 #if	defined(CONFIG_SERIAL_SAMSUNG_DEBUG) &&	\

There are three further references to CONFIG_SAMSUNG_CLOCK in this file. Those should be removed too, shouldn't they?

That's right. Apparently I missed them. I guess that's not critical, though, and could be done in separate patch, right?

Best regards,
Tomasz

#7 lore raw

Re: [PATCH 04/19] serial: samsung: Remove support for legacy clock code

Quoted 6 lines · Tomasz Figa
Quoted 2 lines · Paul Bolle

There are three further references to CONFIG_SAMSUNG_CLOCK in this file. Those should be removed too, shouldn't they?

That's right. Apparently I missed them. I guess that's not critical, though, and could be done in separate patch, right?

This is not critical at all, so that's fine with me.

Paul Bolle

#8 lore raw

Re: [PATCH 04/19] serial: samsung: Remove support for legacy clock code

Quoted 5 lines · Paul Bolle
Quoted 2 lines · Tomasz Figa

That's right. Apparently I missed them. I guess that's not critical, though, and could be done in separate patch, right?

This is not critical at all, so that's fine with me.

Actually, that's only correct if the solution here is to just remove the (currently) dead code hidden behind CONFIG_SAMSUNG_CLOCK. But if the solution requires something less trivial, that might be quite wrong.

So please disregard my comment!

Paul Bolle

#9 lore raw

Re: [PATCH 04/19] serial: samsung: Remove support for legacy clock code

Quoted 5 lines · Paul Bolle
Quoted 4 lines · Paul Bolle
Quoted 2 lines · Tomasz Figa

That's right. Apparently I missed them. I guess that's not critical, though, and could be done in separate patch, right?

Quoted 7 lines
Quoted 1 line

This is not critical at all, so that's fine with me.

Actually, that's only correct if the solution here is to just remove the (currently) dead code hidden behind CONFIG_SAMSUNG_CLOCK. But if the solution requires something less trivial, that might be quite wrong.

So please disregard my comment!

The code between those ifdefs is no longer used, because all Samsung platforms use the Common Clock Framework after this series. So I believe we can safely remove this dead code.

Best regards,
Tomasz

#10 lore raw

Re: [PATCH 04/19] serial: samsung: Remove support for legacy clock code

Quoted 12 lines · Tomasz Figa
Quoted 11 lines · Paul Bolle
Quoted 5 lines · Paul Bolle
Quoted 2 lines · Tomasz Figa

That's right. Apparently I missed them. I guess that's not critical, though, and could be done in separate patch, right?

This is not critical at all, so that's fine with me.

Actually, that's only correct if the solution here is to just remove the (currently) dead code hidden behind CONFIG_SAMSUNG_CLOCK. But if the solution requires something less trivial, that might be quite wrong.

Quoted 5 lines
Quoted 1 line

So please disregard my comment!

The code between those ifdefs is no longer used, because all Samsung platforms use the Common Clock Framework after this series. So I believe we can safely remove this dead code.

The three checks for CONFIG_SAMSUNG_CLOCK can still be seen in v3.17-rc3 and next-20140903. Should I perhaps submit the trivial patch to remove them (and the code they hide) or did things turn out to be more complicated?

Paul Bolle

#11 lore raw

Re: [PATCH 04/19] serial: samsung: Remove support for legacy clock code

[Use Tomasz's new address and add Sylwester.]

Quoted 26 lines · Paul Bolle
Quoted 12 lines · Tomasz Figa
Quoted 11 lines · Paul Bolle
Quoted 5 lines · Paul Bolle
Quoted 2 lines · Tomasz Figa

That's right. Apparently I missed them. I guess that's not critical, though, and could be done in separate patch, right?

This is not critical at all, so that's fine with me.

Actually, that's only correct if the solution here is to just remove the (currently) dead code hidden behind CONFIG_SAMSUNG_CLOCK. But if the solution requires something less trivial, that might be quite wrong.

Quoted 5 lines
Quoted 1 line

So please disregard my comment!

The code between those ifdefs is no longer used, because all Samsung platforms use the Common Clock Framework after this series. So I believe we can safely remove this dead code.

The three checks for CONFIG_SAMSUNG_CLOCK can still be seen in v3.17-rc3 and next-20140903. Should I perhaps submit the trivial patch to remove them (and the code they hide) or did things turn out to be more complicated?

Paul Bolle

#12 lore raw

PATCH 5/19 ARM: SAMSUNG: Remove legacy clock code

In reply to Tomasz Figa

Since S5PV210 now has a complete clock driver using Common Clock Framework, there is no reason to keep the old code. Remove it together with the whole legacy Samsung-specific clock framework which no longer has any users.

---
 arch/arm/Kconfig                                   |    1 +
 arch/arm/mach-exynos/pm.c                          |    1 -
 arch/arm/mach-s3c24xx/common.c                     |    2 -
 arch/arm/mach-s3c24xx/iotiming-s3c2412.c           |    1 -
 arch/arm/mach-s3c24xx/mach-h1940.c                 |    5 +-
 arch/arm/mach-s3c24xx/mach-jive.c                  |    1 -
 arch/arm/mach-s3c24xx/mach-smdk2413.c              |    1 -
 arch/arm/mach-s3c24xx/mach-smdk2416.c              |    1 -
 arch/arm/mach-s3c24xx/mach-smdk2443.c              |    1 -
 arch/arm/mach-s3c24xx/mach-vstms.c                 |    1 -
 arch/arm/mach-s3c24xx/s3c2410.c                    |    6 -
 arch/arm/mach-s3c24xx/s3c2412.c                    |    6 -
 arch/arm/mach-s3c24xx/s3c2442.c                    |    1 -
 arch/arm/mach-s3c24xx/s3c244x.c                    |    6 -
 arch/arm/mach-s3c64xx/mach-anw6410.c               |    1 -
 arch/arm/mach-s3c64xx/mach-crag6410.c              |    1 -
 arch/arm/mach-s3c64xx/mach-hmt.c                   |    1 -
 arch/arm/mach-s3c64xx/mach-ncp.c                   |    1 -
 arch/arm/mach-s3c64xx/mach-smartq.c                |    1 -
 arch/arm/mach-s3c64xx/mach-smdk6400.c              |    1 -
 arch/arm/mach-s3c64xx/mach-smdk6410.c              |    1 -
 arch/arm/mach-s3c64xx/s3c6400.c                    |    1 -
 arch/arm/mach-s3c64xx/s3c6410.c                    |    1 -
 arch/arm/mach-s5pv210/Kconfig                      |    9 -
 arch/arm/mach-s5pv210/Makefile                     |    1 -
 arch/arm/mach-s5pv210/clock.c                      | 1365 --------------------
 arch/arm/mach-s5pv210/common.c                     |   16 +-
 arch/arm/mach-s5pv210/common.h                     |    6 -
 arch/arm/mach-s5pv210/mach-goni.c                  |    1 -
 arch/arm/mach-s5pv210/mach-smdkv210.c              |    1 -
 arch/arm/mach-s5pv210/pm.c                         |   48 -
 arch/arm/plat-samsung/Kconfig                      |   18 -
 arch/arm/plat-samsung/Makefile                     |    5 -
 arch/arm/plat-samsung/clock-clksrc.c               |  212 ---
 arch/arm/plat-samsung/clock.c                      |  539 --------
 arch/arm/plat-samsung/include/plat/clock-clksrc.h  |   83 --
 arch/arm/plat-samsung/include/plat/clock.h         |  152 ---
 arch/arm/plat-samsung/include/plat/cpu-freq-core.h |    3 -
 arch/arm/plat-samsung/include/plat/pll.h           |  323 -----
 arch/arm/plat-samsung/include/plat/s5p-clock.h     |   65 -
 arch/arm/plat-samsung/init.c                       |    1 -
 arch/arm/plat-samsung/s5p-clock.c                  |  294 -----
 42 files changed, 6 insertions(+), 3179 deletions(-)
 delete mode 100644 arch/arm/mach-s5pv210/clock.c
 delete mode 100644 arch/arm/plat-samsung/clock-clksrc.c
 delete mode 100644 arch/arm/plat-samsung/clock.c
 delete mode 100644 arch/arm/plat-samsung/include/plat/clock-clksrc.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/clock.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/pll.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/s5p-clock.h
 delete mode 100644 arch/arm/plat-samsung/s5p-clock.c
arch/arm/Kconfig +1 -0
index f4396fd..c0c1c3f 100644
@@ -765,6 +765,7 @@ config ARCH_S5PV210
 	select ATAGS
 	select CLKDEV_LOOKUP
 	select CLKSRC_SAMSUNG_PWM
+	select COMMON_CLK_SAMSUNG
 	select CPU_V7
 	select GENERIC_CLOCKEVENTS
 	select GPIO_SAMSUNG
arch/arm/mach-exynos/pm.c +0 -1
index 87c0d34..6035973 100644
@@ -28,7 +28,6 @@
 #include <asm/suspend.h>
 
 #include <plat/pm-common.h>
-#include <plat/pll.h>
 #include <plat/regs-srom.h>
 
 #include <mach/map.h>
arch/arm/mach-s3c24xx/common.c +0 -2
index c0763b8..44fa95d 100644
@@ -49,9 +49,7 @@
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
-#include <plat/clock.h>
 #include <plat/cpu-freq.h>
-#include <plat/pll.h>
 #include <plat/pwm-core.h>
 #include <plat/watchdog-reset.h>
 
arch/arm/mach-s3c24xx/iotiming-s3c2412.c +0 -1
index bd064c0..28b1395 100644
@@ -29,7 +29,6 @@
 
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
-#include <plat/clock.h>
 
 #include <mach/s3c2412.h>
 
arch/arm/mach-s3c24xx/mach-h1940.c +4 -1
index fbf5487..c9a99bb 100644
@@ -60,7 +60,6 @@
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/gpio-cfg.h>
-#include <plat/pll.h>
 #include <plat/pm.h>
 #include <plat/samsung-time.h>
 
@@ -73,6 +72,10 @@
 
 #define H1940_LATCH_BIT(x)	(1 << ((x) + 16 - S3C_GPIO_END))
 
+#define S3C24XX_PLL_MDIV_SHIFT         (12)
+#define S3C24XX_PLL_PDIV_SHIFT         (4)
+#define S3C24XX_PLL_SDIV_SHIFT         (0)
+
 static struct map_desc h1940_iodesc[] __initdata = {
 	[0] = {
 		.virtual	= (unsigned long)H1940_LATCH,
arch/arm/mach-s3c24xx/mach-jive.c +0 -1
index e81ea82..e647b47 100644
@@ -48,7 +48,6 @@
 #include <linux/mtd/partitions.h>
 
 #include <plat/gpio-cfg.h>
-#include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <plat/pm.h>
arch/arm/mach-s3c24xx/mach-smdk2413.c +0 -1
index fb3b80e..10726bf 100644
@@ -43,7 +43,6 @@
 #include <mach/gpio-samsung.h>
 #include <mach/fb.h>
 
-#include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
arch/arm/mach-s3c24xx/mach-smdk2416.c +0 -1
index fa6f30d..24189e8 100644
@@ -44,7 +44,6 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 
 #include <plat/gpio-cfg.h>
-#include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
arch/arm/mach-s3c24xx/mach-smdk2443.c +0 -1
index ef5d5ea..0ed7761 100644
@@ -38,7 +38,6 @@
 #include <mach/fb.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
arch/arm/mach-s3c24xx/mach-vstms.c +0 -1
index 9104c2b..9d4f647 100644
@@ -42,7 +42,6 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 
-#include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
arch/arm/mach-s3c24xx/s3c2410.c +0 -6
index 7eab888..5ffe828 100644
@@ -41,8 +41,6 @@
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
-#include <plat/clock.h>
-#include <plat/pll.h>
 #include <plat/pm.h>
 #include <plat/watchdog-reset.h>
 
@@ -83,10 +81,6 @@ void __init s3c2410_map_io(void)
 	iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc));
 }
 
-void __init_or_cpufreq s3c2410_setup_clocks(void)
-{
-}
-
 struct bus_type s3c2410_subsys = {
 	.name = "s3c2410-core",
 	.dev_name = "s3c2410-core",
arch/arm/mach-s3c24xx/s3c2412.c +0 -6
index d49f52f..569f3f5 100644
@@ -37,12 +37,10 @@
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 
-#include <plat/clock.h>
 #include <plat/cpu.h>
 #include <plat/cpu-freq.h>
 #include <plat/devs.h>
 #include <plat/nand-core.h>
-#include <plat/pll.h>
 #include <plat/pm.h>
 #include <plat/regs-spi.h>
 
@@ -171,10 +169,6 @@ void __init s3c2412_map_io(void)
 	iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc));
 }
 
-void __init_or_cpufreq s3c2412_setup_clocks(void)
-{
-}
-
 /* need to register the subsystem before we actually register the device, and
  * we also need to ensure that it has been initialised before any of the
  * drivers even try to use it (even if not on an s3c2412 based system)
arch/arm/mach-s3c24xx/s3c2442.c +0 -1
index fb9da2b..7b04334 100644
@@ -43,7 +43,6 @@
 
 #include <mach/regs-clock.h>
 
-#include <plat/clock.h>
 #include <plat/cpu.h>
 #include <plat/pm.h>
 
arch/arm/mach-s3c24xx/s3c244x.c +0 -6
index 4a64bcc..d1c3e65 100644
@@ -38,11 +38,9 @@
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 
-#include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <plat/pm.h>
-#include <plat/pll.h>
 #include <plat/nand-core.h>
 #include <plat/watchdog-reset.h>
 
@@ -78,10 +76,6 @@ void __init s3c244x_map_io(void)
 	s3c2410_device_dclk.name = "s3c2440-dclk";
 }
 
-void __init_or_cpufreq s3c244x_setup_clocks(void)
-{
-}
-
 /* Since the S3C2442 and S3C2440 share items, put both subsystems here */
 
 struct bus_type s3c2440_subsys = {
arch/arm/mach-s3c64xx/mach-anw6410.c +0 -1
index 55eb6a6..60576df 100644
@@ -45,7 +45,6 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <plat/fb.h>
 
-#include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <mach/regs-gpio.h>
arch/arm/mach-s3c64xx/mach-crag6410.c +0 -1
index 4b0199f..fe11633 100644
@@ -58,7 +58,6 @@
 #include <linux/platform_data/spi-s3c64xx.h>
 
 #include <plat/keypad.h>
-#include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <plat/adc.h>
arch/arm/mach-s3c64xx/mach-hmt.c +0 -1
index 72cee08..19e8feb 100644
@@ -39,7 +39,6 @@
 #include <plat/fb.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 
-#include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
arch/arm/mach-s3c64xx/mach-ncp.c +0 -1
index 67f06a9..4bae7dc 100644
@@ -40,7 +40,6 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <plat/fb.h>
 
-#include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
arch/arm/mach-s3c64xx/mach-smartq.c +0 -1
index 78dd6f7..b3d1353 100644
@@ -28,7 +28,6 @@
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
-#include <plat/clock.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <linux/platform_data/i2c-s3c2410.h>
arch/arm/mach-s3c64xx/mach-smdk6400.c +0 -1
index c85d1cb..9107497 100644
@@ -30,7 +30,6 @@
 #include <mach/hardware.h>
 #include <mach/map.h>
 
-#include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <linux/platform_data/i2c-s3c2410.h>
arch/arm/mach-s3c64xx/mach-smdk6410.c +0 -1
index c6a8b2a..1dc86d7 100644
@@ -63,7 +63,6 @@
 #include <plat/fb.h>
 #include <plat/gpio-cfg.h>
 
-#include <plat/clock.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
 #include <plat/adc.h>
arch/arm/mach-s3c64xx/s3c6400.c +0 -1
index 8c42807..1ce48c5 100644
@@ -39,7 +39,6 @@
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
-#include <plat/clock.h>
 #include <plat/sdhci.h>
 #include <plat/iic-core.h>
 #include <plat/onenand-core.h>
arch/arm/mach-s3c64xx/s3c6410.c +0 -1
index 5be3f09..b2a7930 100644
@@ -40,7 +40,6 @@
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
-#include <plat/clock.h>
 #include <plat/sdhci.h>
 #include <plat/ata-core.h>
 #include <plat/adc-core.h>
arch/arm/mach-s5pv210/Kconfig +0 -9
index 60785ce..f60f286 100644
@@ -13,7 +13,6 @@ config CPU_S5PV210
 	bool
 	select ARM_AMBA
 	select PL330_DMA if DMADEVICES
-	select S5P_CLOCK if !COMMON_CLK
 	select S5P_EXT_INT
 	select S5P_PM if PM
 	select S5P_SLEEP if PM
@@ -71,14 +70,6 @@ config S5PV210_SETUP_USB_PHY
 	help
 	  Common setup code for USB PHY controller
 
-config COMMON_CLK_S5PV210
-	bool "Common Clock Framework support"
-	default y
-	select COMMON_CLK_SAMSUNG
-	help
-	  Enable this option to use new clock driver
-	  based on Common Clock Framework.
-
 menu "S5PC110 Machines"
 
 config MACH_AQUILA
arch/arm/mach-s5pv210/Makefile +0 -1
index d1a493a..08358bb 100644
@@ -13,7 +13,6 @@ obj-				:=
 # Core
 
 obj-y				+= common.o
-obj-$(CONFIG_S5P_CLOCK)		+= clock.o
 obj-$(CONFIG_PM)		+= pm.o
 
 obj-y				+= dma.o
arch/arm/mach-s5pv210/clock.c deleted +0 -0
deleted file mode 100644
index ca46372..0000000
arch/arm/mach-s5pv210/common.c +1 -15
index 2e2202a..30bd542 100644
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/clk.h>
+#include <linux/clk-provider.h>
 #include <linux/io.h>
 #include <linux/device.h>
 #include <clocksource/samsung_pwm.h>
@@ -37,12 +38,6 @@
 
 #include <plat/cpu.h>
 
-#ifdef CONFIG_S5P_CLOCK
-#include <plat/clock.h>
-#else
-#include <linux/clk-provider.h>
-#endif
-
 #include <plat/devs.h>
 #include <plat/sdhci.h>
 #include <plat/adc-core.h>
@@ -239,16 +234,7 @@ void __init s5pv210_map_io(void)
 
 void __init s5pv210_init_clocks(int xtal)
 {
-#ifdef CONFIG_S5P_CLOCK
-	printk(KERN_DEBUG "%s: initializing clocks\n", __func__);
-
-	s3c24xx_register_baseclocks(xtal);
-	s5p_register_clocks(xtal);
-	s5pv210_register_clocks();
-	s5pv210_setup_clocks();
-#else
 	xusbxti_f = xtal;
-#endif
 }
 
 void __init s5pv210_init_irq(void)
arch/arm/mach-s5pv210/common.h +0 -6
index a2e85cb..083ffe7 100644
@@ -14,14 +14,8 @@
 
 #include <linux/reboot.h>
 
-#ifdef CONFIG_COMMON_CLK_S5PV210
 void s5pv210_clk_init(unsigned long xxti_f, unsigned long xusbxti_f,
 		      void __iomem *reg_base);
-#else
-static inline void s5pv210_clk_init(unsigned long xxti_f,
-				    unsigned long xusbxti_f,
-				    void __iomem *reg_base) {}
-#endif
 
 void s5pv210_init_io(struct map_desc *mach_desc, int size);
 void s5pv210_init_irq(void);
arch/arm/mach-s5pv210/mach-goni.c +0 -1
index 0fc71be..315926f 100644
@@ -46,7 +46,6 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <plat/keypad.h>
 #include <plat/sdhci.h>
-#include <plat/clock.h>
 #include <plat/samsung-time.h>
 #include <plat/mfc.h>
 
arch/arm/mach-s5pv210/mach-smdkv210.c +0 -1
index 1bde3a3..6816ccd 100644
@@ -47,7 +47,6 @@
 #include <plat/samsung-time.h>
 #include <plat/backlight.h>
 #include <plat/mfc.h>
-#include <plat/clock.h>
 
 #include "common.h"
 
arch/arm/mach-s5pv210/pm.c +0 -48

55 lines not on this page · raw message

arch/arm/plat-samsung/Kconfig +0 -18
index 42f5d5b..f8185b5 100644
@@ -23,7 +23,6 @@ config PLAT_S5P
 	select PLAT_SAMSUNG
 	select S3C_GPIO_TRACK
 	select S5P_GPIO_DRVSTR
-	select SAMSUNG_CLKSRC if !COMMON_CLK
 	help
 	  Base platform code for Samsung's S5P series SoC.
 
@@ -65,23 +64,6 @@ config SAMSUNG_ATAGS
 
 if SAMSUNG_ATAGS
 
-# clock options
-
-config SAMSUNG_CLOCK
-	bool
-	default y if !COMMON_CLK
-
-config SAMSUNG_CLKSRC
-	bool
-	help
-	  Select the clock code for the clksrc implementation
-	  used by newer systems such as the S3C64XX.
-
-config S5P_CLOCK
-	bool
-	help
-	  Support common clock part for ARCH_S5P and ARCH_EXYNOS SoCs
-
 # options for IRQ support
 
 config S5P_IRQ
arch/arm/plat-samsung/Makefile +0 -5
index 5e5beaa..906f54b 100644
@@ -16,11 +16,6 @@ obj-				:=
 
 obj-y				+= init.o cpu.o
 
-obj-$(CONFIG_SAMSUNG_CLOCK)	+= clock.o
-
-obj-$(CONFIG_SAMSUNG_CLKSRC)	+= clock-clksrc.o
-obj-$(CONFIG_S5P_CLOCK)		+= s5p-clock.o
-
 obj-$(CONFIG_S5P_IRQ)		+= s5p-irq.o
 obj-$(CONFIG_S5P_EXT_INT)	+= s5p-irq-eint.o
 obj-$(CONFIG_S5P_GPIO_INT)	+= s5p-irq-gpioint.o
arch/arm/plat-samsung/clock-clksrc.c deleted +0 -0
deleted file mode 100644
index 786a410..0000000
arch/arm/plat-samsung/clock.c deleted +0 -0
deleted file mode 100644
index d103ac1..0000000
arch/arm/plat-samsung/include/plat/clock-clksrc.h deleted +0 -0
deleted file mode 100644
index 50a8ca7..0000000
arch/arm/plat-samsung/include/plat/clock.h deleted +0 -0
deleted file mode 100644
index 63239f4..0000000
arch/arm/plat-samsung/include/plat/cpu-freq-core.h +0 -3
index 72d4178..317c523 100644
@@ -140,7 +140,6 @@ struct s3c_cpufreq_config {
  *	any frequency changes. This is really only need by devices like the
  *	S3C2410 where there is no or limited divider between the PLL and the
  *	ARMCLK.
- * @resume_clocks: Update the clocks on resume.
  * @get_iotiming: Get the current IO timing data, mainly for use at start.
  * @set_iotiming: Update the IO timings from the cached copies calculated
  *	from the @calc_iotiming entry when changing the frequency.
@@ -169,8 +168,6 @@ struct s3c_cpufreq_info {
 
 	/* driver routines */
 
-	void		(*resume_clocks)(void);
-
 	int		(*get_iotiming)(struct s3c_cpufreq_config *cfg,
 					struct s3c_iotimings *timings);
 
arch/arm/plat-samsung/include/plat/pll.h deleted +0 -0
deleted file mode 100644
index 357af7c..0000000
arch/arm/plat-samsung/include/plat/s5p-clock.h deleted +0 -0
deleted file mode 100644
index acacc4b..0000000
arch/arm/plat-samsung/init.c +0 -1
index a1f925f..11fbbc2 100644
@@ -30,7 +30,6 @@
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
-#include <plat/clock.h>
 
 static struct cpu_table *cpu;
 
arch/arm/plat-samsung/s5p-clock.c deleted +0 -0
deleted file mode 100644
index 48a1599..0000000
Signature · 1 line
1.9.3
#13 lore raw

PATCH 6/19 clk: samsung: Add S5PV210 Audio Subsystem clock driver

In reply to Tomasz Figa

This patch adds a driver for clock controller being a part of Audio Subsystem present on S5PV210 and compatible SoCs. It is used to provide clocks for other IP blocks of this subsystem.

Cc Mike Turquette <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Rob Herring <[email protected]>
Cc devicetree at vger.kernel.org
---
 .../bindings/clock/clk-s5pv210-audss.txt           |  53 +++++
 drivers/clk/samsung/Makefile                       |   2 +-
 drivers/clk/samsung/clk-s5pv210-audss.c            | 241 +++++++++++++++++++++
 include/dt-bindings/clock/s5pv210-audss.h          |  34 +++
 4 files changed, 329 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/clock/clk-s5pv210-audss.txt
 create mode 100644 drivers/clk/samsung/clk-s5pv210-audss.c
 create mode 100644 include/dt-bindings/clock/s5pv210-audss.h
Documentation/devicetree/bindings/clock/clk-s5pv210-audss.txt new file +53 -0
new file mode 100644
index 0000000..4fc869b
@@ -0,0 +1,53 @@
+* Samsung Audio Subsystem Clock Controller
+
+The Samsung Audio Subsystem clock controller generates and supplies clocks
+to Audio Subsystem block available in the S5PV210 and compatible SoCs.
+
+Required Properties:
+
+- compatible: should be "samsung,s5pv210-audss-clock".
+- reg: physical base address and length of the controller's register set.
+
+- #clock-cells: should be 1.
+
+- clocks:
+  - hclk: AHB bus clock of the Audio Subsystem.
+  - xxti: Optional fixed rate PLL reference clock, parent of mout_audss. If
+    not specified (i.e. xusbxti is used for PLL reference), it is fixed to
+    a clock named "xxti".
+  - fout_epll: Input PLL to the AudioSS block, parent of mout_audss.
+  - iiscdclk0: Optional external i2s clock, parent of mout_i2s. If not
+    specified, it is fixed to a clock named "iiscdclk0".
+  - sclk_audio0: Audio bus clock, parent of mout_i2s.
+
+- clock-names: Aliases for the above clocks. They should be "hclk",
+  "xxti", "fout_epll", "iiscdclk0", and "sclk_audio0" respectively.
+
+All available clocks are defined as preprocessor macros in
+dt-bindings/clock/s5pv210-audss-clk.h header and can be used in device
+tree sources.
+
+Example: Clock controller node.
+
+	clk_audss: clock-controller at c0900000 {
+		compatible = "samsung,s5pv210-audss-clock";
+		reg = <0xc0900000 0x1000>;
+		#clock-cells = <1>;
+		clock-names = "hclk", "xxti",
+				"fout_epll", "sclk_audio0";
+		clocks = <&clocks DOUT_HCLKP>, <&xxti>,
+				<&clocks FOUT_EPLL>, <&clocks SCLK_AUDIO0>;
+	};
+
+Example: I2S controller node that consumes the clock generated by the clock
+	 controller. Refer to the standard clock bindings for information
+         about 'clocks' and 'clock-names' property.
+
+	i2s0: i2s at 03830000 {
+		/* ... */
+		clock-names = "iis", "i2s_opclk0",
+				"i2s_opclk1";
+		clocks = <&clk_audss CLK_I2S>, <&clk_audss CLK_I2S>,
+				<&clk_audss CLK_DOUT_AUD_BUS>;
+		/* ... */
+	};
drivers/clk/samsung/Makefile +1 -1
index 49d6ce1..9f256a4 100644
@@ -16,4 +16,4 @@ obj-$(CONFIG_S3C2410_COMMON_DCLK)+= clk-s3c2410-dclk.o
 obj-$(CONFIG_S3C2412_COMMON_CLK)+= clk-s3c2412.o
 obj-$(CONFIG_S3C2443_COMMON_CLK)+= clk-s3c2443.o
 obj-$(CONFIG_ARCH_S3C64XX)	+= clk-s3c64xx.o
-obj-$(CONFIG_ARCH_S5PV210)	+= clk-s5pv210.o
+obj-$(CONFIG_ARCH_S5PV210)	+= clk-s5pv210.o clk-s5pv210-audss.o
drivers/clk/samsung/clk-s5pv210-audss.c new file +241 -0

241 lines not on this page · raw message

include/dt-bindings/clock/s5pv210-audss.h new file +34 -0
new file mode 100644
index 0000000..fe57406
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2014 Tomasz Figa <[email protected]>
+ *
+ * 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.
+ *
+ * This header provides constants for Samsung audio subsystem
+ * clock controller.
+ *
+ * The constants defined in this header are being used in dts
+ * and s5pv210 audss driver.
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_S5PV210_AUDSS_H
+#define _DT_BINDINGS_CLOCK_S5PV210_AUDSS_H
+
+#define CLK_MOUT_AUDSS		0
+#define CLK_MOUT_I2S_A		1
+
+#define CLK_DOUT_AUD_BUS	2
+#define CLK_DOUT_I2S_A		3
+
+#define CLK_I2S			4
+#define CLK_HCLK_I2S		5
+#define CLK_HCLK_UART		6
+#define CLK_HCLK_HWA		7
+#define CLK_HCLK_DMA		8
+#define CLK_HCLK_BUF		9
+#define CLK_HCLK_RP		10
+
+#define AUDSS_MAX_CLKS		11
+
+#endif
Signature · 1 line
1.9.3
#14 lore raw

PATCH 7/19 phy: Add support for S5PV210 to the Exynos USB 2.0 PHY driver

In reply to Tomasz Figa

From: Mateusz Krawczuk <[email protected]>

Add support for the Samsung's S5PV210 SoC to the Exynos USB 2.0 PHY driver.

[k.debski at samsung.com: cleanup and commit description]

[k.debski at samsung.com: make changes accordingly to the mailing list comments]

[t.figa: rebased, fixed merge errors, neatened]
Cc Kishon Vijay Abraham I <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Rob Herring <[email protected]>
Cc devicetree at vger.kernel.org
---
 .../devicetree/bindings/phy/samsung-phy.txt        |   1 +
 drivers/phy/Kconfig                                |  10 ++
 drivers/phy/Makefile                               |   1 +
 drivers/phy/phy-s5pv210-usb2.c                     | 187 +++++++++++++++++++++
 drivers/phy/phy-samsung-usb2.c                     |   6 +
 drivers/phy/phy-samsung-usb2.h                     |   1 +
 6 files changed, 206 insertions(+)
 create mode 100644 drivers/phy/phy-s5pv210-usb2.c
Documentation/devicetree/bindings/phy/samsung-phy.txt +1 -0
index 2049261..7dce043 100644
@@ -26,6 +26,7 @@ Samsung S5P/EXYNOS SoC series USB PHY
 
 Required properties:
 - compatible : should be one of the listed compatibles:
+	- "samsung,s5pv210-usb2-phy"
 	- "samsung,exynos4210-usb2-phy"
 	- "samsung,exynos4x12-usb2-phy"
 	- "samsung,exynos5250-usb2-phy"
drivers/phy/Kconfig +10 -0
index 16a2f06..7153361 100644
@@ -130,6 +130,16 @@ config PHY_SAMSUNG_USB2
 	  particular SoCs has to be enabled in addition to this driver. Number
 	  and type of supported phys depends on the SoC.
 
+config PHY_S5PV210_USB2
+	bool "Support for S5PV210"
+	depends on PHY_SAMSUNG_USB2
+	depends on ARCH_S5PV210
+	help
+	  Enable USB PHY support for S5PV210. This option requires that Samsung
+	  USB 2.0 PHY driver is enabled and means that support for this
+	  particular SoC is compiled in the driver. In case of S5PV210 two phys
+	  are available - device and host.
+
 config PHY_EXYNOS4210_USB2
 	bool "Support for Exynos 4210"
 	depends on PHY_SAMSUNG_USB2
drivers/phy/Makefile +1 -0
index b4f1d57..2983808 100644
@@ -18,5 +18,6 @@ phy-exynos-usb2-y			+= phy-samsung-usb2.o
 phy-exynos-usb2-$(CONFIG_PHY_EXYNOS4210_USB2)	+= phy-exynos4210-usb2.o
 phy-exynos-usb2-$(CONFIG_PHY_EXYNOS4X12_USB2)	+= phy-exynos4x12-usb2.o
 phy-exynos-usb2-$(CONFIG_PHY_EXYNOS5250_USB2)	+= phy-exynos5250-usb2.o
+phy-exynos-usb2-$(CONFIG_PHY_S5PV210_USB2)	+= phy-s5pv210-usb2.o
 obj-$(CONFIG_PHY_EXYNOS5_USBDRD)	+= phy-exynos5-usbdrd.o
 obj-$(CONFIG_PHY_XGENE)			+= phy-xgene.o
drivers/phy/phy-s5pv210-usb2.c new file +187 -0

187 lines not on this page · raw message

drivers/phy/phy-samsung-usb2.c +6 -0
index 8a8c6bc..6d7439c 100644
@@ -87,6 +87,12 @@ static struct phy *samsung_usb2_phy_xlate(struct device *dev,
 }
 
 static const struct of_device_id samsung_usb2_phy_of_match[] = {
+#ifdef CONFIG_PHY_S5PV210_USB2
+	{
+		.compatible = "samsung,s5pv210-usb2-phy",
+		.data = &s5pv210_usb2_phy_config,
+	},
+#endif
 #ifdef CONFIG_PHY_EXYNOS4210_USB2
 	{
 		.compatible = "samsung,exynos4210-usb2-phy",
drivers/phy/phy-samsung-usb2.h +1 -0
index 45b3170..1c55795 100644
@@ -61,6 +61,7 @@ struct samsung_usb2_phy_config {
 	bool has_mode_switch;
 };
 
+extern const struct samsung_usb2_phy_config s5pv210_usb2_phy_config;
 extern const struct samsung_usb2_phy_config exynos4210_usb2_phy_config;
 extern const struct samsung_usb2_phy_config exynos4x12_usb2_phy_config;
 extern const struct samsung_usb2_phy_config exynos5250_usb2_phy_config;
Signature · 1 line
1.9.3
#15 lore raw

PATCH 8/19 ARM: s5pv210: Add board file for boot using Device Tree

In reply to Tomasz Figa

From: Mateusz Krawczuk <[email protected]>

This patch adds board file that will be used to boot S5PV210/S5PC110-based boards using Device Tree.

[t.figa: Rebased and cleaned-up a bit.]
---
 arch/arm/mach-s5pv210/Kconfig   | 14 +++++++++
 arch/arm/mach-s5pv210/Makefile  |  2 +-
 arch/arm/mach-s5pv210/s5pv210.c | 68 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 83 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-s5pv210/s5pv210.c
arch/arm/mach-s5pv210/Kconfig +14 -0
index f60f286..ed492cf 100644
@@ -194,6 +194,20 @@ config MACH_TORBRECK
 	help
 	  Machine support for aESOP Torbreck
 
+config MACH_S5PV210_DT
+	bool "Samsung S5PV210/S5PC110 machine using Device Tree"
+	select CLKSRC_OF
+	select CPU_S5PV210
+	select PINCTRL
+	select PINCTRL_EXYNOS
+	select USE_OF
+	help
+	  Machine support for Samsung S5PV210/S5PC110 machines with Device Tree
+	  enabled.
+	  Select this if a fdt blob is available for your S5PV210 SoC based
+	  board.
+	  Note: This is under development and not all peripherals can be
+	  supported with this machine file.
 endmenu
 
 endif
arch/arm/mach-s5pv210/Makefile +1 -1
index 08358bb..8d87b10 100644
@@ -24,7 +24,7 @@ obj-$(CONFIG_MACH_GONI)		+= mach-goni.o
 obj-$(CONFIG_MACH_SMDKC110)	+= mach-smdkc110.o
 obj-$(CONFIG_MACH_SMDKV210)	+= mach-smdkv210.o
 obj-$(CONFIG_MACH_TORBRECK)	+= mach-torbreck.o
-
+obj-$(CONFIG_MACH_S5PV210_DT)	+= s5pv210.o
 # device support
 
 obj-y				+= dev-audio.o
arch/arm/mach-s5pv210/s5pv210.c new file +68 -0

68 lines not on this page · raw message

Signature · 1 line
1.9.3
#16 lore raw

PATCH 9/19 ARM: Samsung: DT: Add Device tree for s5pv210

In reply to Tomasz Figa

From: Mateusz Krawczuk <[email protected]>

Add generic device tree for s5pv210 and s5pv210-pinctrl

---
 arch/arm/boot/dts/s5pv210-pinctrl.dtsi | 839 +++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/s5pv210.dtsi         | 633 +++++++++++++++++++++++++
 2 files changed, 1472 insertions(+)
 create mode 100644 arch/arm/boot/dts/s5pv210-pinctrl.dtsi
 create mode 100644 arch/arm/boot/dts/s5pv210.dtsi
arch/arm/boot/dts/s5pv210-pinctrl.dtsi new file +839 -0
new file mode 100644
index 0000000..8c71408
@@ -0,0 +1,839 @@
+/*
+ * Samsung's S5PV210 SoC device tree source
+ *
+ * Copyright (c) 2013-2014 Samsung Electronics, Co. Ltd.
+ *
+ * Mateusz Krawczuk <[email protected]>
+ * Tomasz Figa <[email protected]>
+ *
+ * Samsung's S5PV210 SoC device nodes are listed in this file. S5PV210
+ * based board files can include this file and provide values for board specfic
+ * bindings.
+ *
+ * Note: This file does not include device nodes for all the controllers in
+ * S5PV210 SoC. As device tree coverage for S5PV210 increases, additional
+ * nodes can be added to this file.
+ *
+ * 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.
+ */
+
+&pinctrl0 {
+	gpa0: gpa0 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpa1: gpa1 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpb: gpb {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpc0: gpc0 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpc1: gpc1 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpd0: gpd0 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpd1: gpd1 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpe0: gpe0 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpe1: gpe1 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpf0: gpf0 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpf1: gpf1 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpf2: gpf2 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpf3: gpf3 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpg0: gpg0 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpg1: gpg1 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpg2: gpg2 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpg3: gpg3 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpj0: gpj0 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpj1: gpj1 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpj2: gpj2 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpj3: gpj3 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpj4: gpj4 {
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	gpgi: gpgi {
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+
+	mp01: mp01 {
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+
+	mp02: mp02 {
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+
+	mp03: mp03 {
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+
+	mp04: mp04 {
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+
+	mp05: mp05 {
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+
+	mp06: mp06 {
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+
+	mp07: mp07 {
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+
+	gph0: gph0 {
+		gpio-controller;
+		interrupt-controller;
+		interrupt-parent = <&vic0>;
+		interrupts = <0>, <1>, <2>, <3>,
+				<4>, <5>, <6>, <7>;
+		#gpio-cells = <2>;
+		#interrupt-cells = <2>;
+	};
+
+	gph1: gph1 {
+		gpio-controller;
+		interrupt-controller;
+		interrupt-parent = <&vic0>;
+		interrupts = <8>, <9>, <10>, <11>,
+				<12>, <13>, <14>, <15>;
+		#gpio-cells = <2>;
+		#interrupt-cells = <2>;
+	};
+
+	gph2: gph2 {
+		gpio-controller;
+		#gpio-cells = <2>;
+		#interrupt-cells = <2>;
+	};
+
+	gph3: gph3 {
+		gpio-controller;
+		#gpio-cells = <2>;
+		#interrupt-cells = <2>;
+	};
+
+	uart0_data: uart0-data {
+		samsung,pins = "gpa0-0", "gpa0-1";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	uart0_fctl: uart0-fctl {
+		samsung,pins = "gpa0-2", "gpa0-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	uart1_data: uart1-data {
+		samsung,pins = "gpa0-4", "gpa0-5";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	uart1_fctl: uart1-fctl {
+		samsung,pins = "gpa0-6", "gpa0-7";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	uart2_data: uart2-data {
+		samsung,pins = "gpa1-0", "gpa1-1";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	uart2_fctl: uart2-fctl {
+		samsung,pins = "gpa1-2", "gpa1-3";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	uart3_data: uart3-data {
+		samsung,pins = "gpa1-2", "gpa1-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	uart_audio: uart-audio {
+		samsung,pins = "gpa1-2", "gpa1-3";
+		samsung,pin-function = <4>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	spi0_bus: spi0-bus {
+		samsung,pins = "gpb-0", "gpb-2", "gpb-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <0>;
+	};
+
+	spi1_bus: spi1-bus {
+		samsung,pins = "gpb-4", "gpb-6", "gpb-7";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <0>;
+	};
+
+	i2s0_bus: i2s0-bus {
+		samsung,pins = "gpi-0", "gpi-1", "gpi-2", "gpi-3",
+				"gpi-4", "gpi-5", "gpi-6";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	i2s1_bus: i2s1-bus {
+		samsung,pins = "gpc0-0", "gpc0-1", "gpc0-2", "gpc0-3",
+				"gpc0-4";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	i2s2_bus: i2s2-bus {
+		samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3",
+				"gpc1-4";
+		samsung,pin-function = <4>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	pcm1_bus: pcm1-bus {
+		samsung,pins = "gpc0-0", "gpc0-1", "gpc0-2", "gpc0-3",
+				"gpc0-4";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	ac97_bus: ac97-bus {
+		samsung,pins = "gpc0-0", "gpc0-1", "gpc0-2", "gpc0-3",
+				"gpc0-4";
+		samsung,pin-function = <4>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	i2s2_bus: i2s2-bus {
+		samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3",
+				"gpc1-4";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	pcm2_bus: pcm2-bus {
+		samsung,pins = "gpc1-0", "gpc1-1", "gpc1-2", "gpc1-3",
+				"gpc1-4";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	spdif_bus: spdif-bus {
+		samsung,pins = "gpc1-0", "gpc1-1";
+		samsung,pin-function = <4>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	spi2_bus: spi2-bus {
+		samsung,pins = "gpc1-1", "gpc1-2", "gpc1-3", "gpc1-4";
+		samsung,pin-function = <5>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <0>;
+	};
+
+	i2c0_bus: i2c0-bus {
+		samsung,pins = "gpd1-0", "gpd1-1";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <0>;
+	};
+
+	i2c1_bus: i2c1-bus {
+		samsung,pins = "gpd1-2", "gpd1-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <0>;
+	};
+
+	i2c2_bus: i2c2-bus {
+		samsung,pins = "gpd1-4", "gpd1-5";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <0>;
+	};
+
+	pwm0_out: pwm0-out {
+		samsung,pins = "gpd0-0";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	pwm1_out: pwm1-out {
+		samsung,pins = "gpd0-1";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	pwm2_out: pwm2-out {
+		samsung,pins = "gpd0-2";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	pwm3_out: pwm3-out {
+		samsung,pins = "gpd0-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_row0: keypad-row-0 {
+		samsung,pins = "gph3-0";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_row1: keypad-row-1 {
+		samsung,pins = "gph3-1";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_row2: keypad-row-2 {
+		samsung,pins = "gph3-2";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_row3: keypad-row-3 {
+		samsung,pins = "gph3-3";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_row4: keypad-row-4 {
+		samsung,pins = "gph3-4";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_row5: keypad-row-5 {
+		samsung,pins = "gph3-5";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_row6: keypad-row-6 {
+		samsung,pins = "gph3-6";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_row7: keypad-row-7 {
+		samsung,pins = "gph3-7";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_col0: keypad-col-0 {
+		samsung,pins = "gph2-0";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_col1: keypad-col-1 {
+		samsung,pins = "gph2-1";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_col2: keypad-col-2 {
+		samsung,pins = "gph2-2";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_col3: keypad-col-3 {
+		samsung,pins = "gph2-3";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_col4: keypad-col-4 {
+		samsung,pins = "gph2-4";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_col5: keypad-col-5 {
+		samsung,pins = "gph2-5";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_col6: keypad-col-6 {
+		samsung,pins = "gph2-6";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	keypad_col7: keypad-col-7 {
+		samsung,pins = "gph2-7";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	sd0_clk: sd0-clk {
+		samsung,pins = "gpg0-0";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd0_cmd: sd0-cmd {
+		samsung,pins = "gpg0-1";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd0_cd: sd0-cd {
+		samsung,pins = "gpg0-2";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd0_bus1: sd0-bus-width1 {
+		samsung,pins = "gpg0-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd0_bus4: sd0-bus-width4 {
+		samsung,pins = "gpg0-3", "gpg0-4", "gpg0-5", "gpg0-6";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd0_bus8: sd0-bus-width8 {
+		samsung,pins = "gpg1-3", "gpg1-4", "gpg1-5", "gpg1-6";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd1_clk: sd1-clk {
+		samsung,pins = "gpg1-0";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd1_cmd: sd1-cmd {
+		samsung,pins = "gpg1-1";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd1_cd: sd1-cd {
+		samsung,pins = "gpg1-2";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd1_bus1: sd1-bus-width1 {
+		samsung,pins = "gpg1-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd1_bus4: sd1-bus-width4 {
+		samsung,pins = "gpg1-3", "gpg1-4", "gpg1-5", "gpg1-6";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd2_clk: sd2-clk {
+		samsung,pins = "gpg2-0";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd2_cmd: sd2-cmd {
+		samsung,pins = "gpg2-1";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd2_cd: sd2-cd {
+		samsung,pins = "gpg2-2";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd2_bus1: sd2-bus-width1 {
+		samsung,pins = "gpg2-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd2_bus4: sd2-bus-width4 {
+		samsung,pins = "gpg2-3", "gpg2-4", "gpg2-5", "gpg2-6";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd2_bus8: sd2-bus-width8 {
+		samsung,pins = "gpg3-3", "gpg3-4", "gpg3-5", "gpg3-6";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd3_clk: sd3-clk {
+		samsung,pins = "gpg3-0";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd3_cmd: sd3-cmd {
+		samsung,pins = "gpg3-1";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd3_cd: sd3-cd {
+		samsung,pins = "gpg3-2";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd3_bus1: sd3-bus-width1 {
+		samsung,pins = "gpg3-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd3_bus4: sd3-bus-width4 {
+		samsung,pins = "gpg3-3", "gpg3-4", "gpg3-5", "gpg3-6";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <2>;
+		samsung,pin-drv = <3>;
+	};
+
+	eint0: ext-int0 {
+		samsung,pins = "gph0-0";
+		samsung,pin-function = <0xf>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	eint8: ext-int8 {
+		samsung,pins = "gph1-0";
+		samsung,pin-function = <0xf>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	eint15: ext-int15 {
+		samsung,pins = "gph1-7";
+		samsung,pin-function = <0xf>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	eint16: ext-int16 {
+		samsung,pins = "gph2-0";
+		samsung,pin-function = <0xf>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	eint31: ext-int31 {
+		samsung,pins = "gph3-7";
+		samsung,pin-function = <0xf>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	cam_port_a_io: cam-port-a-io {
+		samsung,pins = "gpe0-0", "gpe0-1", "gpe0-2", "gpe0-3",
+				"gpe0-4", "gpe0-5", "gpe0-6", "gpe0-7",
+				"gpe1-0", "gpe1-1", "gpe1-2", "gpe1-4";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	cam_port_a_clk_active: cam-port-a-clk-active {
+		samsung,pins = "gpe1-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <3>;
+	};
+
+	cam_port_a_clk_idle: cam-port-a-clk-idle {
+		samsung,pins = "gpe1-3";
+		samsung,pin-function = <0>;
+		samsung,pin-pud = <1>;
+		samsung,pin-drv = <0>;
+	};
+
+	cam_port_b_io: cam-port-b-io {
+		samsung,pins = "gpj0-0", "gpj0-1", "gpj0-2", "gpj0-3",
+				"gpj0-4", "gpj0-5", "gpj0-6", "gpj0-7",
+				"gpj1-0", "gpj1-1", "gpj1-2", "gpj1-4";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	cam_port_b_clk_active: cam-port-b-clk-active {
+		samsung,pins = "gpj1-3";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <3>;
+	};
+
+	cam_port_b_clk_idle: cam-port-b-clk-idle {
+		samsung,pins = "gpj1-3";
+		samsung,pin-function = <0>;
+		samsung,pin-pud = <1>;
+		samsung,pin-drv = <0>;
+	};
+
+		lcd_ctrl: lcd-ctrl {
+		samsung,pins = "gpd0-0", "gpd0-1";
+		samsung,pin-function = <3>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	lcd_sync: lcd-sync {
+		samsung,pins = "gpf0-0", "gpf0-1";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	lcd_clk: lcd-clk {
+		samsung,pins = "gpf0-0", "gpf0-1", "gpf0-2", "gpf0-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+
+	lcd_data24: lcd-data-width24 {
+		samsung,pins =  "gpf0-4", "gpf0-5", "gpf0-6", "gpf0-7",
+				"gpf1-0", "gpf1-1", "gpf1-2", "gpf1-3",
+				"gpf1-4", "gpf1-5", "gpf1-6", "gpf1-7",
+				"gpf2-0", "gpf2-1", "gpf2-2", "gpf2-3",
+				"gpf2-4", "gpf2-5", "gpf2-6", "gpf2-7",
+				"gpf3-0", "gpf3-1", "gpf3-2", "gpf3-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <0>;
+	};
+};
arch/arm/boot/dts/s5pv210.dtsi new file +633 -0

633 lines not on this page · raw message

Signature · 1 line
1.9.3
#17 lore raw

PATCH 10/19 ARM: Samsung: DT: Add Device tree for S5PC110/S5PV210 Boards

In reply to Tomasz Figa

From: Mateusz Krawczuk <[email protected]>

Add DTS for s5pc110 boards: goni, aquila, smdkc110
s5pv210: smdkv210, tiny210, torbreck

[t.figa: Rebased, fixed merge conflicts, neatened.]
---
 arch/arm/boot/dts/Makefile             |   5 +
 arch/arm/boot/dts/s5pv210-aquila.dts   | 392 ++++++++++++++++++++++++++++
 arch/arm/boot/dts/s5pv210-goni.dts     | 449 +++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/s5pv210-smdkc110.dts |  78 ++++++
 arch/arm/boot/dts/s5pv210-smdkv210.dts | 238 +++++++++++++++++
 arch/arm/boot/dts/s5pv210-torbreck.dts |  92 +++++++
 6 files changed, 1254 insertions(+)
 create mode 100644 arch/arm/boot/dts/s5pv210-aquila.dts
 create mode 100644 arch/arm/boot/dts/s5pv210-goni.dts
 create mode 100644 arch/arm/boot/dts/s5pv210-smdkc110.dts
 create mode 100644 arch/arm/boot/dts/s5pv210-smdkv210.dts
 create mode 100644 arch/arm/boot/dts/s5pv210-torbreck.dts
arch/arm/boot/dts/Makefile +5 -0
index 5986ff6..386c8d8 100644
@@ -321,6 +321,11 @@ dtb-$(CONFIG_ARCH_QCOM) += \
 dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb
 dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \
 	s3c6410-smdk6410.dtb
+dtb-$(CONFIG_ARCH_S5PV210) += s5pv210-aquila.dtb \
+	s5pv210-goni.dtb \
+	s5pv210-smdkc110.dtb \
+	s5pv210-smdkv210.dtb \
+	s5pv210-torbreck.dtb
 dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \
 	r8a7740-armadillo800eva.dtb \
 	r8a7778-bockw.dtb \
arch/arm/boot/dts/s5pv210-aquila.dts new file +392 -0

392 lines not on this page · raw message

arch/arm/boot/dts/s5pv210-goni.dts new file +449 -0

449 lines not on this page · raw message

arch/arm/boot/dts/s5pv210-smdkc110.dts new file +78 -0

78 lines not on this page · raw message

arch/arm/boot/dts/s5pv210-smdkv210.dts new file +238 -0

238 lines not on this page · raw message

arch/arm/boot/dts/s5pv210-torbreck.dts new file +92 -0

92 lines not on this page · raw message

Signature · 1 line
1.9.3
#18 lore raw

PATCH 11/19 ARM: S5PV210: Remove support for board files

In reply to Tomasz Figa

Since all in-tree boards have been moved to device tree, we can now drop legacy code and make mach-s5pv210 DT-only. This patch does it.

---
 arch/arm/mach-s5pv210/Kconfig            | 173 ------
 arch/arm/mach-s5pv210/Makefile           |  19 -
 arch/arm/mach-s5pv210/common.c           | 281 ----------
 arch/arm/mach-s5pv210/common.h           |  17 -
 arch/arm/mach-s5pv210/dev-audio.c        | 246 ---------
 arch/arm/mach-s5pv210/dma.c              | 130 -----
 arch/arm/mach-s5pv210/mach-aquila.c      | 687 -----------------------
 arch/arm/mach-s5pv210/mach-goni.c        | 915 -------------------------------
 arch/arm/mach-s5pv210/mach-smdkc110.c    | 159 ------
 arch/arm/mach-s5pv210/mach-smdkv210.c    | 336 ------------
 arch/arm/mach-s5pv210/mach-torbreck.c    | 135 -----
 arch/arm/mach-s5pv210/pm.c               |  24 +-
 arch/arm/mach-s5pv210/setup-fb-24bpp.c   |  49 --
 arch/arm/mach-s5pv210/setup-fimc.c       |  43 --
 arch/arm/mach-s5pv210/setup-i2c0.c       |   6 +-
 arch/arm/mach-s5pv210/setup-i2c1.c       |  28 -
 arch/arm/mach-s5pv210/setup-i2c2.c       |  28 -
 arch/arm/mach-s5pv210/setup-ide.c        |  39 --
 arch/arm/mach-s5pv210/setup-keypad.c     |  24 -
 arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 103 ----
 arch/arm/mach-s5pv210/setup-spi.c        |  34 --
 arch/arm/mach-s5pv210/setup-usb-phy.c    |  95 ----
 arch/arm/plat-samsung/include/plat/cpu.h |   1 -
 23 files changed, 8 insertions(+), 3564 deletions(-)
 delete mode 100644 arch/arm/mach-s5pv210/common.c
 delete mode 100644 arch/arm/mach-s5pv210/dev-audio.c
 delete mode 100644 arch/arm/mach-s5pv210/dma.c
 delete mode 100644 arch/arm/mach-s5pv210/mach-aquila.c
 delete mode 100644 arch/arm/mach-s5pv210/mach-goni.c
 delete mode 100644 arch/arm/mach-s5pv210/mach-smdkc110.c
 delete mode 100644 arch/arm/mach-s5pv210/mach-smdkv210.c
 delete mode 100644 arch/arm/mach-s5pv210/mach-torbreck.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-fb-24bpp.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-fimc.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-i2c1.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-i2c2.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-ide.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-keypad.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-sdhci-gpio.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-spi.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-usb-phy.c
arch/arm/mach-s5pv210/Kconfig +0 -173
index ed492cf..d6d0f92 100644
@@ -19,181 +19,8 @@ config CPU_S5PV210
 	help
 	  Enable S5PV210 CPU support
 
-config S5PV210_SETUP_I2C1
-	bool
-	help
-	  Common setup code for i2c bus 1.
-
-config S5PV210_SETUP_I2C2
-	bool
-	help
-	  Common setup code for i2c bus 2.
-
-config S5PV210_SETUP_IDE
-	bool
-	help
-	  Common setup code for S5PV210 IDE GPIO configurations
-
-config S5PV210_SETUP_FB_24BPP
-	bool
-	help
-          Common setup code for S5PV210 with an 24bpp RGB display helper.
-
-config S5PV210_SETUP_KEYPAD
-	bool
-	help
-	  Common setup code for keypad.
-
-config S5PV210_SETUP_SDHCI
-        bool
-        select S5PV210_SETUP_SDHCI_GPIO
-        help
-          Internal helper functions for S5PV210 based SDHCI systems
-
-config S5PV210_SETUP_SDHCI_GPIO
-	bool
-	help
-	  Common setup code for SDHCI gpio.
-
-config S5PV210_SETUP_FIMC
-	bool
-	help
-	  Common setup code for the camera interfaces.
-
-config S5PV210_SETUP_SPI
-	bool
-	help
-	  Common setup code for SPI GPIO configurations.
-
-config S5PV210_SETUP_USB_PHY
-	bool
-	help
-	  Common setup code for USB PHY controller
-
-menu "S5PC110 Machines"
-
-config MACH_AQUILA
-	bool "Aquila"
-	select CPU_S5PV210
-	select S3C_DEV_FB
-	select S3C_DEV_HSMMC
-	select S3C_DEV_HSMMC1
-	select S3C_DEV_HSMMC2
-	select S5PV210_SETUP_FB_24BPP
-	select S5PV210_SETUP_SDHCI
-	select S5PV210_SETUP_USB_PHY
-	select S5P_DEV_FIMC0
-	select S5P_DEV_FIMC1
-	select S5P_DEV_FIMC2
-	select S5P_DEV_ONENAND
-	help
-	  Machine support for the Samsung Aquila target based on S5PC110 SoC
-
-config MACH_GONI
-	bool "GONI"
-	select CPU_S5PV210
-	select S3C_DEV_FB
-	select S3C_DEV_HSMMC
-	select S3C_DEV_HSMMC1
-	select S3C_DEV_HSMMC2
-	select S3C_DEV_I2C1
-	select S3C_DEV_I2C2
-	select S3C_DEV_USB_HSOTG
-	select S5PV210_SETUP_FB_24BPP
-	select S5PV210_SETUP_FIMC
-	select S5PV210_SETUP_I2C1
-	select S5PV210_SETUP_I2C2
-	select S5PV210_SETUP_KEYPAD
-	select S5PV210_SETUP_SDHCI
-	select S5PV210_SETUP_USB_PHY
-	select S5P_DEV_FIMC0
-	select S5P_DEV_FIMC1
-	select S5P_DEV_FIMC2
-	select S5P_DEV_MFC
-	select S5P_DEV_ONENAND
-	select S5P_DEV_TV
-	select S5P_GPIO_INT
-	select SAMSUNG_DEV_KEYPAD
-	help
-	  Machine support for Samsung GONI board
-	  S5PC110(MCP) is one of package option of S5PV210
-
-config MACH_SMDKC110
-	bool "SMDKC110"
-	select CPU_S5PV210
-	select S3C_DEV_I2C1
-	select S3C_DEV_I2C2
-	select S3C_DEV_RTC
-	select S3C_DEV_WDT
-	select S5PV210_SETUP_I2C1
-	select S5PV210_SETUP_I2C2
-	select S5PV210_SETUP_IDE
-	select S5P_DEV_FIMC0
-	select S5P_DEV_FIMC1
-	select S5P_DEV_FIMC2
-	select S5P_DEV_MFC
-	select SAMSUNG_DEV_IDE
-	help
-	  Machine support for Samsung SMDKC110
-	  S5PC110(MCP) is one of package option of S5PV210
-
-endmenu
-
 menu "S5PV210 Machines"
 
-config MACH_SMDKV210
-	bool "SMDKV210"
-	select CPU_S5PV210
-	select S3C_DEV_FB
-	select S3C_DEV_HSMMC
-	select S3C_DEV_HSMMC1
-	select S3C_DEV_HSMMC2
-	select S3C_DEV_HSMMC3
-	select S3C_DEV_I2C1
-	select S3C_DEV_I2C2
-	select S3C_DEV_RTC
-	select S3C_DEV_USB_HSOTG
-	select S3C_DEV_WDT
-	select S5PV210_SETUP_FB_24BPP
-	select S5PV210_SETUP_I2C1
-	select S5PV210_SETUP_I2C2
-	select S5PV210_SETUP_IDE
-	select S5PV210_SETUP_KEYPAD
-	select S5PV210_SETUP_SDHCI
-	select S5PV210_SETUP_USB_PHY
-	select S5P_DEV_FIMC0
-	select S5P_DEV_FIMC1
-	select S5P_DEV_FIMC2
-	select S5P_DEV_JPEG
-	select S5P_DEV_MFC
-	select SAMSUNG_DEV_ADC
-	select SAMSUNG_DEV_BACKLIGHT
-	select SAMSUNG_DEV_IDE
-	select SAMSUNG_DEV_KEYPAD
-	select SAMSUNG_DEV_PWM
-	select SAMSUNG_DEV_TS
-	help
-	  Machine support for Samsung SMDKV210
-
-config MACH_TORBRECK
-	bool "Torbreck"
-	select ARCH_SPARSEMEM_ENABLE
-	select CPU_S5PV210
-	select S3C_DEV_HSMMC
-	select S3C_DEV_HSMMC1
-	select S3C_DEV_HSMMC2
-	select S3C_DEV_HSMMC3
-	select S3C_DEV_I2C1
-	select S3C_DEV_I2C2
-	select S3C_DEV_RTC
-	select S3C_DEV_WDT
-	select S5PV210_SETUP_I2C1
-	select S5PV210_SETUP_I2C2
-	select S5PV210_SETUP_SDHCI
-	select SAMSUNG_DEV_IDE
-	help
-	  Machine support for aESOP Torbreck
-
 config MACH_S5PV210_DT
 	bool "Samsung S5PV210/S5PC110 machine using Device Tree"
 	select CLKSRC_OF
arch/arm/mach-s5pv210/Makefile +0 -19
index 8d87b10..83993fc 100644
@@ -12,30 +12,11 @@ obj-				:=
 
 # Core
 
-obj-y				+= common.o
 obj-$(CONFIG_PM)		+= pm.o
 
-obj-y				+= dma.o
-
 # machine support
 
-obj-$(CONFIG_MACH_AQUILA)	+= mach-aquila.o
-obj-$(CONFIG_MACH_GONI)		+= mach-goni.o
-obj-$(CONFIG_MACH_SMDKC110)	+= mach-smdkc110.o
-obj-$(CONFIG_MACH_SMDKV210)	+= mach-smdkv210.o
-obj-$(CONFIG_MACH_TORBRECK)	+= mach-torbreck.o
 obj-$(CONFIG_MACH_S5PV210_DT)	+= s5pv210.o
 # device support
 
-obj-y				+= dev-audio.o
-
 obj-y					+= setup-i2c0.o
-obj-$(CONFIG_S5PV210_SETUP_FB_24BPP)	+= setup-fb-24bpp.o
-obj-$(CONFIG_S5PV210_SETUP_FIMC)	+= setup-fimc.o
-obj-$(CONFIG_S5PV210_SETUP_I2C1)	+= setup-i2c1.o
-obj-$(CONFIG_S5PV210_SETUP_I2C2)	+= setup-i2c2.o
-obj-$(CONFIG_S5PV210_SETUP_IDE)		+= setup-ide.o
-obj-$(CONFIG_S5PV210_SETUP_KEYPAD)	+= setup-keypad.o
-obj-$(CONFIG_S5PV210_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio.o
-obj-$(CONFIG_S5PV210_SETUP_SPI)		+= setup-spi.o
-obj-$(CONFIG_S5PV210_SETUP_USB_PHY) += setup-usb-phy.o
arch/arm/mach-s5pv210/common.c deleted +0 -0
deleted file mode 100644
index 30bd542..0000000
arch/arm/mach-s5pv210/common.h +0 -17
index 083ffe7..0b694c7 100644
@@ -12,22 +12,5 @@
 #ifndef __ARCH_ARM_MACH_S5PV210_COMMON_H
 #define __ARCH_ARM_MACH_S5PV210_COMMON_H
 
-#include <linux/reboot.h>
-
-void s5pv210_clk_init(unsigned long xxti_f, unsigned long xusbxti_f,
-		      void __iomem *reg_base);
-
-void s5pv210_init_io(struct map_desc *mach_desc, int size);
-void s5pv210_init_irq(void);
-
-void s5pv210_register_clocks(void);
-void s5pv210_setup_clocks(void);
-
-void s5pv210_restart(enum reboot_mode mode, const char *cmd);
-
-extern  int s5pv210_init(void);
-extern void s5pv210_map_io(void);
-extern void s5pv210_init_clocks(int xtal);
-extern void s5pv210_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 
 #endif /* __ARCH_ARM_MACH_S5PV210_COMMON_H */
arch/arm/mach-s5pv210/dev-audio.c deleted +0 -0
deleted file mode 100644
index 2d67361..0000000
arch/arm/mach-s5pv210/dma.c deleted +0 -0
deleted file mode 100644
index b8337e2..0000000
arch/arm/mach-s5pv210/mach-aquila.c deleted +0 -0
deleted file mode 100644
index cc37eda..0000000
arch/arm/mach-s5pv210/mach-goni.c deleted +0 -0
deleted file mode 100644
index 315926f..0000000
arch/arm/mach-s5pv210/mach-smdkc110.c deleted +0 -0
deleted file mode 100644
index 448e1d2..0000000
arch/arm/mach-s5pv210/mach-smdkv210.c deleted +0 -0
deleted file mode 100644
index 6816ccd..0000000
arch/arm/mach-s5pv210/mach-torbreck.c deleted +0 -0
deleted file mode 100644
index 1578055..0000000
arch/arm/mach-s5pv210/pm.c +4 -20
index dd5bfec..00d1523 100644
@@ -75,26 +75,6 @@ static void s5pv210_pm_prepare(void)
 	s3c_pm_do_save(s5pv210_core_save, ARRAY_SIZE(s5pv210_core_save));
 }
 
-static int s5pv210_pm_add(struct device *dev, struct subsys_interface *sif)
-{
-	pm_cpu_prep = s5pv210_pm_prepare;
-	pm_cpu_sleep = s5pv210_cpu_suspend;
-
-	return 0;
-}
-
-static struct subsys_interface s5pv210_pm_interface = {
-	.name		= "s5pv210_pm",
-	.subsys		= &s5pv210_subsys,
-	.add_dev	= s5pv210_pm_add,
-};
-
-static __init int s5pv210_pm_drvinit(void)
-{
-	return subsys_interface_register(&s5pv210_pm_interface);
-}
-arch_initcall(s5pv210_pm_drvinit);
-
 static void s5pv210_pm_resume(void)
 {
 	u32 tmp;
@@ -114,6 +94,10 @@ static struct syscore_ops s5pv210_pm_syscore_ops = {
 static __init int s5pv210_pm_syscore_init(void)
 {
 	register_syscore_ops(&s5pv210_pm_syscore_ops);
+
+	pm_cpu_prep = s5pv210_pm_prepare;
+	pm_cpu_sleep = s5pv210_cpu_suspend;
+
 	return 0;
 }
 arch_initcall(s5pv210_pm_syscore_init);
arch/arm/mach-s5pv210/setup-fb-24bpp.c deleted +0 -0
deleted file mode 100644
index 55103c8..0000000
arch/arm/mach-s5pv210/setup-fimc.c deleted +0 -0
deleted file mode 100644
index 54cc5b11..0000000
arch/arm/mach-s5pv210/setup-i2c0.c +4 -2
index 4a15849..3658416 100644
@@ -23,6 +23,8 @@ struct platform_device; /* don't need the contents */
 
 void s3c_i2c0_cfg_gpio(struct platform_device *dev)
 {
-	s3c_gpio_cfgall_range(S5PV210_GPD1(0), 2,
-			      S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
+	/*
+	 * FIXME: Used only by legacy code that is not used anymore,
+	 * but still compiled in, until all dependencies are removed.
+	 */
 }
arch/arm/mach-s5pv210/setup-i2c1.c deleted +0 -0
deleted file mode 100644
index 4777f6b..0000000
arch/arm/mach-s5pv210/setup-i2c2.c deleted +0 -0
deleted file mode 100644
index bbce6c7..0000000
arch/arm/mach-s5pv210/setup-ide.c deleted +0 -0
deleted file mode 100644
index ea123d5..0000000
arch/arm/mach-s5pv210/setup-keypad.c deleted +0 -0
deleted file mode 100644
index c56420a..0000000
arch/arm/mach-s5pv210/setup-sdhci-gpio.c deleted +0 -0
deleted file mode 100644
index 0512ada..0000000
arch/arm/mach-s5pv210/setup-spi.c deleted +0 -0
deleted file mode 100644
index 81aecc1..0000000
arch/arm/mach-s5pv210/setup-usb-phy.c deleted +0 -0
deleted file mode 100644
index b2ee533..0000000
arch/arm/plat-samsung/include/plat/cpu.h +0 -1
index d1d4659..995e56e 100644
@@ -149,7 +149,6 @@ extern struct bus_type s3c2440_subsys;
 extern struct bus_type s3c2442_subsys;
 extern struct bus_type s3c2443_subsys;
 extern struct bus_type s3c6410_subsys;
-extern struct bus_type s5pv210_subsys;
 
 extern void (*s5pc1xx_idle)(void);
 
Signature · 1 line
1.9.3
#19 lore raw

Re: [PATCH 11/19] ARM: S5PV210: Remove support for board files

Quoted 5 lines · Tomasz Figa

Since all in-tree boards have been moved to device tree, we can now drop legacy code and make mach-s5pv210 DT-only. This patch does it.

---

This patch showed up in next-20140716 too.

Quoted 69 lines

[...]

arch/arm/mach-s5pv210/Kconfig +0 -60
index ed492cf..d6d0f92 100644
@@ -19,181 +19,8 @@ config CPU_S5PV210
 	help
 	  Enable S5PV210 CPU support
 
-config S5PV210_SETUP_I2C1
-	bool
-	help
-	  Common setup code for i2c bus 1.
-
-config S5PV210_SETUP_I2C2
-	bool
-	help
-	  Common setup code for i2c bus 2.
-
-config S5PV210_SETUP_IDE
-	bool
-	help
-	  Common setup code for S5PV210 IDE GPIO configurations
-
-config S5PV210_SETUP_FB_24BPP
-	bool
-	help
-          Common setup code for S5PV210 with an 24bpp RGB display helper.
-
-config S5PV210_SETUP_KEYPAD
-	bool
-	help
-	  Common setup code for keypad.
-
-config S5PV210_SETUP_SDHCI
-        bool
-        select S5PV210_SETUP_SDHCI_GPIO
-        help
-          Internal helper functions for S5PV210 based SDHCI systems
-
-config S5PV210_SETUP_SDHCI_GPIO
-	bool
-	help
-	  Common setup code for SDHCI gpio.
-
-config S5PV210_SETUP_FIMC
-	bool
-	help
-	  Common setup code for the camera interfaces.
-
-config S5PV210_SETUP_SPI
-	bool
-	help
-	  Common setup code for SPI GPIO configurations.
-
-config S5PV210_SETUP_USB_PHY
-	bool
-	help
-	  Common setup code for USB PHY controller
-
-menu "S5PC110 Machines"
-
-config MACH_AQUILA
-	bool "Aquila"
-	select CPU_S5PV210
-	select S3C_DEV_FB
-	select S3C_DEV_HSMMC
-	select S3C_DEV_HSMMC1
-	select S3C_DEV_HSMMC2

arch/arm/mach-s5pv210/Kconfig config CPU_S5PV210 · line 91

Quoted 10 lines
arch/arm/mach-s5pv210/Kconfig +0 -10
-	select S5PV210_SETUP_FB_24BPP
-	select S5PV210_SETUP_SDHCI
-	select S5PV210_SETUP_USB_PHY
-	select S5P_DEV_FIMC0
-	select S5P_DEV_FIMC1
-	select S5P_DEV_FIMC2
-	select S5P_DEV_ONENAND
-	help
-	  Machine support for the Samsung Aquila target based on S5PC110 SoC
-

This symbol is still referenced in sound/soc/samsung/Kconfig.

Quoted 18 lines
arch/arm/mach-s5pv210/Kconfig +0 -18
-config MACH_GONI
-	bool "GONI"
-	select CPU_S5PV210
-	select S3C_DEV_FB
-	select S3C_DEV_HSMMC
-	select S3C_DEV_HSMMC1
-	select S3C_DEV_HSMMC2
-	select S3C_DEV_I2C1
-	select S3C_DEV_I2C2
-	select S3C_DEV_USB_HSOTG
-	select S5PV210_SETUP_FB_24BPP
-	select S5PV210_SETUP_FIMC
-	select S5PV210_SETUP_I2C1
-	select S5PV210_SETUP_I2C2
-	select S5PV210_SETUP_KEYPAD
-	select S5PV210_SETUP_SDHCI
-	select S5PV210_SETUP_USB_PHY
-	select S5P_DEV_FIMC0

arch/arm/mach-s5pv210/Kconfig config CPU_S5PV210 · line 119

Quoted 10 lines
arch/arm/mach-s5pv210/Kconfig +0 -10
-	select S5P_DEV_FIMC1
-	select S5P_DEV_FIMC2
-	select S5P_DEV_MFC
-	select S5P_DEV_ONENAND
-	select S5P_DEV_TV
-	select S5P_GPIO_INT
-	select SAMSUNG_DEV_KEYPAD
-	help
-	  Machine support for Samsung GONI board
-	  S5PC110(MCP) is one of package option of S5PV210

Ditto.

Quoted 8 lines
arch/arm/mach-s5pv210/Kconfig +0 -8
-config MACH_SMDKC110
-	bool "SMDKC110"
-	select CPU_S5PV210
-	select S3C_DEV_I2C1
-	select S3C_DEV_I2C2
-	select S3C_DEV_RTC
-	select S3C_DEV_WDT
-	select S5PV210_SETUP_I2C1

arch/arm/mach-s5pv210/Kconfig config CPU_S5PV210 · line 138

Quoted 10 lines
arch/arm/mach-s5pv210/Kconfig +0 -10
-	select S5PV210_SETUP_I2C2
-	select S5PV210_SETUP_IDE
-	select S5P_DEV_FIMC0
-	select S5P_DEV_FIMC1
-	select S5P_DEV_FIMC2
-	select S5P_DEV_MFC
-	select SAMSUNG_DEV_IDE
-	help
-	  Machine support for Samsung SMDKC110
-	  S5PC110(MCP) is one of package option of S5PV210

Ditto.

Quoted 28 lines
arch/arm/mach-s5pv210/Kconfig +0 -26
-endmenu
-
 menu "S5PV210 Machines"
 
-config MACH_SMDKV210
-	bool "SMDKV210"
-	select CPU_S5PV210
-	select S3C_DEV_FB
-	select S3C_DEV_HSMMC
-	select S3C_DEV_HSMMC1
-	select S3C_DEV_HSMMC2
-	select S3C_DEV_HSMMC3
-	select S3C_DEV_I2C1
-	select S3C_DEV_I2C2
-	select S3C_DEV_RTC
-	select S3C_DEV_USB_HSOTG
-	select S3C_DEV_WDT
-	select S5PV210_SETUP_FB_24BPP
-	select S5PV210_SETUP_I2C1
-	select S5PV210_SETUP_I2C2
-	select S5PV210_SETUP_IDE
-	select S5PV210_SETUP_KEYPAD
-	select S5PV210_SETUP_SDHCI
-	select S5PV210_SETUP_USB_PHY
-	select S5P_DEV_FIMC0
-	select S5P_DEV_FIMC1
-	select S5P_DEV_FIMC2
-	select S5P_DEV_JPEG

arch/arm/mach-s5pv210/Kconfig config CPU_S5PV210 · line 177

Quoted 10 lines
arch/arm/mach-s5pv210/Kconfig +0 -10
-	select S5P_DEV_MFC
-	select SAMSUNG_DEV_ADC
-	select SAMSUNG_DEV_BACKLIGHT
-	select SAMSUNG_DEV_IDE
-	select SAMSUNG_DEV_KEYPAD
-	select SAMSUNG_DEV_PWM
-	select SAMSUNG_DEV_TS
-	help
-	  Machine support for Samsung SMDKV210
-

Ditto.

Quoted 12 lines
arch/arm/mach-s5pv210/Kconfig +0 -12
-config MACH_TORBRECK
-	bool "Torbreck"
-	select ARCH_SPARSEMEM_ENABLE
-	select CPU_S5PV210
-	select S3C_DEV_HSMMC
-	select S3C_DEV_HSMMC1
-	select S3C_DEV_HSMMC2
-	select S3C_DEV_HSMMC3
-	select S3C_DEV_I2C1
-	select S3C_DEV_I2C2
-	select S3C_DEV_RTC
-	select S3C_DEV_WDT

arch/arm/mach-s5pv210/Kconfig config CPU_S5PV210 · line 26

Quoted 10 lines
arch/arm/mach-s5pv210/Kconfig +0 -7
-	select S5PV210_SETUP_I2C1
-	select S5PV210_SETUP_I2C2
-	select S5PV210_SETUP_SDHCI
-	select SAMSUNG_DEV_IDE
-	help
-	  Machine support for aESOP Torbreck
-
 config MACH_S5PV210_DT
 	bool "Samsung S5PV210/S5PC110 machine using Device Tree"
 	select CLKSRC_OF

I assume one or more patches to remove the references to these symbols in sound/soc/samsung/Kconfig are pending. Is that correct?

Paul Bolle

#20 lore raw

Re: [PATCH 11/19] ARM: S5PV210: Remove support for board files

Quoted 1 line · Paul Bolle

On Fri, 2014-07-04 at 19:48 +0200, Tomasz Figa wrote:

[snip]

Quoted 12 lines
Quoted 12 lines
arch/arm/mach-s5pv210/Kconfig +0 -12
-
-config MACH_AQUILA
-	bool "Aquila"
-	select CPU_S5PV210
-	select S3C_DEV_FB
-	select S3C_DEV_HSMMC
-	select S3C_DEV_HSMMC1
-	select S3C_DEV_HSMMC2
-	select S5PV210_SETUP_FB_24BPP
-	select S5PV210_SETUP_SDHCI
-	select S5PV210_SETUP_USB_PHY
-	select S5P_DEV_FIMC0
Quoted 8 lines

arch/arm/mach-s5pv210/Kconfig config CPU_S5PV210 · line 91

Quoted 6 lines
arch/arm/mach-s5pv210/Kconfig +0 -6
-	select S5P_DEV_FIMC1
-	select S5P_DEV_FIMC2
-	select S5P_DEV_ONENAND
-	help
-	  Machine support for the Samsung Aquila target based on S5PC110 SoC
-

This symbol is still referenced in sound/soc/samsung/Kconfig.

More code that I missed.

I believe that both sound card drivers for Goni and Aquilla could be replaced with simple cards in DT, so I'll send a follow-up patch for this.

Most likely the same is the case for SMDK boards, but they don't seem to have any active users (see cover letter for more details), which means that probably they could be simply dropped from sound/soc/samsung/Kconfig in another follow-up patch.

Best regards,
Tomasz

#21 lore raw

Re: [PATCH 11/19] ARM: S5PV210: Remove support for board files

Quoted 2 lines · Tomasz Figa

I believe that both sound card drivers for Goni and Aquilla could be replaced with simple cards in DT, so I'll send a follow-up patch for this.

References to MACH_GONI and MACH_AQUILA can still be seen in v3.17-rc3 and next-20140903. Note that as consequence SND_SOC_GONI_AQUILA_WM8994 can not be set anymore.

Quoted 4 lines

Most likely the same is the case for SMDK boards, but they don't seem to have any active users (see cover letter for more details), which means that probably they could be simply dropped from sound/soc/samsung/Kconfig in another follow-up patch.

Ditto for MACH_SMDKC100, MACH_SMDKC110, and MACH_SMDKV210. Note that here SND_SOC_SMDK_WM8580_PCM can not be set anymore.

(This is intended to be a gentile reminder. I hope it actually comes across like that.)

Paul Bolle

maintainer
#22 lore raw

Re: [PATCH 11/19] ARM: S5PV210: Remove support for board files

Quoted 14 lines · Paul Bolle
Quoted 2 lines · Tomasz Figa

I believe that both sound card drivers for Goni and Aquilla could be replaced with simple cards in DT, so I'll send a follow-up patch for this.

References to MACH_GONI and MACH_AQUILA can still be seen in v3.17-rc3 and next-20140903. Note that as consequence SND_SOC_GONI_AQUILA_WM8994 can not be set anymore.

Quoted 4 lines

Most likely the same is the case for SMDK boards, but they don't seem to have any active users (see cover letter for more details), which means that probably they could be simply dropped from sound/soc/samsung/Kconfig in another follow-up patch.

Quoted 5 lines

Ditto for MACH_SMDKC100, MACH_SMDKC110, and MACH_SMDKV210. Note that here SND_SOC_SMDK_WM8580_PCM can not be set anymore.

(This is intended to be a gentile reminder. I hope it actually comes across like that.)

At least I find those reminders useful. We clearly have a bug here that was recently introduced, and we should fix that.

I think it would be nice if you could submit a patch to remove the drivers from ASoC, then we can see if anybody complains.

Arnd

#23 lore raw

Re: [PATCH 11/19] ARM: S5PV210: Remove support for board files

Hi Arnd,

Quoted 2 lines · Arnd Bergmann

I think it would be nice if you could submit a patch to remove the drivers from ASoC, then we can see if anybody complains.

Just to know what I'm getting my self into: whom would you expect to send me agitated messages once those patches have landed?

Paul Bolle

maintainer
#24 lore raw

Re: [PATCH 11/19] ARM: S5PV210: Remove support for board files

Quoted 7 lines · On Friday 05 September 2014 14:04:18 Paul Bolle wrote:
Quoted 2 lines · Arnd Bergmann

I think it would be nice if you could submit a patch to remove the drivers from ASoC, then we can see if anybody complains.

Just to know what I'm getting my self into: whom would you expect to send me agitated messages once those patches have landed?

That would be somebody who is using their own patches on top of mainline and didn't notice that upstream broke under them ;-)

Arnd

#25 lore raw

PATCH 1/1 ASoC: samsung: Remove goni or aquila with the WM8994

In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann
Quoted 4 lines · Paul Bolle

References to MACH_GONI and MACH_AQUILA can still be seen in v3.17-rc3 and next-20140903. Note that as consequence SND_SOC_GONI_AQUILA_WM8994 can not be set anymore.

[...]

I think it would be nice if you could submit a patch to remove the drivers from ASoC, then we can see if anybody complains.

Same thing for v3.17-rc5 and next-20140918. Let's see if we can remove the goni or aquila with wm8994 driver.

Done on top of next-20140918. Untested.
--------->8---------
From: Paul Bolle <[email protected]>

Commit 28c8331d386a ("ARM: S5PV210: Remove support for board files") removed the Kconfig symbols MACH_GONI and MACH_AQUILA. As a result the dependencies of SND_SOC_GONI_AQUILA_WM8994 can never be met. So remove the unbuildable "SoC I2S Audio support for AQUILA/GONI - WM8994".

---
 sound/soc/samsung/Kconfig       |  11 --
 sound/soc/samsung/Makefile      |   2 -
 sound/soc/samsung/goni_wm8994.c | 304 ----------------------------------------
 3 files changed, 317 deletions(-)
 delete mode 100644 sound/soc/samsung/goni_wm8994.c
sound/soc/samsung/Kconfig +0 -11
index 55a38697443d..9d9b149ad977 100644
@@ -146,17 +146,6 @@ config SND_SOC_SMARTQ
 	select SND_SAMSUNG_I2S
 	select SND_SOC_WM8750
 
-config SND_SOC_GONI_AQUILA_WM8994
-	tristate "SoC I2S Audio support for AQUILA/GONI - WM8994"
-	depends on SND_SOC_SAMSUNG && (MACH_GONI || MACH_AQUILA)
-	depends on I2C=y
-	select SND_SAMSUNG_I2S
-	select MFD_WM8994
-	select SND_SOC_WM8994
-	help
-	  Say Y if you want to add support for SoC audio on goni or aquila
-	  with the WM8994.
-
 config SND_SOC_SAMSUNG_SMDK_SPDIF
 	tristate "SoC S/PDIF Audio support for SMDK"
 	depends on SND_SOC_SAMSUNG
sound/soc/samsung/Makefile +0 -2
index 91505ddaaf95..c30293a67176 100644
@@ -35,7 +35,6 @@ snd-soc-smdk-wm8994-objs := smdk_wm8994.o
 snd-soc-snow-objs := snow.o
 snd-soc-smdk-wm9713-objs := smdk_wm9713.o
 snd-soc-s3c64xx-smartq-wm8987-objs := smartq_wm8987.o
-snd-soc-goni-wm8994-objs := goni_wm8994.o
 snd-soc-smdk-spdif-objs := smdk_spdif.o
 snd-soc-smdk-wm8580pcm-objs := smdk_wm8580pcm.o
 snd-soc-smdk-wm8994pcm-objs := smdk_wm8994pcm.o
@@ -62,7 +61,6 @@ obj-$(CONFIG_SND_SOC_SNOW) += snd-soc-snow.o
 obj-$(CONFIG_SND_SOC_SAMSUNG_SMDK_WM9713) += snd-soc-smdk-wm9713.o
 obj-$(CONFIG_SND_SOC_SMARTQ) += snd-soc-s3c64xx-smartq-wm8987.o
 obj-$(CONFIG_SND_SOC_SAMSUNG_SMDK_SPDIF) += snd-soc-smdk-spdif.o
-obj-$(CONFIG_SND_SOC_GONI_AQUILA_WM8994) += snd-soc-goni-wm8994.o
 obj-$(CONFIG_SND_SOC_SMDK_WM8580_PCM) += snd-soc-smdk-wm8580pcm.o
 obj-$(CONFIG_SND_SOC_SMDK_WM8994_PCM) += snd-soc-smdk-wm8994pcm.o
 obj-$(CONFIG_SND_SOC_SPEYSIDE) += snd-soc-speyside.o
sound/soc/samsung/goni_wm8994.c deleted +0 -304

304 lines not on this page · raw message

Signature · 1 line
1.9.3
maintainer
#26 lore raw

Re: [PATCH] ASoC: samsung: Remove goni or aquila with the WM8994

Quoted 11 lines · Paul Bolle
Quoted 2 lines · Arnd Bergmann

I think it would be nice if you could submit a patch to remove the drivers from ASoC, then we can see if anybody complains.

Same thing for v3.17-rc5 and next-20140918. Let's see if we can remove the goni or aquila with wm8994 driver.

Done on top of next-20140918. Untested.
--------->8---------
From: Paul Bolle <[email protected]>

Please follow the patch submission process in SubmittingPatches.

#27 lore raw

Re: [PATCH] ASoC: samsung: Remove goni or aquila with the WM8994

Hi Mark,

Mark Brown schreef op do 18-09-2014 om 10:57 [-0700]:

Quoted 6 lines · Paul Bolle
Quoted 4 lines · Arnd Bergmann
Quoted 3 lines

I think it would be nice if you could submit a patch to remove the drivers from ASoC, then we can see if anybody complains.

Quoted 8 lines
Quoted 6 lines

Same thing for v3.17-rc5 and next-20140918. Let's see if we can remove the goni or aquila with wm8994 driver.

Done on top of next-20140918. Untested.
--------->8---------
From: Paul Bolle <[email protected]>

Please follow the patch submission process in SubmittingPatches.

Could you please be more specific? What part of SubmittingPatches have I skipped?

Is it the perhaps the use of scissors? Or the superfluous From: line? "git am -c" appears to handle this message (and the very similar message I also sent today) just fine.

Thanks,

Paul Bolle

maintainer
#28 lore raw

Re: [PATCH] ASoC: samsung: Remove goni or aquila with the WM8994

Quoted 7 lines · Paul Bolle

Mark Brown schreef op do 18-09-2014 om 10:57 [-0700]:

Quoted 5 lines · Paul Bolle
Quoted 4 lines

Done on top of next-20140918. Untested.
--------->8---------
From: Paul Bolle <[email protected]>

Quoted 8 lines
Quoted 1 line

Please follow the patch submission process in SubmittingPatches.

Could you please be more specific? What part of SubmittingPatches have I skipped?

Is it the perhaps the use of scissors? Or the superfluous From: line? "git am -c" appears to handle this message (and the very similar message I also sent today) just fine.

It's the fact that you've included the patch in the middle of the reply to another mail in the middle of a thread after some other stuff; you can tell this isn't the normal process by observing that your mail doesn't look visually close to a normal patch submission - if that's the case then people aren't likely to sit around and try to figure out some magic set of git options needed, manually edit or otherwise special case to special case it unless it's *really* important.

#29 lore raw

Re: [PATCH] ASoC: samsung: Remove goni or aquila with the WM8994

Quoted 11 lines · Mark Brown
Quoted 9 lines · Paul Bolle

Mark Brown schreef op do 18-09-2014 om 10:57 [-0700]:

Quoted 1 line

Please follow the patch submission process in SubmittingPatches.

Could you please be more specific? What part of SubmittingPatches have I skipped?

Is it the perhaps the use of scissors? Or the superfluous From: line? "git am -c" appears to handle this message (and the very similar message I also sent today) just fine.

Quoted 7 lines

It's the fact that you've included the patch in the middle of the reply to another mail in the middle of a thread after some other stuff; you can tell this isn't the normal process by observing that your mail doesn't look visually close to a normal patch submission - if that's the case then people aren't likely to sit around and try to figure out some magic set of git options needed, manually edit or otherwise special case to special case it unless it's *really* important.

I see. I hope to resend shortly.

Thanks!

Paul Bolle

#30 lore raw

PATCH 1/1 ASoC: samsung: Remove PCM support for WM8580 on SMDK

In reply to Arnd Bergmann
Quoted 7 lines · Arnd Bergmann
Quoted 3 lines · Paul Bolle

Ditto for [...] MACH_SMDKC110, and MACH_SMDKV210. Note that here SND_SOC_SMDK_WM8580_PCM can not be set anymore.

[...]
I think it would be nice if you could submit a patch to remove the drivers from ASoC, then we can see if anybody complains.

Also the same thing for v3.17-rc5 and next-20140918. So let's see if we can remove this driver too.

Done on top of next-20140918. Again untested.
-------->8--------
From: Paul Bolle <[email protected]>

Commit 28c8331d386a ("ARM: S5PV210: Remove support for board files") removed the Kconfig symbols MACH_SMDKC110 and MACH_SMDKV210. As a result the dependencies of SND_SOC_SMDK_WM8580_PCM can never be met. So remove the unbuildable "SoC PCM Audio support for WM8580 on SMDK".

---
 sound/soc/samsung/Kconfig          |   9 --
 sound/soc/samsung/Makefile         |   2 -
 sound/soc/samsung/smdk_wm8580pcm.c | 186 -------------------------------------
 3 files changed, 197 deletions(-)
 delete mode 100644 sound/soc/samsung/smdk_wm8580pcm.c
sound/soc/samsung/Kconfig +0 -9
index 9d9b149ad977..52fd0a446bdf 100644
@@ -153,15 +153,6 @@ config SND_SOC_SAMSUNG_SMDK_SPDIF
 	help
 	  Say Y if you want to add support for SoC S/PDIF audio on the SMDK.
 
-config SND_SOC_SMDK_WM8580_PCM
-	tristate "SoC PCM Audio support for WM8580 on SMDK"
-	depends on SND_SOC_SAMSUNG && (MACH_SMDKV210 || MACH_SMDKC110)
-	depends on REGMAP_I2C
-	select SND_SOC_WM8580
-	select SND_SAMSUNG_PCM
-	help
-	  Say Y if you want to add support for SoC audio on the SMDK.
-
 config SND_SOC_SMDK_WM8994_PCM
 	tristate "SoC PCM Audio support for WM8994 on SMDK"
 	depends on SND_SOC_SAMSUNG
sound/soc/samsung/Makefile +0 -2
index c30293a67176..51b471ace06f 100644
@@ -36,7 +36,6 @@ snd-soc-snow-objs := snow.o
 snd-soc-smdk-wm9713-objs := smdk_wm9713.o
 snd-soc-s3c64xx-smartq-wm8987-objs := smartq_wm8987.o
 snd-soc-smdk-spdif-objs := smdk_spdif.o
-snd-soc-smdk-wm8580pcm-objs := smdk_wm8580pcm.o
 snd-soc-smdk-wm8994pcm-objs := smdk_wm8994pcm.o
 snd-soc-speyside-objs := speyside.o
 snd-soc-tobermory-objs := tobermory.o
@@ -61,7 +60,6 @@ obj-$(CONFIG_SND_SOC_SNOW) += snd-soc-snow.o
 obj-$(CONFIG_SND_SOC_SAMSUNG_SMDK_WM9713) += snd-soc-smdk-wm9713.o
 obj-$(CONFIG_SND_SOC_SMARTQ) += snd-soc-s3c64xx-smartq-wm8987.o
 obj-$(CONFIG_SND_SOC_SAMSUNG_SMDK_SPDIF) += snd-soc-smdk-spdif.o
-obj-$(CONFIG_SND_SOC_SMDK_WM8580_PCM) += snd-soc-smdk-wm8580pcm.o
 obj-$(CONFIG_SND_SOC_SMDK_WM8994_PCM) += snd-soc-smdk-wm8994pcm.o
 obj-$(CONFIG_SND_SOC_SPEYSIDE) += snd-soc-speyside.o
 obj-$(CONFIG_SND_SOC_TOBERMORY) += snd-soc-tobermory.o
sound/soc/samsung/smdk_wm8580pcm.c deleted +0 -186

186 lines not on this page · raw message

Signature · 1 line
1.9.3
maintainer
#31 lore raw

Re: [PATCH] ASoC: samsung: Remove PCM support for WM8580 on SMDK

Quoted 11 lines · Paul Bolle
Quoted 2 lines · Arnd Bergmann

I think it would be nice if you could submit a patch to remove the drivers from ASoC, then we can see if anybody complains.

Also the same thing for v3.17-rc5 and next-20140918. So let's see if we can remove this driver too.

Done on top of next-20140918. Again untested.
-------->8--------
From: Paul Bolle <[email protected]>

Again, please follow the patch submission process in SubmittingPatches.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#32 lore raw

PATCH 12/19 ARM: S5PV210: Untie PM support from legacy code

In reply to Tomasz Figa

This patch makes S5PV210 not rely on legacy suspend helpers in plat-samsung and implements platform suspend logic locally, similarly to Exynos.

---
 arch/arm/mach-s5pv210/Kconfig   |   2 -
 arch/arm/mach-s5pv210/Makefile  |   2 +-
 arch/arm/mach-s5pv210/common.h  |   7 +++
 arch/arm/mach-s5pv210/pm.c      | 101 +++++++++++++++++++++++++++++++++++-----
 arch/arm/mach-s5pv210/s5pv210.c |   8 ++++
 arch/arm/mach-s5pv210/sleep.S   |  36 ++++++++++++++
 6 files changed, 141 insertions(+), 15 deletions(-)
 create mode 100644 arch/arm/mach-s5pv210/sleep.S
arch/arm/mach-s5pv210/Kconfig +0 -2
index d6d0f92..ffc777d 100644
@@ -14,8 +14,6 @@ config CPU_S5PV210
 	select ARM_AMBA
 	select PL330_DMA if DMADEVICES
 	select S5P_EXT_INT
-	select S5P_PM if PM
-	select S5P_SLEEP if PM
 	help
 	  Enable S5PV210 CPU support
 
arch/arm/mach-s5pv210/Makefile +1 -1
index 83993fc..5308225 100644
@@ -12,7 +12,7 @@ obj-				:=
 
 # Core
 
-obj-$(CONFIG_PM)		+= pm.o
+obj-$(CONFIG_PM_SLEEP)		+= pm.o sleep.o
 
 # machine support
 
arch/arm/mach-s5pv210/common.h +7 -0
index 0b694c7..2ad387c 100644
@@ -12,5 +12,12 @@
 #ifndef __ARCH_ARM_MACH_S5PV210_COMMON_H
 #define __ARCH_ARM_MACH_S5PV210_COMMON_H
 
+#ifdef CONFIG_PM_SLEEP
+u32 exynos_get_eint_wake_mask(void);
+void s5pv210_cpu_resume(void);
+void s5pv210_pm_init(void);
+#else
+static inline void s5pv210_pm_init(void) {}
+#endif
 
 #endif /* __ARCH_ARM_MACH_S5PV210_COMMON_H */
arch/arm/mach-s5pv210/pm.c +89 -12

139 lines not on this page · raw message

arch/arm/mach-s5pv210/s5pv210.c +8 -0
index c244ccb..35db1ce 100644
@@ -20,6 +20,8 @@
 #include <plat/map-base.h>
 #include <mach/regs-clock.h>
 
+#include "common.h"
+
 static int __init s5pv210_fdt_map_sys(unsigned long node, const char *uname,
 					int depth, void *data)
 {
@@ -55,6 +57,11 @@ static void s5pv210_dt_restart(enum reboot_mode mode, const char *cmd)
 	__raw_writel(0x1, S5P_SWRESET);
 }
 
+static void __init s5pv210_dt_init_late(void)
+{
+	s5pv210_pm_init();
+}
+
 static char const *s5pv210_dt_compat[] __initconst = {
 	"samsung,s5pc110",
 	"samsung,s5pv210",
@@ -65,4 +72,5 @@ DT_MACHINE_START(S5PV210_DT, "Samsung S5PC110/S5PV210-based board")
 	.dt_compat = s5pv210_dt_compat,
 	.map_io = s5pv210_dt_map_io,
 	.restart = s5pv210_dt_restart,
+	.init_late = s5pv210_dt_init_late,
 MACHINE_END
arch/arm/mach-s5pv210/sleep.S new file +36 -0
new file mode 100644
index 0000000..7c43ddd
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011-2014 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * S5PV210 Sleep Code
+ * Based on S3C64XX sleep code by:
+ *	Ben Dooks, (c) 2008 Simtec Electronics
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/linkage.h>
+
+	.data
+	.align
+
+	/*
+	 * sleep magic, to allow the bootloader to check for an valid
+	 * image to resume to. Must be the first word before the
+	 * s3c_cpu_resume entry.
+	 */
+
+	.word	0x2bedf00d
+
+	/*
+	 * s3c_cpu_resume
+	 *
+	 * resume code entry for bootloader to call
+	 */
+
+ENTRY(s5pv210_cpu_resume)
+	b	cpu_resume
+ENDPROC(s5pv210_cpu_resume)
Signature · 1 line
1.9.3
#33 lore raw

PATCH 13/19 ARM: s5pv210: move debug-macro.S into the common space

In reply to Tomasz Figa

Move debug-macro.S from mach/include to include/debug where all other common debug macros are.

---
 arch/arm/Kconfig.debug                           | 12 +++++--
 arch/arm/include/debug/s5pv210.S                 | 34 ++++++++++++++++++++
 arch/arm/mach-s5pv210/include/mach/debug-macro.S | 41 ------------------------
 3 files changed, 44 insertions(+), 43 deletions(-)
 create mode 100644 arch/arm/include/debug/s5pv210.S
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S
arch/arm/Kconfig.debug +10 -2
index 8f90595..c2bcfcf 100644
@@ -617,6 +617,7 @@ choice
 		depends on PLAT_SAMSUNG
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
+		select DEBUG_S5PV210_UART if ARCH_S5PV210
 		bool "Use S3C UART 0 for low-level debug"
 		help
 		  Say Y here if you want the debug print routines to direct
@@ -630,6 +631,7 @@ choice
 		depends on PLAT_SAMSUNG
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
+		select DEBUG_S5PV210_UART if ARCH_S5PV210
 		bool "Use S3C UART 1 for low-level debug"
 		help
 		  Say Y here if you want the debug print routines to direct
@@ -643,6 +645,7 @@ choice
 		depends on PLAT_SAMSUNG
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
+		select DEBUG_S5PV210_UART if ARCH_S5PV210
 		bool "Use S3C UART 2 for low-level debug"
 		help
 		  Say Y here if you want the debug print routines to direct
@@ -653,8 +656,9 @@ choice
 		  by CONFIG_S3C_LOWLEVEL_UART_PORT.
 
 	config DEBUG_S3C_UART3
-		depends on PLAT_SAMSUNG && ARCH_EXYNOS
-		select DEBUG_EXYNOS_UART
+		depends on PLAT_SAMSUNG && (ARCH_EXYNOS || ARCH_S5PV210)
+		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
+		select DEBUG_S5PV210_UART if ARCH_S5PV210
 		bool "Use S3C UART 3 for low-level debug"
 		help
 		  Say Y here if you want the debug print routines to direct
@@ -949,6 +953,9 @@ config DEBUG_S3C2410_UART
 config DEBUG_S3C24XX_UART
 	bool
 
+config DEBUG_S5PV210_UART
+	bool
+
 config DEBUG_OMAP2PLUS_UART
 	bool
 	depends on ARCH_OMAP2PLUS
@@ -1009,6 +1016,7 @@ config DEBUG_LL_INCLUDE
 	default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM
 	default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
 	default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART
+	default "debug/s5pv210.S" if DEBUG_S5PV210_UART
 	default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1
 	default "debug/sti.S" if DEBUG_STI_UART
 	default "debug/tegra.S" if DEBUG_TEGRA_UART
arch/arm/include/debug/s5pv210.S new file +34 -0
new file mode 100644
index 0000000..4f1a73e
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * 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.
+*/
+
+/* pull in the relevant register and map files. */
+
+#define S3C_ADDR_BASE   0xF6000000
+#define S3C_VA_UART	S3C_ADDR_BASE + 0x01000000
+#define S5PV210_PA_UART	0xe2900000
+
+	/* note, for the boot process to work we have to keep the UART
+	 * virtual address aligned to an 1MiB boundary for the L1
+	 * mapping the head code makes. We keep the UART virtual address
+	 * aligned and add in the offset when we load the value here.
+	 */
+
+	.macro addruart, rp, rv, tmp
+		ldr	\rp, =S5PV210_PA_UART
+		ldr	\rv, =S3C_VA_UART
+#if CONFIG_DEBUG_S3C_UART != 0
+		add	\rp, \rp, #(0x400 * CONFIG_DEBUG_S3C_UART)
+		add	\rv, \rv, #(0x400 * CONFIG_DEBUG_S3C_UART)
+#endif
+	.endm
+
+#define fifo_full fifo_full_s5pv210
+#define fifo_level fifo_level_s5pv210
+
+#include <debug/samsung.S>
arch/arm/mach-s5pv210/include/mach/debug-macro.S deleted +0 -0
deleted file mode 100644
index 30b511a..0000000
Signature · 1 line
1.9.3
#34 lore raw

Re: [PATCH 13/19] ARM: s5pv210: move debug-macro.S into the common space

arch/arm/mach-s5pv210/include/mach/debug-macro.S

Quoted 113 lines · Tomasz Figa

Move debug-macro.S from mach/include to include/debug where all other common debug macros are.

---
  arch/arm/Kconfig.debug                           | 12 +++++--
  arch/arm/include/debug/s5pv210.S                 | 34 ++++++++++++++++++++
  arch/arm/mach-s5pv210/include/mach/debug-macro.S | 41 ------------------------
  3 files changed, 44 insertions(+), 43 deletions(-)

create mode 100644 arch/arm/include/debug/s5pv210.S delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S

arch/arm/Kconfig.debug +10 -2
index 8f90595..c2bcfcf 100644
@@ -617,6 +617,7 @@ choice
  		depends on PLAT_SAMSUNG
  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
+		select DEBUG_S5PV210_UART if ARCH_S5PV210
  		bool "Use S3C UART 0 for low-level debug"
  		help
  		  Say Y here if you want the debug print routines to direct
@@ -630,6 +631,7 @@ choice
  		depends on PLAT_SAMSUNG
  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
+		select DEBUG_S5PV210_UART if ARCH_S5PV210
  		bool "Use S3C UART 1 for low-level debug"
  		help
  		  Say Y here if you want the debug print routines to direct
@@ -643,6 +645,7 @@ choice
  		depends on PLAT_SAMSUNG
  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
+		select DEBUG_S5PV210_UART if ARCH_S5PV210
  		bool "Use S3C UART 2 for low-level debug"
  		help
  		  Say Y here if you want the debug print routines to direct
@@ -653,8 +656,9 @@ choice
  		  by CONFIG_S3C_LOWLEVEL_UART_PORT.
 
  	config DEBUG_S3C_UART3
-		depends on PLAT_SAMSUNG&&  ARCH_EXYNOS
-		select DEBUG_EXYNOS_UART
+		depends on PLAT_SAMSUNG&&  (ARCH_EXYNOS || ARCH_S5PV210)
+		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
+		select DEBUG_S5PV210_UART if ARCH_S5PV210
  		bool "Use S3C UART 3 for low-level debug"
  		help
  		  Say Y here if you want the debug print routines to direct
@@ -949,6 +953,9 @@ config DEBUG_S3C2410_UART
  config DEBUG_S3C24XX_UART
  	bool
 
+config DEBUG_S5PV210_UART
+	bool
+
  config DEBUG_OMAP2PLUS_UART
  	bool
  	depends on ARCH_OMAP2PLUS
@@ -1009,6 +1016,7 @@ config DEBUG_LL_INCLUDE
  	default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM
  	default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
  	default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART
+	default "debug/s5pv210.S" if DEBUG_S5PV210_UART
  	default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1
  	default "debug/sti.S" if DEBUG_STI_UART
  	default "debug/tegra.S" if DEBUG_TEGRA_UART
arch/arm/include/debug/s5pv210.S new file +34 -0
new file mode 100644
index 0000000..4f1a73e
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * 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.
+*/
+
+/* pull in the relevant register and map files. */
+
+#define S3C_ADDR_BASE   0xF6000000
+#define S3C_VA_UART	S3C_ADDR_BASE + 0x01000000
+#define S5PV210_PA_UART	0xe2900000
+
+	/* note, for the boot process to work we have to keep the UART
+	 * virtual address aligned to an 1MiB boundary for the L1
+	 * mapping the head code makes. We keep the UART virtual address
+	 * aligned and add in the offset when we load the value here.
+	 */
+
+	.macro addruart, rp, rv, tmp
+		ldr	\rp, =S5PV210_PA_UART
+		ldr	\rv, =S3C_VA_UART
+#if CONFIG_DEBUG_S3C_UART != 0
+		add	\rp, \rp, #(0x400 * CONFIG_DEBUG_S3C_UART)
+		add	\rv, \rv, #(0x400 * CONFIG_DEBUG_S3C_UART)
+#endif
+	.endm
+
+#define fifo_full fifo_full_s5pv210
+#define fifo_level fifo_level_s5pv210
+
+#include<debug/samsung.S>
arch/arm/mach-s5pv210/include/mach/debug-macro.S deleted +0 -0
deleted file mode 100644
index 30b511a..0000000

Tomasz,

I couldn't apply this one from this your series because of conflict with others. Can you please respin this one?

Thanks,
-Kukjin

#35 lore raw

RE: [PATCH 13/19] ARM: s5pv210: move debug-macro.S into the common space

Quoted 13 lines · Kukjin Kim
Quoted 11 lines · Tomasz Figa

Move debug-macro.S from mach/include to include/debug where all other common debug macros are.

---
  arch/arm/Kconfig.debug                           | 12 +++++--
  arch/arm/include/debug/s5pv210.S                 | 34 ++++++++++++++++++++
  arch/arm/mach-s5pv210/include/mach/debug-macro.S | 41 ------------------------
  3 files changed, 44 insertions(+), 43 deletions(-)

create mode 100644 arch/arm/include/debug/s5pv210.S delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S

[...]

Quoted 5 lines

Tomasz,

I couldn't apply this one from this your series because of conflict with others. Can you please respin this one?

One more note, since I didn't apply this, there is a build breakage for s5pv210_defconfig now...

arch/arm/kernel/debug.S:24:33: fatal error: mach/debug-macro.S: No such file or directory compilation terminated.
make[2]: *** [arch/arm/kernel/debug.o] Error 1
make[1]: *** [arch/arm/kernel] Error 2
make[1]: *** Waiting for unfinished jobs....

- Kukjin

#36 lore raw

Re: [PATCH 13/19] ARM: s5pv210: move debug-macro.S into the common space

Quoted 22 lines · Kukjin Kim
Quoted 13 lines · Kukjin Kim
Quoted 11 lines · Tomasz Figa

Move debug-macro.S from mach/include to include/debug where all other common debug macros are.

---
  arch/arm/Kconfig.debug                           | 12 +++++--
  arch/arm/include/debug/s5pv210.S                 | 34 ++++++++++++++++++++
  arch/arm/mach-s5pv210/include/mach/debug-macro.S | 41 ------------------------
  3 files changed, 44 insertions(+), 43 deletions(-)

create mode 100644 arch/arm/include/debug/s5pv210.S delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S

[...]

Quoted 5 lines

Tomasz,

I couldn't apply this one from this your series because of conflict with others. Can you please respin this one?

Quoted 8 lines

One more note, since I didn't apply this, there is a build breakage for s5pv210_defconfig now...

arch/arm/kernel/debug.S:24:33: fatal error: mach/debug-macro.S: No such file or directory compilation terminated.
make[2]: *** [arch/arm/kernel/debug.o] Error 1
make[1]: *** [arch/arm/kernel] Error 2
make[1]: *** Waiting for unfinished jobs....

Hmm? Are you sure previous patches applied correctly? I have tested this series patch by patch on all affected configs and it built fine back then. Maybe some conflict, I'll see tomorrow.

Best regards,
Tomasz

#37 lore raw

Re: [PATCH 13/19] ARM: s5pv210: move debug-macro.S into the common space

Quoted 32 lines · Tomasz Figa
Quoted 22 lines · Kukjin Kim
Quoted 13 lines · Kukjin Kim
Quoted 11 lines · Tomasz Figa

Move debug-macro.S from mach/include to include/debug where all other common debug macros are.

---
   arch/arm/Kconfig.debug                           | 12 +++++--
   arch/arm/include/debug/s5pv210.S                 | 34 ++++++++++++++++++++
   arch/arm/mach-s5pv210/include/mach/debug-macro.S | 41 ------------------------
   3 files changed, 44 insertions(+), 43 deletions(-)

create mode 100644 arch/arm/include/debug/s5pv210.S delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S

[...]

Quoted 5 lines

Tomasz,

I couldn't apply this one from this your series because of conflict with others. Can you please respin this one?

Quoted 8 lines

One more note, since I didn't apply this, there is a build breakage for s5pv210_defconfig now...

arch/arm/kernel/debug.S:24:33: fatal error: mach/debug-macro.S: No such file or directory compilation terminated.
make[2]: *** [arch/arm/kernel/debug.o] Error 1
make[1]: *** [arch/arm/kernel] Error 2
make[1]: *** Waiting for unfinished jobs....

Quoted 4 lines

Hmm? Are you sure previous patches applied correctly? I have tested this series patch by patch on all affected configs and it built fine back then. Maybe some conflict, I'll see tomorrow.

Tomasz, I've applied this whole series including this again. Can you please check my branch before sending pull-request to arm-soc for 3.17?

Thanks,
Kukjin

#38 lore raw

Re: [PATCH 13/19] ARM: s5pv210: move debug-macro.S into the common space

Hi Kukjin,

Quoted 37 lines · Kukjin Kim
Quoted 36 lines · Tomasz Figa
Quoted 34 lines · Kukjin Kim
Quoted 15 lines · Kukjin Kim
Quoted 13 lines · Tomasz Figa

Move debug-macro.S from mach/include to include/debug where all other common debug macros are.

---
   arch/arm/Kconfig.debug                           | 12 +++++--
   arch/arm/include/debug/s5pv210.S                 | 34
++++++++++++++++++++
   arch/arm/mach-s5pv210/include/mach/debug-macro.S | 41
------------------------
   3 files changed, 44 insertions(+), 43 deletions(-)

create mode 100644 arch/arm/include/debug/s5pv210.S delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S

[...]

Quoted 6 lines

Tomasz,

I couldn't apply this one from this your series because of conflict with
others. Can you please respin this one?

One more note, since I didn't apply this, there is a build breakage for s5pv210_defconfig now...

arch/arm/kernel/debug.S:24:33: fatal error: mach/debug-macro.S: No such file or directory
compilation terminated.
make[2]: *** [arch/arm/kernel/debug.o] Error 1
make[1]: *** [arch/arm/kernel] Error 2
make[1]: *** Waiting for unfinished jobs....

Quoted 6 lines
Quoted 4 lines

Hmm? Are you sure previous patches applied correctly? I have tested this series patch by patch on all affected configs and it built fine back then. Maybe some conflict, I'll see tomorrow.

Tomasz, I've applied this whole series including this again. Can you please check my branch before sending pull-request to arm-soc for 3.17?

Thanks for applying this.

A quick look through the patches didn't reveal any issues. s5pv210_defconfig builds fine too. I don't have any s5pv210-based board at home, though, so I can't do anything else than compile testing until Tuesday.

Best regards,
Tomasz

#39 lore raw

PATCH 14/19 ARM: s5pv210: Register cpufreq platform device

In reply to Tomasz Figa
---
 arch/arm/mach-s5pv210/s5pv210.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-s5pv210/s5pv210.c +1 -0
index 35db1ce..53feff3 100644
@@ -59,6 +59,7 @@ static void s5pv210_dt_restart(enum reboot_mode mode, const char *cmd)
 
 static void __init s5pv210_dt_init_late(void)
 {
+	platform_device_register_simple("s5pv210-cpufreq", -1, NULL, 0);
 	s5pv210_pm_init();
 }
 
Signature · 1 line
1.9.3
#40 lore raw

PATCH 15/19 cpufreq: s5pv210: Make the driver multiplatform aware

In reply to Tomasz Figa
Cc Rafael J. Wysocki <[email protected]>
Cc Viresh Kumar <[email protected]>
Cc linux-pm at vger.kernel.org
---
 drivers/cpufreq/s5pv210-cpufreq.c | 131 +++++++++++++++++++++++++++++++++++---
 1 file changed, 122 insertions(+), 9 deletions(-)
drivers/cpufreq/s5pv210-cpufreq.c +122 -9
index 19a10b8..9a68225 100644
@@ -16,11 +16,70 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/cpufreq.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/platform_device.h>
 #include <linux/reboot.h>
 #include <linux/regulator/consumer.h>
 
-#include <mach/map.h>
-#include <mach/regs-clock.h>
+static void __iomem *clk_base;
+static void __iomem *dmc_base[2];
+
+#define S5P_CLKREG(x)		(clk_base + (x))
+
+#define S5P_APLL_LOCK		S5P_CLKREG(0x00)
+#define S5P_APLL_CON		S5P_CLKREG(0x100)
+#define S5P_CLK_SRC0		S5P_CLKREG(0x200)
+#define S5P_CLK_SRC2		S5P_CLKREG(0x208)
+#define S5P_CLK_DIV0		S5P_CLKREG(0x300)
+#define S5P_CLK_DIV2		S5P_CLKREG(0x308)
+#define S5P_CLK_DIV6		S5P_CLKREG(0x318)
+#define S5P_CLKDIV_STAT0	S5P_CLKREG(0x1000)
+#define S5P_CLKDIV_STAT1	S5P_CLKREG(0x1004)
+#define S5P_CLKMUX_STAT0	S5P_CLKREG(0x1100)
+#define S5P_CLKMUX_STAT1	S5P_CLKREG(0x1104)
+
+#define S5P_ARM_MCS_CON		S5P_CLKREG(0x6100)
+
+/* CLKSRC0 */
+#define S5P_CLKSRC0_MUX200_SHIFT	(16)
+#define S5P_CLKSRC0_MUX200_MASK		(0x1 << S5P_CLKSRC0_MUX200_SHIFT)
+#define S5P_CLKSRC0_MUX166_MASK		(0x1<<20)
+#define S5P_CLKSRC0_MUX133_MASK		(0x1<<24)
+
+/* CLKSRC2 */
+#define S5P_CLKSRC2_G3D_SHIFT           (0)
+#define S5P_CLKSRC2_G3D_MASK            (0x3 << S5P_CLKSRC2_G3D_SHIFT)
+#define S5P_CLKSRC2_MFC_SHIFT           (4)
+#define S5P_CLKSRC2_MFC_MASK            (0x3 << S5P_CLKSRC2_MFC_SHIFT)
+
+/* CLKDIV0 */
+#define S5P_CLKDIV0_APLL_SHIFT		(0)
+#define S5P_CLKDIV0_APLL_MASK		(0x7 << S5P_CLKDIV0_APLL_SHIFT)
+#define S5P_CLKDIV0_A2M_SHIFT		(4)
+#define S5P_CLKDIV0_A2M_MASK		(0x7 << S5P_CLKDIV0_A2M_SHIFT)
+#define S5P_CLKDIV0_HCLK200_SHIFT	(8)
+#define S5P_CLKDIV0_HCLK200_MASK	(0x7 << S5P_CLKDIV0_HCLK200_SHIFT)
+#define S5P_CLKDIV0_PCLK100_SHIFT	(12)
+#define S5P_CLKDIV0_PCLK100_MASK	(0x7 << S5P_CLKDIV0_PCLK100_SHIFT)
+#define S5P_CLKDIV0_HCLK166_SHIFT	(16)
+#define S5P_CLKDIV0_HCLK166_MASK	(0xF << S5P_CLKDIV0_HCLK166_SHIFT)
+#define S5P_CLKDIV0_PCLK83_SHIFT	(20)
+#define S5P_CLKDIV0_PCLK83_MASK		(0x7 << S5P_CLKDIV0_PCLK83_SHIFT)
+#define S5P_CLKDIV0_HCLK133_SHIFT	(24)
+#define S5P_CLKDIV0_HCLK133_MASK	(0xF << S5P_CLKDIV0_HCLK133_SHIFT)
+#define S5P_CLKDIV0_PCLK66_SHIFT	(28)
+#define S5P_CLKDIV0_PCLK66_MASK		(0x7 << S5P_CLKDIV0_PCLK66_SHIFT)
+
+/* CLKDIV2 */
+#define S5P_CLKDIV2_G3D_SHIFT           (0)
+#define S5P_CLKDIV2_G3D_MASK            (0xF << S5P_CLKDIV2_G3D_SHIFT)
+#define S5P_CLKDIV2_MFC_SHIFT           (4)
+#define S5P_CLKDIV2_MFC_MASK            (0xF << S5P_CLKDIV2_MFC_SHIFT)
+
+/* CLKDIV6 */
+#define S5P_CLKDIV6_ONEDRAM_SHIFT       (28)
+#define S5P_CLKDIV6_ONEDRAM_MASK        (0xF << S5P_CLKDIV6_ONEDRAM_SHIFT)
 
 static struct clk *dmc0_clk;
 static struct clk *dmc1_clk;
@@ -142,9 +201,9 @@ static void s5pv210_set_refresh(enum s5pv210_dmc_port ch, unsigned long freq)
 	void __iomem *reg = NULL;
 
 	if (ch == DMC0) {
-		reg = (S5P_VA_DMC0 + 0x30);
+		reg = (dmc_base[0] + 0x30);
 	} else if (ch == DMC1) {
-		reg = (S5P_VA_DMC1 + 0x30);
+		reg = (dmc_base[1] + 0x30);
 	} else {
 		printk(KERN_ERR "Cannot find DMC port\n");
 		return;
@@ -472,7 +531,7 @@ static int __init s5pv210_cpu_init(struct cpufreq_policy *policy)
 	 * check_mem_type : This driver only support LPDDR & LPDDR2.
 	 * other memory type is not supported.
 	 */
-	mem_type = check_mem_type(S5P_VA_DMC0);
+	mem_type = check_mem_type(dmc_base[0]);
 
 	if ((mem_type != LPDDR) && (mem_type != LPDDR2)) {
 		printk(KERN_ERR "CPUFreq doesn't support this memory type\n");
@@ -481,10 +540,10 @@ static int __init s5pv210_cpu_init(struct cpufreq_policy *policy)
 	}
 
 	/* Find current refresh counter and frequency each DMC */
-	s5pv210_dram_conf[0].refresh = (__raw_readl(S5P_VA_DMC0 + 0x30) * 1000);
+	s5pv210_dram_conf[0].refresh = (__raw_readl(dmc_base[0] + 0x30) * 1000);
 	s5pv210_dram_conf[0].freq = clk_get_rate(dmc0_clk);
 
-	s5pv210_dram_conf[1].refresh = (__raw_readl(S5P_VA_DMC1 + 0x30) * 1000);
+	s5pv210_dram_conf[1].refresh = (__raw_readl(dmc_base[1] + 0x30) * 1000);
 	s5pv210_dram_conf[1].freq = clk_get_rate(dmc1_clk);
 
 	policy->suspend_freq = SLEEP_FREQ;
@@ -527,8 +586,55 @@ static struct notifier_block s5pv210_cpufreq_reboot_notifier = {
 	.notifier_call = s5pv210_cpufreq_reboot_notifier_event,
 };
 
-static int __init s5pv210_cpufreq_init(void)
+static int s5pv210_cpufreq_probe(struct platform_device *pdev)
 {
+	struct device_node *np;
+	int id;
+
+	/*
+	 * HACK: This is a temporary workaround to get access to clock
+	 * and DMC controller registers directly and remove static mappings
+	 * and dependencies on platform headers. It is necessary to enable
+	 * S5PV210 multi-platform support and will be removed together with
+	 * this whole driver as soon as S5PV210 gets migrated to use
+	 * cpufreq-cpu0 driver.
+	 */
+	np = of_find_compatible_node(NULL, NULL, "samsung,s5pv210-clock");
+	if (!np) {
+		pr_err("%s: failed to find clock controller DT node\n",
+			__func__);
+		return -ENODEV;
+	}
+
+	clk_base = of_iomap(np, 0);
+	if (!clk_base) {
+		pr_err("%s: failed to map clock registers\n", __func__);
+		return -EFAULT;
+	}
+
+	for_each_compatible_node(np, NULL, "samsung,s5pv210-dmc") {
+		id = of_alias_get_id(np, "dmc");
+		if (id < 0 || id >= ARRAY_SIZE(dmc_base)) {
+			pr_err("%s: failed to get alias of dmc node '%s'\n",
+				__func__, np->name);
+			return id;
+		}
+
+		dmc_base[id] = of_iomap(np, 0);
+		if (!dmc_base[id]) {
+			pr_err("%s: failed to map dmc%d registers\n",
+				__func__, id);
+			return -EFAULT;
+		}
+	}
+
+	for (id = 0; id < ARRAY_SIZE(dmc_base); ++id) {
+		if (!dmc_base[id]) {
+			pr_err("%s: failed to find dmc%d node\n", __func__, id);
+			return -ENODEV;
+		}
+	}
+
 	arm_regulator = regulator_get(NULL, "vddarm");
 	if (IS_ERR(arm_regulator)) {
 		pr_err("failed to get regulator vddarm");
@@ -547,4 +653,11 @@ static int __init s5pv210_cpufreq_init(void)
 	return cpufreq_register_driver(&s5pv210_driver);
 }
 
-late_initcall(s5pv210_cpufreq_init);
+static struct platform_driver s5pv210_cpufreq_platdrv = {
+	.driver = {
+		.name	= "s5pv210-cpufreq",
+		.owner	= THIS_MODULE,
+	},
+	.probe = s5pv210_cpufreq_probe,
+};
+module_platform_driver(s5pv210_cpufreq_platdrv);
Signature · 1 line
1.9.3
#41 lore raw

PATCH 16/19 ARM: s5pv210: Enable multi-platform build support

In reply to Tomasz Figa

This makes it possible to enable the s5pv210 platform as part of a multiplatform kernel. Also redundant Kconfig options are removed.

---
 arch/arm/Kconfig                    | 23 ++---------------------
 arch/arm/Makefile                   |  4 ++--
 arch/arm/mach-s5pv210/Kconfig       | 36 ++++++++++++++++--------------------
 arch/arm/mach-s5pv210/Makefile      |  7 +++----
 arch/arm/mach-s5pv210/Makefile.boot |  2 --
 arch/arm/plat-samsung/Makefile      |  1 -
 arch/arm/plat-samsung/cpu.c         |  2 +-
 7 files changed, 24 insertions(+), 51 deletions(-)
 delete mode 100644 arch/arm/mach-s5pv210/Makefile.boot
arch/arm/Kconfig +2 -21
index c0c1c3f..756711f 100644
@@ -758,26 +758,6 @@ config ARCH_S3C64XX
 	help
 	  Samsung S3C64XX series based systems
 
-config ARCH_S5PV210
-	bool "Samsung S5PV210/S5PC110"
-	select ARCH_HAS_HOLES_MEMORYMODEL
-	select ARCH_SPARSEMEM_ENABLE
-	select ATAGS
-	select CLKDEV_LOOKUP
-	select CLKSRC_SAMSUNG_PWM
-	select COMMON_CLK_SAMSUNG
-	select CPU_V7
-	select GENERIC_CLOCKEVENTS
-	select GPIO_SAMSUNG
-	select HAVE_S3C2410_I2C if I2C
-	select HAVE_S3C2410_WATCHDOG if WATCHDOG
-	select HAVE_S3C_RTC if RTC_CLASS
-	select NEED_MACH_GPIO_H
-	select NEED_MACH_MEMORY_H
-	select SAMSUNG_ATAGS
-	help
-	  Samsung S5PV210/S5PC110 series based systems
-
 config ARCH_DAVINCI
 	bool "TI DaVinci"
 	select ARCH_HAS_HOLES_MEMORYMODEL
@@ -1515,7 +1495,8 @@ config ARM_PSCI
 config ARCH_NR_GPIO
 	int
 	default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
-	default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX
+	default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || \
+		SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
 	default 416 if ARCH_SUNXI
 	default 392 if ARCH_U8500
 	default 352 if ARCH_VT8500
arch/arm/Makefile +2 -2
index d3f470c..c133061 100644
@@ -210,11 +210,11 @@ machine-$(CONFIG_PLAT_SPEAR)		+= spear
 plat-$(CONFIG_ARCH_EXYNOS)	+= samsung
 plat-$(CONFIG_ARCH_OMAP)	+= omap
 plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
+plat-$(CONFIG_ARCH_S5PV210)	+= samsung
 plat-$(CONFIG_PLAT_IOP)		+= iop
 plat-$(CONFIG_PLAT_ORION)	+= orion
 plat-$(CONFIG_PLAT_PXA)		+= pxa
 plat-$(CONFIG_PLAT_S3C24XX)	+= samsung
-plat-$(CONFIG_PLAT_S5P)		+= samsung
 plat-$(CONFIG_PLAT_VERSATILE)	+= versatile
 
 ifeq ($(CONFIG_ARCH_EBSA110),y)
@@ -238,7 +238,7 @@ MACHINE  :=
 endif
 
 machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
-platdirs := $(patsubst %,arch/arm/plat-%/,$(plat-y))
+platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y)))
 
 ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y)
 ifeq ($(KBUILD_SRC),)
arch/arm/mach-s5pv210/Kconfig +16 -20
index ffc777d..330bfc8 100644
@@ -7,32 +7,28 @@
 
 # Configuration options for the S5PV210/S5PC110
 
+config ARCH_S5PV210
+	bool "Samsung S5PV210/S5PC110" if ARCH_MULTI_V7
+	select ARCH_HAS_HOLES_MEMORYMODEL
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_VIC
+	select CLKSRC_SAMSUNG_PWM
+	select COMMON_CLK_SAMSUNG
+	select HAVE_S3C2410_I2C if I2C
+	select HAVE_S3C2410_WATCHDOG if WATCHDOG
+	select HAVE_S3C_RTC if RTC_CLASS
+	select PINCTRL
+	select PINCTRL_EXYNOS
+	help
+	  Samsung S5PV210/S5PC110 series based systems
+
 if ARCH_S5PV210
 
 config CPU_S5PV210
-	bool
+	def_bool y
 	select ARM_AMBA
 	select PL330_DMA if DMADEVICES
-	select S5P_EXT_INT
 	help
 	  Enable S5PV210 CPU support
 
-menu "S5PV210 Machines"
-
-config MACH_S5PV210_DT
-	bool "Samsung S5PV210/S5PC110 machine using Device Tree"
-	select CLKSRC_OF
-	select CPU_S5PV210
-	select PINCTRL
-	select PINCTRL_EXYNOS
-	select USE_OF
-	help
-	  Machine support for Samsung S5PV210/S5PC110 machines with Device Tree
-	  enabled.
-	  Select this if a fdt blob is available for your S5PV210 SoC based
-	  board.
-	  Note: This is under development and not all peripherals can be
-	  supported with this machine file.
-endmenu
-
 endif
arch/arm/mach-s5pv210/Makefile +3 -4
index 5308225..7dc2d0e 100644
@@ -5,6 +5,8 @@
 #
 # Licensed under GPLv2
 
+ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
+
 obj-y				:=
 obj-m				:=
 obj-n				:=
@@ -16,7 +18,4 @@ obj-$(CONFIG_PM_SLEEP)		+= pm.o sleep.o
 
 # machine support
 
-obj-$(CONFIG_MACH_S5PV210_DT)	+= s5pv210.o
-# device support
-
-obj-y					+= setup-i2c0.o
+obj-y				+= s5pv210.o
arch/arm/mach-s5pv210/Makefile.boot deleted +0 -0
deleted file mode 100644
index 79ece40..0000000
arch/arm/plat-samsung/Makefile +0 -1
index 906f54b..97fc15e 100644
@@ -5,7 +5,6 @@
 # Licensed under GPLv2
 
 ccflags-$(CONFIG_ARCH_MULTI_V7) += -I$(srctree)/$(src)/include
-ccflags-$(CONFIG_ARCH_EXYNOS)	+= -I$(srctree)/arch/arm/mach-exynos/include
 
 obj-y				:=
 obj-m				:=
arch/arm/plat-samsung/cpu.c +1 -1
index 364963a..945fc3f 100644
@@ -16,7 +16,7 @@
 #include <linux/io.h>
 
 
-#include <mach/map.h>
+#include <plat/map-base.h>
 #include <plat/cpu.h>
 
 unsigned long samsung_cpu_id;
Signature · 1 line
1.9.3
#42 lore raw

PATCH 17/19 gpio: samsung: Remove legacy support of S5PV210

In reply to Tomasz Figa

GPIO support of S5PV210 SoC is now fully handled by pinctrl-samsung driver making the old code in gpio-samsung driver unused. This patch removes it which will also let us remove more code from arch subtree.

Cc Linus Walleij <[email protected]>
Cc Alexandre Courbot <[email protected]>
Cc linux-gpio at vger.kernel.org
---
 drivers/gpio/gpio-samsung.c | 240 --------------------------------------------
 1 file changed, 240 deletions(-)
drivers/gpio/gpio-samsung.c +0 -240
index 7d4281e..27298fd 100644
@@ -1169,234 +1169,9 @@ static struct samsung_gpio_chip s3c64xx_gpios_2bit[] = {
 #endif
 };
 
-/*
- * Followings are the gpio banks in S5PV210/S5PC110
- *
- * The 'config' member when left to NULL, is initialized to the default
- * structure samsung_gpio_cfgs[3] in the init function below.
- *
- * The 'base' member is also initialized in the init function below.
- * Note: The initialization of 'base' member of samsung_gpio_chip structure
- * uses the above macro and depends on the banks being listed in order here.
- */
-
-static struct samsung_gpio_chip s5pv210_gpios_4bit[] = {
-#ifdef CONFIG_CPU_S5PV210
-	{
-		.chip	= {
-			.base	= S5PV210_GPA0(0),
-			.ngpio	= S5PV210_GPIO_A0_NR,
-			.label	= "GPA0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPA1(0),
-			.ngpio	= S5PV210_GPIO_A1_NR,
-			.label	= "GPA1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPB(0),
-			.ngpio	= S5PV210_GPIO_B_NR,
-			.label	= "GPB",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPC0(0),
-			.ngpio	= S5PV210_GPIO_C0_NR,
-			.label	= "GPC0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPC1(0),
-			.ngpio	= S5PV210_GPIO_C1_NR,
-			.label	= "GPC1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPD0(0),
-			.ngpio	= S5PV210_GPIO_D0_NR,
-			.label	= "GPD0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPD1(0),
-			.ngpio	= S5PV210_GPIO_D1_NR,
-			.label	= "GPD1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPE0(0),
-			.ngpio	= S5PV210_GPIO_E0_NR,
-			.label	= "GPE0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPE1(0),
-			.ngpio	= S5PV210_GPIO_E1_NR,
-			.label	= "GPE1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPF0(0),
-			.ngpio	= S5PV210_GPIO_F0_NR,
-			.label	= "GPF0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPF1(0),
-			.ngpio	= S5PV210_GPIO_F1_NR,
-			.label	= "GPF1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPF2(0),
-			.ngpio	= S5PV210_GPIO_F2_NR,
-			.label	= "GPF2",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPF3(0),
-			.ngpio	= S5PV210_GPIO_F3_NR,
-			.label	= "GPF3",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPG0(0),
-			.ngpio	= S5PV210_GPIO_G0_NR,
-			.label	= "GPG0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPG1(0),
-			.ngpio	= S5PV210_GPIO_G1_NR,
-			.label	= "GPG1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPG2(0),
-			.ngpio	= S5PV210_GPIO_G2_NR,
-			.label	= "GPG2",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPG3(0),
-			.ngpio	= S5PV210_GPIO_G3_NR,
-			.label	= "GPG3",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPI(0),
-			.ngpio	= S5PV210_GPIO_I_NR,
-			.label	= "GPI",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPJ0(0),
-			.ngpio	= S5PV210_GPIO_J0_NR,
-			.label	= "GPJ0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPJ1(0),
-			.ngpio	= S5PV210_GPIO_J1_NR,
-			.label	= "GPJ1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPJ2(0),
-			.ngpio	= S5PV210_GPIO_J2_NR,
-			.label	= "GPJ2",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPJ3(0),
-			.ngpio	= S5PV210_GPIO_J3_NR,
-			.label	= "GPJ3",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPJ4(0),
-			.ngpio	= S5PV210_GPIO_J4_NR,
-			.label	= "GPJ4",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_MP01(0),
-			.ngpio	= S5PV210_GPIO_MP01_NR,
-			.label	= "MP01",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_MP02(0),
-			.ngpio	= S5PV210_GPIO_MP02_NR,
-			.label	= "MP02",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_MP03(0),
-			.ngpio	= S5PV210_GPIO_MP03_NR,
-			.label	= "MP03",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_MP04(0),
-			.ngpio	= S5PV210_GPIO_MP04_NR,
-			.label	= "MP04",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_MP05(0),
-			.ngpio	= S5PV210_GPIO_MP05_NR,
-			.label	= "MP05",
-		},
-	}, {
-		.base	= (S5P_VA_GPIO + 0xC00),
-		.irq_base = IRQ_EINT(0),
-		.chip	= {
-			.base	= S5PV210_GPH0(0),
-			.ngpio	= S5PV210_GPIO_H0_NR,
-			.label	= "GPH0",
-			.to_irq = samsung_gpiolib_to_irq,
-		},
-	}, {
-		.base	= (S5P_VA_GPIO + 0xC20),
-		.irq_base = IRQ_EINT(8),
-		.chip	= {
-			.base	= S5PV210_GPH1(0),
-			.ngpio	= S5PV210_GPIO_H1_NR,
-			.label	= "GPH1",
-			.to_irq = samsung_gpiolib_to_irq,
-		},
-	}, {
-		.base	= (S5P_VA_GPIO + 0xC40),
-		.irq_base = IRQ_EINT(16),
-		.chip	= {
-			.base	= S5PV210_GPH2(0),
-			.ngpio	= S5PV210_GPIO_H2_NR,
-			.label	= "GPH2",
-			.to_irq = samsung_gpiolib_to_irq,
-		},
-	}, {
-		.base	= (S5P_VA_GPIO + 0xC60),
-		.irq_base = IRQ_EINT(24),
-		.chip	= {
-			.base	= S5PV210_GPH3(0),
-			.ngpio	= S5PV210_GPIO_H3_NR,
-			.label	= "GPH3",
-			.to_irq = samsung_gpiolib_to_irq,
-		},
-	},
-#endif
-};
-
 /* TODO: cleanup soc_is_* */
 static __init int samsung_gpiolib_init(void)
 {
-	struct samsung_gpio_chip *chip;
-	int i, nr_chips;
-	int group = 0;
-
 	/*
 	 * Currently there are two drivers that can provide GPIO support for
 	 * Samsung SoCs. For device tree enabled platforms, the new
@@ -1420,21 +1195,6 @@ static __init int samsung_gpiolib_init(void)
 				S3C64XX_VA_GPIO);
 		samsung_gpiolib_add_4bit2_chips(s3c64xx_gpios_4bit2,
 				ARRAY_SIZE(s3c64xx_gpios_4bit2));
-	} else if (soc_is_s5pv210()) {
-		group = 0;
-		chip = s5pv210_gpios_4bit;
-		nr_chips = ARRAY_SIZE(s5pv210_gpios_4bit);
-
-		for (i = 0; i < nr_chips; i++, chip++) {
-			if (!chip->config) {
-				chip->config = &samsung_gpio_cfgs[3];
-				chip->group = group++;
-			}
-		}
-		samsung_gpiolib_add_4bit_chips(s5pv210_gpios_4bit, nr_chips, S5P_VA_GPIO);
-#if defined(CONFIG_CPU_S5PV210) && defined(CONFIG_S5P_GPIO_INT)
-		s5p_register_gpioint_bank(IRQ_GPIOINT, 0, S5P_GPIOINT_GROUP_MAXNR);
-#endif
 	} else {
 		WARN(1, "Unknown SoC in gpio-samsung, no GPIOs added\n");
 		return -ENODEV;
Signature · 1 line
1.9.3
#43 lore raw

Re: [PATCH 17/19] gpio: samsung: Remove legacy support of S5PV210

Quoted 6 lines · Tomasz Figa

GPIO support of S5PV210 SoC is now fully handled by pinctrl-samsung driver making the old code in gpio-samsung driver unused. This patch removes it which will also let us remove more code from arch subtree.

Hi Linus,

I've applied this in samsung tree for 3.17 if you have any comments, please kindly let me know.

Thanks,
Kukjin

Quoted 267 lines
Cc Alexandre Courbot<[email protected]>
Cc linux-gpio at vger.kernel.org
---
  drivers/gpio/gpio-samsung.c | 240 --------------------------------------------
  1 file changed, 240 deletions(-)
drivers/gpio/gpio-samsung.c +0 -240
index 7d4281e..27298fd 100644
@@ -1169,234 +1169,9 @@ static struct samsung_gpio_chip s3c64xx_gpios_2bit[] = {
  #endif
  };
 
-/*
- * Followings are the gpio banks in S5PV210/S5PC110
- *
- * The 'config' member when left to NULL, is initialized to the default
- * structure samsung_gpio_cfgs[3] in the init function below.
- *
- * The 'base' member is also initialized in the init function below.
- * Note: The initialization of 'base' member of samsung_gpio_chip structure
- * uses the above macro and depends on the banks being listed in order here.
- */
-
-static struct samsung_gpio_chip s5pv210_gpios_4bit[] = {
-#ifdef CONFIG_CPU_S5PV210
-	{
-		.chip	= {
-			.base	= S5PV210_GPA0(0),
-			.ngpio	= S5PV210_GPIO_A0_NR,
-			.label	= "GPA0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPA1(0),
-			.ngpio	= S5PV210_GPIO_A1_NR,
-			.label	= "GPA1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPB(0),
-			.ngpio	= S5PV210_GPIO_B_NR,
-			.label	= "GPB",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPC0(0),
-			.ngpio	= S5PV210_GPIO_C0_NR,
-			.label	= "GPC0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPC1(0),
-			.ngpio	= S5PV210_GPIO_C1_NR,
-			.label	= "GPC1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPD0(0),
-			.ngpio	= S5PV210_GPIO_D0_NR,
-			.label	= "GPD0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPD1(0),
-			.ngpio	= S5PV210_GPIO_D1_NR,
-			.label	= "GPD1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPE0(0),
-			.ngpio	= S5PV210_GPIO_E0_NR,
-			.label	= "GPE0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPE1(0),
-			.ngpio	= S5PV210_GPIO_E1_NR,
-			.label	= "GPE1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPF0(0),
-			.ngpio	= S5PV210_GPIO_F0_NR,
-			.label	= "GPF0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPF1(0),
-			.ngpio	= S5PV210_GPIO_F1_NR,
-			.label	= "GPF1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPF2(0),
-			.ngpio	= S5PV210_GPIO_F2_NR,
-			.label	= "GPF2",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPF3(0),
-			.ngpio	= S5PV210_GPIO_F3_NR,
-			.label	= "GPF3",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPG0(0),
-			.ngpio	= S5PV210_GPIO_G0_NR,
-			.label	= "GPG0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPG1(0),
-			.ngpio	= S5PV210_GPIO_G1_NR,
-			.label	= "GPG1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPG2(0),
-			.ngpio	= S5PV210_GPIO_G2_NR,
-			.label	= "GPG2",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPG3(0),
-			.ngpio	= S5PV210_GPIO_G3_NR,
-			.label	= "GPG3",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPI(0),
-			.ngpio	= S5PV210_GPIO_I_NR,
-			.label	= "GPI",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPJ0(0),
-			.ngpio	= S5PV210_GPIO_J0_NR,
-			.label	= "GPJ0",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPJ1(0),
-			.ngpio	= S5PV210_GPIO_J1_NR,
-			.label	= "GPJ1",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPJ2(0),
-			.ngpio	= S5PV210_GPIO_J2_NR,
-			.label	= "GPJ2",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPJ3(0),
-			.ngpio	= S5PV210_GPIO_J3_NR,
-			.label	= "GPJ3",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_GPJ4(0),
-			.ngpio	= S5PV210_GPIO_J4_NR,
-			.label	= "GPJ4",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_MP01(0),
-			.ngpio	= S5PV210_GPIO_MP01_NR,
-			.label	= "MP01",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_MP02(0),
-			.ngpio	= S5PV210_GPIO_MP02_NR,
-			.label	= "MP02",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_MP03(0),
-			.ngpio	= S5PV210_GPIO_MP03_NR,
-			.label	= "MP03",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_MP04(0),
-			.ngpio	= S5PV210_GPIO_MP04_NR,
-			.label	= "MP04",
-		},
-	}, {
-		.chip	= {
-			.base	= S5PV210_MP05(0),
-			.ngpio	= S5PV210_GPIO_MP05_NR,
-			.label	= "MP05",
-		},
-	}, {
-		.base	= (S5P_VA_GPIO + 0xC00),
-		.irq_base = IRQ_EINT(0),
-		.chip	= {
-			.base	= S5PV210_GPH0(0),
-			.ngpio	= S5PV210_GPIO_H0_NR,
-			.label	= "GPH0",
-			.to_irq = samsung_gpiolib_to_irq,
-		},
-	}, {
-		.base	= (S5P_VA_GPIO + 0xC20),
-		.irq_base = IRQ_EINT(8),
-		.chip	= {
-			.base	= S5PV210_GPH1(0),
-			.ngpio	= S5PV210_GPIO_H1_NR,
-			.label	= "GPH1",
-			.to_irq = samsung_gpiolib_to_irq,
-		},
-	}, {
-		.base	= (S5P_VA_GPIO + 0xC40),
-		.irq_base = IRQ_EINT(16),
-		.chip	= {
-			.base	= S5PV210_GPH2(0),
-			.ngpio	= S5PV210_GPIO_H2_NR,
-			.label	= "GPH2",
-			.to_irq = samsung_gpiolib_to_irq,
-		},
-	}, {
-		.base	= (S5P_VA_GPIO + 0xC60),
-		.irq_base = IRQ_EINT(24),
-		.chip	= {
-			.base	= S5PV210_GPH3(0),
-			.ngpio	= S5PV210_GPIO_H3_NR,
-			.label	= "GPH3",
-			.to_irq = samsung_gpiolib_to_irq,
-		},
-	},
-#endif
-};
-
  /* TODO: cleanup soc_is_* */
  static __init int samsung_gpiolib_init(void)
  {
-	struct samsung_gpio_chip *chip;
-	int i, nr_chips;
-	int group = 0;
-
  	/*
  	 * Currently there are two drivers that can provide GPIO support for
  	 * Samsung SoCs. For device tree enabled platforms, the new
@@ -1420,21 +1195,6 @@ static __init int samsung_gpiolib_init(void)
  				S3C64XX_VA_GPIO);
  		samsung_gpiolib_add_4bit2_chips(s3c64xx_gpios_4bit2,
  				ARRAY_SIZE(s3c64xx_gpios_4bit2));
-	} else if (soc_is_s5pv210()) {
-		group = 0;
-		chip = s5pv210_gpios_4bit;
-		nr_chips = ARRAY_SIZE(s5pv210_gpios_4bit);
-
-		for (i = 0; i<  nr_chips; i++, chip++) {
-			if (!chip->config) {
-				chip->config =&samsung_gpio_cfgs[3];
-				chip->group = group++;
-			}
-		}
-		samsung_gpiolib_add_4bit_chips(s5pv210_gpios_4bit, nr_chips, S5P_VA_GPIO);
-#if defined(CONFIG_CPU_S5PV210)&&  defined(CONFIG_S5P_GPIO_INT)
-		s5p_register_gpioint_bank(IRQ_GPIOINT, 0, S5P_GPIOINT_GROUP_MAXNR);
-#endif
  	} else {
  		WARN(1, "Unknown SoC in gpio-samsung, no GPIOs added\n");
  		return -ENODEV;
#44 lore raw

PATCH 18/19 ARM: SAMSUNG: Remove remaining legacy code

In reply to Tomasz Figa

After refactoring suspend/resume, which was last part with dependencies on legacy code, all Kconfig symbols related to Samsung ATAGS support can be deselected and more unused code removed. This includes most of s5p-* code as well, as s5pv210 was their last user.

---
 arch/arm/mach-s5pv210/include/mach/dma.h        |  26 --
 arch/arm/mach-s5pv210/include/mach/gpio.h       | 140 ----------
 arch/arm/mach-s5pv210/include/mach/hardware.h   |  18 --
 arch/arm/mach-s5pv210/include/mach/irqs.h       | 137 ----------
 arch/arm/mach-s5pv210/include/mach/map.h        | 158 ------------
 arch/arm/mach-s5pv210/include/mach/memory.h     |  27 --
 arch/arm/mach-s5pv210/include/mach/pm-core.h    |  46 ----
 arch/arm/mach-s5pv210/include/mach/regs-clock.h |   2 +-
 arch/arm/mach-s5pv210/include/mach/regs-gpio.h  |  41 ---
 arch/arm/mach-s5pv210/include/mach/regs-irq.h   |  18 --
 arch/arm/mach-s5pv210/setup-i2c0.c              |  30 ---
 arch/arm/plat-samsung/Kconfig                   | 125 +--------
 arch/arm/plat-samsung/Makefile                  |   9 -
 arch/arm/plat-samsung/cpu.c                     |   1 -
 arch/arm/plat-samsung/devs.c                    | 330 ------------------------
 arch/arm/plat-samsung/include/plat/camport.h    |  28 --
 arch/arm/plat-samsung/include/plat/cpu.h        |  12 -
 arch/arm/plat-samsung/include/plat/devs.h       |  42 ---
 arch/arm/plat-samsung/include/plat/fb-core.h    |  15 --
 arch/arm/plat-samsung/include/plat/fb.h         |  22 --
 arch/arm/plat-samsung/include/plat/fimc-core.h  |  51 ----
 arch/arm/plat-samsung/include/plat/gpio-cfg.h   |  64 -----
 arch/arm/plat-samsung/include/plat/hdmi.h       |  16 --
 arch/arm/plat-samsung/include/plat/irqs.h       |  72 ------
 arch/arm/plat-samsung/include/plat/mfc.h        |  35 ---
 arch/arm/plat-samsung/include/plat/sdhci.h      |  47 ----
 arch/arm/plat-samsung/include/plat/tv-core.h    |  44 ----
 arch/arm/plat-samsung/pm-gpio.c                 |   4 +-
 arch/arm/plat-samsung/s5p-dev-mfc.c             |  81 +-----
 arch/arm/plat-samsung/s5p-dev-uart.c            |  88 -------
 arch/arm/plat-samsung/s5p-irq-eint.c            | 221 ----------------
 arch/arm/plat-samsung/s5p-irq-gpioint.c         | 218 ----------------
 arch/arm/plat-samsung/s5p-irq-pm.c              |  92 -------
 arch/arm/plat-samsung/s5p-irq.c                 |  31 ---
 arch/arm/plat-samsung/s5p-pm.c                  |  40 ---
 arch/arm/plat-samsung/s5p-sleep.S               |  45 ----
 36 files changed, 14 insertions(+), 2362 deletions(-)
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/dma.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/gpio.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/map.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/memory.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/pm-core.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/regs-gpio.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/regs-irq.h
 delete mode 100644 arch/arm/mach-s5pv210/setup-i2c0.c
 delete mode 100644 arch/arm/plat-samsung/include/plat/camport.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/fimc-core.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/hdmi.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/irqs.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/mfc.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/tv-core.h
 delete mode 100644 arch/arm/plat-samsung/s5p-dev-uart.c
 delete mode 100644 arch/arm/plat-samsung/s5p-irq-eint.c
 delete mode 100644 arch/arm/plat-samsung/s5p-irq-gpioint.c
 delete mode 100644 arch/arm/plat-samsung/s5p-irq-pm.c
 delete mode 100644 arch/arm/plat-samsung/s5p-irq.c
 delete mode 100644 arch/arm/plat-samsung/s5p-pm.c
 delete mode 100644 arch/arm/plat-samsung/s5p-sleep.S
arch/arm/mach-s5pv210/include/mach/dma.h deleted +0 -0
deleted file mode 100644
index 201842a..0000000
arch/arm/mach-s5pv210/include/mach/gpio.h deleted +0 -0
deleted file mode 100644
index 6c8b903..0000000
arch/arm/mach-s5pv210/include/mach/hardware.h deleted +0 -0
deleted file mode 100644
index fada7a3..0000000
arch/arm/mach-s5pv210/include/mach/irqs.h deleted +0 -0
deleted file mode 100644
index 5e0de3a..0000000
arch/arm/mach-s5pv210/include/mach/map.h deleted +0 -0
deleted file mode 100644
index 763929a..0000000
arch/arm/mach-s5pv210/include/mach/memory.h deleted +0 -0
deleted file mode 100644
index 2d3cfa2..0000000
arch/arm/mach-s5pv210/include/mach/pm-core.h deleted +0 -0
deleted file mode 100644
index eba8aea..0000000
arch/arm/mach-s5pv210/include/mach/regs-clock.h +1 -1
index e345584..b14ffcd 100644
@@ -13,7 +13,7 @@
 #ifndef __ASM_ARCH_REGS_CLOCK_H
 #define __ASM_ARCH_REGS_CLOCK_H __FILE__
 
-#include <mach/map.h>
+#include <plat/map-base.h>
 
 #define S5P_CLKREG(x)		(S3C_VA_SYS + (x))
 
arch/arm/mach-s5pv210/include/mach/regs-gpio.h deleted +0 -0
deleted file mode 100644
index de0c899..0000000
arch/arm/mach-s5pv210/include/mach/regs-irq.h deleted +0 -0
deleted file mode 100644
index d8bc1e6..0000000
arch/arm/mach-s5pv210/setup-i2c0.c deleted +0 -0
deleted file mode 100644
index 3658416..0000000
arch/arm/plat-samsung/Kconfig +2 -123

169 lines not on this page · raw message

arch/arm/plat-samsung/Makefile +0 -9
index 97fc15e..5fe1750 100644
@@ -15,10 +15,6 @@ obj-				:=
 
 obj-y				+= init.o cpu.o
 
-obj-$(CONFIG_S5P_IRQ)		+= s5p-irq.o
-obj-$(CONFIG_S5P_EXT_INT)	+= s5p-irq-eint.o
-obj-$(CONFIG_S5P_GPIO_INT)	+= s5p-irq-gpioint.o
-
 # ADC
 
 obj-$(CONFIG_S3C_ADC)	+= adc.o
@@ -30,7 +26,6 @@ obj-$(CONFIG_SAMSUNG_ATAGS)	+= platformdata.o
 obj-$(CONFIG_SAMSUNG_ATAGS)	+= devs.o
 obj-$(CONFIG_SAMSUNG_ATAGS)	+= dev-uart.o
 obj-$(CONFIG_S5P_DEV_MFC)	+= s5p-dev-mfc.o
-obj-$(CONFIG_S5P_DEV_UART)	+= s5p-dev-uart.o
 
 obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT)	+= dev-backlight.o
 
@@ -52,7 +47,3 @@ obj-$(CONFIG_SAMSUNG_PM_DEBUG)	+= pm-debug.o
 
 obj-$(CONFIG_SAMSUNG_WAKEMASK)	+= wakeup-mask.o
 obj-$(CONFIG_SAMSUNG_WDT_RESET)	+= watchdog-reset.o
-
-obj-$(CONFIG_S5P_PM)		+= s5p-pm.o
-obj-$(CONFIG_S5P_IRQ_PM)	+= s5p-irq-pm.o
-obj-$(CONFIG_S5P_SLEEP)		+= s5p-sleep.o
arch/arm/plat-samsung/cpu.c +0 -1
index 945fc3f..360618e 100644
@@ -15,7 +15,6 @@
 #include <linux/init.h>
 #include <linux/io.h>
 
-
 #include <plat/map-base.h>
 #include <plat/cpu.h>
 
arch/arm/plat-samsung/devs.c +0 -330

372 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/camport.h deleted +0 -0
deleted file mode 100644
index a5708bf..0000000
arch/arm/plat-samsung/include/plat/cpu.h +0 -12
index 995e56e..61d14f3 100644
@@ -47,7 +47,6 @@ IS_SAMSUNG_CPU(s3c24xx, S3C24XX_CPU_ID, S3C24XX_CPU_MASK)
 IS_SAMSUNG_CPU(s3c2412, S3C2412_CPU_ID, S3C2412_CPU_MASK)
 IS_SAMSUNG_CPU(s3c6400, S3C6400_CPU_ID, S3C64XX_CPU_MASK)
 IS_SAMSUNG_CPU(s3c6410, S3C6410_CPU_ID, S3C64XX_CPU_MASK)
-IS_SAMSUNG_CPU(s5pv210, S5PV210_CPU_ID, S5PV210_CPU_MASK)
 
 #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \
     defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \
@@ -76,12 +75,6 @@ IS_SAMSUNG_CPU(s5pv210, S5PV210_CPU_ID, S5PV210_CPU_MASK)
 # define soc_is_s3c64xx()	0
 #endif
 
-#if defined(CONFIG_CPU_S5PV210)
-# define soc_is_s5pv210()	is_samsung_s5pv210()
-#else
-# define soc_is_s5pv210()	0
-#endif
-
 #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
 
 #ifndef KHZ
@@ -117,12 +110,9 @@ extern void s3c_init_cpu(unsigned long idcode,
 
 /* core initialisation functions */
 
-extern void s5p_init_irq(u32 *vic, u32 num_vic);
-
 extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
 
 extern void s3c64xx_init_cpu(void);
-extern void s5p_init_cpu(void __iomem *cpuid_addr);
 
 extern unsigned int samsung_rev(void);
 
@@ -150,6 +140,4 @@ extern struct bus_type s3c2442_subsys;
 extern struct bus_type s3c2443_subsys;
 extern struct bus_type s3c6410_subsys;
 
-extern void (*s5pc1xx_idle)(void);
-
 #endif
arch/arm/plat-samsung/include/plat/devs.h +0 -42

54 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/fb-core.h +0 -15
index 6abcbf1..bca383e 100644
@@ -26,19 +26,4 @@ static inline void s3c_fb_setname(char *name)
 #endif
 }
 
-/* Re-define device name depending on support. */
-static inline void s5p_fb_setname(int id, char *name)
-{
-	switch (id) {
-#ifdef CONFIG_S5P_DEV_FIMD0
-	case 0:
-		s5p_device_fimd0.name = name;
-	break;
-#endif
-	default:
-		printk(KERN_ERR "%s: invalid device id(%d)\n", __func__, id);
-	break;
-	}
-}
-
 #endif /* __ASM_PLAT_FB_CORE_H */
arch/arm/plat-samsung/include/plat/fb.h +0 -22
index 5a0e26a..b89f8f2 100644
@@ -26,32 +26,10 @@
 extern void s3c_fb_set_platdata(struct s3c_fb_platdata *pd);
 
 /**
- * s5p_fimd0_set_platdata() - Setup the FB device with platform data.
- * @pd: The platform data to set. The data is copied from the passed structure
- *      so the machine data can mark the data __initdata so that any unused
- *      machines will end up dumping their data at runtime.
- */
-extern void s5p_fimd0_set_platdata(struct s3c_fb_platdata *pd);
-
-/**
  * s3c64xx_fb_gpio_setup_24bpp() - S3C64XX setup function for 24bpp LCD
  *
  * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
  */
 extern void s3c64xx_fb_gpio_setup_24bpp(void);
 
-/**
- * s5pv210_fb_gpio_setup_24bpp() - S5PV210/S5PC110 setup function for 24bpp LCD
- *
- * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
- */
-extern void s5pv210_fb_gpio_setup_24bpp(void);
-
-/**
- * exynos4_fimd0_gpio_setup_24bpp() - Exynos4 setup function for 24bpp LCD0
- *
- * Initialise the GPIO for an 24bpp LCD display on the RGB interface 0.
- */
-extern void exynos4_fimd0_gpio_setup_24bpp(void);
-
 #endif /* __PLAT_S3C_FB_H */
arch/arm/plat-samsung/include/plat/fimc-core.h deleted +0 -0
deleted file mode 100644
index 1d6cb2b..0000000
arch/arm/plat-samsung/include/plat/gpio-cfg.h +0 -64

74 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/hdmi.h deleted +0 -0
deleted file mode 100644
index 331d046..0000000
arch/arm/plat-samsung/include/plat/irqs.h deleted +0 -0
deleted file mode 100644
index 039001c..0000000
arch/arm/plat-samsung/include/plat/mfc.h deleted +0 -0
deleted file mode 100644
index 033654e..0000000
arch/arm/plat-samsung/include/plat/sdhci.h +0 -47

59 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/tv-core.h deleted +0 -0
deleted file mode 100644
index 3bc34f3..0000000
arch/arm/plat-samsung/pm-gpio.c +2 -2
index da26881..f6084f6 100644
@@ -196,7 +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)
+#if defined(CONFIG_ARCH_S3C64XX)
 static void samsung_gpio_pm_4bit_save(struct samsung_gpio_chip *chip)
 {
 	chip->pm_save[1] = __raw_readl(chip->base + OFFS_CON);
@@ -306,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 */
+#endif /* CONFIG_ARCH_S3C64XX */
 
 /**
  * samsung_pm_save_gpio() - save gpio chip data for suspend
arch/arm/plat-samsung/s5p-dev-mfc.c +9 -72

104 lines not on this page · raw message

arch/arm/plat-samsung/s5p-dev-uart.c deleted +0 -0
deleted file mode 100644
index 8c4487a..0000000
arch/arm/plat-samsung/s5p-irq-eint.c deleted +0 -0
deleted file mode 100644
index ebee4dc..0000000
arch/arm/plat-samsung/s5p-irq-gpioint.c deleted +0 -0
deleted file mode 100644
index fafdb05..0000000
arch/arm/plat-samsung/s5p-irq-pm.c deleted +0 -0
deleted file mode 100644
index 52b1694..0000000
arch/arm/plat-samsung/s5p-irq.c deleted +0 -0
deleted file mode 100644
index ddfaca9..0000000
arch/arm/plat-samsung/s5p-pm.c deleted +0 -0
deleted file mode 100644
index 0747468..0000000
arch/arm/plat-samsung/s5p-sleep.S deleted +0 -0
deleted file mode 100644
index 25c68ceb..0000000
Signature · 1 line
1.9.3
maintainer
#45 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

Quoted 6 lines · On Friday 04 July 2014 19:48:18 Tomasz Figa wrote:

After refactoring suspend/resume, which was last part with dependencies on legacy code, all Kconfig symbols related to Samsung ATAGS support can be deselected and more unused code removed. This includes most of s5p-* code as well, as s5pv210 was their last user.

I actually found a few more, see patch below. Feel free to merge it into yours.

As discussed on IRC, I have also done an experimental patch to move the few contents of mach-s5pv210 into mach-exynos, which turned out very simple and should be uncontroversial but needs more testing.

Finally, there is some more cleanup potential in moving things out of plat-samsung into the individual platforms (s3c24xx, s3c64xx, exynos including s5pv210), as a lot of files are now only used on one of them.

I tried moving everything that the combined mach-exynos needs out of plat-samsung, but that resulted in about 500-600 lines of duplication between s3c and exynos for pm-common.c, pm-common.h, pmdebug.c and pm-check.c, so those four files should probably remain shared for now.

Arnd

commit c0157e3dcf12f9e5d6c41e143bd9ba2bb3fe406a

Author: Arnd Bergmann <[email protected]>
Date:   Fri Jul 4 21:10:39 2014 +0200

ARM: samsung: remove unused device definitions

After the s5p platforms have all been deleted or turned into DT-only platforms, a lot of device definitions are now completely unused and can be removed.

arch/arm/plat-samsung/Kconfig +1 -52
index 0eee25d..14bddde 100644
@@ -55,22 +55,6 @@ config SAMSUNG_ATAGS
 
 if SAMSUNG_ATAGS
 
-config SAMSUNG_GPIO_EXTRA
-	int "Number of additional GPIO pins"
-	default 128 if SAMSUNG_GPIO_EXTRA128
-	default 64 if SAMSUNG_GPIO_EXTRA64
-	default 0
-	help
-	  Use additional GPIO space in addition to the GPIO's the SOC
-	  provides. This allows expanding the GPIO space for use with
-	  GPIO expanders.
-
-config SAMSUNG_GPIO_EXTRA64
-	bool
-
-config SAMSUNG_GPIO_EXTRA128
-	bool
-
 config S3C_GPIO_SPACE
 	int "Space between gpio banks"
 	default 0
@@ -112,11 +96,6 @@ config S3C_DEV_HSMMC2
 	help
 	  Compile in platform device definitions for HSMMC channel 2
 
-config S3C_DEV_HSMMC3
-	bool
-	help
-	  Compile in platform device definitions for HSMMC channel 3
-
 config S3C_DEV_HWMON
 	bool
 	help
@@ -127,36 +106,6 @@ config S3C_DEV_I2C1
 	help
 	  Compile in platform device definitions for I2C channel 1
 
-config S3C_DEV_I2C2
-	bool
-	help
-	  Compile in platform device definitions for I2C channel 2
-
-config S3C_DEV_I2C3
-	bool
-	help
-	  Compile in platform device definition for I2C controller 3
-
-config S3C_DEV_I2C4
-	bool
-	help
-	  Compile in platform device definition for I2C controller 4
-
-config S3C_DEV_I2C5
-	bool
-	help
-	  Compile in platform device definition for I2C controller 5
-
-config S3C_DEV_I2C6
-	bool
-	help
-	  Compile in platform device definition for I2C controller 6
-
-config S3C_DEV_I2C7
-	bool
-	help
-	  Compile in platform device definition for I2C controller 7
-
 config S3C_DEV_FB
 	bool
 	help
@@ -272,7 +221,7 @@ config SAMSUNG_PM_GPIO
 
 config SAMSUNG_DMADEV
 	bool "Use legacy Samsung DMA abstraction"
-	depends on CPU_S5PV210 || ARCH_S3C64XX
+	depends on ARCH_S3C64XX
 	select DMADEVICES
 	default y
 	help
arch/arm/plat-samsung/devs.c +0 -253

268 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/dma-pl330.h deleted +0 -121

121 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/keypad-core.h deleted +0 -31
deleted file mode 100644
index d513e1b..0000000
@@ -1,31 +0,0 @@
-/*
- * linux/arch/arm/plat-samsung/include/plat/keypad-core.h
- *
- * Copyright (C) 2010 Samsung Electronics Co.Ltd
- * Author: Joonyoung Shim <[email protected]>
- *
- * Samsung keypad controller core function
- *
- *  This program is free software; you can redistribute  it and/or modify it
- *  under  the terms of  the GNU General  Public License as published by the
- *  Free Software Foundation;  either version 2 of the  License, or (at your
- *  option) any later version.
- *
- */
-
-#ifndef __ASM_ARCH_KEYPAD_CORE_H
-#define __ASM_ARCH_KEYPAD_CORE_H
-
-/* These function 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 samsung_keypad_setname(char *name)
-{
-#ifdef CONFIG_SAMSUNG_DEV_KEYPAD
-	samsung_device_keypad.name = name;
-#endif
-}
-
-#endif /* __ASM_ARCH_KEYPAD_CORE_H */
#46 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

Quoted 10 lines · Arnd Bergmann
Quoted 6 lines · On Friday 04 July 2014 19:48:18 Tomasz Figa wrote:

After refactoring suspend/resume, which was last part with dependencies on legacy code, all Kconfig symbols related to Samsung ATAGS support can be deselected and more unused code removed. This includes most of s5p-* code as well, as s5pv210 was their last user.

I actually found a few more, see patch below. Feel free to merge it into yours.

Will add your patch to this series, if sending v2. Otherwise I guess it could be applied on top of it.

Quoted 10 lines

As discussed on IRC, I have also done an experimental patch to move the few contents of mach-s5pv210 into mach-exynos, which turned out very simple and should be uncontroversial but needs more testing.

Finally, there is some more cleanup potential in moving things out of plat-samsung into the individual platforms (s3c24xx, s3c64xx, exynos including s5pv210), as a lot of files are now only used on one of them.

Quoted 5 lines

I tried moving everything that the combined mach-exynos needs out of plat-samsung, but that resulted in about 500-600 lines of duplication between s3c and exynos for pm-common.c, pm-common.h, pmdebug.c and pm-check.c, so those four files should probably remain shared for now.

OK.

Best regards,
Tomasz

#47 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

In reply to Tomasz Figa
Quoted 7 lines · Tomasz Figa

After refactoring suspend/resume, which was last part with dependencies on legacy code, all Kconfig symbols related to Samsung ATAGS support can be deselected and more unused code removed. This includes most of s5p-* code as well, as s5pv210 was their last user.

---

This one also landed in today's linux-next (ie, next-20140716).

arch/arm/mach-s5pv210/include/mach/gpio.h

Quoted 4 lines

[...]

arch/arm/mach-s5pv210/include/mach/gpio.h deleted +0 -0
deleted file mode 100644
index 6c8b903..0000000

This removed the single case were CONFIG_SAMSUNG_GPIO_EXTRA was used.

Quoted 25 lines

[...]

arch/arm/plat-samsung/Kconfig +0 -18
[...]
@@ -64,31 +51,6 @@ config SAMSUNG_ATAGS
 
 if SAMSUNG_ATAGS
 
-# options for IRQ support
-
-config S5P_IRQ
-	def_bool ARCH_S5PV210
-	help
-	  Support common interrupt part for ARCH_S5P SoCs
-
-config S5P_EXT_INT
-	bool
-	help
-	  Use the external interrupts (other than GPIO interrupts.)
-
-config S5P_GPIO_INT
-	bool
-	help
-	  Common code for the GPIO interrupts (other than external interrupts.)
-
-# options for gpio configuration support

arch/arm/plat-samsung/Kconfig config SAMSUNG_ATAGS · line 56

Quoted 10 lines
arch/arm/plat-samsung/Kconfig +0 -7
-
-config S5P_GPIO_DRVSTR
-	bool
-	help
-	  Internal configuration to get and set correct GPIO driver strength
-	  helper
-
 config SAMSUNG_GPIO_EXTRA
 	int "Number of additional GPIO pins"
 	default 128 if SAMSUNG_GPIO_EXTRA128

So a second order effect is that SAMSUNG_GPIO_EXTRA can now be removed. Which implies that SAMSUNG_GPIO_EXTRA64 and SAMSUNG_GPIO_EXTRA128 can also be removed.

Should I submit the trivial patch to do that or is a patch already queued somewhere?

Paul Bolle

#48 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

Quoted 1 line · Paul Bolle

On Fri, 2014-07-04 at 19:48 +0200, Tomasz Figa wrote:

[snip]

Quoted 10 lines

arch/arm/plat-samsung/Kconfig config SAMSUNG_ATAGS · line 56

Quoted 3 lines

config SAMSUNG_GPIO_EXTRA

arch/arm/plat-samsung/Kconfig +0 -0
 	int "Number of additional GPIO pins"
 	default 128 if SAMSUNG_GPIO_EXTRA128

So a second order effect is that SAMSUNG_GPIO_EXTRA can now be removed. Which implies that SAMSUNG_GPIO_EXTRA64 and SAMSUNG_GPIO_EXTRA128 can also be removed.

Should I submit the trivial patch to do that or is a patch already queued somewhere?

Please do if you don't mind. That's one more thing I missed.

Best regards,
Tomasz

#49 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

Tomasz,

Quoted 9 lines · Tomasz Figa
Quoted 6 lines · Paul Bolle

So a second order effect is that SAMSUNG_GPIO_EXTRA can now be removed. Which implies that SAMSUNG_GPIO_EXTRA64 and SAMSUNG_GPIO_EXTRA128 can also be removed.

Should I submit the trivial patch to do that or is a patch already queued somewhere?

Please do if you don't mind. That's one more thing I missed.

I got lucky! Commit ab275b132a79 ("ARM: s5p: cut the custom ARCH_NR_GPIOS definition") was added to next-20140717 which does just that.

The strange thing is that it is dated "Jun 3 2104". I don't know what happened there but I have little reason to find that out.

Thanks,

Paul Bolle

#50 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

Quoted 1 line · Paul Bolle

The strange thing is that it is dated "Jun 3 2104".

                                              2014

That must be my most common typo!

Paul Bolle

#51 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

In reply to Tomasz Figa
Quoted 7 lines · Tomasz Figa

After refactoring suspend/resume, which was last part with dependencies on legacy code, all Kconfig symbols related to Samsung ATAGS support can be deselected and more unused code removed. This includes most of s5p-* code as well, as s5pv210 was their last user.

---

I noticed another thing now this patch showed up in next-20140716.

Quoted 20 lines

[...]

arch/arm/plat-samsung/Kconfig +1 -4
index f8185b5..1091b0a 100644
@@ -6,29 +6,16 @@
 
 config PLAT_SAMSUNG
 	bool
-	depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P || ARCH_EXYNOS
+	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_EXYNOS || ARCH_S5PV210
 	default y
 	select GENERIC_IRQ_CHIP
 	select NO_IOPORT_MAP
 	help
 	  Base platform code for all Samsung SoC based systems
 
-config PLAT_S5P
-	bool
-	depends on ARCH_S5PV210

arch/arm/plat-samsung/Kconfig line 28

Quoted 10 lines
arch/arm/plat-samsung/Kconfig +0 -10
-	default y
-	select ARCH_REQUIRE_GPIOLIB
-	select ARM_VIC
-	select NO_IOPORT_MAP
-	select PLAT_SAMSUNG
-	select S3C_GPIO_TRACK
-	select S5P_GPIO_DRVSTR
-	help
-	  Base platform code for Samsung's S5P series SoC.
-

After this patch that symbol is still referenced in:

drivers/media/platform/Kconfig:159:     depends on VIDEO_DEV && VIDEO_V4L2 && (PLAT_S5P || ARCH_EXYNOS)
drivers/media/platform/Kconfig:169:     depends on VIDEO_DEV && VIDEO_V4L2 && (PLAT_S5P || ARCH_EXYNOS)
drivers/media/platform/Kconfig:177:     depends on VIDEO_DEV && VIDEO_V4L2 && (PLAT_S5P || ARCH_EXYNOS)
drivers/media/platform/exynos4-is/Kconfig:5:    depends on (PLAT_S5P || ARCH_EXYNOS)
drivers/media/platform/s5p-tv/Kconfig:11:       depends on (PLAT_S5P || ARCH_EXYNOS) && PM_RUNTIME

drivers/usb/host/Kconfig:223: depends on PLAT_S5P || ARCH_EXYNOS
drivers/usb/host/Kconfig:530: depends on PLAT_S5P || ARCH_EXYNOS

Again, I assume patches to remove these references are pending. But is that correct?

Paul Bolle

#52 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

Quoted 1 line · Paul Bolle

On Fri, 2014-07-04 at 19:48 +0200, Tomasz Figa wrote:

[snip]

Quoted 20 lines

arch/arm/plat-samsung/Kconfig line 28

Quoted 13 lines
arch/arm/plat-samsung/Kconfig +0 -13
-config PLAT_S5P
-	bool
-	depends on ARCH_S5PV210
-	default y
-	select ARCH_REQUIRE_GPIOLIB
-	select ARM_VIC
-	select NO_IOPORT_MAP
-	select PLAT_SAMSUNG
-	select S3C_GPIO_TRACK
-	select S5P_GPIO_DRVSTR
-	help
-	  Base platform code for Samsung's S5P series SoC.
-

After this patch that symbol is still referenced in:

drivers/media/platform/Kconfig:159:     depends on VIDEO_DEV && VIDEO_V4L2 && (PLAT_S5P || ARCH_EXYNOS)
drivers/media/platform/Kconfig:169:     depends on VIDEO_DEV && VIDEO_V4L2 && (PLAT_S5P || ARCH_EXYNOS)
drivers/media/platform/Kconfig:177:     depends on VIDEO_DEV && VIDEO_V4L2 && (PLAT_S5P || ARCH_EXYNOS)
drivers/media/platform/exynos4-is/Kconfig:5:    depends on (PLAT_S5P || ARCH_EXYNOS)
drivers/media/platform/s5p-tv/Kconfig:11:       depends on (PLAT_S5P || ARCH_EXYNOS) && PM_RUNTIME
Quoted 5 lines

drivers/usb/host/Kconfig:223: depends on PLAT_S5P || ARCH_EXYNOS
drivers/usb/host/Kconfig:530: depends on PLAT_S5P || ARCH_EXYNOS

Again, I assume patches to remove these references are pending. But is that correct?

I had two patches fixing those, but apparently this was lost in action. The correct solution is s/PLAT_S5P/ARCH_S5PV210/. I will include this in a follow-up series if nobody objects.

Best regards,
Tomasz

#53 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

Quoted 10 lines · Tomasz Figa
Quoted 9 lines · Paul Bolle

After this patch that symbol is still referenced in:

drivers/media/platform/Kconfig:159:     depends on VIDEO_DEV && VIDEO_V4L2 && (PLAT_S5P || ARCH_EXYNOS)
drivers/media/platform/Kconfig:169:     depends on VIDEO_DEV && VIDEO_V4L2 && (PLAT_S5P || ARCH_EXYNOS)
drivers/media/platform/Kconfig:177:     depends on VIDEO_DEV && VIDEO_V4L2 && (PLAT_S5P || ARCH_EXYNOS)
drivers/media/platform/exynos4-is/Kconfig:5:    depends on (PLAT_S5P || ARCH_EXYNOS)
drivers/media/platform/s5p-tv/Kconfig:11:       depends on (PLAT_S5P || ARCH_EXYNOS) && PM_RUNTIME

drivers/usb/host/Kconfig:223: depends on PLAT_S5P || ARCH_EXYNOS
drivers/usb/host/Kconfig:530: depends on PLAT_S5P || ARCH_EXYNOS

Quoted 6 lines
Quoted 2 lines

Again, I assume patches to remove these references are pending. But is that correct?

I had two patches fixing those, but apparently this was lost in action. The correct solution is s/PLAT_S5P/ARCH_S5PV210/. I will include this in a follow-up series if nobody objects.

No one objected, as far as I know.

Exactly the same references are still to be found in v3.17-rc3 and next-20140903. Perhaps someone actually familiar with this matter (ie, not me) could submit one or more patches that implement Tomasz' proposal.

Paul Bolle

#54 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

Quoted 11 lines · Paul Bolle
Quoted 3 lines · Tomasz Figa

I had two patches fixing those, but apparently this was lost in action. The correct solution is s/PLAT_S5P/ARCH_S5PV210/. I will include this in a follow-up series if nobody objects.

No one objected, as far as I know.

Exactly the same references are still to be found in v3.17-rc3 and next-20140903. Perhaps someone actually familiar with this matter (ie, not me) could submit one or more patches that implement Tomasz' proposal.

We're now at v3.17-rc5 and next-20140918 and nothing has changed. I raised this issue the day it hit linux-next. After two months it's still not fixed. Could anyone familiar with ARCH_S5PV210 please jump in?

Thanks,

Paul Bolle

#55 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

Quoted 8 lines · Paul Bolle
Quoted 7 lines · Paul Bolle
Quoted 3 lines · Tomasz Figa

I had two patches fixing those, but apparently this was lost in action. The correct solution is s/PLAT_S5P/ARCH_S5PV210/. I will include this in a follow-up series if nobody objects.

No one objected, as far as I know.

Quoted 8 lines
Quoted 4 lines

Exactly the same references are still to be found in v3.17-rc3 and next-20140903. Perhaps someone actually familiar with this matter (ie, not me) could submit one or more patches that implement Tomasz' proposal.

We're now at v3.17-rc5 and next-20140918 and nothing has changed. I raised this issue the day it hit linux-next. After two months it's still not fixed. Could anyone familiar with ARCH_S5PV210 please jump in?

Basically, it turned out that no respin was necessary and I didn't post those two patches. Now, I don't work for Samsung anymore, but let me see if I can find them in my private tree and then some time to send them.

Best regards,
Tomasz

#56 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

In reply to Tomasz Figa
Quoted 7 lines · Tomasz Figa

After refactoring suspend/resume, which was last part with dependencies on legacy code, all Kconfig symbols related to Samsung ATAGS support can be deselected and more unused code removed. This includes most of s5p-* code as well, as s5pv210 was their last user.

---

And I noticed another issue as this patch showed up in linux-next (this should be the last issue for this series).

Quoted 25 lines

[...]

arch/arm/plat-samsung/Kconfig +0 -15
index f8185b5..1091b0a 100644
[...]
@@ -64,31 +51,6 @@ config SAMSUNG_ATAGS
 
 if SAMSUNG_ATAGS
 
-# options for IRQ support
-
-config S5P_IRQ
-	def_bool ARCH_S5PV210
-	help
-	  Support common interrupt part for ARCH_S5P SoCs
-
-config S5P_EXT_INT
-	bool
-	help
-	  Use the external interrupts (other than GPIO interrupts.)
-
-config S5P_GPIO_INT
-	bool
-	help

arch/arm/plat-samsung/Kconfig config SAMSUNG_ATAGS · line 91

Quoted 10 lines
arch/arm/plat-samsung/Kconfig +0 -10
-	  Common code for the GPIO interrupts (other than external interrupts.)
-
-# options for gpio configuration support
-
-config S5P_GPIO_DRVSTR
-	bool
-	help
-	  Internal configuration to get and set correct GPIO driver strength
-	  helper
-

This one is used (as a macro) in drivers/gpio/gpio-samsung.c. Is a patch that touches that macro queued somewhere?

arch/arm/plat-samsung/Kconfig config SAMSUNG_ATAGS · line 56

Quoted 3 lines
arch/arm/plat-samsung/Kconfig +0 -0
 config SAMSUNG_GPIO_EXTRA
 	int "Number of additional GPIO pins"
 	default 128 if SAMSUNG_GPIO_EXTRA128

Thanks,

Paul Bolle

#57 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

Quoted 1 line · Paul Bolle

On Fri, 2014-07-04 at 19:48 +0200, Tomasz Figa wrote:

[snip]

Quoted 9 lines

arch/arm/plat-samsung/Kconfig config SAMSUNG_ATAGS · line 91

Quoted 6 lines
arch/arm/plat-samsung/Kconfig +0 -6
-config S5P_GPIO_DRVSTR
-	bool
-	help
-	  Internal configuration to get and set correct GPIO driver strength
-	  helper
-

This one is used (as a macro) in drivers/gpio/gpio-samsung.c. Is a patch that touches that macro queued somewhere?

The code you mention should be removed as well as it's no longer needed. Will include in a follow-up series. Thanks for reporting this and remaining missed parts.

Best regards,
Tomasz

#58 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

Quoted 12 lines · Tomasz Figa
Quoted 10 lines · Paul Bolle

arch/arm/plat-samsung/Kconfig config SAMSUNG_ATAGS · line 91

Quoted 6 lines · Tomasz Figa
arch/arm/plat-samsung/Kconfig +0 -6
-config S5P_GPIO_DRVSTR
-	bool
-	help
-	  Internal configuration to get and set correct GPIO driver strength
-	  helper
-

This one is used (as a macro) in drivers/gpio/gpio-samsung.c. Is a patch that touches that macro queued somewhere?

Quoted 3 lines

The code you mention should be removed as well as it's no longer needed. Will include in a follow-up series. Thanks for reporting this and remaining missed parts.

That check for CONFIG_S5P_GPIO_DRVSTR is still present in v3.17-rc3 and next-20140903. Should I submit the trivial patch to remove it (and the dead code it hides)?

Paul Bolle

maintainer
#59 lore raw

Re: [PATCH 18/19] ARM: SAMSUNG: Remove remaining legacy code

Quoted 13 lines · Paul Bolle
Quoted 12 lines · Tomasz Figa
Quoted 10 lines · Paul Bolle

arch/arm/plat-samsung/Kconfig config SAMSUNG_ATAGS · line 91

Quoted 6 lines · Tomasz Figa
arch/arm/plat-samsung/Kconfig +0 -6
-config S5P_GPIO_DRVSTR
-  bool
-  help
-    Internal configuration to get and set correct GPIO driver strength
-    helper
-

This one is used (as a macro) in drivers/gpio/gpio-samsung.c. Is a patch that touches that macro queued somewhere?

Quoted 8 lines
Quoted 3 lines

The code you mention should be removed as well as it's no longer needed. Will include in a follow-up series. Thanks for reporting this and remaining missed parts.

That check for CONFIG_S5P_GPIO_DRVSTR is still present in v3.17-rc3 and next-20140903. Should I submit the trivial patch to remove it (and the dead code it hides)?

Yes, I think this one is an obvious candidate for removal.

Arnd

#60 lore raw

PATCH 1/1 gpio: samsung: Remove remaining check for CONFIG_S5P_GPIO_DRVSTR

Quoted 6 lines · Arnd Bergmann
Quoted 3 lines · Paul Bolle

That check for CONFIG_S5P_GPIO_DRVSTR is still present in v3.17-rc3 and next-20140903. Should I submit the trivial patch to remove it (and the dead code it hides)?

Yes, I think this one is an obvious candidate for removal.

Still there in v3.17-rc5 and next-20140918. So I submit yet another trivial cleanup.

Done on top of next-20140918. Only tested by grepping the tree. Please note that, obviously, nothing uses s5p_gpio_get_drvstr() or s5p_gpio_set_drvstr().

Paul Bolle
-------->8--------
From: Paul Bolle <[email protected]>

Commit d78c16ccde96 ("ARM: SAMSUNG: Remove remaining legacy code") removed the Kconfig symbol S5P_GPIO_DRVSTR. It didn't remove one check for the related macro. Remove that check and the dead code it hides.

---
 drivers/gpio/gpio-samsung.c | 50 ---------------------------------------------
 1 file changed, 50 deletions(-)
drivers/gpio/gpio-samsung.c +0 -50
index 3810da47043f..7c288ba4dc87 100644
@@ -1309,56 +1309,6 @@ samsung_gpio_pull_t s3c_gpio_getpull(unsigned int pin)
 }
 EXPORT_SYMBOL(s3c_gpio_getpull);
 
-#ifdef CONFIG_S5P_GPIO_DRVSTR
-s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin)
-{
-	struct samsung_gpio_chip *chip = samsung_gpiolib_getchip(pin);
-	unsigned int off;
-	void __iomem *reg;
-	int shift;
-	u32 drvstr;
-
-	if (!chip)
-		return -EINVAL;
-
-	off = pin - chip->chip.base;
-	shift = off * 2;
-	reg = chip->base + 0x0C;
-
-	drvstr = __raw_readl(reg);
-	drvstr = drvstr >> shift;
-	drvstr &= 0x3;
-
-	return (__force s5p_gpio_drvstr_t)drvstr;
-}
-EXPORT_SYMBOL(s5p_gpio_get_drvstr);
-
-int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr)
-{
-	struct samsung_gpio_chip *chip = samsung_gpiolib_getchip(pin);
-	unsigned int off;
-	void __iomem *reg;
-	int shift;
-	u32 tmp;
-
-	if (!chip)
-		return -EINVAL;
-
-	off = pin - chip->chip.base;
-	shift = off * 2;
-	reg = chip->base + 0x0C;
-
-	tmp = __raw_readl(reg);
-	tmp &= ~(0x3 << shift);
-	tmp |= drvstr << shift;
-
-	__raw_writel(tmp, reg);
-
-	return 0;
-}
-EXPORT_SYMBOL(s5p_gpio_set_drvstr);
-#endif	/* CONFIG_S5P_GPIO_DRVSTR */
-
 #ifdef CONFIG_PLAT_S3C24XX
 unsigned int s3c2410_modify_misccr(unsigned int clear, unsigned int change)
 {
Signature · 1 line
1.9.3
Reviewed-by on v1 1/1
#61 lore raw

Re: [PATCH] gpio: samsung: Remove remaining check for CONFIG_S5P_GPIO_DRVSTR

Paul,

Quoted 20 lines · Paul Bolle
Quoted 6 lines · Arnd Bergmann
Quoted 3 lines · Paul Bolle

That check for CONFIG_S5P_GPIO_DRVSTR is still present in v3.17-rc3 and next-20140903. Should I submit the trivial patch to remove it (and the dead code it hides)?

Yes, I think this one is an obvious candidate for removal.

Still there in v3.17-rc5 and next-20140918. So I submit yet another trivial cleanup.

Done on top of next-20140918. Only tested by grepping the tree. Please note that, obviously, nothing uses s5p_gpio_get_drvstr() or s5p_gpio_set_drvstr().

Paul Bolle
-------->8--------
From: Paul Bolle <[email protected]>

Quoted 5 lines

Commit d78c16ccde96 ("ARM: SAMSUNG: Remove remaining legacy code") removed the Kconfig symbol S5P_GPIO_DRVSTR. It didn't remove one check for the related macro. Remove that check and the dead code it hides.

Thanks for the patch.

Best regards,
Tomasz

#62 lore raw

Re: [PATCH] gpio: samsung: Remove remaining check for CONFIG_S5P_GPIO_DRVSTR

In reply to Paul Bolle
Quoted 7 lines · Paul Bolle

From: Paul Bolle <[email protected]>

Commit d78c16ccde96 ("ARM: SAMSUNG: Remove remaining legacy code") removed the Kconfig symbol S5P_GPIO_DRVSTR. It didn't remove one check for the related macro. Remove that check and the dead code it hides.

Patch applied with Tomasz Review tag.

Yours,
Linus Walleij

#63 lore raw

PATCH 19/19 clk: samsung: s5pv210: Remove legacy board support

In reply to Tomasz Figa

Since there is no more support for board files, this patch removes legacy non-DT support from the clock driver as well, including unnecessary clkdev aliases.

Cc Mike Turquette <[email protected]>
---
 drivers/clk/samsung/clk-s5pv210.c | 122 +-------------------------------------
 1 file changed, 1 insertion(+), 121 deletions(-)
drivers/clk/samsung/clk-s5pv210.c +1 -121
index 509779a..d270a20 100644
@@ -503,15 +503,6 @@ static struct samsung_mux_clock s5p6442_mux_clks[] __initdata = {
 	MUX(MOUT_CLKSEL, "mout_clksel", mout_clksel_6442_p, CLK_OUT, 12, 5),
 };
 
-/*
- * Common fixed rate clocks generated outside the SoC.
- * NOTE: Needed only to support legacy board files.
- */
-static struct samsung_fixed_rate_clock ext_clks[] __initdata = {
-	[xxti] = FRATE(0, "xxti", NULL, CLK_IS_ROOT, 0),
-	[xusbxti] = FRATE(0, "xusbxti", NULL, CLK_IS_ROOT, 0),
-};
-
 /* S5PV210-specific fixed rate clocks generated inside the SoC. */
 static struct samsung_fixed_rate_clock s5pv210_frate_clks[] __initdata = {
 	FRATE(SCLK_HDMI27M, "sclk_hdmi27m", NULL, CLK_IS_ROOT, 27000000),
@@ -758,103 +749,10 @@ static struct samsung_gate_clock s5p6442_gate_clks[] __initdata = {
  * NOTE: Needed only to support legacy board files.
  */
 static struct samsung_clock_alias s5pv210_aliases[] = {
-	ALIAS(CLK_FIMC0, "s5pv210-fimc.0", "fimc"),
-	ALIAS(CLK_FIMC1, "s5pv210-fimc.1", "fimc"),
-	ALIAS(CLK_FIMC2, "s5pv210-fimc.2", "fimc"),
-	ALIAS(SCLK_FIMC0, "s5pv210-fimc.0", "sclk_fimc"),
-	ALIAS(SCLK_FIMC1, "s5pv210-fimc.1", "sclk_fimc"),
-	ALIAS(SCLK_FIMC2, "s5pv210-fimc.2", "sclk_fimc"),
 	ALIAS(DOUT_APLL, NULL, "armclk"),
 	ALIAS(DOUT_HCLKM, NULL, "hclk_msys"),
 	ALIAS(MOUT_DMC0, NULL, "sclk_dmc0"),
-	ALIAS(CLK_UART0, "s5pv210-uart.0", "uart"),
-	ALIAS(CLK_UART1, "s5pv210-uart.1", "uart"),
-	ALIAS(CLK_UART2, "s5pv210-uart.2", "uart"),
-	ALIAS(CLK_UART3, "s5pv210-uart.3", "uart"),
-	ALIAS(CLK_UART0, "s5pv210-uart.0", "clk_uart_baud0"),
-	ALIAS(CLK_UART1, "s5pv210-uart.1", "clk_uart_baud0"),
-	ALIAS(CLK_UART2, "s5pv210-uart.2", "clk_uart_baud0"),
-	ALIAS(CLK_UART3, "s5pv210-uart.3", "clk_uart_baud0"),
-	ALIAS(SCLK_UART0, "s5pv210-uart.0", "clk_uart_baud1"),
-	ALIAS(SCLK_UART1, "s5pv210-uart.1", "clk_uart_baud1"),
-	ALIAS(SCLK_UART2, "s5pv210-uart.2", "clk_uart_baud1"),
-	ALIAS(SCLK_UART3, "s5pv210-uart.3", "clk_uart_baud1"),
-	ALIAS(CLK_HSMMC0, "s3c-sdhci.0", "hsmmc"),
-	ALIAS(CLK_HSMMC1, "s3c-sdhci.1", "hsmmc"),
-	ALIAS(CLK_HSMMC2, "s3c-sdhci.2", "hsmmc"),
-	ALIAS(CLK_HSMMC3, "s3c-sdhci.3", "hsmmc"),
-	ALIAS(CLK_HSMMC0, "s3c-sdhci.0", "mmc_busclk.0"),
-	ALIAS(CLK_HSMMC1, "s3c-sdhci.1", "mmc_busclk.0"),
-	ALIAS(CLK_HSMMC2, "s3c-sdhci.2", "mmc_busclk.0"),
-	ALIAS(CLK_HSMMC3, "s3c-sdhci.3", "mmc_busclk.0"),
-	ALIAS(SCLK_MMC0, "s3c-sdhci.0", "mmc_busclk.2"),
-	ALIAS(SCLK_MMC1, "s3c-sdhci.1", "mmc_busclk.2"),
-	ALIAS(SCLK_MMC2, "s3c-sdhci.2", "mmc_busclk.2"),
-	ALIAS(SCLK_MMC3, "s3c-sdhci.3", "mmc_busclk.2"),
-	ALIAS(CLK_SPI0, "s5pv210-spi.0", "spi_busclk0"),
-	ALIAS(CLK_SPI1, "s5pv210-spi.1", "spi_busclk0"),
-	ALIAS(SCLK_SPI0, "s5pv210-spi.0", "spi_busclk1"),
-	ALIAS(SCLK_SPI1, "s5pv210-spi.1", "spi_busclk1"),
-	ALIAS(CLK_PDMA0, "dma-pl330.0", "apb_pclk"),
-	ALIAS(CLK_PDMA1, "dma-pl330.1", "apb_pclk"),
-	ALIAS(CLK_PWM, NULL, "timers"),
-	ALIAS(CLK_NANDXL, "s5pc110-onenand", "gate"),
-	ALIAS(CLK_JPEG, NULL, "jpeg"),
-	ALIAS(CLK_MFC, "s5p-mfc", "mfc"),
-	ALIAS(CLK_TVENC, "s5p-sdo", "dac"),
-	ALIAS(CLK_MIXER, "s5p-mixer", "mixer"),
-	ALIAS(CLK_VP, "s5p-mixer", "vp"),
-	ALIAS(CLK_HDMI, "s5p-hdmi", "hdmi"),
-	ALIAS(SCLK_HDMI, "s5p-hdmi", "hdmiphy"),
-	ALIAS(SCLK_DAC, NULL, "sclk_dac"),
-	ALIAS(CLK_USB_OTG, NULL, "usbotg"),
-	ALIAS(CLK_USB_OTG, NULL, "otg"),
-	ALIAS(CLK_USB_HOST, NULL, "usb-host"),
-	ALIAS(CLK_USB_HOST, NULL, "usbhost"),
-	ALIAS(CLK_FIMD, "s5pv210-fb", "lcd"),
-	ALIAS(CLK_CFCON, "s5pv210-pata.0", "cfcon"),
-	ALIAS(CLK_WDT, NULL, "watchdog"),
-	ALIAS(CLK_RTC, NULL, "rtc"),
-	ALIAS(CLK_I2C0, "s3c2440-i2c.0", "i2c"),
-	ALIAS(CLK_I2C1, "s3c2440-i2c.1", "i2c"),
-	ALIAS(CLK_I2C2, "s3c2440-i2c.2", "i2c"),
-	ALIAS(CLK_I2C_HDMI_PHY, "s3c2440-hdmiphy-i2c", "i2c"),
-	ALIAS(CLK_TSADC, NULL, "adc"),
-	ALIAS(CLK_KEYIF, "s5pv210-keypad", "keypad"),
-	ALIAS(CLK_I2S0, "samsung-i2s.0", "iis"),
-	ALIAS(CLK_I2S1, "samsung-i2s.1", "iis"),
-	ALIAS(CLK_I2S2, "samsung-i2s.2", "iis"),
-	ALIAS(CLK_SPDIF, NULL, "spdif"),
-	ALIAS(SCLK_AUDIO0, "soc-audio.0", "sclk_audio"),
-	ALIAS(SCLK_AUDIO1, "soc-audio.1", "sclk_audio"),
-	ALIAS(SCLK_AUDIO2, "soc-audio.2", "sclk_audio"),
-	ALIAS(CLK_MFC, "s5p-mfc", "sclk_mfc"),
-	ALIAS(SCLK_CAM0, "sclk_cam0", "sclk_cam0"),
-	ALIAS(SCLK_CAM1, "sclk_cam1", "sclk_cam1"),
-	ALIAS(CLK_G2D, "s5p-g2d", "fimg2d"),
-	ALIAS(DOUT_G2D, "s5p-g2d", "sclk_fimg2d"),
-	ALIAS(CLK_CSIS, "s5p-mipi-csis", "csis"),
-	ALIAS(SCLK_CSIS, "s5p-mipi-csis", "sclk_csis"),
-	ALIAS(SCLK_PWM, "samsung-pwm", "pwm-tclk0"),
-	ALIAS(SCLK_PWM, "samsung-pwm", "pwm-tclk1"),
-	ALIAS(SCLK_FIMD, NULL, "sclk_fimd"),
-	ALIAS(MOUT_CAM0, NULL, "mout_cam0"),
-	ALIAS(MOUT_CAM1, NULL, "mout_cam1"),
-	ALIAS(MOUT_CSIS, NULL, "mout_csis"),
-	ALIAS(MOUT_VPLL, NULL, "sclk_vpll"),
-	ALIAS(SCLK_MIXER, NULL, "sclk_mixer"),
-	ALIAS(SCLK_HDMI, NULL, "sclk_hdmi"),
-};
-
-static void __init s5pv210_clk_register_fixed_ext(
-					struct samsung_clk_provider *ctx,
-					unsigned long xxti_f,
-					unsigned long xusbxti_f)
-{
-	ext_clks[xxti].fixed_rate = xxti_f;
-	ext_clks[xusbxti].fixed_rate = xusbxti_f;
-	samsung_clk_register_fixed_rate(ctx, ext_clks, ARRAY_SIZE(ext_clks));
-}
+};
 
 /* S5PV210-specific PLLs. */
 static struct samsung_pll_clock s5pv210_pll_clks[] __initdata = {
@@ -891,10 +789,6 @@ static void __init __s5pv210_clk_init(struct device_node *np,
 	if (!ctx)
 		panic("%s: unable to allocate context.\n", __func__);
 
-	/* Register external clocks (needed by board files). */
-	if (!np)
-		s5pv210_clk_register_fixed_ext(ctx, xxti_f, xusbxti_f);
-
 	samsung_clk_register_mux(ctx, early_mux_clks,
 					ARRAY_SIZE(early_mux_clks));
 
@@ -941,20 +835,6 @@ static void __init __s5pv210_clk_init(struct device_node *np,
 		_get_rate("mout_epll"), _get_rate("mout_vpll"));
 }
 
-/**
- * s5pv210_clk_init
- * @xxti_f: Rate of XXTI input clock.
- * @xusbxti_f: Rate of XUSBXTI input clock.
- * @base:
- */
-void __init s5pv210_clk_init(unsigned long xxti_f, unsigned long xusbxti_f,
-			     void __iomem *base)
-{
-	reg_base = base;
-
-	__s5pv210_clk_init(NULL, xxti_f, xusbxti_f, false);
-}
-
 static void __init s5pv210_clk_dt_init(struct device_node *np)
 {
 	reg_base = of_iomap(np, 0);
Signature · 1 line
1.9.3
#64 lore raw
In reply to Tomasz Figa

Aha, I forgot to add that the series is based on Kukjin's for-next branch with "pwm: samsung: remove s5pc100 related pwm codes" patch reverted and you can find a ready branch here:

https://github.com/tom3q/linux.git v3.17-s5pv210-dt

Sorry for the noise.

Best regards,
Tomasz

Quoted 251 lines · Tomasz Figa

This huge series is a (hopefully final) attempt to convert Samsung S5PV210 into a DT-only and multiplatform-aware platform. It consists of several steps to gradually replace legacy code with one meeting current standards and then finally remove unused remnants.

Patches 1-6 migrate the platform to fully use the Common Clock Framework and get rid of legacy private clock code, of which s5pv210 was the last user. Then patch 7 adds generic PHY driver for USB PHY on S5PV210 to allow USB to be supported when using DT. Further three patches (8-10) add DT support for mach-s5pv210 and necessary DT sources for currently supported boards. Patch 11 removes board files and code directly related to them, effectively making s5pv210 a DT-only platform. In next step, patches 12-15 prepare remaining code for multiplatform enablement, which is finally done in patch 16. Patches 17-19 are a final clean-up, which remove a lot of unused code left after making the last S5P platform DT-only.

Build tested patch by patch on following configs:
- s3c2410_defconfig (with DT support enabled),
- s3c6400_defconfig (with DT support enabled),
- s5pv210_defconfig (with DT support enabled after patches adding it),
- exynos_defconfig,
- exynos_defconfig with S5PV210 enabled in multiplatform configuration.

Boot tested on s5pv210-goni board.

Note that support for smdkc110, smdkv210 and torbreck boards is provided by moving data from existing board files to new device tree sources. No testing was performed due to mentioned board not being available anymore. However I believe we agreed on this approach, because apparently there are no active users of them. See the RFC from August 2013 asking for removal of the whole platform [1].

[1] http://www.mail-archive.com/linux-samsung-soc%40vger.kernel.org/msg21882.html

Mateusz Krawczuk (6):
clk: samsung: Add clock driver for S5PV210 and compatible SoCs
ARM: s5pv210: Migrate clock handling to Common Clock Framework
phy: Add support for S5PV210 to the Exynos USB 2.0 PHY driver
ARM: s5pv210: Add board file for boot using Device Tree
ARM: Samsung: DT: Add Device tree for s5pv210
ARM: Samsung: DT: Add Device tree for S5PC110/S5PV210 Boards

Tomasz Figa (13):
cpufreq: s3c24xx: Remove some dead code
serial: samsung: Remove support for legacy clock code
ARM: SAMSUNG: Remove legacy clock code
clk: samsung: Add S5PV210 Audio Subsystem clock driver
ARM: S5PV210: Remove support for board files
ARM: S5PV210: Untie PM support from legacy code
ARM: s5pv210: move debug-macro.S into the common space
ARM: s5pv210: Register cpufreq platform device
cpufreq: s5pv210: Make the driver multiplatform aware
ARM: s5pv210: Enable multi-platform build support
gpio: samsung: Remove legacy support of S5PV210
ARM: SAMSUNG: Remove remaining legacy code
clk: samsung: s5pv210: Remove legacy board support

 .../bindings/clock/clk-s5pv210-audss.txt           |   53 +
 .../bindings/clock/samsung,s5pv210-clock.txt       |   78 ++
 .../devicetree/bindings/phy/samsung-phy.txt        |    1 +
 arch/arm/Kconfig                                   |   22 +-
 arch/arm/Kconfig.debug                             |   12 +-
 arch/arm/Makefile                                  |    4 +-
 arch/arm/boot/dts/Makefile                         |    5 +
 arch/arm/boot/dts/s5pv210-aquila.dts               |  392 ++++++
 arch/arm/boot/dts/s5pv210-goni.dts                 |  449 +++++++
 arch/arm/boot/dts/s5pv210-pinctrl.dtsi             |  839 ++++++++++++
 arch/arm/boot/dts/s5pv210-smdkc110.dts             |   78 ++
 arch/arm/boot/dts/s5pv210-smdkv210.dts             |  238 ++++
 arch/arm/boot/dts/s5pv210-torbreck.dts             |   92 ++
 arch/arm/boot/dts/s5pv210.dtsi                     |  633 +++++++++
 arch/arm/include/debug/s5pv210.S                   |   34 +
 arch/arm/mach-exynos/pm.c                          |    1 -
 arch/arm/mach-s3c24xx/common.c                     |    2 -
 arch/arm/mach-s3c24xx/iotiming-s3c2412.c           |    1 -
 arch/arm/mach-s3c24xx/mach-h1940.c                 |    5 +-
 arch/arm/mach-s3c24xx/mach-jive.c                  |    1 -
 arch/arm/mach-s3c24xx/mach-smdk2413.c              |    1 -
 arch/arm/mach-s3c24xx/mach-smdk2416.c              |    1 -
 arch/arm/mach-s3c24xx/mach-smdk2443.c              |    1 -
 arch/arm/mach-s3c24xx/mach-vstms.c                 |    1 -
 arch/arm/mach-s3c24xx/s3c2410.c                    |    6 -
 arch/arm/mach-s3c24xx/s3c2412.c                    |    6 -
 arch/arm/mach-s3c24xx/s3c2442.c                    |    1 -
 arch/arm/mach-s3c24xx/s3c244x.c                    |    6 -
 arch/arm/mach-s3c64xx/mach-anw6410.c               |    1 -
 arch/arm/mach-s3c64xx/mach-crag6410.c              |    1 -
 arch/arm/mach-s3c64xx/mach-hmt.c                   |    1 -
 arch/arm/mach-s3c64xx/mach-ncp.c                   |    1 -
 arch/arm/mach-s3c64xx/mach-smartq.c                |    1 -
 arch/arm/mach-s3c64xx/mach-smdk6400.c              |    1 -
 arch/arm/mach-s3c64xx/mach-smdk6410.c              |    1 -
 arch/arm/mach-s3c64xx/s3c6400.c                    |    1 -
 arch/arm/mach-s3c64xx/s3c6410.c                    |    1 -
 arch/arm/mach-s5pv210/Kconfig                      |  197 +--
 arch/arm/mach-s5pv210/Makefile                     |   29 +-
 arch/arm/mach-s5pv210/Makefile.boot                |    2 -
 arch/arm/mach-s5pv210/clock.c                      | 1365 --------------------
 arch/arm/mach-s5pv210/common.c                     |  279 ----
 arch/arm/mach-s5pv210/common.h                     |   21 +-
 arch/arm/mach-s5pv210/dev-audio.c                  |  246 ----
 arch/arm/mach-s5pv210/dma.c                        |  130 --
 arch/arm/mach-s5pv210/include/mach/debug-macro.S   |   41 -
 arch/arm/mach-s5pv210/include/mach/dma.h           |   26 -
 arch/arm/mach-s5pv210/include/mach/gpio.h          |  140 --
 arch/arm/mach-s5pv210/include/mach/hardware.h      |   18 -
 arch/arm/mach-s5pv210/include/mach/irqs.h          |  137 --
 arch/arm/mach-s5pv210/include/mach/map.h           |  158 ---
 arch/arm/mach-s5pv210/include/mach/memory.h        |   27 -
 arch/arm/mach-s5pv210/include/mach/pm-core.h       |   46 -
 arch/arm/mach-s5pv210/include/mach/regs-clock.h    |    2 +-
 arch/arm/mach-s5pv210/include/mach/regs-gpio.h     |   41 -
 arch/arm/mach-s5pv210/include/mach/regs-irq.h      |   18 -
 arch/arm/mach-s5pv210/mach-aquila.c                |  687 ----------
 arch/arm/mach-s5pv210/mach-goni.c                  |  916 -------------
 arch/arm/mach-s5pv210/mach-smdkc110.c              |  159 ---
 arch/arm/mach-s5pv210/mach-smdkv210.c              |  337 -----
 arch/arm/mach-s5pv210/mach-torbreck.c              |  135 --
 arch/arm/mach-s5pv210/pm.c                         |  147 ++-
 arch/arm/mach-s5pv210/s5pv210.c                    |   77 ++
 arch/arm/mach-s5pv210/setup-fb-24bpp.c             |   49 -
 arch/arm/mach-s5pv210/setup-fimc.c                 |   43 -
 arch/arm/mach-s5pv210/setup-i2c0.c                 |   28 -
 arch/arm/mach-s5pv210/setup-i2c1.c                 |   28 -
 arch/arm/mach-s5pv210/setup-i2c2.c                 |   28 -
 arch/arm/mach-s5pv210/setup-ide.c                  |   39 -
 arch/arm/mach-s5pv210/setup-keypad.c               |   24 -
 arch/arm/mach-s5pv210/setup-sdhci-gpio.c           |  103 --
 arch/arm/mach-s5pv210/setup-spi.c                  |   34 -
 arch/arm/mach-s5pv210/setup-usb-phy.c              |   95 --
 arch/arm/mach-s5pv210/sleep.S                      |   36 +
 arch/arm/plat-samsung/Kconfig                      |  143 +-
 arch/arm/plat-samsung/Makefile                     |   15 -
 arch/arm/plat-samsung/clock-clksrc.c               |  212 ---
 arch/arm/plat-samsung/clock.c                      |  539 --------
 arch/arm/plat-samsung/cpu.c                        |    3 +-
 arch/arm/plat-samsung/devs.c                       |  330 -----
 arch/arm/plat-samsung/include/plat/camport.h       |   28 -
 arch/arm/plat-samsung/include/plat/clock-clksrc.h  |   83 --
 arch/arm/plat-samsung/include/plat/clock.h         |  152 ---
 arch/arm/plat-samsung/include/plat/cpu-freq-core.h |    3 -
 arch/arm/plat-samsung/include/plat/cpu.h           |   13 -
 arch/arm/plat-samsung/include/plat/devs.h          |   42 -
 arch/arm/plat-samsung/include/plat/fb-core.h       |   15 -
 arch/arm/plat-samsung/include/plat/fb.h            |   22 -
 arch/arm/plat-samsung/include/plat/fimc-core.h     |   51 -
 arch/arm/plat-samsung/include/plat/gpio-cfg.h      |   64 -
 arch/arm/plat-samsung/include/plat/hdmi.h          |   16 -
 arch/arm/plat-samsung/include/plat/irqs.h          |   72 --
 arch/arm/plat-samsung/include/plat/mfc.h           |   35 -
 arch/arm/plat-samsung/include/plat/pll.h           |  323 -----
 arch/arm/plat-samsung/include/plat/s5p-clock.h     |   65 -
 arch/arm/plat-samsung/include/plat/sdhci.h         |   47 -
 arch/arm/plat-samsung/include/plat/tv-core.h       |   44 -
 arch/arm/plat-samsung/init.c                       |    1 -
 arch/arm/plat-samsung/pm-gpio.c                    |    4 +-
 arch/arm/plat-samsung/s5p-clock.c                  |  294 -----
 arch/arm/plat-samsung/s5p-dev-mfc.c                |   81 +-
 arch/arm/plat-samsung/s5p-dev-uart.c               |   88 --
 arch/arm/plat-samsung/s5p-irq-eint.c               |  221 ----
 arch/arm/plat-samsung/s5p-irq-gpioint.c            |  218 ----
 arch/arm/plat-samsung/s5p-irq-pm.c                 |   92 --
 arch/arm/plat-samsung/s5p-irq.c                    |   31 -
 arch/arm/plat-samsung/s5p-pm.c                     |   40 -
 arch/arm/plat-samsung/s5p-sleep.S                  |   45 -
 drivers/clk/samsung/Makefile                       |    1 +
 drivers/clk/samsung/clk-s5pv210-audss.c            |  241 ++++
 drivers/clk/samsung/clk-s5pv210.c                  |  856 ++++++++++++
 drivers/cpufreq/s3c2410-cpufreq.c                  |    2 -
 drivers/cpufreq/s3c2412-cpufreq.c                  |    3 -
 drivers/cpufreq/s3c2440-cpufreq.c                  |    3 -
 drivers/cpufreq/s3c24xx-cpufreq.c                  |    1 -
 drivers/cpufreq/s5pv210-cpufreq.c                  |  131 +-
 drivers/gpio/gpio-samsung.c                        |  240 ----
 drivers/phy/Kconfig                                |   10 +
 drivers/phy/Makefile                               |    1 +
 drivers/phy/phy-s5pv210-usb2.c                     |  187 +++
 drivers/phy/phy-samsung-usb2.c                     |    6 +
 drivers/phy/phy-samsung-usb2.h                     |    1 +
 drivers/tty/serial/samsung.c                       |    4 -
 include/dt-bindings/clock/s5pv210-audss.h          |   34 +
 include/dt-bindings/clock/s5pv210.h                |  239 ++++
 125 files changed, 4843 insertions(+), 9409 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/clk-s5pv210-audss.txt
 create mode 100644 Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.txt
 create mode 100644 arch/arm/boot/dts/s5pv210-aquila.dts
 create mode 100644 arch/arm/boot/dts/s5pv210-goni.dts
 create mode 100644 arch/arm/boot/dts/s5pv210-pinctrl.dtsi
 create mode 100644 arch/arm/boot/dts/s5pv210-smdkc110.dts
 create mode 100644 arch/arm/boot/dts/s5pv210-smdkv210.dts
 create mode 100644 arch/arm/boot/dts/s5pv210-torbreck.dts
 create mode 100644 arch/arm/boot/dts/s5pv210.dtsi
 create mode 100644 arch/arm/include/debug/s5pv210.S
 delete mode 100644 arch/arm/mach-s5pv210/Makefile.boot
 delete mode 100644 arch/arm/mach-s5pv210/clock.c
 delete mode 100644 arch/arm/mach-s5pv210/common.c
 delete mode 100644 arch/arm/mach-s5pv210/dev-audio.c
 delete mode 100644 arch/arm/mach-s5pv210/dma.c
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/dma.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/gpio.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/map.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/memory.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/pm-core.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/regs-gpio.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/regs-irq.h
 delete mode 100644 arch/arm/mach-s5pv210/mach-aquila.c
 delete mode 100644 arch/arm/mach-s5pv210/mach-goni.c
 delete mode 100644 arch/arm/mach-s5pv210/mach-smdkc110.c
 delete mode 100644 arch/arm/mach-s5pv210/mach-smdkv210.c
 delete mode 100644 arch/arm/mach-s5pv210/mach-torbreck.c
 create mode 100644 arch/arm/mach-s5pv210/s5pv210.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-fb-24bpp.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-fimc.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-i2c0.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-i2c1.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-i2c2.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-ide.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-keypad.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-sdhci-gpio.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-spi.c
 delete mode 100644 arch/arm/mach-s5pv210/setup-usb-phy.c
 create mode 100644 arch/arm/mach-s5pv210/sleep.S
 delete mode 100644 arch/arm/plat-samsung/clock-clksrc.c
 delete mode 100644 arch/arm/plat-samsung/clock.c
 delete mode 100644 arch/arm/plat-samsung/include/plat/camport.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/clock-clksrc.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/clock.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/fimc-core.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/hdmi.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/irqs.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/mfc.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/pll.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/s5p-clock.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/tv-core.h
 delete mode 100644 arch/arm/plat-samsung/s5p-clock.c
 delete mode 100644 arch/arm/plat-samsung/s5p-dev-uart.c
 delete mode 100644 arch/arm/plat-samsung/s5p-irq-eint.c
 delete mode 100644 arch/arm/plat-samsung/s5p-irq-gpioint.c
 delete mode 100644 arch/arm/plat-samsung/s5p-irq-pm.c
 delete mode 100644 arch/arm/plat-samsung/s5p-irq.c
 delete mode 100644 arch/arm/plat-samsung/s5p-pm.c
 delete mode 100644 arch/arm/plat-samsung/s5p-sleep.S
 create mode 100644 drivers/clk/samsung/clk-s5pv210-audss.c
 create mode 100644 drivers/clk/samsung/clk-s5pv210.c
 create mode 100644 drivers/phy/phy-s5pv210-usb2.c
 create mode 100644 include/dt-bindings/clock/s5pv210-audss.h
 create mode 100644 include/dt-bindings/clock/s5pv210.h
maintainer Acked-by on the v1 series
#65 lore raw
In reply to Tomasz Figa
Quoted 25 lines · On Friday 04 July 2014 19:48:00 Tomasz Figa wrote:

This huge series is a (hopefully final) attempt to convert Samsung S5PV210 into a DT-only and multiplatform-aware platform. It consists of several steps to gradually replace legacy code with one meeting current standards and then finally remove unused remnants.

Patches 1-6 migrate the platform to fully use the Common Clock Framework and get rid of legacy private clock code, of which s5pv210 was the last user. Then patch 7 adds generic PHY driver for USB PHY on S5PV210 to allow USB to be supported when using DT. Further three patches (8-10) add DT support for mach-s5pv210 and necessary DT sources for currently supported boards. Patch 11 removes board files and code directly related to them, effectively making s5pv210 a DT-only platform. In next step, patches 12-15 prepare remaining code for multiplatform enablement, which is finally done in patch 16. Patches 17-19 are a final clean-up, which remove a lot of unused code left after making the last S5P platform DT-only.

Build tested patch by patch on following configs:
- s3c2410_defconfig (with DT support enabled),
- s3c6400_defconfig (with DT support enabled),
- s5pv210_defconfig (with DT support enabled after patches adding it),
- exynos_defconfig,
- exynos_defconfig with S5PV210 enabled in multiplatform configuration.

Boot tested on s5pv210-goni board.

Quoted 10 lines

Note that support for smdkc110, smdkv210 and torbreck boards is provided by moving data from existing board files to new device tree sources. No testing was performed due to mentioned board not being available anymore. However I believe we agreed on this approach, because apparently there are no active users of them. See the RFC from August 2013 asking for removal of the whole platform [1].

[1] http://www.mail-archive.com/linux-samsung-soc%40vger.kernel.org/msg21882.html

Great work, everything

I hope we can get this into linux-next soon so we can do some more cleanups on top.

Arnd

#66 lore raw
Quoted 36 lines · Arnd Bergmann
Quoted 25 lines · On Friday 04 July 2014 19:48:00 Tomasz Figa wrote:

This huge series is a (hopefully final) attempt to convert Samsung S5PV210 into a DT-only and multiplatform-aware platform. It consists of several steps to gradually replace legacy code with one meeting current standards and then finally remove unused remnants.

Patches 1-6 migrate the platform to fully use the Common Clock Framework and get rid of legacy private clock code, of which s5pv210 was the last user. Then patch 7 adds generic PHY driver for USB PHY on S5PV210 to allow USB to be supported when using DT. Further three patches (8-10) add DT support for mach-s5pv210 and necessary DT sources for currently supported boards. Patch 11 removes board files and code directly related to them, effectively making s5pv210 a DT-only platform. In next step, patches 12-15 prepare remaining code for multiplatform enablement, which is finally done in patch 16. Patches 17-19 are a final clean-up, which remove a lot of unused code left after making the last S5P platform DT-only.

Build tested patch by patch on following configs:
- s3c2410_defconfig (with DT support enabled),
- s3c6400_defconfig (with DT support enabled),
- s5pv210_defconfig (with DT support enabled after patches adding it),
- exynos_defconfig,
- exynos_defconfig with S5PV210 enabled in multiplatform configuration.

Boot tested on s5pv210-goni board.

Quoted 10 lines

Note that support for smdkc110, smdkv210 and torbreck boards is provided by moving data from existing board files to new device tree sources. No testing was performed due to mentioned board not being available anymore. However I believe we agreed on this approach, because apparently there are no active users of them. See the RFC from August 2013 asking for removal of the whole platform [1].

[1] http://www.mail-archive.com/linux-samsung-soc%40vger.kernel.org/msg21882.html

Quoted 6 lines

Great work, everything

I hope we can get this into linux-next soon so we can do some more cleanups on top.

Sorry for a little bit late applying, I just wanted to get ack from driver maintainers but... anyway I'll apply this series so you may see this on Monday in -next :)

Tomasz, many thanks for your effort and time.

- Kukjin