Skip to contentSkip to conversation

spi / fbdev / cpufreq / usb / mmc / hwmon / ARM: Prepare for multiplatform S3C

PATCH Applied Krzysztof Kozlowski 10 participants 71 messages Aug 6, 2020 – Aug 21, 2020 Page 1 of 2

Subsystems (24)
lore
Share & tools
lore

Krzysztof Kozlowski

author maintainer
#0 lore raw

v2 cover spi / fbdev / cpufreq / usb / mmc / hwmon / ARM: Prepare for multiplatform S3C

Hi All,

Shortly
=======
This is a continuation of Arnd's work from 2019 [1]. The goal is to cleanup, merge and finally make the Samsung S3C24xx and S3C64xx architectures multiplatform. The multiplatform did not happen yet here... just cleaning up and merging into one mach-s3c.

I intend to take it through Samsung SoC tree so all Acks are welcomed.

Changes since v1
================
1. Rebased,
2. Addressed comments (including mine),
3. Few new patches.

Please see individual changelogs (per patch).

[1] https://patchwork.kernel.org/project/linux-samsung-soc/list/?series=185855&state=*

Best regards,
Krzysztof

Arnd Bergmann (37):
ARM: s3c24xx: fix mmc gpio lookup tables
ARM: s3c24xx: iotiming: make functions static
ARM: s3c24xx: make S3C24XX_MISCCR access indirect
ARM: s3c24xx: simplify mach/io.h
usb: gadget: s3c: use platform resources
usb: gadget: s3c-hsudc: remove platform header dependency
ARM: samsung: don't build plat/pm-common for Exynos
ARM: samsung: remove s3c_pm_debug_init()
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: don't imply CONFIG_PLAT_SAMSUNG
ARM: s3c64xx: remove mach/hardware.h
ARM: s3c24xx: move regs-spi.h into spi driver
ARM: s3c24xx: move irqchip driver back into platform
ARM: s3c: adc: move header to linux/soc/samsung
ARM: s3c24xx: move spi fiq handler into platform
ASoC: samsung: h1940: turn into platform driver
ASoC: samsung: neo1973: turn into platform driver
ASoC: samsung: rx1950: turn into platform driver
ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS
ARM: s3c24xx: move iis pinctrl config into boards
ARM: s3c24xx: move s3cmci pinctrl handling into board files
ARM: s3c24xx: include mach/irqs.h where needed
ARM: s3c24xx: spi: avoid hardcoding fiq number in driver
ARM: s3c24xx: bast: avoid irq_desc array usage
fbdev: s3c2410fb: remove mach header dependency
cpufreq: s3c24xx: split out registers
ARM: s3c: remove cpufreq header dependencies
cpufreq: s3c2412: use global s3c2412_cpufreq_setrefresh
cpufreq: s3c24xx: move low-level clk reg access into platform code
ARM: s3c24xx: stop including mach/hardware.h from mach/io.h
ARM: s3c: move into a common directory
ARM: s3c: make headers local if possible

Krzysztof Kozlowski (4):
ARM: s3c: Remove unneeded machine header includes
mmc: s3cmci: Remove unneeded machine header include
ARM: s3c24xx: pass pointer to clk driver via platform data
MAINTAINERS: Add more name matches for Samsung SoC entries

 MAINTAINERS                                   |  21 +-
 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                 |  21 +-
 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}      |   7 -
 .../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}    |  23 +-
 .../Makefile => mach-s3c/Makefile.s3c64xx}    |  32 +--
 .../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
 .../ata-core-s3c64xx.h}                       |   6 +-
 .../backlight-s3c64xx.h}                      |   6 +-
 .../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
 .../common-smdk-s3c24xx.c}                    |  13 +-
 .../common-smdk-s3c24xx.h}                    |   0
 arch/arm/{plat-samsung => mach-s3c}/cpu.c     |  21 +-
 .../include/plat => mach-s3c}/cpu.h           |  12 -
 .../cpufreq-utils-s3c24xx.c}                  |  40 +++-
 .../cpuidle.c => mach-s3c/cpuidle-s3c64xx.c}  |   8 +-
 .../arm/{mach-s3c64xx => mach-s3c}/crag6410.h |   2 +-
 .../dev-audio-s3c64xx.c}                      |   9 +-
 .../dev-backlight-s3c64xx.c}                  |   6 +-
 .../dev-uart-s3c64xx.c}                       |   5 +-
 .../arm/{plat-samsung => mach-s3c}/dev-uart.c |   2 +-
 arch/arm/{plat-samsung => mach-s3c}/devs.c    |  57 ++++-
 .../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                       |   9 +
 .../fb-core.h => mach-s3c/fb-core-s3c24xx.h}  |   6 +-
 .../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              |   9 +
 arch/arm/{mach-s3c24xx => mach-s3c}/gta02.h   |   2 +-
 .../h1940-bluetooth.c                         |   7 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/h1940.h   |   0
 .../hardware-s3c24xx.h}                       |  13 +-
 .../include/plat => mach-s3c}/iic-core.h      |   0
 arch/arm/mach-s3c/include/mach/io-s3c24xx.h   |  50 +++++
 arch/arm/mach-s3c/include/mach/io.h           |   8 +
 .../include/mach/irqs-s3c24xx.h}              |   0
 .../include/mach/irqs-s3c64xx.h}              |   0
 arch/arm/mach-s3c/include/mach/irqs.h         |   9 +
 .../plat => mach-s3c/include/mach}/map-base.h |   0
 arch/arm/{plat-samsung => mach-s3c}/init.c    |   4 +-
 .../iotiming-s3c2410.c                        |  14 +-
 .../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 +-
 .../irq-uart-s3c64xx.h}                       |   0
 .../include/plat => mach-s3c}/keypad.h        |   0
 .../mach-amlm5900.c                           |  35 ++-
 .../{mach-s3c24xx => mach-s3c}/mach-anubis.c  |  12 +-
 .../{mach-s3c64xx => mach-s3c}/mach-anw6410.c |  17 +-
 .../mach-at2440evb.c                          |  26 ++-
 .../{mach-s3c24xx => mach-s3c}/mach-bast.c    |  18 +-
 .../mach-crag6410-module.c                    |   2 +-
 .../mach-crag6410.c                           |  31 ++-
 .../{mach-s3c24xx => mach-s3c}/mach-gta02.c   |  55 ++++-
 .../{mach-s3c24xx => mach-s3c}/mach-h1940.c   |  64 ++++--
 .../arm/{mach-s3c64xx => mach-s3c}/mach-hmt.c |  13 +-
 .../{mach-s3c24xx => mach-s3c}/mach-jive.c    |  25 ++-
 .../mach-mini2440.c                           |  40 +++-
 .../mach-mini6410.c                           |  24 +-
 .../arm/{mach-s3c24xx => mach-s3c}/mach-n30.c |  34 ++-
 .../arm/{mach-s3c64xx => mach-s3c}/mach-ncp.c |  11 +-
 .../mach-nexcoder.c                           |  18 +-
 .../mach-osiris-dvs.c                         |   4 +-
 .../{mach-s3c24xx => mach-s3c}/mach-osiris.c  |  18 +-
 .../{mach-s3c24xx => mach-s3c}/mach-otom.c    |  14 +-
 .../{mach-s3c24xx => mach-s3c}/mach-qt2410.c  |  36 ++-
 .../mach-real6410.c                           |  20 +-
 .../{mach-s3c24xx => mach-s3c}/mach-rx1950.c  |  55 ++++-
 .../{mach-s3c24xx => mach-s3c}/mach-rx3715.c  |  24 +-
 .../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 |  16 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smartq7.c |  16 +-
 .../mach-smdk2410.c                           |  14 +-
 .../mach-smdk2413.c                           |  21 +-
 .../mach-smdk2416.c                           |  23 +-
 .../mach-smdk2440.c                           |  25 ++-
 .../mach-smdk2443.c                           |  14 +-
 .../mach-smdk6400.c                           |  11 +-
 .../mach-smdk6410.c                           |  29 ++-
 .../mach-tct_hammer.c                         |  22 +-
 .../{mach-s3c24xx => mach-s3c}/mach-vr1000.c  |  13 +-
 .../{mach-s3c24xx => mach-s3c}/mach-vstms.c   |  18 +-
 .../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                       |   9 +
 .../nand-core-s3c24xx.h}                      |   6 +-
 .../onenand-core-s3c64xx.h}                   |   6 +-
 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   |   6 +-
 .../{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}  |  10 +-
 .../pm-core.h => mach-s3c/pm-core-s3c64xx.h}  |  50 +----
 arch/arm/mach-s3c/pm-core.h                   |   9 +
 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   |  12 +-
 .../{mach-s3c24xx => mach-s3c}/pm-s3c2416.c   |   6 +-
 .../pm.c => mach-s3c/pm-s3c24xx.c}            |  14 +-
 .../pm.c => mach-s3c/pm-s3c64xx.c}            |  74 +++++-
 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                |   9 +
 .../regs-dsc-s3c24xx.h}                       |   6 +-
 .../regs-gpio-memport-s3c64xx.h}              |   0
 .../regs-gpio-s3c24xx.h}                      |   2 +
 .../regs-gpio-s3c64xx.h}                      |   0
 arch/arm/mach-s3c/regs-gpio.h                 |   9 +
 .../regs-irq-s3c24xx.h}                       |   2 +
 .../regs-irq-s3c64xx.h}                       |   0
 arch/arm/mach-s3c/regs-irq.h                  |   9 +
 .../include/plat => mach-s3c}/regs-irqtype.h  |   0
 .../regs-mem-s3c24xx.h}                       |   2 +
 .../regs-modem-s3c64xx.h}                     |   0
 .../mach => mach-s3c}/regs-s3c2443-clock.h    |  50 +++++
 .../regs-srom-s3c64xx.h}                      |   0
 .../regs-sys-s3c64xx.h}                       |   0
 .../regs-syscon-power-s3c64xx.h}              |   0
 .../regs-usb-hsotg-phy-s3c64xx.h}             |   0
 .../rtc-core-s3c24xx.h}                       |   6 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2410.c |  21 +-
 .../s3c2412-power.h                           |   0
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412.c |  24 +-
 .../include/mach => mach-s3c}/s3c2412.h       |   2 +
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2416.c |  34 +--
 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 |  29 +--
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c244x.c |  20 +-
 .../common.c => mach-s3c/s3c24xx.c}           |  26 ++-
 .../common.h => mach-s3c/s3c24xx.h}           |   1 +
 arch/arm/{mach-s3c64xx => mach-s3c}/s3c6400.c |  16 +-
 arch/arm/{mach-s3c64xx => mach-s3c}/s3c6410.c |  21 +-
 .../common.c => mach-s3c/s3c64xx.c}           |  26 +--
 .../common.h => mach-s3c/s3c64xx.h}           |   0
 .../include/plat => mach-s3c}/sdhci.h         |   2 +-
 .../setup-camif-s3c24xx.c}                    |   4 +-
 .../setup-fb-24bpp-s3c64xx.c}                 |   6 +-
 .../setup-i2c-s3c24xx.c}                      |   8 +-
 .../setup-i2c0-s3c64xx.c}                     |   4 +-
 .../setup-i2c1-s3c64xx.c}                     |   4 +-
 .../setup-ide-s3c64xx.c}                      |   9 +-
 .../setup-keypad-s3c64xx.c}                   |   6 +-
 .../setup-sdhci-gpio-s3c24xx.c}               |   8 +-
 .../setup-sdhci-gpio-s3c64xx.c}               |   6 +-
 .../setup-spi-s3c24xx.c}                      |   6 +-
 .../setup-spi-s3c64xx.c}                      |   4 +-
 .../setup-ts-s3c24xx.c}                       |   5 +-
 .../setup-usb-phy-s3c64xx.c}                  |  10 +-
 .../{mach-s3c24xx => mach-s3c}/simtec-audio.c |  11 +-
 .../{mach-s3c24xx => mach-s3c}/simtec-nor.c   |   2 +-
 .../{mach-s3c24xx => mach-s3c}/simtec-pm.c    |  10 +-
 .../{mach-s3c24xx => mach-s3c}/simtec-usb.c   |   6 +-
 arch/arm/{mach-s3c24xx => mach-s3c}/simtec.h  |   0
 .../sleep-s3c2410.S                           |   9 +-
 .../sleep-s3c2412.S                           |   5 +-
 .../sleep.S => mach-s3c/sleep-s3c24xx.S}      |   7 +-
 .../sleep.S => mach-s3c/sleep-s3c64xx.S}      |   4 +-
 .../spi-core-s3c24xx.h}                       |   6 +-
 .../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
 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            |   4 +-
 arch/arm/mach-s5pv210/s5pv210.c               |   2 -
 drivers/clk/samsung/clk-s3c2410-dclk.c        |  15 +-
 drivers/cpufreq/Kconfig.arm                   |   2 -
 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/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                    |   9 +-
 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         |   0
 .../video/fbdev/s3c2410fb-regs-lcd.h          |  28 +--
 drivers/video/fbdev/s3c2410fb.c               |  16 +-
 include/linux/platform_data/clk-s3c2410.h     |  19 ++
 .../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               |   6 +-
 .../linux/soc/samsung/s3c-cpu-freq.h          |   4 +
 .../linux/soc/samsung/s3c-cpufreq-core.h      |  14 +-
 .../linux/soc/samsung/s3c-pm.h                |  69 +++---
 .../linux/spi/s3c24xx-fiq.h                   |  10 +
 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 -
 258 files changed, 1834 insertions(+), 1716 deletions(-)
 delete mode 100644 arch/arm/mach-exynos/include/mach/map.h
 rename arch/arm/{plat-samsung => mach-s3c}/Kconfig (72%)
 rename arch/arm/{mach-s3c24xx/Kconfig => mach-s3c/Kconfig.s3c24xx} (98%)
 rename arch/arm/{mach-s3c64xx/Kconfig => mach-s3c/Kconfig.s3c64xx} (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/Makefile (65%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/Makefile.boot (100%)
 rename arch/arm/{mach-s3c24xx/Makefile => mach-s3c/Makefile.s3c24xx} (79%)
 rename arch/arm/{mach-s3c64xx/Makefile => mach-s3c/Makefile.s3c64xx} (58%)
 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/ata-core.h => mach-s3c/ata-core-s3c64xx.h} (78%)
 rename arch/arm/{mach-s3c64xx/backlight.h => mach-s3c/backlight-s3c64xx.h} (78%)
 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/common-smdk.c => mach-s3c/common-smdk-s3c24xx.c} (96%)
 rename arch/arm/{mach-s3c24xx/common-smdk.h => mach-s3c/common-smdk-s3c24xx.h} (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/cpu.c (62%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/cpu.h (89%)
 rename arch/arm/{mach-s3c24xx/cpufreq-utils.c => mach-s3c/cpufreq-utils-s3c24xx.c} (68%)
 rename arch/arm/{mach-s3c64xx/cpuidle.c => mach-s3c/cpuidle-s3c64xx.c} (92%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/crag6410.h (95%)
 rename arch/arm/{mach-s3c64xx/dev-audio.c => mach-s3c/dev-audio-s3c64xx.c} (97%)
 rename arch/arm/{mach-s3c64xx/dev-backlight.c => mach-s3c/dev-backlight-s3c64xx.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/fb-core.h => mach-s3c/fb-core-s3c24xx.h} (78%)
 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/hardware.h => mach-s3c/hardware-s3c24xx.h} (54%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/iic-core.h (100%)
 create mode 100644 arch/arm/mach-s3c/include/mach/io-s3c24xx.h
 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/irq-uart.h => mach-s3c/irq-uart-s3c64xx.h} (100%)
 rename arch/arm/{plat-samsung/include/plat => mach-s3c}/keypad.h (100%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-amlm5900.c (85%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-anubis.c (98%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-anw6410.c (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-at2440evb.c (89%)
 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 (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-mini2440.c (95%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-mini6410.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-n30.c (95%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-ncp.c (94%)
 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 (91%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-qt2410.c (89%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-real6410.c (96%)
 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 (94%)
 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 (94%)
 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 (93%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/mach-smdk6410.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-tct_hammer.c (83%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-vr1000.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-vstms.c (91%)
 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/nand-core.h => mach-s3c/nand-core-s3c24xx.h} (77%)
 rename arch/arm/{mach-s3c64xx/onenand-core.h => mach-s3c/onenand-core-s3c64xx.h} (82%)
 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 (98%)
 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} (94%)
 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 (94%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2416.c (95%)
 rename arch/arm/{mach-s3c24xx/pm.c => mach-s3c/pm-s3c24xx.c} (93%)
 rename arch/arm/{mach-s3c64xx/pm.c => mach-s3c/pm-s3c64xx.c} (81%)
 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/regs-dsc.h => mach-s3c/regs-dsc-s3c24xx.h} (77%)
 rename arch/arm/{mach-s3c64xx/regs-gpio-memport.h => mach-s3c/regs-gpio-memport-s3c64xx.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/regs-mem.h => mach-s3c/regs-mem-s3c24xx.h} (98%)
 rename arch/arm/{mach-s3c64xx/regs-modem.h => mach-s3c/regs-modem-s3c64xx.h} (100%)
 rename arch/arm/{mach-s3c24xx/include/mach => mach-s3c}/regs-s3c2443-clock.h (81%)
 rename arch/arm/{mach-s3c64xx/regs-srom.h => mach-s3c/regs-srom-s3c64xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/regs-sys.h => mach-s3c/regs-sys-s3c64xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/regs-syscon-power.h => mach-s3c/regs-syscon-power-s3c64xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/regs-usb-hsotg-phy.h => mach-s3c/regs-usb-hsotg-phy-s3c64xx.h} (100%)
 rename arch/arm/{mach-s3c24xx/include/mach/rtc-core.h => mach-s3c/rtc-core-s3c24xx.h} (81%)
 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 (93%)
 rename arch/arm/{mach-s3c24xx/include/mach => mach-s3c}/s3c2412.h (96%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2416.c (86%)
 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 (86%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c244x.c (91%)
 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 (88%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/s3c6410.c (87%)
 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}/sdhci.h (99%)
 rename arch/arm/{mach-s3c24xx/setup-camif.c => mach-s3c/setup-camif-s3c24xx.c} (96%)
 rename arch/arm/{mach-s3c64xx/setup-fb-24bpp.c => mach-s3c/setup-fb-24bpp-s3c64xx.c} (86%)
 rename arch/arm/{mach-s3c24xx/setup-i2c.c => mach-s3c/setup-i2c-s3c24xx.c} (79%)
 rename arch/arm/{mach-s3c64xx/setup-i2c0.c => mach-s3c/setup-i2c0-s3c64xx.c} (90%)
 rename arch/arm/{mach-s3c64xx/setup-i2c1.c => mach-s3c/setup-i2c1-s3c64xx.c} (90%)
 rename arch/arm/{mach-s3c64xx/setup-ide.c => mach-s3c/setup-ide-s3c64xx.c} (89%)
 rename arch/arm/{mach-s3c64xx/setup-keypad.c => mach-s3c/setup-keypad-s3c64xx.c} (86%)
 rename arch/arm/{mach-s3c24xx/setup-sdhci-gpio.c => mach-s3c/setup-sdhci-gpio-s3c24xx.c} (87%)
 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/setup-ts.c => mach-s3c/setup-ts-s3c24xx.c} (89%)
 rename arch/arm/{mach-s3c64xx/setup-usb-phy.c => mach-s3c/setup-usb-phy-s3c64xx.c} (93%)
 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 (91%)
 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 (90%)
 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/spi-core.h => mach-s3c/spi-core-s3c24xx.h} (81%)
 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%)
 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 (89%)
 rename arch/arm/plat-samsung/include/plat/regs-udc.h => drivers/usb/gadget/udc/s3c2410_udc_regs.h (100%)
 rename arch/arm/mach-s3c24xx/include/mach/regs-lcd.h => drivers/video/fbdev/s3c2410fb-regs-lcd.h (84%)
 create mode 100644 include/linux/platform_data/clk-s3c2410.h
 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 (85%)
 rename arch/arm/plat-samsung/include/plat/cpu-freq.h => include/linux/soc/samsung/s3c-cpu-freq.h (97%)
 rename arch/arm/plat-samsung/include/plat/cpu-freq-core.h => include/linux/soc/samsung/s3c-cpufreq-core.h (95%)
 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 (66%)
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

PATCH v2 1/41 ARM: s3c: Remove unneeded machine header includes

Not all units use the contents of mach/hardware.h and mach/dma.h. Remove these includes when not needed.

---
 arch/arm/mach-s3c24xx/bast-irq.c        | 1 -
 arch/arm/mach-s3c24xx/common-smdk.c     | 1 -
 arch/arm/mach-s3c24xx/h1940-bluetooth.c | 1 -
 arch/arm/mach-s3c24xx/mach-amlm5900.c   | 1 -
 arch/arm/mach-s3c24xx/mach-anubis.c     | 1 -
 arch/arm/mach-s3c24xx/mach-at2440evb.c  | 1 -
 arch/arm/mach-s3c24xx/mach-bast.c       | 1 -
 arch/arm/mach-s3c24xx/mach-gta02.c      | 1 -
 arch/arm/mach-s3c24xx/mach-mini2440.c   | 1 -
 arch/arm/mach-s3c24xx/mach-nexcoder.c   | 1 -
 arch/arm/mach-s3c24xx/mach-osiris.c     | 1 -
 arch/arm/mach-s3c24xx/mach-otom.c       | 1 -
 arch/arm/mach-s3c24xx/mach-qt2410.c     | 1 -
 arch/arm/mach-s3c24xx/mach-rx3715.c     | 1 -
 arch/arm/mach-s3c24xx/mach-smdk2410.c   | 1 -
 arch/arm/mach-s3c24xx/mach-smdk2440.c   | 1 -
 arch/arm/mach-s3c24xx/mach-smdk2443.c   | 1 -
 arch/arm/mach-s3c24xx/mach-tct_hammer.c | 1 -
 arch/arm/mach-s3c24xx/mach-vr1000.c     | 1 -
 arch/arm/mach-s3c24xx/mach-vstms.c      | 1 -
 arch/arm/mach-s3c24xx/pm-s3c2410.c      | 1 -
 arch/arm/mach-s3c24xx/pm-s3c2412.c      | 1 -
 arch/arm/mach-s3c24xx/s3c2440.c         | 1 -
 arch/arm/mach-s3c24xx/s3c2442.c         | 1 -
 arch/arm/mach-s3c24xx/setup-i2c.c       | 1 -
 arch/arm/mach-s3c24xx/setup-ts.c        | 1 -
 arch/arm/mach-s3c24xx/simtec-audio.c    | 1 -
 arch/arm/mach-s3c24xx/simtec-pm.c       | 2 --
 arch/arm/mach-s3c24xx/simtec-usb.c      | 1 -
 arch/arm/mach-s3c64xx/dev-audio.c       | 1 -
 arch/arm/plat-samsung/devs.c            | 1 -
 31 files changed, 32 deletions(-)
arch/arm/mach-s3c24xx/bast-irq.c +0 -1
index 03728058d58d..03209fefa5db 100644
@@ -15,7 +15,6 @@
 #include <asm/mach-types.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <mach/regs-irq.h>
 
 #include "bast.h"
arch/arm/mach-s3c24xx/common-smdk.c +0 -1
index 75064dfaceb1..c0c176651f96 100644
@@ -29,7 +29,6 @@
 #include <asm/mach/irq.h>
 
 #include <asm/mach-types.h>
-#include <mach/hardware.h>
 #include <asm/irq.h>
 
 #include <mach/regs-gpio.h>
arch/arm/mach-s3c24xx/h1940-bluetooth.c +0 -1
index 186b5321658e..8533e7521b50 100644
@@ -14,7 +14,6 @@
 #include <linux/rfkill.h>
 
 #include <plat/gpio-cfg.h>
-#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
arch/arm/mach-s3c24xx/mach-amlm5900.c +0 -1
index 623c320f8253..6324e608dcda 100644
@@ -26,7 +26,6 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <mach/fb.h>
arch/arm/mach-s3c24xx/mach-anubis.c +0 -1
index 44338dfb5470..753a314f4493 100644
@@ -24,7 +24,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
arch/arm/mach-s3c24xx/mach-at2440evb.c +0 -1
index 02ac2e240bd7..6da4dcfd5c0f 100644
@@ -24,7 +24,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <mach/fb.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
arch/arm/mach-s3c24xx/mach-bast.c +0 -1
index cd67d00a46e4..9eef0f80175f 100644
@@ -41,7 +41,6 @@
 #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>
arch/arm/mach-s3c24xx/mach-gta02.c +0 -1
index 81d94a75d1c2..346a158f9960 100644
@@ -58,7 +58,6 @@
 #include <linux/platform_data/usb-s3c2410_udc.h>
 
 #include <mach/fb.h>
-#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-irq.h>
 #include <mach/gpio-samsung.h>
arch/arm/mach-s3c24xx/mach-mini2440.c +0 -1
index 936f7e3b7213..5bfe9ef62716 100644
@@ -30,7 +30,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/hardware.h>
 #include <mach/fb.h>
 #include <asm/mach-types.h>
 
arch/arm/mach-s3c24xx/mach-nexcoder.c +0 -1
index 92ecc15c4320..5385437ef464 100644
@@ -28,7 +28,6 @@
 #include <asm/mach/irq.h>
 
 #include <asm/setup.h>
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
arch/arm/mach-s3c24xx/mach-osiris.c +0 -1
index ed03928dffe4..03595144126b 100644
@@ -41,7 +41,6 @@
 #include <plat/devs.h>
 #include <plat/gpio-cfg.h>
 
-#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
arch/arm/mach-s3c24xx/mach-otom.c +0 -1
index d65c65ca1a38..e7eec5ccddb3 100644
@@ -22,7 +22,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 
 #include <plat/cpu.h>
arch/arm/mach-s3c24xx/mach-qt2410.c +0 -1
index 2f3c8b31a08a..4ac3d0531992 100644
@@ -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>
 
arch/arm/mach-s3c24xx/mach-rx3715.c +0 -1
index 740865ef8e23..617392de01ac 100644
@@ -35,7 +35,6 @@
 #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>
arch/arm/mach-s3c24xx/mach-smdk2410.c +0 -1
index 1c2f20ab0520..1d4d8735f283 100644
@@ -24,7 +24,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
arch/arm/mach-s3c24xx/mach-smdk2440.c +0 -1
index ebc184cd9aba..bd6a35105518 100644
@@ -23,7 +23,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
arch/arm/mach-s3c24xx/mach-smdk2443.c +0 -1
index dcc4e446938a..8a1f2580c6c7 100644
@@ -22,7 +22,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
arch/arm/mach-s3c24xx/mach-tct_hammer.c +0 -1
index e334ddf0832f..fd51a098e443 100644
@@ -24,7 +24,6 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
arch/arm/mach-s3c24xx/mach-vr1000.c +0 -1
index 2f00217fa44e..638e53ec1e4f 100644
@@ -35,7 +35,6 @@
 #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>
 
arch/arm/mach-s3c24xx/mach-vstms.c +0 -1
index 9f479e28b8fd..f0acbaa6dfd6 100644
@@ -24,7 +24,6 @@
 #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>
arch/arm/mach-s3c24xx/pm-s3c2410.c +0 -1
index 2d8ea701380a..ffd0d6c2324f 100644
@@ -16,7 +16,6 @@
 
 #include <asm/mach-types.h>
 
-#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
arch/arm/mach-s3c24xx/pm-s3c2412.c +0 -1
index 2dfdaab0aa1f..b1d0ad07301b 100644
@@ -19,7 +19,6 @@
 #include <asm/cacheflush.h>
 #include <asm/irq.h>
 
-#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 
 #include <plat/cpu.h>
arch/arm/mach-s3c24xx/s3c2440.c +0 -1
index 451d9851b0a7..bbe1f9cf5cf0 100644
@@ -23,7 +23,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <mach/gpio-samsung.h>
 #include <asm/irq.h>
 
arch/arm/mach-s3c24xx/s3c2442.c +0 -1
index 432d68325c9d..5b8751506d02 100644
@@ -21,7 +21,6 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 
-#include <mach/hardware.h>
 #include <mach/gpio-samsung.h>
 #include <linux/atomic.h>
 #include <asm/irq.h>
arch/arm/mach-s3c24xx/setup-i2c.c +0 -1
index 1a01d44b5910..1be5372e0261 100644
@@ -12,7 +12,6 @@ struct platform_device;
 
 #include <plat/gpio-cfg.h>
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
arch/arm/mach-s3c24xx/setup-ts.c +0 -1
index 272d65400b71..65ec67e0759f 100644
@@ -13,7 +13,6 @@ struct platform_device; /* don't need the contents */
 #include <linux/platform_data/touchscreen-s3c2410.h>
 
 #include <plat/gpio-cfg.h>
-#include <mach/hardware.h>
 #include <mach/gpio-samsung.h>
 
 /**
arch/arm/mach-s3c24xx/simtec-audio.c +0 -1
index 12e17f82dae3..cfe78bf8cc9b 100644
@@ -12,7 +12,6 @@
 #include <linux/device.h>
 #include <linux/io.h>
 
-#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 
 #include <linux/platform_data/asoc-s3c24xx_simtec.h>
arch/arm/mach-s3c24xx/simtec-pm.c +0 -2
index c19074d81389..bc939dfce488 100644
@@ -19,8 +19,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/hardware.h>
-
 #include <mach/map.h>
 #include <mach/regs-gpio.h>
 
arch/arm/mach-s3c24xx/simtec-usb.c +0 -1
index dc1016ffed94..3488988316a8 100644
@@ -23,7 +23,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
 #include <mach/gpio-samsung.h>
 #include <asm/irq.h>
 
arch/arm/mach-s3c64xx/dev-audio.c +0 -1
index e3c49b5d1355..1d3124db6afc 100644
@@ -12,7 +12,6 @@
 
 #include <mach/irqs.h>
 #include <mach/map.h>
-#include <mach/dma.h>
 
 #include <plat/devs.h>
 #include <linux/platform_data/asoc-s3c.h>
arch/arm/plat-samsung/devs.c +0 -1
index 089a17687104..2ed3ef604a25 100644
@@ -37,7 +37,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/dma.h>
 #include <mach/irqs.h>
 #include <mach/map.h>
 
Signature · 7 lines
2.17.1


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

Re: [PATCH v2 01/41] ARM: s3c: Remove unneeded machine header includes

Quoted 2 lines · Krzysztof Kozlowski

Not all units use the contents of mach/hardware.h and mach/dma.h. Remove these includes when not needed.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/5] ASoC: samsung: h1940: turn into platform driver

      commit: 2c5c4fdc710c5d3beff78ac5605c5732ebfa8ae5
[2/5] ASoC: samsung: neo1973: turn into platform driver
      commit: a65e8a320846b8c69f53a758dc3662e4b42e6a48
[3/5] ASoC: samsung: rx1950: turn into platform driver
      commit: a0f3315a2558e22e75873e1184d0c213c2f8315f
[4/5] ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS
      commit: 2f1525848844c996990aafd3104bddf0f0cb3a28

[5/5] ARM: s3c24xx: move iis pinctrl config into boards
(no commit info)

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

author maintainer
#3 lore raw

Re: [PATCH v2 01/41] ARM: s3c: Remove unneeded machine header includes

Quoted 18 lines · Mark Brown
Quoted 2 lines · Krzysztof Kozlowski

Not all units use the contents of mach/hardware.h and mach/dma.h. Remove these includes when not needed.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/5] ASoC: samsung: h1940: turn into platform driver

      commit: 2c5c4fdc710c5d3beff78ac5605c5732ebfa8ae5
[2/5] ASoC: samsung: neo1973: turn into platform driver
      commit: a65e8a320846b8c69f53a758dc3662e4b42e6a48
[3/5] ASoC: samsung: rx1950: turn into platform driver
      commit: a0f3315a2558e22e75873e1184d0c213c2f8315f
[4/5] ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS
      commit: 2f1525848844c996990aafd3104bddf0f0cb3a28
Quoted 2 lines

[5/5] ARM: s3c24xx: move iis pinctrl config into boards
(no commit info)

Thanks Mark. Could you provide me with a tag/branch with these to pull into samsung-soc?

Best regards,
Krzysztof

maintainer
#4 lore raw

Re: [PATCH v2 01/41] ARM: s3c: Remove unneeded machine header includes

Quoted 2 lines · Krzysztof Kozlowski

Thanks Mark. Could you provide me with a tag/branch with these to pull into samsung-soc?

The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5:

Linux 5.9-rc1 (2020-08-16 13:04:57 -0700)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git tags/samsung-platdrv-boards

for you to fetch changes up to dcacbc0f9bb89ac48d5b602d27a8630e641294cc:

ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS (2020-08-19 20:15:45 +0100)

----------------------------------------------------------------
ASoC: Convert Samsung drivers to platform drivers

----------------------------------------------------------------
Arnd Bergmann (4):
ASoC: samsung: h1940: turn into platform driver
ASoC: samsung: neo1973: turn into platform driver
ASoC: samsung: rx1950: turn into platform driver
ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS

 arch/arm/mach-s3c24xx/mach-gta02.c  | 17 ++++++++
 arch/arm/mach-s3c24xx/mach-h1940.c  | 18 ++++++++
 arch/arm/mach-s3c24xx/mach-rx1950.c | 16 +++++++
 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     |  2 +-
 9 files changed, 126 insertions(+), 161 deletions(-)
author maintainer
#5 lore raw

Re: [PATCH v2 01/41] ARM: s3c: Remove unneeded machine header includes

Quoted 11 lines · Mark Brown
Quoted 2 lines · Krzysztof Kozlowski

Thanks Mark. Could you provide me with a tag/branch with these to pull into samsung-soc?

The following changes since commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5:

Linux 5.9-rc1 (2020-08-16 13:04:57 -0700)

are available in the Git repository at:

Quoted 8 lines

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git tags/samsung-platdrv-boards

for you to fetch changes up to dcacbc0f9bb89ac48d5b602d27a8630e641294cc:

ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS (2020-08-19 20:15:45 +0100)

----------------------------------------------------------------
ASoC: Convert Samsung drivers to platform drivers

Thanks, merged into samsung-soc.

Best regards,
Krzysztof

author maintainer
#6 lore raw

PATCH v2 2/41 mmc: s3cmci: Remove unneeded machine header include

In reply to Krzysztof Kozlowski

The s3cmci driver does not use machine header mach/dma.h.

---
 drivers/mmc/host/s3cmci.c | 1 -
 1 file changed, 1 deletion(-)
drivers/mmc/host/s3cmci.c +0 -1
index b5df948f8155..60fc3fc30fb4 100644
@@ -26,7 +26,6 @@
 #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>
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Acked-by on v2 2/41
#7 lore raw

Re: [PATCH v2 02/41] mmc: s3cmci: Remove unneeded machine header include

Quoted 4 lines · Krzysztof Kozlowski

The s3cmci driver does not use machine header mach/dma.h.

If you want this to go through my mmc tree, then please tell me.

Otherwise:

Kind regards
Uffe

Quoted 19 lines
---
 drivers/mmc/host/s3cmci.c | 1 -
 1 file changed, 1 deletion(-)
drivers/mmc/host/s3cmci.c +0 -2
index b5df948f8155..60fc3fc30fb4 100644
@@ -26,7 +26,6 @@
 #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>
--

2.17.1

author maintainer
#8 lore raw

PATCH v2 3/41 ARM: s3c24xx: fix mmc gpio lookup tables

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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")
---
 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(-)
arch/arm/mach-s3c24xx/mach-at2440evb.c +1 -1
index 6da4dcfd5c0f..fe8f9f1bdc0a 100644
@@ -141,7 +141,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),
 		{ },
 	},
 };
arch/arm/mach-s3c24xx/mach-h1940.c +2 -2
index c09f61d35d57..9c71472c939f 100644
@@ -467,9 +467,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),
 		{ },
 	},
 };
arch/arm/mach-s3c24xx/mach-mini2440.c +2 -2
index 5bfe9ef62716..65f48094114e 100644
@@ -242,9 +242,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),
 		{ },
 	},
 };
arch/arm/mach-s3c24xx/mach-n30.c +2 -2
index b9ceacfdd6ef..152f09242579 100644
@@ -388,9 +388,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),
 		{ },
 	},
 };
arch/arm/mach-s3c24xx/mach-rx1950.c +2 -2
index c46fb6b9e11a..65440c39500e 100644
@@ -570,9 +570,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),
 		{ },
 	},
 };
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Reviewed-by on v2 3/41
#9 lore raw

Re: [PATCH v2 03/41] ARM: s3c24xx: fix mmc gpio lookup tables

Quoted 9 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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")

My mistake :( sorry.

Yours,
Linus Walleij

author maintainer
#10 lore raw

PATCH v2 4/41 ARM: s3c24xx: iotiming: make functions static

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-s3c24xx/iotiming-s3c2410.c +3 -3
index 9f90aaf70bf3..39081c41958c 100644
@@ -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;
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#11 lore raw

PATCH v2 5/41 ARM: s3c24xx: make S3C24XX_MISCCR access indirect

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 arch/arm/mach-s3c24xx/common.c         |  3 +++
 drivers/clk/samsung/clk-s3c2410-dclk.c | 10 ++++------
 2 files changed, 7 insertions(+), 6 deletions(-)
arch/arm/mach-s3c24xx/common.c +3 -0
index 0d55e88ee0a8..222238e8acbb 100644
@@ -668,5 +668,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
drivers/clk/samsung/clk-s3c2410-dclk.c +4 -6
index 7dad9098e897..3e0f23e8ec21 100644
@@ -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)
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Reviewed-by on v2 5/41
#12 lore raw

Re: [PATCH v2 05/41] ARM: s3c24xx: make S3C24XX_MISCCR access indirect

Quoting Krzysztof Kozlowski (2020-08-06 11:20:22)

Quoted 8 lines

From: Arnd Bergmann <[email protected]>

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.

Quoted 6 lines

Make this an indirect function call through platform data instead.

---

author maintainer
#13 lore raw

PATCH v2 6/41 ARM: s3c24xx: pass pointer to clk driver via platform data

In reply to Krzysztof Kozlowski

Passing pointers directly as platform data is fragile and undocumented. Better to create a platform data structure which explicitly documents what is passed to the driver.

[krzk: Update maintainer's entry]

---

Changes since v1:
1. Update maintainer's entry.

---
 MAINTAINERS                               |  1 +
 arch/arm/mach-s3c24xx/common.c            |  7 ++++++-
 drivers/clk/samsung/clk-s3c2410-dclk.c    |  7 ++++++-
 include/linux/platform_data/clk-s3c2410.h | 19 +++++++++++++++++++
 4 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 include/linux/platform_data/clk-s3c2410.h
MAINTAINERS +1 -0
index 5675fc9bfa00..81046738cba9 100644
@@ -15295,6 +15295,7 @@ F:	Documentation/devicetree/bindings/clock/samsung,s5p*
 F:	drivers/clk/samsung/
 F:	include/dt-bindings/clock/exynos*.h
 F:	include/linux/clk/samsung.h
+F:	include/linux/platform_data/clk-s3c2410.h
 
 SAMSUNG SPI DRIVERS
 M:	Kukjin Kim <[email protected]>
arch/arm/mach-s3c24xx/common.c +6 -1
index 222238e8acbb..c476a673d07f 100644
@@ -17,6 +17,7 @@
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/io.h>
+#include <linux/platform_data/clk-s3c2410.h>
 #include <linux/platform_data/dma-s3c24xx.h>
 #include <linux/dmaengine.h>
 #include <linux/clk/samsung.h>
@@ -663,13 +664,17 @@ static struct resource s3c2410_dclk_resource[] = {
 	[0] = DEFINE_RES_MEM(0x56000084, 0x4),
 };
 
+static struct s3c2410_clk_platform_data s3c_clk_platform_data = {
+	.modify_misccr = s3c2410_modify_misccr,
+};
+
 struct platform_device s3c2410_device_dclk = {
 	.name		= "s3c2410-dclk",
 	.id		= 0,
 	.num_resources	= ARRAY_SIZE(s3c2410_dclk_resource),
 	.resource	= s3c2410_dclk_resource,
 	.dev		= {
-		.platform_data = s3c2410_modify_misccr,
+		.platform_data = &s3c_clk_platform_data,
 	},
 };
 #endif
drivers/clk/samsung/clk-s3c2410-dclk.c +6 -1
index 3e0f23e8ec21..f5e0a6ba2d12 100644
@@ -11,6 +11,7 @@
 #include <linux/clk-provider.h>
 #include <linux/io.h>
 #include <linux/platform_device.h>
+#include <linux/platform_data/clk-s3c2410.h>
 #include <linux/module.h>
 #include "clk.h"
 
@@ -89,10 +90,14 @@ static struct clk_hw *s3c24xx_register_clkout(struct device *dev,
 		const char *name, const char **parent_names, u8 num_parents,
 		u8 shift, u32 mask)
 {
+	struct s3c2410_clk_platform_data *pdata = dev_get_platdata(dev);
 	struct s3c24xx_clkout *clkout;
 	struct clk_init_data init;
 	int ret;
 
+	if (!pdata)
+		return ERR_PTR(-EINVAL);
+
 	/* allocate the clkout */
 	clkout = kzalloc(sizeof(*clkout), GFP_KERNEL);
 	if (!clkout)
@@ -107,7 +112,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;
+	clkout->modify_misccr = pdata->modify_misccr;
 
 	ret = clk_hw_register(dev, &clkout->hw);
 	if (ret)
include/linux/platform_data/clk-s3c2410.h new file +19 -0
new file mode 100644
index 000000000000..7eb1cfa5409b
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2020 Krzysztof Kozlowski <[email protected]>
+ */
+
+#ifndef __LINUX_PLATFORM_DATA_CLK_S3C2410_H_
+#define __LINUX_PLATFORM_DATA_CLK_S3C2410_H_
+
+/**
+ * struct s3c2410_clk_platform_data - platform data for S3C2410 clock driver
+ *
+ * @modify_misccr: Function to modify the MISCCR and return the new value
+ */
+struct s3c2410_clk_platform_data {
+	unsigned int (*modify_misccr)(unsigned int clr, unsigned int chg);
+};
+
+#endif /* __LINUX_PLATFORM_DATA_CLK_S3C2410_H_ */
+
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Reviewed-by on v2 6/41
#14 lore raw

Re: [PATCH v2 06/41] ARM: s3c24xx: pass pointer to clk driver via platform data

Quoting Krzysztof Kozlowski (2020-08-06 11:20:23)

Quoted 9 lines

Passing pointers directly as platform data is fragile and undocumented. Better to create a platform data structure which explicitly documents what is passed to the driver.

[krzk: Update maintainer's entry]

---

Ok.

author maintainer
#15 lore raw

PATCH v2 7/41 ARM: s3c24xx: simplify mach/io.h

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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 support 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.

---
 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(-)
arch/arm/mach-s3c24xx/include/mach/io.h +24 -185
index f960e6d10114..3e8bff26cdd5 100644
@@ -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
arch/arm/plat-samsung/include/plat/map-s3c.h +2 -8
index 4244acbf4b65..bf247d836684 100644
@@ -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)
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#16 lore raw

PATCH v2 8/41 usb: gadget: s3c: use platform resources

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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

---
 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%)
drivers/usb/gadget/udc/s3c2410_udc.c +11 -20
index e875a0b967c0..f1ea51476add 100644
@@ -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 <[email protected]>, " \
@@ -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;
@@ -835,8 +832,6 @@ static void s3c2410_udc_handle_ep(struct s3c2410_ep *ep)
 	}
 }
 
-#include <mach/regs-irq.h>
-
 /*
  *	s3c2410_udc_irq - interrupt handler
  */
@@ -977,7 +972,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);
@@ -1777,13 +1772,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;
@@ -1795,17 +1784,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");
@@ -1872,7 +1863,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:
@@ -1906,7 +1897,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);
drivers/usb/gadget/udc/s3c2410_udc.h +1 -0
index bdcaa8dd300f..68bdf3e5aac2 100644
@@ -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))
 
drivers/usb/gadget/udc/s3c2410_udc_regs.h renamed from arch/arm/plat-samsung/include/plat/regs-udc.h +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/regs-udc.h
rename to drivers/usb/gadget/udc/s3c2410_udc_regs.h
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Acked-by on v2 8/41
#17 lore raw

Re: [PATCH v2 08/41] usb: gadget: s3c: use platform resources

Quoted 7 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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

If you want me to carry this and the following patch through my tree, let me know. Otherwise:

Signature · 1 line
balbi
author maintainer
#18 lore raw

PATCH v2 9/41 usb: gadget: s3c-hsudc: remove platform header dependency

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

[krzk: Include regs-s3c2443-clock.h in ifdef to fixup build on s3c6400]

---

Changes since v1:
1. Include regs-s3c2443-clock.h in ifdef to fixup build on s3c640

---
 .../include/mach/regs-s3c2443-clock.h         | 49 +++++++++++++++++
 arch/arm/plat-samsung/devs.c                  |  6 ++
 drivers/usb/gadget/udc/s3c-hsudc.c            | 55 ++-----------------
 include/linux/platform_data/s3c-hsudc.h       |  2 +
 4 files changed, 61 insertions(+), 51 deletions(-)
arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h +49 -0
index 6bf924612b06..682759549e63 100644
@@ -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 */
 
arch/arm/plat-samsung/devs.c +6 -0
index 2ed3ef604a25..0607d2984841 100644
@@ -40,6 +40,10 @@
 #include <mach/irqs.h>
 #include <mach/map.h>
 
+#ifdef CONFIG_PLAT_S3C24XX
+#include <mach/regs-s3c2443-clock.h>
+#endif /* CONFIG_PLAT_S3C24XX */
+
 #include <plat/cpu.h>
 #include <plat/devs.h>
 #include <plat/adc.h>
@@ -1037,6 +1041,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 */
 
drivers/usb/gadget/udc/s3c-hsudc.c +4 -51

79 lines not on this page · raw message

include/linux/platform_data/s3c-hsudc.h +2 -0
index 4dc9b8760166..a170939832d5 100644
@@ -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 */
Signature · 7 lines
2.17.1


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

Re: [PATCH v2 09/41] usb: gadget: s3c-hsudc: remove platform header dependency

Quoted 38 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

[krzk: Include regs-s3c2443-clock.h in ifdef to fixup build on s3c6400]

---

Changes since v1:
1. Include regs-s3c2443-clock.h in ifdef to fixup build on s3c640

---
 .../include/mach/regs-s3c2443-clock.h         | 49 +++++++++++++++++
 arch/arm/plat-samsung/devs.c                  |  6 ++
 drivers/usb/gadget/udc/s3c-hsudc.c            | 55 ++-----------------
 include/linux/platform_data/s3c-hsudc.h       |  2 +
 4 files changed, 61 insertions(+), 51 deletions(-)
arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h +2 -0
index 6bf924612b06..682759549e63 100644
@@ -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

arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h s3c2443_get_epll(unsigned int pllval, unsigned int baseclk) · line 189

Quoted 4 lines
arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h +1 -0
@@ -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)

This should, really, be a PHY driver under drivers/phy, since the goal is to make this platform-independent, might as well take the opportunity to introduce a proper driver, no?

Signature · 1 line
balbi

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

#20 lore raw

Re: [PATCH v2 09/41] usb: gadget: s3c-hsudc: remove platform header dependency

Quoted 11 lines · Felipe Balbi
Quoted 9 lines · Krzysztof Kozlowski
arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h +2 -0
+#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;
 }
 
Quoted 5 lines

arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h s3c2443_get_epll(unsigned int pllval, unsigned int baseclk) · line 189

Quoted 1 line
arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h +1 -0
+static inline void s3c_hsudc_init_phy(void)

This should, really, be a PHY driver under drivers/phy, since the goal is to make this platform-independent, might as well take the opportunity to introduce a proper driver, no?

In theory, this is absolutely correct. I fear it will be hard to find anyone to make a larger scale cleanup of the file however. As my old changelog text says, there is only one board (smdk2416) in the kernel that registers the device. My change was the minimum to keep it working during the move to a multiplatform configuration, but if there is someone who has the hardware and volunteers to make a proper phy driver, that would also work.

As the board only exists as a reference for other boards, but none of those made it into the kernel, we could alternatively just decide to drop the driver. There is also a .dts file for the board, which is lacking a device node for the udc (and the driver lacks DT support), so that board file could also be dropped then, leaving only the DT version as a reference for the SoC.

Arnd

author maintainer
#21 lore raw

Re: [PATCH v2 09/41] usb: gadget: s3c-hsudc: remove platform header dependency

Quoted 26 lines · Arnd Bergmann
Quoted 11 lines · Felipe Balbi
Quoted 9 lines · Krzysztof Kozlowski
arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h +2 -0
+#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;
 }
 
Quoted 5 lines

arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h s3c2443_get_epll(unsigned int pllval, unsigned int baseclk) · line 189

Quoted 1 line
arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h +1 -0
+static inline void s3c_hsudc_init_phy(void)

This should, really, be a PHY driver under drivers/phy, since the goal is to make this platform-independent, might as well take the opportunity to introduce a proper driver, no?

In theory, this is absolutely correct. I fear it will be hard to find anyone to make a larger scale cleanup of the file however. As my old changelog text says, there is only one board (smdk2416) in the kernel that registers the device. My change was the minimum to keep it working during the move to a multiplatform configuration, but if there is someone who has the hardware and volunteers to make a proper phy driver, that would also work.

Quoted 5 lines

As the board only exists as a reference for other boards, but none of those made it into the kernel, we could alternatively just decide to drop the driver. There is also a .dts file for the board, which is lacking a device node for the udc (and the driver lacks DT support), so that board file could also be dropped then, leaving only the DT version as a reference for the SoC.

All this is a work on a very old SoC with an unknown number of current/real users. I don't have the hardware to test so I would prefer to skip any big changes. As Arnd suggests, we could just drop this one board and the driver... or if it does not harm/bother to much we could keep it as is, just without platform header dependency. Someone still might be using it.

Best regards,
Krzysztof

#22 lore raw

Re: [PATCH v2 09/41] usb: gadget: s3c-hsudc: remove platform header dependency

In reply to Arnd Bergmann
Quoted 26 lines · Arnd Bergmann
Quoted 11 lines · Felipe Balbi
Quoted 9 lines · Krzysztof Kozlowski
arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h +2 -0
+#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;
 }
 
Quoted 5 lines

arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h s3c2443_get_epll(unsigned int pllval, unsigned int baseclk) · line 189

Quoted 1 line
arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h +1 -0
+static inline void s3c_hsudc_init_phy(void)

This should, really, be a PHY driver under drivers/phy, since the goal is to make this platform-independent, might as well take the opportunity to introduce a proper driver, no?

In theory, this is absolutely correct. I fear it will be hard to find anyone to make a larger scale cleanup of the file however. As my old changelog text says, there is only one board (smdk2416) in the kernel that registers the device. My change was the minimum to keep it working during the move to a multiplatform configuration, but if there is someone who has the hardware and volunteers to make a proper phy driver, that would also work.

Quoted 5 lines

As the board only exists as a reference for other boards, but none of those made it into the kernel, we could alternatively just decide to drop the driver. There is also a .dts file for the board, which is lacking a device node for the udc (and the driver lacks DT support), so that board file could also be dropped then, leaving only the DT version as a reference for the SoC.

I don't mind deleting the entire thing if nobody is using it. The entire history of the driver consists of only 65 commits and if you look at the actual commits, there has been no real maintenance work on it for a long time, most commits are regular janitorial work and updates due to framework changes:

6e1591947304 udc: s3c-hsudc: Silence warning about supplies during deferred probe 237b668c1c5d usb: gadget: s3c-hsudc: use devm_platform_ioremap_resource() to simplify code b33f37064b74 usb: Remove dev_err() usage after platform_get_irq()
229e3682393c USB: gadget: udc: Remove redundant license text
5fd54ace4721 USB: add SPDX identifiers to all remaining files in drivers/usb/ 977ac789507a usb: gadget: udc: constify usb_ep_ops structures
ca0709946023 usb: gadget: s3c-hsudc: remove redundant condition
bc1b9f300ae0 usb: gadget: s3c-hsudc: add ep capabilities support
22835b807e7c usb: gadget: remove unnecessary 'driver' argument
6ce372fed2cb usb: gadget: udc: s3c-hsudc: remove bind/unbind messages
82891b959cbb usb: gadget: udc: s3c-hsudc: do not rely on 'driver' argument 3dc3b4e15e09 usb: gadget: s3c-hsudc: delete unnecessary 'out of memory' messages 6d3f5f2d895b usb: gadget: udc: drop owner assignment from platform_drivers 304f7e5e1d08 usb: gadget: Refactor request completion
90fccb529d24 usb: gadget: Gadget directory cleanup - group UDC drivers
236064c25358 usb: gadget: s3c-hsudc: remove unused label
e117e742d310 usb: gadget: add "maxpacket_limit" field to struct usb_ep
e01ee9f509a9 usb: gadget: use dev_get_platdata()
38678f25689c usb: gadget: s3c-hsudc: delete outdated comment
492a39022ad5 usb: gadget: s3c-hsudc: don't touch gadget.dev.driver
4c422049bd0f usb: gadget: s3c-hsudc: remove unnecessary initializations
7bce401cc6db usb: gadget: drop now unnecessary flag
40ed30cff595 usb: gadget: s3c-hsudc: let udc-core manage gadget->dev
eeef45876631 (tag: gadget-for-v3.9) usb: gadget: constify all struct usb_gadget_ops 148e11349b0c usb: Convert to devm_ioremap_resource()
32b8666589d5 usb: gadget: remove u32 castings of address passed to readl() 924d2532ab18 usb: gadget: s3c-hsudc: Use devm_regulator_bulk_get
41ac7b3ab7fe usb: remove use of __devinit
dc2cdcaf4caa usb: gadget: s3c-hsudc: Replace 0 with NULL for pointers
affaab4c58d8 usb: gadget: s3c-hsudc: Add missing braces around sizeof
78f0c53ef856 usb: gadget: s3c-hsudc: Use devm_* functions
ded017ee6c7b usb: phy: fix return value check of usb_get_phy
662dca54ca67 usb: otg: support for multiple transceivers by a single controller 721002ec1dd5 usb: otg: utils: rename function name in OTG utils
109f0f718375 usb: gadget: s3c-hsudc.c: Remove unneeded condition
955846a60a9d usb: gadget: Update s3c-hsudc to use usb_endpoint_descriptor inside the struct usb_ep 6e13c6505cdf (tag: xceiv-for-v3.4) usb: otg: Convert all users to pass struct usb_otg for OTG functions b96d3b08365f usb: Convert all users to new usb_phy
f9c56cdd3905 usb: gadget: Clear usb_endpoint_descriptor inside the struct usb_ep on disable 8675381109b0 usb: otg: Rename otg_transceiver to usb_phy
294f78ec493e usb: s3c-hsudc: add basic runtime_pm calls
2d4172c93874 usb: s3c-hsudc: Use helper functions instead of generic container_of 922be95a3f26 usb: gadget: s3c-hsudc: remove the_controller global
dee19be7d8ed usb: gadget: s3c-hsudc: use release_mem_region instead of release_resource bab7d037c84f usb: gadget: s3c-hsudc: Add regulator handling
d93e2600d80f usb: gadget: s3c-hsudc: use udc_start and udc_stop functions
103495aaf0e7 usb: gadget: s3c-hsudc: move device registration to probe
e9bcb9e5feb0 usb: gadget: s3c-hsudc: add missing otg_put_transceiver in probe a1977562718f usb: gadget: s3c-hsudc: add __devinit to probe function
715a3e41e78a usb: gadget: s3c-hsudc: move platform_data struct to global header 7177aed44f51 usb: gadget: rename usb_gadget_driver::speed to max_speed
d327ab5b6d66 usb: gadget: replace usb_gadget::is_dualspeed with max_speed
bfe0658b402d usb: udc: Fix gadget driver's speed check in various UDC drivers cc27c96c2bee usb: convert drivers/usb/* to use module_platform_driver()
fba9e546eac9 s3c-hsudc: implement vbus_draw hook
29cc88979a88 USB: use usb_endpoint_maxp() instead of le16_to_cpu()
938fbe54f33e s3c-hsudc: Add basic otg transceiver handling
da4fc14c9955 s3c-hsudc: Fix possible nullpointer dereference during probe
86081d7be34e usb: gadget: add platform module alias where it is missing
0f91349b89f3 usb: gadget: convert all users to the new udc infrastructure
6bc129532176 usb/s3c-hsudc: fix error path
b38b03b363a5 usb: gadget: include <linux/prefetch.h> to fix compiling error d6167660b284 USB: s3c-hsudc: fix checkpatch error and warning
004c127ef071 USB: s3c-hsudc: use IS_ERR() instead of NULL check
a9df304cf78d USB: Gadget: Add Samsung S3C24XX USB High-Speed controller driver

If there are no objections, I'm okay deleting the driver.

Signature · 1 line
balbi
author maintainer
#23 lore raw

PATCH v2 10/41 ARM: samsung: don't build plat/pm-common for Exynos

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

This file has not had any callers since linux-4.7, so stop building it.

Fixes 5901f4c279f7 ("ARM: EXYNOS: Remove SROM related register settings from mach-exynos")
---
 arch/arm/plat-samsung/Makefile | 1 -
 1 file changed, 1 deletion(-)
arch/arm/plat-samsung/Makefile +0 -1
index ce339a96fbf7..d8a80fbcebb3 100644
@@ -25,7 +25,6 @@ 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_GPIO)	+= pm-gpio.o
 obj-$(CONFIG_SAMSUNG_PM_CHECK)	+= pm-check.o
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#24 lore raw

PATCH v2 11/41 ARM: samsung: remove s3c_pm_debug_init()

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

On s3c24xx and s3c64xx, this is just a wrapper around s3c_pm_debug_init_uart(), but this function does not exist on s5pv210, which always uses an empty stub as CONFIG_SAMSUNG_ATAGS is normally not set.

In a configuration that supports both s5pv210 and s3c64xx, we would always call the s3c64xx function, which is probably incorrect when running on s5pv210.

Remove the function call completely on s5pv210 and skip the wrapper on s3c as a cleanup.

As a side-effect, the s3c64xx behavior is now always the same, regardless of whether it is a DT-only configuration or both DT and ATAGS are supported for booting.

---
 arch/arm/mach-s3c24xx/include/mach/pm-core.h   |  2 ++
 arch/arm/mach-s3c64xx/include/mach/pm-core.h   |  2 ++
 arch/arm/mach-s5pv210/pm.c                     |  2 --
 arch/arm/plat-samsung/include/plat/pm-common.h | 10 ----------
 arch/arm/plat-samsung/pm-debug.c               |  7 -------
 arch/arm/plat-samsung/pm.c                     |  5 ++---
 6 files changed, 6 insertions(+), 22 deletions(-)
arch/arm/mach-s3c24xx/include/mach/pm-core.h +2 -0
index 5e4ce89d0158..cd6406820cb1 100644
@@ -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)
arch/arm/mach-s3c64xx/include/mach/pm-core.h +2 -0
index bbf79ed28583..1c7d179a86f3 100644
@@ -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)
arch/arm/mach-s5pv210/pm.c +0 -2
index b336df0c57f3..725e6746f345 100644
@@ -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__,
arch/arm/plat-samsung/include/plat/pm-common.h +0 -10
index 1268bae04234..467e7c867c46 100644
@@ -69,22 +69,12 @@ 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);
 #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) { }
arch/arm/plat-samsung/pm-debug.c +0 -7
index b76b1e9ba4ae..105b61f3304e 100644
@@ -22,7 +22,6 @@
 #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
@@ -43,12 +42,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;
arch/arm/plat-samsung/pm.c +2 -3
index d6bfd66592b0..b40ab7abe6a9 100644
@@ -70,8 +70,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);
 
@@ -144,7 +143,7 @@ static int s3c_pm_enter(suspend_state_t state)
 		s3c_pm_restored_gpios();
 	}
 
-	s3c_pm_debug_init();
+	s3c_pm_debug_init_uart();
 
 	/* check what irq (if any) restored the system */
 
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#25 lore raw

PATCH v2 12/41 ARM: samsung: make pm-debug platform independent

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

In particular, all the CPU checks need to be moved out of the common code into platform specific files.

---
 arch/arm/mach-s3c24xx/include/mach/pm-core.h  |  5 --
 arch/arm/mach-s3c64xx/include/mach/pm-core.h  | 42 ----------------
 arch/arm/mach-s3c64xx/pm.c                    | 50 +++++++++++++++++++
 arch/arm/mach-s5pv210/pm.c                    |  4 +-
 .../arm/plat-samsung/include/plat/pm-common.h | 19 +++++--
 arch/arm/plat-samsung/pm-debug.c              | 16 ++----
 arch/arm/plat-samsung/pm.c                    |  5 +-
 7 files changed, 74 insertions(+), 67 deletions(-)
arch/arm/mach-s3c24xx/include/mach/pm-core.h +0 -5
index cd6406820cb1..8f87606c4cdc 100644
@@ -77,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) { }
 
arch/arm/mach-s3c64xx/include/mach/pm-core.h +0 -42

48 lines not on this page · raw message

arch/arm/mach-s3c64xx/pm.c +50 -0

56 lines not on this page · raw message

arch/arm/mach-s5pv210/pm.c +2 -2
index 725e6746f345..efdb5a27c060 100644
@@ -111,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();
@@ -120,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));
arch/arm/plat-samsung/include/plat/pm-common.h +15 -4
index 467e7c867c46..87fa97fd6e8b 100644
@@ -71,13 +71,24 @@ extern void s3c_pm_dbg(const char *msg, ...);
 
 #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)
 
-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 */
arch/arm/plat-samsung/pm-debug.c +4 -12
index 105b61f3304e..482d53753e93 100644
@@ -18,14 +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_arch_update_uart(void __iomem *regs,
-					   struct pm_uart_save *save) {}
-#endif
-
 static struct pm_uart_save uart_save;
 
 extern void printascii(const char *);
@@ -52,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;
@@ -63,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;
@@ -83,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);
 }
arch/arm/plat-samsung/pm.c +3 -2
index b40ab7abe6a9..03c22a9dee21 100644
@@ -25,6 +25,7 @@
 
 #include <asm/irq.h>
 
+#include <plat/cpu.h>
 #include <plat/pm.h>
 #include <mach/pm-core.h>
 
@@ -99,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 */
@@ -136,7 +137,7 @@ 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();
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#26 lore raw

PATCH v2 13/41 ARM: samsung: move CONFIG_DEBUG_S3C_UART to Kconfig.debug

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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

---
 arch/arm/Kconfig.debug        | 10 ++++++++++
 arch/arm/plat-samsung/Kconfig |  8 --------
 2 files changed, 10 insertions(+), 8 deletions(-)
arch/arm/Kconfig.debug +10 -0
index 80000a66a4e3..7c34cf5c4a5b 100644
@@ -1497,6 +1497,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
arch/arm/plat-samsung/Kconfig +0 -8
index 3aca01067b3c..c3d18b0aad75 100644
@@ -290,13 +290,5 @@ config SAMSUNG_WAKEMASK
 	  and above. This code allows a set of interrupt to wakeup-mask
 	  mappings. See <plat/wakeup-mask.h>
 
-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
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#27 lore raw

PATCH v2 14/41 ARM: exynos: use private samsung_cpu_id copy

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 arch/arm/mach-exynos/common.h                |  6 +++---
 arch/arm/mach-exynos/exynos.c                | 21 ++++++++++++++++----
 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     |  3 ---
 arch/arm/plat-samsung/include/plat/map-s5p.h |  2 --
 8 files changed, 25 insertions(+), 54 deletions(-)
 delete mode 100644 arch/arm/mach-exynos/include/mach/map.h
arch/arm/mach-exynos/common.h +3 -3
index afd988a92836..29eb075b24a4 100644
@@ -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);
arch/arm/mach-exynos/exynos.c +17 -4
index 36c37444485a..3503274e5875 100644
@@ -19,11 +19,12 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/map.h>
-#include <plat/cpu.h>
-
 #include "common.h"
 
+#define S3C_ADDR_BASE	0xF6000000
+#define S3C_ADDR(x)	((void __iomem __force *)S3C_ADDR_BASE + (x))
+#define S5P_VA_CHIPID	S3C_ADDR(0x02000000)
+
 static struct platform_device exynos_cpuidle = {
 	.name              = "exynos_cpuidle",
 #ifdef CONFIG_ARM_EXYNOS_CPUIDLE
@@ -36,6 +37,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 +95,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);
+
 }
 
 /*
arch/arm/mach-exynos/include/mach/map.h deleted +0 -18
deleted file mode 100644
index 8d58faa54ff7..000000000000
@@ -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 */
arch/arm/mach-exynos/platsmp.c +1 -3
index 0cbbae8bf1f8..d7fedbb2eefe 100644
@@ -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;
 }
arch/arm/mach-exynos/pm.c +4 -4
index 78af34cc89cc..30f4e55bf39e 100644
@@ -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;
 }
arch/arm/plat-samsung/cpu.c +0 -17
index e1ba88ba31d8..8acba21bbf4b 100644
@@ -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);
 }
arch/arm/plat-samsung/include/plat/cpu.h +0 -3
index fadcddbea064..93ecd7127831 100644
@@ -109,9 +109,6 @@ extern void s3c_init_cpu(unsigned long idcode,
 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);
 
arch/arm/plat-samsung/include/plat/map-s5p.h +0 -2
index d69a0ca09fb5..3812085f8761 100644
@@ -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)
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#28 lore raw

PATCH v2 15/41 ARM: exynos: stop selecting PLAT_SAMSUNG

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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

---
 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(-)
arch/arm/Kconfig.debug +4 -4
index 7c34cf5c4a5b..153a9a35dd20 100644
@@ -1005,7 +1005,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
@@ -1017,7 +1017,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
@@ -1029,7 +1029,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
@@ -1041,7 +1041,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
arch/arm/Makefile +0 -1
index 4e877354515f..826613a20b7d 100644
@@ -232,7 +232,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
arch/arm/mach-exynos/Makefile +0 -4
index 0fd3fcf8bfb0..53fa363c8e44 100644
@@ -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
arch/arm/plat-samsung/Kconfig +2 -2
index c3d18b0aad75..920931c3fefd 100644
@@ -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>
drivers/mmc/host/Kconfig +1 -1
index 9c89a5b780e8..ddce8e62280c 100644
@@ -289,7 +289,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
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#29 lore raw

PATCH v2 16/41 ARM: samsung: move pm check code to drivers/soc

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 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
arch/arm/mach-s5pv210/Kconfig +1 -0
index b3db1191e437..95d4e8284866 100644
@@ -17,6 +17,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
 
arch/arm/plat-samsung/Kconfig +1 -48

61 lines not on this page · raw message

arch/arm/plat-samsung/Makefile +0 -2
index d8a80fbcebb3..c47f58ed83e2 100644
@@ -27,7 +27,5 @@ obj-$(CONFIG_GPIO_SAMSUNG)     += gpio-samsung.o
 obj-$(CONFIG_PM_SLEEP)		+= 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
arch/arm/plat-samsung/include/plat/pm-common.h +1 -69

80 lines not on this page · raw message

drivers/soc/samsung/Kconfig +47 -1

54 lines not on this page · raw message

drivers/soc/samsung/Makefile +3 -0
index ecc3a32f6406..59e8e9453f27 100644
@@ -10,3 +10,6 @@ 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_EXYNOS_REGULATOR_COUPLER) += exynos-regulator-coupler.o
+
+obj-$(CONFIG_SAMSUNG_PM_CHECK)	+= s3c-pm-check.o
+obj-$(CONFIG_SAMSUNG_PM_DEBUG)	+= s3c-pm-debug.o
drivers/soc/samsung/s3c-pm-check.c renamed from arch/arm/plat-samsung/pm-check.c +1 -1
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
@@ -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
drivers/soc/samsung/s3c-pm-debug.c renamed from arch/arm/plat-samsung/pm-debug.c +1 -2
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
@@ -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;
 
include/linux/soc/samsung/s3c-pm.h new file +84 -0

84 lines not on this page · raw message

Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#30 lore raw

PATCH v2 17/41 ARM: s5pv210: use private pm save/restore

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 arch/arm/mach-s5pv210/Makefile     |  7 -----
 arch/arm/mach-s5pv210/pm.c         | 45 ++++++++++++++++++++++++++++--
 arch/arm/mach-s5pv210/regs-clock.h |  4 ++-
 arch/arm/mach-s5pv210/s5pv210.c    |  2 --
 arch/arm/plat-samsung/Makefile     |  3 +-
 5 files changed, 47 insertions(+), 14 deletions(-)
arch/arm/mach-s5pv210/Makefile +0 -7
index e7b551e18e5c..aa0a1f091daf 100644
@@ -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
arch/arm/mach-s5pv210/pm.c +43 -2

58 lines not on this page · raw message

arch/arm/mach-s5pv210/regs-clock.h +3 -1
index 2a35c831a9b0..9cad2306e470 100644
@@ -9,7 +9,9 @@
 #ifndef __ASM_ARCH_REGS_CLOCK_H
 #define __ASM_ARCH_REGS_CLOCK_H __FILE__
 
-#include <plat/map-base.h>
+#define S3C_ADDR_BASE		0xF6000000
+#define S3C_ADDR(x)		((void __iomem __force *)S3C_ADDR_BASE + (x))
+#define S3C_VA_SYS		S3C_ADDR(0x00100000)
 
 #define S5P_CLKREG(x)		(S3C_VA_SYS + (x))
 
arch/arm/mach-s5pv210/s5pv210.c +0 -2
index 868f9c20419d..a21ed3bb992a 100644
@@ -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"
 
arch/arm/plat-samsung/Makefile +1 -2
index c47f58ed83e2..feddb42cae51 100644
@@ -24,8 +24,7 @@ obj-$(CONFIG_GPIO_SAMSUNG)     += gpio-samsung.o
 
 # PM support
 
-obj-$(CONFIG_PM_SLEEP)		+= 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
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#31 lore raw

PATCH v2 18/41 ARM: s5pv210: don't imply CONFIG_PLAT_SAMSUNG

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

The plat-samsung directory and mach-s5pv210 can be build completely independently, so split the two Kconfig symbols CONFIG_PLAT_SAMSUNG and CONFIG_ARCH_S5PV210.

---
 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(-)
arch/arm/Kconfig.debug +3 -3
index 153a9a35dd20..b4b41f9d246b 100644
@@ -1005,7 +1005,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
@@ -1017,7 +1017,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
@@ -1029,7 +1029,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
arch/arm/Makefile +0 -1
index 826613a20b7d..3997cec8848e 100644
@@ -234,7 +234,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
arch/arm/plat-samsung/Kconfig +1 -1
index a7cb0db1d5cc..13b39684b582 100644
@@ -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
drivers/mmc/host/Kconfig +1 -1
index ddce8e62280c..9f387daa764a 100644
@@ -289,7 +289,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
drivers/pwm/Kconfig +1 -1
index 7dbcf6973d33..9448e4ca8c73 100644
@@ -410,7 +410,7 @@ config PWM_ROCKCHIP
 
 config PWM_SAMSUNG
 	tristate "Samsung PWM support"
-	depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST
+	depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
 	help
 	  Generic PWM framework driver for Samsung.
 
drivers/spi/Kconfig +1 -1
index c3008e423f59..85619ab64156 100644
@@ -680,7 +680,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.
 
drivers/tty/serial/Kconfig +1 -1
index 8a0352eb337c..10de494e808a 100644
@@ -235,7 +235,7 @@ config SERIAL_CLPS711X_CONSOLE
 
 config SERIAL_SAMSUNG
 	tristate "Samsung SoC serial support"
-	depends on PLAT_SAMSUNG || ARCH_EXYNOS || COMPILE_TEST
+	depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
 	select SERIAL_CORE
 	help
 	  Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,
sound/soc/samsung/Kconfig +1 -1
index 1431be4ed054..a2221ebb1b6a 100644
@@ -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
Signature · 1 line
2.17.1
maintainer Acked-by on v2 18/41
#32 lore raw

Re: [PATCH v2 18/41] ARM: s5pv210: don't imply CONFIG_PLAT_SAMSUNG

Quoted 5 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

The plat-samsung directory and mach-s5pv210 can be build completely independently, so split the two Kconfig symbols CONFIG_PLAT_SAMSUNG and CONFIG_ARCH_S5PV210.

author maintainer
#33 lore raw

PATCH v2 19/41 ARM: s3c64xx: remove mach/hardware.h

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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

---
 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
arch/arm/mach-s3c64xx/common.c +0 -1
index c9c20256488b..efda4bfb7948 100644
@@ -37,7 +37,6 @@
 
 #include <mach/map.h>
 #include <mach/irqs.h>
-#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
arch/arm/mach-s3c64xx/dev-uart.c +0 -1
index 5fb59ad30008..021a2b7926fa 100644
@@ -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>
 
arch/arm/mach-s3c64xx/include/mach/hardware.h deleted +0 -17
deleted file mode 100644
index c4ed359474de..000000000000
@@ -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 <[email protected]>
- *      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 */
arch/arm/mach-s3c64xx/mach-anw6410.c +0 -1
index e783f5b3593a..bb248b12e308 100644
@@ -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>
arch/arm/mach-s3c64xx/mach-crag6410.c +0 -1
index 223a3d51d8b6..a2fefb2609e7 100644
@@ -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>
arch/arm/mach-s3c64xx/mach-hmt.c +0 -1
index ad15260c12b4..32b555a4757b 100644
@@ -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>
 
arch/arm/mach-s3c64xx/mach-ncp.c +0 -1
index 0a67ff173575..f0a26dd27938 100644
@@ -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>
arch/arm/mach-s3c64xx/mach-smdk6400.c +0 -1
index d24899dd3883..ca033450ab8c 100644
@@ -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>
arch/arm/mach-s3c64xx/mach-smdk6410.c +0 -1
index 104548fb192a..7b931e7a7913 100644
@@ -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>
 
arch/arm/mach-s3c64xx/s3c6400.c +0 -1
index 545eea716db8..81233495d548 100644
@@ -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>
arch/arm/mach-s3c64xx/s3c6410.c +0 -1
index 47e04e019624..9465a6e0f068 100644
@@ -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>
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#34 lore raw

PATCH v2 20/41 ARM: s3c24xx: move regs-spi.h into spi driver

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 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 +++-
 .../plat/regs-spi.h => drivers/spi/spi-s3c24xx-regs.h    | 9 +++------
 drivers/spi/spi-s3c24xx.c                                | 3 +--
 6 files changed, 9 insertions(+), 11 deletions(-)
 rename arch/arm/plat-samsung/include/plat/regs-spi.h => drivers/spi/spi-s3c24xx-regs.h (89%)
arch/arm/mach-s3c24xx/include/mach/map.h +2 -0
index bca93112f57d..a20c9fd0d855 100644
@@ -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)
arch/arm/mach-s3c24xx/s3c2412.c +0 -1
index 8fe4d4670dcb..c3fb3e6c0dd8 100644
@@ -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"
arch/arm/plat-samsung/devs.c +0 -1
index 0607d2984841..0ed3a4b9fc12 100644
@@ -61,7 +61,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>
 
drivers/spi/spi-s3c24xx-fiq.S +3 -1
index e95d6282109e..9d5f8f1e5e81 100644
@@ -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
drivers/spi/spi-s3c24xx-regs.h renamed from arch/arm/plat-samsung/include/plat/regs-spi.h +3 -6
similarity index 89%
rename from arch/arm/plat-samsung/include/plat/regs-spi.h
rename to drivers/spi/spi-s3c24xx-regs.h
index 607844311566..f51464ab5677 100644
@@ -5,11 +5,8 @@
  * S3C2410 SPI register definition
  */
 
-#ifndef __ASM_ARCH_REGS_SPI_H
-#define __ASM_ARCH_REGS_SPI_H
-
-#define S3C2410_SPI1		(0x20)
-#define S3C2412_SPI1		(0x100)
+#ifndef __SPI_S3C2410_H
+#define __SPI_S3C2410_H
 
 #define S3C2410_SPCON		(0x00)
 
@@ -41,4 +38,4 @@
 #define S3C2410_SPTDAT		(0x10)
 #define S3C2410_SPRDAT		(0x14)
 
-#endif /* __ASM_ARCH_REGS_SPI_H */
+#endif /* __SPI_S3C2410_H */
drivers/spi/spi-s3c24xx.c +1 -2
index 7742170fca91..92be0c6d798a 100644
@@ -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"
 
 /**
Signature · 1 line
2.17.1
maintainer Acked-by on v2 20/41
#35 lore raw

Re: [PATCH v2 20/41] ARM: s3c24xx: move regs-spi.h into spi driver

Quoted 5 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

author maintainer
#36 lore raw

PATCH v2 21/41 ARM: s3c24xx: move irqchip driver back into platform

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 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%)
arch/arm/mach-s3c24xx/Makefile +1 -0
index 6692f2de71b2..8c31f84f8c97 100644
@@ -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
arch/arm/mach-s3c24xx/irq-s3c24xx.c renamed from drivers/irqchip/irq-s3c24xx.c +0 -0
similarity index 100%
rename from drivers/irqchip/irq-s3c24xx.c
rename to arch/arm/mach-s3c24xx/irq-s3c24xx.c
drivers/irqchip/Makefile +0 -1
index 133f9c45744a..8c983ad774f6 100644
@@ -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
Signature · 1 line
2.17.1
Acked-by on v2 21/41
#37 lore raw

Re: [PATCH v2 21/41] ARM: s3c24xx: move irqchip driver back into platform

Quoted 37 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 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%)
arch/arm/mach-s3c24xx/Makefile +1 -0
index 6692f2de71b2..8c31f84f8c97 100644
@@ -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
arch/arm/mach-s3c24xx/irq-s3c24xx.c renamed from drivers/irqchip/irq-s3c24xx.c +0 -0
similarity index 100%
rename from drivers/irqchip/irq-s3c24xx.c
rename to arch/arm/mach-s3c24xx/irq-s3c24xx.c
drivers/irqchip/Makefile +0 -0
index 133f9c45744a..8c983ad774f6 100644

drivers/irqchip/Makefile obj-$(CONFIG_ARCH_LPC32XX) += irq-lpc32xx.o · line 21

Quoted 7 lines
drivers/irqchip/Makefile +0 -1
@@ -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
         M.
Signature · 1 line
Jazz is not dead. It just smells funny...
author maintainer
#38 lore raw

PATCH v2 22/41 ARM: s3c: adc: move header to linux/soc/samsung

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 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               |  6 +--
 10 files changed, 46 insertions(+), 13 deletions(-)
 rename arch/arm/plat-samsung/include/plat/adc.h => include/linux/soc/samsung/s3c-adc.h (85%)
arch/arm/mach-s3c64xx/mach-crag6410.c +1 -1
index a2fefb2609e7..ca9a346056ed 100644
@@ -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>
 
arch/arm/mach-s3c64xx/mach-mini6410.c +1 -1
index 636d312add81..cbf6a1696a6d 100644
@@ -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>
arch/arm/mach-s3c64xx/mach-real6410.c +1 -1
index 56fc21f02c7b..e2aa7c0998bd 100644
@@ -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>
arch/arm/mach-s3c64xx/mach-smdk6410.c +1 -1
index 7b931e7a7913..febeacc476c8 100644
@@ -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>
 
arch/arm/plat-samsung/adc.c +1 -1
index 55b1925f65d7..e35e04417cce 100644
@@ -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
arch/arm/plat-samsung/devs.c +1 -1
index 0ed3a4b9fc12..c42e4a272cc7 100644
@@ -46,7 +46,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>
drivers/hwmon/s3c-hwmon.c +1 -1
index b490fe3d2ee8..f2703c5460d0 100644
@@ -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 {
drivers/input/touchscreen/s3c2410_ts.c +35 -2
index 82920ff46f72..2e70c0b79444 100644
@@ -20,10 +20,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)
drivers/power/supply/s3c_adc_battery.c +1 -1
index 3d00b35cafc9..60b7f41ab063 100644
@@ -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 */
include/linux/soc/samsung/s3c-adc.h renamed from arch/arm/plat-samsung/include/plat/adc.h +3 -3
similarity index 85%
rename from arch/arm/plat-samsung/include/plat/adc.h
rename to include/linux/soc/samsung/s3c-adc.h
index 74d1a46408c1..591c94ef957d 100644
@@ -7,8 +7,8 @@
  * S3C ADC driver information
  */
 
-#ifndef __ASM_PLAT_ADC_H
-#define __ASM_PLAT_ADC_H __FILE__
+#ifndef __LINUX_SOC_SAMSUNG_S3C_ADC_H
+#define __LINUX_SOC_SAMSUNG_S3C_ADC_H __FILE__
 
 struct s3c_adc_client;
 struct platform_device;
@@ -29,4 +29,4 @@ extern struct s3c_adc_client *
 
 extern void s3c_adc_release(struct s3c_adc_client *client);
 
-#endif /* __ASM_PLAT_ADC_H */
+#endif /* __LINUX_SOC_SAMSUNG_S3C_ADC_H */
Signature · 1 line
2.17.1
author maintainer
#39 lore raw

PATCH v2 23/41 ARM: s3c24xx: move spi fiq handler into platform

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

[krzk: Add a header guard in include/linux/spi/s3c24xx-fiq.h, fix
SPDX comment style, update maintainer's entry]

---

Changes since v1:
1. Add a header guard in include/linux/spi/s3c24xx-fiq.h,
2. Fix SPDX comment style,
3. Update maintainer's entry.

---
 MAINTAINERS                                            |  1 +
 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 +------
 .../linux/spi/s3c24xx-fiq.h                            | 10 ++++++++++
 7 files changed, 24 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 (66%)
MAINTAINERS +1 -0
index 81046738cba9..d9accf3c2582 100644
@@ -15307,6 +15307,7 @@ S:	Maintained
 F:	Documentation/devicetree/bindings/spi/spi-samsung.txt
 F:	drivers/spi/spi-s3c*
 F:	include/linux/platform_data/spi-s3c64xx.h
+F:	include/linux/spi/s3c24xx-fiq.h
 
 SAMSUNG SXGBE DRIVERS
 M:	Byungho An <[email protected]>
arch/arm/mach-s3c24xx/Makefile +2 -0
index 8c31f84f8c97..695573df00b1 100644
@@ -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
arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c new file +9 -0
new file mode 100644
index 000000000000..84cf86376ded
@@ -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);
arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S renamed from drivers/spi/spi-s3c24xx-fiq.S +1 -1
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
@@ -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)
drivers/spi/Makefile +0 -1
index cf955ea803cd..eba6fb607aa2 100644
@@ -97,7 +97,6 @@ obj-$(CONFIG_SPI_RPCIF)			+= spi-rpc-if.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
drivers/spi/spi-s3c24xx.c +1 -6
index 92be0c6d798a..e7a4732590db 100644
@@ -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"
 
 /**
  * struct s3c24xx_spi_devstate - per device data
@@ -229,10 +229,6 @@ struct spi_fiq_code {
 	u8	data[];
 };
 
-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);
 
include/linux/spi/s3c24xx-fiq.h renamed from drivers/spi/spi-s3c24xx-fiq.h +10 -0
similarity index 66%
rename from drivers/spi/spi-s3c24xx-fiq.h
rename to include/linux/spi/s3c24xx-fiq.h
index 7786b0ea56ec..d2842ac1de27 100644
@@ -7,11 +7,19 @@
  * S3C24XX SPI - FIQ pseudo-DMA transfer support
 */
 
+#ifndef __LINUX_SPI_S3C24XX_FIQ_H
+#define __LINUX_SPI_S3C24XX_FIQ_H __FILE__
+
 /* We have R8 through R13 to play with */
 
 #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
 
@@ -21,3 +29,5 @@
 #define fiq_rtx		__REG_NR(11)
 #define fiq_rcount	__REG_NR(12)
 #define fiq_rirq	__REG_NR(13)
+
+#endif /* __LINUX_SPI_S3C24XX_FIQ_H */
Signature · 1 line
2.17.1
maintainer Acked-by on v2 23/41
#40 lore raw

Re: [PATCH v2 23/41] ARM: s3c24xx: move spi fiq handler into platform

Quoted 4 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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

author maintainer Applied
#41 lore raw

Re: [PATCH v2 23/41] ARM: s3c24xx: move spi fiq handler into platform

In reply to Krzysztof Kozlowski
Quoted 19 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

[krzk: Add a header guard in include/linux/spi/s3c24xx-fiq.h, fix
SPDX comment style, update maintainer's entry]

---

Changes since v1:
1. Add a header guard in include/linux/spi/s3c24xx-fiq.h,
2. Fix SPDX comment style,
3. Update maintainer's entry.

Quoted 12 lines
---
 MAINTAINERS                                            |  1 +
 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 +------
 .../linux/spi/s3c24xx-fiq.h                            | 10 ++++++++++
 7 files changed, 24 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 (66%)

Applied patches 1-23 to samsung-soc.

Best regards,
Krzysztof

author maintainer
#42 lore raw

PATCH v2 24/41 ASoC: samsung: h1940: turn into platform driver

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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

---
 arch/arm/mach-s3c24xx/mach-h1940.c | 18 ++++++++
 sound/soc/samsung/h1940_uda1380.c  | 71 ++++++++++--------------------
 2 files changed, 41 insertions(+), 48 deletions(-)
arch/arm/mach-s3c24xx/mach-h1940.c +18 -0
index 9c71472c939f..c7269cd26ba8 100644
@@ -474,6 +474,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),
@@ -650,6 +666,7 @@ static struct platform_device *h1940_devices[] __initdata = {
 	&s3c_device_ts,
 	&power_supply,
 	&h1940_battery,
+	&h1940_audio,
 };
 
 static void __init h1940_map_io(void)
@@ -689,6 +706,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);
sound/soc/samsung/h1940_uda1380.c +23 -48

117 lines not on this page · raw message

Signature · 1 line
2.17.1
author maintainer
#43 lore raw

PATCH v2 25/41 ASoC: samsung: neo1973: turn into platform driver

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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

---
 arch/arm/mach-s3c24xx/mach-gta02.c | 17 ++++++
 sound/soc/samsung/neo1973_wm8753.c | 85 +++++++++---------------------
 2 files changed, 43 insertions(+), 59 deletions(-)
arch/arm/mach-s3c24xx/mach-gta02.c +17 -0
index 346a158f9960..46a80fae7056 100644
@@ -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>
@@ -472,6 +473,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));
@@ -496,6 +511,7 @@ static struct platform_device *gta02_devices[] __initdata = {
 	&gta02_buttons_device,
 	&s3c_device_adc,
 	&s3c_device_ts,
+	&gta02_audio,
 };
 
 static void gta02_poweroff(void)
@@ -522,6 +538,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;
 
sound/soc/samsung/neo1973_wm8753.c +26 -59

135 lines not on this page · raw message

Signature · 1 line
2.17.1
author maintainer
#44 lore raw

PATCH v2 26/41 ASoC: samsung: rx1950: turn into platform driver

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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

---
 arch/arm/mach-s3c24xx/mach-rx1950.c | 16 +++++++
 sound/soc/samsung/rx1950_uda1380.c  | 72 +++++++++--------------------
 2 files changed, 39 insertions(+), 49 deletions(-)
arch/arm/mach-s3c24xx/mach-rx1950.c +16 -0
index 65440c39500e..a5461b2227bd 100644
@@ -727,6 +727,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,
@@ -745,6 +759,7 @@ static struct platform_device *rx1950_devices[] __initdata = {
 	&power_supply,
 	&rx1950_battery,
 	&rx1950_leds,
+	&rx1950_audio,
 };
 
 static void __init rx1950_map_io(void)
@@ -812,6 +827,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,
sound/soc/samsung/rx1950_uda1380.c +23 -49

124 lines not on this page · raw message

Signature · 1 line
2.17.1
author maintainer
#45 lore raw

PATCH v2 27/41 ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 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(-)
sound/soc/samsung/s3c-i2s-v2.c +1 -2
index ed21786104a1..e9481187a08c 100644
@@ -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;
sound/soc/samsung/s3c-i2s-v2.h +1 -2
index fe42b77999fd..8c6fc0d3d77e 100644
@@ -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
sound/soc/samsung/s3c2412-i2s.c +1 -1
index b35d828c1cfe..edfa9d11d2e5 100644
@@ -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;
 
Signature · 1 line
2.17.1
author maintainer
#46 lore raw

PATCH v2 28/41 ARM: s3c24xx: move iis pinctrl config into boards

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

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.

---
 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(-)
arch/arm/mach-s3c24xx/mach-gta02.c +4 -0
index 46a80fae7056..3c7f2a3d00a5 100644
@@ -538,6 +538,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;
arch/arm/mach-s3c24xx/mach-h1940.c +3 -0
index c7269cd26ba8..1f18ac4e84b2 100644
@@ -707,6 +707,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);
arch/arm/mach-s3c24xx/mach-mini2440.c +5 -0
index 65f48094114e..0bd2746f19a6 100644
@@ -714,6 +714,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;
 
arch/arm/mach-s3c24xx/mach-n30.c +5 -0
index 152f09242579..9410fcb82340 100644
@@ -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>
@@ -599,6 +600,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. */
arch/arm/mach-s3c24xx/mach-nexcoder.c +5 -0
index 5385437ef464..ec23b115261e 100644
@@ -143,6 +143,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));
 };
 
arch/arm/mach-s3c24xx/mach-otom.c +6 -0
index e7eec5ccddb3..1f777ab4ced7 100644
@@ -23,6 +23,8 @@
 #include <asm/mach/irq.h>
 
 #include <mach/regs-gpio.h>
+#include <mach/gpio-samsung.h>
+#include <plat/gpio-cfg.h>
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
@@ -105,6 +107,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));
 }
 
arch/arm/mach-s3c24xx/mach-qt2410.c +3 -0
index 4ac3d0531992..5e33f3da629e 100644
@@ -341,6 +341,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);
 	s3c_gpio_setpull(S3C2410_GPB(0), S3C_GPIO_PULL_NONE);
 	gpiod_add_lookup_table(&qt2410_led_gpio_table);
arch/arm/mach-s3c24xx/mach-rx1950.c +3 -0
index a5461b2227bd..86d348f33972 100644
@@ -828,6 +828,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,
arch/arm/mach-s3c24xx/mach-rx3715.c +4 -0
index 617392de01ac..fc197cee77a0 100644
@@ -38,6 +38,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>
@@ -197,6 +198,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));
 }
 
arch/arm/mach-s3c24xx/mach-smdk2410.c +5 -0
index 1d4d8735f283..c78fe1d8802c 100644
@@ -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>
@@ -92,6 +94,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();
 }
 
arch/arm/mach-s3c24xx/mach-smdk2413.c +4 -0
index 9782cc3e698c..287bd502a030 100644
@@ -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>
@@ -118,6 +119,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();
arch/arm/mach-s3c24xx/mach-smdk2440.c +5 -1
index bd6a35105518..5939372ecec2 100644
@@ -28,6 +28,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>
@@ -165,7 +167,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();
 }
arch/arm/mach-s3c24xx/mach-vstms.c +5 -1
index f0acbaa6dfd6..c6e777aab24e 100644
@@ -30,6 +30,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>
 
@@ -147,7 +149,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));
 }
 
arch/arm/mach-s3c24xx/simtec-audio.c +6 -0
index cfe78bf8cc9b..af87261e6a59 100644
@@ -13,6 +13,8 @@
 #include <linux/io.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>
@@ -64,6 +66,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;
sound/soc/samsung/s3c2412-i2s.c +0 -7
index edfa9d11d2e5..81f416ac457e 100644
@@ -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:
sound/soc/samsung/s3c24xx-i2s.c +0 -7
index 60bfaed5f7a6..50c08008aacb 100644
@@ -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);
Signature · 1 line
2.17.1
maintainer Acked-by on v2 28/41
#47 lore raw

Re: [PATCH v2 28/41] ARM: s3c24xx: move iis pinctrl config into boards

Quoted 5 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

Well, it is now - that wasn't the case at the time.

author maintainer
#48 lore raw

PATCH v2 29/41 ARM: s3c24xx: move s3cmci pinctrl handling into board files

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

[krzk: Rebase and correct set_power in mach-h1940.c]

---

Changes since v1:
1. Minor whitespace changes,
2. mach-h1940.c already had set_power.

---
 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           |  9 +++
 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                    | 71 +++++---------------
 include/linux/platform_data/mmc-s3cmci.h     |  2 +
 13 files changed, 153 insertions(+), 56 deletions(-)
arch/arm/mach-s3c24xx/include/mach/pm-core.h +1 -0
index 8f87606c4cdc..a22b4a37ee57 100644
@@ -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)
 {
arch/arm/mach-s3c24xx/mach-amlm5900.c +15 -0
index 6324e608dcda..1a2a9259b4b6 100644
@@ -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>
@@ -121,6 +122,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
@@ -216,6 +230,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));
 }
 
arch/arm/mach-s3c24xx/mach-at2440evb.c +9 -1
index fe8f9f1bdc0a..a2693246b3ca 100644
@@ -134,7 +134,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 = {
@@ -142,10 +142,18 @@ static struct gpiod_lookup_table at2440evb_mci_gpio_table = {
 	.table = {
 		/* Card detect S3C2410_GPG(10) */
 		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),
+		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 = {
arch/arm/mach-s3c24xx/mach-gta02.c +15 -0
index 3c7f2a3d00a5..c023e261a240 100644
@@ -487,6 +487,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));
@@ -543,6 +557,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;
 
arch/arm/mach-s3c24xx/mach-h1940.c +9 -0
index 1f18ac4e84b2..e9b3b048a96d 100644
@@ -445,6 +445,8 @@ static struct platform_device h1940_device_bluetooth = {
 
 static void h1940_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_set_value(H1940_LATCH_SD_POWER, 0);
@@ -470,6 +472,13 @@ static struct gpiod_lookup_table h1940_mmc_gpio_table = {
 		GPIO_LOOKUP("GPIOF", 5, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
 		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),
+		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),
 		{ },
 	},
 };
arch/arm/mach-s3c24xx/mach-mini2440.c +8 -1
index 0bd2746f19a6..d3cc0141f58c 100644
@@ -234,7 +234,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,
 };
 
@@ -245,6 +245,13 @@ static struct gpiod_lookup_table mini2440_mmc_gpio_table = {
 		GPIO_LOOKUP("GPIOG", 8, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
 		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),
+		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),
 		{ },
 	},
 };
arch/arm/mach-s3c24xx/mach-n30.c +9 -0
index 9410fcb82340..24e97646b068 100644
@@ -368,6 +368,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:
@@ -393,6 +395,13 @@ static struct gpiod_lookup_table n30_mci_gpio_table = {
 		/* Write protect S3C2410_GPG(10) */
 		GPIO_LOOKUP("GPIOG", 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),
 	},
 };
 
arch/arm/mach-s3c24xx/mach-qt2410.c +15 -0
index 5e33f3da629e..b21f7fbcadf9 100644
@@ -223,6 +223,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 = {
@@ -347,6 +361,7 @@ static void __init qt2410_machine_init(void)
 	gpiod_add_lookup_table(&qt2410_spi_gpiod_table);
 	s3c_gpio_setpull(S3C2410_GPB(0), S3C_GPIO_PULL_NONE);
 	gpiod_add_lookup_table(&qt2410_led_gpio_table);
+	gpiod_add_lookup_table(&qt2410_mmc_gpiod_table);
 	platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices));
 	s3c_pm_init();
 }
arch/arm/mach-s3c24xx/mach-rx1950.c +9 -0
index 86d348f33972..aa91785a95b5 100644
@@ -548,6 +548,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);
@@ -573,6 +575,13 @@ static struct gpiod_lookup_table rx1950_mmc_gpio_table = {
 		GPIO_LOOKUP("GPIOF", 5, "cd", GPIO_ACTIVE_LOW),
 		/* Write protect S3C2410_GPH(8) */
 		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),
+		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),
 		{ },
 	},
 };
arch/arm/mach-s3c24xx/mach-tct_hammer.c +15 -0
index fd51a098e443..8092be7b47db 100644
@@ -7,6 +7,7 @@
 // derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by
 // Ben Dooks <[email protected]>
 
+#include <linux/gpio/machine.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
@@ -101,6 +102,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,
@@ -129,6 +143,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));
 }
 
arch/arm/plat-samsung/devs.c +29 -0
index c42e4a272cc7..b16be04c0169 100644
@@ -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>
@@ -39,6 +40,7 @@
 
 #include <mach/irqs.h>
 #include <mach/map.h>
+#include <mach/gpio-samsung.h>
 
 #ifdef CONFIG_PLAT_S3C24XX
 #include <mach/regs-s3c2443-clock.h>
@@ -46,6 +48,7 @@
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
+#include <plat/gpio-cfg.h>
 #include <linux/soc/samsung/s3c-adc.h>
 #include <linux/platform_data/ata-samsung_cf.h>
 #include <plat/fb.h>
@@ -835,16 +838,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)
drivers/mmc/host/s3cmci.c +17 -54

153 lines not on this page · raw message

include/linux/platform_data/mmc-s3cmci.h +2 -0
index 33310b11cbdd..bacb86db3112 100644
@@ -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 */
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#49 lore raw

PATCH v2 30/41 ARM: s3c24xx: include mach/irqs.h where needed

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 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  | 1 +
 arch/arm/mach-s3c24xx/s3c2443.c     | 1 +
 arch/arm/mach-s3c24xx/simtec-usb.c  | 1 +
 7 files changed, 7 insertions(+)
arch/arm/mach-s3c24xx/bast-ide.c +1 -0
index 067944398f46..ee6fbb407640 100644
@@ -20,6 +20,7 @@
 #include <asm/mach/irq.h>
 
 #include <mach/map.h>
+#include <mach/irqs.h>
 
 #include "bast.h"
 
arch/arm/mach-s3c24xx/bast-irq.c +1 -0
index 03209fefa5db..a6db5e2c910c 100644
@@ -16,6 +16,7 @@
 #include <asm/mach/irq.h>
 
 #include <mach/regs-irq.h>
+#include <mach/irqs.h>
 
 #include "bast.h"
 
arch/arm/mach-s3c24xx/common.h +1 -0
index 8d2e2c6ae7eb..86826cafa15d 100644
@@ -10,6 +10,7 @@
 #define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
 
 #include <linux/reboot.h>
+#include <mach/irqs.h>
 
 struct s3c2410_uartcfg;
 
arch/arm/mach-s3c24xx/irq-s3c24xx.c +1 -0
index d2031fecc386..b0e879ee14c1 100644
@@ -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>
 
arch/arm/mach-s3c24xx/pm-s3c2412.c +1 -0
index b1d0ad07301b..2779d67d2c07 100644
@@ -19,6 +19,7 @@
 #include <asm/cacheflush.h>
 #include <asm/irq.h>
 
+#include <mach/irqs.h>
 #include <mach/regs-gpio.h>
 
 #include <plat/cpu.h>
arch/arm/mach-s3c24xx/s3c2443.c +1 -0
index c278cfc10ba5..3c05d04bbbeb 100644
@@ -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>
 
arch/arm/mach-s3c24xx/simtec-usb.c +1 -0
index 3488988316a8..693a2a9a7349 100644
@@ -24,6 +24,7 @@
 #include <asm/mach/irq.h>
 
 #include <mach/gpio-samsung.h>
+#include <mach/irqs.h>
 #include <asm/irq.h>
 
 #include <linux/platform_data/usb-ohci-s3c2410.h>
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#50 lore raw

PATCH v2 31/41 ARM: s3c24xx: spi: avoid hardcoding fiq number in driver

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 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(-)
arch/arm/mach-s3c24xx/irq-s3c24xx.c +9 -3
index b0e879ee14c1..3965347cacf0 100644
@@ -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);
drivers/spi/spi-s3c24xx.c +2 -16
index e7a4732590db..d6f51695ca5b 100644
@@ -229,17 +229,6 @@ struct spi_fiq_code {
 	u8	data[];
 };
 
-/**
- * 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;
include/linux/spi/s3c24xx.h +1 -1
index c91d10b82f08..440a71593162 100644
@@ -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 */
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Acked-by on v2 31/41
#51 lore raw

Re: [PATCH v2 31/41] ARM: s3c24xx: spi: avoid hardcoding fiq number in driver

Quoted 5 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

author maintainer
#52 lore raw

PATCH v2 32/41 ARM: s3c24xx: bast: avoid irq_desc array usage

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 arch/arm/mach-s3c24xx/bast-irq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/arm/mach-s3c24xx/bast-irq.c +1 -3
index a6db5e2c910c..141a35d58dd7 100644
@@ -62,7 +62,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);
@@ -94,8 +94,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 */
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#53 lore raw

PATCH v2 33/41 fbdev: s3c2410fb: remove mach header dependency

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 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%)
arch/arm/mach-s3c24xx/include/mach/fb.h deleted +0 -2
deleted file mode 100644
index 4e539cb8b884..000000000000
@@ -1,2 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#include <plat/fb-s3c2410.h>
arch/arm/mach-s3c24xx/mach-amlm5900.c +5 -2
index 1a2a9259b4b6..f04eb9aa29ac 100644
@@ -29,9 +29,8 @@
 
 #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>
 
@@ -191,13 +190,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
 
arch/arm/mach-s3c24xx/mach-anubis.c +0 -1
index 753a314f4493..15cab0976941 100644
@@ -28,7 +28,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>
arch/arm/mach-s3c24xx/mach-at2440evb.c +1 -2
index a2693246b3ca..7fcb24a49ad8 100644
@@ -24,12 +24,11 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.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>
arch/arm/mach-s3c24xx/mach-bast.c +1 -2
index 9eef0f80175f..306891235f73 100644
@@ -40,9 +40,8 @@
 #include <asm/mach/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/fb.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>
arch/arm/mach-s3c24xx/mach-gta02.c +1 -1
index c023e261a240..a28e92142b04 100644
@@ -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/regs-gpio.h>
 #include <mach/regs-irq.h>
 #include <mach/gpio-samsung.h>
arch/arm/mach-s3c24xx/mach-h1940.c +5 -2
index e9b3b048a96d..d45825898835 100644
@@ -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>
@@ -210,12 +209,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)
arch/arm/mach-s3c24xx/mach-jive.c +8 -2
index 2c630ade08bb..ec6c40ea8f86 100644
@@ -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>
@@ -320,6 +319,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 |
@@ -333,8 +333,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 |
@@ -348,6 +352,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. */
arch/arm/mach-s3c24xx/mach-mini2440.c +7 -2
index d3cc0141f58c..6f58a3404b36 100644
@@ -30,12 +30,11 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <mach/fb.h>
+#include <linux/platform_data/fb-s3c2410.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>
@@ -213,6 +212,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 |
@@ -228,6 +230,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  */
arch/arm/mach-s3c24xx/mach-n30.c +1 -2
index 24e97646b068..a3c1315f5ffb 100644
@@ -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>
 
arch/arm/mach-s3c24xx/mach-osiris.c +0 -1
index 03595144126b..ed10a32e26b8 100644
@@ -42,7 +42,6 @@
 #include <plat/gpio-cfg.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 
 #include "common.h"
arch/arm/mach-s3c24xx/mach-qt2410.c +1 -2
index b21f7fbcadf9..1ccad4e9e437 100644
@@ -32,8 +32,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>
arch/arm/mach-s3c24xx/mach-rx1950.c +5 -3
index aa91785a95b5..2513ce7fa026 100644
@@ -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>
@@ -360,14 +359,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[] = {
arch/arm/mach-s3c24xx/mach-rx3715.c +5 -2
index fc197cee77a0..0eb45f13f0c4 100644
@@ -30,13 +30,12 @@
 #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/regs-gpio.h>
-#include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 #include <plat/gpio-cfg.h>
 
@@ -124,13 +123,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[] = {
arch/arm/mach-s3c24xx/mach-smdk2413.c +1 -2
index 287bd502a030..4604ec89f06e 100644
@@ -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>
arch/arm/mach-s3c24xx/mach-smdk2416.c +0 -1
index f98feb45568d..217401b2238d 100644
@@ -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>
 
arch/arm/mach-s3c24xx/mach-smdk2440.c +6 -2
index 5939372ecec2..a0116cff6e4e 100644
@@ -27,11 +27,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>
@@ -137,6 +136,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,
arch/arm/mach-s3c24xx/mach-smdk2443.c +1 -2
index 8a1f2580c6c7..1c2fa7c3feb8 100644
@@ -26,9 +26,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>
arch/arm/mach-s3c24xx/mach-vstms.c +1 -2
index c6e777aab24e..ff3fa0017494 100644
@@ -29,11 +29,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>
arch/arm/plat-samsung/devs.c +1 -1
index b16be04c0169..e23204132b27 100644
@@ -52,7 +52,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>
drivers/video/fbdev/s3c2410fb-regs-lcd.h renamed from arch/arm/mach-s3c24xx/include/mach/regs-lcd.h +7 -21
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
@@ -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)
drivers/video/fbdev/s3c2410fb.c +9 -7
index 6f8fa501583f..d8ae5258de46 100644
@@ -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 */
 static int debug = IS_BUILTIN(CONFIG_FB_S3C2410_DEBUG);
@@ -672,6 +671,9 @@ static inline void modify_gpio(void __iomem *reg,
 {
 	unsigned long tmp;
 
+	if (!reg)
+		return;
+
 	tmp = readl(reg) & ~mask;
 	writel(tmp | set, reg);
 }
@@ -702,10 +704,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);
 
include/linux/platform_data/fb-s3c2410.h renamed from arch/arm/plat-samsung/include/plat/fb-s3c2410.h +32 -1
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
@@ -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 */
Signature · 1 line
2.17.1
author maintainer
#54 lore raw

PATCH v2 34/41 cpufreq: s3c24xx: split out registers

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

[krzk: Fix build by copying also S3C2410_LOCKTIME]

---

Changes since v1:
1. Copy also S3C2410_LOCKTIME to the driver.

---
 drivers/cpufreq/s3c2410-cpufreq.c | 11 +++++++++--
 drivers/cpufreq/s3c2412-cpufreq.c | 20 +++++++++++++++++++-
 drivers/cpufreq/s3c2440-cpufreq.c | 24 ++++++++++++++++++++++--
 drivers/cpufreq/s3c24xx-cpufreq.c |  5 ++++-
 4 files changed, 54 insertions(+), 6 deletions(-)
drivers/cpufreq/s3c2410-cpufreq.c +9 -2
index 0c4f2ccd7e22..5c6cb590b63f 100644
@@ -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)
drivers/cpufreq/s3c2412-cpufreq.c +19 -1
index 53385a9ab957..d922d0d47c80 100644
@@ -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;
drivers/cpufreq/s3c2440-cpufreq.c +22 -2
index 3f772ba8896e..5fe7a891fa13 100644
@@ -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;
drivers/cpufreq/s3c24xx-cpufreq.c +4 -1
index ed0e713b1b57..cf0571e8fafb 100644
@@ -28,9 +28,12 @@
 #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_LOCKTIME    S3C2410_CLKREG(0x00)
+#define S3C2410_MPLLCON     S3C2410_CLKREG(0x04)
 
 static struct cpufreq_driver s3c24xx_driver;
 static struct s3c_cpufreq_config cpu_cur;
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Acked-by on v2 34/41
#55 lore raw

Re: [PATCH v2 34/41] cpufreq: s3c24xx: split out registers

Quoted 11 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

[krzk: Fix build by copying also S3C2410_LOCKTIME]

---

Signature · 1 line
viresh
author maintainer
#56 lore raw

PATCH v2 35/41 ARM: s3c: remove cpufreq header dependencies

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 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                   |  4 ++++
 .../linux/soc/samsung/s3c-cpufreq-core.h               |  6 +++++-
 include/linux/soc/samsung/s3c-pm.h                     | 10 ++++++++++
 24 files changed, 41 insertions(+), 42 deletions(-)
 rename arch/arm/plat-samsung/include/plat/cpu-freq.h => include/linux/soc/samsung/s3c-cpu-freq.h (97%)
 rename arch/arm/plat-samsung/include/plat/cpu-freq-core.h => include/linux/soc/samsung/s3c-cpufreq-core.h (98%)
arch/arm/mach-s3c24xx/common.c +0 -1
index c476a673d07f..f987de1a61c2 100644
@@ -37,7 +37,6 @@
 
 #include <plat/cpu.h>
 #include <plat/devs.h>
-#include <plat/cpu-freq.h>
 #include <plat/pwm-core.h>
 
 #include "common.h"
arch/arm/mach-s3c24xx/cpufreq-utils.c +1 -1
index 1a7f38d085dd..43ab714eaa9e 100644
@@ -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"
 
arch/arm/mach-s3c24xx/iotiming-s3c2410.c +1 -1
index 39081c41958c..5d85c259f328 100644
@@ -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"
 
arch/arm/mach-s3c24xx/iotiming-s3c2412.c +1 -1
index 59356d10fbcf..a22b5611697d 100644
@@ -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>
 
arch/arm/mach-s3c24xx/mach-bast.c +1 -1
index 306891235f73..7e3ce48539c4 100644
@@ -45,7 +45,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>
 
arch/arm/mach-s3c24xx/mach-osiris-dvs.c +1 -1
index 5d819b6ea428..1250520b3bcc 100644
@@ -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)
arch/arm/mach-s3c24xx/mach-osiris.c +1 -1
index ed10a32e26b8..258850c1bbb2 100644
@@ -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>
 
arch/arm/mach-s3c24xx/pll-s3c2410.c +2 -2
index 0561f79ddce8..3fbc99eaa4a2 100644
@@ -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[] = {
arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c +2 -2
index 2ec3a2f9a6a5..fdb8e8c2fe3b 100644
@@ -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[] = {
arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c +2 -2
index 4b3d9e36c6bb..438b6fc099a4 100644
@@ -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[] = {
arch/arm/mach-s3c24xx/s3c2410.c +0 -1
index 21fd5404bc98..8427c150dd22 100644
@@ -30,7 +30,6 @@
 #include <asm/irq.h>
 #include <asm/system_misc.h>
 
-#include <plat/cpu-freq.h>
 
 #include <mach/regs-clock.h>
 
arch/arm/mach-s3c24xx/s3c2412.c +0 -1
index c3fb3e6c0dd8..209f952a6c98 100644
@@ -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>
 
arch/arm/mach-s3c24xx/s3c244x.c +0 -2
index a75f588b9d45..f5bd489bac85 100644
@@ -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>
 
arch/arm/mach-s3c64xx/s3c6400.c +0 -1
index 81233495d548..d18af724c807 100644
@@ -28,7 +28,6 @@
 
 #include <asm/irq.h>
 
-#include <plat/cpu-freq.h>
 #include <mach/regs-clock.h>
 
 #include <plat/cpu.h>
arch/arm/mach-s3c64xx/s3c6410.c +1 -1
index 9465a6e0f068..b1d725e55cd2 100644
@@ -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>
arch/arm/plat-samsung/include/plat/cpu.h +0 -9
index 93ecd7127831..20ff98d05c53 100644
@@ -123,15 +123,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
drivers/cpufreq/s3c2410-cpufreq.c +2 -3
index 5c6cb590b63f..9c2f29cacdd0 100644
@@ -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)
drivers/cpufreq/s3c2412-cpufreq.c +2 -3
index d922d0d47c80..38dc9e6db633 100644
@@ -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)
drivers/cpufreq/s3c2440-cpufreq.c +2 -3
index 5fe7a891fa13..442abdccb9c1 100644
@@ -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)
drivers/cpufreq/s3c24xx-cpufreq-debugfs.c +1 -1
index 290e3539d03e..93971dfe7c75 100644
@@ -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;
drivers/cpufreq/s3c24xx-cpufreq.c +2 -3
index cf0571e8fafb..27111fbca2ff 100644
@@ -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 */
include/linux/soc/samsung/s3c-cpu-freq.h renamed from arch/arm/plat-samsung/include/plat/cpu-freq.h +4 -0
similarity index 97%
rename from arch/arm/plat-samsung/include/plat/cpu-freq.h
rename to include/linux/soc/samsung/s3c-cpu-freq.h
index 558892bcf9b6..63e88fd5dea2 100644
@@ -6,6 +6,8 @@
  *
  * S3C CPU frequency scaling support - driver and board
  */
+#ifndef __LINUX_SOC_SAMSUNG_S3C_CPU_FREQ_H
+#define __LINUX_SOC_SAMSUNG_S3C_CPU_FREQ_H
 
 #include <linux/cpufreq.h>
 
@@ -139,3 +141,5 @@ static inline int s3c_cpufreq_setboard(struct s3c_cpufreq_board *board)
 	return 0;
 }
 #endif  /* CONFIG_ARM_S3C_CPUFREQ */
+
+#endif
include/linux/soc/samsung/s3c-cpufreq-core.h renamed from arch/arm/plat-samsung/include/plat/cpu-freq-core.h +5 -1
similarity index 98%
rename from arch/arm/plat-samsung/include/plat/cpu-freq-core.h
rename to include/linux/soc/samsung/s3c-cpufreq-core.h
index 2c7cf2665634..c578b07ccd5d 100644
@@ -6,8 +6,10 @@
  *
  * S3C CPU frequency scaling support - core support
  */
+#ifndef __LINUX_SOC_SAMSUNG_S3C_CPUFREQ_CORE_H
+#define __LINUX_SOC_SAMSUNG_S3C_CPUFREQ_CORE_H
 
-#include <plat/cpu-freq.h>
+#include <linux/soc/samsung/s3c-cpu-freq.h>
 
 struct seq_file;
 
@@ -285,3 +287,5 @@ static inline int s3c_cpufreq_addfreq(struct cpufreq_frequency_table *table,
 
 	return index + 1;
 }
+
+#endif
include/linux/soc/samsung/s3c-pm.h +10 -0
index 730bd1d3d09a..f9164559c99f 100644
@@ -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
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Acked-by on v2 35/41
#57 lore raw

Re: [PATCH v2 35/41] ARM: s3c: remove cpufreq header dependencies

Quoted 31 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 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 ++---
Quoted 8 lines
 drivers/cpufreq/s3c24xx-cpufreq-debugfs.c              |  2 +-
 drivers/cpufreq/s3c24xx-cpufreq.c                      |  5 ++---
 .../linux/soc/samsung/s3c-cpu-freq.h                   |  4 ++++
 .../linux/soc/samsung/s3c-cpufreq-core.h               |  6 +++++-
 include/linux/soc/samsung/s3c-pm.h                     | 10 ++++++++++
 24 files changed, 41 insertions(+), 42 deletions(-)
 rename arch/arm/plat-samsung/include/plat/cpu-freq.h => include/linux/soc/samsung/s3c-cpu-freq.h (97%)
 rename arch/arm/plat-samsung/include/plat/cpu-freq-core.h => include/linux/soc/samsung/s3c-cpufreq-core.h (98%)
Signature · 1 line
viresh
author maintainer
#58 lore raw

PATCH v2 36/41 cpufreq: s3c2412: use global s3c2412_cpufreq_setrefresh

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 drivers/cpufreq/s3c2412-cpufreq.c            | 23 --------------------
 include/linux/soc/samsung/s3c-cpufreq-core.h |  1 +
 2 files changed, 1 insertion(+), 23 deletions(-)
drivers/cpufreq/s3c2412-cpufreq.c +0 -23
index 38dc9e6db633..a77c63e92e1a 100644
@@ -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.
  */
include/linux/soc/samsung/s3c-cpufreq-core.h +1 -0
index c578b07ccd5d..e0c7217a0f53 100644
@@ -248,6 +248,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
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Acked-by on v2 36/41
#59 lore raw

Re: [PATCH v2 36/41] cpufreq: s3c2412: use global s3c2412_cpufreq_setrefresh

Quoted 11 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

Quoted 6 lines
---
 drivers/cpufreq/s3c2412-cpufreq.c            | 23 --------------------
 include/linux/soc/samsung/s3c-cpufreq-core.h |  1 +
 2 files changed, 1 insertion(+), 23 deletions(-)
Signature · 1 line
viresh
author maintainer
#60 lore raw

PATCH v2 37/41 cpufreq: s3c24xx: move low-level clk reg access into platform code

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

[krzk: Rebase and fix -Wold-style-definition]

---

Changes since v1:
1. Add 'void' argument to fix -Wold-style-definition warning.

---
 arch/arm/mach-s3c24xx/Kconfig                |  7 -----
 arch/arm/mach-s3c24xx/Makefile               |  2 +-
 arch/arm/mach-s3c24xx/cpufreq-utils.c        | 32 ++++++++++++++++++++
 drivers/cpufreq/Kconfig.arm                  |  2 --
 drivers/cpufreq/s3c2410-cpufreq.c            |  8 +----
 drivers/cpufreq/s3c2412-cpufreq.c            | 10 ++----
 drivers/cpufreq/s3c2440-cpufreq.c            | 16 +++-------
 drivers/cpufreq/s3c24xx-cpufreq.c            | 12 ++------
 include/linux/soc/samsung/s3c-cpufreq-core.h |  7 +++++
 9 files changed, 51 insertions(+), 45 deletions(-)
arch/arm/mach-s3c24xx/Kconfig +0 -7
index 7673dde9671a..3a4b050b46a1 100644
@@ -137,13 +137,6 @@ config S3C2410_IOTIMING
 	  Internal node to select io timing code that is common to the s3c2410
 	  and s3c2440/s3c2442 cpu frequency support.
 
-config S3C2410_CPUFREQ_UTILS
-       bool
-       depends on ARM_S3C24XX_CPUFREQ
-       help
-         Internal node to select timing code that is common to the s3c2410
-         and s3c2440/s3c244 cpu frequency support.
-
 # cpu frequency support common to s3c2412, s3c2413 and s3c2442
 
 config S3C2412_IOTIMING
arch/arm/mach-s3c24xx/Makefile +1 -1
index 695573df00b1..195a4cb23ecb 100644
@@ -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
arch/arm/mach-s3c24xx/cpufreq-utils.c +32 -0
index 43ab714eaa9e..3bc374dd0b2d 100644
@@ -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(void)
+{
+	return __raw_readl(S3C2440_CAMDIVN);
+}
+
+void s3c2440_write_camdivn(u32 camdiv)
+{
+	__raw_writel(camdiv, S3C2440_CAMDIVN);
+}
+#endif
+
+u32 s3c24xx_read_clkdivn(void)
+{
+	return __raw_readl(S3C2410_CLKDIVN);
+}
+
+void s3c24xx_write_clkdivn(u32 clkdiv)
+{
+	__raw_writel(clkdiv, S3C2410_CLKDIVN);
+}
+
+u32 s3c24xx_read_mpllcon(void)
+{
+	return __raw_readl(S3C2410_MPLLCON);
+}
+
+void s3c24xx_write_locktime(u32 locktime)
+{
+	return __raw_writel(locktime, S3C2410_LOCKTIME);
+}
drivers/cpufreq/Kconfig.arm +0 -2
index cb72fb507d57..6514a39981e1 100644
@@ -196,7 +196,6 @@ config ARM_S3C24XX_CPUFREQ_DEBUGFS
 config ARM_S3C2410_CPUFREQ
 	bool
 	depends on ARM_S3C24XX_CPUFREQ && CPU_S3C2410
-	select S3C2410_CPUFREQ_UTILS
 	help
 	  CPU Frequency scaling support for S3C2410
 
@@ -233,7 +232,6 @@ config ARM_S3C2416_CPUFREQ_VCORESCALE
 config ARM_S3C2440_CPUFREQ
 	bool "S3C2440/S3C2442 CPU Frequency scaling support"
 	depends on ARM_S3C24XX_CPUFREQ && (CPU_S3C2440 || CPU_S3C2442)
-	select S3C2410_CPUFREQ_UTILS
 	default y
 	help
 	  CPU Frequency scaling support for S3C2440 and S3C2442 SoC CPUs.
drivers/cpufreq/s3c2410-cpufreq.c +1 -7
index 9c2f29cacdd0..5dcfbf0bfb74 100644
@@ -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)
drivers/cpufreq/s3c2412-cpufreq.c +2 -8
index a77c63e92e1a..5945945ead7c 100644
@@ -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);
 }
drivers/cpufreq/s3c2440-cpufreq.c +5 -11
index 442abdccb9c1..148e8aedefa9 100644
@@ -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);
 }
drivers/cpufreq/s3c24xx-cpufreq.c +3 -9
index 27111fbca2ff..37efc0dc3f91 100644
@@ -27,13 +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_LOCKTIME    S3C2410_CLKREG(0x00)
-#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;
@@ -70,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);
@@ -388,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;
@@ -549,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)
include/linux/soc/samsung/s3c-cpufreq-core.h +7 -0
index e0c7217a0f53..3b278afb769b 100644
@@ -289,4 +289,11 @@ 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);
+
 #endif
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Acked-by on v2 37/41
#61 lore raw

Re: [PATCH v2 37/41] cpufreq: s3c24xx: move low-level clk reg access into platform code

Quoted 11 lines · Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

[krzk: Rebase and fix -Wold-style-definition]
Signature · 1 line
viresh
author maintainer
#62 lore raw

PATCH v2 38/41 ARM: s3c24xx: stop including mach/hardware.h from mach/io.h

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

---
 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 -
 22 files changed, 23 insertions(+), 18 deletions(-)
arch/arm/mach-s3c24xx/common.c +1 -0
index f987de1a61c2..30b0dcd20f17 100644
@@ -23,6 +23,7 @@
 #include <linux/clk/samsung.h>
 
 #include <mach/hardware.h>
+#include <mach/map.h>
 #include <mach/regs-clock.h>
 #include <asm/irq.h>
 #include <asm/cacheflush.h>
arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h +2 -0
index 2ad22b2d459b..f8a114891f16 100644
@@ -14,6 +14,8 @@
 #ifndef GPIO_SAMSUNG_S3C24XX_H
 #define GPIO_SAMSUNG_S3C24XX_H
 
+#include <mach/map.h>
+
 /*
  * GPIO sizes for various SoCs:
  *
arch/arm/mach-s3c24xx/include/mach/hardware.h +0 -7
index f28ac6c78d82..c732ea54984c 100644
@@ -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 */
arch/arm/mach-s3c24xx/include/mach/io.h +1 -2
index 3e8bff26cdd5..bcddf615adb6 100644
@@ -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,
arch/arm/mach-s3c24xx/include/mach/regs-clock.h +2 -0
index 7ca3dd4f13c0..da4e7b3aeba6 100644
@@ -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)))
arch/arm/mach-s3c24xx/include/mach/regs-gpio.h +2 -0
index 594e967c0673..51827d5577b6 100644
@@ -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 */
arch/arm/mach-s3c24xx/include/mach/regs-irq.h +2 -0
index 8d8e669e3903..2921b48c56b2 100644
@@ -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)
arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h +1 -0
index 682759549e63..fefef7233f4b 100644
@@ -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)
 
arch/arm/mach-s3c24xx/include/mach/s3c2412.h +2 -0
index 4ff83f956cfb..1ae369c81beb 100644
@@ -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))
 
arch/arm/mach-s3c24xx/mach-h1940.c +1 -0
index d45825898835..3cb56fc9db5c 100644
@@ -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>
arch/arm/mach-s3c24xx/mach-jive.c +1 -0
index ec6c40ea8f86..9ef8733be3fd 100644
@@ -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>
arch/arm/mach-s3c24xx/mach-rx1950.c +1 -0
index 2513ce7fa026..af6300076b0a 100644
@@ -46,6 +46,7 @@
 
 #include <sound/uda1380.h>
 
+#include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
arch/arm/mach-s3c24xx/pm-h1940.S +0 -1
index a7bbe336ac6b..f9ee515e1cbe 100644
@@ -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>
arch/arm/mach-s3c24xx/regs-mem.h +2 -0
index 2f3bc48b5890..5048ab8f06c2 100644
@@ -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)
arch/arm/mach-s3c24xx/s3c2410.c +1 -1
index 8427c150dd22..44bf3e1e77f1 100644
@@ -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>
arch/arm/mach-s3c24xx/s3c2412.c +1 -1
index 209f952a6c98..75648dcc2c1d 100644
@@ -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>
 
arch/arm/mach-s3c24xx/s3c2416.c +1 -1
index 9514196cad8c..6576187b4638 100644
@@ -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>
arch/arm/mach-s3c24xx/s3c2443.c +1 -1
index 3c05d04bbbeb..74794a55b015 100644
@@ -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>
arch/arm/mach-s3c24xx/s3c244x.c +1 -1
index f5bd489bac85..0ca188d0ffe5 100644
@@ -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>
arch/arm/mach-s3c24xx/sleep-s3c2410.S +0 -1
index 659f9eff9de2..e4f6f64e7826 100644
@@ -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>
arch/arm/mach-s3c24xx/sleep-s3c2412.S +0 -1
index c373f1ca862b..434f5082b2ed 100644
@@ -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>
arch/arm/mach-s3c24xx/sleep.S +0 -1
index f0f11ad60c52..4bda4a413584 100644
@@ -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>
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#63 lore raw

PATCH v2 39/41 ARM: s3c: move into a common directory

In reply to Krzysztof Kozlowski

From: Arnd Bergmann <[email protected]>

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.

[krzk: Rebase, add s3c24xx and s3c64xx suffix to several files, add SPDX
headers to new files, remove plat-samsung from MAINTAINERS]

---

Changes since v1:
1. Add s3c24xx and s3c64xx suffix to several files (headers and source files),
2. Add SPDX headers to newly created files,
3. Remove plat-samsung from MAINTAINERS.

---
 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 +++++-
 .../{mach-s3c24xx => mach-s3c}/Makefile.boot  |  0
 .../Makefile => mach-s3c/Makefile.s3c24xx}    | 20 ++++++------
 .../Makefile => mach-s3c/Makefile.s3c64xx}    | 32 +++++++++----------
 arch/arm/{plat-samsung => mach-s3c}/adc.c     |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/anubis.h  |  0
 .../ata-core-s3c64xx.h}                       |  6 ++--
 .../backlight-s3c64xx.h}                      |  6 ++--
 .../arm/{mach-s3c24xx => mach-s3c}/bast-ide.c |  0
 .../arm/{mach-s3c24xx => mach-s3c}/bast-irq.c |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/bast.h    |  0
 .../common-smdk-s3c24xx.c}                    |  2 +-
 .../common-smdk-s3c24xx.h}                    |  0
 arch/arm/{plat-samsung => mach-s3c}/cpu.c     |  0
 .../cpufreq-utils-s3c24xx.c}                  |  2 +-
 .../cpuidle.c => mach-s3c/cpuidle-s3c64xx.c}  |  4 +--
 .../arm/{mach-s3c64xx => mach-s3c}/crag6410.h |  0
 .../dev-audio-s3c64xx.c}                      |  0
 .../dev-backlight-s3c64xx.c}                  |  2 +-
 .../dev-uart-s3c64xx.c}                       |  0
 .../arm/{plat-samsung => mach-s3c}/dev-uart.c |  0
 arch/arm/{plat-samsung => mach-s3c}/devs.c    |  0
 .../fb-core.h => mach-s3c/fb-core-s3c24xx.h}  |  6 ++--
 .../{plat-samsung => mach-s3c}/gpio-samsung.c |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/gta02.h   |  0
 .../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          |  9 ++++++
 .../include/mach/gpio-samsung-s3c24xx.h}      |  0
 .../include/mach/gpio-samsung-s3c64xx.h}      |  0
 arch/arm/mach-s3c/include/mach/gpio-samsung.h |  9 ++++++
 .../include/mach/hardware-s3c24xx.h}          |  6 ++--
 .../include/mach/io-s3c24xx.h}                |  4 +--
 arch/arm/mach-s3c/include/mach/io.h           |  8 +++++
 .../include/mach/irqs-s3c24xx.h}              |  0
 .../include/mach/irqs-s3c64xx.h}              |  0
 arch/arm/mach-s3c/include/mach/irqs.h         |  9 ++++++
 .../include/mach/map-s3c24xx.h}               |  0
 .../include/mach/map-s3c64xx.h}               |  0
 arch/arm/mach-s3c/include/mach/map.h          |  9 ++++++
 .../include/mach/pm-core-s3c24xx.h}           |  2 +-
 .../include/mach/pm-core-s3c64xx.h}           |  0
 arch/arm/mach-s3c/include/mach/pm-core.h      |  9 ++++++
 .../include/mach/regs-clock-s3c24xx.h}        |  0
 .../include/mach/regs-clock-s3c64xx.h}        |  0
 arch/arm/mach-s3c/include/mach/regs-clock.h   |  9 ++++++
 .../include/mach/regs-gpio-s3c24xx.h}         |  0
 .../include/mach/regs-gpio-s3c64xx.h}         |  0
 arch/arm/mach-s3c/include/mach/regs-gpio.h    |  9 ++++++
 .../include/mach/regs-irq-s3c24xx.h}          |  0
 .../include/mach/regs-irq-s3c64xx.h}          |  0
 arch/arm/mach-s3c/include/mach/regs-irq.h     |  9 ++++++
 .../include/mach/regs-s3c2443-clock.h         |  0
 .../include/mach/rtc-core-s3c24xx.h}          |  6 ++--
 .../include/mach/s3c2412.h                    |  0
 .../include/plat/adc-core.h                   |  0
 .../include/plat/cpu.h                        |  0
 .../include/plat/devs.h                       |  0
 .../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
 .../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/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                        |  2 +-
 .../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
 .../irq-s3c24xx-fiq.S                         |  0
 .../{mach-s3c24xx => mach-s3c}/irq-s3c24xx.c  |  0
 .../irq-uart-s3c64xx.h}                       |  0
 .../mach-amlm5900.c                           |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-anubis.c  |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-anw6410.c |  4 +--
 .../mach-at2440evb.c                          |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-bast.c    |  2 +-
 .../mach-crag6410-module.c                    |  0
 .../mach-crag6410.c                           |  8 ++---
 .../{mach-s3c24xx => mach-s3c}/mach-gta02.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-h1940.c   |  4 +--
 .../arm/{mach-s3c64xx => mach-s3c}/mach-hmt.c |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-jive.c    |  4 +--
 .../mach-mini2440.c                           |  2 +-
 .../mach-mini6410.c                           |  6 ++--
 .../arm/{mach-s3c24xx => mach-s3c}/mach-n30.c |  4 +--
 .../arm/{mach-s3c64xx => mach-s3c}/mach-ncp.c |  2 +-
 .../mach-nexcoder.c                           |  2 +-
 .../mach-osiris-dvs.c                         |  0
 .../{mach-s3c24xx => mach-s3c}/mach-osiris.c  |  4 +--
 .../{mach-s3c24xx => mach-s3c}/mach-otom.c    |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-qt2410.c  |  4 +--
 .../mach-real6410.c                           |  6 ++--
 .../{mach-s3c24xx => mach-s3c}/mach-rx1950.c  |  4 +--
 .../{mach-s3c24xx => mach-s3c}/mach-rx3715.c  |  2 +-
 .../mach-s3c2416-dt.c                         |  2 +-
 .../mach-s3c64xx-dt.c                         |  2 +-
 .../{mach-s3c64xx => mach-s3c}/mach-smartq.c  |  4 +--
 .../{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-smdk2410.c                           |  4 +--
 .../mach-smdk2413.c                           |  6 ++--
 .../mach-smdk2416.c                           |  6 ++--
 .../mach-smdk2440.c                           |  4 +--
 .../mach-smdk2443.c                           |  4 +--
 .../mach-smdk6400.c                           |  2 +-
 .../mach-smdk6410.c                           | 10 +++---
 .../mach-tct_hammer.c                         |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-vr1000.c  |  2 +-
 .../{mach-s3c24xx => mach-s3c}/mach-vstms.c   |  2 +-
 .../nand-core-s3c24xx.h}                      |  6 ++--
 .../onenand-core-s3c64xx.h}                   |  6 ++--
 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   |  2 +-
 .../{plat-samsung => mach-s3c}/platformdata.c |  0
 .../{mach-s3c24xx => mach-s3c}/pll-s3c2410.c  |  0
 .../pll-s3c2440-12000000.c                    |  0
 .../pll-s3c2440-16934400.c                    |  0
 .../{plat-samsung => mach-s3c}/pm-common.c    |  0
 arch/arm/{plat-samsung => mach-s3c}/pm-gpio.c |  0
 .../arm/{mach-s3c24xx => mach-s3c}/pm-h1940.S |  0
 .../{mach-s3c24xx => mach-s3c}/pm-s3c2410.c   |  0
 .../{mach-s3c24xx => mach-s3c}/pm-s3c2412.c   |  2 +-
 .../{mach-s3c24xx => mach-s3c}/pm-s3c2416.c   |  0
 .../pm.c => mach-s3c/pm-s3c24xx.c}            |  2 +-
 .../pm.c => mach-s3c/pm-s3c64xx.c}            |  8 ++---
 arch/arm/{plat-samsung => mach-s3c}/pm.c      |  0
 .../regs-dsc-s3c24xx.h}                       |  6 ++--
 .../regs-gpio-memport-s3c64xx.h}              |  0
 .../regs-mem-s3c24xx.h}                       |  0
 .../regs-modem-s3c64xx.h}                     |  0
 .../regs-srom-s3c64xx.h}                      |  0
 .../regs-sys-s3c64xx.h}                       |  0
 .../regs-syscon-power-s3c64xx.h}              |  0
 .../regs-usb-hsotg-phy-s3c64xx.h}             |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2410.c |  2 +-
 .../s3c2412-power.h                           |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2412.c |  6 ++--
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c2416.c | 10 +++---
 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 | 10 +++---
 arch/arm/{mach-s3c24xx => mach-s3c}/s3c244x.c |  6 ++--
 .../common.c => mach-s3c/s3c24xx.c}           |  4 +--
 .../common.h => mach-s3c/s3c24xx.h}           |  0
 arch/arm/{mach-s3c64xx => mach-s3c}/s3c6400.c |  4 +--
 arch/arm/{mach-s3c64xx => mach-s3c}/s3c6410.c |  6 ++--
 .../common.c => mach-s3c/s3c64xx.c}           |  4 +--
 .../common.h => mach-s3c/s3c64xx.h}           |  0
 .../setup-camif-s3c24xx.c}                    |  0
 .../setup-fb-24bpp-s3c64xx.c}                 |  0
 .../setup-i2c-s3c24xx.c}                      |  0
 .../setup-i2c0-s3c64xx.c}                     |  0
 .../setup-i2c1-s3c64xx.c}                     |  0
 .../setup-ide-s3c64xx.c}                      |  0
 .../setup-keypad-s3c64xx.c}                   |  0
 .../setup-sdhci-gpio-s3c24xx.c}               |  0
 .../setup-sdhci-gpio-s3c64xx.c}               |  0
 .../setup-spi-s3c24xx.c}                      |  2 +-
 .../setup-spi-s3c64xx.c}                      |  0
 .../setup-ts-s3c24xx.c}                       |  0
 .../setup-usb-phy-s3c64xx.c}                  |  4 +--
 .../{mach-s3c24xx => mach-s3c}/simtec-audio.c |  0
 .../{mach-s3c24xx => mach-s3c}/simtec-nor.c   |  0
 .../{mach-s3c24xx => mach-s3c}/simtec-pm.c    |  2 +-
 .../{mach-s3c24xx => mach-s3c}/simtec-usb.c   |  0
 arch/arm/{mach-s3c24xx => mach-s3c}/simtec.h  |  0
 .../sleep-s3c2410.S                           |  2 +-
 .../sleep-s3c2412.S                           |  0
 .../sleep.S => mach-s3c/sleep-s3c24xx.S}      |  0
 .../sleep.S => mach-s3c/sleep-s3c64xx.S}      |  0
 .../spi-core-s3c24xx.h}                       |  6 ++--
 arch/arm/{mach-s3c24xx => mach-s3c}/vr1000.h  |  0
 .../{plat-samsung => mach-s3c}/wakeup-mask.c  |  0
 196 files changed, 264 insertions(+), 182 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 (82%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/Makefile.boot (100%)
 rename arch/arm/{mach-s3c24xx/Makefile => mach-s3c/Makefile.s3c24xx} (84%)
 rename arch/arm/{mach-s3c64xx/Makefile => mach-s3c/Makefile.s3c64xx} (58%)
 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/ata-core.h => mach-s3c/ata-core-s3c64xx.h} (78%)
 rename arch/arm/{mach-s3c64xx/backlight.h => mach-s3c/backlight-s3c64xx.h} (78%)
 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/common-smdk.c => mach-s3c/common-smdk-s3c24xx.c} (99%)
 rename arch/arm/{mach-s3c24xx/common-smdk.h => mach-s3c/common-smdk-s3c24xx.h} (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/cpu.c (100%)
 rename arch/arm/{mach-s3c24xx/cpufreq-utils.c => mach-s3c/cpufreq-utils-s3c24xx.c} (98%)
 rename arch/arm/{mach-s3c64xx/cpuidle.c => mach-s3c/cpuidle-s3c64xx.c} (94%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/crag6410.h (100%)
 rename arch/arm/{mach-s3c64xx/dev-audio.c => mach-s3c/dev-audio-s3c64xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/dev-backlight.c => mach-s3c/dev-backlight-s3c64xx.c} (99%)
 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/fb-core.h => mach-s3c/fb-core-s3c24xx.h} (78%)
 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/include/mach/hardware.h => mach-s3c/include/mach/hardware-s3c24xx.h} (65%)
 rename arch/arm/{mach-s3c24xx/include/mach/io.h => mach-s3c/include/mach/io-s3c24xx.h} (94%)
 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/{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} (98%)
 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/include/mach/rtc-core.h => mach-s3c/include/mach/rtc-core-s3c24xx.h} (81%)
 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/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 (99%)
 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/irq-uart.h => mach-s3c/irq-uart-s3c64xx.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 (98%)
 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 (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2413.c (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2416.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2440.c (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/mach-smdk2443.c (98%)
 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/nand-core.h => mach-s3c/nand-core-s3c24xx.h} (77%)
 rename arch/arm/{mach-s3c64xx/onenand-core.h => mach-s3c/onenand-core-s3c64xx.h} (82%)
 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 (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 (98%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/pm-s3c2416.c (100%)
 rename arch/arm/{mach-s3c24xx/pm.c => mach-s3c/pm-s3c24xx.c} (98%)
 rename arch/arm/{mach-s3c64xx/pm.c => mach-s3c/pm-s3c64xx.c} (98%)
 rename arch/arm/{plat-samsung => mach-s3c}/pm.c (100%)
 rename arch/arm/{mach-s3c24xx/regs-dsc.h => mach-s3c/regs-dsc-s3c24xx.h} (77%)
 rename arch/arm/{mach-s3c64xx/regs-gpio-memport.h => mach-s3c/regs-gpio-memport-s3c64xx.h} (100%)
 rename arch/arm/{mach-s3c24xx/regs-mem.h => mach-s3c/regs-mem-s3c24xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/regs-modem.h => mach-s3c/regs-modem-s3c64xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/regs-srom.h => mach-s3c/regs-srom-s3c64xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/regs-sys.h => mach-s3c/regs-sys-s3c64xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/regs-syscon-power.h => mach-s3c/regs-syscon-power-s3c64xx.h} (100%)
 rename arch/arm/{mach-s3c64xx/regs-usb-hsotg-phy.h => mach-s3c/regs-usb-hsotg-phy-s3c64xx.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 (97%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c2416.c (95%)
 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 (94%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/s3c244x.c (97%)
 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 (97%)
 rename arch/arm/{mach-s3c64xx => mach-s3c}/s3c6410.c (96%)
 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/setup-camif.c => mach-s3c/setup-camif-s3c24xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/setup-fb-24bpp.c => mach-s3c/setup-fb-24bpp-s3c64xx.c} (100%)
 rename arch/arm/{mach-s3c24xx/setup-i2c.c => mach-s3c/setup-i2c-s3c24xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/setup-i2c0.c => mach-s3c/setup-i2c0-s3c64xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/setup-i2c1.c => mach-s3c/setup-i2c1-s3c64xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/setup-ide.c => mach-s3c/setup-ide-s3c64xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/setup-keypad.c => mach-s3c/setup-keypad-s3c64xx.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} (93%)
 rename arch/arm/{mach-s3c64xx/setup-spi.c => mach-s3c/setup-spi-s3c64xx.c} (100%)
 rename arch/arm/{mach-s3c24xx/setup-ts.c => mach-s3c/setup-ts-s3c24xx.c} (100%)
 rename arch/arm/{mach-s3c64xx/setup-usb-phy.c => mach-s3c/setup-usb-phy-s3c64xx.c} (96%)
 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 (97%)
 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 (97%)
 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/spi-core.h => mach-s3c/spi-core-s3c24xx.h} (81%)
 rename arch/arm/{mach-s3c24xx => mach-s3c}/vr1000.h (100%)
 rename arch/arm/{plat-samsung => mach-s3c}/wakeup-mask.c (100%)
MAINTAINERS +7 -9
index d9accf3c2582..6c74aa41e35b 100644
@@ -2220,8 +2220,8 @@ ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT
 L:	[email protected] (subscribers-only)
 S:	Orphan
 W:	http://wiki.openmoko.org/wiki/Neo_FreeRunner
-F:	arch/arm/mach-s3c24xx/gta02.h
-F:	arch/arm/mach-s3c24xx/mach-gta02.c
+F:	arch/arm/mach-s3c/gta02.h
+F:	arch/arm/mach-s3c/mach-gta02.c
 
 ARM/Orion SoC/Technologic Systems TS-78xx platform support
 M:	Alexander Clouter <[email protected]>
@@ -2410,10 +2410,8 @@ F:	arch/arm/boot/dts/exynos*
 F:	arch/arm/boot/dts/s3c*
 F:	arch/arm/boot/dts/s5p*
 F:	arch/arm/mach-exynos*/
-F:	arch/arm/mach-s3c24*/
-F:	arch/arm/mach-s3c64xx/
+F:	arch/arm/mach-s3c/
 F:	arch/arm/mach-s5p*/
-F:	arch/arm/plat-samsung/
 F:	arch/arm64/boot/dts/exynos/
 F:	drivers/*/*/*s3c24*
 F:	drivers/*/*s3c24*
@@ -15829,9 +15827,9 @@ SIMTEC EB2410ITX (BAST)
 M:	Simtec Linux Team <[email protected]>
 S:	Supported
 W:	http://www.simtec.co.uk/products/EB2410ITX/
-F:	arch/arm/mach-s3c24xx/bast-ide.c
-F:	arch/arm/mach-s3c24xx/bast-irq.c
-F:	arch/arm/mach-s3c24xx/mach-bast.c
+F:	arch/arm/mach-s3c/bast-ide.c
+F:	arch/arm/mach-s3c/bast-irq.c
+F:	arch/arm/mach-s3c/mach-bast.c
 
 SIOX
 M:	Thorsten Scherer <[email protected]>
@@ -18750,7 +18748,7 @@ F:	Documentation/devicetree/bindings/mfd/wm831x.txt
 F:	Documentation/devicetree/bindings/regulator/wlf,arizona.yaml
 F:	Documentation/devicetree/bindings/sound/wlf,arizona.yaml
 F:	Documentation/hwmon/wm83??.rst
-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/gpio/gpio-*wm*.c
arch/arm/Kconfig +1 -4
index 063018c387be..8d784597ab0c 100644
@@ -638,7 +638,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"
 
@@ -711,9 +710,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"
 
arch/arm/Makefile +1 -4
index 3997cec8848e..d3a447a856ce 100644
@@ -209,8 +209,7 @@ machine-$(CONFIG_ARCH_REALTEK)		+= realtek
 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
@@ -233,10 +232,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)
arch/arm/mach-s3c/Kconfig renamed from arch/arm/plat-samsung/Kconfig +3 -0
similarity index 98%
rename from arch/arm/plat-samsung/Kconfig
rename to arch/arm/mach-s3c/Kconfig
index 13b39684b582..25606e668cf9 100644
@@ -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
arch/arm/mach-s3c/Kconfig.s3c24xx renamed from arch/arm/mach-s3c24xx/Kconfig +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/Kconfig
rename to arch/arm/mach-s3c/Kconfig.s3c24xx
arch/arm/mach-s3c/Kconfig.s3c64xx renamed from arch/arm/mach-s3c64xx/Kconfig +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/Kconfig
rename to arch/arm/mach-s3c/Kconfig.s3c64xx
arch/arm/mach-s3c/Makefile renamed from arch/arm/plat-samsung/Makefile +8 -1
similarity index 82%
rename from arch/arm/plat-samsung/Makefile
rename to arch/arm/mach-s3c/Makefile
index feddb42cae51..54188d10ab2e 100644
@@ -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
arch/arm/mach-s3c/Makefile.boot renamed from arch/arm/mach-s3c24xx/Makefile.boot +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/Makefile.boot
rename to arch/arm/mach-s3c/Makefile.boot
arch/arm/mach-s3c/Makefile.s3c24xx renamed from arch/arm/mach-s3c24xx/Makefile +10 -10
similarity index 84%
rename from arch/arm/mach-s3c24xx/Makefile
rename to arch/arm/mach-s3c/Makefile.s3c24xx
index 195a4cb23ecb..bbca7ef4fc74 100644
@@ -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,12 +33,12 @@ 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
 
-obj-$(CONFIG_ARM_S3C24XX_CPUFREQ) += cpufreq-utils.o
+obj-$(CONFIG_ARM_S3C24XX_CPUFREQ) += cpufreq-utils-s3c24xx.o
 
 obj-$(CONFIG_S3C2410_IOTIMING)	+= iotiming-s3c2410.o
 obj-$(CONFIG_S3C2412_IOTIMING)	+= iotiming-s3c2412.o
@@ -83,7 +83,7 @@ obj-$(CONFIG_MACH_SMDK2443)		+= mach-smdk2443.o
 
 # common bits of machine support
 
-obj-$(CONFIG_S3C24XX_SMDK)		+= common-smdk.o
+obj-$(CONFIG_S3C24XX_SMDK)		+= common-smdk-s3c24xx.o
 obj-$(CONFIG_S3C24XX_SIMTEC_AUDIO)	+= simtec-audio.o
 obj-$(CONFIG_S3C24XX_SIMTEC_NOR)	+= simtec-nor.o
 obj-$(CONFIG_S3C24XX_SIMTEC_PM)		+= simtec-pm.o
@@ -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_ARCH_S3C24XX)		+= setup-i2c.o
-obj-$(CONFIG_S3C24XX_SETUP_TS)		+= setup-ts.o
-obj-$(CONFIG_S3C_SETUP_CAMIF)		+= setup-camif.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-s3c24xx.o
+obj-$(CONFIG_S3C24XX_SETUP_TS)		+= setup-ts-s3c24xx.o
+obj-$(CONFIG_S3C_SETUP_CAMIF)		+= setup-camif-s3c24xx.o
arch/arm/mach-s3c/Makefile.s3c64xx renamed from arch/arm/mach-s3c64xx/Makefile +16 -16
similarity index 58%
rename from arch/arm/mach-s3c64xx/Makefile
rename to arch/arm/mach-s3c/Makefile.s3c64xx
index 8caeb4ad17e9..e06e5356da9b 100644
@@ -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_CPU_IDLE)		+= cpuidle.o
+obj-$(CONFIG_PM)		+= pm-s3c64xx.o
+obj-$(CONFIG_PM_SLEEP)		+= sleep-s3c64xx.o
+obj-$(CONFIG_CPU_IDLE)		+= cpuidle-s3c64xx.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,21 +28,21 @@ obj-$(CONFIG_S3C64XX_PL080)	+= pl080.o
 
 # Device support
 
-obj-y				+= dev-uart.o
-obj-y				+= dev-audio.o
+obj-y				+= dev-uart-s3c64xx.o
+obj-y				+= dev-audio-s3c64xx.o
 
 # Device setup
 
-obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP)	+= setup-fb-24bpp.o
-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_USB_PHY) += setup-usb-phy.o
+obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP)	+= setup-fb-24bpp-s3c64xx.o
+obj-$(CONFIG_S3C64XX_SETUP_I2C0)	+= setup-i2c0-s3c64xx.o
+obj-$(CONFIG_S3C64XX_SETUP_I2C1)	+= setup-i2c1-s3c64xx.o
+obj-$(CONFIG_S3C64XX_SETUP_IDE)		+= setup-ide-s3c64xx.o
+obj-$(CONFIG_S3C64XX_SETUP_KEYPAD)	+= setup-keypad-s3c64xx.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-s3c64xx.o
 
-obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT)	+= dev-backlight.o
+obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT)	+= dev-backlight-s3c64xx.o
 
 # Machine support
 
arch/arm/mach-s3c/adc.c renamed from arch/arm/plat-samsung/adc.c +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/adc.c
rename to arch/arm/mach-s3c/adc.c
arch/arm/mach-s3c/anubis.h renamed from arch/arm/mach-s3c24xx/anubis.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/anubis.h
rename to arch/arm/mach-s3c/anubis.h
arch/arm/mach-s3c/ata-core-s3c64xx.h renamed from arch/arm/mach-s3c64xx/ata-core.h +3 -3
similarity index 78%
rename from arch/arm/mach-s3c64xx/ata-core.h
rename to arch/arm/mach-s3c/ata-core-s3c64xx.h
index 6d9a81f759e6..4863ad9d3a42 100644
@@ -6,8 +6,8 @@
  * Samsung CF-ATA Controller core functions
  */
 
-#ifndef __ASM_PLAT_ATA_CORE_H
-#define __ASM_PLAT_ATA_CORE_H __FILE__
+#ifndef __ASM_PLAT_ATA_CORE_S3C64XX_H
+#define __ASM_PLAT_ATA_CORE_S3C64XX_H __FILE__
 
 /* These functions are only for use with the core support code, such as
  * the cpu specific initialisation code
@@ -21,4 +21,4 @@ static inline void s3c_cfcon_setname(char *name)
 #endif
 }
 
-#endif /* __ASM_PLAT_ATA_CORE_H */
+#endif /* __ASM_PLAT_ATA_CORE_S3C64XX_H */
arch/arm/mach-s3c/backlight-s3c64xx.h renamed from arch/arm/mach-s3c64xx/backlight.h +3 -3
similarity index 78%
rename from arch/arm/mach-s3c64xx/backlight.h
rename to arch/arm/mach-s3c/backlight-s3c64xx.h
index 028663f1cacc..2a2b35821d58 100644
@@ -4,8 +4,8 @@
  *              http://www.samsung.com
  */
 
-#ifndef __ASM_PLAT_BACKLIGHT_H
-#define __ASM_PLAT_BACKLIGHT_H __FILE__
+#ifndef __ASM_PLAT_BACKLIGHT_S3C64XX_H
+#define __ASM_PLAT_BACKLIGHT_S3C64XX_H __FILE__
 
 /* samsung_bl_gpio_info - GPIO info for PWM Backlight control
  * @no:		GPIO number for PWM timer out
@@ -19,4 +19,4 @@ struct samsung_bl_gpio_info {
 extern void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
 	struct platform_pwm_backlight_data *bl_data);
 
-#endif /* __ASM_PLAT_BACKLIGHT_H */
+#endif /* __ASM_PLAT_BACKLIGHT_S3C64XX_H */
arch/arm/mach-s3c/bast-ide.c renamed from arch/arm/mach-s3c24xx/bast-ide.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/bast-ide.c
rename to arch/arm/mach-s3c/bast-ide.c
arch/arm/mach-s3c/bast-irq.c renamed from arch/arm/mach-s3c24xx/bast-irq.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/bast-irq.c
rename to arch/arm/mach-s3c/bast-irq.c
arch/arm/mach-s3c/bast.h renamed from arch/arm/mach-s3c24xx/bast.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/bast.h
rename to arch/arm/mach-s3c/bast.h
arch/arm/mach-s3c/common-smdk-s3c24xx.c renamed from arch/arm/mach-s3c24xx/common-smdk.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/common-smdk.c
rename to arch/arm/mach-s3c/common-smdk-s3c24xx.c
index c0c176651f96..e3281dc3af13 100644
@@ -40,7 +40,7 @@
 #include <plat/devs.h>
 #include <plat/pm.h>
 
-#include "common-smdk.h"
+#include "common-smdk-s3c24xx.h"
 
 /* LED devices */
 
arch/arm/mach-s3c/common-smdk-s3c24xx.h renamed from arch/arm/mach-s3c24xx/common-smdk.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/common-smdk.h
rename to arch/arm/mach-s3c/common-smdk-s3c24xx.h
arch/arm/mach-s3c/cpu.c renamed from arch/arm/plat-samsung/cpu.c +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/cpu.c
rename to arch/arm/mach-s3c/cpu.c
arch/arm/mach-s3c/cpufreq-utils-s3c24xx.c renamed from arch/arm/mach-s3c24xx/cpufreq-utils.c +1 -1
similarity index 98%
rename from arch/arm/mach-s3c24xx/cpufreq-utils.c
rename to arch/arm/mach-s3c/cpufreq-utils-s3c24xx.c
index 3bc374dd0b2d..17b70d635236 100644
@@ -17,7 +17,7 @@
 
 #include <linux/soc/samsung/s3c-cpufreq-core.h>
 
-#include "regs-mem.h"
+#include "regs-mem-s3c24xx.h"
 
 /**
  * s3c2410_cpufreq_setrefresh - set SDRAM refresh value
arch/arm/mach-s3c/cpuidle-s3c64xx.c renamed from arch/arm/mach-s3c64xx/cpuidle.c +2 -2
similarity index 94%
rename from arch/arm/mach-s3c64xx/cpuidle.c
rename to arch/arm/mach-s3c/cpuidle-s3c64xx.c
index 0bac6f6413b0..a629f4d2fa3b 100644
@@ -16,8 +16,8 @@
 #include <plat/cpu.h>
 #include <mach/map.h>
 
-#include "regs-sys.h"
-#include "regs-syscon-power.h"
+#include "regs-sys-s3c64xx.h"
+#include "regs-syscon-power-s3c64xx.h"
 
 static int s3c64xx_enter_idle(struct cpuidle_device *dev,
 			      struct cpuidle_driver *drv,
arch/arm/mach-s3c/crag6410.h renamed from arch/arm/mach-s3c64xx/crag6410.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/crag6410.h
rename to arch/arm/mach-s3c/crag6410.h
arch/arm/mach-s3c/dev-audio-s3c64xx.c renamed from arch/arm/mach-s3c64xx/dev-audio.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/dev-audio.c
rename to arch/arm/mach-s3c/dev-audio-s3c64xx.c
arch/arm/mach-s3c/dev-backlight-s3c64xx.c renamed from arch/arm/mach-s3c64xx/dev-backlight.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c64xx/dev-backlight.c
rename to arch/arm/mach-s3c/dev-backlight-s3c64xx.c
index 09e6da305f60..53bf14f5467f 100644
@@ -14,7 +14,7 @@
 #include <plat/devs.h>
 #include <plat/gpio-cfg.h>
 
-#include "backlight.h"
+#include "backlight-s3c64xx.h"
 
 struct samsung_bl_drvdata {
 	struct platform_pwm_backlight_data plat_data;
arch/arm/mach-s3c/dev-uart-s3c64xx.c renamed from arch/arm/mach-s3c64xx/dev-uart.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/dev-uart.c
rename to arch/arm/mach-s3c/dev-uart-s3c64xx.c
arch/arm/mach-s3c/dev-uart.c renamed from arch/arm/plat-samsung/dev-uart.c +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/dev-uart.c
rename to arch/arm/mach-s3c/dev-uart.c
arch/arm/mach-s3c/devs.c renamed from arch/arm/plat-samsung/devs.c +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/devs.c
rename to arch/arm/mach-s3c/devs.c
arch/arm/mach-s3c/fb-core-s3c24xx.h renamed from arch/arm/mach-s3c24xx/fb-core.h +3 -3
similarity index 78%
rename from arch/arm/mach-s3c24xx/fb-core.h
rename to arch/arm/mach-s3c/fb-core-s3c24xx.h
index 1821e820262c..0e07f3ba4aef 100644
@@ -5,8 +5,8 @@
  *
  * Samsung framebuffer driver core functions
  */
-#ifndef __ASM_PLAT_FB_CORE_H
-#define __ASM_PLAT_FB_CORE_H __FILE__
+#ifndef __ASM_PLAT_FB_CORE_S3C24XX_H
+#define __ASM_PLAT_FB_CORE_S3C24XX_H __FILE__
 
 /*
  * These functions are only for use with the core support code, such as
@@ -21,4 +21,4 @@ static inline void s3c_fb_setname(char *name)
 #endif
 }
 
-#endif /* __ASM_PLAT_FB_CORE_H */
+#endif /* __ASM_PLAT_FB_CORE_S3C24XX_H */
arch/arm/mach-s3c/gpio-samsung.c renamed from arch/arm/plat-samsung/gpio-samsung.c +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/gpio-samsung.c
rename to arch/arm/mach-s3c/gpio-samsung.c
arch/arm/mach-s3c/gta02.h renamed from arch/arm/mach-s3c24xx/gta02.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/gta02.h
rename to arch/arm/mach-s3c/gta02.h
arch/arm/mach-s3c/h1940-bluetooth.c renamed from arch/arm/mach-s3c24xx/h1940-bluetooth.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/h1940-bluetooth.c
rename to arch/arm/mach-s3c/h1940-bluetooth.c
arch/arm/mach-s3c/h1940.h renamed from arch/arm/mach-s3c24xx/h1940.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/h1940.h
rename to arch/arm/mach-s3c/h1940.h
arch/arm/mach-s3c/include/mach/dma-s3c24xx.h renamed from arch/arm/mach-s3c24xx/include/mach/dma.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/dma.h
rename to arch/arm/mach-s3c/include/mach/dma-s3c24xx.h
arch/arm/mach-s3c/include/mach/dma-s3c64xx.h renamed from arch/arm/mach-s3c64xx/include/mach/dma.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/dma.h
rename to arch/arm/mach-s3c/include/mach/dma-s3c64xx.h
arch/arm/mach-s3c/include/mach/dma.h new file +9 -0
new file mode 100644
index 000000000000..59a4578c5f00
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifdef CONFIG_ARCH_S3C24XX
+#include "dma-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "dma-s3c64xx.h"
+#endif
arch/arm/mach-s3c/include/mach/gpio-samsung-s3c24xx.h renamed from arch/arm/mach-s3c24xx/include/mach/gpio-samsung.h +0 -0
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
arch/arm/mach-s3c/include/mach/gpio-samsung-s3c64xx.h renamed from arch/arm/mach-s3c64xx/include/mach/gpio-samsung.h +0 -0
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
arch/arm/mach-s3c/include/mach/gpio-samsung.h new file +9 -0
new file mode 100644
index 000000000000..02f6f4a96862
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifdef CONFIG_ARCH_S3C24XX
+#include "gpio-samsung-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "gpio-samsung-s3c64xx.h"
+#endif
arch/arm/mach-s3c/include/mach/hardware-s3c24xx.h renamed from arch/arm/mach-s3c24xx/include/mach/hardware.h +3 -3
similarity index 65%
rename from arch/arm/mach-s3c24xx/include/mach/hardware.h
rename to arch/arm/mach-s3c/include/mach/hardware-s3c24xx.h
index c732ea54984c..33b37467d05f 100644
@@ -6,9 +6,9 @@
  * S3C2410 - hardware
  */
 
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
+#ifndef __ASM_ARCH_HARDWARE_S3C24XX_H
+#define __ASM_ARCH_HARDWARE_S3C24XX_H
 
 extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg);
 
-#endif /* __ASM_ARCH_HARDWARE_H */
+#endif /* __ASM_ARCH_HARDWARE_S3C24XX_H */
arch/arm/mach-s3c/include/mach/io-s3c24xx.h renamed from arch/arm/mach-s3c24xx/include/mach/io.h +2 -2
similarity index 94%
rename from arch/arm/mach-s3c24xx/include/mach/io.h
rename to arch/arm/mach-s3c/include/mach/io-s3c24xx.h
index bcddf615adb6..9b78b0a3d486 100644
@@ -7,8 +7,8 @@
  *	     (C) 2003 Simtec Electronics
 */
 
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
+#ifndef __ASM_ARM_ARCH_IO_S3C24XX_H
+#define __ASM_ARM_ARCH_IO_S3C24XX_H
 
 #include <plat/map-base.h>
 
arch/arm/mach-s3c/include/mach/io.h new file +8 -0
new file mode 100644
index 000000000000..30a0135708dc
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2020 Krzysztof Kozlowski <[email protected]>
+ */
+
+#ifdef CONFIG_ARCH_S3C24XX
+#include "io-s3c24xx.h"
+#endif
arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h renamed from arch/arm/mach-s3c24xx/include/mach/irqs.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/irqs.h
rename to arch/arm/mach-s3c/include/mach/irqs-s3c24xx.h
arch/arm/mach-s3c/include/mach/irqs-s3c64xx.h renamed from arch/arm/mach-s3c64xx/include/mach/irqs.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/irqs.h
rename to arch/arm/mach-s3c/include/mach/irqs-s3c64xx.h
arch/arm/mach-s3c/include/mach/irqs.h new file +9 -0
new file mode 100644
index 000000000000..0bff1c1c8eb0
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifdef CONFIG_ARCH_S3C24XX
+#include "irqs-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "irqs-s3c64xx.h"
+#endif
arch/arm/mach-s3c/include/mach/map-s3c24xx.h renamed from arch/arm/mach-s3c24xx/include/mach/map.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/map.h
rename to arch/arm/mach-s3c/include/mach/map-s3c24xx.h
arch/arm/mach-s3c/include/mach/map-s3c64xx.h renamed from arch/arm/mach-s3c64xx/include/mach/map.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/include/mach/map.h
rename to arch/arm/mach-s3c/include/mach/map-s3c64xx.h
arch/arm/mach-s3c/include/mach/map.h new file +9 -0
new file mode 100644
index 000000000000..7cfb517d4886
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifdef CONFIG_ARCH_S3C24XX
+#include "map-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "map-s3c64xx.h"
+#endif
arch/arm/mach-s3c/include/mach/pm-core-s3c24xx.h renamed from arch/arm/mach-s3c24xx/include/mach/pm-core.h +1 -1
similarity index 98%
rename from arch/arm/mach-s3c24xx/include/mach/pm-core.h
rename to arch/arm/mach-s3c/include/mach/pm-core-s3c24xx.h
index a22b4a37ee57..bcb7978a4e85 100644
@@ -11,7 +11,7 @@
 #include <linux/io.h>
 
 #include "regs-clock.h"
-#include "regs-irq.h"
+#include "regs-irq-s3c24xx.h"
 #include <mach/irqs.h>
 
 static inline void s3c_pm_debug_init_uart(void)
arch/arm/mach-s3c/include/mach/pm-core-s3c64xx.h renamed from arch/arm/mach-s3c64xx/include/mach/pm-core.h +0 -0
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
arch/arm/mach-s3c/include/mach/pm-core.h new file +9 -0
new file mode 100644
index 000000000000..b0e1d277f599
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifdef CONFIG_ARCH_S3C24XX
+#include "pm-core-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "pm-core-s3c64xx.h"
+#endif
arch/arm/mach-s3c/include/mach/regs-clock-s3c24xx.h renamed from arch/arm/mach-s3c24xx/include/mach/regs-clock.h +0 -0
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
arch/arm/mach-s3c/include/mach/regs-clock-s3c64xx.h renamed from arch/arm/mach-s3c64xx/include/mach/regs-clock.h +0 -0
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
arch/arm/mach-s3c/include/mach/regs-clock.h new file +9 -0
new file mode 100644
index 000000000000..7df31f203d28
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifdef CONFIG_ARCH_S3C24XX
+#include "regs-clock-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "regs-clock-s3c64xx.h"
+#endif
arch/arm/mach-s3c/include/mach/regs-gpio-s3c24xx.h renamed from arch/arm/mach-s3c24xx/include/mach/regs-gpio.h +0 -0
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
arch/arm/mach-s3c/include/mach/regs-gpio-s3c64xx.h renamed from arch/arm/mach-s3c64xx/include/mach/regs-gpio.h +0 -0
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
arch/arm/mach-s3c/include/mach/regs-gpio.h new file +9 -0
new file mode 100644
index 000000000000..0d41cb76d440
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifdef CONFIG_ARCH_S3C24XX
+#include "regs-gpio-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "regs-gpio-s3c64xx.h"
+#endif
arch/arm/mach-s3c/include/mach/regs-irq-s3c24xx.h renamed from arch/arm/mach-s3c24xx/include/mach/regs-irq.h +0 -0
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
arch/arm/mach-s3c/include/mach/regs-irq-s3c64xx.h renamed from arch/arm/mach-s3c64xx/include/mach/regs-irq.h +0 -0
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
arch/arm/mach-s3c/include/mach/regs-irq.h new file +9 -0
new file mode 100644
index 000000000000..57f0dda8dbf5
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifdef CONFIG_ARCH_S3C24XX
+#include "regs-irq-s3c24xx.h"
+#endif
+
+#ifdef CONFIG_ARCH_S3C64XX
+#include "regs-irq-s3c64xx.h"
+#endif
arch/arm/mach-s3c/include/mach/regs-s3c2443-clock.h renamed from arch/arm/mach-s3c24xx/include/mach/regs-s3c2443-clock.h +0 -0
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
arch/arm/mach-s3c/include/mach/rtc-core-s3c24xx.h renamed from arch/arm/mach-s3c24xx/include/mach/rtc-core.h +3 -3
similarity index 81%
rename from arch/arm/mach-s3c24xx/include/mach/rtc-core.h
rename to arch/arm/mach-s3c/include/mach/rtc-core-s3c24xx.h
index 88510333b96b..e7258b2423fc 100644
@@ -5,8 +5,8 @@
  * Samsung RTC Controller core functions
  */
 
-#ifndef __RTC_CORE_H
-#define __RTC_CORE_H __FILE__
+#ifndef __RTC_CORE_S3C24XX_H
+#define __RTC_CORE_S3C24XX_H __FILE__
 
 /* These functions are only for use with the core support code, such as
  * the cpu specific initialisation code
@@ -20,4 +20,4 @@ static inline void s3c_rtc_setname(char *name)
 	s3c_device_rtc.name = name;
 }
 
-#endif /* __RTC_CORE_H */
+#endif /* __RTC_CORE_S3C24XX_H */
arch/arm/mach-s3c/include/mach/s3c2412.h renamed from arch/arm/mach-s3c24xx/include/mach/s3c2412.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/include/mach/s3c2412.h
rename to arch/arm/mach-s3c/include/mach/s3c2412.h
arch/arm/mach-s3c/include/plat/adc-core.h renamed from arch/arm/plat-samsung/include/plat/adc-core.h +0 -0
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
arch/arm/mach-s3c/include/plat/cpu.h renamed from arch/arm/plat-samsung/include/plat/cpu.h +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/cpu.h
rename to arch/arm/mach-s3c/include/plat/cpu.h
arch/arm/mach-s3c/include/plat/devs.h renamed from arch/arm/plat-samsung/include/plat/devs.h +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/devs.h
rename to arch/arm/mach-s3c/include/plat/devs.h
arch/arm/mach-s3c/include/plat/fb.h renamed from arch/arm/plat-samsung/include/plat/fb.h +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/fb.h
rename to arch/arm/mach-s3c/include/plat/fb.h
arch/arm/mach-s3c/include/plat/gpio-cfg-helpers.h renamed from arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +0 -0
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
arch/arm/mach-s3c/include/plat/gpio-cfg.h renamed from arch/arm/plat-samsung/include/plat/gpio-cfg.h +0 -0
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
arch/arm/mach-s3c/include/plat/gpio-core.h renamed from arch/arm/plat-samsung/include/plat/gpio-core.h +0 -0
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
arch/arm/mach-s3c/include/plat/iic-core.h renamed from arch/arm/plat-samsung/include/plat/iic-core.h +0 -0
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
arch/arm/mach-s3c/include/plat/keypad.h renamed from arch/arm/plat-samsung/include/plat/keypad.h +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/keypad.h
rename to arch/arm/mach-s3c/include/plat/keypad.h
arch/arm/mach-s3c/include/plat/map-base.h renamed from arch/arm/plat-samsung/include/plat/map-base.h +0 -0
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
arch/arm/mach-s3c/include/plat/map-s3c.h renamed from arch/arm/plat-samsung/include/plat/map-s3c.h +0 -0
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
arch/arm/mach-s3c/include/plat/map-s5p.h renamed from arch/arm/plat-samsung/include/plat/map-s5p.h +0 -0
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
arch/arm/mach-s3c/include/plat/pm-common.h renamed from arch/arm/plat-samsung/include/plat/pm-common.h +0 -0
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
arch/arm/mach-s3c/include/plat/pm.h renamed from arch/arm/plat-samsung/include/plat/pm.h +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/pm.h
rename to arch/arm/mach-s3c/include/plat/pm.h
arch/arm/mach-s3c/include/plat/pwm-core.h renamed from arch/arm/plat-samsung/include/plat/pwm-core.h +0 -0
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
arch/arm/mach-s3c/include/plat/regs-adc.h renamed from arch/arm/plat-samsung/include/plat/regs-adc.h +0 -0
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
arch/arm/mach-s3c/include/plat/regs-irqtype.h renamed from arch/arm/plat-samsung/include/plat/regs-irqtype.h +0 -0
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
arch/arm/mach-s3c/include/plat/sdhci.h renamed from arch/arm/plat-samsung/include/plat/sdhci.h +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/include/plat/sdhci.h
rename to arch/arm/mach-s3c/include/plat/sdhci.h
arch/arm/mach-s3c/include/plat/usb-phy.h renamed from arch/arm/plat-samsung/include/plat/usb-phy.h +0 -0
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
arch/arm/mach-s3c/include/plat/wakeup-mask.h renamed from arch/arm/plat-samsung/include/plat/wakeup-mask.h +0 -0
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
arch/arm/mach-s3c/init.c renamed from arch/arm/plat-samsung/init.c +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/init.c
rename to arch/arm/mach-s3c/init.c
arch/arm/mach-s3c/iotiming-s3c2410.c renamed from arch/arm/mach-s3c24xx/iotiming-s3c2410.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/iotiming-s3c2410.c
rename to arch/arm/mach-s3c/iotiming-s3c2410.c
index 5d85c259f328..d91f26efd07a 100644
@@ -19,7 +19,7 @@
 
 #include <linux/soc/samsung/s3c-cpufreq-core.h>
 
-#include "regs-mem.h"
+#include "regs-mem-s3c24xx.h"
 
 #define print_ns(x) ((x) / 10), ((x) % 10)
 
arch/arm/mach-s3c/iotiming-s3c2412.c renamed from arch/arm/mach-s3c24xx/iotiming-s3c2412.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/iotiming-s3c2412.c
rename to arch/arm/mach-s3c/iotiming-s3c2412.c
arch/arm/mach-s3c/irq-pm-s3c24xx.c renamed from arch/arm/mach-s3c24xx/irq-pm.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/irq-pm.c
rename to arch/arm/mach-s3c/irq-pm-s3c24xx.c
arch/arm/mach-s3c/irq-pm-s3c64xx.c renamed from arch/arm/mach-s3c64xx/irq-pm.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/irq-pm.c
rename to arch/arm/mach-s3c/irq-pm-s3c64xx.c
arch/arm/mach-s3c/irq-s3c24xx-fiq-exports.c renamed from arch/arm/mach-s3c24xx/irq-s3c24xx-fiq-exports.c +0 -0
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
arch/arm/mach-s3c/irq-s3c24xx-fiq.S renamed from arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/irq-s3c24xx-fiq.S
rename to arch/arm/mach-s3c/irq-s3c24xx-fiq.S
arch/arm/mach-s3c/irq-s3c24xx.c renamed from arch/arm/mach-s3c24xx/irq-s3c24xx.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/irq-s3c24xx.c
rename to arch/arm/mach-s3c/irq-s3c24xx.c
arch/arm/mach-s3c/irq-uart-s3c64xx.h renamed from arch/arm/mach-s3c64xx/irq-uart.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/irq-uart.h
rename to arch/arm/mach-s3c/irq-uart-s3c64xx.h
arch/arm/mach-s3c/mach-amlm5900.c renamed from arch/arm/mach-s3c24xx/mach-amlm5900.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-amlm5900.c
rename to arch/arm/mach-s3c/mach-amlm5900.c
index f04eb9aa29ac..724240e1b662 100644
@@ -44,7 +44,7 @@
 #include <linux/mtd/map.h>
 #include <linux/mtd/physmap.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct resource amlm5900_nor_resource =
 			DEFINE_RES_MEM(0x00000000, SZ_16M);
arch/arm/mach-s3c/mach-anubis.c renamed from arch/arm/mach-s3c24xx/mach-anubis.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-anubis.c
rename to arch/arm/mach-s3c/mach-anubis.c
index 15cab0976941..83b2f7fb268e 100644
@@ -44,7 +44,7 @@
 #include <linux/platform_data/asoc-s3c24xx_simtec.h>
 
 #include "anubis.h"
-#include "common.h"
+#include "s3c24xx.h"
 #include "simtec.h"
 
 #define COPYRIGHT ", Copyright 2005-2009 Simtec Electronics"
arch/arm/mach-s3c/mach-anw6410.c renamed from arch/arm/mach-s3c64xx/mach-anw6410.c +2 -2
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-anw6410.c
rename to arch/arm/mach-s3c/mach-anw6410.c
index bb248b12e308..ff183ced8e6e 100644
@@ -44,8 +44,8 @@
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
-#include "common.h"
-#include "regs-modem.h"
+#include "s3c64xx.h"
+#include "regs-modem-s3c64xx.h"
 
 /* DM9000 */
 #define ANW6410_PA_DM9000	(0x18000000)
arch/arm/mach-s3c/mach-at2440evb.c renamed from arch/arm/mach-s3c24xx/mach-at2440evb.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-at2440evb.c
rename to arch/arm/mach-s3c/mach-at2440evb.c
index 7fcb24a49ad8..1ae61ae913d4 100644
@@ -42,7 +42,7 @@
 #include <plat/cpu.h>
 #include <linux/platform_data/mmc-s3cmci.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct map_desc at2440evb_iodesc[] __initdata = {
 	/* Nothing here */
arch/arm/mach-s3c/mach-bast.c renamed from arch/arm/mach-s3c24xx/mach-bast.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-bast.c
rename to arch/arm/mach-s3c/mach-bast.c
index 7e3ce48539c4..f971cbf99d29 100644
@@ -50,7 +50,7 @@
 #include <plat/gpio-cfg.h>
 
 #include "bast.h"
-#include "common.h"
+#include "s3c24xx.h"
 #include "simtec.h"
 
 #define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics"
arch/arm/mach-s3c/mach-crag6410-module.c renamed from arch/arm/mach-s3c64xx/mach-crag6410-module.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/mach-crag6410-module.c
rename to arch/arm/mach-s3c/mach-crag6410-module.c
arch/arm/mach-s3c/mach-crag6410.c renamed from arch/arm/mach-s3c64xx/mach-crag6410.c +4 -4
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-crag6410.c
rename to arch/arm/mach-s3c/mach-crag6410.c
index ca9a346056ed..8e7f637833f2 100644
@@ -61,11 +61,11 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <plat/pm.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "crag6410.h"
-#include "regs-gpio-memport.h"
-#include "regs-modem.h"
-#include "regs-sys.h"
+#include "regs-gpio-memport-s3c64xx.h"
+#include "regs-modem-s3c64xx.h"
+#include "regs-sys-s3c64xx.h"
 
 /* serial port setup */
 
arch/arm/mach-s3c/mach-gta02.c renamed from arch/arm/mach-s3c24xx/mach-gta02.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-gta02.c
rename to arch/arm/mach-s3c/mach-gta02.c
index a28e92142b04..b4fb58632555 100644
@@ -68,7 +68,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/pm.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "gta02.h"
 
 static struct pcf50633 *gta02_pcf;
arch/arm/mach-s3c/mach-h1940.c renamed from arch/arm/mach-s3c24xx/mach-h1940.c +2 -2
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-h1940.c
rename to arch/arm/mach-s3c/mach-h1940.c
index 3cb56fc9db5c..c8e4c4d6a979 100644
@@ -49,7 +49,7 @@
 
 #include <linux/platform_data/fb-s3c2410.h>
 #include <mach/map.h>
-#include <mach/hardware.h>
+#include <mach/hardware-s3c24xx.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
@@ -59,7 +59,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/pm.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "h1940.h"
 
 #define H1940_LATCH		((void __force __iomem *)0xF8000000)
arch/arm/mach-s3c/mach-hmt.c renamed from arch/arm/mach-s3c64xx/mach-hmt.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-hmt.c
rename to arch/arm/mach-s3c/mach-hmt.c
index 32b555a4757b..e0d8cc30a0f0 100644
@@ -39,7 +39,7 @@
 #include <plat/devs.h>
 #include <plat/cpu.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 
 #define UCON S3C2410_UCON_DEFAULT
 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE)
arch/arm/mach-s3c/mach-jive.c renamed from arch/arm/mach-s3c24xx/mach-jive.c +2 -2
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-jive.c
rename to arch/arm/mach-s3c/mach-jive.c
index 9ef8733be3fd..2e7119d34179 100644
@@ -31,7 +31,7 @@
 #include <linux/platform_data/mtd-nand-s3c2410.h>
 #include <linux/platform_data/i2c-s3c2410.h>
 
-#include <mach/hardware.h>
+#include <mach/hardware-s3c24xx.h>
 #include <mach/regs-gpio.h>
 #include <linux/platform_data/fb-s3c2410.h>
 #include <mach/gpio-samsung.h>
@@ -49,7 +49,7 @@
 #include <plat/pm.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "s3c2412-power.h"
 
 static struct map_desc jive_iodesc[] __initdata = {
arch/arm/mach-s3c/mach-mini2440.c renamed from arch/arm/mach-s3c24xx/mach-mini2440.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-mini2440.c
rename to arch/arm/mach-s3c/mach-mini2440.c
index 6f58a3404b36..83de1ba22cda 100644
@@ -53,7 +53,7 @@
 
 #include <sound/s3c24xx_uda134x.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 #define MACH_MINI2440_DM9K_BASE (S3C2410_CS4 + 0x300)
 
arch/arm/mach-s3c/mach-mini6410.c renamed from arch/arm/mach-s3c64xx/mach-mini6410.c +3 -3
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-mini6410.c
rename to arch/arm/mach-s3c/mach-mini6410.c
index cbf6a1696a6d..9bd6581619b9 100644
@@ -40,9 +40,9 @@
 #include <video/platform_lcd.h>
 #include <video/samsung_fimd.h>
 
-#include "common.h"
-#include "regs-modem.h"
-#include "regs-srom.h"
+#include "s3c64xx.h"
+#include "regs-modem-s3c64xx.h"
+#include "regs-srom-s3c64xx.h"
 
 #define UCON S3C2410_UCON_DEFAULT
 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
arch/arm/mach-s3c/mach-n30.c renamed from arch/arm/mach-s3c24xx/mach-n30.c +2 -2
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-n30.c
rename to arch/arm/mach-s3c/mach-n30.c
index a3c1315f5ffb..d79bd9b8e25e 100644
@@ -27,7 +27,7 @@
 #include <linux/io.h>
 #include <linux/mmc/host.h>
 
-#include <mach/hardware.h>
+#include <mach/hardware-s3c24xx.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
@@ -49,7 +49,7 @@
 #include <linux/platform_data/mmc-s3cmci.h>
 #include <linux/platform_data/usb-s3c2410_udc.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct map_desc n30_iodesc[] __initdata = {
 	/* nothing here yet */
arch/arm/mach-s3c/mach-ncp.c renamed from arch/arm/mach-s3c64xx/mach-ncp.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-ncp.c
rename to arch/arm/mach-s3c/mach-ncp.c
index f0a26dd27938..ed4dd67add97 100644
@@ -36,7 +36,7 @@
 #include <plat/devs.h>
 #include <plat/cpu.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 
 #define UCON S3C2410_UCON_DEFAULT
 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE
arch/arm/mach-s3c/mach-nexcoder.c renamed from arch/arm/mach-s3c24xx/mach-nexcoder.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-nexcoder.c
rename to arch/arm/mach-s3c/mach-nexcoder.c
index ec23b115261e..84610a91e732 100644
@@ -40,7 +40,7 @@
 #include <plat/devs.h>
 #include <plat/cpu.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct map_desc nexcoder_iodesc[] __initdata = {
 	/* nothing here yet */
arch/arm/mach-s3c/mach-osiris-dvs.c renamed from arch/arm/mach-s3c24xx/mach-osiris-dvs.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/mach-osiris-dvs.c
rename to arch/arm/mach-s3c/mach-osiris-dvs.c
arch/arm/mach-s3c/mach-osiris.c renamed from arch/arm/mach-s3c24xx/mach-osiris.c +2 -2
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-osiris.c
rename to arch/arm/mach-s3c/mach-osiris.c
index 258850c1bbb2..90cf7d8cb07d 100644
@@ -44,9 +44,9 @@
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "osiris.h"
-#include "regs-mem.h"
+#include "regs-mem-s3c24xx.h"
 
 /* onboard perihperal map */
 
arch/arm/mach-s3c/mach-otom.c renamed from arch/arm/mach-s3c24xx/mach-otom.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-otom.c
rename to arch/arm/mach-s3c/mach-otom.c
index 1f777ab4ced7..32482f052ac7 100644
@@ -29,7 +29,7 @@
 #include <plat/cpu.h>
 #include <plat/devs.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "otom.h"
 
 static struct map_desc otom11_iodesc[] __initdata = {
arch/arm/mach-s3c/mach-qt2410.c renamed from arch/arm/mach-s3c24xx/mach-qt2410.c +2 -2
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-qt2410.c
rename to arch/arm/mach-s3c/mach-qt2410.c
index 1ccad4e9e437..ea7af23b0ac7 100644
@@ -43,8 +43,8 @@
 #include <plat/cpu.h>
 #include <plat/pm.h>
 
-#include "common.h"
-#include "common-smdk.h"
+#include "s3c24xx.h"
+#include "common-smdk-s3c24xx.h"
 
 static struct map_desc qt2410_iodesc[] __initdata = {
 	{ 0xe0000000, __phys_to_pfn(S3C2410_CS3+0x01000000), SZ_1M, MT_DEVICE }
arch/arm/mach-s3c/mach-real6410.c renamed from arch/arm/mach-s3c64xx/mach-real6410.c +3 -3
similarity index 98%
rename from arch/arm/mach-s3c64xx/mach-real6410.c
rename to arch/arm/mach-s3c/mach-real6410.c
index e2aa7c0998bd..099a99e5b6d2 100644
@@ -39,9 +39,9 @@
 #include <video/platform_lcd.h>
 #include <video/samsung_fimd.h>
 
-#include "common.h"
-#include "regs-modem.h"
-#include "regs-srom.h"
+#include "s3c64xx.h"
+#include "regs-modem-s3c64xx.h"
+#include "regs-srom-s3c64xx.h"
 
 #define UCON S3C2410_UCON_DEFAULT
 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
arch/arm/mach-s3c/mach-rx1950.c renamed from arch/arm/mach-s3c24xx/mach-rx1950.c +2 -2
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-rx1950.c
rename to arch/arm/mach-s3c/mach-rx1950.c
index af6300076b0a..13614b372109 100644
@@ -46,7 +46,7 @@
 
 #include <sound/uda1380.h>
 
-#include <mach/hardware.h>
+#include <mach/hardware-s3c24xx.h>
 #include <mach/regs-gpio.h>
 #include <mach/gpio-samsung.h>
 
@@ -55,7 +55,7 @@
 #include <plat/pm.h>
 #include <plat/gpio-cfg.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "h1940.h"
 
 #define LCD_PWM_PERIOD 192960
arch/arm/mach-s3c/mach-rx3715.c renamed from arch/arm/mach-s3c24xx/mach-rx3715.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-rx3715.c
rename to arch/arm/mach-s3c/mach-rx3715.c
index 0eb45f13f0c4..1c0730176799 100644
@@ -43,7 +43,7 @@
 #include <plat/devs.h>
 #include <plat/pm.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 #include "h1940.h"
 
 static struct map_desc rx3715_iodesc[] __initdata = {
arch/arm/mach-s3c/mach-s3c2416-dt.c renamed from arch/arm/mach-s3c24xx/mach-s3c2416-dt.c +1 -1
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
@@ -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)
 {
arch/arm/mach-s3c/mach-s3c64xx-dt.c renamed from arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c +1 -1
similarity index 98%
rename from arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
rename to arch/arm/mach-s3c/mach-s3c64xx-dt.c
index 09c4e8742629..cd1da9602c86 100644
@@ -11,7 +11,7 @@
 #include <plat/cpu.h>
 #include <mach/map.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 
 /*
  * IO mapping for shared system controller IP.
arch/arm/mach-s3c/mach-smartq.c renamed from arch/arm/mach-s3c64xx/mach-smartq.c +2 -2
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smartq.c
rename to arch/arm/mach-s3c/mach-smartq.c
index 37d878909b17..3a9ca85d09c5 100644
@@ -33,9 +33,9 @@
 
 #include <video/platform_lcd.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "mach-smartq.h"
-#include "regs-modem.h"
+#include "regs-modem-s3c64xx.h"
 
 #define UCON S3C2410_UCON_DEFAULT
 #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE)
arch/arm/mach-s3c/mach-smartq.h renamed from arch/arm/mach-s3c64xx/mach-smartq.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/mach-smartq.h
rename to arch/arm/mach-s3c/mach-smartq.h
arch/arm/mach-s3c/mach-smartq5.c renamed from arch/arm/mach-s3c64xx/mach-smartq5.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smartq5.c
rename to arch/arm/mach-s3c/mach-smartq5.c
index 789876a20534..f67cc50cb5b9 100644
@@ -24,7 +24,7 @@
 #include <plat/fb.h>
 #include <plat/gpio-cfg.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "mach-smartq.h"
 
 static struct gpio_led smartq5_leds[] = {
arch/arm/mach-s3c/mach-smartq7.c renamed from arch/arm/mach-s3c64xx/mach-smartq7.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smartq7.c
rename to arch/arm/mach-s3c/mach-smartq7.c
index d004e34b63bb..af58147c6721 100644
@@ -24,7 +24,7 @@
 #include <plat/fb.h>
 #include <plat/gpio-cfg.h>
 
-#include "common.h"
+#include "s3c64xx.h"
 #include "mach-smartq.h"
 
 static struct gpio_led smartq7_leds[] = {
arch/arm/mach-s3c/mach-smdk2410.c renamed from arch/arm/mach-s3c24xx/mach-smdk2410.c +2 -2
similarity index 97%
rename from arch/arm/mach-s3c24xx/mach-smdk2410.c
rename to arch/arm/mach-s3c/mach-smdk2410.c
index c78fe1d8802c..411216c46522 100644
@@ -34,8 +34,8 @@
 #include <plat/devs.h>
 #include <plat/cpu.h>
 
-#include "common.h"
-#include "common-smdk.h"
+#include "s3c24xx.h"
+#include "common-smdk-s3c24xx.h"
 
 static struct map_desc smdk2410_iodesc[] __initdata = {
   /* nothing here yet */
arch/arm/mach-s3c/mach-smdk2413.c renamed from arch/arm/mach-s3c24xx/mach-smdk2413.c +3 -3
similarity index 97%
rename from arch/arm/mach-s3c24xx/mach-smdk2413.c
rename to arch/arm/mach-s3c/mach-smdk2413.c
index 4604ec89f06e..2ebf78cf0f3f 100644
@@ -23,7 +23,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <mach/hardware.h>
+#include <mach/hardware-s3c24xx.h>
 #include <asm/hardware/iomd.h>
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -41,8 +41,8 @@
 #include <plat/devs.h>
 #include <plat/cpu.h>
 
-#include "common.h"
-#include "common-smdk.h"
+#include "s3c24xx.h"
+#include "common-smdk-s3c24xx.h"
 
 static struct map_desc smdk2413_iodesc[] __initdata = {
 };
arch/arm/mach-s3c/mach-smdk2416.c renamed from arch/arm/mach-s3c24xx/mach-smdk2416.c +3 -3
similarity index 98%
rename from arch/arm/mach-s3c24xx/mach-smdk2416.c
rename to arch/arm/mach-s3c/mach-smdk2416.c
index 217401b2238d..3bf3322740fc 100644
@@ -25,7 +25,7 @@
 #include <asm/mach/irq.h>
 
 #include <video/samsung_fimd.h>
-#include <mach/hardware.h>
+#include <mach/hardware-s3c24xx.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
@@ -46,8 +46,8 @@
 
 #include <plat/fb.h>
 
-#include "common.h"
-#include "common-smdk.h"
+#include "s3c24xx.h"
+#include "common-smdk-s3c24xx.h"
 
 static struct map_desc smdk2416_iodesc[] __initdata = {
 	/* ISA IO Space map (memory space selected by A24) */
arch/arm/mach-s3c/mach-smdk2440.c renamed from arch/arm/mach-s3c24xx/mach-smdk2440.c +2 -2
similarity index 98%
rename from arch/arm/mach-s3c24xx/mach-smdk2440.c
rename to arch/arm/mach-s3c/mach-smdk2440.c
index a0116cff6e4e..cc40316bc294 100644
@@ -36,8 +36,8 @@
 #include <plat/devs.h>
 #include <plat/cpu.h>
 
-#include "common.h"
-#include "common-smdk.h"
+#include "s3c24xx.h"
+#include "common-smdk-s3c24xx.h"
 
 static struct map_desc smdk2440_iodesc[] __initdata = {
 	/* ISA IO Space map (memory space selected by A24) */
arch/arm/mach-s3c/mach-smdk2443.c renamed from arch/arm/mach-s3c24xx/mach-smdk2443.c +2 -2
similarity index 98%
rename from arch/arm/mach-s3c24xx/mach-smdk2443.c
rename to arch/arm/mach-s3c/mach-smdk2443.c
index 1c2fa7c3feb8..85a3f73fd0a1 100644
@@ -33,8 +33,8 @@
 #include <plat/devs.h>
 #include <plat/cpu.h>
 
-#include "common.h"
-#include "common-smdk.h"
+#include "s3c24xx.h"
+#include "common-smdk-s3c24xx.h"
 
 static struct map_desc smdk2443_iodesc[] __initdata = {
 	/* ISA IO Space map (memory space selected by A24) */
arch/arm/mach-s3c/mach-smdk6400.c renamed from arch/arm/mach-s3c64xx/mach-smdk6400.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smdk6400.c
rename to arch/arm/mach-s3c/mach-smdk6400.c
index ca033450ab8c..18ee5e203ca0 100644
@@ -30,7 +30,7 @@
 #include <linux/platform_data/i2c-s3c2410.h>
 #include <mach/gpio-samsung.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
arch/arm/mach-s3c/mach-smdk6410.c renamed from arch/arm/mach-s3c64xx/mach-smdk6410.c +5 -5
similarity index 99%
rename from arch/arm/mach-s3c64xx/mach-smdk6410.c
rename to arch/arm/mach-s3c/mach-smdk6410.c
index febeacc476c8..371a605daa30 100644
@@ -64,11 +64,11 @@
 #include <linux/platform_data/touchscreen-s3c2410.h>
 #include <plat/keypad.h>
 
-#include "backlight.h"
-#include "common.h"
-#include "regs-modem.h"
-#include "regs-srom.h"
-#include "regs-sys.h"
+#include "backlight-s3c64xx.h"
+#include "s3c64xx.h"
+#include "regs-modem-s3c64xx.h"
+#include "regs-srom-s3c64xx.h"
+#include "regs-sys-s3c64xx.h"
 
 #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
arch/arm/mach-s3c/mach-tct_hammer.c renamed from arch/arm/mach-s3c24xx/mach-tct_hammer.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-tct_hammer.c
rename to arch/arm/mach-s3c/mach-tct_hammer.c
index 8092be7b47db..53a550b915e0 100644
@@ -37,7 +37,7 @@
 #include <linux/mtd/map.h>
 #include <linux/mtd/physmap.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct resource tct_hammer_nor_resource =
 			DEFINE_RES_MEM(0x00000000, SZ_16M);
arch/arm/mach-s3c/mach-vr1000.c renamed from arch/arm/mach-s3c24xx/mach-vr1000.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-vr1000.c
rename to arch/arm/mach-s3c/mach-vr1000.c
index 638e53ec1e4f..b63ece0def04 100644
@@ -43,7 +43,7 @@
 #include <plat/gpio-cfg.h>
 
 #include "bast.h"
-#include "common.h"
+#include "s3c24xx.h"
 #include "simtec.h"
 #include "vr1000.h"
 
arch/arm/mach-s3c/mach-vstms.c renamed from arch/arm/mach-s3c24xx/mach-vstms.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/mach-vstms.c
rename to arch/arm/mach-s3c/mach-vstms.c
index ff3fa0017494..0bd289705a01 100644
@@ -40,7 +40,7 @@
 #include <plat/devs.h>
 #include <plat/cpu.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct map_desc vstms_iodesc[] __initdata = {
 };
arch/arm/mach-s3c/nand-core-s3c24xx.h renamed from arch/arm/mach-s3c24xx/nand-core.h +3 -3
similarity index 77%
rename from arch/arm/mach-s3c24xx/nand-core.h
rename to arch/arm/mach-s3c/nand-core-s3c24xx.h
index 8de633d416ae..a14316729c48 100644
@@ -6,8 +6,8 @@
  * S3C -  Nand Controller core functions
  */
 
-#ifndef __ASM_ARCH_NAND_CORE_H
-#define __ASM_ARCH_NAND_CORE_H __FILE__
+#ifndef __ASM_ARCH_NAND_CORE_S3C24XX_H
+#define __ASM_ARCH_NAND_CORE_S3C24XX_H __FILE__
 
 /* These functions are only for use with the core support code, such as
  * the cpu specific initialisation code
@@ -21,4 +21,4 @@ static inline void s3c_nand_setname(char *name)
 #endif
 }
 
-#endif /* __ASM_ARCH_NAND_CORE_H */
+#endif /* __ASM_ARCH_NAND_CORE_S3C24XX_H */
arch/arm/mach-s3c/onenand-core-s3c64xx.h renamed from arch/arm/mach-s3c64xx/onenand-core.h +3 -3
similarity index 82%
rename from arch/arm/mach-s3c64xx/onenand-core.h
rename to arch/arm/mach-s3c/onenand-core-s3c64xx.h
index 0cf6b5e76b24..e2dfdd1fec93 100644
@@ -7,8 +7,8 @@
  * Samsung OneNAD Controller core functions
  */
 
-#ifndef __ASM_ARCH_ONENAND_CORE_H
-#define __ASM_ARCH_ONENAND_CORE_H __FILE__
+#ifndef __ASM_ARCH_ONENAND_CORE_S3C64XX_H
+#define __ASM_ARCH_ONENAND_CORE_S3C64XX_H __FILE__
 
 /* These functions are only for use with the core support code, such as
  * the cpu specific initialisation code
@@ -29,4 +29,4 @@ static inline void s3c64xx_onenand1_setname(char *name)
 #endif
 }
 
-#endif /* __ASM_ARCH_ONENAND_CORE_H */
+#endif /* __ASM_ARCH_ONENAND_CORE_S3C64XX_H */
arch/arm/mach-s3c/osiris.h renamed from arch/arm/mach-s3c24xx/osiris.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/osiris.h
rename to arch/arm/mach-s3c/osiris.h
arch/arm/mach-s3c/otom.h renamed from arch/arm/mach-s3c24xx/otom.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/otom.h
rename to arch/arm/mach-s3c/otom.h
arch/arm/mach-s3c/pl080.c renamed from arch/arm/mach-s3c64xx/pl080.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c64xx/pl080.c
rename to arch/arm/mach-s3c/pl080.c
index 152edbeea0c7..3cbc755f7cd0 100644
@@ -14,7 +14,7 @@
 #include <mach/irqs.h>
 #include <mach/map.h>
 
-#include "regs-sys.h"
+#include "regs-sys-s3c64xx.h"
 
 static int pl08x_get_xfer_signal(const struct pl08x_channel_data *cd)
 {
arch/arm/mach-s3c/platformdata.c renamed from arch/arm/plat-samsung/platformdata.c +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/platformdata.c
rename to arch/arm/mach-s3c/platformdata.c
arch/arm/mach-s3c/pll-s3c2410.c renamed from arch/arm/mach-s3c24xx/pll-s3c2410.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/pll-s3c2410.c
rename to arch/arm/mach-s3c/pll-s3c2410.c
arch/arm/mach-s3c/pll-s3c2440-12000000.c renamed from arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
rename to arch/arm/mach-s3c/pll-s3c2440-12000000.c
arch/arm/mach-s3c/pll-s3c2440-16934400.c renamed from arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
rename to arch/arm/mach-s3c/pll-s3c2440-16934400.c
arch/arm/mach-s3c/pm-common.c renamed from arch/arm/plat-samsung/pm-common.c +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/pm-common.c
rename to arch/arm/mach-s3c/pm-common.c
arch/arm/mach-s3c/pm-gpio.c renamed from arch/arm/plat-samsung/pm-gpio.c +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/pm-gpio.c
rename to arch/arm/mach-s3c/pm-gpio.c
arch/arm/mach-s3c/pm-h1940.S renamed from arch/arm/mach-s3c24xx/pm-h1940.S +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/pm-h1940.S
rename to arch/arm/mach-s3c/pm-h1940.S
arch/arm/mach-s3c/pm-s3c2410.c renamed from arch/arm/mach-s3c24xx/pm-s3c2410.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/pm-s3c2410.c
rename to arch/arm/mach-s3c/pm-s3c2410.c
arch/arm/mach-s3c/pm-s3c2412.c renamed from arch/arm/mach-s3c24xx/pm-s3c2412.c +1 -1
similarity index 98%
rename from arch/arm/mach-s3c24xx/pm-s3c2412.c
rename to arch/arm/mach-s3c/pm-s3c2412.c
index 2779d67d2c07..1caf53b65dc1 100644
@@ -26,7 +26,7 @@
 #include <plat/pm.h>
 #include <plat/wakeup-mask.h>
 
-#include "regs-dsc.h"
+#include "regs-dsc-s3c24xx.h"
 #include "s3c2412-power.h"
 
 extern void s3c2412_sleep_enter(void);
arch/arm/mach-s3c/pm-s3c2416.c renamed from arch/arm/mach-s3c24xx/pm-s3c2416.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/pm-s3c2416.c
rename to arch/arm/mach-s3c/pm-s3c2416.c
arch/arm/mach-s3c/pm-s3c24xx.c renamed from arch/arm/mach-s3c24xx/pm.c +1 -1
similarity index 98%
rename from arch/arm/mach-s3c24xx/pm.c
rename to arch/arm/mach-s3c/pm-s3c24xx.c
index c64988c609ad..0c583cbe41b2 100644
@@ -31,7 +31,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/pm.h>
 
-#include "regs-mem.h"
+#include "regs-mem-s3c24xx.h"
 
 #define PFX "s3c24xx-pm: "
 
arch/arm/mach-s3c/pm-s3c64xx.c renamed from arch/arm/mach-s3c64xx/pm.c +4 -4
similarity index 98%
rename from arch/arm/mach-s3c64xx/pm.c
rename to arch/arm/mach-s3c/pm-s3c64xx.c
index a612e9779057..03393664a797 100644
@@ -26,10 +26,10 @@
 #include <mach/regs-clock.h>
 #include <mach/gpio-samsung.h>
 
-#include "regs-gpio-memport.h"
-#include "regs-modem.h"
-#include "regs-sys.h"
-#include "regs-syscon-power.h"
+#include "regs-gpio-memport-s3c64xx.h"
+#include "regs-modem-s3c64xx.h"
+#include "regs-sys-s3c64xx.h"
+#include "regs-syscon-power-s3c64xx.h"
 
 struct s3c64xx_pm_domain {
 	char *const name;
arch/arm/mach-s3c/pm.c renamed from arch/arm/plat-samsung/pm.c +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/pm.c
rename to arch/arm/mach-s3c/pm.c
arch/arm/mach-s3c/regs-dsc-s3c24xx.h renamed from arch/arm/mach-s3c24xx/regs-dsc.h +3 -3
similarity index 77%
rename from arch/arm/mach-s3c24xx/regs-dsc.h
rename to arch/arm/mach-s3c/regs-dsc-s3c24xx.h
index b500636276f2..8b8b572aef04 100644
@@ -7,8 +7,8 @@
  */
 
 
-#ifndef __ASM_ARCH_REGS_DSC_H
-#define __ASM_ARCH_REGS_DSC_H __FILE__
+#ifndef __ASM_ARCH_REGS_DSC_S3C24XX_H
+#define __ASM_ARCH_REGS_DSC_S3C24XX_H __FILE__
 
 /* S3C2412 */
 #define S3C2412_DSC0	   S3C2410_GPIOREG(0xdc)
@@ -18,5 +18,5 @@
 #define S3C2440_DSC0	   S3C2410_GPIOREG(0xc4)
 #define S3C2440_DSC1	   S3C2410_GPIOREG(0xc8)
 
-#endif	/* __ASM_ARCH_REGS_DSC_H */
+#endif	/* __ASM_ARCH_REGS_DSC_S3C24XX_H */
 
arch/arm/mach-s3c/regs-gpio-memport-s3c64xx.h renamed from arch/arm/mach-s3c64xx/regs-gpio-memport.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-gpio-memport.h
rename to arch/arm/mach-s3c/regs-gpio-memport-s3c64xx.h
arch/arm/mach-s3c/regs-mem-s3c24xx.h renamed from arch/arm/mach-s3c24xx/regs-mem.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/regs-mem.h
rename to arch/arm/mach-s3c/regs-mem-s3c24xx.h
arch/arm/mach-s3c/regs-modem-s3c64xx.h renamed from arch/arm/mach-s3c64xx/regs-modem.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-modem.h
rename to arch/arm/mach-s3c/regs-modem-s3c64xx.h
arch/arm/mach-s3c/regs-srom-s3c64xx.h renamed from arch/arm/mach-s3c64xx/regs-srom.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-srom.h
rename to arch/arm/mach-s3c/regs-srom-s3c64xx.h
arch/arm/mach-s3c/regs-sys-s3c64xx.h renamed from arch/arm/mach-s3c64xx/regs-sys.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-sys.h
rename to arch/arm/mach-s3c/regs-sys-s3c64xx.h
arch/arm/mach-s3c/regs-syscon-power-s3c64xx.h renamed from arch/arm/mach-s3c64xx/regs-syscon-power.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-syscon-power.h
rename to arch/arm/mach-s3c/regs-syscon-power-s3c64xx.h
arch/arm/mach-s3c/regs-usb-hsotg-phy-s3c64xx.h renamed from arch/arm/mach-s3c64xx/regs-usb-hsotg-phy.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/regs-usb-hsotg-phy.h
rename to arch/arm/mach-s3c/regs-usb-hsotg-phy-s3c64xx.h
arch/arm/mach-s3c/s3c2410.c renamed from arch/arm/mach-s3c24xx/s3c2410.c +1 -1
similarity index 99%
rename from arch/arm/mach-s3c24xx/s3c2410.c
rename to arch/arm/mach-s3c/s3c2410.c
index 44bf3e1e77f1..0013125b03ee 100644
@@ -41,7 +41,7 @@
 #include <plat/gpio-cfg.h>
 #include <plat/gpio-cfg-helpers.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 /* Initial IO mappings */
 
arch/arm/mach-s3c/s3c2412-power.h renamed from arch/arm/mach-s3c24xx/s3c2412-power.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/s3c2412-power.h
rename to arch/arm/mach-s3c/s3c2412-power.h
arch/arm/mach-s3c/s3c2412.c renamed from arch/arm/mach-s3c24xx/s3c2412.c +3 -3
similarity index 97%
rename from arch/arm/mach-s3c24xx/s3c2412.c
rename to arch/arm/mach-s3c/s3c2412.c
index 75648dcc2c1d..5fbea5b4276d 100644
@@ -37,9 +37,9 @@
 #include <plat/devs.h>
 #include <plat/pm.h>
 
-#include "common.h"
-#include "nand-core.h"
-#include "regs-dsc.h"
+#include "s3c24xx.h"
+#include "nand-core-s3c24xx.h"
+#include "regs-dsc-s3c24xx.h"
 #include "s3c2412-power.h"
 
 #ifndef CONFIG_CPU_S3C2412_ONLY
arch/arm/mach-s3c/s3c2416.c renamed from arch/arm/mach-s3c24xx/s3c2416.c +5 -5
similarity index 95%
rename from arch/arm/mach-s3c24xx/s3c2416.c
rename to arch/arm/mach-s3c/s3c2416.c
index 6576187b4638..f24476c16e4a 100644
@@ -33,7 +33,7 @@
 #include <asm/system_misc.h>
 
 #include <mach/regs-s3c2443-clock.h>
-#include <mach/rtc-core.h>
+#include <mach/rtc-core-s3c24xx.h>
 
 #include <plat/gpio-core.h>
 #include <plat/gpio-cfg.h>
@@ -46,10 +46,10 @@
 #include <plat/iic-core.h>
 #include <plat/adc-core.h>
 
-#include "common.h"
-#include "fb-core.h"
-#include "nand-core.h"
-#include "spi-core.h"
+#include "s3c24xx.h"
+#include "fb-core-s3c24xx.h"
+#include "nand-core-s3c24xx.h"
+#include "spi-core-s3c24xx.h"
 
 static struct map_desc s3c2416_iodesc[] __initdata = {
 	IODESC_ENT(WATCHDOG),
arch/arm/mach-s3c/s3c2440.c renamed from arch/arm/mach-s3c24xx/s3c2440.c +1 -1
similarity index 98%
rename from arch/arm/mach-s3c24xx/s3c2440.c
rename to arch/arm/mach-s3c/s3c2440.c
index bbe1f9cf5cf0..234b08e57046 100644
@@ -34,7 +34,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,
arch/arm/mach-s3c/s3c2442.c renamed from arch/arm/mach-s3c24xx/s3c2442.c +1 -1
similarity index 98%
rename from arch/arm/mach-s3c24xx/s3c2442.c
rename to arch/arm/mach-s3c/s3c2442.c
index 5b8751506d02..29d82315339d 100644
@@ -34,7 +34,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,
arch/arm/mach-s3c/s3c2443.c renamed from arch/arm/mach-s3c24xx/s3c2443.c +5 -5
similarity index 94%
rename from arch/arm/mach-s3c24xx/s3c2443.c
rename to arch/arm/mach-s3c/s3c2443.c
index 74794a55b015..d070e738eafb 100644
@@ -30,7 +30,7 @@
 #include <asm/system_misc.h>
 
 #include <mach/regs-s3c2443-clock.h>
-#include <mach/rtc-core.h>
+#include <mach/rtc-core-s3c24xx.h>
 
 #include <plat/gpio-core.h>
 #include <plat/gpio-cfg.h>
@@ -39,10 +39,10 @@
 #include <plat/cpu.h>
 #include <plat/adc-core.h>
 
-#include "common.h"
-#include "fb-core.h"
-#include "nand-core.h"
-#include "spi-core.h"
+#include "s3c24xx.h"
+#include "fb-core-s3c24xx.h"
+#include "nand-core-s3c24xx.h"
+#include "spi-core-s3c24xx.h"
 
 static struct map_desc s3c2443_iodesc[] __initdata = {
 	IODESC_ENT(WATCHDOG),
arch/arm/mach-s3c/s3c244x.c renamed from arch/arm/mach-s3c24xx/s3c244x.c +3 -3
similarity index 97%
rename from arch/arm/mach-s3c24xx/s3c244x.c
rename to arch/arm/mach-s3c/s3c244x.c
index 0ca188d0ffe5..9d8464178412 100644
@@ -35,9 +35,9 @@
 #include <plat/cpu.h>
 #include <plat/pm.h>
 
-#include "common.h"
-#include "nand-core.h"
-#include "regs-dsc.h"
+#include "s3c24xx.h"
+#include "nand-core-s3c24xx.h"
+#include "regs-dsc-s3c24xx.h"
 
 static struct map_desc s3c244x_iodesc[] __initdata = {
 	IODESC_ENT(CLKPWR),
arch/arm/mach-s3c/s3c24xx.c renamed from arch/arm/mach-s3c24xx/common.c +2 -2
similarity index 99%
rename from arch/arm/mach-s3c24xx/common.c
rename to arch/arm/mach-s3c/s3c24xx.c
index 30b0dcd20f17..d854cf9d290b 100644
@@ -22,7 +22,7 @@
 #include <linux/dmaengine.h>
 #include <linux/clk/samsung.h>
 
-#include <mach/hardware.h>
+#include <mach/hardware-s3c24xx.h>
 #include <mach/map.h>
 #include <mach/regs-clock.h>
 #include <asm/irq.h>
@@ -40,7 +40,7 @@
 #include <plat/devs.h>
 #include <plat/pwm-core.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 /* table of supported CPUs */
 
arch/arm/mach-s3c/s3c24xx.h renamed from arch/arm/mach-s3c24xx/common.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/common.h
rename to arch/arm/mach-s3c/s3c24xx.h
arch/arm/mach-s3c/s3c6400.c renamed from arch/arm/mach-s3c64xx/s3c6400.c +2 -2
similarity index 97%
rename from arch/arm/mach-s3c64xx/s3c6400.c
rename to arch/arm/mach-s3c/s3c6400.c
index d18af724c807..86be7eeef6e1 100644
@@ -35,8 +35,8 @@
 #include <plat/sdhci.h>
 #include <plat/iic-core.h>
 
-#include "common.h"
-#include "onenand-core.h"
+#include "s3c64xx.h"
+#include "onenand-core-s3c64xx.h"
 
 void __init s3c6400_map_io(void)
 {
arch/arm/mach-s3c/s3c6410.c renamed from arch/arm/mach-s3c64xx/s3c6410.c +3 -3
similarity index 96%
rename from arch/arm/mach-s3c64xx/s3c6410.c
rename to arch/arm/mach-s3c/s3c6410.c
index b1d725e55cd2..0f253d423581 100644
@@ -38,9 +38,9 @@
 #include <plat/adc-core.h>
 #include <plat/iic-core.h>
 
-#include "ata-core.h"
-#include "common.h"
-#include "onenand-core.h"
+#include "ata-core-s3c64xx.h"
+#include "s3c64xx.h"
+#include "onenand-core-s3c64xx.h"
 
 void __init s3c6410_map_io(void)
 {
arch/arm/mach-s3c/s3c64xx.c renamed from arch/arm/mach-s3c64xx/common.c +2 -2
similarity index 99%
rename from arch/arm/mach-s3c64xx/common.c
rename to arch/arm/mach-s3c/s3c64xx.c
index efda4bfb7948..fcb096298113 100644
@@ -47,8 +47,8 @@
 #include <plat/pwm-core.h>
 #include <plat/regs-irqtype.h>
 
-#include "common.h"
-#include "irq-uart.h"
+#include "s3c64xx.h"
+#include "irq-uart-s3c64xx.h"
 
 /* External clock frequency */
 static unsigned long xtal_f __ro_after_init = 12000000;
arch/arm/mach-s3c/s3c64xx.h renamed from arch/arm/mach-s3c64xx/common.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/common.h
rename to arch/arm/mach-s3c/s3c64xx.h
arch/arm/mach-s3c/setup-camif-s3c24xx.c renamed from arch/arm/mach-s3c24xx/setup-camif.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-camif.c
rename to arch/arm/mach-s3c/setup-camif-s3c24xx.c
arch/arm/mach-s3c/setup-fb-24bpp-s3c64xx.c renamed from arch/arm/mach-s3c64xx/setup-fb-24bpp.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-fb-24bpp.c
rename to arch/arm/mach-s3c/setup-fb-24bpp-s3c64xx.c
arch/arm/mach-s3c/setup-i2c-s3c24xx.c renamed from arch/arm/mach-s3c24xx/setup-i2c.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-i2c.c
rename to arch/arm/mach-s3c/setup-i2c-s3c24xx.c
arch/arm/mach-s3c/setup-i2c0-s3c64xx.c renamed from arch/arm/mach-s3c64xx/setup-i2c0.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-i2c0.c
rename to arch/arm/mach-s3c/setup-i2c0-s3c64xx.c
arch/arm/mach-s3c/setup-i2c1-s3c64xx.c renamed from arch/arm/mach-s3c64xx/setup-i2c1.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-i2c1.c
rename to arch/arm/mach-s3c/setup-i2c1-s3c64xx.c
arch/arm/mach-s3c/setup-ide-s3c64xx.c renamed from arch/arm/mach-s3c64xx/setup-ide.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-ide.c
rename to arch/arm/mach-s3c/setup-ide-s3c64xx.c
arch/arm/mach-s3c/setup-keypad-s3c64xx.c renamed from arch/arm/mach-s3c64xx/setup-keypad.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-keypad.c
rename to arch/arm/mach-s3c/setup-keypad-s3c64xx.c
arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c renamed from arch/arm/mach-s3c24xx/setup-sdhci-gpio.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-sdhci-gpio.c
rename to arch/arm/mach-s3c/setup-sdhci-gpio-s3c24xx.c
arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c renamed from arch/arm/mach-s3c64xx/setup-sdhci-gpio.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
rename to arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c
arch/arm/mach-s3c/setup-spi-s3c24xx.c renamed from arch/arm/mach-s3c24xx/setup-spi.c +1 -1
similarity index 93%
rename from arch/arm/mach-s3c24xx/setup-spi.c
rename to arch/arm/mach-s3c/setup-spi-s3c24xx.c
index 6c2b96a82da5..c8b897cbc7ce 100644
@@ -10,7 +10,7 @@
 
 #include <plat/gpio-cfg.h>
 
-#include <mach/hardware.h>
+#include <mach/hardware-s3c24xx.h>
 #include <mach/regs-gpio.h>
 
 #ifdef CONFIG_S3C64XX_DEV_SPI0
arch/arm/mach-s3c/setup-spi-s3c64xx.c renamed from arch/arm/mach-s3c64xx/setup-spi.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/setup-spi.c
rename to arch/arm/mach-s3c/setup-spi-s3c64xx.c
arch/arm/mach-s3c/setup-ts-s3c24xx.c renamed from arch/arm/mach-s3c24xx/setup-ts.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/setup-ts.c
rename to arch/arm/mach-s3c/setup-ts-s3c24xx.c
arch/arm/mach-s3c/setup-usb-phy-s3c64xx.c renamed from arch/arm/mach-s3c64xx/setup-usb-phy.c +2 -2
similarity index 96%
rename from arch/arm/mach-s3c64xx/setup-usb-phy.c
rename to arch/arm/mach-s3c/setup-usb-phy-s3c64xx.c
index d6b0e3b268af..3a0e589bd8a1 100644
@@ -12,8 +12,8 @@
 #include <plat/cpu.h>
 #include <plat/usb-phy.h>
 
-#include "regs-sys.h"
-#include "regs-usb-hsotg-phy.h"
+#include "regs-sys-s3c64xx.h"
+#include "regs-usb-hsotg-phy-s3c64xx.h"
 
 enum samsung_usb_phy_type {
 	USB_PHY_TYPE_DEVICE,
arch/arm/mach-s3c/simtec-audio.c renamed from arch/arm/mach-s3c24xx/simtec-audio.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec-audio.c
rename to arch/arm/mach-s3c/simtec-audio.c
arch/arm/mach-s3c/simtec-nor.c renamed from arch/arm/mach-s3c24xx/simtec-nor.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec-nor.c
rename to arch/arm/mach-s3c/simtec-nor.c
arch/arm/mach-s3c/simtec-pm.c renamed from arch/arm/mach-s3c24xx/simtec-pm.c +1 -1
similarity index 97%
rename from arch/arm/mach-s3c24xx/simtec-pm.c
rename to arch/arm/mach-s3c/simtec-pm.c
index bc939dfce488..4d8248763eb6 100644
@@ -26,7 +26,7 @@
 
 #include <plat/pm.h>
 
-#include "regs-mem.h"
+#include "regs-mem-s3c24xx.h"
 
 #define COPYRIGHT ", Copyright 2005 Simtec Electronics"
 
arch/arm/mach-s3c/simtec-usb.c renamed from arch/arm/mach-s3c24xx/simtec-usb.c +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec-usb.c
rename to arch/arm/mach-s3c/simtec-usb.c
arch/arm/mach-s3c/simtec.h renamed from arch/arm/mach-s3c24xx/simtec.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/simtec.h
rename to arch/arm/mach-s3c/simtec.h
arch/arm/mach-s3c/sleep-s3c2410.S renamed from arch/arm/mach-s3c24xx/sleep-s3c2410.S +1 -1
similarity index 97%
rename from arch/arm/mach-s3c24xx/sleep-s3c2410.S
rename to arch/arm/mach-s3c/sleep-s3c2410.S
index e4f6f64e7826..0340297596e9 100644
@@ -18,7 +18,7 @@
 #include <mach/regs-gpio.h>
 #include <mach/regs-clock.h>
 
-#include "regs-mem.h"
+#include "regs-mem-s3c24xx.h"
 
 	/* s3c2410_cpu_suspend
 	 *
arch/arm/mach-s3c/sleep-s3c2412.S renamed from arch/arm/mach-s3c24xx/sleep-s3c2412.S +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/sleep-s3c2412.S
rename to arch/arm/mach-s3c/sleep-s3c2412.S
arch/arm/mach-s3c/sleep-s3c24xx.S renamed from arch/arm/mach-s3c24xx/sleep.S +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/sleep.S
rename to arch/arm/mach-s3c/sleep-s3c24xx.S
arch/arm/mach-s3c/sleep-s3c64xx.S renamed from arch/arm/mach-s3c64xx/sleep.S +0 -0
similarity index 100%
rename from arch/arm/mach-s3c64xx/sleep.S
rename to arch/arm/mach-s3c/sleep-s3c64xx.S
arch/arm/mach-s3c/spi-core-s3c24xx.h renamed from arch/arm/mach-s3c24xx/spi-core.h +3 -3
similarity index 81%
rename from arch/arm/mach-s3c24xx/spi-core.h
rename to arch/arm/mach-s3c/spi-core-s3c24xx.h
index 1048fac629a2..057667469cc3 100644
@@ -3,8 +3,8 @@
  * Copyright (C) 2012 Heiko Stuebner <[email protected]>
  */
 
-#ifndef __PLAT_S3C_SPI_CORE_H
-#define __PLAT_S3C_SPI_CORE_H
+#ifndef __PLAT_S3C_SPI_CORE_S3C24XX_H
+#define __PLAT_S3C_SPI_CORE_S3C24XX_H
 
 /* These functions are only for use with the core support code, such as
  * the cpu specific initialisation code
@@ -24,4 +24,4 @@ static inline void s3c24xx_spi_setname(char *name)
 #endif
 }
 
-#endif /* __PLAT_S3C_SPI_CORE_H */
+#endif /* __PLAT_S3C_SPI_CORE_S3C24XX_H */
arch/arm/mach-s3c/vr1000.h renamed from arch/arm/mach-s3c24xx/vr1000.h +0 -0
similarity index 100%
rename from arch/arm/mach-s3c24xx/vr1000.h
rename to arch/arm/mach-s3c/vr1000.h
arch/arm/mach-s3c/wakeup-mask.c renamed from arch/arm/plat-samsung/wakeup-mask.c +0 -0
similarity index 100%
rename from arch/arm/plat-samsung/wakeup-mask.c
rename to arch/arm/mach-s3c/wakeup-mask.c
Signature · 1 line
2.17.1