Skip to contentSkip to conversation

Move some stuff into the new mach-s3c24xx

PATCH Superseded Heiko Stübner 4 participants 11 messages Feb 21, 2012 – Mar 1, 2012

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

cover Move some stuff into the new mach-s3c24xx

Hi,

These two patches move the s3c2443 common clock code and the dma base code from plat-s3c24xx to mach-s3c24xx and apply on top of the current s3c24xx-cleanup topic-branch.

The s3c2443-clock.c got a common-s3c2443.c name, to hold more common code for s3c2443/2416/2450 later on.

I'm still not sure what would be a fitting name for "s3c2443 and later", so please speak up everyone with better ideas :-) .

I can also do more later on, but would like to check first if my direction is correct :-)

Heiko

Heiko Stuebner (2):
ARM: S3C24XX: Move s3c2443-clock.c to mach-s3c24xx
ARM: S3C24XX: Move the DMA base code to mach-s3c24xx

 arch/arm/mach-s3c24xx/Kconfig          |   32 +-
 arch/arm/mach-s3c24xx/Makefile         |    5 +
 arch/arm/mach-s3c24xx/common-s3c2443.c |  644 ++++++++++++++
 arch/arm/mach-s3c24xx/dma.c            | 1469 ++++++++++++++++++++++++++++++++
 arch/arm/plat-s3c24xx/Kconfig          |   22 -
 arch/arm/plat-s3c24xx/Makefile         |    2 -
 arch/arm/plat-s3c24xx/dma.c            | 1469 --------------------------------
 arch/arm/plat-s3c24xx/s3c2443-clock.c  |  635 --------------
 8 files changed, 2148 insertions(+), 2130 deletions(-)
 create mode 100644 arch/arm/mach-s3c24xx/common-s3c2443.c
 create mode 100644 arch/arm/mach-s3c24xx/dma.c
 delete mode 100644 arch/arm/plat-s3c24xx/dma.c
 delete mode 100644 arch/arm/plat-s3c24xx/s3c2443-clock.c
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 1/2 ARM: S3C24XX: Move s3c2443-clock.c to mach-s3c24xx

S3C-SoCs starting with the S3C2443 can share a lot of functionality. The file can collect more common code of these SocS later on and therefore gets a new name to reflect this future purpose.

---
 arch/arm/mach-s3c24xx/Kconfig          |   14 +-
 arch/arm/mach-s3c24xx/Makefile         |    4 +
 arch/arm/mach-s3c24xx/common-s3c2443.c |  644 ++++++++++++++++++++++++++++++++
 arch/arm/plat-s3c24xx/Kconfig          |    6 -
 arch/arm/plat-s3c24xx/Makefile         |    1 -
 arch/arm/plat-s3c24xx/s3c2443-clock.c  |  635 -------------------------------
 6 files changed, 660 insertions(+), 644 deletions(-)
 create mode 100644 arch/arm/mach-s3c24xx/common-s3c2443.c
 delete mode 100644 arch/arm/plat-s3c24xx/s3c2443-clock.c
arch/arm/mach-s3c24xx/Kconfig +12 -2
index e537577..506d55b 100644
@@ -41,7 +41,7 @@ config CPU_S3C2416
 	select CPU_ARM926T
 	select CPU_LLSERIAL_S3C2440
 	select SAMSUNG_CLKSRC
-	select S3C2443_CLOCK
+	select S3C2443_COMMON
 	select S3C2416_DMA if S3C24XX_DMA
 	select S3C2416_PM if PM
 	help
@@ -76,7 +76,7 @@ config CPU_S3C2443
 	select CPU_ARM920T
 	select CPU_LLSERIAL_S3C2440
 	select SAMSUNG_CLKSRC
-	select S3C2443_CLOCK
+	select S3C2443_COMMON
 	select S3C2443_DMA if S3C24XX_DMA
 	help
 	  Support for the S3C2443 SoC from the S3C24XX line
@@ -470,6 +470,16 @@ config SMDK2440_CPU2442
 
 endif	# CPU_S3C2440
 
+if CPU_S3C2443 || CPU_S3C2416
+
+config S3C2443_COMMON
+	bool
+	help
+	  Common code for the S3C2443 and similar processors, which includes
+	  the S3C2416 and S3C2450.
+
+endif	# CPU_S3C2443 || CPU_S3C2416
+
 if CPU_S3C2443
 
 config S3C2443_DMA
arch/arm/mach-s3c24xx/Makefile +4 -0
index 08b44a3..876e5e5 100644
@@ -34,6 +34,10 @@ obj-$(CONFIG_S3C2440_DMA)	+= dma-s3c2440.o
 obj-$(CONFIG_CPU_S3C2443)	+= s3c2443.o irq-s3c2443.o clock-s3c2443.o
 obj-$(CONFIG_S3C2443_DMA)	+= dma-s3c2443.o
 
+# common code
+
+obj-$(CONFIG_S3C2443_COMMON)	+= common-s3c2443.o
+
 #
 # machine support
 # following is ordered alphabetically by option text.
arch/arm/mach-s3c24xx/common-s3c2443.c new file +644 -0

644 lines not on this page · raw message

arch/arm/plat-s3c24xx/Kconfig +0 -6
index 0c183fd..74f76e0 100644
@@ -44,12 +44,6 @@ config S3C2410_CLOCK
 	  Clock code for the S3C2410, and similar processors which
 	  is currently includes the S3C2410, S3C2440, S3C2442.
 
-config S3C2443_CLOCK
-	bool
-	help
-	  Clock code for the S3C2443 and similar processors, which includes
-	  the S3C2416 and S3C2450.
-
 config S3C24XX_DCLK
 	bool
 	help
arch/arm/plat-s3c24xx/Makefile +0 -1
index bce27ca..a7e8843 100644
@@ -28,7 +28,6 @@ obj-$(CONFIG_PM)		+= pm.o
 obj-$(CONFIG_PM)		+= irq-pm.o
 obj-$(CONFIG_PM)		+= sleep.o
 obj-$(CONFIG_S3C2410_CLOCK)	+= s3c2410-clock.o
-obj-$(CONFIG_S3C2443_CLOCK)	+= s3c2443-clock.o
 obj-$(CONFIG_S3C24XX_DMA)	+= dma.o
 obj-$(CONFIG_S3C2410_IOTIMING)	+= s3c2410-iotiming.o
 obj-$(CONFIG_S3C2412_IOTIMING)	+= s3c2412-iotiming.o
arch/arm/plat-s3c24xx/s3c2443-clock.c deleted +0 -635

635 lines not on this page · raw message

Signature · 1 line
1.7.2.3
#2 lore raw

PATCH 1/2 ARM: S3C24XX: Move s3c2443-clock.c to mach-s3c24xx

Quoted 4 lines · Heiko St?bner

S3C-SoCs starting with the S3C2443 can share a lot of functionality. The file can collect more common code of these SocS later on and therefore gets a new name to reflect this future purpose.

Quoted 8 lines
---
 arch/arm/mach-s3c24xx/Kconfig          |   14 +-
 arch/arm/mach-s3c24xx/Makefile         |    4 +
 arch/arm/mach-s3c24xx/common-s3c2443.c |  644 ++++++++++++++++++++++++++++++++
 arch/arm/plat-s3c24xx/Kconfig          |    6 -
 arch/arm/plat-s3c24xx/Makefile         |    1 -
 arch/arm/plat-s3c24xx/s3c2443-clock.c  |  635 -------------------------------

No objections on the patch, but please use 'git format-patch -M' when moving files so that we can see which parts have changed in the process.

Arnd

#3 lore raw

PATCH 1/2 ARM: S3C24XX: Move s3c2443-clock.c to mach-s3c24xx

Am Mittwoch 22 Februar 2012, 18:18:00 schrieb Arnd Bergmann:

Quoted 17 lines · Heiko St?bner
Quoted 7 lines

S3C-SoCs starting with the S3C2443 can share a lot of functionality. The file can collect more common code of these SocS later on and therefore gets a new name to reflect this future purpose.

---

Quoted 8 lines
 arch/arm/mach-s3c24xx/Kconfig          |   14 +-
 arch/arm/mach-s3c24xx/Makefile         |    4 +
 arch/arm/mach-s3c24xx/common-s3c2443.c |  644
 ++++++++++++++++++++++++++++++++ arch/arm/plat-s3c24xx/Kconfig         
 |    6 -
 arch/arm/plat-s3c24xx/Makefile         |    1 -
 arch/arm/plat-s3c24xx/s3c2443-clock.c  |  635

-------------------------------

Quoted 2 lines

No objections on the patch, but please use 'git format-patch -M' when moving files so that we can see which parts have changed in the process.

the results of -M look really nice, thanks for the hint and I will try to remember it :-)

Heiko

#4 lore raw

PATCH 1/2 ARM: S3C24XX: Move s3c2443-clock.c to mach-s3c24xx

Quoted 18 lines · Heiko St?bner

Am Mittwoch 22 Februar 2012, 18:18:00 schrieb Arnd Bergmann:

Quoted 17 lines · Heiko St?bner
Quoted 15 lines

S3C-SoCs starting with the S3C2443 can share a lot of functionality. The file can collect more common code of these SocS later on and therefore gets a new name to reflect this future purpose.

---

  arch/arm/mach-s3c24xx/Kconfig          |   14 +-
  arch/arm/mach-s3c24xx/Makefile         |    4 +
  arch/arm/mach-s3c24xx/common-s3c2443.c |  644
  ++++++++++++++++++++++++++++++++ arch/arm/plat-s3c24xx/Kconfig
  |    6 -
  arch/arm/plat-s3c24xx/Makefile         |    1 -
  arch/arm/plat-s3c24xx/s3c2443-clock.c  |  635

-------------------------------

Quoted 5 lines
Quoted 2 lines

No objections on the patch, but please use 'git format-patch -M' when moving files so that we can see which parts have changed in the process.

the results of -M look really nice, thanks for the hint and I will try to remember it :-)

Or for that, you can add following at .gitconfig file

[diff]

	renames = true
	renameLimit = 50000

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#5 lore raw

PATCH 1/2 ARM: S3C24XX: Move s3c2443-clock.c to mach-s3c24xx

In reply to Heiko Stübner
Quoted 6 lines · Heiko St?bner
Quoted 3 lines

No objections on the patch, but please use 'git format-patch -M' when moving files so that we can see which parts have changed in the process.

the results of -M look really nice, thanks for the hint and I will try to remember it :-)

The -M option is as easy to forget as it is useful. I wonder if that could be made the default with format-patch ?

-j

#6 lore raw

PATCH v2 1/1 ARM: S3C24XX: Move s3c2443-clock.c to mach-s3c24xx

In reply to Heiko Stübner

S3C-SoCs starting with the S3C2443 can share a lot of functionality. The file can collect more common code of these SocS later on and therefore gets a new name to reflect this future purpose.

---
for completenes sake, the patch with -M format

 arch/arm/mach-s3c24xx/Kconfig                      |   14 ++++++++++++--
 arch/arm/mach-s3c24xx/Makefile                     |    4 ++++
 .../common-s3c2443.c}                              |   17 +++++++++++++----
 arch/arm/plat-s3c24xx/Kconfig                      |    6 ------
 arch/arm/plat-s3c24xx/Makefile                     |    1 -
 5 files changed, 29 insertions(+), 13 deletions(-)
 rename arch/arm/{plat-s3c24xx/s3c2443-clock.c => mach-s3c24xx/common-s3c2443.c} (95%)
arch/arm/mach-s3c24xx/Kconfig +12 -2
index e537577..506d55b 100644
@@ -41,7 +41,7 @@ config CPU_S3C2416
 	select CPU_ARM926T
 	select CPU_LLSERIAL_S3C2440
 	select SAMSUNG_CLKSRC
-	select S3C2443_CLOCK
+	select S3C2443_COMMON
 	select S3C2416_DMA if S3C24XX_DMA
 	select S3C2416_PM if PM
 	help
@@ -76,7 +76,7 @@ config CPU_S3C2443
 	select CPU_ARM920T
 	select CPU_LLSERIAL_S3C2440
 	select SAMSUNG_CLKSRC
-	select S3C2443_CLOCK
+	select S3C2443_COMMON
 	select S3C2443_DMA if S3C24XX_DMA
 	help
 	  Support for the S3C2443 SoC from the S3C24XX line
@@ -470,6 +470,16 @@ config SMDK2440_CPU2442
 
 endif	# CPU_S3C2440
 
+if CPU_S3C2443 || CPU_S3C2416
+
+config S3C2443_COMMON
+	bool
+	help
+	  Common code for the S3C2443 and similar processors, which includes
+	  the S3C2416 and S3C2450.
+
+endif	# CPU_S3C2443 || CPU_S3C2416
+
 if CPU_S3C2443
 
 config S3C2443_DMA
arch/arm/mach-s3c24xx/Makefile +4 -0
index 08b44a3..876e5e5 100644
@@ -34,6 +34,10 @@ obj-$(CONFIG_S3C2440_DMA)	+= dma-s3c2440.o
 obj-$(CONFIG_CPU_S3C2443)	+= s3c2443.o irq-s3c2443.o clock-s3c2443.o
 obj-$(CONFIG_S3C2443_DMA)	+= dma-s3c2443.o
 
+# common code
+
+obj-$(CONFIG_S3C2443_COMMON)	+= common-s3c2443.o
+
 #
 # machine support
 # following is ordered alphabetically by option text.
arch/arm/mach-s3c24xx/common-s3c2443.c renamed from arch/arm/plat-s3c24xx/s3c2443-clock.c +13 -4
similarity index 95%
rename from arch/arm/plat-s3c24xx/s3c2443-clock.c
rename to arch/arm/mach-s3c24xx/common-s3c2443.c
index 3633060..2745616 100644
@@ -1,9 +1,18 @@
-/* linux/arch/arm/plat-s3c24xx/s3c2443-clock.c
+/*
+ * Common code for SoCs starting with the S3C2443
  *
  * Copyright (c) 2007, 2010 Simtec Electronics
  *	Ben Dooks <[email protected]>
  *
- * S3C2443 Clock control suport - common code
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  */
 
 #include <linux/init.h>
@@ -552,7 +561,7 @@ void __init_or_cpufreq s3c2443_common_setup_clocks(pll_fn get_mpll)
 	s3c24xx_setup_clocks(fclk, hclk, pclk);
 
 	printk("CPU: MPLL %s %ld.%03ld MHz, cpu %ld.%03ld MHz, mem %ld.%03ld MHz, pclk %ld.%03ld MHz\n",
-	       (mpllcon & S3C2443_PLLCON_OFF) ? "off":"on",
+	       (mpllcon & S3C2443_PLLCON_OFF) ? "off" : "on",
 	       print_mhz(pll), print_mhz(fclk),
 	       print_mhz(hclk), print_mhz(pclk));
 
@@ -567,7 +576,7 @@ void __init_or_cpufreq s3c2443_common_setup_clocks(pll_fn get_mpll)
 	}
 
 	printk("CPU: EPLL %s %ld.%03ld MHz, usb-bus %ld.%03ld MHz\n",
-	       (epllcon & S3C2443_PLLCON_OFF) ? "off":"on",
+	       (epllcon & S3C2443_PLLCON_OFF) ? "off" : "on",
 	       print_mhz(clk_get_rate(&clk_epll)),
 	       print_mhz(clk_get_rate(&clk_usb_bus)));
 }
arch/arm/plat-s3c24xx/Kconfig +0 -6
index 0c183fd..74f76e0 100644
@@ -44,12 +44,6 @@ config S3C2410_CLOCK
 	  Clock code for the S3C2410, and similar processors which
 	  is currently includes the S3C2410, S3C2440, S3C2442.
 
-config S3C2443_CLOCK
-	bool
-	help
-	  Clock code for the S3C2443 and similar processors, which includes
-	  the S3C2416 and S3C2450.
-
 config S3C24XX_DCLK
 	bool
 	help
arch/arm/plat-s3c24xx/Makefile +0 -1
index bce27ca..a7e8843 100644
@@ -28,7 +28,6 @@ obj-$(CONFIG_PM)		+= pm.o
 obj-$(CONFIG_PM)		+= irq-pm.o
 obj-$(CONFIG_PM)		+= sleep.o
 obj-$(CONFIG_S3C2410_CLOCK)	+= s3c2410-clock.o
-obj-$(CONFIG_S3C2443_CLOCK)	+= s3c2443-clock.o
 obj-$(CONFIG_S3C24XX_DMA)	+= dma.o
 obj-$(CONFIG_S3C2410_IOTIMING)	+= s3c2410-iotiming.o
 obj-$(CONFIG_S3C2412_IOTIMING)	+= s3c2412-iotiming.o
Signature · 1 line
1.7.5.4
#7 lore raw

PATCH v2 1/1 ARM: S3C24XX: Move s3c2443-clock.c to mach-s3c24xx

Quoted 5 lines · Heiko St?bner

S3C-SoCs starting with the S3C2443 can share a lot of functionality. The file can collect more common code of these SocS later on and therefore gets a new name to reflect this future purpose.

Quoted 7 lines

---
for completenes sake, the patch with -M format

 arch/arm/mach-s3c24xx/Kconfig                      |   14 ++++++++++++--
 arch/arm/mach-s3c24xx/Makefile                     |    4 ++++
 .../common-s3c2443.c}                              |   17

+++++++++++++----

Quoted 143 lines
 arch/arm/plat-s3c24xx/Kconfig                      |    6 ------
 arch/arm/plat-s3c24xx/Makefile                     |    1 -
 5 files changed, 29 insertions(+), 13 deletions(-)
 rename arch/arm/{plat-s3c24xx/s3c2443-clock.c => mach-s3c24xx/common-

s3c2443.c} (95%)

arch/arm/mach-s3c24xx/Kconfig +8 -2
index e537577..506d55b 100644
@@ -41,7 +41,7 @@ config CPU_S3C2416
 	select CPU_ARM926T
 	select CPU_LLSERIAL_S3C2440
 	select SAMSUNG_CLKSRC
-	select S3C2443_CLOCK
+	select S3C2443_COMMON
 	select S3C2416_DMA if S3C24XX_DMA
 	select S3C2416_PM if PM
 	help
@@ -76,7 +76,7 @@ config CPU_S3C2443
 	select CPU_ARM920T
 	select CPU_LLSERIAL_S3C2440
 	select SAMSUNG_CLKSRC
-	select S3C2443_CLOCK
+	select S3C2443_COMMON
 	select S3C2443_DMA if S3C24XX_DMA
 	help
 	  Support for the S3C2443 SoC from the S3C24XX line
@@ -470,6 +470,16 @@ config SMDK2440_CPU2442
 
 endif	# CPU_S3C2440
 
+if CPU_S3C2443 || CPU_S3C2416
+
+config S3C2443_COMMON
+	bool
+	help
+	  Common code for the S3C2443 and similar processors, which

includes

arch/arm/mach-s3c24xx/Kconfig +4 -0
+	  the S3C2416 and S3C2450.
+
+endif	# CPU_S3C2443 || CPU_S3C2416
+
 if CPU_S3C2443
 
 config S3C2443_DMA
arch/arm/mach- renamed from arch/arm/mach-s3c24xx/Makefile +0 -0

s3c24xx/Makefile
index 08b44a3..876e5e5 100644

arch/arm/mach-s3c24xx/Makefile +4 -0
@@ -34,6 +34,10 @@ obj-$(CONFIG_S3C2440_DMA)	+= dma-s3c2440.o
 obj-$(CONFIG_CPU_S3C2443)	+= s3c2443.o irq-s3c2443.o clock-s3c2443.o
 obj-$(CONFIG_S3C2443_DMA)	+= dma-s3c2443.o
 
+# common code
+
+obj-$(CONFIG_S3C2443_COMMON)	+= common-s3c2443.o
+
 #
 # machine support
 # following is ordered alphabetically by option text.
arch/arm/mach- renamed from arch/arm/plat-s3c24xx/s3c2443-clock.c +0 -0

s3c24xx/common-s3c2443.c
similarity index 95%
rename from arch/arm/plat-s3c24xx/s3c2443-clock.c
rename to arch/arm/mach-s3c24xx/common-s3c2443.c
index 3633060..2745616 100644

arch/arm/mach-s3c24xx/common-s3c2443.c renamed from arch/arm/plat-s3c24xx/s3c2443-clock.c +12 -3
@@ -1,9 +1,18 @@
-/* linux/arch/arm/plat-s3c24xx/s3c2443-clock.c
+/*
+ * Common code for SoCs starting with the S3C2443
  *
  * Copyright (c) 2007, 2010 Simtec Electronics
  *	Ben Dooks <[email protected]>
  *
- * S3C2443 Clock control suport - common code
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  */
 
 #include <linux/init.h>
@@ -552,7 +561,7 @@ void __init_or_cpufreq
 s3c2443_common_setup_clocks(pll_fn get_mpll)
 	s3c24xx_setup_clocks(fclk, hclk, pclk);
 
 	printk("CPU: MPLL %s %ld.%03ld MHz, cpu %ld.%03ld MHz,
 mem %ld.%03ld MHz, pclk %ld.%03ld MHz\n",
-	       (mpllcon & S3C2443_PLLCON_OFF) ? "off":"on",
+	       (mpllcon & S3C2443_PLLCON_OFF) ? "off" : "on",
 	       print_mhz(pll), print_mhz(fclk),
arch/arm/mach-s3c24xx/common-s3c2443.c renamed from arch/arm/plat-s3c24xx/s3c2443-clock.c +1 -1
 	       print_mhz(hclk), print_mhz(pclk));
@@ -567,7 +576,7 @@ void __init_or_cpufreq
 s3c2443_common_setup_clocks(pll_fn get_mpll)
 	}
 
 	printk("CPU: EPLL %s %ld.%03ld MHz, usb-bus %ld.%03ld MHz\n",
-	       (epllcon & S3C2443_PLLCON_OFF) ? "off":"on",
+	       (epllcon & S3C2443_PLLCON_OFF) ? "off" : "on",
 	       print_mhz(clk_get_rate(&clk_epll)),
 	       print_mhz(clk_get_rate(&clk_usb_bus)));

}

arch/arm/plat-s3c24xx/Kconfig +0 -6
index 0c183fd..74f76e0 100644
@@ -44,12 +44,6 @@ config S3C2410_CLOCK
 	  Clock code for the S3C2410, and similar processors which
 	  is currently includes the S3C2410, S3C2440, S3C2442.
 
-config S3C2443_CLOCK
-	bool
-	help
-	  Clock code for the S3C2443 and similar processors, which includes
-	  the S3C2416 and S3C2450.
-
 config S3C24XX_DCLK
 	bool
 	help
arch/arm/plat- renamed from arch/arm/plat-s3c24xx/Makefile +0 -0

s3c24xx/Makefile
index bce27ca..a7e8843 100644

arch/arm/plat-s3c24xx/Makefile +0 -2
@@ -28,7 +28,6 @@ obj-$(CONFIG_PM)		+= pm.o
 obj-$(CONFIG_PM)		+= irq-pm.o
 obj-$(CONFIG_PM)		+= sleep.o
 obj-$(CONFIG_S3C2410_CLOCK)	+= s3c2410-clock.o
-obj-$(CONFIG_S3C2443_CLOCK)	+= s3c2443-clock.o
 obj-$(CONFIG_S3C24XX_DMA)	+= dma.o
 obj-$(CONFIG_S3C2410_IOTIMING)	+= s3c2410-iotiming.o
 obj-$(CONFIG_S3C2412_IOTIMING)	+= s3c2412-iotiming.o
--
Quoted 1 line

1.7.5.4

OK, looks good to me and will apply.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#8 lore raw

PATCH 2/2 ARM: S3C24XX: Move the DMA base code to mach-s3c24xx

In reply to Heiko Stübner
---
 arch/arm/mach-s3c24xx/Kconfig  |   18 +
 arch/arm/mach-s3c24xx/Makefile |    1 +
 arch/arm/mach-s3c24xx/dma.c    | 1469 ++++++++++++++++++++++++++++++++++++++++
 arch/arm/plat-s3c24xx/Kconfig  |   16 -
 arch/arm/plat-s3c24xx/Makefile |    1 -
 arch/arm/plat-s3c24xx/dma.c    | 1469 ----------------------------------------
 6 files changed, 1488 insertions(+), 1486 deletions(-)
 create mode 100644 arch/arm/mach-s3c24xx/dma.c
 delete mode 100644 arch/arm/plat-s3c24xx/dma.c
arch/arm/mach-s3c24xx/Kconfig +18 -0
index 506d55b..599e025 100644
@@ -81,6 +81,24 @@ config CPU_S3C2443
 	help
 	  Support for the S3C2443 SoC from the S3C24XX line
 
+comment "S3C24XX base platform code"
+
+config S3C24XX_DMA
+	bool "S3C2410 DMA support"
+	depends on ARCH_S3C24XX
+	select S3C_DMA
+	help
+	  S3C2410 DMA support. This is needed for drivers like sound which
+	  use the S3C2410's DMA system to move data to and from the
+	  peripheral blocks.
+
+config S3C2410_DMA_DEBUG
+	bool "S3C2410 DMA support debug"
+	depends on ARCH_S3C24XX && S3C24XX_DMA
+	help
+	  Enable debugging output for the DMA code. This option sends info
+	  to the kernel log, at priority KERN_DEBUG.
+
 if CPU_S3C2410
 
 config S3C2410_DMA
arch/arm/mach-s3c24xx/Makefile +1 -0
index 876e5e5..e8b5b58 100644
@@ -36,6 +36,7 @@ obj-$(CONFIG_S3C2443_DMA)	+= dma-s3c2443.o
 
 # common code
 
+obj-$(CONFIG_S3C24XX_DMA)	+= dma.o
 obj-$(CONFIG_S3C2443_COMMON)	+= common-s3c2443.o
 
 #
arch/arm/mach-s3c24xx/dma.c new file +1469 -0

1,469 lines not on this page · raw message

arch/arm/plat-s3c24xx/Kconfig +0 -16
index 74f76e0..a2c6134 100644
@@ -76,22 +76,6 @@ config PM_SIMTEC
 	  Common power management code for systems that are
 	  compatible with the Simtec style of power management
 
-config S3C24XX_DMA
-	bool "S3C2410 DMA support"
-	depends on ARCH_S3C24XX
-	select S3C_DMA
-	help
-	  S3C2410 DMA support. This is needed for drivers like sound which
-	  use the S3C2410's DMA system to move data to and from the
-	  peripheral blocks.
-
-config S3C2410_DMA_DEBUG
-	bool "S3C2410 DMA support debug"
-	depends on ARCH_S3C24XX && S3C2410_DMA
-	help
-	  Enable debugging output for the DMA code. This option sends info
-	  to the kernel log, at priority KERN_DEBUG.
-
 # common code for s3c24xx based machines, such as the SMDKs.
 
 # cpu frequency items common between s3c2410 and s3c2440/s3c2442
arch/arm/plat-s3c24xx/Makefile +0 -1
index a7e8843..9591e11 100644
@@ -28,7 +28,6 @@ obj-$(CONFIG_PM)		+= pm.o
 obj-$(CONFIG_PM)		+= irq-pm.o
 obj-$(CONFIG_PM)		+= sleep.o
 obj-$(CONFIG_S3C2410_CLOCK)	+= s3c2410-clock.o
-obj-$(CONFIG_S3C24XX_DMA)	+= dma.o
 obj-$(CONFIG_S3C2410_IOTIMING)	+= s3c2410-iotiming.o
 obj-$(CONFIG_S3C2412_IOTIMING)	+= s3c2412-iotiming.o
 obj-$(CONFIG_S3C2410_CPUFREQ_UTILS) += s3c2410-cpufreq-utils.o
arch/arm/plat-s3c24xx/dma.c deleted +0 -1469

1,469 lines not on this page · raw message

Signature · 1 line
1.7.2.3
#9 lore raw

PATCH 2/2 ARM: S3C24XX: Move the DMA base code to mach-s3c24xx

Quoted 12 lines · Heiko St?bner
---
 arch/arm/mach-s3c24xx/Kconfig  |   18 +
 arch/arm/mach-s3c24xx/Makefile |    1 +
 arch/arm/mach-s3c24xx/dma.c    | 1469 ++++++++++++++++++++++++++++++++++++++++
 arch/arm/plat-s3c24xx/Kconfig  |   16 -
 arch/arm/plat-s3c24xx/Makefile |    1 -
 arch/arm/plat-s3c24xx/dma.c    | 1469 ----------------------------------------
 6 files changed, 1488 insertions(+), 1486 deletions(-)
 create mode 100644 arch/arm/mach-s3c24xx/dma.c
 delete mode 100644 arch/arm/plat-s3c24xx/dma.c

Wouldn't it be more appropriate to move this driver to drivers/dma/s3c24xx-dma.c instead?

Even if it doesn't (yet) use the dmaengine API, I think it's valuable to keep drivers with the same purpose together. We have had similar discussions in other subsystems and ended up moving the drivers into one directory first, followed by a conversion to a common API (if someone could be motivated to do that work).

Arnd

#10 lore raw

PATCH 2/2 ARM: S3C24XX: Move the DMA base code to mach-s3c24xx

Quoted 14 lines · Arnd Bergmann
Quoted 9 lines · Heiko St?bner
---
  arch/arm/mach-s3c24xx/Kconfig  |   18 +
  arch/arm/mach-s3c24xx/Makefile |    1 +
  arch/arm/mach-s3c24xx/dma.c    | 1469 ++++++++++++++++++++++++++++++++++++++++
  arch/arm/plat-s3c24xx/Kconfig  |   16 -
  arch/arm/plat-s3c24xx/Makefile |    1 -
  arch/arm/plat-s3c24xx/dma.c    | 1469 ----------------------------------------
  6 files changed, 1488 insertions(+), 1486 deletions(-)
Quoted 3 lines

create mode 100644 arch/arm/mach-s3c24xx/dma.c
delete mode 100644 arch/arm/plat-s3c24xx/dma.c

Quoted 3 lines

Wouldn't it be more appropriate to move this driver to drivers/dma/s3c24xx-dma.c instead?

Basically I agree, it is just specific dma only for s3c24xx though.

I think, for that, we need to update its driver when moving.

Quoted 6 lines

Even if it doesn't (yet) use the dmaengine API, I think it's valuable to keep drivers with the same purpose together. We have had similar discussions in other subsystems and ended up moving the drivers into one directory first, followed by a conversion to a common API (if someone could be motivated to do that work).

Yes, and we need to move s3c24xx cpufreq to drivers/cpufreq and it will be done soon.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.