linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/36] ARM: samsung platform cleanup
@ 2019-10-10 20:28 Arnd Bergmann
  2019-10-10 20:28 ` Arnd Bergmann
                   ` (4 more replies)
  0 siblings, 5 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:28 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-hwmon, linux-pwm, linux-fbdev, linux-samsung-soc,
	Arnd Bergmann, linux-pm, patches, linux-usb, linux-mmc,
	linux-kernel, dri-devel, linux-clk, alsa-devel, linux-leds,
	linux-serial, linux-input, linux-spi, linux-stm32,
	linux-arm-kernel

I've spent some time looking at the remaining ARMv4/ARMv5 platforms
that are not part of ARCH_MULTIPLATFORM, and tried to get them closer
to that. Here is what came out of that for the samsung platforms:

* Exynos and s5pv210 are made independent of plat-samsung
* device drivers stop using mach/*.h headers for s3c24xx
  (and other platforms not in this series)
* s3c24xx and s3c64xx get merged into mach-s3c, removing
  the need for plat-samsung (I have other patches for the
  remaining plat-* directories)
* mach/io.h gets cleaned up to only be needed for BAST
  PC104 mode (looking for ideas to proceed)
* mach/irqs.h remains for now, this still needs to be converted
  to sparse IRQs.

Some bits are a little ugly, but overall I think this a big
improvement.

The contents are available for testing in

git://kernel.org:/pub/scm/linux/kernel/git/arnd/playground.git s3c-multiplatform

Given the overall size of the series I expect that there will
be bugs, so at this points I'm looking for reviews, acks and
testing from anyone who still has the hardware, in particular
s3c24xx, but also the other samsung platforms I'm touching.

      Arnd

Arnd Bergmann (36):
  ARM: samsung: make S3C24XX_MISCCR access indirect
  ARM: s3c: simplify mach/io.h
  usb: gadget: s3c: use platform resources
  usb: gadget: s3c-hsudc: remove platform header dependency
  ARM: samsung: make pm-debug platform independent
  ARM: samsung: move CONFIG_DEBUG_S3C_UART to Kconfig.debug
  ARM: exynos: use private samsung_cpu_id copy
  ARM: exynos: stop selecting PLAT_SAMSUNG
  ARM: samsung: move pm check code to drivers/soc
  ARM: s5pv210: use private pm save/restore
  ARM: s5pv210: split from plat-samsung
  ARM: s3c64xx: remove mach/hardware.h
  ARM: s3c: move regs-spi.h into spi driver
  ARM: s3c: move irqchip driver back into platform
  ARM: s3c: adc: move header to linux/soc/samsung
  ARM: s3c: move spi fiq handler into platform
  ARM: s3c: h1940-audio: turn into platform driver
  ARM: s3c: gta02-audio: turn into platform driver
  ARM: s3c: rx1950: turn into platform driver
  ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS
  ARM: s3c: move iis pinctrl config into boards
  ARM: s3c: leds: move setpull() calls into board files
  ARM: s3c: move s3cmci pinctrl handling into board files
  ARM: s3c: include mach/irqs.h where needed
  ARM: s3c: spi: avoid hardcoding fiq number in driver
  ARM: s3c: bast: avoid irq_desc array usage
  ARM: s3c: fix mmc gpio lookup tables
  fbdev: s3c2410fb: remove mach header dependency
  ARM: s3c: cpufreq: split out registers
  ARM: s3c: remove cpufreq header dependencies
  ARM: s3c: cpufreq: use global s3c2412_cpufreq_setrefresh
  ARM: s3c: iotiming: make functions static
  ARM: s3c: move low-level clk reg access into platform code
  ARM: s3c: stop including mach/hardware.h from mach/io.h
  ARM: s3c: move into a common directory
  ARM: s3c: make headers local if possible

 MAINTAINERS                                   |  16 +-
 arch/arm/Kconfig                              |   5 +-
 arch/arm/Kconfig.debug                        |  18 +-
 arch/arm/Makefile                             |   7 +-
 arch/arm/mach-exynos/Makefile                 |   4 -
 arch/arm/mach-exynos/common.h                 |   6 +-
 arch/arm/mach-exynos/exynos.c                 |  19 +-
 arch/arm/mach-exynos/include/mach/map.h       |  18 --
 arch/arm/mach-exynos/platsmp.c                |   4 +-
 arch/arm/mach-exynos/pm.c                     |   8 +-
 arch/arm/{plat-samsung => mach-s3c}/Kconfig   |  62 +----
 .../Kconfig => mach-s3c/Kconfig.s3c24xx}      |   0
 .../Kconfig => mach-s3c/Kconfig.s3c64xx}      |   0
 arch/arm/{plat-samsung => mach-s3c}/Makefile  |  15 +-
 .../{mach-s3c24xx => mach-s3c}/Makefile.boot  |   0
 .../Makefile => mach-s3c/Makefile.s3c24xx}    |  15 +-
 .../Makefile => mach-s3c/Makefile.s3c64xx}    |  14 +-
 .../include/plat => mach-s3c}/adc-core.h      |   0
 arch/arm/{plat-samsung => mach-s3c}/adc.c     |   4 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/anubis.h  |   0
 .../arm/{mach-s3c64xx => mach-s3c}/ata-core.h |   0
 .../{mach-s3c64xx => mach-s3c}/backlight.h    |   0
 .../arm/{mach-s3c24xx => mach-s3c}/bast-ide.c |   3 +-
 .../arm/{mach-s3c24xx => mach-s3c}/bast-irq.c |   8 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/bast.h    |   0
 .../{mach-s3c24xx => mach-s3c}/common-smdk.c  |  17 +-
 .../{mach-s3c24xx => mach-s3c}/common-smdk.h  |   0
 arch/arm/{plat-samsung => mach-s3c}/cpu.c     |  21 +-
 .../include/plat => mach-s3c}/cpu.h           |  11 -
 .../cpufreq-utils.c                           |  38 +++-
 arch/arm/{mach-s3c64xx => mach-s3c}/cpuidle.c |   4 +-
 .../arm/{mach-s3c64xx => mach-s3c}/crag6410.h |   2 +-
 .../{mach-s3c64xx => mach-s3c}/dev-audio.c    |   9 +-
 .../dev-backlight.c                           |   4 +-
 .../dev-uart-s3c64xx.c}                       |   5 +-
 .../arm/{plat-samsung => mach-s3c}/dev-uart.c |   2 +-
 arch/arm/{plat-samsung => mach-s3c}/devs.c    |  56 +++--
 .../include/plat => mach-s3c}/devs.h          |   0
 .../mach/dma.h => mach-s3c/dma-s3c24xx.h}     |   0
 .../mach/dma.h => mach-s3c/dma-s3c64xx.h}     |   0
 arch/arm/mach-s3c/dma.h                       |   7 +
 arch/arm/{mach-s3c24xx => mach-s3c}/fb-core.h |   0
 .../include/plat => mach-s3c}/fb.h            |   0
 .../plat => mach-s3c}/gpio-cfg-helpers.h      |   0
 .../include/plat => mach-s3c}/gpio-cfg.h      |   0
 .../include/plat => mach-s3c}/gpio-core.h     |   2 +-
 .../gpio-samsung-s3c24xx.h}                   |   2 +
 .../gpio-samsung-s3c64xx.h}                   |   0
 .../{plat-samsung => mach-s3c}/gpio-samsung.c |  18 +-
 arch/arm/mach-s3c/gpio-samsung.h              |   7 +
 arch/arm/{mach-s3c24xx => mach-s3c}/gta02.h   |   2 +-
 .../h1940-bluetooth.c                         |   7 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/h1940.h   |   0
 .../include/mach => mach-s3c}/hardware.h      |   7 -
 .../include/plat => mach-s3c}/iic-core.h      |   0
 arch/arm/mach-s3c/include/mach/io.h           |  50 +++++
 .../include/mach/irqs-s3c24xx.h}              |   0
 .../include/mach/irqs-s3c64xx.h}              |   0
 arch/arm/mach-s3c/include/mach/irqs.h         |   7 +
 .../plat => mach-s3c/include/mach}/map-base.h |   0
 arch/arm/{plat-samsung => mach-s3c}/init.c    |   4 +-
 .../iotiming-s3c2410.c                        |  12 +-
 .../iotiming-s3c2412.c                        |   6 +-
 .../irq-pm.c => mach-s3c/irq-pm-s3c24xx.c}    |  16 +-
 .../irq-pm.c => mach-s3c/irq-pm-s3c64xx.c}    |   8 +-
 arch/arm/mach-s3c/irq-s3c24xx-fiq-exports.c   |   9 +
 .../arm/mach-s3c/irq-s3c24xx-fiq.S            |  10 +-
 .../arm/mach-s3c}/irq-s3c24xx.c               |  23 +-
 .../arm/{mach-s3c64xx => mach-s3c}/irq-uart.h |   0
 .../include/plat => mach-s3c}/keypad.h        |   0
 .../mach-amlm5900.c                           |  37 ++-
 .../{mach-s3c24xx => mach-s3c}/mach-anubis.c  |  14 +-
 .../{mach-s3c64xx => mach-s3c}/mach-anw6410.c |  17 +-
 .../mach-at2440evb.c                          |  28 ++-
 .../{mach-s3c24xx => mach-s3c}/mach-bast.c    |  22 +-
 .../mach-crag6410-module.c                    |   2 +-
 .../mach-crag6410.c                           |  27 ++-
 .../{mach-s3c24xx => mach-s3c}/mach-gta02.c   |  57 ++++-
 .../{mach-s3c24xx => mach-s3c}/mach-h1940.c   |  65 ++++--
 .../arm/{mach-s3c64xx => mach-s3c}/mach-hmt.c |  15 +-
 .../{mach-s3c24xx => mach-s3c}/mach-jive.c    |  27 ++-
 .../mach-mini2440.c                           |  48 ++--
 .../mach-mini6410.c                           |  22 +-
 .../arm/{mach-s3c24xx => mach-s3c}/mach-n30.c |  40 +++-
 .../arm/{mach-s3c64xx => mach-s3c}/mach-ncp.c |  13 +-
 .../mach-nexcoder.c                           |  20 +-
 .../mach-osiris-dvs.c                         |   4 +-
 .../{mach-s3c24xx => mach-s3c}/mach-osiris.c  |  22 +-
 .../{mach-s3c24xx => mach-s3c}/mach-otom.c    |  17 +-
 .../{mach-s3c24xx => mach-s3c}/mach-qt2410.c  |  37 ++-
 .../mach-real6410.c                           |  18 +-
 .../{mach-s3c24xx => mach-s3c}/mach-rx1950.c  |  57 +++--
 .../{mach-s3c24xx => mach-s3c}/mach-rx3715.c  |  26 ++-
 .../mach-s3c2416-dt.c                         |   8 +-
 .../mach-s3c64xx-dt.c                         |   6 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smartq.c  |  18 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smartq.h  |   0
 .../{mach-s3c64xx => mach-s3c}/mach-smartq5.c |  18 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smartq7.c |  18 +-
 .../mach-smdk2410.c                           |  14 +-
 .../mach-smdk2413.c                           |  21 +-
 .../mach-smdk2416.c                           |  23 +-
 .../mach-smdk2440.c                           |  25 ++-
 .../mach-smdk2443.c                           |  14 +-
 .../mach-smdk6400.c                           |  13 +-
 .../mach-smdk6410.c                           |  23 +-
 .../mach-tct_hammer.c                         |  24 +-
 .../{mach-s3c24xx => mach-s3c}/mach-vr1000.c  |  20 +-
 .../{mach-s3c24xx => mach-s3c}/mach-vstms.c   |  20 +-
 .../include/plat => mach-s3c}/map-s3c.h       |  12 +-
 .../mach/map.h => mach-s3c/map-s3c24xx.h}     |   6 +-
 .../mach/map.h => mach-s3c/map-s3c64xx.h}     |   4 +-
 .../include/plat => mach-s3c}/map-s5p.h       |   4 +-
 arch/arm/mach-s3c/map.h                       |   7 +
 .../{mach-s3c24xx => mach-s3c}/nand-core.h    |   0
 .../{mach-s3c64xx => mach-s3c}/onenand-core.h |   0
 arch/arm/{mach-s3c24xx => mach-s3c}/osiris.h  |   0
 arch/arm/{mach-s3c24xx => mach-s3c}/otom.h    |   0
 arch/arm/{mach-s3c64xx => mach-s3c}/pl080.c   |   4 +-
 .../{plat-samsung => mach-s3c}/platformdata.c |   4 +-
 .../{mach-s3c24xx => mach-s3c}/pll-s3c2410.c  |   4 +-
 .../pll-s3c2440-12000000.c                    |   4 +-
 .../pll-s3c2440-16934400.c                    |   4 +-
 .../{plat-samsung => mach-s3c}/pm-common.c    |   2 +-
 arch/arm/mach-s3c/pm-common.h                 |  40 ++++
 .../pm-core.h => mach-s3c/pm-core-s3c24xx.h}  |   8 +-
 .../pm-core.h => mach-s3c/pm-core-s3c64xx.h}  |  50 +----
 arch/arm/mach-s3c/pm-core.h                   |   7 +
 arch/arm/{plat-samsung => mach-s3c}/pm-gpio.c |   6 +-
 .../arm/{mach-s3c24xx => mach-s3c}/pm-h1940.S |   5 +-
 .../{mach-s3c24xx => mach-s3c}/pm-s3c2410.c   |  11 +-
 .../{mach-s3c24xx => mach-s3c}/pm-s3c2412.c   |  11 +-
 .../{mach-s3c24xx => mach-s3c}/pm-s3c2416.c   |   6 +-
 .../pm.c => mach-s3c/pm-s3c24xx.c}            |  12 +-
 .../pm.c => mach-s3c/pm-s3c64xx.c}            |  66 +++++-
 arch/arm/{plat-samsung => mach-s3c}/pm.c      |  20 +-
 .../include/plat => mach-s3c}/pm.h            |   2 +-
 .../include/plat => mach-s3c}/pwm-core.h      |   0
 .../include/plat => mach-s3c}/regs-adc.h      |   0
 .../regs-clock-s3c24xx.h}                     |   2 +
 .../regs-clock-s3c64xx.h}                     |   0
 arch/arm/mach-s3c/regs-clock.h                |   7 +
 .../arm/{mach-s3c24xx => mach-s3c}/regs-dsc.h |   0
 .../regs-gpio-memport.h                       |   0
 .../regs-gpio-s3c24xx.h}                      |   2 +
 .../regs-gpio-s3c64xx.h}                      |   0
 arch/arm/mach-s3c/regs-gpio.h                 |   7 +
 .../regs-irq-s3c24xx.h}                       |   2 +
 .../regs-irq-s3c64xx.h}                       |   0
 arch/arm/mach-s3c/regs-irq.h                  |   7 +
 .../include/plat => mach-s3c}/regs-irqtype.h  |   0
 .../arm/{mach-s3c24xx => mach-s3c}/regs-mem.h |   2 +
 .../{mach-s3c64xx => mach-s3c}/regs-modem.h   |   0
 .../mach => mach-s3c}/regs-s3c2443-clock.h    |  50 +++++
 .../{mach-s3c64xx => mach-s3c}/regs-srom.h    |   0
 .../arm/{mach-s3c64xx => mach-s3c}/regs-sys.h |   0
 .../regs-syscon-power.h                       |   0
 .../regs-usb-hsotg-phy.h                      |   0
 .../include/mach => mach-s3c}/rtc-core.h      |   0
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2410.c |  21 +-
 .../s3c2412-power.h                           |   0
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412.c |  16 +-
 .../include/mach => mach-s3c}/s3c2412.h       |   2 +
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2416.c |  28 +--
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2440.c |  17 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2442.c |  17 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2443.c |  21 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c244x.c |  16 +-
 .../common.c => mach-s3c/s3c24xx.c}           |  21 +-
 .../common.h => mach-s3c/s3c24xx.h}           |   1 +
 arch/arm/{mach-s3c64xx => mach-s3c}/s3c6400.c |  14 +-
 arch/arm/{mach-s3c64xx => mach-s3c}/s3c6410.c |  17 +-
 .../common.c => mach-s3c/s3c64xx.c}           |  24 +-
 .../common.h => mach-s3c/s3c64xx.h}           |   0
 .../include/plat => mach-s3c}/samsung-time.h  |   0
 .../include/plat => mach-s3c}/sdhci.h         |   2 +-
 .../{mach-s3c24xx => mach-s3c}/setup-camif.c  |   4 +-
 .../setup-fb-24bpp.c                          |   6 +-
 .../{mach-s3c24xx => mach-s3c}/setup-i2c.c    |   7 +-
 .../{mach-s3c64xx => mach-s3c}/setup-i2c0.c   |   4 +-
 .../{mach-s3c64xx => mach-s3c}/setup-i2c1.c   |   4 +-
 .../{mach-s3c64xx => mach-s3c}/setup-ide.c    |   8 +-
 .../{mach-s3c64xx => mach-s3c}/setup-keypad.c |   6 +-
 .../setup-sdhci-gpio-s3c24xx.c}               |   6 +-
 .../setup-sdhci-gpio-s3c64xx.c}               |   6 +-
 .../setup-spi-s3c24xx.c}                      |   6 +-
 .../setup-spi-s3c64xx.c}                      |   4 +-
 .../arm/{mach-s3c24xx => mach-s3c}/setup-ts.c |   5 +-
 .../setup-usb-phy.c                           |   6 +-
 .../{mach-s3c24xx => mach-s3c}/simtec-audio.c |  11 +-
 .../{mach-s3c24xx => mach-s3c}/simtec-nor.c   |   2 +-
 .../{mach-s3c24xx => mach-s3c}/simtec-pm.c    |   8 +-
 .../{mach-s3c24xx => mach-s3c}/simtec-usb.c   |   6 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/simtec.h  |   0
 .../sleep-s3c2410.S                           |   7 +-
 .../sleep-s3c2412.S                           |   5 +-
 .../sleep.S => mach-s3c/sleep-s3c24xx.S}      |   7 +-
 .../sleep.S => mach-s3c/sleep-s3c64xx.S}      |   4 +-
 .../arm/{mach-s3c24xx => mach-s3c}/spi-core.h |   0
 .../include/plat => mach-s3c}/usb-phy.h       |   0
 arch/arm/{mach-s3c24xx => mach-s3c}/vr1000.h  |   0
 .../{plat-samsung => mach-s3c}/wakeup-mask.c  |   4 +-
 .../include/plat => mach-s3c}/wakeup-mask.h   |   0
 .../watchdog-reset.c                          |   0
 .../watchdog-reset.h                          |   0
 arch/arm/mach-s3c24xx/include/mach/fb.h       |   2 -
 arch/arm/mach-s3c24xx/include/mach/io.h       | 212 ------------------
 arch/arm/mach-s3c64xx/include/mach/hardware.h |  17 --
 arch/arm/mach-s5pv210/Kconfig                 |   1 +
 arch/arm/mach-s5pv210/Makefile                |   7 -
 arch/arm/mach-s5pv210/pm.c                    |  51 ++++-
 arch/arm/mach-s5pv210/regs-clock.h            |   2 +-
 arch/arm/mach-s5pv210/s5pv210.c               |   2 -
 drivers/clk/samsung/clk-s3c2410-dclk.c        |  10 +-
 drivers/cpufreq/s3c2410-cpufreq.c             |  10 +-
 drivers/cpufreq/s3c2412-cpufreq.c             |  44 ++--
 drivers/cpufreq/s3c2440-cpufreq.c             |  29 ++-
 drivers/cpufreq/s3c24xx-cpufreq-debugfs.c     |   2 +-
 drivers/cpufreq/s3c24xx-cpufreq.c             |  14 +-
 drivers/hwmon/s3c-hwmon.c                     |   2 +-
 drivers/input/touchscreen/s3c2410_ts.c        |  37 ++-
 drivers/irqchip/Makefile                      |   1 -
 drivers/leds/leds-s3c24xx.c                   |   7 -
 drivers/mmc/host/Kconfig                      |   2 +-
 drivers/mmc/host/s3cmci.c                     |  72 ++----
 drivers/power/supply/s3c_adc_battery.c        |   2 +-
 drivers/pwm/Kconfig                           |   2 +-
 drivers/soc/samsung/Kconfig                   |  48 +++-
 drivers/soc/samsung/Makefile                  |   3 +
 .../soc/samsung/s3c-pm-check.c                |   2 +-
 .../soc/samsung/s3c-pm-debug.c                |  26 +--
 drivers/spi/Kconfig                           |   2 +-
 drivers/spi/Makefile                          |   1 -
 .../spi/spi-s3c24xx-regs.h                    |   3 +-
 drivers/spi/spi-s3c24xx.c                     |  28 +--
 drivers/tty/serial/Kconfig                    |   2 +-
 drivers/usb/gadget/udc/s3c-hsudc.c            |  55 +----
 drivers/usb/gadget/udc/s3c2410_udc.c          |  31 +--
 drivers/usb/gadget/udc/s3c2410_udc.h          |   1 +
 .../usb/gadget/udc/s3c2410_udc_regs.h         |   2 +
 .../video/fbdev/s3c2410fb-regs-lcd.h          |  28 +--
 drivers/video/fbdev/s3c2410fb.c               |  16 +-
 .../linux/platform_data}/fb-s3c2410.h         |  33 ++-
 include/linux/platform_data/mmc-s3cmci.h      |   2 +
 include/linux/platform_data/s3c-hsudc.h       |   2 +
 .../linux/soc/samsung/s3c-adc.h               |   0
 .../linux/soc/samsung/s3c-cpu-freq.h          |   0
 .../linux/soc/samsung/s3c-cpufreq-core.h      |  10 +-
 .../linux/soc/samsung/s3c-pm.h                |  69 +++---
 .../linux/spi/s3c24xx-fiq.h                   |   5 +
 include/linux/spi/s3c24xx.h                   |   2 +-
 sound/soc/samsung/Kconfig                     |   2 +-
 sound/soc/samsung/h1940_uda1380.c             |  71 ++----
 sound/soc/samsung/neo1973_wm8753.c            |  85 +++----
 sound/soc/samsung/rx1950_uda1380.c            |  72 ++----
 sound/soc/samsung/s3c-i2s-v2.c                |   3 +-
 sound/soc/samsung/s3c-i2s-v2.h                |   3 +-
 sound/soc/samsung/s3c2412-i2s.c               |   9 +-
 sound/soc/samsung/s3c24xx-i2s.c               |   7 -
 259 files changed, 1716 insertions(+), 1648 deletions(-)
 delete mode 100644 arch/arm/mach-exynos/include/mach/map.h
 rename arch/arm/{plat-samsung => mach-s3c}/Kconfig (73%)
 rename arch/arm/{mach-s3c24xx/Kconfig => mach-s3c/Kconfig.s3c24xx} (100%)
 rename arch/arm/{mach-s3c64xx/Kconfig => mach-s3c/Kconfig.s3c64xx} (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/Makefile (67%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/Makefile.boot (100%)
 rename arch/arm/{mach-s3c24xx/Makefile => mach-s3c/Makefile.s3c24xx} (86%)
 rename arch/arm/{mach-s3c64xx/Makefile => mach-s3c/Makefile.s3c64xx} (83%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/adc-core.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/adc.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/anubis.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/ata-core.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/backlight.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/bast-ide.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/bast-irq.c (95%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/bast.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/common-smdk.c (93%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/common-smdk.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/cpu.c (62%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/cpu.h (91%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/cpufreq-utils.c (70%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/cpuidle.c (96%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/crag6410.h (95%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/dev-audio.c (97%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/dev-backlight.c (98%)
 rename arch/arm/{mach-s3c64xx/dev-uart.c => mach-s3c/dev-uart-s3c64xx.c} (95%)
 rename arch/arm/{plat-samsung => mach-s3c}/dev-uart.c (97%)
 rename arch/arm/{plat-samsung => mach-s3c}/devs.c (96%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/devs.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach/dma.h => mach-s3c/dma-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/dma.h => mach-s3c/dma-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/dma.h
 rename arch/arm/{mach-s3c24xx => mach-s3c}/fb-core.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/fb.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/gpio-cfg-helpers.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/gpio-cfg.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/gpio-core.h (99%)
 rename arch/arm/{mach-s3c24xx/include/mach/gpio-samsung.h => mach-s3c/gpio-samsung-s3c24xx.h} (99%)
 rename arch/arm/{mach-s3c64xx/include/mach/gpio-samsung.h => mach-s3c/gpio-samsung-s3c64xx.h} (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/gpio-samsung.c (99%)
 create mode 100644 arch/arm/mach-s3c/gpio-samsung.h
 rename arch/arm/{mach-s3c24xx => mach-s3c}/gta02.h (94%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/h1940-bluetooth.c (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/h1940.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach => mach-s3c}/hardware.h (76%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/iic-core.h (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/io.h
 rename arch/arm/{mach-s3c24xx/include/mach/irqs.h => mach-s3c/include/mach/irqs-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/irqs.h => mach-s3c/include/mach/irqs-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/irqs.h
 rename arch/arm/{plat-samsung/include/plat => mach-s3c/include/mach}/map-base.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/init.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/iotiming-s3c2410.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/iotiming-s3c2412.c (98%)
 rename arch/arm/{mach-s3c24xx/irq-pm.c => mach-s3c/irq-pm-s3c24xx.c} (93%)
 rename arch/arm/{mach-s3c64xx/irq-pm.c => mach-s3c/irq-pm-s3c64xx.c} (97%)
 create mode 100644 arch/arm/mach-s3c/irq-s3c24xx-fiq-exports.c
 rename drivers/spi/spi-s3c24xx-fiq.S => arch/arm/mach-s3c/irq-s3c24xx-fiq.S (94%)
 rename {drivers/irqchip => arch/arm/mach-s3c}/irq-s3c24xx.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/irq-uart.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/keypad.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-amlm5900.c (84%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-anubis.c (97%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-anw6410.c (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-at2440evb.c (88%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-bast.c (98%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-crag6410-module.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-crag6410.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-gta02.c (90%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-h1940.c (92%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-hmt.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-jive.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-mini2440.c (93%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-mini6410.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-n30.c (93%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-ncp.c (92%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-nexcoder.c (92%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-osiris-dvs.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-osiris.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-otom.c (89%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-qt2410.c (88%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-real6410.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-rx1950.c (93%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-rx3715.c (90%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-s3c2416-dt.c (92%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-s3c64xx-dt.c (95%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq.c (97%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq5.c (93%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq7.c (94%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2410.c (89%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2413.c (90%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2416.c (95%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2440.c (89%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2443.c (93%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smdk6400.c (92%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smdk6410.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-tct_hammer.c (82%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-vr1000.c (95%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-vstms.c (90%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/map-s3c.h (87%)
 rename arch/arm/{mach-s3c24xx/include/mach/map.h => mach-s3c/map-s3c24xx.h} (97%)
 rename arch/arm/{mach-s3c64xx/include/mach/map.h => mach-s3c/map-s3c64xx.h} (98%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/map-s5p.h (85%)
 create mode 100644 arch/arm/mach-s3c/map.h
 rename arch/arm/{mach-s3c24xx => mach-s3c}/nand-core.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/onenand-core.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/osiris.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/otom.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/pl080.c (99%)
 rename arch/arm/{plat-samsung => mach-s3c}/platformdata.c (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2410.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2440-12000000.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2440-16934400.c (98%)
 rename arch/arm/{plat-samsung => mach-s3c}/pm-common.c (98%)
 create mode 100644 arch/arm/mach-s3c/pm-common.h
 rename arch/arm/{mach-s3c24xx/include/mach/pm-core.h => mach-s3c/pm-core-s3c24xx.h} (95%)
 rename arch/arm/{mach-s3c64xx/include/mach/pm-core.h => mach-s3c/pm-core-s3c64xx.h} (58%)
 create mode 100644 arch/arm/mach-s3c/pm-core.h
 rename arch/arm/{plat-samsung => mach-s3c}/pm-gpio.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-h1940.S (80%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2410.c (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2412.c (95%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2416.c (95%)
 rename arch/arm/{mach-s3c24xx/pm.c => mach-s3c/pm-s3c24xx.c} (94%)
 rename arch/arm/{mach-s3c64xx/pm.c => mach-s3c/pm-s3c64xx.c} (83%)
 rename arch/arm/{plat-samsung => mach-s3c}/pm.c (94%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/pm.h (98%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/pwm-core.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/regs-adc.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach/regs-clock.h => mach-s3c/regs-clock-s3c24xx.h} (99%)
 rename arch/arm/{mach-s3c64xx/include/mach/regs-clock.h => mach-s3c/regs-clock-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/regs-clock.h
 rename arch/arm/{mach-s3c24xx => mach-s3c}/regs-dsc.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-gpio-memport.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach/regs-gpio.h => mach-s3c/regs-gpio-s3c24xx.h} (99%)
 rename arch/arm/{mach-s3c64xx/include/mach/regs-gpio.h => mach-s3c/regs-gpio-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/regs-gpio.h
 rename arch/arm/{mach-s3c24xx/include/mach/regs-irq.h => mach-s3c/regs-irq-s3c24xx.h} (98%)
 rename arch/arm/{mach-s3c64xx/include/mach/regs-irq.h => mach-s3c/regs-irq-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/regs-irq.h
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/regs-irqtype.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/regs-mem.h (98%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-modem.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach => mach-s3c}/regs-s3c2443-clock.h (81%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-srom.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-sys.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-syscon-power.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-usb-hsotg-phy.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach => mach-s3c}/rtc-core.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2410.c (90%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412-power.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412.c (94%)
 rename arch/arm/{mach-s3c24xx/include/mach => mach-s3c}/s3c2412.h (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2416.c (88%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2440.c (85%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2442.c (82%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2443.c (89%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c244x.c (93%)
 rename arch/arm/{mach-s3c24xx/common.c => mach-s3c/s3c24xx.c} (98%)
 rename arch/arm/{mach-s3c24xx/common.h => mach-s3c/s3c24xx.h} (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/s3c6400.c (89%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/s3c6410.c (89%)
 rename arch/arm/{mach-s3c64xx/common.c => mach-s3c/s3c64xx.c} (97%)
 rename arch/arm/{mach-s3c64xx/common.h => mach-s3c/s3c64xx.h} (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/samsung-time.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/sdhci.h (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-camif.c (95%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-fb-24bpp.c (86%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-i2c.c (79%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c0.c (90%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c1.c (90%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-ide.c (89%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-keypad.c (86%)
 rename arch/arm/{mach-s3c24xx/setup-sdhci-gpio.c => mach-s3c/setup-sdhci-gpio-s3c24xx.c} (90%)
 rename arch/arm/{mach-s3c64xx/setup-sdhci-gpio.c => mach-s3c/setup-sdhci-gpio-s3c64xx.c} (95%)
 rename arch/arm/{mach-s3c24xx/setup-spi.c => mach-s3c/setup-spi-s3c24xx.c} (85%)
 rename arch/arm/{mach-s3c64xx/setup-spi.c => mach-s3c/setup-spi-s3c64xx.c} (89%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-ts.c (88%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-usb-phy.c (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-audio.c (86%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-nor.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-pm.c (92%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-usb.c (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/sleep-s3c2410.S (92%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/sleep-s3c2412.S (93%)
 rename arch/arm/{mach-s3c24xx/sleep.S => mach-s3c/sleep-s3c24xx.S} (92%)
 rename arch/arm/{mach-s3c64xx/sleep.S => mach-s3c/sleep-s3c64xx.S} (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/spi-core.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/usb-phy.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/vr1000.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/wakeup-mask.c (94%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/wakeup-mask.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/watchdog-reset.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/watchdog-reset.h (100%)
 delete mode 100644 arch/arm/mach-s3c24xx/include/mach/fb.h
 delete mode 100644 arch/arm/mach-s3c24xx/include/mach/io.h
 delete mode 100644 arch/arm/mach-s3c64xx/include/mach/hardware.h
 rename arch/arm/plat-samsung/pm-check.c => drivers/soc/samsung/s3c-pm-check.c (99%)
 rename arch/arm/plat-samsung/pm-debug.c => drivers/soc/samsung/s3c-pm-debug.c (78%)
 rename arch/arm/plat-samsung/include/plat/regs-spi.h => drivers/spi/spi-s3c24xx-regs.h (95%)
 rename arch/arm/plat-samsung/include/plat/regs-udc.h => drivers/usb/gadget/udc/s3c2410_udc_regs.h (99%)
 rename arch/arm/mach-s3c24xx/include/mach/regs-lcd.h => drivers/video/fbdev/s3c2410fb-regs-lcd.h (84%)
 rename {arch/arm/plat-samsung/include/plat => include/linux/platform_data}/fb-s3c2410.h (57%)
 rename arch/arm/plat-samsung/include/plat/adc.h => include/linux/soc/samsung/s3c-adc.h (100%)
 rename arch/arm/plat-samsung/include/plat/cpu-freq.h => include/linux/soc/samsung/s3c-cpu-freq.h (100%)
 rename arch/arm/plat-samsung/include/plat/cpu-freq-core.h => include/linux/soc/samsung/s3c-cpufreq-core.h (96%)
 rename arch/arm/plat-samsung/include/plat/pm-common.h => include/linux/soc/samsung/s3c-pm.h (55%)
 rename drivers/spi/spi-s3c24xx-fiq.h => include/linux/spi/s3c24xx-fiq.h (78%)

Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: patches@opensource.cirrus.com
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-clk@vger.kernel.org
Cc: linux-hwmon@vger.kernel.org
Cc: linux-input@vger.kernel.org
Cc: linux-leds@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-pwm@vger.kernel.org
Cc: linux-spi@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Cc: alsa-devel@alsa-project.org
-- 
2.20.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 135+ messages in thread

* [PATCH 00/36] ARM: samsung platform cleanup
  2019-10-10 20:28 [PATCH 00/36] ARM: samsung platform cleanup Arnd Bergmann
@ 2019-10-10 20:28 ` Arnd Bergmann
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:28 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, Arnd Bergmann, linux-kernel,
	linux-pm, patches, linux-stm32, linux-clk, linux-hwmon,
	linux-input, linux-leds, linux-mmc, linux-pwm, linux-spi,
	linux-serial, linux-usb, dri-devel, linux-fbdev, alsa-devel

I've spent some time looking at the remaining ARMv4/ARMv5 platforms
that are not part of ARCH_MULTIPLATFORM, and tried to get them closer
to that. Here is what came out of that for the samsung platforms:

* Exynos and s5pv210 are made independent of plat-samsung
* device drivers stop using mach/*.h headers for s3c24xx
  (and other platforms not in this series)
* s3c24xx and s3c64xx get merged into mach-s3c, removing
  the need for plat-samsung (I have other patches for the
  remaining plat-* directories)
* mach/io.h gets cleaned up to only be needed for BAST
  PC104 mode (looking for ideas to proceed)
* mach/irqs.h remains for now, this still needs to be converted
  to sparse IRQs.

Some bits are a little ugly, but overall I think this a big
improvement.

The contents are available for testing in

git://kernel.org:/pub/scm/linux/kernel/git/arnd/playground.git s3c-multiplatform

Given the overall size of the series I expect that there will
be bugs, so at this points I'm looking for reviews, acks and
testing from anyone who still has the hardware, in particular
s3c24xx, but also the other samsung platforms I'm touching.

      Arnd

Arnd Bergmann (36):
  ARM: samsung: make S3C24XX_MISCCR access indirect
  ARM: s3c: simplify mach/io.h
  usb: gadget: s3c: use platform resources
  usb: gadget: s3c-hsudc: remove platform header dependency
  ARM: samsung: make pm-debug platform independent
  ARM: samsung: move CONFIG_DEBUG_S3C_UART to Kconfig.debug
  ARM: exynos: use private samsung_cpu_id copy
  ARM: exynos: stop selecting PLAT_SAMSUNG
  ARM: samsung: move pm check code to drivers/soc
  ARM: s5pv210: use private pm save/restore
  ARM: s5pv210: split from plat-samsung
  ARM: s3c64xx: remove mach/hardware.h
  ARM: s3c: move regs-spi.h into spi driver
  ARM: s3c: move irqchip driver back into platform
  ARM: s3c: adc: move header to linux/soc/samsung
  ARM: s3c: move spi fiq handler into platform
  ARM: s3c: h1940-audio: turn into platform driver
  ARM: s3c: gta02-audio: turn into platform driver
  ARM: s3c: rx1950: turn into platform driver
  ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS
  ARM: s3c: move iis pinctrl config into boards
  ARM: s3c: leds: move setpull() calls into board files
  ARM: s3c: move s3cmci pinctrl handling into board files
  ARM: s3c: include mach/irqs.h where needed
  ARM: s3c: spi: avoid hardcoding fiq number in driver
  ARM: s3c: bast: avoid irq_desc array usage
  ARM: s3c: fix mmc gpio lookup tables
  fbdev: s3c2410fb: remove mach header dependency
  ARM: s3c: cpufreq: split out registers
  ARM: s3c: remove cpufreq header dependencies
  ARM: s3c: cpufreq: use global s3c2412_cpufreq_setrefresh
  ARM: s3c: iotiming: make functions static
  ARM: s3c: move low-level clk reg access into platform code
  ARM: s3c: stop including mach/hardware.h from mach/io.h
  ARM: s3c: move into a common directory
  ARM: s3c: make headers local if possible

 MAINTAINERS                                   |  16 +-
 arch/arm/Kconfig                              |   5 +-
 arch/arm/Kconfig.debug                        |  18 +-
 arch/arm/Makefile                             |   7 +-
 arch/arm/mach-exynos/Makefile                 |   4 -
 arch/arm/mach-exynos/common.h                 |   6 +-
 arch/arm/mach-exynos/exynos.c                 |  19 +-
 arch/arm/mach-exynos/include/mach/map.h       |  18 --
 arch/arm/mach-exynos/platsmp.c                |   4 +-
 arch/arm/mach-exynos/pm.c                     |   8 +-
 arch/arm/{plat-samsung => mach-s3c}/Kconfig   |  62 +----
 .../Kconfig => mach-s3c/Kconfig.s3c24xx}      |   0
 .../Kconfig => mach-s3c/Kconfig.s3c64xx}      |   0
 arch/arm/{plat-samsung => mach-s3c}/Makefile  |  15 +-
 .../{mach-s3c24xx => mach-s3c}/Makefile.boot  |   0
 .../Makefile => mach-s3c/Makefile.s3c24xx}    |  15 +-
 .../Makefile => mach-s3c/Makefile.s3c64xx}    |  14 +-
 .../include/plat => mach-s3c}/adc-core.h      |   0
 arch/arm/{plat-samsung => mach-s3c}/adc.c     |   4 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/anubis.h  |   0
 .../arm/{mach-s3c64xx => mach-s3c}/ata-core.h |   0
 .../{mach-s3c64xx => mach-s3c}/backlight.h    |   0
 .../arm/{mach-s3c24xx => mach-s3c}/bast-ide.c |   3 +-
 .../arm/{mach-s3c24xx => mach-s3c}/bast-irq.c |   8 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/bast.h    |   0
 .../{mach-s3c24xx => mach-s3c}/common-smdk.c  |  17 +-
 .../{mach-s3c24xx => mach-s3c}/common-smdk.h  |   0
 arch/arm/{plat-samsung => mach-s3c}/cpu.c     |  21 +-
 .../include/plat => mach-s3c}/cpu.h           |  11 -
 .../cpufreq-utils.c                           |  38 +++-
 arch/arm/{mach-s3c64xx => mach-s3c}/cpuidle.c |   4 +-
 .../arm/{mach-s3c64xx => mach-s3c}/crag6410.h |   2 +-
 .../{mach-s3c64xx => mach-s3c}/dev-audio.c    |   9 +-
 .../dev-backlight.c                           |   4 +-
 .../dev-uart-s3c64xx.c}                       |   5 +-
 .../arm/{plat-samsung => mach-s3c}/dev-uart.c |   2 +-
 arch/arm/{plat-samsung => mach-s3c}/devs.c    |  56 +++--
 .../include/plat => mach-s3c}/devs.h          |   0
 .../mach/dma.h => mach-s3c/dma-s3c24xx.h}     |   0
 .../mach/dma.h => mach-s3c/dma-s3c64xx.h}     |   0
 arch/arm/mach-s3c/dma.h                       |   7 +
 arch/arm/{mach-s3c24xx => mach-s3c}/fb-core.h |   0
 .../include/plat => mach-s3c}/fb.h            |   0
 .../plat => mach-s3c}/gpio-cfg-helpers.h      |   0
 .../include/plat => mach-s3c}/gpio-cfg.h      |   0
 .../include/plat => mach-s3c}/gpio-core.h     |   2 +-
 .../gpio-samsung-s3c24xx.h}                   |   2 +
 .../gpio-samsung-s3c64xx.h}                   |   0
 .../{plat-samsung => mach-s3c}/gpio-samsung.c |  18 +-
 arch/arm/mach-s3c/gpio-samsung.h              |   7 +
 arch/arm/{mach-s3c24xx => mach-s3c}/gta02.h   |   2 +-
 .../h1940-bluetooth.c                         |   7 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/h1940.h   |   0
 .../include/mach => mach-s3c}/hardware.h      |   7 -
 .../include/plat => mach-s3c}/iic-core.h      |   0
 arch/arm/mach-s3c/include/mach/io.h           |  50 +++++
 .../include/mach/irqs-s3c24xx.h}              |   0
 .../include/mach/irqs-s3c64xx.h}              |   0
 arch/arm/mach-s3c/include/mach/irqs.h         |   7 +
 .../plat => mach-s3c/include/mach}/map-base.h |   0
 arch/arm/{plat-samsung => mach-s3c}/init.c    |   4 +-
 .../iotiming-s3c2410.c                        |  12 +-
 .../iotiming-s3c2412.c                        |   6 +-
 .../irq-pm.c => mach-s3c/irq-pm-s3c24xx.c}    |  16 +-
 .../irq-pm.c => mach-s3c/irq-pm-s3c64xx.c}    |   8 +-
 arch/arm/mach-s3c/irq-s3c24xx-fiq-exports.c   |   9 +
 .../arm/mach-s3c/irq-s3c24xx-fiq.S            |  10 +-
 .../arm/mach-s3c}/irq-s3c24xx.c               |  23 +-
 .../arm/{mach-s3c64xx => mach-s3c}/irq-uart.h |   0
 .../include/plat => mach-s3c}/keypad.h        |   0
 .../mach-amlm5900.c                           |  37 ++-
 .../{mach-s3c24xx => mach-s3c}/mach-anubis.c  |  14 +-
 .../{mach-s3c64xx => mach-s3c}/mach-anw6410.c |  17 +-
 .../mach-at2440evb.c                          |  28 ++-
 .../{mach-s3c24xx => mach-s3c}/mach-bast.c    |  22 +-
 .../mach-crag6410-module.c                    |   2 +-
 .../mach-crag6410.c                           |  27 ++-
 .../{mach-s3c24xx => mach-s3c}/mach-gta02.c   |  57 ++++-
 .../{mach-s3c24xx => mach-s3c}/mach-h1940.c   |  65 ++++--
 .../arm/{mach-s3c64xx => mach-s3c}/mach-hmt.c |  15 +-
 .../{mach-s3c24xx => mach-s3c}/mach-jive.c    |  27 ++-
 .../mach-mini2440.c                           |  48 ++--
 .../mach-mini6410.c                           |  22 +-
 .../arm/{mach-s3c24xx => mach-s3c}/mach-n30.c |  40 +++-
 .../arm/{mach-s3c64xx => mach-s3c}/mach-ncp.c |  13 +-
 .../mach-nexcoder.c                           |  20 +-
 .../mach-osiris-dvs.c                         |   4 +-
 .../{mach-s3c24xx => mach-s3c}/mach-osiris.c  |  22 +-
 .../{mach-s3c24xx => mach-s3c}/mach-otom.c    |  17 +-
 .../{mach-s3c24xx => mach-s3c}/mach-qt2410.c  |  37 ++-
 .../mach-real6410.c                           |  18 +-
 .../{mach-s3c24xx => mach-s3c}/mach-rx1950.c  |  57 +++--
 .../{mach-s3c24xx => mach-s3c}/mach-rx3715.c  |  26 ++-
 .../mach-s3c2416-dt.c                         |   8 +-
 .../mach-s3c64xx-dt.c                         |   6 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smartq.c  |  18 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smartq.h  |   0
 .../{mach-s3c64xx => mach-s3c}/mach-smartq5.c |  18 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smartq7.c |  18 +-
 .../mach-smdk2410.c                           |  14 +-
 .../mach-smdk2413.c                           |  21 +-
 .../mach-smdk2416.c                           |  23 +-
 .../mach-smdk2440.c                           |  25 ++-
 .../mach-smdk2443.c                           |  14 +-
 .../mach-smdk6400.c                           |  13 +-
 .../mach-smdk6410.c                           |  23 +-
 .../mach-tct_hammer.c                         |  24 +-
 .../{mach-s3c24xx => mach-s3c}/mach-vr1000.c  |  20 +-
 .../{mach-s3c24xx => mach-s3c}/mach-vstms.c   |  20 +-
 .../include/plat => mach-s3c}/map-s3c.h       |  12 +-
 .../mach/map.h => mach-s3c/map-s3c24xx.h}     |   6 +-
 .../mach/map.h => mach-s3c/map-s3c64xx.h}     |   4 +-
 .../include/plat => mach-s3c}/map-s5p.h       |   4 +-
 arch/arm/mach-s3c/map.h                       |   7 +
 .../{mach-s3c24xx => mach-s3c}/nand-core.h    |   0
 .../{mach-s3c64xx => mach-s3c}/onenand-core.h |   0
 arch/arm/{mach-s3c24xx => mach-s3c}/osiris.h  |   0
 arch/arm/{mach-s3c24xx => mach-s3c}/otom.h    |   0
 arch/arm/{mach-s3c64xx => mach-s3c}/pl080.c   |   4 +-
 .../{plat-samsung => mach-s3c}/platformdata.c |   4 +-
 .../{mach-s3c24xx => mach-s3c}/pll-s3c2410.c  |   4 +-
 .../pll-s3c2440-12000000.c                    |   4 +-
 .../pll-s3c2440-16934400.c                    |   4 +-
 .../{plat-samsung => mach-s3c}/pm-common.c    |   2 +-
 arch/arm/mach-s3c/pm-common.h                 |  40 ++++
 .../pm-core.h => mach-s3c/pm-core-s3c24xx.h}  |   8 +-
 .../pm-core.h => mach-s3c/pm-core-s3c64xx.h}  |  50 +----
 arch/arm/mach-s3c/pm-core.h                   |   7 +
 arch/arm/{plat-samsung => mach-s3c}/pm-gpio.c |   6 +-
 .../arm/{mach-s3c24xx => mach-s3c}/pm-h1940.S |   5 +-
 .../{mach-s3c24xx => mach-s3c}/pm-s3c2410.c   |  11 +-
 .../{mach-s3c24xx => mach-s3c}/pm-s3c2412.c   |  11 +-
 .../{mach-s3c24xx => mach-s3c}/pm-s3c2416.c   |   6 +-
 .../pm.c => mach-s3c/pm-s3c24xx.c}            |  12 +-
 .../pm.c => mach-s3c/pm-s3c64xx.c}            |  66 +++++-
 arch/arm/{plat-samsung => mach-s3c}/pm.c      |  20 +-
 .../include/plat => mach-s3c}/pm.h            |   2 +-
 .../include/plat => mach-s3c}/pwm-core.h      |   0
 .../include/plat => mach-s3c}/regs-adc.h      |   0
 .../regs-clock-s3c24xx.h}                     |   2 +
 .../regs-clock-s3c64xx.h}                     |   0
 arch/arm/mach-s3c/regs-clock.h                |   7 +
 .../arm/{mach-s3c24xx => mach-s3c}/regs-dsc.h |   0
 .../regs-gpio-memport.h                       |   0
 .../regs-gpio-s3c24xx.h}                      |   2 +
 .../regs-gpio-s3c64xx.h}                      |   0
 arch/arm/mach-s3c/regs-gpio.h                 |   7 +
 .../regs-irq-s3c24xx.h}                       |   2 +
 .../regs-irq-s3c64xx.h}                       |   0
 arch/arm/mach-s3c/regs-irq.h                  |   7 +
 .../include/plat => mach-s3c}/regs-irqtype.h  |   0
 .../arm/{mach-s3c24xx => mach-s3c}/regs-mem.h |   2 +
 .../{mach-s3c64xx => mach-s3c}/regs-modem.h   |   0
 .../mach => mach-s3c}/regs-s3c2443-clock.h    |  50 +++++
 .../{mach-s3c64xx => mach-s3c}/regs-srom.h    |   0
 .../arm/{mach-s3c64xx => mach-s3c}/regs-sys.h |   0
 .../regs-syscon-power.h                       |   0
 .../regs-usb-hsotg-phy.h                      |   0
 .../include/mach => mach-s3c}/rtc-core.h      |   0
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2410.c |  21 +-
 .../s3c2412-power.h                           |   0
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412.c |  16 +-
 .../include/mach => mach-s3c}/s3c2412.h       |   2 +
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2416.c |  28 +--
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2440.c |  17 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2442.c |  17 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2443.c |  21 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c244x.c |  16 +-
 .../common.c => mach-s3c/s3c24xx.c}           |  21 +-
 .../common.h => mach-s3c/s3c24xx.h}           |   1 +
 arch/arm/{mach-s3c64xx => mach-s3c}/s3c6400.c |  14 +-
 arch/arm/{mach-s3c64xx => mach-s3c}/s3c6410.c |  17 +-
 .../common.c => mach-s3c/s3c64xx.c}           |  24 +-
 .../common.h => mach-s3c/s3c64xx.h}           |   0
 .../include/plat => mach-s3c}/samsung-time.h  |   0
 .../include/plat => mach-s3c}/sdhci.h         |   2 +-
 .../{mach-s3c24xx => mach-s3c}/setup-camif.c  |   4 +-
 .../setup-fb-24bpp.c                          |   6 +-
 .../{mach-s3c24xx => mach-s3c}/setup-i2c.c    |   7 +-
 .../{mach-s3c64xx => mach-s3c}/setup-i2c0.c   |   4 +-
 .../{mach-s3c64xx => mach-s3c}/setup-i2c1.c   |   4 +-
 .../{mach-s3c64xx => mach-s3c}/setup-ide.c    |   8 +-
 .../{mach-s3c64xx => mach-s3c}/setup-keypad.c |   6 +-
 .../setup-sdhci-gpio-s3c24xx.c}               |   6 +-
 .../setup-sdhci-gpio-s3c64xx.c}               |   6 +-
 .../setup-spi-s3c24xx.c}                      |   6 +-
 .../setup-spi-s3c64xx.c}                      |   4 +-
 .../arm/{mach-s3c24xx => mach-s3c}/setup-ts.c |   5 +-
 .../setup-usb-phy.c                           |   6 +-
 .../{mach-s3c24xx => mach-s3c}/simtec-audio.c |  11 +-
 .../{mach-s3c24xx => mach-s3c}/simtec-nor.c   |   2 +-
 .../{mach-s3c24xx => mach-s3c}/simtec-pm.c    |   8 +-
 .../{mach-s3c24xx => mach-s3c}/simtec-usb.c   |   6 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/simtec.h  |   0
 .../sleep-s3c2410.S                           |   7 +-
 .../sleep-s3c2412.S                           |   5 +-
 .../sleep.S => mach-s3c/sleep-s3c24xx.S}      |   7 +-
 .../sleep.S => mach-s3c/sleep-s3c64xx.S}      |   4 +-
 .../arm/{mach-s3c24xx => mach-s3c}/spi-core.h |   0
 .../include/plat => mach-s3c}/usb-phy.h       |   0
 arch/arm/{mach-s3c24xx => mach-s3c}/vr1000.h  |   0
 .../{plat-samsung => mach-s3c}/wakeup-mask.c  |   4 +-
 .../include/plat => mach-s3c}/wakeup-mask.h   |   0
 .../watchdog-reset.c                          |   0
 .../watchdog-reset.h                          |   0
 arch/arm/mach-s3c24xx/include/mach/fb.h       |   2 -
 arch/arm/mach-s3c24xx/include/mach/io.h       | 212 ------------------
 arch/arm/mach-s3c64xx/include/mach/hardware.h |  17 --
 arch/arm/mach-s5pv210/Kconfig                 |   1 +
 arch/arm/mach-s5pv210/Makefile                |   7 -
 arch/arm/mach-s5pv210/pm.c                    |  51 ++++-
 arch/arm/mach-s5pv210/regs-clock.h            |   2 +-
 arch/arm/mach-s5pv210/s5pv210.c               |   2 -
 drivers/clk/samsung/clk-s3c2410-dclk.c        |  10 +-
 drivers/cpufreq/s3c2410-cpufreq.c             |  10 +-
 drivers/cpufreq/s3c2412-cpufreq.c             |  44 ++--
 drivers/cpufreq/s3c2440-cpufreq.c             |  29 ++-
 drivers/cpufreq/s3c24xx-cpufreq-debugfs.c     |   2 +-
 drivers/cpufreq/s3c24xx-cpufreq.c             |  14 +-
 drivers/hwmon/s3c-hwmon.c                     |   2 +-
 drivers/input/touchscreen/s3c2410_ts.c        |  37 ++-
 drivers/irqchip/Makefile                      |   1 -
 drivers/leds/leds-s3c24xx.c                   |   7 -
 drivers/mmc/host/Kconfig                      |   2 +-
 drivers/mmc/host/s3cmci.c                     |  72 ++----
 drivers/power/supply/s3c_adc_battery.c        |   2 +-
 drivers/pwm/Kconfig                           |   2 +-
 drivers/soc/samsung/Kconfig                   |  48 +++-
 drivers/soc/samsung/Makefile                  |   3 +
 .../soc/samsung/s3c-pm-check.c                |   2 +-
 .../soc/samsung/s3c-pm-debug.c                |  26 +--
 drivers/spi/Kconfig                           |   2 +-
 drivers/spi/Makefile                          |   1 -
 .../spi/spi-s3c24xx-regs.h                    |   3 +-
 drivers/spi/spi-s3c24xx.c                     |  28 +--
 drivers/tty/serial/Kconfig                    |   2 +-
 drivers/usb/gadget/udc/s3c-hsudc.c            |  55 +----
 drivers/usb/gadget/udc/s3c2410_udc.c          |  31 +--
 drivers/usb/gadget/udc/s3c2410_udc.h          |   1 +
 .../usb/gadget/udc/s3c2410_udc_regs.h         |   2 +
 .../video/fbdev/s3c2410fb-regs-lcd.h          |  28 +--
 drivers/video/fbdev/s3c2410fb.c               |  16 +-
 .../linux/platform_data}/fb-s3c2410.h         |  33 ++-
 include/linux/platform_data/mmc-s3cmci.h      |   2 +
 include/linux/platform_data/s3c-hsudc.h       |   2 +
 .../linux/soc/samsung/s3c-adc.h               |   0
 .../linux/soc/samsung/s3c-cpu-freq.h          |   0
 .../linux/soc/samsung/s3c-cpufreq-core.h      |  10 +-
 .../linux/soc/samsung/s3c-pm.h                |  69 +++---
 .../linux/spi/s3c24xx-fiq.h                   |   5 +
 include/linux/spi/s3c24xx.h                   |   2 +-
 sound/soc/samsung/Kconfig                     |   2 +-
 sound/soc/samsung/h1940_uda1380.c             |  71 ++----
 sound/soc/samsung/neo1973_wm8753.c            |  85 +++----
 sound/soc/samsung/rx1950_uda1380.c            |  72 ++----
 sound/soc/samsung/s3c-i2s-v2.c                |   3 +-
 sound/soc/samsung/s3c-i2s-v2.h                |   3 +-
 sound/soc/samsung/s3c2412-i2s.c               |   9 +-
 sound/soc/samsung/s3c24xx-i2s.c               |   7 -
 259 files changed, 1716 insertions(+), 1648 deletions(-)
 delete mode 100644 arch/arm/mach-exynos/include/mach/map.h
 rename arch/arm/{plat-samsung => mach-s3c}/Kconfig (73%)
 rename arch/arm/{mach-s3c24xx/Kconfig => mach-s3c/Kconfig.s3c24xx} (100%)
 rename arch/arm/{mach-s3c64xx/Kconfig => mach-s3c/Kconfig.s3c64xx} (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/Makefile (67%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/Makefile.boot (100%)
 rename arch/arm/{mach-s3c24xx/Makefile => mach-s3c/Makefile.s3c24xx} (86%)
 rename arch/arm/{mach-s3c64xx/Makefile => mach-s3c/Makefile.s3c64xx} (83%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/adc-core.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/adc.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/anubis.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/ata-core.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/backlight.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/bast-ide.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/bast-irq.c (95%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/bast.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/common-smdk.c (93%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/common-smdk.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/cpu.c (62%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/cpu.h (91%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/cpufreq-utils.c (70%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/cpuidle.c (96%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/crag6410.h (95%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/dev-audio.c (97%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/dev-backlight.c (98%)
 rename arch/arm/{mach-s3c64xx/dev-uart.c => mach-s3c/dev-uart-s3c64xx.c} (95%)
 rename arch/arm/{plat-samsung => mach-s3c}/dev-uart.c (97%)
 rename arch/arm/{plat-samsung => mach-s3c}/devs.c (96%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/devs.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach/dma.h => mach-s3c/dma-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/dma.h => mach-s3c/dma-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/dma.h
 rename arch/arm/{mach-s3c24xx => mach-s3c}/fb-core.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/fb.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/gpio-cfg-helpers.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/gpio-cfg.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/gpio-core.h (99%)
 rename arch/arm/{mach-s3c24xx/include/mach/gpio-samsung.h => mach-s3c/gpio-samsung-s3c24xx.h} (99%)
 rename arch/arm/{mach-s3c64xx/include/mach/gpio-samsung.h => mach-s3c/gpio-samsung-s3c64xx.h} (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/gpio-samsung.c (99%)
 create mode 100644 arch/arm/mach-s3c/gpio-samsung.h
 rename arch/arm/{mach-s3c24xx => mach-s3c}/gta02.h (94%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/h1940-bluetooth.c (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/h1940.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach => mach-s3c}/hardware.h (76%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/iic-core.h (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/io.h
 rename arch/arm/{mach-s3c24xx/include/mach/irqs.h => mach-s3c/include/mach/irqs-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/irqs.h => mach-s3c/include/mach/irqs-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/irqs.h
 rename arch/arm/{plat-samsung/include/plat => mach-s3c/include/mach}/map-base.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/init.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/iotiming-s3c2410.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/iotiming-s3c2412.c (98%)
 rename arch/arm/{mach-s3c24xx/irq-pm.c => mach-s3c/irq-pm-s3c24xx.c} (93%)
 rename arch/arm/{mach-s3c64xx/irq-pm.c => mach-s3c/irq-pm-s3c64xx.c} (97%)
 create mode 100644 arch/arm/mach-s3c/irq-s3c24xx-fiq-exports.c
 rename drivers/spi/spi-s3c24xx-fiq.S => arch/arm/mach-s3c/irq-s3c24xx-fiq.S (94%)
 rename {drivers/irqchip => arch/arm/mach-s3c}/irq-s3c24xx.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/irq-uart.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/keypad.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-amlm5900.c (84%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-anubis.c (97%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-anw6410.c (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-at2440evb.c (88%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-bast.c (98%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-crag6410-module.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-crag6410.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-gta02.c (90%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-h1940.c (92%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-hmt.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-jive.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-mini2440.c (93%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-mini6410.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-n30.c (93%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-ncp.c (92%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-nexcoder.c (92%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-osiris-dvs.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-osiris.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-otom.c (89%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-qt2410.c (88%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-real6410.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-rx1950.c (93%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-rx3715.c (90%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-s3c2416-dt.c (92%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-s3c64xx-dt.c (95%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq.c (97%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq5.c (93%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq7.c (94%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2410.c (89%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2413.c (90%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2416.c (95%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2440.c (89%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2443.c (93%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smdk6400.c (92%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smdk6410.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-tct_hammer.c (82%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-vr1000.c (95%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-vstms.c (90%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/map-s3c.h (87%)
 rename arch/arm/{mach-s3c24xx/include/mach/map.h => mach-s3c/map-s3c24xx.h} (97%)
 rename arch/arm/{mach-s3c64xx/include/mach/map.h => mach-s3c/map-s3c64xx.h} (98%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/map-s5p.h (85%)
 create mode 100644 arch/arm/mach-s3c/map.h
 rename arch/arm/{mach-s3c24xx => mach-s3c}/nand-core.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/onenand-core.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/osiris.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/otom.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/pl080.c (99%)
 rename arch/arm/{plat-samsung => mach-s3c}/platformdata.c (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2410.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2440-12000000.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2440-16934400.c (98%)
 rename arch/arm/{plat-samsung => mach-s3c}/pm-common.c (98%)
 create mode 100644 arch/arm/mach-s3c/pm-common.h
 rename arch/arm/{mach-s3c24xx/include/mach/pm-core.h => mach-s3c/pm-core-s3c24xx.h} (95%)
 rename arch/arm/{mach-s3c64xx/include/mach/pm-core.h => mach-s3c/pm-core-s3c64xx.h} (58%)
 create mode 100644 arch/arm/mach-s3c/pm-core.h
 rename arch/arm/{plat-samsung => mach-s3c}/pm-gpio.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-h1940.S (80%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2410.c (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2412.c (95%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2416.c (95%)
 rename arch/arm/{mach-s3c24xx/pm.c => mach-s3c/pm-s3c24xx.c} (94%)
 rename arch/arm/{mach-s3c64xx/pm.c => mach-s3c/pm-s3c64xx.c} (83%)
 rename arch/arm/{plat-samsung => mach-s3c}/pm.c (94%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/pm.h (98%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/pwm-core.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/regs-adc.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach/regs-clock.h => mach-s3c/regs-clock-s3c24xx.h} (99%)
 rename arch/arm/{mach-s3c64xx/include/mach/regs-clock.h => mach-s3c/regs-clock-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/regs-clock.h
 rename arch/arm/{mach-s3c24xx => mach-s3c}/regs-dsc.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-gpio-memport.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach/regs-gpio.h => mach-s3c/regs-gpio-s3c24xx.h} (99%)
 rename arch/arm/{mach-s3c64xx/include/mach/regs-gpio.h => mach-s3c/regs-gpio-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/regs-gpio.h
 rename arch/arm/{mach-s3c24xx/include/mach/regs-irq.h => mach-s3c/regs-irq-s3c24xx.h} (98%)
 rename arch/arm/{mach-s3c64xx/include/mach/regs-irq.h => mach-s3c/regs-irq-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/regs-irq.h
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/regs-irqtype.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/regs-mem.h (98%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-modem.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach => mach-s3c}/regs-s3c2443-clock.h (81%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-srom.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-sys.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-syscon-power.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-usb-hsotg-phy.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach => mach-s3c}/rtc-core.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2410.c (90%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412-power.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412.c (94%)
 rename arch/arm/{mach-s3c24xx/include/mach => mach-s3c}/s3c2412.h (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2416.c (88%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2440.c (85%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2442.c (82%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2443.c (89%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c244x.c (93%)
 rename arch/arm/{mach-s3c24xx/common.c => mach-s3c/s3c24xx.c} (98%)
 rename arch/arm/{mach-s3c24xx/common.h => mach-s3c/s3c24xx.h} (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/s3c6400.c (89%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/s3c6410.c (89%)
 rename arch/arm/{mach-s3c64xx/common.c => mach-s3c/s3c64xx.c} (97%)
 rename arch/arm/{mach-s3c64xx/common.h => mach-s3c/s3c64xx.h} (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/samsung-time.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/sdhci.h (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-camif.c (95%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-fb-24bpp.c (86%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-i2c.c (79%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c0.c (90%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c1.c (90%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-ide.c (89%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-keypad.c (86%)
 rename arch/arm/{mach-s3c24xx/setup-sdhci-gpio.c => mach-s3c/setup-sdhci-gpio-s3c24xx.c} (90%)
 rename arch/arm/{mach-s3c64xx/setup-sdhci-gpio.c => mach-s3c/setup-sdhci-gpio-s3c64xx.c} (95%)
 rename arch/arm/{mach-s3c24xx/setup-spi.c => mach-s3c/setup-spi-s3c24xx.c} (85%)
 rename arch/arm/{mach-s3c64xx/setup-spi.c => mach-s3c/setup-spi-s3c64xx.c} (89%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-ts.c (88%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-usb-phy.c (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-audio.c (86%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-nor.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-pm.c (92%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-usb.c (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/sleep-s3c2410.S (92%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/sleep-s3c2412.S (93%)
 rename arch/arm/{mach-s3c24xx/sleep.S => mach-s3c/sleep-s3c24xx.S} (92%)
 rename arch/arm/{mach-s3c64xx/sleep.S => mach-s3c/sleep-s3c64xx.S} (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/spi-core.h (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/usb-phy.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/vr1000.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/wakeup-mask.c (94%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/wakeup-mask.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/watchdog-reset.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/watchdog-reset.h (100%)
 delete mode 100644 arch/arm/mach-s3c24xx/include/mach/fb.h
 delete mode 100644 arch/arm/mach-s3c24xx/include/mach/io.h
 delete mode 100644 arch/arm/mach-s3c64xx/include/mach/hardware.h
 rename arch/arm/plat-samsung/pm-check.c => drivers/soc/samsung/s3c-pm-check.c (99%)
 rename arch/arm/plat-samsung/pm-debug.c => drivers/soc/samsung/s3c-pm-debug.c (78%)
 rename arch/arm/plat-samsung/include/plat/regs-spi.h => drivers/spi/spi-s3c24xx-regs.h (95%)
 rename arch/arm/plat-samsung/include/plat/regs-udc.h => drivers/usb/gadget/udc/s3c2410_udc_regs.h (99%)
 rename arch/arm/mach-s3c24xx/include/mach/regs-lcd.h => drivers/video/fbdev/s3c2410fb-regs-lcd.h (84%)
 rename {arch/arm/plat-samsung/include/plat => include/linux/platform_data}/fb-s3c2410.h (57%)
 rename arch/arm/plat-samsung/include/plat/adc.h => include/linux/soc/samsung/s3c-adc.h (100%)
 rename arch/arm/plat-samsung/include/plat/cpu-freq.h => include/linux/soc/samsung/s3c-cpu-freq.h (100%)
 rename arch/arm/plat-samsung/include/plat/cpu-freq-core.h => include/linux/soc/samsung/s3c-cpufreq-core.h (96%)
 rename arch/arm/plat-samsung/include/plat/pm-common.h => include/linux/soc/samsung/s3c-pm.h (55%)
 rename drivers/spi/spi-s3c24xx-fiq.h => include/linux/spi/s3c24xx-fiq.h (78%)

Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: patches@opensource.cirrus.com
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-clk@vger.kernel.org
Cc: linux-hwmon@vger.kernel.org
Cc: linux-input@vger.kernel.org
Cc: linux-leds@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-pwm@vger.kernel.org
Cc: linux-spi@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Cc: alsa-devel@alsa-project.org
-- 
2.20.0


^ permalink raw reply	[flat|nested] 135+ messages in thread

* [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect
  2019-10-10 20:28 [PATCH 00/36] ARM: samsung platform cleanup Arnd Bergmann
  2019-10-10 20:28 ` Arnd Bergmann
@ 2019-10-10 20:29 ` Arnd Bergmann
  2019-10-10 20:29   ` Arnd Bergmann
                     ` (34 more replies)
  2019-10-10 21:07 ` [PATCH 35/36] ARM: s3c: move into a common directory Arnd Bergmann
                   ` (2 subsequent siblings)
  4 siblings, 35 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Sylwester Nawrocki, Tomasz Figa,
	Chanwoo Choi
  Cc: linux-samsung-soc, Arnd Bergmann, Stephen Boyd,
	Michael Turquette, linux-kernel, linux-clk, linus.walleij,
	linux-arm-kernel

The clk driver uses both a function call into an exported
platform file and a direct register access to a hardcoded
virtual address for accessing the MISCCR register, both
become are a problem for a multiplatform kernel because
of the header file dependency.

Make this an indirect function call through platform data
instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/common.c         |  3 +++
 drivers/clk/samsung/clk-s3c2410-dclk.c | 10 ++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index 3dc029c2d2cb..ebf6bde67816 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -667,5 +667,8 @@ struct platform_device s3c2410_device_dclk = {
 	.id		= 0,
 	.num_resources	= ARRAY_SIZE(s3c2410_dclk_resource),
 	.resource	= s3c2410_dclk_resource,
+	.dev		= {
+		.platform_data = s3c2410_modify_misccr,
+	},
 };
 #endif
diff --git a/drivers/clk/samsung/clk-s3c2410-dclk.c b/drivers/clk/samsung/clk-s3c2410-dclk.c
index 1281672cb00e..fbcec0252c45 100644
--- a/drivers/clk/samsung/clk-s3c2410-dclk.c
+++ b/drivers/clk/samsung/clk-s3c2410-dclk.c
@@ -14,10 +14,6 @@
 #include <linux/module.h>
 #include "clk.h"
 
-/* legacy access to misccr, until dt conversion is finished */
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-
 #define MUX_DCLK0	0
 #define MUX_DCLK1	1
 #define DIV_DCLK0	2
@@ -52,6 +48,7 @@ struct s3c24xx_clkout {
 	struct clk_hw		hw;
 	u32			mask;
 	u8			shift;
+	unsigned int (*modify_misccr)(unsigned int clr, unsigned int chg);
 };
 
 #define to_s3c24xx_clkout(_hw) container_of(_hw, struct s3c24xx_clkout, hw)
@@ -62,7 +59,7 @@ static u8 s3c24xx_clkout_get_parent(struct clk_hw *hw)
 	int num_parents = clk_hw_get_num_parents(hw);
 	u32 val;
 
-	val = readl_relaxed(S3C24XX_MISCCR) >> clkout->shift;
+	val = clkout->modify_misccr(0, 0) >> clkout->shift;
 	val >>= clkout->shift;
 	val &= clkout->mask;
 
@@ -76,7 +73,7 @@ static int s3c24xx_clkout_set_parent(struct clk_hw *hw, u8 index)
 {
 	struct s3c24xx_clkout *clkout = to_s3c24xx_clkout(hw);
 
-	s3c2410_modify_misccr((clkout->mask << clkout->shift),
+	clkout->modify_misccr((clkout->mask << clkout->shift),
 			      (index << clkout->shift));
 
 	return 0;
@@ -110,6 +107,7 @@ static struct clk_hw *s3c24xx_register_clkout(struct device *dev,
 	clkout->shift = shift;
 	clkout->mask = mask;
 	clkout->hw.init = &init;
+	clkout->modify_misccr = dev->platform_data;
 
 	ret = clk_hw_register(dev, &clkout->hw);
 	if (ret)
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29   ` [PATCH 02/36] ARM: s3c: simplify mach/io.h Arnd Bergmann
                     ` (33 subsequent siblings)
  34 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Sylwester Nawrocki, Tomasz Figa,
	Chanwoo Choi
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Michael Turquette, Stephen Boyd, linux-kernel,
	linux-clk

The clk driver uses both a function call into an exported
platform file and a direct register access to a hardcoded
virtual address for accessing the MISCCR register, both
become are a problem for a multiplatform kernel because
of the header file dependency.

Make this an indirect function call through platform data
instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/common.c         |  3 +++
 drivers/clk/samsung/clk-s3c2410-dclk.c | 10 ++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index 3dc029c2d2cb..ebf6bde67816 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -667,5 +667,8 @@ struct platform_device s3c2410_device_dclk = {
 	.id		= 0,
 	.num_resources	= ARRAY_SIZE(s3c2410_dclk_resource),
 	.resource	= s3c2410_dclk_resource,
+	.dev		= {
+		.platform_data = s3c2410_modify_misccr,
+	},
 };
 #endif
diff --git a/drivers/clk/samsung/clk-s3c2410-dclk.c b/drivers/clk/samsung/clk-s3c2410-dclk.c
index 1281672cb00e..fbcec0252c45 100644
--- a/drivers/clk/samsung/clk-s3c2410-dclk.c
+++ b/drivers/clk/samsung/clk-s3c2410-dclk.c
@@ -14,10 +14,6 @@
 #include <linux/module.h>
 #include "clk.h"
 
-/* legacy access to misccr, until dt conversion is finished */
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-
 #define MUX_DCLK0	0
 #define MUX_DCLK1	1
 #define DIV_DCLK0	2
@@ -52,6 +48,7 @@ struct s3c24xx_clkout {
 	struct clk_hw		hw;
 	u32			mask;
 	u8			shift;
+	unsigned int (*modify_misccr)(unsigned int clr, unsigned int chg);
 };
 
 #define to_s3c24xx_clkout(_hw) container_of(_hw, struct s3c24xx_clkout, hw)
@@ -62,7 +59,7 @@ static u8 s3c24xx_clkout_get_parent(struct clk_hw *hw)
 	int num_parents = clk_hw_get_num_parents(hw);
 	u32 val;
 
-	val = readl_relaxed(S3C24XX_MISCCR) >> clkout->shift;
+	val = clkout->modify_misccr(0, 0) >> clkout->shift;
 	val >>= clkout->shift;
 	val &= clkout->mask;
 
@@ -76,7 +73,7 @@ static int s3c24xx_clkout_set_parent(struct clk_hw *hw, u8 index)
 {
 	struct s3c24xx_clkout *clkout = to_s3c24xx_clkout(hw);
 
-	s3c2410_modify_misccr((clkout->mask << clkout->shift),
+	clkout->modify_misccr((clkout->mask << clkout->shift),
 			      (index << clkout->shift));
 
 	return 0;
@@ -110,6 +107,7 @@ static struct clk_hw *s3c24xx_register_clkout(struct device *dev,
 	clkout->shift = shift;
 	clkout->mask = mask;
 	clkout->hw.init = &init;
+	clkout->modify_misccr = dev->platform_data;
 
 	ret = clk_hw_register(dev, &clkout->hw);
 	if (ret)
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 02/36] ARM: s3c: simplify mach/io.h
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
  2019-10-10 20:29   ` Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-10 20:29   ` [PATCH 03/36] usb: gadget: s3c: use platform resources Arnd Bergmann
                     ` (32 subsequent siblings)
  34 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel

s3c24xx has a custom implementation of the inb/outb family of I/O
accessors, implementing both general register access and ISA I/O port
through a multiplexer.

As far as I can tell, the first case has never been needed, and certainly
is not used now, as drivers only use inb/outb to actually driver ISA or
PCI port I/O.

Similarly, the special ISA support is limited to a single machine, the
Simtec Electronics BAST (EB2410ITX) with its PC/104 expansion connector,
all other machines could simply use the generic implementation from
asm/io.h that expects a single memory-mapped address range for byte,
word and dword access. As no other machines besides BAST actually selects
CONFIG_ISA, this is likely not even necessary.

As a cleanup, remove suport for the non-ISA access from the helpers,
and make the ISA access use the virtual address window that we use
elsewhere for PCI I/O ports. In configurations without the BAST machine,
this now falls back on the generic implementation from asm/io.h, but
the mach/io.h header is still relied on to include a number of other
header files implicitly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/include/mach/io.h      | 209 +++----------------
 arch/arm/plat-samsung/include/plat/map-s3c.h |  10 +-
 2 files changed, 26 insertions(+), 193 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/include/mach/io.h b/arch/arm/mach-s3c24xx/include/mach/io.h
index f960e6d10114..3e8bff26cdd5 100644
--- a/arch/arm/mach-s3c24xx/include/mach/io.h
+++ b/arch/arm/mach-s3c24xx/include/mach/io.h
@@ -12,201 +12,40 @@
 
 #include <mach/hardware.h>
 
-#define IO_SPACE_LIMIT 0xffffffff
 
 /*
- * We use two different types of addressing - PC style addresses, and ARM
- * addresses.  PC style accesses the PC hardware with the normal PC IO
- * addresses, eg 0x3f8 for serial#1.  ARM addresses are above A28
- * and are translated to the start of IO.  Note that all addresses are
- * not shifted left!
+ * ISA style IO, for each machine to sort out mappings for,
+ * if it implements it. We reserve two 16M regions for ISA,
+ * so the PC/104 can use separate addresses for 8-bit and
+ * 16-bit port I/O.
  */
+#define PCIO_BASE		S3C_ADDR(0x02000000)
+#define IO_SPACE_LIMIT		0x00ffffff
+#define S3C24XX_VA_ISA_WORD	(PCIO_BASE)
+#define S3C24XX_VA_ISA_BYTE	(PCIO_BASE + 0x01000000)
 
-#define __PORT_PCIO(x)	((x) < (1<<28))
+#ifdef CONFIG_ISA
 
-#define PCIO_BASE	 (S3C24XX_VA_ISA_WORD)
-#define PCIO_BASE_b	 (S3C24XX_VA_ISA_BYTE)
-#define PCIO_BASE_w	 (S3C24XX_VA_ISA_WORD)
-#define PCIO_BASE_l	 (S3C24XX_VA_ISA_WORD)
-/*
- * Dynamic IO functions - let the compiler
- * optimize the expressions
- */
-
-#define DECLARE_DYN_OUT(sz,fnsuffix,instr) \
-static inline void __out##fnsuffix (unsigned int val, unsigned int port) \
-{ \
-	unsigned long temp;				      \
-	__asm__ __volatile__(				      \
-	"cmp	%2, #(1<<28)\n\t"			      \
-	"mov	%0, %2\n\t"				      \
-	"addcc	%0, %0, %3\n\t"				      \
-	"str" instr " %1, [%0, #0 ]	@ out" #fnsuffix      \
-	: "=&r" (temp)					      \
-	: "r" (val), "r" (port), "Ir" (PCIO_BASE_##fnsuffix)  \
-	: "cc");					      \
-}
-
-
-#define DECLARE_DYN_IN(sz,fnsuffix,instr)				\
-static inline unsigned sz __in##fnsuffix (unsigned int port)		\
-{									\
-	unsigned long temp, value;					\
-	__asm__ __volatile__(						\
-	"cmp	%2, #(1<<28)\n\t"					\
-	"mov	%0, %2\n\t"						\
-	"addcc	%0, %0, %3\n\t"						\
-	"ldr" instr "	%1, [%0, #0 ]	@ in" #fnsuffix		\
-	: "=&r" (temp), "=r" (value)					\
-	: "r" (port), "Ir" (PCIO_BASE_##fnsuffix)	\
-	: "cc");							\
-	return (unsigned sz)value;					\
-}
+#define inb(p)		readb(S3C24XX_VA_ISA_BYTE + (p))
+#define inw(p)		readw(S3C24XX_VA_ISA_WORD + (p))
+#define inl(p)		readl(S3C24XX_VA_ISA_WORD + (p))
 
-static inline void __iomem *__ioaddr (unsigned long port)
-{
-	return __PORT_PCIO(port) ? (PCIO_BASE + port) : (void __iomem *)port;
-}
+#define outb(v,p)	writeb((v), S3C24XX_VA_ISA_BYTE + (p))
+#define outw(v,p)	writew((v), S3C24XX_VA_ISA_WORD + (p))
+#define outl(v,p)	writel((v), S3C24XX_VA_ISA_WORD + (p))
 
-#define DECLARE_IO(sz,fnsuffix,instr)	\
-	DECLARE_DYN_IN(sz,fnsuffix,instr) \
-	DECLARE_DYN_OUT(sz,fnsuffix,instr)
+#define insb(p,d,l)	readsb(S3C24XX_VA_ISA_BYTE + (p),d,l)
+#define insw(p,d,l)	readsw(S3C24XX_VA_ISA_WORD + (p),d,l)
+#define insl(p,d,l)	readsl(S3C24XX_VA_ISA_WORD + (p),d,l)
 
-DECLARE_IO(char,b,"b")
-DECLARE_IO(short,w,"h")
-DECLARE_IO(int,l,"")
+#define outsb(p,d,l)	writesb(S3C24XX_VA_ISA_BYTE + (p),d,l)
+#define outsw(p,d,l)	writesw(S3C24XX_VA_ISA_WORD + (p),d,l)
+#define outsl(p,d,l)	writesl(S3C24XX_VA_ISA_WORD + (p),d,l)
 
-#undef DECLARE_IO
-#undef DECLARE_DYN_IN
-
-/*
- * Constant address IO functions
- *
- * These have to be macros for the 'J' constraint to work -
- * +/-4096 immediate operand.
- */
-#define __outbc(value,port)						\
-({									\
-	if (__PORT_PCIO((port)))					\
-		__asm__ __volatile__(					\
-		"strb	%0, [%1, %2]	@ outbc"			\
-		: : "r" (value), "r" (PCIO_BASE), "Jr" ((port)));	\
-	else								\
-		__asm__ __volatile__(					\
-		"strb	%0, [%1, #0]	@ outbc"			\
-		: : "r" (value), "r" ((port)));				\
-})
+#else
 
-#define __inbc(port)							\
-({									\
-	unsigned char result;						\
-	if (__PORT_PCIO((port)))					\
-		__asm__ __volatile__(					\
-		"ldrb	%0, [%1, %2]	@ inbc"				\
-		: "=r" (result) : "r" (PCIO_BASE), "Jr" ((port)));	\
-	else								\
-		__asm__ __volatile__(					\
-		"ldrb	%0, [%1, #0]	@ inbc"				\
-		: "=r" (result) : "r" ((port)));			\
-	result;								\
-})
+#define __io(x) (PCIO_BASE + (x))
 
-#define __outwc(value,port)						\
-({									\
-	unsigned long v = value;					\
-	if (__PORT_PCIO((port))) {					\
-		if ((port) < 256 && (port) > -256)			\
-			__asm__ __volatile__(				\
-			"strh	%0, [%1, %2]	@ outwc"		\
-			: : "r" (v), "r" (PCIO_BASE), "Jr" ((port)));	\
-		else if ((port) > 0)					\
-			__asm__ __volatile__(				\
-			"strh	%0, [%1, %2]	@ outwc"		\
-			: : "r" (v),					\
-			    "r" (PCIO_BASE + ((port) & ~0xff)),		\
-			     "Jr" (((port) & 0xff)));			\
-		else							\
-			__asm__ __volatile__(				\
-			"strh	%0, [%1, #0]	@ outwc"		\
-			: : "r" (v),					\
-			    "r" (PCIO_BASE + (port)));			\
-	} else								\
-		__asm__ __volatile__(					\
-		"strh	%0, [%1, #0]	@ outwc"			\
-		: : "r" (v), "r" ((port)));				\
-})
-
-#define __inwc(port)							\
-({									\
-	unsigned short result;						\
-	if (__PORT_PCIO((port))) {					\
-		if ((port) < 256 && (port) > -256 )			\
-			__asm__ __volatile__(				\
-			"ldrh	%0, [%1, %2]	@ inwc"			\
-			: "=r" (result)					\
-			: "r" (PCIO_BASE),				\
-			  "Jr" ((port)));				\
-		else if ((port) > 0)					\
-			__asm__ __volatile__(				\
-			"ldrh	%0, [%1, %2]	@ inwc"			\
-			: "=r" (result)					\
-			: "r" (PCIO_BASE + ((port) & ~0xff)),		\
-			  "Jr" (((port) & 0xff)));			\
-		else							\
-			__asm__ __volatile__(				\
-			"ldrh	%0, [%1, #0]	@ inwc"			\
-			: "=r" (result)					\
-			: "r" (PCIO_BASE + ((port))));			\
-	} else								\
-		__asm__ __volatile__(					\
-		"ldrh	%0, [%1, #0]	@ inwc"				\
-		: "=r" (result) : "r" ((port)));			\
-	result;								\
-})
-
-#define __outlc(value,port)						\
-({									\
-	unsigned long v = value;					\
-	if (__PORT_PCIO((port)))					\
-		__asm__ __volatile__(					\
-		"str	%0, [%1, %2]	@ outlc"			\
-		: : "r" (v), "r" (PCIO_BASE), "Jr" ((port)));	\
-	else								\
-		__asm__ __volatile__(					\
-		"str	%0, [%1, #0]	@ outlc"			\
-		: : "r" (v), "r" ((port)));		\
-})
-
-#define __inlc(port)							\
-({									\
-	unsigned long result;						\
-	if (__PORT_PCIO((port)))					\
-		__asm__ __volatile__(					\
-		"ldr	%0, [%1, %2]	@ inlc"				\
-		: "=r" (result) : "r" (PCIO_BASE), "Jr" ((port)));	\
-	else								\
-		__asm__ __volatile__(					\
-		"ldr	%0, [%1, #0]	@ inlc"				\
-		: "=r" (result) : "r" ((port)));		\
-	result;								\
-})
-
-#define __ioaddrc(port)	((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
-
-#define inb(p)		(__builtin_constant_p((p)) ? __inbc(p)	   : __inb(p))
-#define inw(p)		(__builtin_constant_p((p)) ? __inwc(p)	   : __inw(p))
-#define inl(p)		(__builtin_constant_p((p)) ? __inlc(p)	   : __inl(p))
-#define outb(v,p)	(__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
-#define outw(v,p)	(__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
-#define outl(v,p)	(__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
-#define __ioaddr(p)	(__builtin_constant_p((p)) ? __ioaddr(p)  : __ioaddrc(p))
-
-#define insb(p,d,l)	__raw_readsb(__ioaddr(p),d,l)
-#define insw(p,d,l)	__raw_readsw(__ioaddr(p),d,l)
-#define insl(p,d,l)	__raw_readsl(__ioaddr(p),d,l)
-
-#define outsb(p,d,l)	__raw_writesb(__ioaddr(p),d,l)
-#define outsw(p,d,l)	__raw_writesw(__ioaddr(p),d,l)
-#define outsl(p,d,l)	__raw_writesl(__ioaddr(p),d,l)
+#endif
 
 #endif
diff --git a/arch/arm/plat-samsung/include/plat/map-s3c.h b/arch/arm/plat-samsung/include/plat/map-s3c.h
index 4244acbf4b65..bf247d836684 100644
--- a/arch/arm/plat-samsung/include/plat/map-s3c.h
+++ b/arch/arm/plat-samsung/include/plat/map-s3c.h
@@ -9,6 +9,8 @@
 #ifndef __ASM_PLAT_MAP_S3C_H
 #define __ASM_PLAT_MAP_S3C_H __FILE__
 
+#include <mach/map.h>
+
 #define S3C24XX_VA_IRQ		S3C_VA_IRQ
 #define S3C24XX_VA_MEMCTRL	S3C_VA_MEM
 #define S3C24XX_VA_UART		S3C_VA_UART
@@ -45,16 +47,8 @@
 
 #define S3C_VA_USB_HSPHY	S3C64XX_VA_USB_HSPHY
 
-/*
- * ISA style IO, for each machine to sort out mappings for,
- * if it implements it. We reserve two 16M regions for ISA.
- */
-
 #define S3C2410_ADDR(x)		S3C_ADDR(x)
 
-#define S3C24XX_VA_ISA_WORD	S3C2410_ADDR(0x02000000)
-#define S3C24XX_VA_ISA_BYTE	S3C2410_ADDR(0x03000000)
-
 /* deal with the registers that move under the 2412/2413 */
 
 #if defined(CONFIG_CPU_S3C2412)
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 02/36] ARM: s3c: simplify mach/io.h
  2019-10-10 20:29   ` [PATCH 02/36] ARM: s3c: simplify mach/io.h Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel

s3c24xx has a custom implementation of the inb/outb family of I/O
accessors, implementing both general register access and ISA I/O port
through a multiplexer.

As far as I can tell, the first case has never been needed, and certainly
is not used now, as drivers only use inb/outb to actually driver ISA or
PCI port I/O.

Similarly, the special ISA support is limited to a single machine, the
Simtec Electronics BAST (EB2410ITX) with its PC/104 expansion connector,
all other machines could simply use the generic implementation from
asm/io.h that expects a single memory-mapped address range for byte,
word and dword access. As no other machines besides BAST actually selects
CONFIG_ISA, this is likely not even necessary.

As a cleanup, remove suport for the non-ISA access from the helpers,
and make the ISA access use the virtual address window that we use
elsewhere for PCI I/O ports. In configurations without the BAST machine,
this now falls back on the generic implementation from asm/io.h, but
the mach/io.h header is still relied on to include a number of other
header files implicitly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/include/mach/io.h      | 209 +++----------------
 arch/arm/plat-samsung/include/plat/map-s3c.h |  10 +-
 2 files changed, 26 insertions(+), 193 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/include/mach/io.h b/arch/arm/mach-s3c24xx/include/mach/io.h
index f960e6d10114..3e8bff26cdd5 100644
--- a/arch/arm/mach-s3c24xx/include/mach/io.h
+++ b/arch/arm/mach-s3c24xx/include/mach/io.h
@@ -12,201 +12,40 @@
 
 #include <mach/hardware.h>
 
-#define IO_SPACE_LIMIT 0xffffffff
 
 /*
- * We use two different types of addressing - PC style addresses, and ARM
- * addresses.  PC style accesses the PC hardware with the normal PC IO
- * addresses, eg 0x3f8 for serial#1.  ARM addresses are above A28
- * and are translated to the start of IO.  Note that all addresses are
- * not shifted left!
+ * ISA style IO, for each machine to sort out mappings for,
+ * if it implements it. We reserve two 16M regions for ISA,
+ * so the PC/104 can use separate addresses for 8-bit and
+ * 16-bit port I/O.
  */
+#define PCIO_BASE		S3C_ADDR(0x02000000)
+#define IO_SPACE_LIMIT		0x00ffffff
+#define S3C24XX_VA_ISA_WORD	(PCIO_BASE)
+#define S3C24XX_VA_ISA_BYTE	(PCIO_BASE + 0x01000000)
 
-#define __PORT_PCIO(x)	((x) < (1<<28))
+#ifdef CONFIG_ISA
 
-#define PCIO_BASE	 (S3C24XX_VA_ISA_WORD)
-#define PCIO_BASE_b	 (S3C24XX_VA_ISA_BYTE)
-#define PCIO_BASE_w	 (S3C24XX_VA_ISA_WORD)
-#define PCIO_BASE_l	 (S3C24XX_VA_ISA_WORD)
-/*
- * Dynamic IO functions - let the compiler
- * optimize the expressions
- */
-
-#define DECLARE_DYN_OUT(sz,fnsuffix,instr) \
-static inline void __out##fnsuffix (unsigned int val, unsigned int port) \
-{ \
-	unsigned long temp;				      \
-	__asm__ __volatile__(				      \
-	"cmp	%2, #(1<<28)\n\t"			      \
-	"mov	%0, %2\n\t"				      \
-	"addcc	%0, %0, %3\n\t"				      \
-	"str" instr " %1, [%0, #0 ]	@ out" #fnsuffix      \
-	: "=&r" (temp)					      \
-	: "r" (val), "r" (port), "Ir" (PCIO_BASE_##fnsuffix)  \
-	: "cc");					      \
-}
-
-
-#define DECLARE_DYN_IN(sz,fnsuffix,instr)				\
-static inline unsigned sz __in##fnsuffix (unsigned int port)		\
-{									\
-	unsigned long temp, value;					\
-	__asm__ __volatile__(						\
-	"cmp	%2, #(1<<28)\n\t"					\
-	"mov	%0, %2\n\t"						\
-	"addcc	%0, %0, %3\n\t"						\
-	"ldr" instr "	%1, [%0, #0 ]	@ in" #fnsuffix		\
-	: "=&r" (temp), "=r" (value)					\
-	: "r" (port), "Ir" (PCIO_BASE_##fnsuffix)	\
-	: "cc");							\
-	return (unsigned sz)value;					\
-}
+#define inb(p)		readb(S3C24XX_VA_ISA_BYTE + (p))
+#define inw(p)		readw(S3C24XX_VA_ISA_WORD + (p))
+#define inl(p)		readl(S3C24XX_VA_ISA_WORD + (p))
 
-static inline void __iomem *__ioaddr (unsigned long port)
-{
-	return __PORT_PCIO(port) ? (PCIO_BASE + port) : (void __iomem *)port;
-}
+#define outb(v,p)	writeb((v), S3C24XX_VA_ISA_BYTE + (p))
+#define outw(v,p)	writew((v), S3C24XX_VA_ISA_WORD + (p))
+#define outl(v,p)	writel((v), S3C24XX_VA_ISA_WORD + (p))
 
-#define DECLARE_IO(sz,fnsuffix,instr)	\
-	DECLARE_DYN_IN(sz,fnsuffix,instr) \
-	DECLARE_DYN_OUT(sz,fnsuffix,instr)
+#define insb(p,d,l)	readsb(S3C24XX_VA_ISA_BYTE + (p),d,l)
+#define insw(p,d,l)	readsw(S3C24XX_VA_ISA_WORD + (p),d,l)
+#define insl(p,d,l)	readsl(S3C24XX_VA_ISA_WORD + (p),d,l)
 
-DECLARE_IO(char,b,"b")
-DECLARE_IO(short,w,"h")
-DECLARE_IO(int,l,"")
+#define outsb(p,d,l)	writesb(S3C24XX_VA_ISA_BYTE + (p),d,l)
+#define outsw(p,d,l)	writesw(S3C24XX_VA_ISA_WORD + (p),d,l)
+#define outsl(p,d,l)	writesl(S3C24XX_VA_ISA_WORD + (p),d,l)
 
-#undef DECLARE_IO
-#undef DECLARE_DYN_IN
-
-/*
- * Constant address IO functions
- *
- * These have to be macros for the 'J' constraint to work -
- * +/-4096 immediate operand.
- */
-#define __outbc(value,port)						\
-({									\
-	if (__PORT_PCIO((port)))					\
-		__asm__ __volatile__(					\
-		"strb	%0, [%1, %2]	@ outbc"			\
-		: : "r" (value), "r" (PCIO_BASE), "Jr" ((port)));	\
-	else								\
-		__asm__ __volatile__(					\
-		"strb	%0, [%1, #0]	@ outbc"			\
-		: : "r" (value), "r" ((port)));				\
-})
+#else
 
-#define __inbc(port)							\
-({									\
-	unsigned char result;						\
-	if (__PORT_PCIO((port)))					\
-		__asm__ __volatile__(					\
-		"ldrb	%0, [%1, %2]	@ inbc"				\
-		: "=r" (result) : "r" (PCIO_BASE), "Jr" ((port)));	\
-	else								\
-		__asm__ __volatile__(					\
-		"ldrb	%0, [%1, #0]	@ inbc"				\
-		: "=r" (result) : "r" ((port)));			\
-	result;								\
-})
+#define __io(x) (PCIO_BASE + (x))
 
-#define __outwc(value,port)						\
-({									\
-	unsigned long v = value;					\
-	if (__PORT_PCIO((port))) {					\
-		if ((port) < 256 && (port) > -256)			\
-			__asm__ __volatile__(				\
-			"strh	%0, [%1, %2]	@ outwc"		\
-			: : "r" (v), "r" (PCIO_BASE), "Jr" ((port)));	\
-		else if ((port) > 0)					\
-			__asm__ __volatile__(				\
-			"strh	%0, [%1, %2]	@ outwc"		\
-			: : "r" (v),					\
-			    "r" (PCIO_BASE + ((port) & ~0xff)),		\
-			     "Jr" (((port) & 0xff)));			\
-		else							\
-			__asm__ __volatile__(				\
-			"strh	%0, [%1, #0]	@ outwc"		\
-			: : "r" (v),					\
-			    "r" (PCIO_BASE + (port)));			\
-	} else								\
-		__asm__ __volatile__(					\
-		"strh	%0, [%1, #0]	@ outwc"			\
-		: : "r" (v), "r" ((port)));				\
-})
-
-#define __inwc(port)							\
-({									\
-	unsigned short result;						\
-	if (__PORT_PCIO((port))) {					\
-		if ((port) < 256 && (port) > -256 )			\
-			__asm__ __volatile__(				\
-			"ldrh	%0, [%1, %2]	@ inwc"			\
-			: "=r" (result)					\
-			: "r" (PCIO_BASE),				\
-			  "Jr" ((port)));				\
-		else if ((port) > 0)					\
-			__asm__ __volatile__(				\
-			"ldrh	%0, [%1, %2]	@ inwc"			\
-			: "=r" (result)					\
-			: "r" (PCIO_BASE + ((port) & ~0xff)),		\
-			  "Jr" (((port) & 0xff)));			\
-		else							\
-			__asm__ __volatile__(				\
-			"ldrh	%0, [%1, #0]	@ inwc"			\
-			: "=r" (result)					\
-			: "r" (PCIO_BASE + ((port))));			\
-	} else								\
-		__asm__ __volatile__(					\
-		"ldrh	%0, [%1, #0]	@ inwc"				\
-		: "=r" (result) : "r" ((port)));			\
-	result;								\
-})
-
-#define __outlc(value,port)						\
-({									\
-	unsigned long v = value;					\
-	if (__PORT_PCIO((port)))					\
-		__asm__ __volatile__(					\
-		"str	%0, [%1, %2]	@ outlc"			\
-		: : "r" (v), "r" (PCIO_BASE), "Jr" ((port)));	\
-	else								\
-		__asm__ __volatile__(					\
-		"str	%0, [%1, #0]	@ outlc"			\
-		: : "r" (v), "r" ((port)));		\
-})
-
-#define __inlc(port)							\
-({									\
-	unsigned long result;						\
-	if (__PORT_PCIO((port)))					\
-		__asm__ __volatile__(					\
-		"ldr	%0, [%1, %2]	@ inlc"				\
-		: "=r" (result) : "r" (PCIO_BASE), "Jr" ((port)));	\
-	else								\
-		__asm__ __volatile__(					\
-		"ldr	%0, [%1, #0]	@ inlc"				\
-		: "=r" (result) : "r" ((port)));		\
-	result;								\
-})
-
-#define __ioaddrc(port)	((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)0 + (port)))
-
-#define inb(p)		(__builtin_constant_p((p)) ? __inbc(p)	   : __inb(p))
-#define inw(p)		(__builtin_constant_p((p)) ? __inwc(p)	   : __inw(p))
-#define inl(p)		(__builtin_constant_p((p)) ? __inlc(p)	   : __inl(p))
-#define outb(v,p)	(__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
-#define outw(v,p)	(__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
-#define outl(v,p)	(__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
-#define __ioaddr(p)	(__builtin_constant_p((p)) ? __ioaddr(p)  : __ioaddrc(p))
-
-#define insb(p,d,l)	__raw_readsb(__ioaddr(p),d,l)
-#define insw(p,d,l)	__raw_readsw(__ioaddr(p),d,l)
-#define insl(p,d,l)	__raw_readsl(__ioaddr(p),d,l)
-
-#define outsb(p,d,l)	__raw_writesb(__ioaddr(p),d,l)
-#define outsw(p,d,l)	__raw_writesw(__ioaddr(p),d,l)
-#define outsl(p,d,l)	__raw_writesl(__ioaddr(p),d,l)
+#endif
 
 #endif
diff --git a/arch/arm/plat-samsung/include/plat/map-s3c.h b/arch/arm/plat-samsung/include/plat/map-s3c.h
index 4244acbf4b65..bf247d836684 100644
--- a/arch/arm/plat-samsung/include/plat/map-s3c.h
+++ b/arch/arm/plat-samsung/include/plat/map-s3c.h
@@ -9,6 +9,8 @@
 #ifndef __ASM_PLAT_MAP_S3C_H
 #define __ASM_PLAT_MAP_S3C_H __FILE__
 
+#include <mach/map.h>
+
 #define S3C24XX_VA_IRQ		S3C_VA_IRQ
 #define S3C24XX_VA_MEMCTRL	S3C_VA_MEM
 #define S3C24XX_VA_UART		S3C_VA_UART
@@ -45,16 +47,8 @@
 
 #define S3C_VA_USB_HSPHY	S3C64XX_VA_USB_HSPHY
 
-/*
- * ISA style IO, for each machine to sort out mappings for,
- * if it implements it. We reserve two 16M regions for ISA.
- */
-
 #define S3C2410_ADDR(x)		S3C_ADDR(x)
 
-#define S3C24XX_VA_ISA_WORD	S3C2410_ADDR(0x02000000)
-#define S3C24XX_VA_ISA_BYTE	S3C2410_ADDR(0x03000000)
-
 /* deal with the registers that move under the 2412/2413 */
 
 #if defined(CONFIG_CPU_S3C2412)
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 03/36] usb: gadget: s3c: use platform resources
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
  2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29   ` [PATCH 02/36] ARM: s3c: simplify mach/io.h Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
                       ` (2 more replies)
  2019-10-10 20:29   ` [PATCH 04/36] usb: gadget: s3c-hsudc: remove platform header dependency Arnd Bergmann
                     ` (31 subsequent siblings)
  34 siblings, 3 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: Felipe Balbi, linux-samsung-soc, Arnd Bergmann,
	Greg Kroah-Hartman, linus.walleij, linux-usb, linux-kernel,
	linux-arm-kernel

The resources are correctly initialized, so just use them
instead of relying on hardcoded data from platform headers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/usb/gadget/udc/s3c2410_udc.c          | 31 +++++++------------
 drivers/usb/gadget/udc/s3c2410_udc.h          |  1 +
 .../usb/gadget/udc/s3c2410_udc_regs.h         |  0
 3 files changed, 12 insertions(+), 20 deletions(-)
 rename arch/arm/plat-samsung/include/plat/regs-udc.h => drivers/usb/gadget/udc/s3c2410_udc_regs.h (100%)

diff --git a/drivers/usb/gadget/udc/s3c2410_udc.c b/drivers/usb/gadget/udc/s3c2410_udc.c
index f82208fbc249..e411d27b79fc 100644
--- a/drivers/usb/gadget/udc/s3c2410_udc.c
+++ b/drivers/usb/gadget/udc/s3c2410_udc.c
@@ -36,15 +36,11 @@
 #include <asm/byteorder.h>
 #include <asm/irq.h>
 #include <asm/unaligned.h>
-#include <mach/irqs.h>
 
-#include <mach/hardware.h>
-
-#include <plat/regs-udc.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
 
-
 #include "s3c2410_udc.h"
+#include "s3c2410_udc_regs.h"
 
 #define DRIVER_DESC	"S3C2410 USB Device Controller Gadget"
 #define DRIVER_AUTHOR	"Herbert Pötzl <herbert@13thfloor.at>, " \
@@ -57,6 +53,7 @@ static struct s3c2410_udc	*the_controller;
 static struct clk		*udc_clock;
 static struct clk		*usb_bus_clock;
 static void __iomem		*base_addr;
+static int			irq_usbd;
 static u64			rsrc_start;
 static u64			rsrc_len;
 static struct dentry		*s3c2410_udc_debugfs_root;
@@ -839,8 +836,6 @@ static void s3c2410_udc_handle_ep(struct s3c2410_ep *ep)
 	}
 }
 
-#include <mach/regs-irq.h>
-
 /*
  *	s3c2410_udc_irq - interrupt handler
  */
@@ -981,7 +976,7 @@ static irqreturn_t s3c2410_udc_irq(int dummy, void *_dev)
 		}
 	}
 
-	dprintk(DEBUG_VERBOSE, "irq: %d s3c2410_udc_done.\n", IRQ_USBD);
+	dprintk(DEBUG_VERBOSE, "irq: %d s3c2410_udc_done.\n", irq_usbd);
 
 	/* Restore old index */
 	udc_write(idx, S3C2410_UDC_INDEX_REG);
@@ -1784,13 +1779,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev)
 	spin_lock_init(&udc->lock);
 	udc_info = dev_get_platdata(&pdev->dev);
 
-	rsrc_start = S3C2410_PA_USBDEV;
-	rsrc_len   = S3C24XX_SZ_USBDEV;
-
-	if (!request_mem_region(rsrc_start, rsrc_len, gadget_name))
-		return -EBUSY;
-
-	base_addr = ioremap(rsrc_start, rsrc_len);
+	base_addr = devm_platform_ioremap_resource(pdev, 0);
 	if (!base_addr) {
 		retval = -ENOMEM;
 		goto err_mem;
@@ -1802,17 +1791,19 @@ static int s3c2410_udc_probe(struct platform_device *pdev)
 	s3c2410_udc_disable(udc);
 	s3c2410_udc_reinit(udc);
 
+	irq_usbd = platform_get_irq(pdev, 0);
+
 	/* irq setup after old hardware state is cleaned up */
-	retval = request_irq(IRQ_USBD, s3c2410_udc_irq,
+	retval = request_irq(irq_usbd, s3c2410_udc_irq,
 			     0, gadget_name, udc);
 
 	if (retval != 0) {
-		dev_err(dev, "cannot get irq %i, err %d\n", IRQ_USBD, retval);
+		dev_err(dev, "cannot get irq %i, err %d\n", irq_usbd, retval);
 		retval = -EBUSY;
 		goto err_map;
 	}
 
-	dev_dbg(dev, "got irq %i\n", IRQ_USBD);
+	dev_dbg(dev, "got irq %i\n", irq_usbd);
 
 	if (udc_info && udc_info->vbus_pin > 0) {
 		retval = gpio_request(udc_info->vbus_pin, "udc vbus");
@@ -1879,7 +1870,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev)
 	if (udc_info && udc_info->vbus_pin > 0)
 		gpio_free(udc_info->vbus_pin);
 err_int:
-	free_irq(IRQ_USBD, udc);
+	free_irq(irq_usbd, udc);
 err_map:
 	iounmap(base_addr);
 err_mem:
@@ -1913,7 +1904,7 @@ static int s3c2410_udc_remove(struct platform_device *pdev)
 		free_irq(irq, udc);
 	}
 
-	free_irq(IRQ_USBD, udc);
+	free_irq(irq_usbd, udc);
 
 	iounmap(base_addr);
 	release_mem_region(rsrc_start, rsrc_len);
diff --git a/drivers/usb/gadget/udc/s3c2410_udc.h b/drivers/usb/gadget/udc/s3c2410_udc.h
index bdcaa8dd300f..68bdf3e5aac2 100644
--- a/drivers/usb/gadget/udc/s3c2410_udc.h
+++ b/drivers/usb/gadget/udc/s3c2410_udc.h
@@ -90,6 +90,7 @@ struct s3c2410_udc {
 	unsigned			req_pending : 1;
 	u8				vbus;
 	struct dentry			*regs_info;
+	int				irq;
 };
 #define to_s3c2410(g)	(container_of((g), struct s3c2410_udc, gadget))
 
diff --git a/arch/arm/plat-samsung/include/plat/regs-udc.h b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/regs-udc.h
rename to drivers/usb/gadget/udc/s3c2410_udc_regs.h
-- 
2.20.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 03/36] usb: gadget: s3c: use platform resources
  2019-10-10 20:29   ` [PATCH 03/36] usb: gadget: s3c: use platform resources Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 10:06     ` Krzysztof Kozlowski
  2019-10-23 12:46     ` Krzysztof Kozlowski
  2 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Felipe Balbi, Greg Kroah-Hartman, linux-kernel,
	linux-usb

The resources are correctly initialized, so just use them
instead of relying on hardcoded data from platform headers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/usb/gadget/udc/s3c2410_udc.c          | 31 +++++++------------
 drivers/usb/gadget/udc/s3c2410_udc.h          |  1 +
 .../usb/gadget/udc/s3c2410_udc_regs.h         |  0
 3 files changed, 12 insertions(+), 20 deletions(-)
 rename arch/arm/plat-samsung/include/plat/regs-udc.h => drivers/usb/gadget/udc/s3c2410_udc_regs.h (100%)

diff --git a/drivers/usb/gadget/udc/s3c2410_udc.c b/drivers/usb/gadget/udc/s3c2410_udc.c
index f82208fbc249..e411d27b79fc 100644
--- a/drivers/usb/gadget/udc/s3c2410_udc.c
+++ b/drivers/usb/gadget/udc/s3c2410_udc.c
@@ -36,15 +36,11 @@
 #include <asm/byteorder.h>
 #include <asm/irq.h>
 #include <asm/unaligned.h>
-#include <mach/irqs.h>
 
-#include <mach/hardware.h>
-
-#include <plat/regs-udc.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
 
-
 #include "s3c2410_udc.h"
+#include "s3c2410_udc_regs.h"
 
 #define DRIVER_DESC	"S3C2410 USB Device Controller Gadget"
 #define DRIVER_AUTHOR	"Herbert Pötzl <herbert@13thfloor.at>, " \
@@ -57,6 +53,7 @@ static struct s3c2410_udc	*the_controller;
 static struct clk		*udc_clock;
 static struct clk		*usb_bus_clock;
 static void __iomem		*base_addr;
+static int			irq_usbd;
 static u64			rsrc_start;
 static u64			rsrc_len;
 static struct dentry		*s3c2410_udc_debugfs_root;
@@ -839,8 +836,6 @@ static void s3c2410_udc_handle_ep(struct s3c2410_ep *ep)
 	}
 }
 
-#include <mach/regs-irq.h>
-
 /*
  *	s3c2410_udc_irq - interrupt handler
  */
@@ -981,7 +976,7 @@ static irqreturn_t s3c2410_udc_irq(int dummy, void *_dev)
 		}
 	}
 
-	dprintk(DEBUG_VERBOSE, "irq: %d s3c2410_udc_done.\n", IRQ_USBD);
+	dprintk(DEBUG_VERBOSE, "irq: %d s3c2410_udc_done.\n", irq_usbd);
 
 	/* Restore old index */
 	udc_write(idx, S3C2410_UDC_INDEX_REG);
@@ -1784,13 +1779,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev)
 	spin_lock_init(&udc->lock);
 	udc_info = dev_get_platdata(&pdev->dev);
 
-	rsrc_start = S3C2410_PA_USBDEV;
-	rsrc_len   = S3C24XX_SZ_USBDEV;
-
-	if (!request_mem_region(rsrc_start, rsrc_len, gadget_name))
-		return -EBUSY;
-
-	base_addr = ioremap(rsrc_start, rsrc_len);
+	base_addr = devm_platform_ioremap_resource(pdev, 0);
 	if (!base_addr) {
 		retval = -ENOMEM;
 		goto err_mem;
@@ -1802,17 +1791,19 @@ static int s3c2410_udc_probe(struct platform_device *pdev)
 	s3c2410_udc_disable(udc);
 	s3c2410_udc_reinit(udc);
 
+	irq_usbd = platform_get_irq(pdev, 0);
+
 	/* irq setup after old hardware state is cleaned up */
-	retval = request_irq(IRQ_USBD, s3c2410_udc_irq,
+	retval = request_irq(irq_usbd, s3c2410_udc_irq,
 			     0, gadget_name, udc);
 
 	if (retval != 0) {
-		dev_err(dev, "cannot get irq %i, err %d\n", IRQ_USBD, retval);
+		dev_err(dev, "cannot get irq %i, err %d\n", irq_usbd, retval);
 		retval = -EBUSY;
 		goto err_map;
 	}
 
-	dev_dbg(dev, "got irq %i\n", IRQ_USBD);
+	dev_dbg(dev, "got irq %i\n", irq_usbd);
 
 	if (udc_info && udc_info->vbus_pin > 0) {
 		retval = gpio_request(udc_info->vbus_pin, "udc vbus");
@@ -1879,7 +1870,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev)
 	if (udc_info && udc_info->vbus_pin > 0)
 		gpio_free(udc_info->vbus_pin);
 err_int:
-	free_irq(IRQ_USBD, udc);
+	free_irq(irq_usbd, udc);
 err_map:
 	iounmap(base_addr);
 err_mem:
@@ -1913,7 +1904,7 @@ static int s3c2410_udc_remove(struct platform_device *pdev)
 		free_irq(irq, udc);
 	}
 
-	free_irq(IRQ_USBD, udc);
+	free_irq(irq_usbd, udc);
 
 	iounmap(base_addr);
 	release_mem_region(rsrc_start, rsrc_len);
diff --git a/drivers/usb/gadget/udc/s3c2410_udc.h b/drivers/usb/gadget/udc/s3c2410_udc.h
index bdcaa8dd300f..68bdf3e5aac2 100644
--- a/drivers/usb/gadget/udc/s3c2410_udc.h
+++ b/drivers/usb/gadget/udc/s3c2410_udc.h
@@ -90,6 +90,7 @@ struct s3c2410_udc {
 	unsigned			req_pending : 1;
 	u8				vbus;
 	struct dentry			*regs_info;
+	int				irq;
 };
 #define to_s3c2410(g)	(container_of((g), struct s3c2410_udc, gadget))
 
diff --git a/arch/arm/plat-samsung/include/plat/regs-udc.h b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/regs-udc.h
rename to drivers/usb/gadget/udc/s3c2410_udc_regs.h
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 04/36] usb: gadget: s3c-hsudc: remove platform header dependency
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (2 preceding siblings ...)
  2019-10-10 20:29   ` [PATCH 03/36] usb: gadget: s3c: use platform resources Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 10:09     ` Krzysztof Kozlowski
  2019-10-10 20:29   ` [PATCH 05/36] ARM: samsung: make pm-debug platform independent Arnd Bergmann
                     ` (30 subsequent siblings)
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-samsung-soc, Arnd Bergmann, linus.walleij, linux-usb,
	linux-kernel, linux-arm-kernel

There is no real phy driver, so s3c-hsudc just pokes the registers
itself. Improve this a little by making it a platform data callback
like we do for gpios.

There is only one board using this driver, and it's unlikely
that another would be added, so this is a minimal workaround.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 .../include/mach/regs-s3c2443-clock.h         | 49 +++++++++++++++++
 arch/arm/plat-samsung/devs.c                  |  3 +
 drivers/usb/gadget/udc/s3c-hsudc.c            | 55 ++-----------------
 include/linux/platform_data/s3c-hsudc.h       |  2 +
 4 files changed, 58 insertions(+), 51 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
index 6bf924612b06..682759549e63 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
@@ -10,6 +10,8 @@
 #ifndef __ASM_ARM_REGS_S3C2443_CLOCK
 #define __ASM_ARM_REGS_S3C2443_CLOCK
 
+#include <linux/delay.h>
+
 #define S3C2443_CLKREG(x)		((x) + S3C24XX_VA_CLKPWR)
 
 #define S3C2443_PLLCON_MDIVSHIFT	16
@@ -184,5 +186,52 @@ s3c2443_get_epll(unsigned int pllval, unsigned int baseclk)
 	return (unsigned int)fvco;
 }
 
+static inline void s3c_hsudc_init_phy(void)
+{
+	u32 cfg;
+
+	cfg = readl(S3C2443_PWRCFG) | S3C2443_PWRCFG_USBPHY;
+	writel(cfg, S3C2443_PWRCFG);
+
+	cfg = readl(S3C2443_URSTCON);
+	cfg |= (S3C2443_URSTCON_FUNCRST | S3C2443_URSTCON_PHYRST);
+	writel(cfg, S3C2443_URSTCON);
+	mdelay(1);
+
+	cfg = readl(S3C2443_URSTCON);
+	cfg &= ~(S3C2443_URSTCON_FUNCRST | S3C2443_URSTCON_PHYRST);
+	writel(cfg, S3C2443_URSTCON);
+
+	cfg = readl(S3C2443_PHYCTRL);
+	cfg &= ~(S3C2443_PHYCTRL_CLKSEL | S3C2443_PHYCTRL_DSPORT);
+	cfg |= (S3C2443_PHYCTRL_EXTCLK | S3C2443_PHYCTRL_PLLSEL);
+	writel(cfg, S3C2443_PHYCTRL);
+
+	cfg = readl(S3C2443_PHYPWR);
+	cfg &= ~(S3C2443_PHYPWR_FSUSPEND | S3C2443_PHYPWR_PLL_PWRDN |
+		S3C2443_PHYPWR_XO_ON | S3C2443_PHYPWR_PLL_REFCLK |
+		S3C2443_PHYPWR_ANALOG_PD);
+	cfg |= S3C2443_PHYPWR_COMMON_ON;
+	writel(cfg, S3C2443_PHYPWR);
+
+	cfg = readl(S3C2443_UCLKCON);
+	cfg |= (S3C2443_UCLKCON_DETECT_VBUS | S3C2443_UCLKCON_FUNC_CLKEN |
+		S3C2443_UCLKCON_TCLKEN);
+	writel(cfg, S3C2443_UCLKCON);
+}
+
+static inline void s3c_hsudc_uninit_phy(void)
+{
+	u32 cfg;
+
+	cfg = readl(S3C2443_PWRCFG) & ~S3C2443_PWRCFG_USBPHY;
+	writel(cfg, S3C2443_PWRCFG);
+
+	writel(S3C2443_PHYPWR_FSUSPEND, S3C2443_PHYPWR);
+
+	cfg = readl(S3C2443_UCLKCON) & ~S3C2443_UCLKCON_FUNC_CLKEN;
+	writel(cfg, S3C2443_UCLKCON);
+}
+
 #endif /*  __ASM_ARM_REGS_S3C2443_CLOCK */
 
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 1d1fa068d228..6e4c1cb07104 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -40,6 +40,7 @@
 #include <mach/dma.h>
 #include <mach/irqs.h>
 #include <mach/map.h>
+#include <mach/regs-s3c2443-clock.h>
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
@@ -1038,6 +1039,8 @@ struct platform_device s3c_device_usb_hsudc = {
 void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd)
 {
 	s3c_set_platdata(pd, sizeof(*pd), &s3c_device_usb_hsudc);
+	pd->phy_init = s3c_hsudc_init_phy;
+	pd->phy_uninit = s3c_hsudc_uninit_phy;
 }
 #endif /* CONFIG_PLAT_S3C24XX */
 
diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c
index 858993c73442..d482cbb4bb4d 100644
--- a/drivers/usb/gadget/udc/s3c-hsudc.c
+++ b/drivers/usb/gadget/udc/s3c-hsudc.c
@@ -30,8 +30,6 @@
 #include <linux/regulator/consumer.h>
 #include <linux/pm_runtime.h>
 
-#include <mach/regs-s3c2443-clock.h>
-
 #define S3C_HSUDC_REG(x)	(x)
 
 /* Non-Indexed Registers */
@@ -186,53 +184,6 @@ static inline void __orr32(void __iomem *ptr, u32 val)
 	writel(readl(ptr) | val, ptr);
 }
 
-static void s3c_hsudc_init_phy(void)
-{
-	u32 cfg;
-
-	cfg = readl(S3C2443_PWRCFG) | S3C2443_PWRCFG_USBPHY;
-	writel(cfg, S3C2443_PWRCFG);
-
-	cfg = readl(S3C2443_URSTCON);
-	cfg |= (S3C2443_URSTCON_FUNCRST | S3C2443_URSTCON_PHYRST);
-	writel(cfg, S3C2443_URSTCON);
-	mdelay(1);
-
-	cfg = readl(S3C2443_URSTCON);
-	cfg &= ~(S3C2443_URSTCON_FUNCRST | S3C2443_URSTCON_PHYRST);
-	writel(cfg, S3C2443_URSTCON);
-
-	cfg = readl(S3C2443_PHYCTRL);
-	cfg &= ~(S3C2443_PHYCTRL_CLKSEL | S3C2443_PHYCTRL_DSPORT);
-	cfg |= (S3C2443_PHYCTRL_EXTCLK | S3C2443_PHYCTRL_PLLSEL);
-	writel(cfg, S3C2443_PHYCTRL);
-
-	cfg = readl(S3C2443_PHYPWR);
-	cfg &= ~(S3C2443_PHYPWR_FSUSPEND | S3C2443_PHYPWR_PLL_PWRDN |
-		S3C2443_PHYPWR_XO_ON | S3C2443_PHYPWR_PLL_REFCLK |
-		S3C2443_PHYPWR_ANALOG_PD);
-	cfg |= S3C2443_PHYPWR_COMMON_ON;
-	writel(cfg, S3C2443_PHYPWR);
-
-	cfg = readl(S3C2443_UCLKCON);
-	cfg |= (S3C2443_UCLKCON_DETECT_VBUS | S3C2443_UCLKCON_FUNC_CLKEN |
-		S3C2443_UCLKCON_TCLKEN);
-	writel(cfg, S3C2443_UCLKCON);
-}
-
-static void s3c_hsudc_uninit_phy(void)
-{
-	u32 cfg;
-
-	cfg = readl(S3C2443_PWRCFG) & ~S3C2443_PWRCFG_USBPHY;
-	writel(cfg, S3C2443_PWRCFG);
-
-	writel(S3C2443_PHYPWR_FSUSPEND, S3C2443_PHYPWR);
-
-	cfg = readl(S3C2443_UCLKCON) & ~S3C2443_UCLKCON_FUNC_CLKEN;
-	writel(cfg, S3C2443_UCLKCON);
-}
-
 /**
  * s3c_hsudc_complete_request - Complete a transfer request.
  * @hsep: Endpoint to which the request belongs.
@@ -1188,7 +1139,8 @@ static int s3c_hsudc_start(struct usb_gadget *gadget,
 
 	pm_runtime_get_sync(hsudc->dev);
 
-	s3c_hsudc_init_phy();
+	if (hsudc->pd->phy_init)
+		hsudc->pd->gpio_init();
 	if (hsudc->pd->gpio_init)
 		hsudc->pd->gpio_init();
 
@@ -1210,7 +1162,8 @@ static int s3c_hsudc_stop(struct usb_gadget *gadget)
 
 	spin_lock_irqsave(&hsudc->lock, flags);
 	hsudc->gadget.speed = USB_SPEED_UNKNOWN;
-	s3c_hsudc_uninit_phy();
+	if (hsudc->pd->phy_uninit)
+		hsudc->pd->phy_uninit();
 
 	pm_runtime_put(hsudc->dev);
 
diff --git a/include/linux/platform_data/s3c-hsudc.h b/include/linux/platform_data/s3c-hsudc.h
index 4dc9b8760166..a170939832d5 100644
--- a/include/linux/platform_data/s3c-hsudc.h
+++ b/include/linux/platform_data/s3c-hsudc.h
@@ -26,6 +26,8 @@ struct s3c24xx_hsudc_platdata {
 	unsigned int	epnum;
 	void		(*gpio_init)(void);
 	void		(*gpio_uninit)(void);
+	void		(*phy_init)(void);
+	void		(*phy_uninit)(void);
 };
 
 #endif	/* __LINUX_USB_S3C_HSUDC_H */
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 04/36] usb: gadget: s3c-hsudc: remove platform header dependency
  2019-10-10 20:29   ` [PATCH 04/36] usb: gadget: s3c-hsudc: remove platform header dependency Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 10:09     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel, linux-usb

There is no real phy driver, so s3c-hsudc just pokes the registers
itself. Improve this a little by making it a platform data callback
like we do for gpios.

There is only one board using this driver, and it's unlikely
that another would be added, so this is a minimal workaround.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 .../include/mach/regs-s3c2443-clock.h         | 49 +++++++++++++++++
 arch/arm/plat-samsung/devs.c                  |  3 +
 drivers/usb/gadget/udc/s3c-hsudc.c            | 55 ++-----------------
 include/linux/platform_data/s3c-hsudc.h       |  2 +
 4 files changed, 58 insertions(+), 51 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
index 6bf924612b06..682759549e63 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
@@ -10,6 +10,8 @@
 #ifndef __ASM_ARM_REGS_S3C2443_CLOCK
 #define __ASM_ARM_REGS_S3C2443_CLOCK
 
+#include <linux/delay.h>
+
 #define S3C2443_CLKREG(x)		((x) + S3C24XX_VA_CLKPWR)
 
 #define S3C2443_PLLCON_MDIVSHIFT	16
@@ -184,5 +186,52 @@ s3c2443_get_epll(unsigned int pllval, unsigned int baseclk)
 	return (unsigned int)fvco;
 }
 
+static inline void s3c_hsudc_init_phy(void)
+{
+	u32 cfg;
+
+	cfg = readl(S3C2443_PWRCFG) | S3C2443_PWRCFG_USBPHY;
+	writel(cfg, S3C2443_PWRCFG);
+
+	cfg = readl(S3C2443_URSTCON);
+	cfg |= (S3C2443_URSTCON_FUNCRST | S3C2443_URSTCON_PHYRST);
+	writel(cfg, S3C2443_URSTCON);
+	mdelay(1);
+
+	cfg = readl(S3C2443_URSTCON);
+	cfg &= ~(S3C2443_URSTCON_FUNCRST | S3C2443_URSTCON_PHYRST);
+	writel(cfg, S3C2443_URSTCON);
+
+	cfg = readl(S3C2443_PHYCTRL);
+	cfg &= ~(S3C2443_PHYCTRL_CLKSEL | S3C2443_PHYCTRL_DSPORT);
+	cfg |= (S3C2443_PHYCTRL_EXTCLK | S3C2443_PHYCTRL_PLLSEL);
+	writel(cfg, S3C2443_PHYCTRL);
+
+	cfg = readl(S3C2443_PHYPWR);
+	cfg &= ~(S3C2443_PHYPWR_FSUSPEND | S3C2443_PHYPWR_PLL_PWRDN |
+		S3C2443_PHYPWR_XO_ON | S3C2443_PHYPWR_PLL_REFCLK |
+		S3C2443_PHYPWR_ANALOG_PD);
+	cfg |= S3C2443_PHYPWR_COMMON_ON;
+	writel(cfg, S3C2443_PHYPWR);
+
+	cfg = readl(S3C2443_UCLKCON);
+	cfg |= (S3C2443_UCLKCON_DETECT_VBUS | S3C2443_UCLKCON_FUNC_CLKEN |
+		S3C2443_UCLKCON_TCLKEN);
+	writel(cfg, S3C2443_UCLKCON);
+}
+
+static inline void s3c_hsudc_uninit_phy(void)
+{
+	u32 cfg;
+
+	cfg = readl(S3C2443_PWRCFG) & ~S3C2443_PWRCFG_USBPHY;
+	writel(cfg, S3C2443_PWRCFG);
+
+	writel(S3C2443_PHYPWR_FSUSPEND, S3C2443_PHYPWR);
+
+	cfg = readl(S3C2443_UCLKCON) & ~S3C2443_UCLKCON_FUNC_CLKEN;
+	writel(cfg, S3C2443_UCLKCON);
+}
+
 #endif /*  __ASM_ARM_REGS_S3C2443_CLOCK */
 
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 1d1fa068d228..6e4c1cb07104 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -40,6 +40,7 @@
 #include <mach/dma.h>
 #include <mach/irqs.h>
 #include <mach/map.h>
+#include <mach/regs-s3c2443-clock.h>
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
@@ -1038,6 +1039,8 @@ struct platform_device s3c_device_usb_hsudc = {
 void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd)
 {
 	s3c_set_platdata(pd, sizeof(*pd), &s3c_device_usb_hsudc);
+	pd->phy_init = s3c_hsudc_init_phy;
+	pd->phy_uninit = s3c_hsudc_uninit_phy;
 }
 #endif /* CONFIG_PLAT_S3C24XX */
 
diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c
index 858993c73442..d482cbb4bb4d 100644
--- a/drivers/usb/gadget/udc/s3c-hsudc.c
+++ b/drivers/usb/gadget/udc/s3c-hsudc.c
@@ -30,8 +30,6 @@
 #include <linux/regulator/consumer.h>
 #include <linux/pm_runtime.h>
 
-#include <mach/regs-s3c2443-clock.h>
-
 #define S3C_HSUDC_REG(x)	(x)
 
 /* Non-Indexed Registers */
@@ -186,53 +184,6 @@ static inline void __orr32(void __iomem *ptr, u32 val)
 	writel(readl(ptr) | val, ptr);
 }
 
-static void s3c_hsudc_init_phy(void)
-{
-	u32 cfg;
-
-	cfg = readl(S3C2443_PWRCFG) | S3C2443_PWRCFG_USBPHY;
-	writel(cfg, S3C2443_PWRCFG);
-
-	cfg = readl(S3C2443_URSTCON);
-	cfg |= (S3C2443_URSTCON_FUNCRST | S3C2443_URSTCON_PHYRST);
-	writel(cfg, S3C2443_URSTCON);
-	mdelay(1);
-
-	cfg = readl(S3C2443_URSTCON);
-	cfg &= ~(S3C2443_URSTCON_FUNCRST | S3C2443_URSTCON_PHYRST);
-	writel(cfg, S3C2443_URSTCON);
-
-	cfg = readl(S3C2443_PHYCTRL);
-	cfg &= ~(S3C2443_PHYCTRL_CLKSEL | S3C2443_PHYCTRL_DSPORT);
-	cfg |= (S3C2443_PHYCTRL_EXTCLK | S3C2443_PHYCTRL_PLLSEL);
-	writel(cfg, S3C2443_PHYCTRL);
-
-	cfg = readl(S3C2443_PHYPWR);
-	cfg &= ~(S3C2443_PHYPWR_FSUSPEND | S3C2443_PHYPWR_PLL_PWRDN |
-		S3C2443_PHYPWR_XO_ON | S3C2443_PHYPWR_PLL_REFCLK |
-		S3C2443_PHYPWR_ANALOG_PD);
-	cfg |= S3C2443_PHYPWR_COMMON_ON;
-	writel(cfg, S3C2443_PHYPWR);
-
-	cfg = readl(S3C2443_UCLKCON);
-	cfg |= (S3C2443_UCLKCON_DETECT_VBUS | S3C2443_UCLKCON_FUNC_CLKEN |
-		S3C2443_UCLKCON_TCLKEN);
-	writel(cfg, S3C2443_UCLKCON);
-}
-
-static void s3c_hsudc_uninit_phy(void)
-{
-	u32 cfg;
-
-	cfg = readl(S3C2443_PWRCFG) & ~S3C2443_PWRCFG_USBPHY;
-	writel(cfg, S3C2443_PWRCFG);
-
-	writel(S3C2443_PHYPWR_FSUSPEND, S3C2443_PHYPWR);
-
-	cfg = readl(S3C2443_UCLKCON) & ~S3C2443_UCLKCON_FUNC_CLKEN;
-	writel(cfg, S3C2443_UCLKCON);
-}
-
 /**
  * s3c_hsudc_complete_request - Complete a transfer request.
  * @hsep: Endpoint to which the request belongs.
@@ -1188,7 +1139,8 @@ static int s3c_hsudc_start(struct usb_gadget *gadget,
 
 	pm_runtime_get_sync(hsudc->dev);
 
-	s3c_hsudc_init_phy();
+	if (hsudc->pd->phy_init)
+		hsudc->pd->gpio_init();
 	if (hsudc->pd->gpio_init)
 		hsudc->pd->gpio_init();
 
@@ -1210,7 +1162,8 @@ static int s3c_hsudc_stop(struct usb_gadget *gadget)
 
 	spin_lock_irqsave(&hsudc->lock, flags);
 	hsudc->gadget.speed = USB_SPEED_UNKNOWN;
-	s3c_hsudc_uninit_phy();
+	if (hsudc->pd->phy_uninit)
+		hsudc->pd->phy_uninit();
 
 	pm_runtime_put(hsudc->dev);
 
diff --git a/include/linux/platform_data/s3c-hsudc.h b/include/linux/platform_data/s3c-hsudc.h
index 4dc9b8760166..a170939832d5 100644
--- a/include/linux/platform_data/s3c-hsudc.h
+++ b/include/linux/platform_data/s3c-hsudc.h
@@ -26,6 +26,8 @@ struct s3c24xx_hsudc_platdata {
 	unsigned int	epnum;
 	void		(*gpio_init)(void);
 	void		(*gpio_uninit)(void);
+	void		(*phy_init)(void);
+	void		(*phy_uninit)(void);
 };
 
 #endif	/* __LINUX_USB_S3C_HSUDC_H */
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 05/36] ARM: samsung: make pm-debug platform independent
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (3 preceding siblings ...)
  2019-10-10 20:29   ` [PATCH 04/36] usb: gadget: s3c-hsudc: remove platform header dependency Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 10:27     ` Krzysztof Kozlowski
  2019-10-10 20:29   ` [PATCH 06/36] ARM: samsung: move CONFIG_DEBUG_S3C_UART to Kconfig.debug Arnd Bergmann
                     ` (29 subsequent siblings)
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Kyungmin Park
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Tomasz Figa, linux-kernel

The pm-debug code is one of the few things shared between s3c24xx/s3c64xx
and the newer s5pv210. In order to make s5pv210 independent of plat-samsung,
change the common bits of this code to no longer reference the s3c specific
bits.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/include/mach/pm-core.h  |  7 +--
 arch/arm/mach-s3c64xx/include/mach/pm-core.h  | 44 +---------------
 arch/arm/mach-s3c64xx/pm.c                    | 50 +++++++++++++++++++
 arch/arm/mach-s5pv210/pm.c                    |  6 +--
 .../arm/plat-samsung/include/plat/pm-common.h | 29 +++++------
 arch/arm/plat-samsung/pm-debug.c              | 23 ++-------
 arch/arm/plat-samsung/pm.c                    | 10 ++--
 7 files changed, 80 insertions(+), 89 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/include/mach/pm-core.h b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
index 5e4ce89d0158..8f87606c4cdc 100644
--- a/arch/arm/mach-s3c24xx/include/mach/pm-core.h
+++ b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
@@ -15,6 +15,7 @@
 
 static inline void s3c_pm_debug_init_uart(void)
 {
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
 	unsigned long tmp = __raw_readl(S3C2410_CLKCON);
 
 	/* re-start uart clocks */
@@ -24,6 +25,7 @@ static inline void s3c_pm_debug_init_uart(void)
 
 	__raw_writel(tmp, S3C2410_CLKCON);
 	udelay(10);
+#endif
 }
 
 static inline void s3c_pm_arch_prepare_irqs(void)
@@ -75,11 +77,6 @@ static inline void s3c_pm_arch_show_resume_irqs(void)
 				s3c_irqwake_eintmask);
 }
 
-static inline void s3c_pm_arch_update_uart(void __iomem *regs,
-					   struct pm_uart_save *save)
-{
-}
-
 static inline void s3c_pm_restored_gpios(void) { }
 static inline void samsung_pm_saved_gpios(void) { }
 
diff --git a/arch/arm/mach-s3c64xx/include/mach/pm-core.h b/arch/arm/mach-s3c64xx/include/mach/pm-core.h
index bbf79ed28583..33cf242734a0 100644
--- a/arch/arm/mach-s3c64xx/include/mach/pm-core.h
+++ b/arch/arm/mach-s3c64xx/include/mach/pm-core.h
@@ -20,6 +20,7 @@
 
 static inline void s3c_pm_debug_init_uart(void)
 {
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
 	u32 tmp = __raw_readl(S3C_PCLK_GATE);
 
 	/* As a note, since the S3C64XX UARTs generally have multiple
@@ -35,6 +36,7 @@ static inline void s3c_pm_debug_init_uart(void)
 
 	__raw_writel(tmp, S3C_PCLK_GATE);
 	udelay(10);
+#endif
 }
 
 static inline void s3c_pm_arch_prepare_irqs(void)
@@ -63,48 +65,6 @@ static inline void s3c_pm_arch_show_resume_irqs(void)
 #define s3c_irqwake_intallow  0
 #endif
 
-static inline void s3c_pm_arch_update_uart(void __iomem *regs,
-					   struct pm_uart_save *save)
-{
-	u32 ucon = __raw_readl(regs + S3C2410_UCON);
-	u32 ucon_clk = ucon & S3C6400_UCON_CLKMASK;
-	u32 save_clk = save->ucon & S3C6400_UCON_CLKMASK;
-	u32 new_ucon;
-	u32 delta;
-
-	/* S3C64XX UART blocks only support level interrupts, so ensure that
-	 * when we restore unused UART blocks we force the level interrupt
-	 * settigs. */
-	save->ucon |= S3C2410_UCON_TXILEVEL | S3C2410_UCON_RXILEVEL;
-
-	/* We have a constraint on changing the clock type of the UART
-	 * between UCLKx and PCLK, so ensure that when we restore UCON
-	 * that the CLK field is correctly modified if the bootloader
-	 * has changed anything.
-	 */
-	if (ucon_clk != save_clk) {
-		new_ucon = save->ucon;
-		delta = ucon_clk ^ save_clk;
-
-		/* change from UCLKx => wrong PCLK,
-		 * either UCLK can be tested for by a bit-test
-		 * with UCLK0 */
-		if (ucon_clk & S3C6400_UCON_UCLK0 &&
-		    !(save_clk & S3C6400_UCON_UCLK0) &&
-		    delta & S3C6400_UCON_PCLK2) {
-			new_ucon &= ~S3C6400_UCON_UCLK0;
-		} else if (delta == S3C6400_UCON_PCLK2) {
-			/* as an precaution, don't change from
-			 * PCLK2 => PCLK or vice-versa */
-			new_ucon ^= S3C6400_UCON_PCLK2;
-		}
-
-		S3C_PMDBG("ucon change %04x => %04x (save=%04x)\n",
-			  ucon, new_ucon, save->ucon);
-		save->ucon = new_ucon;
-	}
-}
-
 static inline void s3c_pm_restored_gpios(void)
 {
 	/* ensure sleep mode has been cleared from the system */
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c
index fd6dbb263ed5..a612e9779057 100644
--- a/arch/arm/mach-s3c64xx/pm.c
+++ b/arch/arm/mach-s3c64xx/pm.c
@@ -305,6 +305,56 @@ static void s3c64xx_pm_prepare(void)
 	__raw_writel(__raw_readl(S3C64XX_WAKEUP_STAT), S3C64XX_WAKEUP_STAT);
 }
 
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
+void s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save)
+{
+	u32 ucon;
+	u32 ucon_clk
+	u32 save_clk;
+	u32 new_ucon;
+	u32 delta;
+
+	if (!soc_is_s3c64xx())
+		return;
+
+	ucon = __raw_readl(regs + S3C2410_UCON);
+	ucon_clk = ucon & S3C6400_UCON_CLKMASK;
+	sav_clk = save->ucon & S3C6400_UCON_CLKMASK;
+
+	/* S3C64XX UART blocks only support level interrupts, so ensure that
+	 * when we restore unused UART blocks we force the level interrupt
+	 * settigs. */
+	save->ucon |= S3C2410_UCON_TXILEVEL | S3C2410_UCON_RXILEVEL;
+
+	/* We have a constraint on changing the clock type of the UART
+	 * between UCLKx and PCLK, so ensure that when we restore UCON
+	 * that the CLK field is correctly modified if the bootloader
+	 * has changed anything.
+	 */
+	if (ucon_clk != save_clk) {
+		new_ucon = save->ucon;
+		delta = ucon_clk ^ save_clk;
+
+		/* change from UCLKx => wrong PCLK,
+		 * either UCLK can be tested for by a bit-test
+		 * with UCLK0 */
+		if (ucon_clk & S3C6400_UCON_UCLK0 &&
+		    !(save_clk & S3C6400_UCON_UCLK0) &&
+		    delta & S3C6400_UCON_PCLK2) {
+			new_ucon &= ~S3C6400_UCON_UCLK0;
+		} else if (delta == S3C6400_UCON_PCLK2) {
+			/* as an precaution, don't change from
+			 * PCLK2 => PCLK or vice-versa */
+			new_ucon ^= S3C6400_UCON_PCLK2;
+		}
+
+		S3C_PMDBG("ucon change %04x => %04x (save=%04x)\n",
+			  ucon, new_ucon, save->ucon);
+		save->ucon = new_ucon;
+	}
+}
+#endif
+
 int __init s3c64xx_pm_init(void)
 {
 	int i;
diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c
index b336df0c57f3..efdb5a27c060 100644
--- a/arch/arm/mach-s5pv210/pm.c
+++ b/arch/arm/mach-s5pv210/pm.c
@@ -99,8 +99,6 @@ static int s5pv210_suspend_enter(suspend_state_t state)
 	u32 eint_wakeup_mask = s5pv210_read_eint_wakeup_mask();
 	int ret;
 
-	s3c_pm_debug_init();
-
 	S3C_PMDBG("%s: suspending the system...\n", __func__);
 
 	S3C_PMDBG("%s: wakeup masks: %08x,%08x\n", __func__,
@@ -113,7 +111,7 @@ static int s5pv210_suspend_enter(suspend_state_t state)
 		return -EINVAL;
 	}
 
-	s3c_pm_save_uarts();
+	s3c_pm_save_uarts(false);
 	s5pv210_pm_prepare();
 	flush_cache_all();
 	s3c_pm_check_store();
@@ -122,7 +120,7 @@ static int s5pv210_suspend_enter(suspend_state_t state)
 	if (ret)
 		return ret;
 
-	s3c_pm_restore_uarts();
+	s3c_pm_restore_uarts(false);
 
 	S3C_PMDBG("%s: wakeup stat: %08x\n", __func__,
 			__raw_readl(S5P_WAKEUP_STAT));
diff --git a/arch/arm/plat-samsung/include/plat/pm-common.h b/arch/arm/plat-samsung/include/plat/pm-common.h
index 1268bae04234..87fa97fd6e8b 100644
--- a/arch/arm/plat-samsung/include/plat/pm-common.h
+++ b/arch/arm/plat-samsung/include/plat/pm-common.h
@@ -69,25 +69,26 @@ struct pm_uart_save {
  */
 extern void s3c_pm_dbg(const char *msg, ...);
 
-/**
- * s3c_pm_debug_init() - suspend/resume low level debug initialization.
- * @base: Virtual base of UART to use for suspend/resume debugging.
- *
- * This function needs to be called before S3C_PMDBG() can be used, to set up
- * UART port base address and configuration.
- */
-extern void s3c_pm_debug_init(void);
-
 #define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt)
 
-extern void s3c_pm_save_uarts(void);
-extern void s3c_pm_restore_uarts(void);
+extern void s3c_pm_save_uarts(bool is_s3c24xx);
+extern void s3c_pm_restore_uarts(bool is_s3c24xx);
+
+#ifdef CONFIG_ARCH_S3C64XX
+extern void s3c_pm_arch_update_uart(void __iomem *regs,
+				    struct pm_uart_save *save);
+#else
+static inline void
+s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save)
+{
+}
+#endif
+
 #else
 #define S3C_PMDBG(fmt...) pr_debug(fmt)
-#define s3c_pm_debug_init() do { } while (0)
 
-static inline void s3c_pm_save_uarts(void) { }
-static inline void s3c_pm_restore_uarts(void) { }
+static inline void s3c_pm_save_uarts(bool is_s3c24xx) { }
+static inline void s3c_pm_restore_uarts(bool is_s3c24xx) { }
 #endif
 
 /* suspend memory checking */
diff --git a/arch/arm/plat-samsung/pm-debug.c b/arch/arm/plat-samsung/pm-debug.c
index b76b1e9ba4ae..482d53753e93 100644
--- a/arch/arm/plat-samsung/pm-debug.c
+++ b/arch/arm/plat-samsung/pm-debug.c
@@ -18,15 +18,6 @@
 #include <plat/cpu.h>
 #include <plat/pm-common.h>
 
-#ifdef CONFIG_SAMSUNG_ATAGS
-#include <plat/pm.h>
-#include <mach/pm-core.h>
-#else
-static inline void s3c_pm_debug_init_uart(void) {}
-static inline void s3c_pm_arch_update_uart(void __iomem *regs,
-					   struct pm_uart_save *save) {}
-#endif
-
 static struct pm_uart_save uart_save;
 
 extern void printascii(const char *);
@@ -43,12 +34,6 @@ void s3c_pm_dbg(const char *fmt, ...)
 	printascii(buff);
 }
 
-void s3c_pm_debug_init(void)
-{
-	/* restart uart clocks so we can use them to output */
-	s3c_pm_debug_init_uart();
-}
-
 static inline void __iomem *s3c_pm_uart_base(void)
 {
 	unsigned long paddr;
@@ -59,7 +44,7 @@ static inline void __iomem *s3c_pm_uart_base(void)
 	return (void __iomem *)vaddr;
 }
 
-void s3c_pm_save_uarts(void)
+void s3c_pm_save_uarts(bool is_s3c2410)
 {
 	void __iomem *regs = s3c_pm_uart_base();
 	struct pm_uart_save *save = &uart_save;
@@ -70,14 +55,14 @@ void s3c_pm_save_uarts(void)
 	save->umcon = __raw_readl(regs + S3C2410_UMCON);
 	save->ubrdiv = __raw_readl(regs + S3C2410_UBRDIV);
 
-	if (!soc_is_s3c2410())
+	if (!is_s3c2410)
 		save->udivslot = __raw_readl(regs + S3C2443_DIVSLOT);
 
 	S3C_PMDBG("UART[%p]: ULCON=%04x, UCON=%04x, UFCON=%04x, UBRDIV=%04x\n",
 		  regs, save->ulcon, save->ucon, save->ufcon, save->ubrdiv);
 }
 
-void s3c_pm_restore_uarts(void)
+void s3c_pm_restore_uarts(bool is_s3c2410)
 {
 	void __iomem *regs = s3c_pm_uart_base();
 	struct pm_uart_save *save = &uart_save;
@@ -90,6 +75,6 @@ void s3c_pm_restore_uarts(void)
 	__raw_writel(save->umcon, regs + S3C2410_UMCON);
 	__raw_writel(save->ubrdiv, regs + S3C2410_UBRDIV);
 
-	if (!soc_is_s3c2410())
+	if (!is_s3c2410)
 		__raw_writel(save->udivslot, regs + S3C2443_DIVSLOT);
 }
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index d6bfd66592b0..03c22a9dee21 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -25,6 +25,7 @@
 
 #include <asm/irq.h>
 
+#include <plat/cpu.h>
 #include <plat/pm.h>
 #include <mach/pm-core.h>
 
@@ -70,8 +71,7 @@ static int s3c_pm_enter(suspend_state_t state)
 {
 	int ret;
 	/* ensure the debug is initialised (if enabled) */
-
-	s3c_pm_debug_init();
+	s3c_pm_debug_init_uart();
 
 	S3C_PMDBG("%s(%d)\n", __func__, state);
 
@@ -100,7 +100,7 @@ static int s3c_pm_enter(suspend_state_t state)
 		samsung_pm_saved_gpios();
 	}
 
-	s3c_pm_save_uarts();
+	s3c_pm_save_uarts(soc_is_s3c2410());
 	s3c_pm_save_core();
 
 	/* set the irq configuration for wake */
@@ -137,14 +137,14 @@ static int s3c_pm_enter(suspend_state_t state)
 	/* restore the system state */
 
 	s3c_pm_restore_core();
-	s3c_pm_restore_uarts();
+	s3c_pm_restore_uarts(soc_is_s3c2410());
 
 	if (!of_have_populated_dt()) {
 		samsung_pm_restore_gpios();
 		s3c_pm_restored_gpios();
 	}
 
-	s3c_pm_debug_init();
+	s3c_pm_debug_init_uart();
 
 	/* check what irq (if any) restored the system */
 
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 05/36] ARM: samsung: make pm-debug platform independent
  2019-10-10 20:29   ` [PATCH 05/36] ARM: samsung: make pm-debug platform independent Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 10:27     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Kyungmin Park
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Tomasz Figa, linux-kernel

The pm-debug code is one of the few things shared between s3c24xx/s3c64xx
and the newer s5pv210. In order to make s5pv210 independent of plat-samsung,
change the common bits of this code to no longer reference the s3c specific
bits.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/include/mach/pm-core.h  |  7 +--
 arch/arm/mach-s3c64xx/include/mach/pm-core.h  | 44 +---------------
 arch/arm/mach-s3c64xx/pm.c                    | 50 +++++++++++++++++++
 arch/arm/mach-s5pv210/pm.c                    |  6 +--
 .../arm/plat-samsung/include/plat/pm-common.h | 29 +++++------
 arch/arm/plat-samsung/pm-debug.c              | 23 ++-------
 arch/arm/plat-samsung/pm.c                    | 10 ++--
 7 files changed, 80 insertions(+), 89 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/include/mach/pm-core.h b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
index 5e4ce89d0158..8f87606c4cdc 100644
--- a/arch/arm/mach-s3c24xx/include/mach/pm-core.h
+++ b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
@@ -15,6 +15,7 @@
 
 static inline void s3c_pm_debug_init_uart(void)
 {
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
 	unsigned long tmp = __raw_readl(S3C2410_CLKCON);
 
 	/* re-start uart clocks */
@@ -24,6 +25,7 @@ static inline void s3c_pm_debug_init_uart(void)
 
 	__raw_writel(tmp, S3C2410_CLKCON);
 	udelay(10);
+#endif
 }
 
 static inline void s3c_pm_arch_prepare_irqs(void)
@@ -75,11 +77,6 @@ static inline void s3c_pm_arch_show_resume_irqs(void)
 				s3c_irqwake_eintmask);
 }
 
-static inline void s3c_pm_arch_update_uart(void __iomem *regs,
-					   struct pm_uart_save *save)
-{
-}
-
 static inline void s3c_pm_restored_gpios(void) { }
 static inline void samsung_pm_saved_gpios(void) { }
 
diff --git a/arch/arm/mach-s3c64xx/include/mach/pm-core.h b/arch/arm/mach-s3c64xx/include/mach/pm-core.h
index bbf79ed28583..33cf242734a0 100644
--- a/arch/arm/mach-s3c64xx/include/mach/pm-core.h
+++ b/arch/arm/mach-s3c64xx/include/mach/pm-core.h
@@ -20,6 +20,7 @@
 
 static inline void s3c_pm_debug_init_uart(void)
 {
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
 	u32 tmp = __raw_readl(S3C_PCLK_GATE);
 
 	/* As a note, since the S3C64XX UARTs generally have multiple
@@ -35,6 +36,7 @@ static inline void s3c_pm_debug_init_uart(void)
 
 	__raw_writel(tmp, S3C_PCLK_GATE);
 	udelay(10);
+#endif
 }
 
 static inline void s3c_pm_arch_prepare_irqs(void)
@@ -63,48 +65,6 @@ static inline void s3c_pm_arch_show_resume_irqs(void)
 #define s3c_irqwake_intallow  0
 #endif
 
-static inline void s3c_pm_arch_update_uart(void __iomem *regs,
-					   struct pm_uart_save *save)
-{
-	u32 ucon = __raw_readl(regs + S3C2410_UCON);
-	u32 ucon_clk = ucon & S3C6400_UCON_CLKMASK;
-	u32 save_clk = save->ucon & S3C6400_UCON_CLKMASK;
-	u32 new_ucon;
-	u32 delta;
-
-	/* S3C64XX UART blocks only support level interrupts, so ensure that
-	 * when we restore unused UART blocks we force the level interrupt
-	 * settigs. */
-	save->ucon |= S3C2410_UCON_TXILEVEL | S3C2410_UCON_RXILEVEL;
-
-	/* We have a constraint on changing the clock type of the UART
-	 * between UCLKx and PCLK, so ensure that when we restore UCON
-	 * that the CLK field is correctly modified if the bootloader
-	 * has changed anything.
-	 */
-	if (ucon_clk != save_clk) {
-		new_ucon = save->ucon;
-		delta = ucon_clk ^ save_clk;
-
-		/* change from UCLKx => wrong PCLK,
-		 * either UCLK can be tested for by a bit-test
-		 * with UCLK0 */
-		if (ucon_clk & S3C6400_UCON_UCLK0 &&
-		    !(save_clk & S3C6400_UCON_UCLK0) &&
-		    delta & S3C6400_UCON_PCLK2) {
-			new_ucon &= ~S3C6400_UCON_UCLK0;
-		} else if (delta == S3C6400_UCON_PCLK2) {
-			/* as an precaution, don't change from
-			 * PCLK2 => PCLK or vice-versa */
-			new_ucon ^= S3C6400_UCON_PCLK2;
-		}
-
-		S3C_PMDBG("ucon change %04x => %04x (save=%04x)\n",
-			  ucon, new_ucon, save->ucon);
-		save->ucon = new_ucon;
-	}
-}
-
 static inline void s3c_pm_restored_gpios(void)
 {
 	/* ensure sleep mode has been cleared from the system */
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c
index fd6dbb263ed5..a612e9779057 100644
--- a/arch/arm/mach-s3c64xx/pm.c
+++ b/arch/arm/mach-s3c64xx/pm.c
@@ -305,6 +305,56 @@ static void s3c64xx_pm_prepare(void)
 	__raw_writel(__raw_readl(S3C64XX_WAKEUP_STAT), S3C64XX_WAKEUP_STAT);
 }
 
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
+void s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save)
+{
+	u32 ucon;
+	u32 ucon_clk
+	u32 save_clk;
+	u32 new_ucon;
+	u32 delta;
+
+	if (!soc_is_s3c64xx())
+		return;
+
+	ucon = __raw_readl(regs + S3C2410_UCON);
+	ucon_clk = ucon & S3C6400_UCON_CLKMASK;
+	sav_clk = save->ucon & S3C6400_UCON_CLKMASK;
+
+	/* S3C64XX UART blocks only support level interrupts, so ensure that
+	 * when we restore unused UART blocks we force the level interrupt
+	 * settigs. */
+	save->ucon |= S3C2410_UCON_TXILEVEL | S3C2410_UCON_RXILEVEL;
+
+	/* We have a constraint on changing the clock type of the UART
+	 * between UCLKx and PCLK, so ensure that when we restore UCON
+	 * that the CLK field is correctly modified if the bootloader
+	 * has changed anything.
+	 */
+	if (ucon_clk != save_clk) {
+		new_ucon = save->ucon;
+		delta = ucon_clk ^ save_clk;
+
+		/* change from UCLKx => wrong PCLK,
+		 * either UCLK can be tested for by a bit-test
+		 * with UCLK0 */
+		if (ucon_clk & S3C6400_UCON_UCLK0 &&
+		    !(save_clk & S3C6400_UCON_UCLK0) &&
+		    delta & S3C6400_UCON_PCLK2) {
+			new_ucon &= ~S3C6400_UCON_UCLK0;
+		} else if (delta == S3C6400_UCON_PCLK2) {
+			/* as an precaution, don't change from
+			 * PCLK2 => PCLK or vice-versa */
+			new_ucon ^= S3C6400_UCON_PCLK2;
+		}
+
+		S3C_PMDBG("ucon change %04x => %04x (save=%04x)\n",
+			  ucon, new_ucon, save->ucon);
+		save->ucon = new_ucon;
+	}
+}
+#endif
+
 int __init s3c64xx_pm_init(void)
 {
 	int i;
diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c
index b336df0c57f3..efdb5a27c060 100644
--- a/arch/arm/mach-s5pv210/pm.c
+++ b/arch/arm/mach-s5pv210/pm.c
@@ -99,8 +99,6 @@ static int s5pv210_suspend_enter(suspend_state_t state)
 	u32 eint_wakeup_mask = s5pv210_read_eint_wakeup_mask();
 	int ret;
 
-	s3c_pm_debug_init();
-
 	S3C_PMDBG("%s: suspending the system...\n", __func__);
 
 	S3C_PMDBG("%s: wakeup masks: %08x,%08x\n", __func__,
@@ -113,7 +111,7 @@ static int s5pv210_suspend_enter(suspend_state_t state)
 		return -EINVAL;
 	}
 
-	s3c_pm_save_uarts();
+	s3c_pm_save_uarts(false);
 	s5pv210_pm_prepare();
 	flush_cache_all();
 	s3c_pm_check_store();
@@ -122,7 +120,7 @@ static int s5pv210_suspend_enter(suspend_state_t state)
 	if (ret)
 		return ret;
 
-	s3c_pm_restore_uarts();
+	s3c_pm_restore_uarts(false);
 
 	S3C_PMDBG("%s: wakeup stat: %08x\n", __func__,
 			__raw_readl(S5P_WAKEUP_STAT));
diff --git a/arch/arm/plat-samsung/include/plat/pm-common.h b/arch/arm/plat-samsung/include/plat/pm-common.h
index 1268bae04234..87fa97fd6e8b 100644
--- a/arch/arm/plat-samsung/include/plat/pm-common.h
+++ b/arch/arm/plat-samsung/include/plat/pm-common.h
@@ -69,25 +69,26 @@ struct pm_uart_save {
  */
 extern void s3c_pm_dbg(const char *msg, ...);
 
-/**
- * s3c_pm_debug_init() - suspend/resume low level debug initialization.
- * @base: Virtual base of UART to use for suspend/resume debugging.
- *
- * This function needs to be called before S3C_PMDBG() can be used, to set up
- * UART port base address and configuration.
- */
-extern void s3c_pm_debug_init(void);
-
 #define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt)
 
-extern void s3c_pm_save_uarts(void);
-extern void s3c_pm_restore_uarts(void);
+extern void s3c_pm_save_uarts(bool is_s3c24xx);
+extern void s3c_pm_restore_uarts(bool is_s3c24xx);
+
+#ifdef CONFIG_ARCH_S3C64XX
+extern void s3c_pm_arch_update_uart(void __iomem *regs,
+				    struct pm_uart_save *save);
+#else
+static inline void
+s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save)
+{
+}
+#endif
+
 #else
 #define S3C_PMDBG(fmt...) pr_debug(fmt)
-#define s3c_pm_debug_init() do { } while (0)
 
-static inline void s3c_pm_save_uarts(void) { }
-static inline void s3c_pm_restore_uarts(void) { }
+static inline void s3c_pm_save_uarts(bool is_s3c24xx) { }
+static inline void s3c_pm_restore_uarts(bool is_s3c24xx) { }
 #endif
 
 /* suspend memory checking */
diff --git a/arch/arm/plat-samsung/pm-debug.c b/arch/arm/plat-samsung/pm-debug.c
index b76b1e9ba4ae..482d53753e93 100644
--- a/arch/arm/plat-samsung/pm-debug.c
+++ b/arch/arm/plat-samsung/pm-debug.c
@@ -18,15 +18,6 @@
 #include <plat/cpu.h>
 #include <plat/pm-common.h>
 
-#ifdef CONFIG_SAMSUNG_ATAGS
-#include <plat/pm.h>
-#include <mach/pm-core.h>
-#else
-static inline void s3c_pm_debug_init_uart(void) {}
-static inline void s3c_pm_arch_update_uart(void __iomem *regs,
-					   struct pm_uart_save *save) {}
-#endif
-
 static struct pm_uart_save uart_save;
 
 extern void printascii(const char *);
@@ -43,12 +34,6 @@ void s3c_pm_dbg(const char *fmt, ...)
 	printascii(buff);
 }
 
-void s3c_pm_debug_init(void)
-{
-	/* restart uart clocks so we can use them to output */
-	s3c_pm_debug_init_uart();
-}
-
 static inline void __iomem *s3c_pm_uart_base(void)
 {
 	unsigned long paddr;
@@ -59,7 +44,7 @@ static inline void __iomem *s3c_pm_uart_base(void)
 	return (void __iomem *)vaddr;
 }
 
-void s3c_pm_save_uarts(void)
+void s3c_pm_save_uarts(bool is_s3c2410)
 {
 	void __iomem *regs = s3c_pm_uart_base();
 	struct pm_uart_save *save = &uart_save;
@@ -70,14 +55,14 @@ void s3c_pm_save_uarts(void)
 	save->umcon = __raw_readl(regs + S3C2410_UMCON);
 	save->ubrdiv = __raw_readl(regs + S3C2410_UBRDIV);
 
-	if (!soc_is_s3c2410())
+	if (!is_s3c2410)
 		save->udivslot = __raw_readl(regs + S3C2443_DIVSLOT);
 
 	S3C_PMDBG("UART[%p]: ULCON=%04x, UCON=%04x, UFCON=%04x, UBRDIV=%04x\n",
 		  regs, save->ulcon, save->ucon, save->ufcon, save->ubrdiv);
 }
 
-void s3c_pm_restore_uarts(void)
+void s3c_pm_restore_uarts(bool is_s3c2410)
 {
 	void __iomem *regs = s3c_pm_uart_base();
 	struct pm_uart_save *save = &uart_save;
@@ -90,6 +75,6 @@ void s3c_pm_restore_uarts(void)
 	__raw_writel(save->umcon, regs + S3C2410_UMCON);
 	__raw_writel(save->ubrdiv, regs + S3C2410_UBRDIV);
 
-	if (!soc_is_s3c2410())
+	if (!is_s3c2410)
 		__raw_writel(save->udivslot, regs + S3C2443_DIVSLOT);
 }
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index d6bfd66592b0..03c22a9dee21 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -25,6 +25,7 @@
 
 #include <asm/irq.h>
 
+#include <plat/cpu.h>
 #include <plat/pm.h>
 #include <mach/pm-core.h>
 
@@ -70,8 +71,7 @@ static int s3c_pm_enter(suspend_state_t state)
 {
 	int ret;
 	/* ensure the debug is initialised (if enabled) */
-
-	s3c_pm_debug_init();
+	s3c_pm_debug_init_uart();
 
 	S3C_PMDBG("%s(%d)\n", __func__, state);
 
@@ -100,7 +100,7 @@ static int s3c_pm_enter(suspend_state_t state)
 		samsung_pm_saved_gpios();
 	}
 
-	s3c_pm_save_uarts();
+	s3c_pm_save_uarts(soc_is_s3c2410());
 	s3c_pm_save_core();
 
 	/* set the irq configuration for wake */
@@ -137,14 +137,14 @@ static int s3c_pm_enter(suspend_state_t state)
 	/* restore the system state */
 
 	s3c_pm_restore_core();
-	s3c_pm_restore_uarts();
+	s3c_pm_restore_uarts(soc_is_s3c2410());
 
 	if (!of_have_populated_dt()) {
 		samsung_pm_restore_gpios();
 		s3c_pm_restored_gpios();
 	}
 
-	s3c_pm_debug_init();
+	s3c_pm_debug_init_uart();
 
 	/* check what irq (if any) restored the system */
 
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 06/36] ARM: samsung: move CONFIG_DEBUG_S3C_UART to Kconfig.debug
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (4 preceding siblings ...)
  2019-10-10 20:29   ` [PATCH 05/36] ARM: samsung: make pm-debug platform independent Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 10:12     ` Krzysztof Kozlowski
  2019-10-10 20:29   ` [PATCH 07/36] ARM: exynos: use private samsung_cpu_id copy Arnd Bergmann
                     ` (28 subsequent siblings)
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
	linus.walleij, linux-kernel, Olof Johansson, Sascha Hauer,
	linux-arm-kernel

Before we can plat-samsung from the individual platforms,
this one has to get moved to a place where it remains
accessible.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig.debug        | 10 ++++++++++
 arch/arm/plat-samsung/Kconfig |  8 --------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 8bcbd0cd739b..d05b836dfeb2 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1464,6 +1464,16 @@ config DEBUG_S3C64XX_UART
 config DEBUG_S5PV210_UART
 	bool
 
+config DEBUG_S3C_UART
+	depends on DEBUG_S3C2410_UART || DEBUG_S3C24XX_UART || \
+		   DEBUG_S3C64XX_UART ||  DEBUG_S5PV210_UART || \
+		   DEBUG_EXYNOS_UART
+	int
+	default "0" if DEBUG_S3C_UART0
+	default "1" if DEBUG_S3C_UART1
+	default "2" if DEBUG_S3C_UART2
+	default "3" if DEBUG_S3C_UART3
+
 config DEBUG_OMAP2PLUS_UART
 	bool
 	depends on ARCH_OMAP2PLUS
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 301e572651c0..832ab0e6cd72 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -296,13 +296,5 @@ config SAMSUNG_WDT_RESET
 	  Compile support for system restart by triggering watchdog reset.
 	  Used on SoCs that do not provide dedicated reset control.
 
-config DEBUG_S3C_UART
-	depends on PLAT_SAMSUNG
-	int
-	default "0" if DEBUG_S3C_UART0
-	default "1" if DEBUG_S3C_UART1
-	default "2" if DEBUG_S3C_UART2
-	default "3" if DEBUG_S3C_UART3
-
 endmenu
 endif
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 06/36] ARM: samsung: move CONFIG_DEBUG_S3C_UART to Kconfig.debug
  2019-10-10 20:29   ` [PATCH 06/36] ARM: samsung: move CONFIG_DEBUG_S3C_UART to Kconfig.debug Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 10:12     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Olof Johansson, Sascha Hauer,
	Bartlomiej Zolnierkiewicz, linux-kernel

Before we can plat-samsung from the individual platforms,
this one has to get moved to a place where it remains
accessible.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig.debug        | 10 ++++++++++
 arch/arm/plat-samsung/Kconfig |  8 --------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 8bcbd0cd739b..d05b836dfeb2 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1464,6 +1464,16 @@ config DEBUG_S3C64XX_UART
 config DEBUG_S5PV210_UART
 	bool
 
+config DEBUG_S3C_UART
+	depends on DEBUG_S3C2410_UART || DEBUG_S3C24XX_UART || \
+		   DEBUG_S3C64XX_UART ||  DEBUG_S5PV210_UART || \
+		   DEBUG_EXYNOS_UART
+	int
+	default "0" if DEBUG_S3C_UART0
+	default "1" if DEBUG_S3C_UART1
+	default "2" if DEBUG_S3C_UART2
+	default "3" if DEBUG_S3C_UART3
+
 config DEBUG_OMAP2PLUS_UART
 	bool
 	depends on ARCH_OMAP2PLUS
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 301e572651c0..832ab0e6cd72 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -296,13 +296,5 @@ config SAMSUNG_WDT_RESET
 	  Compile support for system restart by triggering watchdog reset.
 	  Used on SoCs that do not provide dedicated reset control.
 
-config DEBUG_S3C_UART
-	depends on PLAT_SAMSUNG
-	int
-	default "0" if DEBUG_S3C_UART0
-	default "1" if DEBUG_S3C_UART1
-	default "2" if DEBUG_S3C_UART2
-	default "3" if DEBUG_S3C_UART3
-
 endmenu
 endif
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 07/36] ARM: exynos: use private samsung_cpu_id copy
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (5 preceding siblings ...)
  2019-10-10 20:29   ` [PATCH 06/36] ARM: samsung: move CONFIG_DEBUG_S3C_UART to Kconfig.debug Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 10:54     ` Krzysztof Kozlowski
  2019-10-10 20:29   ` [PATCH 08/36] ARM: exynos: stop selecting PLAT_SAMSUNG Arnd Bergmann
                     ` (27 subsequent siblings)
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Daniel Lezcano
  Cc: linux-samsung-soc, Arnd Bergmann, linux-pm, Pankaj Dubey,
	linus.walleij, Tomasz Figa, linux-kernel, linux-arm-kernel,
	Marek Szyprowski

The only part of plat-samsung that is shared with arch-exynos
is the CPU identification code.

Having a separate exynos_cpu_id variable makes the two completely
independent and is actually a bit less code in total.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-exynos/common.h                |  6 +++---
 arch/arm/mach-exynos/exynos.c                | 19 +++++++++++++++----
 arch/arm/mach-exynos/include/mach/map.h      | 18 ------------------
 arch/arm/mach-exynos/platsmp.c               |  4 +---
 arch/arm/mach-exynos/pm.c                    |  8 ++++----
 arch/arm/plat-samsung/cpu.c                  | 17 -----------------
 arch/arm/plat-samsung/include/plat/cpu.h     |  2 --
 arch/arm/plat-samsung/include/plat/map-s5p.h |  2 --
 8 files changed, 23 insertions(+), 53 deletions(-)
 delete mode 100644 arch/arm/mach-exynos/include/mach/map.h

diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 56411bb63d45..adf7db9c0885 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -24,12 +24,12 @@
 #define EXYNOS5800_SOC_ID	0xE5422000
 #define EXYNOS5_SOC_MASK	0xFFFFF000
 
-extern unsigned long samsung_cpu_id;
+extern unsigned long exynos_cpu_id;
 
 #define IS_SAMSUNG_CPU(name, id, mask)		\
 static inline int is_samsung_##name(void)	\
 {						\
-	return ((samsung_cpu_id & mask) == (id & mask));	\
+	return ((exynos_cpu_id & mask) == (id & mask));	\
 }
 
 IS_SAMSUNG_CPU(exynos3250, EXYNOS3250_SOC_ID, EXYNOS3_SOC_MASK)
@@ -147,7 +147,7 @@ extern struct cpuidle_exynos_data cpuidle_coupled_exynos_data;
 
 extern void exynos_set_delayed_reset_assertion(bool enable);
 
-extern unsigned int samsung_rev(void);
+extern unsigned int exynos_rev(void);
 extern void exynos_core_restart(u32 core_id);
 extern int exynos_set_boot_addr(u32 core_id, unsigned long boot_addr);
 extern int exynos_get_boot_addr(u32 core_id, unsigned long *boot_addr);
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 9aa483366ebc..da9300d655c6 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -19,11 +19,10 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-#include <plat/cpu.h>
-
 #include "common.h"
 
+#define S5P_VA_CHIPID	((void __iomem __force *)0xF8000000)
+
 static struct platform_device exynos_cpuidle = {
 	.name              = "exynos_cpuidle",
 #ifdef CONFIG_ARM_EXYNOS_CPUIDLE
@@ -36,6 +35,14 @@ void __iomem *sysram_base_addr __ro_after_init;
 phys_addr_t sysram_base_phys __ro_after_init;
 void __iomem *sysram_ns_base_addr __ro_after_init;
 
+unsigned long exynos_cpu_id;
+static unsigned int exynos_cpu_rev;
+
+unsigned int exynos_rev(void)
+{
+	return exynos_cpu_rev;
+}
+
 void __init exynos_sysram_init(void)
 {
 	struct device_node *node;
@@ -86,7 +93,11 @@ static void __init exynos_init_io(void)
 	of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
 
 	/* detect cpu id and rev. */
-	s5p_init_cpu(S5P_VA_CHIPID);
+	exynos_cpu_id = readl_relaxed(S5P_VA_CHIPID);
+	exynos_cpu_rev = exynos_cpu_id & 0xFF;
+
+	pr_info("Samsung CPU ID: 0x%08lx\n", exynos_cpu_id);
+
 }
 
 /*
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
deleted file mode 100644
index 22ebe3654633..000000000000
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
- *		http://www.samsung.com/
- *
- * EXYNOS - Memory map definitions
- */
-
-#ifndef __ASM_ARCH_MAP_H
-#define __ASM_ARCH_MAP_H __FILE__
-
-#include <plat/map-base.h>
-
-#include <plat/map-s5p.h>
-
-#define EXYNOS_PA_CHIPID		0x10000000
-
-#endif /* __ASM_ARCH_MAP_H */
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 0cbbae8bf1f8..d7fedbb2eefe 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -22,8 +22,6 @@
 #include <asm/smp_scu.h>
 #include <asm/firmware.h>
 
-#include <mach/map.h>
-
 #include "common.h"
 
 extern void exynos4_secondary_startup(void);
@@ -188,7 +186,7 @@ void exynos_scu_enable(void)
 
 static void __iomem *cpu_boot_reg_base(void)
 {
-	if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1)
+	if (soc_is_exynos4210() && exynos_rev() == EXYNOS4210_REV_1_1)
 		return pmu_base_addr + S5P_INFORM5;
 	return sysram_base_addr;
 }
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index 48e7fb38613e..624585641a9c 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -26,18 +26,18 @@
 
 static inline void __iomem *exynos_boot_vector_addr(void)
 {
-	if (samsung_rev() == EXYNOS4210_REV_1_1)
+	if (exynos_rev() == EXYNOS4210_REV_1_1)
 		return pmu_base_addr + S5P_INFORM7;
-	else if (samsung_rev() == EXYNOS4210_REV_1_0)
+	else if (exynos_rev() == EXYNOS4210_REV_1_0)
 		return sysram_base_addr + 0x24;
 	return pmu_base_addr + S5P_INFORM0;
 }
 
 static inline void __iomem *exynos_boot_vector_flag(void)
 {
-	if (samsung_rev() == EXYNOS4210_REV_1_1)
+	if (exynos_rev() == EXYNOS4210_REV_1_1)
 		return pmu_base_addr + S5P_INFORM6;
-	else if (samsung_rev() == EXYNOS4210_REV_1_0)
+	else if (exynos_rev() == EXYNOS4210_REV_1_0)
 		return sysram_base_addr + 0x20;
 	return pmu_base_addr + S5P_INFORM1;
 }
diff --git a/arch/arm/plat-samsung/cpu.c b/arch/arm/plat-samsung/cpu.c
index e1ba88ba31d8..8acba21bbf4b 100644
--- a/arch/arm/plat-samsung/cpu.c
+++ b/arch/arm/plat-samsung/cpu.c
@@ -14,13 +14,6 @@
 #include <plat/cpu.h>
 
 unsigned long samsung_cpu_id;
-static unsigned int samsung_cpu_rev;
-
-unsigned int samsung_rev(void)
-{
-	return samsung_cpu_rev;
-}
-EXPORT_SYMBOL(samsung_rev);
 
 void __init s3c64xx_init_cpu(void)
 {
@@ -34,15 +27,5 @@ void __init s3c64xx_init_cpu(void)
 		samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0xA1C);
 	}
 
-	samsung_cpu_rev = 0;
-
-	pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id);
-}
-
-void __init s5p_init_cpu(const void __iomem *cpuid_addr)
-{
-	samsung_cpu_id = readl_relaxed(cpuid_addr);
-	samsung_cpu_rev = samsung_cpu_id & 0xFF;
-
 	pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id);
 }
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index fadcddbea064..02d7f991d5a3 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -111,8 +111,6 @@ extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
 extern void s3c64xx_init_cpu(void);
 extern void s5p_init_cpu(const void __iomem *cpuid_addr);
 
-extern unsigned int samsung_rev(void);
-
 extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 
 extern void s3c24xx_init_clocks(int xtal);
diff --git a/arch/arm/plat-samsung/include/plat/map-s5p.h b/arch/arm/plat-samsung/include/plat/map-s5p.h
index d69a0ca09fb5..3812085f8761 100644
--- a/arch/arm/plat-samsung/include/plat/map-s5p.h
+++ b/arch/arm/plat-samsung/include/plat/map-s5p.h
@@ -9,8 +9,6 @@
 #ifndef __ASM_PLAT_MAP_S5P_H
 #define __ASM_PLAT_MAP_S5P_H __FILE__
 
-#define S5P_VA_CHIPID		S3C_ADDR(0x02000000)
-
 #define VA_VIC(x)		(S3C_VA_IRQ + ((x) * 0x10000))
 #define VA_VIC0			VA_VIC(0)
 #define VA_VIC1			VA_VIC(1)
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 07/36] ARM: exynos: use private samsung_cpu_id copy
  2019-10-10 20:29   ` [PATCH 07/36] ARM: exynos: use private samsung_cpu_id copy Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 10:54     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Daniel Lezcano
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Tomasz Figa, Marek Szyprowski, Pankaj Dubey,
	linux-kernel, linux-pm

The only part of plat-samsung that is shared with arch-exynos
is the CPU identification code.

Having a separate exynos_cpu_id variable makes the two completely
independent and is actually a bit less code in total.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-exynos/common.h                |  6 +++---
 arch/arm/mach-exynos/exynos.c                | 19 +++++++++++++++----
 arch/arm/mach-exynos/include/mach/map.h      | 18 ------------------
 arch/arm/mach-exynos/platsmp.c               |  4 +---
 arch/arm/mach-exynos/pm.c                    |  8 ++++----
 arch/arm/plat-samsung/cpu.c                  | 17 -----------------
 arch/arm/plat-samsung/include/plat/cpu.h     |  2 --
 arch/arm/plat-samsung/include/plat/map-s5p.h |  2 --
 8 files changed, 23 insertions(+), 53 deletions(-)
 delete mode 100644 arch/arm/mach-exynos/include/mach/map.h

diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 56411bb63d45..adf7db9c0885 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -24,12 +24,12 @@
 #define EXYNOS5800_SOC_ID	0xE5422000
 #define EXYNOS5_SOC_MASK	0xFFFFF000
 
-extern unsigned long samsung_cpu_id;
+extern unsigned long exynos_cpu_id;
 
 #define IS_SAMSUNG_CPU(name, id, mask)		\
 static inline int is_samsung_##name(void)	\
 {						\
-	return ((samsung_cpu_id & mask) == (id & mask));	\
+	return ((exynos_cpu_id & mask) == (id & mask));	\
 }
 
 IS_SAMSUNG_CPU(exynos3250, EXYNOS3250_SOC_ID, EXYNOS3_SOC_MASK)
@@ -147,7 +147,7 @@ extern struct cpuidle_exynos_data cpuidle_coupled_exynos_data;
 
 extern void exynos_set_delayed_reset_assertion(bool enable);
 
-extern unsigned int samsung_rev(void);
+extern unsigned int exynos_rev(void);
 extern void exynos_core_restart(u32 core_id);
 extern int exynos_set_boot_addr(u32 core_id, unsigned long boot_addr);
 extern int exynos_get_boot_addr(u32 core_id, unsigned long *boot_addr);
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 9aa483366ebc..da9300d655c6 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -19,11 +19,10 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-#include <plat/cpu.h>
-
 #include "common.h"
 
+#define S5P_VA_CHIPID	((void __iomem __force *)0xF8000000)
+
 static struct platform_device exynos_cpuidle = {
 	.name              = "exynos_cpuidle",
 #ifdef CONFIG_ARM_EXYNOS_CPUIDLE
@@ -36,6 +35,14 @@ void __iomem *sysram_base_addr __ro_after_init;
 phys_addr_t sysram_base_phys __ro_after_init;
 void __iomem *sysram_ns_base_addr __ro_after_init;
 
+unsigned long exynos_cpu_id;
+static unsigned int exynos_cpu_rev;
+
+unsigned int exynos_rev(void)
+{
+	return exynos_cpu_rev;
+}
+
 void __init exynos_sysram_init(void)
 {
 	struct device_node *node;
@@ -86,7 +93,11 @@ static void __init exynos_init_io(void)
 	of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
 
 	/* detect cpu id and rev. */
-	s5p_init_cpu(S5P_VA_CHIPID);
+	exynos_cpu_id = readl_relaxed(S5P_VA_CHIPID);
+	exynos_cpu_rev = exynos_cpu_id & 0xFF;
+
+	pr_info("Samsung CPU ID: 0x%08lx\n", exynos_cpu_id);
+
 }
 
 /*
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
deleted file mode 100644
index 22ebe3654633..000000000000
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
- *		http://www.samsung.com/
- *
- * EXYNOS - Memory map definitions
- */
-
-#ifndef __ASM_ARCH_MAP_H
-#define __ASM_ARCH_MAP_H __FILE__
-
-#include <plat/map-base.h>
-
-#include <plat/map-s5p.h>
-
-#define EXYNOS_PA_CHIPID		0x10000000
-
-#endif /* __ASM_ARCH_MAP_H */
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 0cbbae8bf1f8..d7fedbb2eefe 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -22,8 +22,6 @@
 #include <asm/smp_scu.h>
 #include <asm/firmware.h>
 
-#include <mach/map.h>
-
 #include "common.h"
 
 extern void exynos4_secondary_startup(void);
@@ -188,7 +186,7 @@ void exynos_scu_enable(void)
 
 static void __iomem *cpu_boot_reg_base(void)
 {
-	if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1)
+	if (soc_is_exynos4210() && exynos_rev() == EXYNOS4210_REV_1_1)
 		return pmu_base_addr + S5P_INFORM5;
 	return sysram_base_addr;
 }
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index 48e7fb38613e..624585641a9c 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -26,18 +26,18 @@
 
 static inline void __iomem *exynos_boot_vector_addr(void)
 {
-	if (samsung_rev() == EXYNOS4210_REV_1_1)
+	if (exynos_rev() == EXYNOS4210_REV_1_1)
 		return pmu_base_addr + S5P_INFORM7;
-	else if (samsung_rev() == EXYNOS4210_REV_1_0)
+	else if (exynos_rev() == EXYNOS4210_REV_1_0)
 		return sysram_base_addr + 0x24;
 	return pmu_base_addr + S5P_INFORM0;
 }
 
 static inline void __iomem *exynos_boot_vector_flag(void)
 {
-	if (samsung_rev() == EXYNOS4210_REV_1_1)
+	if (exynos_rev() == EXYNOS4210_REV_1_1)
 		return pmu_base_addr + S5P_INFORM6;
-	else if (samsung_rev() == EXYNOS4210_REV_1_0)
+	else if (exynos_rev() == EXYNOS4210_REV_1_0)
 		return sysram_base_addr + 0x20;
 	return pmu_base_addr + S5P_INFORM1;
 }
diff --git a/arch/arm/plat-samsung/cpu.c b/arch/arm/plat-samsung/cpu.c
index e1ba88ba31d8..8acba21bbf4b 100644
--- a/arch/arm/plat-samsung/cpu.c
+++ b/arch/arm/plat-samsung/cpu.c
@@ -14,13 +14,6 @@
 #include <plat/cpu.h>
 
 unsigned long samsung_cpu_id;
-static unsigned int samsung_cpu_rev;
-
-unsigned int samsung_rev(void)
-{
-	return samsung_cpu_rev;
-}
-EXPORT_SYMBOL(samsung_rev);
 
 void __init s3c64xx_init_cpu(void)
 {
@@ -34,15 +27,5 @@ void __init s3c64xx_init_cpu(void)
 		samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0xA1C);
 	}
 
-	samsung_cpu_rev = 0;
-
-	pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id);
-}
-
-void __init s5p_init_cpu(const void __iomem *cpuid_addr)
-{
-	samsung_cpu_id = readl_relaxed(cpuid_addr);
-	samsung_cpu_rev = samsung_cpu_id & 0xFF;
-
 	pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id);
 }
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index fadcddbea064..02d7f991d5a3 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -111,8 +111,6 @@ extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
 extern void s3c64xx_init_cpu(void);
 extern void s5p_init_cpu(const void __iomem *cpuid_addr);
 
-extern unsigned int samsung_rev(void);
-
 extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 
 extern void s3c24xx_init_clocks(int xtal);
diff --git a/arch/arm/plat-samsung/include/plat/map-s5p.h b/arch/arm/plat-samsung/include/plat/map-s5p.h
index d69a0ca09fb5..3812085f8761 100644
--- a/arch/arm/plat-samsung/include/plat/map-s5p.h
+++ b/arch/arm/plat-samsung/include/plat/map-s5p.h
@@ -9,8 +9,6 @@
 #ifndef __ASM_PLAT_MAP_S5P_H
 #define __ASM_PLAT_MAP_S5P_H __FILE__
 
-#define S5P_VA_CHIPID		S3C_ADDR(0x02000000)
-
 #define VA_VIC(x)		(S3C_VA_IRQ + ((x) * 0x10000))
 #define VA_VIC0			VA_VIC(0)
 #define VA_VIC1			VA_VIC(1)
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 08/36] ARM: exynos: stop selecting PLAT_SAMSUNG
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (6 preceding siblings ...)
  2019-10-10 20:29   ` [PATCH 07/36] ARM: exynos: use private samsung_cpu_id copy Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
                       ` (2 more replies)
  2019-10-10 20:29   ` [PATCH 09/36] ARM: samsung: move pm check code to drivers/soc Arnd Bergmann
                     ` (26 subsequent siblings)
  34 siblings, 3 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Ulf Hansson
  Cc: linux-samsung-soc, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
	linus.walleij, linux-mmc, linux-kernel, Olof Johansson,
	Enrico Weigelt, metux IT consult, Sascha Hauer, linux-arm-kernel

Now that no code in arch/arm is shared between mach-exynos and the
others, make the split formal.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig.debug        | 8 ++++----
 arch/arm/Makefile             | 1 -
 arch/arm/mach-exynos/Makefile | 4 ----
 arch/arm/plat-samsung/Kconfig | 4 ++--
 drivers/mmc/host/Kconfig      | 2 +-
 5 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index d05b836dfeb2..9c4f2d6deb06 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -998,7 +998,7 @@ choice
 		  via SCIFA4 on Renesas SH-Mobile AG5 (SH73A0).
 
 	config DEBUG_S3C_UART0
-		depends on PLAT_SAMSUNG
+		depends on PLAT_SAMSUNG || ARCH_EXYNOS
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
@@ -1010,7 +1010,7 @@ choice
 		  by the boot-loader before use.
 
 	config DEBUG_S3C_UART1
-		depends on PLAT_SAMSUNG
+		depends on PLAT_SAMSUNG || ARCH_EXYNOS
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
@@ -1022,7 +1022,7 @@ choice
 		  by the boot-loader before use.
 
 	config DEBUG_S3C_UART2
-		depends on PLAT_SAMSUNG
+		depends on PLAT_SAMSUNG || ARCH_EXYNOS
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
@@ -1034,7 +1034,7 @@ choice
 		  by the boot-loader before use.
 
 	config DEBUG_S3C_UART3
-		depends on PLAT_SAMSUNG && (ARCH_EXYNOS || ARCH_S5PV210)
+		depends on ARCH_EXYNOS || ARCH_S5PV210
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
 		select DEBUG_S5PV210_UART if ARCH_S5PV210
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index db857d07114f..f492d7c338fe 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -233,7 +233,6 @@ machine-$(CONFIG_PLAT_SPEAR)		+= spear
 
 # Platform directory name.  This list is sorted alphanumerically
 # by CONFIG_* macro name.
-plat-$(CONFIG_ARCH_EXYNOS)	+= samsung
 plat-$(CONFIG_ARCH_OMAP)	+= omap
 plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
 plat-$(CONFIG_ARCH_S5PV210)	+= samsung
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 0fd3fcf8bfb0..53fa363c8e44 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -3,10 +3,6 @@
 # Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
 #		http://www.samsung.com/
 
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
-
-# Core
-
 obj-$(CONFIG_ARCH_EXYNOS)	+= exynos.o exynos-smc.o firmware.o
 
 obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm.o sleep.o
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 832ab0e6cd72..e31a156a27df 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -4,7 +4,7 @@
 
 config PLAT_SAMSUNG
 	bool
-	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_EXYNOS || ARCH_S5PV210
+	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
 	default y
 	select GENERIC_IRQ_CHIP
 	select NO_IOPORT_MAP
@@ -240,7 +240,7 @@ config SAMSUNG_PM_DEBUG
 	bool "Samsung PM Suspend debug"
 	depends on PM && DEBUG_KERNEL
 	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
-	depends on DEBUG_EXYNOS_UART || DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
+	depends on DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
 	help
 	  Say Y here if you want verbose debugging from the PM Suspend and
 	  Resume code. See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 49ea02c467bf..400a581c918c 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -275,7 +275,7 @@ config MMC_SDHCI_TEGRA
 
 config MMC_SDHCI_S3C
 	tristate "SDHCI support on Samsung S3C SoC"
-	depends on MMC_SDHCI && PLAT_SAMSUNG
+	depends on MMC_SDHCI && (PLAT_SAMSUNG || ARCH_EXYNOS)
 	help
 	  This selects the Secure Digital Host Controller Interface (SDHCI)
 	  often referrered to as the HSMMC block in some of the Samsung S3C
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 08/36] ARM: exynos: stop selecting PLAT_SAMSUNG
  2019-10-10 20:29   ` [PATCH 08/36] ARM: exynos: stop selecting PLAT_SAMSUNG Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  2019-10-15 14:12     ` Ulf Hansson
  2019-10-23 10:57     ` Krzysztof Kozlowski
  2 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Ulf Hansson
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Olof Johansson, Sascha Hauer,
	Bartlomiej Zolnierkiewicz, Enrico Weigelt, metux IT consult,
	linux-kernel, linux-mmc

Now that no code in arch/arm is shared between mach-exynos and the
others, make the split formal.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig.debug        | 8 ++++----
 arch/arm/Makefile             | 1 -
 arch/arm/mach-exynos/Makefile | 4 ----
 arch/arm/plat-samsung/Kconfig | 4 ++--
 drivers/mmc/host/Kconfig      | 2 +-
 5 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index d05b836dfeb2..9c4f2d6deb06 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -998,7 +998,7 @@ choice
 		  via SCIFA4 on Renesas SH-Mobile AG5 (SH73A0).
 
 	config DEBUG_S3C_UART0
-		depends on PLAT_SAMSUNG
+		depends on PLAT_SAMSUNG || ARCH_EXYNOS
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
@@ -1010,7 +1010,7 @@ choice
 		  by the boot-loader before use.
 
 	config DEBUG_S3C_UART1
-		depends on PLAT_SAMSUNG
+		depends on PLAT_SAMSUNG || ARCH_EXYNOS
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
@@ -1022,7 +1022,7 @@ choice
 		  by the boot-loader before use.
 
 	config DEBUG_S3C_UART2
-		depends on PLAT_SAMSUNG
+		depends on PLAT_SAMSUNG || ARCH_EXYNOS
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
@@ -1034,7 +1034,7 @@ choice
 		  by the boot-loader before use.
 
 	config DEBUG_S3C_UART3
-		depends on PLAT_SAMSUNG && (ARCH_EXYNOS || ARCH_S5PV210)
+		depends on ARCH_EXYNOS || ARCH_S5PV210
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
 		select DEBUG_S5PV210_UART if ARCH_S5PV210
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index db857d07114f..f492d7c338fe 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -233,7 +233,6 @@ machine-$(CONFIG_PLAT_SPEAR)		+= spear
 
 # Platform directory name.  This list is sorted alphanumerically
 # by CONFIG_* macro name.
-plat-$(CONFIG_ARCH_EXYNOS)	+= samsung
 plat-$(CONFIG_ARCH_OMAP)	+= omap
 plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
 plat-$(CONFIG_ARCH_S5PV210)	+= samsung
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 0fd3fcf8bfb0..53fa363c8e44 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -3,10 +3,6 @@
 # Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
 #		http://www.samsung.com/
 
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
-
-# Core
-
 obj-$(CONFIG_ARCH_EXYNOS)	+= exynos.o exynos-smc.o firmware.o
 
 obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm.o sleep.o
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 832ab0e6cd72..e31a156a27df 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -4,7 +4,7 @@
 
 config PLAT_SAMSUNG
 	bool
-	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_EXYNOS || ARCH_S5PV210
+	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
 	default y
 	select GENERIC_IRQ_CHIP
 	select NO_IOPORT_MAP
@@ -240,7 +240,7 @@ config SAMSUNG_PM_DEBUG
 	bool "Samsung PM Suspend debug"
 	depends on PM && DEBUG_KERNEL
 	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
-	depends on DEBUG_EXYNOS_UART || DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
+	depends on DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
 	help
 	  Say Y here if you want verbose debugging from the PM Suspend and
 	  Resume code. See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 49ea02c467bf..400a581c918c 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -275,7 +275,7 @@ config MMC_SDHCI_TEGRA
 
 config MMC_SDHCI_S3C
 	tristate "SDHCI support on Samsung S3C SoC"
-	depends on MMC_SDHCI && PLAT_SAMSUNG
+	depends on MMC_SDHCI && (PLAT_SAMSUNG || ARCH_EXYNOS)
 	help
 	  This selects the Secure Digital Host Controller Interface (SDHCI)
 	  often referrered to as the HSMMC block in some of the Samsung S3C
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 09/36] ARM: samsung: move pm check code to drivers/soc
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (7 preceding siblings ...)
  2019-10-10 20:29   ` [PATCH 08/36] ARM: exynos: stop selecting PLAT_SAMSUNG Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 11:32     ` Krzysztof Kozlowski
  2019-10-10 20:29   ` [PATCH 10/36] ARM: s5pv210: use private pm save/restore Arnd Bergmann
                     ` (25 subsequent siblings)
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Kyungmin Park
  Cc: linux-samsung-soc, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
	Pankaj Dubey, linus.walleij, linux-kernel, Sylwester Nawrocki,
	Mauro Carvalho Chehab, linux-arm-kernel, Marek Szyprowski

This is the only part of plat-samsung that is really
shared between the s3c and s5p ports. Moving it to
drivers/soc/ lets us make them completely independent.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s5pv210/Kconfig                 |  1 +
 arch/arm/plat-samsung/Kconfig                 | 49 +----------
 arch/arm/plat-samsung/Makefile                |  2 -
 .../arm/plat-samsung/include/plat/pm-common.h | 70 +---------------
 drivers/soc/samsung/Kconfig                   | 48 ++++++++++-
 drivers/soc/samsung/Makefile                  |  3 +
 .../soc/samsung/s3c-pm-check.c                |  2 +-
 .../soc/samsung/s3c-pm-debug.c                |  3 +-
 include/linux/soc/samsung/s3c-pm.h            | 84 +++++++++++++++++++
 9 files changed, 139 insertions(+), 123 deletions(-)
 rename arch/arm/plat-samsung/pm-check.c => drivers/soc/samsung/s3c-pm-check.c (99%)
 rename arch/arm/plat-samsung/pm-debug.c => drivers/soc/samsung/s3c-pm-debug.c (97%)
 create mode 100644 include/linux/soc/samsung/s3c-pm.h

diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index 03984a791879..d2b0e64bad7e 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -18,6 +18,7 @@ config ARCH_S5PV210
 	select HAVE_S3C_RTC if RTC_CLASS
 	select PINCTRL
 	select PINCTRL_EXYNOS
+	select SOC_SAMSUNG
 	help
 	  Samsung S5PV210/S5PC110 series based systems
 
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index e31a156a27df..740bdb23f38a 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -8,6 +8,7 @@ config PLAT_SAMSUNG
 	default y
 	select GENERIC_IRQ_CHIP
 	select NO_IOPORT_MAP
+	select SOC_SAMSUNG
 	help
 	  Base platform code for all Samsung SoC based systems
 
@@ -234,54 +235,6 @@ config SAMSUNG_PM_GPIO
 	  pinctrl-samsung driver.
 endif
 
-comment "Power management"
-
-config SAMSUNG_PM_DEBUG
-	bool "Samsung PM Suspend debug"
-	depends on PM && DEBUG_KERNEL
-	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
-	depends on DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
-	help
-	  Say Y here if you want verbose debugging from the PM Suspend and
-	  Resume code. See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
-	  for more information.
-
-config S3C_PM_DEBUG_LED_SMDK
-       bool "SMDK LED suspend/resume debugging"
-       depends on PM && (MACH_SMDK6410)
-       help
-         Say Y here to enable the use of the SMDK LEDs on the baseboard
-	 for debugging of the state of the suspend and resume process.
-
-	 Note, this currently only works for S3C64XX based SMDK boards.
-
-config SAMSUNG_PM_CHECK
-	bool "S3C2410 PM Suspend Memory CRC"
-	depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210)
-	select CRC32
-	help
-	  Enable the PM code's memory area checksum over sleep. This option
-	  will generate CRCs of all blocks of memory, and store them before
-	  going to sleep. The blocks are then checked on resume for any
-	  errors.
-
-	  Note, this can take several seconds depending on memory size
-	  and CPU speed.
-
-	  See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
-
-config SAMSUNG_PM_CHECK_CHUNKSIZE
-	int "S3C2410 PM Suspend CRC Chunksize (KiB)"
-	depends on PM && SAMSUNG_PM_CHECK
-	default 64
-	help
-	  Set the chunksize in Kilobytes of the CRC for checking memory
-	  corruption over suspend and resume. A smaller value will mean that
-	  the CRC data block will take more memory, but will identify any
-	  faults with better precision.
-
-	  See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
-
 config SAMSUNG_WAKEMASK
 	bool
 	depends on PM
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 3db9d2c38258..d88b9b84f3a9 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -28,8 +28,6 @@ obj-$(CONFIG_PM_SLEEP)		+= pm-common.o
 obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm-common.o
 obj-$(CONFIG_SAMSUNG_PM)	+= pm.o
 obj-$(CONFIG_SAMSUNG_PM_GPIO)	+= pm-gpio.o
-obj-$(CONFIG_SAMSUNG_PM_CHECK)	+= pm-check.o
-obj-$(CONFIG_SAMSUNG_PM_DEBUG)	+= pm-debug.o
 
 obj-$(CONFIG_SAMSUNG_WAKEMASK)	+= wakeup-mask.o
 obj-$(CONFIG_SAMSUNG_WDT_RESET)	+= watchdog-reset.o
diff --git a/arch/arm/plat-samsung/include/plat/pm-common.h b/arch/arm/plat-samsung/include/plat/pm-common.h
index 87fa97fd6e8b..18b9607e1e39 100644
--- a/arch/arm/plat-samsung/include/plat/pm-common.h
+++ b/arch/arm/plat-samsung/include/plat/pm-common.h
@@ -11,6 +11,7 @@
 #define __PLAT_SAMSUNG_PM_COMMON_H __FILE__
 
 #include <linux/irq.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 /* sleep save info */
 
@@ -36,73 +37,4 @@ extern void s3c_pm_do_save(struct sleep_save *ptr, int count);
 extern void s3c_pm_do_restore(const struct sleep_save *ptr, int count);
 extern void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count);
 
-/* PM debug functions */
-
-/**
- * struct pm_uart_save - save block for core UART
- * @ulcon: Save value for S3C2410_ULCON
- * @ucon: Save value for S3C2410_UCON
- * @ufcon: Save value for S3C2410_UFCON
- * @umcon: Save value for S3C2410_UMCON
- * @ubrdiv: Save value for S3C2410_UBRDIV
- *
- * Save block for UART registers to be held over sleep and restored if they
- * are needed (say by debug).
-*/
-struct pm_uart_save {
-	u32	ulcon;
-	u32	ucon;
-	u32	ufcon;
-	u32	umcon;
-	u32	ubrdiv;
-	u32	udivslot;
-};
-
-#ifdef CONFIG_SAMSUNG_PM_DEBUG
-/**
- * s3c_pm_dbg() - low level debug function for use in suspend/resume.
- * @msg: The message to print.
- *
- * This function is used mainly to debug the resume process before the system
- * can rely on printk/console output. It uses the low-level debugging output
- * routine printascii() to do its work.
- */
-extern void s3c_pm_dbg(const char *msg, ...);
-
-#define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt)
-
-extern void s3c_pm_save_uarts(bool is_s3c24xx);
-extern void s3c_pm_restore_uarts(bool is_s3c24xx);
-
-#ifdef CONFIG_ARCH_S3C64XX
-extern void s3c_pm_arch_update_uart(void __iomem *regs,
-				    struct pm_uart_save *save);
-#else
-static inline void
-s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save)
-{
-}
-#endif
-
-#else
-#define S3C_PMDBG(fmt...) pr_debug(fmt)
-
-static inline void s3c_pm_save_uarts(bool is_s3c24xx) { }
-static inline void s3c_pm_restore_uarts(bool is_s3c24xx) { }
-#endif
-
-/* suspend memory checking */
-
-#ifdef CONFIG_SAMSUNG_PM_CHECK
-extern void s3c_pm_check_prepare(void);
-extern void s3c_pm_check_restore(void);
-extern void s3c_pm_check_cleanup(void);
-extern void s3c_pm_check_store(void);
-#else
-#define s3c_pm_check_prepare() do { } while (0)
-#define s3c_pm_check_restore() do { } while (0)
-#define s3c_pm_check_cleanup() do { } while (0)
-#define s3c_pm_check_store()   do { } while (0)
-#endif
-
 #endif
diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig
index 33ad0de2de3c..0ea7402ffba3 100644
--- a/drivers/soc/samsung/Kconfig
+++ b/drivers/soc/samsung/Kconfig
@@ -25,6 +25,52 @@ config EXYNOS_PMU_ARM_DRIVERS
 
 config EXYNOS_PM_DOMAINS
 	bool "Exynos PM domains" if COMPILE_TEST
-	depends on PM_GENERIC_DOMAINS || COMPILE_TEST
+	depends on (ARCH_EXYNOS && PM_GENERIC_DOMAINS) || COMPILE_TEST
+
+config SAMSUNG_PM_DEBUG
+	bool "Samsung PM Suspend debug"
+	depends on PM && DEBUG_KERNEL
+	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
+	depends on DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
+	help
+	  Say Y here if you want verbose debugging from the PM Suspend and
+	  Resume code. See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
+	  for more information.
+
+config S3C_PM_DEBUG_LED_SMDK
+       bool "SMDK LED suspend/resume debugging"
+       depends on PM && (MACH_SMDK6410)
+       help
+         Say Y here to enable the use of the SMDK LEDs on the baseboard
+	 for debugging of the state of the suspend and resume process.
+
+	 Note, this currently only works for S3C64XX based SMDK boards.
+
+config SAMSUNG_PM_CHECK
+	bool "S3C2410 PM Suspend Memory CRC"
+	depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210)
+	select CRC32
+	help
+	  Enable the PM code's memory area checksum over sleep. This option
+	  will generate CRCs of all blocks of memory, and store them before
+	  going to sleep. The blocks are then checked on resume for any
+	  errors.
+
+	  Note, this can take several seconds depending on memory size
+	  and CPU speed.
+
+	  See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
+
+config SAMSUNG_PM_CHECK_CHUNKSIZE
+	int "S3C2410 PM Suspend CRC Chunksize (KiB)"
+	depends on PM && SAMSUNG_PM_CHECK
+	default 64
+	help
+	  Set the chunksize in Kilobytes of the CRC for checking memory
+	  corruption over suspend and resume. A smaller value will mean that
+	  the CRC data block will take more memory, but will identify any
+	  faults with better precision.
+
+	  See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
 
 endif
diff --git a/drivers/soc/samsung/Makefile b/drivers/soc/samsung/Makefile
index 3b6a8797416c..88ae7a522055 100644
--- a/drivers/soc/samsung/Makefile
+++ b/drivers/soc/samsung/Makefile
@@ -6,3 +6,6 @@ obj-$(CONFIG_EXYNOS_PMU)	+= exynos-pmu.o
 obj-$(CONFIG_EXYNOS_PMU_ARM_DRIVERS)	+= exynos3250-pmu.o exynos4-pmu.o \
 					exynos5250-pmu.o exynos5420-pmu.o
 obj-$(CONFIG_EXYNOS_PM_DOMAINS) += pm_domains.o
+
+obj-$(CONFIG_SAMSUNG_PM_CHECK)	+= s3c-pm-check.o
+obj-$(CONFIG_SAMSUNG_PM_DEBUG)	+= s3c-pm-debug.o
diff --git a/arch/arm/plat-samsung/pm-check.c b/drivers/soc/samsung/s3c-pm-check.c
similarity index 99%
rename from arch/arm/plat-samsung/pm-check.c
rename to drivers/soc/samsung/s3c-pm-check.c
index cd2c02c68bc3..ff3e099fc208 100644
--- a/arch/arm/plat-samsung/pm-check.c
+++ b/drivers/soc/samsung/s3c-pm-check.c
@@ -15,7 +15,7 @@
 #include <linux/ioport.h>
 #include <linux/slab.h>
 
-#include <plat/pm-common.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 #if CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE < 1
 #error CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE must be a positive non-zero value
diff --git a/arch/arm/plat-samsung/pm-debug.c b/drivers/soc/samsung/s3c-pm-debug.c
similarity index 97%
rename from arch/arm/plat-samsung/pm-debug.c
rename to drivers/soc/samsung/s3c-pm-debug.c
index 482d53753e93..b5ce0e9a41e5 100644
--- a/arch/arm/plat-samsung/pm-debug.c
+++ b/drivers/soc/samsung/s3c-pm-debug.c
@@ -15,8 +15,7 @@
 
 #include <asm/mach/map.h>
 
-#include <plat/cpu.h>
-#include <plat/pm-common.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 static struct pm_uart_save uart_save;
 
diff --git a/include/linux/soc/samsung/s3c-pm.h b/include/linux/soc/samsung/s3c-pm.h
new file mode 100644
index 000000000000..d477b314d034
--- /dev/null
+++ b/include/linux/soc/samsung/s3c-pm.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2013 Samsung Electronics Co., Ltd.
+ *	Tomasz Figa <t.figa@samsung.com>
+ * Copyright (c) 2004 Simtec Electronics
+ *	http://armlinux.simtec.co.uk/
+ *	Written by Ben Dooks, <ben@simtec.co.uk>
+ */
+
+#ifndef __SAMSUNG_SOC_S3C_PM_H
+#define __SAMSUNG_SOC_S3C_PM_H __FILE__
+
+#include <linux/types.h>
+
+/* PM debug functions */
+
+/**
+ * struct pm_uart_save - save block for core UART
+ * @ulcon: Save value for S3C2410_ULCON
+ * @ucon: Save value for S3C2410_UCON
+ * @ufcon: Save value for S3C2410_UFCON
+ * @umcon: Save value for S3C2410_UMCON
+ * @ubrdiv: Save value for S3C2410_UBRDIV
+ *
+ * Save block for UART registers to be held over sleep and restored if they
+ * are needed (say by debug).
+*/
+struct pm_uart_save {
+	u32	ulcon;
+	u32	ucon;
+	u32	ufcon;
+	u32	umcon;
+	u32	ubrdiv;
+	u32	udivslot;
+};
+
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
+/**
+ * s3c_pm_dbg() - low level debug function for use in suspend/resume.
+ * @msg: The message to print.
+ *
+ * This function is used mainly to debug the resume process before the system
+ * can rely on printk/console output. It uses the low-level debugging output
+ * routine printascii() to do its work.
+ */
+extern void s3c_pm_dbg(const char *msg, ...);
+
+#define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt)
+
+extern void s3c_pm_save_uarts(bool is_s3c24xx);
+extern void s3c_pm_restore_uarts(bool is_s3c24xx);
+
+#ifdef CONFIG_ARCH_S3C64XX
+extern void s3c_pm_arch_update_uart(void __iomem *regs,
+				    struct pm_uart_save *save);
+#else
+static inline void
+s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save)
+{
+}
+#endif
+
+#else
+#define S3C_PMDBG(fmt...) pr_debug(fmt)
+
+static inline void s3c_pm_save_uarts(bool is_s3c24xx) { }
+static inline void s3c_pm_restore_uarts(bool is_s3c24xx) { }
+#endif
+
+/* suspend memory checking */
+
+#ifdef CONFIG_SAMSUNG_PM_CHECK
+extern void s3c_pm_check_prepare(void);
+extern void s3c_pm_check_restore(void);
+extern void s3c_pm_check_cleanup(void);
+extern void s3c_pm_check_store(void);
+#else
+#define s3c_pm_check_prepare() do { } while (0)
+#define s3c_pm_check_restore() do { } while (0)
+#define s3c_pm_check_cleanup() do { } while (0)
+#define s3c_pm_check_store()   do { } while (0)
+#endif
+
+#endif
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 09/36] ARM: samsung: move pm check code to drivers/soc
  2019-10-10 20:29   ` [PATCH 09/36] ARM: samsung: move pm check code to drivers/soc Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 11:32     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Kyungmin Park
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Mauro Carvalho Chehab, Bartlomiej Zolnierkiewicz,
	Sylwester Nawrocki, Pankaj Dubey, Marek Szyprowski, linux-kernel

This is the only part of plat-samsung that is really
shared between the s3c and s5p ports. Moving it to
drivers/soc/ lets us make them completely independent.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s5pv210/Kconfig                 |  1 +
 arch/arm/plat-samsung/Kconfig                 | 49 +----------
 arch/arm/plat-samsung/Makefile                |  2 -
 .../arm/plat-samsung/include/plat/pm-common.h | 70 +---------------
 drivers/soc/samsung/Kconfig                   | 48 ++++++++++-
 drivers/soc/samsung/Makefile                  |  3 +
 .../soc/samsung/s3c-pm-check.c                |  2 +-
 .../soc/samsung/s3c-pm-debug.c                |  3 +-
 include/linux/soc/samsung/s3c-pm.h            | 84 +++++++++++++++++++
 9 files changed, 139 insertions(+), 123 deletions(-)
 rename arch/arm/plat-samsung/pm-check.c => drivers/soc/samsung/s3c-pm-check.c (99%)
 rename arch/arm/plat-samsung/pm-debug.c => drivers/soc/samsung/s3c-pm-debug.c (97%)
 create mode 100644 include/linux/soc/samsung/s3c-pm.h

diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index 03984a791879..d2b0e64bad7e 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -18,6 +18,7 @@ config ARCH_S5PV210
 	select HAVE_S3C_RTC if RTC_CLASS
 	select PINCTRL
 	select PINCTRL_EXYNOS
+	select SOC_SAMSUNG
 	help
 	  Samsung S5PV210/S5PC110 series based systems
 
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index e31a156a27df..740bdb23f38a 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -8,6 +8,7 @@ config PLAT_SAMSUNG
 	default y
 	select GENERIC_IRQ_CHIP
 	select NO_IOPORT_MAP
+	select SOC_SAMSUNG
 	help
 	  Base platform code for all Samsung SoC based systems
 
@@ -234,54 +235,6 @@ config SAMSUNG_PM_GPIO
 	  pinctrl-samsung driver.
 endif
 
-comment "Power management"
-
-config SAMSUNG_PM_DEBUG
-	bool "Samsung PM Suspend debug"
-	depends on PM && DEBUG_KERNEL
-	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
-	depends on DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
-	help
-	  Say Y here if you want verbose debugging from the PM Suspend and
-	  Resume code. See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
-	  for more information.
-
-config S3C_PM_DEBUG_LED_SMDK
-       bool "SMDK LED suspend/resume debugging"
-       depends on PM && (MACH_SMDK6410)
-       help
-         Say Y here to enable the use of the SMDK LEDs on the baseboard
-	 for debugging of the state of the suspend and resume process.
-
-	 Note, this currently only works for S3C64XX based SMDK boards.
-
-config SAMSUNG_PM_CHECK
-	bool "S3C2410 PM Suspend Memory CRC"
-	depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210)
-	select CRC32
-	help
-	  Enable the PM code's memory area checksum over sleep. This option
-	  will generate CRCs of all blocks of memory, and store them before
-	  going to sleep. The blocks are then checked on resume for any
-	  errors.
-
-	  Note, this can take several seconds depending on memory size
-	  and CPU speed.
-
-	  See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
-
-config SAMSUNG_PM_CHECK_CHUNKSIZE
-	int "S3C2410 PM Suspend CRC Chunksize (KiB)"
-	depends on PM && SAMSUNG_PM_CHECK
-	default 64
-	help
-	  Set the chunksize in Kilobytes of the CRC for checking memory
-	  corruption over suspend and resume. A smaller value will mean that
-	  the CRC data block will take more memory, but will identify any
-	  faults with better precision.
-
-	  See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
-
 config SAMSUNG_WAKEMASK
 	bool
 	depends on PM
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 3db9d2c38258..d88b9b84f3a9 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -28,8 +28,6 @@ obj-$(CONFIG_PM_SLEEP)		+= pm-common.o
 obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm-common.o
 obj-$(CONFIG_SAMSUNG_PM)	+= pm.o
 obj-$(CONFIG_SAMSUNG_PM_GPIO)	+= pm-gpio.o
-obj-$(CONFIG_SAMSUNG_PM_CHECK)	+= pm-check.o
-obj-$(CONFIG_SAMSUNG_PM_DEBUG)	+= pm-debug.o
 
 obj-$(CONFIG_SAMSUNG_WAKEMASK)	+= wakeup-mask.o
 obj-$(CONFIG_SAMSUNG_WDT_RESET)	+= watchdog-reset.o
diff --git a/arch/arm/plat-samsung/include/plat/pm-common.h b/arch/arm/plat-samsung/include/plat/pm-common.h
index 87fa97fd6e8b..18b9607e1e39 100644
--- a/arch/arm/plat-samsung/include/plat/pm-common.h
+++ b/arch/arm/plat-samsung/include/plat/pm-common.h
@@ -11,6 +11,7 @@
 #define __PLAT_SAMSUNG_PM_COMMON_H __FILE__
 
 #include <linux/irq.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 /* sleep save info */
 
@@ -36,73 +37,4 @@ extern void s3c_pm_do_save(struct sleep_save *ptr, int count);
 extern void s3c_pm_do_restore(const struct sleep_save *ptr, int count);
 extern void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count);
 
-/* PM debug functions */
-
-/**
- * struct pm_uart_save - save block for core UART
- * @ulcon: Save value for S3C2410_ULCON
- * @ucon: Save value for S3C2410_UCON
- * @ufcon: Save value for S3C2410_UFCON
- * @umcon: Save value for S3C2410_UMCON
- * @ubrdiv: Save value for S3C2410_UBRDIV
- *
- * Save block for UART registers to be held over sleep and restored if they
- * are needed (say by debug).
-*/
-struct pm_uart_save {
-	u32	ulcon;
-	u32	ucon;
-	u32	ufcon;
-	u32	umcon;
-	u32	ubrdiv;
-	u32	udivslot;
-};
-
-#ifdef CONFIG_SAMSUNG_PM_DEBUG
-/**
- * s3c_pm_dbg() - low level debug function for use in suspend/resume.
- * @msg: The message to print.
- *
- * This function is used mainly to debug the resume process before the system
- * can rely on printk/console output. It uses the low-level debugging output
- * routine printascii() to do its work.
- */
-extern void s3c_pm_dbg(const char *msg, ...);
-
-#define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt)
-
-extern void s3c_pm_save_uarts(bool is_s3c24xx);
-extern void s3c_pm_restore_uarts(bool is_s3c24xx);
-
-#ifdef CONFIG_ARCH_S3C64XX
-extern void s3c_pm_arch_update_uart(void __iomem *regs,
-				    struct pm_uart_save *save);
-#else
-static inline void
-s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save)
-{
-}
-#endif
-
-#else
-#define S3C_PMDBG(fmt...) pr_debug(fmt)
-
-static inline void s3c_pm_save_uarts(bool is_s3c24xx) { }
-static inline void s3c_pm_restore_uarts(bool is_s3c24xx) { }
-#endif
-
-/* suspend memory checking */
-
-#ifdef CONFIG_SAMSUNG_PM_CHECK
-extern void s3c_pm_check_prepare(void);
-extern void s3c_pm_check_restore(void);
-extern void s3c_pm_check_cleanup(void);
-extern void s3c_pm_check_store(void);
-#else
-#define s3c_pm_check_prepare() do { } while (0)
-#define s3c_pm_check_restore() do { } while (0)
-#define s3c_pm_check_cleanup() do { } while (0)
-#define s3c_pm_check_store()   do { } while (0)
-#endif
-
 #endif
diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig
index 33ad0de2de3c..0ea7402ffba3 100644
--- a/drivers/soc/samsung/Kconfig
+++ b/drivers/soc/samsung/Kconfig
@@ -25,6 +25,52 @@ config EXYNOS_PMU_ARM_DRIVERS
 
 config EXYNOS_PM_DOMAINS
 	bool "Exynos PM domains" if COMPILE_TEST
-	depends on PM_GENERIC_DOMAINS || COMPILE_TEST
+	depends on (ARCH_EXYNOS && PM_GENERIC_DOMAINS) || COMPILE_TEST
+
+config SAMSUNG_PM_DEBUG
+	bool "Samsung PM Suspend debug"
+	depends on PM && DEBUG_KERNEL
+	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
+	depends on DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
+	help
+	  Say Y here if you want verbose debugging from the PM Suspend and
+	  Resume code. See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
+	  for more information.
+
+config S3C_PM_DEBUG_LED_SMDK
+       bool "SMDK LED suspend/resume debugging"
+       depends on PM && (MACH_SMDK6410)
+       help
+         Say Y here to enable the use of the SMDK LEDs on the baseboard
+	 for debugging of the state of the suspend and resume process.
+
+	 Note, this currently only works for S3C64XX based SMDK boards.
+
+config SAMSUNG_PM_CHECK
+	bool "S3C2410 PM Suspend Memory CRC"
+	depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210)
+	select CRC32
+	help
+	  Enable the PM code's memory area checksum over sleep. This option
+	  will generate CRCs of all blocks of memory, and store them before
+	  going to sleep. The blocks are then checked on resume for any
+	  errors.
+
+	  Note, this can take several seconds depending on memory size
+	  and CPU speed.
+
+	  See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
+
+config SAMSUNG_PM_CHECK_CHUNKSIZE
+	int "S3C2410 PM Suspend CRC Chunksize (KiB)"
+	depends on PM && SAMSUNG_PM_CHECK
+	default 64
+	help
+	  Set the chunksize in Kilobytes of the CRC for checking memory
+	  corruption over suspend and resume. A smaller value will mean that
+	  the CRC data block will take more memory, but will identify any
+	  faults with better precision.
+
+	  See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
 
 endif
diff --git a/drivers/soc/samsung/Makefile b/drivers/soc/samsung/Makefile
index 3b6a8797416c..88ae7a522055 100644
--- a/drivers/soc/samsung/Makefile
+++ b/drivers/soc/samsung/Makefile
@@ -6,3 +6,6 @@ obj-$(CONFIG_EXYNOS_PMU)	+= exynos-pmu.o
 obj-$(CONFIG_EXYNOS_PMU_ARM_DRIVERS)	+= exynos3250-pmu.o exynos4-pmu.o \
 					exynos5250-pmu.o exynos5420-pmu.o
 obj-$(CONFIG_EXYNOS_PM_DOMAINS) += pm_domains.o
+
+obj-$(CONFIG_SAMSUNG_PM_CHECK)	+= s3c-pm-check.o
+obj-$(CONFIG_SAMSUNG_PM_DEBUG)	+= s3c-pm-debug.o
diff --git a/arch/arm/plat-samsung/pm-check.c b/drivers/soc/samsung/s3c-pm-check.c
similarity index 99%
rename from arch/arm/plat-samsung/pm-check.c
rename to drivers/soc/samsung/s3c-pm-check.c
index cd2c02c68bc3..ff3e099fc208 100644
--- a/arch/arm/plat-samsung/pm-check.c
+++ b/drivers/soc/samsung/s3c-pm-check.c
@@ -15,7 +15,7 @@
 #include <linux/ioport.h>
 #include <linux/slab.h>
 
-#include <plat/pm-common.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 #if CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE < 1
 #error CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE must be a positive non-zero value
diff --git a/arch/arm/plat-samsung/pm-debug.c b/drivers/soc/samsung/s3c-pm-debug.c
similarity index 97%
rename from arch/arm/plat-samsung/pm-debug.c
rename to drivers/soc/samsung/s3c-pm-debug.c
index 482d53753e93..b5ce0e9a41e5 100644
--- a/arch/arm/plat-samsung/pm-debug.c
+++ b/drivers/soc/samsung/s3c-pm-debug.c
@@ -15,8 +15,7 @@
 
 #include <asm/mach/map.h>
 
-#include <plat/cpu.h>
-#include <plat/pm-common.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 static struct pm_uart_save uart_save;
 
diff --git a/include/linux/soc/samsung/s3c-pm.h b/include/linux/soc/samsung/s3c-pm.h
new file mode 100644
index 000000000000..d477b314d034
--- /dev/null
+++ b/include/linux/soc/samsung/s3c-pm.h
@@ -0,0 +1,84 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2013 Samsung Electronics Co., Ltd.
+ *	Tomasz Figa <t.figa@samsung.com>
+ * Copyright (c) 2004 Simtec Electronics
+ *	http://armlinux.simtec.co.uk/
+ *	Written by Ben Dooks, <ben@simtec.co.uk>
+ */
+
+#ifndef __SAMSUNG_SOC_S3C_PM_H
+#define __SAMSUNG_SOC_S3C_PM_H __FILE__
+
+#include <linux/types.h>
+
+/* PM debug functions */
+
+/**
+ * struct pm_uart_save - save block for core UART
+ * @ulcon: Save value for S3C2410_ULCON
+ * @ucon: Save value for S3C2410_UCON
+ * @ufcon: Save value for S3C2410_UFCON
+ * @umcon: Save value for S3C2410_UMCON
+ * @ubrdiv: Save value for S3C2410_UBRDIV
+ *
+ * Save block for UART registers to be held over sleep and restored if they
+ * are needed (say by debug).
+*/
+struct pm_uart_save {
+	u32	ulcon;
+	u32	ucon;
+	u32	ufcon;
+	u32	umcon;
+	u32	ubrdiv;
+	u32	udivslot;
+};
+
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
+/**
+ * s3c_pm_dbg() - low level debug function for use in suspend/resume.
+ * @msg: The message to print.
+ *
+ * This function is used mainly to debug the resume process before the system
+ * can rely on printk/console output. It uses the low-level debugging output
+ * routine printascii() to do its work.
+ */
+extern void s3c_pm_dbg(const char *msg, ...);
+
+#define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt)
+
+extern void s3c_pm_save_uarts(bool is_s3c24xx);
+extern void s3c_pm_restore_uarts(bool is_s3c24xx);
+
+#ifdef CONFIG_ARCH_S3C64XX
+extern void s3c_pm_arch_update_uart(void __iomem *regs,
+				    struct pm_uart_save *save);
+#else
+static inline void
+s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save)
+{
+}
+#endif
+
+#else
+#define S3C_PMDBG(fmt...) pr_debug(fmt)
+
+static inline void s3c_pm_save_uarts(bool is_s3c24xx) { }
+static inline void s3c_pm_restore_uarts(bool is_s3c24xx) { }
+#endif
+
+/* suspend memory checking */
+
+#ifdef CONFIG_SAMSUNG_PM_CHECK
+extern void s3c_pm_check_prepare(void);
+extern void s3c_pm_check_restore(void);
+extern void s3c_pm_check_cleanup(void);
+extern void s3c_pm_check_store(void);
+#else
+#define s3c_pm_check_prepare() do { } while (0)
+#define s3c_pm_check_restore() do { } while (0)
+#define s3c_pm_check_cleanup() do { } while (0)
+#define s3c_pm_check_store()   do { } while (0)
+#endif
+
+#endif
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 10/36] ARM: s5pv210: use private pm save/restore
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (8 preceding siblings ...)
  2019-10-10 20:29   ` [PATCH 09/36] ARM: samsung: move pm check code to drivers/soc Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 11:55     ` Krzysztof Kozlowski
  2019-10-10 20:29   ` [PATCH 11/36] ARM: s5pv210: split from plat-samsung Arnd Bergmann
                     ` (24 subsequent siblings)
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Kyungmin Park
  Cc: linux-samsung-soc, Arnd Bergmann, linus.walleij, linux-kernel,
	Tomasz Figa, linux-arm-kernel

The pm save/restore code is fairly small, so in order to
separate the s3c and s5p platforms, adding an s5p specific
copy instead of sharing it is actually easier.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s5pv210/Makefile     |  7 -----
 arch/arm/mach-s5pv210/pm.c         | 45 ++++++++++++++++++++++++++++--
 arch/arm/mach-s5pv210/regs-clock.h |  2 +-
 arch/arm/mach-s5pv210/s5pv210.c    |  2 --
 arch/arm/plat-samsung/Makefile     |  4 +--
 5 files changed, 45 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile
index e7b551e18e5c..aa0a1f091daf 100644
--- a/arch/arm/mach-s5pv210/Makefile
+++ b/arch/arm/mach-s5pv210/Makefile
@@ -3,12 +3,5 @@
 # Copyright (c) 2010 Samsung Electronics Co., Ltd.
 # 		http://www.samsung.com/
 
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/arch/arm/plat-samsung/include
-
-# Core
-
 obj-$(CONFIG_PM_SLEEP)		+= pm.o sleep.o
-
-# machine support
-
 obj-y				+= s5pv210.o
diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c
index efdb5a27c060..d59c094cdea8 100644
--- a/arch/arm/mach-s5pv210/pm.c
+++ b/arch/arm/mach-s5pv210/pm.c
@@ -13,15 +13,56 @@
 #include <linux/suspend.h>
 #include <linux/syscore_ops.h>
 #include <linux/io.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 #include <asm/cacheflush.h>
 #include <asm/suspend.h>
 
-#include <plat/pm-common.h>
-
 #include "common.h"
 #include "regs-clock.h"
 
+/* helper functions to save and restore register state */
+struct sleep_save {
+	void __iomem	*reg;
+	unsigned long	val;
+};
+
+#define SAVE_ITEM(x) \
+	{ .reg = (x) }
+
+/**
+ * s3c_pm_do_save() - save a set of registers for restoration on resume.
+ * @ptr: Pointer to an array of registers.
+ * @count: Size of the ptr array.
+ *
+ * Run through the list of registers given, saving their contents in the
+ * array for later restoration when we wakeup.
+ */
+static void s3c_pm_do_save(struct sleep_save *ptr, int count)
+{
+	for (; count > 0; count--, ptr++) {
+		ptr->val = readl_relaxed(ptr->reg);
+		S3C_PMDBG("saved %p value %08lx\n", ptr->reg, ptr->val);
+	}
+}
+
+/**
+ * s3c_pm_do_restore() - restore register values from the save list.
+ * @ptr: Pointer to an array of registers.
+ * @count: Size of the ptr array.
+ *
+ * Restore the register values saved from s3c_pm_do_save().
+ *
+ * WARNING: Do not put any debug in here that may effect memory or use
+ * peripherals, as things may be changing!
+*/
+
+static void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count)
+{
+	for (; count > 0; count--, ptr++)
+		writel_relaxed(ptr->val, ptr->reg);
+}
+
 static struct sleep_save s5pv210_core_save[] = {
 	/* Clock ETC */
 	SAVE_ITEM(S5P_MDNIE_SEL),
diff --git a/arch/arm/mach-s5pv210/regs-clock.h b/arch/arm/mach-s5pv210/regs-clock.h
index 2a35c831a9b0..8c7530614e37 100644
--- a/arch/arm/mach-s5pv210/regs-clock.h
+++ b/arch/arm/mach-s5pv210/regs-clock.h
@@ -9,7 +9,7 @@
 #ifndef __ASM_ARCH_REGS_CLOCK_H
 #define __ASM_ARCH_REGS_CLOCK_H __FILE__
 
-#include <plat/map-base.h>
+#define S3C_VA_SYS		((void __iomem __force *)0xF6100000)
 
 #define S5P_CLKREG(x)		(S3C_VA_SYS + (x))
 
diff --git a/arch/arm/mach-s5pv210/s5pv210.c b/arch/arm/mach-s5pv210/s5pv210.c
index 868f9c20419d..a21ed3bb992a 100644
--- a/arch/arm/mach-s5pv210/s5pv210.c
+++ b/arch/arm/mach-s5pv210/s5pv210.c
@@ -13,8 +13,6 @@
 #include <asm/mach/map.h>
 #include <asm/system_misc.h>
 
-#include <plat/map-base.h>
-
 #include "common.h"
 #include "regs-clock.h"
 
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index d88b9b84f3a9..025ce22876c1 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -24,9 +24,7 @@ obj-$(CONFIG_GPIO_SAMSUNG)     += gpio-samsung.o
 
 # PM support
 
-obj-$(CONFIG_PM_SLEEP)		+= pm-common.o
-obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm-common.o
-obj-$(CONFIG_SAMSUNG_PM)	+= pm.o
+obj-$(CONFIG_SAMSUNG_PM)	+= pm.o pm-common.o
 obj-$(CONFIG_SAMSUNG_PM_GPIO)	+= pm-gpio.o
 
 obj-$(CONFIG_SAMSUNG_WAKEMASK)	+= wakeup-mask.o
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 10/36] ARM: s5pv210: use private pm save/restore
  2019-10-10 20:29   ` [PATCH 10/36] ARM: s5pv210: use private pm save/restore Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 11:55     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Kyungmin Park
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Tomasz Figa, linux-kernel

The pm save/restore code is fairly small, so in order to
separate the s3c and s5p platforms, adding an s5p specific
copy instead of sharing it is actually easier.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s5pv210/Makefile     |  7 -----
 arch/arm/mach-s5pv210/pm.c         | 45 ++++++++++++++++++++++++++++--
 arch/arm/mach-s5pv210/regs-clock.h |  2 +-
 arch/arm/mach-s5pv210/s5pv210.c    |  2 --
 arch/arm/plat-samsung/Makefile     |  4 +--
 5 files changed, 45 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile
index e7b551e18e5c..aa0a1f091daf 100644
--- a/arch/arm/mach-s5pv210/Makefile
+++ b/arch/arm/mach-s5pv210/Makefile
@@ -3,12 +3,5 @@
 # Copyright (c) 2010 Samsung Electronics Co., Ltd.
 # 		http://www.samsung.com/
 
-ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/arch/arm/plat-samsung/include
-
-# Core
-
 obj-$(CONFIG_PM_SLEEP)		+= pm.o sleep.o
-
-# machine support
-
 obj-y				+= s5pv210.o
diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c
index efdb5a27c060..d59c094cdea8 100644
--- a/arch/arm/mach-s5pv210/pm.c
+++ b/arch/arm/mach-s5pv210/pm.c
@@ -13,15 +13,56 @@
 #include <linux/suspend.h>
 #include <linux/syscore_ops.h>
 #include <linux/io.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 #include <asm/cacheflush.h>
 #include <asm/suspend.h>
 
-#include <plat/pm-common.h>
-
 #include "common.h"
 #include "regs-clock.h"
 
+/* helper functions to save and restore register state */
+struct sleep_save {
+	void __iomem	*reg;
+	unsigned long	val;
+};
+
+#define SAVE_ITEM(x) \
+	{ .reg = (x) }
+
+/**
+ * s3c_pm_do_save() - save a set of registers for restoration on resume.
+ * @ptr: Pointer to an array of registers.
+ * @count: Size of the ptr array.
+ *
+ * Run through the list of registers given, saving their contents in the
+ * array for later restoration when we wakeup.
+ */
+static void s3c_pm_do_save(struct sleep_save *ptr, int count)
+{
+	for (; count > 0; count--, ptr++) {
+		ptr->val = readl_relaxed(ptr->reg);
+		S3C_PMDBG("saved %p value %08lx\n", ptr->reg, ptr->val);
+	}
+}
+
+/**
+ * s3c_pm_do_restore() - restore register values from the save list.
+ * @ptr: Pointer to an array of registers.
+ * @count: Size of the ptr array.
+ *
+ * Restore the register values saved from s3c_pm_do_save().
+ *
+ * WARNING: Do not put any debug in here that may effect memory or use
+ * peripherals, as things may be changing!
+*/
+
+static void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count)
+{
+	for (; count > 0; count--, ptr++)
+		writel_relaxed(ptr->val, ptr->reg);
+}
+
 static struct sleep_save s5pv210_core_save[] = {
 	/* Clock ETC */
 	SAVE_ITEM(S5P_MDNIE_SEL),
diff --git a/arch/arm/mach-s5pv210/regs-clock.h b/arch/arm/mach-s5pv210/regs-clock.h
index 2a35c831a9b0..8c7530614e37 100644
--- a/arch/arm/mach-s5pv210/regs-clock.h
+++ b/arch/arm/mach-s5pv210/regs-clock.h
@@ -9,7 +9,7 @@
 #ifndef __ASM_ARCH_REGS_CLOCK_H
 #define __ASM_ARCH_REGS_CLOCK_H __FILE__
 
-#include <plat/map-base.h>
+#define S3C_VA_SYS		((void __iomem __force *)0xF6100000)
 
 #define S5P_CLKREG(x)		(S3C_VA_SYS + (x))
 
diff --git a/arch/arm/mach-s5pv210/s5pv210.c b/arch/arm/mach-s5pv210/s5pv210.c
index 868f9c20419d..a21ed3bb992a 100644
--- a/arch/arm/mach-s5pv210/s5pv210.c
+++ b/arch/arm/mach-s5pv210/s5pv210.c
@@ -13,8 +13,6 @@
 #include <asm/mach/map.h>
 #include <asm/system_misc.h>
 
-#include <plat/map-base.h>
-
 #include "common.h"
 #include "regs-clock.h"
 
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index d88b9b84f3a9..025ce22876c1 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -24,9 +24,7 @@ obj-$(CONFIG_GPIO_SAMSUNG)     += gpio-samsung.o
 
 # PM support
 
-obj-$(CONFIG_PM_SLEEP)		+= pm-common.o
-obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm-common.o
-obj-$(CONFIG_SAMSUNG_PM)	+= pm.o
+obj-$(CONFIG_SAMSUNG_PM)	+= pm.o pm-common.o
 obj-$(CONFIG_SAMSUNG_PM_GPIO)	+= pm-gpio.o
 
 obj-$(CONFIG_SAMSUNG_WAKEMASK)	+= wakeup-mask.o
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 11/36] ARM: s5pv210: split from plat-samsung
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (9 preceding siblings ...)
  2019-10-10 20:29   ` [PATCH 10/36] ARM: s5pv210: use private pm save/restore Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
                       ` (4 more replies)
  2019-10-10 20:29   ` [PATCH 12/36] ARM: s3c64xx: remove mach/hardware.h Arnd Bergmann
                     ` (23 subsequent siblings)
  34 siblings, 5 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Ulf Hansson, Thierry Reding,
	Mark Brown, Greg Kroah-Hartman, Jiri Slaby, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood
  Cc: linux-pwm, alsa-devel, linux-samsung-soc, Arnd Bergmann,
	Bartlomiej Zolnierkiewicz, linux-kernel, linus.walleij,
	linux-mmc, Takashi Iwai, Jaroslav Kysela, Mauro Carvalho Chehab,
	Faiz Abbas, Clément Péron, linux-serial,
	Uwe Kleine-König, Olof Johansson, linux-spi, Sascha Hauer,
	linux-arm-kernel

These can be build completely independently, so split
the two Kconfig symbols.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig.debug        | 6 +++---
 arch/arm/Makefile             | 1 -
 arch/arm/plat-samsung/Kconfig | 2 +-
 drivers/mmc/host/Kconfig      | 2 +-
 drivers/pwm/Kconfig           | 2 +-
 drivers/spi/Kconfig           | 2 +-
 drivers/tty/serial/Kconfig    | 2 +-
 sound/soc/samsung/Kconfig     | 2 +-
 8 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 9c4f2d6deb06..4c4e97ae4fcb 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -998,7 +998,7 @@ choice
 		  via SCIFA4 on Renesas SH-Mobile AG5 (SH73A0).
 
 	config DEBUG_S3C_UART0
-		depends on PLAT_SAMSUNG || ARCH_EXYNOS
+		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
@@ -1010,7 +1010,7 @@ choice
 		  by the boot-loader before use.
 
 	config DEBUG_S3C_UART1
-		depends on PLAT_SAMSUNG || ARCH_EXYNOS
+		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
@@ -1022,7 +1022,7 @@ choice
 		  by the boot-loader before use.
 
 	config DEBUG_S3C_UART2
-		depends on PLAT_SAMSUNG || ARCH_EXYNOS
+		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index f492d7c338fe..a1bc15cda751 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -235,7 +235,6 @@ machine-$(CONFIG_PLAT_SPEAR)		+= spear
 # by CONFIG_* macro name.
 plat-$(CONFIG_ARCH_OMAP)	+= omap
 plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
-plat-$(CONFIG_ARCH_S5PV210)	+= samsung
 plat-$(CONFIG_PLAT_ORION)	+= orion
 plat-$(CONFIG_PLAT_PXA)		+= pxa
 plat-$(CONFIG_PLAT_S3C24XX)	+= samsung
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 740bdb23f38a..1530946cc672 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -4,7 +4,7 @@
 
 config PLAT_SAMSUNG
 	bool
-	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
+	depends on PLAT_S3C24XX || ARCH_S3C64XX
 	default y
 	select GENERIC_IRQ_CHIP
 	select NO_IOPORT_MAP
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 400a581c918c..16a0e5430b44 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -275,7 +275,7 @@ config MMC_SDHCI_TEGRA
 
 config MMC_SDHCI_S3C
 	tristate "SDHCI support on Samsung S3C SoC"
-	depends on MMC_SDHCI && (PLAT_SAMSUNG || ARCH_EXYNOS)
+	depends on MMC_SDHCI && (PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS)
 	help
 	  This selects the Secure Digital Host Controller Interface (SDHCI)
 	  often referrered to as the HSMMC block in some of the Samsung S3C
diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index e3a2518503ed..8eb738cac0c7 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -394,7 +394,7 @@ config PWM_ROCKCHIP
 
 config PWM_SAMSUNG
 	tristate "Samsung PWM support"
-	depends on PLAT_SAMSUNG || ARCH_EXYNOS
+	depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
 	help
 	  Generic PWM framework driver for Samsung.
 
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 6f7fdcbb9151..355391ee643d 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -625,7 +625,7 @@ config SPI_S3C24XX_FIQ
 
 config SPI_S3C64XX
 	tristate "Samsung S3C64XX series type SPI"
-	depends on (PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST)
+	depends on (PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST)
 	help
 	  SPI driver for Samsung S3C64XX and newer SoCs.
 
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 4789b5d62f63..17f01cf3009c 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -237,7 +237,7 @@ config SERIAL_CLPS711X_CONSOLE
 
 config SERIAL_SAMSUNG
 	tristate "Samsung SoC serial support"
-	depends on PLAT_SAMSUNG || ARCH_EXYNOS
+	depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
 	select SERIAL_CORE
 	help
 	  Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,
diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index 638983123d8f..7a0035dd9995 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig SND_SOC_SAMSUNG
 	tristate "ASoC support for Samsung"
-	depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST
+	depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
 	depends on COMMON_CLK
 	select SND_SOC_GENERIC_DMAENGINE_PCM
 	---help---
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 11/36] ARM: s5pv210: split from plat-samsung
  2019-10-10 20:29   ` [PATCH 11/36] ARM: s5pv210: split from plat-samsung Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  2019-10-11  5:51     ` Uwe Kleine-König
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Ulf Hansson, Thierry Reding,
	Mark Brown, Greg Kroah-Hartman, Jiri Slaby, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Uwe Kleine-König, Jaroslav Kysela,
	Takashi Iwai, Olof Johansson, Sascha Hauer,
	Clément Péron, Mauro Carvalho Chehab,
	Bartlomiej Zolnierkiewicz, Faiz Abbas, linux-kernel, linux-mmc,
	linux-pwm, linux-spi, linux-serial, alsa-devel

These can be build completely independently, so split
the two Kconfig symbols.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig.debug        | 6 +++---
 arch/arm/Makefile             | 1 -
 arch/arm/plat-samsung/Kconfig | 2 +-
 drivers/mmc/host/Kconfig      | 2 +-
 drivers/pwm/Kconfig           | 2 +-
 drivers/spi/Kconfig           | 2 +-
 drivers/tty/serial/Kconfig    | 2 +-
 sound/soc/samsung/Kconfig     | 2 +-
 8 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 9c4f2d6deb06..4c4e97ae4fcb 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -998,7 +998,7 @@ choice
 		  via SCIFA4 on Renesas SH-Mobile AG5 (SH73A0).
 
 	config DEBUG_S3C_UART0
-		depends on PLAT_SAMSUNG || ARCH_EXYNOS
+		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
@@ -1010,7 +1010,7 @@ choice
 		  by the boot-loader before use.
 
 	config DEBUG_S3C_UART1
-		depends on PLAT_SAMSUNG || ARCH_EXYNOS
+		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
@@ -1022,7 +1022,7 @@ choice
 		  by the boot-loader before use.
 
 	config DEBUG_S3C_UART2
-		depends on PLAT_SAMSUNG || ARCH_EXYNOS
+		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
 		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index f492d7c338fe..a1bc15cda751 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -235,7 +235,6 @@ machine-$(CONFIG_PLAT_SPEAR)		+= spear
 # by CONFIG_* macro name.
 plat-$(CONFIG_ARCH_OMAP)	+= omap
 plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
-plat-$(CONFIG_ARCH_S5PV210)	+= samsung
 plat-$(CONFIG_PLAT_ORION)	+= orion
 plat-$(CONFIG_PLAT_PXA)		+= pxa
 plat-$(CONFIG_PLAT_S3C24XX)	+= samsung
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 740bdb23f38a..1530946cc672 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -4,7 +4,7 @@
 
 config PLAT_SAMSUNG
 	bool
-	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
+	depends on PLAT_S3C24XX || ARCH_S3C64XX
 	default y
 	select GENERIC_IRQ_CHIP
 	select NO_IOPORT_MAP
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 400a581c918c..16a0e5430b44 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -275,7 +275,7 @@ config MMC_SDHCI_TEGRA
 
 config MMC_SDHCI_S3C
 	tristate "SDHCI support on Samsung S3C SoC"
-	depends on MMC_SDHCI && (PLAT_SAMSUNG || ARCH_EXYNOS)
+	depends on MMC_SDHCI && (PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS)
 	help
 	  This selects the Secure Digital Host Controller Interface (SDHCI)
 	  often referrered to as the HSMMC block in some of the Samsung S3C
diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index e3a2518503ed..8eb738cac0c7 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -394,7 +394,7 @@ config PWM_ROCKCHIP
 
 config PWM_SAMSUNG
 	tristate "Samsung PWM support"
-	depends on PLAT_SAMSUNG || ARCH_EXYNOS
+	depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
 	help
 	  Generic PWM framework driver for Samsung.
 
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 6f7fdcbb9151..355391ee643d 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -625,7 +625,7 @@ config SPI_S3C24XX_FIQ
 
 config SPI_S3C64XX
 	tristate "Samsung S3C64XX series type SPI"
-	depends on (PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST)
+	depends on (PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST)
 	help
 	  SPI driver for Samsung S3C64XX and newer SoCs.
 
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 4789b5d62f63..17f01cf3009c 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -237,7 +237,7 @@ config SERIAL_CLPS711X_CONSOLE
 
 config SERIAL_SAMSUNG
 	tristate "Samsung SoC serial support"
-	depends on PLAT_SAMSUNG || ARCH_EXYNOS
+	depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
 	select SERIAL_CORE
 	help
 	  Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,
diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index 638983123d8f..7a0035dd9995 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 menuconfig SND_SOC_SAMSUNG
 	tristate "ASoC support for Samsung"
-	depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST
+	depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
 	depends on COMMON_CLK
 	select SND_SOC_GENERIC_DMAENGINE_PCM
 	---help---
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 12/36] ARM: s3c64xx: remove mach/hardware.h
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (10 preceding siblings ...)
  2019-10-10 20:29   ` [PATCH 11/36] ARM: s5pv210: split from plat-samsung Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-16 10:09     ` Charles Keepax
  2019-10-10 20:29   ` [PATCH 13/36] ARM: s3c: move regs-spi.h into spi driver Arnd Bergmann
                     ` (22 subsequent siblings)
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, Charles Keepax, Arnd Bergmann, linus.walleij,
	linux-kernel, Mark Brown, linux-arm-kernel

This header is empty and conflicts with the s3c24xx version
of the same file when we merge the two, so stop including it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c64xx/common.c                |  1 -
 arch/arm/mach-s3c64xx/dev-uart.c              |  1 -
 arch/arm/mach-s3c64xx/include/mach/hardware.h | 17 -----------------
 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-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 -
 11 files changed, 27 deletions(-)
 delete mode 100644 arch/arm/mach-s3c64xx/include/mach/hardware.h

diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index 13e91074308a..19d544f6808a 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -36,7 +36,6 @@
 
 #include <mach/map.h>
 #include <mach/irqs.h>
-#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
diff --git a/arch/arm/mach-s3c64xx/dev-uart.c b/arch/arm/mach-s3c64xx/dev-uart.c
index 5fb59ad30008..021a2b7926fa 100644
--- a/arch/arm/mach-s3c64xx/dev-uart.c
+++ b/arch/arm/mach-s3c64xx/dev-uart.c
@@ -15,7 +15,6 @@
 
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 #include <mach/irqs.h>
 
diff --git a/arch/arm/mach-s3c64xx/include/mach/hardware.h b/arch/arm/mach-s3c64xx/include/mach/hardware.h
deleted file mode 100644
index c4ed359474de..000000000000
--- a/arch/arm/mach-s3c64xx/include/mach/hardware.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* linux/arch/arm/mach-s3c6400/include/mach/hardware.h
- *
- * Copyright 2008 Openmoko, Inc.
- * Copyright 2008 Simtec Electronics
- *      Ben Dooks <ben@simtec.co.uk>
- *      http://armlinux.simtec.co.uk/
- *
- * S3C6400 - Hardware support
- */
-
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H __FILE__
-
-/* currently nothing here, placeholder */
-
-#endif /* __ASM_ARCH_IRQ_H */
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c
index 0d3d5befb806..44858c5aea5d 100644
--- a/arch/arm/mach-s3c64xx/mach-anw6410.c
+++ b/arch/arm/mach-s3c64xx/mach-anw6410.c
@@ -30,7 +30,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <asm/irq.h>
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 8ec6a4f5eb05..da5b50981a14 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -44,7 +44,6 @@
 #include <asm/mach-types.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
index bfe9881d12cc..a6634fd9e6c4 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c64xx/mach-hmt.c
@@ -25,7 +25,6 @@
 #include <asm/mach/irq.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 #include <mach/irqs.h>
 
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c
index 13fea5c86ca3..34a00b33fae9 100644
--- a/arch/arm/mach-s3c64xx/mach-ncp.c
+++ b/arch/arm/mach-s3c64xx/mach-ncp.c
@@ -25,7 +25,6 @@
 #include <asm/mach/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <asm/irq.h>
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c
index cbd16843c7d1..885158f0a304 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6400.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c
@@ -23,7 +23,6 @@
 #include <asm/mach/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <plat/devs.h>
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index 908e5aa831c8..95bdcfe95a53 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -45,7 +45,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <mach/irqs.h>
 #include <mach/map.h>
 
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c
index 545eea716db8..81233495d548 100644
--- a/arch/arm/mach-s3c64xx/s3c6400.c
+++ b/arch/arm/mach-s3c64xx/s3c6400.c
@@ -26,7 +26,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 
 #include <plat/cpu-freq.h>
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c
index 47e04e019624..9465a6e0f068 100644
--- a/arch/arm/mach-s3c64xx/s3c6410.c
+++ b/arch/arm/mach-s3c64xx/s3c6410.c
@@ -27,7 +27,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 
 #include <plat/cpu-freq.h>
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 12/36] ARM: s3c64xx: remove mach/hardware.h
  2019-10-10 20:29   ` [PATCH 12/36] ARM: s3c64xx: remove mach/hardware.h Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  2019-10-16 10:09     ` Charles Keepax
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Mark Brown, Charles Keepax, linux-kernel

This header is empty and conflicts with the s3c24xx version
of the same file when we merge the two, so stop including it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c64xx/common.c                |  1 -
 arch/arm/mach-s3c64xx/dev-uart.c              |  1 -
 arch/arm/mach-s3c64xx/include/mach/hardware.h | 17 -----------------
 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-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 -
 11 files changed, 27 deletions(-)
 delete mode 100644 arch/arm/mach-s3c64xx/include/mach/hardware.h

diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index 13e91074308a..19d544f6808a 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -36,7 +36,6 @@
 
 #include <mach/map.h>
 #include <mach/irqs.h>
-#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
diff --git a/arch/arm/mach-s3c64xx/dev-uart.c b/arch/arm/mach-s3c64xx/dev-uart.c
index 5fb59ad30008..021a2b7926fa 100644
--- a/arch/arm/mach-s3c64xx/dev-uart.c
+++ b/arch/arm/mach-s3c64xx/dev-uart.c
@@ -15,7 +15,6 @@
 
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 #include <mach/irqs.h>
 
diff --git a/arch/arm/mach-s3c64xx/include/mach/hardware.h b/arch/arm/mach-s3c64xx/include/mach/hardware.h
deleted file mode 100644
index c4ed359474de..000000000000
--- a/arch/arm/mach-s3c64xx/include/mach/hardware.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* linux/arch/arm/mach-s3c6400/include/mach/hardware.h
- *
- * Copyright 2008 Openmoko, Inc.
- * Copyright 2008 Simtec Electronics
- *      Ben Dooks <ben@simtec.co.uk>
- *      http://armlinux.simtec.co.uk/
- *
- * S3C6400 - Hardware support
- */
-
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H __FILE__
-
-/* currently nothing here, placeholder */
-
-#endif /* __ASM_ARCH_IRQ_H */
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c
index 0d3d5befb806..44858c5aea5d 100644
--- a/arch/arm/mach-s3c64xx/mach-anw6410.c
+++ b/arch/arm/mach-s3c64xx/mach-anw6410.c
@@ -30,7 +30,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <asm/irq.h>
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 8ec6a4f5eb05..da5b50981a14 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -44,7 +44,6 @@
 #include <asm/mach-types.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
index bfe9881d12cc..a6634fd9e6c4 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c64xx/mach-hmt.c
@@ -25,7 +25,6 @@
 #include <asm/mach/irq.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 #include <mach/irqs.h>
 
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c
index 13fea5c86ca3..34a00b33fae9 100644
--- a/arch/arm/mach-s3c64xx/mach-ncp.c
+++ b/arch/arm/mach-s3c64xx/mach-ncp.c
@@ -25,7 +25,6 @@
 #include <asm/mach/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <asm/irq.h>
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c
index cbd16843c7d1..885158f0a304 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6400.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c
@@ -23,7 +23,6 @@
 #include <asm/mach/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <plat/devs.h>
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index 908e5aa831c8..95bdcfe95a53 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -45,7 +45,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <mach/irqs.h>
 #include <mach/map.h>
 
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c
index 545eea716db8..81233495d548 100644
--- a/arch/arm/mach-s3c64xx/s3c6400.c
+++ b/arch/arm/mach-s3c64xx/s3c6400.c
@@ -26,7 +26,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 
 #include <plat/cpu-freq.h>
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c
index 47e04e019624..9465a6e0f068 100644
--- a/arch/arm/mach-s3c64xx/s3c6410.c
+++ b/arch/arm/mach-s3c64xx/s3c6410.c
@@ -27,7 +27,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 
 #include <plat/cpu-freq.h>
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 13/36] ARM: s3c: move regs-spi.h into spi driver
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (11 preceding siblings ...)
  2019-10-10 20:29   ` [PATCH 12/36] ARM: s3c64xx: remove mach/hardware.h Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 12:32     ` Krzysztof Kozlowski
  2019-10-10 20:29   ` [PATCH 14/36] ARM: s3c: move irqchip driver back into platform Arnd Bergmann
                     ` (21 subsequent siblings)
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Andi Shyti, Mark Brown
  Cc: linux-samsung-soc, Arnd Bergmann, linus.walleij, linux-kernel,
	linux-spi, linux-arm-kernel

The file is mostly specific to the driver, the few bits that
are actually used by the platform code get moved to mach/map.h
instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/include/mach/map.h                      | 2 ++
 arch/arm/mach-s3c24xx/s3c2412.c                               | 1 -
 arch/arm/plat-samsung/devs.c                                  | 1 -
 drivers/spi/spi-s3c24xx-fiq.S                                 | 4 +++-
 .../include/plat/regs-spi.h => drivers/spi/spi-s3c24xx-regs.h | 3 ---
 drivers/spi/spi-s3c24xx.c                                     | 3 +--
 6 files changed, 6 insertions(+), 8 deletions(-)
 rename arch/arm/plat-samsung/include/plat/regs-spi.h => drivers/spi/spi-s3c24xx-regs.h (95%)

diff --git a/arch/arm/mach-s3c24xx/include/mach/map.h b/arch/arm/mach-s3c24xx/include/mach/map.h
index bca93112f57d..a20c9fd0d855 100644
--- a/arch/arm/mach-s3c24xx/include/mach/map.h
+++ b/arch/arm/mach-s3c24xx/include/mach/map.h
@@ -86,6 +86,8 @@
 #define S3C2410_PA_SPI	   (0x59000000)
 #define S3C2443_PA_SPI0		(0x52000000)
 #define S3C2443_PA_SPI1		S3C2410_PA_SPI
+#define S3C2410_SPI1		(0x20)
+#define S3C2412_SPI1		(0x100)
 
 /* SDI */
 #define S3C2410_PA_SDI	   (0x5A000000)
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index 8fe4d4670dcb..c3fb3e6c0dd8 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -37,7 +37,6 @@
 #include <plat/cpu-freq.h>
 #include <plat/devs.h>
 #include <plat/pm.h>
-#include <plat/regs-spi.h>
 
 #include "common.h"
 #include "nand-core.h"
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 6e4c1cb07104..fd94a35e22f8 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -59,7 +59,6 @@
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/usb-ohci-s3c2410.h>
 #include <plat/usb-phy.h>
-#include <plat/regs-spi.h>
 #include <linux/platform_data/asoc-s3c.h>
 #include <linux/platform_data/spi-s3c64xx.h>
 
diff --git a/drivers/spi/spi-s3c24xx-fiq.S b/drivers/spi/spi-s3c24xx-fiq.S
index e95d6282109e..9d5f8f1e5e81 100644
--- a/drivers/spi/spi-s3c24xx-fiq.S
+++ b/drivers/spi/spi-s3c24xx-fiq.S
@@ -12,10 +12,12 @@
 
 #include <mach/map.h>
 #include <mach/regs-irq.h>
-#include <plat/regs-spi.h>
 
 #include "spi-s3c24xx-fiq.h"
 
+#define S3C2410_SPTDAT           (0x10)
+#define S3C2410_SPRDAT           (0x14)
+
 	.text
 
 	@ entry to these routines is as follows, with the register names
diff --git a/arch/arm/plat-samsung/include/plat/regs-spi.h b/drivers/spi/spi-s3c24xx-regs.h
similarity index 95%
rename from arch/arm/plat-samsung/include/plat/regs-spi.h
rename to drivers/spi/spi-s3c24xx-regs.h
index 607844311566..37b93ff7c7fe 100644
--- a/arch/arm/plat-samsung/include/plat/regs-spi.h
+++ b/drivers/spi/spi-s3c24xx-regs.h
@@ -8,9 +8,6 @@
 #ifndef __ASM_ARCH_REGS_SPI_H
 #define __ASM_ARCH_REGS_SPI_H
 
-#define S3C2410_SPI1		(0x20)
-#define S3C2412_SPI1		(0x100)
-
 #define S3C2410_SPCON		(0x00)
 
 #define S3C2410_SPCON_SMOD_DMA	(2 << 5)	/* DMA mode */
diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
index 2d6e37f25e2d..2f395e4861f6 100644
--- a/drivers/spi/spi-s3c24xx.c
+++ b/drivers/spi/spi-s3c24xx.c
@@ -21,10 +21,9 @@
 #include <linux/spi/s3c24xx.h>
 #include <linux/module.h>
 
-#include <plat/regs-spi.h>
-
 #include <asm/fiq.h>
 
+#include "spi-s3c24xx-regs.h"
 #include "spi-s3c24xx-fiq.h"
 
 /**
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 13/36] ARM: s3c: move regs-spi.h into spi driver
  2019-10-10 20:29   ` [PATCH 13/36] ARM: s3c: move regs-spi.h into spi driver Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 12:32     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Andi Shyti, Mark Brown
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel, linux-spi

The file is mostly specific to the driver, the few bits that
are actually used by the platform code get moved to mach/map.h
instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/include/mach/map.h                      | 2 ++
 arch/arm/mach-s3c24xx/s3c2412.c                               | 1 -
 arch/arm/plat-samsung/devs.c                                  | 1 -
 drivers/spi/spi-s3c24xx-fiq.S                                 | 4 +++-
 .../include/plat/regs-spi.h => drivers/spi/spi-s3c24xx-regs.h | 3 ---
 drivers/spi/spi-s3c24xx.c                                     | 3 +--
 6 files changed, 6 insertions(+), 8 deletions(-)
 rename arch/arm/plat-samsung/include/plat/regs-spi.h => drivers/spi/spi-s3c24xx-regs.h (95%)

diff --git a/arch/arm/mach-s3c24xx/include/mach/map.h b/arch/arm/mach-s3c24xx/include/mach/map.h
index bca93112f57d..a20c9fd0d855 100644
--- a/arch/arm/mach-s3c24xx/include/mach/map.h
+++ b/arch/arm/mach-s3c24xx/include/mach/map.h
@@ -86,6 +86,8 @@
 #define S3C2410_PA_SPI	   (0x59000000)
 #define S3C2443_PA_SPI0		(0x52000000)
 #define S3C2443_PA_SPI1		S3C2410_PA_SPI
+#define S3C2410_SPI1		(0x20)
+#define S3C2412_SPI1		(0x100)
 
 /* SDI */
 #define S3C2410_PA_SDI	   (0x5A000000)
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index 8fe4d4670dcb..c3fb3e6c0dd8 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -37,7 +37,6 @@
 #include <plat/cpu-freq.h>
 #include <plat/devs.h>
 #include <plat/pm.h>
-#include <plat/regs-spi.h>
 
 #include "common.h"
 #include "nand-core.h"
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 6e4c1cb07104..fd94a35e22f8 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -59,7 +59,6 @@
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/usb-ohci-s3c2410.h>
 #include <plat/usb-phy.h>
-#include <plat/regs-spi.h>
 #include <linux/platform_data/asoc-s3c.h>
 #include <linux/platform_data/spi-s3c64xx.h>
 
diff --git a/drivers/spi/spi-s3c24xx-fiq.S b/drivers/spi/spi-s3c24xx-fiq.S
index e95d6282109e..9d5f8f1e5e81 100644
--- a/drivers/spi/spi-s3c24xx-fiq.S
+++ b/drivers/spi/spi-s3c24xx-fiq.S
@@ -12,10 +12,12 @@
 
 #include <mach/map.h>
 #include <mach/regs-irq.h>
-#include <plat/regs-spi.h>
 
 #include "spi-s3c24xx-fiq.h"
 
+#define S3C2410_SPTDAT           (0x10)
+#define S3C2410_SPRDAT           (0x14)
+
 	.text
 
 	@ entry to these routines is as follows, with the register names
diff --git a/arch/arm/plat-samsung/include/plat/regs-spi.h b/drivers/spi/spi-s3c24xx-regs.h
similarity index 95%
rename from arch/arm/plat-samsung/include/plat/regs-spi.h
rename to drivers/spi/spi-s3c24xx-regs.h
index 607844311566..37b93ff7c7fe 100644
--- a/arch/arm/plat-samsung/include/plat/regs-spi.h
+++ b/drivers/spi/spi-s3c24xx-regs.h
@@ -8,9 +8,6 @@
 #ifndef __ASM_ARCH_REGS_SPI_H
 #define __ASM_ARCH_REGS_SPI_H
 
-#define S3C2410_SPI1		(0x20)
-#define S3C2412_SPI1		(0x100)
-
 #define S3C2410_SPCON		(0x00)
 
 #define S3C2410_SPCON_SMOD_DMA	(2 << 5)	/* DMA mode */
diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
index 2d6e37f25e2d..2f395e4861f6 100644
--- a/drivers/spi/spi-s3c24xx.c
+++ b/drivers/spi/spi-s3c24xx.c
@@ -21,10 +21,9 @@
 #include <linux/spi/s3c24xx.h>
 #include <linux/module.h>
 
-#include <plat/regs-spi.h>
-
 #include <asm/fiq.h>
 
+#include "spi-s3c24xx-regs.h"
 #include "spi-s3c24xx-fiq.h"
 
 /**
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 14/36] ARM: s3c: move irqchip driver back into platform
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (12 preceding siblings ...)
  2019-10-10 20:29   ` [PATCH 13/36] ARM: s3c: move regs-spi.h into spi driver Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-10 20:29   ` [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung Arnd Bergmann
                     ` (20 subsequent siblings)
  34 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Thomas Gleixner, Jason Cooper,
	Marc Zyngier
  Cc: linus.walleij, linux-samsung-soc, Arnd Bergmann,
	linux-arm-kernel, linux-kernel

It was a good idea to move it out at first, but the irqchip code
is still tightly connected to the s3c24xx platform code and uses
multiple internal header files, so just move it back for the
time being to avoid those dependencies.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/Makefile                           | 1 +
 {drivers/irqchip => arch/arm/mach-s3c24xx}/irq-s3c24xx.c | 0
 drivers/irqchip/Makefile                                 | 1 -
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename {drivers/irqchip => arch/arm/mach-s3c24xx}/irq-s3c24xx.c (100%)

diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index 6692f2de71b2..8c31f84f8c97 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -8,6 +8,7 @@
 # core
 
 obj-y				+= common.o
+obj-y				+= irq-s3c24xx.o
 
 obj-$(CONFIG_CPU_S3C2410)	+= s3c2410.o
 obj-$(CONFIG_S3C2410_PLL)	+= pll-s3c2410.o
diff --git a/drivers/irqchip/irq-s3c24xx.c b/arch/arm/mach-s3c24xx/irq-s3c24xx.c
similarity index 100%
rename from drivers/irqchip/irq-s3c24xx.c
rename to arch/arm/mach-s3c24xx/irq-s3c24xx.c
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index cc7c43932f16..92864e496251 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -16,7 +16,6 @@ obj-$(CONFIG_ARCH_LPC32XX)		+= irq-lpc32xx.o
 obj-$(CONFIG_ARCH_MMP)			+= irq-mmp.o
 obj-$(CONFIG_IRQ_MXS)			+= irq-mxs.o
 obj-$(CONFIG_ARCH_TEGRA)		+= irq-tegra.o
-obj-$(CONFIG_ARCH_S3C24XX)		+= irq-s3c24xx.o
 obj-$(CONFIG_DW_APB_ICTL)		+= irq-dw-apb-ictl.o
 obj-$(CONFIG_CLPS711X_IRQCHIP)		+= irq-clps711x.o
 obj-$(CONFIG_OMPIC)			+= irq-ompic.o
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 14/36] ARM: s3c: move irqchip driver back into platform
  2019-10-10 20:29   ` [PATCH 14/36] ARM: s3c: move irqchip driver back into platform Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Thomas Gleixner, Jason Cooper,
	Marc Zyngier
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel

It was a good idea to move it out at first, but the irqchip code
is still tightly connected to the s3c24xx platform code and uses
multiple internal header files, so just move it back for the
time being to avoid those dependencies.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/Makefile                           | 1 +
 {drivers/irqchip => arch/arm/mach-s3c24xx}/irq-s3c24xx.c | 0
 drivers/irqchip/Makefile                                 | 1 -
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename {drivers/irqchip => arch/arm/mach-s3c24xx}/irq-s3c24xx.c (100%)

diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index 6692f2de71b2..8c31f84f8c97 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -8,6 +8,7 @@
 # core
 
 obj-y				+= common.o
+obj-y				+= irq-s3c24xx.o
 
 obj-$(CONFIG_CPU_S3C2410)	+= s3c2410.o
 obj-$(CONFIG_S3C2410_PLL)	+= pll-s3c2410.o
diff --git a/drivers/irqchip/irq-s3c24xx.c b/arch/arm/mach-s3c24xx/irq-s3c24xx.c
similarity index 100%
rename from drivers/irqchip/irq-s3c24xx.c
rename to arch/arm/mach-s3c24xx/irq-s3c24xx.c
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index cc7c43932f16..92864e496251 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -16,7 +16,6 @@ obj-$(CONFIG_ARCH_LPC32XX)		+= irq-lpc32xx.o
 obj-$(CONFIG_ARCH_MMP)			+= irq-mmp.o
 obj-$(CONFIG_IRQ_MXS)			+= irq-mxs.o
 obj-$(CONFIG_ARCH_TEGRA)		+= irq-tegra.o
-obj-$(CONFIG_ARCH_S3C24XX)		+= irq-s3c24xx.o
 obj-$(CONFIG_DW_APB_ICTL)		+= irq-dw-apb-ictl.o
 obj-$(CONFIG_CLPS711X_IRQCHIP)		+= irq-clps711x.o
 obj-$(CONFIG_OMPIC)			+= irq-ompic.o
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (13 preceding siblings ...)
  2019-10-10 20:29   ` [PATCH 14/36] ARM: s3c: move irqchip driver back into platform Arnd Bergmann
@ 2019-10-10 20:29   ` Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
                       ` (2 more replies)
  2019-10-10 20:30   ` [PATCH 16/36] ARM: s3c: move spi fiq handler into platform Arnd Bergmann
                     ` (19 subsequent siblings)
  34 siblings, 3 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Jean Delvare, Guenter Roeck,
	Dmitry Torokhov, Sebastian Reichel
  Cc: linux-hwmon, linux-samsung-soc, Arnd Bergmann, linux-pm,
	linus.walleij, linux-kernel, linux-input, linux-arm-kernel

There are multiple drivers using the private adc interface.
It seems unlikely that they would ever get converted to iio,
so make the current state official by making the header file
global.

The s3c2410_ts driver needs a couple of register definitions
as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c64xx/mach-crag6410.c         |  2 +-
 arch/arm/mach-s3c64xx/mach-mini6410.c         |  2 +-
 arch/arm/mach-s3c64xx/mach-real6410.c         |  2 +-
 arch/arm/mach-s3c64xx/mach-smdk6410.c         |  2 +-
 arch/arm/plat-samsung/adc.c                   |  2 +-
 arch/arm/plat-samsung/devs.c                  |  2 +-
 drivers/hwmon/s3c-hwmon.c                     |  2 +-
 drivers/input/touchscreen/s3c2410_ts.c        | 37 ++++++++++++++++++-
 drivers/power/supply/s3c_adc_battery.c        |  2 +-
 .../linux/soc/samsung/s3c-adc.h               |  0
 10 files changed, 43 insertions(+), 10 deletions(-)
 rename arch/arm/plat-samsung/include/plat/adc.h => include/linux/soc/samsung/s3c-adc.h (100%)

diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index da5b50981a14..133453562d23 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -57,7 +57,7 @@
 #include <plat/keypad.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <plat/pm.h>
 #include <plat/samsung-time.h>
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
index 0dd36ae49e6a..c7140300bd3f 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
@@ -27,7 +27,7 @@
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/fb.h>
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index 0ff88b6859c4..f55097fde94c 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -29,7 +29,7 @@
 #include <mach/gpio-samsung.h>
 #include <mach/irqs.h>
 
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/fb.h>
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index 95bdcfe95a53..3042f6cbffd9 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -60,7 +60,7 @@
 
 #include <plat/devs.h>
 #include <plat/cpu.h>
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
 #include <plat/keypad.h>
 #include <plat/samsung-time.h>
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
index ee3d5c989a76..623a9774cc52 100644
--- a/arch/arm/plat-samsung/adc.c
+++ b/arch/arm/plat-samsung/adc.c
@@ -20,7 +20,7 @@
 #include <linux/regulator/consumer.h>
 
 #include <plat/regs-adc.h>
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 
 /* This driver is designed to control the usage of the ADC block between
  * the touchscreen and any other drivers that may need to use it, such as
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index fd94a35e22f8..ddd90f0bb380 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -44,7 +44,7 @@
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/ata-samsung_cf.h>
 #include <plat/fb.h>
 #include <plat/fb-s3c2410.h>
diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c
index b490fe3d2ee8..f2703c5460d0 100644
--- a/drivers/hwmon/s3c-hwmon.c
+++ b/drivers/hwmon/s3c-hwmon.c
@@ -20,7 +20,7 @@
 #include <linux/hwmon.h>
 #include <linux/hwmon-sysfs.h>
 
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/hwmon-s3c.h>
 
 struct s3c_hwmon_attr {
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
index b346e7cafd62..1a5a178ea286 100644
--- a/drivers/input/touchscreen/s3c2410_ts.c
+++ b/drivers/input/touchscreen/s3c2410_ts.c
@@ -21,10 +21,43 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 
-#include <plat/adc.h>
-#include <plat/regs-adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
 
+#define	S3C2410_ADCCON			(0x00)
+#define	S3C2410_ADCTSC			(0x04)
+#define	S3C2410_ADCDLY			(0x08)
+#define	S3C2410_ADCDAT0			(0x0C)
+#define	S3C2410_ADCDAT1			(0x10)
+#define	S3C64XX_ADCUPDN			(0x14)
+#define	S3C2443_ADCMUX			(0x18)
+#define	S3C64XX_ADCCLRINT		(0x18)
+#define	S5P_ADCMUX			(0x1C)
+#define	S3C64XX_ADCCLRINTPNDNUP		(0x20)
+
+/* ADCTSC Register Bits */
+#define S3C2443_ADCTSC_UD_SEN		(1 << 8)
+#define S3C2410_ADCTSC_YM_SEN		(1<<7)
+#define S3C2410_ADCTSC_YP_SEN		(1<<6)
+#define S3C2410_ADCTSC_XM_SEN		(1<<5)
+#define S3C2410_ADCTSC_XP_SEN		(1<<4)
+#define S3C2410_ADCTSC_PULL_UP_DISABLE	(1<<3)
+#define S3C2410_ADCTSC_AUTO_PST		(1<<2)
+#define S3C2410_ADCTSC_XY_PST(x)	(((x)&0x3)<<0)
+
+/* ADCDAT0 Bits */
+#define S3C2410_ADCDAT0_UPDOWN		(1<<15)
+#define S3C2410_ADCDAT0_AUTO_PST	(1<<14)
+#define S3C2410_ADCDAT0_XY_PST		(0x3<<12)
+#define S3C2410_ADCDAT0_XPDATA_MASK	(0x03FF)
+
+/* ADCDAT1 Bits */
+#define S3C2410_ADCDAT1_UPDOWN		(1<<15)
+#define S3C2410_ADCDAT1_AUTO_PST	(1<<14)
+#define S3C2410_ADCDAT1_XY_PST		(0x3<<12)
+#define S3C2410_ADCDAT1_YPDATA_MASK	(0x03FF)
+
+
 #define TSC_SLEEP  (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0))
 
 #define INT_DOWN	(0)
diff --git a/drivers/power/supply/s3c_adc_battery.c b/drivers/power/supply/s3c_adc_battery.c
index 3d00b35cafc9..60b7f41ab063 100644
--- a/drivers/power/supply/s3c_adc_battery.c
+++ b/drivers/power/supply/s3c_adc_battery.c
@@ -22,7 +22,7 @@
 #include <linux/init.h>
 #include <linux/module.h>
 
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 
 #define BAT_POLL_INTERVAL		10000 /* ms */
 #define JITTER_DELAY			500 /* ms */
diff --git a/arch/arm/plat-samsung/include/plat/adc.h b/include/linux/soc/samsung/s3c-adc.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/adc.h
rename to include/linux/soc/samsung/s3c-adc.h
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung
  2019-10-10 20:29   ` [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung Arnd Bergmann
@ 2019-10-10 20:29     ` Arnd Bergmann
  2019-10-10 22:20     ` Guenter Roeck
  2019-10-23 12:37     ` Krzysztof Kozlowski
  2 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:29 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Jean Delvare, Guenter Roeck,
	Dmitry Torokhov, Sebastian Reichel
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel, linux-hwmon, linux-input, linux-pm

There are multiple drivers using the private adc interface.
It seems unlikely that they would ever get converted to iio,
so make the current state official by making the header file
global.

The s3c2410_ts driver needs a couple of register definitions
as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c64xx/mach-crag6410.c         |  2 +-
 arch/arm/mach-s3c64xx/mach-mini6410.c         |  2 +-
 arch/arm/mach-s3c64xx/mach-real6410.c         |  2 +-
 arch/arm/mach-s3c64xx/mach-smdk6410.c         |  2 +-
 arch/arm/plat-samsung/adc.c                   |  2 +-
 arch/arm/plat-samsung/devs.c                  |  2 +-
 drivers/hwmon/s3c-hwmon.c                     |  2 +-
 drivers/input/touchscreen/s3c2410_ts.c        | 37 ++++++++++++++++++-
 drivers/power/supply/s3c_adc_battery.c        |  2 +-
 .../linux/soc/samsung/s3c-adc.h               |  0
 10 files changed, 43 insertions(+), 10 deletions(-)
 rename arch/arm/plat-samsung/include/plat/adc.h => include/linux/soc/samsung/s3c-adc.h (100%)

diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index da5b50981a14..133453562d23 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -57,7 +57,7 @@
 #include <plat/keypad.h>
 #include <plat/devs.h>
 #include <plat/cpu.h>
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <plat/pm.h>
 #include <plat/samsung-time.h>
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
index 0dd36ae49e6a..c7140300bd3f 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
@@ -27,7 +27,7 @@
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/fb.h>
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index 0ff88b6859c4..f55097fde94c 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -29,7 +29,7 @@
 #include <mach/gpio-samsung.h>
 #include <mach/irqs.h>
 
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/fb.h>
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index 95bdcfe95a53..3042f6cbffd9 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -60,7 +60,7 @@
 
 #include <plat/devs.h>
 #include <plat/cpu.h>
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
 #include <plat/keypad.h>
 #include <plat/samsung-time.h>
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
index ee3d5c989a76..623a9774cc52 100644
--- a/arch/arm/plat-samsung/adc.c
+++ b/arch/arm/plat-samsung/adc.c
@@ -20,7 +20,7 @@
 #include <linux/regulator/consumer.h>
 
 #include <plat/regs-adc.h>
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 
 /* This driver is designed to control the usage of the ADC block between
  * the touchscreen and any other drivers that may need to use it, such as
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index fd94a35e22f8..ddd90f0bb380 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -44,7 +44,7 @@
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/ata-samsung_cf.h>
 #include <plat/fb.h>
 #include <plat/fb-s3c2410.h>
diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c
index b490fe3d2ee8..f2703c5460d0 100644
--- a/drivers/hwmon/s3c-hwmon.c
+++ b/drivers/hwmon/s3c-hwmon.c
@@ -20,7 +20,7 @@
 #include <linux/hwmon.h>
 #include <linux/hwmon-sysfs.h>
 
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/hwmon-s3c.h>
 
 struct s3c_hwmon_attr {
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
index b346e7cafd62..1a5a178ea286 100644
--- a/drivers/input/touchscreen/s3c2410_ts.c
+++ b/drivers/input/touchscreen/s3c2410_ts.c
@@ -21,10 +21,43 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 
-#include <plat/adc.h>
-#include <plat/regs-adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
 
+#define	S3C2410_ADCCON			(0x00)
+#define	S3C2410_ADCTSC			(0x04)
+#define	S3C2410_ADCDLY			(0x08)
+#define	S3C2410_ADCDAT0			(0x0C)
+#define	S3C2410_ADCDAT1			(0x10)
+#define	S3C64XX_ADCUPDN			(0x14)
+#define	S3C2443_ADCMUX			(0x18)
+#define	S3C64XX_ADCCLRINT		(0x18)
+#define	S5P_ADCMUX			(0x1C)
+#define	S3C64XX_ADCCLRINTPNDNUP		(0x20)
+
+/* ADCTSC Register Bits */
+#define S3C2443_ADCTSC_UD_SEN		(1 << 8)
+#define S3C2410_ADCTSC_YM_SEN		(1<<7)
+#define S3C2410_ADCTSC_YP_SEN		(1<<6)
+#define S3C2410_ADCTSC_XM_SEN		(1<<5)
+#define S3C2410_ADCTSC_XP_SEN		(1<<4)
+#define S3C2410_ADCTSC_PULL_UP_DISABLE	(1<<3)
+#define S3C2410_ADCTSC_AUTO_PST		(1<<2)
+#define S3C2410_ADCTSC_XY_PST(x)	(((x)&0x3)<<0)
+
+/* ADCDAT0 Bits */
+#define S3C2410_ADCDAT0_UPDOWN		(1<<15)
+#define S3C2410_ADCDAT0_AUTO_PST	(1<<14)
+#define S3C2410_ADCDAT0_XY_PST		(0x3<<12)
+#define S3C2410_ADCDAT0_XPDATA_MASK	(0x03FF)
+
+/* ADCDAT1 Bits */
+#define S3C2410_ADCDAT1_UPDOWN		(1<<15)
+#define S3C2410_ADCDAT1_AUTO_PST	(1<<14)
+#define S3C2410_ADCDAT1_XY_PST		(0x3<<12)
+#define S3C2410_ADCDAT1_YPDATA_MASK	(0x03FF)
+
+
 #define TSC_SLEEP  (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0))
 
 #define INT_DOWN	(0)
diff --git a/drivers/power/supply/s3c_adc_battery.c b/drivers/power/supply/s3c_adc_battery.c
index 3d00b35cafc9..60b7f41ab063 100644
--- a/drivers/power/supply/s3c_adc_battery.c
+++ b/drivers/power/supply/s3c_adc_battery.c
@@ -22,7 +22,7 @@
 #include <linux/init.h>
 #include <linux/module.h>
 
-#include <plat/adc.h>
+#include <linux/soc/samsung/s3c-adc.h>
 
 #define BAT_POLL_INTERVAL		10000 /* ms */
 #define JITTER_DELAY			500 /* ms */
diff --git a/arch/arm/plat-samsung/include/plat/adc.h b/include/linux/soc/samsung/s3c-adc.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/adc.h
rename to include/linux/soc/samsung/s3c-adc.h
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 16/36] ARM: s3c: move spi fiq handler into platform
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (14 preceding siblings ...)
  2019-10-10 20:29   ` [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-10 20:30   ` [PATCH 17/36] ARM: s3c: h1940-audio: turn into platform driver Arnd Bergmann
                     ` (18 subsequent siblings)
  34 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Mark Brown, Andi Shyti
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel, linux-spi

The fiq handler needs access to some register definitions that
should not be used directly by device drivers.

Since this is closely related to the irqchip driver anyway,
move it into the same place.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/Makefile                           | 2 ++
 arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c          | 9 +++++++++
 .../arm/mach-s3c24xx/irq-s3c24xx-fiq.S                   | 2 +-
 drivers/spi/Makefile                                     | 1 -
 drivers/spi/spi-s3c24xx.c                                | 7 +------
 .../spi-s3c24xx-fiq.h => include/linux/spi/s3c24xx-fiq.h | 5 +++++
 6 files changed, 18 insertions(+), 8 deletions(-)
 create mode 100644 arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c
 rename drivers/spi/spi-s3c24xx-fiq.S => arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S (98%)
 rename drivers/spi/spi-s3c24xx-fiq.h => include/linux/spi/s3c24xx-fiq.h (78%)

diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index 8c31f84f8c97..695573df00b1 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -9,6 +9,8 @@
 
 obj-y				+= common.o
 obj-y				+= irq-s3c24xx.o
+obj-$(CONFIG_SPI_S3C24XX_FIQ)	+= irq-s3c24xx-fiq.o
+obj-$(CONFIG_SPI_S3C24XX_FIQ)	+= irq-s3c24xx-fiq-exports.o
 
 obj-$(CONFIG_CPU_S3C2410)	+= s3c2410.o
 obj-$(CONFIG_S3C2410_PLL)	+= pll-s3c2410.o
diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c b/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c
new file mode 100644
index 000000000000..ef2d1f664e67
--- /dev/null
+++ b/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <linux/stddef.h>
+#include <linux/export.h>
+#include <linux/spi/s3c24xx-fiq.h>
+
+EXPORT_SYMBOL(s3c24xx_spi_fiq_rx);
+EXPORT_SYMBOL(s3c24xx_spi_fiq_txrx);
+EXPORT_SYMBOL(s3c24xx_spi_fiq_tx);
diff --git a/drivers/spi/spi-s3c24xx-fiq.S b/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S
similarity index 98%
rename from drivers/spi/spi-s3c24xx-fiq.S
rename to arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S
index 9d5f8f1e5e81..2a84535a14fd 100644
--- a/drivers/spi/spi-s3c24xx-fiq.S
+++ b/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S
@@ -13,7 +13,7 @@
 #include <mach/map.h>
 #include <mach/regs-irq.h>
 
-#include "spi-s3c24xx-fiq.h"
+#include <linux/spi/s3c24xx-fiq.h>
 
 #define S3C2410_SPTDAT           (0x10)
 #define S3C2410_SPRDAT           (0x14)
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index bb49c9e6d0a0..4bcbbd35d2e8 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -89,7 +89,6 @@ obj-$(CONFIG_SPI_RB4XX)			+= spi-rb4xx.o
 obj-$(CONFIG_SPI_RSPI)			+= spi-rspi.o
 obj-$(CONFIG_SPI_S3C24XX)		+= spi-s3c24xx-hw.o
 spi-s3c24xx-hw-y			:= spi-s3c24xx.o
-spi-s3c24xx-hw-$(CONFIG_SPI_S3C24XX_FIQ) += spi-s3c24xx-fiq.o
 obj-$(CONFIG_SPI_S3C64XX)		+= spi-s3c64xx.o
 obj-$(CONFIG_SPI_SC18IS602)		+= spi-sc18is602.o
 obj-$(CONFIG_SPI_SH)			+= spi-sh.o
diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
index 2f395e4861f6..464146fc8420 100644
--- a/drivers/spi/spi-s3c24xx.c
+++ b/drivers/spi/spi-s3c24xx.c
@@ -19,12 +19,12 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/spi_bitbang.h>
 #include <linux/spi/s3c24xx.h>
+#include <linux/spi/s3c24xx-fiq.h>
 #include <linux/module.h>
 
 #include <asm/fiq.h>
 
 #include "spi-s3c24xx-regs.h"
-#include "spi-s3c24xx-fiq.h"
 
 /**
  * s3c24xx_spi_devstate - per device data
@@ -229,10 +229,6 @@ struct spi_fiq_code {
 	u8	data[0];
 };
 
-extern struct spi_fiq_code s3c24xx_spi_fiq_txrx;
-extern struct spi_fiq_code s3c24xx_spi_fiq_tx;
-extern struct spi_fiq_code s3c24xx_spi_fiq_rx;
-
 /**
  * ack_bit - turn IRQ into IRQ acknowledgement bit
  * @irq: The interrupt number
@@ -282,7 +278,6 @@ static void s3c24xx_spi_tryfiq(struct s3c24xx_spi *hw)
 	regs.uregs[fiq_rrx]  = (long)hw->rx;
 	regs.uregs[fiq_rtx]  = (long)hw->tx + 1;
 	regs.uregs[fiq_rcount] = hw->len - 1;
-	regs.uregs[fiq_rirq] = (long)S3C24XX_VA_IRQ;
 
 	set_fiq_regs(&regs);
 
diff --git a/drivers/spi/spi-s3c24xx-fiq.h b/include/linux/spi/s3c24xx-fiq.h
similarity index 78%
rename from drivers/spi/spi-s3c24xx-fiq.h
rename to include/linux/spi/s3c24xx-fiq.h
index 7786b0ea56ec..954452618dfe 100644
--- a/drivers/spi/spi-s3c24xx-fiq.h
+++ b/include/linux/spi/s3c24xx-fiq.h
@@ -12,6 +12,11 @@
 #ifdef __ASSEMBLY__
 #define __REG_NR(x)     r##x
 #else
+
+extern struct spi_fiq_code s3c24xx_spi_fiq_txrx;
+extern struct spi_fiq_code s3c24xx_spi_fiq_tx;
+extern struct spi_fiq_code s3c24xx_spi_fiq_rx;
+
 #define __REG_NR(x)     (x)
 #endif
 
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 16/36] ARM: s3c: move spi fiq handler into platform
  2019-10-10 20:30   ` [PATCH 16/36] ARM: s3c: move spi fiq handler into platform Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Mark Brown, Andi Shyti
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel, linux-spi

The fiq handler needs access to some register definitions that
should not be used directly by device drivers.

Since this is closely related to the irqchip driver anyway,
move it into the same place.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/Makefile                           | 2 ++
 arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c          | 9 +++++++++
 .../arm/mach-s3c24xx/irq-s3c24xx-fiq.S                   | 2 +-
 drivers/spi/Makefile                                     | 1 -
 drivers/spi/spi-s3c24xx.c                                | 7 +------
 .../spi-s3c24xx-fiq.h => include/linux/spi/s3c24xx-fiq.h | 5 +++++
 6 files changed, 18 insertions(+), 8 deletions(-)
 create mode 100644 arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c
 rename drivers/spi/spi-s3c24xx-fiq.S => arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S (98%)
 rename drivers/spi/spi-s3c24xx-fiq.h => include/linux/spi/s3c24xx-fiq.h (78%)

diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index 8c31f84f8c97..695573df00b1 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -9,6 +9,8 @@
 
 obj-y				+= common.o
 obj-y				+= irq-s3c24xx.o
+obj-$(CONFIG_SPI_S3C24XX_FIQ)	+= irq-s3c24xx-fiq.o
+obj-$(CONFIG_SPI_S3C24XX_FIQ)	+= irq-s3c24xx-fiq-exports.o
 
 obj-$(CONFIG_CPU_S3C2410)	+= s3c2410.o
 obj-$(CONFIG_S3C2410_PLL)	+= pll-s3c2410.o
diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c b/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c
new file mode 100644
index 000000000000..ef2d1f664e67
--- /dev/null
+++ b/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <linux/stddef.h>
+#include <linux/export.h>
+#include <linux/spi/s3c24xx-fiq.h>
+
+EXPORT_SYMBOL(s3c24xx_spi_fiq_rx);
+EXPORT_SYMBOL(s3c24xx_spi_fiq_txrx);
+EXPORT_SYMBOL(s3c24xx_spi_fiq_tx);
diff --git a/drivers/spi/spi-s3c24xx-fiq.S b/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S
similarity index 98%
rename from drivers/spi/spi-s3c24xx-fiq.S
rename to arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S
index 9d5f8f1e5e81..2a84535a14fd 100644
--- a/drivers/spi/spi-s3c24xx-fiq.S
+++ b/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S
@@ -13,7 +13,7 @@
 #include <mach/map.h>
 #include <mach/regs-irq.h>
 
-#include "spi-s3c24xx-fiq.h"
+#include <linux/spi/s3c24xx-fiq.h>
 
 #define S3C2410_SPTDAT           (0x10)
 #define S3C2410_SPRDAT           (0x14)
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index bb49c9e6d0a0..4bcbbd35d2e8 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -89,7 +89,6 @@ obj-$(CONFIG_SPI_RB4XX)			+= spi-rb4xx.o
 obj-$(CONFIG_SPI_RSPI)			+= spi-rspi.o
 obj-$(CONFIG_SPI_S3C24XX)		+= spi-s3c24xx-hw.o
 spi-s3c24xx-hw-y			:= spi-s3c24xx.o
-spi-s3c24xx-hw-$(CONFIG_SPI_S3C24XX_FIQ) += spi-s3c24xx-fiq.o
 obj-$(CONFIG_SPI_S3C64XX)		+= spi-s3c64xx.o
 obj-$(CONFIG_SPI_SC18IS602)		+= spi-sc18is602.o
 obj-$(CONFIG_SPI_SH)			+= spi-sh.o
diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
index 2f395e4861f6..464146fc8420 100644
--- a/drivers/spi/spi-s3c24xx.c
+++ b/drivers/spi/spi-s3c24xx.c
@@ -19,12 +19,12 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/spi_bitbang.h>
 #include <linux/spi/s3c24xx.h>
+#include <linux/spi/s3c24xx-fiq.h>
 #include <linux/module.h>
 
 #include <asm/fiq.h>
 
 #include "spi-s3c24xx-regs.h"
-#include "spi-s3c24xx-fiq.h"
 
 /**
  * s3c24xx_spi_devstate - per device data
@@ -229,10 +229,6 @@ struct spi_fiq_code {
 	u8	data[0];
 };
 
-extern struct spi_fiq_code s3c24xx_spi_fiq_txrx;
-extern struct spi_fiq_code s3c24xx_spi_fiq_tx;
-extern struct spi_fiq_code s3c24xx_spi_fiq_rx;
-
 /**
  * ack_bit - turn IRQ into IRQ acknowledgement bit
  * @irq: The interrupt number
@@ -282,7 +278,6 @@ static void s3c24xx_spi_tryfiq(struct s3c24xx_spi *hw)
 	regs.uregs[fiq_rrx]  = (long)hw->rx;
 	regs.uregs[fiq_rtx]  = (long)hw->tx + 1;
 	regs.uregs[fiq_rcount] = hw->len - 1;
-	regs.uregs[fiq_rirq] = (long)S3C24XX_VA_IRQ;
 
 	set_fiq_regs(&regs);
 
diff --git a/drivers/spi/spi-s3c24xx-fiq.h b/include/linux/spi/s3c24xx-fiq.h
similarity index 78%
rename from drivers/spi/spi-s3c24xx-fiq.h
rename to include/linux/spi/s3c24xx-fiq.h
index 7786b0ea56ec..954452618dfe 100644
--- a/drivers/spi/spi-s3c24xx-fiq.h
+++ b/include/linux/spi/s3c24xx-fiq.h
@@ -12,6 +12,11 @@
 #ifdef __ASSEMBLY__
 #define __REG_NR(x)     r##x
 #else
+
+extern struct spi_fiq_code s3c24xx_spi_fiq_txrx;
+extern struct spi_fiq_code s3c24xx_spi_fiq_tx;
+extern struct spi_fiq_code s3c24xx_spi_fiq_rx;
+
 #define __REG_NR(x)     (x)
 #endif
 
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 17/36] ARM: s3c: h1940-audio: turn into platform driver
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (15 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 16/36] ARM: s3c: move spi fiq handler into platform Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-10 20:30   ` [PATCH 18/36] ARM: s3c: gta02-audio: " Arnd Bergmann
                     ` (17 subsequent siblings)
  34 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood, Mark Brown
  Cc: Ulf Hansson, linux-samsung-soc, Arnd Bergmann, linux-kernel,
	linus.walleij, Takashi Iwai, Jaroslav Kysela, alsa-devel,
	linux-arm-kernel

Avoid machine specific headers by using a gpio lookup table
combined with a platform_driver for this board.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/mach-h1940.c | 18 ++++++++
 sound/soc/samsung/h1940_uda1380.c  | 71 ++++++++++--------------------
 2 files changed, 41 insertions(+), 48 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 74d6b68e91c7..922d53bacbdf 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -475,6 +475,22 @@ static struct gpiod_lookup_table h1940_mmc_gpio_table = {
 	},
 };
 
+static struct gpiod_lookup_table h1940_audio_gpio_table = {
+	.dev_id = "h1940-audio",
+	.table = {
+		GPIO_LOOKUP("H1940_LATCH",
+			    H1940_LATCH_AUDIO_POWER - H1940_LATCH_GPIO(0),
+			    "speaker-power", GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP("GPIOG", 4, "hp", GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
+
+static struct platform_device h1940_audio = {
+	.name = "h1940-audio",
+	.id   = -1,
+};
+
 static struct pwm_lookup h1940_pwm_lookup[] = {
 	PWM_LOOKUP("samsung-pwm", 0, "pwm-backlight", NULL, 36296,
 		   PWM_POLARITY_NORMAL),
@@ -652,6 +668,7 @@ static struct platform_device *h1940_devices[] __initdata = {
 	&s3c_device_ts,
 	&power_supply,
 	&h1940_battery,
+	&h1940_audio,
 };
 
 static void __init h1940_map_io(void)
@@ -691,6 +708,7 @@ static void __init h1940_init(void)
 
 	s3c24xx_fb_set_platdata(&h1940_fb_info);
 	gpiod_add_lookup_table(&h1940_mmc_gpio_table);
+	gpiod_add_lookup_table(&h1940_audio_gpio_table);
 	s3c24xx_mci_set_platdata(&h1940_mmc_cfg);
  	s3c24xx_udc_set_platdata(&h1940_udc_cfg);
 	s3c24xx_ts_set_platdata(&h1940_ts_cfg);
diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c
index a95c34e53a2b..5fc001b4effd 100644
--- a/sound/soc/samsung/h1940_uda1380.c
+++ b/sound/soc/samsung/h1940_uda1380.c
@@ -15,9 +15,6 @@
 #include <sound/jack.h>
 
 #include "regs-iis.h"
-#include <asm/mach-types.h>
-
-#include <mach/gpio-samsung.h>
 #include "s3c24xx-i2s.h"
 
 static const unsigned int rates[] = {
@@ -31,6 +28,8 @@ static const struct snd_pcm_hw_constraint_list hw_rates = {
 	.list = rates,
 };
 
+static struct gpio_desc *gpiod_speaker_power;
+
 static struct snd_soc_jack hp_jack;
 
 static struct snd_soc_jack_pin hp_jack_pins[] = {
@@ -47,7 +46,6 @@ static struct snd_soc_jack_pin hp_jack_pins[] = {
 
 static struct snd_soc_jack_gpio hp_jack_gpios[] = {
 	{
-		.gpio			= S3C2410_GPG(4),
 		.name			= "hp-gpio",
 		.report			= SND_JACK_HEADPHONE,
 		.invert			= 1,
@@ -123,9 +121,9 @@ static int h1940_spk_power(struct snd_soc_dapm_widget *w,
 				struct snd_kcontrol *kcontrol, int event)
 {
 	if (SND_SOC_DAPM_EVENT_ON(event))
-		gpio_set_value(S3C_GPIO_END + 9, 1);
+		gpiod_set_value(gpiod_speaker_power, 1);
 	else
-		gpio_set_value(S3C_GPIO_END + 9, 0);
+		gpiod_set_value(gpiod_speaker_power, 0);
 
 	return 0;
 }
@@ -151,8 +149,6 @@ static const struct snd_soc_dapm_route audio_map[] = {
 	{"VINM", NULL, "Mic Jack"},
 };
 
-static struct platform_device *s3c24xx_snd_device;
-
 static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd)
 {
 	snd_soc_card_jack_new(rtd->card, "Headphone Jack", SND_JACK_HEADPHONE,
@@ -194,55 +190,34 @@ static struct snd_soc_card h1940_asoc = {
 	.num_dapm_routes = ARRAY_SIZE(audio_map),
 };
 
-static int __init h1940_init(void)
+static int h1940_probe(struct platform_device *pdev)
 {
-	int ret;
+	struct device *dev = &pdev->dev;
 
-	if (!machine_is_h1940())
-		return -ENODEV;
+	h1940_asoc.dev = dev;
+	hp_jack_gpios[0].gpiod_dev = dev;
+	gpiod_speaker_power = devm_gpiod_get(&pdev->dev, "speaker-power",
+					     GPIOD_OUT_LOW);
 
-	/* configure some gpios */
-	ret = gpio_request(S3C_GPIO_END + 9, "speaker-power");
-	if (ret)
-		goto err_out;
-
-	ret = gpio_direction_output(S3C_GPIO_END + 9, 0);
-	if (ret)
-		goto err_gpio;
-
-	s3c24xx_snd_device = platform_device_alloc("soc-audio", -1);
-	if (!s3c24xx_snd_device) {
-		ret = -ENOMEM;
-		goto err_gpio;
+	if (IS_ERR(gpiod_speaker_power)) {
+		dev_err(dev, "Could not get gpio\n");
+		return PTR_ERR(gpiod_speaker_power);
 	}
 
-	platform_set_drvdata(s3c24xx_snd_device, &h1940_asoc);
-	ret = platform_device_add(s3c24xx_snd_device);
-
-	if (ret)
-		goto err_plat;
-
-	return 0;
-
-err_plat:
-	platform_device_put(s3c24xx_snd_device);
-err_gpio:
-	gpio_free(S3C_GPIO_END + 9);
-
-err_out:
-	return ret;
-}
-
-static void __exit h1940_exit(void)
-{
-	platform_device_unregister(s3c24xx_snd_device);
-	gpio_free(S3C_GPIO_END + 9);
+	return devm_snd_soc_register_card(dev, &h1940_asoc);
 }
 
-module_init(h1940_init);
-module_exit(h1940_exit);
+static struct platform_driver h1940_audio_driver = {
+	.driver = {
+		.name = "h1940-audio",
+		.pm = &snd_soc_pm_ops,
+	},
+	.probe = h1940_probe,
+};
+module_platform_driver(h1940_audio_driver);
 
 /* Module information */
 MODULE_AUTHOR("Arnaud Patard, Vasily Khoruzhick");
 MODULE_DESCRIPTION("ALSA SoC H1940");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:h1940-audio");
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 17/36] ARM: s3c: h1940-audio: turn into platform driver
  2019-10-10 20:30   ` [PATCH 17/36] ARM: s3c: h1940-audio: turn into platform driver Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood, Mark Brown
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Jaroslav Kysela, Takashi Iwai, Ulf Hansson,
	linux-kernel, alsa-devel

Avoid machine specific headers by using a gpio lookup table
combined with a platform_driver for this board.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/mach-h1940.c | 18 ++++++++
 sound/soc/samsung/h1940_uda1380.c  | 71 ++++++++++--------------------
 2 files changed, 41 insertions(+), 48 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 74d6b68e91c7..922d53bacbdf 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -475,6 +475,22 @@ static struct gpiod_lookup_table h1940_mmc_gpio_table = {
 	},
 };
 
+static struct gpiod_lookup_table h1940_audio_gpio_table = {
+	.dev_id = "h1940-audio",
+	.table = {
+		GPIO_LOOKUP("H1940_LATCH",
+			    H1940_LATCH_AUDIO_POWER - H1940_LATCH_GPIO(0),
+			    "speaker-power", GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP("GPIOG", 4, "hp", GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
+
+static struct platform_device h1940_audio = {
+	.name = "h1940-audio",
+	.id   = -1,
+};
+
 static struct pwm_lookup h1940_pwm_lookup[] = {
 	PWM_LOOKUP("samsung-pwm", 0, "pwm-backlight", NULL, 36296,
 		   PWM_POLARITY_NORMAL),
@@ -652,6 +668,7 @@ static struct platform_device *h1940_devices[] __initdata = {
 	&s3c_device_ts,
 	&power_supply,
 	&h1940_battery,
+	&h1940_audio,
 };
 
 static void __init h1940_map_io(void)
@@ -691,6 +708,7 @@ static void __init h1940_init(void)
 
 	s3c24xx_fb_set_platdata(&h1940_fb_info);
 	gpiod_add_lookup_table(&h1940_mmc_gpio_table);
+	gpiod_add_lookup_table(&h1940_audio_gpio_table);
 	s3c24xx_mci_set_platdata(&h1940_mmc_cfg);
  	s3c24xx_udc_set_platdata(&h1940_udc_cfg);
 	s3c24xx_ts_set_platdata(&h1940_ts_cfg);
diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c
index a95c34e53a2b..5fc001b4effd 100644
--- a/sound/soc/samsung/h1940_uda1380.c
+++ b/sound/soc/samsung/h1940_uda1380.c
@@ -15,9 +15,6 @@
 #include <sound/jack.h>
 
 #include "regs-iis.h"
-#include <asm/mach-types.h>
-
-#include <mach/gpio-samsung.h>
 #include "s3c24xx-i2s.h"
 
 static const unsigned int rates[] = {
@@ -31,6 +28,8 @@ static const struct snd_pcm_hw_constraint_list hw_rates = {
 	.list = rates,
 };
 
+static struct gpio_desc *gpiod_speaker_power;
+
 static struct snd_soc_jack hp_jack;
 
 static struct snd_soc_jack_pin hp_jack_pins[] = {
@@ -47,7 +46,6 @@ static struct snd_soc_jack_pin hp_jack_pins[] = {
 
 static struct snd_soc_jack_gpio hp_jack_gpios[] = {
 	{
-		.gpio			= S3C2410_GPG(4),
 		.name			= "hp-gpio",
 		.report			= SND_JACK_HEADPHONE,
 		.invert			= 1,
@@ -123,9 +121,9 @@ static int h1940_spk_power(struct snd_soc_dapm_widget *w,
 				struct snd_kcontrol *kcontrol, int event)
 {
 	if (SND_SOC_DAPM_EVENT_ON(event))
-		gpio_set_value(S3C_GPIO_END + 9, 1);
+		gpiod_set_value(gpiod_speaker_power, 1);
 	else
-		gpio_set_value(S3C_GPIO_END + 9, 0);
+		gpiod_set_value(gpiod_speaker_power, 0);
 
 	return 0;
 }
@@ -151,8 +149,6 @@ static const struct snd_soc_dapm_route audio_map[] = {
 	{"VINM", NULL, "Mic Jack"},
 };
 
-static struct platform_device *s3c24xx_snd_device;
-
 static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd)
 {
 	snd_soc_card_jack_new(rtd->card, "Headphone Jack", SND_JACK_HEADPHONE,
@@ -194,55 +190,34 @@ static struct snd_soc_card h1940_asoc = {
 	.num_dapm_routes = ARRAY_SIZE(audio_map),
 };
 
-static int __init h1940_init(void)
+static int h1940_probe(struct platform_device *pdev)
 {
-	int ret;
+	struct device *dev = &pdev->dev;
 
-	if (!machine_is_h1940())
-		return -ENODEV;
+	h1940_asoc.dev = dev;
+	hp_jack_gpios[0].gpiod_dev = dev;
+	gpiod_speaker_power = devm_gpiod_get(&pdev->dev, "speaker-power",
+					     GPIOD_OUT_LOW);
 
-	/* configure some gpios */
-	ret = gpio_request(S3C_GPIO_END + 9, "speaker-power");
-	if (ret)
-		goto err_out;
-
-	ret = gpio_direction_output(S3C_GPIO_END + 9, 0);
-	if (ret)
-		goto err_gpio;
-
-	s3c24xx_snd_device = platform_device_alloc("soc-audio", -1);
-	if (!s3c24xx_snd_device) {
-		ret = -ENOMEM;
-		goto err_gpio;
+	if (IS_ERR(gpiod_speaker_power)) {
+		dev_err(dev, "Could not get gpio\n");
+		return PTR_ERR(gpiod_speaker_power);
 	}
 
-	platform_set_drvdata(s3c24xx_snd_device, &h1940_asoc);
-	ret = platform_device_add(s3c24xx_snd_device);
-
-	if (ret)
-		goto err_plat;
-
-	return 0;
-
-err_plat:
-	platform_device_put(s3c24xx_snd_device);
-err_gpio:
-	gpio_free(S3C_GPIO_END + 9);
-
-err_out:
-	return ret;
-}
-
-static void __exit h1940_exit(void)
-{
-	platform_device_unregister(s3c24xx_snd_device);
-	gpio_free(S3C_GPIO_END + 9);
+	return devm_snd_soc_register_card(dev, &h1940_asoc);
 }
 
-module_init(h1940_init);
-module_exit(h1940_exit);
+static struct platform_driver h1940_audio_driver = {
+	.driver = {
+		.name = "h1940-audio",
+		.pm = &snd_soc_pm_ops,
+	},
+	.probe = h1940_probe,
+};
+module_platform_driver(h1940_audio_driver);
 
 /* Module information */
 MODULE_AUTHOR("Arnaud Patard, Vasily Khoruzhick");
 MODULE_DESCRIPTION("ALSA SoC H1940");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:h1940-audio");
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 18/36] ARM: s3c: gta02-audio: turn into platform driver
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (16 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 17/36] ARM: s3c: h1940-audio: turn into platform driver Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-10 20:30   ` [PATCH 19/36] ARM: s3c: rx1950: " Arnd Bergmann
                     ` (16 subsequent siblings)
  34 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood, Mark Brown
  Cc: alsa-devel, linux-samsung-soc, Arnd Bergmann, linux-kernel,
	linus.walleij, Takashi Iwai, Jaroslav Kysela, linux-arm-kernel

Avoid machine specific headers by using a gpio lookup table
combined with a platform_driver for this board.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/mach-gta02.c | 17 ++++++
 sound/soc/samsung/neo1973_wm8753.c | 85 +++++++++---------------------
 2 files changed, 43 insertions(+), 59 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index 594901f3b8e5..526fd0933289 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -15,6 +15,7 @@
 #include <linux/delay.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/gpio/machine.h>
 #include <linux/gpio.h>
 #include <linux/gpio_keys.h>
 #include <linux/workqueue.h>
@@ -474,6 +475,20 @@ static struct platform_device gta02_buttons_device = {
 	},
 };
 
+static struct gpiod_lookup_table gta02_audio_gpio_table = {
+	.dev_id = "neo1973-audio",
+	.table = {
+		GPIO_LOOKUP("GPIOJ", 2, "amp-shut", GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP("GPIOJ", 1, "hp", GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
+
+static struct platform_device gta02_audio = {
+	.name = "neo1973-audio",
+	.id = -1,
+};
+
 static void __init gta02_map_io(void)
 {
 	s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc));
@@ -498,6 +513,7 @@ static struct platform_device *gta02_devices[] __initdata = {
 	&gta02_buttons_device,
 	&s3c_device_adc,
 	&s3c_device_ts,
+	&gta02_audio,
 };
 
 static void gta02_poweroff(void)
@@ -524,6 +540,7 @@ static void __init gta02_machine_init(void)
 
 	i2c_register_board_info(0, gta02_i2c_devs, ARRAY_SIZE(gta02_i2c_devs));
 
+	gpiod_add_lookup_table(&gta02_audio_gpio_table);
 	platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
 	pm_power_off = gta02_poweroff;
 
diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c
index 38f536bafa09..b41e3dc297e7 100644
--- a/sound/soc/samsung/neo1973_wm8753.c
+++ b/sound/soc/samsung/neo1973_wm8753.c
@@ -11,14 +11,11 @@
 
 #include <linux/module.h>
 #include <linux/platform_device.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 
 #include <sound/soc.h>
 
-#include <mach/gpio-samsung.h>
-#include <asm/mach-types.h>
 #include "regs-iis.h"
-
 #include "../codecs/wm8753.h"
 #include "s3c24xx-i2s.h"
 
@@ -166,6 +163,7 @@ static struct snd_soc_ops neo1973_voice_ops = {
 	.hw_free = neo1973_voice_hw_free,
 };
 
+static struct gpio_desc *gpiod_hp_in, *gpiod_amp_shut;
 static int gta02_speaker_enabled;
 
 static int lm4853_set_spk(struct snd_kcontrol *kcontrol,
@@ -173,7 +171,7 @@ static int lm4853_set_spk(struct snd_kcontrol *kcontrol,
 {
 	gta02_speaker_enabled = ucontrol->value.integer.value[0];
 
-	gpio_set_value(S3C2410_GPJ(2), !gta02_speaker_enabled);
+	gpiod_set_value(gpiod_hp_in, !gta02_speaker_enabled);
 
 	return 0;
 }
@@ -188,7 +186,7 @@ static int lm4853_get_spk(struct snd_kcontrol *kcontrol,
 static int lm4853_event(struct snd_soc_dapm_widget *w,
 			struct snd_kcontrol *k, int event)
 {
-	gpio_set_value(S3C2410_GPJ(1), SND_SOC_DAPM_EVENT_OFF(event));
+	gpiod_set_value(gpiod_amp_shut, SND_SOC_DAPM_EVENT_OFF(event));
 
 	return 0;
 }
@@ -308,13 +306,8 @@ static struct snd_soc_codec_conf neo1973_codec_conf[] = {
 	},
 };
 
-static const struct gpio neo1973_gta02_gpios[] = {
-	{ S3C2410_GPJ(2), GPIOF_OUT_INIT_HIGH, "GTA02_HP_IN" },
-	{ S3C2410_GPJ(1), GPIOF_OUT_INIT_HIGH, "GTA02_AMP_SHUT" },
-};
-
 static struct snd_soc_card neo1973 = {
-	.name = "neo1973",
+	.name = "neo1973gta02",
 	.owner = THIS_MODULE,
 	.dai_link = neo1973_dai,
 	.num_links = ARRAY_SIZE(neo1973_dai),
@@ -332,62 +325,36 @@ static struct snd_soc_card neo1973 = {
 	.fully_routed = true,
 };
 
-static struct platform_device *neo1973_snd_device;
-
-static int __init neo1973_init(void)
+static int neo1973_probe(struct platform_device *pdev)
 {
-	int ret;
-
-	if (!machine_is_neo1973_gta02())
-		return -ENODEV;
+	struct device *dev = &pdev->dev;
 
-	if (machine_is_neo1973_gta02()) {
-		neo1973.name = "neo1973gta02";
-		neo1973.num_aux_devs = 1;
-
-		ret = gpio_request_array(neo1973_gta02_gpios,
-				ARRAY_SIZE(neo1973_gta02_gpios));
-		if (ret)
-			return ret;
+	gpiod_hp_in = devm_gpiod_get(dev, "hp", GPIOD_OUT_HIGH);
+	if (IS_ERR(gpiod_hp_in)) {
+		dev_err(dev, "missing gpio %s\n", "hp");
+		return PTR_ERR(gpiod_hp_in);
 	}
-
-	neo1973_snd_device = platform_device_alloc("soc-audio", -1);
-	if (!neo1973_snd_device) {
-		ret = -ENOMEM;
-		goto err_gpio_free;
+	gpiod_amp_shut = devm_gpiod_get(dev, "amp-shut", GPIOD_OUT_HIGH);
+	if (IS_ERR(gpiod_amp_shut)) {
+		dev_err(dev, "missing gpio %s\n", "amp-shut");
+		return PTR_ERR(gpiod_amp_shut);
 	}
 
-	platform_set_drvdata(neo1973_snd_device, &neo1973);
-	ret = platform_device_add(neo1973_snd_device);
-
-	if (ret)
-		goto err_put_device;
-
-	return 0;
-
-err_put_device:
-	platform_device_put(neo1973_snd_device);
-err_gpio_free:
-	if (machine_is_neo1973_gta02()) {
-		gpio_free_array(neo1973_gta02_gpios,
-				ARRAY_SIZE(neo1973_gta02_gpios));
-	}
-	return ret;
+	neo1973.dev = dev;
+	return devm_snd_soc_register_card(dev, &neo1973);
 }
-module_init(neo1973_init);
-
-static void __exit neo1973_exit(void)
-{
-	platform_device_unregister(neo1973_snd_device);
 
-	if (machine_is_neo1973_gta02()) {
-		gpio_free_array(neo1973_gta02_gpios,
-				ARRAY_SIZE(neo1973_gta02_gpios));
-	}
-}
-module_exit(neo1973_exit);
+struct platform_driver neo1973_audio = {
+	.driver = {
+		.name = "neo1973-audio",
+		.pm = &snd_soc_pm_ops,
+	},
+	.probe = neo1973_probe,
+};
+module_platform_driver(neo1973_audio);
 
 /* Module information */
 MODULE_AUTHOR("Graeme Gregory, graeme@openmoko.org, www.openmoko.org");
 MODULE_DESCRIPTION("ALSA SoC WM8753 Neo1973 and Frerunner");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:neo1973-audio");
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 18/36] ARM: s3c: gta02-audio: turn into platform driver
  2019-10-10 20:30   ` [PATCH 18/36] ARM: s3c: gta02-audio: " Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood, Mark Brown
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Jaroslav Kysela, Takashi Iwai, linux-kernel,
	alsa-devel

Avoid machine specific headers by using a gpio lookup table
combined with a platform_driver for this board.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/mach-gta02.c | 17 ++++++
 sound/soc/samsung/neo1973_wm8753.c | 85 +++++++++---------------------
 2 files changed, 43 insertions(+), 59 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index 594901f3b8e5..526fd0933289 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -15,6 +15,7 @@
 #include <linux/delay.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/gpio/machine.h>
 #include <linux/gpio.h>
 #include <linux/gpio_keys.h>
 #include <linux/workqueue.h>
@@ -474,6 +475,20 @@ static struct platform_device gta02_buttons_device = {
 	},
 };
 
+static struct gpiod_lookup_table gta02_audio_gpio_table = {
+	.dev_id = "neo1973-audio",
+	.table = {
+		GPIO_LOOKUP("GPIOJ", 2, "amp-shut", GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP("GPIOJ", 1, "hp", GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
+
+static struct platform_device gta02_audio = {
+	.name = "neo1973-audio",
+	.id = -1,
+};
+
 static void __init gta02_map_io(void)
 {
 	s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc));
@@ -498,6 +513,7 @@ static struct platform_device *gta02_devices[] __initdata = {
 	&gta02_buttons_device,
 	&s3c_device_adc,
 	&s3c_device_ts,
+	&gta02_audio,
 };
 
 static void gta02_poweroff(void)
@@ -524,6 +540,7 @@ static void __init gta02_machine_init(void)
 
 	i2c_register_board_info(0, gta02_i2c_devs, ARRAY_SIZE(gta02_i2c_devs));
 
+	gpiod_add_lookup_table(&gta02_audio_gpio_table);
 	platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
 	pm_power_off = gta02_poweroff;
 
diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c
index 38f536bafa09..b41e3dc297e7 100644
--- a/sound/soc/samsung/neo1973_wm8753.c
+++ b/sound/soc/samsung/neo1973_wm8753.c
@@ -11,14 +11,11 @@
 
 #include <linux/module.h>
 #include <linux/platform_device.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 
 #include <sound/soc.h>
 
-#include <mach/gpio-samsung.h>
-#include <asm/mach-types.h>
 #include "regs-iis.h"
-
 #include "../codecs/wm8753.h"
 #include "s3c24xx-i2s.h"
 
@@ -166,6 +163,7 @@ static struct snd_soc_ops neo1973_voice_ops = {
 	.hw_free = neo1973_voice_hw_free,
 };
 
+static struct gpio_desc *gpiod_hp_in, *gpiod_amp_shut;
 static int gta02_speaker_enabled;
 
 static int lm4853_set_spk(struct snd_kcontrol *kcontrol,
@@ -173,7 +171,7 @@ static int lm4853_set_spk(struct snd_kcontrol *kcontrol,
 {
 	gta02_speaker_enabled = ucontrol->value.integer.value[0];
 
-	gpio_set_value(S3C2410_GPJ(2), !gta02_speaker_enabled);
+	gpiod_set_value(gpiod_hp_in, !gta02_speaker_enabled);
 
 	return 0;
 }
@@ -188,7 +186,7 @@ static int lm4853_get_spk(struct snd_kcontrol *kcontrol,
 static int lm4853_event(struct snd_soc_dapm_widget *w,
 			struct snd_kcontrol *k, int event)
 {
-	gpio_set_value(S3C2410_GPJ(1), SND_SOC_DAPM_EVENT_OFF(event));
+	gpiod_set_value(gpiod_amp_shut, SND_SOC_DAPM_EVENT_OFF(event));
 
 	return 0;
 }
@@ -308,13 +306,8 @@ static struct snd_soc_codec_conf neo1973_codec_conf[] = {
 	},
 };
 
-static const struct gpio neo1973_gta02_gpios[] = {
-	{ S3C2410_GPJ(2), GPIOF_OUT_INIT_HIGH, "GTA02_HP_IN" },
-	{ S3C2410_GPJ(1), GPIOF_OUT_INIT_HIGH, "GTA02_AMP_SHUT" },
-};
-
 static struct snd_soc_card neo1973 = {
-	.name = "neo1973",
+	.name = "neo1973gta02",
 	.owner = THIS_MODULE,
 	.dai_link = neo1973_dai,
 	.num_links = ARRAY_SIZE(neo1973_dai),
@@ -332,62 +325,36 @@ static struct snd_soc_card neo1973 = {
 	.fully_routed = true,
 };
 
-static struct platform_device *neo1973_snd_device;
-
-static int __init neo1973_init(void)
+static int neo1973_probe(struct platform_device *pdev)
 {
-	int ret;
-
-	if (!machine_is_neo1973_gta02())
-		return -ENODEV;
+	struct device *dev = &pdev->dev;
 
-	if (machine_is_neo1973_gta02()) {
-		neo1973.name = "neo1973gta02";
-		neo1973.num_aux_devs = 1;
-
-		ret = gpio_request_array(neo1973_gta02_gpios,
-				ARRAY_SIZE(neo1973_gta02_gpios));
-		if (ret)
-			return ret;
+	gpiod_hp_in = devm_gpiod_get(dev, "hp", GPIOD_OUT_HIGH);
+	if (IS_ERR(gpiod_hp_in)) {
+		dev_err(dev, "missing gpio %s\n", "hp");
+		return PTR_ERR(gpiod_hp_in);
 	}
-
-	neo1973_snd_device = platform_device_alloc("soc-audio", -1);
-	if (!neo1973_snd_device) {
-		ret = -ENOMEM;
-		goto err_gpio_free;
+	gpiod_amp_shut = devm_gpiod_get(dev, "amp-shut", GPIOD_OUT_HIGH);
+	if (IS_ERR(gpiod_amp_shut)) {
+		dev_err(dev, "missing gpio %s\n", "amp-shut");
+		return PTR_ERR(gpiod_amp_shut);
 	}
 
-	platform_set_drvdata(neo1973_snd_device, &neo1973);
-	ret = platform_device_add(neo1973_snd_device);
-
-	if (ret)
-		goto err_put_device;
-
-	return 0;
-
-err_put_device:
-	platform_device_put(neo1973_snd_device);
-err_gpio_free:
-	if (machine_is_neo1973_gta02()) {
-		gpio_free_array(neo1973_gta02_gpios,
-				ARRAY_SIZE(neo1973_gta02_gpios));
-	}
-	return ret;
+	neo1973.dev = dev;
+	return devm_snd_soc_register_card(dev, &neo1973);
 }
-module_init(neo1973_init);
-
-static void __exit neo1973_exit(void)
-{
-	platform_device_unregister(neo1973_snd_device);
 
-	if (machine_is_neo1973_gta02()) {
-		gpio_free_array(neo1973_gta02_gpios,
-				ARRAY_SIZE(neo1973_gta02_gpios));
-	}
-}
-module_exit(neo1973_exit);
+struct platform_driver neo1973_audio = {
+	.driver = {
+		.name = "neo1973-audio",
+		.pm = &snd_soc_pm_ops,
+	},
+	.probe = neo1973_probe,
+};
+module_platform_driver(neo1973_audio);
 
 /* Module information */
 MODULE_AUTHOR("Graeme Gregory, graeme@openmoko.org, www.openmoko.org");
 MODULE_DESCRIPTION("ALSA SoC WM8753 Neo1973 and Frerunner");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:neo1973-audio");
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 19/36] ARM: s3c: rx1950: turn into platform driver
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (17 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 18/36] ARM: s3c: gta02-audio: " Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-10 20:30   ` [PATCH 20/36] ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS Arnd Bergmann
                     ` (15 subsequent siblings)
  34 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood, Mark Brown
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Jaroslav Kysela, Takashi Iwai, Ulf Hansson,
	linux-kernel, alsa-devel

Avoid machine specific headers by using a gpio lookup table
combined with a platform_driver for this board.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/mach-rx1950.c | 16 +++++++
 sound/soc/samsung/rx1950_uda1380.c  | 72 +++++++++--------------------
 2 files changed, 39 insertions(+), 49 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 29f9b345a531..9f3b0f18cd36 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -724,6 +724,20 @@ static struct i2c_board_info rx1950_i2c_devices[] = {
 	},
 };
 
+static struct gpiod_lookup_table rx1950_audio_gpio_table = {
+	.dev_id = "rx1950-audio",
+	.table = {
+		GPIO_LOOKUP("GPIOG", 12, "hp-gpio", GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP("GPIOA", 1, "speaker-power", GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
+
+static struct platform_device rx1950_audio = {
+	.name = "rx1950-audio",
+	.id = -1,
+};
+
 static struct platform_device *rx1950_devices[] __initdata = {
 	&s3c2410_device_dclk,
 	&s3c_device_lcd,
@@ -742,6 +756,7 @@ static struct platform_device *rx1950_devices[] __initdata = {
 	&power_supply,
 	&rx1950_battery,
 	&rx1950_leds,
+	&rx1950_audio,
 };
 
 static void __init rx1950_map_io(void)
@@ -809,6 +824,7 @@ static void __init rx1950_init_machine(void)
 	gpio_direction_output(S3C2410_GPJ(6), 0);
 
 	pwm_add_table(rx1950_pwm_lookup, ARRAY_SIZE(rx1950_pwm_lookup));
+	gpiod_add_lookup_table(&rx1950_audio_gpio_table);
 	platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices));
 
 	i2c_register_board_info(0, rx1950_i2c_devices,
diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c
index 4b247e91ae5b..cf96eaaf6b4e 100644
--- a/sound/soc/samsung/rx1950_uda1380.c
+++ b/sound/soc/samsung/rx1950_uda1380.c
@@ -12,16 +12,13 @@
 //          Vasily Khoruzhick <anarsoul@gmail.com>
 
 #include <linux/types.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/module.h>
 
 #include <sound/soc.h>
 #include <sound/jack.h>
 
-#include <mach/gpio-samsung.h>
 #include "regs-iis.h"
-#include <asm/mach-types.h>
-
 #include "s3c24xx-i2s.h"
 
 static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd);
@@ -58,7 +55,6 @@ static struct snd_soc_jack_pin hp_jack_pins[] = {
 
 static struct snd_soc_jack_gpio hp_jack_gpios[] = {
 	[0] = {
-		.gpio			= S3C2410_GPG(12),
 		.name			= "hp-gpio",
 		.report			= SND_JACK_HEADPHONE,
 		.invert			= 1,
@@ -123,8 +119,6 @@ static struct snd_soc_card rx1950_asoc = {
 	.num_dapm_routes = ARRAY_SIZE(audio_map),
 };
 
-static struct platform_device *s3c24xx_snd_device;
-
 static int rx1950_startup(struct snd_pcm_substream *substream)
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
@@ -134,13 +128,15 @@ static int rx1950_startup(struct snd_pcm_substream *substream)
 					&hw_rates);
 }
 
+struct gpio_desc *gpiod_speaker_power;
+
 static int rx1950_spk_power(struct snd_soc_dapm_widget *w,
 				struct snd_kcontrol *kcontrol, int event)
 {
 	if (SND_SOC_DAPM_EVENT_ON(event))
-		gpio_set_value(S3C2410_GPA(1), 1);
+		gpiod_set_value(gpiod_speaker_power, 1);
 	else
-		gpio_set_value(S3C2410_GPA(1), 0);
+		gpiod_set_value(gpiod_speaker_power, 0);
 
 	return 0;
 }
@@ -214,57 +210,35 @@ static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
-static int __init rx1950_init(void)
+static int rx1950_probe(struct platform_device *pdev)
 {
-	int ret;
-
-	if (!machine_is_rx1950())
-		return -ENODEV;
+	struct device *dev = &pdev->dev;
 
 	/* configure some gpios */
-	ret = gpio_request(S3C2410_GPA(1), "speaker-power");
-	if (ret)
-		goto err_gpio;
-
-	ret = gpio_direction_output(S3C2410_GPA(1), 0);
-	if (ret)
-		goto err_gpio_conf;
-
-	s3c24xx_snd_device = platform_device_alloc("soc-audio", -1);
-	if (!s3c24xx_snd_device) {
-		ret = -ENOMEM;
-		goto err_plat_alloc;
-	}
-
-	platform_set_drvdata(s3c24xx_snd_device, &rx1950_asoc);
-	ret = platform_device_add(s3c24xx_snd_device);
-
-	if (ret) {
-		platform_device_put(s3c24xx_snd_device);
-		goto err_plat_add;
+	gpiod_speaker_power = devm_gpiod_get(dev, "speaker-power", GPIOD_OUT_LOW);
+	if (IS_ERR(gpiod_speaker_power)) {
+		dev_err(dev, "cannot get gpio\n");
+		return PTR_ERR(gpiod_speaker_power);
 	}
 
-	return 0;
-
-err_plat_add:
-err_plat_alloc:
-err_gpio_conf:
-	gpio_free(S3C2410_GPA(1));
+	hp_jack_gpios[0].gpiod_dev = dev;
+	rx1950_asoc.dev = dev;
 
-err_gpio:
-	return ret;
+	return devm_snd_soc_register_card(dev, &rx1950_asoc);
 }
 
-static void __exit rx1950_exit(void)
-{
-	platform_device_unregister(s3c24xx_snd_device);
-	gpio_free(S3C2410_GPA(1));
-}
+struct platform_driver rx1950_audio = {
+	.driver = {
+		.name = "rx1950-audio",
+		.pm = &snd_soc_pm_ops,
+	},
+	.probe = rx1950_probe,
+};
 
-module_init(rx1950_init);
-module_exit(rx1950_exit);
+module_platform_driver(rx1950_audio);
 
 /* Module information */
 MODULE_AUTHOR("Vasily Khoruzhick");
 MODULE_DESCRIPTION("ALSA SoC RX1950");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:rx1950-audio");
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 19/36] ARM: s3c: rx1950: turn into platform driver
  2019-10-10 20:30   ` [PATCH 19/36] ARM: s3c: rx1950: " Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood, Mark Brown
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Jaroslav Kysela, Takashi Iwai, Ulf Hansson,
	linux-kernel, alsa-devel

Avoid machine specific headers by using a gpio lookup table
combined with a platform_driver for this board.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/mach-rx1950.c | 16 +++++++
 sound/soc/samsung/rx1950_uda1380.c  | 72 +++++++++--------------------
 2 files changed, 39 insertions(+), 49 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 29f9b345a531..9f3b0f18cd36 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -724,6 +724,20 @@ static struct i2c_board_info rx1950_i2c_devices[] = {
 	},
 };
 
+static struct gpiod_lookup_table rx1950_audio_gpio_table = {
+	.dev_id = "rx1950-audio",
+	.table = {
+		GPIO_LOOKUP("GPIOG", 12, "hp-gpio", GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP("GPIOA", 1, "speaker-power", GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
+
+static struct platform_device rx1950_audio = {
+	.name = "rx1950-audio",
+	.id = -1,
+};
+
 static struct platform_device *rx1950_devices[] __initdata = {
 	&s3c2410_device_dclk,
 	&s3c_device_lcd,
@@ -742,6 +756,7 @@ static struct platform_device *rx1950_devices[] __initdata = {
 	&power_supply,
 	&rx1950_battery,
 	&rx1950_leds,
+	&rx1950_audio,
 };
 
 static void __init rx1950_map_io(void)
@@ -809,6 +824,7 @@ static void __init rx1950_init_machine(void)
 	gpio_direction_output(S3C2410_GPJ(6), 0);
 
 	pwm_add_table(rx1950_pwm_lookup, ARRAY_SIZE(rx1950_pwm_lookup));
+	gpiod_add_lookup_table(&rx1950_audio_gpio_table);
 	platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices));
 
 	i2c_register_board_info(0, rx1950_i2c_devices,
diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c
index 4b247e91ae5b..cf96eaaf6b4e 100644
--- a/sound/soc/samsung/rx1950_uda1380.c
+++ b/sound/soc/samsung/rx1950_uda1380.c
@@ -12,16 +12,13 @@
 //          Vasily Khoruzhick <anarsoul@gmail.com>
 
 #include <linux/types.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/module.h>
 
 #include <sound/soc.h>
 #include <sound/jack.h>
 
-#include <mach/gpio-samsung.h>
 #include "regs-iis.h"
-#include <asm/mach-types.h>
-
 #include "s3c24xx-i2s.h"
 
 static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd);
@@ -58,7 +55,6 @@ static struct snd_soc_jack_pin hp_jack_pins[] = {
 
 static struct snd_soc_jack_gpio hp_jack_gpios[] = {
 	[0] = {
-		.gpio			= S3C2410_GPG(12),
 		.name			= "hp-gpio",
 		.report			= SND_JACK_HEADPHONE,
 		.invert			= 1,
@@ -123,8 +119,6 @@ static struct snd_soc_card rx1950_asoc = {
 	.num_dapm_routes = ARRAY_SIZE(audio_map),
 };
 
-static struct platform_device *s3c24xx_snd_device;
-
 static int rx1950_startup(struct snd_pcm_substream *substream)
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
@@ -134,13 +128,15 @@ static int rx1950_startup(struct snd_pcm_substream *substream)
 					&hw_rates);
 }
 
+struct gpio_desc *gpiod_speaker_power;
+
 static int rx1950_spk_power(struct snd_soc_dapm_widget *w,
 				struct snd_kcontrol *kcontrol, int event)
 {
 	if (SND_SOC_DAPM_EVENT_ON(event))
-		gpio_set_value(S3C2410_GPA(1), 1);
+		gpiod_set_value(gpiod_speaker_power, 1);
 	else
-		gpio_set_value(S3C2410_GPA(1), 0);
+		gpiod_set_value(gpiod_speaker_power, 0);
 
 	return 0;
 }
@@ -214,57 +210,35 @@ static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
-static int __init rx1950_init(void)
+static int rx1950_probe(struct platform_device *pdev)
 {
-	int ret;
-
-	if (!machine_is_rx1950())
-		return -ENODEV;
+	struct device *dev = &pdev->dev;
 
 	/* configure some gpios */
-	ret = gpio_request(S3C2410_GPA(1), "speaker-power");
-	if (ret)
-		goto err_gpio;
-
-	ret = gpio_direction_output(S3C2410_GPA(1), 0);
-	if (ret)
-		goto err_gpio_conf;
-
-	s3c24xx_snd_device = platform_device_alloc("soc-audio", -1);
-	if (!s3c24xx_snd_device) {
-		ret = -ENOMEM;
-		goto err_plat_alloc;
-	}
-
-	platform_set_drvdata(s3c24xx_snd_device, &rx1950_asoc);
-	ret = platform_device_add(s3c24xx_snd_device);
-
-	if (ret) {
-		platform_device_put(s3c24xx_snd_device);
-		goto err_plat_add;
+	gpiod_speaker_power = devm_gpiod_get(dev, "speaker-power", GPIOD_OUT_LOW);
+	if (IS_ERR(gpiod_speaker_power)) {
+		dev_err(dev, "cannot get gpio\n");
+		return PTR_ERR(gpiod_speaker_power);
 	}
 
-	return 0;
-
-err_plat_add:
-err_plat_alloc:
-err_gpio_conf:
-	gpio_free(S3C2410_GPA(1));
+	hp_jack_gpios[0].gpiod_dev = dev;
+	rx1950_asoc.dev = dev;
 
-err_gpio:
-	return ret;
+	return devm_snd_soc_register_card(dev, &rx1950_asoc);
 }
 
-static void __exit rx1950_exit(void)
-{
-	platform_device_unregister(s3c24xx_snd_device);
-	gpio_free(S3C2410_GPA(1));
-}
+struct platform_driver rx1950_audio = {
+	.driver = {
+		.name = "rx1950-audio",
+		.pm = &snd_soc_pm_ops,
+	},
+	.probe = rx1950_probe,
+};
 
-module_init(rx1950_init);
-module_exit(rx1950_exit);
+module_platform_driver(rx1950_audio);
 
 /* Module information */
 MODULE_AUTHOR("Vasily Khoruzhick");
 MODULE_DESCRIPTION("ALSA SoC RX1950");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:rx1950-audio");
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 20/36] ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (18 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 19/36] ARM: s3c: rx1950: " Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-11 10:50     ` Mark Brown
  2019-10-10 20:30   ` [PATCH 21/36] ARM: s3c: move iis pinctrl config into boards Arnd Bergmann
                     ` (14 subsequent siblings)
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood, Mark Brown
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, alsa-devel, linux-kernel

The constant requires indirectly including a machine header file,
but it's not actually used any more since commit 87b132bc0315 ("ASoC:
samsung: s3c24{xx,12}-i2s: port to use generic dmaengine API"), so
remove it completely.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/samsung/s3c-i2s-v2.c  | 3 +--
 sound/soc/samsung/s3c-i2s-v2.h  | 3 +--
 sound/soc/samsung/s3c2412-i2s.c | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c
index 7e196b599be1..6a254fdaa6fb 100644
--- a/sound/soc/samsung/s3c-i2s-v2.c
+++ b/sound/soc/samsung/s3c-i2s-v2.c
@@ -616,8 +616,7 @@ int s3c_i2sv2_iis_calc_rate(struct s3c_i2sv2_rate_calc *info,
 EXPORT_SYMBOL_GPL(s3c_i2sv2_iis_calc_rate);
 
 int s3c_i2sv2_probe(struct snd_soc_dai *dai,
-		    struct s3c_i2sv2_info *i2s,
-		    unsigned long base)
+		    struct s3c_i2sv2_info *i2s)
 {
 	struct device *dev = dai->dev;
 	unsigned int iismod;
diff --git a/sound/soc/samsung/s3c-i2s-v2.h b/sound/soc/samsung/s3c-i2s-v2.h
index fe42b77999fd..8c6fc0d3d77e 100644
--- a/sound/soc/samsung/s3c-i2s-v2.h
+++ b/sound/soc/samsung/s3c-i2s-v2.h
@@ -83,8 +83,7 @@ extern int s3c_i2sv2_iis_calc_rate(struct s3c_i2sv2_rate_calc *info,
  * @base: The base address for the registers.
  */
 extern int s3c_i2sv2_probe(struct snd_soc_dai *dai,
-			   struct s3c_i2sv2_info *i2s,
-			   unsigned long base);
+			   struct s3c_i2sv2_info *i2s);
 
 /**
  * s3c_i2sv2_cleanup - cleanup resources allocated in s3c_i2sv2_probe
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index 787a3f6e9f24..5bf571762e89 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -49,7 +49,7 @@ static int s3c2412_i2s_probe(struct snd_soc_dai *dai)
 	snd_soc_dai_init_dma_data(dai, &s3c2412_i2s_pcm_stereo_out,
 					&s3c2412_i2s_pcm_stereo_in);
 
-	ret = s3c_i2sv2_probe(dai, &s3c2412_i2s, S3C2410_PA_IIS);
+	ret = s3c_i2sv2_probe(dai, &s3c2412_i2s);
 	if (ret)
 		return ret;
 
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 20/36] ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS
  2019-10-10 20:30   ` [PATCH 20/36] ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  2019-10-11 10:50     ` Mark Brown
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood, Mark Brown
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, alsa-devel, linux-kernel

The constant requires indirectly including a machine header file,
but it's not actually used any more since commit 87b132bc0315 ("ASoC:
samsung: s3c24{xx,12}-i2s: port to use generic dmaengine API"), so
remove it completely.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/samsung/s3c-i2s-v2.c  | 3 +--
 sound/soc/samsung/s3c-i2s-v2.h  | 3 +--
 sound/soc/samsung/s3c2412-i2s.c | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c
index 7e196b599be1..6a254fdaa6fb 100644
--- a/sound/soc/samsung/s3c-i2s-v2.c
+++ b/sound/soc/samsung/s3c-i2s-v2.c
@@ -616,8 +616,7 @@ int s3c_i2sv2_iis_calc_rate(struct s3c_i2sv2_rate_calc *info,
 EXPORT_SYMBOL_GPL(s3c_i2sv2_iis_calc_rate);
 
 int s3c_i2sv2_probe(struct snd_soc_dai *dai,
-		    struct s3c_i2sv2_info *i2s,
-		    unsigned long base)
+		    struct s3c_i2sv2_info *i2s)
 {
 	struct device *dev = dai->dev;
 	unsigned int iismod;
diff --git a/sound/soc/samsung/s3c-i2s-v2.h b/sound/soc/samsung/s3c-i2s-v2.h
index fe42b77999fd..8c6fc0d3d77e 100644
--- a/sound/soc/samsung/s3c-i2s-v2.h
+++ b/sound/soc/samsung/s3c-i2s-v2.h
@@ -83,8 +83,7 @@ extern int s3c_i2sv2_iis_calc_rate(struct s3c_i2sv2_rate_calc *info,
  * @base: The base address for the registers.
  */
 extern int s3c_i2sv2_probe(struct snd_soc_dai *dai,
-			   struct s3c_i2sv2_info *i2s,
-			   unsigned long base);
+			   struct s3c_i2sv2_info *i2s);
 
 /**
  * s3c_i2sv2_cleanup - cleanup resources allocated in s3c_i2sv2_probe
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index 787a3f6e9f24..5bf571762e89 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -49,7 +49,7 @@ static int s3c2412_i2s_probe(struct snd_soc_dai *dai)
 	snd_soc_dai_init_dma_data(dai, &s3c2412_i2s_pcm_stereo_out,
 					&s3c2412_i2s_pcm_stereo_in);
 
-	ret = s3c_i2sv2_probe(dai, &s3c2412_i2s, S3C2410_PA_IIS);
+	ret = s3c_i2sv2_probe(dai, &s3c2412_i2s);
 	if (ret)
 		return ret;
 
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 21/36] ARM: s3c: move iis pinctrl config into boards
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (19 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 20/36] ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-23 12:50     ` Krzysztof Kozlowski
  2019-10-10 20:30   ` [PATCH 22/36] ARM: s3c: leds: move setpull() calls into board files Arnd Bergmann
                     ` (13 subsequent siblings)
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai
  Cc: Ulf Hansson, linux-samsung-soc, Arnd Bergmann, linus.walleij,
	linux-kernel, alsa-devel, linux-stm32, linux-arm-kernel

The s3c_gpio_cfgall_range() function is an internal interface of
the samsung gpio driver and should not be called directly by drivers,
so move the iis pin initialization into the boards.

Note that the s3c2412-i2s driver has no boards using it in
mainline linux, the driver gets selected for the jive machine
but is never instantiated.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/mach-gta02.c    | 4 ++++
 arch/arm/mach-s3c24xx/mach-h1940.c    | 3 +++
 arch/arm/mach-s3c24xx/mach-mini2440.c | 5 +++++
 arch/arm/mach-s3c24xx/mach-n30.c      | 5 +++++
 arch/arm/mach-s3c24xx/mach-nexcoder.c | 5 +++++
 arch/arm/mach-s3c24xx/mach-otom.c     | 6 ++++++
 arch/arm/mach-s3c24xx/mach-qt2410.c   | 3 +++
 arch/arm/mach-s3c24xx/mach-rx1950.c   | 3 +++
 arch/arm/mach-s3c24xx/mach-rx3715.c   | 4 ++++
 arch/arm/mach-s3c24xx/mach-smdk2410.c | 5 +++++
 arch/arm/mach-s3c24xx/mach-smdk2413.c | 4 ++++
 arch/arm/mach-s3c24xx/mach-smdk2440.c | 6 +++++-
 arch/arm/mach-s3c24xx/mach-vstms.c    | 6 +++++-
 arch/arm/mach-s3c24xx/simtec-audio.c  | 6 ++++++
 sound/soc/samsung/s3c2412-i2s.c       | 7 -------
 sound/soc/samsung/s3c24xx-i2s.c       | 7 -------
 16 files changed, 63 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index 526fd0933289..1ca0460d82f4 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -540,6 +540,10 @@ static void __init gta02_machine_init(void)
 
 	i2c_register_board_info(0, gta02_i2c_devs, ARRAY_SIZE(gta02_i2c_devs));
 
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
+
 	gpiod_add_lookup_table(&gta02_audio_gpio_table);
 	platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
 	pm_power_off = gta02_poweroff;
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 922d53bacbdf..11f705fb5e32 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -709,6 +709,9 @@ static void __init h1940_init(void)
 	s3c24xx_fb_set_platdata(&h1940_fb_info);
 	gpiod_add_lookup_table(&h1940_mmc_gpio_table);
 	gpiod_add_lookup_table(&h1940_audio_gpio_table);
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	s3c24xx_mci_set_platdata(&h1940_mmc_cfg);
  	s3c24xx_udc_set_platdata(&h1940_udc_cfg);
 	s3c24xx_ts_set_platdata(&h1940_ts_cfg);
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index 9035f868fb34..bb44b8704d64 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -685,6 +685,11 @@ static void __init mini2440_init(void)
 		s3c_gpio_setpull(mini2440_buttons[i].gpio, S3C_GPIO_PULL_UP);
 		s3c_gpio_cfgpin(mini2440_buttons[i].gpio, S3C2410_GPIO_INPUT);
 	}
+
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
+
 	if (features.lcd_index != -1) {
 		int li;
 
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index d856f23939af..1836f1cc0992 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -36,6 +36,7 @@
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
@@ -570,6 +571,10 @@ static void __init n30_init(void)
 			      S3C2410_MISCCR_USBSUSPND0 |
 			      S3C2410_MISCCR_USBSUSPND1, 0x0);
 
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
+
 	if (machine_is_n30()) {
 		/* Turn off suspend on both USB ports, and switch the
 		 * selectable USB port to USB device mode. */
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c24xx/mach-nexcoder.c
index c2f34758ccb6..a05c92b6de2e 100644
--- a/arch/arm/mach-s3c24xx/mach-nexcoder.c
+++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c
@@ -145,6 +145,11 @@ static void __init nexcoder_init_time(void)
 static void __init nexcoder_init(void)
 {
 	s3c_i2c0_set_platdata(NULL);
+
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
+
 	platform_add_devices(nexcoder_devices, ARRAY_SIZE(nexcoder_devices));
 };
 
diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c24xx/mach-otom.c
index 4e24d89e870b..c834f16e5ba0 100644
--- a/arch/arm/mach-s3c24xx/mach-otom.c
+++ b/arch/arm/mach-s3c24xx/mach-otom.c
@@ -24,6 +24,8 @@
 
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
@@ -107,6 +109,10 @@ static void __init otom11_init_time(void)
 static void __init otom11_init(void)
 {
 	s3c_i2c0_set_platdata(NULL);
+
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices));
 }
 
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index 5d48e5b6e738..3cf8423c76c6 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -337,6 +337,9 @@ static void __init qt2410_machine_init(void)
 	s3c24xx_udc_set_platdata(&qt2410_udc_cfg);
 	s3c_i2c0_set_platdata(NULL);
 
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	gpiod_add_lookup_table(&qt2410_spi_gpiod_table);
 	platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices));
 	s3c_pm_init();
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 9f3b0f18cd36..4eeede398775 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -825,6 +825,9 @@ static void __init rx1950_init_machine(void)
 
 	pwm_add_table(rx1950_pwm_lookup, ARRAY_SIZE(rx1950_pwm_lookup));
 	gpiod_add_lookup_table(&rx1950_audio_gpio_table);
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices));
 
 	i2c_register_board_info(0, rx1950_i2c_devices,
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24xx/mach-rx3715.c
index 529c6faf862f..2542c523ad46 100644
--- a/arch/arm/mach-s3c24xx/mach-rx3715.c
+++ b/arch/arm/mach-s3c24xx/mach-rx3715.c
@@ -39,6 +39,7 @@
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
@@ -199,6 +200,9 @@ static void __init rx3715_init_machine(void)
 
 	s3c_nand_set_platdata(&rx3715_nand_info);
 	s3c24xx_fb_set_platdata(&rx3715_fb_info);
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	platform_add_devices(rx3715_devices, ARRAY_SIZE(rx3715_devices));
 }
 
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2410.c b/arch/arm/mach-s3c24xx/mach-smdk2410.c
index 18dfef52c8bf..02adaac4d6df 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2410.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2410.c
@@ -19,6 +19,8 @@
 #include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -94,6 +96,9 @@ static void __init smdk2410_init(void)
 {
 	s3c_i2c0_set_platdata(NULL);
 	platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices));
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	smdk_machine_init();
 }
 
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c24xx/mach-smdk2413.c
index ca80167f268d..2bba4f1fa7ee 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2413.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c
@@ -37,6 +37,7 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <mach/gpio-samsung.h>
 #include <mach/fb.h>
+#include <plat/gpio-cfg.h>
 
 #include <plat/devs.h>
 #include <plat/cpu.h>
@@ -119,6 +120,9 @@ static void __init smdk2413_machine_init(void)
 
  	s3c24xx_udc_set_platdata(&smdk2413_udc_cfg);
 	s3c_i2c0_set_platdata(NULL);
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 
 	platform_add_devices(smdk2413_devices, ARRAY_SIZE(smdk2413_devices));
 	smdk_machine_init();
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c24xx/mach-smdk2440.c
index 7bafcd8ea104..f0fceda3e8e6 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2440.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c
@@ -29,6 +29,8 @@
 
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <mach/fb.h>
 #include <linux/platform_data/i2c-s3c2410.h>
@@ -167,7 +169,9 @@ static void __init smdk2440_machine_init(void)
 {
 	s3c24xx_fb_set_platdata(&smdk2440_fb_info);
 	s3c_i2c0_set_platdata(NULL);
-
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices));
 	smdk_machine_init();
 }
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx/mach-vstms.c
index d76b28b65e65..f333ca05de68 100644
--- a/arch/arm/mach-s3c24xx/mach-vstms.c
+++ b/arch/arm/mach-s3c24xx/mach-vstms.c
@@ -31,6 +31,8 @@
 
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <mach/fb.h>
 
@@ -149,7 +151,9 @@ static void __init vstms_init(void)
 {
 	s3c_i2c0_set_platdata(NULL);
 	s3c_nand_set_platdata(&vstms_nand_info);
-
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	platform_add_devices(vstms_devices, ARRAY_SIZE(vstms_devices));
 }
 
diff --git a/arch/arm/mach-s3c24xx/simtec-audio.c b/arch/arm/mach-s3c24xx/simtec-audio.c
index 12e17f82dae3..0c12ba4a4704 100644
--- a/arch/arm/mach-s3c24xx/simtec-audio.c
+++ b/arch/arm/mach-s3c24xx/simtec-audio.c
@@ -14,6 +14,8 @@
 
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <linux/platform_data/asoc-s3c24xx_simtec.h>
 #include <plat/devs.h>
@@ -65,6 +67,10 @@ int __init simtec_audio_add(const char *name, bool has_lr_routing,
 	if (has_lr_routing)
 		simtec_audio_platdata.startup = simtec_audio_startup_lrroute;
 
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
+
 	platform_device_register(&s3c_device_iis);
 	platform_device_register(&simtec_audio_dev);
 	return 0;
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index 5bf571762e89..fd17765670f1 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -19,9 +19,6 @@
 #include <sound/soc.h>
 #include <sound/pcm_params.h>
 
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
-
 #include "dma.h"
 #include "regs-i2s-v2.h"
 #include "s3c2412-i2s.h"
@@ -70,10 +67,6 @@ static int s3c2412_i2s_probe(struct snd_soc_dai *dai)
 	if (ret)
 		goto err;
 
-	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
-	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
-			      S3C_GPIO_PULL_NONE);
-
 	return 0;
 
 err:
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index 92bdaf0878f8..5ca263f6a39e 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -18,10 +18,7 @@
 #include <sound/soc.h>
 #include <sound/pcm_params.h>
 
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
 #include "regs-iis.h"
-
 #include "dma.h"
 #include "s3c24xx-i2s.h"
 
@@ -348,10 +345,6 @@ static int s3c24xx_i2s_probe(struct snd_soc_dai *dai)
 	if (ret)
 		return ret;
 
-	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
-	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
-			      S3C_GPIO_PULL_NONE);
-
 	writel(S3C2410_IISCON_IISEN, s3c24xx_i2s.regs + S3C2410_IISCON);
 
 	s3c24xx_snd_txctrl(0);
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 21/36] ARM: s3c: move iis pinctrl config into boards
  2019-10-10 20:30   ` [PATCH 21/36] ARM: s3c: move iis pinctrl config into boards Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  2019-10-23 12:50     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Ulf Hansson, linux-kernel, linux-stm32,
	alsa-devel

The s3c_gpio_cfgall_range() function is an internal interface of
the samsung gpio driver and should not be called directly by drivers,
so move the iis pin initialization into the boards.

Note that the s3c2412-i2s driver has no boards using it in
mainline linux, the driver gets selected for the jive machine
but is never instantiated.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/mach-gta02.c    | 4 ++++
 arch/arm/mach-s3c24xx/mach-h1940.c    | 3 +++
 arch/arm/mach-s3c24xx/mach-mini2440.c | 5 +++++
 arch/arm/mach-s3c24xx/mach-n30.c      | 5 +++++
 arch/arm/mach-s3c24xx/mach-nexcoder.c | 5 +++++
 arch/arm/mach-s3c24xx/mach-otom.c     | 6 ++++++
 arch/arm/mach-s3c24xx/mach-qt2410.c   | 3 +++
 arch/arm/mach-s3c24xx/mach-rx1950.c   | 3 +++
 arch/arm/mach-s3c24xx/mach-rx3715.c   | 4 ++++
 arch/arm/mach-s3c24xx/mach-smdk2410.c | 5 +++++
 arch/arm/mach-s3c24xx/mach-smdk2413.c | 4 ++++
 arch/arm/mach-s3c24xx/mach-smdk2440.c | 6 +++++-
 arch/arm/mach-s3c24xx/mach-vstms.c    | 6 +++++-
 arch/arm/mach-s3c24xx/simtec-audio.c  | 6 ++++++
 sound/soc/samsung/s3c2412-i2s.c       | 7 -------
 sound/soc/samsung/s3c24xx-i2s.c       | 7 -------
 16 files changed, 63 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index 526fd0933289..1ca0460d82f4 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -540,6 +540,10 @@ static void __init gta02_machine_init(void)
 
 	i2c_register_board_info(0, gta02_i2c_devs, ARRAY_SIZE(gta02_i2c_devs));
 
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
+
 	gpiod_add_lookup_table(&gta02_audio_gpio_table);
 	platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
 	pm_power_off = gta02_poweroff;
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 922d53bacbdf..11f705fb5e32 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -709,6 +709,9 @@ static void __init h1940_init(void)
 	s3c24xx_fb_set_platdata(&h1940_fb_info);
 	gpiod_add_lookup_table(&h1940_mmc_gpio_table);
 	gpiod_add_lookup_table(&h1940_audio_gpio_table);
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	s3c24xx_mci_set_platdata(&h1940_mmc_cfg);
  	s3c24xx_udc_set_platdata(&h1940_udc_cfg);
 	s3c24xx_ts_set_platdata(&h1940_ts_cfg);
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index 9035f868fb34..bb44b8704d64 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -685,6 +685,11 @@ static void __init mini2440_init(void)
 		s3c_gpio_setpull(mini2440_buttons[i].gpio, S3C_GPIO_PULL_UP);
 		s3c_gpio_cfgpin(mini2440_buttons[i].gpio, S3C2410_GPIO_INPUT);
 	}
+
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
+
 	if (features.lcd_index != -1) {
 		int li;
 
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index d856f23939af..1836f1cc0992 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -36,6 +36,7 @@
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
@@ -570,6 +571,10 @@ static void __init n30_init(void)
 			      S3C2410_MISCCR_USBSUSPND0 |
 			      S3C2410_MISCCR_USBSUSPND1, 0x0);
 
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
+
 	if (machine_is_n30()) {
 		/* Turn off suspend on both USB ports, and switch the
 		 * selectable USB port to USB device mode. */
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c24xx/mach-nexcoder.c
index c2f34758ccb6..a05c92b6de2e 100644
--- a/arch/arm/mach-s3c24xx/mach-nexcoder.c
+++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c
@@ -145,6 +145,11 @@ static void __init nexcoder_init_time(void)
 static void __init nexcoder_init(void)
 {
 	s3c_i2c0_set_platdata(NULL);
+
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
+
 	platform_add_devices(nexcoder_devices, ARRAY_SIZE(nexcoder_devices));
 };
 
diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c24xx/mach-otom.c
index 4e24d89e870b..c834f16e5ba0 100644
--- a/arch/arm/mach-s3c24xx/mach-otom.c
+++ b/arch/arm/mach-s3c24xx/mach-otom.c
@@ -24,6 +24,8 @@
 
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
@@ -107,6 +109,10 @@ static void __init otom11_init_time(void)
 static void __init otom11_init(void)
 {
 	s3c_i2c0_set_platdata(NULL);
+
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices));
 }
 
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index 5d48e5b6e738..3cf8423c76c6 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -337,6 +337,9 @@ static void __init qt2410_machine_init(void)
 	s3c24xx_udc_set_platdata(&qt2410_udc_cfg);
 	s3c_i2c0_set_platdata(NULL);
 
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	gpiod_add_lookup_table(&qt2410_spi_gpiod_table);
 	platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices));
 	s3c_pm_init();
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 9f3b0f18cd36..4eeede398775 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -825,6 +825,9 @@ static void __init rx1950_init_machine(void)
 
 	pwm_add_table(rx1950_pwm_lookup, ARRAY_SIZE(rx1950_pwm_lookup));
 	gpiod_add_lookup_table(&rx1950_audio_gpio_table);
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices));
 
 	i2c_register_board_info(0, rx1950_i2c_devices,
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24xx/mach-rx3715.c
index 529c6faf862f..2542c523ad46 100644
--- a/arch/arm/mach-s3c24xx/mach-rx3715.c
+++ b/arch/arm/mach-s3c24xx/mach-rx3715.c
@@ -39,6 +39,7 @@
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
@@ -199,6 +200,9 @@ static void __init rx3715_init_machine(void)
 
 	s3c_nand_set_platdata(&rx3715_nand_info);
 	s3c24xx_fb_set_platdata(&rx3715_fb_info);
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	platform_add_devices(rx3715_devices, ARRAY_SIZE(rx3715_devices));
 }
 
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2410.c b/arch/arm/mach-s3c24xx/mach-smdk2410.c
index 18dfef52c8bf..02adaac4d6df 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2410.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2410.c
@@ -19,6 +19,8 @@
 #include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -94,6 +96,9 @@ static void __init smdk2410_init(void)
 {
 	s3c_i2c0_set_platdata(NULL);
 	platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices));
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	smdk_machine_init();
 }
 
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c24xx/mach-smdk2413.c
index ca80167f268d..2bba4f1fa7ee 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2413.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c
@@ -37,6 +37,7 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <mach/gpio-samsung.h>
 #include <mach/fb.h>
+#include <plat/gpio-cfg.h>
 
 #include <plat/devs.h>
 #include <plat/cpu.h>
@@ -119,6 +120,9 @@ static void __init smdk2413_machine_init(void)
 
  	s3c24xx_udc_set_platdata(&smdk2413_udc_cfg);
 	s3c_i2c0_set_platdata(NULL);
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 
 	platform_add_devices(smdk2413_devices, ARRAY_SIZE(smdk2413_devices));
 	smdk_machine_init();
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c24xx/mach-smdk2440.c
index 7bafcd8ea104..f0fceda3e8e6 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2440.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c
@@ -29,6 +29,8 @@
 
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <mach/fb.h>
 #include <linux/platform_data/i2c-s3c2410.h>
@@ -167,7 +169,9 @@ static void __init smdk2440_machine_init(void)
 {
 	s3c24xx_fb_set_platdata(&smdk2440_fb_info);
 	s3c_i2c0_set_platdata(NULL);
-
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices));
 	smdk_machine_init();
 }
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx/mach-vstms.c
index d76b28b65e65..f333ca05de68 100644
--- a/arch/arm/mach-s3c24xx/mach-vstms.c
+++ b/arch/arm/mach-s3c24xx/mach-vstms.c
@@ -31,6 +31,8 @@
 
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <mach/fb.h>
 
@@ -149,7 +151,9 @@ static void __init vstms_init(void)
 {
 	s3c_i2c0_set_platdata(NULL);
 	s3c_nand_set_platdata(&vstms_nand_info);
-
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
 	platform_add_devices(vstms_devices, ARRAY_SIZE(vstms_devices));
 }
 
diff --git a/arch/arm/mach-s3c24xx/simtec-audio.c b/arch/arm/mach-s3c24xx/simtec-audio.c
index 12e17f82dae3..0c12ba4a4704 100644
--- a/arch/arm/mach-s3c24xx/simtec-audio.c
+++ b/arch/arm/mach-s3c24xx/simtec-audio.c
@@ -14,6 +14,8 @@
 
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <linux/platform_data/asoc-s3c24xx_simtec.h>
 #include <plat/devs.h>
@@ -65,6 +67,10 @@ int __init simtec_audio_add(const char *name, bool has_lr_routing,
 	if (has_lr_routing)
 		simtec_audio_platdata.startup = simtec_audio_startup_lrroute;
 
+	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
+	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
+			      S3C_GPIO_PULL_NONE);
+
 	platform_device_register(&s3c_device_iis);
 	platform_device_register(&simtec_audio_dev);
 	return 0;
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index 5bf571762e89..fd17765670f1 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -19,9 +19,6 @@
 #include <sound/soc.h>
 #include <sound/pcm_params.h>
 
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
-
 #include "dma.h"
 #include "regs-i2s-v2.h"
 #include "s3c2412-i2s.h"
@@ -70,10 +67,6 @@ static int s3c2412_i2s_probe(struct snd_soc_dai *dai)
 	if (ret)
 		goto err;
 
-	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
-	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
-			      S3C_GPIO_PULL_NONE);
-
 	return 0;
 
 err:
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index 92bdaf0878f8..5ca263f6a39e 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -18,10 +18,7 @@
 #include <sound/soc.h>
 #include <sound/pcm_params.h>
 
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
 #include "regs-iis.h"
-
 #include "dma.h"
 #include "s3c24xx-i2s.h"
 
@@ -348,10 +345,6 @@ static int s3c24xx_i2s_probe(struct snd_soc_dai *dai)
 	if (ret)
 		return ret;
 
-	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
-	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
-			      S3C_GPIO_PULL_NONE);
-
 	writel(S3C2410_IISCON_IISEN, s3c24xx_i2s.regs + S3C2410_IISCON);
 
 	s3c24xx_snd_txctrl(0);
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 22/36] ARM: s3c: leds: move setpull() calls into board files
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (20 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 21/36] ARM: s3c: move iis pinctrl config into boards Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-10 20:30   ` [PATCH 23/36] ARM: s3c: move s3cmci pinctrl handling " Arnd Bergmann
                     ` (12 subsequent siblings)
  34 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: Ulf Hansson, linux-samsung-soc, Arnd Bergmann, linus.walleij,
	linux-kernel, Jacek Anaszewski, Pavel Machek, linux-leds,
	linux-arm-kernel, Dan Murphy

The leds-s3c24xx driver calls the private s3c_gpio_setpull()
interface for each gpio line, but doing this requires
access to the machine header files.

Move those calls into the machine init functions for any
board that uses the driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/common-smdk.c   | 6 ++++--
 arch/arm/mach-s3c24xx/mach-mini2440.c | 6 ++++++
 arch/arm/mach-s3c24xx/mach-n30.c      | 5 +++++
 arch/arm/mach-s3c24xx/mach-qt2410.c   | 1 +
 arch/arm/mach-s3c24xx/mach-vr1000.c   | 7 +++++++
 drivers/leds/leds-s3c24xx.c           | 7 -------
 6 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/common-smdk.c b/arch/arm/mach-s3c24xx/common-smdk.c
index 58e30cad386c..5392d5106b4b 100644
--- a/arch/arm/mach-s3c24xx/common-smdk.c
+++ b/arch/arm/mach-s3c24xx/common-smdk.c
@@ -189,11 +189,13 @@ static const struct gpio smdk_led_gpios[] = {
 void __init smdk_machine_init(void)
 {
 	/* Configure the LEDs (even if we have no LED support)*/
+	int i, ret;
 
-	int ret = gpio_request_array(smdk_led_gpios,
-				     ARRAY_SIZE(smdk_led_gpios));
+	ret = gpio_request_array(smdk_led_gpios, ARRAY_SIZE(smdk_led_gpios));
 	if (!WARN_ON(ret < 0))
 		gpio_free_array(smdk_led_gpios, ARRAY_SIZE(smdk_led_gpios));
+	for (i = 0; i < ARRAY_SIZE(smdk_led_gpios); i++)
+		s3c_gpio_setpull(smdk_led_gpios[i].gpio, S3C_GPIO_PULL_NONE);
 
 	if (machine_is_smdk2443())
 		smdk_nand_info.twrph0 = 50;
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index bb44b8704d64..894d43ff94f1 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -690,6 +690,12 @@ static void __init mini2440_init(void)
 	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
 			      S3C_GPIO_PULL_NONE);
 
+	/* LEDs: no point in having a pull-up if we are always driving */
+	s3c_gpio_setpull(S3C2410_GPB(5), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPB(6), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPB(7), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPB(8), S3C_GPIO_PULL_NONE);
+
 	if (features.lcd_index != -1) {
 		int li;
 
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index 1836f1cc0992..5f5ca4b7015c 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -571,6 +571,11 @@ static void __init n30_init(void)
 			      S3C2410_MISCCR_USBSUSPND0 |
 			      S3C2410_MISCCR_USBSUSPND1, 0x0);
 
+	/* LEDs: no point in having a pull-up if we are always driving */
+	s3c_gpio_setpull(S3C2410_GPG(6), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPD(8), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPD(9), S3C_GPIO_PULL_NONE);
+
 	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
 	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
 			      S3C_GPIO_PULL_NONE);
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index 3cf8423c76c6..6686f02a3f4f 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -332,6 +332,7 @@ static void __init qt2410_machine_init(void)
 
 	/* set initial state of the LED GPIO */
 	WARN_ON(gpio_request_one(S3C2410_GPB(0), GPIOF_OUT_INIT_HIGH, NULL));
+	s3c_gpio_setpull(S3C2410_GPB(0), S3C_GPIO_PULL_NONE);
 	gpio_free(S3C2410_GPB(0));
 
 	s3c24xx_udc_set_platdata(&qt2410_udc_cfg);
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c24xx/mach-vr1000.c
index 853e74f9b8b5..ca2f874a637e 100644
--- a/arch/arm/mach-s3c24xx/mach-vr1000.c
+++ b/arch/arm/mach-s3c24xx/mach-vr1000.c
@@ -37,6 +37,7 @@
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
@@ -322,6 +323,12 @@ static void __init vr1000_init(void)
 	i2c_register_board_info(0, vr1000_i2c_devs,
 				ARRAY_SIZE(vr1000_i2c_devs));
 
+
+	/* LEDs: no point in having a pull-up if we are always driving */
+	s3c_gpio_setpull(S3C2410_GPB(0), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPB(1), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPB(2), S3C_GPIO_PULL_NONE);
+
 	nor_simtec_init();
 	simtec_audio_add(NULL, true, NULL);
 
diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c
index f8b8d6e313ee..bc67e5d344a6 100644
--- a/drivers/leds/leds-s3c24xx.c
+++ b/drivers/leds/leds-s3c24xx.c
@@ -16,9 +16,6 @@
 #include <linux/module.h>
 #include <linux/platform_data/leds-s3c24xx.h>
 
-#include <mach/regs-gpio.h>
-#include <plat/gpio-cfg.h>
-
 /* our context */
 
 struct s3c24xx_gpio_led {
@@ -73,10 +70,6 @@ static int s3c24xx_led_probe(struct platform_device *dev)
 	if (ret < 0)
 		return ret;
 
-	/* no point in having a pull-up if we are always driving */
-
-	s3c_gpio_setpull(pdata->gpio, S3C_GPIO_PULL_NONE);
-
 	if (pdata->flags & S3C24XX_LEDF_TRISTATE)
 		gpio_direction_input(pdata->gpio);
 	else
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 22/36] ARM: s3c: leds: move setpull() calls into board files
  2019-10-10 20:30   ` [PATCH 22/36] ARM: s3c: leds: move setpull() calls into board files Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Jacek Anaszewski, Pavel Machek, Dan Murphy,
	Ulf Hansson, linux-kernel, linux-leds

The leds-s3c24xx driver calls the private s3c_gpio_setpull()
interface for each gpio line, but doing this requires
access to the machine header files.

Move those calls into the machine init functions for any
board that uses the driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/common-smdk.c   | 6 ++++--
 arch/arm/mach-s3c24xx/mach-mini2440.c | 6 ++++++
 arch/arm/mach-s3c24xx/mach-n30.c      | 5 +++++
 arch/arm/mach-s3c24xx/mach-qt2410.c   | 1 +
 arch/arm/mach-s3c24xx/mach-vr1000.c   | 7 +++++++
 drivers/leds/leds-s3c24xx.c           | 7 -------
 6 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/common-smdk.c b/arch/arm/mach-s3c24xx/common-smdk.c
index 58e30cad386c..5392d5106b4b 100644
--- a/arch/arm/mach-s3c24xx/common-smdk.c
+++ b/arch/arm/mach-s3c24xx/common-smdk.c
@@ -189,11 +189,13 @@ static const struct gpio smdk_led_gpios[] = {
 void __init smdk_machine_init(void)
 {
 	/* Configure the LEDs (even if we have no LED support)*/
+	int i, ret;
 
-	int ret = gpio_request_array(smdk_led_gpios,
-				     ARRAY_SIZE(smdk_led_gpios));
+	ret = gpio_request_array(smdk_led_gpios, ARRAY_SIZE(smdk_led_gpios));
 	if (!WARN_ON(ret < 0))
 		gpio_free_array(smdk_led_gpios, ARRAY_SIZE(smdk_led_gpios));
+	for (i = 0; i < ARRAY_SIZE(smdk_led_gpios); i++)
+		s3c_gpio_setpull(smdk_led_gpios[i].gpio, S3C_GPIO_PULL_NONE);
 
 	if (machine_is_smdk2443())
 		smdk_nand_info.twrph0 = 50;
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index bb44b8704d64..894d43ff94f1 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -690,6 +690,12 @@ static void __init mini2440_init(void)
 	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
 			      S3C_GPIO_PULL_NONE);
 
+	/* LEDs: no point in having a pull-up if we are always driving */
+	s3c_gpio_setpull(S3C2410_GPB(5), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPB(6), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPB(7), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPB(8), S3C_GPIO_PULL_NONE);
+
 	if (features.lcd_index != -1) {
 		int li;
 
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index 1836f1cc0992..5f5ca4b7015c 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -571,6 +571,11 @@ static void __init n30_init(void)
 			      S3C2410_MISCCR_USBSUSPND0 |
 			      S3C2410_MISCCR_USBSUSPND1, 0x0);
 
+	/* LEDs: no point in having a pull-up if we are always driving */
+	s3c_gpio_setpull(S3C2410_GPG(6), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPD(8), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPD(9), S3C_GPIO_PULL_NONE);
+
 	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
 	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
 			      S3C_GPIO_PULL_NONE);
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index 3cf8423c76c6..6686f02a3f4f 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -332,6 +332,7 @@ static void __init qt2410_machine_init(void)
 
 	/* set initial state of the LED GPIO */
 	WARN_ON(gpio_request_one(S3C2410_GPB(0), GPIOF_OUT_INIT_HIGH, NULL));
+	s3c_gpio_setpull(S3C2410_GPB(0), S3C_GPIO_PULL_NONE);
 	gpio_free(S3C2410_GPB(0));
 
 	s3c24xx_udc_set_platdata(&qt2410_udc_cfg);
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c24xx/mach-vr1000.c
index 853e74f9b8b5..ca2f874a637e 100644
--- a/arch/arm/mach-s3c24xx/mach-vr1000.c
+++ b/arch/arm/mach-s3c24xx/mach-vr1000.c
@@ -37,6 +37,7 @@
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
@@ -322,6 +323,12 @@ static void __init vr1000_init(void)
 	i2c_register_board_info(0, vr1000_i2c_devs,
 				ARRAY_SIZE(vr1000_i2c_devs));
 
+
+	/* LEDs: no point in having a pull-up if we are always driving */
+	s3c_gpio_setpull(S3C2410_GPB(0), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPB(1), S3C_GPIO_PULL_NONE);
+	s3c_gpio_setpull(S3C2410_GPB(2), S3C_GPIO_PULL_NONE);
+
 	nor_simtec_init();
 	simtec_audio_add(NULL, true, NULL);
 
diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c
index f8b8d6e313ee..bc67e5d344a6 100644
--- a/drivers/leds/leds-s3c24xx.c
+++ b/drivers/leds/leds-s3c24xx.c
@@ -16,9 +16,6 @@
 #include <linux/module.h>
 #include <linux/platform_data/leds-s3c24xx.h>
 
-#include <mach/regs-gpio.h>
-#include <plat/gpio-cfg.h>
-
 /* our context */
 
 struct s3c24xx_gpio_led {
@@ -73,10 +70,6 @@ static int s3c24xx_led_probe(struct platform_device *dev)
 	if (ret < 0)
 		return ret;
 
-	/* no point in having a pull-up if we are always driving */
-
-	s3c_gpio_setpull(pdata->gpio, S3C_GPIO_PULL_NONE);
-
 	if (pdata->flags & S3C24XX_LEDF_TRISTATE)
 		gpio_direction_input(pdata->gpio);
 	else
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 23/36] ARM: s3c: move s3cmci pinctrl handling into board files
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (21 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 22/36] ARM: s3c: leds: move setpull() calls into board files Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
                       ` (2 more replies)
  2019-10-10 20:30   ` [PATCH 24/36] ARM: s3c: include mach/irqs.h where needed Arnd Bergmann
                     ` (11 subsequent siblings)
  34 siblings, 3 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Ben Dooks, Ulf Hansson
  Cc: linux-samsung-soc, Arnd Bergmann, linus.walleij, linux-mmc,
	linux-kernel, linux-arm-kernel

Rather than call the internal s3c_gpio_cfgall_range() function
through a platform header, move the code into the set_power
callback that is already exported by the board, and add
a default implementation.

In DT mode, the code already does not set the pin config,
so nothing changes there.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/include/mach/pm-core.h |  1 +
 arch/arm/mach-s3c24xx/mach-amlm5900.c        | 15 +++++
 arch/arm/mach-s3c24xx/mach-at2440evb.c       | 10 ++-
 arch/arm/mach-s3c24xx/mach-gta02.c           | 15 +++++
 arch/arm/mach-s3c24xx/mach-h1940.c           |  8 +++
 arch/arm/mach-s3c24xx/mach-mini2440.c        |  9 ++-
 arch/arm/mach-s3c24xx/mach-n30.c             |  9 +++
 arch/arm/mach-s3c24xx/mach-qt2410.c          | 15 +++++
 arch/arm/mach-s3c24xx/mach-rx1950.c          |  9 +++
 arch/arm/mach-s3c24xx/mach-tct_hammer.c      | 15 +++++
 arch/arm/plat-samsung/devs.c                 | 29 ++++++++
 drivers/mmc/host/s3cmci.c                    | 69 +++++---------------
 include/linux/platform_data/mmc-s3cmci.h     |  2 +
 13 files changed, 152 insertions(+), 54 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/include/mach/pm-core.h b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
index 8f87606c4cdc..a22b4a37ee57 100644
--- a/arch/arm/mach-s3c24xx/include/mach/pm-core.h
+++ b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
@@ -12,6 +12,7 @@
 
 #include "regs-clock.h"
 #include "regs-irq.h"
+#include <mach/irqs.h>
 
 static inline void s3c_pm_debug_init_uart(void)
 {
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c
index 9a9daf526d0c..40ad23b52bc0 100644
--- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
+++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c
@@ -13,6 +13,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/gpio/machine.h>
 #include <linux/gpio.h>
 #include <linux/device.h>
 #include <linux/platform_device.h>
@@ -124,6 +125,19 @@ static struct s3c2410_uartcfg amlm5900_uartcfgs[] = {
 	}
 };
 
+static struct gpiod_lookup_table amlm5900_mmc_gpio_table = {
+	.dev_id = "s3c2410-sdi",
+	.table = {
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
 
 static struct platform_device *amlm5900_devices[] __initdata = {
 #ifdef CONFIG_FB_S3C2410
@@ -219,6 +233,7 @@ static void __init amlm5900_init(void)
 	s3c24xx_fb_set_platdata(&amlm5900_fb_info);
 #endif
 	s3c_i2c0_set_platdata(NULL);
+	gpiod_add_lookup_table(&amlm5900_mmc_gpio_table);
 	platform_add_devices(amlm5900_devices, ARRAY_SIZE(amlm5900_devices));
 }
 
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index 58c5ef3cf1d7..3a793aaf2cba 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -136,7 +136,7 @@ static struct platform_device at2440evb_device_eth = {
 };
 
 static struct s3c24xx_mci_pdata at2440evb_mci_pdata __initdata = {
-	/* Intentionally left blank */
+	.set_power = s3c24xx_mci_def_set_power,
 };
 
 static struct gpiod_lookup_table at2440evb_mci_gpio_table = {
@@ -144,10 +144,18 @@ static struct gpiod_lookup_table at2440evb_mci_gpio_table = {
 	.table = {
 		/* Card detect S3C2410_GPG(10) */
 		GPIO_LOOKUP("GPG", 10, "cd", GPIO_ACTIVE_LOW),
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
 		{ },
 	},
 };
 
+
 /* 7" LCD panel */
 
 static struct s3c2410fb_display at2440evb_lcd_cfg __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index 1ca0460d82f4..61b8c6badeb8 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -489,6 +489,20 @@ static struct platform_device gta02_audio = {
 	.id = -1,
 };
 
+static struct gpiod_lookup_table gta02_mmc_gpio_table = {
+	.dev_id = "s3c2410-sdi",
+	.table = {
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
+
 static void __init gta02_map_io(void)
 {
 	s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc));
@@ -545,6 +559,7 @@ static void __init gta02_machine_init(void)
 			      S3C_GPIO_PULL_NONE);
 
 	gpiod_add_lookup_table(&gta02_audio_gpio_table);
+	gpiod_add_lookup_table(&gta02_mmc_gpio_table);
 	platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
 	pm_power_off = gta02_poweroff;
 
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 11f705fb5e32..24f785da7659 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -462,6 +462,7 @@ static void h1940_set_mmc_power(unsigned char power_mode, unsigned short vdd)
 static struct s3c24xx_mci_pdata h1940_mmc_cfg __initdata = {
 	.set_power     = h1940_set_mmc_power,
 	.ocr_avail     = MMC_VDD_32_33,
+	.set_power = s3c24xx_mci_def_set_power,
 };
 
 static struct gpiod_lookup_table h1940_mmc_gpio_table = {
@@ -471,6 +472,13 @@ static struct gpiod_lookup_table h1940_mmc_gpio_table = {
 		GPIO_LOOKUP("GPF", 5, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
 		GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_LOW),
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
 		{ },
 	},
 };
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index 894d43ff94f1..5c000efdf0e8 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -236,7 +236,7 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
 
 static struct s3c24xx_mci_pdata mini2440_mmc_cfg __initdata = {
 	.wprotect_invert	= 1,
-	.set_power		= NULL,
+	.set_power		= s3c24xx_mci_def_set_power,
 	.ocr_avail		= MMC_VDD_32_33|MMC_VDD_33_34,
 };
 
@@ -247,6 +247,13 @@ static struct gpiod_lookup_table mini2440_mmc_gpio_table = {
 		GPIO_LOOKUP("GPG", 8, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
 		GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_HIGH),
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
 		{ },
 	},
 };
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index 5f5ca4b7015c..8d7ad61e9930 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -339,6 +339,8 @@ static struct s3c2410fb_mach_info n30_fb_info __initdata = {
 
 static void n30_sdi_set_power(unsigned char power_mode, unsigned short vdd)
 {
+	s3c24xx_mci_def_set_power(power_mode, vdd);
+
 	switch (power_mode) {
 	case MMC_POWER_ON:
 	case MMC_POWER_UP:
@@ -364,6 +366,13 @@ static struct gpiod_lookup_table n30_mci_gpio_table = {
 		/* Write protect S3C2410_GPG(10) */
 		GPIO_LOOKUP("GPG", 10, "wp", GPIO_ACTIVE_LOW),
 		{ },
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
 	},
 };
 
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index 6686f02a3f4f..9b47b8434f10 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -219,6 +219,20 @@ static struct gpiod_lookup_table qt2410_spi_gpiod_table = {
 	},
 };
 
+static struct gpiod_lookup_table qt2410_mmc_gpiod_table = {
+	.dev_id = "s3c2410-sdi",
+	.table = {
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
+
 /* Board devices */
 
 static struct platform_device *qt2410_devices[] __initdata = {
@@ -342,6 +356,7 @@ static void __init qt2410_machine_init(void)
 	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
 			      S3C_GPIO_PULL_NONE);
 	gpiod_add_lookup_table(&qt2410_spi_gpiod_table);
+	gpiod_add_lookup_table(&qt2410_mmc_gpiod_table);
 	platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices));
 	s3c_pm_init();
 }
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 4eeede398775..820e626f5129 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -545,6 +545,8 @@ static struct platform_device rx1950_backlight = {
 
 static void rx1950_set_mmc_power(unsigned char power_mode, unsigned short vdd)
 {
+	s3c24xx_mci_def_set_power(power_mode, vdd);
+
 	switch (power_mode) {
 	case MMC_POWER_OFF:
 		gpio_direction_output(S3C2410_GPJ(1), 0);
@@ -570,6 +572,13 @@ static struct gpiod_lookup_table rx1950_mmc_gpio_table = {
 		GPIO_LOOKUP("GPF", 5, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
 		GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_LOW),
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
 		{ },
 	},
 };
diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
index 8d8ddd6ea305..d6dbbe6759bc 100644
--- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
@@ -7,6 +7,7 @@
 // derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by
 // Ben Dooks <ben@simtec.co.uk>
 
+#include <linux/gpio/machine.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
@@ -103,6 +104,19 @@ static struct s3c2410_uartcfg tct_hammer_uartcfgs[] = {
 	}
 };
 
+static struct gpiod_lookup_table tct_hammer_mmc_gpio_table = {
+	.dev_id = "s3c2410-sdi",
+	.table = {
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
 
 static struct platform_device *tct_hammer_devices[] __initdata = {
 	&s3c_device_adc,
@@ -131,6 +145,7 @@ static void __init tct_hammer_init_time(void)
 static void __init tct_hammer_init(void)
 {
 	s3c_i2c0_set_platdata(NULL);
+	gpiod_add_lookup_table(&tct_hammer_mmc_gpio_table);
 	platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices));
 }
 
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index ddd90f0bb380..c0739bda060b 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -5,6 +5,7 @@
 //
 // Base SAMSUNG platform device definitions
 
+#include <linux/gpio.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
@@ -40,6 +41,8 @@
 #include <mach/dma.h>
 #include <mach/irqs.h>
 #include <mach/map.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 #include <mach/regs-s3c2443-clock.h>
 
 #include <plat/cpu.h>
@@ -833,16 +836,42 @@ struct platform_device s3c_device_rtc = {
 /* SDI */
 
 #ifdef CONFIG_PLAT_S3C24XX
+void s3c24xx_mci_def_set_power(unsigned char power_mode, unsigned short vdd)
+{
+	switch (power_mode) {
+	case MMC_POWER_ON:
+	case MMC_POWER_UP:
+		/* Configure GPE5...GPE10 pins in SD mode */
+		s3c_gpio_cfgall_range(S3C2410_GPE(5), 6, S3C_GPIO_SFN(2),
+				      S3C_GPIO_PULL_NONE);
+		break;
+
+	case MMC_POWER_OFF:
+	default:
+		gpio_direction_output(S3C2410_GPE(5), 0);
+		break;
+	}
+}
+
 static struct resource s3c_sdi_resource[] = {
 	[0] = DEFINE_RES_MEM(S3C24XX_PA_SDI, S3C24XX_SZ_SDI),
 	[1] = DEFINE_RES_IRQ(IRQ_SDI),
 };
 
+static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
+	/* This is currently here to avoid a number of if (host->pdata)
+	 * checks. Any zero fields to ensure reasonable defaults are picked. */
+	.no_wprotect = 1,
+	.no_detect = 1,
+	.set_power = s3c24xx_mci_def_set_power,
+};
+
 struct platform_device s3c_device_sdi = {
 	.name		= "s3c2410-sdi",
 	.id		= -1,
 	.num_resources	= ARRAY_SIZE(s3c_sdi_resource),
 	.resource	= s3c_sdi_resource,
+	.dev.platform_data = &s3cmci_def_pdata,
 };
 
 void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata)
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index bce9c33bc4b5..c2b46640a78b 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -25,9 +25,7 @@
 #include <linux/of_device.h>
 #include <linux/mmc/slot-gpio.h>
 
-#include <plat/gpio-cfg.h>
 #include <mach/dma.h>
-#include <mach/gpio-samsung.h>
 
 #include <linux/platform_data/mmc-s3cmci.h>
 
@@ -307,7 +305,8 @@ static inline void clear_imask(struct s3cmci_host *host)
 static void s3cmci_check_sdio_irq(struct s3cmci_host *host)
 {
 	if (host->sdio_irqen) {
-		if (gpio_get_value(S3C2410_GPE(8)) == 0) {
+		if (host->pdata->bus[3] &&
+		    gpiod_get_value(host->pdata->bus[3]) == 0) {
 			pr_debug("%s: signalling irq\n", __func__);
 			mmc_signal_sdio_irq(host->mmc);
 		}
@@ -1213,33 +1212,20 @@ static void s3cmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	switch (ios->power_mode) {
 	case MMC_POWER_ON:
 	case MMC_POWER_UP:
-		/* Configure GPE5...GPE10 pins in SD mode */
-		if (!host->pdev->dev.of_node)
-			s3c_gpio_cfgall_range(S3C2410_GPE(5), 6, S3C_GPIO_SFN(2),
-					      S3C_GPIO_PULL_NONE);
-
-		if (host->pdata->set_power)
-			host->pdata->set_power(ios->power_mode, ios->vdd);
-
 		if (!host->is2440)
 			mci_con |= S3C2410_SDICON_FIFORESET;
-
 		break;
 
 	case MMC_POWER_OFF:
 	default:
-		if (!host->pdev->dev.of_node)
-			gpio_direction_output(S3C2410_GPE(5), 0);
-
 		if (host->is2440)
 			mci_con |= S3C2440_SDICON_SDRESET;
-
-		if (host->pdata->set_power)
-			host->pdata->set_power(ios->power_mode, ios->vdd);
-
 		break;
 	}
 
+	if (host->pdata->set_power)
+		host->pdata->set_power(ios->power_mode, ios->vdd);
+
 	s3cmci_set_clk(host, ios);
 
 	/* Set CLOCK_ENABLE */
@@ -1317,13 +1303,6 @@ static const struct mmc_host_ops s3cmci_ops = {
 	.enable_sdio_irq = s3cmci_enable_sdio_irq,
 };
 
-static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
-	/* This is currently here to avoid a number of if (host->pdata)
-	 * checks. Any zero fields to ensure reasonable defaults are picked. */
-	 .no_wprotect = 1,
-	 .no_detect = 1,
-};
-
 #ifdef CONFIG_ARM_S3C24XX_CPUFREQ
 
 static int s3cmci_cpufreq_transition(struct notifier_block *nb,
@@ -1477,24 +1456,21 @@ static int s3cmci_probe_pdata(struct s3cmci_host *host)
 	int i, ret;
 
 	host->is2440 = platform_get_device_id(pdev)->driver_data;
+	pdata = pdev->dev.platform_data;
+	if (!pdata) {
+		dev_err(&pdev->dev, "need platform data");
+		return -ENXIO;
+	}
 
-	for (i = S3C2410_GPE(5); i <= S3C2410_GPE(10); i++) {
-		ret = gpio_request(i, dev_name(&pdev->dev));
-		if (ret) {
+	for (i = 0; i < 6; i++) {
+		pdata->bus[i] = devm_gpiod_get_index(&pdev->dev, "bus", i,
+						     GPIOD_OUT_LOW);
+		if (IS_ERR(pdata->bus[i])) {
 			dev_err(&pdev->dev, "failed to get gpio %d\n", i);
-
-			for (i--; i >= S3C2410_GPE(5); i--)
-				gpio_free(i);
-
-			return ret;
+			return PTR_ERR(pdata->bus[i]);
 		}
 	}
 
-	if (!pdev->dev.platform_data)
-		pdev->dev.platform_data = &s3cmci_def_pdata;
-
-	pdata = pdev->dev.platform_data;
-
 	if (pdata->no_wprotect)
 		mmc->caps2 |= MMC_CAP2_NO_WRITE_PROTECT;
 
@@ -1549,7 +1525,6 @@ static int s3cmci_probe(struct platform_device *pdev)
 	struct s3cmci_host *host;
 	struct mmc_host	*mmc;
 	int ret;
-	int i;
 
 	mmc = mmc_alloc_host(sizeof(struct s3cmci_host), &pdev->dev);
 	if (!mmc) {
@@ -1593,7 +1568,7 @@ static int s3cmci_probe(struct platform_device *pdev)
 			"failed to get io memory region resource.\n");
 
 		ret = -ENOENT;
-		goto probe_free_gpio;
+		goto probe_free_host;
 	}
 
 	host->mem = request_mem_region(host->mem->start,
@@ -1602,7 +1577,7 @@ static int s3cmci_probe(struct platform_device *pdev)
 	if (!host->mem) {
 		dev_err(&pdev->dev, "failed to request io memory region.\n");
 		ret = -ENOENT;
-		goto probe_free_gpio;
+		goto probe_free_host;
 	}
 
 	host->base = ioremap(host->mem->start, resource_size(host->mem));
@@ -1726,11 +1701,6 @@ static int s3cmci_probe(struct platform_device *pdev)
  probe_free_mem_region:
 	release_mem_region(host->mem->start, resource_size(host->mem));
 
- probe_free_gpio:
-	if (!pdev->dev.of_node)
-		for (i = S3C2410_GPE(5); i <= S3C2410_GPE(10); i++)
-			gpio_free(i);
-
  probe_free_host:
 	mmc_free_host(mmc);
 
@@ -1756,7 +1726,6 @@ static int s3cmci_remove(struct platform_device *pdev)
 {
 	struct mmc_host		*mmc  = platform_get_drvdata(pdev);
 	struct s3cmci_host	*host = mmc_priv(mmc);
-	int i;
 
 	s3cmci_shutdown(pdev);
 
@@ -1769,10 +1738,6 @@ static int s3cmci_remove(struct platform_device *pdev)
 
 	free_irq(host->irq, host);
 
-	if (!pdev->dev.of_node)
-		for (i = S3C2410_GPE(5); i <= S3C2410_GPE(10); i++)
-			gpio_free(i);
-
 	iounmap(host->base);
 	release_mem_region(host->mem->start, resource_size(host->mem));
 
diff --git a/include/linux/platform_data/mmc-s3cmci.h b/include/linux/platform_data/mmc-s3cmci.h
index 33310b11cbdd..bacb86db3112 100644
--- a/include/linux/platform_data/mmc-s3cmci.h
+++ b/include/linux/platform_data/mmc-s3cmci.h
@@ -35,6 +35,7 @@ struct s3c24xx_mci_pdata {
 	unsigned long	ocr_avail;
 	void		(*set_power)(unsigned char power_mode,
 				     unsigned short vdd);
+	struct gpio_desc *bus[6];
 };
 
 /**
@@ -44,6 +45,7 @@ struct s3c24xx_mci_pdata {
  * Copy the platform data supplied by @pdata so that this can be marked
  * __initdata.
  */
+extern void s3c24xx_mci_def_set_power(unsigned char power_mode, unsigned short vdd);
 extern void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata);
 
 #endif /* _ARCH_NCI_H */
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 23/36] ARM: s3c: move s3cmci pinctrl handling into board files
  2019-10-10 20:30   ` [PATCH 23/36] ARM: s3c: move s3cmci pinctrl handling " Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  2019-10-15 14:12     ` Ulf Hansson
  2019-10-16 13:12     ` Linus Walleij
  2 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Ben Dooks, Ulf Hansson
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel, linux-mmc

Rather than call the internal s3c_gpio_cfgall_range() function
through a platform header, move the code into the set_power
callback that is already exported by the board, and add
a default implementation.

In DT mode, the code already does not set the pin config,
so nothing changes there.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/include/mach/pm-core.h |  1 +
 arch/arm/mach-s3c24xx/mach-amlm5900.c        | 15 +++++
 arch/arm/mach-s3c24xx/mach-at2440evb.c       | 10 ++-
 arch/arm/mach-s3c24xx/mach-gta02.c           | 15 +++++
 arch/arm/mach-s3c24xx/mach-h1940.c           |  8 +++
 arch/arm/mach-s3c24xx/mach-mini2440.c        |  9 ++-
 arch/arm/mach-s3c24xx/mach-n30.c             |  9 +++
 arch/arm/mach-s3c24xx/mach-qt2410.c          | 15 +++++
 arch/arm/mach-s3c24xx/mach-rx1950.c          |  9 +++
 arch/arm/mach-s3c24xx/mach-tct_hammer.c      | 15 +++++
 arch/arm/plat-samsung/devs.c                 | 29 ++++++++
 drivers/mmc/host/s3cmci.c                    | 69 +++++---------------
 include/linux/platform_data/mmc-s3cmci.h     |  2 +
 13 files changed, 152 insertions(+), 54 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/include/mach/pm-core.h b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
index 8f87606c4cdc..a22b4a37ee57 100644
--- a/arch/arm/mach-s3c24xx/include/mach/pm-core.h
+++ b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
@@ -12,6 +12,7 @@
 
 #include "regs-clock.h"
 #include "regs-irq.h"
+#include <mach/irqs.h>
 
 static inline void s3c_pm_debug_init_uart(void)
 {
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c
index 9a9daf526d0c..40ad23b52bc0 100644
--- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
+++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c
@@ -13,6 +13,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
+#include <linux/gpio/machine.h>
 #include <linux/gpio.h>
 #include <linux/device.h>
 #include <linux/platform_device.h>
@@ -124,6 +125,19 @@ static struct s3c2410_uartcfg amlm5900_uartcfgs[] = {
 	}
 };
 
+static struct gpiod_lookup_table amlm5900_mmc_gpio_table = {
+	.dev_id = "s3c2410-sdi",
+	.table = {
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
 
 static struct platform_device *amlm5900_devices[] __initdata = {
 #ifdef CONFIG_FB_S3C2410
@@ -219,6 +233,7 @@ static void __init amlm5900_init(void)
 	s3c24xx_fb_set_platdata(&amlm5900_fb_info);
 #endif
 	s3c_i2c0_set_platdata(NULL);
+	gpiod_add_lookup_table(&amlm5900_mmc_gpio_table);
 	platform_add_devices(amlm5900_devices, ARRAY_SIZE(amlm5900_devices));
 }
 
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index 58c5ef3cf1d7..3a793aaf2cba 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -136,7 +136,7 @@ static struct platform_device at2440evb_device_eth = {
 };
 
 static struct s3c24xx_mci_pdata at2440evb_mci_pdata __initdata = {
-	/* Intentionally left blank */
+	.set_power = s3c24xx_mci_def_set_power,
 };
 
 static struct gpiod_lookup_table at2440evb_mci_gpio_table = {
@@ -144,10 +144,18 @@ static struct gpiod_lookup_table at2440evb_mci_gpio_table = {
 	.table = {
 		/* Card detect S3C2410_GPG(10) */
 		GPIO_LOOKUP("GPG", 10, "cd", GPIO_ACTIVE_LOW),
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
 		{ },
 	},
 };
 
+
 /* 7" LCD panel */
 
 static struct s3c2410fb_display at2440evb_lcd_cfg __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index 1ca0460d82f4..61b8c6badeb8 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -489,6 +489,20 @@ static struct platform_device gta02_audio = {
 	.id = -1,
 };
 
+static struct gpiod_lookup_table gta02_mmc_gpio_table = {
+	.dev_id = "s3c2410-sdi",
+	.table = {
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
+
 static void __init gta02_map_io(void)
 {
 	s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc));
@@ -545,6 +559,7 @@ static void __init gta02_machine_init(void)
 			      S3C_GPIO_PULL_NONE);
 
 	gpiod_add_lookup_table(&gta02_audio_gpio_table);
+	gpiod_add_lookup_table(&gta02_mmc_gpio_table);
 	platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
 	pm_power_off = gta02_poweroff;
 
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 11f705fb5e32..24f785da7659 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -462,6 +462,7 @@ static void h1940_set_mmc_power(unsigned char power_mode, unsigned short vdd)
 static struct s3c24xx_mci_pdata h1940_mmc_cfg __initdata = {
 	.set_power     = h1940_set_mmc_power,
 	.ocr_avail     = MMC_VDD_32_33,
+	.set_power = s3c24xx_mci_def_set_power,
 };
 
 static struct gpiod_lookup_table h1940_mmc_gpio_table = {
@@ -471,6 +472,13 @@ static struct gpiod_lookup_table h1940_mmc_gpio_table = {
 		GPIO_LOOKUP("GPF", 5, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
 		GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_LOW),
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
 		{ },
 	},
 };
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index 894d43ff94f1..5c000efdf0e8 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -236,7 +236,7 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
 
 static struct s3c24xx_mci_pdata mini2440_mmc_cfg __initdata = {
 	.wprotect_invert	= 1,
-	.set_power		= NULL,
+	.set_power		= s3c24xx_mci_def_set_power,
 	.ocr_avail		= MMC_VDD_32_33|MMC_VDD_33_34,
 };
 
@@ -247,6 +247,13 @@ static struct gpiod_lookup_table mini2440_mmc_gpio_table = {
 		GPIO_LOOKUP("GPG", 8, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
 		GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_HIGH),
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
 		{ },
 	},
 };
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index 5f5ca4b7015c..8d7ad61e9930 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -339,6 +339,8 @@ static struct s3c2410fb_mach_info n30_fb_info __initdata = {
 
 static void n30_sdi_set_power(unsigned char power_mode, unsigned short vdd)
 {
+	s3c24xx_mci_def_set_power(power_mode, vdd);
+
 	switch (power_mode) {
 	case MMC_POWER_ON:
 	case MMC_POWER_UP:
@@ -364,6 +366,13 @@ static struct gpiod_lookup_table n30_mci_gpio_table = {
 		/* Write protect S3C2410_GPG(10) */
 		GPIO_LOOKUP("GPG", 10, "wp", GPIO_ACTIVE_LOW),
 		{ },
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
 	},
 };
 
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index 6686f02a3f4f..9b47b8434f10 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -219,6 +219,20 @@ static struct gpiod_lookup_table qt2410_spi_gpiod_table = {
 	},
 };
 
+static struct gpiod_lookup_table qt2410_mmc_gpiod_table = {
+	.dev_id = "s3c2410-sdi",
+	.table = {
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
+
 /* Board devices */
 
 static struct platform_device *qt2410_devices[] __initdata = {
@@ -342,6 +356,7 @@ static void __init qt2410_machine_init(void)
 	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
 			      S3C_GPIO_PULL_NONE);
 	gpiod_add_lookup_table(&qt2410_spi_gpiod_table);
+	gpiod_add_lookup_table(&qt2410_mmc_gpiod_table);
 	platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices));
 	s3c_pm_init();
 }
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 4eeede398775..820e626f5129 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -545,6 +545,8 @@ static struct platform_device rx1950_backlight = {
 
 static void rx1950_set_mmc_power(unsigned char power_mode, unsigned short vdd)
 {
+	s3c24xx_mci_def_set_power(power_mode, vdd);
+
 	switch (power_mode) {
 	case MMC_POWER_OFF:
 		gpio_direction_output(S3C2410_GPJ(1), 0);
@@ -570,6 +572,13 @@ static struct gpiod_lookup_table rx1950_mmc_gpio_table = {
 		GPIO_LOOKUP("GPF", 5, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
 		GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_LOW),
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
 		{ },
 	},
 };
diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
index 8d8ddd6ea305..d6dbbe6759bc 100644
--- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
@@ -7,6 +7,7 @@
 // derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by
 // Ben Dooks <ben@simtec.co.uk>
 
+#include <linux/gpio/machine.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
@@ -103,6 +104,19 @@ static struct s3c2410_uartcfg tct_hammer_uartcfgs[] = {
 	}
 };
 
+static struct gpiod_lookup_table tct_hammer_mmc_gpio_table = {
+	.dev_id = "s3c2410-sdi",
+	.table = {
+		/* bus pins */
+		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
+		{ },
+	},
+};
 
 static struct platform_device *tct_hammer_devices[] __initdata = {
 	&s3c_device_adc,
@@ -131,6 +145,7 @@ static void __init tct_hammer_init_time(void)
 static void __init tct_hammer_init(void)
 {
 	s3c_i2c0_set_platdata(NULL);
+	gpiod_add_lookup_table(&tct_hammer_mmc_gpio_table);
 	platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices));
 }
 
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index ddd90f0bb380..c0739bda060b 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -5,6 +5,7 @@
 //
 // Base SAMSUNG platform device definitions
 
+#include <linux/gpio.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
@@ -40,6 +41,8 @@
 #include <mach/dma.h>
 #include <mach/irqs.h>
 #include <mach/map.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 #include <mach/regs-s3c2443-clock.h>
 
 #include <plat/cpu.h>
@@ -833,16 +836,42 @@ struct platform_device s3c_device_rtc = {
 /* SDI */
 
 #ifdef CONFIG_PLAT_S3C24XX
+void s3c24xx_mci_def_set_power(unsigned char power_mode, unsigned short vdd)
+{
+	switch (power_mode) {
+	case MMC_POWER_ON:
+	case MMC_POWER_UP:
+		/* Configure GPE5...GPE10 pins in SD mode */
+		s3c_gpio_cfgall_range(S3C2410_GPE(5), 6, S3C_GPIO_SFN(2),
+				      S3C_GPIO_PULL_NONE);
+		break;
+
+	case MMC_POWER_OFF:
+	default:
+		gpio_direction_output(S3C2410_GPE(5), 0);
+		break;
+	}
+}
+
 static struct resource s3c_sdi_resource[] = {
 	[0] = DEFINE_RES_MEM(S3C24XX_PA_SDI, S3C24XX_SZ_SDI),
 	[1] = DEFINE_RES_IRQ(IRQ_SDI),
 };
 
+static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
+	/* This is currently here to avoid a number of if (host->pdata)
+	 * checks. Any zero fields to ensure reasonable defaults are picked. */
+	.no_wprotect = 1,
+	.no_detect = 1,
+	.set_power = s3c24xx_mci_def_set_power,
+};
+
 struct platform_device s3c_device_sdi = {
 	.name		= "s3c2410-sdi",
 	.id		= -1,
 	.num_resources	= ARRAY_SIZE(s3c_sdi_resource),
 	.resource	= s3c_sdi_resource,
+	.dev.platform_data = &s3cmci_def_pdata,
 };
 
 void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata)
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index bce9c33bc4b5..c2b46640a78b 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -25,9 +25,7 @@
 #include <linux/of_device.h>
 #include <linux/mmc/slot-gpio.h>
 
-#include <plat/gpio-cfg.h>
 #include <mach/dma.h>
-#include <mach/gpio-samsung.h>
 
 #include <linux/platform_data/mmc-s3cmci.h>
 
@@ -307,7 +305,8 @@ static inline void clear_imask(struct s3cmci_host *host)
 static void s3cmci_check_sdio_irq(struct s3cmci_host *host)
 {
 	if (host->sdio_irqen) {
-		if (gpio_get_value(S3C2410_GPE(8)) == 0) {
+		if (host->pdata->bus[3] &&
+		    gpiod_get_value(host->pdata->bus[3]) == 0) {
 			pr_debug("%s: signalling irq\n", __func__);
 			mmc_signal_sdio_irq(host->mmc);
 		}
@@ -1213,33 +1212,20 @@ static void s3cmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	switch (ios->power_mode) {
 	case MMC_POWER_ON:
 	case MMC_POWER_UP:
-		/* Configure GPE5...GPE10 pins in SD mode */
-		if (!host->pdev->dev.of_node)
-			s3c_gpio_cfgall_range(S3C2410_GPE(5), 6, S3C_GPIO_SFN(2),
-					      S3C_GPIO_PULL_NONE);
-
-		if (host->pdata->set_power)
-			host->pdata->set_power(ios->power_mode, ios->vdd);
-
 		if (!host->is2440)
 			mci_con |= S3C2410_SDICON_FIFORESET;
-
 		break;
 
 	case MMC_POWER_OFF:
 	default:
-		if (!host->pdev->dev.of_node)
-			gpio_direction_output(S3C2410_GPE(5), 0);
-
 		if (host->is2440)
 			mci_con |= S3C2440_SDICON_SDRESET;
-
-		if (host->pdata->set_power)
-			host->pdata->set_power(ios->power_mode, ios->vdd);
-
 		break;
 	}
 
+	if (host->pdata->set_power)
+		host->pdata->set_power(ios->power_mode, ios->vdd);
+
 	s3cmci_set_clk(host, ios);
 
 	/* Set CLOCK_ENABLE */
@@ -1317,13 +1303,6 @@ static const struct mmc_host_ops s3cmci_ops = {
 	.enable_sdio_irq = s3cmci_enable_sdio_irq,
 };
 
-static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
-	/* This is currently here to avoid a number of if (host->pdata)
-	 * checks. Any zero fields to ensure reasonable defaults are picked. */
-	 .no_wprotect = 1,
-	 .no_detect = 1,
-};
-
 #ifdef CONFIG_ARM_S3C24XX_CPUFREQ
 
 static int s3cmci_cpufreq_transition(struct notifier_block *nb,
@@ -1477,24 +1456,21 @@ static int s3cmci_probe_pdata(struct s3cmci_host *host)
 	int i, ret;
 
 	host->is2440 = platform_get_device_id(pdev)->driver_data;
+	pdata = pdev->dev.platform_data;
+	if (!pdata) {
+		dev_err(&pdev->dev, "need platform data");
+		return -ENXIO;
+	}
 
-	for (i = S3C2410_GPE(5); i <= S3C2410_GPE(10); i++) {
-		ret = gpio_request(i, dev_name(&pdev->dev));
-		if (ret) {
+	for (i = 0; i < 6; i++) {
+		pdata->bus[i] = devm_gpiod_get_index(&pdev->dev, "bus", i,
+						     GPIOD_OUT_LOW);
+		if (IS_ERR(pdata->bus[i])) {
 			dev_err(&pdev->dev, "failed to get gpio %d\n", i);
-
-			for (i--; i >= S3C2410_GPE(5); i--)
-				gpio_free(i);
-
-			return ret;
+			return PTR_ERR(pdata->bus[i]);
 		}
 	}
 
-	if (!pdev->dev.platform_data)
-		pdev->dev.platform_data = &s3cmci_def_pdata;
-
-	pdata = pdev->dev.platform_data;
-
 	if (pdata->no_wprotect)
 		mmc->caps2 |= MMC_CAP2_NO_WRITE_PROTECT;
 
@@ -1549,7 +1525,6 @@ static int s3cmci_probe(struct platform_device *pdev)
 	struct s3cmci_host *host;
 	struct mmc_host	*mmc;
 	int ret;
-	int i;
 
 	mmc = mmc_alloc_host(sizeof(struct s3cmci_host), &pdev->dev);
 	if (!mmc) {
@@ -1593,7 +1568,7 @@ static int s3cmci_probe(struct platform_device *pdev)
 			"failed to get io memory region resource.\n");
 
 		ret = -ENOENT;
-		goto probe_free_gpio;
+		goto probe_free_host;
 	}
 
 	host->mem = request_mem_region(host->mem->start,
@@ -1602,7 +1577,7 @@ static int s3cmci_probe(struct platform_device *pdev)
 	if (!host->mem) {
 		dev_err(&pdev->dev, "failed to request io memory region.\n");
 		ret = -ENOENT;
-		goto probe_free_gpio;
+		goto probe_free_host;
 	}
 
 	host->base = ioremap(host->mem->start, resource_size(host->mem));
@@ -1726,11 +1701,6 @@ static int s3cmci_probe(struct platform_device *pdev)
  probe_free_mem_region:
 	release_mem_region(host->mem->start, resource_size(host->mem));
 
- probe_free_gpio:
-	if (!pdev->dev.of_node)
-		for (i = S3C2410_GPE(5); i <= S3C2410_GPE(10); i++)
-			gpio_free(i);
-
  probe_free_host:
 	mmc_free_host(mmc);
 
@@ -1756,7 +1726,6 @@ static int s3cmci_remove(struct platform_device *pdev)
 {
 	struct mmc_host		*mmc  = platform_get_drvdata(pdev);
 	struct s3cmci_host	*host = mmc_priv(mmc);
-	int i;
 
 	s3cmci_shutdown(pdev);
 
@@ -1769,10 +1738,6 @@ static int s3cmci_remove(struct platform_device *pdev)
 
 	free_irq(host->irq, host);
 
-	if (!pdev->dev.of_node)
-		for (i = S3C2410_GPE(5); i <= S3C2410_GPE(10); i++)
-			gpio_free(i);
-
 	iounmap(host->base);
 	release_mem_region(host->mem->start, resource_size(host->mem));
 
diff --git a/include/linux/platform_data/mmc-s3cmci.h b/include/linux/platform_data/mmc-s3cmci.h
index 33310b11cbdd..bacb86db3112 100644
--- a/include/linux/platform_data/mmc-s3cmci.h
+++ b/include/linux/platform_data/mmc-s3cmci.h
@@ -35,6 +35,7 @@ struct s3c24xx_mci_pdata {
 	unsigned long	ocr_avail;
 	void		(*set_power)(unsigned char power_mode,
 				     unsigned short vdd);
+	struct gpio_desc *bus[6];
 };
 
 /**
@@ -44,6 +45,7 @@ struct s3c24xx_mci_pdata {
  * Copy the platform data supplied by @pdata so that this can be marked
  * __initdata.
  */
+extern void s3c24xx_mci_def_set_power(unsigned char power_mode, unsigned short vdd);
 extern void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata);
 
 #endif /* _ARCH_NCI_H */
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 24/36] ARM: s3c: include mach/irqs.h where needed
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (22 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 23/36] ARM: s3c: move s3cmci pinctrl handling " Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-10 20:30   ` [PATCH 25/36] ARM: s3c: spi: avoid hardcoding fiq number in driver Arnd Bergmann
                     ` (10 subsequent siblings)
  34 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, Arnd Bergmann, linus.walleij, linux-kernel,
	Thomas Gleixner, linux-arm-kernel

Preparing for a later conversion to sparse IRQs, this ensures that
the mach/irqs.h header is still visible in files that reference
an IRQ number.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/bast-ide.c    | 1 +
 arch/arm/mach-s3c24xx/bast-irq.c    | 1 +
 arch/arm/mach-s3c24xx/common.h      | 1 +
 arch/arm/mach-s3c24xx/irq-s3c24xx.c | 1 +
 arch/arm/mach-s3c24xx/pm-s3c2412.c  | 2 ++
 arch/arm/mach-s3c24xx/s3c2443.c     | 1 +
 arch/arm/mach-s3c24xx/simtec-usb.c  | 1 +
 7 files changed, 8 insertions(+)

diff --git a/arch/arm/mach-s3c24xx/bast-ide.c b/arch/arm/mach-s3c24xx/bast-ide.c
index 067944398f46..ee6fbb407640 100644
--- a/arch/arm/mach-s3c24xx/bast-ide.c
+++ b/arch/arm/mach-s3c24xx/bast-ide.c
@@ -20,6 +20,7 @@
 #include <asm/mach/irq.h>
 
 #include <mach/map.h>
+#include <mach/irqs.h>
 
 #include "bast.h"
 
diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c24xx/bast-irq.c
index 03728058d58d..4cec084ae443 100644
--- a/arch/arm/mach-s3c24xx/bast-irq.c
+++ b/arch/arm/mach-s3c24xx/bast-irq.c
@@ -17,6 +17,7 @@
 
 #include <mach/hardware.h>
 #include <mach/regs-irq.h>
+#include <mach/irqs.h>
 
 #include "bast.h"
 
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h
index d087b20e8857..97eb72f1d8bf 100644
--- a/arch/arm/mach-s3c24xx/common.h
+++ b/arch/arm/mach-s3c24xx/common.h
@@ -10,6 +10,7 @@
 #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
 
 #include <linux/reboot.h>
+#include <mach/irqs.h>
 
 struct s3c2410_uartcfg;
 
diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx.c b/arch/arm/mach-s3c24xx/irq-s3c24xx.c
index d2031fecc386..b0e879ee14c1 100644
--- a/arch/arm/mach-s3c24xx/irq-s3c24xx.c
+++ b/arch/arm/mach-s3c24xx/irq-s3c24xx.c
@@ -25,6 +25,7 @@
 #include <asm/exception.h>
 #include <asm/mach/irq.h>
 
+#include <mach/irqs.h>
 #include <mach/regs-irq.h>
 #include <mach/regs-gpio.h>
 
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2412.c b/arch/arm/mach-s3c24xx/pm-s3c2412.c
index 2dfdaab0aa1f..1ad9c61f9253 100644
--- a/arch/arm/mach-s3c24xx/pm-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/pm-s3c2412.c
@@ -20,6 +20,8 @@
 #include <asm/irq.h>
 
 #include <mach/hardware.h>
+#include <mach/irqs.h>
+
 #include <mach/regs-gpio.h>
 
 #include <plat/cpu.h>
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
index 313e369c3ddd..f404ecac4baf 100644
--- a/arch/arm/mach-s3c24xx/s3c2443.c
+++ b/arch/arm/mach-s3c24xx/s3c2443.c
@@ -25,6 +25,7 @@
 
 #include <mach/hardware.h>
 #include <mach/gpio-samsung.h>
+#include <mach/irqs.h>
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
diff --git a/arch/arm/mach-s3c24xx/simtec-usb.c b/arch/arm/mach-s3c24xx/simtec-usb.c
index dc1016ffed94..b15e0c49fa11 100644
--- a/arch/arm/mach-s3c24xx/simtec-usb.c
+++ b/arch/arm/mach-s3c24xx/simtec-usb.c
@@ -25,6 +25,7 @@
 
 #include <mach/hardware.h>
 #include <mach/gpio-samsung.h>
+#include <mach/irqs.h>
 #include <asm/irq.h>
 
 #include <linux/platform_data/usb-ohci-s3c2410.h>
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 24/36] ARM: s3c: include mach/irqs.h where needed
  2019-10-10 20:30   ` [PATCH 24/36] ARM: s3c: include mach/irqs.h where needed Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Thomas Gleixner, linux-kernel

Preparing for a later conversion to sparse IRQs, this ensures that
the mach/irqs.h header is still visible in files that reference
an IRQ number.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/bast-ide.c    | 1 +
 arch/arm/mach-s3c24xx/bast-irq.c    | 1 +
 arch/arm/mach-s3c24xx/common.h      | 1 +
 arch/arm/mach-s3c24xx/irq-s3c24xx.c | 1 +
 arch/arm/mach-s3c24xx/pm-s3c2412.c  | 2 ++
 arch/arm/mach-s3c24xx/s3c2443.c     | 1 +
 arch/arm/mach-s3c24xx/simtec-usb.c  | 1 +
 7 files changed, 8 insertions(+)

diff --git a/arch/arm/mach-s3c24xx/bast-ide.c b/arch/arm/mach-s3c24xx/bast-ide.c
index 067944398f46..ee6fbb407640 100644
--- a/arch/arm/mach-s3c24xx/bast-ide.c
+++ b/arch/arm/mach-s3c24xx/bast-ide.c
@@ -20,6 +20,7 @@
 #include <asm/mach/irq.h>
 
 #include <mach/map.h>
+#include <mach/irqs.h>
 
 #include "bast.h"
 
diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c24xx/bast-irq.c
index 03728058d58d..4cec084ae443 100644
--- a/arch/arm/mach-s3c24xx/bast-irq.c
+++ b/arch/arm/mach-s3c24xx/bast-irq.c
@@ -17,6 +17,7 @@
 
 #include <mach/hardware.h>
 #include <mach/regs-irq.h>
+#include <mach/irqs.h>
 
 #include "bast.h"
 
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h
index d087b20e8857..97eb72f1d8bf 100644
--- a/arch/arm/mach-s3c24xx/common.h
+++ b/arch/arm/mach-s3c24xx/common.h
@@ -10,6 +10,7 @@
 #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
 
 #include <linux/reboot.h>
+#include <mach/irqs.h>
 
 struct s3c2410_uartcfg;
 
diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx.c b/arch/arm/mach-s3c24xx/irq-s3c24xx.c
index d2031fecc386..b0e879ee14c1 100644
--- a/arch/arm/mach-s3c24xx/irq-s3c24xx.c
+++ b/arch/arm/mach-s3c24xx/irq-s3c24xx.c
@@ -25,6 +25,7 @@
 #include <asm/exception.h>
 #include <asm/mach/irq.h>
 
+#include <mach/irqs.h>
 #include <mach/regs-irq.h>
 #include <mach/regs-gpio.h>
 
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2412.c b/arch/arm/mach-s3c24xx/pm-s3c2412.c
index 2dfdaab0aa1f..1ad9c61f9253 100644
--- a/arch/arm/mach-s3c24xx/pm-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/pm-s3c2412.c
@@ -20,6 +20,8 @@
 #include <asm/irq.h>
 
 #include <mach/hardware.h>
+#include <mach/irqs.h>
+
 #include <mach/regs-gpio.h>
 
 #include <plat/cpu.h>
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
index 313e369c3ddd..f404ecac4baf 100644
--- a/arch/arm/mach-s3c24xx/s3c2443.c
+++ b/arch/arm/mach-s3c24xx/s3c2443.c
@@ -25,6 +25,7 @@
 
 #include <mach/hardware.h>
 #include <mach/gpio-samsung.h>
+#include <mach/irqs.h>
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
diff --git a/arch/arm/mach-s3c24xx/simtec-usb.c b/arch/arm/mach-s3c24xx/simtec-usb.c
index dc1016ffed94..b15e0c49fa11 100644
--- a/arch/arm/mach-s3c24xx/simtec-usb.c
+++ b/arch/arm/mach-s3c24xx/simtec-usb.c
@@ -25,6 +25,7 @@
 
 #include <mach/hardware.h>
 #include <mach/gpio-samsung.h>
+#include <mach/irqs.h>
 #include <asm/irq.h>
 
 #include <linux/platform_data/usb-ohci-s3c2410.h>
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 25/36] ARM: s3c: spi: avoid hardcoding fiq number in driver
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (23 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 24/36] ARM: s3c: include mach/irqs.h where needed Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-10 20:30   ` [PATCH 26/36] ARM: s3c: bast: avoid irq_desc array usage Arnd Bergmann
                     ` (9 subsequent siblings)
  34 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Andi Shyti, Mark Brown
  Cc: linux-samsung-soc, Arnd Bergmann, linus.walleij, linux-kernel,
	linux-spi, linux-arm-kernel

The IRQ_EINT0 constant is a platform detail that is
defined in mach/irqs.h and not visible to drivers once
that header is made private.

Since the same calculation already happens in s3c24xx_set_fiq,
just return the value from there.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/irq-s3c24xx.c | 12 +++++++++---
 drivers/spi/spi-s3c24xx.c           | 18 ++----------------
 include/linux/spi/s3c24xx.h         |  2 +-
 3 files changed, 12 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx.c b/arch/arm/mach-s3c24xx/irq-s3c24xx.c
index b0e879ee14c1..3965347cacf0 100644
--- a/arch/arm/mach-s3c24xx/irq-s3c24xx.c
+++ b/arch/arm/mach-s3c24xx/irq-s3c24xx.c
@@ -376,14 +376,17 @@ asmlinkage void __exception_irq_entry s3c24xx_handle_irq(struct pt_regs *regs)
 /**
  * s3c24xx_set_fiq - set the FIQ routing
  * @irq: IRQ number to route to FIQ on processor.
+ * @ack_ptr: pointer to a location for storing the bit mask
  * @on: Whether to route @irq to the FIQ, or to remove the FIQ routing.
  *
  * Change the state of the IRQ to FIQ routing depending on @irq and @on. If
  * @on is true, the @irq is checked to see if it can be routed and the
  * interrupt controller updated to route the IRQ. If @on is false, the FIQ
  * routing is cleared, regardless of which @irq is specified.
+ *
+ * returns the mask value for the register.
  */
-int s3c24xx_set_fiq(unsigned int irq, bool on)
+int s3c24xx_set_fiq(unsigned int irq, u32 *ack_ptr, bool on)
 {
 	u32 intmod;
 	unsigned offs;
@@ -391,15 +394,18 @@ int s3c24xx_set_fiq(unsigned int irq, bool on)
 	if (on) {
 		offs = irq - FIQ_START;
 		if (offs > 31)
-			return -EINVAL;
+			return 0;
 
 		intmod = 1 << offs;
 	} else {
 		intmod = 0;
 	}
 
+	if (ack_ptr)
+		*ack_ptr = intmod;
 	writel_relaxed(intmod, S3C2410_INTMOD);
-	return 0;
+
+	return intmod;
 }
 
 EXPORT_SYMBOL_GPL(s3c24xx_set_fiq);
diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
index 464146fc8420..58025876a081 100644
--- a/drivers/spi/spi-s3c24xx.c
+++ b/drivers/spi/spi-s3c24xx.c
@@ -229,17 +229,6 @@ struct spi_fiq_code {
 	u8	data[0];
 };
 
-/**
- * ack_bit - turn IRQ into IRQ acknowledgement bit
- * @irq: The interrupt number
- *
- * Returns the bit to write to the interrupt acknowledge register.
- */
-static inline u32 ack_bit(unsigned int irq)
-{
-	return 1 << (irq - IRQ_EINT0);
-}
-
 /**
  * s3c24xx_spi_tryfiq - attempt to claim and setup FIQ for transfer
  * @hw: The hardware state.
@@ -256,6 +245,7 @@ static void s3c24xx_spi_tryfiq(struct s3c24xx_spi *hw)
 	struct pt_regs regs;
 	enum spi_fiq_mode mode;
 	struct spi_fiq_code *code;
+	u32 *ack_ptr = NULL;
 	int ret;
 
 	if (!hw->fiq_claimed) {
@@ -282,8 +272,6 @@ static void s3c24xx_spi_tryfiq(struct s3c24xx_spi *hw)
 	set_fiq_regs(&regs);
 
 	if (hw->fiq_mode != mode) {
-		u32 *ack_ptr;
-
 		hw->fiq_mode = mode;
 
 		switch (mode) {
@@ -303,12 +291,10 @@ static void s3c24xx_spi_tryfiq(struct s3c24xx_spi *hw)
 		BUG_ON(!code);
 
 		ack_ptr = (u32 *)&code->data[code->ack_offset];
-		*ack_ptr = ack_bit(hw->irq);
-
 		set_fiq_handler(&code->data, code->length);
 	}
 
-	s3c24xx_set_fiq(hw->irq, true);
+	s3c24xx_set_fiq(hw->irq, ack_ptr, true);
 
 	hw->fiq_mode = mode;
 	hw->fiq_inuse = 1;
diff --git a/include/linux/spi/s3c24xx.h b/include/linux/spi/s3c24xx.h
index c91d10b82f08..440a71593162 100644
--- a/include/linux/spi/s3c24xx.h
+++ b/include/linux/spi/s3c24xx.h
@@ -20,6 +20,6 @@ struct s3c2410_spi_info {
 	void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
 };
 
-extern int s3c24xx_set_fiq(unsigned int irq, bool on);
+extern int s3c24xx_set_fiq(unsigned int irq, u32 *ack_ptr, bool on);
 
 #endif /* __LINUX_SPI_S3C24XX_H */
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 25/36] ARM: s3c: spi: avoid hardcoding fiq number in driver
  2019-10-10 20:30   ` [PATCH 25/36] ARM: s3c: spi: avoid hardcoding fiq number in driver Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Andi Shyti, Mark Brown
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel, linux-spi

The IRQ_EINT0 constant is a platform detail that is
defined in mach/irqs.h and not visible to drivers once
that header is made private.

Since the same calculation already happens in s3c24xx_set_fiq,
just return the value from there.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/irq-s3c24xx.c | 12 +++++++++---
 drivers/spi/spi-s3c24xx.c           | 18 ++----------------
 include/linux/spi/s3c24xx.h         |  2 +-
 3 files changed, 12 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx.c b/arch/arm/mach-s3c24xx/irq-s3c24xx.c
index b0e879ee14c1..3965347cacf0 100644
--- a/arch/arm/mach-s3c24xx/irq-s3c24xx.c
+++ b/arch/arm/mach-s3c24xx/irq-s3c24xx.c
@@ -376,14 +376,17 @@ asmlinkage void __exception_irq_entry s3c24xx_handle_irq(struct pt_regs *regs)
 /**
  * s3c24xx_set_fiq - set the FIQ routing
  * @irq: IRQ number to route to FIQ on processor.
+ * @ack_ptr: pointer to a location for storing the bit mask
  * @on: Whether to route @irq to the FIQ, or to remove the FIQ routing.
  *
  * Change the state of the IRQ to FIQ routing depending on @irq and @on. If
  * @on is true, the @irq is checked to see if it can be routed and the
  * interrupt controller updated to route the IRQ. If @on is false, the FIQ
  * routing is cleared, regardless of which @irq is specified.
+ *
+ * returns the mask value for the register.
  */
-int s3c24xx_set_fiq(unsigned int irq, bool on)
+int s3c24xx_set_fiq(unsigned int irq, u32 *ack_ptr, bool on)
 {
 	u32 intmod;
 	unsigned offs;
@@ -391,15 +394,18 @@ int s3c24xx_set_fiq(unsigned int irq, bool on)
 	if (on) {
 		offs = irq - FIQ_START;
 		if (offs > 31)
-			return -EINVAL;
+			return 0;
 
 		intmod = 1 << offs;
 	} else {
 		intmod = 0;
 	}
 
+	if (ack_ptr)
+		*ack_ptr = intmod;
 	writel_relaxed(intmod, S3C2410_INTMOD);
-	return 0;
+
+	return intmod;
 }
 
 EXPORT_SYMBOL_GPL(s3c24xx_set_fiq);
diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
index 464146fc8420..58025876a081 100644
--- a/drivers/spi/spi-s3c24xx.c
+++ b/drivers/spi/spi-s3c24xx.c
@@ -229,17 +229,6 @@ struct spi_fiq_code {
 	u8	data[0];
 };
 
-/**
- * ack_bit - turn IRQ into IRQ acknowledgement bit
- * @irq: The interrupt number
- *
- * Returns the bit to write to the interrupt acknowledge register.
- */
-static inline u32 ack_bit(unsigned int irq)
-{
-	return 1 << (irq - IRQ_EINT0);
-}
-
 /**
  * s3c24xx_spi_tryfiq - attempt to claim and setup FIQ for transfer
  * @hw: The hardware state.
@@ -256,6 +245,7 @@ static void s3c24xx_spi_tryfiq(struct s3c24xx_spi *hw)
 	struct pt_regs regs;
 	enum spi_fiq_mode mode;
 	struct spi_fiq_code *code;
+	u32 *ack_ptr = NULL;
 	int ret;
 
 	if (!hw->fiq_claimed) {
@@ -282,8 +272,6 @@ static void s3c24xx_spi_tryfiq(struct s3c24xx_spi *hw)
 	set_fiq_regs(&regs);
 
 	if (hw->fiq_mode != mode) {
-		u32 *ack_ptr;
-
 		hw->fiq_mode = mode;
 
 		switch (mode) {
@@ -303,12 +291,10 @@ static void s3c24xx_spi_tryfiq(struct s3c24xx_spi *hw)
 		BUG_ON(!code);
 
 		ack_ptr = (u32 *)&code->data[code->ack_offset];
-		*ack_ptr = ack_bit(hw->irq);
-
 		set_fiq_handler(&code->data, code->length);
 	}
 
-	s3c24xx_set_fiq(hw->irq, true);
+	s3c24xx_set_fiq(hw->irq, ack_ptr, true);
 
 	hw->fiq_mode = mode;
 	hw->fiq_inuse = 1;
diff --git a/include/linux/spi/s3c24xx.h b/include/linux/spi/s3c24xx.h
index c91d10b82f08..440a71593162 100644
--- a/include/linux/spi/s3c24xx.h
+++ b/include/linux/spi/s3c24xx.h
@@ -20,6 +20,6 @@ struct s3c2410_spi_info {
 	void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
 };
 
-extern int s3c24xx_set_fiq(unsigned int irq, bool on);
+extern int s3c24xx_set_fiq(unsigned int irq, u32 *ack_ptr, bool on);
 
 #endif /* __LINUX_SPI_S3C24XX_H */
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 26/36] ARM: s3c: bast: avoid irq_desc array usage
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (24 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 25/36] ARM: s3c: spi: avoid hardcoding fiq number in driver Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-10 20:30   ` [PATCH 27/36] ARM: s3c: fix mmc gpio lookup tables Arnd Bergmann
                     ` (8 subsequent siblings)
  34 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel

Once we move to sparse irqs, the irq_desc[] array is no
longer accessible, so replace the two uses in bast-irq.c.
The first one can use irq_to_desc(), the second one seems
completely unneeded as we already have a pointer to the
correct descriptor.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/bast-irq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c24xx/bast-irq.c
index 4cec084ae443..b3083ee3ab33 100644
--- a/arch/arm/mach-s3c24xx/bast-irq.c
+++ b/arch/arm/mach-s3c24xx/bast-irq.c
@@ -63,7 +63,7 @@ bast_pc104_mask(struct irq_data *data)
 static void
 bast_pc104_maskack(struct irq_data *data)
 {
-	struct irq_desc *desc = irq_desc + BAST_IRQ_ISA;
+	struct irq_desc *desc = irq_to_desc(BAST_IRQ_ISA);
 
 	bast_pc104_mask(data);
 	desc->irq_data.chip->irq_ack(&desc->irq_data);
@@ -95,8 +95,6 @@ static void bast_irq_pc104_demux(struct irq_desc *desc)
 
 	if (unlikely(stat == 0)) {
 		/* ack if we get an irq with nothing (ie, startup) */
-
-		desc = irq_desc + BAST_IRQ_ISA;
 		desc->irq_data.chip->irq_ack(&desc->irq_data);
 	} else {
 		/* handle the IRQ */
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 26/36] ARM: s3c: bast: avoid irq_desc array usage
  2019-10-10 20:30   ` [PATCH 26/36] ARM: s3c: bast: avoid irq_desc array usage Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel

Once we move to sparse irqs, the irq_desc[] array is no
longer accessible, so replace the two uses in bast-irq.c.
The first one can use irq_to_desc(), the second one seems
completely unneeded as we already have a pointer to the
correct descriptor.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/bast-irq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c24xx/bast-irq.c
index 4cec084ae443..b3083ee3ab33 100644
--- a/arch/arm/mach-s3c24xx/bast-irq.c
+++ b/arch/arm/mach-s3c24xx/bast-irq.c
@@ -63,7 +63,7 @@ bast_pc104_mask(struct irq_data *data)
 static void
 bast_pc104_maskack(struct irq_data *data)
 {
-	struct irq_desc *desc = irq_desc + BAST_IRQ_ISA;
+	struct irq_desc *desc = irq_to_desc(BAST_IRQ_ISA);
 
 	bast_pc104_mask(data);
 	desc->irq_data.chip->irq_ack(&desc->irq_data);
@@ -95,8 +95,6 @@ static void bast_irq_pc104_demux(struct irq_desc *desc)
 
 	if (unlikely(stat == 0)) {
 		/* ack if we get an irq with nothing (ie, startup) */
-
-		desc = irq_desc + BAST_IRQ_ISA;
 		desc->irq_data.chip->irq_ack(&desc->irq_data);
 	} else {
 		/* handle the IRQ */
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 27/36] ARM: s3c: fix mmc gpio lookup tables
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (25 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 26/36] ARM: s3c: bast: avoid irq_desc array usage Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-10 20:30   ` [PATCH 28/36] fbdev: s3c2410fb: remove mach header dependency Arnd Bergmann
                     ` (7 subsequent siblings)
  34 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Jaehoon Chung, Sylwester Nawrocki, Sergio Prado,
	Ulf Hansson, linux-kernel

The gpio controller names differ between s3c24xx and s3c64xx,
and it seems that these all got the wrong names, using GPx instead
of GPIOx.

Fixes: d2951dfa070d ("mmc: s3cmci: Use the slot GPIO descriptor")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/mach-at2440evb.c | 2 +-
 arch/arm/mach-s3c24xx/mach-h1940.c     | 4 ++--
 arch/arm/mach-s3c24xx/mach-mini2440.c  | 4 ++--
 arch/arm/mach-s3c24xx/mach-n30.c       | 4 ++--
 arch/arm/mach-s3c24xx/mach-rx1950.c    | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index 3a793aaf2cba..b2199906e678 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -143,7 +143,7 @@ static struct gpiod_lookup_table at2440evb_mci_gpio_table = {
 	.dev_id = "s3c2410-sdi",
 	.table = {
 		/* Card detect S3C2410_GPG(10) */
-		GPIO_LOOKUP("GPG", 10, "cd", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOG", 10, "cd", GPIO_ACTIVE_LOW),
 		/* bus pins */
 		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
 		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 24f785da7659..446891e23511 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -469,9 +469,9 @@ static struct gpiod_lookup_table h1940_mmc_gpio_table = {
 	.dev_id = "s3c2410-sdi",
 	.table = {
 		/* Card detect S3C2410_GPF(5) */
-		GPIO_LOOKUP("GPF", 5, "cd", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOF", 5, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
-		GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOH", 8, "wp", GPIO_ACTIVE_LOW),
 		/* bus pins */
 		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
 		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index 5c000efdf0e8..d73167f615b8 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -244,9 +244,9 @@ static struct gpiod_lookup_table mini2440_mmc_gpio_table = {
 	.dev_id = "s3c2410-sdi",
 	.table = {
 		/* Card detect S3C2410_GPG(8) */
-		GPIO_LOOKUP("GPG", 8, "cd", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOG", 8, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
-		GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP("GPIOH", 8, "wp", GPIO_ACTIVE_HIGH),
 		/* bus pins */
 		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
 		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index 8d7ad61e9930..f283abab0761 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -362,9 +362,9 @@ static struct gpiod_lookup_table n30_mci_gpio_table = {
 	.dev_id = "s3c2410-sdi",
 	.table = {
 		/* Card detect S3C2410_GPF(1) */
-		GPIO_LOOKUP("GPF", 1, "cd", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOF", 1, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPG(10) */
-		GPIO_LOOKUP("GPG", 10, "wp", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOG", 10, "wp", GPIO_ACTIVE_LOW),
 		{ },
 		/* bus pins */
 		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 820e626f5129..7752203fd9cd 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -569,9 +569,9 @@ static struct gpiod_lookup_table rx1950_mmc_gpio_table = {
 	.dev_id = "s3c2410-sdi",
 	.table = {
 		/* Card detect S3C2410_GPF(5) */
-		GPIO_LOOKUP("GPF", 5, "cd", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOF", 5, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
-		GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOH", 8, "wp", GPIO_ACTIVE_LOW),
 		/* bus pins */
 		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
 		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 27/36] ARM: s3c: fix mmc gpio lookup tables
  2019-10-10 20:30   ` [PATCH 27/36] ARM: s3c: fix mmc gpio lookup tables Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, Jaehoon Chung, Sylwester Nawrocki, Sergio Prado,
	Ulf Hansson, linux-kernel

The gpio controller names differ between s3c24xx and s3c64xx,
and it seems that these all got the wrong names, using GPx instead
of GPIOx.

Fixes: d2951dfa070d ("mmc: s3cmci: Use the slot GPIO descriptor")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/mach-at2440evb.c | 2 +-
 arch/arm/mach-s3c24xx/mach-h1940.c     | 4 ++--
 arch/arm/mach-s3c24xx/mach-mini2440.c  | 4 ++--
 arch/arm/mach-s3c24xx/mach-n30.c       | 4 ++--
 arch/arm/mach-s3c24xx/mach-rx1950.c    | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index 3a793aaf2cba..b2199906e678 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -143,7 +143,7 @@ static struct gpiod_lookup_table at2440evb_mci_gpio_table = {
 	.dev_id = "s3c2410-sdi",
 	.table = {
 		/* Card detect S3C2410_GPG(10) */
-		GPIO_LOOKUP("GPG", 10, "cd", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOG", 10, "cd", GPIO_ACTIVE_LOW),
 		/* bus pins */
 		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
 		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 24f785da7659..446891e23511 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -469,9 +469,9 @@ static struct gpiod_lookup_table h1940_mmc_gpio_table = {
 	.dev_id = "s3c2410-sdi",
 	.table = {
 		/* Card detect S3C2410_GPF(5) */
-		GPIO_LOOKUP("GPF", 5, "cd", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOF", 5, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
-		GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOH", 8, "wp", GPIO_ACTIVE_LOW),
 		/* bus pins */
 		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
 		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index 5c000efdf0e8..d73167f615b8 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -244,9 +244,9 @@ static struct gpiod_lookup_table mini2440_mmc_gpio_table = {
 	.dev_id = "s3c2410-sdi",
 	.table = {
 		/* Card detect S3C2410_GPG(8) */
-		GPIO_LOOKUP("GPG", 8, "cd", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOG", 8, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
-		GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_HIGH),
+		GPIO_LOOKUP("GPIOH", 8, "wp", GPIO_ACTIVE_HIGH),
 		/* bus pins */
 		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
 		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index 8d7ad61e9930..f283abab0761 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -362,9 +362,9 @@ static struct gpiod_lookup_table n30_mci_gpio_table = {
 	.dev_id = "s3c2410-sdi",
 	.table = {
 		/* Card detect S3C2410_GPF(1) */
-		GPIO_LOOKUP("GPF", 1, "cd", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOF", 1, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPG(10) */
-		GPIO_LOOKUP("GPG", 10, "wp", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOG", 10, "wp", GPIO_ACTIVE_LOW),
 		{ },
 		/* bus pins */
 		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 820e626f5129..7752203fd9cd 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -569,9 +569,9 @@ static struct gpiod_lookup_table rx1950_mmc_gpio_table = {
 	.dev_id = "s3c2410-sdi",
 	.table = {
 		/* Card detect S3C2410_GPF(5) */
-		GPIO_LOOKUP("GPF", 5, "cd", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOF", 5, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
-		GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_LOW),
+		GPIO_LOOKUP("GPIOH", 8, "wp", GPIO_ACTIVE_LOW),
 		/* bus pins */
 		GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
 		GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 28/36] fbdev: s3c2410fb: remove mach header dependency
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (26 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 27/36] ARM: s3c: fix mmc gpio lookup tables Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-23 13:13     ` Krzysztof Kozlowski
  2019-10-10 20:30   ` [PATCH 29/36] ARM: s3c: cpufreq: split out registers Arnd Bergmann
                     ` (6 subsequent siblings)
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz
  Cc: linux-fbdev, linux-samsung-soc, Arnd Bergmann, linux-kernel,
	dri-devel, linux-stm32, linux-arm-kernel

The s3c2410fb driver is too deeply intertwined with the s3c24xx
platform code. Change it in a way that avoids the use of platform
header files but having all interface data in a platform_data
header, and the private register definitions next to the driver
itself.

One ugly bit here is that the driver pokes directly into gpio
registers, which are owned by another driver. Passing the
mapped addresses in platform_data is somewhat suboptimal, but
it is a small improvement over the previous version.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/include/mach/fb.h       |  2 --
 arch/arm/mach-s3c24xx/mach-amlm5900.c         |  7 ++--
 arch/arm/mach-s3c24xx/mach-anubis.c           |  1 -
 arch/arm/mach-s3c24xx/mach-at2440evb.c        |  3 +-
 arch/arm/mach-s3c24xx/mach-bast.c             |  3 +-
 arch/arm/mach-s3c24xx/mach-gta02.c            |  2 +-
 arch/arm/mach-s3c24xx/mach-h1940.c            |  7 ++--
 arch/arm/mach-s3c24xx/mach-jive.c             | 10 ++++--
 arch/arm/mach-s3c24xx/mach-mini2440.c         |  9 +++--
 arch/arm/mach-s3c24xx/mach-n30.c              |  3 +-
 arch/arm/mach-s3c24xx/mach-osiris.c           |  1 -
 arch/arm/mach-s3c24xx/mach-qt2410.c           |  3 +-
 arch/arm/mach-s3c24xx/mach-rx1950.c           |  8 +++--
 arch/arm/mach-s3c24xx/mach-rx3715.c           |  7 ++--
 arch/arm/mach-s3c24xx/mach-smdk2413.c         |  3 +-
 arch/arm/mach-s3c24xx/mach-smdk2416.c         |  1 -
 arch/arm/mach-s3c24xx/mach-smdk2440.c         |  8 +++--
 arch/arm/mach-s3c24xx/mach-smdk2443.c         |  3 +-
 arch/arm/mach-s3c24xx/mach-vstms.c            |  3 +-
 arch/arm/plat-samsung/devs.c                  |  2 +-
 .../video/fbdev/s3c2410fb-regs-lcd.h          | 28 ++++------------
 drivers/video/fbdev/s3c2410fb.c               | 16 +++++----
 .../linux/platform_data}/fb-s3c2410.h         | 33 ++++++++++++++++++-
 23 files changed, 98 insertions(+), 65 deletions(-)
 delete mode 100644 arch/arm/mach-s3c24xx/include/mach/fb.h
 rename arch/arm/mach-s3c24xx/include/mach/regs-lcd.h => drivers/video/fbdev/s3c2410fb-regs-lcd.h (84%)
 rename {arch/arm/plat-samsung/include/plat => include/linux/platform_data}/fb-s3c2410.h (57%)

diff --git a/arch/arm/mach-s3c24xx/include/mach/fb.h b/arch/arm/mach-s3c24xx/include/mach/fb.h
deleted file mode 100644
index 4e539cb8b884..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/fb.h
+++ /dev/null
@@ -1,2 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#include <plat/fb-s3c2410.h>
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c
index 40ad23b52bc0..ef6de1b1d0c6 100644
--- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
+++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c
@@ -30,9 +30,8 @@
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 
-#include <mach/regs-lcd.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
@@ -194,13 +193,17 @@ static struct s3c2410fb_mach_info __initdata amlm5900_fb_info = {
 
 	.gpccon =	0xaaaaaaaa,
 	.gpccon_mask =	0xffffffff,
+	.gpccon_reg =	S3C2410_GPCCON,
 	.gpcup =	0x0000ffff,
 	.gpcup_mask =	0xffffffff,
+	.gpcup_reg =	S3C2410_GPCUP,
 
 	.gpdcon =	0xaaaaaaaa,
 	.gpdcon_mask =	0xffffffff,
+	.gpdcon_reg =	S3C2410_GPDCON,
 	.gpdup =	0x0000ffff,
 	.gpdup_mask =	0xffffffff,
+	.gpdup_reg =	S3C2410_GPDUP,
 };
 #endif
 
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c
index 072966dcad78..e1a73274e90b 100644
--- a/arch/arm/mach-s3c24xx/mach-anubis.c
+++ b/arch/arm/mach-s3c24xx/mach-anubis.c
@@ -29,7 +29,6 @@
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index b2199906e678..bfda6dd2a9d5 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -25,12 +25,11 @@
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
index a7c3955ae8f6..cc941b5030ea 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c24xx/mach-bast.c
@@ -40,10 +40,9 @@
 #include <asm/mach/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/fb.h>
 #include <mach/hardware.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 
 #include <plat/cpu.h>
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index 61b8c6badeb8..1e42782dbd30 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -57,8 +57,8 @@
 #include <linux/platform_data/touchscreen-s3c2410.h>
 #include <linux/platform_data/usb-ohci-s3c2410.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
+#include <linux/platform_data/fb-s3c2410.h>
 
-#include <mach/fb.h>
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-irq.h>
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 446891e23511..d56e3befa459 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -47,11 +47,10 @@
 
 #include <sound/uda1380.h>
 
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <mach/hardware.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 
 #include <plat/cpu.h>
@@ -211,12 +210,16 @@ static struct s3c2410fb_mach_info h1940_fb_info __initdata = {
 	.lpcsel =	0x02,
 	.gpccon =	0xaa940659,
 	.gpccon_mask =	0xffffc0f0,
+	.gpccon_reg =	S3C2410_GPCCON,
 	.gpcup =	0x0000ffff,
 	.gpcup_mask =	0xffffffff,
+	.gpcup_reg =	S3C2410_GPCUP,
 	.gpdcon =	0xaa84aaa0,
 	.gpdcon_mask =	0xffffffff,
+	.gpdcon_reg =	S3C2410_GPDCON,
 	.gpdup =	0x0000faff,
 	.gpdup_mask =	0xffffffff,
+	.gpdup_reg =	S3C2410_GPDUP,
 };
 
 static int power_supply_init(struct device *dev)
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
index 885e8f12e4b9..3b33132b2334 100644
--- a/arch/arm/mach-s3c24xx/mach-jive.c
+++ b/arch/arm/mach-s3c24xx/mach-jive.c
@@ -32,8 +32,7 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <mach/gpio-samsung.h>
 
 #include <asm/mach-types.h>
@@ -321,6 +320,7 @@ static struct s3c2410fb_mach_info jive_lcd_config = {
 	 * data. */
 
 	.gpcup		= (0xf << 1) | (0x3f << 10),
+	.gpcup_reg =	S3C2410_GPCUP,
 
 	.gpccon		= (S3C2410_GPC1_VCLK   | S3C2410_GPC2_VLINE |
 			   S3C2410_GPC3_VFRAME | S3C2410_GPC4_VM |
@@ -334,8 +334,12 @@ static struct s3c2410fb_mach_info jive_lcd_config = {
 			   S3C2410_GPCCON_MASK(12) | S3C2410_GPCCON_MASK(13) |
 			   S3C2410_GPCCON_MASK(14) | S3C2410_GPCCON_MASK(15)),
 
+	.gpccon_reg =	S3C2410_GPCCON,
+
 	.gpdup		= (0x3f << 2) | (0x3f << 10),
 
+	.gpdup_reg =	S3C2410_GPDUP,
+
 	.gpdcon		= (S3C2410_GPD2_VD10  | S3C2410_GPD3_VD11 |
 			   S3C2410_GPD4_VD12  | S3C2410_GPD5_VD13 |
 			   S3C2410_GPD6_VD14  | S3C2410_GPD7_VD15 |
@@ -349,6 +353,8 @@ static struct s3c2410fb_mach_info jive_lcd_config = {
 			   S3C2410_GPDCON_MASK(10) | S3C2410_GPDCON_MASK(11)|
 			   S3C2410_GPDCON_MASK(12) | S3C2410_GPDCON_MASK(13)|
 			   S3C2410_GPDCON_MASK(14) | S3C2410_GPDCON_MASK(15)),
+
+	.gpdcon_reg =	S3C2410_GPDCON,
 };
 
 /* ILI9320 support. */
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index d73167f615b8..2301e07c7d64 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -30,13 +30,12 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
+#include <linux/platform_data/fb-s3c2410.h>
 #include <mach/hardware.h>
-#include <mach/fb.h>
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
 #include <linux/platform_data/leds-s3c24xx.h>
-#include <mach/regs-lcd.h>
 #include <mach/irqs.h>
 #include <mach/gpio-samsung.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
@@ -215,6 +214,9 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
 			   S3C2410_GPCCON_MASK(12) | S3C2410_GPCCON_MASK(13) |
 			   S3C2410_GPCCON_MASK(14) | S3C2410_GPCCON_MASK(15)),
 
+	.gpccon_reg =	S3C2410_GPCCON,
+	.gpcup_reg =	S3C2410_GPCUP,
+
 	.gpdup		= (0x3f << 2) | (0x3f << 10),
 
 	.gpdcon		= (S3C2410_GPD2_VD10  | S3C2410_GPD3_VD11 |
@@ -230,6 +232,9 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
 			   S3C2410_GPDCON_MASK(10) | S3C2410_GPDCON_MASK(11)|
 			   S3C2410_GPDCON_MASK(12) | S3C2410_GPDCON_MASK(13)|
 			   S3C2410_GPDCON_MASK(14) | S3C2410_GPDCON_MASK(15)),
+
+	.gpdcon_reg =	S3C2410_GPDCON,
+	.gpdup_reg =	S3C2410_GPDUP,
 };
 
 /* MMC/SD  */
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index f283abab0761..6b8ee5ba00ca 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -31,10 +31,9 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/leds-s3c24xx.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 #include <plat/gpio-cfg.h>
 
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c
index ee3630cb236a..262e77bd48de 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris.c
@@ -44,7 +44,6 @@
 
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 
 #include "common.h"
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index 9b47b8434f10..1d0f5d65e7e5 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -33,8 +33,7 @@
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/leds-s3c24xx.h>
-#include <mach/regs-lcd.h>
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/i2c-s3c2410.h>
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 7752203fd9cd..ee4a0992339f 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -42,12 +42,11 @@
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
+#include <linux/platform_data/fb-s3c2410.h>
 
 #include <sound/uda1380.h>
 
-#include <mach/fb.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 
 #include <plat/cpu.h>
@@ -361,14 +360,17 @@ static struct s3c2410fb_mach_info rx1950_lcd_cfg = {
 	.lpcsel = 0x02,
 	.gpccon = 0xaa9556a9,
 	.gpccon_mask = 0xffc003fc,
+	.gpccon_reg =	S3C2410_GPCCON,
 	.gpcup = 0x0000ffff,
 	.gpcup_mask = 0xffffffff,
+	.gpcup_reg =	S3C2410_GPCUP,
 
 	.gpdcon = 0xaa90aaa1,
 	.gpdcon_mask = 0xffc0fff0,
+	.gpdcon_reg =	S3C2410_GPDCON,
 	.gpdup = 0x0000fcfd,
 	.gpdup_mask = 0xffffffff,
-
+	.gpdup_reg =	S3C2410_GPDUP,
 };
 
 static struct pwm_lookup rx1950_pwm_lookup[] = {
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24xx/mach-rx3715.c
index 2542c523ad46..87f3274241b2 100644
--- a/arch/arm/mach-s3c24xx/mach-rx3715.c
+++ b/arch/arm/mach-s3c24xx/mach-rx3715.c
@@ -30,14 +30,13 @@
 #include <asm/mach/map.h>
 
 #include <linux/platform_data/mtd-nand-s3c2410.h>
+#include <linux/platform_data/fb-s3c2410.h>
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/fb.h>
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 #include <plat/gpio-cfg.h>
 
@@ -126,13 +125,17 @@ static struct s3c2410fb_mach_info rx3715_fb_info __initdata = {
 
 	.gpccon =	0xaa955699,
 	.gpccon_mask =	0xffc003cc,
+	.gpccon_reg =	S3C2410_GPCCON,
 	.gpcup =	0x0000ffff,
 	.gpcup_mask =	0xffffffff,
+	.gpcup_reg =	S3C2410_GPCUP,
 
 	.gpdcon =	0xaa95aaa1,
 	.gpdcon_mask =	0xffc0fff0,
+	.gpdcon_reg =	S3C2410_GPDCON,
 	.gpdup =	0x0000faff,
 	.gpdup_mask =	0xffffffff,
+	.gpdup_reg =	S3C2410_GPDUP,
 };
 
 static struct mtd_partition __initdata rx3715_nand_part[] = {
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c24xx/mach-smdk2413.c
index 2bba4f1fa7ee..eec0d3dc4bb1 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2413.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c
@@ -31,12 +31,11 @@
 
 //#include <asm/debug-ll.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/i2c-s3c2410.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <mach/gpio-samsung.h>
-#include <mach/fb.h>
 #include <plat/gpio-cfg.h>
 
 #include <plat/devs.h>
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c
index 61c3e45898d3..fbd3a8d96f94 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c
@@ -30,7 +30,6 @@
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/regs-s3c2443-clock.h>
 #include <mach/gpio-samsung.h>
 
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c24xx/mach-smdk2440.c
index f0fceda3e8e6..b9b0f2a8c904 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2440.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c
@@ -28,11 +28,10 @@
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 #include <plat/gpio-cfg.h>
 
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
 #include <plat/devs.h>
@@ -139,6 +138,11 @@ static struct s3c2410fb_mach_info smdk2440_fb_info __initdata = {
 	.gpdcon_mask	= 0xffffffff,
 	.gpdup		= 0x0000faff,
 	.gpdup_mask	= 0xffffffff,
+
+	.gpccon_reg =	S3C2410_GPCCON,
+	.gpcup_reg =	S3C2410_GPCUP,
+	.gpdcon_reg =	S3C2410_GPDCON,
+	.gpdup_reg =	S3C2410_GPDUP,
 #endif
 
 	.lpcsel		= ((0xCE6) & ~7) | 1<<4,
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c24xx/mach-smdk2443.c
index 2358ed5ed7be..a4c1022678a9 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2443.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2443.c
@@ -27,9 +27,8 @@
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
 #include <plat/devs.h>
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx/mach-vstms.c
index f333ca05de68..08acc556879b 100644
--- a/arch/arm/mach-s3c24xx/mach-vstms.c
+++ b/arch/arm/mach-s3c24xx/mach-vstms.c
@@ -30,11 +30,10 @@
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 #include <plat/gpio-cfg.h>
 
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index c0739bda060b..92b36bc71a06 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -50,7 +50,7 @@
 #include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/ata-samsung_cf.h>
 #include <plat/fb.h>
-#include <plat/fb-s3c2410.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/hwmon-s3c.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <plat/keypad.h>
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-lcd.h b/drivers/video/fbdev/s3c2410fb-regs-lcd.h
similarity index 84%
rename from arch/arm/mach-s3c24xx/include/mach/regs-lcd.h
rename to drivers/video/fbdev/s3c2410fb-regs-lcd.h
index 4c3434f261bb..1e46f7a788e5 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-lcd.h
+++ b/drivers/video/fbdev/s3c2410fb-regs-lcd.h
@@ -7,6 +7,13 @@
 #ifndef ___ASM_ARCH_REGS_LCD_H
 #define ___ASM_ARCH_REGS_LCD_H
 
+/*
+ * a couple of values are used as platform data in
+ * include/linux/platform_data/fb-s3c2410.h and not
+ * duplicated here.
+ */
+#include <linux/platform_data/fb-s3c2410.h>
+
 #define S3C2410_LCDREG(x)	(x)
 
 /* LCD control registers */
@@ -29,13 +36,6 @@
 #define S3C2410_LCDCON1_STN8BPP	   (3<<1)
 #define S3C2410_LCDCON1_STN12BPP   (4<<1)
 
-#define S3C2410_LCDCON1_TFT1BPP	   (8<<1)
-#define S3C2410_LCDCON1_TFT2BPP	   (9<<1)
-#define S3C2410_LCDCON1_TFT4BPP	   (10<<1)
-#define S3C2410_LCDCON1_TFT8BPP	   (11<<1)
-#define S3C2410_LCDCON1_TFT16BPP   (12<<1)
-#define S3C2410_LCDCON1_TFT24BPP   (13<<1)
-
 #define S3C2410_LCDCON1_ENVID	   (1)
 
 #define S3C2410_LCDCON1_MODEMASK    0x1E
@@ -66,20 +66,6 @@
 
 #define S3C2410_LCDCON4_GET_HSPW(x) ( ((x) >>  0) & 0xFF)
 
-#define S3C2410_LCDCON5_BPP24BL	    (1<<12)
-#define S3C2410_LCDCON5_FRM565	    (1<<11)
-#define S3C2410_LCDCON5_INVVCLK	    (1<<10)
-#define S3C2410_LCDCON5_INVVLINE    (1<<9)
-#define S3C2410_LCDCON5_INVVFRAME   (1<<8)
-#define S3C2410_LCDCON5_INVVD	    (1<<7)
-#define S3C2410_LCDCON5_INVVDEN	    (1<<6)
-#define S3C2410_LCDCON5_INVPWREN    (1<<5)
-#define S3C2410_LCDCON5_INVLEND	    (1<<4)
-#define S3C2410_LCDCON5_PWREN	    (1<<3)
-#define S3C2410_LCDCON5_ENLEND	    (1<<2)
-#define S3C2410_LCDCON5_BSWP	    (1<<1)
-#define S3C2410_LCDCON5_HWSWP	    (1<<0)
-
 /* framebuffer start addressed */
 #define S3C2410_LCDSADDR1   S3C2410_LCDREG(0x14)
 #define S3C2410_LCDSADDR2   S3C2410_LCDREG(0x18)
diff --git a/drivers/video/fbdev/s3c2410fb.c b/drivers/video/fbdev/s3c2410fb.c
index a702da89910b..3e5b91c72f5b 100644
--- a/drivers/video/fbdev/s3c2410fb.c
+++ b/drivers/video/fbdev/s3c2410fb.c
@@ -29,19 +29,18 @@
 #include <linux/clk.h>
 #include <linux/cpufreq.h>
 #include <linux/io.h>
+#include <linux/platform_data/fb-s3c2410.h>
 
 #include <asm/div64.h>
 
 #include <asm/mach/map.h>
-#include <mach/regs-lcd.h>
-#include <mach/regs-gpio.h>
-#include <mach/fb.h>
 
 #ifdef CONFIG_PM
 #include <linux/pm.h>
 #endif
 
 #include "s3c2410fb.h"
+#include "s3c2410fb-regs-lcd.h"
 
 /* Debugging stuff */
 #ifdef CONFIG_FB_S3C2410_DEBUG
@@ -676,6 +675,9 @@ static inline void modify_gpio(void __iomem *reg,
 {
 	unsigned long tmp;
 
+	if (!reg)
+		return;
+
 	tmp = readl(reg) & ~mask;
 	writel(tmp | set, reg);
 }
@@ -706,10 +708,10 @@ static int s3c2410fb_init_registers(struct fb_info *info)
 
 	/* modify the gpio(s) with interrupts set (bjd) */
 
-	modify_gpio(S3C2410_GPCUP,  mach_info->gpcup,  mach_info->gpcup_mask);
-	modify_gpio(S3C2410_GPCCON, mach_info->gpccon, mach_info->gpccon_mask);
-	modify_gpio(S3C2410_GPDUP,  mach_info->gpdup,  mach_info->gpdup_mask);
-	modify_gpio(S3C2410_GPDCON, mach_info->gpdcon, mach_info->gpdcon_mask);
+	modify_gpio(mach_info->gpcup_reg,  mach_info->gpcup,  mach_info->gpcup_mask);
+	modify_gpio(mach_info->gpccon_reg, mach_info->gpccon, mach_info->gpccon_mask);
+	modify_gpio(mach_info->gpdup_reg,  mach_info->gpdup,  mach_info->gpdup_mask);
+	modify_gpio(mach_info->gpdcon_reg, mach_info->gpdcon, mach_info->gpdcon_mask);
 
 	local_irq_restore(flags);
 
diff --git a/arch/arm/plat-samsung/include/plat/fb-s3c2410.h b/include/linux/platform_data/fb-s3c2410.h
similarity index 57%
rename from arch/arm/plat-samsung/include/plat/fb-s3c2410.h
rename to include/linux/platform_data/fb-s3c2410.h
index 614240d768b4..10c11e6316d6 100644
--- a/arch/arm/plat-samsung/include/plat/fb-s3c2410.h
+++ b/include/linux/platform_data/fb-s3c2410.h
@@ -8,6 +8,8 @@
 #ifndef __ASM_PLAT_FB_S3C2410_H
 #define __ASM_PLAT_FB_S3C2410_H __FILE__
 
+#include <linux/compiler_types.h>
+
 struct s3c2410fb_hw {
 	unsigned long	lcdcon1;
 	unsigned long	lcdcon2;
@@ -20,6 +22,17 @@ struct s3c2410fb_hw {
 struct s3c2410fb_display {
 	/* LCD type */
 	unsigned type;
+#define S3C2410_LCDCON1_DSCAN4	   (0<<5)
+#define S3C2410_LCDCON1_STN4	   (1<<5)
+#define S3C2410_LCDCON1_STN8	   (2<<5)
+#define S3C2410_LCDCON1_TFT	   (3<<5)
+
+#define S3C2410_LCDCON1_TFT1BPP	   (8<<1)
+#define S3C2410_LCDCON1_TFT2BPP	   (9<<1)
+#define S3C2410_LCDCON1_TFT4BPP	   (10<<1)
+#define S3C2410_LCDCON1_TFT8BPP	   (11<<1)
+#define S3C2410_LCDCON1_TFT16BPP   (12<<1)
+#define S3C2410_LCDCON1_TFT24BPP   (13<<1)
 
 	/* Screen size */
 	unsigned short width;
@@ -40,6 +53,19 @@ struct s3c2410fb_display {
 
 	/* lcd configuration registers */
 	unsigned long	lcdcon5;
+#define S3C2410_LCDCON5_BPP24BL	    (1<<12)
+#define S3C2410_LCDCON5_FRM565	    (1<<11)
+#define S3C2410_LCDCON5_INVVCLK	    (1<<10)
+#define S3C2410_LCDCON5_INVVLINE    (1<<9)
+#define S3C2410_LCDCON5_INVVFRAME   (1<<8)
+#define S3C2410_LCDCON5_INVVD	    (1<<7)
+#define S3C2410_LCDCON5_INVVDEN	    (1<<6)
+#define S3C2410_LCDCON5_INVPWREN    (1<<5)
+#define S3C2410_LCDCON5_INVLEND	    (1<<4)
+#define S3C2410_LCDCON5_PWREN	    (1<<3)
+#define S3C2410_LCDCON5_ENLEND	    (1<<2)
+#define S3C2410_LCDCON5_BSWP	    (1<<1)
+#define S3C2410_LCDCON5_HWSWP	    (1<<0)
 };
 
 struct s3c2410fb_mach_info {
@@ -59,10 +85,15 @@ struct s3c2410fb_mach_info {
 	unsigned long	gpdcon;
 	unsigned long	gpdcon_mask;
 
+	void __iomem *  gpccon_reg;
+	void __iomem *  gpcup_reg;
+	void __iomem *  gpdcon_reg;
+	void __iomem *  gpdup_reg;
+
 	/* lpc3600 control register */
 	unsigned long	lpcsel;
 };
 
-extern void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *);
+extern void s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *);
 
 #endif /* __ASM_PLAT_FB_S3C2410_H */
-- 
2.20.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 28/36] fbdev: s3c2410fb: remove mach header dependency
  2019-10-10 20:30   ` [PATCH 28/36] fbdev: s3c2410fb: remove mach header dependency Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  2019-10-23 13:13     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel, linux-stm32, dri-devel, linux-fbdev

The s3c2410fb driver is too deeply intertwined with the s3c24xx
platform code. Change it in a way that avoids the use of platform
header files but having all interface data in a platform_data
header, and the private register definitions next to the driver
itself.

One ugly bit here is that the driver pokes directly into gpio
registers, which are owned by another driver. Passing the
mapped addresses in platform_data is somewhat suboptimal, but
it is a small improvement over the previous version.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/include/mach/fb.h       |  2 --
 arch/arm/mach-s3c24xx/mach-amlm5900.c         |  7 ++--
 arch/arm/mach-s3c24xx/mach-anubis.c           |  1 -
 arch/arm/mach-s3c24xx/mach-at2440evb.c        |  3 +-
 arch/arm/mach-s3c24xx/mach-bast.c             |  3 +-
 arch/arm/mach-s3c24xx/mach-gta02.c            |  2 +-
 arch/arm/mach-s3c24xx/mach-h1940.c            |  7 ++--
 arch/arm/mach-s3c24xx/mach-jive.c             | 10 ++++--
 arch/arm/mach-s3c24xx/mach-mini2440.c         |  9 +++--
 arch/arm/mach-s3c24xx/mach-n30.c              |  3 +-
 arch/arm/mach-s3c24xx/mach-osiris.c           |  1 -
 arch/arm/mach-s3c24xx/mach-qt2410.c           |  3 +-
 arch/arm/mach-s3c24xx/mach-rx1950.c           |  8 +++--
 arch/arm/mach-s3c24xx/mach-rx3715.c           |  7 ++--
 arch/arm/mach-s3c24xx/mach-smdk2413.c         |  3 +-
 arch/arm/mach-s3c24xx/mach-smdk2416.c         |  1 -
 arch/arm/mach-s3c24xx/mach-smdk2440.c         |  8 +++--
 arch/arm/mach-s3c24xx/mach-smdk2443.c         |  3 +-
 arch/arm/mach-s3c24xx/mach-vstms.c            |  3 +-
 arch/arm/plat-samsung/devs.c                  |  2 +-
 .../video/fbdev/s3c2410fb-regs-lcd.h          | 28 ++++------------
 drivers/video/fbdev/s3c2410fb.c               | 16 +++++----
 .../linux/platform_data}/fb-s3c2410.h         | 33 ++++++++++++++++++-
 23 files changed, 98 insertions(+), 65 deletions(-)
 delete mode 100644 arch/arm/mach-s3c24xx/include/mach/fb.h
 rename arch/arm/mach-s3c24xx/include/mach/regs-lcd.h => drivers/video/fbdev/s3c2410fb-regs-lcd.h (84%)
 rename {arch/arm/plat-samsung/include/plat => include/linux/platform_data}/fb-s3c2410.h (57%)

diff --git a/arch/arm/mach-s3c24xx/include/mach/fb.h b/arch/arm/mach-s3c24xx/include/mach/fb.h
deleted file mode 100644
index 4e539cb8b884..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/fb.h
+++ /dev/null
@@ -1,2 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#include <plat/fb-s3c2410.h>
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c
index 40ad23b52bc0..ef6de1b1d0c6 100644
--- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
+++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c
@@ -30,9 +30,8 @@
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 
-#include <mach/regs-lcd.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
@@ -194,13 +193,17 @@ static struct s3c2410fb_mach_info __initdata amlm5900_fb_info = {
 
 	.gpccon =	0xaaaaaaaa,
 	.gpccon_mask =	0xffffffff,
+	.gpccon_reg =	S3C2410_GPCCON,
 	.gpcup =	0x0000ffff,
 	.gpcup_mask =	0xffffffff,
+	.gpcup_reg =	S3C2410_GPCUP,
 
 	.gpdcon =	0xaaaaaaaa,
 	.gpdcon_mask =	0xffffffff,
+	.gpdcon_reg =	S3C2410_GPDCON,
 	.gpdup =	0x0000ffff,
 	.gpdup_mask =	0xffffffff,
+	.gpdup_reg =	S3C2410_GPDUP,
 };
 #endif
 
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c
index 072966dcad78..e1a73274e90b 100644
--- a/arch/arm/mach-s3c24xx/mach-anubis.c
+++ b/arch/arm/mach-s3c24xx/mach-anubis.c
@@ -29,7 +29,6 @@
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index b2199906e678..bfda6dd2a9d5 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -25,12 +25,11 @@
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
index a7c3955ae8f6..cc941b5030ea 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c24xx/mach-bast.c
@@ -40,10 +40,9 @@
 #include <asm/mach/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/fb.h>
 #include <mach/hardware.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 
 #include <plat/cpu.h>
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index 61b8c6badeb8..1e42782dbd30 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -57,8 +57,8 @@
 #include <linux/platform_data/touchscreen-s3c2410.h>
 #include <linux/platform_data/usb-ohci-s3c2410.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
+#include <linux/platform_data/fb-s3c2410.h>
 
-#include <mach/fb.h>
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-irq.h>
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 446891e23511..d56e3befa459 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -47,11 +47,10 @@
 
 #include <sound/uda1380.h>
 
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <mach/hardware.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 
 #include <plat/cpu.h>
@@ -211,12 +210,16 @@ static struct s3c2410fb_mach_info h1940_fb_info __initdata = {
 	.lpcsel =	0x02,
 	.gpccon =	0xaa940659,
 	.gpccon_mask =	0xffffc0f0,
+	.gpccon_reg =	S3C2410_GPCCON,
 	.gpcup =	0x0000ffff,
 	.gpcup_mask =	0xffffffff,
+	.gpcup_reg =	S3C2410_GPCUP,
 	.gpdcon =	0xaa84aaa0,
 	.gpdcon_mask =	0xffffffff,
+	.gpdcon_reg =	S3C2410_GPDCON,
 	.gpdup =	0x0000faff,
 	.gpdup_mask =	0xffffffff,
+	.gpdup_reg =	S3C2410_GPDUP,
 };
 
 static int power_supply_init(struct device *dev)
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
index 885e8f12e4b9..3b33132b2334 100644
--- a/arch/arm/mach-s3c24xx/mach-jive.c
+++ b/arch/arm/mach-s3c24xx/mach-jive.c
@@ -32,8 +32,7 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <mach/gpio-samsung.h>
 
 #include <asm/mach-types.h>
@@ -321,6 +320,7 @@ static struct s3c2410fb_mach_info jive_lcd_config = {
 	 * data. */
 
 	.gpcup		= (0xf << 1) | (0x3f << 10),
+	.gpcup_reg =	S3C2410_GPCUP,
 
 	.gpccon		= (S3C2410_GPC1_VCLK   | S3C2410_GPC2_VLINE |
 			   S3C2410_GPC3_VFRAME | S3C2410_GPC4_VM |
@@ -334,8 +334,12 @@ static struct s3c2410fb_mach_info jive_lcd_config = {
 			   S3C2410_GPCCON_MASK(12) | S3C2410_GPCCON_MASK(13) |
 			   S3C2410_GPCCON_MASK(14) | S3C2410_GPCCON_MASK(15)),
 
+	.gpccon_reg =	S3C2410_GPCCON,
+
 	.gpdup		= (0x3f << 2) | (0x3f << 10),
 
+	.gpdup_reg =	S3C2410_GPDUP,
+
 	.gpdcon		= (S3C2410_GPD2_VD10  | S3C2410_GPD3_VD11 |
 			   S3C2410_GPD4_VD12  | S3C2410_GPD5_VD13 |
 			   S3C2410_GPD6_VD14  | S3C2410_GPD7_VD15 |
@@ -349,6 +353,8 @@ static struct s3c2410fb_mach_info jive_lcd_config = {
 			   S3C2410_GPDCON_MASK(10) | S3C2410_GPDCON_MASK(11)|
 			   S3C2410_GPDCON_MASK(12) | S3C2410_GPDCON_MASK(13)|
 			   S3C2410_GPDCON_MASK(14) | S3C2410_GPDCON_MASK(15)),
+
+	.gpdcon_reg =	S3C2410_GPDCON,
 };
 
 /* ILI9320 support. */
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index d73167f615b8..2301e07c7d64 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -30,13 +30,12 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
+#include <linux/platform_data/fb-s3c2410.h>
 #include <mach/hardware.h>
-#include <mach/fb.h>
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
 #include <linux/platform_data/leds-s3c24xx.h>
-#include <mach/regs-lcd.h>
 #include <mach/irqs.h>
 #include <mach/gpio-samsung.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
@@ -215,6 +214,9 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
 			   S3C2410_GPCCON_MASK(12) | S3C2410_GPCCON_MASK(13) |
 			   S3C2410_GPCCON_MASK(14) | S3C2410_GPCCON_MASK(15)),
 
+	.gpccon_reg =	S3C2410_GPCCON,
+	.gpcup_reg =	S3C2410_GPCUP,
+
 	.gpdup		= (0x3f << 2) | (0x3f << 10),
 
 	.gpdcon		= (S3C2410_GPD2_VD10  | S3C2410_GPD3_VD11 |
@@ -230,6 +232,9 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
 			   S3C2410_GPDCON_MASK(10) | S3C2410_GPDCON_MASK(11)|
 			   S3C2410_GPDCON_MASK(12) | S3C2410_GPDCON_MASK(13)|
 			   S3C2410_GPDCON_MASK(14) | S3C2410_GPDCON_MASK(15)),
+
+	.gpdcon_reg =	S3C2410_GPDCON,
+	.gpdup_reg =	S3C2410_GPDUP,
 };
 
 /* MMC/SD  */
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index f283abab0761..6b8ee5ba00ca 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -31,10 +31,9 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/leds-s3c24xx.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 #include <plat/gpio-cfg.h>
 
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c
index ee3630cb236a..262e77bd48de 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris.c
@@ -44,7 +44,6 @@
 
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 
 #include "common.h"
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index 9b47b8434f10..1d0f5d65e7e5 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -33,8 +33,7 @@
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/leds-s3c24xx.h>
-#include <mach/regs-lcd.h>
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/i2c-s3c2410.h>
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 7752203fd9cd..ee4a0992339f 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -42,12 +42,11 @@
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
+#include <linux/platform_data/fb-s3c2410.h>
 
 #include <sound/uda1380.h>
 
-#include <mach/fb.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 
 #include <plat/cpu.h>
@@ -361,14 +360,17 @@ static struct s3c2410fb_mach_info rx1950_lcd_cfg = {
 	.lpcsel = 0x02,
 	.gpccon = 0xaa9556a9,
 	.gpccon_mask = 0xffc003fc,
+	.gpccon_reg =	S3C2410_GPCCON,
 	.gpcup = 0x0000ffff,
 	.gpcup_mask = 0xffffffff,
+	.gpcup_reg =	S3C2410_GPCUP,
 
 	.gpdcon = 0xaa90aaa1,
 	.gpdcon_mask = 0xffc0fff0,
+	.gpdcon_reg =	S3C2410_GPDCON,
 	.gpdup = 0x0000fcfd,
 	.gpdup_mask = 0xffffffff,
-
+	.gpdup_reg =	S3C2410_GPDUP,
 };
 
 static struct pwm_lookup rx1950_pwm_lookup[] = {
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24xx/mach-rx3715.c
index 2542c523ad46..87f3274241b2 100644
--- a/arch/arm/mach-s3c24xx/mach-rx3715.c
+++ b/arch/arm/mach-s3c24xx/mach-rx3715.c
@@ -30,14 +30,13 @@
 #include <asm/mach/map.h>
 
 #include <linux/platform_data/mtd-nand-s3c2410.h>
+#include <linux/platform_data/fb-s3c2410.h>
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/fb.h>
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 #include <plat/gpio-cfg.h>
 
@@ -126,13 +125,17 @@ static struct s3c2410fb_mach_info rx3715_fb_info __initdata = {
 
 	.gpccon =	0xaa955699,
 	.gpccon_mask =	0xffc003cc,
+	.gpccon_reg =	S3C2410_GPCCON,
 	.gpcup =	0x0000ffff,
 	.gpcup_mask =	0xffffffff,
+	.gpcup_reg =	S3C2410_GPCUP,
 
 	.gpdcon =	0xaa95aaa1,
 	.gpdcon_mask =	0xffc0fff0,
+	.gpdcon_reg =	S3C2410_GPDCON,
 	.gpdup =	0x0000faff,
 	.gpdup_mask =	0xffffffff,
+	.gpdup_reg =	S3C2410_GPDUP,
 };
 
 static struct mtd_partition __initdata rx3715_nand_part[] = {
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c24xx/mach-smdk2413.c
index 2bba4f1fa7ee..eec0d3dc4bb1 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2413.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c
@@ -31,12 +31,11 @@
 
 //#include <asm/debug-ll.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/i2c-s3c2410.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <mach/gpio-samsung.h>
-#include <mach/fb.h>
 #include <plat/gpio-cfg.h>
 
 #include <plat/devs.h>
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c
index 61c3e45898d3..fbd3a8d96f94 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c
@@ -30,7 +30,6 @@
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/regs-s3c2443-clock.h>
 #include <mach/gpio-samsung.h>
 
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c24xx/mach-smdk2440.c
index f0fceda3e8e6..b9b0f2a8c904 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2440.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c
@@ -28,11 +28,10 @@
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 #include <plat/gpio-cfg.h>
 
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
 #include <plat/devs.h>
@@ -139,6 +138,11 @@ static struct s3c2410fb_mach_info smdk2440_fb_info __initdata = {
 	.gpdcon_mask	= 0xffffffff,
 	.gpdup		= 0x0000faff,
 	.gpdup_mask	= 0xffffffff,
+
+	.gpccon_reg =	S3C2410_GPCCON,
+	.gpcup_reg =	S3C2410_GPCUP,
+	.gpdcon_reg =	S3C2410_GPDCON,
+	.gpdup_reg =	S3C2410_GPDUP,
 #endif
 
 	.lpcsel		= ((0xCE6) & ~7) | 1<<4,
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c24xx/mach-smdk2443.c
index 2358ed5ed7be..a4c1022678a9 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2443.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2443.c
@@ -27,9 +27,8 @@
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
 #include <plat/devs.h>
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx/mach-vstms.c
index f333ca05de68..08acc556879b 100644
--- a/arch/arm/mach-s3c24xx/mach-vstms.c
+++ b/arch/arm/mach-s3c24xx/mach-vstms.c
@@ -30,11 +30,10 @@
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 #include <plat/gpio-cfg.h>
 
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index c0739bda060b..92b36bc71a06 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -50,7 +50,7 @@
 #include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/ata-samsung_cf.h>
 #include <plat/fb.h>
-#include <plat/fb-s3c2410.h>
+#include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/hwmon-s3c.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <plat/keypad.h>
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-lcd.h b/drivers/video/fbdev/s3c2410fb-regs-lcd.h
similarity index 84%
rename from arch/arm/mach-s3c24xx/include/mach/regs-lcd.h
rename to drivers/video/fbdev/s3c2410fb-regs-lcd.h
index 4c3434f261bb..1e46f7a788e5 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-lcd.h
+++ b/drivers/video/fbdev/s3c2410fb-regs-lcd.h
@@ -7,6 +7,13 @@
 #ifndef ___ASM_ARCH_REGS_LCD_H
 #define ___ASM_ARCH_REGS_LCD_H
 
+/*
+ * a couple of values are used as platform data in
+ * include/linux/platform_data/fb-s3c2410.h and not
+ * duplicated here.
+ */
+#include <linux/platform_data/fb-s3c2410.h>
+
 #define S3C2410_LCDREG(x)	(x)
 
 /* LCD control registers */
@@ -29,13 +36,6 @@
 #define S3C2410_LCDCON1_STN8BPP	   (3<<1)
 #define S3C2410_LCDCON1_STN12BPP   (4<<1)
 
-#define S3C2410_LCDCON1_TFT1BPP	   (8<<1)
-#define S3C2410_LCDCON1_TFT2BPP	   (9<<1)
-#define S3C2410_LCDCON1_TFT4BPP	   (10<<1)
-#define S3C2410_LCDCON1_TFT8BPP	   (11<<1)
-#define S3C2410_LCDCON1_TFT16BPP   (12<<1)
-#define S3C2410_LCDCON1_TFT24BPP   (13<<1)
-
 #define S3C2410_LCDCON1_ENVID	   (1)
 
 #define S3C2410_LCDCON1_MODEMASK    0x1E
@@ -66,20 +66,6 @@
 
 #define S3C2410_LCDCON4_GET_HSPW(x) ( ((x) >>  0) & 0xFF)
 
-#define S3C2410_LCDCON5_BPP24BL	    (1<<12)
-#define S3C2410_LCDCON5_FRM565	    (1<<11)
-#define S3C2410_LCDCON5_INVVCLK	    (1<<10)
-#define S3C2410_LCDCON5_INVVLINE    (1<<9)
-#define S3C2410_LCDCON5_INVVFRAME   (1<<8)
-#define S3C2410_LCDCON5_INVVD	    (1<<7)
-#define S3C2410_LCDCON5_INVVDEN	    (1<<6)
-#define S3C2410_LCDCON5_INVPWREN    (1<<5)
-#define S3C2410_LCDCON5_INVLEND	    (1<<4)
-#define S3C2410_LCDCON5_PWREN	    (1<<3)
-#define S3C2410_LCDCON5_ENLEND	    (1<<2)
-#define S3C2410_LCDCON5_BSWP	    (1<<1)
-#define S3C2410_LCDCON5_HWSWP	    (1<<0)
-
 /* framebuffer start addressed */
 #define S3C2410_LCDSADDR1   S3C2410_LCDREG(0x14)
 #define S3C2410_LCDSADDR2   S3C2410_LCDREG(0x18)
diff --git a/drivers/video/fbdev/s3c2410fb.c b/drivers/video/fbdev/s3c2410fb.c
index a702da89910b..3e5b91c72f5b 100644
--- a/drivers/video/fbdev/s3c2410fb.c
+++ b/drivers/video/fbdev/s3c2410fb.c
@@ -29,19 +29,18 @@
 #include <linux/clk.h>
 #include <linux/cpufreq.h>
 #include <linux/io.h>
+#include <linux/platform_data/fb-s3c2410.h>
 
 #include <asm/div64.h>
 
 #include <asm/mach/map.h>
-#include <mach/regs-lcd.h>
-#include <mach/regs-gpio.h>
-#include <mach/fb.h>
 
 #ifdef CONFIG_PM
 #include <linux/pm.h>
 #endif
 
 #include "s3c2410fb.h"
+#include "s3c2410fb-regs-lcd.h"
 
 /* Debugging stuff */
 #ifdef CONFIG_FB_S3C2410_DEBUG
@@ -676,6 +675,9 @@ static inline void modify_gpio(void __iomem *reg,
 {
 	unsigned long tmp;
 
+	if (!reg)
+		return;
+
 	tmp = readl(reg) & ~mask;
 	writel(tmp | set, reg);
 }
@@ -706,10 +708,10 @@ static int s3c2410fb_init_registers(struct fb_info *info)
 
 	/* modify the gpio(s) with interrupts set (bjd) */
 
-	modify_gpio(S3C2410_GPCUP,  mach_info->gpcup,  mach_info->gpcup_mask);
-	modify_gpio(S3C2410_GPCCON, mach_info->gpccon, mach_info->gpccon_mask);
-	modify_gpio(S3C2410_GPDUP,  mach_info->gpdup,  mach_info->gpdup_mask);
-	modify_gpio(S3C2410_GPDCON, mach_info->gpdcon, mach_info->gpdcon_mask);
+	modify_gpio(mach_info->gpcup_reg,  mach_info->gpcup,  mach_info->gpcup_mask);
+	modify_gpio(mach_info->gpccon_reg, mach_info->gpccon, mach_info->gpccon_mask);
+	modify_gpio(mach_info->gpdup_reg,  mach_info->gpdup,  mach_info->gpdup_mask);
+	modify_gpio(mach_info->gpdcon_reg, mach_info->gpdcon, mach_info->gpdcon_mask);
 
 	local_irq_restore(flags);
 
diff --git a/arch/arm/plat-samsung/include/plat/fb-s3c2410.h b/include/linux/platform_data/fb-s3c2410.h
similarity index 57%
rename from arch/arm/plat-samsung/include/plat/fb-s3c2410.h
rename to include/linux/platform_data/fb-s3c2410.h
index 614240d768b4..10c11e6316d6 100644
--- a/arch/arm/plat-samsung/include/plat/fb-s3c2410.h
+++ b/include/linux/platform_data/fb-s3c2410.h
@@ -8,6 +8,8 @@
 #ifndef __ASM_PLAT_FB_S3C2410_H
 #define __ASM_PLAT_FB_S3C2410_H __FILE__
 
+#include <linux/compiler_types.h>
+
 struct s3c2410fb_hw {
 	unsigned long	lcdcon1;
 	unsigned long	lcdcon2;
@@ -20,6 +22,17 @@ struct s3c2410fb_hw {
 struct s3c2410fb_display {
 	/* LCD type */
 	unsigned type;
+#define S3C2410_LCDCON1_DSCAN4	   (0<<5)
+#define S3C2410_LCDCON1_STN4	   (1<<5)
+#define S3C2410_LCDCON1_STN8	   (2<<5)
+#define S3C2410_LCDCON1_TFT	   (3<<5)
+
+#define S3C2410_LCDCON1_TFT1BPP	   (8<<1)
+#define S3C2410_LCDCON1_TFT2BPP	   (9<<1)
+#define S3C2410_LCDCON1_TFT4BPP	   (10<<1)
+#define S3C2410_LCDCON1_TFT8BPP	   (11<<1)
+#define S3C2410_LCDCON1_TFT16BPP   (12<<1)
+#define S3C2410_LCDCON1_TFT24BPP   (13<<1)
 
 	/* Screen size */
 	unsigned short width;
@@ -40,6 +53,19 @@ struct s3c2410fb_display {
 
 	/* lcd configuration registers */
 	unsigned long	lcdcon5;
+#define S3C2410_LCDCON5_BPP24BL	    (1<<12)
+#define S3C2410_LCDCON5_FRM565	    (1<<11)
+#define S3C2410_LCDCON5_INVVCLK	    (1<<10)
+#define S3C2410_LCDCON5_INVVLINE    (1<<9)
+#define S3C2410_LCDCON5_INVVFRAME   (1<<8)
+#define S3C2410_LCDCON5_INVVD	    (1<<7)
+#define S3C2410_LCDCON5_INVVDEN	    (1<<6)
+#define S3C2410_LCDCON5_INVPWREN    (1<<5)
+#define S3C2410_LCDCON5_INVLEND	    (1<<4)
+#define S3C2410_LCDCON5_PWREN	    (1<<3)
+#define S3C2410_LCDCON5_ENLEND	    (1<<2)
+#define S3C2410_LCDCON5_BSWP	    (1<<1)
+#define S3C2410_LCDCON5_HWSWP	    (1<<0)
 };
 
 struct s3c2410fb_mach_info {
@@ -59,10 +85,15 @@ struct s3c2410fb_mach_info {
 	unsigned long	gpdcon;
 	unsigned long	gpdcon_mask;
 
+	void __iomem *  gpccon_reg;
+	void __iomem *  gpcup_reg;
+	void __iomem *  gpdcon_reg;
+	void __iomem *  gpdup_reg;
+
 	/* lpc3600 control register */
 	unsigned long	lpcsel;
 };
 
-extern void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *);
+extern void s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *);
 
 #endif /* __ASM_PLAT_FB_S3C2410_H */
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 29/36] ARM: s3c: cpufreq: split out registers
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (27 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 28/36] fbdev: s3c2410fb: remove mach header dependency Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-10 20:30   ` [PATCH 30/36] ARM: s3c: remove cpufreq header dependencies Arnd Bergmann
                     ` (5 subsequent siblings)
  34 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Rafael J. Wysocki, Viresh Kumar
  Cc: linux-samsung-soc, Arnd Bergmann, linux-pm, linus.walleij,
	linux-kernel, linux-arm-kernel

Each of the cpufreq drivers uses a fixed set of register
bits, copy those definitions into the drivers to avoid
including mach/regs-clock.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/cpufreq/s3c2410-cpufreq.c | 11 +++++++++--
 drivers/cpufreq/s3c2412-cpufreq.c | 20 +++++++++++++++++++-
 drivers/cpufreq/s3c2440-cpufreq.c | 24 ++++++++++++++++++++++--
 drivers/cpufreq/s3c24xx-cpufreq.c |  4 +++-
 4 files changed, 53 insertions(+), 6 deletions(-)

diff --git a/drivers/cpufreq/s3c2410-cpufreq.c b/drivers/cpufreq/s3c2410-cpufreq.c
index 0c4f2ccd7e22..5c6cb590b63f 100644
--- a/drivers/cpufreq/s3c2410-cpufreq.c
+++ b/drivers/cpufreq/s3c2410-cpufreq.c
@@ -20,11 +20,18 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/regs-clock.h>
-
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
 
+#include <mach/map.h>
+
+#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
+
+#define S3C2410_CLKDIVN	    S3C2410_CLKREG(0x14)
+
+#define S3C2410_CLKDIVN_PDIVN	     (1<<0)
+#define S3C2410_CLKDIVN_HDIVN	     (1<<1)
+
 /* Note, 2410A has an extra mode for 1:4:4 ratio, bit 2 of CLKDIV */
 
 static void s3c2410_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
diff --git a/drivers/cpufreq/s3c2412-cpufreq.c b/drivers/cpufreq/s3c2412-cpufreq.c
index 53385a9ab957..d922d0d47c80 100644
--- a/drivers/cpufreq/s3c2412-cpufreq.c
+++ b/drivers/cpufreq/s3c2412-cpufreq.c
@@ -23,12 +23,30 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/regs-clock.h>
 #include <mach/s3c2412.h>
 
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
 
+#include <mach/map.h>
+
+#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
+
+#define S3C2410_CLKDIVN	    S3C2410_CLKREG(0x14)
+
+#define S3C2412_CLKDIVN_PDIVN		(1<<2)
+#define S3C2412_CLKDIVN_HDIVN_MASK	(3<<0)
+#define S3C2412_CLKDIVN_ARMDIVN		(1<<3)
+#define S3C2412_CLKDIVN_DVSEN		(1<<4)
+#define S3C2412_CLKDIVN_HALFHCLK	(1<<5)
+#define S3C2412_CLKDIVN_USB48DIV	(1<<6)
+#define S3C2412_CLKDIVN_UARTDIV_MASK	(15<<8)
+#define S3C2412_CLKDIVN_UARTDIV_SHIFT	(8)
+#define S3C2412_CLKDIVN_I2SDIV_MASK	(15<<12)
+#define S3C2412_CLKDIVN_I2SDIV_SHIFT	(12)
+#define S3C2412_CLKDIVN_CAMDIV_MASK	(15<<16)
+#define S3C2412_CLKDIVN_CAMDIV_SHIFT	(16)
+
 /* our clock resources. */
 static struct clk *xtal;
 static struct clk *fclk;
diff --git a/drivers/cpufreq/s3c2440-cpufreq.c b/drivers/cpufreq/s3c2440-cpufreq.c
index 3f772ba8896e..5fe7a891fa13 100644
--- a/drivers/cpufreq/s3c2440-cpufreq.c
+++ b/drivers/cpufreq/s3c2440-cpufreq.c
@@ -24,11 +24,31 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/regs-clock.h>
-
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
 
+#include <mach/map.h>
+
+#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
+#define S3C2410_CLKDIVN	    S3C2410_CLKREG(0x14)
+#define S3C2440_CAMDIVN	    S3C2410_CLKREG(0x18)
+
+#define S3C2440_CLKDIVN_PDIVN	     (1<<0)
+#define S3C2440_CLKDIVN_HDIVN_MASK   (3<<1)
+#define S3C2440_CLKDIVN_HDIVN_1      (0<<1)
+#define S3C2440_CLKDIVN_HDIVN_2      (1<<1)
+#define S3C2440_CLKDIVN_HDIVN_4_8    (2<<1)
+#define S3C2440_CLKDIVN_HDIVN_3_6    (3<<1)
+#define S3C2440_CLKDIVN_UCLK         (1<<3)
+
+#define S3C2440_CAMDIVN_CAMCLK_MASK  (0xf<<0)
+#define S3C2440_CAMDIVN_CAMCLK_SEL   (1<<4)
+#define S3C2440_CAMDIVN_HCLK3_HALF   (1<<8)
+#define S3C2440_CAMDIVN_HCLK4_HALF   (1<<9)
+#define S3C2440_CAMDIVN_DVSEN        (1<<12)
+
+#define S3C2442_CAMDIVN_CAMCLK_DIV3  (1<<5)
+
 static struct clk *xtal;
 static struct clk *fclk;
 static struct clk *hclk;
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
index ed0e713b1b57..c786e1197d3c 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq.c
@@ -28,9 +28,11 @@
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
 
-#include <mach/regs-clock.h>
+#include <mach/map.h>
 
 /* note, cpufreq support deals in kHz, no Hz */
+#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
+#define S3C2410_MPLLCON     S3C2410_CLKREG(0x04)
 
 static struct cpufreq_driver s3c24xx_driver;
 static struct s3c_cpufreq_config cpu_cur;
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 29/36] ARM: s3c: cpufreq: split out registers
  2019-10-10 20:30   ` [PATCH 29/36] ARM: s3c: cpufreq: split out registers Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Rafael J. Wysocki, Viresh Kumar
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-pm, linux-kernel

Each of the cpufreq drivers uses a fixed set of register
bits, copy those definitions into the drivers to avoid
including mach/regs-clock.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/cpufreq/s3c2410-cpufreq.c | 11 +++++++++--
 drivers/cpufreq/s3c2412-cpufreq.c | 20 +++++++++++++++++++-
 drivers/cpufreq/s3c2440-cpufreq.c | 24 ++++++++++++++++++++++--
 drivers/cpufreq/s3c24xx-cpufreq.c |  4 +++-
 4 files changed, 53 insertions(+), 6 deletions(-)

diff --git a/drivers/cpufreq/s3c2410-cpufreq.c b/drivers/cpufreq/s3c2410-cpufreq.c
index 0c4f2ccd7e22..5c6cb590b63f 100644
--- a/drivers/cpufreq/s3c2410-cpufreq.c
+++ b/drivers/cpufreq/s3c2410-cpufreq.c
@@ -20,11 +20,18 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/regs-clock.h>
-
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
 
+#include <mach/map.h>
+
+#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
+
+#define S3C2410_CLKDIVN	    S3C2410_CLKREG(0x14)
+
+#define S3C2410_CLKDIVN_PDIVN	     (1<<0)
+#define S3C2410_CLKDIVN_HDIVN	     (1<<1)
+
 /* Note, 2410A has an extra mode for 1:4:4 ratio, bit 2 of CLKDIV */
 
 static void s3c2410_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
diff --git a/drivers/cpufreq/s3c2412-cpufreq.c b/drivers/cpufreq/s3c2412-cpufreq.c
index 53385a9ab957..d922d0d47c80 100644
--- a/drivers/cpufreq/s3c2412-cpufreq.c
+++ b/drivers/cpufreq/s3c2412-cpufreq.c
@@ -23,12 +23,30 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/regs-clock.h>
 #include <mach/s3c2412.h>
 
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
 
+#include <mach/map.h>
+
+#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
+
+#define S3C2410_CLKDIVN	    S3C2410_CLKREG(0x14)
+
+#define S3C2412_CLKDIVN_PDIVN		(1<<2)
+#define S3C2412_CLKDIVN_HDIVN_MASK	(3<<0)
+#define S3C2412_CLKDIVN_ARMDIVN		(1<<3)
+#define S3C2412_CLKDIVN_DVSEN		(1<<4)
+#define S3C2412_CLKDIVN_HALFHCLK	(1<<5)
+#define S3C2412_CLKDIVN_USB48DIV	(1<<6)
+#define S3C2412_CLKDIVN_UARTDIV_MASK	(15<<8)
+#define S3C2412_CLKDIVN_UARTDIV_SHIFT	(8)
+#define S3C2412_CLKDIVN_I2SDIV_MASK	(15<<12)
+#define S3C2412_CLKDIVN_I2SDIV_SHIFT	(12)
+#define S3C2412_CLKDIVN_CAMDIV_MASK	(15<<16)
+#define S3C2412_CLKDIVN_CAMDIV_SHIFT	(16)
+
 /* our clock resources. */
 static struct clk *xtal;
 static struct clk *fclk;
diff --git a/drivers/cpufreq/s3c2440-cpufreq.c b/drivers/cpufreq/s3c2440-cpufreq.c
index 3f772ba8896e..5fe7a891fa13 100644
--- a/drivers/cpufreq/s3c2440-cpufreq.c
+++ b/drivers/cpufreq/s3c2440-cpufreq.c
@@ -24,11 +24,31 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/regs-clock.h>
-
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
 
+#include <mach/map.h>
+
+#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
+#define S3C2410_CLKDIVN	    S3C2410_CLKREG(0x14)
+#define S3C2440_CAMDIVN	    S3C2410_CLKREG(0x18)
+
+#define S3C2440_CLKDIVN_PDIVN	     (1<<0)
+#define S3C2440_CLKDIVN_HDIVN_MASK   (3<<1)
+#define S3C2440_CLKDIVN_HDIVN_1      (0<<1)
+#define S3C2440_CLKDIVN_HDIVN_2      (1<<1)
+#define S3C2440_CLKDIVN_HDIVN_4_8    (2<<1)
+#define S3C2440_CLKDIVN_HDIVN_3_6    (3<<1)
+#define S3C2440_CLKDIVN_UCLK         (1<<3)
+
+#define S3C2440_CAMDIVN_CAMCLK_MASK  (0xf<<0)
+#define S3C2440_CAMDIVN_CAMCLK_SEL   (1<<4)
+#define S3C2440_CAMDIVN_HCLK3_HALF   (1<<8)
+#define S3C2440_CAMDIVN_HCLK4_HALF   (1<<9)
+#define S3C2440_CAMDIVN_DVSEN        (1<<12)
+
+#define S3C2442_CAMDIVN_CAMCLK_DIV3  (1<<5)
+
 static struct clk *xtal;
 static struct clk *fclk;
 static struct clk *hclk;
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
index ed0e713b1b57..c786e1197d3c 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq.c
@@ -28,9 +28,11 @@
 #include <plat/cpu.h>
 #include <plat/cpu-freq-core.h>
 
-#include <mach/regs-clock.h>
+#include <mach/map.h>
 
 /* note, cpufreq support deals in kHz, no Hz */
+#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
+#define S3C2410_MPLLCON     S3C2410_CLKREG(0x04)
 
 static struct cpufreq_driver s3c24xx_driver;
 static struct s3c_cpufreq_config cpu_cur;
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 30/36] ARM: s3c: remove cpufreq header dependencies
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (28 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 29/36] ARM: s3c: cpufreq: split out registers Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-23 13:38     ` Krzysztof Kozlowski
  2019-10-10 20:30   ` [PATCH 31/36] ARM: s3c: cpufreq: use global s3c2412_cpufreq_setrefresh Arnd Bergmann
                     ` (4 subsequent siblings)
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Rafael J. Wysocki, Viresh Kumar
  Cc: linux-samsung-soc, Arnd Bergmann, linux-pm, linus.walleij,
	linux-kernel, linux-arm-kernel

The cpufreq drivers are split between the machine directory
and the drivers/cpufreq directory. In order to share header
files after we convert s3c to multiplatform, those headers
have to live in a different global location.

Move them to linux/soc/samsung/ in lack of a better place.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/common.c                         |  1 -
 arch/arm/mach-s3c24xx/cpufreq-utils.c                  |  2 +-
 arch/arm/mach-s3c24xx/iotiming-s3c2410.c               |  2 +-
 arch/arm/mach-s3c24xx/iotiming-s3c2412.c               |  2 +-
 arch/arm/mach-s3c24xx/mach-bast.c                      |  2 +-
 arch/arm/mach-s3c24xx/mach-osiris-dvs.c                |  2 +-
 arch/arm/mach-s3c24xx/mach-osiris.c                    |  2 +-
 arch/arm/mach-s3c24xx/pll-s3c2410.c                    |  4 ++--
 arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c           |  4 ++--
 arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c           |  4 ++--
 arch/arm/mach-s3c24xx/s3c2410.c                        |  1 -
 arch/arm/mach-s3c24xx/s3c2412.c                        |  1 -
 arch/arm/mach-s3c24xx/s3c244x.c                        |  2 --
 arch/arm/mach-s3c64xx/s3c6400.c                        |  1 -
 arch/arm/mach-s3c64xx/s3c6410.c                        |  2 +-
 arch/arm/plat-samsung/include/plat/cpu.h               |  9 ---------
 drivers/cpufreq/s3c2410-cpufreq.c                      |  5 ++---
 drivers/cpufreq/s3c2412-cpufreq.c                      |  5 ++---
 drivers/cpufreq/s3c2440-cpufreq.c                      |  5 ++---
 drivers/cpufreq/s3c24xx-cpufreq-debugfs.c              |  2 +-
 drivers/cpufreq/s3c24xx-cpufreq.c                      |  5 ++---
 .../linux/soc/samsung/s3c-cpu-freq.h                   |  0
 .../linux/soc/samsung/s3c-cpufreq-core.h               |  2 +-
 include/linux/soc/samsung/s3c-pm.h                     | 10 ++++++++++
 24 files changed, 33 insertions(+), 42 deletions(-)
 rename arch/arm/plat-samsung/include/plat/cpu-freq.h => include/linux/soc/samsung/s3c-cpu-freq.h (100%)
 rename arch/arm/plat-samsung/include/plat/cpu-freq-core.h => include/linux/soc/samsung/s3c-cpufreq-core.h (99%)

diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index ebf6bde67816..d16a164df6c4 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -35,7 +35,6 @@
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
-#include <plat/cpu-freq.h>
 #include <plat/pwm-core.h>
 
 #include "common.h"
diff --git a/arch/arm/mach-s3c24xx/cpufreq-utils.c b/arch/arm/mach-s3c24xx/cpufreq-utils.c
index 1a7f38d085dd..43ab714eaa9e 100644
--- a/arch/arm/mach-s3c24xx/cpufreq-utils.c
+++ b/arch/arm/mach-s3c24xx/cpufreq-utils.c
@@ -15,7 +15,7 @@
 #include <mach/map.h>
 #include <mach/regs-clock.h>
 
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
 
 #include "regs-mem.h"
 
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
index 9f90aaf70bf3..5b3b16dd0ce8 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
@@ -17,7 +17,7 @@
 #include <mach/map.h>
 #include <mach/regs-clock.h>
 
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
 
 #include "regs-mem.h"
 
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
index 59356d10fbcf..a22b5611697d 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
@@ -24,7 +24,7 @@
 #include <asm/mach/map.h>
 
 #include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
 
 #include <mach/s3c2412.h>
 
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
index cc941b5030ea..b2f2d036bca2 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c24xx/mach-bast.c
@@ -46,7 +46,7 @@
 #include <mach/gpio-samsung.h>
 
 #include <plat/cpu.h>
-#include <plat/cpu-freq.h>
+#include <linux/soc/samsung/s3c-cpu-freq.h>
 #include <plat/devs.h>
 #include <plat/gpio-cfg.h>
 #include <plat/samsung-time.h>
diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
index 5d819b6ea428..1250520b3bcc 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
@@ -14,7 +14,7 @@
 
 #include <linux/mfd/tps65010.h>
 
-#include <plat/cpu-freq.h>
+#include <linux/soc/samsung/s3c-cpu-freq.h>
 #include <mach/gpio-samsung.h>
 
 #define OSIRIS_GPIO_DVS	S3C2410_GPB(5)
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c
index 262e77bd48de..674164264076 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris.c
@@ -37,7 +37,7 @@
 #include <linux/mtd/partitions.h>
 
 #include <plat/cpu.h>
-#include <plat/cpu-freq.h>
+#include <linux/soc/samsung/s3c-cpu-freq.h>
 #include <plat/devs.h>
 #include <plat/gpio-cfg.h>
 #include <plat/samsung-time.h>
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2410.c b/arch/arm/mach-s3c24xx/pll-s3c2410.c
index 0561f79ddce8..3fbc99eaa4a2 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2410.c
@@ -15,8 +15,8 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 /* This array should be sorted in ascending order of the frequencies */
 static struct cpufreq_frequency_table pll_vals_12MHz[] = {
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
index 2ec3a2f9a6a5..fdb8e8c2fe3b 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
@@ -13,8 +13,8 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 /* This array should be sorted in ascending order of the frequencies */
 static struct cpufreq_frequency_table s3c2440_plls_12[] = {
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
index 4b3d9e36c6bb..438b6fc099a4 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
@@ -13,8 +13,8 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 /* This array should be sorted in ascending order of the frequencies */
 static struct cpufreq_frequency_table s3c2440_plls_169344[] = {
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c
index 21fd5404bc98..8427c150dd22 100644
--- a/arch/arm/mach-s3c24xx/s3c2410.c
+++ b/arch/arm/mach-s3c24xx/s3c2410.c
@@ -30,7 +30,6 @@
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
-#include <plat/cpu-freq.h>
 
 #include <mach/regs-clock.h>
 
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index c3fb3e6c0dd8..209f952a6c98 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -34,7 +34,6 @@
 #include <mach/regs-gpio.h>
 
 #include <plat/cpu.h>
-#include <plat/cpu-freq.h>
 #include <plat/devs.h>
 #include <plat/pm.h>
 
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index a75f588b9d45..f5bd489bac85 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -28,8 +28,6 @@
 #include <mach/hardware.h>
 #include <asm/irq.h>
 
-#include <plat/cpu-freq.h>
-
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c
index 81233495d548..d18af724c807 100644
--- a/arch/arm/mach-s3c64xx/s3c6400.c
+++ b/arch/arm/mach-s3c64xx/s3c6400.c
@@ -28,7 +28,6 @@
 
 #include <asm/irq.h>
 
-#include <plat/cpu-freq.h>
 #include <mach/regs-clock.h>
 
 #include <plat/cpu.h>
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c
index 9465a6e0f068..b1d725e55cd2 100644
--- a/arch/arm/mach-s3c64xx/s3c6410.c
+++ b/arch/arm/mach-s3c64xx/s3c6410.c
@@ -29,7 +29,7 @@
 
 #include <asm/irq.h>
 
-#include <plat/cpu-freq.h>
+#include <linux/soc/samsung/s3c-pm.h>
 #include <mach/regs-clock.h>
 
 #include <plat/cpu.h>
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index 02d7f991d5a3..9dfd58bcc03d 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -124,15 +124,6 @@ extern struct syscore_ops s3c2412_pm_syscore_ops;
 extern struct syscore_ops s3c2416_pm_syscore_ops;
 extern struct syscore_ops s3c244x_pm_syscore_ops;
 
-/* system device subsystems */
-
-extern struct bus_type s3c2410_subsys;
-extern struct bus_type s3c2410a_subsys;
-extern struct bus_type s3c2412_subsys;
-extern struct bus_type s3c2416_subsys;
-extern struct bus_type s3c2440_subsys;
-extern struct bus_type s3c2442_subsys;
-extern struct bus_type s3c2443_subsys;
 extern struct bus_type s3c6410_subsys;
 
 #endif
diff --git a/drivers/cpufreq/s3c2410-cpufreq.c b/drivers/cpufreq/s3c2410-cpufreq.c
index 5c6cb590b63f..9c2f29cacdd0 100644
--- a/drivers/cpufreq/s3c2410-cpufreq.c
+++ b/drivers/cpufreq/s3c2410-cpufreq.c
@@ -16,13 +16,12 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/io.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
-
 #include <mach/map.h>
 
 #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
diff --git a/drivers/cpufreq/s3c2412-cpufreq.c b/drivers/cpufreq/s3c2412-cpufreq.c
index d922d0d47c80..38dc9e6db633 100644
--- a/drivers/cpufreq/s3c2412-cpufreq.c
+++ b/drivers/cpufreq/s3c2412-cpufreq.c
@@ -19,15 +19,14 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/io.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
 #include <mach/s3c2412.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
-
 #include <mach/map.h>
 
 #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
diff --git a/drivers/cpufreq/s3c2440-cpufreq.c b/drivers/cpufreq/s3c2440-cpufreq.c
index 5fe7a891fa13..442abdccb9c1 100644
--- a/drivers/cpufreq/s3c2440-cpufreq.c
+++ b/drivers/cpufreq/s3c2440-cpufreq.c
@@ -20,13 +20,12 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/io.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
-
 #include <mach/map.h>
 
 #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
diff --git a/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c b/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c
index 290e3539d03e..93971dfe7c75 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c
@@ -18,7 +18,7 @@
 #include <linux/seq_file.h>
 #include <linux/err.h>
 
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
 
 static struct dentry *dbgfs_root;
 static struct dentry *dbgfs_file_io;
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
index c786e1197d3c..01b1823ea208 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq.c
@@ -21,13 +21,12 @@
 #include <linux/device.h>
 #include <linux/sysfs.h>
 #include <linux/slab.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
-
 #include <mach/map.h>
 
 /* note, cpufreq support deals in kHz, no Hz */
diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq.h b/include/linux/soc/samsung/s3c-cpu-freq.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/cpu-freq.h
rename to include/linux/soc/samsung/s3c-cpu-freq.h
diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h b/include/linux/soc/samsung/s3c-cpufreq-core.h
similarity index 99%
rename from arch/arm/plat-samsung/include/plat/cpu-freq-core.h
rename to include/linux/soc/samsung/s3c-cpufreq-core.h
index 2c7cf2665634..4d22be1031b9 100644
--- a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h
+++ b/include/linux/soc/samsung/s3c-cpufreq-core.h
@@ -7,7 +7,7 @@
  * S3C CPU frequency scaling support - core support
  */
 
-#include <plat/cpu-freq.h>
+#include <linux/soc/samsung/s3c-cpu-freq.h>
 
 struct seq_file;
 
diff --git a/include/linux/soc/samsung/s3c-pm.h b/include/linux/soc/samsung/s3c-pm.h
index d477b314d034..55935993a111 100644
--- a/include/linux/soc/samsung/s3c-pm.h
+++ b/include/linux/soc/samsung/s3c-pm.h
@@ -81,4 +81,14 @@ extern void s3c_pm_check_store(void);
 #define s3c_pm_check_store()   do { } while (0)
 #endif
 
+/* system device subsystems */
+
+extern struct bus_type s3c2410_subsys;
+extern struct bus_type s3c2410a_subsys;
+extern struct bus_type s3c2412_subsys;
+extern struct bus_type s3c2416_subsys;
+extern struct bus_type s3c2440_subsys;
+extern struct bus_type s3c2442_subsys;
+extern struct bus_type s3c2443_subsys;
+
 #endif
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 30/36] ARM: s3c: remove cpufreq header dependencies
  2019-10-10 20:30   ` [PATCH 30/36] ARM: s3c: remove cpufreq header dependencies Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  2019-10-23 13:38     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Rafael J. Wysocki, Viresh Kumar
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel, linux-pm

The cpufreq drivers are split between the machine directory
and the drivers/cpufreq directory. In order to share header
files after we convert s3c to multiplatform, those headers
have to live in a different global location.

Move them to linux/soc/samsung/ in lack of a better place.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/common.c                         |  1 -
 arch/arm/mach-s3c24xx/cpufreq-utils.c                  |  2 +-
 arch/arm/mach-s3c24xx/iotiming-s3c2410.c               |  2 +-
 arch/arm/mach-s3c24xx/iotiming-s3c2412.c               |  2 +-
 arch/arm/mach-s3c24xx/mach-bast.c                      |  2 +-
 arch/arm/mach-s3c24xx/mach-osiris-dvs.c                |  2 +-
 arch/arm/mach-s3c24xx/mach-osiris.c                    |  2 +-
 arch/arm/mach-s3c24xx/pll-s3c2410.c                    |  4 ++--
 arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c           |  4 ++--
 arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c           |  4 ++--
 arch/arm/mach-s3c24xx/s3c2410.c                        |  1 -
 arch/arm/mach-s3c24xx/s3c2412.c                        |  1 -
 arch/arm/mach-s3c24xx/s3c244x.c                        |  2 --
 arch/arm/mach-s3c64xx/s3c6400.c                        |  1 -
 arch/arm/mach-s3c64xx/s3c6410.c                        |  2 +-
 arch/arm/plat-samsung/include/plat/cpu.h               |  9 ---------
 drivers/cpufreq/s3c2410-cpufreq.c                      |  5 ++---
 drivers/cpufreq/s3c2412-cpufreq.c                      |  5 ++---
 drivers/cpufreq/s3c2440-cpufreq.c                      |  5 ++---
 drivers/cpufreq/s3c24xx-cpufreq-debugfs.c              |  2 +-
 drivers/cpufreq/s3c24xx-cpufreq.c                      |  5 ++---
 .../linux/soc/samsung/s3c-cpu-freq.h                   |  0
 .../linux/soc/samsung/s3c-cpufreq-core.h               |  2 +-
 include/linux/soc/samsung/s3c-pm.h                     | 10 ++++++++++
 24 files changed, 33 insertions(+), 42 deletions(-)
 rename arch/arm/plat-samsung/include/plat/cpu-freq.h => include/linux/soc/samsung/s3c-cpu-freq.h (100%)
 rename arch/arm/plat-samsung/include/plat/cpu-freq-core.h => include/linux/soc/samsung/s3c-cpufreq-core.h (99%)

diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index ebf6bde67816..d16a164df6c4 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -35,7 +35,6 @@
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
-#include <plat/cpu-freq.h>
 #include <plat/pwm-core.h>
 
 #include "common.h"
diff --git a/arch/arm/mach-s3c24xx/cpufreq-utils.c b/arch/arm/mach-s3c24xx/cpufreq-utils.c
index 1a7f38d085dd..43ab714eaa9e 100644
--- a/arch/arm/mach-s3c24xx/cpufreq-utils.c
+++ b/arch/arm/mach-s3c24xx/cpufreq-utils.c
@@ -15,7 +15,7 @@
 #include <mach/map.h>
 #include <mach/regs-clock.h>
 
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
 
 #include "regs-mem.h"
 
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
index 9f90aaf70bf3..5b3b16dd0ce8 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
@@ -17,7 +17,7 @@
 #include <mach/map.h>
 #include <mach/regs-clock.h>
 
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
 
 #include "regs-mem.h"
 
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
index 59356d10fbcf..a22b5611697d 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
@@ -24,7 +24,7 @@
 #include <asm/mach/map.h>
 
 #include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
 
 #include <mach/s3c2412.h>
 
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
index cc941b5030ea..b2f2d036bca2 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c24xx/mach-bast.c
@@ -46,7 +46,7 @@
 #include <mach/gpio-samsung.h>
 
 #include <plat/cpu.h>
-#include <plat/cpu-freq.h>
+#include <linux/soc/samsung/s3c-cpu-freq.h>
 #include <plat/devs.h>
 #include <plat/gpio-cfg.h>
 #include <plat/samsung-time.h>
diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
index 5d819b6ea428..1250520b3bcc 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
@@ -14,7 +14,7 @@
 
 #include <linux/mfd/tps65010.h>
 
-#include <plat/cpu-freq.h>
+#include <linux/soc/samsung/s3c-cpu-freq.h>
 #include <mach/gpio-samsung.h>
 
 #define OSIRIS_GPIO_DVS	S3C2410_GPB(5)
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c
index 262e77bd48de..674164264076 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris.c
@@ -37,7 +37,7 @@
 #include <linux/mtd/partitions.h>
 
 #include <plat/cpu.h>
-#include <plat/cpu-freq.h>
+#include <linux/soc/samsung/s3c-cpu-freq.h>
 #include <plat/devs.h>
 #include <plat/gpio-cfg.h>
 #include <plat/samsung-time.h>
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2410.c b/arch/arm/mach-s3c24xx/pll-s3c2410.c
index 0561f79ddce8..3fbc99eaa4a2 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2410.c
@@ -15,8 +15,8 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 /* This array should be sorted in ascending order of the frequencies */
 static struct cpufreq_frequency_table pll_vals_12MHz[] = {
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
index 2ec3a2f9a6a5..fdb8e8c2fe3b 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
@@ -13,8 +13,8 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 /* This array should be sorted in ascending order of the frequencies */
 static struct cpufreq_frequency_table s3c2440_plls_12[] = {
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
index 4b3d9e36c6bb..438b6fc099a4 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
@@ -13,8 +13,8 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 /* This array should be sorted in ascending order of the frequencies */
 static struct cpufreq_frequency_table s3c2440_plls_169344[] = {
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c
index 21fd5404bc98..8427c150dd22 100644
--- a/arch/arm/mach-s3c24xx/s3c2410.c
+++ b/arch/arm/mach-s3c24xx/s3c2410.c
@@ -30,7 +30,6 @@
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
-#include <plat/cpu-freq.h>
 
 #include <mach/regs-clock.h>
 
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index c3fb3e6c0dd8..209f952a6c98 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -34,7 +34,6 @@
 #include <mach/regs-gpio.h>
 
 #include <plat/cpu.h>
-#include <plat/cpu-freq.h>
 #include <plat/devs.h>
 #include <plat/pm.h>
 
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index a75f588b9d45..f5bd489bac85 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -28,8 +28,6 @@
 #include <mach/hardware.h>
 #include <asm/irq.h>
 
-#include <plat/cpu-freq.h>
-
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c
index 81233495d548..d18af724c807 100644
--- a/arch/arm/mach-s3c64xx/s3c6400.c
+++ b/arch/arm/mach-s3c64xx/s3c6400.c
@@ -28,7 +28,6 @@
 
 #include <asm/irq.h>
 
-#include <plat/cpu-freq.h>
 #include <mach/regs-clock.h>
 
 #include <plat/cpu.h>
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c
index 9465a6e0f068..b1d725e55cd2 100644
--- a/arch/arm/mach-s3c64xx/s3c6410.c
+++ b/arch/arm/mach-s3c64xx/s3c6410.c
@@ -29,7 +29,7 @@
 
 #include <asm/irq.h>
 
-#include <plat/cpu-freq.h>
+#include <linux/soc/samsung/s3c-pm.h>
 #include <mach/regs-clock.h>
 
 #include <plat/cpu.h>
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index 02d7f991d5a3..9dfd58bcc03d 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -124,15 +124,6 @@ extern struct syscore_ops s3c2412_pm_syscore_ops;
 extern struct syscore_ops s3c2416_pm_syscore_ops;
 extern struct syscore_ops s3c244x_pm_syscore_ops;
 
-/* system device subsystems */
-
-extern struct bus_type s3c2410_subsys;
-extern struct bus_type s3c2410a_subsys;
-extern struct bus_type s3c2412_subsys;
-extern struct bus_type s3c2416_subsys;
-extern struct bus_type s3c2440_subsys;
-extern struct bus_type s3c2442_subsys;
-extern struct bus_type s3c2443_subsys;
 extern struct bus_type s3c6410_subsys;
 
 #endif
diff --git a/drivers/cpufreq/s3c2410-cpufreq.c b/drivers/cpufreq/s3c2410-cpufreq.c
index 5c6cb590b63f..9c2f29cacdd0 100644
--- a/drivers/cpufreq/s3c2410-cpufreq.c
+++ b/drivers/cpufreq/s3c2410-cpufreq.c
@@ -16,13 +16,12 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/io.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
-
 #include <mach/map.h>
 
 #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
diff --git a/drivers/cpufreq/s3c2412-cpufreq.c b/drivers/cpufreq/s3c2412-cpufreq.c
index d922d0d47c80..38dc9e6db633 100644
--- a/drivers/cpufreq/s3c2412-cpufreq.c
+++ b/drivers/cpufreq/s3c2412-cpufreq.c
@@ -19,15 +19,14 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/io.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
 #include <mach/s3c2412.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
-
 #include <mach/map.h>
 
 #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
diff --git a/drivers/cpufreq/s3c2440-cpufreq.c b/drivers/cpufreq/s3c2440-cpufreq.c
index 5fe7a891fa13..442abdccb9c1 100644
--- a/drivers/cpufreq/s3c2440-cpufreq.c
+++ b/drivers/cpufreq/s3c2440-cpufreq.c
@@ -20,13 +20,12 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/io.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
-
 #include <mach/map.h>
 
 #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
diff --git a/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c b/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c
index 290e3539d03e..93971dfe7c75 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c
@@ -18,7 +18,7 @@
 #include <linux/seq_file.h>
 #include <linux/err.h>
 
-#include <plat/cpu-freq-core.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
 
 static struct dentry *dbgfs_root;
 static struct dentry *dbgfs_file_io;
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
index c786e1197d3c..01b1823ea208 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq.c
@@ -21,13 +21,12 @@
 #include <linux/device.h>
 #include <linux/sysfs.h>
 #include <linux/slab.h>
+#include <linux/soc/samsung/s3c-cpufreq-core.h>
+#include <linux/soc/samsung/s3c-pm.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/cpu.h>
-#include <plat/cpu-freq-core.h>
-
 #include <mach/map.h>
 
 /* note, cpufreq support deals in kHz, no Hz */
diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq.h b/include/linux/soc/samsung/s3c-cpu-freq.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/cpu-freq.h
rename to include/linux/soc/samsung/s3c-cpu-freq.h
diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h b/include/linux/soc/samsung/s3c-cpufreq-core.h
similarity index 99%
rename from arch/arm/plat-samsung/include/plat/cpu-freq-core.h
rename to include/linux/soc/samsung/s3c-cpufreq-core.h
index 2c7cf2665634..4d22be1031b9 100644
--- a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h
+++ b/include/linux/soc/samsung/s3c-cpufreq-core.h
@@ -7,7 +7,7 @@
  * S3C CPU frequency scaling support - core support
  */
 
-#include <plat/cpu-freq.h>
+#include <linux/soc/samsung/s3c-cpu-freq.h>
 
 struct seq_file;
 
diff --git a/include/linux/soc/samsung/s3c-pm.h b/include/linux/soc/samsung/s3c-pm.h
index d477b314d034..55935993a111 100644
--- a/include/linux/soc/samsung/s3c-pm.h
+++ b/include/linux/soc/samsung/s3c-pm.h
@@ -81,4 +81,14 @@ extern void s3c_pm_check_store(void);
 #define s3c_pm_check_store()   do { } while (0)
 #endif
 
+/* system device subsystems */
+
+extern struct bus_type s3c2410_subsys;
+extern struct bus_type s3c2410a_subsys;
+extern struct bus_type s3c2412_subsys;
+extern struct bus_type s3c2416_subsys;
+extern struct bus_type s3c2440_subsys;
+extern struct bus_type s3c2442_subsys;
+extern struct bus_type s3c2443_subsys;
+
 #endif
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 31/36] ARM: s3c: cpufreq: use global s3c2412_cpufreq_setrefresh
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (29 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 30/36] ARM: s3c: remove cpufreq header dependencies Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-23 13:44     ` Krzysztof Kozlowski
  2019-10-10 20:30   ` [PATCH 32/36] ARM: s3c: iotiming: make functions static Arnd Bergmann
                     ` (3 subsequent siblings)
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Rafael J. Wysocki, Viresh Kumar
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-pm, linux-kernel

There are two identical copies of the s3c2412_cpufreq_setrefresh
function: a static one in the cpufreq driver and a global
version in iotiming-s3c2412.c.

As the function requires the use of a hardcoded register address
from a header that we want to not be visible to drivers, just
move the existing global function and add a declaration in
one of the cpufreq header files.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/cpufreq/s3c2412-cpufreq.c            | 23 --------------------
 include/linux/soc/samsung/s3c-cpufreq-core.h |  1 +
 2 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/drivers/cpufreq/s3c2412-cpufreq.c b/drivers/cpufreq/s3c2412-cpufreq.c
index 38dc9e6db633..a77c63e92e1a 100644
--- a/drivers/cpufreq/s3c2412-cpufreq.c
+++ b/drivers/cpufreq/s3c2412-cpufreq.c
@@ -25,8 +25,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/s3c2412.h>
-
 #include <mach/map.h>
 
 #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
@@ -156,27 +154,6 @@ static void s3c2412_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
 	clk_set_parent(armclk, cfg->divs.dvs ? hclk : fclk);
 }
 
-static void s3c2412_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg)
-{
-	struct s3c_cpufreq_board *board = cfg->board;
-	unsigned long refresh;
-
-	s3c_freq_dbg("%s: refresh %u ns, hclk %lu\n", __func__,
-		     board->refresh, cfg->freq.hclk);
-
-	/* Reduce both the refresh time (in ns) and the frequency (in MHz)
-	 * by 10 each to ensure that we do not overflow 32 bit numbers. This
-	 * should work for HCLK up to 133MHz and refresh period up to 30usec.
-	 */
-
-	refresh = (board->refresh / 10);
-	refresh *= (cfg->freq.hclk / 100);
-	refresh /= (1 * 1000 * 1000);	/* 10^6 */
-
-	s3c_freq_dbg("%s: setting refresh 0x%08lx\n", __func__, refresh);
-	__raw_writel(refresh, S3C2412_REFRESH);
-}
-
 /* set the default cpu frequency information, based on an 200MHz part
  * as we have no other way of detecting the speed rating in software.
  */
diff --git a/include/linux/soc/samsung/s3c-cpufreq-core.h b/include/linux/soc/samsung/s3c-cpufreq-core.h
index 4d22be1031b9..eca942559014 100644
--- a/include/linux/soc/samsung/s3c-cpufreq-core.h
+++ b/include/linux/soc/samsung/s3c-cpufreq-core.h
@@ -246,6 +246,7 @@ extern int s3c2412_iotiming_calc(struct s3c_cpufreq_config *cfg,
 
 extern void s3c2412_iotiming_set(struct s3c_cpufreq_config *cfg,
 				 struct s3c_iotimings *iot);
+extern void s3c2412_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg);
 #else
 #define s3c2412_iotiming_debugfs NULL
 #define s3c2412_iotiming_calc NULL
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 31/36] ARM: s3c: cpufreq: use global s3c2412_cpufreq_setrefresh
  2019-10-10 20:30   ` [PATCH 31/36] ARM: s3c: cpufreq: use global s3c2412_cpufreq_setrefresh Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  2019-10-23 13:44     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Rafael J. Wysocki, Viresh Kumar
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-pm, linux-kernel

There are two identical copies of the s3c2412_cpufreq_setrefresh
function: a static one in the cpufreq driver and a global
version in iotiming-s3c2412.c.

As the function requires the use of a hardcoded register address
from a header that we want to not be visible to drivers, just
move the existing global function and add a declaration in
one of the cpufreq header files.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/cpufreq/s3c2412-cpufreq.c            | 23 --------------------
 include/linux/soc/samsung/s3c-cpufreq-core.h |  1 +
 2 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/drivers/cpufreq/s3c2412-cpufreq.c b/drivers/cpufreq/s3c2412-cpufreq.c
index 38dc9e6db633..a77c63e92e1a 100644
--- a/drivers/cpufreq/s3c2412-cpufreq.c
+++ b/drivers/cpufreq/s3c2412-cpufreq.c
@@ -25,8 +25,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/s3c2412.h>
-
 #include <mach/map.h>
 
 #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
@@ -156,27 +154,6 @@ static void s3c2412_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
 	clk_set_parent(armclk, cfg->divs.dvs ? hclk : fclk);
 }
 
-static void s3c2412_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg)
-{
-	struct s3c_cpufreq_board *board = cfg->board;
-	unsigned long refresh;
-
-	s3c_freq_dbg("%s: refresh %u ns, hclk %lu\n", __func__,
-		     board->refresh, cfg->freq.hclk);
-
-	/* Reduce both the refresh time (in ns) and the frequency (in MHz)
-	 * by 10 each to ensure that we do not overflow 32 bit numbers. This
-	 * should work for HCLK up to 133MHz and refresh period up to 30usec.
-	 */
-
-	refresh = (board->refresh / 10);
-	refresh *= (cfg->freq.hclk / 100);
-	refresh /= (1 * 1000 * 1000);	/* 10^6 */
-
-	s3c_freq_dbg("%s: setting refresh 0x%08lx\n", __func__, refresh);
-	__raw_writel(refresh, S3C2412_REFRESH);
-}
-
 /* set the default cpu frequency information, based on an 200MHz part
  * as we have no other way of detecting the speed rating in software.
  */
diff --git a/include/linux/soc/samsung/s3c-cpufreq-core.h b/include/linux/soc/samsung/s3c-cpufreq-core.h
index 4d22be1031b9..eca942559014 100644
--- a/include/linux/soc/samsung/s3c-cpufreq-core.h
+++ b/include/linux/soc/samsung/s3c-cpufreq-core.h
@@ -246,6 +246,7 @@ extern int s3c2412_iotiming_calc(struct s3c_cpufreq_config *cfg,
 
 extern void s3c2412_iotiming_set(struct s3c_cpufreq_config *cfg,
 				 struct s3c_iotimings *iot);
+extern void s3c2412_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg);
 #else
 #define s3c2412_iotiming_debugfs NULL
 #define s3c2412_iotiming_calc NULL
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 32/36] ARM: s3c: iotiming: make functions static
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (30 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 31/36] ARM: s3c: cpufreq: use global s3c2412_cpufreq_setrefresh Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-10 20:30   ` [PATCH 33/36] ARM: s3c: move low-level clk reg access into platform code Arnd Bergmann
                     ` (2 subsequent siblings)
  34 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel

There are two functions in this file that are never called from
anywhere else, so they should be static to allow the compiler
to optimize it better and not pollute the global namespace.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
index 5b3b16dd0ce8..5d85c259f328 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
@@ -129,7 +129,7 @@ static unsigned int calc_0124(unsigned int cyc, unsigned long hclk_tns,
 	return 0;
 }
 
-int calc_tacp(unsigned int cyc, unsigned long hclk, unsigned long *v)
+static int calc_tacp(unsigned int cyc, unsigned long hclk, unsigned long *v)
 {
 	/* Currently no support for Tacp calculations. */
 	return 0;
@@ -288,8 +288,8 @@ static unsigned int get_0124(unsigned long hclk_tns,
  * Given the BANKCON setting in @bt and the current frequency settings
  * in @cfg, update the cycle timing information.
  */
-void s3c2410_iotiming_getbank(struct s3c_cpufreq_config *cfg,
-			      struct s3c2410_iobank_timing *bt)
+static void s3c2410_iotiming_getbank(struct s3c_cpufreq_config *cfg,
+				     struct s3c2410_iobank_timing *bt)
 {
 	unsigned long bankcon = bt->bankcon;
 	unsigned long hclk = cfg->freq.hclk_tns;
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 32/36] ARM: s3c: iotiming: make functions static
  2019-10-10 20:30   ` [PATCH 32/36] ARM: s3c: iotiming: make functions static Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel

There are two functions in this file that are never called from
anywhere else, so they should be static to allow the compiler
to optimize it better and not pollute the global namespace.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
index 5b3b16dd0ce8..5d85c259f328 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
@@ -129,7 +129,7 @@ static unsigned int calc_0124(unsigned int cyc, unsigned long hclk_tns,
 	return 0;
 }
 
-int calc_tacp(unsigned int cyc, unsigned long hclk, unsigned long *v)
+static int calc_tacp(unsigned int cyc, unsigned long hclk, unsigned long *v)
 {
 	/* Currently no support for Tacp calculations. */
 	return 0;
@@ -288,8 +288,8 @@ static unsigned int get_0124(unsigned long hclk_tns,
  * Given the BANKCON setting in @bt and the current frequency settings
  * in @cfg, update the cycle timing information.
  */
-void s3c2410_iotiming_getbank(struct s3c_cpufreq_config *cfg,
-			      struct s3c2410_iobank_timing *bt)
+static void s3c2410_iotiming_getbank(struct s3c_cpufreq_config *cfg,
+				     struct s3c2410_iobank_timing *bt)
 {
 	unsigned long bankcon = bt->bankcon;
 	unsigned long hclk = cfg->freq.hclk_tns;
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 33/36] ARM: s3c: move low-level clk reg access into platform code
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (31 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 32/36] ARM: s3c: iotiming: make functions static Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-23 13:49     ` Krzysztof Kozlowski
  2019-10-10 20:30   ` [PATCH 34/36] ARM: s3c: stop including mach/hardware.h from mach/io.h Arnd Bergmann
  2019-10-15 14:52   ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Tomasz Figa
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Rafael J. Wysocki, Viresh Kumar
  Cc: linux-samsung-soc, Arnd Bergmann, linux-pm, linus.walleij,
	linux-kernel, linux-arm-kernel

Rather than have the cpufreq drivers touch include the
common headers to get the constants, add a small indirection.
This is still not the proper way that would do this through
the common clk API, but it lets us kill off the header file
usage.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/Makefile               |  2 +-
 arch/arm/mach-s3c24xx/cpufreq-utils.c        | 32 ++++++++++++++++++++
 drivers/cpufreq/s3c2410-cpufreq.c            |  8 +----
 drivers/cpufreq/s3c2412-cpufreq.c            | 10 ++----
 drivers/cpufreq/s3c2440-cpufreq.c            | 16 +++-------
 drivers/cpufreq/s3c24xx-cpufreq.c            | 11 ++-----
 include/linux/soc/samsung/s3c-cpufreq-core.h |  7 +++++
 7 files changed, 51 insertions(+), 35 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index 695573df00b1..195a4cb23ecb 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -38,7 +38,7 @@ obj-$(CONFIG_PM_SLEEP)		+= irq-pm.o sleep.o
 
 # common code
 
-obj-$(CONFIG_S3C2410_CPUFREQ_UTILS) += cpufreq-utils.o
+obj-$(CONFIG_ARM_S3C24XX_CPUFREQ) += cpufreq-utils.o
 
 obj-$(CONFIG_S3C2410_IOTIMING)	+= iotiming-s3c2410.o
 obj-$(CONFIG_S3C2412_IOTIMING)	+= iotiming-s3c2412.o
diff --git a/arch/arm/mach-s3c24xx/cpufreq-utils.c b/arch/arm/mach-s3c24xx/cpufreq-utils.c
index 43ab714eaa9e..75c197d59a75 100644
--- a/arch/arm/mach-s3c24xx/cpufreq-utils.c
+++ b/arch/arm/mach-s3c24xx/cpufreq-utils.c
@@ -60,3 +60,35 @@ void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg)
 	if (!IS_ERR(cfg->mpll))
 		clk_set_rate(cfg->mpll, cfg->pll.frequency);
 }
+
+#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
+u32 s3c2440_read_camdivn()
+{
+	return __raw_readl(S3C2440_CAMDIVN);
+}
+
+void s3c2440_write_camdivn(u32 camdiv)
+{
+	__raw_writel(camdiv, S3C2440_CAMDIVN);
+}
+#endif
+
+u32 s3c24xx_read_clkdivn()
+{
+	return __raw_readl(S3C2410_CLKDIVN);
+}
+
+void s3c24xx_write_clkdivn(u32 clkdiv)
+{
+	__raw_writel(clkdiv, S3C2410_CLKDIVN);
+}
+
+u32 s3c24xx_read_mpllcon()
+{
+	return __raw_readl(S3C2410_MPLLCON);
+}
+
+void s3c24xx_write_locktime(u32 locktime)
+{
+	return __raw_writel(locktime, S3C2410_LOCKTIME);
+}
diff --git a/drivers/cpufreq/s3c2410-cpufreq.c b/drivers/cpufreq/s3c2410-cpufreq.c
index 9c2f29cacdd0..5dcfbf0bfb74 100644
--- a/drivers/cpufreq/s3c2410-cpufreq.c
+++ b/drivers/cpufreq/s3c2410-cpufreq.c
@@ -22,12 +22,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-
-#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
-
-#define S3C2410_CLKDIVN	    S3C2410_CLKREG(0x14)
-
 #define S3C2410_CLKDIVN_PDIVN	     (1<<0)
 #define S3C2410_CLKDIVN_HDIVN	     (1<<1)
 
@@ -43,7 +37,7 @@ static void s3c2410_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
 	if (cfg->divs.p_divisor != cfg->divs.h_divisor)
 		clkdiv |= S3C2410_CLKDIVN_PDIVN;
 
-	__raw_writel(clkdiv, S3C2410_CLKDIVN);
+	s3c24xx_write_clkdivn(clkdiv);
 }
 
 static int s3c2410_cpufreq_calcdivs(struct s3c_cpufreq_config *cfg)
diff --git a/drivers/cpufreq/s3c2412-cpufreq.c b/drivers/cpufreq/s3c2412-cpufreq.c
index a77c63e92e1a..5945945ead7c 100644
--- a/drivers/cpufreq/s3c2412-cpufreq.c
+++ b/drivers/cpufreq/s3c2412-cpufreq.c
@@ -25,12 +25,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-
-#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
-
-#define S3C2410_CLKDIVN	    S3C2410_CLKREG(0x14)
-
 #define S3C2412_CLKDIVN_PDIVN		(1<<2)
 #define S3C2412_CLKDIVN_HDIVN_MASK	(3<<0)
 #define S3C2412_CLKDIVN_ARMDIVN		(1<<3)
@@ -132,7 +126,7 @@ static void s3c2412_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
 	unsigned long clkdiv;
 	unsigned long olddiv;
 
-	olddiv = clkdiv = __raw_readl(S3C2410_CLKDIVN);
+	olddiv = clkdiv = s3c24xx_read_clkdivn();
 
 	/* clear off current clock info */
 
@@ -149,7 +143,7 @@ static void s3c2412_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
 		clkdiv |= S3C2412_CLKDIVN_PDIVN;
 
 	s3c_freq_dbg("%s: div %08lx => %08lx\n", __func__, olddiv, clkdiv);
-	__raw_writel(clkdiv, S3C2410_CLKDIVN);
+	s3c24xx_write_clkdivn(clkdiv);
 
 	clk_set_parent(armclk, cfg->divs.dvs ? hclk : fclk);
 }
diff --git a/drivers/cpufreq/s3c2440-cpufreq.c b/drivers/cpufreq/s3c2440-cpufreq.c
index 442abdccb9c1..148e8aedefa9 100644
--- a/drivers/cpufreq/s3c2440-cpufreq.c
+++ b/drivers/cpufreq/s3c2440-cpufreq.c
@@ -26,12 +26,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-
-#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
-#define S3C2410_CLKDIVN	    S3C2410_CLKREG(0x14)
-#define S3C2440_CAMDIVN	    S3C2410_CLKREG(0x18)
-
 #define S3C2440_CLKDIVN_PDIVN	     (1<<0)
 #define S3C2440_CLKDIVN_HDIVN_MASK   (3<<1)
 #define S3C2440_CLKDIVN_HDIVN_1      (0<<1)
@@ -162,8 +156,8 @@ static void s3c2440_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
 	s3c_freq_dbg("%s: divisors: h=%d, p=%d\n", __func__,
 		     cfg->divs.h_divisor, cfg->divs.p_divisor);
 
-	clkdiv = __raw_readl(S3C2410_CLKDIVN);
-	camdiv = __raw_readl(S3C2440_CAMDIVN);
+	clkdiv = s3c24xx_read_clkdivn();
+	camdiv = s3c2440_read_camdivn();
 
 	clkdiv &= ~(S3C2440_CLKDIVN_HDIVN_MASK | S3C2440_CLKDIVN_PDIVN);
 	camdiv &= ~CAMDIVN_HCLK_HALF;
@@ -203,11 +197,11 @@ static void s3c2440_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
 	 * then make a short delay and remove the hclk halving if necessary.
 	 */
 
-	__raw_writel(camdiv | CAMDIVN_HCLK_HALF, S3C2440_CAMDIVN);
-	__raw_writel(clkdiv, S3C2410_CLKDIVN);
+	s3c2440_write_camdivn(camdiv | CAMDIVN_HCLK_HALF);
+	s3c24xx_write_clkdivn(clkdiv);
 
 	ndelay(20);
-	__raw_writel(camdiv, S3C2440_CAMDIVN);
+	s3c2440_write_camdivn(camdiv);
 
 	clk_set_parent(armclk, cfg->divs.dvs ? hclk : fclk);
 }
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
index 01b1823ea208..37efc0dc3f91 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq.c
@@ -27,12 +27,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-
 /* note, cpufreq support deals in kHz, no Hz */
-#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
-#define S3C2410_MPLLCON     S3C2410_CLKREG(0x04)
-
 static struct cpufreq_driver s3c24xx_driver;
 static struct s3c_cpufreq_config cpu_cur;
 static struct s3c_iotimings s3c24xx_iotiming;
@@ -69,7 +64,7 @@ static void s3c_cpufreq_getcur(struct s3c_cpufreq_config *cfg)
 	cfg->freq.pclk = pclk = clk_get_rate(clk_pclk);
 	cfg->freq.armclk = armclk = clk_get_rate(clk_arm);
 
-	cfg->pll.driver_data = __raw_readl(S3C2410_MPLLCON);
+	cfg->pll.driver_data = s3c24xx_read_mpllcon();
 	cfg->pll.frequency = fclk;
 
 	cfg->freq.hclk_tns = 1000000000 / (cfg->freq.hclk / 10);
@@ -387,7 +382,7 @@ static unsigned int suspend_freq;
 static int s3c_cpufreq_suspend(struct cpufreq_policy *policy)
 {
 	suspend_pll.frequency = clk_get_rate(_clk_mpll);
-	suspend_pll.driver_data = __raw_readl(S3C2410_MPLLCON);
+	suspend_pll.driver_data = s3c24xx_read_mpllcon();
 	suspend_freq = clk_get_rate(clk_arm);
 
 	return 0;
@@ -548,7 +543,7 @@ static void s3c_cpufreq_update_loctkime(void)
 	val |= calc_locktime(rate, cpu_cur.info->locktime_m);
 
 	pr_info("%s: new locktime is 0x%08x\n", __func__, val);
-	__raw_writel(val, S3C2410_LOCKTIME);
+	s3c24xx_write_locktime(val);
 }
 
 static int s3c_cpufreq_build_freq(void)
diff --git a/include/linux/soc/samsung/s3c-cpufreq-core.h b/include/linux/soc/samsung/s3c-cpufreq-core.h
index eca942559014..eaee883008a8 100644
--- a/include/linux/soc/samsung/s3c-cpufreq-core.h
+++ b/include/linux/soc/samsung/s3c-cpufreq-core.h
@@ -286,3 +286,10 @@ static inline int s3c_cpufreq_addfreq(struct cpufreq_frequency_table *table,
 
 	return index + 1;
 }
+
+u32 s3c2440_read_camdivn(void);
+void s3c2440_write_camdivn(u32 camdiv);
+u32 s3c24xx_read_clkdivn(void);
+void s3c24xx_write_clkdivn(u32 clkdiv);
+u32 s3c24xx_read_mpllcon(void);
+void s3c24xx_write_locktime(u32 locktime);
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 33/36] ARM: s3c: move low-level clk reg access into platform code
  2019-10-10 20:30   ` [PATCH 33/36] ARM: s3c: move low-level clk reg access into platform code Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  2019-10-23 13:49     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Rafael J. Wysocki, Viresh Kumar
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel, linux-pm

Rather than have the cpufreq drivers touch include the
common headers to get the constants, add a small indirection.
This is still not the proper way that would do this through
the common clk API, but it lets us kill off the header file
usage.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/Makefile               |  2 +-
 arch/arm/mach-s3c24xx/cpufreq-utils.c        | 32 ++++++++++++++++++++
 drivers/cpufreq/s3c2410-cpufreq.c            |  8 +----
 drivers/cpufreq/s3c2412-cpufreq.c            | 10 ++----
 drivers/cpufreq/s3c2440-cpufreq.c            | 16 +++-------
 drivers/cpufreq/s3c24xx-cpufreq.c            | 11 ++-----
 include/linux/soc/samsung/s3c-cpufreq-core.h |  7 +++++
 7 files changed, 51 insertions(+), 35 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index 695573df00b1..195a4cb23ecb 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -38,7 +38,7 @@ obj-$(CONFIG_PM_SLEEP)		+= irq-pm.o sleep.o
 
 # common code
 
-obj-$(CONFIG_S3C2410_CPUFREQ_UTILS) += cpufreq-utils.o
+obj-$(CONFIG_ARM_S3C24XX_CPUFREQ) += cpufreq-utils.o
 
 obj-$(CONFIG_S3C2410_IOTIMING)	+= iotiming-s3c2410.o
 obj-$(CONFIG_S3C2412_IOTIMING)	+= iotiming-s3c2412.o
diff --git a/arch/arm/mach-s3c24xx/cpufreq-utils.c b/arch/arm/mach-s3c24xx/cpufreq-utils.c
index 43ab714eaa9e..75c197d59a75 100644
--- a/arch/arm/mach-s3c24xx/cpufreq-utils.c
+++ b/arch/arm/mach-s3c24xx/cpufreq-utils.c
@@ -60,3 +60,35 @@ void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg)
 	if (!IS_ERR(cfg->mpll))
 		clk_set_rate(cfg->mpll, cfg->pll.frequency);
 }
+
+#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
+u32 s3c2440_read_camdivn()
+{
+	return __raw_readl(S3C2440_CAMDIVN);
+}
+
+void s3c2440_write_camdivn(u32 camdiv)
+{
+	__raw_writel(camdiv, S3C2440_CAMDIVN);
+}
+#endif
+
+u32 s3c24xx_read_clkdivn()
+{
+	return __raw_readl(S3C2410_CLKDIVN);
+}
+
+void s3c24xx_write_clkdivn(u32 clkdiv)
+{
+	__raw_writel(clkdiv, S3C2410_CLKDIVN);
+}
+
+u32 s3c24xx_read_mpllcon()
+{
+	return __raw_readl(S3C2410_MPLLCON);
+}
+
+void s3c24xx_write_locktime(u32 locktime)
+{
+	return __raw_writel(locktime, S3C2410_LOCKTIME);
+}
diff --git a/drivers/cpufreq/s3c2410-cpufreq.c b/drivers/cpufreq/s3c2410-cpufreq.c
index 9c2f29cacdd0..5dcfbf0bfb74 100644
--- a/drivers/cpufreq/s3c2410-cpufreq.c
+++ b/drivers/cpufreq/s3c2410-cpufreq.c
@@ -22,12 +22,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-
-#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
-
-#define S3C2410_CLKDIVN	    S3C2410_CLKREG(0x14)
-
 #define S3C2410_CLKDIVN_PDIVN	     (1<<0)
 #define S3C2410_CLKDIVN_HDIVN	     (1<<1)
 
@@ -43,7 +37,7 @@ static void s3c2410_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
 	if (cfg->divs.p_divisor != cfg->divs.h_divisor)
 		clkdiv |= S3C2410_CLKDIVN_PDIVN;
 
-	__raw_writel(clkdiv, S3C2410_CLKDIVN);
+	s3c24xx_write_clkdivn(clkdiv);
 }
 
 static int s3c2410_cpufreq_calcdivs(struct s3c_cpufreq_config *cfg)
diff --git a/drivers/cpufreq/s3c2412-cpufreq.c b/drivers/cpufreq/s3c2412-cpufreq.c
index a77c63e92e1a..5945945ead7c 100644
--- a/drivers/cpufreq/s3c2412-cpufreq.c
+++ b/drivers/cpufreq/s3c2412-cpufreq.c
@@ -25,12 +25,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-
-#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
-
-#define S3C2410_CLKDIVN	    S3C2410_CLKREG(0x14)
-
 #define S3C2412_CLKDIVN_PDIVN		(1<<2)
 #define S3C2412_CLKDIVN_HDIVN_MASK	(3<<0)
 #define S3C2412_CLKDIVN_ARMDIVN		(1<<3)
@@ -132,7 +126,7 @@ static void s3c2412_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
 	unsigned long clkdiv;
 	unsigned long olddiv;
 
-	olddiv = clkdiv = __raw_readl(S3C2410_CLKDIVN);
+	olddiv = clkdiv = s3c24xx_read_clkdivn();
 
 	/* clear off current clock info */
 
@@ -149,7 +143,7 @@ static void s3c2412_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
 		clkdiv |= S3C2412_CLKDIVN_PDIVN;
 
 	s3c_freq_dbg("%s: div %08lx => %08lx\n", __func__, olddiv, clkdiv);
-	__raw_writel(clkdiv, S3C2410_CLKDIVN);
+	s3c24xx_write_clkdivn(clkdiv);
 
 	clk_set_parent(armclk, cfg->divs.dvs ? hclk : fclk);
 }
diff --git a/drivers/cpufreq/s3c2440-cpufreq.c b/drivers/cpufreq/s3c2440-cpufreq.c
index 442abdccb9c1..148e8aedefa9 100644
--- a/drivers/cpufreq/s3c2440-cpufreq.c
+++ b/drivers/cpufreq/s3c2440-cpufreq.c
@@ -26,12 +26,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-
-#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
-#define S3C2410_CLKDIVN	    S3C2410_CLKREG(0x14)
-#define S3C2440_CAMDIVN	    S3C2410_CLKREG(0x18)
-
 #define S3C2440_CLKDIVN_PDIVN	     (1<<0)
 #define S3C2440_CLKDIVN_HDIVN_MASK   (3<<1)
 #define S3C2440_CLKDIVN_HDIVN_1      (0<<1)
@@ -162,8 +156,8 @@ static void s3c2440_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
 	s3c_freq_dbg("%s: divisors: h=%d, p=%d\n", __func__,
 		     cfg->divs.h_divisor, cfg->divs.p_divisor);
 
-	clkdiv = __raw_readl(S3C2410_CLKDIVN);
-	camdiv = __raw_readl(S3C2440_CAMDIVN);
+	clkdiv = s3c24xx_read_clkdivn();
+	camdiv = s3c2440_read_camdivn();
 
 	clkdiv &= ~(S3C2440_CLKDIVN_HDIVN_MASK | S3C2440_CLKDIVN_PDIVN);
 	camdiv &= ~CAMDIVN_HCLK_HALF;
@@ -203,11 +197,11 @@ static void s3c2440_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
 	 * then make a short delay and remove the hclk halving if necessary.
 	 */
 
-	__raw_writel(camdiv | CAMDIVN_HCLK_HALF, S3C2440_CAMDIVN);
-	__raw_writel(clkdiv, S3C2410_CLKDIVN);
+	s3c2440_write_camdivn(camdiv | CAMDIVN_HCLK_HALF);
+	s3c24xx_write_clkdivn(clkdiv);
 
 	ndelay(20);
-	__raw_writel(camdiv, S3C2440_CAMDIVN);
+	s3c2440_write_camdivn(camdiv);
 
 	clk_set_parent(armclk, cfg->divs.dvs ? hclk : fclk);
 }
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
index 01b1823ea208..37efc0dc3f91 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq.c
@@ -27,12 +27,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-
 /* note, cpufreq support deals in kHz, no Hz */
-#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
-#define S3C2410_MPLLCON     S3C2410_CLKREG(0x04)
-
 static struct cpufreq_driver s3c24xx_driver;
 static struct s3c_cpufreq_config cpu_cur;
 static struct s3c_iotimings s3c24xx_iotiming;
@@ -69,7 +64,7 @@ static void s3c_cpufreq_getcur(struct s3c_cpufreq_config *cfg)
 	cfg->freq.pclk = pclk = clk_get_rate(clk_pclk);
 	cfg->freq.armclk = armclk = clk_get_rate(clk_arm);
 
-	cfg->pll.driver_data = __raw_readl(S3C2410_MPLLCON);
+	cfg->pll.driver_data = s3c24xx_read_mpllcon();
 	cfg->pll.frequency = fclk;
 
 	cfg->freq.hclk_tns = 1000000000 / (cfg->freq.hclk / 10);
@@ -387,7 +382,7 @@ static unsigned int suspend_freq;
 static int s3c_cpufreq_suspend(struct cpufreq_policy *policy)
 {
 	suspend_pll.frequency = clk_get_rate(_clk_mpll);
-	suspend_pll.driver_data = __raw_readl(S3C2410_MPLLCON);
+	suspend_pll.driver_data = s3c24xx_read_mpllcon();
 	suspend_freq = clk_get_rate(clk_arm);
 
 	return 0;
@@ -548,7 +543,7 @@ static void s3c_cpufreq_update_loctkime(void)
 	val |= calc_locktime(rate, cpu_cur.info->locktime_m);
 
 	pr_info("%s: new locktime is 0x%08x\n", __func__, val);
-	__raw_writel(val, S3C2410_LOCKTIME);
+	s3c24xx_write_locktime(val);
 }
 
 static int s3c_cpufreq_build_freq(void)
diff --git a/include/linux/soc/samsung/s3c-cpufreq-core.h b/include/linux/soc/samsung/s3c-cpufreq-core.h
index eca942559014..eaee883008a8 100644
--- a/include/linux/soc/samsung/s3c-cpufreq-core.h
+++ b/include/linux/soc/samsung/s3c-cpufreq-core.h
@@ -286,3 +286,10 @@ static inline int s3c_cpufreq_addfreq(struct cpufreq_frequency_table *table,
 
 	return index + 1;
 }
+
+u32 s3c2440_read_camdivn(void);
+void s3c2440_write_camdivn(u32 camdiv);
+u32 s3c24xx_read_clkdivn(void);
+void s3c24xx_write_clkdivn(u32 clkdiv);
+u32 s3c24xx_read_mpllcon(void);
+void s3c24xx_write_locktime(u32 locktime);
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 34/36] ARM: s3c: stop including mach/hardware.h from mach/io.h
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (32 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 33/36] ARM: s3c: move low-level clk reg access into platform code Arnd Bergmann
@ 2019-10-10 20:30   ` Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-10 21:02     ` Russell King - ARM Linux admin
  2019-10-15 14:52   ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Tomasz Figa
  34 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Andi Shyti, Mark Brown,
	Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-samsung-soc, Arnd Bergmann, linus.walleij, linux-usb,
	linux-kernel, linux-spi, linux-arm-kernel

A number of other files rely on mach/map.h to be indirectly
included from mach/io.h through mach/hardware.h.

Reduce this to the minimal plat/map-base.h and add explicit
includes everywhere else.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/common.c                          | 1 +
 arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h       | 2 ++
 arch/arm/mach-s3c24xx/include/mach/hardware.h           | 7 -------
 arch/arm/mach-s3c24xx/include/mach/io.h                 | 3 +--
 arch/arm/mach-s3c24xx/include/mach/regs-clock.h         | 2 ++
 arch/arm/mach-s3c24xx/include/mach/regs-gpio.h          | 2 ++
 arch/arm/mach-s3c24xx/include/mach/regs-irq.h           | 2 ++
 arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h | 1 +
 arch/arm/mach-s3c24xx/include/mach/s3c2412.h            | 2 ++
 arch/arm/mach-s3c24xx/mach-h1940.c                      | 1 +
 arch/arm/mach-s3c24xx/mach-jive.c                       | 1 +
 arch/arm/mach-s3c24xx/mach-rx1950.c                     | 1 +
 arch/arm/mach-s3c24xx/pm-h1940.S                        | 1 -
 arch/arm/mach-s3c24xx/regs-mem.h                        | 2 ++
 arch/arm/mach-s3c24xx/s3c2410.c                         | 2 +-
 arch/arm/mach-s3c24xx/s3c2412.c                         | 2 +-
 arch/arm/mach-s3c24xx/s3c2416.c                         | 2 +-
 arch/arm/mach-s3c24xx/s3c2443.c                         | 2 +-
 arch/arm/mach-s3c24xx/s3c244x.c                         | 2 +-
 arch/arm/mach-s3c24xx/sleep-s3c2410.S                   | 1 -
 arch/arm/mach-s3c24xx/sleep-s3c2412.S                   | 1 -
 arch/arm/mach-s3c24xx/sleep.S                           | 1 -
 drivers/spi/spi-s3c24xx-regs.h                          | 2 ++
 drivers/usb/gadget/udc/s3c2410_udc_regs.h               | 2 ++
 24 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index d16a164df6c4..42d828f48345 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -21,6 +21,7 @@
 #include <linux/dmaengine.h>
 
 #include <mach/hardware.h>
+#include <mach/map.h>
 #include <mach/regs-clock.h>
 #include <asm/irq.h>
 #include <asm/cacheflush.h>
diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h b/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
index 2ad22b2d459b..f8a114891f16 100644
--- a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
+++ b/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
@@ -14,6 +14,8 @@
 #ifndef GPIO_SAMSUNG_S3C24XX_H
 #define GPIO_SAMSUNG_S3C24XX_H
 
+#include <mach/map.h>
+
 /*
  * GPIO sizes for various SoCs:
  *
diff --git a/arch/arm/mach-s3c24xx/include/mach/hardware.h b/arch/arm/mach-s3c24xx/include/mach/hardware.h
index f28ac6c78d82..c732ea54984c 100644
--- a/arch/arm/mach-s3c24xx/include/mach/hardware.h
+++ b/arch/arm/mach-s3c24xx/include/mach/hardware.h
@@ -9,13 +9,6 @@
 #ifndef __ASM_ARCH_HARDWARE_H
 #define __ASM_ARCH_HARDWARE_H
 
-#ifndef __ASSEMBLY__
-
 extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg);
 
-#endif /* __ASSEMBLY__ */
-
-#include <linux/sizes.h>
-#include <mach/map.h>
-
 #endif /* __ASM_ARCH_HARDWARE_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/io.h b/arch/arm/mach-s3c24xx/include/mach/io.h
index 3e8bff26cdd5..bcddf615adb6 100644
--- a/arch/arm/mach-s3c24xx/include/mach/io.h
+++ b/arch/arm/mach-s3c24xx/include/mach/io.h
@@ -10,8 +10,7 @@
 #ifndef __ASM_ARM_ARCH_IO_H
 #define __ASM_ARM_ARCH_IO_H
 
-#include <mach/hardware.h>
-
+#include <plat/map-base.h>
 
 /*
  * ISA style IO, for each machine to sort out mappings for,
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
index 7ca3dd4f13c0..da4e7b3aeba6 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
@@ -9,6 +9,8 @@
 #ifndef __ASM_ARM_REGS_CLOCK
 #define __ASM_ARM_REGS_CLOCK
 
+#include <mach/map.h>
+
 #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
 
 #define S3C2410_PLLVAL(_m,_p,_s) ((_m) << 12 | ((_p) << 4) | ((_s)))
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
index 594e967c0673..51827d5577b6 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
@@ -10,6 +10,8 @@
 #ifndef __ASM_ARCH_REGS_GPIO_H
 #define __ASM_ARCH_REGS_GPIO_H
 
+#include <plat/map-s3c.h>
+
 #define S3C24XX_MISCCR		S3C24XX_GPIOREG2(0x80)
 
 /* general configuration options */
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-irq.h b/arch/arm/mach-s3c24xx/include/mach/regs-irq.h
index 8d8e669e3903..2921b48c56b2 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-irq.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-irq.h
@@ -8,6 +8,8 @@
 #ifndef ___ASM_ARCH_REGS_IRQ_H
 #define ___ASM_ARCH_REGS_IRQ_H
 
+#include <plat/map-s3c.h>
+
 /* interrupt controller */
 
 #define S3C2410_IRQREG(x)   ((x) + S3C24XX_VA_IRQ)
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
index 682759549e63..fefef7233f4b 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
@@ -11,6 +11,7 @@
 #define __ASM_ARM_REGS_S3C2443_CLOCK
 
 #include <linux/delay.h>
+#include <plat/map-s3c.h>
 
 #define S3C2443_CLKREG(x)		((x) + S3C24XX_VA_CLKPWR)
 
diff --git a/arch/arm/mach-s3c24xx/include/mach/s3c2412.h b/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
index 4ff83f956cfb..1ae369c81beb 100644
--- a/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
+++ b/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
@@ -8,6 +8,8 @@
 #ifndef __ARCH_ARM_MACH_S3C24XX_S3C2412_H
 #define __ARCH_ARM_MACH_S3C24XX_S3C2412_H __FILE__
 
+#include <plat/map-s3c.h>
+
 #define S3C2412_MEMREG(x)		(S3C24XX_VA_MEMCTRL + (x))
 #define S3C2412_EBIREG(x)		(S3C2412_VA_EBI + (x))
 
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index d56e3befa459..287e42fc1665 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -48,6 +48,7 @@
 #include <sound/uda1380.h>
 
 #include <linux/platform_data/fb-s3c2410.h>
+#include <mach/map.h>
 #include <mach/hardware.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
index 3b33132b2334..8012c34bddd9 100644
--- a/arch/arm/mach-s3c24xx/mach-jive.c
+++ b/arch/arm/mach-s3c24xx/mach-jive.c
@@ -31,6 +31,7 @@
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
+#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <linux/platform_data/fb-s3c2410.h>
 #include <mach/gpio-samsung.h>
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index ee4a0992339f..f94884090fbe 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -46,6 +46,7 @@
 
 #include <sound/uda1380.h>
 
+#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
diff --git a/arch/arm/mach-s3c24xx/pm-h1940.S b/arch/arm/mach-s3c24xx/pm-h1940.S
index a7bbe336ac6b..f9ee515e1cbe 100644
--- a/arch/arm/mach-s3c24xx/pm-h1940.S
+++ b/arch/arm/mach-s3c24xx/pm-h1940.S
@@ -7,7 +7,6 @@
 
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <mach/regs-gpio.h>
diff --git a/arch/arm/mach-s3c24xx/regs-mem.h b/arch/arm/mach-s3c24xx/regs-mem.h
index 2f3bc48b5890..5048ab8f06c2 100644
--- a/arch/arm/mach-s3c24xx/regs-mem.h
+++ b/arch/arm/mach-s3c24xx/regs-mem.h
@@ -9,6 +9,8 @@
 #ifndef __ARCH_ARM_MACH_S3C24XX_REGS_MEM_H
 #define __ARCH_ARM_MACH_S3C24XX_REGS_MEM_H __FILE__
 
+#include <plat/map-s3c.h>
+
 #define S3C2410_MEMREG(x)		(S3C24XX_VA_MEMCTRL + (x))
 
 #define S3C2410_BWSCON			S3C2410_MEMREG(0x00)
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c
index 8427c150dd22..44bf3e1e77f1 100644
--- a/arch/arm/mach-s3c24xx/s3c2410.c
+++ b/arch/arm/mach-s3c24xx/s3c2410.c
@@ -25,7 +25,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
+#include <mach/map.h>
 #include <mach/gpio-samsung.h>
 #include <asm/irq.h>
 #include <asm/system_misc.h>
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index 209f952a6c98..75648dcc2c1d 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -29,7 +29,7 @@
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
-#include <mach/hardware.h>
+#include <mach/map.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c
index 1cdb7bd3e713..ef2eace605e6 100644
--- a/arch/arm/mach-s3c24xx/s3c2416.c
+++ b/arch/arm/mach-s3c24xx/s3c2416.c
@@ -26,7 +26,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
+#include <mach/map.h>
 #include <mach/gpio-samsung.h>
 #include <asm/proc-fns.h>
 #include <asm/irq.h>
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
index f404ecac4baf..00318ad994ff 100644
--- a/arch/arm/mach-s3c24xx/s3c2443.c
+++ b/arch/arm/mach-s3c24xx/s3c2443.c
@@ -23,7 +23,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
+#include <mach/map.h>
 #include <mach/gpio-samsung.h>
 #include <mach/irqs.h>
 #include <asm/irq.h>
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index f5bd489bac85..0ca188d0ffe5 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -25,7 +25,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
+#include <mach/map.h>
 #include <asm/irq.h>
 
 #include <mach/regs-clock.h>
diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2410.S b/arch/arm/mach-s3c24xx/sleep-s3c2410.S
index 659f9eff9de2..e4f6f64e7826 100644
--- a/arch/arm/mach-s3c24xx/sleep-s3c2410.S
+++ b/arch/arm/mach-s3c24xx/sleep-s3c2410.S
@@ -13,7 +13,6 @@
 #include <linux/linkage.h>
 #include <linux/serial_s3c.h>
 #include <asm/assembler.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <mach/regs-gpio.h>
diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2412.S b/arch/arm/mach-s3c24xx/sleep-s3c2412.S
index c373f1ca862b..434f5082b2ed 100644
--- a/arch/arm/mach-s3c24xx/sleep-s3c2412.S
+++ b/arch/arm/mach-s3c24xx/sleep-s3c2412.S
@@ -8,7 +8,6 @@
 
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <mach/regs-irq.h>
diff --git a/arch/arm/mach-s3c24xx/sleep.S b/arch/arm/mach-s3c24xx/sleep.S
index f0f11ad60c52..4bda4a413584 100644
--- a/arch/arm/mach-s3c24xx/sleep.S
+++ b/arch/arm/mach-s3c24xx/sleep.S
@@ -13,7 +13,6 @@
 #include <linux/linkage.h>
 #include <linux/serial_s3c.h>
 #include <asm/assembler.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <mach/regs-gpio.h>
diff --git a/drivers/spi/spi-s3c24xx-regs.h b/drivers/spi/spi-s3c24xx-regs.h
index 37b93ff7c7fe..b76d591eba8c 100644
--- a/drivers/spi/spi-s3c24xx-regs.h
+++ b/drivers/spi/spi-s3c24xx-regs.h
@@ -8,6 +8,8 @@
 #ifndef __ASM_ARCH_REGS_SPI_H
 #define __ASM_ARCH_REGS_SPI_H
 
+#include <mach/map.h>
+
 #define S3C2410_SPCON		(0x00)
 
 #define S3C2410_SPCON_SMOD_DMA	(2 << 5)	/* DMA mode */
diff --git a/drivers/usb/gadget/udc/s3c2410_udc_regs.h b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
index d8d2eeaca088..4df279342cdd 100644
--- a/drivers/usb/gadget/udc/s3c2410_udc_regs.h
+++ b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
@@ -6,6 +6,8 @@
 #ifndef __ASM_ARCH_REGS_UDC_H
 #define __ASM_ARCH_REGS_UDC_H
 
+#include <mach/map.h>
+
 #define S3C2410_USBDREG(x) (x)
 
 #define S3C2410_UDC_FUNC_ADDR_REG	S3C2410_USBDREG(0x0140)
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 34/36] ARM: s3c: stop including mach/hardware.h from mach/io.h
  2019-10-10 20:30   ` [PATCH 34/36] ARM: s3c: stop including mach/hardware.h from mach/io.h Arnd Bergmann
@ 2019-10-10 20:30     ` Arnd Bergmann
  2019-10-10 21:02     ` Russell King - ARM Linux admin
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 20:30 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Andi Shyti, Mark Brown,
	Felipe Balbi, Greg Kroah-Hartman
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Arnd Bergmann, linux-kernel, linux-spi, linux-usb

A number of other files rely on mach/map.h to be indirectly
included from mach/io.h through mach/hardware.h.

Reduce this to the minimal plat/map-base.h and add explicit
includes everywhere else.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/common.c                          | 1 +
 arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h       | 2 ++
 arch/arm/mach-s3c24xx/include/mach/hardware.h           | 7 -------
 arch/arm/mach-s3c24xx/include/mach/io.h                 | 3 +--
 arch/arm/mach-s3c24xx/include/mach/regs-clock.h         | 2 ++
 arch/arm/mach-s3c24xx/include/mach/regs-gpio.h          | 2 ++
 arch/arm/mach-s3c24xx/include/mach/regs-irq.h           | 2 ++
 arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h | 1 +
 arch/arm/mach-s3c24xx/include/mach/s3c2412.h            | 2 ++
 arch/arm/mach-s3c24xx/mach-h1940.c                      | 1 +
 arch/arm/mach-s3c24xx/mach-jive.c                       | 1 +
 arch/arm/mach-s3c24xx/mach-rx1950.c                     | 1 +
 arch/arm/mach-s3c24xx/pm-h1940.S                        | 1 -
 arch/arm/mach-s3c24xx/regs-mem.h                        | 2 ++
 arch/arm/mach-s3c24xx/s3c2410.c                         | 2 +-
 arch/arm/mach-s3c24xx/s3c2412.c                         | 2 +-
 arch/arm/mach-s3c24xx/s3c2416.c                         | 2 +-
 arch/arm/mach-s3c24xx/s3c2443.c                         | 2 +-
 arch/arm/mach-s3c24xx/s3c244x.c                         | 2 +-
 arch/arm/mach-s3c24xx/sleep-s3c2410.S                   | 1 -
 arch/arm/mach-s3c24xx/sleep-s3c2412.S                   | 1 -
 arch/arm/mach-s3c24xx/sleep.S                           | 1 -
 drivers/spi/spi-s3c24xx-regs.h                          | 2 ++
 drivers/usb/gadget/udc/s3c2410_udc_regs.h               | 2 ++
 24 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index d16a164df6c4..42d828f48345 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -21,6 +21,7 @@
 #include <linux/dmaengine.h>
 
 #include <mach/hardware.h>
+#include <mach/map.h>
 #include <mach/regs-clock.h>
 #include <asm/irq.h>
 #include <asm/cacheflush.h>
diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h b/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
index 2ad22b2d459b..f8a114891f16 100644
--- a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
+++ b/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
@@ -14,6 +14,8 @@
 #ifndef GPIO_SAMSUNG_S3C24XX_H
 #define GPIO_SAMSUNG_S3C24XX_H
 
+#include <mach/map.h>
+
 /*
  * GPIO sizes for various SoCs:
  *
diff --git a/arch/arm/mach-s3c24xx/include/mach/hardware.h b/arch/arm/mach-s3c24xx/include/mach/hardware.h
index f28ac6c78d82..c732ea54984c 100644
--- a/arch/arm/mach-s3c24xx/include/mach/hardware.h
+++ b/arch/arm/mach-s3c24xx/include/mach/hardware.h
@@ -9,13 +9,6 @@
 #ifndef __ASM_ARCH_HARDWARE_H
 #define __ASM_ARCH_HARDWARE_H
 
-#ifndef __ASSEMBLY__
-
 extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg);
 
-#endif /* __ASSEMBLY__ */
-
-#include <linux/sizes.h>
-#include <mach/map.h>
-
 #endif /* __ASM_ARCH_HARDWARE_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/io.h b/arch/arm/mach-s3c24xx/include/mach/io.h
index 3e8bff26cdd5..bcddf615adb6 100644
--- a/arch/arm/mach-s3c24xx/include/mach/io.h
+++ b/arch/arm/mach-s3c24xx/include/mach/io.h
@@ -10,8 +10,7 @@
 #ifndef __ASM_ARM_ARCH_IO_H
 #define __ASM_ARM_ARCH_IO_H
 
-#include <mach/hardware.h>
-
+#include <plat/map-base.h>
 
 /*
  * ISA style IO, for each machine to sort out mappings for,
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
index 7ca3dd4f13c0..da4e7b3aeba6 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
@@ -9,6 +9,8 @@
 #ifndef __ASM_ARM_REGS_CLOCK
 #define __ASM_ARM_REGS_CLOCK
 
+#include <mach/map.h>
+
 #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
 
 #define S3C2410_PLLVAL(_m,_p,_s) ((_m) << 12 | ((_p) << 4) | ((_s)))
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
index 594e967c0673..51827d5577b6 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
@@ -10,6 +10,8 @@
 #ifndef __ASM_ARCH_REGS_GPIO_H
 #define __ASM_ARCH_REGS_GPIO_H
 
+#include <plat/map-s3c.h>
+
 #define S3C24XX_MISCCR		S3C24XX_GPIOREG2(0x80)
 
 /* general configuration options */
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-irq.h b/arch/arm/mach-s3c24xx/include/mach/regs-irq.h
index 8d8e669e3903..2921b48c56b2 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-irq.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-irq.h
@@ -8,6 +8,8 @@
 #ifndef ___ASM_ARCH_REGS_IRQ_H
 #define ___ASM_ARCH_REGS_IRQ_H
 
+#include <plat/map-s3c.h>
+
 /* interrupt controller */
 
 #define S3C2410_IRQREG(x)   ((x) + S3C24XX_VA_IRQ)
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
index 682759549e63..fefef7233f4b 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
@@ -11,6 +11,7 @@
 #define __ASM_ARM_REGS_S3C2443_CLOCK
 
 #include <linux/delay.h>
+#include <plat/map-s3c.h>
 
 #define S3C2443_CLKREG(x)		((x) + S3C24XX_VA_CLKPWR)
 
diff --git a/arch/arm/mach-s3c24xx/include/mach/s3c2412.h b/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
index 4ff83f956cfb..1ae369c81beb 100644
--- a/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
+++ b/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
@@ -8,6 +8,8 @@
 #ifndef __ARCH_ARM_MACH_S3C24XX_S3C2412_H
 #define __ARCH_ARM_MACH_S3C24XX_S3C2412_H __FILE__
 
+#include <plat/map-s3c.h>
+
 #define S3C2412_MEMREG(x)		(S3C24XX_VA_MEMCTRL + (x))
 #define S3C2412_EBIREG(x)		(S3C2412_VA_EBI + (x))
 
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index d56e3befa459..287e42fc1665 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -48,6 +48,7 @@
 #include <sound/uda1380.h>
 
 #include <linux/platform_data/fb-s3c2410.h>
+#include <mach/map.h>
 #include <mach/hardware.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
index 3b33132b2334..8012c34bddd9 100644
--- a/arch/arm/mach-s3c24xx/mach-jive.c
+++ b/arch/arm/mach-s3c24xx/mach-jive.c
@@ -31,6 +31,7 @@
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
+#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <linux/platform_data/fb-s3c2410.h>
 #include <mach/gpio-samsung.h>
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index ee4a0992339f..f94884090fbe 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -46,6 +46,7 @@
 
 #include <sound/uda1380.h>
 
+#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
diff --git a/arch/arm/mach-s3c24xx/pm-h1940.S b/arch/arm/mach-s3c24xx/pm-h1940.S
index a7bbe336ac6b..f9ee515e1cbe 100644
--- a/arch/arm/mach-s3c24xx/pm-h1940.S
+++ b/arch/arm/mach-s3c24xx/pm-h1940.S
@@ -7,7 +7,6 @@
 
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <mach/regs-gpio.h>
diff --git a/arch/arm/mach-s3c24xx/regs-mem.h b/arch/arm/mach-s3c24xx/regs-mem.h
index 2f3bc48b5890..5048ab8f06c2 100644
--- a/arch/arm/mach-s3c24xx/regs-mem.h
+++ b/arch/arm/mach-s3c24xx/regs-mem.h
@@ -9,6 +9,8 @@
 #ifndef __ARCH_ARM_MACH_S3C24XX_REGS_MEM_H
 #define __ARCH_ARM_MACH_S3C24XX_REGS_MEM_H __FILE__
 
+#include <plat/map-s3c.h>
+
 #define S3C2410_MEMREG(x)		(S3C24XX_VA_MEMCTRL + (x))
 
 #define S3C2410_BWSCON			S3C2410_MEMREG(0x00)
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c
index 8427c150dd22..44bf3e1e77f1 100644
--- a/arch/arm/mach-s3c24xx/s3c2410.c
+++ b/arch/arm/mach-s3c24xx/s3c2410.c
@@ -25,7 +25,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
+#include <mach/map.h>
 #include <mach/gpio-samsung.h>
 #include <asm/irq.h>
 #include <asm/system_misc.h>
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index 209f952a6c98..75648dcc2c1d 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -29,7 +29,7 @@
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
-#include <mach/hardware.h>
+#include <mach/map.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c
index 1cdb7bd3e713..ef2eace605e6 100644
--- a/arch/arm/mach-s3c24xx/s3c2416.c
+++ b/arch/arm/mach-s3c24xx/s3c2416.c
@@ -26,7 +26,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
+#include <mach/map.h>
 #include <mach/gpio-samsung.h>
 #include <asm/proc-fns.h>
 #include <asm/irq.h>
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
index f404ecac4baf..00318ad994ff 100644
--- a/arch/arm/mach-s3c24xx/s3c2443.c
+++ b/arch/arm/mach-s3c24xx/s3c2443.c
@@ -23,7 +23,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
+#include <mach/map.h>
 #include <mach/gpio-samsung.h>
 #include <mach/irqs.h>
 #include <asm/irq.h>
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index f5bd489bac85..0ca188d0ffe5 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -25,7 +25,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
+#include <mach/map.h>
 #include <asm/irq.h>
 
 #include <mach/regs-clock.h>
diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2410.S b/arch/arm/mach-s3c24xx/sleep-s3c2410.S
index 659f9eff9de2..e4f6f64e7826 100644
--- a/arch/arm/mach-s3c24xx/sleep-s3c2410.S
+++ b/arch/arm/mach-s3c24xx/sleep-s3c2410.S
@@ -13,7 +13,6 @@
 #include <linux/linkage.h>
 #include <linux/serial_s3c.h>
 #include <asm/assembler.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <mach/regs-gpio.h>
diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2412.S b/arch/arm/mach-s3c24xx/sleep-s3c2412.S
index c373f1ca862b..434f5082b2ed 100644
--- a/arch/arm/mach-s3c24xx/sleep-s3c2412.S
+++ b/arch/arm/mach-s3c24xx/sleep-s3c2412.S
@@ -8,7 +8,6 @@
 
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <mach/regs-irq.h>
diff --git a/arch/arm/mach-s3c24xx/sleep.S b/arch/arm/mach-s3c24xx/sleep.S
index f0f11ad60c52..4bda4a413584 100644
--- a/arch/arm/mach-s3c24xx/sleep.S
+++ b/arch/arm/mach-s3c24xx/sleep.S
@@ -13,7 +13,6 @@
 #include <linux/linkage.h>
 #include <linux/serial_s3c.h>
 #include <asm/assembler.h>
-#include <mach/hardware.h>
 #include <mach/map.h>
 
 #include <mach/regs-gpio.h>
diff --git a/drivers/spi/spi-s3c24xx-regs.h b/drivers/spi/spi-s3c24xx-regs.h
index 37b93ff7c7fe..b76d591eba8c 100644
--- a/drivers/spi/spi-s3c24xx-regs.h
+++ b/drivers/spi/spi-s3c24xx-regs.h
@@ -8,6 +8,8 @@
 #ifndef __ASM_ARCH_REGS_SPI_H
 #define __ASM_ARCH_REGS_SPI_H
 
+#include <mach/map.h>
+
 #define S3C2410_SPCON		(0x00)
 
 #define S3C2410_SPCON_SMOD_DMA	(2 << 5)	/* DMA mode */
diff --git a/drivers/usb/gadget/udc/s3c2410_udc_regs.h b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
index d8d2eeaca088..4df279342cdd 100644
--- a/drivers/usb/gadget/udc/s3c2410_udc_regs.h
+++ b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
@@ -6,6 +6,8 @@
 #ifndef __ASM_ARCH_REGS_UDC_H
 #define __ASM_ARCH_REGS_UDC_H
 
+#include <mach/map.h>
+
 #define S3C2410_USBDREG(x) (x)
 
 #define S3C2410_UDC_FUNC_ADDR_REG	S3C2410_USBDREG(0x0140)
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* Re: [PATCH 34/36] ARM: s3c: stop including mach/hardware.h from mach/io.h
  2019-10-10 20:30   ` [PATCH 34/36] ARM: s3c: stop including mach/hardware.h from mach/io.h Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
@ 2019-10-10 21:02     ` Russell King - ARM Linux admin
  2019-10-10 21:02       ` Russell King - ARM Linux admin
  2019-10-10 21:53       ` Arnd Bergmann
  1 sibling, 2 replies; 135+ messages in thread
From: Russell King - ARM Linux admin @ 2019-10-10 21:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, Andi Shyti, Mark Brown,
	Felipe Balbi, Greg Kroah-Hartman, linux-samsung-soc,
	linus.walleij, linux-usb, linux-kernel, linux-spi,
	linux-arm-kernel

On Thu, Oct 10, 2019 at 10:30:18PM +0200, Arnd Bergmann wrote:
> A number of other files rely on mach/map.h to be indirectly
> included from mach/io.h through mach/hardware.h.
> 
> Reduce this to the minimal plat/map-base.h and add explicit
> includes everywhere else.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s3c24xx/common.c                          | 1 +
>  arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h       | 2 ++
>  arch/arm/mach-s3c24xx/include/mach/hardware.h           | 7 -------
>  arch/arm/mach-s3c24xx/include/mach/io.h                 | 3 +--
>  arch/arm/mach-s3c24xx/include/mach/regs-clock.h         | 2 ++
>  arch/arm/mach-s3c24xx/include/mach/regs-gpio.h          | 2 ++
>  arch/arm/mach-s3c24xx/include/mach/regs-irq.h           | 2 ++
>  arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h | 1 +
>  arch/arm/mach-s3c24xx/include/mach/s3c2412.h            | 2 ++
>  arch/arm/mach-s3c24xx/mach-h1940.c                      | 1 +
>  arch/arm/mach-s3c24xx/mach-jive.c                       | 1 +
>  arch/arm/mach-s3c24xx/mach-rx1950.c                     | 1 +
>  arch/arm/mach-s3c24xx/pm-h1940.S                        | 1 -
>  arch/arm/mach-s3c24xx/regs-mem.h                        | 2 ++
>  arch/arm/mach-s3c24xx/s3c2410.c                         | 2 +-
>  arch/arm/mach-s3c24xx/s3c2412.c                         | 2 +-
>  arch/arm/mach-s3c24xx/s3c2416.c                         | 2 +-
>  arch/arm/mach-s3c24xx/s3c2443.c                         | 2 +-
>  arch/arm/mach-s3c24xx/s3c244x.c                         | 2 +-
>  arch/arm/mach-s3c24xx/sleep-s3c2410.S                   | 1 -
>  arch/arm/mach-s3c24xx/sleep-s3c2412.S                   | 1 -
>  arch/arm/mach-s3c24xx/sleep.S                           | 1 -
>  drivers/spi/spi-s3c24xx-regs.h                          | 2 ++
>  drivers/usb/gadget/udc/s3c2410_udc_regs.h               | 2 ++
>  24 files changed, 27 insertions(+), 18 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
> index d16a164df6c4..42d828f48345 100644
> --- a/arch/arm/mach-s3c24xx/common.c
> +++ b/arch/arm/mach-s3c24xx/common.c
> @@ -21,6 +21,7 @@
>  #include <linux/dmaengine.h>
>  
>  #include <mach/hardware.h>
> +#include <mach/map.h>
>  #include <mach/regs-clock.h>
>  #include <asm/irq.h>
>  #include <asm/cacheflush.h>
> diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h b/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
> index 2ad22b2d459b..f8a114891f16 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
> @@ -14,6 +14,8 @@
>  #ifndef GPIO_SAMSUNG_S3C24XX_H
>  #define GPIO_SAMSUNG_S3C24XX_H
>  
> +#include <mach/map.h>
> +

Why?  Nothing in this file uses anything from mach/map.h

>  /*
>   * GPIO sizes for various SoCs:
>   *
> diff --git a/arch/arm/mach-s3c24xx/include/mach/hardware.h b/arch/arm/mach-s3c24xx/include/mach/hardware.h
> index f28ac6c78d82..c732ea54984c 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/hardware.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/hardware.h
> @@ -9,13 +9,6 @@
>  #ifndef __ASM_ARCH_HARDWARE_H
>  #define __ASM_ARCH_HARDWARE_H
>  
> -#ifndef __ASSEMBLY__
> -
>  extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg);
>  
> -#endif /* __ASSEMBLY__ */
> -
> -#include <linux/sizes.h>
> -#include <mach/map.h>
> -
>  #endif /* __ASM_ARCH_HARDWARE_H */
> diff --git a/arch/arm/mach-s3c24xx/include/mach/io.h b/arch/arm/mach-s3c24xx/include/mach/io.h
> index 3e8bff26cdd5..bcddf615adb6 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/io.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/io.h
> @@ -10,8 +10,7 @@
>  #ifndef __ASM_ARM_ARCH_IO_H
>  #define __ASM_ARM_ARCH_IO_H
>  
> -#include <mach/hardware.h>
> -
> +#include <plat/map-base.h>
>  
>  /*
>   * ISA style IO, for each machine to sort out mappings for,
> diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
> index 7ca3dd4f13c0..da4e7b3aeba6 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
> @@ -9,6 +9,8 @@
>  #ifndef __ASM_ARM_REGS_CLOCK
>  #define __ASM_ARM_REGS_CLOCK
>  
> +#include <mach/map.h>
> +

Why?  Nothing in this file uses anything from mach/map.h

>  #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
>  
>  #define S3C2410_PLLVAL(_m,_p,_s) ((_m) << 12 | ((_p) << 4) | ((_s)))
> diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
> index 594e967c0673..51827d5577b6 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
> @@ -10,6 +10,8 @@
>  #ifndef __ASM_ARCH_REGS_GPIO_H
>  #define __ASM_ARCH_REGS_GPIO_H
>  
> +#include <plat/map-s3c.h>
> +
>  #define S3C24XX_MISCCR		S3C24XX_GPIOREG2(0x80)
>  
>  /* general configuration options */
> diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-irq.h b/arch/arm/mach-s3c24xx/include/mach/regs-irq.h
> index 8d8e669e3903..2921b48c56b2 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/regs-irq.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/regs-irq.h
> @@ -8,6 +8,8 @@
>  #ifndef ___ASM_ARCH_REGS_IRQ_H
>  #define ___ASM_ARCH_REGS_IRQ_H
>  
> +#include <plat/map-s3c.h>
> +
>  /* interrupt controller */
>  
>  #define S3C2410_IRQREG(x)   ((x) + S3C24XX_VA_IRQ)
> diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
> index 682759549e63..fefef7233f4b 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
> @@ -11,6 +11,7 @@
>  #define __ASM_ARM_REGS_S3C2443_CLOCK
>  
>  #include <linux/delay.h>
> +#include <plat/map-s3c.h>
>  
>  #define S3C2443_CLKREG(x)		((x) + S3C24XX_VA_CLKPWR)
>  
> diff --git a/arch/arm/mach-s3c24xx/include/mach/s3c2412.h b/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
> index 4ff83f956cfb..1ae369c81beb 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
> @@ -8,6 +8,8 @@
>  #ifndef __ARCH_ARM_MACH_S3C24XX_S3C2412_H
>  #define __ARCH_ARM_MACH_S3C24XX_S3C2412_H __FILE__
>  
> +#include <plat/map-s3c.h>
> +
>  #define S3C2412_MEMREG(x)		(S3C24XX_VA_MEMCTRL + (x))
>  #define S3C2412_EBIREG(x)		(S3C2412_VA_EBI + (x))
>  
> diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
> index d56e3befa459..287e42fc1665 100644
> --- a/arch/arm/mach-s3c24xx/mach-h1940.c
> +++ b/arch/arm/mach-s3c24xx/mach-h1940.c
> @@ -48,6 +48,7 @@
>  #include <sound/uda1380.h>
>  
>  #include <linux/platform_data/fb-s3c2410.h>
> +#include <mach/map.h>
>  #include <mach/hardware.h>
>  #include <mach/regs-clock.h>
>  #include <mach/regs-gpio.h>
> diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
> index 3b33132b2334..8012c34bddd9 100644
> --- a/arch/arm/mach-s3c24xx/mach-jive.c
> +++ b/arch/arm/mach-s3c24xx/mach-jive.c
> @@ -31,6 +31,7 @@
>  #include <linux/platform_data/mtd-nand-s3c2410.h>
>  #include <linux/platform_data/i2c-s3c2410.h>
>  
> +#include <mach/hardware.h>
>  #include <mach/regs-gpio.h>
>  #include <linux/platform_data/fb-s3c2410.h>
>  #include <mach/gpio-samsung.h>
> diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
> index ee4a0992339f..f94884090fbe 100644
> --- a/arch/arm/mach-s3c24xx/mach-rx1950.c
> +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
> @@ -46,6 +46,7 @@
>  
>  #include <sound/uda1380.h>
>  
> +#include <mach/hardware.h>
>  #include <mach/regs-gpio.h>
>  #include <mach/gpio-samsung.h>
>  
> diff --git a/arch/arm/mach-s3c24xx/pm-h1940.S b/arch/arm/mach-s3c24xx/pm-h1940.S
> index a7bbe336ac6b..f9ee515e1cbe 100644
> --- a/arch/arm/mach-s3c24xx/pm-h1940.S
> +++ b/arch/arm/mach-s3c24xx/pm-h1940.S
> @@ -7,7 +7,6 @@
>  
>  #include <linux/linkage.h>
>  #include <asm/assembler.h>
> -#include <mach/hardware.h>
>  #include <mach/map.h>
>  
>  #include <mach/regs-gpio.h>
> diff --git a/arch/arm/mach-s3c24xx/regs-mem.h b/arch/arm/mach-s3c24xx/regs-mem.h
> index 2f3bc48b5890..5048ab8f06c2 100644
> --- a/arch/arm/mach-s3c24xx/regs-mem.h
> +++ b/arch/arm/mach-s3c24xx/regs-mem.h
> @@ -9,6 +9,8 @@
>  #ifndef __ARCH_ARM_MACH_S3C24XX_REGS_MEM_H
>  #define __ARCH_ARM_MACH_S3C24XX_REGS_MEM_H __FILE__
>  
> +#include <plat/map-s3c.h>
> +
>  #define S3C2410_MEMREG(x)		(S3C24XX_VA_MEMCTRL + (x))
>  
>  #define S3C2410_BWSCON			S3C2410_MEMREG(0x00)
> diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c
> index 8427c150dd22..44bf3e1e77f1 100644
> --- a/arch/arm/mach-s3c24xx/s3c2410.c
> +++ b/arch/arm/mach-s3c24xx/s3c2410.c
> @@ -25,7 +25,7 @@
>  #include <asm/mach/map.h>
>  #include <asm/mach/irq.h>
>  
> -#include <mach/hardware.h>
> +#include <mach/map.h>
>  #include <mach/gpio-samsung.h>
>  #include <asm/irq.h>
>  #include <asm/system_misc.h>
> diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
> index 209f952a6c98..75648dcc2c1d 100644
> --- a/arch/arm/mach-s3c24xx/s3c2412.c
> +++ b/arch/arm/mach-s3c24xx/s3c2412.c
> @@ -29,7 +29,7 @@
>  #include <asm/irq.h>
>  #include <asm/system_misc.h>
>  
> -#include <mach/hardware.h>
> +#include <mach/map.h>
>  #include <mach/regs-clock.h>
>  #include <mach/regs-gpio.h>
>  
> diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c
> index 1cdb7bd3e713..ef2eace605e6 100644
> --- a/arch/arm/mach-s3c24xx/s3c2416.c
> +++ b/arch/arm/mach-s3c24xx/s3c2416.c
> @@ -26,7 +26,7 @@
>  #include <asm/mach/map.h>
>  #include <asm/mach/irq.h>
>  
> -#include <mach/hardware.h>
> +#include <mach/map.h>
>  #include <mach/gpio-samsung.h>
>  #include <asm/proc-fns.h>
>  #include <asm/irq.h>
> diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
> index f404ecac4baf..00318ad994ff 100644
> --- a/arch/arm/mach-s3c24xx/s3c2443.c
> +++ b/arch/arm/mach-s3c24xx/s3c2443.c
> @@ -23,7 +23,7 @@
>  #include <asm/mach/map.h>
>  #include <asm/mach/irq.h>
>  
> -#include <mach/hardware.h>
> +#include <mach/map.h>
>  #include <mach/gpio-samsung.h>
>  #include <mach/irqs.h>
>  #include <asm/irq.h>
> diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
> index f5bd489bac85..0ca188d0ffe5 100644
> --- a/arch/arm/mach-s3c24xx/s3c244x.c
> +++ b/arch/arm/mach-s3c24xx/s3c244x.c
> @@ -25,7 +25,7 @@
>  #include <asm/mach/map.h>
>  #include <asm/mach/irq.h>
>  
> -#include <mach/hardware.h>
> +#include <mach/map.h>
>  #include <asm/irq.h>
>  
>  #include <mach/regs-clock.h>
> diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2410.S b/arch/arm/mach-s3c24xx/sleep-s3c2410.S
> index 659f9eff9de2..e4f6f64e7826 100644
> --- a/arch/arm/mach-s3c24xx/sleep-s3c2410.S
> +++ b/arch/arm/mach-s3c24xx/sleep-s3c2410.S
> @@ -13,7 +13,6 @@
>  #include <linux/linkage.h>
>  #include <linux/serial_s3c.h>
>  #include <asm/assembler.h>
> -#include <mach/hardware.h>
>  #include <mach/map.h>
>  
>  #include <mach/regs-gpio.h>
> diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2412.S b/arch/arm/mach-s3c24xx/sleep-s3c2412.S
> index c373f1ca862b..434f5082b2ed 100644
> --- a/arch/arm/mach-s3c24xx/sleep-s3c2412.S
> +++ b/arch/arm/mach-s3c24xx/sleep-s3c2412.S
> @@ -8,7 +8,6 @@
>  
>  #include <linux/linkage.h>
>  #include <asm/assembler.h>
> -#include <mach/hardware.h>
>  #include <mach/map.h>
>  
>  #include <mach/regs-irq.h>
> diff --git a/arch/arm/mach-s3c24xx/sleep.S b/arch/arm/mach-s3c24xx/sleep.S
> index f0f11ad60c52..4bda4a413584 100644
> --- a/arch/arm/mach-s3c24xx/sleep.S
> +++ b/arch/arm/mach-s3c24xx/sleep.S
> @@ -13,7 +13,6 @@
>  #include <linux/linkage.h>
>  #include <linux/serial_s3c.h>
>  #include <asm/assembler.h>
> -#include <mach/hardware.h>
>  #include <mach/map.h>
>  
>  #include <mach/regs-gpio.h>
> diff --git a/drivers/spi/spi-s3c24xx-regs.h b/drivers/spi/spi-s3c24xx-regs.h
> index 37b93ff7c7fe..b76d591eba8c 100644
> --- a/drivers/spi/spi-s3c24xx-regs.h
> +++ b/drivers/spi/spi-s3c24xx-regs.h
> @@ -8,6 +8,8 @@
>  #ifndef __ASM_ARCH_REGS_SPI_H
>  #define __ASM_ARCH_REGS_SPI_H
>  
> +#include <mach/map.h>
> +

If this is outside of arch/arm, it shouldn't need anything from
mach/map.h - mach/map.h is not for driver use.

>  #define S3C2410_SPCON		(0x00)
>  
>  #define S3C2410_SPCON_SMOD_DMA	(2 << 5)	/* DMA mode */
> diff --git a/drivers/usb/gadget/udc/s3c2410_udc_regs.h b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
> index d8d2eeaca088..4df279342cdd 100644
> --- a/drivers/usb/gadget/udc/s3c2410_udc_regs.h
> +++ b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
> @@ -6,6 +6,8 @@
>  #ifndef __ASM_ARCH_REGS_UDC_H
>  #define __ASM_ARCH_REGS_UDC_H
>  
> +#include <mach/map.h>
> +

If this is outside of arch/arm, it shouldn't need anything from
mach/map.h - mach/map.h is not for driver use.

>  #define S3C2410_USBDREG(x) (x)
>  
>  #define S3C2410_UDC_FUNC_ADDR_REG	S3C2410_USBDREG(0x0140)
> -- 
> 2.20.0
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 34/36] ARM: s3c: stop including mach/hardware.h from mach/io.h
  2019-10-10 21:02     ` Russell King - ARM Linux admin
@ 2019-10-10 21:02       ` Russell King - ARM Linux admin
  2019-10-10 21:53       ` Arnd Bergmann
  1 sibling, 0 replies; 135+ messages in thread
From: Russell King - ARM Linux admin @ 2019-10-10 21:02 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, Andi Shyti, Mark Brown,
	Felipe Balbi, Greg Kroah-Hartman, linux-samsung-soc,
	linus.walleij, linux-usb, linux-kernel, linux-spi,
	linux-arm-kernel

On Thu, Oct 10, 2019 at 10:30:18PM +0200, Arnd Bergmann wrote:
> A number of other files rely on mach/map.h to be indirectly
> included from mach/io.h through mach/hardware.h.
> 
> Reduce this to the minimal plat/map-base.h and add explicit
> includes everywhere else.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s3c24xx/common.c                          | 1 +
>  arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h       | 2 ++
>  arch/arm/mach-s3c24xx/include/mach/hardware.h           | 7 -------
>  arch/arm/mach-s3c24xx/include/mach/io.h                 | 3 +--
>  arch/arm/mach-s3c24xx/include/mach/regs-clock.h         | 2 ++
>  arch/arm/mach-s3c24xx/include/mach/regs-gpio.h          | 2 ++
>  arch/arm/mach-s3c24xx/include/mach/regs-irq.h           | 2 ++
>  arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h | 1 +
>  arch/arm/mach-s3c24xx/include/mach/s3c2412.h            | 2 ++
>  arch/arm/mach-s3c24xx/mach-h1940.c                      | 1 +
>  arch/arm/mach-s3c24xx/mach-jive.c                       | 1 +
>  arch/arm/mach-s3c24xx/mach-rx1950.c                     | 1 +
>  arch/arm/mach-s3c24xx/pm-h1940.S                        | 1 -
>  arch/arm/mach-s3c24xx/regs-mem.h                        | 2 ++
>  arch/arm/mach-s3c24xx/s3c2410.c                         | 2 +-
>  arch/arm/mach-s3c24xx/s3c2412.c                         | 2 +-
>  arch/arm/mach-s3c24xx/s3c2416.c                         | 2 +-
>  arch/arm/mach-s3c24xx/s3c2443.c                         | 2 +-
>  arch/arm/mach-s3c24xx/s3c244x.c                         | 2 +-
>  arch/arm/mach-s3c24xx/sleep-s3c2410.S                   | 1 -
>  arch/arm/mach-s3c24xx/sleep-s3c2412.S                   | 1 -
>  arch/arm/mach-s3c24xx/sleep.S                           | 1 -
>  drivers/spi/spi-s3c24xx-regs.h                          | 2 ++
>  drivers/usb/gadget/udc/s3c2410_udc_regs.h               | 2 ++
>  24 files changed, 27 insertions(+), 18 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
> index d16a164df6c4..42d828f48345 100644
> --- a/arch/arm/mach-s3c24xx/common.c
> +++ b/arch/arm/mach-s3c24xx/common.c
> @@ -21,6 +21,7 @@
>  #include <linux/dmaengine.h>
>  
>  #include <mach/hardware.h>
> +#include <mach/map.h>
>  #include <mach/regs-clock.h>
>  #include <asm/irq.h>
>  #include <asm/cacheflush.h>
> diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h b/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
> index 2ad22b2d459b..f8a114891f16 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
> @@ -14,6 +14,8 @@
>  #ifndef GPIO_SAMSUNG_S3C24XX_H
>  #define GPIO_SAMSUNG_S3C24XX_H
>  
> +#include <mach/map.h>
> +

Why?  Nothing in this file uses anything from mach/map.h

>  /*
>   * GPIO sizes for various SoCs:
>   *
> diff --git a/arch/arm/mach-s3c24xx/include/mach/hardware.h b/arch/arm/mach-s3c24xx/include/mach/hardware.h
> index f28ac6c78d82..c732ea54984c 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/hardware.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/hardware.h
> @@ -9,13 +9,6 @@
>  #ifndef __ASM_ARCH_HARDWARE_H
>  #define __ASM_ARCH_HARDWARE_H
>  
> -#ifndef __ASSEMBLY__
> -
>  extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg);
>  
> -#endif /* __ASSEMBLY__ */
> -
> -#include <linux/sizes.h>
> -#include <mach/map.h>
> -
>  #endif /* __ASM_ARCH_HARDWARE_H */
> diff --git a/arch/arm/mach-s3c24xx/include/mach/io.h b/arch/arm/mach-s3c24xx/include/mach/io.h
> index 3e8bff26cdd5..bcddf615adb6 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/io.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/io.h
> @@ -10,8 +10,7 @@
>  #ifndef __ASM_ARM_ARCH_IO_H
>  #define __ASM_ARM_ARCH_IO_H
>  
> -#include <mach/hardware.h>
> -
> +#include <plat/map-base.h>
>  
>  /*
>   * ISA style IO, for each machine to sort out mappings for,
> diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
> index 7ca3dd4f13c0..da4e7b3aeba6 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
> @@ -9,6 +9,8 @@
>  #ifndef __ASM_ARM_REGS_CLOCK
>  #define __ASM_ARM_REGS_CLOCK
>  
> +#include <mach/map.h>
> +

Why?  Nothing in this file uses anything from mach/map.h

>  #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
>  
>  #define S3C2410_PLLVAL(_m,_p,_s) ((_m) << 12 | ((_p) << 4) | ((_s)))
> diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
> index 594e967c0673..51827d5577b6 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
> @@ -10,6 +10,8 @@
>  #ifndef __ASM_ARCH_REGS_GPIO_H
>  #define __ASM_ARCH_REGS_GPIO_H
>  
> +#include <plat/map-s3c.h>
> +
>  #define S3C24XX_MISCCR		S3C24XX_GPIOREG2(0x80)
>  
>  /* general configuration options */
> diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-irq.h b/arch/arm/mach-s3c24xx/include/mach/regs-irq.h
> index 8d8e669e3903..2921b48c56b2 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/regs-irq.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/regs-irq.h
> @@ -8,6 +8,8 @@
>  #ifndef ___ASM_ARCH_REGS_IRQ_H
>  #define ___ASM_ARCH_REGS_IRQ_H
>  
> +#include <plat/map-s3c.h>
> +
>  /* interrupt controller */
>  
>  #define S3C2410_IRQREG(x)   ((x) + S3C24XX_VA_IRQ)
> diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
> index 682759549e63..fefef7233f4b 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
> @@ -11,6 +11,7 @@
>  #define __ASM_ARM_REGS_S3C2443_CLOCK
>  
>  #include <linux/delay.h>
> +#include <plat/map-s3c.h>
>  
>  #define S3C2443_CLKREG(x)		((x) + S3C24XX_VA_CLKPWR)
>  
> diff --git a/arch/arm/mach-s3c24xx/include/mach/s3c2412.h b/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
> index 4ff83f956cfb..1ae369c81beb 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/s3c2412.h
> @@ -8,6 +8,8 @@
>  #ifndef __ARCH_ARM_MACH_S3C24XX_S3C2412_H
>  #define __ARCH_ARM_MACH_S3C24XX_S3C2412_H __FILE__
>  
> +#include <plat/map-s3c.h>
> +
>  #define S3C2412_MEMREG(x)		(S3C24XX_VA_MEMCTRL + (x))
>  #define S3C2412_EBIREG(x)		(S3C2412_VA_EBI + (x))
>  
> diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
> index d56e3befa459..287e42fc1665 100644
> --- a/arch/arm/mach-s3c24xx/mach-h1940.c
> +++ b/arch/arm/mach-s3c24xx/mach-h1940.c
> @@ -48,6 +48,7 @@
>  #include <sound/uda1380.h>
>  
>  #include <linux/platform_data/fb-s3c2410.h>
> +#include <mach/map.h>
>  #include <mach/hardware.h>
>  #include <mach/regs-clock.h>
>  #include <mach/regs-gpio.h>
> diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
> index 3b33132b2334..8012c34bddd9 100644
> --- a/arch/arm/mach-s3c24xx/mach-jive.c
> +++ b/arch/arm/mach-s3c24xx/mach-jive.c
> @@ -31,6 +31,7 @@
>  #include <linux/platform_data/mtd-nand-s3c2410.h>
>  #include <linux/platform_data/i2c-s3c2410.h>
>  
> +#include <mach/hardware.h>
>  #include <mach/regs-gpio.h>
>  #include <linux/platform_data/fb-s3c2410.h>
>  #include <mach/gpio-samsung.h>
> diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
> index ee4a0992339f..f94884090fbe 100644
> --- a/arch/arm/mach-s3c24xx/mach-rx1950.c
> +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
> @@ -46,6 +46,7 @@
>  
>  #include <sound/uda1380.h>
>  
> +#include <mach/hardware.h>
>  #include <mach/regs-gpio.h>
>  #include <mach/gpio-samsung.h>
>  
> diff --git a/arch/arm/mach-s3c24xx/pm-h1940.S b/arch/arm/mach-s3c24xx/pm-h1940.S
> index a7bbe336ac6b..f9ee515e1cbe 100644
> --- a/arch/arm/mach-s3c24xx/pm-h1940.S
> +++ b/arch/arm/mach-s3c24xx/pm-h1940.S
> @@ -7,7 +7,6 @@
>  
>  #include <linux/linkage.h>
>  #include <asm/assembler.h>
> -#include <mach/hardware.h>
>  #include <mach/map.h>
>  
>  #include <mach/regs-gpio.h>
> diff --git a/arch/arm/mach-s3c24xx/regs-mem.h b/arch/arm/mach-s3c24xx/regs-mem.h
> index 2f3bc48b5890..5048ab8f06c2 100644
> --- a/arch/arm/mach-s3c24xx/regs-mem.h
> +++ b/arch/arm/mach-s3c24xx/regs-mem.h
> @@ -9,6 +9,8 @@
>  #ifndef __ARCH_ARM_MACH_S3C24XX_REGS_MEM_H
>  #define __ARCH_ARM_MACH_S3C24XX_REGS_MEM_H __FILE__
>  
> +#include <plat/map-s3c.h>
> +
>  #define S3C2410_MEMREG(x)		(S3C24XX_VA_MEMCTRL + (x))
>  
>  #define S3C2410_BWSCON			S3C2410_MEMREG(0x00)
> diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c
> index 8427c150dd22..44bf3e1e77f1 100644
> --- a/arch/arm/mach-s3c24xx/s3c2410.c
> +++ b/arch/arm/mach-s3c24xx/s3c2410.c
> @@ -25,7 +25,7 @@
>  #include <asm/mach/map.h>
>  #include <asm/mach/irq.h>
>  
> -#include <mach/hardware.h>
> +#include <mach/map.h>
>  #include <mach/gpio-samsung.h>
>  #include <asm/irq.h>
>  #include <asm/system_misc.h>
> diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
> index 209f952a6c98..75648dcc2c1d 100644
> --- a/arch/arm/mach-s3c24xx/s3c2412.c
> +++ b/arch/arm/mach-s3c24xx/s3c2412.c
> @@ -29,7 +29,7 @@
>  #include <asm/irq.h>
>  #include <asm/system_misc.h>
>  
> -#include <mach/hardware.h>
> +#include <mach/map.h>
>  #include <mach/regs-clock.h>
>  #include <mach/regs-gpio.h>
>  
> diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c
> index 1cdb7bd3e713..ef2eace605e6 100644
> --- a/arch/arm/mach-s3c24xx/s3c2416.c
> +++ b/arch/arm/mach-s3c24xx/s3c2416.c
> @@ -26,7 +26,7 @@
>  #include <asm/mach/map.h>
>  #include <asm/mach/irq.h>
>  
> -#include <mach/hardware.h>
> +#include <mach/map.h>
>  #include <mach/gpio-samsung.h>
>  #include <asm/proc-fns.h>
>  #include <asm/irq.h>
> diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
> index f404ecac4baf..00318ad994ff 100644
> --- a/arch/arm/mach-s3c24xx/s3c2443.c
> +++ b/arch/arm/mach-s3c24xx/s3c2443.c
> @@ -23,7 +23,7 @@
>  #include <asm/mach/map.h>
>  #include <asm/mach/irq.h>
>  
> -#include <mach/hardware.h>
> +#include <mach/map.h>
>  #include <mach/gpio-samsung.h>
>  #include <mach/irqs.h>
>  #include <asm/irq.h>
> diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
> index f5bd489bac85..0ca188d0ffe5 100644
> --- a/arch/arm/mach-s3c24xx/s3c244x.c
> +++ b/arch/arm/mach-s3c24xx/s3c244x.c
> @@ -25,7 +25,7 @@
>  #include <asm/mach/map.h>
>  #include <asm/mach/irq.h>
>  
> -#include <mach/hardware.h>
> +#include <mach/map.h>
>  #include <asm/irq.h>
>  
>  #include <mach/regs-clock.h>
> diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2410.S b/arch/arm/mach-s3c24xx/sleep-s3c2410.S
> index 659f9eff9de2..e4f6f64e7826 100644
> --- a/arch/arm/mach-s3c24xx/sleep-s3c2410.S
> +++ b/arch/arm/mach-s3c24xx/sleep-s3c2410.S
> @@ -13,7 +13,6 @@
>  #include <linux/linkage.h>
>  #include <linux/serial_s3c.h>
>  #include <asm/assembler.h>
> -#include <mach/hardware.h>
>  #include <mach/map.h>
>  
>  #include <mach/regs-gpio.h>
> diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2412.S b/arch/arm/mach-s3c24xx/sleep-s3c2412.S
> index c373f1ca862b..434f5082b2ed 100644
> --- a/arch/arm/mach-s3c24xx/sleep-s3c2412.S
> +++ b/arch/arm/mach-s3c24xx/sleep-s3c2412.S
> @@ -8,7 +8,6 @@
>  
>  #include <linux/linkage.h>
>  #include <asm/assembler.h>
> -#include <mach/hardware.h>
>  #include <mach/map.h>
>  
>  #include <mach/regs-irq.h>
> diff --git a/arch/arm/mach-s3c24xx/sleep.S b/arch/arm/mach-s3c24xx/sleep.S
> index f0f11ad60c52..4bda4a413584 100644
> --- a/arch/arm/mach-s3c24xx/sleep.S
> +++ b/arch/arm/mach-s3c24xx/sleep.S
> @@ -13,7 +13,6 @@
>  #include <linux/linkage.h>
>  #include <linux/serial_s3c.h>
>  #include <asm/assembler.h>
> -#include <mach/hardware.h>
>  #include <mach/map.h>
>  
>  #include <mach/regs-gpio.h>
> diff --git a/drivers/spi/spi-s3c24xx-regs.h b/drivers/spi/spi-s3c24xx-regs.h
> index 37b93ff7c7fe..b76d591eba8c 100644
> --- a/drivers/spi/spi-s3c24xx-regs.h
> +++ b/drivers/spi/spi-s3c24xx-regs.h
> @@ -8,6 +8,8 @@
>  #ifndef __ASM_ARCH_REGS_SPI_H
>  #define __ASM_ARCH_REGS_SPI_H
>  
> +#include <mach/map.h>
> +

If this is outside of arch/arm, it shouldn't need anything from
mach/map.h - mach/map.h is not for driver use.

>  #define S3C2410_SPCON		(0x00)
>  
>  #define S3C2410_SPCON_SMOD_DMA	(2 << 5)	/* DMA mode */
> diff --git a/drivers/usb/gadget/udc/s3c2410_udc_regs.h b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
> index d8d2eeaca088..4df279342cdd 100644
> --- a/drivers/usb/gadget/udc/s3c2410_udc_regs.h
> +++ b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
> @@ -6,6 +6,8 @@
>  #ifndef __ASM_ARCH_REGS_UDC_H
>  #define __ASM_ARCH_REGS_UDC_H
>  
> +#include <mach/map.h>
> +

If this is outside of arch/arm, it shouldn't need anything from
mach/map.h - mach/map.h is not for driver use.

>  #define S3C2410_USBDREG(x) (x)
>  
>  #define S3C2410_UDC_FUNC_ADDR_REG	S3C2410_USBDREG(0x0140)
> -- 
> 2.20.0
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

^ permalink raw reply	[flat|nested] 135+ messages in thread

* [PATCH 35/36] ARM: s3c: move into a common directory
  2019-10-10 20:28 [PATCH 00/36] ARM: samsung platform cleanup Arnd Bergmann
  2019-10-10 20:28 ` Arnd Bergmann
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
@ 2019-10-10 21:07 ` Arnd Bergmann
  2019-10-10 21:07   ` Arnd Bergmann
  2019-10-23 14:05   ` Krzysztof Kozlowski
  2019-10-10 21:07 ` [PATCH 36/36] ARM: s3c: make headers local if possible Arnd Bergmann
  2019-10-23 13:10 ` [PATCH 00/36] ARM: samsung platform cleanup Krzysztof Kozlowski
  4 siblings, 2 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 21:07 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linus.walleij, linux-samsung-soc, Arnd Bergmann, linux-arm-kernel

s3c24xx and s3c64xx have a lot in common, but are split across three
separate directories, which makes the interaction of the header files
more complicated than necessary.

Move all three directories into a new mach-s3c, with a minimal
set of changes to each file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 MAINTAINERS                                      | 16 +++++++---------
 arch/arm/Kconfig                                 |  5 +----
 arch/arm/Makefile                                |  5 +----
 arch/arm/{plat-samsung => mach-s3c}/Kconfig      |  3 +++
 .../Kconfig => mach-s3c/Kconfig.s3c24xx}         |  0
 .../Kconfig => mach-s3c/Kconfig.s3c64xx}         |  0
 arch/arm/{plat-samsung => mach-s3c}/Makefile     |  9 ++++++++-
 .../arm/{mach-s3c24xx => mach-s3c}/Makefile.boot |  0
 .../Makefile => mach-s3c/Makefile.s3c24xx}       | 10 +++++-----
 .../Makefile => mach-s3c/Makefile.s3c64xx}       | 14 +++++++-------
 arch/arm/{plat-samsung => mach-s3c}/adc.c        |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/anubis.h     |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/ata-core.h   |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/backlight.h  |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/bast-ide.c   |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/bast-irq.c   |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/bast.h       |  0
 .../arm/{mach-s3c24xx => mach-s3c}/common-smdk.c |  0
 .../arm/{mach-s3c24xx => mach-s3c}/common-smdk.h |  0
 arch/arm/{plat-samsung => mach-s3c}/cpu.c        |  0
 .../{mach-s3c24xx => mach-s3c}/cpufreq-utils.c   |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/cpuidle.c    |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/crag6410.h   |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/dev-audio.c  |  0
 .../{mach-s3c64xx => mach-s3c}/dev-backlight.c   |  0
 .../dev-uart.c => mach-s3c/dev-uart-s3c64xx.c}   |  0
 arch/arm/{plat-samsung => mach-s3c}/dev-uart.c   |  0
 arch/arm/{plat-samsung => mach-s3c}/devs.c       |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/fb-core.h    |  0
 .../{plat-samsung => mach-s3c}/gpio-samsung.c    |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/gta02.h      |  0
 .../{mach-s3c24xx => mach-s3c}/h1940-bluetooth.c |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/h1940.h      |  0
 .../include/mach/dma-s3c24xx.h}                  |  0
 .../include/mach/dma-s3c64xx.h}                  |  0
 arch/arm/mach-s3c/include/mach/dma.h             |  7 +++++++
 .../include/mach/gpio-samsung-s3c24xx.h}         |  0
 .../include/mach/gpio-samsung-s3c64xx.h}         |  0
 arch/arm/mach-s3c/include/mach/gpio-samsung.h    |  7 +++++++
 .../include/mach/hardware.h                      |  0
 .../{mach-s3c24xx => mach-s3c}/include/mach/io.h |  0
 .../include/mach/irqs-s3c24xx.h}                 |  0
 .../include/mach/irqs-s3c64xx.h}                 |  0
 arch/arm/mach-s3c/include/mach/irqs.h            |  7 +++++++
 .../include/mach/map-s3c24xx.h}                  |  0
 .../include/mach/map-s3c64xx.h}                  |  0
 arch/arm/mach-s3c/include/mach/map.h             |  7 +++++++
 .../include/mach/pm-core-s3c24xx.h}              |  0
 .../include/mach/pm-core-s3c64xx.h}              |  0
 arch/arm/mach-s3c/include/mach/pm-core.h         |  7 +++++++
 .../include/mach/regs-clock-s3c24xx.h}           |  0
 .../include/mach/regs-clock-s3c64xx.h}           |  0
 arch/arm/mach-s3c/include/mach/regs-clock.h      |  7 +++++++
 .../include/mach/regs-gpio-s3c24xx.h}            |  0
 .../include/mach/regs-gpio-s3c64xx.h}            |  0
 arch/arm/mach-s3c/include/mach/regs-gpio.h       |  7 +++++++
 .../include/mach/regs-irq-s3c24xx.h}             |  0
 .../include/mach/regs-irq-s3c64xx.h}             |  0
 arch/arm/mach-s3c/include/mach/regs-irq.h        |  7 +++++++
 .../include/mach/regs-s3c2443-clock.h            |  0
 .../include/mach/rtc-core.h                      |  0
 .../include/mach/s3c2412.h                       |  0
 .../include/plat/adc-core.h                      |  0
 .../include/plat/cpu.h                           |  0
 .../include/plat/devs.h                          |  0
 .../{plat-samsung => mach-s3c}/include/plat/fb.h |  0
 .../include/plat/gpio-cfg-helpers.h              |  0
 .../include/plat/gpio-cfg.h                      |  0
 .../include/plat/gpio-core.h                     |  0
 .../include/plat/iic-core.h                      |  0
 .../include/plat/keypad.h                        |  0
 .../include/plat/map-base.h                      |  0
 .../include/plat/map-s3c.h                       |  0
 .../include/plat/map-s5p.h                       |  0
 .../include/plat/pm-common.h                     |  0
 .../{plat-samsung => mach-s3c}/include/plat/pm.h |  0
 .../include/plat/pwm-core.h                      |  0
 .../include/plat/regs-adc.h                      |  0
 .../include/plat/regs-irqtype.h                  |  0
 .../include/plat/samsung-time.h                  |  0
 .../include/plat/sdhci.h                         |  0
 .../include/plat/usb-phy.h                       |  0
 .../include/plat/wakeup-mask.h                   |  0
 arch/arm/{plat-samsung => mach-s3c}/init.c       |  0
 .../iotiming-s3c2410.c                           |  0
 .../iotiming-s3c2412.c                           |  0
 .../irq-pm.c => mach-s3c/irq-pm-s3c24xx.c}       |  0
 .../irq-pm.c => mach-s3c/irq-pm-s3c64xx.c}       |  0
 .../irq-s3c24xx-fiq-exports.c                    |  0
 .../{mach-s3c24xx => mach-s3c}/irq-s3c24xx-fiq.S |  0
 .../arm/{mach-s3c24xx => mach-s3c}/irq-s3c24xx.c |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/irq-uart.h   |  0
 .../{mach-s3c24xx => mach-s3c}/mach-amlm5900.c   |  2 +-
 .../arm/{mach-s3c24xx => mach-s3c}/mach-anubis.c |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-anw6410.c    |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-at2440evb.c  |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-bast.c  |  2 +-
 .../mach-crag6410-module.c                       |  0
 .../{mach-s3c64xx => mach-s3c}/mach-crag6410.c   |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-gta02.c |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-h1940.c |  2 +-
 arch/arm/{mach-s3c64xx => mach-s3c}/mach-hmt.c   |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-jive.c  |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-mini2440.c   |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-mini6410.c   |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-n30.c   |  2 +-
 arch/arm/{mach-s3c64xx => mach-s3c}/mach-ncp.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-nexcoder.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-osiris-dvs.c |  0
 .../arm/{mach-s3c24xx => mach-s3c}/mach-osiris.c |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-otom.c  |  2 +-
 .../arm/{mach-s3c24xx => mach-s3c}/mach-qt2410.c |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-real6410.c   |  2 +-
 .../arm/{mach-s3c24xx => mach-s3c}/mach-rx1950.c |  2 +-
 .../arm/{mach-s3c24xx => mach-s3c}/mach-rx3715.c |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-s3c2416-dt.c |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-s3c64xx-dt.c |  2 +-
 .../arm/{mach-s3c64xx => mach-s3c}/mach-smartq.c |  2 +-
 .../arm/{mach-s3c64xx => mach-s3c}/mach-smartq.h |  0
 .../{mach-s3c64xx => mach-s3c}/mach-smartq5.c    |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smartq7.c    |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-smdk2410.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-smdk2413.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-smdk2416.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-smdk2440.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-smdk2443.c   |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smdk6400.c   |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smdk6410.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-tct_hammer.c |  2 +-
 .../arm/{mach-s3c24xx => mach-s3c}/mach-vr1000.c |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-vstms.c |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/nand-core.h  |  0
 .../{mach-s3c64xx => mach-s3c}/onenand-core.h    |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/osiris.h     |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/otom.h       |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/pl080.c      |  0
 .../{plat-samsung => mach-s3c}/platformdata.c    |  0
 .../arm/{mach-s3c24xx => mach-s3c}/pll-s3c2410.c |  0
 .../pll-s3c2440-12000000.c                       |  0
 .../pll-s3c2440-16934400.c                       |  0
 arch/arm/{plat-samsung => mach-s3c}/pm-common.c  |  0
 arch/arm/{plat-samsung => mach-s3c}/pm-gpio.c    |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/pm-h1940.S   |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2410.c |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2412.c |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2416.c |  0
 .../{mach-s3c24xx/pm.c => mach-s3c/pm-s3c24xx.c} |  0
 .../{mach-s3c64xx/pm.c => mach-s3c/pm-s3c64xx.c} |  0
 arch/arm/{plat-samsung => mach-s3c}/pm.c         |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/regs-dsc.h   |  0
 .../regs-gpio-memport.h                          |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/regs-mem.h   |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/regs-modem.h |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/regs-srom.h  |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/regs-sys.h   |  0
 .../regs-syscon-power.h                          |  0
 .../regs-usb-hsotg-phy.h                         |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2410.c    |  2 +-
 .../{mach-s3c24xx => mach-s3c}/s3c2412-power.h   |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412.c    |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2416.c    |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2440.c    |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2442.c    |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2443.c    |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c244x.c    |  2 +-
 .../common.c => mach-s3c/s3c24xx.c}              |  2 +-
 .../common.h => mach-s3c/s3c24xx.h}              |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/s3c6400.c    |  2 +-
 arch/arm/{mach-s3c64xx => mach-s3c}/s3c6410.c    |  2 +-
 .../common.c => mach-s3c/s3c64xx.c}              |  2 +-
 .../common.h => mach-s3c/s3c64xx.h}              |  0
 .../arm/{mach-s3c24xx => mach-s3c}/setup-camif.c |  0
 .../{mach-s3c64xx => mach-s3c}/setup-fb-24bpp.c  |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/setup-i2c.c  |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c0.c |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c1.c |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/setup-ide.c  |  0
 .../{mach-s3c64xx => mach-s3c}/setup-keypad.c    |  0
 .../setup-sdhci-gpio-s3c24xx.c}                  |  0
 .../setup-sdhci-gpio-s3c64xx.c}                  |  0
 .../setup-spi.c => mach-s3c/setup-spi-s3c24xx.c} |  0
 .../setup-spi.c => mach-s3c/setup-spi-s3c64xx.c} |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/setup-ts.c   |  0
 .../{mach-s3c64xx => mach-s3c}/setup-usb-phy.c   |  0
 .../{mach-s3c24xx => mach-s3c}/simtec-audio.c    |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/simtec-nor.c |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/simtec-pm.c  |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/simtec-usb.c |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/simtec.h     |  0
 .../{mach-s3c24xx => mach-s3c}/sleep-s3c2410.S   |  0
 .../{mach-s3c24xx => mach-s3c}/sleep-s3c2412.S   |  0
 .../sleep.S => mach-s3c/sleep-s3c24xx.S}         |  0
 .../sleep.S => mach-s3c/sleep-s3c64xx.S}         |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/spi-core.h   |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/vr1000.h     |  0
 .../arm/{plat-samsung => mach-s3c}/wakeup-mask.c |  0
 .../{plat-samsung => mach-s3c}/watchdog-reset.c  |  0
 .../{mach-s3c64xx => mach-s3c}/watchdog-reset.h  |  0
 198 files changed, 134 insertions(+), 76 deletions(-)
 rename arch/arm/{plat-samsung => mach-s3c}/Kconfig (98%)
 rename arch/arm/{mach-s3c24xx/Kconfig => mach-s3c/Kconfig.s3c24xx} (100%)
 rename arch/arm/{mach-s3c64xx/Kconfig => mach-s3c/Kconfig.s3c64xx} (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/Makefile (83%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/Makefile.boot (100%)
 rename arch/arm/{mach-s3c24xx/Makefile => mach-s3c/Makefile.s3c24xx} (92%)
 rename arch/arm/{mach-s3c64xx/Makefile => mach-s3c/Makefile.s3c64xx} (83%)
 rename arch/arm/{plat-samsung => mach-s3c}/adc.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/anubis.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/ata-core.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/backlight.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/bast-ide.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/bast-irq.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/bast.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/common-smdk.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/common-smdk.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/cpu.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/cpufreq-utils.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/cpuidle.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/crag6410.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/dev-audio.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/dev-backlight.c (100%)
 rename arch/arm/{mach-s3c64xx/dev-uart.c => mach-s3c/dev-uart-s3c64xx.c} (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/dev-uart.c (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/devs.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/fb-core.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/gpio-samsung.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/gta02.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/h1940-bluetooth.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/h1940.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach/dma.h => mach-s3c/include/mach/dma-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/dma.h => mach-s3c/include/mach/dma-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/dma.h
 rename arch/arm/{mach-s3c24xx/include/mach/gpio-samsung.h => mach-s3c/include/mach/gpio-samsung-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/gpio-samsung.h => mach-s3c/include/mach/gpio-samsung-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/gpio-samsung.h
 rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/hardware.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/io.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach/irqs.h => mach-s3c/include/mach/irqs-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/irqs.h => mach-s3c/include/mach/irqs-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/irqs.h
 rename arch/arm/{mach-s3c24xx/include/mach/map.h => mach-s3c/include/mach/map-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/map.h => mach-s3c/include/mach/map-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/map.h
 rename arch/arm/{mach-s3c24xx/include/mach/pm-core.h => mach-s3c/include/mach/pm-core-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/pm-core.h => mach-s3c/include/mach/pm-core-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/pm-core.h
 rename arch/arm/{mach-s3c24xx/include/mach/regs-clock.h => mach-s3c/include/mach/regs-clock-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/regs-clock.h => mach-s3c/include/mach/regs-clock-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/regs-clock.h
 rename arch/arm/{mach-s3c24xx/include/mach/regs-gpio.h => mach-s3c/include/mach/regs-gpio-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/regs-gpio.h => mach-s3c/include/mach/regs-gpio-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/regs-gpio.h
 rename arch/arm/{mach-s3c24xx/include/mach/regs-irq.h => mach-s3c/include/mach/regs-irq-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/regs-irq.h => mach-s3c/include/mach/regs-irq-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/regs-irq.h
 rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/regs-s3c2443-clock.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/rtc-core.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/s3c2412.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/adc-core.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/cpu.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/devs.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/fb.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/gpio-cfg-helpers.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/gpio-cfg.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/gpio-core.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/iic-core.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/keypad.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/map-base.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/map-s3c.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/map-s5p.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/pm-common.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/pm.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/pwm-core.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/regs-adc.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/regs-irqtype.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/samsung-time.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/sdhci.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/usb-phy.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/wakeup-mask.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/init.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/iotiming-s3c2410.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/iotiming-s3c2412.c (100%)
 rename arch/arm/{mach-s3c24xx/irq-pm.c => mach-s3c/irq-pm-s3c24xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/irq-pm.c => mach-s3c/irq-pm-s3c64xx.c} (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/irq-s3c24xx-fiq-exports.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/irq-s3c24xx-fiq.S (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/irq-s3c24xx.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/irq-uart.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-amlm5900.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-anubis.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-anw6410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-at2440evb.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-bast.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-crag6410-module.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-crag6410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-gta02.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-h1940.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-hmt.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-jive.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-mini2440.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-mini6410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-n30.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-ncp.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-nexcoder.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-osiris-dvs.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-osiris.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-otom.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-qt2410.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-real6410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-rx1950.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-rx3715.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-s3c2416-dt.c (98%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-s3c64xx-dt.c (98%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq5.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq7.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2413.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2416.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2440.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2443.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smdk6400.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smdk6410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-tct_hammer.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-vr1000.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-vstms.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/nand-core.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/onenand-core.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/osiris.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/otom.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/pl080.c (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/platformdata.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2410.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2440-12000000.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2440-16934400.c (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/pm-common.c (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/pm-gpio.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-h1940.S (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2410.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2412.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2416.c (100%)
 rename arch/arm/{mach-s3c24xx/pm.c => mach-s3c/pm-s3c24xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/pm.c => mach-s3c/pm-s3c64xx.c} (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/pm.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/regs-dsc.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-gpio-memport.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/regs-mem.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-modem.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-srom.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-sys.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-syscon-power.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-usb-hsotg-phy.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412-power.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2416.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2440.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2442.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2443.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c244x.c (99%)
 rename arch/arm/{mach-s3c24xx/common.c => mach-s3c/s3c24xx.c} (99%)
 rename arch/arm/{mach-s3c24xx/common.h => mach-s3c/s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/s3c6400.c (98%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/s3c6410.c (99%)
 rename arch/arm/{mach-s3c64xx/common.c => mach-s3c/s3c64xx.c} (99%)
 rename arch/arm/{mach-s3c64xx/common.h => mach-s3c/s3c64xx.h} (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-camif.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-fb-24bpp.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-i2c.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c0.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c1.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-ide.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-keypad.c (100%)
 rename arch/arm/{mach-s3c24xx/setup-sdhci-gpio.c => mach-s3c/setup-sdhci-gpio-s3c24xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/setup-sdhci-gpio.c => mach-s3c/setup-sdhci-gpio-s3c64xx.c} (100%)
 rename arch/arm/{mach-s3c24xx/setup-spi.c => mach-s3c/setup-spi-s3c24xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/setup-spi.c => mach-s3c/setup-spi-s3c64xx.c} (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-ts.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-usb-phy.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-audio.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-nor.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-pm.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-usb.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/sleep-s3c2410.S (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/sleep-s3c2412.S (100%)
 rename arch/arm/{mach-s3c24xx/sleep.S => mach-s3c/sleep-s3c24xx.S} (100%)
 rename arch/arm/{mach-s3c64xx/sleep.S => mach-s3c/sleep-s3c64xx.S} (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/spi-core.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/vr1000.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/wakeup-mask.c (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/watchdog-reset.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/watchdog-reset.h (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 55199ef7fa74..e7bcb4189047 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2042,8 +2042,8 @@ ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT
 L:	openmoko-kernel@lists.openmoko.org (subscribers-only)
 W:	http://wiki.openmoko.org/wiki/Neo_FreeRunner
 S:	Orphan
-F:	arch/arm/mach-s3c24xx/mach-gta02.c
-F:	arch/arm/mach-s3c24xx/gta02.h
+F:	arch/arm/mach-s3c/mach-gta02.c
+F:	arch/arm/mach-s3c/gta02.h
 
 ARM/Orion SoC/Technologic Systems TS-78xx platform support
 M:	Alexander Clouter <alex@digriz.org.uk>
@@ -2221,9 +2221,7 @@ F:	arch/arm/boot/dts/s3c*
 F:	arch/arm/boot/dts/s5p*
 F:	arch/arm/boot/dts/exynos*
 F:	arch/arm64/boot/dts/exynos/
-F:	arch/arm/plat-samsung/
-F:	arch/arm/mach-s3c24*/
-F:	arch/arm/mach-s3c64xx/
+F:	arch/arm/mach-s3c/
 F:	arch/arm/mach-s5p*/
 F:	arch/arm/mach-exynos*/
 F:	drivers/*/*s3c24*
@@ -14846,9 +14844,9 @@ P:	Vincent Sanders <vince@simtec.co.uk>
 M:	Simtec Linux Team <linux@simtec.co.uk>
 W:	http://www.simtec.co.uk/products/EB2410ITX/
 S:	Supported
-F:	arch/arm/mach-s3c24xx/mach-bast.c
-F:	arch/arm/mach-s3c24xx/bast-ide.c
-F:	arch/arm/mach-s3c24xx/bast-irq.c
+F:	arch/arm/mach-s3c/mach-bast.c
+F:	arch/arm/mach-s3c/bast-ide.c
+F:	arch/arm/mach-s3c/bast-irq.c
 
 SIPHASH PRF ROUTINES
 M:	Jason A. Donenfeld <Jason@zx2c4.com>
@@ -17600,7 +17598,7 @@ F:	Documentation/devicetree/bindings/regulator/arizona-regulator.txt
 F:	Documentation/devicetree/bindings/mfd/arizona.txt
 F:	Documentation/devicetree/bindings/mfd/wm831x.txt
 F:	Documentation/devicetree/bindings/sound/wlf,arizona.txt
-F:	arch/arm/mach-s3c64xx/mach-crag6410*
+F:	arch/arm/mach-s3c/mach-crag6410*
 F:	drivers/clk/clk-wm83*.c
 F:	drivers/extcon/extcon-arizona.c
 F:	drivers/leds/leds-wm83*.c
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 8a50efb559f3..6ea9594794c8 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -635,7 +635,6 @@ source "arch/arm/mach-dove/Kconfig"
 source "arch/arm/mach-ep93xx/Kconfig"
 
 source "arch/arm/mach-exynos/Kconfig"
-source "arch/arm/plat-samsung/Kconfig"
 
 source "arch/arm/mach-footbridge/Kconfig"
 
@@ -704,9 +703,7 @@ source "arch/arm/mach-realview/Kconfig"
 
 source "arch/arm/mach-rockchip/Kconfig"
 
-source "arch/arm/mach-s3c24xx/Kconfig"
-
-source "arch/arm/mach-s3c64xx/Kconfig"
+source "arch/arm/mach-s3c/Kconfig"
 
 source "arch/arm/mach-s5pv210/Kconfig"
 
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index a1bc15cda751..92ffc17119d6 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -210,8 +210,7 @@ machine-$(CONFIG_ARCH_RDA)		+= rda
 machine-$(CONFIG_ARCH_REALVIEW)		+= realview
 machine-$(CONFIG_ARCH_ROCKCHIP)		+= rockchip
 machine-$(CONFIG_ARCH_RPC)		+= rpc
-machine-$(CONFIG_ARCH_S3C24XX)		+= s3c24xx
-machine-$(CONFIG_ARCH_S3C64XX)		+= s3c64xx
+machine-$(CONFIG_PLAT_SAMSUNG)		+= s3c
 machine-$(CONFIG_ARCH_S5PV210)		+= s5pv210
 machine-$(CONFIG_ARCH_SA1100)		+= sa1100
 machine-$(CONFIG_ARCH_RENESAS)	 	+= shmobile
@@ -234,10 +233,8 @@ machine-$(CONFIG_PLAT_SPEAR)		+= spear
 # Platform directory name.  This list is sorted alphanumerically
 # by CONFIG_* macro name.
 plat-$(CONFIG_ARCH_OMAP)	+= omap
-plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
 plat-$(CONFIG_PLAT_ORION)	+= orion
 plat-$(CONFIG_PLAT_PXA)		+= pxa
-plat-$(CONFIG_PLAT_S3C24XX)	+= samsung
 plat-$(CONFIG_PLAT_VERSATILE)	+= versatile
 
 ifeq ($(CONFIG_ARCH_EBSA110),y)
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/mach-s3c/Kconfig
similarity index 98%
rename from arch/arm/plat-samsung/Kconfig
rename to arch/arm/mach-s3c/Kconfig
index 1530946cc672..bf73d2481104 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/mach-s3c/Kconfig
@@ -2,6 +2,9 @@
 #
 # Copyright 2009 Simtec Electronics
 
+source "arch/arm/mach-s3c/Kconfig.s3c24xx"
+source "arch/arm/mach-s3c/Kconfig.s3c64xx"
+
 config PLAT_SAMSUNG
 	bool
 	depends on PLAT_S3C24XX || ARCH_S3C64XX
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c/Kconfig.s3c24xx
similarity index 100%
rename from arch/arm/mach-s3c24xx/Kconfig
rename to arch/arm/mach-s3c/Kconfig.s3c24xx
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c/Kconfig.s3c64xx
similarity index 100%
rename from arch/arm/mach-s3c64xx/Kconfig
rename to arch/arm/mach-s3c/Kconfig.s3c64xx
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/mach-s3c/Makefile
similarity index 83%
rename from arch/arm/plat-samsung/Makefile
rename to arch/arm/mach-s3c/Makefile
index 025ce22876c1..975c24ae534c 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/mach-s3c/Makefile
@@ -2,9 +2,16 @@
 #
 # Copyright 2009 Simtec Electronics
 
-ccflags-$(CONFIG_ARCH_S3C64XX) := -I$(srctree)/arch/arm/mach-s3c64xx/include
 ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include
 
+ifdef CONFIG_ARCH_S3C24XX
+include $(src)/Makefile.s3c24xx
+endif
+
+ifdef CONFIG_ARCH_S3C64XX
+include $(src)/Makefile.s3c64xx
+endif
+
 # Objects we always build independent of SoC choice
 
 obj-y				+= init.o cpu.o
diff --git a/arch/arm/mach-s3c24xx/Makefile.boot b/arch/arm/mach-s3c/Makefile.boot
similarity index 100%
rename from arch/arm/mach-s3c24xx/Makefile.boot
rename to arch/arm/mach-s3c/Makefile.boot
diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c/Makefile.s3c24xx
similarity index 92%
rename from arch/arm/mach-s3c24xx/Makefile
rename to arch/arm/mach-s3c/Makefile.s3c24xx
index 195a4cb23ecb..2235f5b66a51 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c/Makefile.s3c24xx
@@ -7,7 +7,7 @@
 
 # core
 
-obj-y				+= common.o
+obj-y				+= s3c24xx.o
 obj-y				+= irq-s3c24xx.o
 obj-$(CONFIG_SPI_S3C24XX_FIQ)	+= irq-s3c24xx-fiq.o
 obj-$(CONFIG_SPI_S3C24XX_FIQ)	+= irq-s3c24xx-fiq-exports.o
@@ -33,8 +33,8 @@ obj-$(CONFIG_CPU_S3C2443)	+= s3c2443.o
 
 # PM
 
-obj-$(CONFIG_PM)		+= pm.o
-obj-$(CONFIG_PM_SLEEP)		+= irq-pm.o sleep.o
+obj-$(CONFIG_PM)		+= pm-s3c24xx.o
+obj-$(CONFIG_PM_SLEEP)		+= irq-pm-s3c24xx.o sleep-s3c24xx.o
 
 # common code
 
@@ -96,8 +96,8 @@ obj-$(CONFIG_MACH_OSIRIS_DVS)		+= mach-osiris-dvs.o
 
 # device setup
 
-obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio.o
-obj-$(CONFIG_S3C2443_SETUP_SPI)		+= setup-spi.o
+obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio-s3c24xx.o
+obj-$(CONFIG_S3C2443_SETUP_SPI)		+= setup-spi-s3c24xx.o
 obj-$(CONFIG_ARCH_S3C24XX)		+= setup-i2c.o
 obj-$(CONFIG_S3C24XX_SETUP_TS)		+= setup-ts.o
 obj-$(CONFIG_S3C_SETUP_CAMIF)		+= setup-camif.o
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c/Makefile.s3c64xx
similarity index 83%
rename from arch/arm/mach-s3c64xx/Makefile
rename to arch/arm/mach-s3c/Makefile.s3c64xx
index 8caeb4ad17e9..fc4e2bb2bbd1 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c/Makefile.s3c64xx
@@ -8,17 +8,17 @@ asflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include -I$(srctree)
 
 # PM
 
-obj-$(CONFIG_PM)		+= pm.o
-obj-$(CONFIG_PM_SLEEP)		+= sleep.o
+obj-$(CONFIG_PM)		+= pm-s3c64xx.o
+obj-$(CONFIG_PM_SLEEP)		+= sleep-s3c64xx.o
 obj-$(CONFIG_CPU_IDLE)		+= cpuidle.o
 
 ifdef CONFIG_SAMSUNG_ATAGS
 
-obj-$(CONFIG_PM_SLEEP)          += irq-pm.o
+obj-$(CONFIG_PM_SLEEP)          += irq-pm-s3c64xx.o
 
 # Core
 
-obj-y				+= common.o
+obj-y				+= s3c64xx.o
 obj-$(CONFIG_CPU_S3C6400)	+= s3c6400.o
 obj-$(CONFIG_CPU_S3C6410)	+= s3c6410.o
 
@@ -28,7 +28,7 @@ obj-$(CONFIG_S3C64XX_PL080)	+= pl080.o
 
 # Device support
 
-obj-y				+= dev-uart.o
+obj-y				+= dev-uart-s3c64xx.o
 obj-y				+= dev-audio.o
 
 # Device setup
@@ -38,8 +38,8 @@ obj-$(CONFIG_S3C64XX_SETUP_I2C0)	+= setup-i2c0.o
 obj-$(CONFIG_S3C64XX_SETUP_I2C1)	+= setup-i2c1.o
 obj-$(CONFIG_S3C64XX_SETUP_IDE)		+= setup-ide.o
 obj-$(CONFIG_S3C64XX_SETUP_KEYPAD)	+= setup-keypad.o
-obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio.o
-obj-$(CONFIG_S3C64XX_SETUP_SPI)		+= setup-spi.o
+obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio-s3c64xx.o
+obj-$(CONFIG_S3C64XX_SETUP_SPI)		+= setup-spi-s3c64xx.o
 obj-$(CONFIG_S3C64XX_SETUP_USB_PHY) += setup-usb-phy.o
 
 obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT)	+= dev-backlight.o
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/mach-s3c/adc.c
similarity index 100%
rename from arch/arm/plat-samsung/adc.c
rename to arch/arm/mach-s3c/adc.c
diff --git a/arch/arm/mach-s3c24xx/anubis.h b/arch/arm/mach-s3c/anubis.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/anubis.h
rename to arch/arm/mach-s3c/anubis.h
diff --git a/arch/arm/mach-s3c64xx/ata-core.h b/arch/arm/mach-s3c/ata-core.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/ata-core.h
rename to arch/arm/mach-s3c/ata-core.h
diff --git a/arch/arm/mach-s3c64xx/backlight.h b/arch/arm/mach-s3c/backlight.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/backlight.h
rename to arch/arm/mach-s3c/backlight.h
diff --git a/arch/arm/mach-s3c24xx/bast-ide.c b/arch/arm/mach-s3c/bast-ide.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/bast-ide.c
rename to arch/arm/mach-s3c/bast-ide.c
diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c/bast-irq.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/bast-irq.c
rename to arch/arm/mach-s3c/bast-irq.c
diff --git a/arch/arm/mach-s3c24xx/bast.h b/arch/arm/mach-s3c/bast.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/bast.h
rename to arch/arm/mach-s3c/bast.h
diff --git a/arch/arm/mach-s3c24xx/common-smdk.c b/arch/arm/mach-s3c/common-smdk.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/common-smdk.c
rename to arch/arm/mach-s3c/common-smdk.c
diff --git a/arch/arm/mach-s3c24xx/common-smdk.h b/arch/arm/mach-s3c/common-smdk.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/common-smdk.h
rename to arch/arm/mach-s3c/common-smdk.h
diff --git a/arch/arm/plat-samsung/cpu.c b/arch/arm/mach-s3c/cpu.c
similarity index 100%
rename from arch/arm/plat-samsung/cpu.c
rename to arch/arm/mach-s3c/cpu.c
diff --git a/arch/arm/mach-s3c24xx/cpufreq-utils.c b/arch/arm/mach-s3c/cpufreq-utils.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/cpufreq-utils.c
rename to arch/arm/mach-s3c/cpufreq-utils.c
diff --git a/arch/arm/mach-s3c64xx/cpuidle.c b/arch/arm/mach-s3c/cpuidle.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/cpuidle.c
rename to arch/arm/mach-s3c/cpuidle.c
diff --git a/arch/arm/mach-s3c64xx/crag6410.h b/arch/arm/mach-s3c/crag6410.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/crag6410.h
rename to arch/arm/mach-s3c/crag6410.h
diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c/dev-audio.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/dev-audio.c
rename to arch/arm/mach-s3c/dev-audio.c
diff --git a/arch/arm/mach-s3c64xx/dev-backlight.c b/arch/arm/mach-s3c/dev-backlight.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/dev-backlight.c
rename to arch/arm/mach-s3c/dev-backlight.c
diff --git a/arch/arm/mach-s3c64xx/dev-uart.c b/arch/arm/mach-s3c/dev-uart-s3c64xx.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/dev-uart.c
rename to arch/arm/mach-s3c/dev-uart-s3c64xx.c
diff --git a/arch/arm/plat-samsung/dev-uart.c b/arch/arm/mach-s3c/dev-uart.c
similarity index 100%
rename from arch/arm/plat-samsung/dev-uart.c
rename to arch/arm/mach-s3c/dev-uart.c
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/mach-s3c/devs.c
similarity index 100%
rename from arch/arm/plat-samsung/devs.c
rename to arch/arm/mach-s3c/devs.c
diff --git a/arch/arm/mach-s3c24xx/fb-core.h b/arch/arm/mach-s3c/fb-core.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/fb-core.h
rename to arch/arm/mach-s3c/fb-core.h
diff --git a/arch/arm/plat-samsung/gpio-samsung.c b/arch/arm/mach-s3c/gpio-samsung.c
similarity index 100%
rename from arch/arm/plat-samsung/gpio-samsung.c
rename to arch/arm/mach-s3c/gpio-samsung.c
diff --git a/arch/arm/mach-s3c24xx/gta02.h b/arch/arm/mach-s3c/gta02.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/gta02.h
rename to arch/arm/mach-s3c/gta02.h
diff --git a/arch/arm/mach-s3c24xx/h1940-bluetooth.c b/arch/arm/mach-s3c/h1940-bluetooth.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/h1940-bluetooth.c
rename to arch/arm/mach-s3c/h1940-bluetooth.c
diff --git a/arch/arm/mach-s3c24xx/h1940.h b/arch/arm/mach-s3c/h1940.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/h1940.h
rename to arch/arm/mach-s3c/h1940.h
diff --git a/arch/arm/mach-s3c24xx/include/mach/dma.h b/arch/arm/mach-s3c/include/mach/dma-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/dma.h
rename to arch/arm/mach-s3c/include/mach/dma-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/dma.h b/arch/arm/mach-s3c/include/mach/dma-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/dma.h
rename to arch/arm/mach-s3c/include/mach/dma-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/dma.h b/arch/arm/mach-s3c/include/mach/dma.h
new file mode 100644
index 000000000000..54e11d4cb272
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/dma.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "dma-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "dma-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h b/arch/arm/mach-s3c/include/mach/gpio-samsung-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
rename to arch/arm/mach-s3c/include/mach/gpio-samsung-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-samsung.h b/arch/arm/mach-s3c/include/mach/gpio-samsung-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/gpio-samsung.h
rename to arch/arm/mach-s3c/include/mach/gpio-samsung-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/gpio-samsung.h b/arch/arm/mach-s3c/include/mach/gpio-samsung.h
new file mode 100644
index 000000000000..ac29f8ac0c9c
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/gpio-samsung.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "gpio-samsung-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "gpio-samsung-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/hardware.h b/arch/arm/mach-s3c/include/mach/hardware.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/hardware.h
rename to arch/arm/mach-s3c/include/mach/hardware.h
diff --git a/arch/arm/mach-s3c24xx/include/mach/io.h b/arch/arm/mach-s3c/include/mach/io.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/io.h
rename to arch/arm/mach-s3c/include/mach/io.h
diff --git a/arch/arm/mach-s3c24xx/include/mach/irqs.h b/arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/irqs.h
rename to arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/irqs.h b/arch/arm/mach-s3c/include/mach/irqs-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/irqs.h
rename to arch/arm/mach-s3c/include/mach/irqs-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/irqs.h b/arch/arm/mach-s3c/include/mach/irqs.h
new file mode 100644
index 000000000000..a33732f701b4
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/irqs.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "irqs-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "irqs-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/map.h b/arch/arm/mach-s3c/include/mach/map-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/map.h
rename to arch/arm/mach-s3c/include/mach/map-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/map.h b/arch/arm/mach-s3c/include/mach/map-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/map.h
rename to arch/arm/mach-s3c/include/mach/map-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/map.h b/arch/arm/mach-s3c/include/mach/map.h
new file mode 100644
index 000000000000..e6d05f1e2d8f
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/map.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "map-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "map-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/pm-core.h b/arch/arm/mach-s3c/include/mach/pm-core-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/pm-core.h
rename to arch/arm/mach-s3c/include/mach/pm-core-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/pm-core.h b/arch/arm/mach-s3c/include/mach/pm-core-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/pm-core.h
rename to arch/arm/mach-s3c/include/mach/pm-core-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/pm-core.h b/arch/arm/mach-s3c/include/mach/pm-core.h
new file mode 100644
index 000000000000..4cd57f940871
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/pm-core.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "pm-core-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "pm-core-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h b/arch/arm/mach-s3c/include/mach/regs-clock-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/regs-clock.h
rename to arch/arm/mach-s3c/include/mach/regs-clock-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-clock.h b/arch/arm/mach-s3c/include/mach/regs-clock-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/regs-clock.h
rename to arch/arm/mach-s3c/include/mach/regs-clock-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-clock.h b/arch/arm/mach-s3c/include/mach/regs-clock.h
new file mode 100644
index 000000000000..4aa8b4bf2bf4
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/regs-clock.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "regs-clock-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "regs-clock-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c/include/mach/regs-gpio-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
rename to arch/arm/mach-s3c/include/mach/regs-gpio-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c/include/mach/regs-gpio-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/regs-gpio.h
rename to arch/arm/mach-s3c/include/mach/regs-gpio-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-gpio.h b/arch/arm/mach-s3c/include/mach/regs-gpio.h
new file mode 100644
index 000000000000..6bdf7836ff3a
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/regs-gpio.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "regs-gpio-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "regs-gpio-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-irq.h b/arch/arm/mach-s3c/include/mach/regs-irq-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/regs-irq.h
rename to arch/arm/mach-s3c/include/mach/regs-irq-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-irq.h b/arch/arm/mach-s3c/include/mach/regs-irq-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/regs-irq.h
rename to arch/arm/mach-s3c/include/mach/regs-irq-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-irq.h b/arch/arm/mach-s3c/include/mach/regs-irq.h
new file mode 100644
index 000000000000..db1b7c821401
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/regs-irq.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "regs-irq-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "regs-irq-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c/include/mach/regs-s3c2443-clock.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
rename to arch/arm/mach-s3c/include/mach/regs-s3c2443-clock.h
diff --git a/arch/arm/mach-s3c24xx/include/mach/rtc-core.h b/arch/arm/mach-s3c/include/mach/rtc-core.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/rtc-core.h
rename to arch/arm/mach-s3c/include/mach/rtc-core.h
diff --git a/arch/arm/mach-s3c24xx/include/mach/s3c2412.h b/arch/arm/mach-s3c/include/mach/s3c2412.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/s3c2412.h
rename to arch/arm/mach-s3c/include/mach/s3c2412.h
diff --git a/arch/arm/plat-samsung/include/plat/adc-core.h b/arch/arm/mach-s3c/include/plat/adc-core.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/adc-core.h
rename to arch/arm/mach-s3c/include/plat/adc-core.h
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/mach-s3c/include/plat/cpu.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/cpu.h
rename to arch/arm/mach-s3c/include/plat/cpu.h
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/mach-s3c/include/plat/devs.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/devs.h
rename to arch/arm/mach-s3c/include/plat/devs.h
diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/mach-s3c/include/plat/fb.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/fb.h
rename to arch/arm/mach-s3c/include/plat/fb.h
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h b/arch/arm/mach-s3c/include/plat/gpio-cfg-helpers.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h
rename to arch/arm/mach-s3c/include/plat/gpio-cfg-helpers.h
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg.h b/arch/arm/mach-s3c/include/plat/gpio-cfg.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/gpio-cfg.h
rename to arch/arm/mach-s3c/include/plat/gpio-cfg.h
diff --git a/arch/arm/plat-samsung/include/plat/gpio-core.h b/arch/arm/mach-s3c/include/plat/gpio-core.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/gpio-core.h
rename to arch/arm/mach-s3c/include/plat/gpio-core.h
diff --git a/arch/arm/plat-samsung/include/plat/iic-core.h b/arch/arm/mach-s3c/include/plat/iic-core.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/iic-core.h
rename to arch/arm/mach-s3c/include/plat/iic-core.h
diff --git a/arch/arm/plat-samsung/include/plat/keypad.h b/arch/arm/mach-s3c/include/plat/keypad.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/keypad.h
rename to arch/arm/mach-s3c/include/plat/keypad.h
diff --git a/arch/arm/plat-samsung/include/plat/map-base.h b/arch/arm/mach-s3c/include/plat/map-base.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/map-base.h
rename to arch/arm/mach-s3c/include/plat/map-base.h
diff --git a/arch/arm/plat-samsung/include/plat/map-s3c.h b/arch/arm/mach-s3c/include/plat/map-s3c.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/map-s3c.h
rename to arch/arm/mach-s3c/include/plat/map-s3c.h
diff --git a/arch/arm/plat-samsung/include/plat/map-s5p.h b/arch/arm/mach-s3c/include/plat/map-s5p.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/map-s5p.h
rename to arch/arm/mach-s3c/include/plat/map-s5p.h
diff --git a/arch/arm/plat-samsung/include/plat/pm-common.h b/arch/arm/mach-s3c/include/plat/pm-common.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/pm-common.h
rename to arch/arm/mach-s3c/include/plat/pm-common.h
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/mach-s3c/include/plat/pm.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/pm.h
rename to arch/arm/mach-s3c/include/plat/pm.h
diff --git a/arch/arm/plat-samsung/include/plat/pwm-core.h b/arch/arm/mach-s3c/include/plat/pwm-core.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/pwm-core.h
rename to arch/arm/mach-s3c/include/plat/pwm-core.h
diff --git a/arch/arm/plat-samsung/include/plat/regs-adc.h b/arch/arm/mach-s3c/include/plat/regs-adc.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/regs-adc.h
rename to arch/arm/mach-s3c/include/plat/regs-adc.h
diff --git a/arch/arm/plat-samsung/include/plat/regs-irqtype.h b/arch/arm/mach-s3c/include/plat/regs-irqtype.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/regs-irqtype.h
rename to arch/arm/mach-s3c/include/plat/regs-irqtype.h
diff --git a/arch/arm/plat-samsung/include/plat/samsung-time.h b/arch/arm/mach-s3c/include/plat/samsung-time.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/samsung-time.h
rename to arch/arm/mach-s3c/include/plat/samsung-time.h
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/mach-s3c/include/plat/sdhci.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/sdhci.h
rename to arch/arm/mach-s3c/include/plat/sdhci.h
diff --git a/arch/arm/plat-samsung/include/plat/usb-phy.h b/arch/arm/mach-s3c/include/plat/usb-phy.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/usb-phy.h
rename to arch/arm/mach-s3c/include/plat/usb-phy.h
diff --git a/arch/arm/plat-samsung/include/plat/wakeup-mask.h b/arch/arm/mach-s3c/include/plat/wakeup-mask.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/wakeup-mask.h
rename to arch/arm/mach-s3c/include/plat/wakeup-mask.h
diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/mach-s3c/init.c
similarity index 100%
rename from arch/arm/plat-samsung/init.c
rename to arch/arm/mach-s3c/init.c
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c/iotiming-s3c2410.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/iotiming-s3c2410.c
rename to arch/arm/mach-s3c/iotiming-s3c2410.c
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c b/arch/arm/mach-s3c/iotiming-s3c2412.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/iotiming-s3c2412.c
rename to arch/arm/mach-s3c/iotiming-s3c2412.c
diff --git a/arch/arm/mach-s3c24xx/irq-pm.c b/arch/arm/mach-s3c/irq-pm-s3c24xx.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/irq-pm.c
rename to arch/arm/mach-s3c/irq-pm-s3c24xx.c
diff --git a/arch/arm/mach-s3c64xx/irq-pm.c b/arch/arm/mach-s3c/irq-pm-s3c64xx.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/irq-pm.c
rename to arch/arm/mach-s3c/irq-pm-s3c64xx.c
diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c b/arch/arm/mach-s3c/irq-s3c24xx-fiq-exports.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c
rename to arch/arm/mach-s3c/irq-s3c24xx-fiq-exports.c
diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S b/arch/arm/mach-s3c/irq-s3c24xx-fiq.S
similarity index 100%
rename from arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S
rename to arch/arm/mach-s3c/irq-s3c24xx-fiq.S
diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx.c b/arch/arm/mach-s3c/irq-s3c24xx.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/irq-s3c24xx.c
rename to arch/arm/mach-s3c/irq-s3c24xx.c
diff --git a/arch/arm/mach-s3c64xx/irq-uart.h b/arch/arm/mach-s3c/irq-uart.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/irq-uart.h
rename to arch/arm/mach-s3c/irq-uart.h
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c/mach-amlm5900.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-amlm5900.c
rename to arch/arm/mach-s3c/mach-amlm5900.c
index ef6de1b1d0c6..f9240081f840 100644
--- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
+++ b/arch/arm/mach-s3c/mach-amlm5900.c
@@ -47,7 +47,7 @@
 
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct resource amlm5900_nor_resource =
 			DEFINE_RES_MEM(0x00000000, SZ_16M);
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c/mach-anubis.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-anubis.c
rename to arch/arm/mach-s3c/mach-anubis.c
index e1a73274e90b..5cfb7aed9fe7 100644
--- a/arch/arm/mach-s3c24xx/mach-anubis.c
+++ b/arch/arm/mach-s3c/mach-anubis.c
@@ -46,7 +46,7 @@
 #include <plat/samsung-time.h>
 
 #include "anubis.h"
-#include "common.h"
+#include "s3c24xx.h"
 #include "simtec.h"
 
 #define COPYRIGHT ", Copyright 2005-2009 Simtec Electronics"
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c/mach-anw6410.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-anw6410.c
rename to arch/arm/mach-s3c/mach-anw6410.c
index 44858c5aea5d..9bf8c8791553 100644
--- a/arch/arm/mach-s3c64xx/mach-anw6410.c
+++ b/arch/arm/mach-s3c/mach-anw6410.c
@@ -45,7 +45,7 @@
 #include <mach/gpio-samsung.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "regs-modem.h"
 
 /* DM9000 */
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c/mach-at2440evb.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-at2440evb.c
rename to arch/arm/mach-s3c/mach-at2440evb.c
index bfda6dd2a9d5..2103c4c1059a 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c/mach-at2440evb.c
@@ -44,7 +44,7 @@
 #include <linux/platform_data/mmc-s3cmci.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct map_desc at2440evb_iodesc[] __initdata = {
 	/* Nothing here */
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c/mach-bast.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-bast.c
rename to arch/arm/mach-s3c/mach-bast.c
index b2f2d036bca2..6e363afbaab1 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c/mach-bast.c
@@ -52,7 +52,7 @@
 #include <plat/samsung-time.h>
 
 #include "bast.h"
-#include "common.h"
+#include "s3c24xx.h"
 #include "simtec.h"
 
 #define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics"
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c/mach-crag6410-module.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/mach-crag6410-module.c
rename to arch/arm/mach-s3c/mach-crag6410-module.c
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c/mach-crag6410.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-crag6410.c
rename to arch/arm/mach-s3c/mach-crag6410.c
index 133453562d23..947f344ac4d4 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c/mach-crag6410.c
@@ -62,7 +62,7 @@
 #include <plat/pm.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "crag6410.h"
 #include "regs-gpio-memport.h"
 #include "regs-modem.h"
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c/mach-gta02.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-gta02.c
rename to arch/arm/mach-s3c/mach-gta02.c
index 1e42782dbd30..bf0de248b489 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c/mach-gta02.c
@@ -70,7 +70,7 @@
 #include <plat/pm.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "gta02.h"
 
 static struct pcf50633 *gta02_pcf;
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c/mach-h1940.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-h1940.c
rename to arch/arm/mach-s3c/mach-h1940.c
index 287e42fc1665..6e329cb1a7ec 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c/mach-h1940.c
@@ -60,7 +60,7 @@
 #include <plat/pm.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "h1940.h"
 
 #define H1940_LATCH		((void __force __iomem *)0xF8000000)
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c/mach-hmt.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-hmt.c
rename to arch/arm/mach-s3c/mach-hmt.c
index a6634fd9e6c4..dd1b73c31956 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c/mach-hmt.c
@@ -40,7 +40,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 
 #define UCON S3C2410_UCON_DEFAULT
 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE)
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c/mach-jive.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-jive.c
rename to arch/arm/mach-s3c/mach-jive.c
index 8012c34bddd9..27f4c99172c6 100644
--- a/arch/arm/mach-s3c24xx/mach-jive.c
+++ b/arch/arm/mach-s3c/mach-jive.c
@@ -50,7 +50,7 @@
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "s3c2412-power.h"
 
 static struct map_desc jive_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c/mach-mini2440.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-mini2440.c
rename to arch/arm/mach-s3c/mach-mini2440.c
index 2301e07c7d64..4280d0a8c4e2 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c/mach-mini2440.c
@@ -55,7 +55,7 @@
 
 #include <sound/s3c24xx_uda134x.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 #define MACH_MINI2440_DM9K_BASE (S3C2410_CS4 + 0x300)
 
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c/mach-mini6410.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-mini6410.c
rename to arch/arm/mach-s3c/mach-mini6410.c
index c7140300bd3f..369325107ff1 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c/mach-mini6410.c
@@ -41,7 +41,7 @@
 #include <video/samsung_fimd.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "regs-modem.h"
 #include "regs-srom.h"
 
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c/mach-n30.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-n30.c
rename to arch/arm/mach-s3c/mach-n30.c
index 6b8ee5ba00ca..196f4cb17fbb 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c/mach-n30.c
@@ -49,7 +49,7 @@
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct map_desc n30_iodesc[] __initdata = {
 	/* nothing here yet */
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c/mach-ncp.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-ncp.c
rename to arch/arm/mach-s3c/mach-ncp.c
index 34a00b33fae9..6e2e30e2fee3 100644
--- a/arch/arm/mach-s3c64xx/mach-ncp.c
+++ b/arch/arm/mach-s3c/mach-ncp.c
@@ -37,7 +37,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 
 #define UCON S3C2410_UCON_DEFAULT
 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c/mach-nexcoder.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-nexcoder.c
rename to arch/arm/mach-s3c/mach-nexcoder.c
index a05c92b6de2e..9b281d1a5536 100644
--- a/arch/arm/mach-s3c24xx/mach-nexcoder.c
+++ b/arch/arm/mach-s3c/mach-nexcoder.c
@@ -42,7 +42,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct map_desc nexcoder_iodesc[] __initdata = {
 	/* nothing here yet */
diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c/mach-osiris-dvs.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/mach-osiris-dvs.c
rename to arch/arm/mach-s3c/mach-osiris-dvs.c
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c/mach-osiris.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-osiris.c
rename to arch/arm/mach-s3c/mach-osiris.c
index 674164264076..2aeeb2230b85 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c/mach-osiris.c
@@ -46,7 +46,7 @@
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "osiris.h"
 #include "regs-mem.h"
 
diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c/mach-otom.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-otom.c
rename to arch/arm/mach-s3c/mach-otom.c
index c834f16e5ba0..60917d1bf236 100644
--- a/arch/arm/mach-s3c24xx/mach-otom.c
+++ b/arch/arm/mach-s3c/mach-otom.c
@@ -31,7 +31,7 @@
 #include <plat/devs.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "otom.h"
 
 static struct map_desc otom11_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c/mach-qt2410.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-qt2410.c
rename to arch/arm/mach-s3c/mach-qt2410.c
index 1d0f5d65e7e5..db2ff1085718 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c/mach-qt2410.c
@@ -45,7 +45,7 @@
 #include <plat/pm.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "common-smdk.h"
 
 static struct map_desc qt2410_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c/mach-real6410.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-real6410.c
rename to arch/arm/mach-s3c/mach-real6410.c
index f55097fde94c..b72598b4ae27 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c/mach-real6410.c
@@ -40,7 +40,7 @@
 #include <video/samsung_fimd.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "regs-modem.h"
 #include "regs-srom.h"
 
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c/mach-rx1950.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-rx1950.c
rename to arch/arm/mach-s3c/mach-rx1950.c
index f94884090fbe..87d82c954523 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c/mach-rx1950.c
@@ -56,7 +56,7 @@
 #include <plat/samsung-time.h>
 #include <plat/gpio-cfg.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "h1940.h"
 
 #define LCD_PWM_PERIOD 192960
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c/mach-rx3715.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-rx3715.c
rename to arch/arm/mach-s3c/mach-rx3715.c
index 87f3274241b2..c810680669d4 100644
--- a/arch/arm/mach-s3c24xx/mach-rx3715.c
+++ b/arch/arm/mach-s3c/mach-rx3715.c
@@ -45,7 +45,7 @@
 #include <plat/pm.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "h1940.h"
 
 static struct map_desc rx3715_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c b/arch/arm/mach-s3c/mach-s3c2416-dt.c
similarity index 98%
rename from arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
rename to arch/arm/mach-s3c/mach-s3c2416-dt.c
index aa7102713b37..2924e230e79d 100644
--- a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
+++ b/arch/arm/mach-s3c/mach-s3c2416-dt.c
@@ -21,7 +21,7 @@
 #include <plat/cpu.h>
 #include <plat/pm.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static void __init s3c2416_dt_map_io(void)
 {
diff --git a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c b/arch/arm/mach-s3c/mach-s3c64xx-dt.c
similarity index 98%
rename from arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
rename to arch/arm/mach-s3c/mach-s3c64xx-dt.c
index 1724f5ea5c46..1b8b61edd40e 100644
--- a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
+++ b/arch/arm/mach-s3c/mach-s3c64xx-dt.c
@@ -11,7 +11,7 @@
 #include <plat/cpu.h>
 #include <mach/map.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "watchdog-reset.h"
 
 /*
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c/mach-smartq.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smartq.c
rename to arch/arm/mach-s3c/mach-smartq.c
index 951208f168e7..fa5f2ebc6dbc 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq.c
+++ b/arch/arm/mach-s3c/mach-smartq.c
@@ -35,7 +35,7 @@
 #include <video/platform_lcd.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "mach-smartq.h"
 #include "regs-modem.h"
 
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.h b/arch/arm/mach-s3c/mach-smartq.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/mach-smartq.h
rename to arch/arm/mach-s3c/mach-smartq.h
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c/mach-smartq5.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smartq5.c
rename to arch/arm/mach-s3c/mach-smartq5.c
index 44e9edb144fa..91560ed02738 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq5.c
+++ b/arch/arm/mach-s3c/mach-smartq5.c
@@ -25,7 +25,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "mach-smartq.h"
 
 static struct gpio_led smartq5_leds[] = {
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c/mach-smartq7.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smartq7.c
rename to arch/arm/mach-s3c/mach-smartq7.c
index 815ee7d0b5e3..9eadc837ba12 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq7.c
+++ b/arch/arm/mach-s3c/mach-smartq7.c
@@ -25,7 +25,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "mach-smartq.h"
 
 static struct gpio_led smartq7_leds[] = {
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2410.c b/arch/arm/mach-s3c/mach-smdk2410.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-smdk2410.c
rename to arch/arm/mach-s3c/mach-smdk2410.c
index 02adaac4d6df..35aa8ec7cc4f 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2410.c
+++ b/arch/arm/mach-s3c/mach-smdk2410.c
@@ -36,7 +36,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "common-smdk.h"
 
 static struct map_desc smdk2410_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c/mach-smdk2413.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-smdk2413.c
rename to arch/arm/mach-s3c/mach-smdk2413.c
index eec0d3dc4bb1..f2305961f7eb 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2413.c
+++ b/arch/arm/mach-s3c/mach-smdk2413.c
@@ -42,7 +42,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "common-smdk.h"
 
 static struct map_desc smdk2413_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c/mach-smdk2416.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-smdk2416.c
rename to arch/arm/mach-s3c/mach-smdk2416.c
index fbd3a8d96f94..7fd5df4cf7e3 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
+++ b/arch/arm/mach-s3c/mach-smdk2416.c
@@ -47,7 +47,7 @@
 
 #include <plat/fb.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "common-smdk.h"
 
 static struct map_desc smdk2416_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c/mach-smdk2440.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-smdk2440.c
rename to arch/arm/mach-s3c/mach-smdk2440.c
index b9b0f2a8c904..d72f86a68c84 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2440.c
+++ b/arch/arm/mach-s3c/mach-smdk2440.c
@@ -38,7 +38,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "common-smdk.h"
 
 static struct map_desc smdk2440_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c/mach-smdk2443.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-smdk2443.c
rename to arch/arm/mach-s3c/mach-smdk2443.c
index a4c1022678a9..b439dfabd421 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2443.c
+++ b/arch/arm/mach-s3c/mach-smdk2443.c
@@ -35,7 +35,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "common-smdk.h"
 
 static struct map_desc smdk2443_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c/mach-smdk6400.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smdk6400.c
rename to arch/arm/mach-s3c/mach-smdk6400.c
index 885158f0a304..a2a70c5f5667 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6400.c
+++ b/arch/arm/mach-s3c/mach-smdk6400.c
@@ -31,7 +31,7 @@
 #include <mach/gpio-samsung.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 
 #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c/mach-smdk6410.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smdk6410.c
rename to arch/arm/mach-s3c/mach-smdk6410.c
index 3042f6cbffd9..a80c2138e90b 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c/mach-smdk6410.c
@@ -66,7 +66,7 @@
 #include <plat/samsung-time.h>
 
 #include "backlight.h"
-#include "common.h"
+#include "s3c64xx.h"
 #include "regs-modem.h"
 #include "regs-srom.h"
 #include "regs-sys.h"
diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c/mach-tct_hammer.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-tct_hammer.c
rename to arch/arm/mach-s3c/mach-tct_hammer.c
index d6dbbe6759bc..f1ed79889e39 100644
--- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c/mach-tct_hammer.c
@@ -39,7 +39,7 @@
 #include <linux/mtd/physmap.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct resource tct_hammer_nor_resource =
 			DEFINE_RES_MEM(0x00000000, SZ_16M);
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c/mach-vr1000.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-vr1000.c
rename to arch/arm/mach-s3c/mach-vr1000.c
index ca2f874a637e..854783386a06 100644
--- a/arch/arm/mach-s3c24xx/mach-vr1000.c
+++ b/arch/arm/mach-s3c/mach-vr1000.c
@@ -44,7 +44,7 @@
 #include <plat/samsung-time.h>
 
 #include "bast.h"
-#include "common.h"
+#include "s3c24xx.h"
 #include "simtec.h"
 #include "vr1000.h"
 
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c/mach-vstms.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-vstms.c
rename to arch/arm/mach-s3c/mach-vstms.c
index 08acc556879b..7496271bb343 100644
--- a/arch/arm/mach-s3c24xx/mach-vstms.c
+++ b/arch/arm/mach-s3c/mach-vstms.c
@@ -42,7 +42,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct map_desc vstms_iodesc[] __initdata = {
 };
diff --git a/arch/arm/mach-s3c24xx/nand-core.h b/arch/arm/mach-s3c/nand-core.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/nand-core.h
rename to arch/arm/mach-s3c/nand-core.h
diff --git a/arch/arm/mach-s3c64xx/onenand-core.h b/arch/arm/mach-s3c/onenand-core.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/onenand-core.h
rename to arch/arm/mach-s3c/onenand-core.h
diff --git a/arch/arm/mach-s3c24xx/osiris.h b/arch/arm/mach-s3c/osiris.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/osiris.h
rename to arch/arm/mach-s3c/osiris.h
diff --git a/arch/arm/mach-s3c24xx/otom.h b/arch/arm/mach-s3c/otom.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/otom.h
rename to arch/arm/mach-s3c/otom.h
diff --git a/arch/arm/mach-s3c64xx/pl080.c b/arch/arm/mach-s3c/pl080.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/pl080.c
rename to arch/arm/mach-s3c/pl080.c
diff --git a/arch/arm/plat-samsung/platformdata.c b/arch/arm/mach-s3c/platformdata.c
similarity index 100%
rename from arch/arm/plat-samsung/platformdata.c
rename to arch/arm/mach-s3c/platformdata.c
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2410.c b/arch/arm/mach-s3c/pll-s3c2410.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pll-s3c2410.c
rename to arch/arm/mach-s3c/pll-s3c2410.c
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c/pll-s3c2440-12000000.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
rename to arch/arm/mach-s3c/pll-s3c2440-12000000.c
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c/pll-s3c2440-16934400.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
rename to arch/arm/mach-s3c/pll-s3c2440-16934400.c
diff --git a/arch/arm/plat-samsung/pm-common.c b/arch/arm/mach-s3c/pm-common.c
similarity index 100%
rename from arch/arm/plat-samsung/pm-common.c
rename to arch/arm/mach-s3c/pm-common.c
diff --git a/arch/arm/plat-samsung/pm-gpio.c b/arch/arm/mach-s3c/pm-gpio.c
similarity index 100%
rename from arch/arm/plat-samsung/pm-gpio.c
rename to arch/arm/mach-s3c/pm-gpio.c
diff --git a/arch/arm/mach-s3c24xx/pm-h1940.S b/arch/arm/mach-s3c/pm-h1940.S
similarity index 100%
rename from arch/arm/mach-s3c24xx/pm-h1940.S
rename to arch/arm/mach-s3c/pm-h1940.S
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2410.c b/arch/arm/mach-s3c/pm-s3c2410.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pm-s3c2410.c
rename to arch/arm/mach-s3c/pm-s3c2410.c
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2412.c b/arch/arm/mach-s3c/pm-s3c2412.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pm-s3c2412.c
rename to arch/arm/mach-s3c/pm-s3c2412.c
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2416.c b/arch/arm/mach-s3c/pm-s3c2416.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pm-s3c2416.c
rename to arch/arm/mach-s3c/pm-s3c2416.c
diff --git a/arch/arm/mach-s3c24xx/pm.c b/arch/arm/mach-s3c/pm-s3c24xx.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pm.c
rename to arch/arm/mach-s3c/pm-s3c24xx.c
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c/pm-s3c64xx.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/pm.c
rename to arch/arm/mach-s3c/pm-s3c64xx.c
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/mach-s3c/pm.c
similarity index 100%
rename from arch/arm/plat-samsung/pm.c
rename to arch/arm/mach-s3c/pm.c
diff --git a/arch/arm/mach-s3c24xx/regs-dsc.h b/arch/arm/mach-s3c/regs-dsc.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/regs-dsc.h
rename to arch/arm/mach-s3c/regs-dsc.h
diff --git a/arch/arm/mach-s3c64xx/regs-gpio-memport.h b/arch/arm/mach-s3c/regs-gpio-memport.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-gpio-memport.h
rename to arch/arm/mach-s3c/regs-gpio-memport.h
diff --git a/arch/arm/mach-s3c24xx/regs-mem.h b/arch/arm/mach-s3c/regs-mem.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/regs-mem.h
rename to arch/arm/mach-s3c/regs-mem.h
diff --git a/arch/arm/mach-s3c64xx/regs-modem.h b/arch/arm/mach-s3c/regs-modem.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-modem.h
rename to arch/arm/mach-s3c/regs-modem.h
diff --git a/arch/arm/mach-s3c64xx/regs-srom.h b/arch/arm/mach-s3c/regs-srom.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-srom.h
rename to arch/arm/mach-s3c/regs-srom.h
diff --git a/arch/arm/mach-s3c64xx/regs-sys.h b/arch/arm/mach-s3c/regs-sys.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-sys.h
rename to arch/arm/mach-s3c/regs-sys.h
diff --git a/arch/arm/mach-s3c64xx/regs-syscon-power.h b/arch/arm/mach-s3c/regs-syscon-power.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-syscon-power.h
rename to arch/arm/mach-s3c/regs-syscon-power.h
diff --git a/arch/arm/mach-s3c64xx/regs-usb-hsotg-phy.h b/arch/arm/mach-s3c/regs-usb-hsotg-phy.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-usb-hsotg-phy.h
rename to arch/arm/mach-s3c/regs-usb-hsotg-phy.h
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c/s3c2410.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/s3c2410.c
rename to arch/arm/mach-s3c/s3c2410.c
index 44bf3e1e77f1..0013125b03ee 100644
--- a/arch/arm/mach-s3c24xx/s3c2410.c
+++ b/arch/arm/mach-s3c/s3c2410.c
@@ -41,7 +41,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/gpio-cfg-helpers.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 /* Initial IO mappings */
 
diff --git a/arch/arm/mach-s3c24xx/s3c2412-power.h b/arch/arm/mach-s3c/s3c2412-power.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/s3c2412-power.h
rename to arch/arm/mach-s3c/s3c2412-power.h
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c/s3c2412.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/s3c2412.c
rename to arch/arm/mach-s3c/s3c2412.c
index 75648dcc2c1d..3599a2f01c1e 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c/s3c2412.c
@@ -37,7 +37,7 @@
 #include <plat/devs.h>
 #include <plat/pm.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "nand-core.h"
 #include "regs-dsc.h"
 #include "s3c2412-power.h"
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c/s3c2416.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/s3c2416.c
rename to arch/arm/mach-s3c/s3c2416.c
index ef2eace605e6..95c34fd36421 100644
--- a/arch/arm/mach-s3c24xx/s3c2416.c
+++ b/arch/arm/mach-s3c/s3c2416.c
@@ -46,7 +46,7 @@
 #include <plat/iic-core.h>
 #include <plat/adc-core.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "fb-core.h"
 #include "nand-core.h"
 #include "spi-core.h"
diff --git a/arch/arm/mach-s3c24xx/s3c2440.c b/arch/arm/mach-s3c/s3c2440.c
similarity index 98%
rename from arch/arm/mach-s3c24xx/s3c2440.c
rename to arch/arm/mach-s3c/s3c2440.c
index 451d9851b0a7..a7c2dcf50b21 100644
--- a/arch/arm/mach-s3c24xx/s3c2440.c
+++ b/arch/arm/mach-s3c/s3c2440.c
@@ -35,7 +35,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/gpio-cfg-helpers.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct device s3c2440_dev = {
 	.bus		= &s3c2440_subsys,
diff --git a/arch/arm/mach-s3c24xx/s3c2442.c b/arch/arm/mach-s3c/s3c2442.c
similarity index 98%
rename from arch/arm/mach-s3c24xx/s3c2442.c
rename to arch/arm/mach-s3c/s3c2442.c
index 432d68325c9d..ffef8a5e1a94 100644
--- a/arch/arm/mach-s3c24xx/s3c2442.c
+++ b/arch/arm/mach-s3c/s3c2442.c
@@ -35,7 +35,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/gpio-cfg-helpers.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct device s3c2442_dev = {
 	.bus		= &s3c2442_subsys,
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c/s3c2443.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/s3c2443.c
rename to arch/arm/mach-s3c/s3c2443.c
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c/s3c244x.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/s3c244x.c
rename to arch/arm/mach-s3c/s3c244x.c
index 0ca188d0ffe5..a013f3447777 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c/s3c244x.c
@@ -35,7 +35,7 @@
 #include <plat/cpu.h>
 #include <plat/pm.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "nand-core.h"
 #include "regs-dsc.h"
 
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c/s3c24xx.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/common.c
rename to arch/arm/mach-s3c/s3c24xx.c
index 42d828f48345..409f4c00c17f 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c/s3c24xx.c
@@ -38,7 +38,7 @@
 #include <plat/devs.h>
 #include <plat/pwm-core.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 /* table of supported CPUs */
 
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c/s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/common.h
rename to arch/arm/mach-s3c/s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c/s3c6400.c
similarity index 98%
rename from arch/arm/mach-s3c64xx/s3c6400.c
rename to arch/arm/mach-s3c/s3c6400.c
index d18af724c807..2f94515558bc 100644
--- a/arch/arm/mach-s3c64xx/s3c6400.c
+++ b/arch/arm/mach-s3c/s3c6400.c
@@ -35,7 +35,7 @@
 #include <plat/sdhci.h>
 #include <plat/iic-core.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "onenand-core.h"
 
 void __init s3c6400_map_io(void)
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c/s3c6410.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/s3c6410.c
rename to arch/arm/mach-s3c/s3c6410.c
index b1d725e55cd2..aa330d10e102 100644
--- a/arch/arm/mach-s3c64xx/s3c6410.c
+++ b/arch/arm/mach-s3c/s3c6410.c
@@ -39,7 +39,7 @@
 #include <plat/iic-core.h>
 
 #include "ata-core.h"
-#include "common.h"
+#include "s3c64xx.h"
 #include "onenand-core.h"
 
 void __init s3c6410_map_io(void)
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c/s3c64xx.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/common.c
rename to arch/arm/mach-s3c/s3c64xx.c
index 19d544f6808a..289b462a035d 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c/s3c64xx.c
@@ -46,7 +46,7 @@
 #include <plat/pwm-core.h>
 #include <plat/regs-irqtype.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "irq-uart.h"
 #include "watchdog-reset.h"
 
diff --git a/arch/arm/mach-s3c64xx/common.h b/arch/arm/mach-s3c/s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/common.h
rename to arch/arm/mach-s3c/s3c64xx.h
diff --git a/arch/arm/mach-s3c24xx/setup-camif.c b/arch/arm/mach-s3c/setup-camif.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-camif.c
rename to arch/arm/mach-s3c/setup-camif.c
diff --git a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c b/arch/arm/mach-s3c/setup-fb-24bpp.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-fb-24bpp.c
rename to arch/arm/mach-s3c/setup-fb-24bpp.c
diff --git a/arch/arm/mach-s3c24xx/setup-i2c.c b/arch/arm/mach-s3c/setup-i2c.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-i2c.c
rename to arch/arm/mach-s3c/setup-i2c.c
diff --git a/arch/arm/mach-s3c64xx/setup-i2c0.c b/arch/arm/mach-s3c/setup-i2c0.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-i2c0.c
rename to arch/arm/mach-s3c/setup-i2c0.c
diff --git a/arch/arm/mach-s3c64xx/setup-i2c1.c b/arch/arm/mach-s3c/setup-i2c1.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-i2c1.c
rename to arch/arm/mach-s3c/setup-i2c1.c
diff --git a/arch/arm/mach-s3c64xx/setup-ide.c b/arch/arm/mach-s3c/setup-ide.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-ide.c
rename to arch/arm/mach-s3c/setup-ide.c
diff --git a/arch/arm/mach-s3c64xx/setup-keypad.c b/arch/arm/mach-s3c/setup-keypad.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-keypad.c
rename to arch/arm/mach-s3c/setup-keypad.c
diff --git a/arch/arm/mach-s3c24xx/setup-sdhci-gpio.c b/arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-sdhci-gpio.c
rename to arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c
diff --git a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c b/arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
rename to arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c
diff --git a/arch/arm/mach-s3c24xx/setup-spi.c b/arch/arm/mach-s3c/setup-spi-s3c24xx.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-spi.c
rename to arch/arm/mach-s3c/setup-spi-s3c24xx.c
diff --git a/arch/arm/mach-s3c64xx/setup-spi.c b/arch/arm/mach-s3c/setup-spi-s3c64xx.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-spi.c
rename to arch/arm/mach-s3c/setup-spi-s3c64xx.c
diff --git a/arch/arm/mach-s3c24xx/setup-ts.c b/arch/arm/mach-s3c/setup-ts.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-ts.c
rename to arch/arm/mach-s3c/setup-ts.c
diff --git a/arch/arm/mach-s3c64xx/setup-usb-phy.c b/arch/arm/mach-s3c/setup-usb-phy.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-usb-phy.c
rename to arch/arm/mach-s3c/setup-usb-phy.c
diff --git a/arch/arm/mach-s3c24xx/simtec-audio.c b/arch/arm/mach-s3c/simtec-audio.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec-audio.c
rename to arch/arm/mach-s3c/simtec-audio.c
diff --git a/arch/arm/mach-s3c24xx/simtec-nor.c b/arch/arm/mach-s3c/simtec-nor.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec-nor.c
rename to arch/arm/mach-s3c/simtec-nor.c
diff --git a/arch/arm/mach-s3c24xx/simtec-pm.c b/arch/arm/mach-s3c/simtec-pm.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec-pm.c
rename to arch/arm/mach-s3c/simtec-pm.c
diff --git a/arch/arm/mach-s3c24xx/simtec-usb.c b/arch/arm/mach-s3c/simtec-usb.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec-usb.c
rename to arch/arm/mach-s3c/simtec-usb.c
diff --git a/arch/arm/mach-s3c24xx/simtec.h b/arch/arm/mach-s3c/simtec.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec.h
rename to arch/arm/mach-s3c/simtec.h
diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2410.S b/arch/arm/mach-s3c/sleep-s3c2410.S
similarity index 100%
rename from arch/arm/mach-s3c24xx/sleep-s3c2410.S
rename to arch/arm/mach-s3c/sleep-s3c2410.S
diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2412.S b/arch/arm/mach-s3c/sleep-s3c2412.S
similarity index 100%
rename from arch/arm/mach-s3c24xx/sleep-s3c2412.S
rename to arch/arm/mach-s3c/sleep-s3c2412.S
diff --git a/arch/arm/mach-s3c24xx/sleep.S b/arch/arm/mach-s3c/sleep-s3c24xx.S
similarity index 100%
rename from arch/arm/mach-s3c24xx/sleep.S
rename to arch/arm/mach-s3c/sleep-s3c24xx.S
diff --git a/arch/arm/mach-s3c64xx/sleep.S b/arch/arm/mach-s3c/sleep-s3c64xx.S
similarity index 100%
rename from arch/arm/mach-s3c64xx/sleep.S
rename to arch/arm/mach-s3c/sleep-s3c64xx.S
diff --git a/arch/arm/mach-s3c24xx/spi-core.h b/arch/arm/mach-s3c/spi-core.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/spi-core.h
rename to arch/arm/mach-s3c/spi-core.h
diff --git a/arch/arm/mach-s3c24xx/vr1000.h b/arch/arm/mach-s3c/vr1000.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/vr1000.h
rename to arch/arm/mach-s3c/vr1000.h
diff --git a/arch/arm/plat-samsung/wakeup-mask.c b/arch/arm/mach-s3c/wakeup-mask.c
similarity index 100%
rename from arch/arm/plat-samsung/wakeup-mask.c
rename to arch/arm/mach-s3c/wakeup-mask.c
diff --git a/arch/arm/plat-samsung/watchdog-reset.c b/arch/arm/mach-s3c/watchdog-reset.c
similarity index 100%
rename from arch/arm/plat-samsung/watchdog-reset.c
rename to arch/arm/mach-s3c/watchdog-reset.c
diff --git a/arch/arm/mach-s3c64xx/watchdog-reset.h b/arch/arm/mach-s3c/watchdog-reset.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/watchdog-reset.h
rename to arch/arm/mach-s3c/watchdog-reset.h
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 35/36] ARM: s3c: move into a common directory
  2019-10-10 21:07 ` [PATCH 35/36] ARM: s3c: move into a common directory Arnd Bergmann
@ 2019-10-10 21:07   ` Arnd Bergmann
  2019-10-23 14:05   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 21:07 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij, Arnd Bergmann

s3c24xx and s3c64xx have a lot in common, but are split across three
separate directories, which makes the interaction of the header files
more complicated than necessary.

Move all three directories into a new mach-s3c, with a minimal
set of changes to each file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 MAINTAINERS                                      | 16 +++++++---------
 arch/arm/Kconfig                                 |  5 +----
 arch/arm/Makefile                                |  5 +----
 arch/arm/{plat-samsung => mach-s3c}/Kconfig      |  3 +++
 .../Kconfig => mach-s3c/Kconfig.s3c24xx}         |  0
 .../Kconfig => mach-s3c/Kconfig.s3c64xx}         |  0
 arch/arm/{plat-samsung => mach-s3c}/Makefile     |  9 ++++++++-
 .../arm/{mach-s3c24xx => mach-s3c}/Makefile.boot |  0
 .../Makefile => mach-s3c/Makefile.s3c24xx}       | 10 +++++-----
 .../Makefile => mach-s3c/Makefile.s3c64xx}       | 14 +++++++-------
 arch/arm/{plat-samsung => mach-s3c}/adc.c        |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/anubis.h     |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/ata-core.h   |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/backlight.h  |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/bast-ide.c   |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/bast-irq.c   |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/bast.h       |  0
 .../arm/{mach-s3c24xx => mach-s3c}/common-smdk.c |  0
 .../arm/{mach-s3c24xx => mach-s3c}/common-smdk.h |  0
 arch/arm/{plat-samsung => mach-s3c}/cpu.c        |  0
 .../{mach-s3c24xx => mach-s3c}/cpufreq-utils.c   |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/cpuidle.c    |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/crag6410.h   |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/dev-audio.c  |  0
 .../{mach-s3c64xx => mach-s3c}/dev-backlight.c   |  0
 .../dev-uart.c => mach-s3c/dev-uart-s3c64xx.c}   |  0
 arch/arm/{plat-samsung => mach-s3c}/dev-uart.c   |  0
 arch/arm/{plat-samsung => mach-s3c}/devs.c       |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/fb-core.h    |  0
 .../{plat-samsung => mach-s3c}/gpio-samsung.c    |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/gta02.h      |  0
 .../{mach-s3c24xx => mach-s3c}/h1940-bluetooth.c |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/h1940.h      |  0
 .../include/mach/dma-s3c24xx.h}                  |  0
 .../include/mach/dma-s3c64xx.h}                  |  0
 arch/arm/mach-s3c/include/mach/dma.h             |  7 +++++++
 .../include/mach/gpio-samsung-s3c24xx.h}         |  0
 .../include/mach/gpio-samsung-s3c64xx.h}         |  0
 arch/arm/mach-s3c/include/mach/gpio-samsung.h    |  7 +++++++
 .../include/mach/hardware.h                      |  0
 .../{mach-s3c24xx => mach-s3c}/include/mach/io.h |  0
 .../include/mach/irqs-s3c24xx.h}                 |  0
 .../include/mach/irqs-s3c64xx.h}                 |  0
 arch/arm/mach-s3c/include/mach/irqs.h            |  7 +++++++
 .../include/mach/map-s3c24xx.h}                  |  0
 .../include/mach/map-s3c64xx.h}                  |  0
 arch/arm/mach-s3c/include/mach/map.h             |  7 +++++++
 .../include/mach/pm-core-s3c24xx.h}              |  0
 .../include/mach/pm-core-s3c64xx.h}              |  0
 arch/arm/mach-s3c/include/mach/pm-core.h         |  7 +++++++
 .../include/mach/regs-clock-s3c24xx.h}           |  0
 .../include/mach/regs-clock-s3c64xx.h}           |  0
 arch/arm/mach-s3c/include/mach/regs-clock.h      |  7 +++++++
 .../include/mach/regs-gpio-s3c24xx.h}            |  0
 .../include/mach/regs-gpio-s3c64xx.h}            |  0
 arch/arm/mach-s3c/include/mach/regs-gpio.h       |  7 +++++++
 .../include/mach/regs-irq-s3c24xx.h}             |  0
 .../include/mach/regs-irq-s3c64xx.h}             |  0
 arch/arm/mach-s3c/include/mach/regs-irq.h        |  7 +++++++
 .../include/mach/regs-s3c2443-clock.h            |  0
 .../include/mach/rtc-core.h                      |  0
 .../include/mach/s3c2412.h                       |  0
 .../include/plat/adc-core.h                      |  0
 .../include/plat/cpu.h                           |  0
 .../include/plat/devs.h                          |  0
 .../{plat-samsung => mach-s3c}/include/plat/fb.h |  0
 .../include/plat/gpio-cfg-helpers.h              |  0
 .../include/plat/gpio-cfg.h                      |  0
 .../include/plat/gpio-core.h                     |  0
 .../include/plat/iic-core.h                      |  0
 .../include/plat/keypad.h                        |  0
 .../include/plat/map-base.h                      |  0
 .../include/plat/map-s3c.h                       |  0
 .../include/plat/map-s5p.h                       |  0
 .../include/plat/pm-common.h                     |  0
 .../{plat-samsung => mach-s3c}/include/plat/pm.h |  0
 .../include/plat/pwm-core.h                      |  0
 .../include/plat/regs-adc.h                      |  0
 .../include/plat/regs-irqtype.h                  |  0
 .../include/plat/samsung-time.h                  |  0
 .../include/plat/sdhci.h                         |  0
 .../include/plat/usb-phy.h                       |  0
 .../include/plat/wakeup-mask.h                   |  0
 arch/arm/{plat-samsung => mach-s3c}/init.c       |  0
 .../iotiming-s3c2410.c                           |  0
 .../iotiming-s3c2412.c                           |  0
 .../irq-pm.c => mach-s3c/irq-pm-s3c24xx.c}       |  0
 .../irq-pm.c => mach-s3c/irq-pm-s3c64xx.c}       |  0
 .../irq-s3c24xx-fiq-exports.c                    |  0
 .../{mach-s3c24xx => mach-s3c}/irq-s3c24xx-fiq.S |  0
 .../arm/{mach-s3c24xx => mach-s3c}/irq-s3c24xx.c |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/irq-uart.h   |  0
 .../{mach-s3c24xx => mach-s3c}/mach-amlm5900.c   |  2 +-
 .../arm/{mach-s3c24xx => mach-s3c}/mach-anubis.c |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-anw6410.c    |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-at2440evb.c  |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-bast.c  |  2 +-
 .../mach-crag6410-module.c                       |  0
 .../{mach-s3c64xx => mach-s3c}/mach-crag6410.c   |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-gta02.c |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-h1940.c |  2 +-
 arch/arm/{mach-s3c64xx => mach-s3c}/mach-hmt.c   |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-jive.c  |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-mini2440.c   |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-mini6410.c   |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-n30.c   |  2 +-
 arch/arm/{mach-s3c64xx => mach-s3c}/mach-ncp.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-nexcoder.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-osiris-dvs.c |  0
 .../arm/{mach-s3c24xx => mach-s3c}/mach-osiris.c |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-otom.c  |  2 +-
 .../arm/{mach-s3c24xx => mach-s3c}/mach-qt2410.c |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-real6410.c   |  2 +-
 .../arm/{mach-s3c24xx => mach-s3c}/mach-rx1950.c |  2 +-
 .../arm/{mach-s3c24xx => mach-s3c}/mach-rx3715.c |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-s3c2416-dt.c |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-s3c64xx-dt.c |  2 +-
 .../arm/{mach-s3c64xx => mach-s3c}/mach-smartq.c |  2 +-
 .../arm/{mach-s3c64xx => mach-s3c}/mach-smartq.h |  0
 .../{mach-s3c64xx => mach-s3c}/mach-smartq5.c    |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smartq7.c    |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-smdk2410.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-smdk2413.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-smdk2416.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-smdk2440.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-smdk2443.c   |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smdk6400.c   |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smdk6410.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-tct_hammer.c |  2 +-
 .../arm/{mach-s3c24xx => mach-s3c}/mach-vr1000.c |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/mach-vstms.c |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/nand-core.h  |  0
 .../{mach-s3c64xx => mach-s3c}/onenand-core.h    |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/osiris.h     |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/otom.h       |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/pl080.c      |  0
 .../{plat-samsung => mach-s3c}/platformdata.c    |  0
 .../arm/{mach-s3c24xx => mach-s3c}/pll-s3c2410.c |  0
 .../pll-s3c2440-12000000.c                       |  0
 .../pll-s3c2440-16934400.c                       |  0
 arch/arm/{plat-samsung => mach-s3c}/pm-common.c  |  0
 arch/arm/{plat-samsung => mach-s3c}/pm-gpio.c    |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/pm-h1940.S   |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2410.c |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2412.c |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2416.c |  0
 .../{mach-s3c24xx/pm.c => mach-s3c/pm-s3c24xx.c} |  0
 .../{mach-s3c64xx/pm.c => mach-s3c/pm-s3c64xx.c} |  0
 arch/arm/{plat-samsung => mach-s3c}/pm.c         |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/regs-dsc.h   |  0
 .../regs-gpio-memport.h                          |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/regs-mem.h   |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/regs-modem.h |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/regs-srom.h  |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/regs-sys.h   |  0
 .../regs-syscon-power.h                          |  0
 .../regs-usb-hsotg-phy.h                         |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2410.c    |  2 +-
 .../{mach-s3c24xx => mach-s3c}/s3c2412-power.h   |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412.c    |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2416.c    |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2440.c    |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2442.c    |  2 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2443.c    |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c244x.c    |  2 +-
 .../common.c => mach-s3c/s3c24xx.c}              |  2 +-
 .../common.h => mach-s3c/s3c24xx.h}              |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/s3c6400.c    |  2 +-
 arch/arm/{mach-s3c64xx => mach-s3c}/s3c6410.c    |  2 +-
 .../common.c => mach-s3c/s3c64xx.c}              |  2 +-
 .../common.h => mach-s3c/s3c64xx.h}              |  0
 .../arm/{mach-s3c24xx => mach-s3c}/setup-camif.c |  0
 .../{mach-s3c64xx => mach-s3c}/setup-fb-24bpp.c  |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/setup-i2c.c  |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c0.c |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c1.c |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/setup-ide.c  |  0
 .../{mach-s3c64xx => mach-s3c}/setup-keypad.c    |  0
 .../setup-sdhci-gpio-s3c24xx.c}                  |  0
 .../setup-sdhci-gpio-s3c64xx.c}                  |  0
 .../setup-spi.c => mach-s3c/setup-spi-s3c24xx.c} |  0
 .../setup-spi.c => mach-s3c/setup-spi-s3c64xx.c} |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/setup-ts.c   |  0
 .../{mach-s3c64xx => mach-s3c}/setup-usb-phy.c   |  0
 .../{mach-s3c24xx => mach-s3c}/simtec-audio.c    |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/simtec-nor.c |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/simtec-pm.c  |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/simtec-usb.c |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/simtec.h     |  0
 .../{mach-s3c24xx => mach-s3c}/sleep-s3c2410.S   |  0
 .../{mach-s3c24xx => mach-s3c}/sleep-s3c2412.S   |  0
 .../sleep.S => mach-s3c/sleep-s3c24xx.S}         |  0
 .../sleep.S => mach-s3c/sleep-s3c64xx.S}         |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/spi-core.h   |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/vr1000.h     |  0
 .../arm/{plat-samsung => mach-s3c}/wakeup-mask.c |  0
 .../{plat-samsung => mach-s3c}/watchdog-reset.c  |  0
 .../{mach-s3c64xx => mach-s3c}/watchdog-reset.h  |  0
 198 files changed, 134 insertions(+), 76 deletions(-)
 rename arch/arm/{plat-samsung => mach-s3c}/Kconfig (98%)
 rename arch/arm/{mach-s3c24xx/Kconfig => mach-s3c/Kconfig.s3c24xx} (100%)
 rename arch/arm/{mach-s3c64xx/Kconfig => mach-s3c/Kconfig.s3c64xx} (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/Makefile (83%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/Makefile.boot (100%)
 rename arch/arm/{mach-s3c24xx/Makefile => mach-s3c/Makefile.s3c24xx} (92%)
 rename arch/arm/{mach-s3c64xx/Makefile => mach-s3c/Makefile.s3c64xx} (83%)
 rename arch/arm/{plat-samsung => mach-s3c}/adc.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/anubis.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/ata-core.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/backlight.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/bast-ide.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/bast-irq.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/bast.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/common-smdk.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/common-smdk.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/cpu.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/cpufreq-utils.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/cpuidle.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/crag6410.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/dev-audio.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/dev-backlight.c (100%)
 rename arch/arm/{mach-s3c64xx/dev-uart.c => mach-s3c/dev-uart-s3c64xx.c} (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/dev-uart.c (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/devs.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/fb-core.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/gpio-samsung.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/gta02.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/h1940-bluetooth.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/h1940.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach/dma.h => mach-s3c/include/mach/dma-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/dma.h => mach-s3c/include/mach/dma-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/dma.h
 rename arch/arm/{mach-s3c24xx/include/mach/gpio-samsung.h => mach-s3c/include/mach/gpio-samsung-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/gpio-samsung.h => mach-s3c/include/mach/gpio-samsung-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/gpio-samsung.h
 rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/hardware.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/io.h (100%)
 rename arch/arm/{mach-s3c24xx/include/mach/irqs.h => mach-s3c/include/mach/irqs-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/irqs.h => mach-s3c/include/mach/irqs-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/irqs.h
 rename arch/arm/{mach-s3c24xx/include/mach/map.h => mach-s3c/include/mach/map-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/map.h => mach-s3c/include/mach/map-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/map.h
 rename arch/arm/{mach-s3c24xx/include/mach/pm-core.h => mach-s3c/include/mach/pm-core-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/pm-core.h => mach-s3c/include/mach/pm-core-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/pm-core.h
 rename arch/arm/{mach-s3c24xx/include/mach/regs-clock.h => mach-s3c/include/mach/regs-clock-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/regs-clock.h => mach-s3c/include/mach/regs-clock-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/regs-clock.h
 rename arch/arm/{mach-s3c24xx/include/mach/regs-gpio.h => mach-s3c/include/mach/regs-gpio-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/regs-gpio.h => mach-s3c/include/mach/regs-gpio-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/regs-gpio.h
 rename arch/arm/{mach-s3c24xx/include/mach/regs-irq.h => mach-s3c/include/mach/regs-irq-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/include/mach/regs-irq.h => mach-s3c/include/mach/regs-irq-s3c64xx.h} (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/regs-irq.h
 rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/regs-s3c2443-clock.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/rtc-core.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/s3c2412.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/adc-core.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/cpu.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/devs.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/fb.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/gpio-cfg-helpers.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/gpio-cfg.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/gpio-core.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/iic-core.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/keypad.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/map-base.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/map-s3c.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/map-s5p.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/pm-common.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/pm.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/pwm-core.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/regs-adc.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/regs-irqtype.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/samsung-time.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/sdhci.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/usb-phy.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/include/plat/wakeup-mask.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/init.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/iotiming-s3c2410.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/iotiming-s3c2412.c (100%)
 rename arch/arm/{mach-s3c24xx/irq-pm.c => mach-s3c/irq-pm-s3c24xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/irq-pm.c => mach-s3c/irq-pm-s3c64xx.c} (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/irq-s3c24xx-fiq-exports.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/irq-s3c24xx-fiq.S (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/irq-s3c24xx.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/irq-uart.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-amlm5900.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-anubis.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-anw6410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-at2440evb.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-bast.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-crag6410-module.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-crag6410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-gta02.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-h1940.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-hmt.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-jive.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-mini2440.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-mini6410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-n30.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-ncp.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-nexcoder.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-osiris-dvs.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-osiris.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-otom.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-qt2410.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-real6410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-rx1950.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-rx3715.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-s3c2416-dt.c (98%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-s3c64xx-dt.c (98%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq5.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq7.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2413.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2416.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2440.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2443.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smdk6400.c (99%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smdk6410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-tct_hammer.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-vr1000.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-vstms.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/nand-core.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/onenand-core.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/osiris.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/otom.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/pl080.c (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/platformdata.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2410.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2440-12000000.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2440-16934400.c (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/pm-common.c (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/pm-gpio.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-h1940.S (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2410.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2412.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2416.c (100%)
 rename arch/arm/{mach-s3c24xx/pm.c => mach-s3c/pm-s3c24xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/pm.c => mach-s3c/pm-s3c64xx.c} (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/pm.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/regs-dsc.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-gpio-memport.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/regs-mem.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-modem.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-srom.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-sys.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-syscon-power.h (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-usb-hsotg-phy.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2410.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412-power.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2416.c (99%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2440.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2442.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2443.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c244x.c (99%)
 rename arch/arm/{mach-s3c24xx/common.c => mach-s3c/s3c24xx.c} (99%)
 rename arch/arm/{mach-s3c24xx/common.h => mach-s3c/s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/s3c6400.c (98%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/s3c6410.c (99%)
 rename arch/arm/{mach-s3c64xx/common.c => mach-s3c/s3c64xx.c} (99%)
 rename arch/arm/{mach-s3c64xx/common.h => mach-s3c/s3c64xx.h} (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-camif.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-fb-24bpp.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-i2c.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c0.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c1.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-ide.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-keypad.c (100%)
 rename arch/arm/{mach-s3c24xx/setup-sdhci-gpio.c => mach-s3c/setup-sdhci-gpio-s3c24xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/setup-sdhci-gpio.c => mach-s3c/setup-sdhci-gpio-s3c64xx.c} (100%)
 rename arch/arm/{mach-s3c24xx/setup-spi.c => mach-s3c/setup-spi-s3c24xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/setup-spi.c => mach-s3c/setup-spi-s3c64xx.c} (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-ts.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-usb-phy.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-audio.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-nor.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-pm.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-usb.c (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/sleep-s3c2410.S (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/sleep-s3c2412.S (100%)
 rename arch/arm/{mach-s3c24xx/sleep.S => mach-s3c/sleep-s3c24xx.S} (100%)
 rename arch/arm/{mach-s3c64xx/sleep.S => mach-s3c/sleep-s3c64xx.S} (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/spi-core.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/vr1000.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/wakeup-mask.c (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/watchdog-reset.c (100%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/watchdog-reset.h (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 55199ef7fa74..e7bcb4189047 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2042,8 +2042,8 @@ ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT
 L:	openmoko-kernel@lists.openmoko.org (subscribers-only)
 W:	http://wiki.openmoko.org/wiki/Neo_FreeRunner
 S:	Orphan
-F:	arch/arm/mach-s3c24xx/mach-gta02.c
-F:	arch/arm/mach-s3c24xx/gta02.h
+F:	arch/arm/mach-s3c/mach-gta02.c
+F:	arch/arm/mach-s3c/gta02.h
 
 ARM/Orion SoC/Technologic Systems TS-78xx platform support
 M:	Alexander Clouter <alex@digriz.org.uk>
@@ -2221,9 +2221,7 @@ F:	arch/arm/boot/dts/s3c*
 F:	arch/arm/boot/dts/s5p*
 F:	arch/arm/boot/dts/exynos*
 F:	arch/arm64/boot/dts/exynos/
-F:	arch/arm/plat-samsung/
-F:	arch/arm/mach-s3c24*/
-F:	arch/arm/mach-s3c64xx/
+F:	arch/arm/mach-s3c/
 F:	arch/arm/mach-s5p*/
 F:	arch/arm/mach-exynos*/
 F:	drivers/*/*s3c24*
@@ -14846,9 +14844,9 @@ P:	Vincent Sanders <vince@simtec.co.uk>
 M:	Simtec Linux Team <linux@simtec.co.uk>
 W:	http://www.simtec.co.uk/products/EB2410ITX/
 S:	Supported
-F:	arch/arm/mach-s3c24xx/mach-bast.c
-F:	arch/arm/mach-s3c24xx/bast-ide.c
-F:	arch/arm/mach-s3c24xx/bast-irq.c
+F:	arch/arm/mach-s3c/mach-bast.c
+F:	arch/arm/mach-s3c/bast-ide.c
+F:	arch/arm/mach-s3c/bast-irq.c
 
 SIPHASH PRF ROUTINES
 M:	Jason A. Donenfeld <Jason@zx2c4.com>
@@ -17600,7 +17598,7 @@ F:	Documentation/devicetree/bindings/regulator/arizona-regulator.txt
 F:	Documentation/devicetree/bindings/mfd/arizona.txt
 F:	Documentation/devicetree/bindings/mfd/wm831x.txt
 F:	Documentation/devicetree/bindings/sound/wlf,arizona.txt
-F:	arch/arm/mach-s3c64xx/mach-crag6410*
+F:	arch/arm/mach-s3c/mach-crag6410*
 F:	drivers/clk/clk-wm83*.c
 F:	drivers/extcon/extcon-arizona.c
 F:	drivers/leds/leds-wm83*.c
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 8a50efb559f3..6ea9594794c8 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -635,7 +635,6 @@ source "arch/arm/mach-dove/Kconfig"
 source "arch/arm/mach-ep93xx/Kconfig"
 
 source "arch/arm/mach-exynos/Kconfig"
-source "arch/arm/plat-samsung/Kconfig"
 
 source "arch/arm/mach-footbridge/Kconfig"
 
@@ -704,9 +703,7 @@ source "arch/arm/mach-realview/Kconfig"
 
 source "arch/arm/mach-rockchip/Kconfig"
 
-source "arch/arm/mach-s3c24xx/Kconfig"
-
-source "arch/arm/mach-s3c64xx/Kconfig"
+source "arch/arm/mach-s3c/Kconfig"
 
 source "arch/arm/mach-s5pv210/Kconfig"
 
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index a1bc15cda751..92ffc17119d6 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -210,8 +210,7 @@ machine-$(CONFIG_ARCH_RDA)		+= rda
 machine-$(CONFIG_ARCH_REALVIEW)		+= realview
 machine-$(CONFIG_ARCH_ROCKCHIP)		+= rockchip
 machine-$(CONFIG_ARCH_RPC)		+= rpc
-machine-$(CONFIG_ARCH_S3C24XX)		+= s3c24xx
-machine-$(CONFIG_ARCH_S3C64XX)		+= s3c64xx
+machine-$(CONFIG_PLAT_SAMSUNG)		+= s3c
 machine-$(CONFIG_ARCH_S5PV210)		+= s5pv210
 machine-$(CONFIG_ARCH_SA1100)		+= sa1100
 machine-$(CONFIG_ARCH_RENESAS)	 	+= shmobile
@@ -234,10 +233,8 @@ machine-$(CONFIG_PLAT_SPEAR)		+= spear
 # Platform directory name.  This list is sorted alphanumerically
 # by CONFIG_* macro name.
 plat-$(CONFIG_ARCH_OMAP)	+= omap
-plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
 plat-$(CONFIG_PLAT_ORION)	+= orion
 plat-$(CONFIG_PLAT_PXA)		+= pxa
-plat-$(CONFIG_PLAT_S3C24XX)	+= samsung
 plat-$(CONFIG_PLAT_VERSATILE)	+= versatile
 
 ifeq ($(CONFIG_ARCH_EBSA110),y)
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/mach-s3c/Kconfig
similarity index 98%
rename from arch/arm/plat-samsung/Kconfig
rename to arch/arm/mach-s3c/Kconfig
index 1530946cc672..bf73d2481104 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/mach-s3c/Kconfig
@@ -2,6 +2,9 @@
 #
 # Copyright 2009 Simtec Electronics
 
+source "arch/arm/mach-s3c/Kconfig.s3c24xx"
+source "arch/arm/mach-s3c/Kconfig.s3c64xx"
+
 config PLAT_SAMSUNG
 	bool
 	depends on PLAT_S3C24XX || ARCH_S3C64XX
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c/Kconfig.s3c24xx
similarity index 100%
rename from arch/arm/mach-s3c24xx/Kconfig
rename to arch/arm/mach-s3c/Kconfig.s3c24xx
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c/Kconfig.s3c64xx
similarity index 100%
rename from arch/arm/mach-s3c64xx/Kconfig
rename to arch/arm/mach-s3c/Kconfig.s3c64xx
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/mach-s3c/Makefile
similarity index 83%
rename from arch/arm/plat-samsung/Makefile
rename to arch/arm/mach-s3c/Makefile
index 025ce22876c1..975c24ae534c 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/mach-s3c/Makefile
@@ -2,9 +2,16 @@
 #
 # Copyright 2009 Simtec Electronics
 
-ccflags-$(CONFIG_ARCH_S3C64XX) := -I$(srctree)/arch/arm/mach-s3c64xx/include
 ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include
 
+ifdef CONFIG_ARCH_S3C24XX
+include $(src)/Makefile.s3c24xx
+endif
+
+ifdef CONFIG_ARCH_S3C64XX
+include $(src)/Makefile.s3c64xx
+endif
+
 # Objects we always build independent of SoC choice
 
 obj-y				+= init.o cpu.o
diff --git a/arch/arm/mach-s3c24xx/Makefile.boot b/arch/arm/mach-s3c/Makefile.boot
similarity index 100%
rename from arch/arm/mach-s3c24xx/Makefile.boot
rename to arch/arm/mach-s3c/Makefile.boot
diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c/Makefile.s3c24xx
similarity index 92%
rename from arch/arm/mach-s3c24xx/Makefile
rename to arch/arm/mach-s3c/Makefile.s3c24xx
index 195a4cb23ecb..2235f5b66a51 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c/Makefile.s3c24xx
@@ -7,7 +7,7 @@
 
 # core
 
-obj-y				+= common.o
+obj-y				+= s3c24xx.o
 obj-y				+= irq-s3c24xx.o
 obj-$(CONFIG_SPI_S3C24XX_FIQ)	+= irq-s3c24xx-fiq.o
 obj-$(CONFIG_SPI_S3C24XX_FIQ)	+= irq-s3c24xx-fiq-exports.o
@@ -33,8 +33,8 @@ obj-$(CONFIG_CPU_S3C2443)	+= s3c2443.o
 
 # PM
 
-obj-$(CONFIG_PM)		+= pm.o
-obj-$(CONFIG_PM_SLEEP)		+= irq-pm.o sleep.o
+obj-$(CONFIG_PM)		+= pm-s3c24xx.o
+obj-$(CONFIG_PM_SLEEP)		+= irq-pm-s3c24xx.o sleep-s3c24xx.o
 
 # common code
 
@@ -96,8 +96,8 @@ obj-$(CONFIG_MACH_OSIRIS_DVS)		+= mach-osiris-dvs.o
 
 # device setup
 
-obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio.o
-obj-$(CONFIG_S3C2443_SETUP_SPI)		+= setup-spi.o
+obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio-s3c24xx.o
+obj-$(CONFIG_S3C2443_SETUP_SPI)		+= setup-spi-s3c24xx.o
 obj-$(CONFIG_ARCH_S3C24XX)		+= setup-i2c.o
 obj-$(CONFIG_S3C24XX_SETUP_TS)		+= setup-ts.o
 obj-$(CONFIG_S3C_SETUP_CAMIF)		+= setup-camif.o
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c/Makefile.s3c64xx
similarity index 83%
rename from arch/arm/mach-s3c64xx/Makefile
rename to arch/arm/mach-s3c/Makefile.s3c64xx
index 8caeb4ad17e9..fc4e2bb2bbd1 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c/Makefile.s3c64xx
@@ -8,17 +8,17 @@ asflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include -I$(srctree)
 
 # PM
 
-obj-$(CONFIG_PM)		+= pm.o
-obj-$(CONFIG_PM_SLEEP)		+= sleep.o
+obj-$(CONFIG_PM)		+= pm-s3c64xx.o
+obj-$(CONFIG_PM_SLEEP)		+= sleep-s3c64xx.o
 obj-$(CONFIG_CPU_IDLE)		+= cpuidle.o
 
 ifdef CONFIG_SAMSUNG_ATAGS
 
-obj-$(CONFIG_PM_SLEEP)          += irq-pm.o
+obj-$(CONFIG_PM_SLEEP)          += irq-pm-s3c64xx.o
 
 # Core
 
-obj-y				+= common.o
+obj-y				+= s3c64xx.o
 obj-$(CONFIG_CPU_S3C6400)	+= s3c6400.o
 obj-$(CONFIG_CPU_S3C6410)	+= s3c6410.o
 
@@ -28,7 +28,7 @@ obj-$(CONFIG_S3C64XX_PL080)	+= pl080.o
 
 # Device support
 
-obj-y				+= dev-uart.o
+obj-y				+= dev-uart-s3c64xx.o
 obj-y				+= dev-audio.o
 
 # Device setup
@@ -38,8 +38,8 @@ obj-$(CONFIG_S3C64XX_SETUP_I2C0)	+= setup-i2c0.o
 obj-$(CONFIG_S3C64XX_SETUP_I2C1)	+= setup-i2c1.o
 obj-$(CONFIG_S3C64XX_SETUP_IDE)		+= setup-ide.o
 obj-$(CONFIG_S3C64XX_SETUP_KEYPAD)	+= setup-keypad.o
-obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio.o
-obj-$(CONFIG_S3C64XX_SETUP_SPI)		+= setup-spi.o
+obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio-s3c64xx.o
+obj-$(CONFIG_S3C64XX_SETUP_SPI)		+= setup-spi-s3c64xx.o
 obj-$(CONFIG_S3C64XX_SETUP_USB_PHY) += setup-usb-phy.o
 
 obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT)	+= dev-backlight.o
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/mach-s3c/adc.c
similarity index 100%
rename from arch/arm/plat-samsung/adc.c
rename to arch/arm/mach-s3c/adc.c
diff --git a/arch/arm/mach-s3c24xx/anubis.h b/arch/arm/mach-s3c/anubis.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/anubis.h
rename to arch/arm/mach-s3c/anubis.h
diff --git a/arch/arm/mach-s3c64xx/ata-core.h b/arch/arm/mach-s3c/ata-core.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/ata-core.h
rename to arch/arm/mach-s3c/ata-core.h
diff --git a/arch/arm/mach-s3c64xx/backlight.h b/arch/arm/mach-s3c/backlight.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/backlight.h
rename to arch/arm/mach-s3c/backlight.h
diff --git a/arch/arm/mach-s3c24xx/bast-ide.c b/arch/arm/mach-s3c/bast-ide.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/bast-ide.c
rename to arch/arm/mach-s3c/bast-ide.c
diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c/bast-irq.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/bast-irq.c
rename to arch/arm/mach-s3c/bast-irq.c
diff --git a/arch/arm/mach-s3c24xx/bast.h b/arch/arm/mach-s3c/bast.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/bast.h
rename to arch/arm/mach-s3c/bast.h
diff --git a/arch/arm/mach-s3c24xx/common-smdk.c b/arch/arm/mach-s3c/common-smdk.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/common-smdk.c
rename to arch/arm/mach-s3c/common-smdk.c
diff --git a/arch/arm/mach-s3c24xx/common-smdk.h b/arch/arm/mach-s3c/common-smdk.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/common-smdk.h
rename to arch/arm/mach-s3c/common-smdk.h
diff --git a/arch/arm/plat-samsung/cpu.c b/arch/arm/mach-s3c/cpu.c
similarity index 100%
rename from arch/arm/plat-samsung/cpu.c
rename to arch/arm/mach-s3c/cpu.c
diff --git a/arch/arm/mach-s3c24xx/cpufreq-utils.c b/arch/arm/mach-s3c/cpufreq-utils.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/cpufreq-utils.c
rename to arch/arm/mach-s3c/cpufreq-utils.c
diff --git a/arch/arm/mach-s3c64xx/cpuidle.c b/arch/arm/mach-s3c/cpuidle.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/cpuidle.c
rename to arch/arm/mach-s3c/cpuidle.c
diff --git a/arch/arm/mach-s3c64xx/crag6410.h b/arch/arm/mach-s3c/crag6410.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/crag6410.h
rename to arch/arm/mach-s3c/crag6410.h
diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c/dev-audio.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/dev-audio.c
rename to arch/arm/mach-s3c/dev-audio.c
diff --git a/arch/arm/mach-s3c64xx/dev-backlight.c b/arch/arm/mach-s3c/dev-backlight.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/dev-backlight.c
rename to arch/arm/mach-s3c/dev-backlight.c
diff --git a/arch/arm/mach-s3c64xx/dev-uart.c b/arch/arm/mach-s3c/dev-uart-s3c64xx.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/dev-uart.c
rename to arch/arm/mach-s3c/dev-uart-s3c64xx.c
diff --git a/arch/arm/plat-samsung/dev-uart.c b/arch/arm/mach-s3c/dev-uart.c
similarity index 100%
rename from arch/arm/plat-samsung/dev-uart.c
rename to arch/arm/mach-s3c/dev-uart.c
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/mach-s3c/devs.c
similarity index 100%
rename from arch/arm/plat-samsung/devs.c
rename to arch/arm/mach-s3c/devs.c
diff --git a/arch/arm/mach-s3c24xx/fb-core.h b/arch/arm/mach-s3c/fb-core.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/fb-core.h
rename to arch/arm/mach-s3c/fb-core.h
diff --git a/arch/arm/plat-samsung/gpio-samsung.c b/arch/arm/mach-s3c/gpio-samsung.c
similarity index 100%
rename from arch/arm/plat-samsung/gpio-samsung.c
rename to arch/arm/mach-s3c/gpio-samsung.c
diff --git a/arch/arm/mach-s3c24xx/gta02.h b/arch/arm/mach-s3c/gta02.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/gta02.h
rename to arch/arm/mach-s3c/gta02.h
diff --git a/arch/arm/mach-s3c24xx/h1940-bluetooth.c b/arch/arm/mach-s3c/h1940-bluetooth.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/h1940-bluetooth.c
rename to arch/arm/mach-s3c/h1940-bluetooth.c
diff --git a/arch/arm/mach-s3c24xx/h1940.h b/arch/arm/mach-s3c/h1940.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/h1940.h
rename to arch/arm/mach-s3c/h1940.h
diff --git a/arch/arm/mach-s3c24xx/include/mach/dma.h b/arch/arm/mach-s3c/include/mach/dma-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/dma.h
rename to arch/arm/mach-s3c/include/mach/dma-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/dma.h b/arch/arm/mach-s3c/include/mach/dma-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/dma.h
rename to arch/arm/mach-s3c/include/mach/dma-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/dma.h b/arch/arm/mach-s3c/include/mach/dma.h
new file mode 100644
index 000000000000..54e11d4cb272
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/dma.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "dma-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "dma-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h b/arch/arm/mach-s3c/include/mach/gpio-samsung-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
rename to arch/arm/mach-s3c/include/mach/gpio-samsung-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio-samsung.h b/arch/arm/mach-s3c/include/mach/gpio-samsung-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/gpio-samsung.h
rename to arch/arm/mach-s3c/include/mach/gpio-samsung-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/gpio-samsung.h b/arch/arm/mach-s3c/include/mach/gpio-samsung.h
new file mode 100644
index 000000000000..ac29f8ac0c9c
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/gpio-samsung.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "gpio-samsung-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "gpio-samsung-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/hardware.h b/arch/arm/mach-s3c/include/mach/hardware.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/hardware.h
rename to arch/arm/mach-s3c/include/mach/hardware.h
diff --git a/arch/arm/mach-s3c24xx/include/mach/io.h b/arch/arm/mach-s3c/include/mach/io.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/io.h
rename to arch/arm/mach-s3c/include/mach/io.h
diff --git a/arch/arm/mach-s3c24xx/include/mach/irqs.h b/arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/irqs.h
rename to arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/irqs.h b/arch/arm/mach-s3c/include/mach/irqs-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/irqs.h
rename to arch/arm/mach-s3c/include/mach/irqs-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/irqs.h b/arch/arm/mach-s3c/include/mach/irqs.h
new file mode 100644
index 000000000000..a33732f701b4
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/irqs.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "irqs-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "irqs-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/map.h b/arch/arm/mach-s3c/include/mach/map-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/map.h
rename to arch/arm/mach-s3c/include/mach/map-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/map.h b/arch/arm/mach-s3c/include/mach/map-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/map.h
rename to arch/arm/mach-s3c/include/mach/map-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/map.h b/arch/arm/mach-s3c/include/mach/map.h
new file mode 100644
index 000000000000..e6d05f1e2d8f
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/map.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "map-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "map-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/pm-core.h b/arch/arm/mach-s3c/include/mach/pm-core-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/pm-core.h
rename to arch/arm/mach-s3c/include/mach/pm-core-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/pm-core.h b/arch/arm/mach-s3c/include/mach/pm-core-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/pm-core.h
rename to arch/arm/mach-s3c/include/mach/pm-core-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/pm-core.h b/arch/arm/mach-s3c/include/mach/pm-core.h
new file mode 100644
index 000000000000..4cd57f940871
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/pm-core.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "pm-core-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "pm-core-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h b/arch/arm/mach-s3c/include/mach/regs-clock-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/regs-clock.h
rename to arch/arm/mach-s3c/include/mach/regs-clock-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-clock.h b/arch/arm/mach-s3c/include/mach/regs-clock-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/regs-clock.h
rename to arch/arm/mach-s3c/include/mach/regs-clock-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-clock.h b/arch/arm/mach-s3c/include/mach/regs-clock.h
new file mode 100644
index 000000000000..4aa8b4bf2bf4
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/regs-clock.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "regs-clock-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "regs-clock-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c/include/mach/regs-gpio-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
rename to arch/arm/mach-s3c/include/mach/regs-gpio-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c/include/mach/regs-gpio-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/regs-gpio.h
rename to arch/arm/mach-s3c/include/mach/regs-gpio-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-gpio.h b/arch/arm/mach-s3c/include/mach/regs-gpio.h
new file mode 100644
index 000000000000..6bdf7836ff3a
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/regs-gpio.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "regs-gpio-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "regs-gpio-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-irq.h b/arch/arm/mach-s3c/include/mach/regs-irq-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/regs-irq.h
rename to arch/arm/mach-s3c/include/mach/regs-irq-s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-irq.h b/arch/arm/mach-s3c/include/mach/regs-irq-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/regs-irq.h
rename to arch/arm/mach-s3c/include/mach/regs-irq-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-irq.h b/arch/arm/mach-s3c/include/mach/regs-irq.h
new file mode 100644
index 000000000000..db1b7c821401
--- /dev/null
+++ b/arch/arm/mach-s3c/include/mach/regs-irq.h
@@ -0,0 +1,7 @@
+#ifdef CONFIG_ARCH_S3C24XX
+#include "regs-irq-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "regs-irq-s3c64xx.h"
+#endif
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c/include/mach/regs-s3c2443-clock.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
rename to arch/arm/mach-s3c/include/mach/regs-s3c2443-clock.h
diff --git a/arch/arm/mach-s3c24xx/include/mach/rtc-core.h b/arch/arm/mach-s3c/include/mach/rtc-core.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/rtc-core.h
rename to arch/arm/mach-s3c/include/mach/rtc-core.h
diff --git a/arch/arm/mach-s3c24xx/include/mach/s3c2412.h b/arch/arm/mach-s3c/include/mach/s3c2412.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/s3c2412.h
rename to arch/arm/mach-s3c/include/mach/s3c2412.h
diff --git a/arch/arm/plat-samsung/include/plat/adc-core.h b/arch/arm/mach-s3c/include/plat/adc-core.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/adc-core.h
rename to arch/arm/mach-s3c/include/plat/adc-core.h
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/mach-s3c/include/plat/cpu.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/cpu.h
rename to arch/arm/mach-s3c/include/plat/cpu.h
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/mach-s3c/include/plat/devs.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/devs.h
rename to arch/arm/mach-s3c/include/plat/devs.h
diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/mach-s3c/include/plat/fb.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/fb.h
rename to arch/arm/mach-s3c/include/plat/fb.h
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h b/arch/arm/mach-s3c/include/plat/gpio-cfg-helpers.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h
rename to arch/arm/mach-s3c/include/plat/gpio-cfg-helpers.h
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg.h b/arch/arm/mach-s3c/include/plat/gpio-cfg.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/gpio-cfg.h
rename to arch/arm/mach-s3c/include/plat/gpio-cfg.h
diff --git a/arch/arm/plat-samsung/include/plat/gpio-core.h b/arch/arm/mach-s3c/include/plat/gpio-core.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/gpio-core.h
rename to arch/arm/mach-s3c/include/plat/gpio-core.h
diff --git a/arch/arm/plat-samsung/include/plat/iic-core.h b/arch/arm/mach-s3c/include/plat/iic-core.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/iic-core.h
rename to arch/arm/mach-s3c/include/plat/iic-core.h
diff --git a/arch/arm/plat-samsung/include/plat/keypad.h b/arch/arm/mach-s3c/include/plat/keypad.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/keypad.h
rename to arch/arm/mach-s3c/include/plat/keypad.h
diff --git a/arch/arm/plat-samsung/include/plat/map-base.h b/arch/arm/mach-s3c/include/plat/map-base.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/map-base.h
rename to arch/arm/mach-s3c/include/plat/map-base.h
diff --git a/arch/arm/plat-samsung/include/plat/map-s3c.h b/arch/arm/mach-s3c/include/plat/map-s3c.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/map-s3c.h
rename to arch/arm/mach-s3c/include/plat/map-s3c.h
diff --git a/arch/arm/plat-samsung/include/plat/map-s5p.h b/arch/arm/mach-s3c/include/plat/map-s5p.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/map-s5p.h
rename to arch/arm/mach-s3c/include/plat/map-s5p.h
diff --git a/arch/arm/plat-samsung/include/plat/pm-common.h b/arch/arm/mach-s3c/include/plat/pm-common.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/pm-common.h
rename to arch/arm/mach-s3c/include/plat/pm-common.h
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/mach-s3c/include/plat/pm.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/pm.h
rename to arch/arm/mach-s3c/include/plat/pm.h
diff --git a/arch/arm/plat-samsung/include/plat/pwm-core.h b/arch/arm/mach-s3c/include/plat/pwm-core.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/pwm-core.h
rename to arch/arm/mach-s3c/include/plat/pwm-core.h
diff --git a/arch/arm/plat-samsung/include/plat/regs-adc.h b/arch/arm/mach-s3c/include/plat/regs-adc.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/regs-adc.h
rename to arch/arm/mach-s3c/include/plat/regs-adc.h
diff --git a/arch/arm/plat-samsung/include/plat/regs-irqtype.h b/arch/arm/mach-s3c/include/plat/regs-irqtype.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/regs-irqtype.h
rename to arch/arm/mach-s3c/include/plat/regs-irqtype.h
diff --git a/arch/arm/plat-samsung/include/plat/samsung-time.h b/arch/arm/mach-s3c/include/plat/samsung-time.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/samsung-time.h
rename to arch/arm/mach-s3c/include/plat/samsung-time.h
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/mach-s3c/include/plat/sdhci.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/sdhci.h
rename to arch/arm/mach-s3c/include/plat/sdhci.h
diff --git a/arch/arm/plat-samsung/include/plat/usb-phy.h b/arch/arm/mach-s3c/include/plat/usb-phy.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/usb-phy.h
rename to arch/arm/mach-s3c/include/plat/usb-phy.h
diff --git a/arch/arm/plat-samsung/include/plat/wakeup-mask.h b/arch/arm/mach-s3c/include/plat/wakeup-mask.h
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/wakeup-mask.h
rename to arch/arm/mach-s3c/include/plat/wakeup-mask.h
diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/mach-s3c/init.c
similarity index 100%
rename from arch/arm/plat-samsung/init.c
rename to arch/arm/mach-s3c/init.c
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c/iotiming-s3c2410.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/iotiming-s3c2410.c
rename to arch/arm/mach-s3c/iotiming-s3c2410.c
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c b/arch/arm/mach-s3c/iotiming-s3c2412.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/iotiming-s3c2412.c
rename to arch/arm/mach-s3c/iotiming-s3c2412.c
diff --git a/arch/arm/mach-s3c24xx/irq-pm.c b/arch/arm/mach-s3c/irq-pm-s3c24xx.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/irq-pm.c
rename to arch/arm/mach-s3c/irq-pm-s3c24xx.c
diff --git a/arch/arm/mach-s3c64xx/irq-pm.c b/arch/arm/mach-s3c/irq-pm-s3c64xx.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/irq-pm.c
rename to arch/arm/mach-s3c/irq-pm-s3c64xx.c
diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c b/arch/arm/mach-s3c/irq-s3c24xx-fiq-exports.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c
rename to arch/arm/mach-s3c/irq-s3c24xx-fiq-exports.c
diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S b/arch/arm/mach-s3c/irq-s3c24xx-fiq.S
similarity index 100%
rename from arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S
rename to arch/arm/mach-s3c/irq-s3c24xx-fiq.S
diff --git a/arch/arm/mach-s3c24xx/irq-s3c24xx.c b/arch/arm/mach-s3c/irq-s3c24xx.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/irq-s3c24xx.c
rename to arch/arm/mach-s3c/irq-s3c24xx.c
diff --git a/arch/arm/mach-s3c64xx/irq-uart.h b/arch/arm/mach-s3c/irq-uart.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/irq-uart.h
rename to arch/arm/mach-s3c/irq-uart.h
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c/mach-amlm5900.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-amlm5900.c
rename to arch/arm/mach-s3c/mach-amlm5900.c
index ef6de1b1d0c6..f9240081f840 100644
--- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
+++ b/arch/arm/mach-s3c/mach-amlm5900.c
@@ -47,7 +47,7 @@
 
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct resource amlm5900_nor_resource =
 			DEFINE_RES_MEM(0x00000000, SZ_16M);
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c/mach-anubis.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-anubis.c
rename to arch/arm/mach-s3c/mach-anubis.c
index e1a73274e90b..5cfb7aed9fe7 100644
--- a/arch/arm/mach-s3c24xx/mach-anubis.c
+++ b/arch/arm/mach-s3c/mach-anubis.c
@@ -46,7 +46,7 @@
 #include <plat/samsung-time.h>
 
 #include "anubis.h"
-#include "common.h"
+#include "s3c24xx.h"
 #include "simtec.h"
 
 #define COPYRIGHT ", Copyright 2005-2009 Simtec Electronics"
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c/mach-anw6410.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-anw6410.c
rename to arch/arm/mach-s3c/mach-anw6410.c
index 44858c5aea5d..9bf8c8791553 100644
--- a/arch/arm/mach-s3c64xx/mach-anw6410.c
+++ b/arch/arm/mach-s3c/mach-anw6410.c
@@ -45,7 +45,7 @@
 #include <mach/gpio-samsung.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "regs-modem.h"
 
 /* DM9000 */
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c/mach-at2440evb.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-at2440evb.c
rename to arch/arm/mach-s3c/mach-at2440evb.c
index bfda6dd2a9d5..2103c4c1059a 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c/mach-at2440evb.c
@@ -44,7 +44,7 @@
 #include <linux/platform_data/mmc-s3cmci.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct map_desc at2440evb_iodesc[] __initdata = {
 	/* Nothing here */
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c/mach-bast.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-bast.c
rename to arch/arm/mach-s3c/mach-bast.c
index b2f2d036bca2..6e363afbaab1 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c/mach-bast.c
@@ -52,7 +52,7 @@
 #include <plat/samsung-time.h>
 
 #include "bast.h"
-#include "common.h"
+#include "s3c24xx.h"
 #include "simtec.h"
 
 #define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics"
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c/mach-crag6410-module.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/mach-crag6410-module.c
rename to arch/arm/mach-s3c/mach-crag6410-module.c
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c/mach-crag6410.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-crag6410.c
rename to arch/arm/mach-s3c/mach-crag6410.c
index 133453562d23..947f344ac4d4 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c/mach-crag6410.c
@@ -62,7 +62,7 @@
 #include <plat/pm.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "crag6410.h"
 #include "regs-gpio-memport.h"
 #include "regs-modem.h"
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c/mach-gta02.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-gta02.c
rename to arch/arm/mach-s3c/mach-gta02.c
index 1e42782dbd30..bf0de248b489 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c/mach-gta02.c
@@ -70,7 +70,7 @@
 #include <plat/pm.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "gta02.h"
 
 static struct pcf50633 *gta02_pcf;
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c/mach-h1940.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-h1940.c
rename to arch/arm/mach-s3c/mach-h1940.c
index 287e42fc1665..6e329cb1a7ec 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c/mach-h1940.c
@@ -60,7 +60,7 @@
 #include <plat/pm.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "h1940.h"
 
 #define H1940_LATCH		((void __force __iomem *)0xF8000000)
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c/mach-hmt.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-hmt.c
rename to arch/arm/mach-s3c/mach-hmt.c
index a6634fd9e6c4..dd1b73c31956 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c/mach-hmt.c
@@ -40,7 +40,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 
 #define UCON S3C2410_UCON_DEFAULT
 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE)
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c/mach-jive.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-jive.c
rename to arch/arm/mach-s3c/mach-jive.c
index 8012c34bddd9..27f4c99172c6 100644
--- a/arch/arm/mach-s3c24xx/mach-jive.c
+++ b/arch/arm/mach-s3c/mach-jive.c
@@ -50,7 +50,7 @@
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "s3c2412-power.h"
 
 static struct map_desc jive_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c/mach-mini2440.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-mini2440.c
rename to arch/arm/mach-s3c/mach-mini2440.c
index 2301e07c7d64..4280d0a8c4e2 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c/mach-mini2440.c
@@ -55,7 +55,7 @@
 
 #include <sound/s3c24xx_uda134x.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 #define MACH_MINI2440_DM9K_BASE (S3C2410_CS4 + 0x300)
 
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c/mach-mini6410.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-mini6410.c
rename to arch/arm/mach-s3c/mach-mini6410.c
index c7140300bd3f..369325107ff1 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c/mach-mini6410.c
@@ -41,7 +41,7 @@
 #include <video/samsung_fimd.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "regs-modem.h"
 #include "regs-srom.h"
 
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c/mach-n30.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-n30.c
rename to arch/arm/mach-s3c/mach-n30.c
index 6b8ee5ba00ca..196f4cb17fbb 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c/mach-n30.c
@@ -49,7 +49,7 @@
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct map_desc n30_iodesc[] __initdata = {
 	/* nothing here yet */
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c/mach-ncp.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-ncp.c
rename to arch/arm/mach-s3c/mach-ncp.c
index 34a00b33fae9..6e2e30e2fee3 100644
--- a/arch/arm/mach-s3c64xx/mach-ncp.c
+++ b/arch/arm/mach-s3c/mach-ncp.c
@@ -37,7 +37,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 
 #define UCON S3C2410_UCON_DEFAULT
 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c/mach-nexcoder.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-nexcoder.c
rename to arch/arm/mach-s3c/mach-nexcoder.c
index a05c92b6de2e..9b281d1a5536 100644
--- a/arch/arm/mach-s3c24xx/mach-nexcoder.c
+++ b/arch/arm/mach-s3c/mach-nexcoder.c
@@ -42,7 +42,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct map_desc nexcoder_iodesc[] __initdata = {
 	/* nothing here yet */
diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c/mach-osiris-dvs.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/mach-osiris-dvs.c
rename to arch/arm/mach-s3c/mach-osiris-dvs.c
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c/mach-osiris.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-osiris.c
rename to arch/arm/mach-s3c/mach-osiris.c
index 674164264076..2aeeb2230b85 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c/mach-osiris.c
@@ -46,7 +46,7 @@
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "osiris.h"
 #include "regs-mem.h"
 
diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c/mach-otom.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-otom.c
rename to arch/arm/mach-s3c/mach-otom.c
index c834f16e5ba0..60917d1bf236 100644
--- a/arch/arm/mach-s3c24xx/mach-otom.c
+++ b/arch/arm/mach-s3c/mach-otom.c
@@ -31,7 +31,7 @@
 #include <plat/devs.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "otom.h"
 
 static struct map_desc otom11_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c/mach-qt2410.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-qt2410.c
rename to arch/arm/mach-s3c/mach-qt2410.c
index 1d0f5d65e7e5..db2ff1085718 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c/mach-qt2410.c
@@ -45,7 +45,7 @@
 #include <plat/pm.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "common-smdk.h"
 
 static struct map_desc qt2410_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c/mach-real6410.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-real6410.c
rename to arch/arm/mach-s3c/mach-real6410.c
index f55097fde94c..b72598b4ae27 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c/mach-real6410.c
@@ -40,7 +40,7 @@
 #include <video/samsung_fimd.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "regs-modem.h"
 #include "regs-srom.h"
 
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c/mach-rx1950.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-rx1950.c
rename to arch/arm/mach-s3c/mach-rx1950.c
index f94884090fbe..87d82c954523 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c/mach-rx1950.c
@@ -56,7 +56,7 @@
 #include <plat/samsung-time.h>
 #include <plat/gpio-cfg.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "h1940.h"
 
 #define LCD_PWM_PERIOD 192960
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c/mach-rx3715.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-rx3715.c
rename to arch/arm/mach-s3c/mach-rx3715.c
index 87f3274241b2..c810680669d4 100644
--- a/arch/arm/mach-s3c24xx/mach-rx3715.c
+++ b/arch/arm/mach-s3c/mach-rx3715.c
@@ -45,7 +45,7 @@
 #include <plat/pm.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "h1940.h"
 
 static struct map_desc rx3715_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c b/arch/arm/mach-s3c/mach-s3c2416-dt.c
similarity index 98%
rename from arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
rename to arch/arm/mach-s3c/mach-s3c2416-dt.c
index aa7102713b37..2924e230e79d 100644
--- a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
+++ b/arch/arm/mach-s3c/mach-s3c2416-dt.c
@@ -21,7 +21,7 @@
 #include <plat/cpu.h>
 #include <plat/pm.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static void __init s3c2416_dt_map_io(void)
 {
diff --git a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c b/arch/arm/mach-s3c/mach-s3c64xx-dt.c
similarity index 98%
rename from arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
rename to arch/arm/mach-s3c/mach-s3c64xx-dt.c
index 1724f5ea5c46..1b8b61edd40e 100644
--- a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
+++ b/arch/arm/mach-s3c/mach-s3c64xx-dt.c
@@ -11,7 +11,7 @@
 #include <plat/cpu.h>
 #include <mach/map.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "watchdog-reset.h"
 
 /*
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c/mach-smartq.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smartq.c
rename to arch/arm/mach-s3c/mach-smartq.c
index 951208f168e7..fa5f2ebc6dbc 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq.c
+++ b/arch/arm/mach-s3c/mach-smartq.c
@@ -35,7 +35,7 @@
 #include <video/platform_lcd.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "mach-smartq.h"
 #include "regs-modem.h"
 
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.h b/arch/arm/mach-s3c/mach-smartq.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/mach-smartq.h
rename to arch/arm/mach-s3c/mach-smartq.h
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c/mach-smartq5.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smartq5.c
rename to arch/arm/mach-s3c/mach-smartq5.c
index 44e9edb144fa..91560ed02738 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq5.c
+++ b/arch/arm/mach-s3c/mach-smartq5.c
@@ -25,7 +25,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "mach-smartq.h"
 
 static struct gpio_led smartq5_leds[] = {
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c/mach-smartq7.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smartq7.c
rename to arch/arm/mach-s3c/mach-smartq7.c
index 815ee7d0b5e3..9eadc837ba12 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq7.c
+++ b/arch/arm/mach-s3c/mach-smartq7.c
@@ -25,7 +25,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "mach-smartq.h"
 
 static struct gpio_led smartq7_leds[] = {
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2410.c b/arch/arm/mach-s3c/mach-smdk2410.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-smdk2410.c
rename to arch/arm/mach-s3c/mach-smdk2410.c
index 02adaac4d6df..35aa8ec7cc4f 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2410.c
+++ b/arch/arm/mach-s3c/mach-smdk2410.c
@@ -36,7 +36,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "common-smdk.h"
 
 static struct map_desc smdk2410_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c/mach-smdk2413.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-smdk2413.c
rename to arch/arm/mach-s3c/mach-smdk2413.c
index eec0d3dc4bb1..f2305961f7eb 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2413.c
+++ b/arch/arm/mach-s3c/mach-smdk2413.c
@@ -42,7 +42,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "common-smdk.h"
 
 static struct map_desc smdk2413_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c/mach-smdk2416.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-smdk2416.c
rename to arch/arm/mach-s3c/mach-smdk2416.c
index fbd3a8d96f94..7fd5df4cf7e3 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
+++ b/arch/arm/mach-s3c/mach-smdk2416.c
@@ -47,7 +47,7 @@
 
 #include <plat/fb.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "common-smdk.h"
 
 static struct map_desc smdk2416_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c/mach-smdk2440.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-smdk2440.c
rename to arch/arm/mach-s3c/mach-smdk2440.c
index b9b0f2a8c904..d72f86a68c84 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2440.c
+++ b/arch/arm/mach-s3c/mach-smdk2440.c
@@ -38,7 +38,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "common-smdk.h"
 
 static struct map_desc smdk2440_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c/mach-smdk2443.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-smdk2443.c
rename to arch/arm/mach-s3c/mach-smdk2443.c
index a4c1022678a9..b439dfabd421 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2443.c
+++ b/arch/arm/mach-s3c/mach-smdk2443.c
@@ -35,7 +35,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "common-smdk.h"
 
 static struct map_desc smdk2443_iodesc[] __initdata = {
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c/mach-smdk6400.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smdk6400.c
rename to arch/arm/mach-s3c/mach-smdk6400.c
index 885158f0a304..a2a70c5f5667 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6400.c
+++ b/arch/arm/mach-s3c/mach-smdk6400.c
@@ -31,7 +31,7 @@
 #include <mach/gpio-samsung.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 
 #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c/mach-smdk6410.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smdk6410.c
rename to arch/arm/mach-s3c/mach-smdk6410.c
index 3042f6cbffd9..a80c2138e90b 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c/mach-smdk6410.c
@@ -66,7 +66,7 @@
 #include <plat/samsung-time.h>
 
 #include "backlight.h"
-#include "common.h"
+#include "s3c64xx.h"
 #include "regs-modem.h"
 #include "regs-srom.h"
 #include "regs-sys.h"
diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c/mach-tct_hammer.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-tct_hammer.c
rename to arch/arm/mach-s3c/mach-tct_hammer.c
index d6dbbe6759bc..f1ed79889e39 100644
--- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c/mach-tct_hammer.c
@@ -39,7 +39,7 @@
 #include <linux/mtd/physmap.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct resource tct_hammer_nor_resource =
 			DEFINE_RES_MEM(0x00000000, SZ_16M);
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c/mach-vr1000.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-vr1000.c
rename to arch/arm/mach-s3c/mach-vr1000.c
index ca2f874a637e..854783386a06 100644
--- a/arch/arm/mach-s3c24xx/mach-vr1000.c
+++ b/arch/arm/mach-s3c/mach-vr1000.c
@@ -44,7 +44,7 @@
 #include <plat/samsung-time.h>
 
 #include "bast.h"
-#include "common.h"
+#include "s3c24xx.h"
 #include "simtec.h"
 #include "vr1000.h"
 
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c/mach-vstms.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-vstms.c
rename to arch/arm/mach-s3c/mach-vstms.c
index 08acc556879b..7496271bb343 100644
--- a/arch/arm/mach-s3c24xx/mach-vstms.c
+++ b/arch/arm/mach-s3c/mach-vstms.c
@@ -42,7 +42,7 @@
 #include <plat/cpu.h>
 #include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct map_desc vstms_iodesc[] __initdata = {
 };
diff --git a/arch/arm/mach-s3c24xx/nand-core.h b/arch/arm/mach-s3c/nand-core.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/nand-core.h
rename to arch/arm/mach-s3c/nand-core.h
diff --git a/arch/arm/mach-s3c64xx/onenand-core.h b/arch/arm/mach-s3c/onenand-core.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/onenand-core.h
rename to arch/arm/mach-s3c/onenand-core.h
diff --git a/arch/arm/mach-s3c24xx/osiris.h b/arch/arm/mach-s3c/osiris.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/osiris.h
rename to arch/arm/mach-s3c/osiris.h
diff --git a/arch/arm/mach-s3c24xx/otom.h b/arch/arm/mach-s3c/otom.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/otom.h
rename to arch/arm/mach-s3c/otom.h
diff --git a/arch/arm/mach-s3c64xx/pl080.c b/arch/arm/mach-s3c/pl080.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/pl080.c
rename to arch/arm/mach-s3c/pl080.c
diff --git a/arch/arm/plat-samsung/platformdata.c b/arch/arm/mach-s3c/platformdata.c
similarity index 100%
rename from arch/arm/plat-samsung/platformdata.c
rename to arch/arm/mach-s3c/platformdata.c
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2410.c b/arch/arm/mach-s3c/pll-s3c2410.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pll-s3c2410.c
rename to arch/arm/mach-s3c/pll-s3c2410.c
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c/pll-s3c2440-12000000.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
rename to arch/arm/mach-s3c/pll-s3c2440-12000000.c
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c/pll-s3c2440-16934400.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
rename to arch/arm/mach-s3c/pll-s3c2440-16934400.c
diff --git a/arch/arm/plat-samsung/pm-common.c b/arch/arm/mach-s3c/pm-common.c
similarity index 100%
rename from arch/arm/plat-samsung/pm-common.c
rename to arch/arm/mach-s3c/pm-common.c
diff --git a/arch/arm/plat-samsung/pm-gpio.c b/arch/arm/mach-s3c/pm-gpio.c
similarity index 100%
rename from arch/arm/plat-samsung/pm-gpio.c
rename to arch/arm/mach-s3c/pm-gpio.c
diff --git a/arch/arm/mach-s3c24xx/pm-h1940.S b/arch/arm/mach-s3c/pm-h1940.S
similarity index 100%
rename from arch/arm/mach-s3c24xx/pm-h1940.S
rename to arch/arm/mach-s3c/pm-h1940.S
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2410.c b/arch/arm/mach-s3c/pm-s3c2410.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pm-s3c2410.c
rename to arch/arm/mach-s3c/pm-s3c2410.c
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2412.c b/arch/arm/mach-s3c/pm-s3c2412.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pm-s3c2412.c
rename to arch/arm/mach-s3c/pm-s3c2412.c
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2416.c b/arch/arm/mach-s3c/pm-s3c2416.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pm-s3c2416.c
rename to arch/arm/mach-s3c/pm-s3c2416.c
diff --git a/arch/arm/mach-s3c24xx/pm.c b/arch/arm/mach-s3c/pm-s3c24xx.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/pm.c
rename to arch/arm/mach-s3c/pm-s3c24xx.c
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c/pm-s3c64xx.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/pm.c
rename to arch/arm/mach-s3c/pm-s3c64xx.c
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/mach-s3c/pm.c
similarity index 100%
rename from arch/arm/plat-samsung/pm.c
rename to arch/arm/mach-s3c/pm.c
diff --git a/arch/arm/mach-s3c24xx/regs-dsc.h b/arch/arm/mach-s3c/regs-dsc.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/regs-dsc.h
rename to arch/arm/mach-s3c/regs-dsc.h
diff --git a/arch/arm/mach-s3c64xx/regs-gpio-memport.h b/arch/arm/mach-s3c/regs-gpio-memport.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-gpio-memport.h
rename to arch/arm/mach-s3c/regs-gpio-memport.h
diff --git a/arch/arm/mach-s3c24xx/regs-mem.h b/arch/arm/mach-s3c/regs-mem.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/regs-mem.h
rename to arch/arm/mach-s3c/regs-mem.h
diff --git a/arch/arm/mach-s3c64xx/regs-modem.h b/arch/arm/mach-s3c/regs-modem.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-modem.h
rename to arch/arm/mach-s3c/regs-modem.h
diff --git a/arch/arm/mach-s3c64xx/regs-srom.h b/arch/arm/mach-s3c/regs-srom.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-srom.h
rename to arch/arm/mach-s3c/regs-srom.h
diff --git a/arch/arm/mach-s3c64xx/regs-sys.h b/arch/arm/mach-s3c/regs-sys.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-sys.h
rename to arch/arm/mach-s3c/regs-sys.h
diff --git a/arch/arm/mach-s3c64xx/regs-syscon-power.h b/arch/arm/mach-s3c/regs-syscon-power.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-syscon-power.h
rename to arch/arm/mach-s3c/regs-syscon-power.h
diff --git a/arch/arm/mach-s3c64xx/regs-usb-hsotg-phy.h b/arch/arm/mach-s3c/regs-usb-hsotg-phy.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-usb-hsotg-phy.h
rename to arch/arm/mach-s3c/regs-usb-hsotg-phy.h
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c/s3c2410.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/s3c2410.c
rename to arch/arm/mach-s3c/s3c2410.c
index 44bf3e1e77f1..0013125b03ee 100644
--- a/arch/arm/mach-s3c24xx/s3c2410.c
+++ b/arch/arm/mach-s3c/s3c2410.c
@@ -41,7 +41,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/gpio-cfg-helpers.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 /* Initial IO mappings */
 
diff --git a/arch/arm/mach-s3c24xx/s3c2412-power.h b/arch/arm/mach-s3c/s3c2412-power.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/s3c2412-power.h
rename to arch/arm/mach-s3c/s3c2412-power.h
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c/s3c2412.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/s3c2412.c
rename to arch/arm/mach-s3c/s3c2412.c
index 75648dcc2c1d..3599a2f01c1e 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c/s3c2412.c
@@ -37,7 +37,7 @@
 #include <plat/devs.h>
 #include <plat/pm.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "nand-core.h"
 #include "regs-dsc.h"
 #include "s3c2412-power.h"
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c/s3c2416.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/s3c2416.c
rename to arch/arm/mach-s3c/s3c2416.c
index ef2eace605e6..95c34fd36421 100644
--- a/arch/arm/mach-s3c24xx/s3c2416.c
+++ b/arch/arm/mach-s3c/s3c2416.c
@@ -46,7 +46,7 @@
 #include <plat/iic-core.h>
 #include <plat/adc-core.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "fb-core.h"
 #include "nand-core.h"
 #include "spi-core.h"
diff --git a/arch/arm/mach-s3c24xx/s3c2440.c b/arch/arm/mach-s3c/s3c2440.c
similarity index 98%
rename from arch/arm/mach-s3c24xx/s3c2440.c
rename to arch/arm/mach-s3c/s3c2440.c
index 451d9851b0a7..a7c2dcf50b21 100644
--- a/arch/arm/mach-s3c24xx/s3c2440.c
+++ b/arch/arm/mach-s3c/s3c2440.c
@@ -35,7 +35,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/gpio-cfg-helpers.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct device s3c2440_dev = {
 	.bus		= &s3c2440_subsys,
diff --git a/arch/arm/mach-s3c24xx/s3c2442.c b/arch/arm/mach-s3c/s3c2442.c
similarity index 98%
rename from arch/arm/mach-s3c24xx/s3c2442.c
rename to arch/arm/mach-s3c/s3c2442.c
index 432d68325c9d..ffef8a5e1a94 100644
--- a/arch/arm/mach-s3c24xx/s3c2442.c
+++ b/arch/arm/mach-s3c/s3c2442.c
@@ -35,7 +35,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/gpio-cfg-helpers.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct device s3c2442_dev = {
 	.bus		= &s3c2442_subsys,
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c/s3c2443.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/s3c2443.c
rename to arch/arm/mach-s3c/s3c2443.c
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c/s3c244x.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/s3c244x.c
rename to arch/arm/mach-s3c/s3c244x.c
index 0ca188d0ffe5..a013f3447777 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c/s3c244x.c
@@ -35,7 +35,7 @@
 #include <plat/cpu.h>
 #include <plat/pm.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "nand-core.h"
 #include "regs-dsc.h"
 
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c/s3c24xx.c
similarity index 99%
rename from arch/arm/mach-s3c24xx/common.c
rename to arch/arm/mach-s3c/s3c24xx.c
index 42d828f48345..409f4c00c17f 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c/s3c24xx.c
@@ -38,7 +38,7 @@
 #include <plat/devs.h>
 #include <plat/pwm-core.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 /* table of supported CPUs */
 
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c/s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/common.h
rename to arch/arm/mach-s3c/s3c24xx.h
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c/s3c6400.c
similarity index 98%
rename from arch/arm/mach-s3c64xx/s3c6400.c
rename to arch/arm/mach-s3c/s3c6400.c
index d18af724c807..2f94515558bc 100644
--- a/arch/arm/mach-s3c64xx/s3c6400.c
+++ b/arch/arm/mach-s3c/s3c6400.c
@@ -35,7 +35,7 @@
 #include <plat/sdhci.h>
 #include <plat/iic-core.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "onenand-core.h"
 
 void __init s3c6400_map_io(void)
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c/s3c6410.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/s3c6410.c
rename to arch/arm/mach-s3c/s3c6410.c
index b1d725e55cd2..aa330d10e102 100644
--- a/arch/arm/mach-s3c64xx/s3c6410.c
+++ b/arch/arm/mach-s3c/s3c6410.c
@@ -39,7 +39,7 @@
 #include <plat/iic-core.h>
 
 #include "ata-core.h"
-#include "common.h"
+#include "s3c64xx.h"
 #include "onenand-core.h"
 
 void __init s3c6410_map_io(void)
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c/s3c64xx.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/common.c
rename to arch/arm/mach-s3c/s3c64xx.c
index 19d544f6808a..289b462a035d 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c/s3c64xx.c
@@ -46,7 +46,7 @@
 #include <plat/pwm-core.h>
 #include <plat/regs-irqtype.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "irq-uart.h"
 #include "watchdog-reset.h"
 
diff --git a/arch/arm/mach-s3c64xx/common.h b/arch/arm/mach-s3c/s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/common.h
rename to arch/arm/mach-s3c/s3c64xx.h
diff --git a/arch/arm/mach-s3c24xx/setup-camif.c b/arch/arm/mach-s3c/setup-camif.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-camif.c
rename to arch/arm/mach-s3c/setup-camif.c
diff --git a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c b/arch/arm/mach-s3c/setup-fb-24bpp.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-fb-24bpp.c
rename to arch/arm/mach-s3c/setup-fb-24bpp.c
diff --git a/arch/arm/mach-s3c24xx/setup-i2c.c b/arch/arm/mach-s3c/setup-i2c.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-i2c.c
rename to arch/arm/mach-s3c/setup-i2c.c
diff --git a/arch/arm/mach-s3c64xx/setup-i2c0.c b/arch/arm/mach-s3c/setup-i2c0.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-i2c0.c
rename to arch/arm/mach-s3c/setup-i2c0.c
diff --git a/arch/arm/mach-s3c64xx/setup-i2c1.c b/arch/arm/mach-s3c/setup-i2c1.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-i2c1.c
rename to arch/arm/mach-s3c/setup-i2c1.c
diff --git a/arch/arm/mach-s3c64xx/setup-ide.c b/arch/arm/mach-s3c/setup-ide.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-ide.c
rename to arch/arm/mach-s3c/setup-ide.c
diff --git a/arch/arm/mach-s3c64xx/setup-keypad.c b/arch/arm/mach-s3c/setup-keypad.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-keypad.c
rename to arch/arm/mach-s3c/setup-keypad.c
diff --git a/arch/arm/mach-s3c24xx/setup-sdhci-gpio.c b/arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-sdhci-gpio.c
rename to arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c
diff --git a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c b/arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
rename to arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c
diff --git a/arch/arm/mach-s3c24xx/setup-spi.c b/arch/arm/mach-s3c/setup-spi-s3c24xx.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-spi.c
rename to arch/arm/mach-s3c/setup-spi-s3c24xx.c
diff --git a/arch/arm/mach-s3c64xx/setup-spi.c b/arch/arm/mach-s3c/setup-spi-s3c64xx.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-spi.c
rename to arch/arm/mach-s3c/setup-spi-s3c64xx.c
diff --git a/arch/arm/mach-s3c24xx/setup-ts.c b/arch/arm/mach-s3c/setup-ts.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-ts.c
rename to arch/arm/mach-s3c/setup-ts.c
diff --git a/arch/arm/mach-s3c64xx/setup-usb-phy.c b/arch/arm/mach-s3c/setup-usb-phy.c
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-usb-phy.c
rename to arch/arm/mach-s3c/setup-usb-phy.c
diff --git a/arch/arm/mach-s3c24xx/simtec-audio.c b/arch/arm/mach-s3c/simtec-audio.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec-audio.c
rename to arch/arm/mach-s3c/simtec-audio.c
diff --git a/arch/arm/mach-s3c24xx/simtec-nor.c b/arch/arm/mach-s3c/simtec-nor.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec-nor.c
rename to arch/arm/mach-s3c/simtec-nor.c
diff --git a/arch/arm/mach-s3c24xx/simtec-pm.c b/arch/arm/mach-s3c/simtec-pm.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec-pm.c
rename to arch/arm/mach-s3c/simtec-pm.c
diff --git a/arch/arm/mach-s3c24xx/simtec-usb.c b/arch/arm/mach-s3c/simtec-usb.c
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec-usb.c
rename to arch/arm/mach-s3c/simtec-usb.c
diff --git a/arch/arm/mach-s3c24xx/simtec.h b/arch/arm/mach-s3c/simtec.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec.h
rename to arch/arm/mach-s3c/simtec.h
diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2410.S b/arch/arm/mach-s3c/sleep-s3c2410.S
similarity index 100%
rename from arch/arm/mach-s3c24xx/sleep-s3c2410.S
rename to arch/arm/mach-s3c/sleep-s3c2410.S
diff --git a/arch/arm/mach-s3c24xx/sleep-s3c2412.S b/arch/arm/mach-s3c/sleep-s3c2412.S
similarity index 100%
rename from arch/arm/mach-s3c24xx/sleep-s3c2412.S
rename to arch/arm/mach-s3c/sleep-s3c2412.S
diff --git a/arch/arm/mach-s3c24xx/sleep.S b/arch/arm/mach-s3c/sleep-s3c24xx.S
similarity index 100%
rename from arch/arm/mach-s3c24xx/sleep.S
rename to arch/arm/mach-s3c/sleep-s3c24xx.S
diff --git a/arch/arm/mach-s3c64xx/sleep.S b/arch/arm/mach-s3c/sleep-s3c64xx.S
similarity index 100%
rename from arch/arm/mach-s3c64xx/sleep.S
rename to arch/arm/mach-s3c/sleep-s3c64xx.S
diff --git a/arch/arm/mach-s3c24xx/spi-core.h b/arch/arm/mach-s3c/spi-core.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/spi-core.h
rename to arch/arm/mach-s3c/spi-core.h
diff --git a/arch/arm/mach-s3c24xx/vr1000.h b/arch/arm/mach-s3c/vr1000.h
similarity index 100%
rename from arch/arm/mach-s3c24xx/vr1000.h
rename to arch/arm/mach-s3c/vr1000.h
diff --git a/arch/arm/plat-samsung/wakeup-mask.c b/arch/arm/mach-s3c/wakeup-mask.c
similarity index 100%
rename from arch/arm/plat-samsung/wakeup-mask.c
rename to arch/arm/mach-s3c/wakeup-mask.c
diff --git a/arch/arm/plat-samsung/watchdog-reset.c b/arch/arm/mach-s3c/watchdog-reset.c
similarity index 100%
rename from arch/arm/plat-samsung/watchdog-reset.c
rename to arch/arm/mach-s3c/watchdog-reset.c
diff --git a/arch/arm/mach-s3c64xx/watchdog-reset.h b/arch/arm/mach-s3c/watchdog-reset.h
similarity index 100%
rename from arch/arm/mach-s3c64xx/watchdog-reset.h
rename to arch/arm/mach-s3c/watchdog-reset.h
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 36/36] ARM: s3c: make headers local if possible
  2019-10-10 20:28 [PATCH 00/36] ARM: samsung platform cleanup Arnd Bergmann
                   ` (2 preceding siblings ...)
  2019-10-10 21:07 ` [PATCH 35/36] ARM: s3c: move into a common directory Arnd Bergmann
@ 2019-10-10 21:07 ` Arnd Bergmann
  2019-10-10 21:07   ` Arnd Bergmann
  2019-10-23 13:10 ` [PATCH 00/36] ARM: samsung platform cleanup Krzysztof Kozlowski
  4 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 21:07 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linus.walleij, linux-samsung-soc, Arnd Bergmann, linux-arm-kernel

A lot of header files are only used internally now, so they can be moved
to mach-s3c, out of the visibility of drivers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 .../mach-s3c/{include/plat => }/adc-core.h    |  0
 arch/arm/mach-s3c/adc.c                       |  2 +-
 arch/arm/mach-s3c/bast-ide.c                  |  2 +-
 arch/arm/mach-s3c/bast-irq.c                  |  3 +--
 arch/arm/mach-s3c/common-smdk.c               | 11 ++++----
 arch/arm/mach-s3c/cpu.c                       |  4 +--
 arch/arm/mach-s3c/{include/plat => }/cpu.h    |  0
 arch/arm/mach-s3c/cpufreq-utils.c             |  4 +--
 arch/arm/mach-s3c/cpuidle.c                   |  4 +--
 arch/arm/mach-s3c/crag6410.h                  |  2 +-
 arch/arm/mach-s3c/dev-audio.c                 |  9 +++----
 arch/arm/mach-s3c/dev-backlight.c             |  4 +--
 arch/arm/mach-s3c/dev-uart-s3c64xx.c          |  4 +--
 arch/arm/mach-s3c/dev-uart.c                  |  2 +-
 arch/arm/mach-s3c/devs.c                      | 23 ++++++++--------
 arch/arm/mach-s3c/{include/plat => }/devs.h   |  0
 .../mach-s3c/{include/mach => }/dma-s3c24xx.h |  0
 .../mach-s3c/{include/mach => }/dma-s3c64xx.h |  0
 arch/arm/mach-s3c/{include/mach => }/dma.h    |  0
 arch/arm/mach-s3c/{include/plat => }/fb.h     |  0
 .../{include/plat => }/gpio-cfg-helpers.h     |  0
 .../mach-s3c/{include/plat => }/gpio-cfg.h    |  0
 .../mach-s3c/{include/plat => }/gpio-core.h   |  2 +-
 .../{include/mach => }/gpio-samsung-s3c24xx.h |  2 +-
 .../{include/mach => }/gpio-samsung-s3c64xx.h |  0
 arch/arm/mach-s3c/gpio-samsung.c              | 18 ++++++-------
 .../{include/mach => }/gpio-samsung.h         |  0
 arch/arm/mach-s3c/gta02.h                     |  2 +-
 arch/arm/mach-s3c/h1940-bluetooth.c           |  7 +++--
 .../mach-s3c/{include/mach => }/hardware.h    |  0
 .../mach-s3c/{include/plat => }/iic-core.h    |  0
 arch/arm/mach-s3c/include/mach/io.h           |  2 +-
 .../include/{plat => mach}/map-base.h         |  0
 arch/arm/mach-s3c/init.c                      |  4 +--
 arch/arm/mach-s3c/iotiming-s3c2410.c          |  4 +--
 arch/arm/mach-s3c/iotiming-s3c2412.c          |  4 +--
 arch/arm/mach-s3c/irq-pm-s3c24xx.c            | 16 ++++++------
 arch/arm/mach-s3c/irq-pm-s3c64xx.c            |  8 +++---
 arch/arm/mach-s3c/irq-s3c24xx-fiq.S           |  4 +--
 arch/arm/mach-s3c/irq-s3c24xx.c               | 10 +++----
 arch/arm/mach-s3c/{include/plat => }/keypad.h |  0
 arch/arm/mach-s3c/mach-amlm5900.c             | 13 +++++-----
 arch/arm/mach-s3c/mach-anubis.c               | 11 ++++----
 arch/arm/mach-s3c/mach-anw6410.c              | 14 +++++-----
 arch/arm/mach-s3c/mach-at2440evb.c            | 11 ++++----
 arch/arm/mach-s3c/mach-bast.c                 | 13 +++++-----
 arch/arm/mach-s3c/mach-crag6410-module.c      |  2 +-
 arch/arm/mach-s3c/mach-crag6410.c             | 22 ++++++++--------
 arch/arm/mach-s3c/mach-gta02.c                | 19 +++++++-------
 arch/arm/mach-s3c/mach-h1940.c                | 22 ++++++++--------
 arch/arm/mach-s3c/mach-hmt.c                  | 12 ++++-----
 arch/arm/mach-s3c/mach-jive.c                 | 16 ++++++------
 arch/arm/mach-s3c/mach-mini2440.c             | 13 +++++-----
 arch/arm/mach-s3c/mach-mini6410.c             | 16 ++++++------
 arch/arm/mach-s3c/mach-n30.c                  | 14 +++++-----
 arch/arm/mach-s3c/mach-ncp.c                  | 10 +++----
 arch/arm/mach-s3c/mach-nexcoder.c             | 13 +++++-----
 arch/arm/mach-s3c/mach-osiris-dvs.c           |  2 +-
 arch/arm/mach-s3c/mach-osiris.c               | 13 +++++-----
 arch/arm/mach-s3c/mach-otom.c                 | 15 +++++------
 arch/arm/mach-s3c/mach-qt2410.c               | 13 +++++-----
 arch/arm/mach-s3c/mach-real6410.c             | 14 +++++-----
 arch/arm/mach-s3c/mach-rx1950.c               | 18 ++++++-------
 arch/arm/mach-s3c/mach-rx3715.c               | 17 ++++++------
 arch/arm/mach-s3c/mach-s3c2416-dt.c           |  6 ++---
 arch/arm/mach-s3c/mach-s3c64xx-dt.c           |  4 +--
 arch/arm/mach-s3c/mach-smartq.c               | 16 ++++++------
 arch/arm/mach-s3c/mach-smartq5.c              | 18 ++++++-------
 arch/arm/mach-s3c/mach-smartq7.c              | 18 ++++++-------
 arch/arm/mach-s3c/mach-smdk2410.c             | 11 ++++----
 arch/arm/mach-s3c/mach-smdk2413.c             | 14 +++++-----
 arch/arm/mach-s3c/mach-smdk2416.c             | 20 +++++++-------
 arch/arm/mach-s3c/mach-smdk2440.c             | 13 +++++-----
 arch/arm/mach-s3c/mach-smdk2443.c             |  9 +++----
 arch/arm/mach-s3c/mach-smdk6400.c             | 10 +++----
 arch/arm/mach-s3c/mach-smdk6410.c             | 18 ++++++-------
 arch/arm/mach-s3c/mach-tct_hammer.c           |  7 +++--
 arch/arm/mach-s3c/mach-vr1000.c               | 15 +++++------
 arch/arm/mach-s3c/mach-vstms.c                | 13 +++++-----
 .../arm/mach-s3c/{include/plat => }/map-s3c.h |  4 +--
 .../mach-s3c/{include/mach => }/map-s3c24xx.h |  4 +--
 .../mach-s3c/{include/mach => }/map-s3c64xx.h |  4 +--
 .../arm/mach-s3c/{include/plat => }/map-s5p.h |  2 +-
 arch/arm/mach-s3c/{include/mach => }/map.h    |  0
 arch/arm/mach-s3c/pl080.c                     |  4 +--
 arch/arm/mach-s3c/platformdata.c              |  4 +--
 arch/arm/mach-s3c/pm-common.c                 |  2 +-
 .../mach-s3c/{include/plat => }/pm-common.h   |  0
 .../{include/mach => }/pm-core-s3c24xx.h      |  0
 .../{include/mach => }/pm-core-s3c64xx.h      |  6 ++---
 .../arm/mach-s3c/{include/mach => }/pm-core.h |  0
 arch/arm/mach-s3c/pm-gpio.c                   |  6 ++---
 arch/arm/mach-s3c/pm-h1940.S                  |  4 +--
 arch/arm/mach-s3c/pm-s3c2410.c                | 11 ++++----
 arch/arm/mach-s3c/pm-s3c2412.c                |  9 +++----
 arch/arm/mach-s3c/pm-s3c2416.c                |  6 ++---
 arch/arm/mach-s3c/pm-s3c24xx.c                | 12 ++++-----
 arch/arm/mach-s3c/pm-s3c64xx.c                | 16 ++++++------
 arch/arm/mach-s3c/pm.c                        | 12 ++++-----
 arch/arm/mach-s3c/{include/plat => }/pm.h     |  2 +-
 .../mach-s3c/{include/plat => }/pwm-core.h    |  0
 .../mach-s3c/{include/plat => }/regs-adc.h    |  0
 .../{include/mach => }/regs-clock-s3c24xx.h   |  2 +-
 .../{include/mach => }/regs-clock-s3c64xx.h   |  0
 .../mach-s3c/{include/mach => }/regs-clock.h  |  0
 .../{include/mach => }/regs-gpio-s3c24xx.h    |  2 +-
 .../{include/mach => }/regs-gpio-s3c64xx.h    |  0
 .../mach-s3c/{include/mach => }/regs-gpio.h   |  0
 .../{include/mach => }/regs-irq-s3c24xx.h     |  2 +-
 .../{include/mach => }/regs-irq-s3c64xx.h     |  0
 .../mach-s3c/{include/mach => }/regs-irq.h    |  0
 .../{include/plat => }/regs-irqtype.h         |  0
 arch/arm/mach-s3c/regs-mem.h                  |  2 +-
 .../{include/mach => }/regs-s3c2443-clock.h   |  2 +-
 .../mach-s3c/{include/mach => }/rtc-core.h    |  0
 arch/arm/mach-s3c/s3c2410.c                   | 18 ++++++-------
 arch/arm/mach-s3c/s3c2412.c                   | 12 ++++-----
 .../arm/mach-s3c/{include/mach => }/s3c2412.h |  2 +-
 arch/arm/mach-s3c/s3c2416.c                   | 26 +++++++++----------
 arch/arm/mach-s3c/s3c2440.c                   | 15 +++++------
 arch/arm/mach-s3c/s3c2442.c                   | 15 +++++------
 arch/arm/mach-s3c/s3c2443.c                   | 20 +++++++-------
 arch/arm/mach-s3c/s3c244x.c                   | 12 ++++-----
 arch/arm/mach-s3c/s3c24xx.c                   | 16 ++++++------
 arch/arm/mach-s3c/s3c6400.c                   | 10 +++----
 arch/arm/mach-s3c/s3c6410.c                   | 12 ++++-----
 arch/arm/mach-s3c/s3c64xx.c                   | 21 +++++++--------
 .../{include/plat => }/samsung-time.h         |  0
 arch/arm/mach-s3c/{include/plat => }/sdhci.h  |  2 +-
 arch/arm/mach-s3c/setup-camif.c               |  4 +--
 arch/arm/mach-s3c/setup-fb-24bpp.c            |  6 ++---
 arch/arm/mach-s3c/setup-i2c.c                 |  7 +++--
 arch/arm/mach-s3c/setup-i2c0.c                |  4 +--
 arch/arm/mach-s3c/setup-i2c1.c                |  4 +--
 arch/arm/mach-s3c/setup-ide.c                 |  8 +++---
 arch/arm/mach-s3c/setup-keypad.c              |  6 ++---
 arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c  |  6 ++---
 arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c  |  6 ++---
 arch/arm/mach-s3c/setup-spi-s3c24xx.c         |  6 ++---
 arch/arm/mach-s3c/setup-spi-s3c64xx.c         |  4 +--
 arch/arm/mach-s3c/setup-ts.c                  |  5 ++--
 arch/arm/mach-s3c/setup-usb-phy.c             |  6 ++---
 arch/arm/mach-s3c/simtec-audio.c              |  9 +++----
 arch/arm/mach-s3c/simtec-nor.c                |  2 +-
 arch/arm/mach-s3c/simtec-pm.c                 |  8 +++---
 arch/arm/mach-s3c/simtec-usb.c                |  5 ++--
 arch/arm/mach-s3c/sleep-s3c2410.S             |  6 ++---
 arch/arm/mach-s3c/sleep-s3c2412.S             |  4 +--
 arch/arm/mach-s3c/sleep-s3c24xx.S             |  6 ++---
 arch/arm/mach-s3c/sleep-s3c64xx.S             |  4 +--
 .../arm/mach-s3c/{include/plat => }/usb-phy.h |  0
 arch/arm/mach-s3c/wakeup-mask.c               |  4 +--
 .../mach-s3c/{include/plat => }/wakeup-mask.h |  0
 drivers/mmc/host/s3cmci.c                     |  3 ---
 154 files changed, 524 insertions(+), 560 deletions(-)
 rename arch/arm/mach-s3c/{include/plat => }/adc-core.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/cpu.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/devs.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/dma-s3c24xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/dma-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/dma.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/fb.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/gpio-cfg-helpers.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/gpio-cfg.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/gpio-core.h (99%)
 rename arch/arm/mach-s3c/{include/mach => }/gpio-samsung-s3c24xx.h (99%)
 rename arch/arm/mach-s3c/{include/mach => }/gpio-samsung-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/gpio-samsung.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/hardware.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/iic-core.h (100%)
 rename arch/arm/mach-s3c/include/{plat => mach}/map-base.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/keypad.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/map-s3c.h (97%)
 rename arch/arm/mach-s3c/{include/mach => }/map-s3c24xx.h (98%)
 rename arch/arm/mach-s3c/{include/mach => }/map-s3c64xx.h (98%)
 rename arch/arm/mach-s3c/{include/plat => }/map-s5p.h (94%)
 rename arch/arm/mach-s3c/{include/mach => }/map.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/pm-common.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/pm-core-s3c24xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/pm-core-s3c64xx.h (96%)
 rename arch/arm/mach-s3c/{include/mach => }/pm-core.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/pm.h (98%)
 rename arch/arm/mach-s3c/{include/plat => }/pwm-core.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/regs-adc.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-clock-s3c24xx.h (99%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-clock-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-clock.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-gpio-s3c24xx.h (99%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-gpio-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-gpio.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-irq-s3c24xx.h (98%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-irq-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-irq.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/regs-irqtype.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-s3c2443-clock.h (99%)
 rename arch/arm/mach-s3c/{include/mach => }/rtc-core.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/s3c2412.h (96%)
 rename arch/arm/mach-s3c/{include/plat => }/samsung-time.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/sdhci.h (99%)
 rename arch/arm/mach-s3c/{include/plat => }/usb-phy.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/wakeup-mask.h (100%)

diff --git a/arch/arm/mach-s3c/include/plat/adc-core.h b/arch/arm/mach-s3c/adc-core.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/adc-core.h
rename to arch/arm/mach-s3c/adc-core.h
diff --git a/arch/arm/mach-s3c/adc.c b/arch/arm/mach-s3c/adc.c
index 623a9774cc52..272d2950d432 100644
--- a/arch/arm/mach-s3c/adc.c
+++ b/arch/arm/mach-s3c/adc.c
@@ -19,7 +19,7 @@
 #include <linux/io.h>
 #include <linux/regulator/consumer.h>
 
-#include <plat/regs-adc.h>
+#include "regs-adc.h"
 #include <linux/soc/samsung/s3c-adc.h>
 
 /* This driver is designed to control the usage of the ADC block between
diff --git a/arch/arm/mach-s3c/bast-ide.c b/arch/arm/mach-s3c/bast-ide.c
index ee6fbb407640..da64db1811d8 100644
--- a/arch/arm/mach-s3c/bast-ide.c
+++ b/arch/arm/mach-s3c/bast-ide.c
@@ -19,7 +19,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
+#include "map.h"
 #include <mach/irqs.h>
 
 #include "bast.h"
diff --git a/arch/arm/mach-s3c/bast-irq.c b/arch/arm/mach-s3c/bast-irq.c
index b3083ee3ab33..d299f124e6dc 100644
--- a/arch/arm/mach-s3c/bast-irq.c
+++ b/arch/arm/mach-s3c/bast-irq.c
@@ -15,8 +15,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-irq.h>
+#include "regs-irq.h"
 #include <mach/irqs.h>
 
 #include "bast.h"
diff --git a/arch/arm/mach-s3c/common-smdk.c b/arch/arm/mach-s3c/common-smdk.c
index 5392d5106b4b..1ec207159ee2 100644
--- a/arch/arm/mach-s3c/common-smdk.c
+++ b/arch/arm/mach-s3c/common-smdk.c
@@ -28,17 +28,16 @@
 #include <asm/mach/irq.h>
 
 #include <asm/mach-types.h>
-#include <mach/hardware.h>
 #include <asm/irq.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <linux/platform_data/leds-s3c24xx.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
+#include "gpio-cfg.h"
+#include "devs.h"
+#include "pm.h"
 
 #include "common-smdk.h"
 
diff --git a/arch/arm/mach-s3c/cpu.c b/arch/arm/mach-s3c/cpu.c
index 8acba21bbf4b..6e9772555f0d 100644
--- a/arch/arm/mach-s3c/cpu.c
+++ b/arch/arm/mach-s3c/cpu.c
@@ -10,8 +10,8 @@
 #include <linux/init.h>
 #include <linux/io.h>
 
-#include <plat/map-base.h>
-#include <plat/cpu.h>
+#include <mach/map-base.h>
+#include "cpu.h"
 
 unsigned long samsung_cpu_id;
 
diff --git a/arch/arm/mach-s3c/include/plat/cpu.h b/arch/arm/mach-s3c/cpu.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/cpu.h
rename to arch/arm/mach-s3c/cpu.h
diff --git a/arch/arm/mach-s3c/cpufreq-utils.c b/arch/arm/mach-s3c/cpufreq-utils.c
index 75c197d59a75..e4266f271b51 100644
--- a/arch/arm/mach-s3c/cpufreq-utils.c
+++ b/arch/arm/mach-s3c/cpufreq-utils.c
@@ -12,8 +12,8 @@
 #include <linux/io.h>
 #include <linux/clk.h>
 
-#include <mach/map.h>
-#include <mach/regs-clock.h>
+#include "map.h"
+#include "regs-clock.h"
 
 #include <linux/soc/samsung/s3c-cpufreq-core.h>
 
diff --git a/arch/arm/mach-s3c/cpuidle.c b/arch/arm/mach-s3c/cpuidle.c
index 0bac6f6413b0..0e020ee8f78e 100644
--- a/arch/arm/mach-s3c/cpuidle.c
+++ b/arch/arm/mach-s3c/cpuidle.c
@@ -13,8 +13,8 @@
 
 #include <asm/cpuidle.h>
 
-#include <plat/cpu.h>
-#include <mach/map.h>
+#include "cpu.h"
+#include "map.h"
 
 #include "regs-sys.h"
 #include "regs-syscon-power.h"
diff --git a/arch/arm/mach-s3c/crag6410.h b/arch/arm/mach-s3c/crag6410.h
index 00d9aa114aa7..f39ea2ca7a75 100644
--- a/arch/arm/mach-s3c/crag6410.h
+++ b/arch/arm/mach-s3c/crag6410.h
@@ -8,7 +8,7 @@
 #ifndef MACH_CRAG6410_H
 #define MACH_CRAG6410_H
 
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 
 #define GLENFARCLAS_PMIC_IRQ_BASE	IRQ_BOARD_START
 #define BANFF_PMIC_IRQ_BASE		(IRQ_BOARD_START + 64)
diff --git a/arch/arm/mach-s3c/dev-audio.c b/arch/arm/mach-s3c/dev-audio.c
index e3c49b5d1355..fc2f077afd24 100644
--- a/arch/arm/mach-s3c/dev-audio.c
+++ b/arch/arm/mach-s3c/dev-audio.c
@@ -11,13 +11,12 @@
 #include <linux/export.h>
 
 #include <mach/irqs.h>
-#include <mach/map.h>
-#include <mach/dma.h>
+#include "map.h"
 
-#include <plat/devs.h>
+#include "devs.h"
 #include <linux/platform_data/asoc-s3c.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev)
 {
diff --git a/arch/arm/mach-s3c/dev-backlight.c b/arch/arm/mach-s3c/dev-backlight.c
index 799cfdf0606b..6856b69f78f9 100644
--- a/arch/arm/mach-s3c/dev-backlight.c
+++ b/arch/arm/mach-s3c/dev-backlight.c
@@ -11,8 +11,8 @@
 #include <linux/io.h>
 #include <linux/pwm_backlight.h>
 
-#include <plat/devs.h>
-#include <plat/gpio-cfg.h>
+#include "devs.h"
+#include "gpio-cfg.h"
 
 #include "backlight.h"
 
diff --git a/arch/arm/mach-s3c/dev-uart-s3c64xx.c b/arch/arm/mach-s3c/dev-uart-s3c64xx.c
index 021a2b7926fa..8288e8d6c092 100644
--- a/arch/arm/mach-s3c/dev-uart-s3c64xx.c
+++ b/arch/arm/mach-s3c/dev-uart-s3c64xx.c
@@ -15,10 +15,10 @@
 
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
-#include <mach/map.h>
+#include "map.h"
 #include <mach/irqs.h>
 
-#include <plat/devs.h>
+#include "devs.h"
 
 /* Serial port registrations */
 
diff --git a/arch/arm/mach-s3c/dev-uart.c b/arch/arm/mach-s3c/dev-uart.c
index 7476a5dbae77..3d1f7f2fd7c7 100644
--- a/arch/arm/mach-s3c/dev-uart.c
+++ b/arch/arm/mach-s3c/dev-uart.c
@@ -10,7 +10,7 @@
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 
-#include <plat/devs.h>
+#include "devs.h"
 
 /* uart devices */
 
diff --git a/arch/arm/mach-s3c/devs.c b/arch/arm/mach-s3c/devs.c
index 92b36bc71a06..ef2b1847e287 100644
--- a/arch/arm/mach-s3c/devs.c
+++ b/arch/arm/mach-s3c/devs.c
@@ -38,30 +38,29 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/dma.h>
 #include <mach/irqs.h>
-#include <mach/map.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
-#include <mach/regs-s3c2443-clock.h>
+#include "map.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
+#include "regs-s3c2443-clock.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
+#include "cpu.h"
+#include "devs.h"
 #include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/ata-samsung_cf.h>
-#include <plat/fb.h>
+#include "fb.h"
 #include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/hwmon-s3c.h>
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/keypad.h>
+#include "keypad.h"
 #include <linux/platform_data/mmc-s3cmci.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
-#include <plat/pwm-core.h>
-#include <plat/sdhci.h>
+#include "pwm-core.h"
+#include "sdhci.h"
 #include <linux/platform_data/touchscreen-s3c2410.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/usb-ohci-s3c2410.h>
-#include <plat/usb-phy.h>
+#include "usb-phy.h"
 #include <linux/platform_data/asoc-s3c.h>
 #include <linux/platform_data/spi-s3c64xx.h>
 
diff --git a/arch/arm/mach-s3c/include/plat/devs.h b/arch/arm/mach-s3c/devs.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/devs.h
rename to arch/arm/mach-s3c/devs.h
diff --git a/arch/arm/mach-s3c/include/mach/dma-s3c24xx.h b/arch/arm/mach-s3c/dma-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/dma-s3c24xx.h
rename to arch/arm/mach-s3c/dma-s3c24xx.h
diff --git a/arch/arm/mach-s3c/include/mach/dma-s3c64xx.h b/arch/arm/mach-s3c/dma-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/dma-s3c64xx.h
rename to arch/arm/mach-s3c/dma-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/dma.h b/arch/arm/mach-s3c/dma.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/dma.h
rename to arch/arm/mach-s3c/dma.h
diff --git a/arch/arm/mach-s3c/include/plat/fb.h b/arch/arm/mach-s3c/fb.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/fb.h
rename to arch/arm/mach-s3c/fb.h
diff --git a/arch/arm/mach-s3c/include/plat/gpio-cfg-helpers.h b/arch/arm/mach-s3c/gpio-cfg-helpers.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/gpio-cfg-helpers.h
rename to arch/arm/mach-s3c/gpio-cfg-helpers.h
diff --git a/arch/arm/mach-s3c/include/plat/gpio-cfg.h b/arch/arm/mach-s3c/gpio-cfg.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/gpio-cfg.h
rename to arch/arm/mach-s3c/gpio-cfg.h
diff --git a/arch/arm/mach-s3c/include/plat/gpio-core.h b/arch/arm/mach-s3c/gpio-core.h
similarity index 99%
rename from arch/arm/mach-s3c/include/plat/gpio-core.h
rename to arch/arm/mach-s3c/gpio-core.h
index c0bfceb88340..b361c8c0d669 100644
--- a/arch/arm/mach-s3c/include/plat/gpio-core.h
+++ b/arch/arm/mach-s3c/gpio-core.h
@@ -11,7 +11,7 @@
 #define __PLAT_SAMSUNG_GPIO_CORE_H
 
 /* Bring in machine-local definitions, especially S3C_GPIO_END */
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 #include <linux/gpio/driver.h>
 
 #define GPIOCON_OFF	(0x00)
diff --git a/arch/arm/mach-s3c/include/mach/gpio-samsung-s3c24xx.h b/arch/arm/mach-s3c/gpio-samsung-s3c24xx.h
similarity index 99%
rename from arch/arm/mach-s3c/include/mach/gpio-samsung-s3c24xx.h
rename to arch/arm/mach-s3c/gpio-samsung-s3c24xx.h
index f8a114891f16..c29fdc95f883 100644
--- a/arch/arm/mach-s3c/include/mach/gpio-samsung-s3c24xx.h
+++ b/arch/arm/mach-s3c/gpio-samsung-s3c24xx.h
@@ -14,7 +14,7 @@
 #ifndef GPIO_SAMSUNG_S3C24XX_H
 #define GPIO_SAMSUNG_S3C24XX_H
 
-#include <mach/map.h>
+#include "map.h"
 
 /*
  * GPIO sizes for various SoCs:
diff --git a/arch/arm/mach-s3c/include/mach/gpio-samsung-s3c64xx.h b/arch/arm/mach-s3c/gpio-samsung-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/gpio-samsung-s3c64xx.h
rename to arch/arm/mach-s3c/gpio-samsung-s3c64xx.h
diff --git a/arch/arm/mach-s3c/gpio-samsung.c b/arch/arm/mach-s3c/gpio-samsung.c
index f66c820cd82b..9cc4d7eaf78a 100644
--- a/arch/arm/mach-s3c/gpio-samsung.c
+++ b/arch/arm/mach-s3c/gpio-samsung.c
@@ -27,15 +27,15 @@
 #include <asm/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/gpio-core.h>
-#include <plat/gpio-cfg.h>
-#include <plat/gpio-cfg-helpers.h>
-#include <plat/pm.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "gpio-core.h"
+#include "gpio-cfg.h"
+#include "gpio-cfg-helpers.h"
+#include "pm.h"
 
 int samsung_gpio_setpull_updown(struct samsung_gpio_chip *chip,
 				unsigned int off, samsung_gpio_pull_t pull)
diff --git a/arch/arm/mach-s3c/include/mach/gpio-samsung.h b/arch/arm/mach-s3c/gpio-samsung.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/gpio-samsung.h
rename to arch/arm/mach-s3c/gpio-samsung.h
diff --git a/arch/arm/mach-s3c/gta02.h b/arch/arm/mach-s3c/gta02.h
index d5610ba829a4..043ae382bfc5 100644
--- a/arch/arm/mach-s3c/gta02.h
+++ b/arch/arm/mach-s3c/gta02.h
@@ -6,7 +6,7 @@
 #ifndef __MACH_S3C24XX_GTA02_H
 #define __MACH_S3C24XX_GTA02_H __FILE__
 
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 
 #define GTA02_GPIO_AUX_LED	S3C2410_GPB(2)
 #define GTA02_GPIO_USB_PULLUP	S3C2410_GPB(9)
diff --git a/arch/arm/mach-s3c/h1940-bluetooth.c b/arch/arm/mach-s3c/h1940-bluetooth.c
index 186b5321658e..59edcf8a620d 100644
--- a/arch/arm/mach-s3c/h1940-bluetooth.c
+++ b/arch/arm/mach-s3c/h1940-bluetooth.c
@@ -13,10 +13,9 @@
 #include <linux/gpio.h>
 #include <linux/rfkill.h>
 
-#include <plat/gpio-cfg.h>
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
 #include "h1940.h"
 
diff --git a/arch/arm/mach-s3c/include/mach/hardware.h b/arch/arm/mach-s3c/hardware.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/hardware.h
rename to arch/arm/mach-s3c/hardware.h
diff --git a/arch/arm/mach-s3c/include/plat/iic-core.h b/arch/arm/mach-s3c/iic-core.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/iic-core.h
rename to arch/arm/mach-s3c/iic-core.h
diff --git a/arch/arm/mach-s3c/include/mach/io.h b/arch/arm/mach-s3c/include/mach/io.h
index bcddf615adb6..0d0e576f66dc 100644
--- a/arch/arm/mach-s3c/include/mach/io.h
+++ b/arch/arm/mach-s3c/include/mach/io.h
@@ -10,7 +10,7 @@
 #ifndef __ASM_ARM_ARCH_IO_H
 #define __ASM_ARM_ARCH_IO_H
 
-#include <plat/map-base.h>
+#include <mach/map-base.h>
 
 /*
  * ISA style IO, for each machine to sort out mappings for,
diff --git a/arch/arm/mach-s3c/include/plat/map-base.h b/arch/arm/mach-s3c/include/mach/map-base.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/map-base.h
rename to arch/arm/mach-s3c/include/mach/map-base.h
diff --git a/arch/arm/mach-s3c/init.c b/arch/arm/mach-s3c/init.c
index e9acf02ef3c3..9d92f03e9bc1 100644
--- a/arch/arm/mach-s3c/init.c
+++ b/arch/arm/mach-s3c/init.c
@@ -23,8 +23,8 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
+#include "cpu.h"
+#include "devs.h"
 
 static struct cpu_table *cpu;
 
diff --git a/arch/arm/mach-s3c/iotiming-s3c2410.c b/arch/arm/mach-s3c/iotiming-s3c2410.c
index 5d85c259f328..a5c80b7e3d0c 100644
--- a/arch/arm/mach-s3c/iotiming-s3c2410.c
+++ b/arch/arm/mach-s3c/iotiming-s3c2410.c
@@ -14,8 +14,8 @@
 #include <linux/io.h>
 #include <linux/slab.h>
 
-#include <mach/map.h>
-#include <mach/regs-clock.h>
+#include "map.h"
+#include "regs-clock.h"
 
 #include <linux/soc/samsung/s3c-cpufreq-core.h>
 
diff --git a/arch/arm/mach-s3c/iotiming-s3c2412.c b/arch/arm/mach-s3c/iotiming-s3c2412.c
index a22b5611697d..003f89c4dc53 100644
--- a/arch/arm/mach-s3c/iotiming-s3c2412.c
+++ b/arch/arm/mach-s3c/iotiming-s3c2412.c
@@ -23,10 +23,10 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/cpu.h>
+#include "cpu.h"
 #include <linux/soc/samsung/s3c-cpufreq-core.h>
 
-#include <mach/s3c2412.h>
+#include "s3c2412.h"
 
 #define print_ns(x) ((x) / 10), ((x) % 10)
 
diff --git a/arch/arm/mach-s3c/irq-pm-s3c24xx.c b/arch/arm/mach-s3c/irq-pm-s3c24xx.c
index e0131b16a4af..4d5e28312d91 100644
--- a/arch/arm/mach-s3c/irq-pm-s3c24xx.c
+++ b/arch/arm/mach-s3c/irq-pm-s3c24xx.c
@@ -13,14 +13,14 @@
 #include <linux/syscore_ops.h>
 #include <linux/io.h>
 
-#include <plat/cpu.h>
-#include <plat/pm.h>
-#include <plat/map-base.h>
-#include <plat/map-s3c.h>
-
-#include <mach/regs-irq.h>
-#include <mach/regs-gpio.h>
-#include <mach/pm-core.h>
+#include "cpu.h"
+#include "pm.h"
+#include <mach/map-base.h>
+#include "map-s3c.h"
+
+#include "regs-irq.h"
+#include "regs-gpio.h"
+#include "pm-core.h"
 
 #include <asm/irq.h>
 
diff --git a/arch/arm/mach-s3c/irq-pm-s3c64xx.c b/arch/arm/mach-s3c/irq-pm-s3c64xx.c
index 31b221190479..4a1e935bada1 100644
--- a/arch/arm/mach-s3c/irq-pm-s3c64xx.c
+++ b/arch/arm/mach-s3c/irq-pm-s3c64xx.c
@@ -20,11 +20,11 @@
 #include <linux/io.h>
 #include <linux/of.h>
 
-#include <mach/map.h>
+#include "map.h"
 
-#include <mach/regs-gpio.h>
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "regs-gpio.h"
+#include "cpu.h"
+#include "pm.h"
 
 /* We handled all the IRQ types in this code, to save having to make several
  * small files to handle each different type separately. Having the EINT_GRP
diff --git a/arch/arm/mach-s3c/irq-s3c24xx-fiq.S b/arch/arm/mach-s3c/irq-s3c24xx-fiq.S
index 2a84535a14fd..b54cbd012241 100644
--- a/arch/arm/mach-s3c/irq-s3c24xx-fiq.S
+++ b/arch/arm/mach-s3c/irq-s3c24xx-fiq.S
@@ -10,8 +10,8 @@
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 
-#include <mach/map.h>
-#include <mach/regs-irq.h>
+#include "map.h"
+#include "regs-irq.h"
 
 #include <linux/spi/s3c24xx-fiq.h>
 
diff --git a/arch/arm/mach-s3c/irq-s3c24xx.c b/arch/arm/mach-s3c/irq-s3c24xx.c
index 3965347cacf0..79b5f19af7a5 100644
--- a/arch/arm/mach-s3c/irq-s3c24xx.c
+++ b/arch/arm/mach-s3c/irq-s3c24xx.c
@@ -26,12 +26,12 @@
 #include <asm/mach/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/regs-irq.h>
-#include <mach/regs-gpio.h>
+#include "regs-irq.h"
+#include "regs-gpio.h"
 
-#include <plat/cpu.h>
-#include <plat/regs-irqtype.h>
-#include <plat/pm.h>
+#include "cpu.h"
+#include "regs-irqtype.h"
+#include "pm.h"
 
 #define S3C_IRQTYPE_NONE	0
 #define S3C_IRQTYPE_EINT	1
diff --git a/arch/arm/mach-s3c/include/plat/keypad.h b/arch/arm/mach-s3c/keypad.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/keypad.h
rename to arch/arm/mach-s3c/keypad.h
diff --git a/arch/arm/mach-s3c/mach-amlm5900.c b/arch/arm/mach-s3c/mach-amlm5900.c
index f9240081f840..5c67f20e636e 100644
--- a/arch/arm/mach-s3c/mach-amlm5900.c
+++ b/arch/arm/mach-s3c/mach-amlm5900.c
@@ -27,25 +27,24 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <linux/platform_data/fb-s3c2410.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/gpio-cfg.h>
+#include "devs.h"
+#include "cpu.h"
+#include "gpio-cfg.h"
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/map.h>
 #include <linux/mtd/physmap.h>
 
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-anubis.c b/arch/arm/mach-s3c/mach-anubis.c
index 5cfb7aed9fe7..ef953754a39c 100644
--- a/arch/arm/mach-s3c/mach-anubis.c
+++ b/arch/arm/mach-s3c/mach-anubis.c
@@ -24,12 +24,11 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
@@ -40,10 +39,10 @@
 
 #include <net/ax88796.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "devs.h"
+#include "cpu.h"
 #include <linux/platform_data/asoc-s3c24xx_simtec.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "anubis.h"
 #include "s3c24xx.h"
diff --git a/arch/arm/mach-s3c/mach-anw6410.c b/arch/arm/mach-s3c/mach-anw6410.c
index 9bf8c8791553..663fb34ded0b 100644
--- a/arch/arm/mach-s3c/mach-anw6410.c
+++ b/arch/arm/mach-s3c/mach-anw6410.c
@@ -30,20 +30,20 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
+#include "map.h"
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/fb.h>
+#include "fb.h"
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "devs.h"
+#include "cpu.h"
 #include <mach/irqs.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/samsung-time.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "regs-modem.h"
diff --git a/arch/arm/mach-s3c/mach-at2440evb.c b/arch/arm/mach-s3c/mach-at2440evb.c
index 2103c4c1059a..0e107dde6ded 100644
--- a/arch/arm/mach-s3c/mach-at2440evb.c
+++ b/arch/arm/mach-s3c/mach-at2440evb.c
@@ -24,13 +24,12 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <linux/platform_data/fb-s3c2410.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
@@ -39,10 +38,10 @@
 #include <linux/mtd/nand_ecc.h>
 #include <linux/mtd/partitions.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "devs.h"
+#include "cpu.h"
 #include <linux/platform_data/mmc-s3cmci.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-bast.c b/arch/arm/mach-s3c/mach-bast.c
index 6e363afbaab1..8afc6a846dee 100644
--- a/arch/arm/mach-s3c/mach-bast.c
+++ b/arch/arm/mach-s3c/mach-bast.c
@@ -40,16 +40,15 @@
 #include <asm/mach/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/hardware.h>
 #include <linux/platform_data/fb-s3c2410.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
-#include <plat/cpu.h>
+#include "cpu.h"
 #include <linux/soc/samsung/s3c-cpu-freq.h>
-#include <plat/devs.h>
-#include <plat/gpio-cfg.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "gpio-cfg.h"
+#include "samsung-time.h"
 
 #include "bast.h"
 #include "s3c24xx.h"
diff --git a/arch/arm/mach-s3c/mach-crag6410-module.c b/arch/arm/mach-s3c/mach-crag6410-module.c
index 937d0a83f8fd..2dedc025f604 100644
--- a/arch/arm/mach-s3c/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c/mach-crag6410-module.c
@@ -27,7 +27,7 @@
 
 #include <linux/platform_data/spi-s3c64xx.h>
 
-#include <plat/cpu.h>
+#include "cpu.h"
 #include <mach/irqs.h>
 
 #include "crag6410.h"
diff --git a/arch/arm/mach-s3c/mach-crag6410.c b/arch/arm/mach-s3c/mach-crag6410.c
index 947f344ac4d4..10cc27e87f32 100644
--- a/arch/arm/mach-s3c/mach-crag6410.c
+++ b/arch/arm/mach-s3c/mach-crag6410.c
@@ -44,23 +44,23 @@
 #include <asm/mach-types.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <mach/irqs.h>
 
-#include <plat/fb.h>
-#include <plat/sdhci.h>
-#include <plat/gpio-cfg.h>
+#include "fb.h"
+#include "sdhci.h"
+#include "gpio-cfg.h"
 #include <linux/platform_data/spi-s3c64xx.h>
 
-#include <plat/keypad.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "keypad.h"
+#include "devs.h"
+#include "cpu.h"
 #include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/pm.h>
-#include <plat/samsung-time.h>
+#include "pm.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "crag6410.h"
diff --git a/arch/arm/mach-s3c/mach-gta02.c b/arch/arm/mach-s3c/mach-gta02.c
index bf0de248b489..e3e0f774a30b 100644
--- a/arch/arm/mach-s3c/mach-gta02.c
+++ b/arch/arm/mach-s3c/mach-gta02.c
@@ -59,16 +59,15 @@
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/fb-s3c2410.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/regs-irq.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/gpio-cfg.h>
-#include <plat/pm.h>
-#include <plat/samsung-time.h>
+#include "regs-gpio.h"
+#include "regs-irq.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "gpio-cfg.h"
+#include "pm.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "gta02.h"
diff --git a/arch/arm/mach-s3c/mach-h1940.c b/arch/arm/mach-s3c/mach-h1940.c
index 6e329cb1a7ec..e9d04424c80c 100644
--- a/arch/arm/mach-s3c/mach-h1940.c
+++ b/arch/arm/mach-s3c/mach-h1940.c
@@ -48,17 +48,17 @@
 #include <sound/uda1380.h>
 
 #include <linux/platform_data/fb-s3c2410.h>
-#include <mach/map.h>
-#include <mach/hardware.h>
-#include <mach/regs-clock.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/gpio-cfg.h>
-#include <plat/pm.h>
-#include <plat/samsung-time.h>
+#include "map.h"
+#include "hardware.h"
+#include "regs-clock.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "gpio-cfg.h"
+#include "pm.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "h1940.h"
diff --git a/arch/arm/mach-s3c/mach-hmt.c b/arch/arm/mach-s3c/mach-hmt.c
index dd1b73c31956..2bb229536bb4 100644
--- a/arch/arm/mach-s3c/mach-hmt.c
+++ b/arch/arm/mach-s3c/mach-hmt.c
@@ -25,20 +25,20 @@
 #include <asm/mach/irq.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/map.h>
+#include "map.h"
 #include <mach/irqs.h>
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <mach/gpio-samsung.h>
-#include <plat/fb.h>
+#include "gpio-samsung.h"
+#include "fb.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-jive.c b/arch/arm/mach-s3c/mach-jive.c
index 27f4c99172c6..fc54194a001b 100644
--- a/arch/arm/mach-s3c/mach-jive.c
+++ b/arch/arm/mach-s3c/mach-jive.c
@@ -31,10 +31,10 @@
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
+#include "hardware.h"
+#include "regs-gpio.h"
 #include <linux/platform_data/fb-s3c2410.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 
 #include <asm/mach-types.h>
 
@@ -43,12 +43,12 @@
 #include <linux/mtd/nand_ecc.h>
 #include <linux/mtd/partitions.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "gpio-cfg.h"
+#include "devs.h"
+#include "cpu.h"
+#include "pm.h"
 #include <linux/platform_data/usb-s3c2410_udc.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "s3c2412-power.h"
diff --git a/arch/arm/mach-s3c/mach-mini2440.c b/arch/arm/mach-s3c/mach-mini2440.c
index 4280d0a8c4e2..5dc4b3239e97 100644
--- a/arch/arm/mach-s3c/mach-mini2440.c
+++ b/arch/arm/mach-s3c/mach-mini2440.c
@@ -31,13 +31,12 @@
 #include <asm/mach/map.h>
 
 #include <linux/platform_data/fb-s3c2410.h>
-#include <mach/hardware.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 #include <linux/platform_data/leds-s3c24xx.h>
 #include <mach/irqs.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <linux/platform_data/mmc-s3cmci.h>
@@ -48,10 +47,10 @@
 #include <linux/mtd/nand_ecc.h>
 #include <linux/mtd/partitions.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "gpio-cfg.h"
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include <sound/s3c24xx_uda134x.h>
 
diff --git a/arch/arm/mach-s3c/mach-mini6410.c b/arch/arm/mach-s3c/mach-mini6410.c
index 369325107ff1..e8da59ed739d 100644
--- a/arch/arm/mach-s3c/mach-mini6410.c
+++ b/arch/arm/mach-s3c/mach-mini6410.c
@@ -23,23 +23,23 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
 #include <linux/soc/samsung/s3c-adc.h>
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/fb.h>
+#include "cpu.h"
+#include "devs.h"
+#include "fb.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/mmc-sdhci-s3c.h>
-#include <plat/sdhci.h>
+#include "sdhci.h"
 #include <linux/platform_data/touchscreen-s3c2410.h>
 #include <mach/irqs.h>
 
 #include <video/platform_lcd.h>
 #include <video/samsung_fimd.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "regs-modem.h"
diff --git a/arch/arm/mach-s3c/mach-n30.c b/arch/arm/mach-s3c/mach-n30.c
index 196f4cb17fbb..64b9b8e9d130 100644
--- a/arch/arm/mach-s3c/mach-n30.c
+++ b/arch/arm/mach-s3c/mach-n30.c
@@ -27,15 +27,15 @@
 #include <linux/io.h>
 #include <linux/mmc/host.h>
 
-#include <mach/hardware.h>
+#include "hardware.h"
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/leds-s3c24xx.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
@@ -43,11 +43,11 @@
 
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
+#include "cpu.h"
+#include "devs.h"
 #include <linux/platform_data/mmc-s3cmci.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-ncp.c b/arch/arm/mach-s3c/mach-ncp.c
index 6e2e30e2fee3..7c719f1903c3 100644
--- a/arch/arm/mach-s3c/mach-ncp.c
+++ b/arch/arm/mach-s3c/mach-ncp.c
@@ -25,17 +25,17 @@
 #include <asm/mach/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/map.h>
+#include "map.h"
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/fb.h>
+#include "fb.h"
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-nexcoder.c b/arch/arm/mach-s3c/mach-nexcoder.c
index 9b281d1a5536..6e1ba2cd650f 100644
--- a/arch/arm/mach-s3c/mach-nexcoder.c
+++ b/arch/arm/mach-s3c/mach-nexcoder.c
@@ -28,19 +28,18 @@
 #include <asm/mach/irq.h>
 
 #include <asm/setup.h>
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 //#include <asm/debug-ll.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "gpio-cfg.h"
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-osiris-dvs.c b/arch/arm/mach-s3c/mach-osiris-dvs.c
index 1250520b3bcc..2e283aedab65 100644
--- a/arch/arm/mach-s3c/mach-osiris-dvs.c
+++ b/arch/arm/mach-s3c/mach-osiris-dvs.c
@@ -15,7 +15,7 @@
 #include <linux/mfd/tps65010.h>
 
 #include <linux/soc/samsung/s3c-cpu-freq.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 
 #define OSIRIS_GPIO_DVS	S3C2410_GPB(5)
 
diff --git a/arch/arm/mach-s3c/mach-osiris.c b/arch/arm/mach-s3c/mach-osiris.c
index 2aeeb2230b85..71a3640e55bd 100644
--- a/arch/arm/mach-s3c/mach-osiris.c
+++ b/arch/arm/mach-s3c/mach-osiris.c
@@ -36,15 +36,14 @@
 #include <linux/mtd/nand_ecc.h>
 #include <linux/mtd/partitions.h>
 
-#include <plat/cpu.h>
+#include "cpu.h"
 #include <linux/soc/samsung/s3c-cpu-freq.h>
-#include <plat/devs.h>
-#include <plat/gpio-cfg.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "gpio-cfg.h"
+#include "samsung-time.h"
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
 #include "s3c24xx.h"
 #include "osiris.h"
diff --git a/arch/arm/mach-s3c/mach-otom.c b/arch/arm/mach-s3c/mach-otom.c
index 60917d1bf236..947976da8255 100644
--- a/arch/arm/mach-s3c/mach-otom.c
+++ b/arch/arm/mach-s3c/mach-otom.c
@@ -22,14 +22,13 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/samsung-time.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "otom.h"
diff --git a/arch/arm/mach-s3c/mach-qt2410.c b/arch/arm/mach-s3c/mach-qt2410.c
index db2ff1085718..9f1705728be4 100644
--- a/arch/arm/mach-s3c/mach-qt2410.c
+++ b/arch/arm/mach-s3c/mach-qt2410.c
@@ -28,7 +28,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
@@ -37,13 +36,13 @@
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 
-#include <plat/gpio-cfg.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/pm.h>
-#include <plat/samsung-time.h>
+#include "gpio-cfg.h"
+#include "devs.h"
+#include "cpu.h"
+#include "pm.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "common-smdk.h"
diff --git a/arch/arm/mach-s3c/mach-real6410.c b/arch/arm/mach-s3c/mach-real6410.c
index b72598b4ae27..6bb4bcdad600 100644
--- a/arch/arm/mach-s3c/mach-real6410.c
+++ b/arch/arm/mach-s3c/mach-real6410.c
@@ -24,21 +24,21 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <mach/irqs.h>
 
 #include <linux/soc/samsung/s3c-adc.h>
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/fb.h>
+#include "cpu.h"
+#include "devs.h"
+#include "fb.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
 
 #include <video/platform_lcd.h>
 #include <video/samsung_fimd.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "regs-modem.h"
diff --git a/arch/arm/mach-s3c/mach-rx1950.c b/arch/arm/mach-s3c/mach-rx1950.c
index 87d82c954523..b9cc919de617 100644
--- a/arch/arm/mach-s3c/mach-rx1950.c
+++ b/arch/arm/mach-s3c/mach-rx1950.c
@@ -46,15 +46,15 @@
 
 #include <sound/uda1380.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
-#include <plat/samsung-time.h>
-#include <plat/gpio-cfg.h>
+#include "hardware.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "pm.h"
+#include "samsung-time.h"
+#include "gpio-cfg.h"
 
 #include "s3c24xx.h"
 #include "h1940.h"
diff --git a/arch/arm/mach-s3c/mach-rx3715.c b/arch/arm/mach-s3c/mach-rx3715.c
index c810680669d4..026ed8aaf542 100644
--- a/arch/arm/mach-s3c/mach-rx3715.c
+++ b/arch/arm/mach-s3c/mach-rx3715.c
@@ -35,15 +35,14 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
-#include <plat/samsung-time.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "pm.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "h1940.h"
diff --git a/arch/arm/mach-s3c/mach-s3c2416-dt.c b/arch/arm/mach-s3c/mach-s3c2416-dt.c
index 2924e230e79d..418544d3015d 100644
--- a/arch/arm/mach-s3c/mach-s3c2416-dt.c
+++ b/arch/arm/mach-s3c/mach-s3c2416-dt.c
@@ -16,10 +16,10 @@
 #include <linux/serial_s3c.h>
 
 #include <asm/mach/arch.h>
-#include <mach/map.h>
+#include "map.h"
 
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "cpu.h"
+#include "pm.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-s3c64xx-dt.c b/arch/arm/mach-s3c/mach-s3c64xx-dt.c
index 1b8b61edd40e..ca9d964d44ee 100644
--- a/arch/arm/mach-s3c/mach-s3c64xx-dt.c
+++ b/arch/arm/mach-s3c/mach-s3c64xx-dt.c
@@ -8,8 +8,8 @@
 #include <asm/mach/map.h>
 #include <asm/system_misc.h>
 
-#include <plat/cpu.h>
-#include <mach/map.h>
+#include "cpu.h"
+#include "map.h"
 
 #include "s3c64xx.h"
 #include "watchdog-reset.h"
diff --git a/arch/arm/mach-s3c/mach-smartq.c b/arch/arm/mach-s3c/mach-smartq.c
index fa5f2ebc6dbc..ba7dee0ca372 100644
--- a/arch/arm/mach-s3c/mach-smartq.c
+++ b/arch/arm/mach-s3c/mach-smartq.c
@@ -19,21 +19,21 @@
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
+#include "cpu.h"
+#include "devs.h"
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/gpio-cfg.h>
+#include "gpio-cfg.h"
 #include <linux/platform_data/hwmon-s3c.h>
 #include <linux/platform_data/usb-ohci-s3c2410.h>
-#include <plat/sdhci.h>
+#include "sdhci.h"
 #include <linux/platform_data/touchscreen-s3c2410.h>
 
 #include <video/platform_lcd.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "mach-smartq.h"
diff --git a/arch/arm/mach-s3c/mach-smartq5.c b/arch/arm/mach-s3c/mach-smartq5.c
index 91560ed02738..514824efec63 100644
--- a/arch/arm/mach-s3c/mach-smartq5.c
+++ b/arch/arm/mach-s3c/mach-smartq5.c
@@ -15,15 +15,15 @@
 
 #include <video/samsung_fimd.h>
 #include <mach/irqs.h>
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/fb.h>
-#include <plat/gpio-cfg.h>
-#include <plat/samsung-time.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "fb.h"
+#include "gpio-cfg.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "mach-smartq.h"
diff --git a/arch/arm/mach-s3c/mach-smartq7.c b/arch/arm/mach-s3c/mach-smartq7.c
index 9eadc837ba12..a3f4cb9064e6 100644
--- a/arch/arm/mach-s3c/mach-smartq7.c
+++ b/arch/arm/mach-s3c/mach-smartq7.c
@@ -15,15 +15,15 @@
 
 #include <video/samsung_fimd.h>
 #include <mach/irqs.h>
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/fb.h>
-#include <plat/gpio-cfg.h>
-#include <plat/samsung-time.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "fb.h"
+#include "gpio-cfg.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "mach-smartq.h"
diff --git a/arch/arm/mach-s3c/mach-smdk2410.c b/arch/arm/mach-s3c/mach-smdk2410.c
index 35aa8ec7cc4f..fb69487d6c2c 100644
--- a/arch/arm/mach-s3c/mach-smdk2410.c
+++ b/arch/arm/mach-s3c/mach-smdk2410.c
@@ -19,22 +19,21 @@
 #include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "common-smdk.h"
diff --git a/arch/arm/mach-s3c/mach-smdk2413.c b/arch/arm/mach-s3c/mach-smdk2413.c
index f2305961f7eb..9cb634c00fb9 100644
--- a/arch/arm/mach-s3c/mach-smdk2413.c
+++ b/arch/arm/mach-s3c/mach-smdk2413.c
@@ -23,24 +23,24 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
+#include "hardware.h"
 #include <asm/hardware/iomd.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 //#include <asm/debug-ll.h>
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <linux/platform_data/fb-s3c2410.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "common-smdk.h"
diff --git a/arch/arm/mach-s3c/mach-smdk2416.c b/arch/arm/mach-s3c/mach-smdk2416.c
index 7fd5df4cf7e3..e6b4c6fd16e6 100644
--- a/arch/arm/mach-s3c/mach-smdk2416.c
+++ b/arch/arm/mach-s3c/mach-smdk2416.c
@@ -25,27 +25,27 @@
 #include <asm/mach/irq.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/hardware.h>
+#include "hardware.h"
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/regs-s3c2443-clock.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "regs-s3c2443-clock.h"
+#include "gpio-samsung.h"
 
 #include <linux/platform_data/leds-s3c24xx.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "gpio-cfg.h"
+#include "devs.h"
+#include "cpu.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
-#include <plat/sdhci.h>
+#include "sdhci.h"
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/s3c-hsudc.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
-#include <plat/fb.h>
+#include "fb.h"
 
 #include "s3c24xx.h"
 #include "common-smdk.h"
diff --git a/arch/arm/mach-s3c/mach-smdk2440.c b/arch/arm/mach-s3c/mach-smdk2440.c
index d72f86a68c84..eca2405ccb9a 100644
--- a/arch/arm/mach-s3c/mach-smdk2440.c
+++ b/arch/arm/mach-s3c/mach-smdk2440.c
@@ -23,20 +23,19 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
 #include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "common-smdk.h"
diff --git a/arch/arm/mach-s3c/mach-smdk2443.c b/arch/arm/mach-s3c/mach-smdk2443.c
index b439dfabd421..156e0217f7bb 100644
--- a/arch/arm/mach-s3c/mach-smdk2443.c
+++ b/arch/arm/mach-s3c/mach-smdk2443.c
@@ -22,18 +22,17 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 
 #include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "common-smdk.h"
diff --git a/arch/arm/mach-s3c/mach-smdk6400.c b/arch/arm/mach-s3c/mach-smdk6400.c
index a2a70c5f5667..6a7aa7cad0ce 100644
--- a/arch/arm/mach-s3c/mach-smdk6400.c
+++ b/arch/arm/mach-s3c/mach-smdk6400.c
@@ -23,13 +23,13 @@
 #include <asm/mach/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/map.h>
+#include "map.h"
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "devs.h"
+#include "cpu.h"
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <mach/gpio-samsung.h>
-#include <plat/samsung-time.h>
+#include "gpio-samsung.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-smdk6410.c b/arch/arm/mach-s3c/mach-smdk6410.c
index a80c2138e90b..f288661b7fb9 100644
--- a/arch/arm/mach-s3c/mach-smdk6410.c
+++ b/arch/arm/mach-s3c/mach-smdk6410.c
@@ -46,24 +46,24 @@
 #include <asm/mach/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/map.h>
+#include "map.h"
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <linux/platform_data/ata-samsung_cf.h>
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/fb.h>
-#include <plat/gpio-cfg.h>
+#include "fb.h"
+#include "gpio-cfg.h"
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "devs.h"
+#include "cpu.h"
 #include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
-#include <plat/keypad.h>
-#include <plat/samsung-time.h>
+#include "keypad.h"
+#include "samsung-time.h"
 
 #include "backlight.h"
 #include "s3c64xx.h"
diff --git a/arch/arm/mach-s3c/mach-tct_hammer.c b/arch/arm/mach-s3c/mach-tct_hammer.c
index f1ed79889e39..92d5494b7c98 100644
--- a/arch/arm/mach-s3c/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c/mach-tct_hammer.c
@@ -25,19 +25,18 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "devs.h"
+#include "cpu.h"
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/map.h>
 #include <linux/mtd/physmap.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-vr1000.c b/arch/arm/mach-s3c/mach-vr1000.c
index 854783386a06..78fa7f8411ae 100644
--- a/arch/arm/mach-s3c/mach-vr1000.c
+++ b/arch/arm/mach-s3c/mach-vr1000.c
@@ -34,14 +34,13 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <linux/platform_data/asoc-s3c24xx_simtec.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/samsung-time.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "samsung-time.h"
 
 #include "bast.h"
 #include "s3c24xx.h"
diff --git a/arch/arm/mach-s3c/mach-vstms.c b/arch/arm/mach-s3c/mach-vstms.c
index 7496271bb343..6776ae73d157 100644
--- a/arch/arm/mach-s3c/mach-vstms.c
+++ b/arch/arm/mach-s3c/mach-vstms.c
@@ -24,23 +24,22 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
 #include <linux/platform_data/fb-s3c2410.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/include/plat/map-s3c.h b/arch/arm/mach-s3c/map-s3c.h
similarity index 97%
rename from arch/arm/mach-s3c/include/plat/map-s3c.h
rename to arch/arm/mach-s3c/map-s3c.h
index bf247d836684..a18fdd3d6ae2 100644
--- a/arch/arm/mach-s3c/include/plat/map-s3c.h
+++ b/arch/arm/mach-s3c/map-s3c.h
@@ -9,7 +9,7 @@
 #ifndef __ASM_PLAT_MAP_S3C_H
 #define __ASM_PLAT_MAP_S3C_H __FILE__
 
-#include <mach/map.h>
+#include "map.h"
 
 #define S3C24XX_VA_IRQ		S3C_VA_IRQ
 #define S3C24XX_VA_MEMCTRL	S3C_VA_MEM
@@ -65,6 +65,6 @@ extern void __iomem *s3c24xx_va_gpio2;
 #define S3C24XX_VA_GPIO2 S3C24XX_VA_GPIO
 #endif
 
-#include <plat/map-s5p.h>
+#include "map-s5p.h"
 
 #endif /* __ASM_PLAT_MAP_S3C_H */
diff --git a/arch/arm/mach-s3c/include/mach/map-s3c24xx.h b/arch/arm/mach-s3c/map-s3c24xx.h
similarity index 98%
rename from arch/arm/mach-s3c/include/mach/map-s3c24xx.h
rename to arch/arm/mach-s3c/map-s3c24xx.h
index a20c9fd0d855..b5dba78a9dd7 100644
--- a/arch/arm/mach-s3c/include/mach/map-s3c24xx.h
+++ b/arch/arm/mach-s3c/map-s3c24xx.h
@@ -9,8 +9,8 @@
 #ifndef __ASM_ARCH_MAP_H
 #define __ASM_ARCH_MAP_H
 
-#include <plat/map-base.h>
-#include <plat/map-s3c.h>
+#include <mach/map-base.h>
+#include "map-s3c.h"
 
 /*
  * interrupt controller is the first thing we put in, to make
diff --git a/arch/arm/mach-s3c/include/mach/map-s3c64xx.h b/arch/arm/mach-s3c/map-s3c64xx.h
similarity index 98%
rename from arch/arm/mach-s3c/include/mach/map-s3c64xx.h
rename to arch/arm/mach-s3c/map-s3c64xx.h
index 9372a535b7ba..d7740d2a77c4 100644
--- a/arch/arm/mach-s3c/include/mach/map-s3c64xx.h
+++ b/arch/arm/mach-s3c/map-s3c64xx.h
@@ -11,8 +11,8 @@
 #ifndef __ASM_ARCH_MAP_H
 #define __ASM_ARCH_MAP_H __FILE__
 
-#include <plat/map-base.h>
-#include <plat/map-s3c.h>
+#include <mach/map-base.h>
+#include "map-s3c.h"
 
 /*
  * Post-mux Chip Select Regions Xm0CSn_
diff --git a/arch/arm/mach-s3c/include/plat/map-s5p.h b/arch/arm/mach-s3c/map-s5p.h
similarity index 94%
rename from arch/arm/mach-s3c/include/plat/map-s5p.h
rename to arch/arm/mach-s3c/map-s5p.h
index 3812085f8761..cd237924e34d 100644
--- a/arch/arm/mach-s3c/include/plat/map-s5p.h
+++ b/arch/arm/mach-s3c/map-s5p.h
@@ -15,6 +15,6 @@
 #define VA_VIC2			VA_VIC(2)
 #define VA_VIC3			VA_VIC(3)
 
-#include <plat/map-s3c.h>
+#include "map-s3c.h"
 
 #endif /* __ASM_PLAT_MAP_S5P_H */
diff --git a/arch/arm/mach-s3c/include/mach/map.h b/arch/arm/mach-s3c/map.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/map.h
rename to arch/arm/mach-s3c/map.h
diff --git a/arch/arm/mach-s3c/pl080.c b/arch/arm/mach-s3c/pl080.c
index 152edbeea0c7..cf7262073cc0 100644
--- a/arch/arm/mach-s3c/pl080.c
+++ b/arch/arm/mach-s3c/pl080.c
@@ -10,9 +10,9 @@
 #include <linux/amba/pl08x.h>
 #include <linux/of.h>
 
-#include <plat/cpu.h>
+#include "cpu.h"
 #include <mach/irqs.h>
-#include <mach/map.h>
+#include "map.h"
 
 #include "regs-sys.h"
 
diff --git a/arch/arm/mach-s3c/platformdata.c b/arch/arm/mach-s3c/platformdata.c
index cbc3b4b45c74..e643c81aef45 100644
--- a/arch/arm/mach-s3c/platformdata.c
+++ b/arch/arm/mach-s3c/platformdata.c
@@ -9,8 +9,8 @@
 #include <linux/string.h>
 #include <linux/platform_device.h>
 
-#include <plat/devs.h>
-#include <plat/sdhci.h>
+#include "devs.h"
+#include "sdhci.h"
 
 void __init *s3c_set_platdata(void *pd, size_t pdsize,
 			      struct platform_device *pdev)
diff --git a/arch/arm/mach-s3c/pm-common.c b/arch/arm/mach-s3c/pm-common.c
index 59a10c6dcba1..82b8c3148d7f 100644
--- a/arch/arm/mach-s3c/pm-common.c
+++ b/arch/arm/mach-s3c/pm-common.c
@@ -12,7 +12,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 
-#include <plat/pm-common.h>
+#include "pm-common.h"
 
 /* helper functions to save and restore register state */
 
diff --git a/arch/arm/mach-s3c/include/plat/pm-common.h b/arch/arm/mach-s3c/pm-common.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/pm-common.h
rename to arch/arm/mach-s3c/pm-common.h
diff --git a/arch/arm/mach-s3c/include/mach/pm-core-s3c24xx.h b/arch/arm/mach-s3c/pm-core-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/pm-core-s3c24xx.h
rename to arch/arm/mach-s3c/pm-core-s3c24xx.h
diff --git a/arch/arm/mach-s3c/include/mach/pm-core-s3c64xx.h b/arch/arm/mach-s3c/pm-core-s3c64xx.h
similarity index 96%
rename from arch/arm/mach-s3c/include/mach/pm-core-s3c64xx.h
rename to arch/arm/mach-s3c/pm-core-s3c64xx.h
index 33cf242734a0..06f564e5cf63 100644
--- a/arch/arm/mach-s3c/include/mach/pm-core-s3c64xx.h
+++ b/arch/arm/mach-s3c/pm-core-s3c64xx.h
@@ -14,9 +14,9 @@
 #include <linux/serial_s3c.h>
 #include <linux/delay.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/regs-clock.h>
-#include <mach/map.h>
+#include "regs-gpio.h"
+#include "regs-clock.h"
+#include "map.h"
 
 static inline void s3c_pm_debug_init_uart(void)
 {
diff --git a/arch/arm/mach-s3c/include/mach/pm-core.h b/arch/arm/mach-s3c/pm-core.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/pm-core.h
rename to arch/arm/mach-s3c/pm-core.h
diff --git a/arch/arm/mach-s3c/pm-gpio.c b/arch/arm/mach-s3c/pm-gpio.c
index cb2e3bc79336..cfdbc2337998 100644
--- a/arch/arm/mach-s3c/pm-gpio.c
+++ b/arch/arm/mach-s3c/pm-gpio.c
@@ -13,10 +13,10 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 
-#include <plat/gpio-core.h>
-#include <plat/pm.h>
+#include "gpio-core.h"
+#include "pm.h"
 
 /* PM GPIO helpers */
 
diff --git a/arch/arm/mach-s3c/pm-h1940.S b/arch/arm/mach-s3c/pm-h1940.S
index f9ee515e1cbe..3bf6685123cb 100644
--- a/arch/arm/mach-s3c/pm-h1940.S
+++ b/arch/arm/mach-s3c/pm-h1940.S
@@ -7,9 +7,9 @@
 
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <mach/map.h>
+#include "map.h"
 
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 
 	.text
 	.global	h1940_pm_return
diff --git a/arch/arm/mach-s3c/pm-s3c2410.c b/arch/arm/mach-s3c/pm-s3c2410.c
index 2d8ea701380a..a66419883735 100644
--- a/arch/arm/mach-s3c/pm-s3c2410.c
+++ b/arch/arm/mach-s3c/pm-s3c2410.c
@@ -16,13 +16,12 @@
 
 #include <asm/mach-types.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
-#include <plat/gpio-cfg.h>
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "gpio-cfg.h"
+#include "cpu.h"
+#include "pm.h"
 
 #include "h1940.h"
 
diff --git a/arch/arm/mach-s3c/pm-s3c2412.c b/arch/arm/mach-s3c/pm-s3c2412.c
index 1ad9c61f9253..2785a969c29f 100644
--- a/arch/arm/mach-s3c/pm-s3c2412.c
+++ b/arch/arm/mach-s3c/pm-s3c2412.c
@@ -19,14 +19,13 @@
 #include <asm/cacheflush.h>
 #include <asm/irq.h>
 
-#include <mach/hardware.h>
 #include <mach/irqs.h>
 
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 
-#include <plat/cpu.h>
-#include <plat/pm.h>
-#include <plat/wakeup-mask.h>
+#include "cpu.h"
+#include "pm.h"
+#include "wakeup-mask.h"
 
 #include "regs-dsc.h"
 #include "s3c2412-power.h"
diff --git a/arch/arm/mach-s3c/pm-s3c2416.c b/arch/arm/mach-s3c/pm-s3c2416.c
index 9a2f05e279d4..f69ad84cf4ff 100644
--- a/arch/arm/mach-s3c/pm-s3c2416.c
+++ b/arch/arm/mach-s3c/pm-s3c2416.c
@@ -11,10 +11,10 @@
 
 #include <asm/cacheflush.h>
 
-#include <mach/regs-s3c2443-clock.h>
+#include "regs-s3c2443-clock.h"
 
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "cpu.h"
+#include "pm.h"
 
 #include "s3c2412-power.h"
 
diff --git a/arch/arm/mach-s3c/pm-s3c24xx.c b/arch/arm/mach-s3c/pm-s3c24xx.c
index c64988c609ad..6ca5e6aaca54 100644
--- a/arch/arm/mach-s3c/pm-s3c24xx.c
+++ b/arch/arm/mach-s3c/pm-s3c24xx.c
@@ -21,15 +21,15 @@
 #include <linux/serial_s3c.h>
 #include <linux/io.h>
 
-#include <mach/regs-clock.h>
-#include <mach/regs-gpio.h>
-#include <mach/regs-irq.h>
-#include <mach/gpio-samsung.h>
+#include "regs-clock.h"
+#include "regs-gpio.h"
+#include "regs-irq.h"
+#include "gpio-samsung.h"
 
 #include <asm/mach/time.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/pm.h>
+#include "gpio-cfg.h"
+#include "pm.h"
 
 #include "regs-mem.h"
 
diff --git a/arch/arm/mach-s3c/pm-s3c64xx.c b/arch/arm/mach-s3c/pm-s3c64xx.c
index a612e9779057..629e9c9762ca 100644
--- a/arch/arm/mach-s3c/pm-s3c64xx.c
+++ b/arch/arm/mach-s3c/pm-s3c64xx.c
@@ -14,17 +14,17 @@
 #include <linux/gpio.h>
 #include <linux/pm_domain.h>
 
-#include <mach/map.h>
+#include "map.h"
 #include <mach/irqs.h>
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
-#include <plat/wakeup-mask.h>
+#include "cpu.h"
+#include "devs.h"
+#include "pm.h"
+#include "wakeup-mask.h"
 
-#include <mach/regs-gpio.h>
-#include <mach/regs-clock.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "regs-clock.h"
+#include "gpio-samsung.h"
 
 #include "regs-gpio-memport.h"
 #include "regs-modem.h"
diff --git a/arch/arm/mach-s3c/pm.c b/arch/arm/mach-s3c/pm.c
index 03c22a9dee21..c563bb9d92be 100644
--- a/arch/arm/mach-s3c/pm.c
+++ b/arch/arm/mach-s3c/pm.c
@@ -18,16 +18,16 @@
 #include <asm/cacheflush.h>
 #include <asm/suspend.h>
 
-#include <mach/map.h>
-#include <mach/regs-clock.h>
-#include <mach/regs-irq.h>
+#include "map.h"
+#include "regs-clock.h"
+#include "regs-irq.h"
 #include <mach/irqs.h>
 
 #include <asm/irq.h>
 
-#include <plat/cpu.h>
-#include <plat/pm.h>
-#include <mach/pm-core.h>
+#include "cpu.h"
+#include "pm.h"
+#include "pm-core.h"
 
 /* for external use */
 
diff --git a/arch/arm/mach-s3c/include/plat/pm.h b/arch/arm/mach-s3c/pm.h
similarity index 98%
rename from arch/arm/mach-s3c/include/plat/pm.h
rename to arch/arm/mach-s3c/pm.h
index 2746137f9794..eed61e585457 100644
--- a/arch/arm/mach-s3c/include/plat/pm.h
+++ b/arch/arm/mach-s3c/pm.h
@@ -11,7 +11,7 @@
  * management
 */
 
-#include <plat/pm-common.h>
+#include "pm-common.h"
 
 struct device;
 
diff --git a/arch/arm/mach-s3c/include/plat/pwm-core.h b/arch/arm/mach-s3c/pwm-core.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/pwm-core.h
rename to arch/arm/mach-s3c/pwm-core.h
diff --git a/arch/arm/mach-s3c/include/plat/regs-adc.h b/arch/arm/mach-s3c/regs-adc.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/regs-adc.h
rename to arch/arm/mach-s3c/regs-adc.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-clock-s3c24xx.h b/arch/arm/mach-s3c/regs-clock-s3c24xx.h
similarity index 99%
rename from arch/arm/mach-s3c/include/mach/regs-clock-s3c24xx.h
rename to arch/arm/mach-s3c/regs-clock-s3c24xx.h
index da4e7b3aeba6..933ddb5eedec 100644
--- a/arch/arm/mach-s3c/include/mach/regs-clock-s3c24xx.h
+++ b/arch/arm/mach-s3c/regs-clock-s3c24xx.h
@@ -9,7 +9,7 @@
 #ifndef __ASM_ARM_REGS_CLOCK
 #define __ASM_ARM_REGS_CLOCK
 
-#include <mach/map.h>
+#include "map.h"
 
 #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
 
diff --git a/arch/arm/mach-s3c/include/mach/regs-clock-s3c64xx.h b/arch/arm/mach-s3c/regs-clock-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/regs-clock-s3c64xx.h
rename to arch/arm/mach-s3c/regs-clock-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-clock.h b/arch/arm/mach-s3c/regs-clock.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/regs-clock.h
rename to arch/arm/mach-s3c/regs-clock.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-gpio-s3c24xx.h b/arch/arm/mach-s3c/regs-gpio-s3c24xx.h
similarity index 99%
rename from arch/arm/mach-s3c/include/mach/regs-gpio-s3c24xx.h
rename to arch/arm/mach-s3c/regs-gpio-s3c24xx.h
index 51827d5577b6..9a7e262268a7 100644
--- a/arch/arm/mach-s3c/include/mach/regs-gpio-s3c24xx.h
+++ b/arch/arm/mach-s3c/regs-gpio-s3c24xx.h
@@ -10,7 +10,7 @@
 #ifndef __ASM_ARCH_REGS_GPIO_H
 #define __ASM_ARCH_REGS_GPIO_H
 
-#include <plat/map-s3c.h>
+#include "map-s3c.h"
 
 #define S3C24XX_MISCCR		S3C24XX_GPIOREG2(0x80)
 
diff --git a/arch/arm/mach-s3c/include/mach/regs-gpio-s3c64xx.h b/arch/arm/mach-s3c/regs-gpio-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/regs-gpio-s3c64xx.h
rename to arch/arm/mach-s3c/regs-gpio-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-gpio.h b/arch/arm/mach-s3c/regs-gpio.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/regs-gpio.h
rename to arch/arm/mach-s3c/regs-gpio.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-irq-s3c24xx.h b/arch/arm/mach-s3c/regs-irq-s3c24xx.h
similarity index 98%
rename from arch/arm/mach-s3c/include/mach/regs-irq-s3c24xx.h
rename to arch/arm/mach-s3c/regs-irq-s3c24xx.h
index 2921b48c56b2..c0b97b203415 100644
--- a/arch/arm/mach-s3c/include/mach/regs-irq-s3c24xx.h
+++ b/arch/arm/mach-s3c/regs-irq-s3c24xx.h
@@ -8,7 +8,7 @@
 #ifndef ___ASM_ARCH_REGS_IRQ_H
 #define ___ASM_ARCH_REGS_IRQ_H
 
-#include <plat/map-s3c.h>
+#include "map-s3c.h"
 
 /* interrupt controller */
 
diff --git a/arch/arm/mach-s3c/include/mach/regs-irq-s3c64xx.h b/arch/arm/mach-s3c/regs-irq-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/regs-irq-s3c64xx.h
rename to arch/arm/mach-s3c/regs-irq-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-irq.h b/arch/arm/mach-s3c/regs-irq.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/regs-irq.h
rename to arch/arm/mach-s3c/regs-irq.h
diff --git a/arch/arm/mach-s3c/include/plat/regs-irqtype.h b/arch/arm/mach-s3c/regs-irqtype.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/regs-irqtype.h
rename to arch/arm/mach-s3c/regs-irqtype.h
diff --git a/arch/arm/mach-s3c/regs-mem.h b/arch/arm/mach-s3c/regs-mem.h
index 5048ab8f06c2..8fed34a1672a 100644
--- a/arch/arm/mach-s3c/regs-mem.h
+++ b/arch/arm/mach-s3c/regs-mem.h
@@ -9,7 +9,7 @@
 #ifndef __ARCH_ARM_MACH_S3C24XX_REGS_MEM_H
 #define __ARCH_ARM_MACH_S3C24XX_REGS_MEM_H __FILE__
 
-#include <plat/map-s3c.h>
+#include "map-s3c.h"
 
 #define S3C2410_MEMREG(x)		(S3C24XX_VA_MEMCTRL + (x))
 
diff --git a/arch/arm/mach-s3c/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c/regs-s3c2443-clock.h
similarity index 99%
rename from arch/arm/mach-s3c/include/mach/regs-s3c2443-clock.h
rename to arch/arm/mach-s3c/regs-s3c2443-clock.h
index fefef7233f4b..b3b670d463db 100644
--- a/arch/arm/mach-s3c/include/mach/regs-s3c2443-clock.h
+++ b/arch/arm/mach-s3c/regs-s3c2443-clock.h
@@ -11,7 +11,7 @@
 #define __ASM_ARM_REGS_S3C2443_CLOCK
 
 #include <linux/delay.h>
-#include <plat/map-s3c.h>
+#include "map-s3c.h"
 
 #define S3C2443_CLKREG(x)		((x) + S3C24XX_VA_CLKPWR)
 
diff --git a/arch/arm/mach-s3c/include/mach/rtc-core.h b/arch/arm/mach-s3c/rtc-core.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/rtc-core.h
rename to arch/arm/mach-s3c/rtc-core.h
diff --git a/arch/arm/mach-s3c/s3c2410.c b/arch/arm/mach-s3c/s3c2410.c
index 0013125b03ee..4153e67f0e86 100644
--- a/arch/arm/mach-s3c/s3c2410.c
+++ b/arch/arm/mach-s3c/s3c2410.c
@@ -25,21 +25,21 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "gpio-samsung.h"
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
 
-#include <mach/regs-clock.h>
+#include "regs-clock.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
+#include "cpu.h"
+#include "devs.h"
+#include "pm.h"
 
-#include <plat/gpio-core.h>
-#include <plat/gpio-cfg.h>
-#include <plat/gpio-cfg-helpers.h>
+#include "gpio-core.h"
+#include "gpio-cfg.h"
+#include "gpio-cfg-helpers.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/s3c2412.c b/arch/arm/mach-s3c/s3c2412.c
index 3599a2f01c1e..b40b70864d9c 100644
--- a/arch/arm/mach-s3c/s3c2412.c
+++ b/arch/arm/mach-s3c/s3c2412.c
@@ -29,13 +29,13 @@
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
-#include <mach/map.h>
-#include <mach/regs-clock.h>
-#include <mach/regs-gpio.h>
+#include "map.h"
+#include "regs-clock.h"
+#include "regs-gpio.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
+#include "cpu.h"
+#include "devs.h"
+#include "pm.h"
 
 #include "s3c24xx.h"
 #include "nand-core.h"
diff --git a/arch/arm/mach-s3c/include/mach/s3c2412.h b/arch/arm/mach-s3c/s3c2412.h
similarity index 96%
rename from arch/arm/mach-s3c/include/mach/s3c2412.h
rename to arch/arm/mach-s3c/s3c2412.h
index 1ae369c81beb..ed09a0e13bd8 100644
--- a/arch/arm/mach-s3c/include/mach/s3c2412.h
+++ b/arch/arm/mach-s3c/s3c2412.h
@@ -8,7 +8,7 @@
 #ifndef __ARCH_ARM_MACH_S3C24XX_S3C2412_H
 #define __ARCH_ARM_MACH_S3C24XX_S3C2412_H __FILE__
 
-#include <plat/map-s3c.h>
+#include "map-s3c.h"
 
 #define S3C2412_MEMREG(x)		(S3C24XX_VA_MEMCTRL + (x))
 #define S3C2412_EBIREG(x)		(S3C2412_VA_EBI + (x))
diff --git a/arch/arm/mach-s3c/s3c2416.c b/arch/arm/mach-s3c/s3c2416.c
index 95c34fd36421..8f420991bd19 100644
--- a/arch/arm/mach-s3c/s3c2416.c
+++ b/arch/arm/mach-s3c/s3c2416.c
@@ -26,25 +26,25 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "gpio-samsung.h"
 #include <asm/proc-fns.h>
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
-#include <mach/regs-s3c2443-clock.h>
-#include <mach/rtc-core.h>
+#include "regs-s3c2443-clock.h"
+#include "rtc-core.h"
 
-#include <plat/gpio-core.h>
-#include <plat/gpio-cfg.h>
-#include <plat/gpio-cfg-helpers.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/sdhci.h>
-#include <plat/pm.h>
+#include "gpio-core.h"
+#include "gpio-cfg.h"
+#include "gpio-cfg-helpers.h"
+#include "devs.h"
+#include "cpu.h"
+#include "sdhci.h"
+#include "pm.h"
 
-#include <plat/iic-core.h>
-#include <plat/adc-core.h>
+#include "iic-core.h"
+#include "adc-core.h"
 
 #include "s3c24xx.h"
 #include "fb-core.h"
diff --git a/arch/arm/mach-s3c/s3c2440.c b/arch/arm/mach-s3c/s3c2440.c
index a7c2dcf50b21..e6a88730eb6b 100644
--- a/arch/arm/mach-s3c/s3c2440.c
+++ b/arch/arm/mach-s3c/s3c2440.c
@@ -23,17 +23,16 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 #include <asm/irq.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "devs.h"
+#include "cpu.h"
+#include "pm.h"
 
-#include <plat/gpio-core.h>
-#include <plat/gpio-cfg.h>
-#include <plat/gpio-cfg-helpers.h>
+#include "gpio-core.h"
+#include "gpio-cfg.h"
+#include "gpio-cfg-helpers.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/s3c2442.c b/arch/arm/mach-s3c/s3c2442.c
index ffef8a5e1a94..f0b6c04318db 100644
--- a/arch/arm/mach-s3c/s3c2442.c
+++ b/arch/arm/mach-s3c/s3c2442.c
@@ -21,19 +21,18 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 
-#include <mach/hardware.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 #include <linux/atomic.h>
 #include <asm/irq.h>
 
-#include <mach/regs-clock.h>
+#include "regs-clock.h"
 
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "cpu.h"
+#include "pm.h"
 
-#include <plat/gpio-core.h>
-#include <plat/gpio-cfg.h>
-#include <plat/gpio-cfg-helpers.h>
+#include "gpio-core.h"
+#include "gpio-cfg.h"
+#include "gpio-cfg-helpers.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/s3c2443.c b/arch/arm/mach-s3c/s3c2443.c
index 00318ad994ff..026110177447 100644
--- a/arch/arm/mach-s3c/s3c2443.c
+++ b/arch/arm/mach-s3c/s3c2443.c
@@ -23,21 +23,21 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "gpio-samsung.h"
 #include <mach/irqs.h>
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
-#include <mach/regs-s3c2443-clock.h>
-#include <mach/rtc-core.h>
+#include "regs-s3c2443-clock.h"
+#include "rtc-core.h"
 
-#include <plat/gpio-core.h>
-#include <plat/gpio-cfg.h>
-#include <plat/gpio-cfg-helpers.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/adc-core.h>
+#include "gpio-core.h"
+#include "gpio-cfg.h"
+#include "gpio-cfg-helpers.h"
+#include "devs.h"
+#include "cpu.h"
+#include "adc-core.h"
 
 #include "fb-core.h"
 #include "nand-core.h"
diff --git a/arch/arm/mach-s3c/s3c244x.c b/arch/arm/mach-s3c/s3c244x.c
index a013f3447777..8a3af63d7a90 100644
--- a/arch/arm/mach-s3c/s3c244x.c
+++ b/arch/arm/mach-s3c/s3c244x.c
@@ -25,15 +25,15 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
+#include "map.h"
 #include <asm/irq.h>
 
-#include <mach/regs-clock.h>
-#include <mach/regs-gpio.h>
+#include "regs-clock.h"
+#include "regs-gpio.h"
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "devs.h"
+#include "cpu.h"
+#include "pm.h"
 
 #include "s3c24xx.h"
 #include "nand-core.h"
diff --git a/arch/arm/mach-s3c/s3c24xx.c b/arch/arm/mach-s3c/s3c24xx.c
index 409f4c00c17f..e15282697756 100644
--- a/arch/arm/mach-s3c/s3c24xx.c
+++ b/arch/arm/mach-s3c/s3c24xx.c
@@ -20,9 +20,9 @@
 #include <linux/platform_data/dma-s3c24xx.h>
 #include <linux/dmaengine.h>
 
-#include <mach/hardware.h>
-#include <mach/map.h>
-#include <mach/regs-clock.h>
+#include "hardware.h"
+#include "map.h"
+#include "regs-clock.h"
 #include <asm/irq.h>
 #include <asm/cacheflush.h>
 #include <asm/system_info.h>
@@ -31,12 +31,12 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/dma.h>
+#include "regs-gpio.h"
+#include "dma-s3c24xx.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pwm-core.h>
+#include "cpu.h"
+#include "devs.h"
+#include "pwm-core.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/s3c6400.c b/arch/arm/mach-s3c/s3c6400.c
index 2f94515558bc..10a9d82b66d3 100644
--- a/arch/arm/mach-s3c/s3c6400.c
+++ b/arch/arm/mach-s3c/s3c6400.c
@@ -28,12 +28,12 @@
 
 #include <asm/irq.h>
 
-#include <mach/regs-clock.h>
+#include "regs-clock.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/sdhci.h>
-#include <plat/iic-core.h>
+#include "cpu.h"
+#include "devs.h"
+#include "sdhci.h"
+#include "iic-core.h"
 
 #include "s3c64xx.h"
 #include "onenand-core.h"
diff --git a/arch/arm/mach-s3c/s3c6410.c b/arch/arm/mach-s3c/s3c6410.c
index aa330d10e102..8d8657e026bb 100644
--- a/arch/arm/mach-s3c/s3c6410.c
+++ b/arch/arm/mach-s3c/s3c6410.c
@@ -30,13 +30,13 @@
 #include <asm/irq.h>
 
 #include <linux/soc/samsung/s3c-pm.h>
-#include <mach/regs-clock.h>
+#include "regs-clock.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/sdhci.h>
-#include <plat/adc-core.h>
-#include <plat/iic-core.h>
+#include "cpu.h"
+#include "devs.h"
+#include "sdhci.h"
+#include "adc-core.h"
+#include "iic-core.h"
 
 #include "ata-core.h"
 #include "s3c64xx.h"
diff --git a/arch/arm/mach-s3c/s3c64xx.c b/arch/arm/mach-s3c/s3c64xx.c
index 289b462a035d..dee17c15016e 100644
--- a/arch/arm/mach-s3c/s3c64xx.c
+++ b/arch/arm/mach-s3c/s3c64xx.c
@@ -34,18 +34,17 @@
 #include <asm/mach/map.h>
 #include <asm/system_misc.h>
 
-#include <mach/map.h>
+#include "map.h"
 #include <mach/irqs.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
-#include <plat/gpio-cfg.h>
-#include <plat/pwm-core.h>
-#include <plat/regs-irqtype.h>
-
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "pm.h"
+#include "gpio-cfg.h"
+#include "pwm-core.h"
+#include "regs-irqtype.h"
 #include "s3c64xx.h"
 #include "irq-uart.h"
 #include "watchdog-reset.h"
diff --git a/arch/arm/mach-s3c/include/plat/samsung-time.h b/arch/arm/mach-s3c/samsung-time.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/samsung-time.h
rename to arch/arm/mach-s3c/samsung-time.h
diff --git a/arch/arm/mach-s3c/include/plat/sdhci.h b/arch/arm/mach-s3c/sdhci.h
similarity index 99%
rename from arch/arm/mach-s3c/include/plat/sdhci.h
rename to arch/arm/mach-s3c/sdhci.h
index 5731e42ea208..9f9d419e58d7 100644
--- a/arch/arm/mach-s3c/include/plat/sdhci.h
+++ b/arch/arm/mach-s3c/sdhci.h
@@ -15,7 +15,7 @@
 #define __PLAT_S3C_SDHCI_H __FILE__
 
 #include <linux/platform_data/mmc-sdhci-s3c.h>
-#include <plat/devs.h>
+#include "devs.h"
 
 /* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data
  * @pd: The default platform data for this device.
diff --git a/arch/arm/mach-s3c/setup-camif.c b/arch/arm/mach-s3c/setup-camif.c
index 2b262fae3f61..2f3d8e912a53 100644
--- a/arch/arm/mach-s3c/setup-camif.c
+++ b/arch/arm/mach-s3c/setup-camif.c
@@ -5,8 +5,8 @@
 // Helper functions for S3C24XX/S3C64XX SoC series CAMIF driver
 
 #include <linux/gpio.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 /* Number of camera port pins, without FIELD */
 #define S3C_CAMIF_NUM_GPIOS	13
diff --git a/arch/arm/mach-s3c/setup-fb-24bpp.c b/arch/arm/mach-s3c/setup-fb-24bpp.c
index 2c7178b26ebb..cfa34b55ca21 100644
--- a/arch/arm/mach-s3c/setup-fb-24bpp.c
+++ b/arch/arm/mach-s3c/setup-fb-24bpp.c
@@ -12,9 +12,9 @@
 #include <linux/fb.h>
 #include <linux/gpio.h>
 
-#include <plat/fb.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "fb.h"
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 void s3c64xx_fb_gpio_setup_24bpp(void)
 {
diff --git a/arch/arm/mach-s3c/setup-i2c.c b/arch/arm/mach-s3c/setup-i2c.c
index 1a01d44b5910..6b11ee3cedf9 100644
--- a/arch/arm/mach-s3c/setup-i2c.c
+++ b/arch/arm/mach-s3c/setup-i2c.c
@@ -10,11 +10,10 @@
 
 struct platform_device;
 
-#include <plat/gpio-cfg.h>
+#include "gpio-cfg.h"
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
 void s3c_i2c0_cfg_gpio(struct platform_device *dev)
 {
diff --git a/arch/arm/mach-s3c/setup-i2c0.c b/arch/arm/mach-s3c/setup-i2c0.c
index 552eb50da38c..a6ef8d2bc995 100644
--- a/arch/arm/mach-s3c/setup-i2c0.c
+++ b/arch/arm/mach-s3c/setup-i2c0.c
@@ -14,8 +14,8 @@
 struct platform_device; /* don't need the contents */
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 void s3c_i2c0_cfg_gpio(struct platform_device *dev)
 {
diff --git a/arch/arm/mach-s3c/setup-i2c1.c b/arch/arm/mach-s3c/setup-i2c1.c
index d231f0fc508d..0fe37363d26e 100644
--- a/arch/arm/mach-s3c/setup-i2c1.c
+++ b/arch/arm/mach-s3c/setup-i2c1.c
@@ -14,8 +14,8 @@
 struct platform_device; /* don't need the contents */
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 void s3c_i2c1_cfg_gpio(struct platform_device *dev)
 {
diff --git a/arch/arm/mach-s3c/setup-ide.c b/arch/arm/mach-s3c/setup-ide.c
index 810139a807ce..323ce97665af 100644
--- a/arch/arm/mach-s3c/setup-ide.c
+++ b/arch/arm/mach-s3c/setup-ide.c
@@ -9,10 +9,10 @@
 #include <linux/gpio.h>
 #include <linux/io.h>
 
-#include <mach/map.h>
-#include <mach/regs-clock.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "regs-clock.h"
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 #include <linux/platform_data/ata-samsung_cf.h>
 
 void s3c64xx_ide_setup_gpio(void)
diff --git a/arch/arm/mach-s3c/setup-keypad.c b/arch/arm/mach-s3c/setup-keypad.c
index 351961025273..8463ad37c6ab 100644
--- a/arch/arm/mach-s3c/setup-keypad.c
+++ b/arch/arm/mach-s3c/setup-keypad.c
@@ -6,9 +6,9 @@
 // GPIO configuration for S3C64XX KeyPad device
 
 #include <linux/gpio.h>
-#include <plat/gpio-cfg.h>
-#include <plat/keypad.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "keypad.h"
+#include "gpio-samsung.h"
 
 void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols)
 {
diff --git a/arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c b/arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c
index 218346a36d1e..345865837f14 100644
--- a/arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c
+++ b/arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c
@@ -14,9 +14,9 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
 void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
 {
diff --git a/arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c b/arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c
index 138455af4937..646ff949acd5 100644
--- a/arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c
+++ b/arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c
@@ -13,9 +13,9 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/sdhci.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "sdhci.h"
+#include "gpio-samsung.h"
 
 void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
 {
diff --git a/arch/arm/mach-s3c/setup-spi-s3c24xx.c b/arch/arm/mach-s3c/setup-spi-s3c24xx.c
index 6c2b96a82da5..1a0663dd2e2a 100644
--- a/arch/arm/mach-s3c/setup-spi-s3c24xx.c
+++ b/arch/arm/mach-s3c/setup-spi-s3c24xx.c
@@ -8,10 +8,10 @@
 #include <linux/gpio.h>
 #include <linux/platform_device.h>
 
-#include <plat/gpio-cfg.h>
+#include "gpio-cfg.h"
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
+#include "hardware.h"
+#include "regs-gpio.h"
 
 #ifdef CONFIG_S3C64XX_DEV_SPI0
 int s3c64xx_spi0_cfg_gpio(void)
diff --git a/arch/arm/mach-s3c/setup-spi-s3c64xx.c b/arch/arm/mach-s3c/setup-spi-s3c64xx.c
index 39dfae1f46e7..30cdb516e026 100644
--- a/arch/arm/mach-s3c/setup-spi-s3c64xx.c
+++ b/arch/arm/mach-s3c/setup-spi-s3c64xx.c
@@ -4,8 +4,8 @@
 //		http://www.samsung.com/
 
 #include <linux/gpio.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 #ifdef CONFIG_S3C64XX_DEV_SPI0
 int s3c64xx_spi0_cfg_gpio(void)
diff --git a/arch/arm/mach-s3c/setup-ts.c b/arch/arm/mach-s3c/setup-ts.c
index 53a14d4f4852..b726b66da526 100644
--- a/arch/arm/mach-s3c/setup-ts.c
+++ b/arch/arm/mach-s3c/setup-ts.c
@@ -10,9 +10,8 @@
 
 struct platform_device; /* don't need the contents */
 
-#include <plat/gpio-cfg.h>
-#include <mach/hardware.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 /**
  * s3c24xx_ts_cfg_gpio - configure gpio for s3c2410 systems
diff --git a/arch/arm/mach-s3c/setup-usb-phy.c b/arch/arm/mach-s3c/setup-usb-phy.c
index 6aaaa1d8e8b9..aeb9cdc4b2c9 100644
--- a/arch/arm/mach-s3c/setup-usb-phy.c
+++ b/arch/arm/mach-s3c/setup-usb-phy.c
@@ -8,9 +8,9 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/platform_device.h>
-#include <mach/map.h>
-#include <plat/cpu.h>
-#include <plat/usb-phy.h>
+#include "map.h"
+#include "cpu.h"
+#include "usb-phy.h"
 
 #include "regs-sys.h"
 #include "regs-usb-hsotg-phy.h"
diff --git a/arch/arm/mach-s3c/simtec-audio.c b/arch/arm/mach-s3c/simtec-audio.c
index 0c12ba4a4704..487485bcc2ab 100644
--- a/arch/arm/mach-s3c/simtec-audio.c
+++ b/arch/arm/mach-s3c/simtec-audio.c
@@ -12,13 +12,12 @@
 #include <linux/device.h>
 #include <linux/io.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
 #include <linux/platform_data/asoc-s3c24xx_simtec.h>
-#include <plat/devs.h>
+#include "devs.h"
 
 #include "bast.h"
 #include "simtec.h"
diff --git a/arch/arm/mach-s3c/simtec-nor.c b/arch/arm/mach-s3c/simtec-nor.c
index 26b18497e959..a6fba056a747 100644
--- a/arch/arm/mach-s3c/simtec-nor.c
+++ b/arch/arm/mach-s3c/simtec-nor.c
@@ -21,7 +21,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
+#include "map.h"
 
 #include "bast.h"
 #include "simtec.h"
diff --git a/arch/arm/mach-s3c/simtec-pm.c b/arch/arm/mach-s3c/simtec-pm.c
index c19074d81389..0b92e91c4377 100644
--- a/arch/arm/mach-s3c/simtec-pm.c
+++ b/arch/arm/mach-s3c/simtec-pm.c
@@ -19,14 +19,12 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/hardware.h>
-
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
+#include "map.h"
+#include "regs-gpio.h"
 
 #include <asm/mach-types.h>
 
-#include <plat/pm.h>
+#include "pm.h"
 
 #include "regs-mem.h"
 
diff --git a/arch/arm/mach-s3c/simtec-usb.c b/arch/arm/mach-s3c/simtec-usb.c
index b15e0c49fa11..18fe0642743a 100644
--- a/arch/arm/mach-s3c/simtec-usb.c
+++ b/arch/arm/mach-s3c/simtec-usb.c
@@ -23,13 +23,12 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 #include <mach/irqs.h>
 #include <asm/irq.h>
 
 #include <linux/platform_data/usb-ohci-s3c2410.h>
-#include <plat/devs.h>
+#include "devs.h"
 
 #include "bast.h"
 #include "simtec.h"
diff --git a/arch/arm/mach-s3c/sleep-s3c2410.S b/arch/arm/mach-s3c/sleep-s3c2410.S
index e4f6f64e7826..0f5562a6abc9 100644
--- a/arch/arm/mach-s3c/sleep-s3c2410.S
+++ b/arch/arm/mach-s3c/sleep-s3c2410.S
@@ -13,10 +13,10 @@
 #include <linux/linkage.h>
 #include <linux/serial_s3c.h>
 #include <asm/assembler.h>
-#include <mach/map.h>
+#include "map.h"
 
-#include <mach/regs-gpio.h>
-#include <mach/regs-clock.h>
+#include "regs-gpio.h"
+#include "regs-clock.h"
 
 #include "regs-mem.h"
 
diff --git a/arch/arm/mach-s3c/sleep-s3c2412.S b/arch/arm/mach-s3c/sleep-s3c2412.S
index 434f5082b2ed..b4b61737fbb2 100644
--- a/arch/arm/mach-s3c/sleep-s3c2412.S
+++ b/arch/arm/mach-s3c/sleep-s3c2412.S
@@ -8,9 +8,9 @@
 
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <mach/map.h>
+#include "map.h"
 
-#include <mach/regs-irq.h>
+#include "regs-irq.h"
 
 	.text
 
diff --git a/arch/arm/mach-s3c/sleep-s3c24xx.S b/arch/arm/mach-s3c/sleep-s3c24xx.S
index 4bda4a413584..4b2af91f3dce 100644
--- a/arch/arm/mach-s3c/sleep-s3c24xx.S
+++ b/arch/arm/mach-s3c/sleep-s3c24xx.S
@@ -13,10 +13,10 @@
 #include <linux/linkage.h>
 #include <linux/serial_s3c.h>
 #include <asm/assembler.h>
-#include <mach/map.h>
+#include "map.h"
 
-#include <mach/regs-gpio.h>
-#include <mach/regs-clock.h>
+#include "regs-gpio.h"
+#include "regs-clock.h"
 
 /*
  * S3C24XX_DEBUG_RESUME is dangerous if your bootloader does not
diff --git a/arch/arm/mach-s3c/sleep-s3c64xx.S b/arch/arm/mach-s3c/sleep-s3c64xx.S
index 39e16a07a5e4..739e53fbce09 100644
--- a/arch/arm/mach-s3c/sleep-s3c64xx.S
+++ b/arch/arm/mach-s3c/sleep-s3c64xx.S
@@ -11,12 +11,12 @@
 
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <mach/map.h>
+#include "map.h"
 
 #undef S3C64XX_VA_GPIO
 #define S3C64XX_VA_GPIO (0x0)
 
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 
 #define LL_UART (S3C_PA_UART + (0x400 * CONFIG_S3C_LOWLEVEL_UART_PORT))
 
diff --git a/arch/arm/mach-s3c/include/plat/usb-phy.h b/arch/arm/mach-s3c/usb-phy.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/usb-phy.h
rename to arch/arm/mach-s3c/usb-phy.h
diff --git a/arch/arm/mach-s3c/wakeup-mask.c b/arch/arm/mach-s3c/wakeup-mask.c
index 24f96fb80738..b490e7527c66 100644
--- a/arch/arm/mach-s3c/wakeup-mask.c
+++ b/arch/arm/mach-s3c/wakeup-mask.c
@@ -11,8 +11,8 @@
 #include <linux/irq.h>
 #include <linux/io.h>
 
-#include <plat/wakeup-mask.h>
-#include <plat/pm.h>
+#include "wakeup-mask.h"
+#include "pm.h"
 
 void samsung_sync_wakemask(void __iomem *reg,
 			   const struct samsung_wakeup_mask *mask, int nr_mask)
diff --git a/arch/arm/mach-s3c/include/plat/wakeup-mask.h b/arch/arm/mach-s3c/wakeup-mask.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/wakeup-mask.h
rename to arch/arm/mach-s3c/wakeup-mask.h
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index c2b46640a78b..f61f1c82308e 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -24,9 +24,6 @@
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/mmc/slot-gpio.h>
-
-#include <mach/dma.h>
-
 #include <linux/platform_data/mmc-s3cmci.h>
 
 #include "s3cmci.h"
-- 
2.20.0

^ permalink raw reply related	[flat|nested] 135+ messages in thread

* [PATCH 36/36] ARM: s3c: make headers local if possible
  2019-10-10 21:07 ` [PATCH 36/36] ARM: s3c: make headers local if possible Arnd Bergmann
@ 2019-10-10 21:07   ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 21:07 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij, Arnd Bergmann

A lot of header files are only used internally now, so they can be moved
to mach-s3c, out of the visibility of drivers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 .../mach-s3c/{include/plat => }/adc-core.h    |  0
 arch/arm/mach-s3c/adc.c                       |  2 +-
 arch/arm/mach-s3c/bast-ide.c                  |  2 +-
 arch/arm/mach-s3c/bast-irq.c                  |  3 +--
 arch/arm/mach-s3c/common-smdk.c               | 11 ++++----
 arch/arm/mach-s3c/cpu.c                       |  4 +--
 arch/arm/mach-s3c/{include/plat => }/cpu.h    |  0
 arch/arm/mach-s3c/cpufreq-utils.c             |  4 +--
 arch/arm/mach-s3c/cpuidle.c                   |  4 +--
 arch/arm/mach-s3c/crag6410.h                  |  2 +-
 arch/arm/mach-s3c/dev-audio.c                 |  9 +++----
 arch/arm/mach-s3c/dev-backlight.c             |  4 +--
 arch/arm/mach-s3c/dev-uart-s3c64xx.c          |  4 +--
 arch/arm/mach-s3c/dev-uart.c                  |  2 +-
 arch/arm/mach-s3c/devs.c                      | 23 ++++++++--------
 arch/arm/mach-s3c/{include/plat => }/devs.h   |  0
 .../mach-s3c/{include/mach => }/dma-s3c24xx.h |  0
 .../mach-s3c/{include/mach => }/dma-s3c64xx.h |  0
 arch/arm/mach-s3c/{include/mach => }/dma.h    |  0
 arch/arm/mach-s3c/{include/plat => }/fb.h     |  0
 .../{include/plat => }/gpio-cfg-helpers.h     |  0
 .../mach-s3c/{include/plat => }/gpio-cfg.h    |  0
 .../mach-s3c/{include/plat => }/gpio-core.h   |  2 +-
 .../{include/mach => }/gpio-samsung-s3c24xx.h |  2 +-
 .../{include/mach => }/gpio-samsung-s3c64xx.h |  0
 arch/arm/mach-s3c/gpio-samsung.c              | 18 ++++++-------
 .../{include/mach => }/gpio-samsung.h         |  0
 arch/arm/mach-s3c/gta02.h                     |  2 +-
 arch/arm/mach-s3c/h1940-bluetooth.c           |  7 +++--
 .../mach-s3c/{include/mach => }/hardware.h    |  0
 .../mach-s3c/{include/plat => }/iic-core.h    |  0
 arch/arm/mach-s3c/include/mach/io.h           |  2 +-
 .../include/{plat => mach}/map-base.h         |  0
 arch/arm/mach-s3c/init.c                      |  4 +--
 arch/arm/mach-s3c/iotiming-s3c2410.c          |  4 +--
 arch/arm/mach-s3c/iotiming-s3c2412.c          |  4 +--
 arch/arm/mach-s3c/irq-pm-s3c24xx.c            | 16 ++++++------
 arch/arm/mach-s3c/irq-pm-s3c64xx.c            |  8 +++---
 arch/arm/mach-s3c/irq-s3c24xx-fiq.S           |  4 +--
 arch/arm/mach-s3c/irq-s3c24xx.c               | 10 +++----
 arch/arm/mach-s3c/{include/plat => }/keypad.h |  0
 arch/arm/mach-s3c/mach-amlm5900.c             | 13 +++++-----
 arch/arm/mach-s3c/mach-anubis.c               | 11 ++++----
 arch/arm/mach-s3c/mach-anw6410.c              | 14 +++++-----
 arch/arm/mach-s3c/mach-at2440evb.c            | 11 ++++----
 arch/arm/mach-s3c/mach-bast.c                 | 13 +++++-----
 arch/arm/mach-s3c/mach-crag6410-module.c      |  2 +-
 arch/arm/mach-s3c/mach-crag6410.c             | 22 ++++++++--------
 arch/arm/mach-s3c/mach-gta02.c                | 19 +++++++-------
 arch/arm/mach-s3c/mach-h1940.c                | 22 ++++++++--------
 arch/arm/mach-s3c/mach-hmt.c                  | 12 ++++-----
 arch/arm/mach-s3c/mach-jive.c                 | 16 ++++++------
 arch/arm/mach-s3c/mach-mini2440.c             | 13 +++++-----
 arch/arm/mach-s3c/mach-mini6410.c             | 16 ++++++------
 arch/arm/mach-s3c/mach-n30.c                  | 14 +++++-----
 arch/arm/mach-s3c/mach-ncp.c                  | 10 +++----
 arch/arm/mach-s3c/mach-nexcoder.c             | 13 +++++-----
 arch/arm/mach-s3c/mach-osiris-dvs.c           |  2 +-
 arch/arm/mach-s3c/mach-osiris.c               | 13 +++++-----
 arch/arm/mach-s3c/mach-otom.c                 | 15 +++++------
 arch/arm/mach-s3c/mach-qt2410.c               | 13 +++++-----
 arch/arm/mach-s3c/mach-real6410.c             | 14 +++++-----
 arch/arm/mach-s3c/mach-rx1950.c               | 18 ++++++-------
 arch/arm/mach-s3c/mach-rx3715.c               | 17 ++++++------
 arch/arm/mach-s3c/mach-s3c2416-dt.c           |  6 ++---
 arch/arm/mach-s3c/mach-s3c64xx-dt.c           |  4 +--
 arch/arm/mach-s3c/mach-smartq.c               | 16 ++++++------
 arch/arm/mach-s3c/mach-smartq5.c              | 18 ++++++-------
 arch/arm/mach-s3c/mach-smartq7.c              | 18 ++++++-------
 arch/arm/mach-s3c/mach-smdk2410.c             | 11 ++++----
 arch/arm/mach-s3c/mach-smdk2413.c             | 14 +++++-----
 arch/arm/mach-s3c/mach-smdk2416.c             | 20 +++++++-------
 arch/arm/mach-s3c/mach-smdk2440.c             | 13 +++++-----
 arch/arm/mach-s3c/mach-smdk2443.c             |  9 +++----
 arch/arm/mach-s3c/mach-smdk6400.c             | 10 +++----
 arch/arm/mach-s3c/mach-smdk6410.c             | 18 ++++++-------
 arch/arm/mach-s3c/mach-tct_hammer.c           |  7 +++--
 arch/arm/mach-s3c/mach-vr1000.c               | 15 +++++------
 arch/arm/mach-s3c/mach-vstms.c                | 13 +++++-----
 .../arm/mach-s3c/{include/plat => }/map-s3c.h |  4 +--
 .../mach-s3c/{include/mach => }/map-s3c24xx.h |  4 +--
 .../mach-s3c/{include/mach => }/map-s3c64xx.h |  4 +--
 .../arm/mach-s3c/{include/plat => }/map-s5p.h |  2 +-
 arch/arm/mach-s3c/{include/mach => }/map.h    |  0
 arch/arm/mach-s3c/pl080.c                     |  4 +--
 arch/arm/mach-s3c/platformdata.c              |  4 +--
 arch/arm/mach-s3c/pm-common.c                 |  2 +-
 .../mach-s3c/{include/plat => }/pm-common.h   |  0
 .../{include/mach => }/pm-core-s3c24xx.h      |  0
 .../{include/mach => }/pm-core-s3c64xx.h      |  6 ++---
 .../arm/mach-s3c/{include/mach => }/pm-core.h |  0
 arch/arm/mach-s3c/pm-gpio.c                   |  6 ++---
 arch/arm/mach-s3c/pm-h1940.S                  |  4 +--
 arch/arm/mach-s3c/pm-s3c2410.c                | 11 ++++----
 arch/arm/mach-s3c/pm-s3c2412.c                |  9 +++----
 arch/arm/mach-s3c/pm-s3c2416.c                |  6 ++---
 arch/arm/mach-s3c/pm-s3c24xx.c                | 12 ++++-----
 arch/arm/mach-s3c/pm-s3c64xx.c                | 16 ++++++------
 arch/arm/mach-s3c/pm.c                        | 12 ++++-----
 arch/arm/mach-s3c/{include/plat => }/pm.h     |  2 +-
 .../mach-s3c/{include/plat => }/pwm-core.h    |  0
 .../mach-s3c/{include/plat => }/regs-adc.h    |  0
 .../{include/mach => }/regs-clock-s3c24xx.h   |  2 +-
 .../{include/mach => }/regs-clock-s3c64xx.h   |  0
 .../mach-s3c/{include/mach => }/regs-clock.h  |  0
 .../{include/mach => }/regs-gpio-s3c24xx.h    |  2 +-
 .../{include/mach => }/regs-gpio-s3c64xx.h    |  0
 .../mach-s3c/{include/mach => }/regs-gpio.h   |  0
 .../{include/mach => }/regs-irq-s3c24xx.h     |  2 +-
 .../{include/mach => }/regs-irq-s3c64xx.h     |  0
 .../mach-s3c/{include/mach => }/regs-irq.h    |  0
 .../{include/plat => }/regs-irqtype.h         |  0
 arch/arm/mach-s3c/regs-mem.h                  |  2 +-
 .../{include/mach => }/regs-s3c2443-clock.h   |  2 +-
 .../mach-s3c/{include/mach => }/rtc-core.h    |  0
 arch/arm/mach-s3c/s3c2410.c                   | 18 ++++++-------
 arch/arm/mach-s3c/s3c2412.c                   | 12 ++++-----
 .../arm/mach-s3c/{include/mach => }/s3c2412.h |  2 +-
 arch/arm/mach-s3c/s3c2416.c                   | 26 +++++++++----------
 arch/arm/mach-s3c/s3c2440.c                   | 15 +++++------
 arch/arm/mach-s3c/s3c2442.c                   | 15 +++++------
 arch/arm/mach-s3c/s3c2443.c                   | 20 +++++++-------
 arch/arm/mach-s3c/s3c244x.c                   | 12 ++++-----
 arch/arm/mach-s3c/s3c24xx.c                   | 16 ++++++------
 arch/arm/mach-s3c/s3c6400.c                   | 10 +++----
 arch/arm/mach-s3c/s3c6410.c                   | 12 ++++-----
 arch/arm/mach-s3c/s3c64xx.c                   | 21 +++++++--------
 .../{include/plat => }/samsung-time.h         |  0
 arch/arm/mach-s3c/{include/plat => }/sdhci.h  |  2 +-
 arch/arm/mach-s3c/setup-camif.c               |  4 +--
 arch/arm/mach-s3c/setup-fb-24bpp.c            |  6 ++---
 arch/arm/mach-s3c/setup-i2c.c                 |  7 +++--
 arch/arm/mach-s3c/setup-i2c0.c                |  4 +--
 arch/arm/mach-s3c/setup-i2c1.c                |  4 +--
 arch/arm/mach-s3c/setup-ide.c                 |  8 +++---
 arch/arm/mach-s3c/setup-keypad.c              |  6 ++---
 arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c  |  6 ++---
 arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c  |  6 ++---
 arch/arm/mach-s3c/setup-spi-s3c24xx.c         |  6 ++---
 arch/arm/mach-s3c/setup-spi-s3c64xx.c         |  4 +--
 arch/arm/mach-s3c/setup-ts.c                  |  5 ++--
 arch/arm/mach-s3c/setup-usb-phy.c             |  6 ++---
 arch/arm/mach-s3c/simtec-audio.c              |  9 +++----
 arch/arm/mach-s3c/simtec-nor.c                |  2 +-
 arch/arm/mach-s3c/simtec-pm.c                 |  8 +++---
 arch/arm/mach-s3c/simtec-usb.c                |  5 ++--
 arch/arm/mach-s3c/sleep-s3c2410.S             |  6 ++---
 arch/arm/mach-s3c/sleep-s3c2412.S             |  4 +--
 arch/arm/mach-s3c/sleep-s3c24xx.S             |  6 ++---
 arch/arm/mach-s3c/sleep-s3c64xx.S             |  4 +--
 .../arm/mach-s3c/{include/plat => }/usb-phy.h |  0
 arch/arm/mach-s3c/wakeup-mask.c               |  4 +--
 .../mach-s3c/{include/plat => }/wakeup-mask.h |  0
 drivers/mmc/host/s3cmci.c                     |  3 ---
 154 files changed, 524 insertions(+), 560 deletions(-)
 rename arch/arm/mach-s3c/{include/plat => }/adc-core.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/cpu.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/devs.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/dma-s3c24xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/dma-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/dma.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/fb.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/gpio-cfg-helpers.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/gpio-cfg.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/gpio-core.h (99%)
 rename arch/arm/mach-s3c/{include/mach => }/gpio-samsung-s3c24xx.h (99%)
 rename arch/arm/mach-s3c/{include/mach => }/gpio-samsung-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/gpio-samsung.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/hardware.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/iic-core.h (100%)
 rename arch/arm/mach-s3c/include/{plat => mach}/map-base.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/keypad.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/map-s3c.h (97%)
 rename arch/arm/mach-s3c/{include/mach => }/map-s3c24xx.h (98%)
 rename arch/arm/mach-s3c/{include/mach => }/map-s3c64xx.h (98%)
 rename arch/arm/mach-s3c/{include/plat => }/map-s5p.h (94%)
 rename arch/arm/mach-s3c/{include/mach => }/map.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/pm-common.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/pm-core-s3c24xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/pm-core-s3c64xx.h (96%)
 rename arch/arm/mach-s3c/{include/mach => }/pm-core.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/pm.h (98%)
 rename arch/arm/mach-s3c/{include/plat => }/pwm-core.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/regs-adc.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-clock-s3c24xx.h (99%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-clock-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-clock.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-gpio-s3c24xx.h (99%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-gpio-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-gpio.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-irq-s3c24xx.h (98%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-irq-s3c64xx.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-irq.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/regs-irqtype.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/regs-s3c2443-clock.h (99%)
 rename arch/arm/mach-s3c/{include/mach => }/rtc-core.h (100%)
 rename arch/arm/mach-s3c/{include/mach => }/s3c2412.h (96%)
 rename arch/arm/mach-s3c/{include/plat => }/samsung-time.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/sdhci.h (99%)
 rename arch/arm/mach-s3c/{include/plat => }/usb-phy.h (100%)
 rename arch/arm/mach-s3c/{include/plat => }/wakeup-mask.h (100%)

diff --git a/arch/arm/mach-s3c/include/plat/adc-core.h b/arch/arm/mach-s3c/adc-core.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/adc-core.h
rename to arch/arm/mach-s3c/adc-core.h
diff --git a/arch/arm/mach-s3c/adc.c b/arch/arm/mach-s3c/adc.c
index 623a9774cc52..272d2950d432 100644
--- a/arch/arm/mach-s3c/adc.c
+++ b/arch/arm/mach-s3c/adc.c
@@ -19,7 +19,7 @@
 #include <linux/io.h>
 #include <linux/regulator/consumer.h>
 
-#include <plat/regs-adc.h>
+#include "regs-adc.h"
 #include <linux/soc/samsung/s3c-adc.h>
 
 /* This driver is designed to control the usage of the ADC block between
diff --git a/arch/arm/mach-s3c/bast-ide.c b/arch/arm/mach-s3c/bast-ide.c
index ee6fbb407640..da64db1811d8 100644
--- a/arch/arm/mach-s3c/bast-ide.c
+++ b/arch/arm/mach-s3c/bast-ide.c
@@ -19,7 +19,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
+#include "map.h"
 #include <mach/irqs.h>
 
 #include "bast.h"
diff --git a/arch/arm/mach-s3c/bast-irq.c b/arch/arm/mach-s3c/bast-irq.c
index b3083ee3ab33..d299f124e6dc 100644
--- a/arch/arm/mach-s3c/bast-irq.c
+++ b/arch/arm/mach-s3c/bast-irq.c
@@ -15,8 +15,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-irq.h>
+#include "regs-irq.h"
 #include <mach/irqs.h>
 
 #include "bast.h"
diff --git a/arch/arm/mach-s3c/common-smdk.c b/arch/arm/mach-s3c/common-smdk.c
index 5392d5106b4b..1ec207159ee2 100644
--- a/arch/arm/mach-s3c/common-smdk.c
+++ b/arch/arm/mach-s3c/common-smdk.c
@@ -28,17 +28,16 @@
 #include <asm/mach/irq.h>
 
 #include <asm/mach-types.h>
-#include <mach/hardware.h>
 #include <asm/irq.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <linux/platform_data/leds-s3c24xx.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
+#include "gpio-cfg.h"
+#include "devs.h"
+#include "pm.h"
 
 #include "common-smdk.h"
 
diff --git a/arch/arm/mach-s3c/cpu.c b/arch/arm/mach-s3c/cpu.c
index 8acba21bbf4b..6e9772555f0d 100644
--- a/arch/arm/mach-s3c/cpu.c
+++ b/arch/arm/mach-s3c/cpu.c
@@ -10,8 +10,8 @@
 #include <linux/init.h>
 #include <linux/io.h>
 
-#include <plat/map-base.h>
-#include <plat/cpu.h>
+#include <mach/map-base.h>
+#include "cpu.h"
 
 unsigned long samsung_cpu_id;
 
diff --git a/arch/arm/mach-s3c/include/plat/cpu.h b/arch/arm/mach-s3c/cpu.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/cpu.h
rename to arch/arm/mach-s3c/cpu.h
diff --git a/arch/arm/mach-s3c/cpufreq-utils.c b/arch/arm/mach-s3c/cpufreq-utils.c
index 75c197d59a75..e4266f271b51 100644
--- a/arch/arm/mach-s3c/cpufreq-utils.c
+++ b/arch/arm/mach-s3c/cpufreq-utils.c
@@ -12,8 +12,8 @@
 #include <linux/io.h>
 #include <linux/clk.h>
 
-#include <mach/map.h>
-#include <mach/regs-clock.h>
+#include "map.h"
+#include "regs-clock.h"
 
 #include <linux/soc/samsung/s3c-cpufreq-core.h>
 
diff --git a/arch/arm/mach-s3c/cpuidle.c b/arch/arm/mach-s3c/cpuidle.c
index 0bac6f6413b0..0e020ee8f78e 100644
--- a/arch/arm/mach-s3c/cpuidle.c
+++ b/arch/arm/mach-s3c/cpuidle.c
@@ -13,8 +13,8 @@
 
 #include <asm/cpuidle.h>
 
-#include <plat/cpu.h>
-#include <mach/map.h>
+#include "cpu.h"
+#include "map.h"
 
 #include "regs-sys.h"
 #include "regs-syscon-power.h"
diff --git a/arch/arm/mach-s3c/crag6410.h b/arch/arm/mach-s3c/crag6410.h
index 00d9aa114aa7..f39ea2ca7a75 100644
--- a/arch/arm/mach-s3c/crag6410.h
+++ b/arch/arm/mach-s3c/crag6410.h
@@ -8,7 +8,7 @@
 #ifndef MACH_CRAG6410_H
 #define MACH_CRAG6410_H
 
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 
 #define GLENFARCLAS_PMIC_IRQ_BASE	IRQ_BOARD_START
 #define BANFF_PMIC_IRQ_BASE		(IRQ_BOARD_START + 64)
diff --git a/arch/arm/mach-s3c/dev-audio.c b/arch/arm/mach-s3c/dev-audio.c
index e3c49b5d1355..fc2f077afd24 100644
--- a/arch/arm/mach-s3c/dev-audio.c
+++ b/arch/arm/mach-s3c/dev-audio.c
@@ -11,13 +11,12 @@
 #include <linux/export.h>
 
 #include <mach/irqs.h>
-#include <mach/map.h>
-#include <mach/dma.h>
+#include "map.h"
 
-#include <plat/devs.h>
+#include "devs.h"
 #include <linux/platform_data/asoc-s3c.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev)
 {
diff --git a/arch/arm/mach-s3c/dev-backlight.c b/arch/arm/mach-s3c/dev-backlight.c
index 799cfdf0606b..6856b69f78f9 100644
--- a/arch/arm/mach-s3c/dev-backlight.c
+++ b/arch/arm/mach-s3c/dev-backlight.c
@@ -11,8 +11,8 @@
 #include <linux/io.h>
 #include <linux/pwm_backlight.h>
 
-#include <plat/devs.h>
-#include <plat/gpio-cfg.h>
+#include "devs.h"
+#include "gpio-cfg.h"
 
 #include "backlight.h"
 
diff --git a/arch/arm/mach-s3c/dev-uart-s3c64xx.c b/arch/arm/mach-s3c/dev-uart-s3c64xx.c
index 021a2b7926fa..8288e8d6c092 100644
--- a/arch/arm/mach-s3c/dev-uart-s3c64xx.c
+++ b/arch/arm/mach-s3c/dev-uart-s3c64xx.c
@@ -15,10 +15,10 @@
 
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
-#include <mach/map.h>
+#include "map.h"
 #include <mach/irqs.h>
 
-#include <plat/devs.h>
+#include "devs.h"
 
 /* Serial port registrations */
 
diff --git a/arch/arm/mach-s3c/dev-uart.c b/arch/arm/mach-s3c/dev-uart.c
index 7476a5dbae77..3d1f7f2fd7c7 100644
--- a/arch/arm/mach-s3c/dev-uart.c
+++ b/arch/arm/mach-s3c/dev-uart.c
@@ -10,7 +10,7 @@
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 
-#include <plat/devs.h>
+#include "devs.h"
 
 /* uart devices */
 
diff --git a/arch/arm/mach-s3c/devs.c b/arch/arm/mach-s3c/devs.c
index 92b36bc71a06..ef2b1847e287 100644
--- a/arch/arm/mach-s3c/devs.c
+++ b/arch/arm/mach-s3c/devs.c
@@ -38,30 +38,29 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/dma.h>
 #include <mach/irqs.h>
-#include <mach/map.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
-#include <mach/regs-s3c2443-clock.h>
+#include "map.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
+#include "regs-s3c2443-clock.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
+#include "cpu.h"
+#include "devs.h"
 #include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/ata-samsung_cf.h>
-#include <plat/fb.h>
+#include "fb.h"
 #include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/hwmon-s3c.h>
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/keypad.h>
+#include "keypad.h"
 #include <linux/platform_data/mmc-s3cmci.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
-#include <plat/pwm-core.h>
-#include <plat/sdhci.h>
+#include "pwm-core.h"
+#include "sdhci.h"
 #include <linux/platform_data/touchscreen-s3c2410.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/usb-ohci-s3c2410.h>
-#include <plat/usb-phy.h>
+#include "usb-phy.h"
 #include <linux/platform_data/asoc-s3c.h>
 #include <linux/platform_data/spi-s3c64xx.h>
 
diff --git a/arch/arm/mach-s3c/include/plat/devs.h b/arch/arm/mach-s3c/devs.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/devs.h
rename to arch/arm/mach-s3c/devs.h
diff --git a/arch/arm/mach-s3c/include/mach/dma-s3c24xx.h b/arch/arm/mach-s3c/dma-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/dma-s3c24xx.h
rename to arch/arm/mach-s3c/dma-s3c24xx.h
diff --git a/arch/arm/mach-s3c/include/mach/dma-s3c64xx.h b/arch/arm/mach-s3c/dma-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/dma-s3c64xx.h
rename to arch/arm/mach-s3c/dma-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/dma.h b/arch/arm/mach-s3c/dma.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/dma.h
rename to arch/arm/mach-s3c/dma.h
diff --git a/arch/arm/mach-s3c/include/plat/fb.h b/arch/arm/mach-s3c/fb.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/fb.h
rename to arch/arm/mach-s3c/fb.h
diff --git a/arch/arm/mach-s3c/include/plat/gpio-cfg-helpers.h b/arch/arm/mach-s3c/gpio-cfg-helpers.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/gpio-cfg-helpers.h
rename to arch/arm/mach-s3c/gpio-cfg-helpers.h
diff --git a/arch/arm/mach-s3c/include/plat/gpio-cfg.h b/arch/arm/mach-s3c/gpio-cfg.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/gpio-cfg.h
rename to arch/arm/mach-s3c/gpio-cfg.h
diff --git a/arch/arm/mach-s3c/include/plat/gpio-core.h b/arch/arm/mach-s3c/gpio-core.h
similarity index 99%
rename from arch/arm/mach-s3c/include/plat/gpio-core.h
rename to arch/arm/mach-s3c/gpio-core.h
index c0bfceb88340..b361c8c0d669 100644
--- a/arch/arm/mach-s3c/include/plat/gpio-core.h
+++ b/arch/arm/mach-s3c/gpio-core.h
@@ -11,7 +11,7 @@
 #define __PLAT_SAMSUNG_GPIO_CORE_H
 
 /* Bring in machine-local definitions, especially S3C_GPIO_END */
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 #include <linux/gpio/driver.h>
 
 #define GPIOCON_OFF	(0x00)
diff --git a/arch/arm/mach-s3c/include/mach/gpio-samsung-s3c24xx.h b/arch/arm/mach-s3c/gpio-samsung-s3c24xx.h
similarity index 99%
rename from arch/arm/mach-s3c/include/mach/gpio-samsung-s3c24xx.h
rename to arch/arm/mach-s3c/gpio-samsung-s3c24xx.h
index f8a114891f16..c29fdc95f883 100644
--- a/arch/arm/mach-s3c/include/mach/gpio-samsung-s3c24xx.h
+++ b/arch/arm/mach-s3c/gpio-samsung-s3c24xx.h
@@ -14,7 +14,7 @@
 #ifndef GPIO_SAMSUNG_S3C24XX_H
 #define GPIO_SAMSUNG_S3C24XX_H
 
-#include <mach/map.h>
+#include "map.h"
 
 /*
  * GPIO sizes for various SoCs:
diff --git a/arch/arm/mach-s3c/include/mach/gpio-samsung-s3c64xx.h b/arch/arm/mach-s3c/gpio-samsung-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/gpio-samsung-s3c64xx.h
rename to arch/arm/mach-s3c/gpio-samsung-s3c64xx.h
diff --git a/arch/arm/mach-s3c/gpio-samsung.c b/arch/arm/mach-s3c/gpio-samsung.c
index f66c820cd82b..9cc4d7eaf78a 100644
--- a/arch/arm/mach-s3c/gpio-samsung.c
+++ b/arch/arm/mach-s3c/gpio-samsung.c
@@ -27,15 +27,15 @@
 #include <asm/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/gpio-core.h>
-#include <plat/gpio-cfg.h>
-#include <plat/gpio-cfg-helpers.h>
-#include <plat/pm.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "gpio-core.h"
+#include "gpio-cfg.h"
+#include "gpio-cfg-helpers.h"
+#include "pm.h"
 
 int samsung_gpio_setpull_updown(struct samsung_gpio_chip *chip,
 				unsigned int off, samsung_gpio_pull_t pull)
diff --git a/arch/arm/mach-s3c/include/mach/gpio-samsung.h b/arch/arm/mach-s3c/gpio-samsung.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/gpio-samsung.h
rename to arch/arm/mach-s3c/gpio-samsung.h
diff --git a/arch/arm/mach-s3c/gta02.h b/arch/arm/mach-s3c/gta02.h
index d5610ba829a4..043ae382bfc5 100644
--- a/arch/arm/mach-s3c/gta02.h
+++ b/arch/arm/mach-s3c/gta02.h
@@ -6,7 +6,7 @@
 #ifndef __MACH_S3C24XX_GTA02_H
 #define __MACH_S3C24XX_GTA02_H __FILE__
 
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 
 #define GTA02_GPIO_AUX_LED	S3C2410_GPB(2)
 #define GTA02_GPIO_USB_PULLUP	S3C2410_GPB(9)
diff --git a/arch/arm/mach-s3c/h1940-bluetooth.c b/arch/arm/mach-s3c/h1940-bluetooth.c
index 186b5321658e..59edcf8a620d 100644
--- a/arch/arm/mach-s3c/h1940-bluetooth.c
+++ b/arch/arm/mach-s3c/h1940-bluetooth.c
@@ -13,10 +13,9 @@
 #include <linux/gpio.h>
 #include <linux/rfkill.h>
 
-#include <plat/gpio-cfg.h>
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
 #include "h1940.h"
 
diff --git a/arch/arm/mach-s3c/include/mach/hardware.h b/arch/arm/mach-s3c/hardware.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/hardware.h
rename to arch/arm/mach-s3c/hardware.h
diff --git a/arch/arm/mach-s3c/include/plat/iic-core.h b/arch/arm/mach-s3c/iic-core.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/iic-core.h
rename to arch/arm/mach-s3c/iic-core.h
diff --git a/arch/arm/mach-s3c/include/mach/io.h b/arch/arm/mach-s3c/include/mach/io.h
index bcddf615adb6..0d0e576f66dc 100644
--- a/arch/arm/mach-s3c/include/mach/io.h
+++ b/arch/arm/mach-s3c/include/mach/io.h
@@ -10,7 +10,7 @@
 #ifndef __ASM_ARM_ARCH_IO_H
 #define __ASM_ARM_ARCH_IO_H
 
-#include <plat/map-base.h>
+#include <mach/map-base.h>
 
 /*
  * ISA style IO, for each machine to sort out mappings for,
diff --git a/arch/arm/mach-s3c/include/plat/map-base.h b/arch/arm/mach-s3c/include/mach/map-base.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/map-base.h
rename to arch/arm/mach-s3c/include/mach/map-base.h
diff --git a/arch/arm/mach-s3c/init.c b/arch/arm/mach-s3c/init.c
index e9acf02ef3c3..9d92f03e9bc1 100644
--- a/arch/arm/mach-s3c/init.c
+++ b/arch/arm/mach-s3c/init.c
@@ -23,8 +23,8 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
+#include "cpu.h"
+#include "devs.h"
 
 static struct cpu_table *cpu;
 
diff --git a/arch/arm/mach-s3c/iotiming-s3c2410.c b/arch/arm/mach-s3c/iotiming-s3c2410.c
index 5d85c259f328..a5c80b7e3d0c 100644
--- a/arch/arm/mach-s3c/iotiming-s3c2410.c
+++ b/arch/arm/mach-s3c/iotiming-s3c2410.c
@@ -14,8 +14,8 @@
 #include <linux/io.h>
 #include <linux/slab.h>
 
-#include <mach/map.h>
-#include <mach/regs-clock.h>
+#include "map.h"
+#include "regs-clock.h"
 
 #include <linux/soc/samsung/s3c-cpufreq-core.h>
 
diff --git a/arch/arm/mach-s3c/iotiming-s3c2412.c b/arch/arm/mach-s3c/iotiming-s3c2412.c
index a22b5611697d..003f89c4dc53 100644
--- a/arch/arm/mach-s3c/iotiming-s3c2412.c
+++ b/arch/arm/mach-s3c/iotiming-s3c2412.c
@@ -23,10 +23,10 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/cpu.h>
+#include "cpu.h"
 #include <linux/soc/samsung/s3c-cpufreq-core.h>
 
-#include <mach/s3c2412.h>
+#include "s3c2412.h"
 
 #define print_ns(x) ((x) / 10), ((x) % 10)
 
diff --git a/arch/arm/mach-s3c/irq-pm-s3c24xx.c b/arch/arm/mach-s3c/irq-pm-s3c24xx.c
index e0131b16a4af..4d5e28312d91 100644
--- a/arch/arm/mach-s3c/irq-pm-s3c24xx.c
+++ b/arch/arm/mach-s3c/irq-pm-s3c24xx.c
@@ -13,14 +13,14 @@
 #include <linux/syscore_ops.h>
 #include <linux/io.h>
 
-#include <plat/cpu.h>
-#include <plat/pm.h>
-#include <plat/map-base.h>
-#include <plat/map-s3c.h>
-
-#include <mach/regs-irq.h>
-#include <mach/regs-gpio.h>
-#include <mach/pm-core.h>
+#include "cpu.h"
+#include "pm.h"
+#include <mach/map-base.h>
+#include "map-s3c.h"
+
+#include "regs-irq.h"
+#include "regs-gpio.h"
+#include "pm-core.h"
 
 #include <asm/irq.h>
 
diff --git a/arch/arm/mach-s3c/irq-pm-s3c64xx.c b/arch/arm/mach-s3c/irq-pm-s3c64xx.c
index 31b221190479..4a1e935bada1 100644
--- a/arch/arm/mach-s3c/irq-pm-s3c64xx.c
+++ b/arch/arm/mach-s3c/irq-pm-s3c64xx.c
@@ -20,11 +20,11 @@
 #include <linux/io.h>
 #include <linux/of.h>
 
-#include <mach/map.h>
+#include "map.h"
 
-#include <mach/regs-gpio.h>
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "regs-gpio.h"
+#include "cpu.h"
+#include "pm.h"
 
 /* We handled all the IRQ types in this code, to save having to make several
  * small files to handle each different type separately. Having the EINT_GRP
diff --git a/arch/arm/mach-s3c/irq-s3c24xx-fiq.S b/arch/arm/mach-s3c/irq-s3c24xx-fiq.S
index 2a84535a14fd..b54cbd012241 100644
--- a/arch/arm/mach-s3c/irq-s3c24xx-fiq.S
+++ b/arch/arm/mach-s3c/irq-s3c24xx-fiq.S
@@ -10,8 +10,8 @@
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 
-#include <mach/map.h>
-#include <mach/regs-irq.h>
+#include "map.h"
+#include "regs-irq.h"
 
 #include <linux/spi/s3c24xx-fiq.h>
 
diff --git a/arch/arm/mach-s3c/irq-s3c24xx.c b/arch/arm/mach-s3c/irq-s3c24xx.c
index 3965347cacf0..79b5f19af7a5 100644
--- a/arch/arm/mach-s3c/irq-s3c24xx.c
+++ b/arch/arm/mach-s3c/irq-s3c24xx.c
@@ -26,12 +26,12 @@
 #include <asm/mach/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/regs-irq.h>
-#include <mach/regs-gpio.h>
+#include "regs-irq.h"
+#include "regs-gpio.h"
 
-#include <plat/cpu.h>
-#include <plat/regs-irqtype.h>
-#include <plat/pm.h>
+#include "cpu.h"
+#include "regs-irqtype.h"
+#include "pm.h"
 
 #define S3C_IRQTYPE_NONE	0
 #define S3C_IRQTYPE_EINT	1
diff --git a/arch/arm/mach-s3c/include/plat/keypad.h b/arch/arm/mach-s3c/keypad.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/keypad.h
rename to arch/arm/mach-s3c/keypad.h
diff --git a/arch/arm/mach-s3c/mach-amlm5900.c b/arch/arm/mach-s3c/mach-amlm5900.c
index f9240081f840..5c67f20e636e 100644
--- a/arch/arm/mach-s3c/mach-amlm5900.c
+++ b/arch/arm/mach-s3c/mach-amlm5900.c
@@ -27,25 +27,24 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <linux/platform_data/fb-s3c2410.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/gpio-cfg.h>
+#include "devs.h"
+#include "cpu.h"
+#include "gpio-cfg.h"
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/map.h>
 #include <linux/mtd/physmap.h>
 
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-anubis.c b/arch/arm/mach-s3c/mach-anubis.c
index 5cfb7aed9fe7..ef953754a39c 100644
--- a/arch/arm/mach-s3c/mach-anubis.c
+++ b/arch/arm/mach-s3c/mach-anubis.c
@@ -24,12 +24,11 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
@@ -40,10 +39,10 @@
 
 #include <net/ax88796.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "devs.h"
+#include "cpu.h"
 #include <linux/platform_data/asoc-s3c24xx_simtec.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "anubis.h"
 #include "s3c24xx.h"
diff --git a/arch/arm/mach-s3c/mach-anw6410.c b/arch/arm/mach-s3c/mach-anw6410.c
index 9bf8c8791553..663fb34ded0b 100644
--- a/arch/arm/mach-s3c/mach-anw6410.c
+++ b/arch/arm/mach-s3c/mach-anw6410.c
@@ -30,20 +30,20 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
+#include "map.h"
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/fb.h>
+#include "fb.h"
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "devs.h"
+#include "cpu.h"
 #include <mach/irqs.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/samsung-time.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "regs-modem.h"
diff --git a/arch/arm/mach-s3c/mach-at2440evb.c b/arch/arm/mach-s3c/mach-at2440evb.c
index 2103c4c1059a..0e107dde6ded 100644
--- a/arch/arm/mach-s3c/mach-at2440evb.c
+++ b/arch/arm/mach-s3c/mach-at2440evb.c
@@ -24,13 +24,12 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <linux/platform_data/fb-s3c2410.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
@@ -39,10 +38,10 @@
 #include <linux/mtd/nand_ecc.h>
 #include <linux/mtd/partitions.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "devs.h"
+#include "cpu.h"
 #include <linux/platform_data/mmc-s3cmci.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-bast.c b/arch/arm/mach-s3c/mach-bast.c
index 6e363afbaab1..8afc6a846dee 100644
--- a/arch/arm/mach-s3c/mach-bast.c
+++ b/arch/arm/mach-s3c/mach-bast.c
@@ -40,16 +40,15 @@
 #include <asm/mach/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/hardware.h>
 #include <linux/platform_data/fb-s3c2410.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
-#include <plat/cpu.h>
+#include "cpu.h"
 #include <linux/soc/samsung/s3c-cpu-freq.h>
-#include <plat/devs.h>
-#include <plat/gpio-cfg.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "gpio-cfg.h"
+#include "samsung-time.h"
 
 #include "bast.h"
 #include "s3c24xx.h"
diff --git a/arch/arm/mach-s3c/mach-crag6410-module.c b/arch/arm/mach-s3c/mach-crag6410-module.c
index 937d0a83f8fd..2dedc025f604 100644
--- a/arch/arm/mach-s3c/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c/mach-crag6410-module.c
@@ -27,7 +27,7 @@
 
 #include <linux/platform_data/spi-s3c64xx.h>
 
-#include <plat/cpu.h>
+#include "cpu.h"
 #include <mach/irqs.h>
 
 #include "crag6410.h"
diff --git a/arch/arm/mach-s3c/mach-crag6410.c b/arch/arm/mach-s3c/mach-crag6410.c
index 947f344ac4d4..10cc27e87f32 100644
--- a/arch/arm/mach-s3c/mach-crag6410.c
+++ b/arch/arm/mach-s3c/mach-crag6410.c
@@ -44,23 +44,23 @@
 #include <asm/mach-types.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <mach/irqs.h>
 
-#include <plat/fb.h>
-#include <plat/sdhci.h>
-#include <plat/gpio-cfg.h>
+#include "fb.h"
+#include "sdhci.h"
+#include "gpio-cfg.h"
 #include <linux/platform_data/spi-s3c64xx.h>
 
-#include <plat/keypad.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "keypad.h"
+#include "devs.h"
+#include "cpu.h"
 #include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/pm.h>
-#include <plat/samsung-time.h>
+#include "pm.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "crag6410.h"
diff --git a/arch/arm/mach-s3c/mach-gta02.c b/arch/arm/mach-s3c/mach-gta02.c
index bf0de248b489..e3e0f774a30b 100644
--- a/arch/arm/mach-s3c/mach-gta02.c
+++ b/arch/arm/mach-s3c/mach-gta02.c
@@ -59,16 +59,15 @@
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/fb-s3c2410.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/regs-irq.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/gpio-cfg.h>
-#include <plat/pm.h>
-#include <plat/samsung-time.h>
+#include "regs-gpio.h"
+#include "regs-irq.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "gpio-cfg.h"
+#include "pm.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "gta02.h"
diff --git a/arch/arm/mach-s3c/mach-h1940.c b/arch/arm/mach-s3c/mach-h1940.c
index 6e329cb1a7ec..e9d04424c80c 100644
--- a/arch/arm/mach-s3c/mach-h1940.c
+++ b/arch/arm/mach-s3c/mach-h1940.c
@@ -48,17 +48,17 @@
 #include <sound/uda1380.h>
 
 #include <linux/platform_data/fb-s3c2410.h>
-#include <mach/map.h>
-#include <mach/hardware.h>
-#include <mach/regs-clock.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/gpio-cfg.h>
-#include <plat/pm.h>
-#include <plat/samsung-time.h>
+#include "map.h"
+#include "hardware.h"
+#include "regs-clock.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "gpio-cfg.h"
+#include "pm.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "h1940.h"
diff --git a/arch/arm/mach-s3c/mach-hmt.c b/arch/arm/mach-s3c/mach-hmt.c
index dd1b73c31956..2bb229536bb4 100644
--- a/arch/arm/mach-s3c/mach-hmt.c
+++ b/arch/arm/mach-s3c/mach-hmt.c
@@ -25,20 +25,20 @@
 #include <asm/mach/irq.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/map.h>
+#include "map.h"
 #include <mach/irqs.h>
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <mach/gpio-samsung.h>
-#include <plat/fb.h>
+#include "gpio-samsung.h"
+#include "fb.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-jive.c b/arch/arm/mach-s3c/mach-jive.c
index 27f4c99172c6..fc54194a001b 100644
--- a/arch/arm/mach-s3c/mach-jive.c
+++ b/arch/arm/mach-s3c/mach-jive.c
@@ -31,10 +31,10 @@
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
+#include "hardware.h"
+#include "regs-gpio.h"
 #include <linux/platform_data/fb-s3c2410.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 
 #include <asm/mach-types.h>
 
@@ -43,12 +43,12 @@
 #include <linux/mtd/nand_ecc.h>
 #include <linux/mtd/partitions.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "gpio-cfg.h"
+#include "devs.h"
+#include "cpu.h"
+#include "pm.h"
 #include <linux/platform_data/usb-s3c2410_udc.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "s3c2412-power.h"
diff --git a/arch/arm/mach-s3c/mach-mini2440.c b/arch/arm/mach-s3c/mach-mini2440.c
index 4280d0a8c4e2..5dc4b3239e97 100644
--- a/arch/arm/mach-s3c/mach-mini2440.c
+++ b/arch/arm/mach-s3c/mach-mini2440.c
@@ -31,13 +31,12 @@
 #include <asm/mach/map.h>
 
 #include <linux/platform_data/fb-s3c2410.h>
-#include <mach/hardware.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 #include <linux/platform_data/leds-s3c24xx.h>
 #include <mach/irqs.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <linux/platform_data/mmc-s3cmci.h>
@@ -48,10 +47,10 @@
 #include <linux/mtd/nand_ecc.h>
 #include <linux/mtd/partitions.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "gpio-cfg.h"
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include <sound/s3c24xx_uda134x.h>
 
diff --git a/arch/arm/mach-s3c/mach-mini6410.c b/arch/arm/mach-s3c/mach-mini6410.c
index 369325107ff1..e8da59ed739d 100644
--- a/arch/arm/mach-s3c/mach-mini6410.c
+++ b/arch/arm/mach-s3c/mach-mini6410.c
@@ -23,23 +23,23 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
 #include <linux/soc/samsung/s3c-adc.h>
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/fb.h>
+#include "cpu.h"
+#include "devs.h"
+#include "fb.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/mmc-sdhci-s3c.h>
-#include <plat/sdhci.h>
+#include "sdhci.h"
 #include <linux/platform_data/touchscreen-s3c2410.h>
 #include <mach/irqs.h>
 
 #include <video/platform_lcd.h>
 #include <video/samsung_fimd.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "regs-modem.h"
diff --git a/arch/arm/mach-s3c/mach-n30.c b/arch/arm/mach-s3c/mach-n30.c
index 196f4cb17fbb..64b9b8e9d130 100644
--- a/arch/arm/mach-s3c/mach-n30.c
+++ b/arch/arm/mach-s3c/mach-n30.c
@@ -27,15 +27,15 @@
 #include <linux/io.h>
 #include <linux/mmc/host.h>
 
-#include <mach/hardware.h>
+#include "hardware.h"
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/leds-s3c24xx.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
@@ -43,11 +43,11 @@
 
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
+#include "cpu.h"
+#include "devs.h"
 #include <linux/platform_data/mmc-s3cmci.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-ncp.c b/arch/arm/mach-s3c/mach-ncp.c
index 6e2e30e2fee3..7c719f1903c3 100644
--- a/arch/arm/mach-s3c/mach-ncp.c
+++ b/arch/arm/mach-s3c/mach-ncp.c
@@ -25,17 +25,17 @@
 #include <asm/mach/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/map.h>
+#include "map.h"
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/fb.h>
+#include "fb.h"
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-nexcoder.c b/arch/arm/mach-s3c/mach-nexcoder.c
index 9b281d1a5536..6e1ba2cd650f 100644
--- a/arch/arm/mach-s3c/mach-nexcoder.c
+++ b/arch/arm/mach-s3c/mach-nexcoder.c
@@ -28,19 +28,18 @@
 #include <asm/mach/irq.h>
 
 #include <asm/setup.h>
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 //#include <asm/debug-ll.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "gpio-cfg.h"
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-osiris-dvs.c b/arch/arm/mach-s3c/mach-osiris-dvs.c
index 1250520b3bcc..2e283aedab65 100644
--- a/arch/arm/mach-s3c/mach-osiris-dvs.c
+++ b/arch/arm/mach-s3c/mach-osiris-dvs.c
@@ -15,7 +15,7 @@
 #include <linux/mfd/tps65010.h>
 
 #include <linux/soc/samsung/s3c-cpu-freq.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 
 #define OSIRIS_GPIO_DVS	S3C2410_GPB(5)
 
diff --git a/arch/arm/mach-s3c/mach-osiris.c b/arch/arm/mach-s3c/mach-osiris.c
index 2aeeb2230b85..71a3640e55bd 100644
--- a/arch/arm/mach-s3c/mach-osiris.c
+++ b/arch/arm/mach-s3c/mach-osiris.c
@@ -36,15 +36,14 @@
 #include <linux/mtd/nand_ecc.h>
 #include <linux/mtd/partitions.h>
 
-#include <plat/cpu.h>
+#include "cpu.h"
 #include <linux/soc/samsung/s3c-cpu-freq.h>
-#include <plat/devs.h>
-#include <plat/gpio-cfg.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "gpio-cfg.h"
+#include "samsung-time.h"
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
 #include "s3c24xx.h"
 #include "osiris.h"
diff --git a/arch/arm/mach-s3c/mach-otom.c b/arch/arm/mach-s3c/mach-otom.c
index 60917d1bf236..947976da8255 100644
--- a/arch/arm/mach-s3c/mach-otom.c
+++ b/arch/arm/mach-s3c/mach-otom.c
@@ -22,14 +22,13 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/samsung-time.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "otom.h"
diff --git a/arch/arm/mach-s3c/mach-qt2410.c b/arch/arm/mach-s3c/mach-qt2410.c
index db2ff1085718..9f1705728be4 100644
--- a/arch/arm/mach-s3c/mach-qt2410.c
+++ b/arch/arm/mach-s3c/mach-qt2410.c
@@ -28,7 +28,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
@@ -37,13 +36,13 @@
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 
-#include <plat/gpio-cfg.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/pm.h>
-#include <plat/samsung-time.h>
+#include "gpio-cfg.h"
+#include "devs.h"
+#include "cpu.h"
+#include "pm.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "common-smdk.h"
diff --git a/arch/arm/mach-s3c/mach-real6410.c b/arch/arm/mach-s3c/mach-real6410.c
index b72598b4ae27..6bb4bcdad600 100644
--- a/arch/arm/mach-s3c/mach-real6410.c
+++ b/arch/arm/mach-s3c/mach-real6410.c
@@ -24,21 +24,21 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <mach/irqs.h>
 
 #include <linux/soc/samsung/s3c-adc.h>
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/fb.h>
+#include "cpu.h"
+#include "devs.h"
+#include "fb.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
 
 #include <video/platform_lcd.h>
 #include <video/samsung_fimd.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "regs-modem.h"
diff --git a/arch/arm/mach-s3c/mach-rx1950.c b/arch/arm/mach-s3c/mach-rx1950.c
index 87d82c954523..b9cc919de617 100644
--- a/arch/arm/mach-s3c/mach-rx1950.c
+++ b/arch/arm/mach-s3c/mach-rx1950.c
@@ -46,15 +46,15 @@
 
 #include <sound/uda1380.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
-#include <plat/samsung-time.h>
-#include <plat/gpio-cfg.h>
+#include "hardware.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "pm.h"
+#include "samsung-time.h"
+#include "gpio-cfg.h"
 
 #include "s3c24xx.h"
 #include "h1940.h"
diff --git a/arch/arm/mach-s3c/mach-rx3715.c b/arch/arm/mach-s3c/mach-rx3715.c
index c810680669d4..026ed8aaf542 100644
--- a/arch/arm/mach-s3c/mach-rx3715.c
+++ b/arch/arm/mach-s3c/mach-rx3715.c
@@ -35,15 +35,14 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
-#include <plat/samsung-time.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "pm.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "h1940.h"
diff --git a/arch/arm/mach-s3c/mach-s3c2416-dt.c b/arch/arm/mach-s3c/mach-s3c2416-dt.c
index 2924e230e79d..418544d3015d 100644
--- a/arch/arm/mach-s3c/mach-s3c2416-dt.c
+++ b/arch/arm/mach-s3c/mach-s3c2416-dt.c
@@ -16,10 +16,10 @@
 #include <linux/serial_s3c.h>
 
 #include <asm/mach/arch.h>
-#include <mach/map.h>
+#include "map.h"
 
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "cpu.h"
+#include "pm.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-s3c64xx-dt.c b/arch/arm/mach-s3c/mach-s3c64xx-dt.c
index 1b8b61edd40e..ca9d964d44ee 100644
--- a/arch/arm/mach-s3c/mach-s3c64xx-dt.c
+++ b/arch/arm/mach-s3c/mach-s3c64xx-dt.c
@@ -8,8 +8,8 @@
 #include <asm/mach/map.h>
 #include <asm/system_misc.h>
 
-#include <plat/cpu.h>
-#include <mach/map.h>
+#include "cpu.h"
+#include "map.h"
 
 #include "s3c64xx.h"
 #include "watchdog-reset.h"
diff --git a/arch/arm/mach-s3c/mach-smartq.c b/arch/arm/mach-s3c/mach-smartq.c
index fa5f2ebc6dbc..ba7dee0ca372 100644
--- a/arch/arm/mach-s3c/mach-smartq.c
+++ b/arch/arm/mach-s3c/mach-smartq.c
@@ -19,21 +19,21 @@
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
+#include "cpu.h"
+#include "devs.h"
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/gpio-cfg.h>
+#include "gpio-cfg.h"
 #include <linux/platform_data/hwmon-s3c.h>
 #include <linux/platform_data/usb-ohci-s3c2410.h>
-#include <plat/sdhci.h>
+#include "sdhci.h"
 #include <linux/platform_data/touchscreen-s3c2410.h>
 
 #include <video/platform_lcd.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "mach-smartq.h"
diff --git a/arch/arm/mach-s3c/mach-smartq5.c b/arch/arm/mach-s3c/mach-smartq5.c
index 91560ed02738..514824efec63 100644
--- a/arch/arm/mach-s3c/mach-smartq5.c
+++ b/arch/arm/mach-s3c/mach-smartq5.c
@@ -15,15 +15,15 @@
 
 #include <video/samsung_fimd.h>
 #include <mach/irqs.h>
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/fb.h>
-#include <plat/gpio-cfg.h>
-#include <plat/samsung-time.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "fb.h"
+#include "gpio-cfg.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "mach-smartq.h"
diff --git a/arch/arm/mach-s3c/mach-smartq7.c b/arch/arm/mach-s3c/mach-smartq7.c
index 9eadc837ba12..a3f4cb9064e6 100644
--- a/arch/arm/mach-s3c/mach-smartq7.c
+++ b/arch/arm/mach-s3c/mach-smartq7.c
@@ -15,15 +15,15 @@
 
 #include <video/samsung_fimd.h>
 #include <mach/irqs.h>
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/fb.h>
-#include <plat/gpio-cfg.h>
-#include <plat/samsung-time.h>
+#include "map.h"
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "fb.h"
+#include "gpio-cfg.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 #include "mach-smartq.h"
diff --git a/arch/arm/mach-s3c/mach-smdk2410.c b/arch/arm/mach-s3c/mach-smdk2410.c
index 35aa8ec7cc4f..fb69487d6c2c 100644
--- a/arch/arm/mach-s3c/mach-smdk2410.c
+++ b/arch/arm/mach-s3c/mach-smdk2410.c
@@ -19,22 +19,21 @@
 #include <linux/serial_s3c.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "common-smdk.h"
diff --git a/arch/arm/mach-s3c/mach-smdk2413.c b/arch/arm/mach-s3c/mach-smdk2413.c
index f2305961f7eb..9cb634c00fb9 100644
--- a/arch/arm/mach-s3c/mach-smdk2413.c
+++ b/arch/arm/mach-s3c/mach-smdk2413.c
@@ -23,24 +23,24 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
+#include "hardware.h"
 #include <asm/hardware/iomd.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 //#include <asm/debug-ll.h>
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <linux/platform_data/fb-s3c2410.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "common-smdk.h"
diff --git a/arch/arm/mach-s3c/mach-smdk2416.c b/arch/arm/mach-s3c/mach-smdk2416.c
index 7fd5df4cf7e3..e6b4c6fd16e6 100644
--- a/arch/arm/mach-s3c/mach-smdk2416.c
+++ b/arch/arm/mach-s3c/mach-smdk2416.c
@@ -25,27 +25,27 @@
 #include <asm/mach/irq.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/hardware.h>
+#include "hardware.h"
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/regs-s3c2443-clock.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "regs-s3c2443-clock.h"
+#include "gpio-samsung.h"
 
 #include <linux/platform_data/leds-s3c24xx.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "gpio-cfg.h"
+#include "devs.h"
+#include "cpu.h"
 #include <linux/platform_data/mtd-nand-s3c2410.h>
-#include <plat/sdhci.h>
+#include "sdhci.h"
 #include <linux/platform_data/usb-s3c2410_udc.h>
 #include <linux/platform_data/s3c-hsudc.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
-#include <plat/fb.h>
+#include "fb.h"
 
 #include "s3c24xx.h"
 #include "common-smdk.h"
diff --git a/arch/arm/mach-s3c/mach-smdk2440.c b/arch/arm/mach-s3c/mach-smdk2440.c
index d72f86a68c84..eca2405ccb9a 100644
--- a/arch/arm/mach-s3c/mach-smdk2440.c
+++ b/arch/arm/mach-s3c/mach-smdk2440.c
@@ -23,20 +23,19 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
 #include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "common-smdk.h"
diff --git a/arch/arm/mach-s3c/mach-smdk2443.c b/arch/arm/mach-s3c/mach-smdk2443.c
index b439dfabd421..156e0217f7bb 100644
--- a/arch/arm/mach-s3c/mach-smdk2443.c
+++ b/arch/arm/mach-s3c/mach-smdk2443.c
@@ -22,18 +22,17 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 
 #include <linux/platform_data/fb-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 #include "common-smdk.h"
diff --git a/arch/arm/mach-s3c/mach-smdk6400.c b/arch/arm/mach-s3c/mach-smdk6400.c
index a2a70c5f5667..6a7aa7cad0ce 100644
--- a/arch/arm/mach-s3c/mach-smdk6400.c
+++ b/arch/arm/mach-s3c/mach-smdk6400.c
@@ -23,13 +23,13 @@
 #include <asm/mach/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/map.h>
+#include "map.h"
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "devs.h"
+#include "cpu.h"
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <mach/gpio-samsung.h>
-#include <plat/samsung-time.h>
+#include "gpio-samsung.h"
+#include "samsung-time.h"
 
 #include "s3c64xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-smdk6410.c b/arch/arm/mach-s3c/mach-smdk6410.c
index a80c2138e90b..f288661b7fb9 100644
--- a/arch/arm/mach-s3c/mach-smdk6410.c
+++ b/arch/arm/mach-s3c/mach-smdk6410.c
@@ -46,24 +46,24 @@
 #include <asm/mach/irq.h>
 
 #include <mach/irqs.h>
-#include <mach/map.h>
+#include "map.h"
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 #include <linux/platform_data/ata-samsung_cf.h>
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/fb.h>
-#include <plat/gpio-cfg.h>
+#include "fb.h"
+#include "gpio-cfg.h"
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "devs.h"
+#include "cpu.h"
 #include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
-#include <plat/keypad.h>
-#include <plat/samsung-time.h>
+#include "keypad.h"
+#include "samsung-time.h"
 
 #include "backlight.h"
 #include "s3c64xx.h"
diff --git a/arch/arm/mach-s3c/mach-tct_hammer.c b/arch/arm/mach-s3c/mach-tct_hammer.c
index f1ed79889e39..92d5494b7c98 100644
--- a/arch/arm/mach-s3c/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c/mach-tct_hammer.c
@@ -25,19 +25,18 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "devs.h"
+#include "cpu.h"
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/map.h>
 #include <linux/mtd/physmap.h>
-#include <plat/samsung-time.h>
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/mach-vr1000.c b/arch/arm/mach-s3c/mach-vr1000.c
index 854783386a06..78fa7f8411ae 100644
--- a/arch/arm/mach-s3c/mach-vr1000.c
+++ b/arch/arm/mach-s3c/mach-vr1000.c
@@ -34,14 +34,13 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <linux/platform_data/asoc-s3c24xx_simtec.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/samsung-time.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "samsung-time.h"
 
 #include "bast.h"
 #include "s3c24xx.h"
diff --git a/arch/arm/mach-s3c/mach-vstms.c b/arch/arm/mach-s3c/mach-vstms.c
index 7496271bb343..6776ae73d157 100644
--- a/arch/arm/mach-s3c/mach-vstms.c
+++ b/arch/arm/mach-s3c/mach-vstms.c
@@ -24,23 +24,22 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
 #include <linux/platform_data/fb-s3c2410.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/samsung-time.h>
+#include "devs.h"
+#include "cpu.h"
+#include "samsung-time.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/include/plat/map-s3c.h b/arch/arm/mach-s3c/map-s3c.h
similarity index 97%
rename from arch/arm/mach-s3c/include/plat/map-s3c.h
rename to arch/arm/mach-s3c/map-s3c.h
index bf247d836684..a18fdd3d6ae2 100644
--- a/arch/arm/mach-s3c/include/plat/map-s3c.h
+++ b/arch/arm/mach-s3c/map-s3c.h
@@ -9,7 +9,7 @@
 #ifndef __ASM_PLAT_MAP_S3C_H
 #define __ASM_PLAT_MAP_S3C_H __FILE__
 
-#include <mach/map.h>
+#include "map.h"
 
 #define S3C24XX_VA_IRQ		S3C_VA_IRQ
 #define S3C24XX_VA_MEMCTRL	S3C_VA_MEM
@@ -65,6 +65,6 @@ extern void __iomem *s3c24xx_va_gpio2;
 #define S3C24XX_VA_GPIO2 S3C24XX_VA_GPIO
 #endif
 
-#include <plat/map-s5p.h>
+#include "map-s5p.h"
 
 #endif /* __ASM_PLAT_MAP_S3C_H */
diff --git a/arch/arm/mach-s3c/include/mach/map-s3c24xx.h b/arch/arm/mach-s3c/map-s3c24xx.h
similarity index 98%
rename from arch/arm/mach-s3c/include/mach/map-s3c24xx.h
rename to arch/arm/mach-s3c/map-s3c24xx.h
index a20c9fd0d855..b5dba78a9dd7 100644
--- a/arch/arm/mach-s3c/include/mach/map-s3c24xx.h
+++ b/arch/arm/mach-s3c/map-s3c24xx.h
@@ -9,8 +9,8 @@
 #ifndef __ASM_ARCH_MAP_H
 #define __ASM_ARCH_MAP_H
 
-#include <plat/map-base.h>
-#include <plat/map-s3c.h>
+#include <mach/map-base.h>
+#include "map-s3c.h"
 
 /*
  * interrupt controller is the first thing we put in, to make
diff --git a/arch/arm/mach-s3c/include/mach/map-s3c64xx.h b/arch/arm/mach-s3c/map-s3c64xx.h
similarity index 98%
rename from arch/arm/mach-s3c/include/mach/map-s3c64xx.h
rename to arch/arm/mach-s3c/map-s3c64xx.h
index 9372a535b7ba..d7740d2a77c4 100644
--- a/arch/arm/mach-s3c/include/mach/map-s3c64xx.h
+++ b/arch/arm/mach-s3c/map-s3c64xx.h
@@ -11,8 +11,8 @@
 #ifndef __ASM_ARCH_MAP_H
 #define __ASM_ARCH_MAP_H __FILE__
 
-#include <plat/map-base.h>
-#include <plat/map-s3c.h>
+#include <mach/map-base.h>
+#include "map-s3c.h"
 
 /*
  * Post-mux Chip Select Regions Xm0CSn_
diff --git a/arch/arm/mach-s3c/include/plat/map-s5p.h b/arch/arm/mach-s3c/map-s5p.h
similarity index 94%
rename from arch/arm/mach-s3c/include/plat/map-s5p.h
rename to arch/arm/mach-s3c/map-s5p.h
index 3812085f8761..cd237924e34d 100644
--- a/arch/arm/mach-s3c/include/plat/map-s5p.h
+++ b/arch/arm/mach-s3c/map-s5p.h
@@ -15,6 +15,6 @@
 #define VA_VIC2			VA_VIC(2)
 #define VA_VIC3			VA_VIC(3)
 
-#include <plat/map-s3c.h>
+#include "map-s3c.h"
 
 #endif /* __ASM_PLAT_MAP_S5P_H */
diff --git a/arch/arm/mach-s3c/include/mach/map.h b/arch/arm/mach-s3c/map.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/map.h
rename to arch/arm/mach-s3c/map.h
diff --git a/arch/arm/mach-s3c/pl080.c b/arch/arm/mach-s3c/pl080.c
index 152edbeea0c7..cf7262073cc0 100644
--- a/arch/arm/mach-s3c/pl080.c
+++ b/arch/arm/mach-s3c/pl080.c
@@ -10,9 +10,9 @@
 #include <linux/amba/pl08x.h>
 #include <linux/of.h>
 
-#include <plat/cpu.h>
+#include "cpu.h"
 #include <mach/irqs.h>
-#include <mach/map.h>
+#include "map.h"
 
 #include "regs-sys.h"
 
diff --git a/arch/arm/mach-s3c/platformdata.c b/arch/arm/mach-s3c/platformdata.c
index cbc3b4b45c74..e643c81aef45 100644
--- a/arch/arm/mach-s3c/platformdata.c
+++ b/arch/arm/mach-s3c/platformdata.c
@@ -9,8 +9,8 @@
 #include <linux/string.h>
 #include <linux/platform_device.h>
 
-#include <plat/devs.h>
-#include <plat/sdhci.h>
+#include "devs.h"
+#include "sdhci.h"
 
 void __init *s3c_set_platdata(void *pd, size_t pdsize,
 			      struct platform_device *pdev)
diff --git a/arch/arm/mach-s3c/pm-common.c b/arch/arm/mach-s3c/pm-common.c
index 59a10c6dcba1..82b8c3148d7f 100644
--- a/arch/arm/mach-s3c/pm-common.c
+++ b/arch/arm/mach-s3c/pm-common.c
@@ -12,7 +12,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 
-#include <plat/pm-common.h>
+#include "pm-common.h"
 
 /* helper functions to save and restore register state */
 
diff --git a/arch/arm/mach-s3c/include/plat/pm-common.h b/arch/arm/mach-s3c/pm-common.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/pm-common.h
rename to arch/arm/mach-s3c/pm-common.h
diff --git a/arch/arm/mach-s3c/include/mach/pm-core-s3c24xx.h b/arch/arm/mach-s3c/pm-core-s3c24xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/pm-core-s3c24xx.h
rename to arch/arm/mach-s3c/pm-core-s3c24xx.h
diff --git a/arch/arm/mach-s3c/include/mach/pm-core-s3c64xx.h b/arch/arm/mach-s3c/pm-core-s3c64xx.h
similarity index 96%
rename from arch/arm/mach-s3c/include/mach/pm-core-s3c64xx.h
rename to arch/arm/mach-s3c/pm-core-s3c64xx.h
index 33cf242734a0..06f564e5cf63 100644
--- a/arch/arm/mach-s3c/include/mach/pm-core-s3c64xx.h
+++ b/arch/arm/mach-s3c/pm-core-s3c64xx.h
@@ -14,9 +14,9 @@
 #include <linux/serial_s3c.h>
 #include <linux/delay.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/regs-clock.h>
-#include <mach/map.h>
+#include "regs-gpio.h"
+#include "regs-clock.h"
+#include "map.h"
 
 static inline void s3c_pm_debug_init_uart(void)
 {
diff --git a/arch/arm/mach-s3c/include/mach/pm-core.h b/arch/arm/mach-s3c/pm-core.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/pm-core.h
rename to arch/arm/mach-s3c/pm-core.h
diff --git a/arch/arm/mach-s3c/pm-gpio.c b/arch/arm/mach-s3c/pm-gpio.c
index cb2e3bc79336..cfdbc2337998 100644
--- a/arch/arm/mach-s3c/pm-gpio.c
+++ b/arch/arm/mach-s3c/pm-gpio.c
@@ -13,10 +13,10 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 
-#include <plat/gpio-core.h>
-#include <plat/pm.h>
+#include "gpio-core.h"
+#include "pm.h"
 
 /* PM GPIO helpers */
 
diff --git a/arch/arm/mach-s3c/pm-h1940.S b/arch/arm/mach-s3c/pm-h1940.S
index f9ee515e1cbe..3bf6685123cb 100644
--- a/arch/arm/mach-s3c/pm-h1940.S
+++ b/arch/arm/mach-s3c/pm-h1940.S
@@ -7,9 +7,9 @@
 
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <mach/map.h>
+#include "map.h"
 
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 
 	.text
 	.global	h1940_pm_return
diff --git a/arch/arm/mach-s3c/pm-s3c2410.c b/arch/arm/mach-s3c/pm-s3c2410.c
index 2d8ea701380a..a66419883735 100644
--- a/arch/arm/mach-s3c/pm-s3c2410.c
+++ b/arch/arm/mach-s3c/pm-s3c2410.c
@@ -16,13 +16,12 @@
 
 #include <asm/mach-types.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
-#include <plat/gpio-cfg.h>
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "gpio-cfg.h"
+#include "cpu.h"
+#include "pm.h"
 
 #include "h1940.h"
 
diff --git a/arch/arm/mach-s3c/pm-s3c2412.c b/arch/arm/mach-s3c/pm-s3c2412.c
index 1ad9c61f9253..2785a969c29f 100644
--- a/arch/arm/mach-s3c/pm-s3c2412.c
+++ b/arch/arm/mach-s3c/pm-s3c2412.c
@@ -19,14 +19,13 @@
 #include <asm/cacheflush.h>
 #include <asm/irq.h>
 
-#include <mach/hardware.h>
 #include <mach/irqs.h>
 
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 
-#include <plat/cpu.h>
-#include <plat/pm.h>
-#include <plat/wakeup-mask.h>
+#include "cpu.h"
+#include "pm.h"
+#include "wakeup-mask.h"
 
 #include "regs-dsc.h"
 #include "s3c2412-power.h"
diff --git a/arch/arm/mach-s3c/pm-s3c2416.c b/arch/arm/mach-s3c/pm-s3c2416.c
index 9a2f05e279d4..f69ad84cf4ff 100644
--- a/arch/arm/mach-s3c/pm-s3c2416.c
+++ b/arch/arm/mach-s3c/pm-s3c2416.c
@@ -11,10 +11,10 @@
 
 #include <asm/cacheflush.h>
 
-#include <mach/regs-s3c2443-clock.h>
+#include "regs-s3c2443-clock.h"
 
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "cpu.h"
+#include "pm.h"
 
 #include "s3c2412-power.h"
 
diff --git a/arch/arm/mach-s3c/pm-s3c24xx.c b/arch/arm/mach-s3c/pm-s3c24xx.c
index c64988c609ad..6ca5e6aaca54 100644
--- a/arch/arm/mach-s3c/pm-s3c24xx.c
+++ b/arch/arm/mach-s3c/pm-s3c24xx.c
@@ -21,15 +21,15 @@
 #include <linux/serial_s3c.h>
 #include <linux/io.h>
 
-#include <mach/regs-clock.h>
-#include <mach/regs-gpio.h>
-#include <mach/regs-irq.h>
-#include <mach/gpio-samsung.h>
+#include "regs-clock.h"
+#include "regs-gpio.h"
+#include "regs-irq.h"
+#include "gpio-samsung.h"
 
 #include <asm/mach/time.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/pm.h>
+#include "gpio-cfg.h"
+#include "pm.h"
 
 #include "regs-mem.h"
 
diff --git a/arch/arm/mach-s3c/pm-s3c64xx.c b/arch/arm/mach-s3c/pm-s3c64xx.c
index a612e9779057..629e9c9762ca 100644
--- a/arch/arm/mach-s3c/pm-s3c64xx.c
+++ b/arch/arm/mach-s3c/pm-s3c64xx.c
@@ -14,17 +14,17 @@
 #include <linux/gpio.h>
 #include <linux/pm_domain.h>
 
-#include <mach/map.h>
+#include "map.h"
 #include <mach/irqs.h>
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
-#include <plat/wakeup-mask.h>
+#include "cpu.h"
+#include "devs.h"
+#include "pm.h"
+#include "wakeup-mask.h"
 
-#include <mach/regs-gpio.h>
-#include <mach/regs-clock.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "regs-clock.h"
+#include "gpio-samsung.h"
 
 #include "regs-gpio-memport.h"
 #include "regs-modem.h"
diff --git a/arch/arm/mach-s3c/pm.c b/arch/arm/mach-s3c/pm.c
index 03c22a9dee21..c563bb9d92be 100644
--- a/arch/arm/mach-s3c/pm.c
+++ b/arch/arm/mach-s3c/pm.c
@@ -18,16 +18,16 @@
 #include <asm/cacheflush.h>
 #include <asm/suspend.h>
 
-#include <mach/map.h>
-#include <mach/regs-clock.h>
-#include <mach/regs-irq.h>
+#include "map.h"
+#include "regs-clock.h"
+#include "regs-irq.h"
 #include <mach/irqs.h>
 
 #include <asm/irq.h>
 
-#include <plat/cpu.h>
-#include <plat/pm.h>
-#include <mach/pm-core.h>
+#include "cpu.h"
+#include "pm.h"
+#include "pm-core.h"
 
 /* for external use */
 
diff --git a/arch/arm/mach-s3c/include/plat/pm.h b/arch/arm/mach-s3c/pm.h
similarity index 98%
rename from arch/arm/mach-s3c/include/plat/pm.h
rename to arch/arm/mach-s3c/pm.h
index 2746137f9794..eed61e585457 100644
--- a/arch/arm/mach-s3c/include/plat/pm.h
+++ b/arch/arm/mach-s3c/pm.h
@@ -11,7 +11,7 @@
  * management
 */
 
-#include <plat/pm-common.h>
+#include "pm-common.h"
 
 struct device;
 
diff --git a/arch/arm/mach-s3c/include/plat/pwm-core.h b/arch/arm/mach-s3c/pwm-core.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/pwm-core.h
rename to arch/arm/mach-s3c/pwm-core.h
diff --git a/arch/arm/mach-s3c/include/plat/regs-adc.h b/arch/arm/mach-s3c/regs-adc.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/regs-adc.h
rename to arch/arm/mach-s3c/regs-adc.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-clock-s3c24xx.h b/arch/arm/mach-s3c/regs-clock-s3c24xx.h
similarity index 99%
rename from arch/arm/mach-s3c/include/mach/regs-clock-s3c24xx.h
rename to arch/arm/mach-s3c/regs-clock-s3c24xx.h
index da4e7b3aeba6..933ddb5eedec 100644
--- a/arch/arm/mach-s3c/include/mach/regs-clock-s3c24xx.h
+++ b/arch/arm/mach-s3c/regs-clock-s3c24xx.h
@@ -9,7 +9,7 @@
 #ifndef __ASM_ARM_REGS_CLOCK
 #define __ASM_ARM_REGS_CLOCK
 
-#include <mach/map.h>
+#include "map.h"
 
 #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
 
diff --git a/arch/arm/mach-s3c/include/mach/regs-clock-s3c64xx.h b/arch/arm/mach-s3c/regs-clock-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/regs-clock-s3c64xx.h
rename to arch/arm/mach-s3c/regs-clock-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-clock.h b/arch/arm/mach-s3c/regs-clock.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/regs-clock.h
rename to arch/arm/mach-s3c/regs-clock.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-gpio-s3c24xx.h b/arch/arm/mach-s3c/regs-gpio-s3c24xx.h
similarity index 99%
rename from arch/arm/mach-s3c/include/mach/regs-gpio-s3c24xx.h
rename to arch/arm/mach-s3c/regs-gpio-s3c24xx.h
index 51827d5577b6..9a7e262268a7 100644
--- a/arch/arm/mach-s3c/include/mach/regs-gpio-s3c24xx.h
+++ b/arch/arm/mach-s3c/regs-gpio-s3c24xx.h
@@ -10,7 +10,7 @@
 #ifndef __ASM_ARCH_REGS_GPIO_H
 #define __ASM_ARCH_REGS_GPIO_H
 
-#include <plat/map-s3c.h>
+#include "map-s3c.h"
 
 #define S3C24XX_MISCCR		S3C24XX_GPIOREG2(0x80)
 
diff --git a/arch/arm/mach-s3c/include/mach/regs-gpio-s3c64xx.h b/arch/arm/mach-s3c/regs-gpio-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/regs-gpio-s3c64xx.h
rename to arch/arm/mach-s3c/regs-gpio-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-gpio.h b/arch/arm/mach-s3c/regs-gpio.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/regs-gpio.h
rename to arch/arm/mach-s3c/regs-gpio.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-irq-s3c24xx.h b/arch/arm/mach-s3c/regs-irq-s3c24xx.h
similarity index 98%
rename from arch/arm/mach-s3c/include/mach/regs-irq-s3c24xx.h
rename to arch/arm/mach-s3c/regs-irq-s3c24xx.h
index 2921b48c56b2..c0b97b203415 100644
--- a/arch/arm/mach-s3c/include/mach/regs-irq-s3c24xx.h
+++ b/arch/arm/mach-s3c/regs-irq-s3c24xx.h
@@ -8,7 +8,7 @@
 #ifndef ___ASM_ARCH_REGS_IRQ_H
 #define ___ASM_ARCH_REGS_IRQ_H
 
-#include <plat/map-s3c.h>
+#include "map-s3c.h"
 
 /* interrupt controller */
 
diff --git a/arch/arm/mach-s3c/include/mach/regs-irq-s3c64xx.h b/arch/arm/mach-s3c/regs-irq-s3c64xx.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/regs-irq-s3c64xx.h
rename to arch/arm/mach-s3c/regs-irq-s3c64xx.h
diff --git a/arch/arm/mach-s3c/include/mach/regs-irq.h b/arch/arm/mach-s3c/regs-irq.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/regs-irq.h
rename to arch/arm/mach-s3c/regs-irq.h
diff --git a/arch/arm/mach-s3c/include/plat/regs-irqtype.h b/arch/arm/mach-s3c/regs-irqtype.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/regs-irqtype.h
rename to arch/arm/mach-s3c/regs-irqtype.h
diff --git a/arch/arm/mach-s3c/regs-mem.h b/arch/arm/mach-s3c/regs-mem.h
index 5048ab8f06c2..8fed34a1672a 100644
--- a/arch/arm/mach-s3c/regs-mem.h
+++ b/arch/arm/mach-s3c/regs-mem.h
@@ -9,7 +9,7 @@
 #ifndef __ARCH_ARM_MACH_S3C24XX_REGS_MEM_H
 #define __ARCH_ARM_MACH_S3C24XX_REGS_MEM_H __FILE__
 
-#include <plat/map-s3c.h>
+#include "map-s3c.h"
 
 #define S3C2410_MEMREG(x)		(S3C24XX_VA_MEMCTRL + (x))
 
diff --git a/arch/arm/mach-s3c/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c/regs-s3c2443-clock.h
similarity index 99%
rename from arch/arm/mach-s3c/include/mach/regs-s3c2443-clock.h
rename to arch/arm/mach-s3c/regs-s3c2443-clock.h
index fefef7233f4b..b3b670d463db 100644
--- a/arch/arm/mach-s3c/include/mach/regs-s3c2443-clock.h
+++ b/arch/arm/mach-s3c/regs-s3c2443-clock.h
@@ -11,7 +11,7 @@
 #define __ASM_ARM_REGS_S3C2443_CLOCK
 
 #include <linux/delay.h>
-#include <plat/map-s3c.h>
+#include "map-s3c.h"
 
 #define S3C2443_CLKREG(x)		((x) + S3C24XX_VA_CLKPWR)
 
diff --git a/arch/arm/mach-s3c/include/mach/rtc-core.h b/arch/arm/mach-s3c/rtc-core.h
similarity index 100%
rename from arch/arm/mach-s3c/include/mach/rtc-core.h
rename to arch/arm/mach-s3c/rtc-core.h
diff --git a/arch/arm/mach-s3c/s3c2410.c b/arch/arm/mach-s3c/s3c2410.c
index 0013125b03ee..4153e67f0e86 100644
--- a/arch/arm/mach-s3c/s3c2410.c
+++ b/arch/arm/mach-s3c/s3c2410.c
@@ -25,21 +25,21 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "gpio-samsung.h"
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
 
-#include <mach/regs-clock.h>
+#include "regs-clock.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
+#include "cpu.h"
+#include "devs.h"
+#include "pm.h"
 
-#include <plat/gpio-core.h>
-#include <plat/gpio-cfg.h>
-#include <plat/gpio-cfg-helpers.h>
+#include "gpio-core.h"
+#include "gpio-cfg.h"
+#include "gpio-cfg-helpers.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/s3c2412.c b/arch/arm/mach-s3c/s3c2412.c
index 3599a2f01c1e..b40b70864d9c 100644
--- a/arch/arm/mach-s3c/s3c2412.c
+++ b/arch/arm/mach-s3c/s3c2412.c
@@ -29,13 +29,13 @@
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
-#include <mach/map.h>
-#include <mach/regs-clock.h>
-#include <mach/regs-gpio.h>
+#include "map.h"
+#include "regs-clock.h"
+#include "regs-gpio.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
+#include "cpu.h"
+#include "devs.h"
+#include "pm.h"
 
 #include "s3c24xx.h"
 #include "nand-core.h"
diff --git a/arch/arm/mach-s3c/include/mach/s3c2412.h b/arch/arm/mach-s3c/s3c2412.h
similarity index 96%
rename from arch/arm/mach-s3c/include/mach/s3c2412.h
rename to arch/arm/mach-s3c/s3c2412.h
index 1ae369c81beb..ed09a0e13bd8 100644
--- a/arch/arm/mach-s3c/include/mach/s3c2412.h
+++ b/arch/arm/mach-s3c/s3c2412.h
@@ -8,7 +8,7 @@
 #ifndef __ARCH_ARM_MACH_S3C24XX_S3C2412_H
 #define __ARCH_ARM_MACH_S3C24XX_S3C2412_H __FILE__
 
-#include <plat/map-s3c.h>
+#include "map-s3c.h"
 
 #define S3C2412_MEMREG(x)		(S3C24XX_VA_MEMCTRL + (x))
 #define S3C2412_EBIREG(x)		(S3C2412_VA_EBI + (x))
diff --git a/arch/arm/mach-s3c/s3c2416.c b/arch/arm/mach-s3c/s3c2416.c
index 95c34fd36421..8f420991bd19 100644
--- a/arch/arm/mach-s3c/s3c2416.c
+++ b/arch/arm/mach-s3c/s3c2416.c
@@ -26,25 +26,25 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "gpio-samsung.h"
 #include <asm/proc-fns.h>
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
-#include <mach/regs-s3c2443-clock.h>
-#include <mach/rtc-core.h>
+#include "regs-s3c2443-clock.h"
+#include "rtc-core.h"
 
-#include <plat/gpio-core.h>
-#include <plat/gpio-cfg.h>
-#include <plat/gpio-cfg-helpers.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/sdhci.h>
-#include <plat/pm.h>
+#include "gpio-core.h"
+#include "gpio-cfg.h"
+#include "gpio-cfg-helpers.h"
+#include "devs.h"
+#include "cpu.h"
+#include "sdhci.h"
+#include "pm.h"
 
-#include <plat/iic-core.h>
-#include <plat/adc-core.h>
+#include "iic-core.h"
+#include "adc-core.h"
 
 #include "s3c24xx.h"
 #include "fb-core.h"
diff --git a/arch/arm/mach-s3c/s3c2440.c b/arch/arm/mach-s3c/s3c2440.c
index a7c2dcf50b21..e6a88730eb6b 100644
--- a/arch/arm/mach-s3c/s3c2440.c
+++ b/arch/arm/mach-s3c/s3c2440.c
@@ -23,17 +23,16 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 #include <asm/irq.h>
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "devs.h"
+#include "cpu.h"
+#include "pm.h"
 
-#include <plat/gpio-core.h>
-#include <plat/gpio-cfg.h>
-#include <plat/gpio-cfg-helpers.h>
+#include "gpio-core.h"
+#include "gpio-cfg.h"
+#include "gpio-cfg-helpers.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/s3c2442.c b/arch/arm/mach-s3c/s3c2442.c
index ffef8a5e1a94..f0b6c04318db 100644
--- a/arch/arm/mach-s3c/s3c2442.c
+++ b/arch/arm/mach-s3c/s3c2442.c
@@ -21,19 +21,18 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 
-#include <mach/hardware.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 #include <linux/atomic.h>
 #include <asm/irq.h>
 
-#include <mach/regs-clock.h>
+#include "regs-clock.h"
 
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "cpu.h"
+#include "pm.h"
 
-#include <plat/gpio-core.h>
-#include <plat/gpio-cfg.h>
-#include <plat/gpio-cfg-helpers.h>
+#include "gpio-core.h"
+#include "gpio-cfg.h"
+#include "gpio-cfg-helpers.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/s3c2443.c b/arch/arm/mach-s3c/s3c2443.c
index 00318ad994ff..026110177447 100644
--- a/arch/arm/mach-s3c/s3c2443.c
+++ b/arch/arm/mach-s3c/s3c2443.c
@@ -23,21 +23,21 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "gpio-samsung.h"
 #include <mach/irqs.h>
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
-#include <mach/regs-s3c2443-clock.h>
-#include <mach/rtc-core.h>
+#include "regs-s3c2443-clock.h"
+#include "rtc-core.h"
 
-#include <plat/gpio-core.h>
-#include <plat/gpio-cfg.h>
-#include <plat/gpio-cfg-helpers.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/adc-core.h>
+#include "gpio-core.h"
+#include "gpio-cfg.h"
+#include "gpio-cfg-helpers.h"
+#include "devs.h"
+#include "cpu.h"
+#include "adc-core.h"
 
 #include "fb-core.h"
 #include "nand-core.h"
diff --git a/arch/arm/mach-s3c/s3c244x.c b/arch/arm/mach-s3c/s3c244x.c
index a013f3447777..8a3af63d7a90 100644
--- a/arch/arm/mach-s3c/s3c244x.c
+++ b/arch/arm/mach-s3c/s3c244x.c
@@ -25,15 +25,15 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
+#include "map.h"
 #include <asm/irq.h>
 
-#include <mach/regs-clock.h>
-#include <mach/regs-gpio.h>
+#include "regs-clock.h"
+#include "regs-gpio.h"
 
-#include <plat/devs.h>
-#include <plat/cpu.h>
-#include <plat/pm.h>
+#include "devs.h"
+#include "cpu.h"
+#include "pm.h"
 
 #include "s3c24xx.h"
 #include "nand-core.h"
diff --git a/arch/arm/mach-s3c/s3c24xx.c b/arch/arm/mach-s3c/s3c24xx.c
index 409f4c00c17f..e15282697756 100644
--- a/arch/arm/mach-s3c/s3c24xx.c
+++ b/arch/arm/mach-s3c/s3c24xx.c
@@ -20,9 +20,9 @@
 #include <linux/platform_data/dma-s3c24xx.h>
 #include <linux/dmaengine.h>
 
-#include <mach/hardware.h>
-#include <mach/map.h>
-#include <mach/regs-clock.h>
+#include "hardware.h"
+#include "map.h"
+#include "regs-clock.h"
 #include <asm/irq.h>
 #include <asm/cacheflush.h>
 #include <asm/system_info.h>
@@ -31,12 +31,12 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/dma.h>
+#include "regs-gpio.h"
+#include "dma-s3c24xx.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pwm-core.h>
+#include "cpu.h"
+#include "devs.h"
+#include "pwm-core.h"
 
 #include "s3c24xx.h"
 
diff --git a/arch/arm/mach-s3c/s3c6400.c b/arch/arm/mach-s3c/s3c6400.c
index 2f94515558bc..10a9d82b66d3 100644
--- a/arch/arm/mach-s3c/s3c6400.c
+++ b/arch/arm/mach-s3c/s3c6400.c
@@ -28,12 +28,12 @@
 
 #include <asm/irq.h>
 
-#include <mach/regs-clock.h>
+#include "regs-clock.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/sdhci.h>
-#include <plat/iic-core.h>
+#include "cpu.h"
+#include "devs.h"
+#include "sdhci.h"
+#include "iic-core.h"
 
 #include "s3c64xx.h"
 #include "onenand-core.h"
diff --git a/arch/arm/mach-s3c/s3c6410.c b/arch/arm/mach-s3c/s3c6410.c
index aa330d10e102..8d8657e026bb 100644
--- a/arch/arm/mach-s3c/s3c6410.c
+++ b/arch/arm/mach-s3c/s3c6410.c
@@ -30,13 +30,13 @@
 #include <asm/irq.h>
 
 #include <linux/soc/samsung/s3c-pm.h>
-#include <mach/regs-clock.h>
+#include "regs-clock.h"
 
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/sdhci.h>
-#include <plat/adc-core.h>
-#include <plat/iic-core.h>
+#include "cpu.h"
+#include "devs.h"
+#include "sdhci.h"
+#include "adc-core.h"
+#include "iic-core.h"
 
 #include "ata-core.h"
 #include "s3c64xx.h"
diff --git a/arch/arm/mach-s3c/s3c64xx.c b/arch/arm/mach-s3c/s3c64xx.c
index 289b462a035d..dee17c15016e 100644
--- a/arch/arm/mach-s3c/s3c64xx.c
+++ b/arch/arm/mach-s3c/s3c64xx.c
@@ -34,18 +34,17 @@
 #include <asm/mach/map.h>
 #include <asm/system_misc.h>
 
-#include <mach/map.h>
+#include "map.h"
 #include <mach/irqs.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-
-#include <plat/cpu.h>
-#include <plat/devs.h>
-#include <plat/pm.h>
-#include <plat/gpio-cfg.h>
-#include <plat/pwm-core.h>
-#include <plat/regs-irqtype.h>
-
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+
+#include "cpu.h"
+#include "devs.h"
+#include "pm.h"
+#include "gpio-cfg.h"
+#include "pwm-core.h"
+#include "regs-irqtype.h"
 #include "s3c64xx.h"
 #include "irq-uart.h"
 #include "watchdog-reset.h"
diff --git a/arch/arm/mach-s3c/include/plat/samsung-time.h b/arch/arm/mach-s3c/samsung-time.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/samsung-time.h
rename to arch/arm/mach-s3c/samsung-time.h
diff --git a/arch/arm/mach-s3c/include/plat/sdhci.h b/arch/arm/mach-s3c/sdhci.h
similarity index 99%
rename from arch/arm/mach-s3c/include/plat/sdhci.h
rename to arch/arm/mach-s3c/sdhci.h
index 5731e42ea208..9f9d419e58d7 100644
--- a/arch/arm/mach-s3c/include/plat/sdhci.h
+++ b/arch/arm/mach-s3c/sdhci.h
@@ -15,7 +15,7 @@
 #define __PLAT_S3C_SDHCI_H __FILE__
 
 #include <linux/platform_data/mmc-sdhci-s3c.h>
-#include <plat/devs.h>
+#include "devs.h"
 
 /* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data
  * @pd: The default platform data for this device.
diff --git a/arch/arm/mach-s3c/setup-camif.c b/arch/arm/mach-s3c/setup-camif.c
index 2b262fae3f61..2f3d8e912a53 100644
--- a/arch/arm/mach-s3c/setup-camif.c
+++ b/arch/arm/mach-s3c/setup-camif.c
@@ -5,8 +5,8 @@
 // Helper functions for S3C24XX/S3C64XX SoC series CAMIF driver
 
 #include <linux/gpio.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 /* Number of camera port pins, without FIELD */
 #define S3C_CAMIF_NUM_GPIOS	13
diff --git a/arch/arm/mach-s3c/setup-fb-24bpp.c b/arch/arm/mach-s3c/setup-fb-24bpp.c
index 2c7178b26ebb..cfa34b55ca21 100644
--- a/arch/arm/mach-s3c/setup-fb-24bpp.c
+++ b/arch/arm/mach-s3c/setup-fb-24bpp.c
@@ -12,9 +12,9 @@
 #include <linux/fb.h>
 #include <linux/gpio.h>
 
-#include <plat/fb.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "fb.h"
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 void s3c64xx_fb_gpio_setup_24bpp(void)
 {
diff --git a/arch/arm/mach-s3c/setup-i2c.c b/arch/arm/mach-s3c/setup-i2c.c
index 1a01d44b5910..6b11ee3cedf9 100644
--- a/arch/arm/mach-s3c/setup-i2c.c
+++ b/arch/arm/mach-s3c/setup-i2c.c
@@ -10,11 +10,10 @@
 
 struct platform_device;
 
-#include <plat/gpio-cfg.h>
+#include "gpio-cfg.h"
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
 
 void s3c_i2c0_cfg_gpio(struct platform_device *dev)
 {
diff --git a/arch/arm/mach-s3c/setup-i2c0.c b/arch/arm/mach-s3c/setup-i2c0.c
index 552eb50da38c..a6ef8d2bc995 100644
--- a/arch/arm/mach-s3c/setup-i2c0.c
+++ b/arch/arm/mach-s3c/setup-i2c0.c
@@ -14,8 +14,8 @@
 struct platform_device; /* don't need the contents */
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 void s3c_i2c0_cfg_gpio(struct platform_device *dev)
 {
diff --git a/arch/arm/mach-s3c/setup-i2c1.c b/arch/arm/mach-s3c/setup-i2c1.c
index d231f0fc508d..0fe37363d26e 100644
--- a/arch/arm/mach-s3c/setup-i2c1.c
+++ b/arch/arm/mach-s3c/setup-i2c1.c
@@ -14,8 +14,8 @@
 struct platform_device; /* don't need the contents */
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 void s3c_i2c1_cfg_gpio(struct platform_device *dev)
 {
diff --git a/arch/arm/mach-s3c/setup-ide.c b/arch/arm/mach-s3c/setup-ide.c
index 810139a807ce..323ce97665af 100644
--- a/arch/arm/mach-s3c/setup-ide.c
+++ b/arch/arm/mach-s3c/setup-ide.c
@@ -9,10 +9,10 @@
 #include <linux/gpio.h>
 #include <linux/io.h>
 
-#include <mach/map.h>
-#include <mach/regs-clock.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "map.h"
+#include "regs-clock.h"
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 #include <linux/platform_data/ata-samsung_cf.h>
 
 void s3c64xx_ide_setup_gpio(void)
diff --git a/arch/arm/mach-s3c/setup-keypad.c b/arch/arm/mach-s3c/setup-keypad.c
index 351961025273..8463ad37c6ab 100644
--- a/arch/arm/mach-s3c/setup-keypad.c
+++ b/arch/arm/mach-s3c/setup-keypad.c
@@ -6,9 +6,9 @@
 // GPIO configuration for S3C64XX KeyPad device
 
 #include <linux/gpio.h>
-#include <plat/gpio-cfg.h>
-#include <plat/keypad.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "keypad.h"
+#include "gpio-samsung.h"
 
 void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols)
 {
diff --git a/arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c b/arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c
index 218346a36d1e..345865837f14 100644
--- a/arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c
+++ b/arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c
@@ -14,9 +14,9 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
 void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
 {
diff --git a/arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c b/arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c
index 138455af4937..646ff949acd5 100644
--- a/arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c
+++ b/arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c
@@ -13,9 +13,9 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 
-#include <plat/gpio-cfg.h>
-#include <plat/sdhci.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "sdhci.h"
+#include "gpio-samsung.h"
 
 void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
 {
diff --git a/arch/arm/mach-s3c/setup-spi-s3c24xx.c b/arch/arm/mach-s3c/setup-spi-s3c24xx.c
index 6c2b96a82da5..1a0663dd2e2a 100644
--- a/arch/arm/mach-s3c/setup-spi-s3c24xx.c
+++ b/arch/arm/mach-s3c/setup-spi-s3c24xx.c
@@ -8,10 +8,10 @@
 #include <linux/gpio.h>
 #include <linux/platform_device.h>
 
-#include <plat/gpio-cfg.h>
+#include "gpio-cfg.h"
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
+#include "hardware.h"
+#include "regs-gpio.h"
 
 #ifdef CONFIG_S3C64XX_DEV_SPI0
 int s3c64xx_spi0_cfg_gpio(void)
diff --git a/arch/arm/mach-s3c/setup-spi-s3c64xx.c b/arch/arm/mach-s3c/setup-spi-s3c64xx.c
index 39dfae1f46e7..30cdb516e026 100644
--- a/arch/arm/mach-s3c/setup-spi-s3c64xx.c
+++ b/arch/arm/mach-s3c/setup-spi-s3c64xx.c
@@ -4,8 +4,8 @@
 //		http://www.samsung.com/
 
 #include <linux/gpio.h>
-#include <plat/gpio-cfg.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 #ifdef CONFIG_S3C64XX_DEV_SPI0
 int s3c64xx_spi0_cfg_gpio(void)
diff --git a/arch/arm/mach-s3c/setup-ts.c b/arch/arm/mach-s3c/setup-ts.c
index 53a14d4f4852..b726b66da526 100644
--- a/arch/arm/mach-s3c/setup-ts.c
+++ b/arch/arm/mach-s3c/setup-ts.c
@@ -10,9 +10,8 @@
 
 struct platform_device; /* don't need the contents */
 
-#include <plat/gpio-cfg.h>
-#include <mach/hardware.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-cfg.h"
+#include "gpio-samsung.h"
 
 /**
  * s3c24xx_ts_cfg_gpio - configure gpio for s3c2410 systems
diff --git a/arch/arm/mach-s3c/setup-usb-phy.c b/arch/arm/mach-s3c/setup-usb-phy.c
index 6aaaa1d8e8b9..aeb9cdc4b2c9 100644
--- a/arch/arm/mach-s3c/setup-usb-phy.c
+++ b/arch/arm/mach-s3c/setup-usb-phy.c
@@ -8,9 +8,9 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/platform_device.h>
-#include <mach/map.h>
-#include <plat/cpu.h>
-#include <plat/usb-phy.h>
+#include "map.h"
+#include "cpu.h"
+#include "usb-phy.h"
 
 #include "regs-sys.h"
 #include "regs-usb-hsotg-phy.h"
diff --git a/arch/arm/mach-s3c/simtec-audio.c b/arch/arm/mach-s3c/simtec-audio.c
index 0c12ba4a4704..487485bcc2ab 100644
--- a/arch/arm/mach-s3c/simtec-audio.c
+++ b/arch/arm/mach-s3c/simtec-audio.c
@@ -12,13 +12,12 @@
 #include <linux/device.h>
 #include <linux/io.h>
 
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-#include <mach/gpio-samsung.h>
-#include <plat/gpio-cfg.h>
+#include "regs-gpio.h"
+#include "gpio-samsung.h"
+#include "gpio-cfg.h"
 
 #include <linux/platform_data/asoc-s3c24xx_simtec.h>
-#include <plat/devs.h>
+#include "devs.h"
 
 #include "bast.h"
 #include "simtec.h"
diff --git a/arch/arm/mach-s3c/simtec-nor.c b/arch/arm/mach-s3c/simtec-nor.c
index 26b18497e959..a6fba056a747 100644
--- a/arch/arm/mach-s3c/simtec-nor.c
+++ b/arch/arm/mach-s3c/simtec-nor.c
@@ -21,7 +21,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/map.h>
+#include "map.h"
 
 #include "bast.h"
 #include "simtec.h"
diff --git a/arch/arm/mach-s3c/simtec-pm.c b/arch/arm/mach-s3c/simtec-pm.c
index c19074d81389..0b92e91c4377 100644
--- a/arch/arm/mach-s3c/simtec-pm.c
+++ b/arch/arm/mach-s3c/simtec-pm.c
@@ -19,14 +19,12 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/hardware.h>
-
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
+#include "map.h"
+#include "regs-gpio.h"
 
 #include <asm/mach-types.h>
 
-#include <plat/pm.h>
+#include "pm.h"
 
 #include "regs-mem.h"
 
diff --git a/arch/arm/mach-s3c/simtec-usb.c b/arch/arm/mach-s3c/simtec-usb.c
index b15e0c49fa11..18fe0642743a 100644
--- a/arch/arm/mach-s3c/simtec-usb.c
+++ b/arch/arm/mach-s3c/simtec-usb.c
@@ -23,13 +23,12 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
-#include <mach/gpio-samsung.h>
+#include "gpio-samsung.h"
 #include <mach/irqs.h>
 #include <asm/irq.h>
 
 #include <linux/platform_data/usb-ohci-s3c2410.h>
-#include <plat/devs.h>
+#include "devs.h"
 
 #include "bast.h"
 #include "simtec.h"
diff --git a/arch/arm/mach-s3c/sleep-s3c2410.S b/arch/arm/mach-s3c/sleep-s3c2410.S
index e4f6f64e7826..0f5562a6abc9 100644
--- a/arch/arm/mach-s3c/sleep-s3c2410.S
+++ b/arch/arm/mach-s3c/sleep-s3c2410.S
@@ -13,10 +13,10 @@
 #include <linux/linkage.h>
 #include <linux/serial_s3c.h>
 #include <asm/assembler.h>
-#include <mach/map.h>
+#include "map.h"
 
-#include <mach/regs-gpio.h>
-#include <mach/regs-clock.h>
+#include "regs-gpio.h"
+#include "regs-clock.h"
 
 #include "regs-mem.h"
 
diff --git a/arch/arm/mach-s3c/sleep-s3c2412.S b/arch/arm/mach-s3c/sleep-s3c2412.S
index 434f5082b2ed..b4b61737fbb2 100644
--- a/arch/arm/mach-s3c/sleep-s3c2412.S
+++ b/arch/arm/mach-s3c/sleep-s3c2412.S
@@ -8,9 +8,9 @@
 
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <mach/map.h>
+#include "map.h"
 
-#include <mach/regs-irq.h>
+#include "regs-irq.h"
 
 	.text
 
diff --git a/arch/arm/mach-s3c/sleep-s3c24xx.S b/arch/arm/mach-s3c/sleep-s3c24xx.S
index 4bda4a413584..4b2af91f3dce 100644
--- a/arch/arm/mach-s3c/sleep-s3c24xx.S
+++ b/arch/arm/mach-s3c/sleep-s3c24xx.S
@@ -13,10 +13,10 @@
 #include <linux/linkage.h>
 #include <linux/serial_s3c.h>
 #include <asm/assembler.h>
-#include <mach/map.h>
+#include "map.h"
 
-#include <mach/regs-gpio.h>
-#include <mach/regs-clock.h>
+#include "regs-gpio.h"
+#include "regs-clock.h"
 
 /*
  * S3C24XX_DEBUG_RESUME is dangerous if your bootloader does not
diff --git a/arch/arm/mach-s3c/sleep-s3c64xx.S b/arch/arm/mach-s3c/sleep-s3c64xx.S
index 39e16a07a5e4..739e53fbce09 100644
--- a/arch/arm/mach-s3c/sleep-s3c64xx.S
+++ b/arch/arm/mach-s3c/sleep-s3c64xx.S
@@ -11,12 +11,12 @@
 
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include <mach/map.h>
+#include "map.h"
 
 #undef S3C64XX_VA_GPIO
 #define S3C64XX_VA_GPIO (0x0)
 
-#include <mach/regs-gpio.h>
+#include "regs-gpio.h"
 
 #define LL_UART (S3C_PA_UART + (0x400 * CONFIG_S3C_LOWLEVEL_UART_PORT))
 
diff --git a/arch/arm/mach-s3c/include/plat/usb-phy.h b/arch/arm/mach-s3c/usb-phy.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/usb-phy.h
rename to arch/arm/mach-s3c/usb-phy.h
diff --git a/arch/arm/mach-s3c/wakeup-mask.c b/arch/arm/mach-s3c/wakeup-mask.c
index 24f96fb80738..b490e7527c66 100644
--- a/arch/arm/mach-s3c/wakeup-mask.c
+++ b/arch/arm/mach-s3c/wakeup-mask.c
@@ -11,8 +11,8 @@
 #include <linux/irq.h>
 #include <linux/io.h>
 
-#include <plat/wakeup-mask.h>
-#include <plat/pm.h>
+#include "wakeup-mask.h"
+#include "pm.h"
 
 void samsung_sync_wakemask(void __iomem *reg,
 			   const struct samsung_wakeup_mask *mask, int nr_mask)
diff --git a/arch/arm/mach-s3c/include/plat/wakeup-mask.h b/arch/arm/mach-s3c/wakeup-mask.h
similarity index 100%
rename from arch/arm/mach-s3c/include/plat/wakeup-mask.h
rename to arch/arm/mach-s3c/wakeup-mask.h
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index c2b46640a78b..f61f1c82308e 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -24,9 +24,6 @@
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/mmc/slot-gpio.h>
-
-#include <mach/dma.h>
-
 #include <linux/platform_data/mmc-s3cmci.h>
 
 #include "s3cmci.h"
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 135+ messages in thread

* Re: [PATCH 34/36] ARM: s3c: stop including mach/hardware.h from mach/io.h
  2019-10-10 21:02     ` Russell King - ARM Linux admin
  2019-10-10 21:02       ` Russell King - ARM Linux admin
@ 2019-10-10 21:53       ` Arnd Bergmann
  2019-10-10 21:53         ` Arnd Bergmann
  1 sibling, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 21:53 UTC (permalink / raw)
  To: Russell King - ARM Linux admin
  Cc: Kukjin Kim, Krzysztof Kozlowski, Andi Shyti, Mark Brown,
	Felipe Balbi, Greg Kroah-Hartman,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Linus Walleij, USB list, linux-kernel, linux-spi, Linux ARM

On Thu, Oct 10, 2019 at 11:02 PM Russell King - ARM Linux admin
<linux@armlinux.org.uk> wrote:
>
> On Thu, Oct 10, 2019 at 10:30:18PM +0200, Arnd Bergmann wrote:
> > diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h b/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
> > index 2ad22b2d459b..f8a114891f16 100644
> > --- a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
> > +++ b/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
> > @@ -14,6 +14,8 @@
> >  #ifndef GPIO_SAMSUNG_S3C24XX_H
> >  #define GPIO_SAMSUNG_S3C24XX_H
> >
> > +#include <mach/map.h>
> > +
>
> Why?  Nothing in this file uses anything from mach/map.h

Good point, I don't recall how this happened, most likely either
edited the wrong file after a build regression, or I had moved some
definition into this file in a patch that I later discarded and this
change got left behind.

> > diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
> > index 7ca3dd4f13c0..da4e7b3aeba6 100644
> > --- a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
> > +++ b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
> > @@ -9,6 +9,8 @@
> >  #ifndef __ASM_ARM_REGS_CLOCK
> >  #define __ASM_ARM_REGS_CLOCK
> >
> > +#include <mach/map.h>
> > +
>
> Why?  Nothing in this file uses anything from mach/map.h

I think I added this one for S3C24XX_VA_CLKPWR, which is in
plat/map-s3c.h

> > diff --git a/drivers/spi/spi-s3c24xx-regs.h b/drivers/spi/spi-s3c24xx-regs.h
> > index 37b93ff7c7fe..b76d591eba8c 100644
> > --- a/drivers/spi/spi-s3c24xx-regs.h
> > +++ b/drivers/spi/spi-s3c24xx-regs.h
> > @@ -8,6 +8,8 @@
> >  #ifndef __ASM_ARCH_REGS_SPI_H
> >  #define __ASM_ARCH_REGS_SPI_H
> >
> > +#include <mach/map.h>
> > +
>
> If this is outside of arch/arm, it shouldn't need anything from
> mach/map.h - mach/map.h is not for driver use.

This was the result of a botched rebase: The patch was initially
at the start of the series where the #include was still required
but later moved to the end behind the patch that used to remove
it again.

> > diff --git a/drivers/usb/gadget/udc/s3c2410_udc_regs.h b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
> > index d8d2eeaca088..4df279342cdd 100644
> > --- a/drivers/usb/gadget/udc/s3c2410_udc_regs.h
> > +++ b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
> > @@ -6,6 +6,8 @@
> >  #ifndef __ASM_ARCH_REGS_UDC_H
> >  #define __ASM_ARCH_REGS_UDC_H
> >
> > +#include <mach/map.h>
> > +
>
> If this is outside of arch/arm, it shouldn't need anything from
> mach/map.h - mach/map.h is not for driver use.

Same here.

Thanks for taking a look, I'll fix it all up tomorrow.

          Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 34/36] ARM: s3c: stop including mach/hardware.h from mach/io.h
  2019-10-10 21:53       ` Arnd Bergmann
@ 2019-10-10 21:53         ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-10 21:53 UTC (permalink / raw)
  To: Russell King - ARM Linux admin
  Cc: Kukjin Kim, Krzysztof Kozlowski, Andi Shyti, Mark Brown,
	Felipe Balbi, Greg Kroah-Hartman,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Linus Walleij, USB list, linux-kernel, linux-spi, Linux ARM

On Thu, Oct 10, 2019 at 11:02 PM Russell King - ARM Linux admin
<linux@armlinux.org.uk> wrote:
>
> On Thu, Oct 10, 2019 at 10:30:18PM +0200, Arnd Bergmann wrote:
> > diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h b/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
> > index 2ad22b2d459b..f8a114891f16 100644
> > --- a/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
> > +++ b/arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h
> > @@ -14,6 +14,8 @@
> >  #ifndef GPIO_SAMSUNG_S3C24XX_H
> >  #define GPIO_SAMSUNG_S3C24XX_H
> >
> > +#include <mach/map.h>
> > +
>
> Why?  Nothing in this file uses anything from mach/map.h

Good point, I don't recall how this happened, most likely either
edited the wrong file after a build regression, or I had moved some
definition into this file in a patch that I later discarded and this
change got left behind.

> > diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
> > index 7ca3dd4f13c0..da4e7b3aeba6 100644
> > --- a/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
> > +++ b/arch/arm/mach-s3c24xx/include/mach/regs-clock.h
> > @@ -9,6 +9,8 @@
> >  #ifndef __ASM_ARM_REGS_CLOCK
> >  #define __ASM_ARM_REGS_CLOCK
> >
> > +#include <mach/map.h>
> > +
>
> Why?  Nothing in this file uses anything from mach/map.h

I think I added this one for S3C24XX_VA_CLKPWR, which is in
plat/map-s3c.h

> > diff --git a/drivers/spi/spi-s3c24xx-regs.h b/drivers/spi/spi-s3c24xx-regs.h
> > index 37b93ff7c7fe..b76d591eba8c 100644
> > --- a/drivers/spi/spi-s3c24xx-regs.h
> > +++ b/drivers/spi/spi-s3c24xx-regs.h
> > @@ -8,6 +8,8 @@
> >  #ifndef __ASM_ARCH_REGS_SPI_H
> >  #define __ASM_ARCH_REGS_SPI_H
> >
> > +#include <mach/map.h>
> > +
>
> If this is outside of arch/arm, it shouldn't need anything from
> mach/map.h - mach/map.h is not for driver use.

This was the result of a botched rebase: The patch was initially
at the start of the series where the #include was still required
but later moved to the end behind the patch that used to remove
it again.

> > diff --git a/drivers/usb/gadget/udc/s3c2410_udc_regs.h b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
> > index d8d2eeaca088..4df279342cdd 100644
> > --- a/drivers/usb/gadget/udc/s3c2410_udc_regs.h
> > +++ b/drivers/usb/gadget/udc/s3c2410_udc_regs.h
> > @@ -6,6 +6,8 @@
> >  #ifndef __ASM_ARCH_REGS_UDC_H
> >  #define __ASM_ARCH_REGS_UDC_H
> >
> > +#include <mach/map.h>
> > +
>
> If this is outside of arch/arm, it shouldn't need anything from
> mach/map.h - mach/map.h is not for driver use.

Same here.

Thanks for taking a look, I'll fix it all up tomorrow.

          Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung
  2019-10-10 20:29   ` [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
@ 2019-10-10 22:20     ` Guenter Roeck
  2019-10-10 22:20       ` Guenter Roeck
  2019-10-10 22:29       ` Dmitry Torokhov
  2019-10-23 12:37     ` Krzysztof Kozlowski
  2 siblings, 2 replies; 135+ messages in thread
From: Guenter Roeck @ 2019-10-10 22:20 UTC (permalink / raw)
  To: Arnd Bergmann, Kukjin Kim, Krzysztof Kozlowski, Jean Delvare,
	Dmitry Torokhov, Sebastian Reichel
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij, linux-kernel,
	linux-hwmon, linux-input, linux-pm

On 10/10/19 1:29 PM, Arnd Bergmann wrote:
> There are multiple drivers using the private adc interface.
> It seems unlikely that they would ever get converted to iio,
> so make the current state official by making the header file
> global.
> 
> The s3c2410_ts driver needs a couple of register definitions
> as well.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

For hwmon:

Acked-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   arch/arm/mach-s3c64xx/mach-crag6410.c         |  2 +-
>   arch/arm/mach-s3c64xx/mach-mini6410.c         |  2 +-
>   arch/arm/mach-s3c64xx/mach-real6410.c         |  2 +-
>   arch/arm/mach-s3c64xx/mach-smdk6410.c         |  2 +-
>   arch/arm/plat-samsung/adc.c                   |  2 +-
>   arch/arm/plat-samsung/devs.c                  |  2 +-
>   drivers/hwmon/s3c-hwmon.c                     |  2 +-
>   drivers/input/touchscreen/s3c2410_ts.c        | 37 ++++++++++++++++++-
>   drivers/power/supply/s3c_adc_battery.c        |  2 +-
>   .../linux/soc/samsung/s3c-adc.h               |  0
>   10 files changed, 43 insertions(+), 10 deletions(-)
>   rename arch/arm/plat-samsung/include/plat/adc.h => include/linux/soc/samsung/s3c-adc.h (100%)
> 
> diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
> index da5b50981a14..133453562d23 100644
> --- a/arch/arm/mach-s3c64xx/mach-crag6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
> @@ -57,7 +57,7 @@
>   #include <plat/keypad.h>
>   #include <plat/devs.h>
>   #include <plat/cpu.h>
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <linux/platform_data/i2c-s3c2410.h>
>   #include <plat/pm.h>
>   #include <plat/samsung-time.h>
> diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
> index 0dd36ae49e6a..c7140300bd3f 100644
> --- a/arch/arm/mach-s3c64xx/mach-mini6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
> @@ -27,7 +27,7 @@
>   #include <mach/regs-gpio.h>
>   #include <mach/gpio-samsung.h>
>   
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <plat/cpu.h>
>   #include <plat/devs.h>
>   #include <plat/fb.h>
> diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
> index 0ff88b6859c4..f55097fde94c 100644
> --- a/arch/arm/mach-s3c64xx/mach-real6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-real6410.c
> @@ -29,7 +29,7 @@
>   #include <mach/gpio-samsung.h>
>   #include <mach/irqs.h>
>   
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <plat/cpu.h>
>   #include <plat/devs.h>
>   #include <plat/fb.h>
> diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> index 95bdcfe95a53..3042f6cbffd9 100644
> --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> @@ -60,7 +60,7 @@
>   
>   #include <plat/devs.h>
>   #include <plat/cpu.h>
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <linux/platform_data/touchscreen-s3c2410.h>
>   #include <plat/keypad.h>
>   #include <plat/samsung-time.h>
> diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
> index ee3d5c989a76..623a9774cc52 100644
> --- a/arch/arm/plat-samsung/adc.c
> +++ b/arch/arm/plat-samsung/adc.c
> @@ -20,7 +20,7 @@
>   #include <linux/regulator/consumer.h>
>   
>   #include <plat/regs-adc.h>
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   
>   /* This driver is designed to control the usage of the ADC block between
>    * the touchscreen and any other drivers that may need to use it, such as
> diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
> index fd94a35e22f8..ddd90f0bb380 100644
> --- a/arch/arm/plat-samsung/devs.c
> +++ b/arch/arm/plat-samsung/devs.c
> @@ -44,7 +44,7 @@
>   
>   #include <plat/cpu.h>
>   #include <plat/devs.h>
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <linux/platform_data/ata-samsung_cf.h>
>   #include <plat/fb.h>
>   #include <plat/fb-s3c2410.h>
> diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c
> index b490fe3d2ee8..f2703c5460d0 100644
> --- a/drivers/hwmon/s3c-hwmon.c
> +++ b/drivers/hwmon/s3c-hwmon.c
> @@ -20,7 +20,7 @@
>   #include <linux/hwmon.h>
>   #include <linux/hwmon-sysfs.h>
>   
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <linux/platform_data/hwmon-s3c.h>
>   
>   struct s3c_hwmon_attr {
> diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
> index b346e7cafd62..1a5a178ea286 100644
> --- a/drivers/input/touchscreen/s3c2410_ts.c
> +++ b/drivers/input/touchscreen/s3c2410_ts.c
> @@ -21,10 +21,43 @@
>   #include <linux/clk.h>
>   #include <linux/io.h>
>   
> -#include <plat/adc.h>
> -#include <plat/regs-adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <linux/platform_data/touchscreen-s3c2410.h>
>   
> +#define	S3C2410_ADCCON			(0x00)
> +#define	S3C2410_ADCTSC			(0x04)
> +#define	S3C2410_ADCDLY			(0x08)
> +#define	S3C2410_ADCDAT0			(0x0C)
> +#define	S3C2410_ADCDAT1			(0x10)
> +#define	S3C64XX_ADCUPDN			(0x14)
> +#define	S3C2443_ADCMUX			(0x18)
> +#define	S3C64XX_ADCCLRINT		(0x18)
> +#define	S5P_ADCMUX			(0x1C)
> +#define	S3C64XX_ADCCLRINTPNDNUP		(0x20)
> +
> +/* ADCTSC Register Bits */
> +#define S3C2443_ADCTSC_UD_SEN		(1 << 8)
> +#define S3C2410_ADCTSC_YM_SEN		(1<<7)
> +#define S3C2410_ADCTSC_YP_SEN		(1<<6)
> +#define S3C2410_ADCTSC_XM_SEN		(1<<5)
> +#define S3C2410_ADCTSC_XP_SEN		(1<<4)
> +#define S3C2410_ADCTSC_PULL_UP_DISABLE	(1<<3)
> +#define S3C2410_ADCTSC_AUTO_PST		(1<<2)
> +#define S3C2410_ADCTSC_XY_PST(x)	(((x)&0x3)<<0)
> +
> +/* ADCDAT0 Bits */
> +#define S3C2410_ADCDAT0_UPDOWN		(1<<15)
> +#define S3C2410_ADCDAT0_AUTO_PST	(1<<14)
> +#define S3C2410_ADCDAT0_XY_PST		(0x3<<12)
> +#define S3C2410_ADCDAT0_XPDATA_MASK	(0x03FF)
> +
> +/* ADCDAT1 Bits */
> +#define S3C2410_ADCDAT1_UPDOWN		(1<<15)
> +#define S3C2410_ADCDAT1_AUTO_PST	(1<<14)
> +#define S3C2410_ADCDAT1_XY_PST		(0x3<<12)
> +#define S3C2410_ADCDAT1_YPDATA_MASK	(0x03FF)
> +
> +
>   #define TSC_SLEEP  (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0))
>   
>   #define INT_DOWN	(0)
> diff --git a/drivers/power/supply/s3c_adc_battery.c b/drivers/power/supply/s3c_adc_battery.c
> index 3d00b35cafc9..60b7f41ab063 100644
> --- a/drivers/power/supply/s3c_adc_battery.c
> +++ b/drivers/power/supply/s3c_adc_battery.c
> @@ -22,7 +22,7 @@
>   #include <linux/init.h>
>   #include <linux/module.h>
>   
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   
>   #define BAT_POLL_INTERVAL		10000 /* ms */
>   #define JITTER_DELAY			500 /* ms */
> diff --git a/arch/arm/plat-samsung/include/plat/adc.h b/include/linux/soc/samsung/s3c-adc.h
> similarity index 100%
> rename from arch/arm/plat-samsung/include/plat/adc.h
> rename to include/linux/soc/samsung/s3c-adc.h
> 

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung
  2019-10-10 22:20     ` Guenter Roeck
@ 2019-10-10 22:20       ` Guenter Roeck
  2019-10-10 22:29       ` Dmitry Torokhov
  1 sibling, 0 replies; 135+ messages in thread
From: Guenter Roeck @ 2019-10-10 22:20 UTC (permalink / raw)
  To: Arnd Bergmann, Kukjin Kim, Krzysztof Kozlowski, Jean Delvare,
	Dmitry Torokhov, Sebastian Reichel
  Cc: linux-samsung-soc, linux-arm-kernel, linus.walleij, linux-kernel,
	linux-hwmon, linux-input, linux-pm

On 10/10/19 1:29 PM, Arnd Bergmann wrote:
> There are multiple drivers using the private adc interface.
> It seems unlikely that they would ever get converted to iio,
> so make the current state official by making the header file
> global.
> 
> The s3c2410_ts driver needs a couple of register definitions
> as well.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

For hwmon:

Acked-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   arch/arm/mach-s3c64xx/mach-crag6410.c         |  2 +-
>   arch/arm/mach-s3c64xx/mach-mini6410.c         |  2 +-
>   arch/arm/mach-s3c64xx/mach-real6410.c         |  2 +-
>   arch/arm/mach-s3c64xx/mach-smdk6410.c         |  2 +-
>   arch/arm/plat-samsung/adc.c                   |  2 +-
>   arch/arm/plat-samsung/devs.c                  |  2 +-
>   drivers/hwmon/s3c-hwmon.c                     |  2 +-
>   drivers/input/touchscreen/s3c2410_ts.c        | 37 ++++++++++++++++++-
>   drivers/power/supply/s3c_adc_battery.c        |  2 +-
>   .../linux/soc/samsung/s3c-adc.h               |  0
>   10 files changed, 43 insertions(+), 10 deletions(-)
>   rename arch/arm/plat-samsung/include/plat/adc.h => include/linux/soc/samsung/s3c-adc.h (100%)
> 
> diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
> index da5b50981a14..133453562d23 100644
> --- a/arch/arm/mach-s3c64xx/mach-crag6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
> @@ -57,7 +57,7 @@
>   #include <plat/keypad.h>
>   #include <plat/devs.h>
>   #include <plat/cpu.h>
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <linux/platform_data/i2c-s3c2410.h>
>   #include <plat/pm.h>
>   #include <plat/samsung-time.h>
> diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
> index 0dd36ae49e6a..c7140300bd3f 100644
> --- a/arch/arm/mach-s3c64xx/mach-mini6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
> @@ -27,7 +27,7 @@
>   #include <mach/regs-gpio.h>
>   #include <mach/gpio-samsung.h>
>   
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <plat/cpu.h>
>   #include <plat/devs.h>
>   #include <plat/fb.h>
> diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
> index 0ff88b6859c4..f55097fde94c 100644
> --- a/arch/arm/mach-s3c64xx/mach-real6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-real6410.c
> @@ -29,7 +29,7 @@
>   #include <mach/gpio-samsung.h>
>   #include <mach/irqs.h>
>   
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <plat/cpu.h>
>   #include <plat/devs.h>
>   #include <plat/fb.h>
> diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> index 95bdcfe95a53..3042f6cbffd9 100644
> --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> @@ -60,7 +60,7 @@
>   
>   #include <plat/devs.h>
>   #include <plat/cpu.h>
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <linux/platform_data/touchscreen-s3c2410.h>
>   #include <plat/keypad.h>
>   #include <plat/samsung-time.h>
> diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
> index ee3d5c989a76..623a9774cc52 100644
> --- a/arch/arm/plat-samsung/adc.c
> +++ b/arch/arm/plat-samsung/adc.c
> @@ -20,7 +20,7 @@
>   #include <linux/regulator/consumer.h>
>   
>   #include <plat/regs-adc.h>
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   
>   /* This driver is designed to control the usage of the ADC block between
>    * the touchscreen and any other drivers that may need to use it, such as
> diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
> index fd94a35e22f8..ddd90f0bb380 100644
> --- a/arch/arm/plat-samsung/devs.c
> +++ b/arch/arm/plat-samsung/devs.c
> @@ -44,7 +44,7 @@
>   
>   #include <plat/cpu.h>
>   #include <plat/devs.h>
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <linux/platform_data/ata-samsung_cf.h>
>   #include <plat/fb.h>
>   #include <plat/fb-s3c2410.h>
> diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c
> index b490fe3d2ee8..f2703c5460d0 100644
> --- a/drivers/hwmon/s3c-hwmon.c
> +++ b/drivers/hwmon/s3c-hwmon.c
> @@ -20,7 +20,7 @@
>   #include <linux/hwmon.h>
>   #include <linux/hwmon-sysfs.h>
>   
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <linux/platform_data/hwmon-s3c.h>
>   
>   struct s3c_hwmon_attr {
> diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
> index b346e7cafd62..1a5a178ea286 100644
> --- a/drivers/input/touchscreen/s3c2410_ts.c
> +++ b/drivers/input/touchscreen/s3c2410_ts.c
> @@ -21,10 +21,43 @@
>   #include <linux/clk.h>
>   #include <linux/io.h>
>   
> -#include <plat/adc.h>
> -#include <plat/regs-adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   #include <linux/platform_data/touchscreen-s3c2410.h>
>   
> +#define	S3C2410_ADCCON			(0x00)
> +#define	S3C2410_ADCTSC			(0x04)
> +#define	S3C2410_ADCDLY			(0x08)
> +#define	S3C2410_ADCDAT0			(0x0C)
> +#define	S3C2410_ADCDAT1			(0x10)
> +#define	S3C64XX_ADCUPDN			(0x14)
> +#define	S3C2443_ADCMUX			(0x18)
> +#define	S3C64XX_ADCCLRINT		(0x18)
> +#define	S5P_ADCMUX			(0x1C)
> +#define	S3C64XX_ADCCLRINTPNDNUP		(0x20)
> +
> +/* ADCTSC Register Bits */
> +#define S3C2443_ADCTSC_UD_SEN		(1 << 8)
> +#define S3C2410_ADCTSC_YM_SEN		(1<<7)
> +#define S3C2410_ADCTSC_YP_SEN		(1<<6)
> +#define S3C2410_ADCTSC_XM_SEN		(1<<5)
> +#define S3C2410_ADCTSC_XP_SEN		(1<<4)
> +#define S3C2410_ADCTSC_PULL_UP_DISABLE	(1<<3)
> +#define S3C2410_ADCTSC_AUTO_PST		(1<<2)
> +#define S3C2410_ADCTSC_XY_PST(x)	(((x)&0x3)<<0)
> +
> +/* ADCDAT0 Bits */
> +#define S3C2410_ADCDAT0_UPDOWN		(1<<15)
> +#define S3C2410_ADCDAT0_AUTO_PST	(1<<14)
> +#define S3C2410_ADCDAT0_XY_PST		(0x3<<12)
> +#define S3C2410_ADCDAT0_XPDATA_MASK	(0x03FF)
> +
> +/* ADCDAT1 Bits */
> +#define S3C2410_ADCDAT1_UPDOWN		(1<<15)
> +#define S3C2410_ADCDAT1_AUTO_PST	(1<<14)
> +#define S3C2410_ADCDAT1_XY_PST		(0x3<<12)
> +#define S3C2410_ADCDAT1_YPDATA_MASK	(0x03FF)
> +
> +
>   #define TSC_SLEEP  (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0))
>   
>   #define INT_DOWN	(0)
> diff --git a/drivers/power/supply/s3c_adc_battery.c b/drivers/power/supply/s3c_adc_battery.c
> index 3d00b35cafc9..60b7f41ab063 100644
> --- a/drivers/power/supply/s3c_adc_battery.c
> +++ b/drivers/power/supply/s3c_adc_battery.c
> @@ -22,7 +22,7 @@
>   #include <linux/init.h>
>   #include <linux/module.h>
>   
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>   
>   #define BAT_POLL_INTERVAL		10000 /* ms */
>   #define JITTER_DELAY			500 /* ms */
> diff --git a/arch/arm/plat-samsung/include/plat/adc.h b/include/linux/soc/samsung/s3c-adc.h
> similarity index 100%
> rename from arch/arm/plat-samsung/include/plat/adc.h
> rename to include/linux/soc/samsung/s3c-adc.h
> 


^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung
  2019-10-10 22:20     ` Guenter Roeck
  2019-10-10 22:20       ` Guenter Roeck
@ 2019-10-10 22:29       ` Dmitry Torokhov
  2019-10-10 22:29         ` Dmitry Torokhov
  2019-10-10 22:44         ` Sebastian Reichel
  1 sibling, 2 replies; 135+ messages in thread
From: Dmitry Torokhov @ 2019-10-10 22:29 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Arnd Bergmann, Kukjin Kim, Krzysztof Kozlowski, Jean Delvare,
	Sebastian Reichel, linux-samsung-soc, linux-arm-kernel,
	linus.walleij, linux-kernel, linux-hwmon, linux-input, linux-pm

On Thu, Oct 10, 2019 at 03:20:32PM -0700, Guenter Roeck wrote:
> On 10/10/19 1:29 PM, Arnd Bergmann wrote:
> > There are multiple drivers using the private adc interface.
> > It seems unlikely that they would ever get converted to iio,
> > so make the current state official by making the header file
> > global.
> > 
> > The s3c2410_ts driver needs a couple of register definitions
> > as well.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> For hwmon:
> 
> Acked-by: Guenter Roeck <linux@roeck-us.net>

For input:

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


> 
> > ---
> >   arch/arm/mach-s3c64xx/mach-crag6410.c         |  2 +-
> >   arch/arm/mach-s3c64xx/mach-mini6410.c         |  2 +-
> >   arch/arm/mach-s3c64xx/mach-real6410.c         |  2 +-
> >   arch/arm/mach-s3c64xx/mach-smdk6410.c         |  2 +-
> >   arch/arm/plat-samsung/adc.c                   |  2 +-
> >   arch/arm/plat-samsung/devs.c                  |  2 +-
> >   drivers/hwmon/s3c-hwmon.c                     |  2 +-
> >   drivers/input/touchscreen/s3c2410_ts.c        | 37 ++++++++++++++++++-
> >   drivers/power/supply/s3c_adc_battery.c        |  2 +-
> >   .../linux/soc/samsung/s3c-adc.h               |  0
> >   10 files changed, 43 insertions(+), 10 deletions(-)
> >   rename arch/arm/plat-samsung/include/plat/adc.h => include/linux/soc/samsung/s3c-adc.h (100%)
> > 
> > diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
> > index da5b50981a14..133453562d23 100644
> > --- a/arch/arm/mach-s3c64xx/mach-crag6410.c
> > +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
> > @@ -57,7 +57,7 @@
> >   #include <plat/keypad.h>
> >   #include <plat/devs.h>
> >   #include <plat/cpu.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <linux/platform_data/i2c-s3c2410.h>
> >   #include <plat/pm.h>
> >   #include <plat/samsung-time.h>
> > diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
> > index 0dd36ae49e6a..c7140300bd3f 100644
> > --- a/arch/arm/mach-s3c64xx/mach-mini6410.c
> > +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
> > @@ -27,7 +27,7 @@
> >   #include <mach/regs-gpio.h>
> >   #include <mach/gpio-samsung.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <plat/cpu.h>
> >   #include <plat/devs.h>
> >   #include <plat/fb.h>
> > diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
> > index 0ff88b6859c4..f55097fde94c 100644
> > --- a/arch/arm/mach-s3c64xx/mach-real6410.c
> > +++ b/arch/arm/mach-s3c64xx/mach-real6410.c
> > @@ -29,7 +29,7 @@
> >   #include <mach/gpio-samsung.h>
> >   #include <mach/irqs.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <plat/cpu.h>
> >   #include <plat/devs.h>
> >   #include <plat/fb.h>
> > diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> > index 95bdcfe95a53..3042f6cbffd9 100644
> > --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
> > +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> > @@ -60,7 +60,7 @@
> >   #include <plat/devs.h>
> >   #include <plat/cpu.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <linux/platform_data/touchscreen-s3c2410.h>
> >   #include <plat/keypad.h>
> >   #include <plat/samsung-time.h>
> > diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
> > index ee3d5c989a76..623a9774cc52 100644
> > --- a/arch/arm/plat-samsung/adc.c
> > +++ b/arch/arm/plat-samsung/adc.c
> > @@ -20,7 +20,7 @@
> >   #include <linux/regulator/consumer.h>
> >   #include <plat/regs-adc.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   /* This driver is designed to control the usage of the ADC block between
> >    * the touchscreen and any other drivers that may need to use it, such as
> > diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
> > index fd94a35e22f8..ddd90f0bb380 100644
> > --- a/arch/arm/plat-samsung/devs.c
> > +++ b/arch/arm/plat-samsung/devs.c
> > @@ -44,7 +44,7 @@
> >   #include <plat/cpu.h>
> >   #include <plat/devs.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <linux/platform_data/ata-samsung_cf.h>
> >   #include <plat/fb.h>
> >   #include <plat/fb-s3c2410.h>
> > diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c
> > index b490fe3d2ee8..f2703c5460d0 100644
> > --- a/drivers/hwmon/s3c-hwmon.c
> > +++ b/drivers/hwmon/s3c-hwmon.c
> > @@ -20,7 +20,7 @@
> >   #include <linux/hwmon.h>
> >   #include <linux/hwmon-sysfs.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <linux/platform_data/hwmon-s3c.h>
> >   struct s3c_hwmon_attr {
> > diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
> > index b346e7cafd62..1a5a178ea286 100644
> > --- a/drivers/input/touchscreen/s3c2410_ts.c
> > +++ b/drivers/input/touchscreen/s3c2410_ts.c
> > @@ -21,10 +21,43 @@
> >   #include <linux/clk.h>
> >   #include <linux/io.h>
> > -#include <plat/adc.h>
> > -#include <plat/regs-adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <linux/platform_data/touchscreen-s3c2410.h>
> > +#define	S3C2410_ADCCON			(0x00)
> > +#define	S3C2410_ADCTSC			(0x04)
> > +#define	S3C2410_ADCDLY			(0x08)
> > +#define	S3C2410_ADCDAT0			(0x0C)
> > +#define	S3C2410_ADCDAT1			(0x10)
> > +#define	S3C64XX_ADCUPDN			(0x14)
> > +#define	S3C2443_ADCMUX			(0x18)
> > +#define	S3C64XX_ADCCLRINT		(0x18)
> > +#define	S5P_ADCMUX			(0x1C)
> > +#define	S3C64XX_ADCCLRINTPNDNUP		(0x20)
> > +
> > +/* ADCTSC Register Bits */
> > +#define S3C2443_ADCTSC_UD_SEN		(1 << 8)
> > +#define S3C2410_ADCTSC_YM_SEN		(1<<7)
> > +#define S3C2410_ADCTSC_YP_SEN		(1<<6)
> > +#define S3C2410_ADCTSC_XM_SEN		(1<<5)
> > +#define S3C2410_ADCTSC_XP_SEN		(1<<4)
> > +#define S3C2410_ADCTSC_PULL_UP_DISABLE	(1<<3)
> > +#define S3C2410_ADCTSC_AUTO_PST		(1<<2)
> > +#define S3C2410_ADCTSC_XY_PST(x)	(((x)&0x3)<<0)
> > +
> > +/* ADCDAT0 Bits */
> > +#define S3C2410_ADCDAT0_UPDOWN		(1<<15)
> > +#define S3C2410_ADCDAT0_AUTO_PST	(1<<14)
> > +#define S3C2410_ADCDAT0_XY_PST		(0x3<<12)
> > +#define S3C2410_ADCDAT0_XPDATA_MASK	(0x03FF)
> > +
> > +/* ADCDAT1 Bits */
> > +#define S3C2410_ADCDAT1_UPDOWN		(1<<15)
> > +#define S3C2410_ADCDAT1_AUTO_PST	(1<<14)
> > +#define S3C2410_ADCDAT1_XY_PST		(0x3<<12)
> > +#define S3C2410_ADCDAT1_YPDATA_MASK	(0x03FF)
> > +
> > +
> >   #define TSC_SLEEP  (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0))
> >   #define INT_DOWN	(0)
> > diff --git a/drivers/power/supply/s3c_adc_battery.c b/drivers/power/supply/s3c_adc_battery.c
> > index 3d00b35cafc9..60b7f41ab063 100644
> > --- a/drivers/power/supply/s3c_adc_battery.c
> > +++ b/drivers/power/supply/s3c_adc_battery.c
> > @@ -22,7 +22,7 @@
> >   #include <linux/init.h>
> >   #include <linux/module.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #define BAT_POLL_INTERVAL		10000 /* ms */
> >   #define JITTER_DELAY			500 /* ms */
> > diff --git a/arch/arm/plat-samsung/include/plat/adc.h b/include/linux/soc/samsung/s3c-adc.h
> > similarity index 100%
> > rename from arch/arm/plat-samsung/include/plat/adc.h
> > rename to include/linux/soc/samsung/s3c-adc.h
> > 
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung
  2019-10-10 22:29       ` Dmitry Torokhov
@ 2019-10-10 22:29         ` Dmitry Torokhov
  2019-10-10 22:44         ` Sebastian Reichel
  1 sibling, 0 replies; 135+ messages in thread
From: Dmitry Torokhov @ 2019-10-10 22:29 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Arnd Bergmann, Kukjin Kim, Krzysztof Kozlowski, Jean Delvare,
	Sebastian Reichel, linux-samsung-soc, linux-arm-kernel,
	linus.walleij, linux-kernel, linux-hwmon, linux-input, linux-pm

On Thu, Oct 10, 2019 at 03:20:32PM -0700, Guenter Roeck wrote:
> On 10/10/19 1:29 PM, Arnd Bergmann wrote:
> > There are multiple drivers using the private adc interface.
> > It seems unlikely that they would ever get converted to iio,
> > so make the current state official by making the header file
> > global.
> > 
> > The s3c2410_ts driver needs a couple of register definitions
> > as well.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> For hwmon:
> 
> Acked-by: Guenter Roeck <linux@roeck-us.net>

For input:

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


> 
> > ---
> >   arch/arm/mach-s3c64xx/mach-crag6410.c         |  2 +-
> >   arch/arm/mach-s3c64xx/mach-mini6410.c         |  2 +-
> >   arch/arm/mach-s3c64xx/mach-real6410.c         |  2 +-
> >   arch/arm/mach-s3c64xx/mach-smdk6410.c         |  2 +-
> >   arch/arm/plat-samsung/adc.c                   |  2 +-
> >   arch/arm/plat-samsung/devs.c                  |  2 +-
> >   drivers/hwmon/s3c-hwmon.c                     |  2 +-
> >   drivers/input/touchscreen/s3c2410_ts.c        | 37 ++++++++++++++++++-
> >   drivers/power/supply/s3c_adc_battery.c        |  2 +-
> >   .../linux/soc/samsung/s3c-adc.h               |  0
> >   10 files changed, 43 insertions(+), 10 deletions(-)
> >   rename arch/arm/plat-samsung/include/plat/adc.h => include/linux/soc/samsung/s3c-adc.h (100%)
> > 
> > diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
> > index da5b50981a14..133453562d23 100644
> > --- a/arch/arm/mach-s3c64xx/mach-crag6410.c
> > +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
> > @@ -57,7 +57,7 @@
> >   #include <plat/keypad.h>
> >   #include <plat/devs.h>
> >   #include <plat/cpu.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <linux/platform_data/i2c-s3c2410.h>
> >   #include <plat/pm.h>
> >   #include <plat/samsung-time.h>
> > diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
> > index 0dd36ae49e6a..c7140300bd3f 100644
> > --- a/arch/arm/mach-s3c64xx/mach-mini6410.c
> > +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
> > @@ -27,7 +27,7 @@
> >   #include <mach/regs-gpio.h>
> >   #include <mach/gpio-samsung.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <plat/cpu.h>
> >   #include <plat/devs.h>
> >   #include <plat/fb.h>
> > diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
> > index 0ff88b6859c4..f55097fde94c 100644
> > --- a/arch/arm/mach-s3c64xx/mach-real6410.c
> > +++ b/arch/arm/mach-s3c64xx/mach-real6410.c
> > @@ -29,7 +29,7 @@
> >   #include <mach/gpio-samsung.h>
> >   #include <mach/irqs.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <plat/cpu.h>
> >   #include <plat/devs.h>
> >   #include <plat/fb.h>
> > diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> > index 95bdcfe95a53..3042f6cbffd9 100644
> > --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
> > +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> > @@ -60,7 +60,7 @@
> >   #include <plat/devs.h>
> >   #include <plat/cpu.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <linux/platform_data/touchscreen-s3c2410.h>
> >   #include <plat/keypad.h>
> >   #include <plat/samsung-time.h>
> > diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
> > index ee3d5c989a76..623a9774cc52 100644
> > --- a/arch/arm/plat-samsung/adc.c
> > +++ b/arch/arm/plat-samsung/adc.c
> > @@ -20,7 +20,7 @@
> >   #include <linux/regulator/consumer.h>
> >   #include <plat/regs-adc.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   /* This driver is designed to control the usage of the ADC block between
> >    * the touchscreen and any other drivers that may need to use it, such as
> > diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
> > index fd94a35e22f8..ddd90f0bb380 100644
> > --- a/arch/arm/plat-samsung/devs.c
> > +++ b/arch/arm/plat-samsung/devs.c
> > @@ -44,7 +44,7 @@
> >   #include <plat/cpu.h>
> >   #include <plat/devs.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <linux/platform_data/ata-samsung_cf.h>
> >   #include <plat/fb.h>
> >   #include <plat/fb-s3c2410.h>
> > diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c
> > index b490fe3d2ee8..f2703c5460d0 100644
> > --- a/drivers/hwmon/s3c-hwmon.c
> > +++ b/drivers/hwmon/s3c-hwmon.c
> > @@ -20,7 +20,7 @@
> >   #include <linux/hwmon.h>
> >   #include <linux/hwmon-sysfs.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <linux/platform_data/hwmon-s3c.h>
> >   struct s3c_hwmon_attr {
> > diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
> > index b346e7cafd62..1a5a178ea286 100644
> > --- a/drivers/input/touchscreen/s3c2410_ts.c
> > +++ b/drivers/input/touchscreen/s3c2410_ts.c
> > @@ -21,10 +21,43 @@
> >   #include <linux/clk.h>
> >   #include <linux/io.h>
> > -#include <plat/adc.h>
> > -#include <plat/regs-adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #include <linux/platform_data/touchscreen-s3c2410.h>
> > +#define	S3C2410_ADCCON			(0x00)
> > +#define	S3C2410_ADCTSC			(0x04)
> > +#define	S3C2410_ADCDLY			(0x08)
> > +#define	S3C2410_ADCDAT0			(0x0C)
> > +#define	S3C2410_ADCDAT1			(0x10)
> > +#define	S3C64XX_ADCUPDN			(0x14)
> > +#define	S3C2443_ADCMUX			(0x18)
> > +#define	S3C64XX_ADCCLRINT		(0x18)
> > +#define	S5P_ADCMUX			(0x1C)
> > +#define	S3C64XX_ADCCLRINTPNDNUP		(0x20)
> > +
> > +/* ADCTSC Register Bits */
> > +#define S3C2443_ADCTSC_UD_SEN		(1 << 8)
> > +#define S3C2410_ADCTSC_YM_SEN		(1<<7)
> > +#define S3C2410_ADCTSC_YP_SEN		(1<<6)
> > +#define S3C2410_ADCTSC_XM_SEN		(1<<5)
> > +#define S3C2410_ADCTSC_XP_SEN		(1<<4)
> > +#define S3C2410_ADCTSC_PULL_UP_DISABLE	(1<<3)
> > +#define S3C2410_ADCTSC_AUTO_PST		(1<<2)
> > +#define S3C2410_ADCTSC_XY_PST(x)	(((x)&0x3)<<0)
> > +
> > +/* ADCDAT0 Bits */
> > +#define S3C2410_ADCDAT0_UPDOWN		(1<<15)
> > +#define S3C2410_ADCDAT0_AUTO_PST	(1<<14)
> > +#define S3C2410_ADCDAT0_XY_PST		(0x3<<12)
> > +#define S3C2410_ADCDAT0_XPDATA_MASK	(0x03FF)
> > +
> > +/* ADCDAT1 Bits */
> > +#define S3C2410_ADCDAT1_UPDOWN		(1<<15)
> > +#define S3C2410_ADCDAT1_AUTO_PST	(1<<14)
> > +#define S3C2410_ADCDAT1_XY_PST		(0x3<<12)
> > +#define S3C2410_ADCDAT1_YPDATA_MASK	(0x03FF)
> > +
> > +
> >   #define TSC_SLEEP  (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0))
> >   #define INT_DOWN	(0)
> > diff --git a/drivers/power/supply/s3c_adc_battery.c b/drivers/power/supply/s3c_adc_battery.c
> > index 3d00b35cafc9..60b7f41ab063 100644
> > --- a/drivers/power/supply/s3c_adc_battery.c
> > +++ b/drivers/power/supply/s3c_adc_battery.c
> > @@ -22,7 +22,7 @@
> >   #include <linux/init.h>
> >   #include <linux/module.h>
> > -#include <plat/adc.h>
> > +#include <linux/soc/samsung/s3c-adc.h>
> >   #define BAT_POLL_INTERVAL		10000 /* ms */
> >   #define JITTER_DELAY			500 /* ms */
> > diff --git a/arch/arm/plat-samsung/include/plat/adc.h b/include/linux/soc/samsung/s3c-adc.h
> > similarity index 100%
> > rename from arch/arm/plat-samsung/include/plat/adc.h
> > rename to include/linux/soc/samsung/s3c-adc.h
> > 
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung
  2019-10-10 22:29       ` Dmitry Torokhov
  2019-10-10 22:29         ` Dmitry Torokhov
@ 2019-10-10 22:44         ` Sebastian Reichel
  2019-10-10 22:44           ` Sebastian Reichel
  1 sibling, 1 reply; 135+ messages in thread
From: Sebastian Reichel @ 2019-10-10 22:44 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-arm-kernel, linux-hwmon, linux-samsung-soc, Arnd Bergmann,
	linux-pm, linus.walleij, linux-kernel, Krzysztof Kozlowski,
	Jean Delvare, Kukjin Kim, linux-input, Guenter Roeck


[-- Attachment #1.1: Type: text/plain, Size: 8055 bytes --]

Hi,

On Thu, Oct 10, 2019 at 03:29:55PM -0700, Dmitry Torokhov wrote:
> On Thu, Oct 10, 2019 at 03:20:32PM -0700, Guenter Roeck wrote:
> > On 10/10/19 1:29 PM, Arnd Bergmann wrote:
> > > There are multiple drivers using the private adc interface.
> > > It seems unlikely that they would ever get converted to iio,
> > > so make the current state official by making the header file
> > > global.
> > > 
> > > The s3c2410_ts driver needs a couple of register definitions
> > > as well.
> > > 
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > 
> > For hwmon:
> > 
> > Acked-by: Guenter Roeck <linux@roeck-us.net>
> 
> For input:
> 
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

For power-supply:

Acked-by: Sebastian Reichel <sre@kernel.org>

-- Sebastian

> > > ---
> > >   arch/arm/mach-s3c64xx/mach-crag6410.c         |  2 +-
> > >   arch/arm/mach-s3c64xx/mach-mini6410.c         |  2 +-
> > >   arch/arm/mach-s3c64xx/mach-real6410.c         |  2 +-
> > >   arch/arm/mach-s3c64xx/mach-smdk6410.c         |  2 +-
> > >   arch/arm/plat-samsung/adc.c                   |  2 +-
> > >   arch/arm/plat-samsung/devs.c                  |  2 +-
> > >   drivers/hwmon/s3c-hwmon.c                     |  2 +-
> > >   drivers/input/touchscreen/s3c2410_ts.c        | 37 ++++++++++++++++++-
> > >   drivers/power/supply/s3c_adc_battery.c        |  2 +-
> > >   .../linux/soc/samsung/s3c-adc.h               |  0
> > >   10 files changed, 43 insertions(+), 10 deletions(-)
> > >   rename arch/arm/plat-samsung/include/plat/adc.h => include/linux/soc/samsung/s3c-adc.h (100%)
> > > 
> > > diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
> > > index da5b50981a14..133453562d23 100644
> > > --- a/arch/arm/mach-s3c64xx/mach-crag6410.c
> > > +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
> > > @@ -57,7 +57,7 @@
> > >   #include <plat/keypad.h>
> > >   #include <plat/devs.h>
> > >   #include <plat/cpu.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <linux/platform_data/i2c-s3c2410.h>
> > >   #include <plat/pm.h>
> > >   #include <plat/samsung-time.h>
> > > diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
> > > index 0dd36ae49e6a..c7140300bd3f 100644
> > > --- a/arch/arm/mach-s3c64xx/mach-mini6410.c
> > > +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
> > > @@ -27,7 +27,7 @@
> > >   #include <mach/regs-gpio.h>
> > >   #include <mach/gpio-samsung.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <plat/cpu.h>
> > >   #include <plat/devs.h>
> > >   #include <plat/fb.h>
> > > diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
> > > index 0ff88b6859c4..f55097fde94c 100644
> > > --- a/arch/arm/mach-s3c64xx/mach-real6410.c
> > > +++ b/arch/arm/mach-s3c64xx/mach-real6410.c
> > > @@ -29,7 +29,7 @@
> > >   #include <mach/gpio-samsung.h>
> > >   #include <mach/irqs.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <plat/cpu.h>
> > >   #include <plat/devs.h>
> > >   #include <plat/fb.h>
> > > diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> > > index 95bdcfe95a53..3042f6cbffd9 100644
> > > --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
> > > +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> > > @@ -60,7 +60,7 @@
> > >   #include <plat/devs.h>
> > >   #include <plat/cpu.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <linux/platform_data/touchscreen-s3c2410.h>
> > >   #include <plat/keypad.h>
> > >   #include <plat/samsung-time.h>
> > > diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
> > > index ee3d5c989a76..623a9774cc52 100644
> > > --- a/arch/arm/plat-samsung/adc.c
> > > +++ b/arch/arm/plat-samsung/adc.c
> > > @@ -20,7 +20,7 @@
> > >   #include <linux/regulator/consumer.h>
> > >   #include <plat/regs-adc.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   /* This driver is designed to control the usage of the ADC block between
> > >    * the touchscreen and any other drivers that may need to use it, such as
> > > diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
> > > index fd94a35e22f8..ddd90f0bb380 100644
> > > --- a/arch/arm/plat-samsung/devs.c
> > > +++ b/arch/arm/plat-samsung/devs.c
> > > @@ -44,7 +44,7 @@
> > >   #include <plat/cpu.h>
> > >   #include <plat/devs.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <linux/platform_data/ata-samsung_cf.h>
> > >   #include <plat/fb.h>
> > >   #include <plat/fb-s3c2410.h>
> > > diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c
> > > index b490fe3d2ee8..f2703c5460d0 100644
> > > --- a/drivers/hwmon/s3c-hwmon.c
> > > +++ b/drivers/hwmon/s3c-hwmon.c
> > > @@ -20,7 +20,7 @@
> > >   #include <linux/hwmon.h>
> > >   #include <linux/hwmon-sysfs.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <linux/platform_data/hwmon-s3c.h>
> > >   struct s3c_hwmon_attr {
> > > diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
> > > index b346e7cafd62..1a5a178ea286 100644
> > > --- a/drivers/input/touchscreen/s3c2410_ts.c
> > > +++ b/drivers/input/touchscreen/s3c2410_ts.c
> > > @@ -21,10 +21,43 @@
> > >   #include <linux/clk.h>
> > >   #include <linux/io.h>
> > > -#include <plat/adc.h>
> > > -#include <plat/regs-adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <linux/platform_data/touchscreen-s3c2410.h>
> > > +#define	S3C2410_ADCCON			(0x00)
> > > +#define	S3C2410_ADCTSC			(0x04)
> > > +#define	S3C2410_ADCDLY			(0x08)
> > > +#define	S3C2410_ADCDAT0			(0x0C)
> > > +#define	S3C2410_ADCDAT1			(0x10)
> > > +#define	S3C64XX_ADCUPDN			(0x14)
> > > +#define	S3C2443_ADCMUX			(0x18)
> > > +#define	S3C64XX_ADCCLRINT		(0x18)
> > > +#define	S5P_ADCMUX			(0x1C)
> > > +#define	S3C64XX_ADCCLRINTPNDNUP		(0x20)
> > > +
> > > +/* ADCTSC Register Bits */
> > > +#define S3C2443_ADCTSC_UD_SEN		(1 << 8)
> > > +#define S3C2410_ADCTSC_YM_SEN		(1<<7)
> > > +#define S3C2410_ADCTSC_YP_SEN		(1<<6)
> > > +#define S3C2410_ADCTSC_XM_SEN		(1<<5)
> > > +#define S3C2410_ADCTSC_XP_SEN		(1<<4)
> > > +#define S3C2410_ADCTSC_PULL_UP_DISABLE	(1<<3)
> > > +#define S3C2410_ADCTSC_AUTO_PST		(1<<2)
> > > +#define S3C2410_ADCTSC_XY_PST(x)	(((x)&0x3)<<0)
> > > +
> > > +/* ADCDAT0 Bits */
> > > +#define S3C2410_ADCDAT0_UPDOWN		(1<<15)
> > > +#define S3C2410_ADCDAT0_AUTO_PST	(1<<14)
> > > +#define S3C2410_ADCDAT0_XY_PST		(0x3<<12)
> > > +#define S3C2410_ADCDAT0_XPDATA_MASK	(0x03FF)
> > > +
> > > +/* ADCDAT1 Bits */
> > > +#define S3C2410_ADCDAT1_UPDOWN		(1<<15)
> > > +#define S3C2410_ADCDAT1_AUTO_PST	(1<<14)
> > > +#define S3C2410_ADCDAT1_XY_PST		(0x3<<12)
> > > +#define S3C2410_ADCDAT1_YPDATA_MASK	(0x03FF)
> > > +
> > > +
> > >   #define TSC_SLEEP  (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0))
> > >   #define INT_DOWN	(0)
> > > diff --git a/drivers/power/supply/s3c_adc_battery.c b/drivers/power/supply/s3c_adc_battery.c
> > > index 3d00b35cafc9..60b7f41ab063 100644
> > > --- a/drivers/power/supply/s3c_adc_battery.c
> > > +++ b/drivers/power/supply/s3c_adc_battery.c
> > > @@ -22,7 +22,7 @@
> > >   #include <linux/init.h>
> > >   #include <linux/module.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #define BAT_POLL_INTERVAL		10000 /* ms */
> > >   #define JITTER_DELAY			500 /* ms */
> > > diff --git a/arch/arm/plat-samsung/include/plat/adc.h b/include/linux/soc/samsung/s3c-adc.h
> > > similarity index 100%
> > > rename from arch/arm/plat-samsung/include/plat/adc.h
> > > rename to include/linux/soc/samsung/s3c-adc.h
> > > 
> > 
> 
> -- 
> Dmitry

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung
  2019-10-10 22:44         ` Sebastian Reichel
@ 2019-10-10 22:44           ` Sebastian Reichel
  0 siblings, 0 replies; 135+ messages in thread
From: Sebastian Reichel @ 2019-10-10 22:44 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Guenter Roeck, Arnd Bergmann, Kukjin Kim, Krzysztof Kozlowski,
	Jean Delvare, linux-samsung-soc, linux-arm-kernel, linus.walleij,
	linux-kernel, linux-hwmon, linux-input, linux-pm

[-- Attachment #1: Type: text/plain, Size: 8055 bytes --]

Hi,

On Thu, Oct 10, 2019 at 03:29:55PM -0700, Dmitry Torokhov wrote:
> On Thu, Oct 10, 2019 at 03:20:32PM -0700, Guenter Roeck wrote:
> > On 10/10/19 1:29 PM, Arnd Bergmann wrote:
> > > There are multiple drivers using the private adc interface.
> > > It seems unlikely that they would ever get converted to iio,
> > > so make the current state official by making the header file
> > > global.
> > > 
> > > The s3c2410_ts driver needs a couple of register definitions
> > > as well.
> > > 
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > 
> > For hwmon:
> > 
> > Acked-by: Guenter Roeck <linux@roeck-us.net>
> 
> For input:
> 
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

For power-supply:

Acked-by: Sebastian Reichel <sre@kernel.org>

-- Sebastian

> > > ---
> > >   arch/arm/mach-s3c64xx/mach-crag6410.c         |  2 +-
> > >   arch/arm/mach-s3c64xx/mach-mini6410.c         |  2 +-
> > >   arch/arm/mach-s3c64xx/mach-real6410.c         |  2 +-
> > >   arch/arm/mach-s3c64xx/mach-smdk6410.c         |  2 +-
> > >   arch/arm/plat-samsung/adc.c                   |  2 +-
> > >   arch/arm/plat-samsung/devs.c                  |  2 +-
> > >   drivers/hwmon/s3c-hwmon.c                     |  2 +-
> > >   drivers/input/touchscreen/s3c2410_ts.c        | 37 ++++++++++++++++++-
> > >   drivers/power/supply/s3c_adc_battery.c        |  2 +-
> > >   .../linux/soc/samsung/s3c-adc.h               |  0
> > >   10 files changed, 43 insertions(+), 10 deletions(-)
> > >   rename arch/arm/plat-samsung/include/plat/adc.h => include/linux/soc/samsung/s3c-adc.h (100%)
> > > 
> > > diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
> > > index da5b50981a14..133453562d23 100644
> > > --- a/arch/arm/mach-s3c64xx/mach-crag6410.c
> > > +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
> > > @@ -57,7 +57,7 @@
> > >   #include <plat/keypad.h>
> > >   #include <plat/devs.h>
> > >   #include <plat/cpu.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <linux/platform_data/i2c-s3c2410.h>
> > >   #include <plat/pm.h>
> > >   #include <plat/samsung-time.h>
> > > diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
> > > index 0dd36ae49e6a..c7140300bd3f 100644
> > > --- a/arch/arm/mach-s3c64xx/mach-mini6410.c
> > > +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
> > > @@ -27,7 +27,7 @@
> > >   #include <mach/regs-gpio.h>
> > >   #include <mach/gpio-samsung.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <plat/cpu.h>
> > >   #include <plat/devs.h>
> > >   #include <plat/fb.h>
> > > diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
> > > index 0ff88b6859c4..f55097fde94c 100644
> > > --- a/arch/arm/mach-s3c64xx/mach-real6410.c
> > > +++ b/arch/arm/mach-s3c64xx/mach-real6410.c
> > > @@ -29,7 +29,7 @@
> > >   #include <mach/gpio-samsung.h>
> > >   #include <mach/irqs.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <plat/cpu.h>
> > >   #include <plat/devs.h>
> > >   #include <plat/fb.h>
> > > diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> > > index 95bdcfe95a53..3042f6cbffd9 100644
> > > --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
> > > +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> > > @@ -60,7 +60,7 @@
> > >   #include <plat/devs.h>
> > >   #include <plat/cpu.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <linux/platform_data/touchscreen-s3c2410.h>
> > >   #include <plat/keypad.h>
> > >   #include <plat/samsung-time.h>
> > > diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
> > > index ee3d5c989a76..623a9774cc52 100644
> > > --- a/arch/arm/plat-samsung/adc.c
> > > +++ b/arch/arm/plat-samsung/adc.c
> > > @@ -20,7 +20,7 @@
> > >   #include <linux/regulator/consumer.h>
> > >   #include <plat/regs-adc.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   /* This driver is designed to control the usage of the ADC block between
> > >    * the touchscreen and any other drivers that may need to use it, such as
> > > diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
> > > index fd94a35e22f8..ddd90f0bb380 100644
> > > --- a/arch/arm/plat-samsung/devs.c
> > > +++ b/arch/arm/plat-samsung/devs.c
> > > @@ -44,7 +44,7 @@
> > >   #include <plat/cpu.h>
> > >   #include <plat/devs.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <linux/platform_data/ata-samsung_cf.h>
> > >   #include <plat/fb.h>
> > >   #include <plat/fb-s3c2410.h>
> > > diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c
> > > index b490fe3d2ee8..f2703c5460d0 100644
> > > --- a/drivers/hwmon/s3c-hwmon.c
> > > +++ b/drivers/hwmon/s3c-hwmon.c
> > > @@ -20,7 +20,7 @@
> > >   #include <linux/hwmon.h>
> > >   #include <linux/hwmon-sysfs.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <linux/platform_data/hwmon-s3c.h>
> > >   struct s3c_hwmon_attr {
> > > diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
> > > index b346e7cafd62..1a5a178ea286 100644
> > > --- a/drivers/input/touchscreen/s3c2410_ts.c
> > > +++ b/drivers/input/touchscreen/s3c2410_ts.c
> > > @@ -21,10 +21,43 @@
> > >   #include <linux/clk.h>
> > >   #include <linux/io.h>
> > > -#include <plat/adc.h>
> > > -#include <plat/regs-adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #include <linux/platform_data/touchscreen-s3c2410.h>
> > > +#define	S3C2410_ADCCON			(0x00)
> > > +#define	S3C2410_ADCTSC			(0x04)
> > > +#define	S3C2410_ADCDLY			(0x08)
> > > +#define	S3C2410_ADCDAT0			(0x0C)
> > > +#define	S3C2410_ADCDAT1			(0x10)
> > > +#define	S3C64XX_ADCUPDN			(0x14)
> > > +#define	S3C2443_ADCMUX			(0x18)
> > > +#define	S3C64XX_ADCCLRINT		(0x18)
> > > +#define	S5P_ADCMUX			(0x1C)
> > > +#define	S3C64XX_ADCCLRINTPNDNUP		(0x20)
> > > +
> > > +/* ADCTSC Register Bits */
> > > +#define S3C2443_ADCTSC_UD_SEN		(1 << 8)
> > > +#define S3C2410_ADCTSC_YM_SEN		(1<<7)
> > > +#define S3C2410_ADCTSC_YP_SEN		(1<<6)
> > > +#define S3C2410_ADCTSC_XM_SEN		(1<<5)
> > > +#define S3C2410_ADCTSC_XP_SEN		(1<<4)
> > > +#define S3C2410_ADCTSC_PULL_UP_DISABLE	(1<<3)
> > > +#define S3C2410_ADCTSC_AUTO_PST		(1<<2)
> > > +#define S3C2410_ADCTSC_XY_PST(x)	(((x)&0x3)<<0)
> > > +
> > > +/* ADCDAT0 Bits */
> > > +#define S3C2410_ADCDAT0_UPDOWN		(1<<15)
> > > +#define S3C2410_ADCDAT0_AUTO_PST	(1<<14)
> > > +#define S3C2410_ADCDAT0_XY_PST		(0x3<<12)
> > > +#define S3C2410_ADCDAT0_XPDATA_MASK	(0x03FF)
> > > +
> > > +/* ADCDAT1 Bits */
> > > +#define S3C2410_ADCDAT1_UPDOWN		(1<<15)
> > > +#define S3C2410_ADCDAT1_AUTO_PST	(1<<14)
> > > +#define S3C2410_ADCDAT1_XY_PST		(0x3<<12)
> > > +#define S3C2410_ADCDAT1_YPDATA_MASK	(0x03FF)
> > > +
> > > +
> > >   #define TSC_SLEEP  (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0))
> > >   #define INT_DOWN	(0)
> > > diff --git a/drivers/power/supply/s3c_adc_battery.c b/drivers/power/supply/s3c_adc_battery.c
> > > index 3d00b35cafc9..60b7f41ab063 100644
> > > --- a/drivers/power/supply/s3c_adc_battery.c
> > > +++ b/drivers/power/supply/s3c_adc_battery.c
> > > @@ -22,7 +22,7 @@
> > >   #include <linux/init.h>
> > >   #include <linux/module.h>
> > > -#include <plat/adc.h>
> > > +#include <linux/soc/samsung/s3c-adc.h>
> > >   #define BAT_POLL_INTERVAL		10000 /* ms */
> > >   #define JITTER_DELAY			500 /* ms */
> > > diff --git a/arch/arm/plat-samsung/include/plat/adc.h b/include/linux/soc/samsung/s3c-adc.h
> > > similarity index 100%
> > > rename from arch/arm/plat-samsung/include/plat/adc.h
> > > rename to include/linux/soc/samsung/s3c-adc.h
> > > 
> > 
> 
> -- 
> Dmitry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 11/36] ARM: s5pv210: split from plat-samsung
  2019-10-10 20:29   ` [PATCH 11/36] ARM: s5pv210: split from plat-samsung Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
@ 2019-10-11  5:51     ` Uwe Kleine-König
  2019-10-11  5:51       ` Uwe Kleine-König
  2019-10-22 14:01       ` Arnd Bergmann
  2019-10-15 14:13     ` Ulf Hansson
                       ` (2 subsequent siblings)
  4 siblings, 2 replies; 135+ messages in thread
From: Uwe Kleine-König @ 2019-10-11  5:51 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Ulf Hansson, Liam Girdwood, linus.walleij, alsa-devel,
	linux-kernel, Thierry Reding, Sylwester Nawrocki,
	Mauro Carvalho Chehab, linux-samsung-soc, Krzysztof Kozlowski,
	Kukjin Kim, Clément Péron, linux-serial, Jiri Slaby,
	linux-pwm, Bartlomiej Zolnierkiewicz, Sascha Hauer, Mark Brown,
	Jaroslav Kysela, linux-arm-kernel, Sangbeom Kim,
	Greg Kroah-Hartman, linux-mmc

On Thu, Oct 10, 2019 at 10:29:55PM +0200, Arnd Bergmann wrote:
> These can be build completely independently, so split
> the two Kconfig symbols.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I'd mention the two symbols' names you're working on in the commit log.
I guess it's about PLAT_SAMSUNG and ARCH_S5PV210. And I wouldn't call it
"split" which IMHO suggests there was only one symbol before.

Maybe:

	Don't imply PLAT_SAMSUNG if ARCH_S5PV210 is enabled

would be a better subject line?

> ---
>  arch/arm/Kconfig.debug        | 6 +++---
>  arch/arm/Makefile             | 1 -
>  arch/arm/plat-samsung/Kconfig | 2 +-
>  drivers/mmc/host/Kconfig      | 2 +-
>  drivers/pwm/Kconfig           | 2 +-
>  drivers/spi/Kconfig           | 2 +-
>  drivers/tty/serial/Kconfig    | 2 +-
>  sound/soc/samsung/Kconfig     | 2 +-
>  8 files changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 9c4f2d6deb06..4c4e97ae4fcb 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -998,7 +998,7 @@ choice
>  		  via SCIFA4 on Renesas SH-Mobile AG5 (SH73A0).
>  
>  	config DEBUG_S3C_UART0
> -		depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>  		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1010,7 +1010,7 @@ choice
>  		  by the boot-loader before use.
>  
>  	config DEBUG_S3C_UART1
> -		depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>  		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1022,7 +1022,7 @@ choice
>  		  by the boot-loader before use.
>  
>  	config DEBUG_S3C_UART2
> -		depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>  		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index f492d7c338fe..a1bc15cda751 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -235,7 +235,6 @@ machine-$(CONFIG_PLAT_SPEAR)		+= spear
>  # by CONFIG_* macro name.
>  plat-$(CONFIG_ARCH_OMAP)	+= omap
>  plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
> -plat-$(CONFIG_ARCH_S5PV210)	+= samsung

Would it make more sense to make this

	plat-$(PLAT_SAMSUNG) += samsung

(in a separate patch)? Hmm, it seems there is no plat-y for
PLAT_S3C24XX=y builds. Is this intended? If yes, the directory name
containing "samsung" suggests something that seems untrue.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 11/36] ARM: s5pv210: split from plat-samsung
  2019-10-11  5:51     ` Uwe Kleine-König
@ 2019-10-11  5:51       ` Uwe Kleine-König
  2019-10-22 14:01       ` Arnd Bergmann
  1 sibling, 0 replies; 135+ messages in thread
From: Uwe Kleine-König @ 2019-10-11  5:51 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, Ulf Hansson, Thierry Reding,
	Mark Brown, Greg Kroah-Hartman, Jiri Slaby, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood, linux-samsung-soc,
	linux-arm-kernel, linus.walleij, Jaroslav Kysela, Takashi Iwai,
	Olof Johansson, Sascha Hauer, Clément Péron,
	Mauro Carvalho Chehab, Bartlomiej Zolnierkiewicz, Faiz Abbas,
	linux-kernel, linux-mmc, linux-pwm, linux-spi, linux-serial,
	alsa-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 2885 bytes --]

On Thu, Oct 10, 2019 at 10:29:55PM +0200, Arnd Bergmann wrote:
> These can be build completely independently, so split
> the two Kconfig symbols.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I'd mention the two symbols' names you're working on in the commit log.
I guess it's about PLAT_SAMSUNG and ARCH_S5PV210. And I wouldn't call it
"split" which IMHO suggests there was only one symbol before.

Maybe:

	Don't imply PLAT_SAMSUNG if ARCH_S5PV210 is enabled

would be a better subject line?

> ---
>  arch/arm/Kconfig.debug        | 6 +++---
>  arch/arm/Makefile             | 1 -
>  arch/arm/plat-samsung/Kconfig | 2 +-
>  drivers/mmc/host/Kconfig      | 2 +-
>  drivers/pwm/Kconfig           | 2 +-
>  drivers/spi/Kconfig           | 2 +-
>  drivers/tty/serial/Kconfig    | 2 +-
>  sound/soc/samsung/Kconfig     | 2 +-
>  8 files changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 9c4f2d6deb06..4c4e97ae4fcb 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -998,7 +998,7 @@ choice
>  		  via SCIFA4 on Renesas SH-Mobile AG5 (SH73A0).
>  
>  	config DEBUG_S3C_UART0
> -		depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>  		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1010,7 +1010,7 @@ choice
>  		  by the boot-loader before use.
>  
>  	config DEBUG_S3C_UART1
> -		depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>  		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1022,7 +1022,7 @@ choice
>  		  by the boot-loader before use.
>  
>  	config DEBUG_S3C_UART2
> -		depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>  		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index f492d7c338fe..a1bc15cda751 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -235,7 +235,6 @@ machine-$(CONFIG_PLAT_SPEAR)		+= spear
>  # by CONFIG_* macro name.
>  plat-$(CONFIG_ARCH_OMAP)	+= omap
>  plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
> -plat-$(CONFIG_ARCH_S5PV210)	+= samsung

Would it make more sense to make this

	plat-$(PLAT_SAMSUNG) += samsung

(in a separate patch)? Hmm, it seems there is no plat-y for
PLAT_S3C24XX=y builds. Is this intended? If yes, the directory name
containing "samsung" suggests something that seems untrue.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 20/36] ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS
  2019-10-10 20:30   ` [PATCH 20/36] ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
@ 2019-10-11 10:50     ` Mark Brown
  2019-10-11 10:50       ` Mark Brown
  1 sibling, 1 reply; 135+ messages in thread
From: Mark Brown @ 2019-10-11 10:50 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood, linux-samsung-soc,
	linux-arm-kernel, linus.walleij, alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

On Thu, Oct 10, 2019 at 10:30:04PM +0200, Arnd Bergmann wrote:
> The constant requires indirectly including a machine header file,
> but it's not actually used any more since commit 87b132bc0315 ("ASoC:
> samsung: s3c24{xx,12}-i2s: port to use generic dmaengine API"), so
> remove it completely.

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 20/36] ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS
  2019-10-11 10:50     ` Mark Brown
@ 2019-10-11 10:50       ` Mark Brown
  0 siblings, 0 replies; 135+ messages in thread
From: Mark Brown @ 2019-10-11 10:50 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood, linux-samsung-soc,
	linux-arm-kernel, linus.walleij, alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

On Thu, Oct 10, 2019 at 10:30:04PM +0200, Arnd Bergmann wrote:
> The constant requires indirectly including a machine header file,
> but it's not actually used any more since commit 87b132bc0315 ("ASoC:
> samsung: s3c24{xx,12}-i2s: port to use generic dmaengine API"), so
> remove it completely.

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 08/36] ARM: exynos: stop selecting PLAT_SAMSUNG
  2019-10-10 20:29   ` [PATCH 08/36] ARM: exynos: stop selecting PLAT_SAMSUNG Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
@ 2019-10-15 14:12     ` Ulf Hansson
  2019-10-23 10:57     ` Krzysztof Kozlowski
  2 siblings, 0 replies; 135+ messages in thread
From: Ulf Hansson @ 2019-10-15 14:12 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, linux-samsung-soc, Linux ARM,
	Linus Walleij, Olof Johansson, Sascha Hauer,
	Bartlomiej Zolnierkiewicz, Enrico Weigelt, metux IT consult,
	Linux Kernel Mailing List, linux-mmc

On Thu, 10 Oct 2019 at 22:34, Arnd Bergmann <arnd@arndb.de> wrote:
>
> Now that no code in arch/arm is shared between mach-exynos and the
> others, make the split formal.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/Kconfig.debug        | 8 ++++----
>  arch/arm/Makefile             | 1 -
>  arch/arm/mach-exynos/Makefile | 4 ----
>  arch/arm/plat-samsung/Kconfig | 4 ++--
>  drivers/mmc/host/Kconfig      | 2 +-

For the mmc part:

Acked-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe


>  5 files changed, 7 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index d05b836dfeb2..9c4f2d6deb06 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -998,7 +998,7 @@ choice
>                   via SCIFA4 on Renesas SH-Mobile AG5 (SH73A0).
>
>         config DEBUG_S3C_UART0
> -               depends on PLAT_SAMSUNG
> +               depends on PLAT_SAMSUNG || ARCH_EXYNOS
>                 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>                 select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>                 select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1010,7 +1010,7 @@ choice
>                   by the boot-loader before use.
>
>         config DEBUG_S3C_UART1
> -               depends on PLAT_SAMSUNG
> +               depends on PLAT_SAMSUNG || ARCH_EXYNOS
>                 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>                 select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>                 select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1022,7 +1022,7 @@ choice
>                   by the boot-loader before use.
>
>         config DEBUG_S3C_UART2
> -               depends on PLAT_SAMSUNG
> +               depends on PLAT_SAMSUNG || ARCH_EXYNOS
>                 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>                 select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>                 select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1034,7 +1034,7 @@ choice
>                   by the boot-loader before use.
>
>         config DEBUG_S3C_UART3
> -               depends on PLAT_SAMSUNG && (ARCH_EXYNOS || ARCH_S5PV210)
> +               depends on ARCH_EXYNOS || ARCH_S5PV210
>                 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>                 select DEBUG_S3C64XX_UART if ARCH_S3C64XX
>                 select DEBUG_S5PV210_UART if ARCH_S5PV210
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index db857d07114f..f492d7c338fe 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -233,7 +233,6 @@ machine-$(CONFIG_PLAT_SPEAR)                += spear
>
>  # Platform directory name.  This list is sorted alphanumerically
>  # by CONFIG_* macro name.
> -plat-$(CONFIG_ARCH_EXYNOS)     += samsung
>  plat-$(CONFIG_ARCH_OMAP)       += omap
>  plat-$(CONFIG_ARCH_S3C64XX)    += samsung
>  plat-$(CONFIG_ARCH_S5PV210)    += samsung
> diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
> index 0fd3fcf8bfb0..53fa363c8e44 100644
> --- a/arch/arm/mach-exynos/Makefile
> +++ b/arch/arm/mach-exynos/Makefile
> @@ -3,10 +3,6 @@
>  # Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
>  #              http://www.samsung.com/
>
> -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
> -
> -# Core
> -
>  obj-$(CONFIG_ARCH_EXYNOS)      += exynos.o exynos-smc.o firmware.o
>
>  obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm.o sleep.o
> diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
> index 832ab0e6cd72..e31a156a27df 100644
> --- a/arch/arm/plat-samsung/Kconfig
> +++ b/arch/arm/plat-samsung/Kconfig
> @@ -4,7 +4,7 @@
>
>  config PLAT_SAMSUNG
>         bool
> -       depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_EXYNOS || ARCH_S5PV210
> +       depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
>         default y
>         select GENERIC_IRQ_CHIP
>         select NO_IOPORT_MAP
> @@ -240,7 +240,7 @@ config SAMSUNG_PM_DEBUG
>         bool "Samsung PM Suspend debug"
>         depends on PM && DEBUG_KERNEL
>         depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
> -       depends on DEBUG_EXYNOS_UART || DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
> +       depends on DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
>         help
>           Say Y here if you want verbose debugging from the PM Suspend and
>           Resume code. See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index 49ea02c467bf..400a581c918c 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -275,7 +275,7 @@ config MMC_SDHCI_TEGRA
>
>  config MMC_SDHCI_S3C
>         tristate "SDHCI support on Samsung S3C SoC"
> -       depends on MMC_SDHCI && PLAT_SAMSUNG
> +       depends on MMC_SDHCI && (PLAT_SAMSUNG || ARCH_EXYNOS)
>         help
>           This selects the Secure Digital Host Controller Interface (SDHCI)
>           often referrered to as the HSMMC block in some of the Samsung S3C
> --
> 2.20.0
>

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 23/36] ARM: s3c: move s3cmci pinctrl handling into board files
  2019-10-10 20:30   ` [PATCH 23/36] ARM: s3c: move s3cmci pinctrl handling " Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
@ 2019-10-15 14:12     ` Ulf Hansson
  2019-10-16 13:12     ` Linus Walleij
  2 siblings, 0 replies; 135+ messages in thread
From: Ulf Hansson @ 2019-10-15 14:12 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, Ben Dooks, linux-samsung-soc,
	Linux ARM, Linus Walleij, Linux Kernel Mailing List, linux-mmc

On Thu, 10 Oct 2019 at 22:47, Arnd Bergmann <arnd@arndb.de> wrote:
>
> Rather than call the internal s3c_gpio_cfgall_range() function
> through a platform header, move the code into the set_power
> callback that is already exported by the board, and add
> a default implementation.
>
> In DT mode, the code already does not set the pin config,
> so nothing changes there.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

This looks good to me!

Acked-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe


> ---
>  arch/arm/mach-s3c24xx/include/mach/pm-core.h |  1 +
>  arch/arm/mach-s3c24xx/mach-amlm5900.c        | 15 +++++
>  arch/arm/mach-s3c24xx/mach-at2440evb.c       | 10 ++-
>  arch/arm/mach-s3c24xx/mach-gta02.c           | 15 +++++
>  arch/arm/mach-s3c24xx/mach-h1940.c           |  8 +++
>  arch/arm/mach-s3c24xx/mach-mini2440.c        |  9 ++-
>  arch/arm/mach-s3c24xx/mach-n30.c             |  9 +++
>  arch/arm/mach-s3c24xx/mach-qt2410.c          | 15 +++++
>  arch/arm/mach-s3c24xx/mach-rx1950.c          |  9 +++
>  arch/arm/mach-s3c24xx/mach-tct_hammer.c      | 15 +++++
>  arch/arm/plat-samsung/devs.c                 | 29 ++++++++
>  drivers/mmc/host/s3cmci.c                    | 69 +++++---------------
>  include/linux/platform_data/mmc-s3cmci.h     |  2 +
>  13 files changed, 152 insertions(+), 54 deletions(-)
>
> diff --git a/arch/arm/mach-s3c24xx/include/mach/pm-core.h b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
> index 8f87606c4cdc..a22b4a37ee57 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/pm-core.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
> @@ -12,6 +12,7 @@
>
>  #include "regs-clock.h"
>  #include "regs-irq.h"
> +#include <mach/irqs.h>
>
>  static inline void s3c_pm_debug_init_uart(void)
>  {
> diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c
> index 9a9daf526d0c..40ad23b52bc0 100644
> --- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
> +++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c
> @@ -13,6 +13,7 @@
>  #include <linux/list.h>
>  #include <linux/timer.h>
>  #include <linux/init.h>
> +#include <linux/gpio/machine.h>
>  #include <linux/gpio.h>
>  #include <linux/device.h>
>  #include <linux/platform_device.h>
> @@ -124,6 +125,19 @@ static struct s3c2410_uartcfg amlm5900_uartcfgs[] = {
>         }
>  };
>
> +static struct gpiod_lookup_table amlm5900_mmc_gpio_table = {
> +       .dev_id = "s3c2410-sdi",
> +       .table = {
> +               /* bus pins */
> +               GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
> +               { },
> +       },
> +};
>
>  static struct platform_device *amlm5900_devices[] __initdata = {
>  #ifdef CONFIG_FB_S3C2410
> @@ -219,6 +233,7 @@ static void __init amlm5900_init(void)
>         s3c24xx_fb_set_platdata(&amlm5900_fb_info);
>  #endif
>         s3c_i2c0_set_platdata(NULL);
> +       gpiod_add_lookup_table(&amlm5900_mmc_gpio_table);
>         platform_add_devices(amlm5900_devices, ARRAY_SIZE(amlm5900_devices));
>  }
>
> diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
> index 58c5ef3cf1d7..3a793aaf2cba 100644
> --- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
> +++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
> @@ -136,7 +136,7 @@ static struct platform_device at2440evb_device_eth = {
>  };
>
>  static struct s3c24xx_mci_pdata at2440evb_mci_pdata __initdata = {
> -       /* Intentionally left blank */
> +       .set_power = s3c24xx_mci_def_set_power,
>  };
>
>  static struct gpiod_lookup_table at2440evb_mci_gpio_table = {
> @@ -144,10 +144,18 @@ static struct gpiod_lookup_table at2440evb_mci_gpio_table = {
>         .table = {
>                 /* Card detect S3C2410_GPG(10) */
>                 GPIO_LOOKUP("GPG", 10, "cd", GPIO_ACTIVE_LOW),
> +               /* bus pins */
> +               GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
>                 { },
>         },
>  };
>
> +
>  /* 7" LCD panel */
>
>  static struct s3c2410fb_display at2440evb_lcd_cfg __initdata = {
> diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
> index 1ca0460d82f4..61b8c6badeb8 100644
> --- a/arch/arm/mach-s3c24xx/mach-gta02.c
> +++ b/arch/arm/mach-s3c24xx/mach-gta02.c
> @@ -489,6 +489,20 @@ static struct platform_device gta02_audio = {
>         .id = -1,
>  };
>
> +static struct gpiod_lookup_table gta02_mmc_gpio_table = {
> +       .dev_id = "s3c2410-sdi",
> +       .table = {
> +               /* bus pins */
> +               GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
> +               { },
> +       },
> +};
> +
>  static void __init gta02_map_io(void)
>  {
>         s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc));
> @@ -545,6 +559,7 @@ static void __init gta02_machine_init(void)
>                               S3C_GPIO_PULL_NONE);
>
>         gpiod_add_lookup_table(&gta02_audio_gpio_table);
> +       gpiod_add_lookup_table(&gta02_mmc_gpio_table);
>         platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
>         pm_power_off = gta02_poweroff;
>
> diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
> index 11f705fb5e32..24f785da7659 100644
> --- a/arch/arm/mach-s3c24xx/mach-h1940.c
> +++ b/arch/arm/mach-s3c24xx/mach-h1940.c
> @@ -462,6 +462,7 @@ static void h1940_set_mmc_power(unsigned char power_mode, unsigned short vdd)
>  static struct s3c24xx_mci_pdata h1940_mmc_cfg __initdata = {
>         .set_power     = h1940_set_mmc_power,
>         .ocr_avail     = MMC_VDD_32_33,
> +       .set_power = s3c24xx_mci_def_set_power,
>  };
>
>  static struct gpiod_lookup_table h1940_mmc_gpio_table = {
> @@ -471,6 +472,13 @@ static struct gpiod_lookup_table h1940_mmc_gpio_table = {
>                 GPIO_LOOKUP("GPF", 5, "cd", GPIO_ACTIVE_LOW),
>                 /* Write protect S3C2410_GPH(8) */
>                 GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_LOW),
> +               /* bus pins */
> +               GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
>                 { },
>         },
>  };
> diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
> index 894d43ff94f1..5c000efdf0e8 100644
> --- a/arch/arm/mach-s3c24xx/mach-mini2440.c
> +++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
> @@ -236,7 +236,7 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
>
>  static struct s3c24xx_mci_pdata mini2440_mmc_cfg __initdata = {
>         .wprotect_invert        = 1,
> -       .set_power              = NULL,
> +       .set_power              = s3c24xx_mci_def_set_power,
>         .ocr_avail              = MMC_VDD_32_33|MMC_VDD_33_34,
>  };
>
> @@ -247,6 +247,13 @@ static struct gpiod_lookup_table mini2440_mmc_gpio_table = {
>                 GPIO_LOOKUP("GPG", 8, "cd", GPIO_ACTIVE_LOW),
>                 /* Write protect S3C2410_GPH(8) */
>                 GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_HIGH),
> +               /* bus pins */
> +               GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
>                 { },
>         },
>  };
> diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
> index 5f5ca4b7015c..8d7ad61e9930 100644
> --- a/arch/arm/mach-s3c24xx/mach-n30.c
> +++ b/arch/arm/mach-s3c24xx/mach-n30.c
> @@ -339,6 +339,8 @@ static struct s3c2410fb_mach_info n30_fb_info __initdata = {
>
>  static void n30_sdi_set_power(unsigned char power_mode, unsigned short vdd)
>  {
> +       s3c24xx_mci_def_set_power(power_mode, vdd);
> +
>         switch (power_mode) {
>         case MMC_POWER_ON:
>         case MMC_POWER_UP:
> @@ -364,6 +366,13 @@ static struct gpiod_lookup_table n30_mci_gpio_table = {
>                 /* Write protect S3C2410_GPG(10) */
>                 GPIO_LOOKUP("GPG", 10, "wp", GPIO_ACTIVE_LOW),
>                 { },
> +               /* bus pins */
> +               GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
>         },
>  };
>
> diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
> index 6686f02a3f4f..9b47b8434f10 100644
> --- a/arch/arm/mach-s3c24xx/mach-qt2410.c
> +++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
> @@ -219,6 +219,20 @@ static struct gpiod_lookup_table qt2410_spi_gpiod_table = {
>         },
>  };
>
> +static struct gpiod_lookup_table qt2410_mmc_gpiod_table = {
> +       .dev_id = "s3c2410-sdi",
> +       .table = {
> +               /* bus pins */
> +               GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
> +               { },
> +       },
> +};
> +
>  /* Board devices */
>
>  static struct platform_device *qt2410_devices[] __initdata = {
> @@ -342,6 +356,7 @@ static void __init qt2410_machine_init(void)
>         s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
>                               S3C_GPIO_PULL_NONE);
>         gpiod_add_lookup_table(&qt2410_spi_gpiod_table);
> +       gpiod_add_lookup_table(&qt2410_mmc_gpiod_table);
>         platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices));
>         s3c_pm_init();
>  }
> diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
> index 4eeede398775..820e626f5129 100644
> --- a/arch/arm/mach-s3c24xx/mach-rx1950.c
> +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
> @@ -545,6 +545,8 @@ static struct platform_device rx1950_backlight = {
>
>  static void rx1950_set_mmc_power(unsigned char power_mode, unsigned short vdd)
>  {
> +       s3c24xx_mci_def_set_power(power_mode, vdd);
> +
>         switch (power_mode) {
>         case MMC_POWER_OFF:
>                 gpio_direction_output(S3C2410_GPJ(1), 0);
> @@ -570,6 +572,13 @@ static struct gpiod_lookup_table rx1950_mmc_gpio_table = {
>                 GPIO_LOOKUP("GPF", 5, "cd", GPIO_ACTIVE_LOW),
>                 /* Write protect S3C2410_GPH(8) */
>                 GPIO_LOOKUP("GPH", 8, "wp", GPIO_ACTIVE_LOW),
> +               /* bus pins */
> +               GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
>                 { },
>         },
>  };
> diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
> index 8d8ddd6ea305..d6dbbe6759bc 100644
> --- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c
> +++ b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
> @@ -7,6 +7,7 @@
>  // derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by
>  // Ben Dooks <ben@simtec.co.uk>
>
> +#include <linux/gpio/machine.h>
>  #include <linux/kernel.h>
>  #include <linux/types.h>
>  #include <linux/interrupt.h>
> @@ -103,6 +104,19 @@ static struct s3c2410_uartcfg tct_hammer_uartcfgs[] = {
>         }
>  };
>
> +static struct gpiod_lookup_table tct_hammer_mmc_gpio_table = {
> +       .dev_id = "s3c2410-sdi",
> +       .table = {
> +               /* bus pins */
> +               GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
> +               { },
> +       },
> +};
>
>  static struct platform_device *tct_hammer_devices[] __initdata = {
>         &s3c_device_adc,
> @@ -131,6 +145,7 @@ static void __init tct_hammer_init_time(void)
>  static void __init tct_hammer_init(void)
>  {
>         s3c_i2c0_set_platdata(NULL);
> +       gpiod_add_lookup_table(&tct_hammer_mmc_gpio_table);
>         platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices));
>  }
>
> diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
> index ddd90f0bb380..c0739bda060b 100644
> --- a/arch/arm/plat-samsung/devs.c
> +++ b/arch/arm/plat-samsung/devs.c
> @@ -5,6 +5,7 @@
>  //
>  // Base SAMSUNG platform device definitions
>
> +#include <linux/gpio.h>
>  #include <linux/kernel.h>
>  #include <linux/types.h>
>  #include <linux/interrupt.h>
> @@ -40,6 +41,8 @@
>  #include <mach/dma.h>
>  #include <mach/irqs.h>
>  #include <mach/map.h>
> +#include <mach/gpio-samsung.h>
> +#include <plat/gpio-cfg.h>
>  #include <mach/regs-s3c2443-clock.h>
>
>  #include <plat/cpu.h>
> @@ -833,16 +836,42 @@ struct platform_device s3c_device_rtc = {
>  /* SDI */
>
>  #ifdef CONFIG_PLAT_S3C24XX
> +void s3c24xx_mci_def_set_power(unsigned char power_mode, unsigned short vdd)
> +{
> +       switch (power_mode) {
> +       case MMC_POWER_ON:
> +       case MMC_POWER_UP:
> +               /* Configure GPE5...GPE10 pins in SD mode */
> +               s3c_gpio_cfgall_range(S3C2410_GPE(5), 6, S3C_GPIO_SFN(2),
> +                                     S3C_GPIO_PULL_NONE);
> +               break;
> +
> +       case MMC_POWER_OFF:
> +       default:
> +               gpio_direction_output(S3C2410_GPE(5), 0);
> +               break;
> +       }
> +}
> +
>  static struct resource s3c_sdi_resource[] = {
>         [0] = DEFINE_RES_MEM(S3C24XX_PA_SDI, S3C24XX_SZ_SDI),
>         [1] = DEFINE_RES_IRQ(IRQ_SDI),
>  };
>
> +static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
> +       /* This is currently here to avoid a number of if (host->pdata)
> +        * checks. Any zero fields to ensure reasonable defaults are picked. */
> +       .no_wprotect = 1,
> +       .no_detect = 1,
> +       .set_power = s3c24xx_mci_def_set_power,
> +};
> +
>  struct platform_device s3c_device_sdi = {
>         .name           = "s3c2410-sdi",
>         .id             = -1,
>         .num_resources  = ARRAY_SIZE(s3c_sdi_resource),
>         .resource       = s3c_sdi_resource,
> +       .dev.platform_data = &s3cmci_def_pdata,
>  };
>
>  void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata)
> diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
> index bce9c33bc4b5..c2b46640a78b 100644
> --- a/drivers/mmc/host/s3cmci.c
> +++ b/drivers/mmc/host/s3cmci.c
> @@ -25,9 +25,7 @@
>  #include <linux/of_device.h>
>  #include <linux/mmc/slot-gpio.h>
>
> -#include <plat/gpio-cfg.h>
>  #include <mach/dma.h>
> -#include <mach/gpio-samsung.h>
>
>  #include <linux/platform_data/mmc-s3cmci.h>
>
> @@ -307,7 +305,8 @@ static inline void clear_imask(struct s3cmci_host *host)
>  static void s3cmci_check_sdio_irq(struct s3cmci_host *host)
>  {
>         if (host->sdio_irqen) {
> -               if (gpio_get_value(S3C2410_GPE(8)) == 0) {
> +               if (host->pdata->bus[3] &&
> +                   gpiod_get_value(host->pdata->bus[3]) == 0) {
>                         pr_debug("%s: signalling irq\n", __func__);
>                         mmc_signal_sdio_irq(host->mmc);
>                 }
> @@ -1213,33 +1212,20 @@ static void s3cmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>         switch (ios->power_mode) {
>         case MMC_POWER_ON:
>         case MMC_POWER_UP:
> -               /* Configure GPE5...GPE10 pins in SD mode */
> -               if (!host->pdev->dev.of_node)
> -                       s3c_gpio_cfgall_range(S3C2410_GPE(5), 6, S3C_GPIO_SFN(2),
> -                                             S3C_GPIO_PULL_NONE);
> -
> -               if (host->pdata->set_power)
> -                       host->pdata->set_power(ios->power_mode, ios->vdd);
> -
>                 if (!host->is2440)
>                         mci_con |= S3C2410_SDICON_FIFORESET;
> -
>                 break;
>
>         case MMC_POWER_OFF:
>         default:
> -               if (!host->pdev->dev.of_node)
> -                       gpio_direction_output(S3C2410_GPE(5), 0);
> -
>                 if (host->is2440)
>                         mci_con |= S3C2440_SDICON_SDRESET;
> -
> -               if (host->pdata->set_power)
> -                       host->pdata->set_power(ios->power_mode, ios->vdd);
> -
>                 break;
>         }
>
> +       if (host->pdata->set_power)
> +               host->pdata->set_power(ios->power_mode, ios->vdd);
> +
>         s3cmci_set_clk(host, ios);
>
>         /* Set CLOCK_ENABLE */
> @@ -1317,13 +1303,6 @@ static const struct mmc_host_ops s3cmci_ops = {
>         .enable_sdio_irq = s3cmci_enable_sdio_irq,
>  };
>
> -static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
> -       /* This is currently here to avoid a number of if (host->pdata)
> -        * checks. Any zero fields to ensure reasonable defaults are picked. */
> -        .no_wprotect = 1,
> -        .no_detect = 1,
> -};
> -
>  #ifdef CONFIG_ARM_S3C24XX_CPUFREQ
>
>  static int s3cmci_cpufreq_transition(struct notifier_block *nb,
> @@ -1477,24 +1456,21 @@ static int s3cmci_probe_pdata(struct s3cmci_host *host)
>         int i, ret;
>
>         host->is2440 = platform_get_device_id(pdev)->driver_data;
> +       pdata = pdev->dev.platform_data;
> +       if (!pdata) {
> +               dev_err(&pdev->dev, "need platform data");
> +               return -ENXIO;
> +       }
>
> -       for (i = S3C2410_GPE(5); i <= S3C2410_GPE(10); i++) {
> -               ret = gpio_request(i, dev_name(&pdev->dev));
> -               if (ret) {
> +       for (i = 0; i < 6; i++) {
> +               pdata->bus[i] = devm_gpiod_get_index(&pdev->dev, "bus", i,
> +                                                    GPIOD_OUT_LOW);
> +               if (IS_ERR(pdata->bus[i])) {
>                         dev_err(&pdev->dev, "failed to get gpio %d\n", i);
> -
> -                       for (i--; i >= S3C2410_GPE(5); i--)
> -                               gpio_free(i);
> -
> -                       return ret;
> +                       return PTR_ERR(pdata->bus[i]);
>                 }
>         }
>
> -       if (!pdev->dev.platform_data)
> -               pdev->dev.platform_data = &s3cmci_def_pdata;
> -
> -       pdata = pdev->dev.platform_data;
> -
>         if (pdata->no_wprotect)
>                 mmc->caps2 |= MMC_CAP2_NO_WRITE_PROTECT;
>
> @@ -1549,7 +1525,6 @@ static int s3cmci_probe(struct platform_device *pdev)
>         struct s3cmci_host *host;
>         struct mmc_host *mmc;
>         int ret;
> -       int i;
>
>         mmc = mmc_alloc_host(sizeof(struct s3cmci_host), &pdev->dev);
>         if (!mmc) {
> @@ -1593,7 +1568,7 @@ static int s3cmci_probe(struct platform_device *pdev)
>                         "failed to get io memory region resource.\n");
>
>                 ret = -ENOENT;
> -               goto probe_free_gpio;
> +               goto probe_free_host;
>         }
>
>         host->mem = request_mem_region(host->mem->start,
> @@ -1602,7 +1577,7 @@ static int s3cmci_probe(struct platform_device *pdev)
>         if (!host->mem) {
>                 dev_err(&pdev->dev, "failed to request io memory region.\n");
>                 ret = -ENOENT;
> -               goto probe_free_gpio;
> +               goto probe_free_host;
>         }
>
>         host->base = ioremap(host->mem->start, resource_size(host->mem));
> @@ -1726,11 +1701,6 @@ static int s3cmci_probe(struct platform_device *pdev)
>   probe_free_mem_region:
>         release_mem_region(host->mem->start, resource_size(host->mem));
>
> - probe_free_gpio:
> -       if (!pdev->dev.of_node)
> -               for (i = S3C2410_GPE(5); i <= S3C2410_GPE(10); i++)
> -                       gpio_free(i);
> -
>   probe_free_host:
>         mmc_free_host(mmc);
>
> @@ -1756,7 +1726,6 @@ static int s3cmci_remove(struct platform_device *pdev)
>  {
>         struct mmc_host         *mmc  = platform_get_drvdata(pdev);
>         struct s3cmci_host      *host = mmc_priv(mmc);
> -       int i;
>
>         s3cmci_shutdown(pdev);
>
> @@ -1769,10 +1738,6 @@ static int s3cmci_remove(struct platform_device *pdev)
>
>         free_irq(host->irq, host);
>
> -       if (!pdev->dev.of_node)
> -               for (i = S3C2410_GPE(5); i <= S3C2410_GPE(10); i++)
> -                       gpio_free(i);
> -
>         iounmap(host->base);
>         release_mem_region(host->mem->start, resource_size(host->mem));
>
> diff --git a/include/linux/platform_data/mmc-s3cmci.h b/include/linux/platform_data/mmc-s3cmci.h
> index 33310b11cbdd..bacb86db3112 100644
> --- a/include/linux/platform_data/mmc-s3cmci.h
> +++ b/include/linux/platform_data/mmc-s3cmci.h
> @@ -35,6 +35,7 @@ struct s3c24xx_mci_pdata {
>         unsigned long   ocr_avail;
>         void            (*set_power)(unsigned char power_mode,
>                                      unsigned short vdd);
> +       struct gpio_desc *bus[6];
>  };
>
>  /**
> @@ -44,6 +45,7 @@ struct s3c24xx_mci_pdata {
>   * Copy the platform data supplied by @pdata so that this can be marked
>   * __initdata.
>   */
> +extern void s3c24xx_mci_def_set_power(unsigned char power_mode, unsigned short vdd);
>  extern void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata);
>
>  #endif /* _ARCH_NCI_H */
> --
> 2.20.0
>

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 11/36] ARM: s5pv210: split from plat-samsung
  2019-10-10 20:29   ` [PATCH 11/36] ARM: s5pv210: split from plat-samsung Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-11  5:51     ` Uwe Kleine-König
@ 2019-10-15 14:13     ` Ulf Hansson
  2019-10-15 14:23     ` Thierry Reding
  2019-10-23 12:14     ` Krzysztof Kozlowski
  4 siblings, 0 replies; 135+ messages in thread
From: Ulf Hansson @ 2019-10-15 14:13 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, Thierry Reding, Mark Brown,
	Greg Kroah-Hartman, Jiri Slaby, Sangbeom Kim, Sylwester Nawrocki,
	Liam Girdwood, linux-pwm, alsa-devel, linux-samsung-soc,
	Bartlomiej Zolnierkiewicz, Linux Kernel Mailing List,
	Linus Walleij, linux-mmc, Takashi Iwai, Jaroslav Kysela,
	Mauro Carvalho Chehab, Faiz Abbas, Clément Péron,
	linux-serial, Uwe Kleine-König, Olof Johansson, linux-spi,
	Sascha Hauer, Linux ARM

On Thu, 10 Oct 2019 at 22:38, Arnd Bergmann <arnd@arndb.de> wrote:
>
> These can be build completely independently, so split
> the two Kconfig symbols.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/Kconfig.debug        | 6 +++---
>  arch/arm/Makefile             | 1 -
>  arch/arm/plat-samsung/Kconfig | 2 +-
>  drivers/mmc/host/Kconfig      | 2 +-
>  drivers/pwm/Kconfig           | 2 +-
>  drivers/spi/Kconfig           | 2 +-
>  drivers/tty/serial/Kconfig    | 2 +-
>  sound/soc/samsung/Kconfig     | 2 +-
>  8 files changed, 9 insertions(+), 10 deletions(-)

For the mmc parts:

Acked-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe


>
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 9c4f2d6deb06..4c4e97ae4fcb 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -998,7 +998,7 @@ choice
>                   via SCIFA4 on Renesas SH-Mobile AG5 (SH73A0).
>
>         config DEBUG_S3C_UART0
> -               depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +               depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>                 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>                 select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>                 select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1010,7 +1010,7 @@ choice
>                   by the boot-loader before use.
>
>         config DEBUG_S3C_UART1
> -               depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +               depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>                 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>                 select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>                 select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1022,7 +1022,7 @@ choice
>                   by the boot-loader before use.
>
>         config DEBUG_S3C_UART2
> -               depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +               depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>                 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>                 select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>                 select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index f492d7c338fe..a1bc15cda751 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -235,7 +235,6 @@ machine-$(CONFIG_PLAT_SPEAR)                += spear
>  # by CONFIG_* macro name.
>  plat-$(CONFIG_ARCH_OMAP)       += omap
>  plat-$(CONFIG_ARCH_S3C64XX)    += samsung
> -plat-$(CONFIG_ARCH_S5PV210)    += samsung
>  plat-$(CONFIG_PLAT_ORION)      += orion
>  plat-$(CONFIG_PLAT_PXA)                += pxa
>  plat-$(CONFIG_PLAT_S3C24XX)    += samsung
> diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
> index 740bdb23f38a..1530946cc672 100644
> --- a/arch/arm/plat-samsung/Kconfig
> +++ b/arch/arm/plat-samsung/Kconfig
> @@ -4,7 +4,7 @@
>
>  config PLAT_SAMSUNG
>         bool
> -       depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
> +       depends on PLAT_S3C24XX || ARCH_S3C64XX
>         default y
>         select GENERIC_IRQ_CHIP
>         select NO_IOPORT_MAP
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index 400a581c918c..16a0e5430b44 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -275,7 +275,7 @@ config MMC_SDHCI_TEGRA
>
>  config MMC_SDHCI_S3C
>         tristate "SDHCI support on Samsung S3C SoC"
> -       depends on MMC_SDHCI && (PLAT_SAMSUNG || ARCH_EXYNOS)
> +       depends on MMC_SDHCI && (PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS)
>         help
>           This selects the Secure Digital Host Controller Interface (SDHCI)
>           often referrered to as the HSMMC block in some of the Samsung S3C
> diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
> index e3a2518503ed..8eb738cac0c7 100644
> --- a/drivers/pwm/Kconfig
> +++ b/drivers/pwm/Kconfig
> @@ -394,7 +394,7 @@ config PWM_ROCKCHIP
>
>  config PWM_SAMSUNG
>         tristate "Samsung PWM support"
> -       depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +       depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>         help
>           Generic PWM framework driver for Samsung.
>
> diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
> index 6f7fdcbb9151..355391ee643d 100644
> --- a/drivers/spi/Kconfig
> +++ b/drivers/spi/Kconfig
> @@ -625,7 +625,7 @@ config SPI_S3C24XX_FIQ
>
>  config SPI_S3C64XX
>         tristate "Samsung S3C64XX series type SPI"
> -       depends on (PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST)
> +       depends on (PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST)
>         help
>           SPI driver for Samsung S3C64XX and newer SoCs.
>
> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> index 4789b5d62f63..17f01cf3009c 100644
> --- a/drivers/tty/serial/Kconfig
> +++ b/drivers/tty/serial/Kconfig
> @@ -237,7 +237,7 @@ config SERIAL_CLPS711X_CONSOLE
>
>  config SERIAL_SAMSUNG
>         tristate "Samsung SoC serial support"
> -       depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +       depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>         select SERIAL_CORE
>         help
>           Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,
> diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
> index 638983123d8f..7a0035dd9995 100644
> --- a/sound/soc/samsung/Kconfig
> +++ b/sound/soc/samsung/Kconfig
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  menuconfig SND_SOC_SAMSUNG
>         tristate "ASoC support for Samsung"
> -       depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST
> +       depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
>         depends on COMMON_CLK
>         select SND_SOC_GENERIC_DMAENGINE_PCM
>         ---help---
> --
> 2.20.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 11/36] ARM: s5pv210: split from plat-samsung
  2019-10-10 20:29   ` [PATCH 11/36] ARM: s5pv210: split from plat-samsung Arnd Bergmann
                       ` (2 preceding siblings ...)
  2019-10-15 14:13     ` Ulf Hansson
@ 2019-10-15 14:23     ` Thierry Reding
  2019-10-23 12:14     ` Krzysztof Kozlowski
  4 siblings, 0 replies; 135+ messages in thread
From: Thierry Reding @ 2019-10-15 14:23 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, Ulf Hansson, Mark Brown,
	Greg Kroah-Hartman, Jiri Slaby, Sangbeom Kim, Sylwester Nawrocki,
	Liam Girdwood, linux-samsung-soc, linux-arm-kernel,
	linus.walleij, Uwe Kleine-König, Jaroslav Kysela,
	Takashi Iwai, Olof Johansson, Sascha Hauer,
	Clément Péron, Mauro Carvalho Chehab,
	Bartlomiej Zolnierkiewicz, Faiz Abbas, linux-kernel, linux-mmc,
	linux-pwm, linux-spi, linux-serial, alsa-devel

[-- Attachment #1: Type: text/plain, Size: 560 bytes --]

On Thu, Oct 10, 2019 at 10:29:55PM +0200, Arnd Bergmann wrote:
[...]
> diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
> index e3a2518503ed..8eb738cac0c7 100644
> --- a/drivers/pwm/Kconfig
> +++ b/drivers/pwm/Kconfig
> @@ -394,7 +394,7 @@ config PWM_ROCKCHIP
>  
>  config PWM_SAMSUNG
>  	tristate "Samsung PWM support"
> -	depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +	depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>  	help
>  	  Generic PWM framework driver for Samsung.
>  

Acked-by: Thierry Reding <thierry.reding@gmail.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect
  2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
                     ` (33 preceding siblings ...)
  2019-10-10 20:30   ` [PATCH 34/36] ARM: s3c: stop including mach/hardware.h from mach/io.h Arnd Bergmann
@ 2019-10-15 14:52   ` Tomasz Figa
  34 siblings, 0 replies; 135+ messages in thread
From: Tomasz Figa @ 2019-10-15 14:52 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, Sylwester Nawrocki,
	Chanwoo Choi, moderated list:SAMSUNG SOC CLOCK DRIVERS,
	linux-arm-kernel, linus.walleij, Michael Turquette, Stephen Boyd,
	linux-kernel, open list:COMMON CLK FRAMEWORK

Hi Arnd,

2019年10月11日(金) 5:30 Arnd Bergmann <arnd@arndb.de>:
>
> The clk driver uses both a function call into an exported
> platform file and a direct register access to a hardcoded
> virtual address for accessing the MISCCR register, both
> become are a problem for a multiplatform kernel because
> of the header file dependency.
>
> Make this an indirect function call through platform data
> instead.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s3c24xx/common.c         |  3 +++
>  drivers/clk/samsung/clk-s3c2410-dclk.c | 10 ++++------
>  2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
> index 3dc029c2d2cb..ebf6bde67816 100644
> --- a/arch/arm/mach-s3c24xx/common.c
> +++ b/arch/arm/mach-s3c24xx/common.c
> @@ -667,5 +667,8 @@ struct platform_device s3c2410_device_dclk = {
>         .id             = 0,
>         .num_resources  = ARRAY_SIZE(s3c2410_dclk_resource),
>         .resource       = s3c2410_dclk_resource,
> +       .dev            = {
> +               .platform_data = s3c2410_modify_misccr,

Thanks for the patch!

Just one minor nit: It doesn't look very nice to pass a function
pointer directly as platform data. Could we have a struct defined
instead - with a kerneldoc comment describing the function pointer
field?

Best regards,
Tomasz

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 12/36] ARM: s3c64xx: remove mach/hardware.h
  2019-10-10 20:29   ` [PATCH 12/36] ARM: s3c64xx: remove mach/hardware.h Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
@ 2019-10-16 10:09     ` Charles Keepax
  1 sibling, 0 replies; 135+ messages in thread
From: Charles Keepax @ 2019-10-16 10:09 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, linux-samsung-soc,
	linux-arm-kernel, linus.walleij, Mark Brown, linux-kernel

On Thu, Oct 10, 2019 at 10:29:56PM +0200, Arnd Bergmann wrote:
> This header is empty and conflicts with the s3c24xx version
> of the same file when we merge the two, so stop including it.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 23/36] ARM: s3c: move s3cmci pinctrl handling into board files
  2019-10-10 20:30   ` [PATCH 23/36] ARM: s3c: move s3cmci pinctrl handling " Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
  2019-10-15 14:12     ` Ulf Hansson
@ 2019-10-16 13:12     ` Linus Walleij
  2 siblings, 0 replies; 135+ messages in thread
From: Linus Walleij @ 2019-10-16 13:12 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, Ben Dooks, Ulf Hansson,
	linux-samsung-soc, Linux ARM, linux-kernel, linux-mmc

On Thu, Oct 10, 2019 at 10:47 PM Arnd Bergmann <arnd@arndb.de> wrote:

> Rather than call the internal s3c_gpio_cfgall_range() function
> through a platform header, move the code into the set_power
> callback that is already exported by the board, and add
> a default implementation.
>
> In DT mode, the code already does not set the pin config,
> so nothing changes there.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

It looks good:
Acked-by: Linus Walleij <linus.walleij@linaro.org>

It would feel better if someone was actually testing it on these
boards. I see Ben is listed as maintainer so I bet he will
pull the board out :)

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 11/36] ARM: s5pv210: split from plat-samsung
  2019-10-11  5:51     ` Uwe Kleine-König
  2019-10-11  5:51       ` Uwe Kleine-König
@ 2019-10-22 14:01       ` Arnd Bergmann
  2019-10-22 15:53         ` Uwe Kleine-König
  1 sibling, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-22 14:01 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Kukjin Kim, Krzysztof Kozlowski, Ulf Hansson, Thierry Reding,
	Mark Brown, Greg Kroah-Hartman, Jiri Slaby, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, Linux ARM,
	Linus Walleij, Jaroslav Kysela, Takashi Iwai, Olof Johansson,
	Sascha Hauer, Clément Péron, Mauro Carvalho Chehab,
	Bartlomiej Zolnierkiewicz, Faiz Abbas, linux-kernel, linux-mmc,
	Linux PWM List, linux-spi, linux-serial,
	ALSA Development Mailing List

On Fri, Oct 11, 2019 at 7:51 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> On Thu, Oct 10, 2019 at 10:29:55PM +0200, Arnd Bergmann wrote:
> > These can be build completely independently, so split
> > the two Kconfig symbols.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> I'd mention the two symbols' names you're working on in the commit log.
> I guess it's about PLAT_SAMSUNG and ARCH_S5PV210. And I wouldn't call it
> "split" which IMHO suggests there was only one symbol before.
>
> Maybe:
>
>         Don't imply PLAT_SAMSUNG if ARCH_S5PV210 is enabled
>
> would be a better subject line?

Ok, changed to

ARM: s5pv210: don't imply CONFIG_PLAT_SAMSUNG

> > @@ -235,7 +235,6 @@ machine-$(CONFIG_PLAT_SPEAR)              += spear
> >  # by CONFIG_* macro name.
> >  plat-$(CONFIG_ARCH_OMAP)     += omap
> >  plat-$(CONFIG_ARCH_S3C64XX)  += samsung
> > -plat-$(CONFIG_ARCH_S5PV210)  += samsung
>
> Would it make more sense to make this
>
>         plat-$(PLAT_SAMSUNG) += samsung
>
> (in a separate patch)? Hmm, it seems there is no plat-y for
> PLAT_S3C24XX=y builds. Is this intended? If yes, the directory name
> containing "samsung" suggests something that seems untrue.

By the end of the series, the plat-samsung directory is completely
removed (folded into mach-s3c), so that would only add more
churn for the same result I think.

     Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 11/36] ARM: s5pv210: split from plat-samsung
  2019-10-22 14:01       ` Arnd Bergmann
@ 2019-10-22 15:53         ` Uwe Kleine-König
  2019-10-22 16:20           ` Arnd Bergmann
  0 siblings, 1 reply; 135+ messages in thread
From: Uwe Kleine-König @ 2019-10-22 15:53 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Krzysztof Kozlowski, Ulf Hansson, Thierry Reding,
	Mark Brown, Greg Kroah-Hartman, Jiri Slaby, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, Linux ARM,
	Linus Walleij, Jaroslav Kysela, Takashi Iwai, Olof Johansson,
	Sascha Hauer, Clément Péron, Mauro Carvalho Chehab,
	Bartlomiej Zolnierkiewicz, Faiz Abbas, linux-kernel, linux-mmc,
	Linux PWM List, linux-spi, linux-serial,
	ALSA Development Mailing List

Hello,

On Tue, Oct 22, 2019 at 04:01:12PM +0200, Arnd Bergmann wrote:
> > > @@ -235,7 +235,6 @@ machine-$(CONFIG_PLAT_SPEAR)              += spear
> > >  # by CONFIG_* macro name.
> > >  plat-$(CONFIG_ARCH_OMAP)     += omap
> > >  plat-$(CONFIG_ARCH_S3C64XX)  += samsung
> > > -plat-$(CONFIG_ARCH_S5PV210)  += samsung
> >
> > Would it make more sense to make this
> >
> >         plat-$(PLAT_SAMSUNG) += samsung
> >
> > (in a separate patch)? Hmm, it seems there is no plat-y for
> > PLAT_S3C24XX=y builds. Is this intended? If yes, the directory name
> > containing "samsung" suggests something that seems untrue.
> 
> By the end of the series, the plat-samsung directory is completely
> removed (folded into mach-s3c), so that would only add more
> churn for the same result I think.

fine for me. The background of my question was me wondering if builds
for PLAT_S3C24XX=y (before your patch series) don't need plat-samsung.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 11/36] ARM: s5pv210: split from plat-samsung
  2019-10-22 15:53         ` Uwe Kleine-König
@ 2019-10-22 16:20           ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-22 16:20 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Kukjin Kim, Krzysztof Kozlowski, Ulf Hansson, Thierry Reding,
	Mark Brown, Greg Kroah-Hartman, Jiri Slaby, Sangbeom Kim,
	Sylwester Nawrocki, Liam Girdwood,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, Linux ARM,
	Linus Walleij, Jaroslav Kysela, Takashi Iwai, Olof Johansson,
	Sascha Hauer, Clément Péron, Mauro Carvalho Chehab,
	Bartlomiej Zolnierkiewicz, Faiz Abbas, linux-kernel, linux-mmc,
	Linux PWM List, linux-spi, linux-serial,
	ALSA Development Mailing List

On Tue, Oct 22, 2019 at 5:53 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> The background of my question was me wondering if builds
> for PLAT_S3C24XX=y (before your patch series) don't need plat-samsung.

What I found is that the DT-based platforms (exynos and s5p) need almost nothing
from plat-samsung, while the board files and the s3c24xx/s3c64xx power
management
needs almost all of it.

      Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 03/36] usb: gadget: s3c: use platform resources
  2019-10-10 20:29   ` [PATCH 03/36] usb: gadget: s3c: use platform resources Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
@ 2019-10-23 10:06     ` Krzysztof Kozlowski
  2019-10-23 12:46     ` Krzysztof Kozlowski
  2 siblings, 0 replies; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 10:06 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Felipe Balbi, Greg Kroah-Hartman, linux-kernel, linux-usb

On Thu, Oct 10, 2019 at 10:29:47PM +0200, Arnd Bergmann wrote:
> The resources are correctly initialized, so just use them
> instead of relying on hardcoded data from platform headers.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/usb/gadget/udc/s3c2410_udc.c          | 31 +++++++------------
>  drivers/usb/gadget/udc/s3c2410_udc.h          |  1 +
>  .../usb/gadget/udc/s3c2410_udc_regs.h         |  0
>  3 files changed, 12 insertions(+), 20 deletions(-)
>  rename arch/arm/plat-samsung/include/plat/regs-udc.h => drivers/usb/gadget/udc/s3c2410_udc_regs.h (100%)

Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 04/36] usb: gadget: s3c-hsudc: remove platform header dependency
  2019-10-10 20:29   ` [PATCH 04/36] usb: gadget: s3c-hsudc: remove platform header dependency Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
@ 2019-10-23 10:09     ` Krzysztof Kozlowski
  2019-10-23 12:21       ` Arnd Bergmann
  1 sibling, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 10:09 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Felipe Balbi, Greg Kroah-Hartman, linux-samsung-soc,
	linux-arm-kernel, linus.walleij, linux-kernel, linux-usb

On Thu, Oct 10, 2019 at 10:29:48PM +0200, Arnd Bergmann wrote:
> There is no real phy driver, so s3c-hsudc just pokes the registers
> itself. Improve this a little by making it a platform data callback
> like we do for gpios.
> 
> There is only one board using this driver, and it's unlikely
> that another would be added, so this is a minimal workaround.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  .../include/mach/regs-s3c2443-clock.h         | 49 +++++++++++++++++
>  arch/arm/plat-samsung/devs.c                  |  3 +
>  drivers/usb/gadget/udc/s3c-hsudc.c            | 55 ++-----------------
>  include/linux/platform_data/s3c-hsudc.h       |  2 +
>  4 files changed, 58 insertions(+), 51 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
> index 6bf924612b06..682759549e63 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h
> @@ -10,6 +10,8 @@
>  #ifndef __ASM_ARM_REGS_S3C2443_CLOCK
>  #define __ASM_ARM_REGS_S3C2443_CLOCK
>  
> +#include <linux/delay.h>
> +
>  #define S3C2443_CLKREG(x)		((x) + S3C24XX_VA_CLKPWR)
>  
>  #define S3C2443_PLLCON_MDIVSHIFT	16
> @@ -184,5 +186,52 @@ s3c2443_get_epll(unsigned int pllval, unsigned int baseclk)
>  	return (unsigned int)fvco;
>  }
>  
> +static inline void s3c_hsudc_init_phy(void)
> +{
> +	u32 cfg;
> +
> +	cfg = readl(S3C2443_PWRCFG) | S3C2443_PWRCFG_USBPHY;
> +	writel(cfg, S3C2443_PWRCFG);
> +
> +	cfg = readl(S3C2443_URSTCON);
> +	cfg |= (S3C2443_URSTCON_FUNCRST | S3C2443_URSTCON_PHYRST);
> +	writel(cfg, S3C2443_URSTCON);
> +	mdelay(1);
> +
> +	cfg = readl(S3C2443_URSTCON);
> +	cfg &= ~(S3C2443_URSTCON_FUNCRST | S3C2443_URSTCON_PHYRST);
> +	writel(cfg, S3C2443_URSTCON);
> +
> +	cfg = readl(S3C2443_PHYCTRL);
> +	cfg &= ~(S3C2443_PHYCTRL_CLKSEL | S3C2443_PHYCTRL_DSPORT);
> +	cfg |= (S3C2443_PHYCTRL_EXTCLK | S3C2443_PHYCTRL_PLLSEL);
> +	writel(cfg, S3C2443_PHYCTRL);
> +
> +	cfg = readl(S3C2443_PHYPWR);
> +	cfg &= ~(S3C2443_PHYPWR_FSUSPEND | S3C2443_PHYPWR_PLL_PWRDN |
> +		S3C2443_PHYPWR_XO_ON | S3C2443_PHYPWR_PLL_REFCLK |
> +		S3C2443_PHYPWR_ANALOG_PD);
> +	cfg |= S3C2443_PHYPWR_COMMON_ON;
> +	writel(cfg, S3C2443_PHYPWR);
> +
> +	cfg = readl(S3C2443_UCLKCON);
> +	cfg |= (S3C2443_UCLKCON_DETECT_VBUS | S3C2443_UCLKCON_FUNC_CLKEN |
> +		S3C2443_UCLKCON_TCLKEN);
> +	writel(cfg, S3C2443_UCLKCON);
> +}
> +
> +static inline void s3c_hsudc_uninit_phy(void)
> +{
> +	u32 cfg;
> +
> +	cfg = readl(S3C2443_PWRCFG) & ~S3C2443_PWRCFG_USBPHY;
> +	writel(cfg, S3C2443_PWRCFG);
> +
> +	writel(S3C2443_PHYPWR_FSUSPEND, S3C2443_PHYPWR);
> +
> +	cfg = readl(S3C2443_UCLKCON) & ~S3C2443_UCLKCON_FUNC_CLKEN;
> +	writel(cfg, S3C2443_UCLKCON);
> +}
> +
>  #endif /*  __ASM_ARM_REGS_S3C2443_CLOCK */
>  
> diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
> index 1d1fa068d228..6e4c1cb07104 100644
> --- a/arch/arm/plat-samsung/devs.c
> +++ b/arch/arm/plat-samsung/devs.c
> @@ -40,6 +40,7 @@
>  #include <mach/dma.h>
>  #include <mach/irqs.h>
>  #include <mach/map.h>
> +#include <mach/regs-s3c2443-clock.h>
>  
>  #include <plat/cpu.h>
>  #include <plat/devs.h>
> @@ -1038,6 +1039,8 @@ struct platform_device s3c_device_usb_hsudc = {
>  void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd)
>  {
>  	s3c_set_platdata(pd, sizeof(*pd), &s3c_device_usb_hsudc);
> +	pd->phy_init = s3c_hsudc_init_phy;
> +	pd->phy_uninit = s3c_hsudc_uninit_phy;
>  }
>  #endif /* CONFIG_PLAT_S3C24XX */
>  
> diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c
> index 858993c73442..d482cbb4bb4d 100644
> --- a/drivers/usb/gadget/udc/s3c-hsudc.c
> +++ b/drivers/usb/gadget/udc/s3c-hsudc.c
> @@ -30,8 +30,6 @@
>  #include <linux/regulator/consumer.h>
>  #include <linux/pm_runtime.h>
>  
> -#include <mach/regs-s3c2443-clock.h>
> -
>  #define S3C_HSUDC_REG(x)	(x)
>  
>  /* Non-Indexed Registers */
> @@ -186,53 +184,6 @@ static inline void __orr32(void __iomem *ptr, u32 val)
>  	writel(readl(ptr) | val, ptr);
>  }
>  
> -static void s3c_hsudc_init_phy(void)
> -{
> -	u32 cfg;
> -
> -	cfg = readl(S3C2443_PWRCFG) | S3C2443_PWRCFG_USBPHY;
> -	writel(cfg, S3C2443_PWRCFG);
> -
> -	cfg = readl(S3C2443_URSTCON);
> -	cfg |= (S3C2443_URSTCON_FUNCRST | S3C2443_URSTCON_PHYRST);
> -	writel(cfg, S3C2443_URSTCON);
> -	mdelay(1);
> -
> -	cfg = readl(S3C2443_URSTCON);
> -	cfg &= ~(S3C2443_URSTCON_FUNCRST | S3C2443_URSTCON_PHYRST);
> -	writel(cfg, S3C2443_URSTCON);
> -
> -	cfg = readl(S3C2443_PHYCTRL);
> -	cfg &= ~(S3C2443_PHYCTRL_CLKSEL | S3C2443_PHYCTRL_DSPORT);
> -	cfg |= (S3C2443_PHYCTRL_EXTCLK | S3C2443_PHYCTRL_PLLSEL);
> -	writel(cfg, S3C2443_PHYCTRL);
> -
> -	cfg = readl(S3C2443_PHYPWR);
> -	cfg &= ~(S3C2443_PHYPWR_FSUSPEND | S3C2443_PHYPWR_PLL_PWRDN |
> -		S3C2443_PHYPWR_XO_ON | S3C2443_PHYPWR_PLL_REFCLK |
> -		S3C2443_PHYPWR_ANALOG_PD);
> -	cfg |= S3C2443_PHYPWR_COMMON_ON;
> -	writel(cfg, S3C2443_PHYPWR);
> -
> -	cfg = readl(S3C2443_UCLKCON);
> -	cfg |= (S3C2443_UCLKCON_DETECT_VBUS | S3C2443_UCLKCON_FUNC_CLKEN |
> -		S3C2443_UCLKCON_TCLKEN);
> -	writel(cfg, S3C2443_UCLKCON);
> -}
> -
> -static void s3c_hsudc_uninit_phy(void)
> -{
> -	u32 cfg;
> -
> -	cfg = readl(S3C2443_PWRCFG) & ~S3C2443_PWRCFG_USBPHY;
> -	writel(cfg, S3C2443_PWRCFG);
> -
> -	writel(S3C2443_PHYPWR_FSUSPEND, S3C2443_PHYPWR);
> -
> -	cfg = readl(S3C2443_UCLKCON) & ~S3C2443_UCLKCON_FUNC_CLKEN;
> -	writel(cfg, S3C2443_UCLKCON);
> -}
> -
>  /**
>   * s3c_hsudc_complete_request - Complete a transfer request.
>   * @hsep: Endpoint to which the request belongs.
> @@ -1188,7 +1139,8 @@ static int s3c_hsudc_start(struct usb_gadget *gadget,
>  
>  	pm_runtime_get_sync(hsudc->dev);
>  
> -	s3c_hsudc_init_phy();
> +	if (hsudc->pd->phy_init)
> +		hsudc->pd->gpio_init();

Copy paste error - phy_init().

Are here (and in previous usb gadget patch) any dependencies? If so, I
would need an ack to take it through samsung-soc.

Best regards,
Krzysztof

>  	if (hsudc->pd->gpio_init)
>  		hsudc->pd->gpio_init();
>  
> @@ -1210,7 +1162,8 @@ static int s3c_hsudc_stop(struct usb_gadget *gadget)
>  
>  	spin_lock_irqsave(&hsudc->lock, flags);
>  	hsudc->gadget.speed = USB_SPEED_UNKNOWN;
> -	s3c_hsudc_uninit_phy();
> +	if (hsudc->pd->phy_uninit)
> +		hsudc->pd->phy_uninit();
>  
>  	pm_runtime_put(hsudc->dev);
>  
> diff --git a/include/linux/platform_data/s3c-hsudc.h b/include/linux/platform_data/s3c-hsudc.h
> index 4dc9b8760166..a170939832d5 100644
> --- a/include/linux/platform_data/s3c-hsudc.h
> +++ b/include/linux/platform_data/s3c-hsudc.h
> @@ -26,6 +26,8 @@ struct s3c24xx_hsudc_platdata {
>  	unsigned int	epnum;
>  	void		(*gpio_init)(void);
>  	void		(*gpio_uninit)(void);
> +	void		(*phy_init)(void);
> +	void		(*phy_uninit)(void);
>  };
>  
>  #endif	/* __LINUX_USB_S3C_HSUDC_H */
> -- 
> 2.20.0
> 

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 06/36] ARM: samsung: move CONFIG_DEBUG_S3C_UART to Kconfig.debug
  2019-10-10 20:29   ` [PATCH 06/36] ARM: samsung: move CONFIG_DEBUG_S3C_UART to Kconfig.debug Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
@ 2019-10-23 10:12     ` Krzysztof Kozlowski
  2019-10-23 12:22       ` Arnd Bergmann
  1 sibling, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 10:12 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Olof Johansson, Sascha Hauer, Bartlomiej Zolnierkiewicz,
	linux-kernel

On Thu, Oct 10, 2019 at 10:29:50PM +0200, Arnd Bergmann wrote:
> Before we can plat-samsung from the individual platforms,

"Before we can split"? Or moved? What did you want to say here?

Best regards,
Krzysztof

> this one has to get moved to a place where it remains
> accessible.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/Kconfig.debug        | 10 ++++++++++
>  arch/arm/plat-samsung/Kconfig |  8 --------
>  2 files changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 8bcbd0cd739b..d05b836dfeb2 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -1464,6 +1464,16 @@ config DEBUG_S3C64XX_UART
>  config DEBUG_S5PV210_UART
>  	bool
>  
> +config DEBUG_S3C_UART
> +	depends on DEBUG_S3C2410_UART || DEBUG_S3C24XX_UART || \
> +		   DEBUG_S3C64XX_UART ||  DEBUG_S5PV210_UART || \
> +		   DEBUG_EXYNOS_UART
> +	int
> +	default "0" if DEBUG_S3C_UART0
> +	default "1" if DEBUG_S3C_UART1
> +	default "2" if DEBUG_S3C_UART2
> +	default "3" if DEBUG_S3C_UART3
> +
>  config DEBUG_OMAP2PLUS_UART
>  	bool
>  	depends on ARCH_OMAP2PLUS
> diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
> index 301e572651c0..832ab0e6cd72 100644
> --- a/arch/arm/plat-samsung/Kconfig
> +++ b/arch/arm/plat-samsung/Kconfig
> @@ -296,13 +296,5 @@ config SAMSUNG_WDT_RESET
>  	  Compile support for system restart by triggering watchdog reset.
>  	  Used on SoCs that do not provide dedicated reset control.
>  
> -config DEBUG_S3C_UART
> -	depends on PLAT_SAMSUNG
> -	int
> -	default "0" if DEBUG_S3C_UART0
> -	default "1" if DEBUG_S3C_UART1
> -	default "2" if DEBUG_S3C_UART2
> -	default "3" if DEBUG_S3C_UART3
> -
>  endmenu
>  endif
> -- 
> 2.20.0
> 

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 05/36] ARM: samsung: make pm-debug platform independent
  2019-10-10 20:29   ` [PATCH 05/36] ARM: samsung: make pm-debug platform independent Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
@ 2019-10-23 10:27     ` Krzysztof Kozlowski
  2019-10-23 12:13       ` Arnd Bergmann
  1 sibling, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 10:27 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Kyungmin Park, linux-samsung-soc, linux-arm-kernel,
	linus.walleij, Tomasz Figa, linux-kernel

On Thu, Oct 10, 2019 at 10:29:49PM +0200, Arnd Bergmann wrote:
> The pm-debug code is one of the few things shared between s3c24xx/s3c64xx
> and the newer s5pv210. In order to make s5pv210 independent of plat-samsung,
> change the common bits of this code to no longer reference the s3c specific
> bits.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s3c24xx/include/mach/pm-core.h  |  7 +--
>  arch/arm/mach-s3c64xx/include/mach/pm-core.h  | 44 +---------------
>  arch/arm/mach-s3c64xx/pm.c                    | 50 +++++++++++++++++++
>  arch/arm/mach-s5pv210/pm.c                    |  6 +--
>  .../arm/plat-samsung/include/plat/pm-common.h | 29 +++++------
>  arch/arm/plat-samsung/pm-debug.c              | 23 ++-------
>  arch/arm/plat-samsung/pm.c                    | 10 ++--
>  7 files changed, 80 insertions(+), 89 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c24xx/include/mach/pm-core.h b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
> index 5e4ce89d0158..8f87606c4cdc 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/pm-core.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
> @@ -15,6 +15,7 @@
>  
>  static inline void s3c_pm_debug_init_uart(void)
>  {
> +#ifdef CONFIG_SAMSUNG_PM_DEBUG
>  	unsigned long tmp = __raw_readl(S3C2410_CLKCON);
>  
>  	/* re-start uart clocks */
> @@ -24,6 +25,7 @@ static inline void s3c_pm_debug_init_uart(void)
>  
>  	__raw_writel(tmp, S3C2410_CLKCON);
>  	udelay(10);
> +#endif
>  }
>  
>  static inline void s3c_pm_arch_prepare_irqs(void)
> @@ -75,11 +77,6 @@ static inline void s3c_pm_arch_show_resume_irqs(void)
>  				s3c_irqwake_eintmask);
>  }
>  
> -static inline void s3c_pm_arch_update_uart(void __iomem *regs,
> -					   struct pm_uart_save *save)
> -{
> -}
> -
>  static inline void s3c_pm_restored_gpios(void) { }
>  static inline void samsung_pm_saved_gpios(void) { }
>  
> diff --git a/arch/arm/mach-s3c64xx/include/mach/pm-core.h b/arch/arm/mach-s3c64xx/include/mach/pm-core.h
> index bbf79ed28583..33cf242734a0 100644
> --- a/arch/arm/mach-s3c64xx/include/mach/pm-core.h
> +++ b/arch/arm/mach-s3c64xx/include/mach/pm-core.h
> @@ -20,6 +20,7 @@
>  
>  static inline void s3c_pm_debug_init_uart(void)
>  {
> +#ifdef CONFIG_SAMSUNG_PM_DEBUG
>  	u32 tmp = __raw_readl(S3C_PCLK_GATE);
>  
>  	/* As a note, since the S3C64XX UARTs generally have multiple
> @@ -35,6 +36,7 @@ static inline void s3c_pm_debug_init_uart(void)
>  
>  	__raw_writel(tmp, S3C_PCLK_GATE);
>  	udelay(10);
> +#endif
>  }
>  
>  static inline void s3c_pm_arch_prepare_irqs(void)
> @@ -63,48 +65,6 @@ static inline void s3c_pm_arch_show_resume_irqs(void)
>  #define s3c_irqwake_intallow  0
>  #endif
>  
> -static inline void s3c_pm_arch_update_uart(void __iomem *regs,
> -					   struct pm_uart_save *save)
> -{
> -	u32 ucon = __raw_readl(regs + S3C2410_UCON);
> -	u32 ucon_clk = ucon & S3C6400_UCON_CLKMASK;
> -	u32 save_clk = save->ucon & S3C6400_UCON_CLKMASK;
> -	u32 new_ucon;
> -	u32 delta;
> -
> -	/* S3C64XX UART blocks only support level interrupts, so ensure that
> -	 * when we restore unused UART blocks we force the level interrupt
> -	 * settigs. */
> -	save->ucon |= S3C2410_UCON_TXILEVEL | S3C2410_UCON_RXILEVEL;
> -
> -	/* We have a constraint on changing the clock type of the UART
> -	 * between UCLKx and PCLK, so ensure that when we restore UCON
> -	 * that the CLK field is correctly modified if the bootloader
> -	 * has changed anything.
> -	 */
> -	if (ucon_clk != save_clk) {
> -		new_ucon = save->ucon;
> -		delta = ucon_clk ^ save_clk;
> -
> -		/* change from UCLKx => wrong PCLK,
> -		 * either UCLK can be tested for by a bit-test
> -		 * with UCLK0 */
> -		if (ucon_clk & S3C6400_UCON_UCLK0 &&
> -		    !(save_clk & S3C6400_UCON_UCLK0) &&
> -		    delta & S3C6400_UCON_PCLK2) {
> -			new_ucon &= ~S3C6400_UCON_UCLK0;
> -		} else if (delta == S3C6400_UCON_PCLK2) {
> -			/* as an precaution, don't change from
> -			 * PCLK2 => PCLK or vice-versa */
> -			new_ucon ^= S3C6400_UCON_PCLK2;
> -		}
> -
> -		S3C_PMDBG("ucon change %04x => %04x (save=%04x)\n",
> -			  ucon, new_ucon, save->ucon);
> -		save->ucon = new_ucon;
> -	}
> -}
> -
>  static inline void s3c_pm_restored_gpios(void)
>  {
>  	/* ensure sleep mode has been cleared from the system */
> diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c
> index fd6dbb263ed5..a612e9779057 100644
> --- a/arch/arm/mach-s3c64xx/pm.c
> +++ b/arch/arm/mach-s3c64xx/pm.c
> @@ -305,6 +305,56 @@ static void s3c64xx_pm_prepare(void)
>  	__raw_writel(__raw_readl(S3C64XX_WAKEUP_STAT), S3C64XX_WAKEUP_STAT);
>  }
>  
> +#ifdef CONFIG_SAMSUNG_PM_DEBUG
> +void s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save)
> +{
> +	u32 ucon;
> +	u32 ucon_clk
> +	u32 save_clk;
> +	u32 new_ucon;
> +	u32 delta;
> +
> +	if (!soc_is_s3c64xx())
> +		return;
> +
> +	ucon = __raw_readl(regs + S3C2410_UCON);
> +	ucon_clk = ucon & S3C6400_UCON_CLKMASK;
> +	sav_clk = save->ucon & S3C6400_UCON_CLKMASK;
> +
> +	/* S3C64XX UART blocks only support level interrupts, so ensure that
> +	 * when we restore unused UART blocks we force the level interrupt
> +	 * settigs. */
> +	save->ucon |= S3C2410_UCON_TXILEVEL | S3C2410_UCON_RXILEVEL;
> +
> +	/* We have a constraint on changing the clock type of the UART
> +	 * between UCLKx and PCLK, so ensure that when we restore UCON
> +	 * that the CLK field is correctly modified if the bootloader
> +	 * has changed anything.
> +	 */
> +	if (ucon_clk != save_clk) {
> +		new_ucon = save->ucon;
> +		delta = ucon_clk ^ save_clk;
> +
> +		/* change from UCLKx => wrong PCLK,
> +		 * either UCLK can be tested for by a bit-test
> +		 * with UCLK0 */
> +		if (ucon_clk & S3C6400_UCON_UCLK0 &&
> +		    !(save_clk & S3C6400_UCON_UCLK0) &&
> +		    delta & S3C6400_UCON_PCLK2) {
> +			new_ucon &= ~S3C6400_UCON_UCLK0;
> +		} else if (delta == S3C6400_UCON_PCLK2) {
> +			/* as an precaution, don't change from
> +			 * PCLK2 => PCLK or vice-versa */
> +			new_ucon ^= S3C6400_UCON_PCLK2;
> +		}
> +
> +		S3C_PMDBG("ucon change %04x => %04x (save=%04x)\n",
> +			  ucon, new_ucon, save->ucon);
> +		save->ucon = new_ucon;
> +	}
> +}
> +#endif
> +
>  int __init s3c64xx_pm_init(void)
>  {
>  	int i;
> diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c
> index b336df0c57f3..efdb5a27c060 100644
> --- a/arch/arm/mach-s5pv210/pm.c
> +++ b/arch/arm/mach-s5pv210/pm.c
> @@ -99,8 +99,6 @@ static int s5pv210_suspend_enter(suspend_state_t state)
>  	u32 eint_wakeup_mask = s5pv210_read_eint_wakeup_mask();
>  	int ret;
>  
> -	s3c_pm_debug_init();

Your patch is not equivalent here. If there is a reason behind removal
of UART init (e.g. not needed), I prefer to make it in separate patch.

Rest looks good.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 07/36] ARM: exynos: use private samsung_cpu_id copy
  2019-10-10 20:29   ` [PATCH 07/36] ARM: exynos: use private samsung_cpu_id copy Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
@ 2019-10-23 10:54     ` Krzysztof Kozlowski
  2019-10-23 12:37       ` Arnd Bergmann
  1 sibling, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 10:54 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Bartlomiej Zolnierkiewicz, Daniel Lezcano,
	linux-samsung-soc, linux-arm-kernel, linus.walleij, Tomasz Figa,
	Marek Szyprowski, Pankaj Dubey, linux-kernel, linux-pm

On Thu, Oct 10, 2019 at 10:29:51PM +0200, Arnd Bergmann wrote:
> The only part of plat-samsung that is shared with arch-exynos
> is the CPU identification code.
> 
> Having a separate exynos_cpu_id variable makes the two completely
> independent and is actually a bit less code in total.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-exynos/common.h                |  6 +++---
>  arch/arm/mach-exynos/exynos.c                | 19 +++++++++++++++----
>  arch/arm/mach-exynos/include/mach/map.h      | 18 ------------------
>  arch/arm/mach-exynos/platsmp.c               |  4 +---
>  arch/arm/mach-exynos/pm.c                    |  8 ++++----
>  arch/arm/plat-samsung/cpu.c                  | 17 -----------------
>  arch/arm/plat-samsung/include/plat/cpu.h     |  2 --
>  arch/arm/plat-samsung/include/plat/map-s5p.h |  2 --
>  8 files changed, 23 insertions(+), 53 deletions(-)
>  delete mode 100644 arch/arm/mach-exynos/include/mach/map.h
> 
> diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
> index 56411bb63d45..adf7db9c0885 100644
> --- a/arch/arm/mach-exynos/common.h
> +++ b/arch/arm/mach-exynos/common.h
> @@ -24,12 +24,12 @@
>  #define EXYNOS5800_SOC_ID	0xE5422000
>  #define EXYNOS5_SOC_MASK	0xFFFFF000
>  
> -extern unsigned long samsung_cpu_id;
> +extern unsigned long exynos_cpu_id;
>  
>  #define IS_SAMSUNG_CPU(name, id, mask)		\
>  static inline int is_samsung_##name(void)	\
>  {						\
> -	return ((samsung_cpu_id & mask) == (id & mask));	\
> +	return ((exynos_cpu_id & mask) == (id & mask));	\
>  }
>  
>  IS_SAMSUNG_CPU(exynos3250, EXYNOS3250_SOC_ID, EXYNOS3_SOC_MASK)
> @@ -147,7 +147,7 @@ extern struct cpuidle_exynos_data cpuidle_coupled_exynos_data;
>  
>  extern void exynos_set_delayed_reset_assertion(bool enable);
>  
> -extern unsigned int samsung_rev(void);
> +extern unsigned int exynos_rev(void);
>  extern void exynos_core_restart(u32 core_id);
>  extern int exynos_set_boot_addr(u32 core_id, unsigned long boot_addr);
>  extern int exynos_get_boot_addr(u32 core_id, unsigned long *boot_addr);
> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
> index 9aa483366ebc..da9300d655c6 100644
> --- a/arch/arm/mach-exynos/exynos.c
> +++ b/arch/arm/mach-exynos/exynos.c
> @@ -19,11 +19,10 @@
>  #include <asm/mach/arch.h>
>  #include <asm/mach/map.h>
>  
> -#include <mach/map.h>
> -#include <plat/cpu.h>
> -
>  #include "common.h"
>  
> +#define S5P_VA_CHIPID	((void __iomem __force *)0xF8000000)

How about keeping the S3C_VA and S3C_ADDR_BASE macros/defines and using
them? They still appear in arch/arm/include/debug/exynos.S so they could
be integrated into one header, unless you plan to remove it in further
patches.

> +
>  static struct platform_device exynos_cpuidle = {
>  	.name              = "exynos_cpuidle",
>  #ifdef CONFIG_ARM_EXYNOS_CPUIDLE
> @@ -36,6 +35,14 @@ void __iomem *sysram_base_addr __ro_after_init;
>  phys_addr_t sysram_base_phys __ro_after_init;
>  void __iomem *sysram_ns_base_addr __ro_after_init;
>  
> +unsigned long exynos_cpu_id;
> +static unsigned int exynos_cpu_rev;
> +
> +unsigned int exynos_rev(void)
> +{
> +	return exynos_cpu_rev;
> +}
> +
>  void __init exynos_sysram_init(void)
>  {
>  	struct device_node *node;
> @@ -86,7 +93,11 @@ static void __init exynos_init_io(void)
>  	of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
>  
>  	/* detect cpu id and rev. */
> -	s5p_init_cpu(S5P_VA_CHIPID);
> +	exynos_cpu_id = readl_relaxed(S5P_VA_CHIPID);
> +	exynos_cpu_rev = exynos_cpu_id & 0xFF;
> +
> +	pr_info("Samsung CPU ID: 0x%08lx\n", exynos_cpu_id);
> +
>  }
>  
>  /*
> diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
> deleted file mode 100644
> index 22ebe3654633..000000000000
> --- a/arch/arm/mach-exynos/include/mach/map.h
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -/*
> - * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
> - *		http://www.samsung.com/
> - *
> - * EXYNOS - Memory map definitions
> - */
> -
> -#ifndef __ASM_ARCH_MAP_H
> -#define __ASM_ARCH_MAP_H __FILE__
> -
> -#include <plat/map-base.h>
> -
> -#include <plat/map-s5p.h>
> -
> -#define EXYNOS_PA_CHIPID		0x10000000
> -
> -#endif /* __ASM_ARCH_MAP_H */
> diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
> index 0cbbae8bf1f8..d7fedbb2eefe 100644
> --- a/arch/arm/mach-exynos/platsmp.c
> +++ b/arch/arm/mach-exynos/platsmp.c
> @@ -22,8 +22,6 @@
>  #include <asm/smp_scu.h>
>  #include <asm/firmware.h>
>  
> -#include <mach/map.h>
> -
>  #include "common.h"
>  
>  extern void exynos4_secondary_startup(void);
> @@ -188,7 +186,7 @@ void exynos_scu_enable(void)
>  
>  static void __iomem *cpu_boot_reg_base(void)
>  {
> -	if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1)
> +	if (soc_is_exynos4210() && exynos_rev() == EXYNOS4210_REV_1_1)
>  		return pmu_base_addr + S5P_INFORM5;
>  	return sysram_base_addr;
>  }
> diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
> index 48e7fb38613e..624585641a9c 100644
> --- a/arch/arm/mach-exynos/pm.c
> +++ b/arch/arm/mach-exynos/pm.c
> @@ -26,18 +26,18 @@
>  
>  static inline void __iomem *exynos_boot_vector_addr(void)
>  {
> -	if (samsung_rev() == EXYNOS4210_REV_1_1)
> +	if (exynos_rev() == EXYNOS4210_REV_1_1)
>  		return pmu_base_addr + S5P_INFORM7;
> -	else if (samsung_rev() == EXYNOS4210_REV_1_0)
> +	else if (exynos_rev() == EXYNOS4210_REV_1_0)
>  		return sysram_base_addr + 0x24;
>  	return pmu_base_addr + S5P_INFORM0;
>  }
>  
>  static inline void __iomem *exynos_boot_vector_flag(void)
>  {
> -	if (samsung_rev() == EXYNOS4210_REV_1_1)
> +	if (exynos_rev() == EXYNOS4210_REV_1_1)
>  		return pmu_base_addr + S5P_INFORM6;
> -	else if (samsung_rev() == EXYNOS4210_REV_1_0)
> +	else if (exynos_rev() == EXYNOS4210_REV_1_0)
>  		return sysram_base_addr + 0x20;
>  	return pmu_base_addr + S5P_INFORM1;
>  }
> diff --git a/arch/arm/plat-samsung/cpu.c b/arch/arm/plat-samsung/cpu.c
> index e1ba88ba31d8..8acba21bbf4b 100644
> --- a/arch/arm/plat-samsung/cpu.c
> +++ b/arch/arm/plat-samsung/cpu.c
> @@ -14,13 +14,6 @@
>  #include <plat/cpu.h>
>  
>  unsigned long samsung_cpu_id;
> -static unsigned int samsung_cpu_rev;
> -
> -unsigned int samsung_rev(void)
> -{
> -	return samsung_cpu_rev;
> -}
> -EXPORT_SYMBOL(samsung_rev);
>  
>  void __init s3c64xx_init_cpu(void)
>  {
> @@ -34,15 +27,5 @@ void __init s3c64xx_init_cpu(void)
>  		samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0xA1C);
>  	}
>  
> -	samsung_cpu_rev = 0;
> -
> -	pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id);
> -}
> -
> -void __init s5p_init_cpu(const void __iomem *cpuid_addr)
> -{
> -	samsung_cpu_id = readl_relaxed(cpuid_addr);
> -	samsung_cpu_rev = samsung_cpu_id & 0xFF;
> -
>  	pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id);
>  }
> diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
> index fadcddbea064..02d7f991d5a3 100644
> --- a/arch/arm/plat-samsung/include/plat/cpu.h
> +++ b/arch/arm/plat-samsung/include/plat/cpu.h
> @@ -111,8 +111,6 @@ extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
>  extern void s3c64xx_init_cpu(void);
>  extern void s5p_init_cpu(const void __iomem *cpuid_addr);

You can remove it as well.

Best regards,
Krzysztof

>  
> -extern unsigned int samsung_rev(void);
> -
>  extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
>  
>  extern void s3c24xx_init_clocks(int xtal);
> diff --git a/arch/arm/plat-samsung/include/plat/map-s5p.h b/arch/arm/plat-samsung/include/plat/map-s5p.h
> index d69a0ca09fb5..3812085f8761 100644
> --- a/arch/arm/plat-samsung/include/plat/map-s5p.h
> +++ b/arch/arm/plat-samsung/include/plat/map-s5p.h
> @@ -9,8 +9,6 @@
>  #ifndef __ASM_PLAT_MAP_S5P_H
>  #define __ASM_PLAT_MAP_S5P_H __FILE__
>  
> -#define S5P_VA_CHIPID		S3C_ADDR(0x02000000)
> -
>  #define VA_VIC(x)		(S3C_VA_IRQ + ((x) * 0x10000))
>  #define VA_VIC0			VA_VIC(0)
>  #define VA_VIC1			VA_VIC(1)
> -- 
> 2.20.0
> 

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 08/36] ARM: exynos: stop selecting PLAT_SAMSUNG
  2019-10-10 20:29   ` [PATCH 08/36] ARM: exynos: stop selecting PLAT_SAMSUNG Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-15 14:12     ` Ulf Hansson
@ 2019-10-23 10:57     ` Krzysztof Kozlowski
  2019-10-23 12:43       ` Arnd Bergmann
  2 siblings, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 10:57 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Ulf Hansson, linux-samsung-soc, linux-arm-kernel,
	linus.walleij, Olof Johansson, Sascha Hauer,
	Bartlomiej Zolnierkiewicz, Enrico Weigelt, metux IT consult,
	linux-kernel, linux-mmc

On Thu, Oct 10, 2019 at 10:29:52PM +0200, Arnd Bergmann wrote:
> Now that no code in arch/arm is shared between mach-exynos and the
> others, make the split formal.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/Kconfig.debug        | 8 ++++----
>  arch/arm/Makefile             | 1 -
>  arch/arm/mach-exynos/Makefile | 4 ----
>  arch/arm/plat-samsung/Kconfig | 4 ++--
>  drivers/mmc/host/Kconfig      | 2 +-
>  5 files changed, 7 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index d05b836dfeb2..9c4f2d6deb06 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -998,7 +998,7 @@ choice
>  		  via SCIFA4 on Renesas SH-Mobile AG5 (SH73A0).
>  
>  	config DEBUG_S3C_UART0
> -		depends on PLAT_SAMSUNG
> +		depends on PLAT_SAMSUNG || ARCH_EXYNOS
>  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>  		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1010,7 +1010,7 @@ choice
>  		  by the boot-loader before use.
>  
>  	config DEBUG_S3C_UART1
> -		depends on PLAT_SAMSUNG
> +		depends on PLAT_SAMSUNG || ARCH_EXYNOS
>  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>  		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1022,7 +1022,7 @@ choice
>  		  by the boot-loader before use.
>  
>  	config DEBUG_S3C_UART2
> -		depends on PLAT_SAMSUNG
> +		depends on PLAT_SAMSUNG || ARCH_EXYNOS
>  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>  		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1034,7 +1034,7 @@ choice
>  		  by the boot-loader before use.
>  
>  	config DEBUG_S3C_UART3
> -		depends on PLAT_SAMSUNG && (ARCH_EXYNOS || ARCH_S5PV210)
> +		depends on ARCH_EXYNOS || ARCH_S5PV210

You need to keep PLAT_SAMSUNG because of additional architectures, so
follow pattern from DEBUG_S3C_UART2.

Best regards,
Krzysztof

>  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>  		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
>  		select DEBUG_S5PV210_UART if ARCH_S5PV210
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index db857d07114f..f492d7c338fe 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -233,7 +233,6 @@ machine-$(CONFIG_PLAT_SPEAR)		+= spear
>  
>  # Platform directory name.  This list is sorted alphanumerically
>  # by CONFIG_* macro name.
> -plat-$(CONFIG_ARCH_EXYNOS)	+= samsung
>  plat-$(CONFIG_ARCH_OMAP)	+= omap
>  plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
>  plat-$(CONFIG_ARCH_S5PV210)	+= samsung
> diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
> index 0fd3fcf8bfb0..53fa363c8e44 100644
> --- a/arch/arm/mach-exynos/Makefile
> +++ b/arch/arm/mach-exynos/Makefile
> @@ -3,10 +3,6 @@
>  # Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
>  #		http://www.samsung.com/
>  
> -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/$(src)/include -I$(srctree)/arch/arm/plat-samsung/include
> -
> -# Core
> -
>  obj-$(CONFIG_ARCH_EXYNOS)	+= exynos.o exynos-smc.o firmware.o
>  
>  obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm.o sleep.o
> diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
> index 832ab0e6cd72..e31a156a27df 100644
> --- a/arch/arm/plat-samsung/Kconfig
> +++ b/arch/arm/plat-samsung/Kconfig
> @@ -4,7 +4,7 @@
>  
>  config PLAT_SAMSUNG
>  	bool
> -	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_EXYNOS || ARCH_S5PV210
> +	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
>  	default y
>  	select GENERIC_IRQ_CHIP
>  	select NO_IOPORT_MAP
> @@ -240,7 +240,7 @@ config SAMSUNG_PM_DEBUG
>  	bool "Samsung PM Suspend debug"
>  	depends on PM && DEBUG_KERNEL
>  	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
> -	depends on DEBUG_EXYNOS_UART || DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
> +	depends on DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
>  	help
>  	  Say Y here if you want verbose debugging from the PM Suspend and
>  	  Resume code. See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index 49ea02c467bf..400a581c918c 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -275,7 +275,7 @@ config MMC_SDHCI_TEGRA
>  
>  config MMC_SDHCI_S3C
>  	tristate "SDHCI support on Samsung S3C SoC"
> -	depends on MMC_SDHCI && PLAT_SAMSUNG
> +	depends on MMC_SDHCI && (PLAT_SAMSUNG || ARCH_EXYNOS)
>  	help
>  	  This selects the Secure Digital Host Controller Interface (SDHCI)
>  	  often referrered to as the HSMMC block in some of the Samsung S3C
> -- 
> 2.20.0
> 

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 09/36] ARM: samsung: move pm check code to drivers/soc
  2019-10-10 20:29   ` [PATCH 09/36] ARM: samsung: move pm check code to drivers/soc Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
@ 2019-10-23 11:32     ` Krzysztof Kozlowski
  2019-10-23 12:45       ` Arnd Bergmann
  1 sibling, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 11:32 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Kyungmin Park, linux-samsung-soc, linux-arm-kernel,
	linus.walleij, Mauro Carvalho Chehab, Bartlomiej Zolnierkiewicz,
	Sylwester Nawrocki, Pankaj Dubey, Marek Szyprowski, linux-kernel

On Thu, Oct 10, 2019 at 10:29:53PM +0200, Arnd Bergmann wrote:
> This is the only part of plat-samsung that is really
> shared between the s3c and s5p ports. Moving it to
> drivers/soc/ lets us make them completely independent.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s5pv210/Kconfig                 |  1 +
>  arch/arm/plat-samsung/Kconfig                 | 49 +----------
>  arch/arm/plat-samsung/Makefile                |  2 -
>  .../arm/plat-samsung/include/plat/pm-common.h | 70 +---------------
>  drivers/soc/samsung/Kconfig                   | 48 ++++++++++-
>  drivers/soc/samsung/Makefile                  |  3 +
>  .../soc/samsung/s3c-pm-check.c                |  2 +-
>  .../soc/samsung/s3c-pm-debug.c                |  3 +-
>  include/linux/soc/samsung/s3c-pm.h            | 84 +++++++++++++++++++
>  9 files changed, 139 insertions(+), 123 deletions(-)
>  rename arch/arm/plat-samsung/pm-check.c => drivers/soc/samsung/s3c-pm-check.c (99%)
>  rename arch/arm/plat-samsung/pm-debug.c => drivers/soc/samsung/s3c-pm-debug.c (97%)
>  create mode 100644 include/linux/soc/samsung/s3c-pm.h
> 
> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
> index 03984a791879..d2b0e64bad7e 100644
> --- a/arch/arm/mach-s5pv210/Kconfig
> +++ b/arch/arm/mach-s5pv210/Kconfig
> @@ -18,6 +18,7 @@ config ARCH_S5PV210
>  	select HAVE_S3C_RTC if RTC_CLASS
>  	select PINCTRL
>  	select PINCTRL_EXYNOS
> +	select SOC_SAMSUNG
>  	help
>  	  Samsung S5PV210/S5PC110 series based systems
>  
> diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
> index e31a156a27df..740bdb23f38a 100644
> --- a/arch/arm/plat-samsung/Kconfig
> +++ b/arch/arm/plat-samsung/Kconfig
> @@ -8,6 +8,7 @@ config PLAT_SAMSUNG
>  	default y
>  	select GENERIC_IRQ_CHIP
>  	select NO_IOPORT_MAP
> +	select SOC_SAMSUNG
>  	help
>  	  Base platform code for all Samsung SoC based systems
>  
> @@ -234,54 +235,6 @@ config SAMSUNG_PM_GPIO
>  	  pinctrl-samsung driver.
>  endif
>  
> -comment "Power management"
> -
> -config SAMSUNG_PM_DEBUG
> -	bool "Samsung PM Suspend debug"
> -	depends on PM && DEBUG_KERNEL
> -	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
> -	depends on DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
> -	help
> -	  Say Y here if you want verbose debugging from the PM Suspend and
> -	  Resume code. See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
> -	  for more information.
> -
> -config S3C_PM_DEBUG_LED_SMDK
> -       bool "SMDK LED suspend/resume debugging"
> -       depends on PM && (MACH_SMDK6410)
> -       help
> -         Say Y here to enable the use of the SMDK LEDs on the baseboard
> -	 for debugging of the state of the suspend and resume process.
> -
> -	 Note, this currently only works for S3C64XX based SMDK boards.
> -
> -config SAMSUNG_PM_CHECK
> -	bool "S3C2410 PM Suspend Memory CRC"
> -	depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210)
> -	select CRC32
> -	help
> -	  Enable the PM code's memory area checksum over sleep. This option
> -	  will generate CRCs of all blocks of memory, and store them before
> -	  going to sleep. The blocks are then checked on resume for any
> -	  errors.
> -
> -	  Note, this can take several seconds depending on memory size
> -	  and CPU speed.
> -
> -	  See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
> -
> -config SAMSUNG_PM_CHECK_CHUNKSIZE
> -	int "S3C2410 PM Suspend CRC Chunksize (KiB)"
> -	depends on PM && SAMSUNG_PM_CHECK
> -	default 64
> -	help
> -	  Set the chunksize in Kilobytes of the CRC for checking memory
> -	  corruption over suspend and resume. A smaller value will mean that
> -	  the CRC data block will take more memory, but will identify any
> -	  faults with better precision.
> -
> -	  See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
> -
>  config SAMSUNG_WAKEMASK
>  	bool
>  	depends on PM
> diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
> index 3db9d2c38258..d88b9b84f3a9 100644
> --- a/arch/arm/plat-samsung/Makefile
> +++ b/arch/arm/plat-samsung/Makefile
> @@ -28,8 +28,6 @@ obj-$(CONFIG_PM_SLEEP)		+= pm-common.o
>  obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm-common.o
>  obj-$(CONFIG_SAMSUNG_PM)	+= pm.o
>  obj-$(CONFIG_SAMSUNG_PM_GPIO)	+= pm-gpio.o
> -obj-$(CONFIG_SAMSUNG_PM_CHECK)	+= pm-check.o
> -obj-$(CONFIG_SAMSUNG_PM_DEBUG)	+= pm-debug.o
>  
>  obj-$(CONFIG_SAMSUNG_WAKEMASK)	+= wakeup-mask.o
>  obj-$(CONFIG_SAMSUNG_WDT_RESET)	+= watchdog-reset.o
> diff --git a/arch/arm/plat-samsung/include/plat/pm-common.h b/arch/arm/plat-samsung/include/plat/pm-common.h
> index 87fa97fd6e8b..18b9607e1e39 100644
> --- a/arch/arm/plat-samsung/include/plat/pm-common.h
> +++ b/arch/arm/plat-samsung/include/plat/pm-common.h
> @@ -11,6 +11,7 @@
>  #define __PLAT_SAMSUNG_PM_COMMON_H __FILE__
>  
>  #include <linux/irq.h>
> +#include <linux/soc/samsung/s3c-pm.h>
>  
>  /* sleep save info */
>  
> @@ -36,73 +37,4 @@ extern void s3c_pm_do_save(struct sleep_save *ptr, int count);
>  extern void s3c_pm_do_restore(const struct sleep_save *ptr, int count);
>  extern void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count);
>  
> -/* PM debug functions */
> -
> -/**
> - * struct pm_uart_save - save block for core UART
> - * @ulcon: Save value for S3C2410_ULCON
> - * @ucon: Save value for S3C2410_UCON
> - * @ufcon: Save value for S3C2410_UFCON
> - * @umcon: Save value for S3C2410_UMCON
> - * @ubrdiv: Save value for S3C2410_UBRDIV
> - *
> - * Save block for UART registers to be held over sleep and restored if they
> - * are needed (say by debug).
> -*/
> -struct pm_uart_save {
> -	u32	ulcon;
> -	u32	ucon;
> -	u32	ufcon;
> -	u32	umcon;
> -	u32	ubrdiv;
> -	u32	udivslot;
> -};
> -
> -#ifdef CONFIG_SAMSUNG_PM_DEBUG
> -/**
> - * s3c_pm_dbg() - low level debug function for use in suspend/resume.
> - * @msg: The message to print.
> - *
> - * This function is used mainly to debug the resume process before the system
> - * can rely on printk/console output. It uses the low-level debugging output
> - * routine printascii() to do its work.
> - */
> -extern void s3c_pm_dbg(const char *msg, ...);
> -
> -#define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt)
> -
> -extern void s3c_pm_save_uarts(bool is_s3c24xx);
> -extern void s3c_pm_restore_uarts(bool is_s3c24xx);
> -
> -#ifdef CONFIG_ARCH_S3C64XX
> -extern void s3c_pm_arch_update_uart(void __iomem *regs,
> -				    struct pm_uart_save *save);
> -#else
> -static inline void
> -s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save)
> -{
> -}
> -#endif
> -
> -#else
> -#define S3C_PMDBG(fmt...) pr_debug(fmt)
> -
> -static inline void s3c_pm_save_uarts(bool is_s3c24xx) { }
> -static inline void s3c_pm_restore_uarts(bool is_s3c24xx) { }
> -#endif
> -
> -/* suspend memory checking */
> -
> -#ifdef CONFIG_SAMSUNG_PM_CHECK
> -extern void s3c_pm_check_prepare(void);
> -extern void s3c_pm_check_restore(void);
> -extern void s3c_pm_check_cleanup(void);
> -extern void s3c_pm_check_store(void);
> -#else
> -#define s3c_pm_check_prepare() do { } while (0)
> -#define s3c_pm_check_restore() do { } while (0)
> -#define s3c_pm_check_cleanup() do { } while (0)
> -#define s3c_pm_check_store()   do { } while (0)
> -#endif
> -
>  #endif
> diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig
> index 33ad0de2de3c..0ea7402ffba3 100644
> --- a/drivers/soc/samsung/Kconfig
> +++ b/drivers/soc/samsung/Kconfig
> @@ -25,6 +25,52 @@ config EXYNOS_PMU_ARM_DRIVERS
>  
>  config EXYNOS_PM_DOMAINS
>  	bool "Exynos PM domains" if COMPILE_TEST
> -	depends on PM_GENERIC_DOMAINS || COMPILE_TEST
> +	depends on (ARCH_EXYNOS && PM_GENERIC_DOMAINS) || COMPILE_TEST
> +
> +config SAMSUNG_PM_DEBUG
> +	bool "Samsung PM Suspend debug"
> +	depends on PM && DEBUG_KERNEL
> +	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
> +	depends on DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
> +	help
> +	  Say Y here if you want verbose debugging from the PM Suspend and
> +	  Resume code. See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
> +	  for more information.
> +
> +config S3C_PM_DEBUG_LED_SMDK
> +       bool "SMDK LED suspend/resume debugging"
> +       depends on PM && (MACH_SMDK6410)
> +       help
> +         Say Y here to enable the use of the SMDK LEDs on the baseboard
> +	 for debugging of the state of the suspend and resume process.
> +
> +	 Note, this currently only works for S3C64XX based SMDK boards.
> +
> +config SAMSUNG_PM_CHECK
> +	bool "S3C2410 PM Suspend Memory CRC"
> +	depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210)
> +	select CRC32
> +	help
> +	  Enable the PM code's memory area checksum over sleep. This option
> +	  will generate CRCs of all blocks of memory, and store them before
> +	  going to sleep. The blocks are then checked on resume for any
> +	  errors.
> +
> +	  Note, this can take several seconds depending on memory size
> +	  and CPU speed.
> +
> +	  See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
> +
> +config SAMSUNG_PM_CHECK_CHUNKSIZE
> +	int "S3C2410 PM Suspend CRC Chunksize (KiB)"
> +	depends on PM && SAMSUNG_PM_CHECK
> +	default 64
> +	help
> +	  Set the chunksize in Kilobytes of the CRC for checking memory
> +	  corruption over suspend and resume. A smaller value will mean that
> +	  the CRC data block will take more memory, but will identify any
> +	  faults with better precision.
> +
> +	  See <file:Documentation/arm/samsung-s3c24xx/suspend.rst>
>  
>  endif
> diff --git a/drivers/soc/samsung/Makefile b/drivers/soc/samsung/Makefile
> index 3b6a8797416c..88ae7a522055 100644
> --- a/drivers/soc/samsung/Makefile
> +++ b/drivers/soc/samsung/Makefile
> @@ -6,3 +6,6 @@ obj-$(CONFIG_EXYNOS_PMU)	+= exynos-pmu.o
>  obj-$(CONFIG_EXYNOS_PMU_ARM_DRIVERS)	+= exynos3250-pmu.o exynos4-pmu.o \
>  					exynos5250-pmu.o exynos5420-pmu.o
>  obj-$(CONFIG_EXYNOS_PM_DOMAINS) += pm_domains.o
> +
> +obj-$(CONFIG_SAMSUNG_PM_CHECK)	+= s3c-pm-check.o
> +obj-$(CONFIG_SAMSUNG_PM_DEBUG)	+= s3c-pm-debug.o
> diff --git a/arch/arm/plat-samsung/pm-check.c b/drivers/soc/samsung/s3c-pm-check.c
> similarity index 99%
> rename from arch/arm/plat-samsung/pm-check.c
> rename to drivers/soc/samsung/s3c-pm-check.c
> index cd2c02c68bc3..ff3e099fc208 100644
> --- a/arch/arm/plat-samsung/pm-check.c
> +++ b/drivers/soc/samsung/s3c-pm-check.c
> @@ -15,7 +15,7 @@
>  #include <linux/ioport.h>
>  #include <linux/slab.h>
>  
> -#include <plat/pm-common.h>
> +#include <linux/soc/samsung/s3c-pm.h>
>  
>  #if CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE < 1
>  #error CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE must be a positive non-zero value
> diff --git a/arch/arm/plat-samsung/pm-debug.c b/drivers/soc/samsung/s3c-pm-debug.c
> similarity index 97%
> rename from arch/arm/plat-samsung/pm-debug.c
> rename to drivers/soc/samsung/s3c-pm-debug.c
> index 482d53753e93..b5ce0e9a41e5 100644
> --- a/arch/arm/plat-samsung/pm-debug.c
> +++ b/drivers/soc/samsung/s3c-pm-debug.c
> @@ -15,8 +15,7 @@
>  
>  #include <asm/mach/map.h>
>  
> -#include <plat/cpu.h>
> -#include <plat/pm-common.h>
> +#include <linux/soc/samsung/s3c-pm.h>
>  
>  static struct pm_uart_save uart_save;
>  
> diff --git a/include/linux/soc/samsung/s3c-pm.h b/include/linux/soc/samsung/s3c-pm.h
> new file mode 100644
> index 000000000000..d477b314d034
> --- /dev/null
> +++ b/include/linux/soc/samsung/s3c-pm.h
> @@ -0,0 +1,84 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Copyright (C) 2013 Samsung Electronics Co., Ltd.
> + *	Tomasz Figa <t.figa@samsung.com>
> + * Copyright (c) 2004 Simtec Electronics
> + *	http://armlinux.simtec.co.uk/
> + *	Written by Ben Dooks, <ben@simtec.co.uk>
> + */
> +
> +#ifndef __SAMSUNG_SOC_S3C_PM_H
> +#define __SAMSUNG_SOC_S3C_PM_H __FILE__

Use guard name prefix consistent with other files, so:
__LINUX_SOC_SAMSUNG_S3C_PM_H

Rest looks good.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 10/36] ARM: s5pv210: use private pm save/restore
  2019-10-10 20:29   ` [PATCH 10/36] ARM: s5pv210: use private pm save/restore Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
@ 2019-10-23 11:55     ` Krzysztof Kozlowski
  2019-10-23 13:12       ` Arnd Bergmann
  1 sibling, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 11:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Kyungmin Park, linux-samsung-soc, linux-arm-kernel,
	linus.walleij, Tomasz Figa, linux-kernel

On Thu, Oct 10, 2019 at 10:29:54PM +0200, Arnd Bergmann wrote:
> The pm save/restore code is fairly small, so in order to
> separate the s3c and s5p platforms, adding an s5p specific
> copy instead of sharing it is actually easier.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s5pv210/Makefile     |  7 -----
>  arch/arm/mach-s5pv210/pm.c         | 45 ++++++++++++++++++++++++++++--
>  arch/arm/mach-s5pv210/regs-clock.h |  2 +-
>  arch/arm/mach-s5pv210/s5pv210.c    |  2 --
>  arch/arm/plat-samsung/Makefile     |  4 +--
>  5 files changed, 45 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile
> index e7b551e18e5c..aa0a1f091daf 100644
> --- a/arch/arm/mach-s5pv210/Makefile
> +++ b/arch/arm/mach-s5pv210/Makefile
> @@ -3,12 +3,5 @@
>  # Copyright (c) 2010 Samsung Electronics Co., Ltd.
>  # 		http://www.samsung.com/
>  
> -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) += -I$(srctree)/arch/arm/plat-samsung/include
> -
> -# Core
> -
>  obj-$(CONFIG_PM_SLEEP)		+= pm.o sleep.o
> -
> -# machine support
> -
>  obj-y				+= s5pv210.o
> diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c
> index efdb5a27c060..d59c094cdea8 100644
> --- a/arch/arm/mach-s5pv210/pm.c
> +++ b/arch/arm/mach-s5pv210/pm.c
> @@ -13,15 +13,56 @@
>  #include <linux/suspend.h>
>  #include <linux/syscore_ops.h>
>  #include <linux/io.h>
> +#include <linux/soc/samsung/s3c-pm.h>
>  
>  #include <asm/cacheflush.h>
>  #include <asm/suspend.h>
>  
> -#include <plat/pm-common.h>
> -
>  #include "common.h"
>  #include "regs-clock.h"
>  
> +/* helper functions to save and restore register state */
> +struct sleep_save {
> +	void __iomem	*reg;
> +	unsigned long	val;
> +};
> +
> +#define SAVE_ITEM(x) \
> +	{ .reg = (x) }
> +
> +/**
> + * s3c_pm_do_save() - save a set of registers for restoration on resume.
> + * @ptr: Pointer to an array of registers.
> + * @count: Size of the ptr array.
> + *
> + * Run through the list of registers given, saving their contents in the
> + * array for later restoration when we wakeup.
> + */
> +static void s3c_pm_do_save(struct sleep_save *ptr, int count)
> +{
> +	for (; count > 0; count--, ptr++) {
> +		ptr->val = readl_relaxed(ptr->reg);
> +		S3C_PMDBG("saved %p value %08lx\n", ptr->reg, ptr->val);
> +	}
> +}
> +
> +/**
> + * s3c_pm_do_restore() - restore register values from the save list.
> + * @ptr: Pointer to an array of registers.
> + * @count: Size of the ptr array.
> + *
> + * Restore the register values saved from s3c_pm_do_save().
> + *
> + * WARNING: Do not put any debug in here that may effect memory or use
> + * peripherals, as things may be changing!
> +*/
> +
> +static void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count)
> +{
> +	for (; count > 0; count--, ptr++)
> +		writel_relaxed(ptr->val, ptr->reg);
> +}
> +
>  static struct sleep_save s5pv210_core_save[] = {
>  	/* Clock ETC */
>  	SAVE_ITEM(S5P_MDNIE_SEL),
> diff --git a/arch/arm/mach-s5pv210/regs-clock.h b/arch/arm/mach-s5pv210/regs-clock.h
> index 2a35c831a9b0..8c7530614e37 100644
> --- a/arch/arm/mach-s5pv210/regs-clock.h
> +++ b/arch/arm/mach-s5pv210/regs-clock.h
> @@ -9,7 +9,7 @@
>  #ifndef __ASM_ARCH_REGS_CLOCK_H
>  #define __ASM_ARCH_REGS_CLOCK_H __FILE__
>  
> -#include <plat/map-base.h>
> +#define S3C_VA_SYS		((void __iomem __force *)0xF6100000)

The same as for one of earlier patches - I prefer to keep the S3C_ADDR()
macro for consistency.

>  
>  #define S5P_CLKREG(x)		(S3C_VA_SYS + (x))
>  
> diff --git a/arch/arm/mach-s5pv210/s5pv210.c b/arch/arm/mach-s5pv210/s5pv210.c
> index 868f9c20419d..a21ed3bb992a 100644
> --- a/arch/arm/mach-s5pv210/s5pv210.c
> +++ b/arch/arm/mach-s5pv210/s5pv210.c
> @@ -13,8 +13,6 @@
>  #include <asm/mach/map.h>
>  #include <asm/system_misc.h>
>  
> -#include <plat/map-base.h>
> -
>  #include "common.h"
>  #include "regs-clock.h"
>  
> diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
> index d88b9b84f3a9..025ce22876c1 100644
> --- a/arch/arm/plat-samsung/Makefile
> +++ b/arch/arm/plat-samsung/Makefile
> @@ -24,9 +24,7 @@ obj-$(CONFIG_GPIO_SAMSUNG)     += gpio-samsung.o
>  
>  # PM support
>  
> -obj-$(CONFIG_PM_SLEEP)		+= pm-common.o
> -obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm-common.o

CONFIG_EXYNOS_CPU_SUSPEND looks unrelated and seems to be not needed at
all. Can you remove it in separate patch?

Best regards,
Krzysztof


> -obj-$(CONFIG_SAMSUNG_PM)	+= pm.o
> +obj-$(CONFIG_SAMSUNG_PM)	+= pm.o pm-common.o
>  obj-$(CONFIG_SAMSUNG_PM_GPIO)	+= pm-gpio.o
>  
>  obj-$(CONFIG_SAMSUNG_WAKEMASK)	+= wakeup-mask.o
> -- 
> 2.20.0
> 

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 05/36] ARM: samsung: make pm-debug platform independent
  2019-10-23 10:27     ` Krzysztof Kozlowski
@ 2019-10-23 12:13       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 12:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Kukjin Kim, Kyungmin Park,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, Linux ARM,
	Linus Walleij, Tomasz Figa, linux-kernel

On Wed, Oct 23, 2019 at 12:27 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Oct 10, 2019 at 10:29:49PM +0200, Arnd Bergmann wrote:
> > diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c
> > index b336df0c57f3..efdb5a27c060 100644
> > --- a/arch/arm/mach-s5pv210/pm.c
> > +++ b/arch/arm/mach-s5pv210/pm.c
> > @@ -99,8 +99,6 @@ static int s5pv210_suspend_enter(suspend_state_t state)
> >       u32 eint_wakeup_mask = s5pv210_read_eint_wakeup_mask();
> >       int ret;
> >
> > -     s3c_pm_debug_init();
>
> Your patch is not equivalent here. If there is a reason behind removal
> of UART init (e.g. not needed), I prefer to make it in separate patch.

It is equivalent, but the reason is a bit subtle:

The definition looks like

#ifdef CONFIG_SAMSUNG_ATAGS
#include <plat/pm.h>
#include <mach/pm-core.h>
#else
static inline void s3c_pm_debug_init_uart(void) {}
#endif
void s3c_pm_debug_init(void)
{
        /* restart uart clocks so we can use them to output */
        s3c_pm_debug_init_uart();
}

On s5pv210, CONFIG_SAMSUNG_ATAGS is never set, so this
function does not do anything. Splitting the change out into a
separate patch to explain that is a good idea, I'll do this.

        Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 11/36] ARM: s5pv210: split from plat-samsung
  2019-10-10 20:29   ` [PATCH 11/36] ARM: s5pv210: split from plat-samsung Arnd Bergmann
                       ` (3 preceding siblings ...)
  2019-10-15 14:23     ` Thierry Reding
@ 2019-10-23 12:14     ` Krzysztof Kozlowski
  2019-10-23 13:17       ` Arnd Bergmann
  4 siblings, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 12:14 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Ulf Hansson, Thierry Reding, Mark Brown,
	Greg Kroah-Hartman, Jiri Slaby, Sangbeom Kim, Sylwester Nawrocki,
	Liam Girdwood, linux-samsung-soc, linux-arm-kernel,
	linus.walleij, Uwe Kleine-König, Jaroslav Kysela,
	Takashi Iwai, Olof Johansson, Sascha Hauer,
	Clément Péron, Mauro Carvalho Chehab,
	Bartlomiej Zolnierkiewicz, Faiz Abbas, linux-kernel, linux-mmc,
	linux-pwm, linux-spi, linux-serial, alsa-devel

On Thu, Oct 10, 2019 at 10:29:55PM +0200, Arnd Bergmann wrote:
> These can be build completely independently, so split
> the two Kconfig symbols.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/Kconfig.debug        | 6 +++---
>  arch/arm/Makefile             | 1 -
>  arch/arm/plat-samsung/Kconfig | 2 +-
>  drivers/mmc/host/Kconfig      | 2 +-
>  drivers/pwm/Kconfig           | 2 +-
>  drivers/spi/Kconfig           | 2 +-
>  drivers/tty/serial/Kconfig    | 2 +-
>  sound/soc/samsung/Kconfig     | 2 +-
>  8 files changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 9c4f2d6deb06..4c4e97ae4fcb 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -998,7 +998,7 @@ choice
>  		  via SCIFA4 on Renesas SH-Mobile AG5 (SH73A0).
>  
>  	config DEBUG_S3C_UART0
> -		depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS

How are you going to select DEBUG_S5PV210_UART now?

Best regards,
Krzysztof


>  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>  		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1010,7 +1010,7 @@ choice
>  		  by the boot-loader before use.
>  
>  	config DEBUG_S3C_UART1
> -		depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>  		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> @@ -1022,7 +1022,7 @@ choice
>  		  by the boot-loader before use.
>  
>  	config DEBUG_S3C_UART2
> -		depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +		depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>  		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>  		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>  		select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index f492d7c338fe..a1bc15cda751 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -235,7 +235,6 @@ machine-$(CONFIG_PLAT_SPEAR)		+= spear
>  # by CONFIG_* macro name.
>  plat-$(CONFIG_ARCH_OMAP)	+= omap
>  plat-$(CONFIG_ARCH_S3C64XX)	+= samsung
> -plat-$(CONFIG_ARCH_S5PV210)	+= samsung
>  plat-$(CONFIG_PLAT_ORION)	+= orion
>  plat-$(CONFIG_PLAT_PXA)		+= pxa
>  plat-$(CONFIG_PLAT_S3C24XX)	+= samsung
> diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
> index 740bdb23f38a..1530946cc672 100644
> --- a/arch/arm/plat-samsung/Kconfig
> +++ b/arch/arm/plat-samsung/Kconfig
> @@ -4,7 +4,7 @@
>  
>  config PLAT_SAMSUNG
>  	bool
> -	depends on PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210
> +	depends on PLAT_S3C24XX || ARCH_S3C64XX
>  	default y
>  	select GENERIC_IRQ_CHIP
>  	select NO_IOPORT_MAP
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index 400a581c918c..16a0e5430b44 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -275,7 +275,7 @@ config MMC_SDHCI_TEGRA
>  
>  config MMC_SDHCI_S3C
>  	tristate "SDHCI support on Samsung S3C SoC"
> -	depends on MMC_SDHCI && (PLAT_SAMSUNG || ARCH_EXYNOS)
> +	depends on MMC_SDHCI && (PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS)
>  	help
>  	  This selects the Secure Digital Host Controller Interface (SDHCI)
>  	  often referrered to as the HSMMC block in some of the Samsung S3C
> diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
> index e3a2518503ed..8eb738cac0c7 100644
> --- a/drivers/pwm/Kconfig
> +++ b/drivers/pwm/Kconfig
> @@ -394,7 +394,7 @@ config PWM_ROCKCHIP
>  
>  config PWM_SAMSUNG
>  	tristate "Samsung PWM support"
> -	depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +	depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>  	help
>  	  Generic PWM framework driver for Samsung.
>  
> diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
> index 6f7fdcbb9151..355391ee643d 100644
> --- a/drivers/spi/Kconfig
> +++ b/drivers/spi/Kconfig
> @@ -625,7 +625,7 @@ config SPI_S3C24XX_FIQ
>  
>  config SPI_S3C64XX
>  	tristate "Samsung S3C64XX series type SPI"
> -	depends on (PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST)
> +	depends on (PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST)
>  	help
>  	  SPI driver for Samsung S3C64XX and newer SoCs.
>  
> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> index 4789b5d62f63..17f01cf3009c 100644
> --- a/drivers/tty/serial/Kconfig
> +++ b/drivers/tty/serial/Kconfig
> @@ -237,7 +237,7 @@ config SERIAL_CLPS711X_CONSOLE
>  
>  config SERIAL_SAMSUNG
>  	tristate "Samsung SoC serial support"
> -	depends on PLAT_SAMSUNG || ARCH_EXYNOS
> +	depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>  	select SERIAL_CORE
>  	help
>  	  Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,
> diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
> index 638983123d8f..7a0035dd9995 100644
> --- a/sound/soc/samsung/Kconfig
> +++ b/sound/soc/samsung/Kconfig
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  menuconfig SND_SOC_SAMSUNG
>  	tristate "ASoC support for Samsung"
> -	depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST
> +	depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
>  	depends on COMMON_CLK
>  	select SND_SOC_GENERIC_DMAENGINE_PCM
>  	---help---
> -- 
> 2.20.0
> 

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 04/36] usb: gadget: s3c-hsudc: remove platform header dependency
  2019-10-23 10:09     ` Krzysztof Kozlowski
@ 2019-10-23 12:21       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 12:21 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Kukjin Kim, Felipe Balbi, Greg Kroah-Hartman,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, Linux ARM,
	Linus Walleij, linux-kernel, USB list

On Wed, Oct 23, 2019 at 12:10 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Oct 10, 2019 at 10:29:48PM +0200, Arnd Bergmann wrote:
> > @@ -1188,7 +1139,8 @@ static int s3c_hsudc_start(struct usb_gadget *gadget,
> >
> >       pm_runtime_get_sync(hsudc->dev);
> >
> > -     s3c_hsudc_init_phy();
> > +     if (hsudc->pd->phy_init)
> > +             hsudc->pd->gpio_init();
>
> Copy paste error - phy_init().

Fixed, thanks!

> Are here (and in previous usb gadget patch) any dependencies? If so, I
> would need an ack to take it through samsung-soc.

Yes. This patch should not depend on anything else, but later patches
in the series depend on it, so I'd like to keep everything together.

      Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 06/36] ARM: samsung: move CONFIG_DEBUG_S3C_UART to Kconfig.debug
  2019-10-23 10:12     ` Krzysztof Kozlowski
@ 2019-10-23 12:22       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 12:22 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Kukjin Kim, moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Linux ARM, Linus Walleij, Olof Johansson, Sascha Hauer,
	Bartlomiej Zolnierkiewicz, linux-kernel

On Wed, Oct 23, 2019 at 12:13 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Thu, Oct 10, 2019 at 10:29:50PM +0200, Arnd Bergmann wrote:
> > Before we can plat-samsung from the individual platforms,
>
> "Before we can split"? Or moved? What did you want to say here?

Rephrased now to:

| Before we can separate plat-samsung from the individual platforms,
| this one has to get moved to a place where it remains accessible.

Thanks,

     Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 13/36] ARM: s3c: move regs-spi.h into spi driver
  2019-10-10 20:29   ` [PATCH 13/36] ARM: s3c: move regs-spi.h into spi driver Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
@ 2019-10-23 12:32     ` Krzysztof Kozlowski
  2019-10-23 13:21       ` Arnd Bergmann
  1 sibling, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 12:32 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Andi Shyti, Mark Brown, linux-samsung-soc,
	linux-arm-kernel, linus.walleij, linux-kernel, linux-spi

On Thu, Oct 10, 2019 at 10:29:57PM +0200, Arnd Bergmann wrote:
> The file is mostly specific to the driver, the few bits that
> are actually used by the platform code get moved to mach/map.h
> instead.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s3c24xx/include/mach/map.h                      | 2 ++
>  arch/arm/mach-s3c24xx/s3c2412.c                               | 1 -
>  arch/arm/plat-samsung/devs.c                                  | 1 -
>  drivers/spi/spi-s3c24xx-fiq.S                                 | 4 +++-
>  .../include/plat/regs-spi.h => drivers/spi/spi-s3c24xx-regs.h | 3 ---
>  drivers/spi/spi-s3c24xx.c                                     | 3 +--
>  6 files changed, 6 insertions(+), 8 deletions(-)
>  rename arch/arm/plat-samsung/include/plat/regs-spi.h => drivers/spi/spi-s3c24xx-regs.h (95%)
> 
> diff --git a/arch/arm/mach-s3c24xx/include/mach/map.h b/arch/arm/mach-s3c24xx/include/mach/map.h
> index bca93112f57d..a20c9fd0d855 100644
> --- a/arch/arm/mach-s3c24xx/include/mach/map.h
> +++ b/arch/arm/mach-s3c24xx/include/mach/map.h
> @@ -86,6 +86,8 @@
>  #define S3C2410_PA_SPI	   (0x59000000)
>  #define S3C2443_PA_SPI0		(0x52000000)
>  #define S3C2443_PA_SPI1		S3C2410_PA_SPI
> +#define S3C2410_SPI1		(0x20)
> +#define S3C2412_SPI1		(0x100)
>  
>  /* SDI */
>  #define S3C2410_PA_SDI	   (0x5A000000)
> diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
> index 8fe4d4670dcb..c3fb3e6c0dd8 100644
> --- a/arch/arm/mach-s3c24xx/s3c2412.c
> +++ b/arch/arm/mach-s3c24xx/s3c2412.c
> @@ -37,7 +37,6 @@
>  #include <plat/cpu-freq.h>
>  #include <plat/devs.h>
>  #include <plat/pm.h>
> -#include <plat/regs-spi.h>
>  
>  #include "common.h"
>  #include "nand-core.h"
> diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
> index 6e4c1cb07104..fd94a35e22f8 100644
> --- a/arch/arm/plat-samsung/devs.c
> +++ b/arch/arm/plat-samsung/devs.c
> @@ -59,7 +59,6 @@
>  #include <linux/platform_data/usb-s3c2410_udc.h>
>  #include <linux/platform_data/usb-ohci-s3c2410.h>
>  #include <plat/usb-phy.h>
> -#include <plat/regs-spi.h>
>  #include <linux/platform_data/asoc-s3c.h>
>  #include <linux/platform_data/spi-s3c64xx.h>
>  
> diff --git a/drivers/spi/spi-s3c24xx-fiq.S b/drivers/spi/spi-s3c24xx-fiq.S
> index e95d6282109e..9d5f8f1e5e81 100644
> --- a/drivers/spi/spi-s3c24xx-fiq.S
> +++ b/drivers/spi/spi-s3c24xx-fiq.S
> @@ -12,10 +12,12 @@
>  
>  #include <mach/map.h>
>  #include <mach/regs-irq.h>
> -#include <plat/regs-spi.h>
>  
>  #include "spi-s3c24xx-fiq.h"
>  
> +#define S3C2410_SPTDAT           (0x10)
> +#define S3C2410_SPRDAT           (0x14)
> +
>  	.text
>  
>  	@ entry to these routines is as follows, with the register names
> diff --git a/arch/arm/plat-samsung/include/plat/regs-spi.h b/drivers/spi/spi-s3c24xx-regs.h
> similarity index 95%
> rename from arch/arm/plat-samsung/include/plat/regs-spi.h
> rename to drivers/spi/spi-s3c24xx-regs.h
> index 607844311566..37b93ff7c7fe 100644
> --- a/arch/arm/plat-samsung/include/plat/regs-spi.h
> +++ b/drivers/spi/spi-s3c24xx-regs.h
> @@ -8,9 +8,6 @@
>  #ifndef __ASM_ARCH_REGS_SPI_H
>  #define __ASM_ARCH_REGS_SPI_H

Can you also update the guard name?

Best regards,
Krzysztof

>  
> -#define S3C2410_SPI1		(0x20)
> -#define S3C2412_SPI1		(0x100)
> -
>  #define S3C2410_SPCON		(0x00)
>  
>  #define S3C2410_SPCON_SMOD_DMA	(2 << 5)	/* DMA mode */
> diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
> index 2d6e37f25e2d..2f395e4861f6 100644
> --- a/drivers/spi/spi-s3c24xx.c
> +++ b/drivers/spi/spi-s3c24xx.c
> @@ -21,10 +21,9 @@
>  #include <linux/spi/s3c24xx.h>
>  #include <linux/module.h>
>  
> -#include <plat/regs-spi.h>
> -
>  #include <asm/fiq.h>
>  
> +#include "spi-s3c24xx-regs.h"
>  #include "spi-s3c24xx-fiq.h"
>  
>  /**
> -- 
> 2.20.0
> 

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung
  2019-10-10 20:29   ` [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-10 22:20     ` Guenter Roeck
@ 2019-10-23 12:37     ` Krzysztof Kozlowski
  2019-10-23 13:23       ` Arnd Bergmann
  2 siblings, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 12:37 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Jean Delvare, Guenter Roeck, Dmitry Torokhov,
	Sebastian Reichel, linux-samsung-soc, linux-arm-kernel,
	linus.walleij, linux-kernel, linux-hwmon, linux-input, linux-pm

On Thu, Oct 10, 2019 at 10:29:59PM +0200, Arnd Bergmann wrote:
> There are multiple drivers using the private adc interface.
> It seems unlikely that they would ever get converted to iio,
> so make the current state official by making the header file
> global.
> 
> The s3c2410_ts driver needs a couple of register definitions
> as well.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s3c64xx/mach-crag6410.c         |  2 +-
>  arch/arm/mach-s3c64xx/mach-mini6410.c         |  2 +-
>  arch/arm/mach-s3c64xx/mach-real6410.c         |  2 +-
>  arch/arm/mach-s3c64xx/mach-smdk6410.c         |  2 +-
>  arch/arm/plat-samsung/adc.c                   |  2 +-
>  arch/arm/plat-samsung/devs.c                  |  2 +-
>  drivers/hwmon/s3c-hwmon.c                     |  2 +-
>  drivers/input/touchscreen/s3c2410_ts.c        | 37 ++++++++++++++++++-
>  drivers/power/supply/s3c_adc_battery.c        |  2 +-
>  .../linux/soc/samsung/s3c-adc.h               |  0
>  10 files changed, 43 insertions(+), 10 deletions(-)
>  rename arch/arm/plat-samsung/include/plat/adc.h => include/linux/soc/samsung/s3c-adc.h (100%)
> 
> diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
> index da5b50981a14..133453562d23 100644
> --- a/arch/arm/mach-s3c64xx/mach-crag6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
> @@ -57,7 +57,7 @@
>  #include <plat/keypad.h>
>  #include <plat/devs.h>
>  #include <plat/cpu.h>
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>  #include <linux/platform_data/i2c-s3c2410.h>
>  #include <plat/pm.h>
>  #include <plat/samsung-time.h>
> diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
> index 0dd36ae49e6a..c7140300bd3f 100644
> --- a/arch/arm/mach-s3c64xx/mach-mini6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
> @@ -27,7 +27,7 @@
>  #include <mach/regs-gpio.h>
>  #include <mach/gpio-samsung.h>
>  
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>  #include <plat/cpu.h>
>  #include <plat/devs.h>
>  #include <plat/fb.h>
> diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
> index 0ff88b6859c4..f55097fde94c 100644
> --- a/arch/arm/mach-s3c64xx/mach-real6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-real6410.c
> @@ -29,7 +29,7 @@
>  #include <mach/gpio-samsung.h>
>  #include <mach/irqs.h>
>  
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>  #include <plat/cpu.h>
>  #include <plat/devs.h>
>  #include <plat/fb.h>
> diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> index 95bdcfe95a53..3042f6cbffd9 100644
> --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> @@ -60,7 +60,7 @@
>  
>  #include <plat/devs.h>
>  #include <plat/cpu.h>
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>  #include <linux/platform_data/touchscreen-s3c2410.h>
>  #include <plat/keypad.h>
>  #include <plat/samsung-time.h>
> diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
> index ee3d5c989a76..623a9774cc52 100644
> --- a/arch/arm/plat-samsung/adc.c
> +++ b/arch/arm/plat-samsung/adc.c
> @@ -20,7 +20,7 @@
>  #include <linux/regulator/consumer.h>
>  
>  #include <plat/regs-adc.h>
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>  
>  /* This driver is designed to control the usage of the ADC block between
>   * the touchscreen and any other drivers that may need to use it, such as
> diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
> index fd94a35e22f8..ddd90f0bb380 100644
> --- a/arch/arm/plat-samsung/devs.c
> +++ b/arch/arm/plat-samsung/devs.c
> @@ -44,7 +44,7 @@
>  
>  #include <plat/cpu.h>
>  #include <plat/devs.h>
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>  #include <linux/platform_data/ata-samsung_cf.h>
>  #include <plat/fb.h>
>  #include <plat/fb-s3c2410.h>
> diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c
> index b490fe3d2ee8..f2703c5460d0 100644
> --- a/drivers/hwmon/s3c-hwmon.c
> +++ b/drivers/hwmon/s3c-hwmon.c
> @@ -20,7 +20,7 @@
>  #include <linux/hwmon.h>
>  #include <linux/hwmon-sysfs.h>
>  
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>  #include <linux/platform_data/hwmon-s3c.h>
>  
>  struct s3c_hwmon_attr {
> diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
> index b346e7cafd62..1a5a178ea286 100644
> --- a/drivers/input/touchscreen/s3c2410_ts.c
> +++ b/drivers/input/touchscreen/s3c2410_ts.c
> @@ -21,10 +21,43 @@
>  #include <linux/clk.h>
>  #include <linux/io.h>
>  
> -#include <plat/adc.h>
> -#include <plat/regs-adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>  #include <linux/platform_data/touchscreen-s3c2410.h>
>  
> +#define	S3C2410_ADCCON			(0x00)
> +#define	S3C2410_ADCTSC			(0x04)
> +#define	S3C2410_ADCDLY			(0x08)
> +#define	S3C2410_ADCDAT0			(0x0C)
> +#define	S3C2410_ADCDAT1			(0x10)
> +#define	S3C64XX_ADCUPDN			(0x14)
> +#define	S3C2443_ADCMUX			(0x18)
> +#define	S3C64XX_ADCCLRINT		(0x18)
> +#define	S5P_ADCMUX			(0x1C)
> +#define	S3C64XX_ADCCLRINTPNDNUP		(0x20)
> +
> +/* ADCTSC Register Bits */
> +#define S3C2443_ADCTSC_UD_SEN		(1 << 8)
> +#define S3C2410_ADCTSC_YM_SEN		(1<<7)
> +#define S3C2410_ADCTSC_YP_SEN		(1<<6)
> +#define S3C2410_ADCTSC_XM_SEN		(1<<5)
> +#define S3C2410_ADCTSC_XP_SEN		(1<<4)
> +#define S3C2410_ADCTSC_PULL_UP_DISABLE	(1<<3)
> +#define S3C2410_ADCTSC_AUTO_PST		(1<<2)
> +#define S3C2410_ADCTSC_XY_PST(x)	(((x)&0x3)<<0)
> +
> +/* ADCDAT0 Bits */
> +#define S3C2410_ADCDAT0_UPDOWN		(1<<15)
> +#define S3C2410_ADCDAT0_AUTO_PST	(1<<14)
> +#define S3C2410_ADCDAT0_XY_PST		(0x3<<12)
> +#define S3C2410_ADCDAT0_XPDATA_MASK	(0x03FF)
> +
> +/* ADCDAT1 Bits */
> +#define S3C2410_ADCDAT1_UPDOWN		(1<<15)
> +#define S3C2410_ADCDAT1_AUTO_PST	(1<<14)
> +#define S3C2410_ADCDAT1_XY_PST		(0x3<<12)
> +#define S3C2410_ADCDAT1_YPDATA_MASK	(0x03FF)
> +
> +
>  #define TSC_SLEEP  (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0))
>  
>  #define INT_DOWN	(0)
> diff --git a/drivers/power/supply/s3c_adc_battery.c b/drivers/power/supply/s3c_adc_battery.c
> index 3d00b35cafc9..60b7f41ab063 100644
> --- a/drivers/power/supply/s3c_adc_battery.c
> +++ b/drivers/power/supply/s3c_adc_battery.c
> @@ -22,7 +22,7 @@
>  #include <linux/init.h>
>  #include <linux/module.h>
>  
> -#include <plat/adc.h>
> +#include <linux/soc/samsung/s3c-adc.h>
>  
>  #define BAT_POLL_INTERVAL		10000 /* ms */
>  #define JITTER_DELAY			500 /* ms */
> diff --git a/arch/arm/plat-samsung/include/plat/adc.h b/include/linux/soc/samsung/s3c-adc.h
> similarity index 100%
> rename from arch/arm/plat-samsung/include/plat/adc.h
> rename to include/linux/soc/samsung/s3c-adc.h

Can you update the name of header guard? __LINUX_SOC_SAMSUNG_S3C_ADC_H?

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 07/36] ARM: exynos: use private samsung_cpu_id copy
  2019-10-23 10:54     ` Krzysztof Kozlowski
@ 2019-10-23 12:37       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 12:37 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Bartlomiej Zolnierkiewicz, Pankaj Dubey, Linus Walleij,
	Daniel Lezcano, Tomasz Figa, linux-kernel, Kukjin Kim,
	Linux PM list, Linux ARM, Marek Szyprowski

On Wed, Oct 23, 2019 at 12:56 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Oct 10, 2019 at 10:29:51PM +0200, Arnd Bergmann wrote:
> > diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
> > index 9aa483366ebc..da9300d655c6 100644
> > --- a/arch/arm/mach-exynos/exynos.c
> > +++ b/arch/arm/mach-exynos/exynos.c
> >
> > +#define S5P_VA_CHIPID        ((void __iomem __force *)0xF8000000)
>
> How about keeping the S3C_VA and S3C_ADDR_BASE macros/defines and using
> them?

Ok, done now.

> They still appear in arch/arm/include/debug/exynos.S so they could
> be integrated into one header, unless you plan to remove it in further
> patches.

I don't think it actually helps, but it doesn't hurt either:

arch/arm/include/debug/exynos.S cannot #include any mach/*.h header files,
so the definition has to remain duplicated, unless I'm missing something.

Also, the addresses should be completely independent, as long as the virtual
address for the uart does not overlap with the virtual address for the chipid.

One possible cleanup here would be to completely remove the S5P_VA_CHIPID
static map and use ioremap(), but doing that requires that the first call to
soc_is_exynosXXXX() happens after the ioremap.

> > diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
> > index fadcddbea064..02d7f991d5a3 100644
> > --- a/arch/arm/plat-samsung/include/plat/cpu.h
> > +++ b/arch/arm/plat-samsung/include/plat/cpu.h
> > @@ -111,8 +111,6 @@ extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
> >  extern void s3c64xx_init_cpu(void);
> >  extern void s5p_init_cpu(const void __iomem *cpuid_addr);
>
> You can remove it as well.

Ok, removed.

        Thanks,

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 08/36] ARM: exynos: stop selecting PLAT_SAMSUNG
  2019-10-23 10:57     ` Krzysztof Kozlowski
@ 2019-10-23 12:43       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 12:43 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Kukjin Kim, Ulf Hansson,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, Linux ARM,
	Linus Walleij, Olof Johansson, Sascha Hauer,
	Bartlomiej Zolnierkiewicz, Enrico Weigelt, metux IT consult,
	linux-kernel, linux-mmc

On Wed, Oct 23, 2019 at 12:57 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Oct 10, 2019 at 10:29:52PM +0200, Arnd Bergmann wrote:
> > @@ -1022,7 +1022,7 @@ choice
> >                 by the boot-loader before use.
> >
> >       config DEBUG_S3C_UART2
> > -             depends on PLAT_SAMSUNG
> > +             depends on PLAT_SAMSUNG || ARCH_EXYNOS
> >               select DEBUG_EXYNOS_UART if ARCH_EXYNOS
> >               select DEBUG_S3C24XX_UART if ARCH_S3C24XX
> >               select DEBUG_S3C64XX_UART if ARCH_S3C64XX
> > @@ -1034,7 +1034,7 @@ choice
> >                 by the boot-loader before use.
> >
> >       config DEBUG_S3C_UART3
> > -             depends on PLAT_SAMSUNG && (ARCH_EXYNOS || ARCH_S5PV210)
> > +             depends on ARCH_EXYNOS || ARCH_S5PV210
>
> You need to keep PLAT_SAMSUNG because of additional architectures, so
> follow pattern from DEBUG_S3C_UART2.

Are you sure? I think my version is correct: for UART2, the
"PLAT_SAMSUNG || ARCH_EXYNOS" is equivalent to "s3c24xx || s3c64xx ||
s5pv210 || exynos", which keeps the existing behavior unchanged.

For UART3, the "PLAT_SAMSUNG && ..." is redundant, this is already
limited to "s5pv210 || exynos", which my patch keeps. Changing it to
"PLAT_SAMSUNG || ..." would allow selecting the symbol on s3c24xx
and s3c64xx, which presumably is not valid.

      Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 09/36] ARM: samsung: move pm check code to drivers/soc
  2019-10-23 11:32     ` Krzysztof Kozlowski
@ 2019-10-23 12:45       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 12:45 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Bartlomiej Zolnierkiewicz, Pankaj Dubey, Linus Walleij,
	linux-kernel, Kyungmin Park, Kukjin Kim, Sylwester Nawrocki,
	Mauro Carvalho Chehab, Linux ARM, Marek Szyprowski

On Wed, Oct 23, 2019 at 1:33 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Thu, Oct 10, 2019 at 10:29:53PM +0200, Arnd Bergmann wrote:
> > This is the only part of plat-samsung that is really
> > shared between the s3c and s5p ports. Moving it to
> > drivers/soc/ lets us make them completely independent.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > + *   Tomasz Figa <t.figa@samsung.com>
> > + * Copyright (c) 2004 Simtec Electronics
> > + *   http://armlinux.simtec.co.uk/
> > + *   Written by Ben Dooks, <ben@simtec.co.uk>
> > + */
> > +
> > +#ifndef __SAMSUNG_SOC_S3C_PM_H
> > +#define __SAMSUNG_SOC_S3C_PM_H __FILE__
>
> Use guard name prefix consistent with other files, so:
> __LINUX_SOC_SAMSUNG_S3C_PM_H

Ok, done.

        Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 03/36] usb: gadget: s3c: use platform resources
  2019-10-10 20:29   ` [PATCH 03/36] usb: gadget: s3c: use platform resources Arnd Bergmann
  2019-10-10 20:29     ` Arnd Bergmann
  2019-10-23 10:06     ` Krzysztof Kozlowski
@ 2019-10-23 12:46     ` Krzysztof Kozlowski
  2019-10-23 13:26       ` Arnd Bergmann
  2 siblings, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 12:46 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, linux-samsung-soc, linux-arm-kernel, linus.walleij,
	Felipe Balbi, Greg Kroah-Hartman, linux-kernel, linux-usb

On Thu, Oct 10, 2019 at 10:29:47PM +0200, Arnd Bergmann wrote:
> The resources are correctly initialized, so just use them
> instead of relying on hardcoded data from platform headers.

Generic comment to all patches - you seem to break commit msg lines
slightly too early. In certain cases it makes them unnecessarily longer.
Maybe your editor has to be fixed to wrap at 75 column.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 21/36] ARM: s3c: move iis pinctrl config into boards
  2019-10-10 20:30   ` [PATCH 21/36] ARM: s3c: move iis pinctrl config into boards Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
@ 2019-10-23 12:50     ` Krzysztof Kozlowski
  2019-10-23 13:29       ` Arnd Bergmann
  1 sibling, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 12:50 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Sangbeom Kim, Sylwester Nawrocki, Liam Girdwood,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, linux-samsung-soc,
	linux-arm-kernel, linus.walleij, Ulf Hansson, linux-kernel,
	linux-stm32, alsa-devel

On Thu, Oct 10, 2019 at 10:30:05PM +0200, Arnd Bergmann wrote:
> The s3c_gpio_cfgall_range() function is an internal interface of
> the samsung gpio driver and should not be called directly by drivers,
> so move the iis pin initialization into the boards.
> 
> Note that the s3c2412-i2s driver has no boards using it in
> mainline linux, the driver gets selected for the jive machine
> but is never instantiated.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s3c24xx/mach-gta02.c    | 4 ++++
>  arch/arm/mach-s3c24xx/mach-h1940.c    | 3 +++
>  arch/arm/mach-s3c24xx/mach-mini2440.c | 5 +++++
>  arch/arm/mach-s3c24xx/mach-n30.c      | 5 +++++
>  arch/arm/mach-s3c24xx/mach-nexcoder.c | 5 +++++
>  arch/arm/mach-s3c24xx/mach-otom.c     | 6 ++++++
>  arch/arm/mach-s3c24xx/mach-qt2410.c   | 3 +++
>  arch/arm/mach-s3c24xx/mach-rx1950.c   | 3 +++
>  arch/arm/mach-s3c24xx/mach-rx3715.c   | 4 ++++
>  arch/arm/mach-s3c24xx/mach-smdk2410.c | 5 +++++
>  arch/arm/mach-s3c24xx/mach-smdk2413.c | 4 ++++
>  arch/arm/mach-s3c24xx/mach-smdk2440.c | 6 +++++-
>  arch/arm/mach-s3c24xx/mach-vstms.c    | 6 +++++-
>  arch/arm/mach-s3c24xx/simtec-audio.c  | 6 ++++++
>  sound/soc/samsung/s3c2412-i2s.c       | 7 -------
>  sound/soc/samsung/s3c24xx-i2s.c       | 7 -------
>  16 files changed, 63 insertions(+), 16 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
> index 526fd0933289..1ca0460d82f4 100644
> --- a/arch/arm/mach-s3c24xx/mach-gta02.c
> +++ b/arch/arm/mach-s3c24xx/mach-gta02.c
> @@ -540,6 +540,10 @@ static void __init gta02_machine_init(void)
>  
>  	i2c_register_board_info(0, gta02_i2c_devs, ARRAY_SIZE(gta02_i2c_devs));
>  
> +	/* Configure the I2S pins (GPE0...GPE4) in correct mode */
> +	s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
> +			      S3C_GPIO_PULL_NONE);

This is not entirely equivalent move as before this was probe (so being
executed also on rebinds) and now it is init. I guess it should not make
any difference so let it be.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 00/36] ARM: samsung platform cleanup
  2019-10-10 20:28 [PATCH 00/36] ARM: samsung platform cleanup Arnd Bergmann
                   ` (3 preceding siblings ...)
  2019-10-10 21:07 ` [PATCH 36/36] ARM: s3c: make headers local if possible Arnd Bergmann
@ 2019-10-23 13:10 ` Krzysztof Kozlowski
  2019-10-23 13:39   ` Arnd Bergmann
  4 siblings, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 13:10 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, linux-samsung-soc, linux-arm-kernel, linux-kernel,
	linux-pm, patches, linux-stm32, linux-clk, linux-hwmon,
	linux-input, linux-leds, linux-mmc, linux-pwm, linux-spi,
	linux-serial, linux-usb, dri-devel, linux-fbdev, alsa-devel,
	Lihua Yao, Paweł Chmiel, Lihua Yao, Sergio Prado,
	Sylwester Nawrocki

On Thu, Oct 10, 2019 at 10:28:02PM +0200, Arnd Bergmann wrote:
> I've spent some time looking at the remaining ARMv4/ARMv5 platforms
> that are not part of ARCH_MULTIPLATFORM, and tried to get them closer
> to that. Here is what came out of that for the samsung platforms:
> 
> * Exynos and s5pv210 are made independent of plat-samsung
> * device drivers stop using mach/*.h headers for s3c24xx
>   (and other platforms not in this series)
> * s3c24xx and s3c64xx get merged into mach-s3c, removing
>   the need for plat-samsung (I have other patches for the
>   remaining plat-* directories)
> * mach/io.h gets cleaned up to only be needed for BAST
>   PC104 mode (looking for ideas to proceed)
> * mach/irqs.h remains for now, this still needs to be converted
>   to sparse IRQs.
> 
> Some bits are a little ugly, but overall I think this a big
> improvement.
> 
> The contents are available for testing in
> 
> git://kernel.org:/pub/scm/linux/kernel/git/arnd/playground.git s3c-multiplatform

When sending v2, can you Cc:

Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Lihua Yao <ylhuajnu@outlook.com>
(or Lihua Yao <ylhuajnu@163.com> if outlook.com bounces)
Sergio Prado <sergio.prado@e-labworks.com>
Sylwester Nawrocki <s.nawrocki@samsung.com>

These are folks which to my knowledge had working S3C and S5P boards
so maybe they could provide testing.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 10/36] ARM: s5pv210: use private pm save/restore
  2019-10-23 11:55     ` Krzysztof Kozlowski
@ 2019-10-23 13:12       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 13:12 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Linus Walleij, Tomasz Figa, linux-kernel, Kyungmin Park,
	Kukjin Kim, Linux ARM

> > diff --git a/arch/arm/mach-s5pv210/regs-clock.h b/arch/arm/mach-s5pv210/regs-clock.h
> > index 2a35c831a9b0..8c7530614e37 100644
> > --- a/arch/arm/mach-s5pv210/regs-clock.h
> > +++ b/arch/arm/mach-s5pv210/regs-clock.h
> > @@ -9,7 +9,7 @@
> >  #ifndef __ASM_ARCH_REGS_CLOCK_H
> >  #define __ASM_ARCH_REGS_CLOCK_H __FILE__
> >
> > -#include <plat/map-base.h>
> > +#define S3C_VA_SYS           ((void __iomem __force *)0xF6100000)
>
> The same as for one of earlier patches - I prefer to keep the S3C_ADDR()
> macro for consistency.

Ok, done.

As the constant is only used in arch/arm/mach-s5pv210/pm.c and the
s5pv210_dt_restart() function, I think it would be best to use ioremap()
here and remove the constant as well as s5pv210_fdt_map_sys() and
s5pv210_dt_map_io().

That can clearly be a follow-up patch.

> > diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
> > index d88b9b84f3a9..025ce22876c1 100644
> > --- a/arch/arm/plat-samsung/Makefile
> > +++ b/arch/arm/plat-samsung/Makefile
> > @@ -24,9 +24,7 @@ obj-$(CONFIG_GPIO_SAMSUNG)     += gpio-samsung.o
> >
> >  # PM support
> >
> > -obj-$(CONFIG_PM_SLEEP)               += pm-common.o
> > -obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm-common.o
>
> CONFIG_EXYNOS_CPU_SUSPEND looks unrelated and seems to be not needed at
> all. Can you remove it in separate patch?

Done.

        Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 28/36] fbdev: s3c2410fb: remove mach header dependency
  2019-10-10 20:30   ` [PATCH 28/36] fbdev: s3c2410fb: remove mach header dependency Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
@ 2019-10-23 13:13     ` Krzysztof Kozlowski
  2019-10-23 13:35       ` Arnd Bergmann
  1 sibling, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 13:13 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Bartlomiej Zolnierkiewicz, linux-samsung-soc,
	linux-arm-kernel, linus.walleij, linux-kernel, linux-stm32,
	dri-devel, linux-fbdev

On Thu, Oct 10, 2019 at 10:30:12PM +0200, Arnd Bergmann wrote:
> The s3c2410fb driver is too deeply intertwined with the s3c24xx
> platform code. Change it in a way that avoids the use of platform
> header files but having all interface data in a platform_data
> header, and the private register definitions next to the driver
> itself.
> 
> One ugly bit here is that the driver pokes directly into gpio
> registers, which are owned by another driver. Passing the
> mapped addresses in platform_data is somewhat suboptimal, but
> it is a small improvement over the previous version.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s3c24xx/include/mach/fb.h       |  2 --
>  arch/arm/mach-s3c24xx/mach-amlm5900.c         |  7 ++--
>  arch/arm/mach-s3c24xx/mach-anubis.c           |  1 -
>  arch/arm/mach-s3c24xx/mach-at2440evb.c        |  3 +-
>  arch/arm/mach-s3c24xx/mach-bast.c             |  3 +-
>  arch/arm/mach-s3c24xx/mach-gta02.c            |  2 +-
>  arch/arm/mach-s3c24xx/mach-h1940.c            |  7 ++--
>  arch/arm/mach-s3c24xx/mach-jive.c             | 10 ++++--
>  arch/arm/mach-s3c24xx/mach-mini2440.c         |  9 +++--
>  arch/arm/mach-s3c24xx/mach-n30.c              |  3 +-
>  arch/arm/mach-s3c24xx/mach-osiris.c           |  1 -
>  arch/arm/mach-s3c24xx/mach-qt2410.c           |  3 +-
>  arch/arm/mach-s3c24xx/mach-rx1950.c           |  8 +++--
>  arch/arm/mach-s3c24xx/mach-rx3715.c           |  7 ++--
>  arch/arm/mach-s3c24xx/mach-smdk2413.c         |  3 +-
>  arch/arm/mach-s3c24xx/mach-smdk2416.c         |  1 -
>  arch/arm/mach-s3c24xx/mach-smdk2440.c         |  8 +++--
>  arch/arm/mach-s3c24xx/mach-smdk2443.c         |  3 +-
>  arch/arm/mach-s3c24xx/mach-vstms.c            |  3 +-
>  arch/arm/plat-samsung/devs.c                  |  2 +-
>  .../video/fbdev/s3c2410fb-regs-lcd.h          | 28 ++++------------
>  drivers/video/fbdev/s3c2410fb.c               | 16 +++++----
>  .../linux/platform_data}/fb-s3c2410.h         | 33 ++++++++++++++++++-
>  23 files changed, 98 insertions(+), 65 deletions(-)
>  delete mode 100644 arch/arm/mach-s3c24xx/include/mach/fb.h
>  rename arch/arm/mach-s3c24xx/include/mach/regs-lcd.h => drivers/video/fbdev/s3c2410fb-regs-lcd.h (84%)
>  rename {arch/arm/plat-samsung/include/plat => include/linux/platform_data}/fb-s3c2410.h (57%)
> 
> diff --git a/arch/arm/mach-s3c24xx/include/mach/fb.h b/arch/arm/mach-s3c24xx/include/mach/fb.h
> deleted file mode 100644
> index 4e539cb8b884..000000000000
> --- a/arch/arm/mach-s3c24xx/include/mach/fb.h
> +++ /dev/null
> @@ -1,2 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -#include <plat/fb-s3c2410.h>
> diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c
> index 40ad23b52bc0..ef6de1b1d0c6 100644
> --- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
> +++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c
> @@ -30,9 +30,8 @@
>  #include <mach/hardware.h>
>  #include <asm/irq.h>
>  #include <asm/mach-types.h>
> -#include <mach/fb.h>
> +#include <linux/platform_data/fb-s3c2410.h>
>  
> -#include <mach/regs-lcd.h>
>  #include <mach/regs-gpio.h>
>  #include <mach/gpio-samsung.h>
>  
> @@ -194,13 +193,17 @@ static struct s3c2410fb_mach_info __initdata amlm5900_fb_info = {
>  
>  	.gpccon =	0xaaaaaaaa,
>  	.gpccon_mask =	0xffffffff,
> +	.gpccon_reg =	S3C2410_GPCCON,
>  	.gpcup =	0x0000ffff,
>  	.gpcup_mask =	0xffffffff,
> +	.gpcup_reg =	S3C2410_GPCUP,
>  
>  	.gpdcon =	0xaaaaaaaa,
>  	.gpdcon_mask =	0xffffffff,
> +	.gpdcon_reg =	S3C2410_GPDCON,
>  	.gpdup =	0x0000ffff,
>  	.gpdup_mask =	0xffffffff,
> +	.gpdup_reg =	S3C2410_GPDUP,
>  };
>  #endif
>  
> diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c
> index 072966dcad78..e1a73274e90b 100644
> --- a/arch/arm/mach-s3c24xx/mach-anubis.c
> +++ b/arch/arm/mach-s3c24xx/mach-anubis.c
> @@ -29,7 +29,6 @@
>  #include <asm/mach-types.h>
>  
>  #include <mach/regs-gpio.h>
> -#include <mach/regs-lcd.h>
>  #include <mach/gpio-samsung.h>
>  #include <linux/platform_data/mtd-nand-s3c2410.h>
>  #include <linux/platform_data/i2c-s3c2410.h>
> diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
> index b2199906e678..bfda6dd2a9d5 100644
> --- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
> +++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
> @@ -25,12 +25,11 @@
>  #include <asm/mach/irq.h>
>  
>  #include <mach/hardware.h>
> -#include <mach/fb.h>
> +#include <linux/platform_data/fb-s3c2410.h>
>  #include <asm/irq.h>
>  #include <asm/mach-types.h>
>  
>  #include <mach/regs-gpio.h>
> -#include <mach/regs-lcd.h>
>  #include <mach/gpio-samsung.h>
>  #include <linux/platform_data/mtd-nand-s3c2410.h>
>  #include <linux/platform_data/i2c-s3c2410.h>
> diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
> index a7c3955ae8f6..cc941b5030ea 100644
> --- a/arch/arm/mach-s3c24xx/mach-bast.c
> +++ b/arch/arm/mach-s3c24xx/mach-bast.c
> @@ -40,10 +40,9 @@
>  #include <asm/mach/irq.h>
>  #include <asm/mach-types.h>
>  
> -#include <mach/fb.h>
>  #include <mach/hardware.h>
> +#include <linux/platform_data/fb-s3c2410.h>
>  #include <mach/regs-gpio.h>
> -#include <mach/regs-lcd.h>
>  #include <mach/gpio-samsung.h>
>  
>  #include <plat/cpu.h>
> diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
> index 61b8c6badeb8..1e42782dbd30 100644
> --- a/arch/arm/mach-s3c24xx/mach-gta02.c
> +++ b/arch/arm/mach-s3c24xx/mach-gta02.c
> @@ -57,8 +57,8 @@
>  #include <linux/platform_data/touchscreen-s3c2410.h>
>  #include <linux/platform_data/usb-ohci-s3c2410.h>
>  #include <linux/platform_data/usb-s3c2410_udc.h>
> +#include <linux/platform_data/fb-s3c2410.h>
>  
> -#include <mach/fb.h>
>  #include <mach/hardware.h>
>  #include <mach/regs-gpio.h>
>  #include <mach/regs-irq.h>
> diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
> index 446891e23511..d56e3befa459 100644
> --- a/arch/arm/mach-s3c24xx/mach-h1940.c
> +++ b/arch/arm/mach-s3c24xx/mach-h1940.c
> @@ -47,11 +47,10 @@
>  
>  #include <sound/uda1380.h>
>  
> -#include <mach/fb.h>
> +#include <linux/platform_data/fb-s3c2410.h>
>  #include <mach/hardware.h>
>  #include <mach/regs-clock.h>
>  #include <mach/regs-gpio.h>
> -#include <mach/regs-lcd.h>
>  #include <mach/gpio-samsung.h>
>  
>  #include <plat/cpu.h>
> @@ -211,12 +210,16 @@ static struct s3c2410fb_mach_info h1940_fb_info __initdata = {
>  	.lpcsel =	0x02,
>  	.gpccon =	0xaa940659,
>  	.gpccon_mask =	0xffffc0f0,
> +	.gpccon_reg =	S3C2410_GPCCON,
>  	.gpcup =	0x0000ffff,
>  	.gpcup_mask =	0xffffffff,
> +	.gpcup_reg =	S3C2410_GPCUP,
>  	.gpdcon =	0xaa84aaa0,
>  	.gpdcon_mask =	0xffffffff,
> +	.gpdcon_reg =	S3C2410_GPDCON,
>  	.gpdup =	0x0000faff,
>  	.gpdup_mask =	0xffffffff,
> +	.gpdup_reg =	S3C2410_GPDUP,
>  };
>  
>  static int power_supply_init(struct device *dev)
> diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
> index 885e8f12e4b9..3b33132b2334 100644
> --- a/arch/arm/mach-s3c24xx/mach-jive.c
> +++ b/arch/arm/mach-s3c24xx/mach-jive.c
> @@ -32,8 +32,7 @@
>  #include <linux/platform_data/i2c-s3c2410.h>
>  
>  #include <mach/regs-gpio.h>
> -#include <mach/regs-lcd.h>
> -#include <mach/fb.h>
> +#include <linux/platform_data/fb-s3c2410.h>
>  #include <mach/gpio-samsung.h>
>  
>  #include <asm/mach-types.h>
> @@ -321,6 +320,7 @@ static struct s3c2410fb_mach_info jive_lcd_config = {
>  	 * data. */
>  
>  	.gpcup		= (0xf << 1) | (0x3f << 10),
> +	.gpcup_reg =	S3C2410_GPCUP,

Nits: indentation before/after '=' looks wrong. Tab should be
before '=', one space after.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 11/36] ARM: s5pv210: split from plat-samsung
  2019-10-23 12:14     ` Krzysztof Kozlowski
@ 2019-10-23 13:17       ` Arnd Bergmann
  2019-10-23 14:12         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 13:17 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Kukjin Kim, Ulf Hansson, Thierry Reding, Mark Brown,
	Greg Kroah-Hartman, Jiri Slaby, Sangbeom Kim, Sylwester Nawrocki,
	Liam Girdwood,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, Linux ARM,
	Linus Walleij, Uwe Kleine-König, Jaroslav Kysela,
	Takashi Iwai, Olof Johansson, Sascha Hauer,
	Clément Péron, Mauro Carvalho Chehab,
	Bartlomiej Zolnierkiewicz, Faiz Abbas, linux-kernel, linux-mmc,
	Linux PWM List, linux-spi, linux-serial,
	ALSA Development Mailing List

On Wed, Oct 23, 2019 at 2:15 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Oct 10, 2019 at 10:29:55PM +0200, Arnd Bergmann wrote:
> > These can be build completely independently, so split
> > the two Kconfig symbols.
> >       config DEBUG_S3C_UART0
> > -             depends on PLAT_SAMSUNG || ARCH_EXYNOS
> > +             depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>
> How are you going to select DEBUG_S5PV210_UART now?

I don't see a problem here, the patch should not change the behavior at all.

The whole entry now looks like:

        config DEBUG_S3C_UART0
                depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
                select DEBUG_EXYNOS_UART if ARCH_EXYNOS
                select DEBUG_S3C24XX_UART if ARCH_S3C24XX
                select DEBUG_S3C64XX_UART if ARCH_S3C64XX
                select DEBUG_S5PV210_UART if ARCH_S5PV210
                bool "Use Samsung S3C UART 0 for low-level debug"

so this will work as before with any of ARCH_EXYNOS, ARCH_S3C24XX,
ARCH_S3C64XX and ARCH_S5PV210.

What am I missing?

     Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 13/36] ARM: s3c: move regs-spi.h into spi driver
  2019-10-23 12:32     ` Krzysztof Kozlowski
@ 2019-10-23 13:21       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 13:21 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Linus Walleij, linux-kernel, linux-spi, Mark Brown, Kukjin Kim,
	Andi Shyti, Linux ARM

On Wed, Oct 23, 2019 at 2:36 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Oct 10, 2019 at 10:29:57PM +0200, Arnd Bergmann wrote:

> > diff --git a/arch/arm/plat-samsung/include/plat/regs-spi.h b/drivers/spi/spi-s3c24xx-regs.h
> > similarity index 95%
> > rename from arch/arm/plat-samsung/include/plat/regs-spi.h
> > rename to drivers/spi/spi-s3c24xx-regs.h
> > index 607844311566..37b93ff7c7fe 100644
> > --- a/arch/arm/plat-samsung/include/plat/regs-spi.h
> > +++ b/drivers/spi/spi-s3c24xx-regs.h
> > @@ -8,9 +8,6 @@
> >  #ifndef __ASM_ARCH_REGS_SPI_H
> >  #define __ASM_ARCH_REGS_SPI_H
>
> Can you also update the guard name?

Ok, changed to __SPI_S3C2410_H, this seems to be the most common format
in spi drivers.

       Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung
  2019-10-23 12:37     ` Krzysztof Kozlowski
@ 2019-10-23 13:23       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 13:23 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linux ARM, linux-hwmon,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Linux PM list, Linus Walleij, Dmitry Torokhov, Sebastian Reichel,
	linux-kernel, Jean Delvare, Kukjin Kim, open list:HID CORE LAYER,
	Guenter Roeck

On Wed, Oct 23, 2019 at 2:41 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:

> > diff --git a/arch/arm/plat-samsung/include/plat/adc.h b/include/linux/soc/samsung/s3c-adc.h
> > similarity index 100%
> > rename from arch/arm/plat-samsung/include/plat/adc.h
> > rename to include/linux/soc/samsung/s3c-adc.h
>
> Can you update the name of header guard? __LINUX_SOC_SAMSUNG_S3C_ADC_H?

Ok, done.

       Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 03/36] usb: gadget: s3c: use platform resources
  2019-10-23 12:46     ` Krzysztof Kozlowski
@ 2019-10-23 13:26       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 13:26 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Felipe Balbi,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Greg Kroah-Hartman, Linus Walleij, USB list, linux-kernel,
	Kukjin Kim, Linux ARM

On Wed, Oct 23, 2019 at 2:47 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Thu, Oct 10, 2019 at 10:29:47PM +0200, Arnd Bergmann wrote:
> > The resources are correctly initialized, so just use them
> > instead of relying on hardcoded data from platform headers.
>
> Generic comment to all patches - you seem to break commit msg lines
> slightly too early. In certain cases it makes them unnecessarily longer.
> Maybe your editor has to be fixed to wrap at 75 column.

I tend to use '/usr//bin/fmt' with the default setting. I think the idea of that
default is that an email reply with added '>' characters doesn't immediately
have to reflow the text.

       Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 21/36] ARM: s3c: move iis pinctrl config into boards
  2019-10-23 12:50     ` Krzysztof Kozlowski
@ 2019-10-23 13:29       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 13:29 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Ulf Hansson, moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	ALSA Development Mailing List, Sangbeom Kim, linux-kernel,
	Linus Walleij, Takashi Iwai, Liam Girdwood, Jaroslav Kysela,
	Mark Brown, Kukjin Kim, Sylwester Nawrocki, linux-stm32,
	Linux ARM

On Wed, Oct 23, 2019 at 2:51 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Oct 10, 2019 at 10:30:05PM +0200, Arnd Bergmann wrote:
> > The s3c_gpio_cfgall_range() function is an internal interface of
> > the samsung gpio driver and should not be called directly by drivers,
> > so move the iis pin initialization into the boards.
> >
> > Note that the s3c2412-i2s driver has no boards using it in
> > mainline linux, the driver gets selected for the jive machine
> > but is never instantiated.

> This is not entirely equivalent move as before this was probe (so being
> executed also on rebinds) and now it is init. I guess it should not make
> any difference so let it be.

Right, I've added an explanation in the changelog text now:

 The s3c_gpio_cfgall_range() function is an internal interface of the
 samsung gpio driver and should not be called directly by drivers, so
 move the iis pin initialization into the boards.

+This means the pin configuration is only run once at early boot, rather
+than each time the driver binds, but the effect should be the same.

        Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 28/36] fbdev: s3c2410fb: remove mach header dependency
  2019-10-23 13:13     ` Krzysztof Kozlowski
@ 2019-10-23 13:35       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 13:35 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linux Fbdev development list,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Bartlomiej Zolnierkiewicz, Linus Walleij, linux-kernel,
	dri-devel, Kukjin Kim, linux-stm32, Linux ARM

On Wed, Oct 23, 2019 at 3:13 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Oct 10, 2019 at 10:30:12PM +0200, Arnd Bergmann wrote:

> > @@ -321,6 +320,7 @@ static struct s3c2410fb_mach_info jive_lcd_config = {
> >        * data. */
> >
> >       .gpcup          = (0xf << 1) | (0x3f << 10),
> > +     .gpcup_reg =    S3C2410_GPCUP,
>
> Nits: indentation before/after '=' looks wrong. Tab should be
> before '=', one space after.

Ok, fixed now for the four boards that had inconsistent indentation --
jive, mini2440, smdk2440, and rx1950. Unfortunately each board
seemed to have its own way of doing this.

      Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 30/36] ARM: s3c: remove cpufreq header dependencies
  2019-10-10 20:30   ` [PATCH 30/36] ARM: s3c: remove cpufreq header dependencies Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
@ 2019-10-23 13:38     ` Krzysztof Kozlowski
  2019-10-23 13:46       ` Arnd Bergmann
  1 sibling, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 13:38 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Rafael J. Wysocki, Viresh Kumar, linux-samsung-soc,
	linux-arm-kernel, linus.walleij, linux-kernel, linux-pm

On Thu, Oct 10, 2019 at 10:30:14PM +0200, Arnd Bergmann wrote:
> The cpufreq drivers are split between the machine directory
> and the drivers/cpufreq directory. In order to share header
> files after we convert s3c to multiplatform, those headers
> have to live in a different global location.
> 
> Move them to linux/soc/samsung/ in lack of a better place.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s3c24xx/common.c                         |  1 -
>  arch/arm/mach-s3c24xx/cpufreq-utils.c                  |  2 +-
>  arch/arm/mach-s3c24xx/iotiming-s3c2410.c               |  2 +-
>  arch/arm/mach-s3c24xx/iotiming-s3c2412.c               |  2 +-
>  arch/arm/mach-s3c24xx/mach-bast.c                      |  2 +-
>  arch/arm/mach-s3c24xx/mach-osiris-dvs.c                |  2 +-
>  arch/arm/mach-s3c24xx/mach-osiris.c                    |  2 +-
>  arch/arm/mach-s3c24xx/pll-s3c2410.c                    |  4 ++--
>  arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c           |  4 ++--
>  arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c           |  4 ++--
>  arch/arm/mach-s3c24xx/s3c2410.c                        |  1 -
>  arch/arm/mach-s3c24xx/s3c2412.c                        |  1 -
>  arch/arm/mach-s3c24xx/s3c244x.c                        |  2 --
>  arch/arm/mach-s3c64xx/s3c6400.c                        |  1 -
>  arch/arm/mach-s3c64xx/s3c6410.c                        |  2 +-
>  arch/arm/plat-samsung/include/plat/cpu.h               |  9 ---------
>  drivers/cpufreq/s3c2410-cpufreq.c                      |  5 ++---
>  drivers/cpufreq/s3c2412-cpufreq.c                      |  5 ++---
>  drivers/cpufreq/s3c2440-cpufreq.c                      |  5 ++---
>  drivers/cpufreq/s3c24xx-cpufreq-debugfs.c              |  2 +-
>  drivers/cpufreq/s3c24xx-cpufreq.c                      |  5 ++---
>  .../linux/soc/samsung/s3c-cpu-freq.h                   |  0
>  .../linux/soc/samsung/s3c-cpufreq-core.h               |  2 +-
>  include/linux/soc/samsung/s3c-pm.h                     | 10 ++++++++++
>  24 files changed, 33 insertions(+), 42 deletions(-)
>  rename arch/arm/plat-samsung/include/plat/cpu-freq.h => include/linux/soc/samsung/s3c-cpu-freq.h (100%)
>  rename arch/arm/plat-samsung/include/plat/cpu-freq-core.h => include/linux/soc/samsung/s3c-cpufreq-core.h (99%)
> 
> diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
> index ebf6bde67816..d16a164df6c4 100644
> --- a/arch/arm/mach-s3c24xx/common.c
> +++ b/arch/arm/mach-s3c24xx/common.c
> @@ -35,7 +35,6 @@
>  
>  #include <plat/cpu.h>
>  #include <plat/devs.h>
> -#include <plat/cpu-freq.h>
>  #include <plat/pwm-core.h>
>  
>  #include "common.h"
> diff --git a/arch/arm/mach-s3c24xx/cpufreq-utils.c b/arch/arm/mach-s3c24xx/cpufreq-utils.c
> index 1a7f38d085dd..43ab714eaa9e 100644
> --- a/arch/arm/mach-s3c24xx/cpufreq-utils.c
> +++ b/arch/arm/mach-s3c24xx/cpufreq-utils.c
> @@ -15,7 +15,7 @@
>  #include <mach/map.h>
>  #include <mach/regs-clock.h>
>  
> -#include <plat/cpu-freq-core.h>
> +#include <linux/soc/samsung/s3c-cpufreq-core.h>
>  
>  #include "regs-mem.h"
>  
> diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
> index 9f90aaf70bf3..5b3b16dd0ce8 100644
> --- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
> +++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
> @@ -17,7 +17,7 @@
>  #include <mach/map.h>
>  #include <mach/regs-clock.h>
>  
> -#include <plat/cpu-freq-core.h>
> +#include <linux/soc/samsung/s3c-cpufreq-core.h>
>  
>  #include "regs-mem.h"
>  
> diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
> index 59356d10fbcf..a22b5611697d 100644
> --- a/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
> +++ b/arch/arm/mach-s3c24xx/iotiming-s3c2412.c
> @@ -24,7 +24,7 @@
>  #include <asm/mach/map.h>
>  
>  #include <plat/cpu.h>
> -#include <plat/cpu-freq-core.h>
> +#include <linux/soc/samsung/s3c-cpufreq-core.h>
>  
>  #include <mach/s3c2412.h>
>  
> diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
> index cc941b5030ea..b2f2d036bca2 100644
> --- a/arch/arm/mach-s3c24xx/mach-bast.c
> +++ b/arch/arm/mach-s3c24xx/mach-bast.c
> @@ -46,7 +46,7 @@
>  #include <mach/gpio-samsung.h>
>  
>  #include <plat/cpu.h>
> -#include <plat/cpu-freq.h>
> +#include <linux/soc/samsung/s3c-cpu-freq.h>
>  #include <plat/devs.h>
>  #include <plat/gpio-cfg.h>
>  #include <plat/samsung-time.h>
> diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
> index 5d819b6ea428..1250520b3bcc 100644
> --- a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
> +++ b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
> @@ -14,7 +14,7 @@
>  
>  #include <linux/mfd/tps65010.h>
>  
> -#include <plat/cpu-freq.h>
> +#include <linux/soc/samsung/s3c-cpu-freq.h>
>  #include <mach/gpio-samsung.h>
>  
>  #define OSIRIS_GPIO_DVS	S3C2410_GPB(5)
> diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c
> index 262e77bd48de..674164264076 100644
> --- a/arch/arm/mach-s3c24xx/mach-osiris.c
> +++ b/arch/arm/mach-s3c24xx/mach-osiris.c
> @@ -37,7 +37,7 @@
>  #include <linux/mtd/partitions.h>
>  
>  #include <plat/cpu.h>
> -#include <plat/cpu-freq.h>
> +#include <linux/soc/samsung/s3c-cpu-freq.h>
>  #include <plat/devs.h>
>  #include <plat/gpio-cfg.h>
>  #include <plat/samsung-time.h>
> diff --git a/arch/arm/mach-s3c24xx/pll-s3c2410.c b/arch/arm/mach-s3c24xx/pll-s3c2410.c
> index 0561f79ddce8..3fbc99eaa4a2 100644
> --- a/arch/arm/mach-s3c24xx/pll-s3c2410.c
> +++ b/arch/arm/mach-s3c24xx/pll-s3c2410.c
> @@ -15,8 +15,8 @@
>  #include <linux/clk.h>
>  #include <linux/err.h>
>  
> -#include <plat/cpu.h>
> -#include <plat/cpu-freq-core.h>
> +#include <linux/soc/samsung/s3c-cpufreq-core.h>
> +#include <linux/soc/samsung/s3c-pm.h>
>  
>  /* This array should be sorted in ascending order of the frequencies */
>  static struct cpufreq_frequency_table pll_vals_12MHz[] = {
> diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
> index 2ec3a2f9a6a5..fdb8e8c2fe3b 100644
> --- a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
> +++ b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
> @@ -13,8 +13,8 @@
>  #include <linux/clk.h>
>  #include <linux/err.h>
>  
> -#include <plat/cpu.h>
> -#include <plat/cpu-freq-core.h>
> +#include <linux/soc/samsung/s3c-cpufreq-core.h>
> +#include <linux/soc/samsung/s3c-pm.h>
>  
>  /* This array should be sorted in ascending order of the frequencies */
>  static struct cpufreq_frequency_table s3c2440_plls_12[] = {
> diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
> index 4b3d9e36c6bb..438b6fc099a4 100644
> --- a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
> +++ b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
> @@ -13,8 +13,8 @@
>  #include <linux/clk.h>
>  #include <linux/err.h>
>  
> -#include <plat/cpu.h>
> -#include <plat/cpu-freq-core.h>
> +#include <linux/soc/samsung/s3c-cpufreq-core.h>
> +#include <linux/soc/samsung/s3c-pm.h>
>  
>  /* This array should be sorted in ascending order of the frequencies */
>  static struct cpufreq_frequency_table s3c2440_plls_169344[] = {
> diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c
> index 21fd5404bc98..8427c150dd22 100644
> --- a/arch/arm/mach-s3c24xx/s3c2410.c
> +++ b/arch/arm/mach-s3c24xx/s3c2410.c
> @@ -30,7 +30,6 @@
>  #include <asm/irq.h>
>  #include <asm/system_misc.h>
>  
> -#include <plat/cpu-freq.h>
>  
>  #include <mach/regs-clock.h>
>  
> diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
> index c3fb3e6c0dd8..209f952a6c98 100644
> --- a/arch/arm/mach-s3c24xx/s3c2412.c
> +++ b/arch/arm/mach-s3c24xx/s3c2412.c
> @@ -34,7 +34,6 @@
>  #include <mach/regs-gpio.h>
>  
>  #include <plat/cpu.h>
> -#include <plat/cpu-freq.h>
>  #include <plat/devs.h>
>  #include <plat/pm.h>
>  
> diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
> index a75f588b9d45..f5bd489bac85 100644
> --- a/arch/arm/mach-s3c24xx/s3c244x.c
> +++ b/arch/arm/mach-s3c24xx/s3c244x.c
> @@ -28,8 +28,6 @@
>  #include <mach/hardware.h>
>  #include <asm/irq.h>
>  
> -#include <plat/cpu-freq.h>
> -
>  #include <mach/regs-clock.h>
>  #include <mach/regs-gpio.h>
>  
> diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c
> index 81233495d548..d18af724c807 100644
> --- a/arch/arm/mach-s3c64xx/s3c6400.c
> +++ b/arch/arm/mach-s3c64xx/s3c6400.c
> @@ -28,7 +28,6 @@
>  
>  #include <asm/irq.h>
>  
> -#include <plat/cpu-freq.h>
>  #include <mach/regs-clock.h>
>  
>  #include <plat/cpu.h>
> diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c
> index 9465a6e0f068..b1d725e55cd2 100644
> --- a/arch/arm/mach-s3c64xx/s3c6410.c
> +++ b/arch/arm/mach-s3c64xx/s3c6410.c
> @@ -29,7 +29,7 @@
>  
>  #include <asm/irq.h>
>  
> -#include <plat/cpu-freq.h>
> +#include <linux/soc/samsung/s3c-pm.h>
>  #include <mach/regs-clock.h>
>  
>  #include <plat/cpu.h>
> diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
> index 02d7f991d5a3..9dfd58bcc03d 100644
> --- a/arch/arm/plat-samsung/include/plat/cpu.h
> +++ b/arch/arm/plat-samsung/include/plat/cpu.h
> @@ -124,15 +124,6 @@ extern struct syscore_ops s3c2412_pm_syscore_ops;
>  extern struct syscore_ops s3c2416_pm_syscore_ops;
>  extern struct syscore_ops s3c244x_pm_syscore_ops;
>  
> -/* system device subsystems */
> -
> -extern struct bus_type s3c2410_subsys;
> -extern struct bus_type s3c2410a_subsys;
> -extern struct bus_type s3c2412_subsys;
> -extern struct bus_type s3c2416_subsys;
> -extern struct bus_type s3c2440_subsys;
> -extern struct bus_type s3c2442_subsys;
> -extern struct bus_type s3c2443_subsys;
>  extern struct bus_type s3c6410_subsys;
>  
>  #endif
> diff --git a/drivers/cpufreq/s3c2410-cpufreq.c b/drivers/cpufreq/s3c2410-cpufreq.c
> index 5c6cb590b63f..9c2f29cacdd0 100644
> --- a/drivers/cpufreq/s3c2410-cpufreq.c
> +++ b/drivers/cpufreq/s3c2410-cpufreq.c
> @@ -16,13 +16,12 @@
>  #include <linux/clk.h>
>  #include <linux/err.h>
>  #include <linux/io.h>
> +#include <linux/soc/samsung/s3c-cpufreq-core.h>
> +#include <linux/soc/samsung/s3c-pm.h>
>  
>  #include <asm/mach/arch.h>
>  #include <asm/mach/map.h>
>  
> -#include <plat/cpu.h>
> -#include <plat/cpu-freq-core.h>
> -
>  #include <mach/map.h>
>  
>  #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
> diff --git a/drivers/cpufreq/s3c2412-cpufreq.c b/drivers/cpufreq/s3c2412-cpufreq.c
> index d922d0d47c80..38dc9e6db633 100644
> --- a/drivers/cpufreq/s3c2412-cpufreq.c
> +++ b/drivers/cpufreq/s3c2412-cpufreq.c
> @@ -19,15 +19,14 @@
>  #include <linux/clk.h>
>  #include <linux/err.h>
>  #include <linux/io.h>
> +#include <linux/soc/samsung/s3c-cpufreq-core.h>
> +#include <linux/soc/samsung/s3c-pm.h>
>  
>  #include <asm/mach/arch.h>
>  #include <asm/mach/map.h>
>  
>  #include <mach/s3c2412.h>
>  
> -#include <plat/cpu.h>
> -#include <plat/cpu-freq-core.h>
> -
>  #include <mach/map.h>
>  
>  #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
> diff --git a/drivers/cpufreq/s3c2440-cpufreq.c b/drivers/cpufreq/s3c2440-cpufreq.c
> index 5fe7a891fa13..442abdccb9c1 100644
> --- a/drivers/cpufreq/s3c2440-cpufreq.c
> +++ b/drivers/cpufreq/s3c2440-cpufreq.c
> @@ -20,13 +20,12 @@
>  #include <linux/clk.h>
>  #include <linux/err.h>
>  #include <linux/io.h>
> +#include <linux/soc/samsung/s3c-cpufreq-core.h>
> +#include <linux/soc/samsung/s3c-pm.h>
>  
>  #include <asm/mach/arch.h>
>  #include <asm/mach/map.h>
>  
> -#include <plat/cpu.h>
> -#include <plat/cpu-freq-core.h>
> -
>  #include <mach/map.h>
>  
>  #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
> diff --git a/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c b/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c
> index 290e3539d03e..93971dfe7c75 100644
> --- a/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c
> +++ b/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c
> @@ -18,7 +18,7 @@
>  #include <linux/seq_file.h>
>  #include <linux/err.h>
>  
> -#include <plat/cpu-freq-core.h>
> +#include <linux/soc/samsung/s3c-cpufreq-core.h>
>  
>  static struct dentry *dbgfs_root;
>  static struct dentry *dbgfs_file_io;
> diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
> index c786e1197d3c..01b1823ea208 100644
> --- a/drivers/cpufreq/s3c24xx-cpufreq.c
> +++ b/drivers/cpufreq/s3c24xx-cpufreq.c
> @@ -21,13 +21,12 @@
>  #include <linux/device.h>
>  #include <linux/sysfs.h>
>  #include <linux/slab.h>
> +#include <linux/soc/samsung/s3c-cpufreq-core.h>
> +#include <linux/soc/samsung/s3c-pm.h>
>  
>  #include <asm/mach/arch.h>
>  #include <asm/mach/map.h>
>  
> -#include <plat/cpu.h>
> -#include <plat/cpu-freq-core.h>
> -
>  #include <mach/map.h>
>  
>  /* note, cpufreq support deals in kHz, no Hz */
> diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq.h b/include/linux/soc/samsung/s3c-cpu-freq.h
> similarity index 100%
> rename from arch/arm/plat-samsung/include/plat/cpu-freq.h
> rename to include/linux/soc/samsung/s3c-cpu-freq.h
> diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h b/include/linux/soc/samsung/s3c-cpufreq-core.h
> similarity index 99%
> rename from arch/arm/plat-samsung/include/plat/cpu-freq-core.h
> rename to include/linux/soc/samsung/s3c-cpufreq-core.h
> index 2c7cf2665634..4d22be1031b9 100644

Can you also update the header guard names to match new location?

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 00/36] ARM: samsung platform cleanup
  2019-10-23 13:10 ` [PATCH 00/36] ARM: samsung platform cleanup Krzysztof Kozlowski
@ 2019-10-23 13:39   ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 13:39 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linux Fbdev development list, ALSA Development Mailing List,
	dri-devel, Sylwester Nawrocki, linux-clk, linux-leds,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, linux-stm32,
	Lihua Yao, Kukjin Kim, linux-serial, open list:HID CORE LAYER,
	Paweł Chmiel, Linux PWM List, Sergio Prado, Linux PM list,
	Lihua Yao, Linux ARM, linux-hwmon, patches, USB list, linux-mmc,
	linux-kernel, linux-spi

On Wed, Oct 23, 2019 at 3:11 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Oct 10, 2019 at 10:28:02PM +0200, Arnd Bergmann wrote:
> > The contents are available for testing in
> >
> > git://kernel.org:/pub/scm/linux/kernel/git/arnd/playground.git s3c-multiplatform
>
> When sending v2, can you Cc:
>
> Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> Lihua Yao <ylhuajnu@outlook.com>
> (or Lihua Yao <ylhuajnu@163.com> if outlook.com bounces)
> Sergio Prado <sergio.prado@e-labworks.com>
> Sylwester Nawrocki <s.nawrocki@samsung.com>
>
> These are folks which to my knowledge had working S3C and S5P boards
> so maybe they could provide testing.

Ok, will do. I've uploaded the modified version based on your comments to
the above URL for now.

I'll probably give it a little more time before resending, but they
could already
start testing that version.

Thanks a lot for the review!

      Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 31/36] ARM: s3c: cpufreq: use global s3c2412_cpufreq_setrefresh
  2019-10-10 20:30   ` [PATCH 31/36] ARM: s3c: cpufreq: use global s3c2412_cpufreq_setrefresh Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
@ 2019-10-23 13:44     ` Krzysztof Kozlowski
  2019-10-23 13:57       ` Arnd Bergmann
  1 sibling, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 13:44 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Rafael J. Wysocki, Viresh Kumar, linux-samsung-soc,
	linux-arm-kernel, linus.walleij, linux-pm, linux-kernel

On Thu, Oct 10, 2019 at 10:30:15PM +0200, Arnd Bergmann wrote:
> There are two identical copies of the s3c2412_cpufreq_setrefresh
> function: a static one in the cpufreq driver and a global
> version in iotiming-s3c2412.c.
> 
> As the function requires the use of a hardcoded register address
> from a header that we want to not be visible to drivers, just
> move the existing global function and add a declaration in
> one of the cpufreq header files.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/cpufreq/s3c2412-cpufreq.c            | 23 --------------------
>  include/linux/soc/samsung/s3c-cpufreq-core.h |  1 +
>  2 files changed, 1 insertion(+), 23 deletions(-)
> 
> diff --git a/drivers/cpufreq/s3c2412-cpufreq.c b/drivers/cpufreq/s3c2412-cpufreq.c
> index 38dc9e6db633..a77c63e92e1a 100644
> --- a/drivers/cpufreq/s3c2412-cpufreq.c
> +++ b/drivers/cpufreq/s3c2412-cpufreq.c
> @@ -25,8 +25,6 @@
>  #include <asm/mach/arch.h>
>  #include <asm/mach/map.h>
>  
> -#include <mach/s3c2412.h>
> -
>  #include <mach/map.h>
>  
>  #define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
> @@ -156,27 +154,6 @@ static void s3c2412_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
>  	clk_set_parent(armclk, cfg->divs.dvs ? hclk : fclk);
>  }
>  
> -static void s3c2412_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg)
> -{
> -	struct s3c_cpufreq_board *board = cfg->board;
> -	unsigned long refresh;
> -
> -	s3c_freq_dbg("%s: refresh %u ns, hclk %lu\n", __func__,
> -		     board->refresh, cfg->freq.hclk);
> -
> -	/* Reduce both the refresh time (in ns) and the frequency (in MHz)
> -	 * by 10 each to ensure that we do not overflow 32 bit numbers. This
> -	 * should work for HCLK up to 133MHz and refresh period up to 30usec.
> -	 */
> -
> -	refresh = (board->refresh / 10);
> -	refresh *= (cfg->freq.hclk / 100);
> -	refresh /= (1 * 1000 * 1000);	/* 10^6 */
> -
> -	s3c_freq_dbg("%s: setting refresh 0x%08lx\n", __func__, refresh);
> -	__raw_writel(refresh, S3C2412_REFRESH);
> -}
> -
>  /* set the default cpu frequency information, based on an 200MHz part
>   * as we have no other way of detecting the speed rating in software.
>   */
> diff --git a/include/linux/soc/samsung/s3c-cpufreq-core.h b/include/linux/soc/samsung/s3c-cpufreq-core.h
> index 4d22be1031b9..eca942559014 100644
> --- a/include/linux/soc/samsung/s3c-cpufreq-core.h
> +++ b/include/linux/soc/samsung/s3c-cpufreq-core.h
> @@ -246,6 +246,7 @@ extern int s3c2412_iotiming_calc(struct s3c_cpufreq_config *cfg,
>  
>  extern void s3c2412_iotiming_set(struct s3c_cpufreq_config *cfg,
>  				 struct s3c_iotimings *iot);
> +extern void s3c2412_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg);

I think that it does not cover the !CONFIG_S3C2412_IOTIMING case.
Either you need to provide also the empty stub or add default=y to
S3C2412_IOTIMING. Otherwise cpufreq driver might end up without this.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 30/36] ARM: s3c: remove cpufreq header dependencies
  2019-10-23 13:38     ` Krzysztof Kozlowski
@ 2019-10-23 13:46       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 13:46 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Linux PM list, Viresh Kumar, Linus Walleij, Rafael J. Wysocki,
	linux-kernel, Kukjin Kim, Linux ARM

On Wed, Oct 23, 2019 at 3:38 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Oct 10, 2019 at 10:30:14PM +0200, Arnd Bergmann wrote:
> > diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq.h b/include/linux/soc/samsung/s3c-cpu-freq.h
> > similarity index 100%
> > rename from arch/arm/plat-samsung/include/plat/cpu-freq.h
> > rename to include/linux/soc/samsung/s3c-cpu-freq.h
> > diff --git a/arch/arm/plat-samsung/include/plat/cpu-freq-core.h b/include/linux/soc/samsung/s3c-cpufreq-core.h
> > similarity index 99%
> > rename from arch/arm/plat-samsung/include/plat/cpu-freq-core.h
> > rename to include/linux/soc/samsung/s3c-cpufreq-core.h
> > index 2c7cf2665634..4d22be1031b9 100644
>
> Can you also update the header guard names to match new location?

Neither of those files had header guards, added them now.

        Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 33/36] ARM: s3c: move low-level clk reg access into platform code
  2019-10-10 20:30   ` [PATCH 33/36] ARM: s3c: move low-level clk reg access into platform code Arnd Bergmann
  2019-10-10 20:30     ` Arnd Bergmann
@ 2019-10-23 13:49     ` Krzysztof Kozlowski
  2019-10-23 13:54       ` Arnd Bergmann
  1 sibling, 1 reply; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 13:49 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Rafael J. Wysocki, Viresh Kumar, linux-samsung-soc,
	linux-arm-kernel, linus.walleij, linux-kernel, linux-pm

On Thu, Oct 10, 2019 at 10:30:17PM +0200, Arnd Bergmann wrote:
> Rather than have the cpufreq drivers touch include the
> common headers to get the constants, add a small indirection.
> This is still not the proper way that would do this through
> the common clk API, but it lets us kill off the header file
> usage.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s3c24xx/Makefile               |  2 +-
>  arch/arm/mach-s3c24xx/cpufreq-utils.c        | 32 ++++++++++++++++++++
>  drivers/cpufreq/s3c2410-cpufreq.c            |  8 +----
>  drivers/cpufreq/s3c2412-cpufreq.c            | 10 ++----
>  drivers/cpufreq/s3c2440-cpufreq.c            | 16 +++-------
>  drivers/cpufreq/s3c24xx-cpufreq.c            | 11 ++-----
>  include/linux/soc/samsung/s3c-cpufreq-core.h |  7 +++++
>  7 files changed, 51 insertions(+), 35 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
> index 695573df00b1..195a4cb23ecb 100644
> --- a/arch/arm/mach-s3c24xx/Makefile
> +++ b/arch/arm/mach-s3c24xx/Makefile
> @@ -38,7 +38,7 @@ obj-$(CONFIG_PM_SLEEP)		+= irq-pm.o sleep.o
>  
>  # common code
>  
> -obj-$(CONFIG_S3C2410_CPUFREQ_UTILS) += cpufreq-utils.o
> +obj-$(CONFIG_ARM_S3C24XX_CPUFREQ) += cpufreq-utils.o

Drop also here S3C2410_CPUFREQ_UTILS entirely.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 33/36] ARM: s3c: move low-level clk reg access into platform code
  2019-10-23 13:49     ` Krzysztof Kozlowski
@ 2019-10-23 13:54       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 13:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Linux PM list, Viresh Kumar, Linus Walleij, Rafael J. Wysocki,
	linux-kernel, Kukjin Kim, Linux ARM

On Wed, Oct 23, 2019 at 3:50 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:

> >  # common code
> >
> > -obj-$(CONFIG_S3C2410_CPUFREQ_UTILS) += cpufreq-utils.o
> > +obj-$(CONFIG_ARM_S3C24XX_CPUFREQ) += cpufreq-utils.o
>
> Drop also here S3C2410_CPUFREQ_UTILS entirely.
>

Ok, done.

      Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 31/36] ARM: s3c: cpufreq: use global s3c2412_cpufreq_setrefresh
  2019-10-23 13:44     ` Krzysztof Kozlowski
@ 2019-10-23 13:57       ` Arnd Bergmann
  0 siblings, 0 replies; 135+ messages in thread
From: Arnd Bergmann @ 2019-10-23 13:57 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
	Linux PM list, Viresh Kumar, Linus Walleij, Rafael J. Wysocki,
	linux-kernel, Kukjin Kim, Linux ARM

On Wed, Oct 23, 2019 at 3:44 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Oct 10, 2019 at 10:30:15PM +0200, Arnd Bergmann wrote:

> > @@ -246,6 +246,7 @@ extern int s3c2412_iotiming_calc(struct s3c_cpufreq_config *cfg,
> >
> >  extern void s3c2412_iotiming_set(struct s3c_cpufreq_config *cfg,
> >                                struct s3c_iotimings *iot);
> > +extern void s3c2412_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg);
>
> I think that it does not cover the !CONFIG_S3C2412_IOTIMING case.
> Either you need to provide also the empty stub or add default=y to
> S3C2412_IOTIMING. Otherwise cpufreq driver might end up without this.

S3C2412_IOTIMING is not currently optional, it always gets selected
by ARM_S3C2412_CPUFREQ, unlike S3C2410_IOTIMING which is
only selected by specific boards for reasons I don't understand.

        Arnd

^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 35/36] ARM: s3c: move into a common directory
  2019-10-10 21:07 ` [PATCH 35/36] ARM: s3c: move into a common directory Arnd Bergmann
  2019-10-10 21:07   ` Arnd Bergmann
@ 2019-10-23 14:05   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 14:05 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, linux-samsung-soc, linux-arm-kernel, linus.walleij

On Thu, Oct 10, 2019 at 11:07:04PM +0200, Arnd Bergmann wrote:
> s3c24xx and s3c64xx have a lot in common, but are split across three
> separate directories, which makes the interaction of the header files
> more complicated than necessary.
> 
> Move all three directories into a new mach-s3c, with a minimal
> set of changes to each file.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

(...)

>  rename arch/arm/{plat-samsung => mach-s3c}/Kconfig (98%)
>  rename arch/arm/{mach-s3c24xx/Kconfig => mach-s3c/Kconfig.s3c24xx} (100%)
>  rename arch/arm/{mach-s3c64xx/Kconfig => mach-s3c/Kconfig.s3c64xx} (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/Makefile (83%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/Makefile.boot (100%)
>  rename arch/arm/{mach-s3c24xx/Makefile => mach-s3c/Makefile.s3c24xx} (92%)
>  rename arch/arm/{mach-s3c64xx/Makefile => mach-s3c/Makefile.s3c64xx} (83%)
>  rename arch/arm/{plat-samsung => mach-s3c}/adc.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/anubis.h (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/ata-core.h (100%)

Looks like generic file now (shared between S3C24xx and S3C64xx) so I
would prefer to add a -s3c64xx suffix to make it clear.

>  rename arch/arm/{mach-s3c64xx => mach-s3c}/backlight.h (100%)

The same.

>  rename arch/arm/{mach-s3c24xx => mach-s3c}/bast-ide.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/bast-irq.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/bast.h (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/common-smdk.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/common-smdk.h (100%)

The same as SMDK is a common name (Samsung Developers Kit, or something
like this).

>  rename arch/arm/{plat-samsung => mach-s3c}/cpu.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/cpufreq-utils.c (100%)

Suffix.

>  rename arch/arm/{mach-s3c64xx => mach-s3c}/cpuidle.c (100%)

Suffix.

>  rename arch/arm/{mach-s3c64xx => mach-s3c}/crag6410.h (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/dev-audio.c (100%)

Suffix.

>  rename arch/arm/{mach-s3c64xx => mach-s3c}/dev-backlight.c (100%)

Suffix.

>  rename arch/arm/{mach-s3c64xx/dev-uart.c => mach-s3c/dev-uart-s3c64xx.c} (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/dev-uart.c (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/devs.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/fb-core.h (100%)

Suffix.

>  rename arch/arm/{plat-samsung => mach-s3c}/gpio-samsung.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/gta02.h (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/h1940-bluetooth.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/h1940.h (100%)
>  rename arch/arm/{mach-s3c24xx/include/mach/dma.h => mach-s3c/include/mach/dma-s3c24xx.h} (100%)
>  rename arch/arm/{mach-s3c64xx/include/mach/dma.h => mach-s3c/include/mach/dma-s3c64xx.h} (100%)
>  create mode 100644 arch/arm/mach-s3c/include/mach/dma.h
>  rename arch/arm/{mach-s3c24xx/include/mach/gpio-samsung.h => mach-s3c/include/mach/gpio-samsung-s3c24xx.h} (100%)
>  rename arch/arm/{mach-s3c64xx/include/mach/gpio-samsung.h => mach-s3c/include/mach/gpio-samsung-s3c64xx.h} (100%)
>  create mode 100644 arch/arm/mach-s3c/include/mach/gpio-samsung.h
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/hardware.h (100%)

Suffix.

>  rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/io.h (100%)

Suffix.

>  rename arch/arm/{mach-s3c24xx/include/mach/irqs.h => mach-s3c/include/mach/irqs-s3c24xx.h} (100%)
>  rename arch/arm/{mach-s3c64xx/include/mach/irqs.h => mach-s3c/include/mach/irqs-s3c64xx.h} (100%)
>  create mode 100644 arch/arm/mach-s3c/include/mach/irqs.h
>  rename arch/arm/{mach-s3c24xx/include/mach/map.h => mach-s3c/include/mach/map-s3c24xx.h} (100%)
>  rename arch/arm/{mach-s3c64xx/include/mach/map.h => mach-s3c/include/mach/map-s3c64xx.h} (100%)
>  create mode 100644 arch/arm/mach-s3c/include/mach/map.h
>  rename arch/arm/{mach-s3c24xx/include/mach/pm-core.h => mach-s3c/include/mach/pm-core-s3c24xx.h} (100%)
>  rename arch/arm/{mach-s3c64xx/include/mach/pm-core.h => mach-s3c/include/mach/pm-core-s3c64xx.h} (100%)
>  create mode 100644 arch/arm/mach-s3c/include/mach/pm-core.h
>  rename arch/arm/{mach-s3c24xx/include/mach/regs-clock.h => mach-s3c/include/mach/regs-clock-s3c24xx.h} (100%)
>  rename arch/arm/{mach-s3c64xx/include/mach/regs-clock.h => mach-s3c/include/mach/regs-clock-s3c64xx.h} (100%)
>  create mode 100644 arch/arm/mach-s3c/include/mach/regs-clock.h
>  rename arch/arm/{mach-s3c24xx/include/mach/regs-gpio.h => mach-s3c/include/mach/regs-gpio-s3c24xx.h} (100%)
>  rename arch/arm/{mach-s3c64xx/include/mach/regs-gpio.h => mach-s3c/include/mach/regs-gpio-s3c64xx.h} (100%)
>  create mode 100644 arch/arm/mach-s3c/include/mach/regs-gpio.h
>  rename arch/arm/{mach-s3c24xx/include/mach/regs-irq.h => mach-s3c/include/mach/regs-irq-s3c24xx.h} (100%)
>  rename arch/arm/{mach-s3c64xx/include/mach/regs-irq.h => mach-s3c/include/mach/regs-irq-s3c64xx.h} (100%)
>  create mode 100644 arch/arm/mach-s3c/include/mach/regs-irq.h
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/regs-s3c2443-clock.h (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/rtc-core.h (100%)

Suffix.

>  rename arch/arm/{mach-s3c24xx => mach-s3c}/include/mach/s3c2412.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/adc-core.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/cpu.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/devs.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/fb.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/gpio-cfg-helpers.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/gpio-cfg.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/gpio-core.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/iic-core.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/keypad.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/map-base.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/map-s3c.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/map-s5p.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/pm-common.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/pm.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/pwm-core.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/regs-adc.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/regs-irqtype.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/samsung-time.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/sdhci.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/usb-phy.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/include/plat/wakeup-mask.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/init.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/iotiming-s3c2410.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/iotiming-s3c2412.c (100%)
>  rename arch/arm/{mach-s3c24xx/irq-pm.c => mach-s3c/irq-pm-s3c24xx.c} (100%)
>  rename arch/arm/{mach-s3c64xx/irq-pm.c => mach-s3c/irq-pm-s3c64xx.c} (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/irq-s3c24xx-fiq-exports.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/irq-s3c24xx-fiq.S (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/irq-s3c24xx.c (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/irq-uart.h (100%)

Suffix.

>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-amlm5900.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-anubis.c (99%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-anw6410.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-at2440evb.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-bast.c (99%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-crag6410-module.c (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-crag6410.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-gta02.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-h1940.c (99%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-hmt.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-jive.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-mini2440.c (99%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-mini6410.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-n30.c (99%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-ncp.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-nexcoder.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-osiris-dvs.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-osiris.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-otom.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-qt2410.c (99%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-real6410.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-rx1950.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-rx3715.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-s3c2416-dt.c (98%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-s3c64xx-dt.c (98%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq.c (99%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq.h (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq5.c (99%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smartq7.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2410.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2413.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2416.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2440.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2443.c (99%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smdk6400.c (99%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smdk6410.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-tct_hammer.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-vr1000.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-vstms.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/nand-core.h (100%)

Suffix.

>  rename arch/arm/{mach-s3c64xx => mach-s3c}/onenand-core.h (100%)

Suffix.

>  rename arch/arm/{mach-s3c24xx => mach-s3c}/osiris.h (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/otom.h (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/pl080.c (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/platformdata.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2410.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2440-12000000.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/pll-s3c2440-16934400.c (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/pm-common.c (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/pm-gpio.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-h1940.S (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2410.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2412.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2416.c (100%)
>  rename arch/arm/{mach-s3c24xx/pm.c => mach-s3c/pm-s3c24xx.c} (100%)
>  rename arch/arm/{mach-s3c64xx/pm.c => mach-s3c/pm-s3c64xx.c} (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/pm.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/regs-dsc.h (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-gpio-memport.h (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/regs-mem.h (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-modem.h (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-srom.h (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-sys.h (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-syscon-power.h (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/regs-usb-hsotg-phy.h (100%)

Suffix to all regs above.

>  rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2410.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412-power.h (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2416.c (99%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2440.c (98%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2442.c (98%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2443.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c244x.c (99%)
>  rename arch/arm/{mach-s3c24xx/common.c => mach-s3c/s3c24xx.c} (99%)
>  rename arch/arm/{mach-s3c24xx/common.h => mach-s3c/s3c24xx.h} (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/s3c6400.c (98%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/s3c6410.c (99%)
>  rename arch/arm/{mach-s3c64xx/common.c => mach-s3c/s3c64xx.c} (99%)
>  rename arch/arm/{mach-s3c64xx/common.h => mach-s3c/s3c64xx.h} (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-camif.c (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-fb-24bpp.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-i2c.c (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c0.c (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-i2c1.c (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-ide.c (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-keypad.c (100%)

Suffix to all setup above.

>  rename arch/arm/{mach-s3c24xx/setup-sdhci-gpio.c => mach-s3c/setup-sdhci-gpio-s3c24xx.c} (100%)
>  rename arch/arm/{mach-s3c64xx/setup-sdhci-gpio.c => mach-s3c/setup-sdhci-gpio-s3c64xx.c} (100%)
>  rename arch/arm/{mach-s3c24xx/setup-spi.c => mach-s3c/setup-spi-s3c24xx.c} (100%)
>  rename arch/arm/{mach-s3c64xx/setup-spi.c => mach-s3c/setup-spi-s3c64xx.c} (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/setup-ts.c (100%)

Suffix.

>  rename arch/arm/{mach-s3c64xx => mach-s3c}/setup-usb-phy.c (100%)

Suffix.

>  rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-audio.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-nor.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-pm.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec-usb.c (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/simtec.h (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/sleep-s3c2410.S (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/sleep-s3c2412.S (100%)
>  rename arch/arm/{mach-s3c24xx/sleep.S => mach-s3c/sleep-s3c24xx.S} (100%)
>  rename arch/arm/{mach-s3c64xx/sleep.S => mach-s3c/sleep-s3c64xx.S} (100%)
>  rename arch/arm/{mach-s3c24xx => mach-s3c}/spi-core.h (100%)

Suffix.

>  rename arch/arm/{mach-s3c24xx => mach-s3c}/vr1000.h (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/wakeup-mask.c (100%)
>  rename arch/arm/{plat-samsung => mach-s3c}/watchdog-reset.c (100%)
>  rename arch/arm/{mach-s3c64xx => mach-s3c}/watchdog-reset.h (100%)

Suffix.

Rest looks reasonable.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 135+ messages in thread

* Re: [PATCH 11/36] ARM: s5pv210: split from plat-samsung
  2019-10-23 13:17       ` Arnd Bergmann
@ 2019-10-23 14:12         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 135+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-23 14:12 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, Ulf Hansson, Thierry Reding, Mark Brown,
	Greg Kroah-Hartman, Jiri Slaby, Sangbeom Kim, Sylwester Nawrocki,
	Liam Girdwood,
	moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES, Linux ARM,
	Linus Walleij, Uwe Kleine-König, Jaroslav Kysela,
	Takashi Iwai, Olof Johansson, Sascha Hauer,
	Clément Péron, Mauro Carvalho Chehab,
	Bartlomiej Zolnierkiewicz, Faiz Abbas, linux-kernel, linux-mmc,
	Linux PWM List, linux-spi, linux-serial,
	ALSA Development Mailing List

On Wed, Oct 23, 2019 at 03:17:35PM +0200, Arnd Bergmann wrote:
> On Wed, Oct 23, 2019 at 2:15 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > On Thu, Oct 10, 2019 at 10:29:55PM +0200, Arnd Bergmann wrote:
> > > These can be build completely independently, so split
> > > the two Kconfig symbols.
> > >       config DEBUG_S3C_UART0
> > > -             depends on PLAT_SAMSUNG || ARCH_EXYNOS
> > > +             depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
> >
> > How are you going to select DEBUG_S5PV210_UART now?
> 
> I don't see a problem here, the patch should not change the behavior at all.
> 
> The whole entry now looks like:
> 
>         config DEBUG_S3C_UART0
>                 depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS
>                 select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>                 select DEBUG_S3C24XX_UART if ARCH_S3C24XX
>                 select DEBUG_S3C64XX_UART if ARCH_S3C64XX
>                 select DEBUG_S5PV210_UART if ARCH_S5PV210
>                 bool "Use Samsung S3C UART 0 for low-level debug"
> 
> so this will work as before with any of ARCH_EXYNOS, ARCH_S3C24XX,
> ARCH_S3C64XX and ARCH_S5PV210.
> 
> What am I missing?

Ah, everything is OK, I mixed up removed with added line so it looked
reversed (removal of ARCH_S5PV210).

Looks good.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 135+ messages in thread

end of thread, other threads:[~2019-10-23 14:12 UTC | newest]

Thread overview: 135+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 20:28 [PATCH 00/36] ARM: samsung platform cleanup Arnd Bergmann
2019-10-10 20:28 ` Arnd Bergmann
2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
2019-10-10 20:29   ` Arnd Bergmann
2019-10-10 20:29   ` [PATCH 02/36] ARM: s3c: simplify mach/io.h Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-10 20:29   ` [PATCH 03/36] usb: gadget: s3c: use platform resources Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-23 10:06     ` Krzysztof Kozlowski
2019-10-23 12:46     ` Krzysztof Kozlowski
2019-10-23 13:26       ` Arnd Bergmann
2019-10-10 20:29   ` [PATCH 04/36] usb: gadget: s3c-hsudc: remove platform header dependency Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-23 10:09     ` Krzysztof Kozlowski
2019-10-23 12:21       ` Arnd Bergmann
2019-10-10 20:29   ` [PATCH 05/36] ARM: samsung: make pm-debug platform independent Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-23 10:27     ` Krzysztof Kozlowski
2019-10-23 12:13       ` Arnd Bergmann
2019-10-10 20:29   ` [PATCH 06/36] ARM: samsung: move CONFIG_DEBUG_S3C_UART to Kconfig.debug Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-23 10:12     ` Krzysztof Kozlowski
2019-10-23 12:22       ` Arnd Bergmann
2019-10-10 20:29   ` [PATCH 07/36] ARM: exynos: use private samsung_cpu_id copy Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-23 10:54     ` Krzysztof Kozlowski
2019-10-23 12:37       ` Arnd Bergmann
2019-10-10 20:29   ` [PATCH 08/36] ARM: exynos: stop selecting PLAT_SAMSUNG Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-15 14:12     ` Ulf Hansson
2019-10-23 10:57     ` Krzysztof Kozlowski
2019-10-23 12:43       ` Arnd Bergmann
2019-10-10 20:29   ` [PATCH 09/36] ARM: samsung: move pm check code to drivers/soc Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-23 11:32     ` Krzysztof Kozlowski
2019-10-23 12:45       ` Arnd Bergmann
2019-10-10 20:29   ` [PATCH 10/36] ARM: s5pv210: use private pm save/restore Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-23 11:55     ` Krzysztof Kozlowski
2019-10-23 13:12       ` Arnd Bergmann
2019-10-10 20:29   ` [PATCH 11/36] ARM: s5pv210: split from plat-samsung Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-11  5:51     ` Uwe Kleine-König
2019-10-11  5:51       ` Uwe Kleine-König
2019-10-22 14:01       ` Arnd Bergmann
2019-10-22 15:53         ` Uwe Kleine-König
2019-10-22 16:20           ` Arnd Bergmann
2019-10-15 14:13     ` Ulf Hansson
2019-10-15 14:23     ` Thierry Reding
2019-10-23 12:14     ` Krzysztof Kozlowski
2019-10-23 13:17       ` Arnd Bergmann
2019-10-23 14:12         ` Krzysztof Kozlowski
2019-10-10 20:29   ` [PATCH 12/36] ARM: s3c64xx: remove mach/hardware.h Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-16 10:09     ` Charles Keepax
2019-10-10 20:29   ` [PATCH 13/36] ARM: s3c: move regs-spi.h into spi driver Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-23 12:32     ` Krzysztof Kozlowski
2019-10-23 13:21       ` Arnd Bergmann
2019-10-10 20:29   ` [PATCH 14/36] ARM: s3c: move irqchip driver back into platform Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-10 20:29   ` [PATCH 15/36] ARM: s3c: adc: move header to linux/soc/samsung Arnd Bergmann
2019-10-10 20:29     ` Arnd Bergmann
2019-10-10 22:20     ` Guenter Roeck
2019-10-10 22:20       ` Guenter Roeck
2019-10-10 22:29       ` Dmitry Torokhov
2019-10-10 22:29         ` Dmitry Torokhov
2019-10-10 22:44         ` Sebastian Reichel
2019-10-10 22:44           ` Sebastian Reichel
2019-10-23 12:37     ` Krzysztof Kozlowski
2019-10-23 13:23       ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 16/36] ARM: s3c: move spi fiq handler into platform Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 17/36] ARM: s3c: h1940-audio: turn into platform driver Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 18/36] ARM: s3c: gta02-audio: " Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 19/36] ARM: s3c: rx1950: " Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 20/36] ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-11 10:50     ` Mark Brown
2019-10-11 10:50       ` Mark Brown
2019-10-10 20:30   ` [PATCH 21/36] ARM: s3c: move iis pinctrl config into boards Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-23 12:50     ` Krzysztof Kozlowski
2019-10-23 13:29       ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 22/36] ARM: s3c: leds: move setpull() calls into board files Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 23/36] ARM: s3c: move s3cmci pinctrl handling " Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-15 14:12     ` Ulf Hansson
2019-10-16 13:12     ` Linus Walleij
2019-10-10 20:30   ` [PATCH 24/36] ARM: s3c: include mach/irqs.h where needed Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 25/36] ARM: s3c: spi: avoid hardcoding fiq number in driver Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 26/36] ARM: s3c: bast: avoid irq_desc array usage Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 27/36] ARM: s3c: fix mmc gpio lookup tables Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 28/36] fbdev: s3c2410fb: remove mach header dependency Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-23 13:13     ` Krzysztof Kozlowski
2019-10-23 13:35       ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 29/36] ARM: s3c: cpufreq: split out registers Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 30/36] ARM: s3c: remove cpufreq header dependencies Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-23 13:38     ` Krzysztof Kozlowski
2019-10-23 13:46       ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 31/36] ARM: s3c: cpufreq: use global s3c2412_cpufreq_setrefresh Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-23 13:44     ` Krzysztof Kozlowski
2019-10-23 13:57       ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 32/36] ARM: s3c: iotiming: make functions static Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 33/36] ARM: s3c: move low-level clk reg access into platform code Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-23 13:49     ` Krzysztof Kozlowski
2019-10-23 13:54       ` Arnd Bergmann
2019-10-10 20:30   ` [PATCH 34/36] ARM: s3c: stop including mach/hardware.h from mach/io.h Arnd Bergmann
2019-10-10 20:30     ` Arnd Bergmann
2019-10-10 21:02     ` Russell King - ARM Linux admin
2019-10-10 21:02       ` Russell King - ARM Linux admin
2019-10-10 21:53       ` Arnd Bergmann
2019-10-10 21:53         ` Arnd Bergmann
2019-10-15 14:52   ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Tomasz Figa
2019-10-10 21:07 ` [PATCH 35/36] ARM: s3c: move into a common directory Arnd Bergmann
2019-10-10 21:07   ` Arnd Bergmann
2019-10-23 14:05   ` Krzysztof Kozlowski
2019-10-10 21:07 ` [PATCH 36/36] ARM: s3c: make headers local if possible Arnd Bergmann
2019-10-10 21:07   ` Arnd Bergmann
2019-10-23 13:10 ` [PATCH 00/36] ARM: samsung platform cleanup Krzysztof Kozlowski
2019-10-23 13:39   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).