ARM: restart: SAMSUNG: use new restart hook
Subsystems (4)
cover ARM: restart: SAMSUNG: use new restart hook
This patch introduces common.[ch] in each SAMSUNG mach- directories and implements using new restart hook for Samsung stuff.
This is against on rmk/devel-stable branch.
[PATCH 01/12] ARM: S3C64XX: introduce arch/arm/mach-s3c64xx/common.[ch] [PATCH 02/12] ARM: restart: S3C64XX: use new restart hook [PATCH 03/12] ARM: S5P64X0: introduce arch/arm/mach-s5p64x0/common.[ch] [PATCH 04/12] ARM: restart: S5P64X0: use new restart hook [PATCH 05/12] ARM: S5PC100: introduce arch/arm/mach-s5pc100/common.[ch] [PATCH 06/12] ARM: restart: S5PC100: use new restart hook [PATCH 07/12] ARM: S5PV210: introduce arch/arm/mach-s5pv210/common.[ch] [PATCH 08/12] ARM: restart: S5PV210: use new restart hook [PATCH 09/12] ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch] [PATCH 10/12] ARM: restart: EXYNOS: use new restart hook [PATCH 11/12] ARM: restart: S3C24XX: move SWRST based S3C platforms [PATCH 12/12] ARM: restart: S3C24XX: use new restart hook
---
The following changes since commit 3bdc3484e8f2b1b219ad0397d81ce4601fbaf76d:
ARM: kexec: use soft_restart for branching to the reboot buffer (2011-12-12 16:07:36 +0000)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git next/rmk-restart
Heiko Stuebner (1):
ARM: restart: S3C24XX: move SWRST based S3C platforms to machine_desc hook
Kukjin Kim (9):
ARM: S3C64XX: introduce arch/arm/mach-s3c64xx/common.[ch]
ARM: restart: S3C64XX: use new restart hook
ARM: S5P64X0: introduce arch/arm/mach-s5p64x0/common.[ch]
ARM: restart: S5P64X0: use new restart hook
ARM: S5PC100: introduce arch/arm/mach-s5pc100/common.[ch]
ARM: restart: S5PC100: use new restart hook
ARM: S5PV210: introduce arch/arm/mach-s5pv210/common.[ch]
ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
ARM: restart: S3C24XX: use new restart hook
Russell King (2):
ARM: restart: S5PV210: use new restart hook
ARM: restart: EXYNOS: use new restart hook
arch/arm/mach-exynos/Makefile | 9 +-
arch/arm/mach-exynos/clock-exynos4210.c | 3 +-
arch/arm/mach-exynos/clock-exynos4212.c | 3 +-
arch/arm/mach-exynos/clock.c | 3 +-
arch/arm/mach-exynos/common.c | 704 ++++++++++++++++++++
arch/arm/mach-exynos/common.h | 41 ++
arch/arm/mach-exynos/cpu.c | 284 --------
arch/arm/mach-exynos/include/mach/map.h | 12 +-
arch/arm/mach-exynos/include/mach/system.h | 2 -
arch/arm/mach-exynos/init.c | 42 --
arch/arm/mach-exynos/irq-combiner.c | 124 ----
arch/arm/mach-exynos/irq-eint.c | 237 -------
arch/arm/mach-exynos/mach-armlex4210.c | 6 +-
arch/arm/mach-exynos/mach-nuri.c | 6 +-
arch/arm/mach-exynos/mach-origen.c | 6 +-
arch/arm/mach-exynos/mach-smdk4x12.c | 7 +-
arch/arm/mach-exynos/mach-smdkv310.c | 7 +-
arch/arm/mach-exynos/mach-universal_c210.c | 6 +-
arch/arm/mach-s3c2410/common.h | 17 +
arch/arm/mach-s3c2410/include/mach/reset.h | 22 -
arch/arm/mach-s3c2410/include/mach/system-reset.h | 32 -
arch/arm/mach-s3c2410/include/mach/system.h | 4 -
arch/arm/mach-s3c2410/mach-amlm5900.c | 3 +
arch/arm/mach-s3c2410/mach-bast.c | 2 +
arch/arm/mach-s3c2410/mach-h1940.c | 3 +
arch/arm/mach-s3c2410/mach-n30.c | 4 +
arch/arm/mach-s3c2410/mach-otom.c | 3 +
arch/arm/mach-s3c2410/mach-qt2410.c | 5 +-
arch/arm/mach-s3c2410/mach-smdk2410.c | 5 +-
arch/arm/mach-s3c2410/mach-tct_hammer.c | 3 +
arch/arm/mach-s3c2410/mach-vr1000.c | 2 +
arch/arm/mach-s3c2410/s3c2410.c | 9 +
arch/arm/mach-s3c2412/mach-jive.c | 2 +
arch/arm/mach-s3c2412/mach-smdk2413.c | 3 +
arch/arm/mach-s3c2412/mach-vstms.c | 1 +
arch/arm/mach-s3c2412/s3c2412.c | 10 +-
arch/arm/mach-s3c2416/mach-smdk2416.c | 1 +
arch/arm/mach-s3c2416/s3c2416.c | 7 +-
arch/arm/mach-s3c2440/common.h | 17 +
arch/arm/mach-s3c2440/mach-anubis.c | 3 +
arch/arm/mach-s3c2440/mach-at2440evb.c | 3 +
arch/arm/mach-s3c2440/mach-gta02.c | 2 +
arch/arm/mach-s3c2440/mach-mini2440.c | 3 +
arch/arm/mach-s3c2440/mach-nexcoder.c | 3 +
arch/arm/mach-s3c2440/mach-osiris.c | 3 +
arch/arm/mach-s3c2440/mach-rx1950.c | 3 +
arch/arm/mach-s3c2440/mach-rx3715.c | 3 +
arch/arm/mach-s3c2440/mach-smdk2440.c | 3 +
arch/arm/mach-s3c2440/s3c2440.c | 9 +
arch/arm/mach-s3c2443/mach-smdk2443.c | 1 +
arch/arm/mach-s3c2443/s3c2443.c | 8 +-
arch/arm/mach-s3c64xx/Makefile | 65 +-
arch/arm/mach-s3c64xx/clock.c | 4 +-
arch/arm/mach-s3c64xx/{irq-eint.c => common.c} | 192 +++++-
arch/arm/mach-s3c64xx/common.h | 57 ++
arch/arm/mach-s3c64xx/cpu.c | 161 -----
arch/arm/mach-s3c64xx/include/mach/system.h | 11 -
arch/arm/mach-s3c64xx/irq.c | 47 --
arch/arm/mach-s3c64xx/mach-anw6410.c | 4 +-
arch/arm/mach-s3c64xx/mach-crag6410.c | 4 +-
arch/arm/mach-s3c64xx/mach-hmt.c | 4 +-
arch/arm/mach-s3c64xx/mach-mini6410.c | 4 +-
arch/arm/mach-s3c64xx/mach-ncp.c | 4 +-
arch/arm/mach-s3c64xx/mach-real6410.c | 4 +-
arch/arm/mach-s3c64xx/mach-smartq.c | 2 +
arch/arm/mach-s3c64xx/mach-smartq5.c | 3 +-
arch/arm/mach-s3c64xx/mach-smartq7.c | 3 +-
arch/arm/mach-s3c64xx/mach-smdk6400.c | 4 +-
arch/arm/mach-s3c64xx/mach-smdk6410.c | 4 +-
arch/arm/mach-s3c64xx/s3c6400.c | 5 +-
arch/arm/mach-s3c64xx/s3c6410.c | 6 +-
arch/arm/mach-s5p64x0/Makefile | 9 +-
arch/arm/mach-s5p64x0/clock-s5p6440.c | 3 +-
arch/arm/mach-s5p64x0/clock-s5p6450.c | 3 +-
arch/arm/mach-s5p64x0/clock.c | 4 +-
arch/arm/mach-s5p64x0/common.c | 468 +++++++++++++
arch/arm/mach-s5p64x0/common.h | 57 ++
arch/arm/mach-s5p64x0/cpu.c | 215 ------
arch/arm/mach-s5p64x0/include/mach/system.h | 2 -
arch/arm/mach-s5p64x0/init.c | 73 --
arch/arm/mach-s5p64x0/irq-eint.c | 155 -----
arch/arm/mach-s5p64x0/mach-smdk6440.c | 6 +-
arch/arm/mach-s5p64x0/mach-smdk6450.c | 6 +-
arch/arm/mach-s5pc100/Makefile | 29 +-
arch/arm/mach-s5pc100/clock.c | 3 +-
arch/arm/mach-s5pc100/{cpu.c => common.c} | 103 +++-
arch/arm/mach-s5pc100/common.h | 37 +
arch/arm/mach-s5pc100/include/mach/system.h | 2 -
arch/arm/mach-s5pc100/init.c | 24 -
arch/arm/mach-s5pv210/common.h | 37 +
arch/arm/mach-s5pv210/include/mach/system.h | 2 -
arch/arm/mach-s5pv210/init.c | 44 --
arch/arm/mach-s5pv210/mach-aquila.c | 6 +-
arch/arm/mach-s5pv210/mach-goni.c | 6 +-
arch/arm/mach-s5pv210/mach-smdkc110.c | 6 +-
arch/arm/mach-s5pv210/mach-smdkv210.c | 6 +-
arch/arm/mach-s5pv210/mach-torbreck.c | 6 +-
arch/arm/plat-s3c24xx/cpu.c | 2 -
arch/arm/plat-s5p/Makefile | 1 -
arch/arm/plat-s5p/cpu.c | 144 ----
arch/arm/plat-samsung/include/plat/cpu.h | 6 -
arch/arm/plat-samsung/include/plat/exynos4.h | 35 -
arch/arm/plat-samsung/include/plat/reset.h | 16 -
arch/arm/plat-samsung/include/plat/s3c2412.h | 3 +
arch/arm/plat-samsung/include/plat/s3c2416.h | 2 +
arch/arm/plat-samsung/include/plat/s3c2443.h | 2 +
arch/arm/plat-samsung/include/plat/s3c6400.h | 36 -
arch/arm/plat-samsung/include/plat/s3c6410.h | 29 -
arch/arm/plat-samsung/include/plat/s5p6440.h | 36 -
arch/arm/plat-samsung/include/plat/s5p6450.h | 36 -
arch/arm/plat-samsung/include/plat/s5pc100.h | 33 -
arch/arm/plat-samsung/include/plat/s5pv210.h | 33 -
arch/arm/plat-samsung/include/plat/system-reset.h | 31 -
.../arm/plat-samsung/include/plat/watchdog-reset.h | 1 +
118 files changed, 2072 insertions(+), 2116 deletions(-)
create mode 100644 arch/arm/mach-exynos/common.c
create mode 100644 arch/arm/mach-exynos/common.h
delete mode 100644 arch/arm/mach-exynos/cpu.c
delete mode 100644 arch/arm/mach-exynos/init.c
delete mode 100644 arch/arm/mach-exynos/irq-combiner.c
delete mode 100644 arch/arm/mach-exynos/irq-eint.c
create mode 100644 arch/arm/mach-s3c2410/common.h
delete mode 100644 arch/arm/mach-s3c2410/include/mach/reset.h
delete mode 100644 arch/arm/mach-s3c2410/include/mach/system-reset.h
create mode 100644 arch/arm/mach-s3c2440/common.h
rename arch/arm/mach-s3c64xx/{irq-eint.c => common.c} (50%)
create mode 100644 arch/arm/mach-s3c64xx/common.h
delete mode 100644 arch/arm/mach-s3c64xx/cpu.c
delete mode 100644 arch/arm/mach-s3c64xx/irq.c
create mode 100644 arch/arm/mach-s5p64x0/common.c
create mode 100644 arch/arm/mach-s5p64x0/common.h
delete mode 100644 arch/arm/mach-s5p64x0/cpu.c
delete mode 100644 arch/arm/mach-s5p64x0/init.c
delete mode 100644 arch/arm/mach-s5p64x0/irq-eint.c
rename arch/arm/mach-s5pc100/{cpu.c => common.c} (66%)
create mode 100644 arch/arm/mach-s5pc100/common.h
delete mode 100644 arch/arm/mach-s5pc100/init.c
rename arch/arm/mach-s5pv210/{cpu.c => common.c} (67%)
create mode 100644 arch/arm/mach-s5pv210/common.h
delete mode 100644 arch/arm/mach-s5pv210/init.c
delete mode 100644 arch/arm/plat-s5p/cpu.c
delete mode 100644 arch/arm/plat-samsung/include/plat/exynos4.h
delete mode 100644 arch/arm/plat-samsung/include/plat/reset.h
delete mode 100644 arch/arm/plat-samsung/include/plat/s3c6400.h
delete mode 100644 arch/arm/plat-samsung/include/plat/s3c6410.h
delete mode 100644 arch/arm/plat-samsung/include/plat/s5p6440.h
delete mode 100644 arch/arm/plat-samsung/include/plat/s5p6450.h
delete mode 100644 arch/arm/plat-samsung/include/plat/s5pc100.h
delete mode 100644 arch/arm/plat-samsung/include/plat/s5pv210.h
delete mode 100644 arch/arm/plat-samsung/include/plat/system-reset.hPATCH 1/12 ARM: S3C64XX: introduce arch/arm/mach-s3c64xx/common.[ch]
This patch introduces common.[ch] which are used only in the arch/arm/mach-s3c64xx/ directory. The common.c file merges the cpu.c, irq.c and irq-eint.c which are used commonly on S3C64XX SoCs and the common.h file replaces with plat/s3c6400.h and plat/s3c6410.h files.
---
arch/arm/mach-s3c64xx/Makefile | 65 ++++-----
arch/arm/mach-s3c64xx/clock.c | 4 +-
arch/arm/mach-s3c64xx/{irq-eint.c => common.c} | 182 ++++++++++++++++++++++--
arch/arm/mach-s3c64xx/common.h | 55 +++++++
arch/arm/mach-s3c64xx/cpu.c | 161 ---------------------
arch/arm/mach-s3c64xx/irq.c | 47 ------
arch/arm/mach-s3c64xx/mach-anw6410.c | 3 +-
arch/arm/mach-s3c64xx/mach-crag6410.c | 3 +-
arch/arm/mach-s3c64xx/mach-hmt.c | 3 +-
arch/arm/mach-s3c64xx/mach-mini6410.c | 3 +-
arch/arm/mach-s3c64xx/mach-ncp.c | 3 +-
arch/arm/mach-s3c64xx/mach-real6410.c | 3 +-
arch/arm/mach-s3c64xx/mach-smartq.c | 2 +
arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +-
arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +-
arch/arm/mach-s3c64xx/mach-smdk6400.c | 3 +-
arch/arm/mach-s3c64xx/mach-smdk6410.c | 3 +-
arch/arm/mach-s3c64xx/s3c6400.c | 5 +-
arch/arm/mach-s3c64xx/s3c6410.c | 6 +-
arch/arm/plat-samsung/include/plat/cpu.h | 4 -
arch/arm/plat-samsung/include/plat/s3c6400.h | 36 -----
arch/arm/plat-samsung/include/plat/s3c6410.h | 29 ----
22 files changed, 285 insertions(+), 339 deletions(-)
rename arch/arm/mach-s3c64xx/{irq-eint.c => common.c} (51%)
create mode 100644 arch/arm/mach-s3c64xx/common.h
delete mode 100644 arch/arm/mach-s3c64xx/cpu.c
delete mode 100644 arch/arm/mach-s3c64xx/irq.c
delete mode 100644 arch/arm/plat-samsung/include/plat/s3c6400.h
delete mode 100644 arch/arm/plat-samsung/include/plat/s3c6410.harch/arm/mach-s3c64xx/Makefile +30 -35
@@ -10,54 +10,49 @@ obj-m := obj-n := obj- := -# Core files -obj-y += cpu.o -obj-y += clock.o +# Core -# Core support for S3C6400 system +obj-y += common.o clock.o + +# Core support obj-$(CONFIG_CPU_S3C6400) += s3c6400.o obj-$(CONFIG_CPU_S3C6410) += s3c6410.o -obj-y += irq.o -obj-y += irq-eint.o +# PM + +obj-$(CONFIG_PM) += pm.o irq-pm.o sleep.o # DMA support obj-$(CONFIG_S3C64XX_DMA) += dma.o -# Device setup +# Device support -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) += setup-sdhci.o -obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o -obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o +obj-y += dev-uart.o +obj-y += dev-audio.o +obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o -# PM +# Device setup -obj-$(CONFIG_PM) += pm.o -obj-$(CONFIG_PM) += sleep.o -obj-$(CONFIG_PM) += irq-pm.o +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) += setup-sdhci.o +obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o # Machine support -obj-$(CONFIG_MACH_ANW6410) += mach-anw6410.o -obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o -obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o -obj-$(CONFIG_MACH_REAL6410) += mach-real6410.o -obj-$(CONFIG_MACH_MINI6410) += mach-mini6410.o -obj-$(CONFIG_MACH_NCP) += mach-ncp.o -obj-$(CONFIG_MACH_HMT) += mach-hmt.o -obj-$(CONFIG_MACH_SMARTQ) += mach-smartq.o -obj-$(CONFIG_MACH_SMARTQ5) += mach-smartq5.o -obj-$(CONFIG_MACH_SMARTQ7) += mach-smartq7.o -obj-$(CONFIG_MACH_WLF_CRAGG_6410) += mach-crag6410.o mach-crag6410-module.o - -# device support - -obj-y += dev-uart.o -obj-y += dev-audio.o -obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o +obj-$(CONFIG_MACH_ANW6410) += mach-anw6410.o +obj-$(CONFIG_MACH_HMT) += mach-hmt.o +obj-$(CONFIG_MACH_MINI6410) += mach-mini6410.o +obj-$(CONFIG_MACH_NCP) += mach-ncp.o +obj-$(CONFIG_MACH_REAL6410) += mach-real6410.o +obj-$(CONFIG_MACH_SMARTQ) += mach-smartq.o +obj-$(CONFIG_MACH_SMARTQ5) += mach-smartq5.o +obj-$(CONFIG_MACH_SMARTQ7) += mach-smartq7.o +obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o +obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o +obj-$(CONFIG_MACH_WLF_CRAGG_6410) += mach-crag6410.o mach-crag6410-module.o
arch/arm/mach-s3c64xx/clock.c +2 -2
@@ -705,7 +705,7 @@ static struct clksrc_clk *init_parents[] = {#define GET_DIV (clk, field) ((((clk) & field##_MASK) >> field##_SHIFT) + 1) -void __init_or_cpufreq s3c6400_setup_clocks(void) +void __init_or_cpufreq s3c64xx_setup_clocks(void) {struct clk *xtal_clk;unsigned long xtal;
@@ -804,7 +804,7 @@ static struct clk *clks[] __initdata = {* as ARMCLK as well as the necessary parent clocks. * * This call does not setup the clocks, which is left to the -* s3c6400_setup_clocks() call which may be needed by the cpufreq +* s3c64xx_setup_clocks() call which may be needed by the cpufreq * or resume code to re-set the clocks if the bootloader has changed * them. */
arch/arm/mach-s3c64xx/common.c renamed from arch/arm/mach-s3c64xx/irq-eint.c +172 -10
209 lines not on this page · raw message
arch/arm/mach-s3c64xx/common.h new file +55 -0
55 lines not on this page · raw message
arch/arm/mach-s3c64xx/cpu.c deleted +0 -161
161 lines not on this page · raw message
arch/arm/mach-s3c64xx/irq.c deleted +0 -47
47 lines not on this page · raw message
arch/arm/mach-s3c64xx/mach-anw6410.c +2 -1
@@ -46,13 +46,14 @@#include <plat/fb.h> #include <plat/regs-fb-v4.h> -#include <plat/s3c6410.h> #include <plat/clock.h> #include <plat/devs.h> #include <plat/cpu.h> #include <mach/regs-gpio.h> #include <mach/regs-modem.h> +#include "common.h" +/* DM9000 */ #define ANW6410_PA_DM9000 (0x18000000)
arch/arm/mach-s3c64xx/mach-crag6410.c +2 -1
@@ -51,7 +51,6 @@#include <mach/regs-gpio-memport.h> -#include <plat/s3c6410.h> #include <plat/regs-serial.h> #include <plat/regs-fb-v4.h> #include <plat/fb.h>
@@ -67,6 +66,8 @@#include <plat/iic.h> #include <plat/pm.h> +#include "common.h" +/* serial port setup */ #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
arch/arm/mach-s3c64xx/mach-hmt.c +2 -1
@@ -38,12 +38,13 @@#include <plat/fb.h> #include <plat/nand.h> -#include <plat/s3c6410.h> #include <plat/clock.h> #include <plat/devs.h> #include <plat/cpu.h> #include <plat/regs-fb-v4.h> +#include "common.h" +#define UCON S3C2410_UCON_DEFAULT#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE)#define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
arch/arm/mach-s3c64xx/mach-mini6410.c +2 -1
@@ -34,7 +34,6 @@#include <mach/regs-modem.h> #include <mach/regs-srom.h> -#include <plat/s3c6410.h> #include <plat/adc.h> #include <plat/cpu.h> #include <plat/devs.h>
@@ -46,6 +45,8 @@#include <video/platform_lcd.h> +#include "common.h" +#define UCON S3C2410_UCON_DEFAULT#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)#define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
arch/arm/mach-s3c64xx/mach-ncp.c +2 -1
@@ -40,12 +40,13 @@#include <plat/iic.h> #include <plat/fb.h> -#include <plat/s3c6410.h> #include <plat/clock.h> #include <plat/devs.h> #include <plat/cpu.h> #include <plat/regs-fb-v4.h> +#include "common.h" +#define UCON S3C2410_UCON_DEFAULT#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
arch/arm/mach-s3c64xx/mach-real6410.c +2 -1
@@ -35,7 +35,6 @@#include <mach/regs-modem.h> #include <mach/regs-srom.h> -#include <plat/s3c6410.h> #include <plat/adc.h> #include <plat/cpu.h> #include <plat/devs.h>
@@ -47,6 +46,8 @@#include <video/platform_lcd.h> +#include "common.h" +#define UCON S3C2410_UCON_DEFAULT#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)#define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
arch/arm/mach-s3c64xx/mach-smartq.c +2 -0
@@ -40,6 +40,8 @@#include <video/platform_lcd.h> +#include "common.h" +#define UCON S3C2410_UCON_DEFAULT#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE)#define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
arch/arm/mach-s3c64xx/mach-smartq5.c +1 -1
@@ -24,13 +24,13 @@#include <mach/map.h> #include <mach/regs-gpio.h> -#include <plat/s3c6410.h> #include <plat/cpu.h> #include <plat/devs.h> #include <plat/fb.h> #include <plat/gpio-cfg.h> #include <plat/regs-fb-v4.h> +#include "common.h" #include "mach-smartq.h" static struct gpio_led smartq5_leds[] = {
arch/arm/mach-s3c64xx/mach-smartq7.c +1 -1
@@ -24,13 +24,13 @@#include <mach/map.h> #include <mach/regs-gpio.h> -#include <plat/s3c6410.h> #include <plat/cpu.h> #include <plat/devs.h> #include <plat/fb.h> #include <plat/gpio-cfg.h> #include <plat/regs-fb-v4.h> +#include "common.h" #include "mach-smartq.h" static struct gpio_led smartq7_leds[] = {
arch/arm/mach-s3c64xx/mach-smdk6400.c +2 -1
@@ -32,12 +32,13 @@#include <plat/regs-serial.h> -#include <plat/s3c6400.h> #include <plat/clock.h> #include <plat/devs.h> #include <plat/cpu.h> #include <plat/iic.h> +#include "common.h" +#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
arch/arm/mach-s3c64xx/mach-smdk6410.c +2 -1
@@ -64,7 +64,6 @@#include <plat/fb.h> #include <plat/gpio-cfg.h> -#include <plat/s3c6410.h> #include <plat/clock.h> #include <plat/devs.h> #include <plat/cpu.h>
@@ -74,6 +73,8 @@#include <plat/backlight.h> #include <plat/regs-fb-v4.h> +#include "common.h" +#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
arch/arm/mach-s3c64xx/s3c6400.c +3 -2
@@ -38,7 +38,8 @@#include <plat/sdhci.h> #include <plat/iic-core.h> #include <plat/onenand-core.h> -#include <plat/s3c6400.h> + +#include "common.h" void __init s3c6400_map_io (void ) {
@@ -60,7 +61,7 @@ void __init s3c6400_map_io(void)void __init s3c6400_init_clocks (int xtal) {s3c64xx_register_clocks (xtal,S3C6400_CLKDIV0_ARM_MASK ); -s3c6400_setup_clocks (); +s3c64xx_setup_clocks (); }void __init s3c6400_init_irq (void )
arch/arm/mach-s3c64xx/s3c6410.c +3 -3
@@ -41,8 +41,8 @@#include <plat/adc-core.h> #include <plat/iic-core.h> #include <plat/onenand-core.h> -#include <plat/s3c6400.h> -#include <plat/s3c6410.h> + +#include "common.h" void __init s3c6410_map_io (void ) {
@@ -66,7 +66,7 @@ void __init s3c6410_init_clocks(int xtal) {printk (KERN_DEBUG "%s: initialising clocks\n" , __func__);s3c64xx_register_clocks (xtal,S3C6410_CLKDIV0_ARM_MASK ); -s3c6400_setup_clocks (); +s3c64xx_setup_clocks (); }void __init s3c6410_init_irq (void )
arch/arm/plat-samsung/include/plat/cpu.h +0 -4
@@ -152,11 +152,9 @@ extern void s3c_init_cpu(unsigned long idcode,/* core initialisation functions */ extern void s3c24xx_init_irq (void ); -extern void s3c64xx_init_irq (u32 vic0,u32 vic1);extern void s5p_init_irq (u32 *vic,u32 num_vic);extern void s3c24xx_init_io (struct map_desc *mach_desc,int size); -extern void s3c64xx_init_io (struct map_desc *mach_desc,int size);extern void s5p_init_io (struct map_desc *mach_desc,int size,void __iomem *cpuid_addr);
@@ -183,7 +181,6 @@ extern struct syscore_ops s3c2410_pm_syscore_ops;extern struct syscore_ops s3c2412_pm_syscore_ops;extern struct syscore_ops s3c2416_pm_syscore_ops;extern struct syscore_ops s3c244x_pm_syscore_ops; -extern struct syscore_ops s3c64xx_irq_syscore_ops;/* system device classes */
@@ -195,7 +192,6 @@ extern struct sysdev_class s3c2440_sysclass;extern struct sysdev_class s3c2442_sysclass;extern struct sysdev_class s3c2443_sysclass;extern struct sysdev_class s3c6410_sysclass; -extern struct sysdev_class s3c64xx_sysclass;extern struct sysdev_class s5p64x0_sysclass;extern struct sysdev_class s5pv210_sysclass;extern struct sysdev_class exynos4_sysclass;
arch/arm/plat-samsung/include/plat/s3c6400.h deleted +0 -36
@@ -1,36 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/s3c6400.h -* -* Copyright 2008 Openmoko, Inc. -* Copyright 2008 Simtec Electronics -* Ben Dooks <[email protected]> -* http://armlinux.simtec.co.uk/ -* -* Header file for s3c6400 cpu support -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -/* Common init code for S3C6400 related SoCs */ - -extern void s3c6400_common_init_uarts (struct s3c2410_uartcfg *cfg,int no); -extern void s3c6400_setup_clocks (void ); - -extern void s3c64xx_register_clocks (unsigned long xtal,unsigned armclk_limit); - -#ifdef CONFIG_CPU_S3C6400 - -extern int s3c6400_init (void ); -extern void s3c6400_init_irq (void ); -extern void s3c6400_map_io (void ); -extern void s3c6400_init_clocks (int xtal); - -#define s3c6400_init_uarts s3c6400_common_init_uarts - -#else -#define s3c6400_init_clocks NULL -#define s3c6400_init_uarts NULL -#define s3c6400_map_io NULL -#define s3c6400_init NULL -#endif
arch/arm/plat-samsung/include/plat/s3c6410.h deleted +0 -29
@@ -1,29 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/s3c6410.h -* -* Copyright 2008 Openmoko, Inc. -* Copyright 2008 Simtec Electronics -* Ben Dooks <[email protected]> -* http://armlinux.simtec.co.uk/ -* -* Header file for s3c6410 cpu support -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#ifdef CONFIG_CPU_S3C6410 - -extern int s3c6410_init (void ); -extern void s3c6410_init_irq (void ); -extern void s3c6410_map_io (void ); -extern void s3c6410_init_clocks (int xtal); - -#define s3c6410_init_uarts s3c6400_common_init_uarts - -#else -#define s3c6410_init_clocks NULL -#define s3c6410_init_uarts NULL -#define s3c6410_map_io NULL -#define s3c6410_init NULL -#endif
Signature · 1 line
1.7.4.4
PATCH 2/12 ARM: restart: S3C64XX: use new restart hook
In reply to Kukjin KimHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-s3c64xx/common.c | 10 ++++++++++ arch/arm/mach-s3c64xx/common.h | 2 ++ arch/arm/mach-s3c64xx/include/mach/system.h | 11 ----------- 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-mini6410.c | 1 + arch/arm/mach-s3c64xx/mach-ncp.c | 1 + arch/arm/mach-s3c64xx/mach-real6410.c | 1 + arch/arm/mach-s3c64xx/mach-smartq5.c | 1 + arch/arm/mach-s3c64xx/mach-smartq7.c | 1 + arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 + arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 + .../arm/plat-samsung/include/plat/watchdog-reset.h | 1 + 14 files changed, 23 insertions(+), 11 deletions(-)
arch/arm/mach-s3c64xx/common.c +10 -0
@@ -44,6 +44,7 @@#include <plat/irq-vic-timer.h> #include <plat/regs-irqtype.h> #include <plat/regs-serial.h> +#include <plat/watchdog-reset.h> #include "common.h"
@@ -373,3 +374,12 @@ static int __init s3c64xx_init_irq_eint(void)return 0 ; }arch_initcall (s3c64xx_init_irq_eint); + +void s3c64xx_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +/* if all else fails, or mode was for soft, jump to 0 */ +soft_restart (0 ); +}
arch/arm/mach-s3c64xx/common.h +2 -0
@@ -23,6 +23,8 @@ void s3c64xx_init_io(struct map_desc *mach_desc, int size);void s3c64xx_register_clocks (unsigned long xtal,unsigned armclk_limit);void s3c64xx_setup_clocks (void ); +void s3c64xx_restart (char mode,const char *cmd); +extern struct syscore_ops s3c64xx_irq_syscore_ops;extern struct sysdev_class s3c64xx_sysclass;
arch/arm/mach-s3c64xx/include/mach/system.h +0 -11
@@ -11,20 +11,9 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H __FILE__ -#include <plat/watchdog-reset.h> -static void arch_idle (void ) {/* nothing here yet */ } -static void arch_reset (char mode,const char *cmd) -{ -if (mode !='s' ) -arch_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 ); -} -#endif /* __ASM_ARCH_IRQ_H */
arch/arm/mach-s3c64xx/mach-anw6410.c +1 -0
@@ -242,4 +242,5 @@ MACHINE_START(ANW6410, "A&W6410") .map_io = anw6410_map_io, .init_machine = anw6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-crag6410.c +1 -0
@@ -717,4 +717,5 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410") .map_io = crag6410_map_io, .init_machine = crag6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-hmt.c +1 -0
@@ -273,4 +273,5 @@ MACHINE_START(HMT, "Airgoo-HMT") .map_io = hmt_map_io, .init_machine = hmt_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-mini6410.c +1 -0
@@ -351,4 +351,5 @@ MACHINE_START(MINI6410, "MINI6410") .map_io = mini6410_map_io, .init_machine = mini6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-ncp.c +1 -0
@@ -105,4 +105,5 @@ MACHINE_START(NCP, "NCP") .map_io = ncp_map_io, .init_machine = ncp_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
@@ -332,4 +332,5 @@ MACHINE_START(REAL6410, "REAL6410") .map_io = real6410_map_io, .init_machine = real6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-smartq5.c +1 -0
@@ -153,4 +153,5 @@ MACHINE_START(SMARTQ5, "SmartQ 5") .map_io = smartq_map_io, .init_machine = smartq5_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-smartq7.c +1 -0
@@ -169,4 +169,5 @@ MACHINE_START(SMARTQ7, "SmartQ 7") .map_io = smartq_map_io, .init_machine = smartq7_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-smdk6400.c +1 -0
@@ -94,4 +94,5 @@ MACHINE_START(SMDK6400, "SMDK6400") .map_io = smdk6400_map_io, .init_machine = smdk6400_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-smdk6410.c +1 -0
@@ -706,4 +706,5 @@ MACHINE_START(SMDK6410, "SMDK6410") .map_io = smdk6410_map_io, .init_machine = smdk6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/plat-samsung/include/plat/watchdog-reset.h +1 -0
@@ -17,6 +17,7 @@#include <linux/clk.h> #include <linux/err.h> #include <linux/io.h> +#include <linux/delay.h> static inline void arch_wdt_reset (void ) {
Signature · 1 line
1.7.4.4
PATCH 2/12 ARM: restart: S3C64XX: use new restart hook
Quoted 201 lines · Kukjin Kim
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Cc Ben Dooks <[email protected]>Cc Russell King <[email protected]>Signed-off-by Kukjin Kim <[email protected]>--- arch/arm/mach-s3c64xx/common.c | 10 ++++++++++ arch/arm/mach-s3c64xx/common.h | 2 ++ arch/arm/mach-s3c64xx/include/mach/system.h | 11 ----------- 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-mini6410.c | 1 + arch/arm/mach-s3c64xx/mach-ncp.c | 1 + arch/arm/mach-s3c64xx/mach-real6410.c | 1 + arch/arm/mach-s3c64xx/mach-smartq5.c | 1 + arch/arm/mach-s3c64xx/mach-smartq7.c | 1 + arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 + arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 + .../arm/plat-samsung/include/plat/watchdog-reset.h | 1 + 14 files changed, 23 insertions(+), 11 deletions(-)arch/arm/mach-s3c64xx/common.c +10
-0@@ -44,6 +44,7 @@#include <plat/irq-vic-timer.h> #include <plat/regs-irqtype.h> #include <plat/regs-serial.h> +#include <plat/watchdog-reset.h> #include "common.h" @@ -373,3 +374,12 @@ static int __init s3c64xx_init_irq_eint(void)return 0 ; }arch_initcall (s3c64xx_init_irq_eint); + +void s3c64xx_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +/* if all else fails, or mode was for soft, jump to 0 */ +soft_restart (0 ); +}arch/arm/mach-s3c64xx/common.h +2
-0@@ -23,6 +23,8 @@ void s3c64xx_init_io(struct map_desc *mach_desc, int size);void s3c64xx_register_clocks (unsigned long xtal,unsigned armclk_limit);void s3c64xx_setup_clocks (void ); +void s3c64xx_restart (char mode,const char *cmd); +extern struct syscore_ops s3c64xx_irq_syscore_ops;extern struct sysdev_class s3c64xx_sysclass;arch/arm/mach-s3c64xx/include/mach/system.h +0
-11@@ -11,20 +11,9 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H __FILE__ -#include <plat/watchdog-reset.h> -static void arch_idle (void ) {/* nothing here yet */ } -static void arch_reset (char mode,const char *cmd) -{ -if (mode !='s' ) -arch_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 ); -} -#endif /* __ASM_ARCH_IRQ_H */ arch/arm/mach-s3c64xx/mach-anw6410.c +1
-0@@ -242,4 +242,5 @@ MACHINE_START(ANW6410, "A&W6410") .map_io = anw6410_map_io, .init_machine = anw6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END arch/arm/mach-s3c64xx/mach-crag6410.c +1
-0@@ -717,4 +717,5 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410") .map_io = crag6410_map_io, .init_machine = crag6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END arch/arm/mach-s3c64xx/mach-hmt.c +1
-0@@ -273,4 +273,5 @@ MACHINE_START(HMT, "Airgoo-HMT") .map_io = hmt_map_io, .init_machine = hmt_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END arch/arm/mach-s3c64xx/mach-mini6410.c +1
-0@@ -351,4 +351,5 @@ MACHINE_START(MINI6410, "MINI6410") .map_io = mini6410_map_io, .init_machine = mini6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END arch/arm/mach-s3c64xx/mach-ncp.c +1
-0@@ -105,4 +105,5 @@ MACHINE_START(NCP, "NCP") .map_io = ncp_map_io, .init_machine = ncp_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END arch/arm/mach-s3c64xx/mach-real6410.c +1
-0@@ -332,4 +332,5 @@ MACHINE_START(REAL6410, "REAL6410") .map_io = real6410_map_io, .init_machine = real6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END arch/arm/mach-s3c64xx/mach-smartq5.c +1
-0@@ -153,4 +153,5 @@ MACHINE_START(SMARTQ5, "SmartQ 5") .map_io = smartq_map_io, .init_machine = smartq5_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END arch/arm/mach-s3c64xx/mach-smartq7.c +1
-0@@ -169,4 +169,5 @@ MACHINE_START(SMARTQ7, "SmartQ 7") .map_io = smartq_map_io, .init_machine = smartq7_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END arch/arm/mach-s3c64xx/mach-smdk6400.c +1
-0@@ -94,4 +94,5 @@ MACHINE_START(SMDK6400, "SMDK6400") .map_io = smdk6400_map_io, .init_machine = smdk6400_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END arch/arm/mach-s3c64xx/mach-smdk6410.c +1
-0@@ -706,4 +706,5 @@ MACHINE_START(SMDK6410, "SMDK6410") .map_io = smdk6410_map_io, .init_machine = smdk6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END arch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/watchdog-reset.h +0
-0
samsung/include/plat/watchdog-reset.h
index 40dbb2b..f19aff1 100644arch/arm/plat-samsung/include/plat/watchdog-reset.h +1
-1@@ -17,6 +17,7 @@#include <linux/clk.h> #include <linux/err.h> #include <linux/io.h> +#include <linux/delay.h> static inline void arch_wdt_reset (void ) { --
Quoted 1 line
1.7.4.4
From: Kukjin Kim <[email protected]>
Subject: [PATCH V2 12/12] ARM: restart: S3C64XX: use new restart hook
Hook these platforms restart code into the new restart hook rather than using arch_reset().
---
Changes since v1:
- added inclusion of <plat/system-reset.h> which can be used commonly on Samsung SoCs.
arch/arm/mach-s3c64xx/common.c | 10 ++++++++++ arch/arm/mach-s3c64xx/common.h | 2 ++ arch/arm/mach-s3c64xx/include/mach/system.h | 11 +---------- 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-mini6410.c | 1 + arch/arm/mach-s3c64xx/mach-ncp.c | 1 + arch/arm/mach-s3c64xx/mach-real6410.c | 1 + arch/arm/mach-s3c64xx/mach-smartq5.c | 1 + arch/arm/mach-s3c64xx/mach-smartq7.c | 1 + arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 + arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 + .../arm/plat-samsung/include/plat/watchdog-reset.h | 1 + 14 files changed, 24 insertions(+), 10 deletions(-)
arch/arm/mach-s3c64xx/common.c +10 -0
@@ -44,6 +44,7 @@#include <plat/irq-vic-timer.h> #include <plat/regs-irqtype.h> #include <plat/regs-serial.h> +#include <plat/watchdog-reset.h> #include "common.h"
@@ -373,3 +374,12 @@ static int __init s3c64xx_init_irq_eint(void)return 0 ; }arch_initcall (s3c64xx_init_irq_eint); + +void s3c64xx_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +/* if all else fails, or mode was for soft, jump to 0 */ +soft_restart (0 ); +}
arch/arm/mach-s3c64xx/common.h +2 -0
@@ -23,6 +23,8 @@ void s3c64xx_init_io(struct map_desc *mach_desc, int size);void s3c64xx_register_clocks (unsigned long xtal,unsigned armclk_limit);void s3c64xx_setup_clocks (void ); +void s3c64xx_restart (char mode,const char *cmd); +extern struct syscore_ops s3c64xx_irq_syscore_ops;extern struct sysdev_class s3c64xx_sysclass;
arch/arm/mach-s3c64xx/include/mach/system.h +1 -10
@@ -11,20 +11,11 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H __FILE__ -#include <plat/watchdog-reset.h> +#include <plat/system-reset.h> static void arch_idle (void ) {/* nothing here yet */ } -static void arch_reset (char mode,const char *cmd) -{ -if (mode !='s' ) -arch_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 ); -} -#endif /* __ASM_ARCH_IRQ_H */
arch/arm/mach-s3c64xx/mach-anw6410.c +1 -0
@@ -242,4 +242,5 @@ MACHINE_START(ANW6410, "A&W6410") .map_io = anw6410_map_io, .init_machine = anw6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-crag6410.c +1 -0
@@ -717,4 +717,5 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410") .map_io = crag6410_map_io, .init_machine = crag6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-hmt.c +1 -0
@@ -273,4 +273,5 @@ MACHINE_START(HMT, "Airgoo-HMT") .map_io = hmt_map_io, .init_machine = hmt_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-mini6410.c +1 -0
@@ -351,4 +351,5 @@ MACHINE_START(MINI6410, "MINI6410") .map_io = mini6410_map_io, .init_machine = mini6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-ncp.c +1 -0
@@ -105,4 +105,5 @@ MACHINE_START(NCP, "NCP") .map_io = ncp_map_io, .init_machine = ncp_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-real6410.c +1 -0
@@ -332,4 +332,5 @@ MACHINE_START(REAL6410, "REAL6410") .map_io = real6410_map_io, .init_machine = real6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-smartq5.c +1 -0
@@ -153,4 +153,5 @@ MACHINE_START(SMARTQ5, "SmartQ 5") .map_io = smartq_map_io, .init_machine = smartq5_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-smartq7.c +1 -0
@@ -169,4 +169,5 @@ MACHINE_START(SMARTQ7, "SmartQ 7") .map_io = smartq_map_io, .init_machine = smartq7_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-smdk6400.c +1 -0
@@ -94,4 +94,5 @@ MACHINE_START(SMDK6400, "SMDK6400") .map_io = smdk6400_map_io, .init_machine = smdk6400_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/mach-s3c64xx/mach-smdk6410.c +1 -0
@@ -706,4 +706,5 @@ MACHINE_START(SMDK6410, "SMDK6410") .map_io = smdk6410_map_io, .init_machine = smdk6410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c64xx_restart,MACHINE_END
arch/arm/plat-samsung/include/plat/watchdog-reset.h +1 -0
@@ -17,6 +17,7 @@#include <linux/clk.h> #include <linux/err.h> #include <linux/io.h> +#include <linux/delay.h> static inline void arch_wdt_reset (void ) {
Signature · 7 lines
Thanks. Best regards, Kgene. -- Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 2/12 ARM: restart: S3C64XX: use new restart hook
In reply to Kukjin KimQuoted 14 lines · Kukjin Kim
arch/arm/mach-s3c64xx/include/mach/system.h +0
-2@@ -11,20 +11,9 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H __FILE__ -#include <plat/watchdog-reset.h> -static void arch_idle (void ) {/* nothing here yet */ }
arch/arm/mach-s3c64xx/include/mach/system.h line 29
Quoted 10 lines
arch/arm/mach-s3c64xx/include/mach/system.h +0
-9-static void arch_reset (char mode,const char *cmd) -{ -if (mode !='s' ) -arch_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 ); -} -
I just noticed this: if this comes before "ARM: restart: remove the now empty arch_reset()" (which it has to) then this will induce a build error.
If you have added all the necessary .restart hooks, then this patch should remove the _contents_ of arch_reset() but leave the function there. The "ARM: restart: remove the now empty arch_reset()" is the earliest point at which arch_reset() can be safely removed from any platform (and that can only happen _after_ platforms we care about have been converted.)
The dependency chain is:
1. Base restart changes + restart cleanups.
2. Platforms adding their .restart hooks, emptying arch_reset() as they're fully converted.
Then, once all platforms we care about are converted:
3. Removal of code calling arch_reset().
4. Removal of all empty arch_reset() functions and any header files left empty at this point.
So, a patch combining (2) and (4) really doesn't work.
PATCH 3/12 ARM: S5P64X0: introduce arch/arm/mach-s5p64x0/common.[ch]
In reply to Kukjin KimThis patch introduces common.[ch] which are used only in the arch/arm/mach-s5p64x0/ directory. The common.c file merges the cpu.c, init.c and irq-eint.c files which are used commonly on S5P64X0 SoCs and the common.h local header file replaces with plat/s5p6440.h and plat/s5p6450.h files.
--- arch/arm/mach-s5p64x0/Makefile | 9 +- arch/arm/mach-s5p64x0/clock-s5p6440.c | 3 +- arch/arm/mach-s5p64x0/clock-s5p6450.c | 3 +- arch/arm/mach-s5p64x0/clock.c | 4 +- arch/arm/mach-s5p64x0/common.c | 459 ++++++++++++++++++++++++++ arch/arm/mach-s5p64x0/common.h | 55 +++ arch/arm/mach-s5p64x0/cpu.c | 215 ------------ arch/arm/mach-s5p64x0/init.c | 73 ---- arch/arm/mach-s5p64x0/irq-eint.c | 155 --------- arch/arm/mach-s5p64x0/mach-smdk6440.c | 5 +- arch/arm/mach-s5p64x0/mach-smdk6450.c | 5 +- arch/arm/plat-s5p/cpu.c | 20 -- arch/arm/plat-samsung/include/plat/s5p6440.h | 36 -- arch/arm/plat-samsung/include/plat/s5p6450.h | 36 -- 14 files changed, 532 insertions(+), 546 deletions(-) create mode 100644 arch/arm/mach-s5p64x0/common.c create mode 100644 arch/arm/mach-s5p64x0/common.h delete mode 100644 arch/arm/mach-s5p64x0/cpu.c delete mode 100644 arch/arm/mach-s5p64x0/init.c delete mode 100644 arch/arm/mach-s5p64x0/irq-eint.c delete mode 100644 arch/arm/plat-samsung/include/plat/s5p6440.h delete mode 100644 arch/arm/plat-samsung/include/plat/s5p6450.h
arch/arm/mach-s5p64x0/Makefile +6 -3
@@ -10,14 +10,16 @@ obj-m := obj-n := obj- := -# Core support for S5P64X0 system +# Core -obj-$(CONFIG_ARCH_S5P64X0) += cpu.o init.o clock.o dma.o -obj-$(CONFIG_ARCH_S5P64X0) += setup-i2c0.o irq-eint.o +obj-y += common.o clock.o obj-$(CONFIG_CPU_S5P6440) += clock-s5p6440.o obj-$(CONFIG_CPU_S5P6450) += clock-s5p6450.o + obj-$(CONFIG_PM) += pm.o irq-pm.o +obj-y += dma.o + # machine support obj-$(CONFIG_MACH_SMDK6440) += mach-smdk6440.o
@@ -28,5 +30,6 @@ obj-$(CONFIG_MACH_SMDK6450) += mach-smdk6450.o obj-y += dev-audio.o obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o +obj-y += setup-i2c0.o obj-$(CONFIG_S5P64X0_SETUP_I2C1) += setup-i2c1.o obj-$(CONFIG_S5P64X0_SETUP_FB_24BPP) += setup-fb-24bpp.o
arch/arm/mach-s5p64x0/clock-s5p6440.c +2 -1
@@ -31,7 +31,8 @@#include <plat/pll.h> #include <plat/s5p-clock.h> #include <plat/clock-clksrc.h> -#include <plat/s5p6440.h> + +#include "common.h" static u32 epll_div[][5 ] = { {36000000 ,0 ,48 ,1 ,4 },
arch/arm/mach-s5p64x0/clock-s5p6450.c +2 -1
@@ -31,7 +31,8 @@#include <plat/pll.h> #include <plat/s5p-clock.h> #include <plat/clock-clksrc.h> -#include <plat/s5p6450.h> + +#include "common.h" static struct clksrc_clk clk_mout_dpll = { .clk = {
arch/arm/mach-s5p64x0/clock.c +2 -2
@@ -30,8 +30,8 @@#include <plat/pll.h> #include <plat/s5p-clock.h> #include <plat/clock-clksrc.h> -#include <plat/s5p6440.h> -#include <plat/s5p6450.h> + +#include "common.h" struct clksrc_clk clk_mout_apll = { .clk = {
arch/arm/mach-s5p64x0/common.c new file +459 -0
459 lines not on this page · raw message
arch/arm/mach-s5p64x0/common.h new file +55 -0
55 lines not on this page · raw message
arch/arm/mach-s5p64x0/cpu.c deleted +0 -215
215 lines not on this page · raw message
arch/arm/mach-s5p64x0/init.c deleted +0 -73
73 lines not on this page · raw message
arch/arm/mach-s5p64x0/irq-eint.c deleted +0 -155
155 lines not on this page · raw message
arch/arm/mach-s5p64x0/mach-smdk6440.c +3 -2
@@ -41,7 +41,6 @@#include <plat/regs-serial.h> #include <plat/gpio-cfg.h> -#include <plat/s5p6440.h> #include <plat/clock.h> #include <plat/devs.h> #include <plat/cpu.h>
@@ -54,6 +53,8 @@#include <plat/fb.h> #include <plat/regs-fb.h> +#include "common.h" +#define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \ S3C2410_UCON_TXIRQMODE | \
@@ -202,7 +203,7 @@ static struct platform_pwm_backlight_data smdk6440_bl_data = {static void __init smdk6440_map_io (void ) { -s5p_init_io (NULL ,0 ,S5P64X0_SYS_ID ); +s5p64x0_init_io (NULL ,0 );s3c24xx_init_clocks (12000000 );s3c24xx_init_uarts (smdk6440_uartcfgs,ARRAY_SIZE (smdk6440_uartcfgs));s5p_set_timer_source (S5P_PWM3 ,S5P_PWM4 );
arch/arm/mach-s5p64x0/mach-smdk6450.c +3 -2
@@ -41,7 +41,6 @@#include <plat/regs-serial.h> #include <plat/gpio-cfg.h> -#include <plat/s5p6450.h> #include <plat/clock.h> #include <plat/devs.h> #include <plat/cpu.h>
@@ -54,6 +53,8 @@#include <plat/fb.h> #include <plat/regs-fb.h> +#include "common.h" +#define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \ S3C2410_UCON_TXIRQMODE | \
@@ -222,7 +223,7 @@ static struct platform_pwm_backlight_data smdk6450_bl_data = {static void __init smdk6450_map_io (void ) { -s5p_init_io (NULL ,0 ,S5P64X0_SYS_ID ); +s5p64x0_init_io (NULL ,0 );s3c24xx_init_clocks (19200000 );s3c24xx_init_uarts (smdk6450_uartcfgs,ARRAY_SIZE (smdk6450_uartcfgs));s5p_set_timer_source (S5P_PWM3 ,S5P_PWM4 );
arch/arm/plat-s5p/cpu.c +0 -20
@@ -20,16 +20,12 @@#include <mach/regs-clock.h> #include <plat/cpu.h> -#include <plat/s5p6440.h> -#include <plat/s5p6450.h> #include <plat/s5pc100.h> #include <plat/s5pv210.h> #include <plat/exynos4.h> /* table of supported CPUs */ -static const char name_s5p6440[] ="S5P6440" ; -static const char name_s5p6450[] ="S5P6450" ;static const char name_s5pc100[] ="S5PC100" ;static const char name_s5pv210[] ="S5PV210/S5PC110" ;static const char name_exynos4210[] ="EXYNOS4210" ;
@@ -38,22 +34,6 @@ static const char name_exynos4412[] = "EXYNOS4412";static struct cpu_table cpu_ids[]__initdata = { { - .idcode =S5P6440_CPU_ID , - .idmask =S5P64XX_CPU_MASK , - .map_io = s5p6440_map_io, - .init_clocks = s5p6440_init_clocks, - .init_uarts = s5p6440_init_uarts, - .init = s5p64x0_init, - .name = name_s5p6440, - }, { - .idcode =S5P6450_CPU_ID , - .idmask =S5P64XX_CPU_MASK , - .map_io = s5p6450_map_io, - .init_clocks = s5p6450_init_clocks, - .init_uarts = s5p6450_init_uarts, - .init = s5p64x0_init, - .name = name_s5p6450, - }, { .idcode =S5PC100_CPU_ID , .idmask =S5PC100_CPU_MASK , .map_io = s5pc100_map_io,
arch/arm/plat-samsung/include/plat/s5p6440.h deleted +0 -36
@@ -1,36 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/s5p6440.h -* -* Copyright (c) 2009 Samsung Electronics Co., Ltd. -* http://www.samsung.com/ -* -* Header file for s5p6440 cpu support -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -/* Common init code for S5P6440 related SoCs */ - -extern void s5p6440_register_clocks (void ); -extern void s5p6440_setup_clocks (void ); - -#ifdef CONFIG_CPU_S5P6440 - -extern int s5p64x0_init (void ); -extern void s5p6440_init_irq (void ); -extern void s5p6440_map_io (void ); -extern void s5p6440_init_clocks (int xtal); - -extern void s5p6440_init_uarts (struct s3c2410_uartcfg *cfg,int no); - -#else -#define s5p6440_init_clocks NULL -#define s5p6440_init_uarts NULL -#define s5p6440_map_io NULL -#define s5p64x0_init NULL -#endif - -/* S5P6440 timer */ - -extern struct sys_timer s5p6440_timer;
arch/arm/plat-samsung/include/plat/s5p6450.h deleted +0 -36
@@ -1,36 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/s5p6450.h -* -* Copyright (c) 2010 Samsung Electronics Co., Ltd. -* http://www.samsung.com -* -* Header file for s5p6450 cpu support -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -/* Common init code for S5P6450 related SoCs */ - -extern void s5p6450_register_clocks (void ); -extern void s5p6450_setup_clocks (void ); - -#ifdef CONFIG_CPU_S5P6450 - -extern int s5p64x0_init (void ); -extern void s5p6450_init_irq (void ); -extern void s5p6450_map_io (void ); -extern void s5p6450_init_clocks (int xtal); - -extern void s5p6450_init_uarts (struct s3c2410_uartcfg *cfg,int no); - -#else -#define s5p6450_init_clocks NULL -#define s5p6450_init_uarts NULL -#define s5p6450_map_io NULL -#define s5p64x0_init NULL -#endif - -/* S5P6450 timer */ - -extern struct sys_timer s5p6450_timer;
Signature · 1 line
1.7.4.4
PATCH 4/12 ARM: restart: S5P64X0: use new restart hook
In reply to Kukjin KimHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-s5p64x0/common.c | 9 +++++++++ arch/arm/mach-s5p64x0/common.h | 2 ++ arch/arm/mach-s5p64x0/include/mach/system.h | 2 -- arch/arm/mach-s5p64x0/mach-smdk6440.c | 1 + arch/arm/mach-s5p64x0/mach-smdk6450.c | 1 + 5 files changed, 13 insertions(+), 2 deletions(-)
arch/arm/mach-s5p64x0/common.c +9 -0
@@ -45,6 +45,7 @@#include <plat/gpio-cfg.h> #include <plat/regs-irqtype.h> #include <plat/regs-serial.h> +#include <plat/watchdog-reset.h> #include "common.h"
@@ -457,3 +458,11 @@ static int __init s5p64x0_init_irq_eint(void)return ret; }arch_initcall (s5p64x0_init_irq_eint); + +void s5p64x0_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}
arch/arm/mach-s5p64x0/common.h +2 -0
@@ -22,6 +22,8 @@ void s5p6440_setup_clocks(void);void s5p6450_register_clocks (void );void s5p6450_setup_clocks (void ); +void s5p64x0_restart (char mode,const char *cmd); +#ifdef CONFIG_CPU_S5P6440 extern int s5p64x0_init (void );
arch/arm/mach-s5p64x0/include/mach/system.h +0 -2
@@ -13,8 +13,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H __FILE__ -#include <plat/system-reset.h> -static void arch_idle (void ) {/* nothing here yet */
arch/arm/mach-s5p64x0/mach-smdk6440.c +1 -0
@@ -248,4 +248,5 @@ MACHINE_START(SMDK6440, "SMDK6440") .map_io = smdk6440_map_io, .init_machine = smdk6440_machine_init, .timer = &s5p_timer, + .restart = s5p64x0_restart,MACHINE_END
arch/arm/mach-s5p64x0/mach-smdk6450.c +1 -0
@@ -268,4 +268,5 @@ MACHINE_START(SMDK6450, "SMDK6450") .map_io = smdk6450_map_io, .init_machine = smdk6450_machine_init, .timer = &s5p_timer, + .restart = s5p64x0_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 4/12 ARM: restart: S5P64X0: use new restart hook
Quoted 86 lines · Kukjin Kim
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Cc Ben Dooks <[email protected]>Cc Russell King <[email protected]>Signed-off-by Kukjin Kim <[email protected]>--- arch/arm/mach-s5p64x0/common.c | 9 +++++++++ arch/arm/mach-s5p64x0/common.h | 2 ++ arch/arm/mach-s5p64x0/include/mach/system.h | 2 -- arch/arm/mach-s5p64x0/mach-smdk6440.c | 1 + arch/arm/mach-s5p64x0/mach-smdk6450.c | 1 + 5 files changed, 13 insertions(+), 2 deletions(-)arch/arm/mach-s5p64x0/common.c +9
-0@@ -45,6 +45,7 @@#include <plat/gpio-cfg.h> #include <plat/regs-irqtype.h> #include <plat/regs-serial.h> +#include <plat/watchdog-reset.h> #include "common.h" @@ -457,3 +458,11 @@ static int __init s5p64x0_init_irq_eint(void)return ret; }arch_initcall (s5p64x0_init_irq_eint); + +void s5p64x0_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}arch/arm/mach-s5p64x0/common.h +2
-0@@ -22,6 +22,8 @@ void s5p6440_setup_clocks(void);void s5p6450_register_clocks (void );void s5p6450_setup_clocks (void ); +void s5p64x0_restart (char mode,const char *cmd); +#ifdef CONFIG_CPU_S5P6440 extern int s5p64x0_init (void );arch/arm/mach-s5p64x0/include/mach/system.h +0
-2@@ -13,8 +13,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H __FILE__ -#include <plat/system-reset.h> -static void arch_idle (void ) {/* nothing here yet */ arch/arm/mach-s5p64x0/mach-smdk6440.c +1
-0@@ -248,4 +248,5 @@ MACHINE_START(SMDK6440, "SMDK6440") .map_io = smdk6440_map_io, .init_machine = smdk6440_machine_init, .timer = &s5p_timer, + .restart = s5p64x0_restart,MACHINE_END arch/arm/mach-s5p64x0/mach-smdk6450.c +1
-1@@ -268,4 +268,5 @@ MACHINE_START(SMDK6450, "SMDK6450") .map_io = smdk6450_map_io, .init_machine = smdk6450_machine_init, .timer = &s5p_timer, + .restart = s5p64x0_restart,MACHINE_END --
Quoted 1 line
1.7.4.4
From: Kukjin Kim <[email protected]>
Subject: [PATCH V2 06/12] ARM: restart: S5P64X0: use new restart hook
Hook these platforms restart code into the new restart hook rather than using arch_reset().
---
Changes since v1:
- fixed the mis-deleting inclusion of <plat/system-reset.h> which includes arch_reset().
arch/arm/mach-s5p64x0/common.c | 9 +++++++++ arch/arm/mach-s5p64x0/common.h | 2 ++ arch/arm/mach-s5p64x0/mach-smdk6440.c | 1 + arch/arm/mach-s5p64x0/mach-smdk6450.c | 1 + 4 files changed, 13 insertions(+), 0 deletions(-)
arch/arm/mach-s5p64x0/common.c +9 -0
@@ -45,6 +45,7 @@#include <plat/gpio-cfg.h> #include <plat/regs-irqtype.h> #include <plat/regs-serial.h> +#include <plat/watchdog-reset.h> #include "common.h"
@@ -457,3 +458,11 @@ static int __init s5p64x0_init_irq_eint(void)return ret; }arch_initcall (s5p64x0_init_irq_eint); + +void s5p64x0_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}
arch/arm/mach-s5p64x0/common.h +2 -0
@@ -22,6 +22,8 @@ void s5p6440_setup_clocks(void);void s5p6450_register_clocks (void );void s5p6450_setup_clocks (void ); +void s5p64x0_restart (char mode,const char *cmd); +#ifdef CONFIG_CPU_S5P6440 extern int s5p64x0_init (void );
arch/arm/mach-s5p64x0/mach-smdk6440.c +1 -0
@@ -248,4 +248,5 @@ MACHINE_START(SMDK6440, "SMDK6440") .map_io = smdk6440_map_io, .init_machine = smdk6440_machine_init, .timer = &s5p_timer, + .restart = s5p64x0_restart,MACHINE_END
arch/arm/mach-s5p64x0/mach-smdk6450.c +1 -0
@@ -268,4 +268,5 @@ MACHINE_START(SMDK6450, "SMDK6450") .map_io = smdk6450_map_io, .init_machine = smdk6450_machine_init, .timer = &s5p_timer, + .restart = s5p64x0_restart,MACHINE_END
Signature · 7 lines
Thanks. Best regards, Kgene. -- Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 5/12 ARM: S5PC100: introduce arch/arm/mach-s5pc100/common.[ch]
In reply to Kukjin KimThis patch introduces common.[ch] which are used only in the arch/arm/mach-s5pc100/ directory. The common.c file merges the cpu.c and init.c which are used commonly on S5PC100 SoC and the common.h local header file replaces with plat/s5pc100.h file.
---
arch/arm/mach-s5pc100/Makefile | 29 ++++-----
arch/arm/mach-s5pc100/clock.c | 3 +-
arch/arm/mach-s5pc100/{cpu.c => common.c} | 94 ++++++++++++++++++++------
arch/arm/mach-s5pc100/common.h | 35 ++++++++++
arch/arm/mach-s5pc100/init.c | 24 -------
arch/arm/mach-s5pc100/mach-smdkc100.c | 5 +-
arch/arm/plat-s5p/cpu.c | 10 ---
arch/arm/plat-samsung/include/plat/s5pc100.h | 33 ---------
8 files changed, 127 insertions(+), 106 deletions(-)
rename arch/arm/mach-s5pc100/{cpu.c => common.c} (68%)
create mode 100644 arch/arm/mach-s5pc100/common.h
delete mode 100644 arch/arm/mach-s5pc100/init.c
delete mode 100644 arch/arm/plat-samsung/include/plat/s5pc100.harch/arm/mach-s5pc100/Makefile +13 -16
@@ -9,28 +9,25 @@ obj-m := obj-n := obj- := -# Core support for S5PC100 system +# Core -obj-$(CONFIG_CPU_S5PC100) += cpu.o init.o clock.o -obj-$(CONFIG_CPU_S5PC100) += setup-i2c0.o -obj-$(CONFIG_CPU_S5PC100) += dma.o +obj-y += common.o clock.o -# Helper and device support - -obj-$(CONFIG_S5PC100_SETUP_FB_24BPP) += setup-fb-24bpp.o -obj-$(CONFIG_S5PC100_SETUP_I2C1) += setup-i2c1.o -obj-$(CONFIG_S5PC100_SETUP_IDE) += setup-ide.o -obj-$(CONFIG_S5PC100_SETUP_KEYPAD) += setup-keypad.o -obj-$(CONFIG_S5PC100_SETUP_SDHCI) += setup-sdhci.o -obj-$(CONFIG_S5PC100_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o - -# device support -obj-y += dev-audio.o -obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o +obj-y += dma.o # machine support obj-$(CONFIG_MACH_SMDKC100) += mach-smdkc100.o # device support + obj-y += dev-audio.o +obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o + +obj-y += setup-i2c0.o +obj-$(CONFIG_S5PC100_SETUP_FB_24BPP) += setup-fb-24bpp.o +obj-$(CONFIG_S5PC100_SETUP_I2C1) += setup-i2c1.o +obj-$(CONFIG_S5PC100_SETUP_IDE) += setup-ide.o +obj-$(CONFIG_S5PC100_SETUP_KEYPAD) += setup-keypad.o +obj-$(CONFIG_S5PC100_SETUP_SDHCI) += setup-sdhci.o +obj-$(CONFIG_S5PC100_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
arch/arm/mach-s5pc100/clock.c +2 -1
@@ -27,7 +27,8 @@#include <plat/pll.h> #include <plat/s5p-clock.h> #include <plat/clock-clksrc.h> -#include <plat/s5pc100.h> + +#include "common.h" static struct clk s5p_clk_otgphy = { .name ="otg_phy" ,
arch/arm/mach-s5pc100/common.c renamed from arch/arm/mach-s5pc100/cpu.c +74 -20
151 lines not on this page · raw message
arch/arm/mach-s5pc100/common.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright (c) 2011 Samsung Electronics Co., Ltd. +* http://www.samsung.com +* +* Common Header for S5PC100 machines +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __ARCH_ARM_MACH_S5PC100_COMMON_H +#define __ARCH_ARM_MACH_S5PC100_COMMON_H + +void s5pc100_init_io (struct map_desc *mach_desc,int size); +void s5pc100_init_irq (void ); + +void s5pc100_register_clocks (void ); +void s5pc100_setup_clocks (void ); + +#ifdef CONFIG_CPU_S5PC100 + +extern int s5pc100_init (void ); +extern void s5pc100_map_io (void ); +extern void s5pc100_init_clocks (int xtal); +extern void s5pc100_init_uarts (struct s3c2410_uartcfg *cfg,int no); + +#else +#define s5pc100_init_clocks NULL +#define s5pc100_init_uarts NULL +#define s5pc100_map_io NULL +#define s5pc100_init NULL +#endif + +#endif /* __ARCH_ARM_MACH_S5PC100_COMMON_H */
arch/arm/mach-s5pc100/init.c deleted +0 -24
@@ -1,24 +0,0 @@ -/* linux/arch/arm/plat-s5pc100/s5pc100-init.c -* -* Copyright 2009 Samsung Electronics Co. -* Byungho Min <[email protected]> -* -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#include <linux/kernel.h> -#include <linux/types.h> -#include <linux/init.h> - -#include <plat/cpu.h> -#include <plat/devs.h> -#include <plat/s5pc100.h> - -/* uart registration process */ -void __init s5pc100_common_init_uarts (struct s3c2410_uartcfg *cfg,int no) -{ -s3c24xx_init_uartdevs ("s3c6400-uart" , s5p_uart_resources, cfg, no); -}
arch/arm/mach-s5pc100/mach-smdkc100.c +3 -2
@@ -43,7 +43,6 @@#include <plat/clock.h> #include <plat/devs.h> #include <plat/cpu.h> -#include <plat/s5pc100.h> #include <plat/fb.h> #include <plat/iic.h> #include <plat/ata.h>
@@ -54,6 +53,8 @@#include <plat/backlight.h> #include <plat/regs-fb-v4.h> +#include "common.h" +/* Following are default values for UCON, ULCON and UFCON UART registers */ #define SMDKC100_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -216,7 +217,7 @@ static struct platform_pwm_backlight_data smdkc100_bl_data = {static void __init smdkc100_map_io (void ) { -s5p_init_io (NULL ,0 ,S5P_VA_CHIPID ); +s5pc100_init_io (NULL ,0 );s3c24xx_init_clocks (12000000 );s3c24xx_init_uarts (smdkc100_uartcfgs,ARRAY_SIZE (smdkc100_uartcfgs)); }
arch/arm/plat-s5p/cpu.c +0 -10
@@ -20,13 +20,11 @@#include <mach/regs-clock.h> #include <plat/cpu.h> -#include <plat/s5pc100.h> #include <plat/s5pv210.h> #include <plat/exynos4.h> /* table of supported CPUs */ -static const char name_s5pc100[] ="S5PC100" ;static const char name_s5pv210[] ="S5PV210/S5PC110" ;static const char name_exynos4210[] ="EXYNOS4210" ;static const char name_exynos4212[] ="EXYNOS4212" ;
@@ -34,14 +32,6 @@ static const char name_exynos4412[] = "EXYNOS4412";static struct cpu_table cpu_ids[]__initdata = { { - .idcode =S5PC100_CPU_ID , - .idmask =S5PC100_CPU_MASK , - .map_io = s5pc100_map_io, - .init_clocks = s5pc100_init_clocks, - .init_uarts = s5pc100_init_uarts, - .init = s5pc100_init, - .name = name_s5pc100, - }, { .idcode =S5PV210_CPU_ID , .idmask =S5PV210_CPU_MASK , .map_io = s5pv210_map_io,
arch/arm/plat-samsung/include/plat/s5pc100.h deleted +0 -33
@@ -1,33 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/s5pc100.h -* -* Copyright (c) 2010 Samsung Electronics Co., Ltd. -* http://www.samsung.com/ -* -* Header file for s5pc100 cpu support -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -/* Common init code for S5PC100 related SoCs */ - -extern void s5pc100_common_init_uarts (struct s3c2410_uartcfg *cfg,int no); -extern void s5pc100_register_clocks (void ); -extern void s5pc100_setup_clocks (void ); - -#ifdef CONFIG_CPU_S5PC100 - -extern int s5pc100_init (void ); -extern void s5pc100_init_irq (void ); -extern void s5pc100_map_io (void ); -extern void s5pc100_init_clocks (int xtal); - -#define s5pc100_init_uarts s5pc100_common_init_uarts - -#else -#define s5pc100_init_clocks NULL -#define s5pc100_init_uarts NULL -#define s5pc100_map_io NULL -#define s5pc100_init NULL -#endif
Signature · 1 line
1.7.4.4
PATCH 6/12 ARM: restart: S5PC100: use new restart hook
In reply to Kukjin KimHook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-s5pc100/common.c | 9 +++++++++ arch/arm/mach-s5pc100/common.h | 2 ++ arch/arm/mach-s5pc100/include/mach/system.h | 2 -- arch/arm/mach-s5pc100/mach-smdkc100.c | 1 + 4 files changed, 12 insertions(+), 2 deletions(-)
arch/arm/mach-s5pc100/common.c +9 -0
@@ -45,6 +45,7 @@#include <plat/iic-core.h> #include <plat/onenand-core.h> #include <plat/regs-serial.h> +#include <plat/watchdog-reset.h> #include "common.h"
@@ -221,3 +222,11 @@ void __init s5pc100_init_uarts(struct s3c2410_uartcfg *cfg, int no) {s3c24xx_init_uartdevs ("s3c6400-uart" , s5p_uart_resources, cfg, no); } + +void s5pc100_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}
arch/arm/mach-s5pc100/common.h +2 -0
@@ -18,6 +18,8 @@ void s5pc100_init_irq(void);void s5pc100_register_clocks (void );void s5pc100_setup_clocks (void ); +void s5pc100_restart (char mode,const char *cmd); +#ifdef CONFIG_CPU_S5PC100 extern int s5pc100_init (void );
arch/arm/mach-s5pc100/include/mach/system.h +0 -2
@@ -11,8 +11,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H __FILE__ -#include <plat/system-reset.h> -static void arch_idle (void ) {/* nothing here yet */
arch/arm/mach-s5pc100/mach-smdkc100.c +1 -0
@@ -256,4 +256,5 @@ MACHINE_START(SMDKC100, "SMDKC100") .map_io = smdkc100_map_io, .init_machine = smdkc100_machine_init, .timer = &s3c24xx_timer, + .restart = s5pc100_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 6/12 ARM: restart: S5PC100: use new restart hook
Quoted 75 lines · Kukjin Kim
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Cc Ben Dooks <[email protected]>Cc Russell King <[email protected]>Signed-off-by Kukjin Kim <[email protected]>--- arch/arm/mach-s5pc100/common.c | 9 +++++++++ arch/arm/mach-s5pc100/common.h | 2 ++ arch/arm/mach-s5pc100/include/mach/system.h | 2 -- arch/arm/mach-s5pc100/mach-smdkc100.c | 1 + 4 files changed, 12 insertions(+), 2 deletions(-)arch/arm/mach-s5pc100/common.c +9
-0@@ -45,6 +45,7 @@#include <plat/iic-core.h> #include <plat/onenand-core.h> #include <plat/regs-serial.h> +#include <plat/watchdog-reset.h> #include "common.h" @@ -221,3 +222,11 @@ void __init s5pc100_init_uarts(struct s3c2410_uartcfg *cfg, int no) {s3c24xx_init_uartdevs ("s3c6400-uart" , s5p_uart_resources, cfg, no); } + +void s5pc100_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}arch/arm/mach-s5pc100/common.h +2
-0@@ -18,6 +18,8 @@ void s5pc100_init_irq(void);void s5pc100_register_clocks (void );void s5pc100_setup_clocks (void ); +void s5pc100_restart (char mode,const char *cmd); +#ifdef CONFIG_CPU_S5PC100 extern int s5pc100_init (void );arch/arm/mach-s5pc100/include/mach/system.h +0
-2@@ -11,8 +11,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H __FILE__ -#include <plat/system-reset.h> -static void arch_idle (void ) {/* nothing here yet */ arch/arm/mach-s5pc100/mach-smdkc100.c +1
-1@@ -256,4 +256,5 @@ MACHINE_START(SMDKC100, "SMDKC100") .map_io = smdkc100_map_io, .init_machine = smdkc100_machine_init, .timer = &s3c24xx_timer, + .restart = s5pc100_restart,MACHINE_END --
Quoted 1 line
1.7.4.4
From: Kukjin Kim <[email protected]>
Subject: [PATCH V2 07/12] ARM: restart: S5PC100: use new restart hook
Hook these platforms restart code into the new restart hook rather than using arch_reset().
---
Changes since v1:
- fixed the mis-deleting inclusion of <plat/system-reset.h> which includes arch_reset().
arch/arm/mach-s5pc100/common.c | 9 +++++++++ arch/arm/mach-s5pc100/common.h | 2 ++ arch/arm/mach-s5pc100/mach-smdkc100.c | 1 + 3 files changed, 12 insertions(+), 0 deletions(-)
arch/arm/mach-s5pc100/common.c +9 -0
@@ -45,6 +45,7 @@#include <plat/iic-core.h> #include <plat/onenand-core.h> #include <plat/regs-serial.h> +#include <plat/watchdog-reset.h> #include "common.h"
@@ -221,3 +222,11 @@ void __init s5pc100_init_uarts(struct s3c2410_uartcfg *cfg, int no) {s3c24xx_init_uartdevs ("s3c6400-uart" , s5p_uart_resources, cfg, no); } + +void s5pc100_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}
arch/arm/mach-s5pc100/common.h +2 -0
@@ -18,6 +18,8 @@ void s5pc100_init_irq(void);void s5pc100_register_clocks (void );void s5pc100_setup_clocks (void ); +void s5pc100_restart (char mode,const char *cmd); +#ifdef CONFIG_CPU_S5PC100 extern int s5pc100_init (void );
arch/arm/mach-s5pc100/mach-smdkc100.c +1 -0
@@ -256,4 +256,5 @@ MACHINE_START(SMDKC100, "SMDKC100") .map_io = smdkc100_map_io, .init_machine = smdkc100_machine_init, .timer = &s3c24xx_timer, + .restart = s5pc100_restart,MACHINE_END
Signature · 7 lines
Thanks. Best regards, Kgene. -- Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 7/12 ARM: S5PV210: introduce arch/arm/mach-s5pv210/common.[ch]
In reply to Kukjin KimThis patch introduces common.[ch] which are used only in the arch/arm/mach-s5pv210/ directory. The common.c file merges the cpu.c and init.c which are used commonly on S5PCV210/S5PC100 SoC and the common.h local header file replaces with plat/s5pv210.h file.
---
arch/arm/mach-s5pv210/Makefile | 19 +++--
arch/arm/mach-s5pv210/clock.c | 3 +-
arch/arm/mach-s5pv210/{cpu.c => common.c} | 109 ++++++++++++++++++++++----
arch/arm/mach-s5pv210/common.h | 35 ++++++++
arch/arm/mach-s5pv210/init.c | 44 ----------
arch/arm/mach-s5pv210/mach-aquila.c | 5 +-
arch/arm/mach-s5pv210/mach-goni.c | 5 +-
arch/arm/mach-s5pv210/mach-smdkc110.c | 5 +-
arch/arm/mach-s5pv210/mach-smdkv210.c | 5 +-
arch/arm/mach-s5pv210/mach-torbreck.c | 5 +-
arch/arm/plat-s5p/cpu.c | 10 ---
arch/arm/plat-samsung/include/plat/s5pv210.h | 33 --------
12 files changed, 158 insertions(+), 120 deletions(-)
rename arch/arm/mach-s5pv210/{cpu.c => common.c} (68%)
create mode 100644 arch/arm/mach-s5pv210/common.h
delete mode 100644 arch/arm/mach-s5pv210/init.c
delete mode 100644 arch/arm/plat-samsung/include/plat/s5pv210.harch/arm/mach-s5pv210/Makefile +11 -8
@@ -10,18 +10,20 @@ obj-m := obj-n := obj- := -# Core support for S5PV210 system +# Core + +obj-y += common.o clock.o -obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o dma.o -obj-$(CONFIG_CPU_S5PV210) += setup-i2c0.o obj-$(CONFIG_PM) += pm.o +obj-y += dma.o + # machine support obj-$(CONFIG_MACH_AQUILA) += mach-aquila.o -obj-$(CONFIG_MACH_SMDKV210) += mach-smdkv210.o -obj-$(CONFIG_MACH_SMDKC110) += mach-smdkc110.o obj-$(CONFIG_MACH_GONI) += mach-goni.o +obj-$(CONFIG_MACH_SMDKC110) += mach-smdkc110.o +obj-$(CONFIG_MACH_SMDKV210) += mach-smdkv210.o obj-$(CONFIG_MACH_TORBRECK) += mach-torbreck.o # device support
@@ -29,11 +31,12 @@ obj-$(CONFIG_MACH_TORBRECK) += mach-torbreck.o obj-y += dev-audio.o obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o +obj-y += setup-i2c0.o obj-$(CONFIG_S5PV210_SETUP_FB_24BPP) += setup-fb-24bpp.o obj-$(CONFIG_S5PV210_SETUP_FIMC) += setup-fimc.o -obj-$(CONFIG_S5PV210_SETUP_I2C1) += setup-i2c1.o -obj-$(CONFIG_S5PV210_SETUP_I2C2) += setup-i2c2.o +obj-$(CONFIG_S5PV210_SETUP_I2C1) += setup-i2c1.o +obj-$(CONFIG_S5PV210_SETUP_I2C2) += setup-i2c2.o obj-$(CONFIG_S5PV210_SETUP_IDE) += setup-ide.o obj-$(CONFIG_S5PV210_SETUP_KEYPAD) += setup-keypad.o -obj-$(CONFIG_S5PV210_SETUP_SDHCI) += setup-sdhci.o +obj-$(CONFIG_S5PV210_SETUP_SDHCI) += setup-sdhci.o obj-$(CONFIG_S5PV210_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
arch/arm/mach-s5pv210/clock.c +2 -1
@@ -29,7 +29,8 @@#include <plat/pll.h> #include <plat/s5p-clock.h> #include <plat/clock-clksrc.h> -#include <plat/s5pv210.h> + +#include "common.h" static unsigned long xtal;
arch/arm/mach-s5pv210/common.c renamed from arch/arm/mach-s5pv210/cpu.c +95 -14
164 lines not on this page · raw message
arch/arm/mach-s5pv210/common.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright (c) 2011 Samsung Electronics Co., Ltd. +* http://www.samsung.com +* +* Common Header for S5PV210 machines +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __ARCH_ARM_MACH_S5PV210_COMMON_H +#define __ARCH_ARM_MACH_S5PV210_COMMON_H + +void s5pv210_init_io (struct map_desc *mach_desc,int size); +void s5pv210_init_irq (void ); + +void s5pv210_register_clocks (void ); +void s5pv210_setup_clocks (void ); + +#ifdef CONFIG_CPU_S5PV210 + +extern int s5pv210_init (void ); +extern void s5pv210_map_io (void ); +extern void s5pv210_init_clocks (int xtal); +extern void s5pv210_init_uarts (struct s3c2410_uartcfg *cfg,int no); + +#else +#define s5pv210_init_clocks NULL +#define s5pv210_init_uarts NULL +#define s5pv210_map_io NULL +#define s5pv210_init NULL +#endif + +#endif /* __ARCH_ARM_MACH_S5PV210_COMMON_H */
arch/arm/mach-s5pv210/init.c deleted +0 -44
44 lines not on this page · raw message
arch/arm/mach-s5pv210/mach-aquila.c +3 -2
@@ -33,7 +33,6 @@#include <plat/gpio-cfg.h> #include <plat/regs-serial.h> -#include <plat/s5pv210.h> #include <plat/devs.h> #include <plat/cpu.h> #include <plat/fb.h>
@@ -42,6 +41,8 @@#include <plat/s5p-time.h> #include <plat/regs-fb-v4.h> +#include "common.h" +/* Following are default values for UCON, ULCON and UFCON UART registers */ #define AQUILA_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -645,7 +646,7 @@ static void __init aquila_sound_init(void)static void __init aquila_map_io (void ) { -s5p_init_io (NULL ,0 ,S5P_VA_CHIPID ); +s5pv210_init_io (NULL ,0 );s3c24xx_init_clocks (24000000 );s3c24xx_init_uarts (aquila_uartcfgs,ARRAY_SIZE (aquila_uartcfgs));s5p_set_timer_source (S5P_PWM3 ,S5P_PWM4 );
arch/arm/mach-s5pv210/mach-goni.c +3 -2
@@ -38,7 +38,6 @@#include <plat/gpio-cfg.h> #include <plat/regs-serial.h> -#include <plat/s5pv210.h> #include <plat/devs.h> #include <plat/cpu.h> #include <plat/fb.h>
@@ -55,6 +54,8 @@#include <media/s5p_fimc.h> #include <media/noon010pc30.h> +#include "common.h" +/* Following are default values for UCON, ULCON and UFCON UART registers */ #define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -891,7 +892,7 @@ static void __init goni_sound_init(void)static void __init goni_map_io (void ) { -s5p_init_io (NULL ,0 ,S5P_VA_CHIPID ); +s5pv210_init_io (NULL ,0 );s3c24xx_init_clocks (24000000 );s3c24xx_init_uarts (goni_uartcfgs,ARRAY_SIZE (goni_uartcfgs));s5p_set_timer_source (S5P_PWM3 ,S5P_PWM4 );
arch/arm/mach-s5pv210/mach-smdkc110.c +3 -2
@@ -25,7 +25,6 @@#include <mach/regs-clock.h> #include <plat/regs-serial.h> -#include <plat/s5pv210.h> #include <plat/devs.h> #include <plat/cpu.h> #include <plat/ata.h>
@@ -33,6 +32,8 @@#include <plat/pm.h> #include <plat/s5p-time.h> +#include "common.h" +/* Following are default values for UCON, ULCON and UFCON UART registers */ #define SMDKC110_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -110,7 +111,7 @@ static struct i2c_board_info smdkc110_i2c_devs2[] __initdata = {static void __init smdkc110_map_io (void ) { -s5p_init_io (NULL ,0 ,S5P_VA_CHIPID ); +s5pv210_init_io (NULL ,0 );s3c24xx_init_clocks (24000000 );s3c24xx_init_uarts (smdkv210_uartcfgs,ARRAY_SIZE (smdkv210_uartcfgs));s5p_set_timer_source (S5P_PWM3 ,S5P_PWM4 );
arch/arm/mach-s5pv210/mach-smdkv210.c +3 -2
@@ -34,7 +34,6 @@#include <plat/regs-serial.h> #include <plat/regs-srom.h> #include <plat/gpio-cfg.h> -#include <plat/s5pv210.h> #include <plat/devs.h> #include <plat/cpu.h> #include <plat/adc.h>
@@ -48,6 +47,8 @@#include <plat/backlight.h> #include <plat/regs-fb-v4.h> +#include "common.h" +/* Following are default values for UCON, ULCON and UFCON UART registers */ #define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -278,7 +279,7 @@ static struct platform_pwm_backlight_data smdkv210_bl_data = {static void __init smdkv210_map_io (void ) { -s5p_init_io (NULL ,0 ,S5P_VA_CHIPID ); +s5pv210_init_io (NULL ,0 );s3c24xx_init_clocks (24000000 );s3c24xx_init_uarts (smdkv210_uartcfgs,ARRAY_SIZE (smdkv210_uartcfgs));s5p_set_timer_source (S5P_PWM2 ,S5P_PWM4 );
arch/arm/mach-s5pv210/mach-torbreck.c +3 -2
@@ -24,12 +24,13 @@#include <mach/regs-clock.h> #include <plat/regs-serial.h> -#include <plat/s5pv210.h> #include <plat/devs.h> #include <plat/cpu.h> #include <plat/iic.h> #include <plat/s5p-time.h> +#include "common.h" +/* Following are default values for UCON, ULCON and UFCON UART registers */ #define TORBRECK_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -103,7 +104,7 @@ static struct i2c_board_info torbreck_i2c_devs2[] __initdata = {static void __init torbreck_map_io (void ) { -s5p_init_io (NULL ,0 ,S5P_VA_CHIPID ); +s5pv210_init_io (NULL ,0 );s3c24xx_init_clocks (24000000 );s3c24xx_init_uarts (torbreck_uartcfgs,ARRAY_SIZE (torbreck_uartcfgs));s5p_set_timer_source (S5P_PWM3 ,S5P_PWM4 );
arch/arm/plat-s5p/cpu.c +0 -10
@@ -20,26 +20,16 @@#include <mach/regs-clock.h> #include <plat/cpu.h> -#include <plat/s5pv210.h> #include <plat/exynos4.h> /* table of supported CPUs */ -static const char name_s5pv210[] ="S5PV210/S5PC110" ;static const char name_exynos4210[] ="EXYNOS4210" ;static const char name_exynos4212[] ="EXYNOS4212" ;static const char name_exynos4412[] ="EXYNOS4412" ;static struct cpu_table cpu_ids[]__initdata = { { - .idcode =S5PV210_CPU_ID , - .idmask =S5PV210_CPU_MASK , - .map_io = s5pv210_map_io, - .init_clocks = s5pv210_init_clocks, - .init_uarts = s5pv210_init_uarts, - .init = s5pv210_init, - .name = name_s5pv210, - }, { .idcode =EXYNOS4210_CPU_ID , .idmask =EXYNOS4_CPU_MASK , .map_io = exynos4_map_io,
arch/arm/plat-samsung/include/plat/s5pv210.h deleted +0 -33
@@ -1,33 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/s5pv210.h -* -* Copyright (c) 2010 Samsung Electronics Co., Ltd. -* http://www.samsung.com/ -* -* Header file for s5pv210 cpu support -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -/* Common init code for S5PV210 related SoCs */ - -extern void s5pv210_common_init_uarts (struct s3c2410_uartcfg *cfg,int no); -extern void s5pv210_register_clocks (void ); -extern void s5pv210_setup_clocks (void ); - -#ifdef CONFIG_CPU_S5PV210 - -extern int s5pv210_init (void ); -extern void s5pv210_init_irq (void ); -extern void s5pv210_map_io (void ); -extern void s5pv210_init_clocks (int xtal); - -#define s5pv210_init_uarts s5pv210_common_init_uarts - -#else -#define s5pv210_init_clocks NULL -#define s5pv210_init_uarts NULL -#define s5pv210_map_io NULL -#define s5pv210_init NULL -#endif
Signature · 1 line
1.7.4.4
PATCH 7/12 ARM: S5PV210: introduce arch/arm/mach-s5pv210/common.[ch]
Quoted 5 lines · Kukjin Kim
This patch introduces common.[ch] which are used only in the
arch/arm/mach-s5pv210/directory. Thecommon.cfile merges thecpu.candinit.cwhich are used commonly on S5PCV210/S5PC100 SoC and thecommon.hlocal header file replaces withplat/s5pv210.hfile.
Note that the patch system does _not_ deal in any way with replacing patch comments. Comments added against a patch already submitted to the patch system containing an attributation get _added_ to the initial comment.
So, it ends up looking like this:
ARM: 7248/1: S5PV210: introduce arch/arm/mach-s5pv210/common.[ch
This patch introduces common.[ch] which are used only in the arch/arm/mach-s5pv210/ directory. The common.c file merges the cpu.c and init.c which are used commonly on S5PCV210/S5PC100 SoC and the common.h local header file replaces with plat/s5pv210.h file.
Comments from Kukjin Kim:
Subject: [PATCH 04/12] ARM: S5PV210: introduce arch/arm/mach-s5pv210/common.[ch]
This patch introduces common.[ch] which are used only in the arch/arm/mach-s5pv210/ directory. The common.c file merges the cpu.c and init.c which are used commonly on S5PCV210/S5PC100 SoC and the common.h local header file replaces with plat/s5pv210.h file.
---
Changes: fixed missing ']' at the end of the subject
which I think you can agree is not good. If you want to _change_ the initial comments, please resubmit the patch entirely.
PATCH 8/12 ARM: restart: S5PV210: use new restart hook
In reply to Kukjin KimFrom: Russell King <[email protected]>
Hook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-s5pv210/common.c | 6 +----- arch/arm/mach-s5pv210/common.h | 2 ++ arch/arm/mach-s5pv210/include/mach/system.h | 2 -- arch/arm/mach-s5pv210/mach-aquila.c | 1 + arch/arm/mach-s5pv210/mach-goni.c | 1 + arch/arm/mach-s5pv210/mach-smdkc110.c | 1 + arch/arm/mach-s5pv210/mach-smdkv210.c | 1 + arch/arm/mach-s5pv210/mach-torbreck.c | 1 + 8 files changed, 8 insertions(+), 7 deletions(-)
arch/arm/mach-s5pv210/common.c +1 -5
@@ -35,7 +35,6 @@#include <plat/cpu.h> #include <plat/clock.h> #include <plat/devs.h> -#include <plat/reset.h> #include <plat/sdhci.h> #include <plat/adc-core.h> #include <plat/ata-core.h>
@@ -151,7 +150,7 @@ static void s5pv210_idle(void)local_irq_enable (); } -static void s5pv210_sw_reset (void ) +void s5pv210_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }
@@ -251,9 +250,6 @@ int __init s5pv210_init(void)/* set idle function */ pm_idle = s5pv210_idle; -/* set sw_reset function */ - s5p_reset_hook = s5pv210_sw_reset; -return sysdev_register (&s5pv210_sysdev); }
arch/arm/mach-s5pv210/common.h +2 -0
@@ -18,6 +18,8 @@ void s5pv210_init_irq(void);void s5pv210_register_clocks (void );void s5pv210_setup_clocks (void ); +void s5pv210_restart (char mode,const char *cmd); +#ifdef CONFIG_CPU_S5PV210 extern int s5pv210_init (void );
arch/arm/mach-s5pv210/include/mach/system.h +0 -2
@@ -13,8 +13,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H __FILE__ -#include <plat/system-reset.h> -static void arch_idle (void ) {/* nothing here yet */
arch/arm/mach-s5pv210/mach-aquila.c +1 -0
@@ -686,4 +686,5 @@ MACHINE_START(AQUILA, "Aquila") .map_io = aquila_map_io, .init_machine = aquila_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END
arch/arm/mach-s5pv210/mach-goni.c +1 -0
@@ -963,4 +963,5 @@ MACHINE_START(GONI, "GONI") .init_machine = goni_machine_init, .timer = &s5p_timer, .reserve = &goni_reserve, + .restart = s5pv210_restart,MACHINE_END
arch/arm/mach-s5pv210/mach-smdkc110.c +1 -0
@@ -144,4 +144,5 @@ MACHINE_START(SMDKC110, "SMDKC110") .map_io = smdkc110_map_io, .init_machine = smdkc110_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END
arch/arm/mach-s5pv210/mach-smdkv210.c +1 -0
@@ -321,4 +321,5 @@ MACHINE_START(SMDKV210, "SMDKV210") .map_io = smdkv210_map_io, .init_machine = smdkv210_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END
arch/arm/mach-s5pv210/mach-torbreck.c +1 -0
@@ -133,4 +133,5 @@ MACHINE_START(TORBRECK, "TORBRECK") .map_io = torbreck_map_io, .init_machine = torbreck_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END
Signature · 1 line
1.7.4.4
PATCH 8/12 ARM: restart: S5PV210: use new restart hook
Quoted 128 lines · Kukjin Kim
From: Russell King <[email protected]>
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>[kgene.kim at samsung.com: according to local header, updated]Signed-off-by Kukjin Kim <[email protected]>--- arch/arm/mach-s5pv210/common.c | 6 +----- arch/arm/mach-s5pv210/common.h | 2 ++ arch/arm/mach-s5pv210/include/mach/system.h | 2 -- arch/arm/mach-s5pv210/mach-aquila.c | 1 + arch/arm/mach-s5pv210/mach-goni.c | 1 + arch/arm/mach-s5pv210/mach-smdkc110.c | 1 + arch/arm/mach-s5pv210/mach-smdkv210.c | 1 + arch/arm/mach-s5pv210/mach-torbreck.c | 1 + 8 files changed, 8 insertions(+), 7 deletions(-)arch/arm/mach-s5pv210/common.c +1
-5@@ -35,7 +35,6 @@#include <plat/cpu.h> #include <plat/clock.h> #include <plat/devs.h> -#include <plat/reset.h> #include <plat/sdhci.h> #include <plat/adc-core.h> #include <plat/ata-core.h> @@ -151,7 +150,7 @@ static void s5pv210_idle(void)local_irq_enable (); } -static void s5pv210_sw_reset (void ) +void s5pv210_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }@@ -251,9 +250,6 @@ int __init s5pv210_init(void)/* set idle function */ pm_idle = s5pv210_idle; -/* set sw_reset function */ - s5p_reset_hook = s5pv210_sw_reset; -return sysdev_register (&s5pv210_sysdev); }arch/arm/mach-s5pv210/common.h +2
-0@@ -18,6 +18,8 @@ void s5pv210_init_irq(void);void s5pv210_register_clocks (void );void s5pv210_setup_clocks (void ); +void s5pv210_restart (char mode,const char *cmd); +#ifdef CONFIG_CPU_S5PV210 extern int s5pv210_init (void );arch/arm/mach-s5pv210/include/mach/system.h +0
-2@@ -13,8 +13,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H __FILE__ -#include <plat/system-reset.h> -static void arch_idle (void ) {/* nothing here yet */ arch/arm/mach-s5pv210/mach-aquila.c +1
-0@@ -686,4 +686,5 @@ MACHINE_START(AQUILA, "Aquila") .map_io = aquila_map_io, .init_machine = aquila_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END arch/arm/mach-s5pv210/mach-goni.c +1
-0@@ -963,4 +963,5 @@ MACHINE_START(GONI, "GONI") .init_machine = goni_machine_init, .timer = &s5p_timer, .reserve = &goni_reserve, + .restart = s5pv210_restart,MACHINE_END arch/arm/mach-s5pv210/mach-smdkc110.c +1
-0@@ -144,4 +144,5 @@ MACHINE_START(SMDKC110, "SMDKC110") .map_io = smdkc110_map_io, .init_machine = smdkc110_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END arch/arm/mach-s5pv210/mach-smdkv210.c +1
-0@@ -321,4 +321,5 @@ MACHINE_START(SMDKV210, "SMDKV210") .map_io = smdkv210_map_io, .init_machine = smdkv210_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END arch/arm/mach-s5pv210/mach-torbreck.c +1
-1@@ -133,4 +133,5 @@ MACHINE_START(TORBRECK, "TORBRECK") .map_io = torbreck_map_io, .init_machine = torbreck_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END --
Quoted 1 line
1.7.4.4
From: Russell King <[email protected]>
Subject: [PATCH V2 08/12] ARM: restart: S5PV210: use new restart hook
Hook these platforms restart code into the new restart hook rather than using arch_reset().
---
Changes since v1:
- fixed the mis-deleting inclusion of <plat/system-reset.h> which includes arch_reset().
arch/arm/mach-s5pv210/common.c | 6 +----- arch/arm/mach-s5pv210/common.h | 2 ++ arch/arm/mach-s5pv210/mach-aquila.c | 1 + arch/arm/mach-s5pv210/mach-goni.c | 1 + arch/arm/mach-s5pv210/mach-smdkc110.c | 1 + arch/arm/mach-s5pv210/mach-smdkv210.c | 1 + arch/arm/mach-s5pv210/mach-torbreck.c | 1 + 7 files changed, 8 insertions(+), 5 deletions(-)
arch/arm/mach-s5pv210/common.c +1 -5
@@ -35,7 +35,6 @@#include <plat/cpu.h> #include <plat/clock.h> #include <plat/devs.h> -#include <plat/reset.h> #include <plat/sdhci.h> #include <plat/adc-core.h> #include <plat/ata-core.h>
@@ -151,7 +150,7 @@ static void s5pv210_idle(void)local_irq_enable (); } -static void s5pv210_sw_reset (void ) +void s5pv210_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }
@@ -251,9 +250,6 @@ int __init s5pv210_init(void)/* set idle function */ pm_idle = s5pv210_idle; -/* set sw_reset function */ - s5p_reset_hook = s5pv210_sw_reset; -return sysdev_register (&s5pv210_sysdev); }
arch/arm/mach-s5pv210/common.h +2 -0
@@ -18,6 +18,8 @@ void s5pv210_init_irq(void);void s5pv210_register_clocks (void );void s5pv210_setup_clocks (void ); +void s5pv210_restart (char mode,const char *cmd); +#ifdef CONFIG_CPU_S5PV210 extern int s5pv210_init (void );
arch/arm/mach-s5pv210/mach-aquila.c +1 -0
@@ -686,4 +686,5 @@ MACHINE_START(AQUILA, "Aquila") .map_io = aquila_map_io, .init_machine = aquila_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END
arch/arm/mach-s5pv210/mach-goni.c +1 -0
@@ -963,4 +963,5 @@ MACHINE_START(GONI, "GONI") .init_machine = goni_machine_init, .timer = &s5p_timer, .reserve = &goni_reserve, + .restart = s5pv210_restart,MACHINE_END
arch/arm/mach-s5pv210/mach-smdkc110.c +1 -0
@@ -144,4 +144,5 @@ MACHINE_START(SMDKC110, "SMDKC110") .map_io = smdkc110_map_io, .init_machine = smdkc110_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END
arch/arm/mach-s5pv210/mach-smdkv210.c +1 -0
@@ -321,4 +321,5 @@ MACHINE_START(SMDKV210, "SMDKV210") .map_io = smdkv210_map_io, .init_machine = smdkv210_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END
arch/arm/mach-s5pv210/mach-torbreck.c +1 -0
@@ -133,4 +133,5 @@ MACHINE_START(TORBRECK, "TORBRECK") .map_io = torbreck_map_io, .init_machine = torbreck_machine_init, .timer = &s5p_timer, + .restart = s5pv210_restart,MACHINE_END
Signature · 7 lines
Thanks. Best regards, Kgene. -- Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 9/12 ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
In reply to Kukjin KimThis patch introduces common.[ch] which are used only in the arch/arm/mach-exynos/ directory. The common.c file merges the cpu.c, init.c, irq-combiner.c and irq-eint.c files which are used commonly on EXYNOS SoCs and the common.h file replaces with plat/exynos4.h file.
--- arch/arm/mach-exynos/Makefile | 9 +- arch/arm/mach-exynos/clock-exynos4210.c | 3 +- arch/arm/mach-exynos/clock-exynos4212.c | 3 +- arch/arm/mach-exynos/clock.c | 3 +- arch/arm/mach-exynos/common.c | 709 ++++++++++++++++++++++++++ arch/arm/mach-exynos/common.h | 39 ++ arch/arm/mach-exynos/cpu.c | 284 ---------- arch/arm/mach-exynos/include/mach/map.h | 12 +- arch/arm/mach-exynos/init.c | 42 -- arch/arm/mach-exynos/irq-combiner.c | 124 ----- arch/arm/mach-exynos/irq-eint.c | 237 --------- arch/arm/mach-exynos/mach-armlex4210.c | 5 +- arch/arm/mach-exynos/mach-nuri.c | 5 +- arch/arm/mach-exynos/mach-origen.c | 5 +- arch/arm/mach-exynos/mach-smdk4x12.c | 5 +- arch/arm/mach-exynos/mach-smdkv310.c | 5 +- arch/arm/mach-exynos/mach-universal_c210.c | 5 +- arch/arm/plat-s5p/Makefile | 1 - arch/arm/plat-s5p/cpu.c | 104 ---- arch/arm/plat-samsung/include/plat/cpu.h | 2 - arch/arm/plat-samsung/include/plat/exynos4.h | 35 -- 21 files changed, 779 insertions(+), 858 deletions(-) create mode 100644 arch/arm/mach-exynos/common.c create mode 100644 arch/arm/mach-exynos/common.h delete mode 100644 arch/arm/mach-exynos/cpu.c delete mode 100644 arch/arm/mach-exynos/init.c delete mode 100644 arch/arm/mach-exynos/irq-combiner.c delete mode 100644 arch/arm/mach-exynos/irq-eint.c delete mode 100644 arch/arm/plat-s5p/cpu.c delete mode 100644 arch/arm/plat-samsung/include/plat/exynos4.h
arch/arm/mach-exynos/Makefile +6 -3
@@ -10,15 +10,17 @@ obj-m := obj-n := obj- := -# Core support for EXYNOS4 system +# Core -obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o setup-i2c0.o -obj-$(CONFIG_ARCH_EXYNOS4) += irq-eint.o dma.o pmu.o +obj-$(CONFIG_ARCH_EXYNOS4) += common.o clock.o obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o + obj-$(CONFIG_PM) += pm.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o +obj-$(CONFIG_ARCH_EXYNOS4) += dma.o pmu.o + obj-$(CONFIG_SMP) += platsmp.o headsmp.o obj-$(CONFIG_EXYNOS4_MCT) += mct.o
@@ -45,6 +47,7 @@ obj-$(CONFIG_EXYNOS4_DEV_PD) += dev-pd.o obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o +obj-$(CONFIG_ARCH_EXYNOS4) += setup-i2c0.o obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o obj-$(CONFIG_EXYNOS4_SETUP_I2C1) += setup-i2c1.o
arch/arm/mach-exynos/clock-exynos4210.c +2 -1
@@ -23,7 +23,6 @@#include <plat/pll.h> #include <plat/s5p-clock.h> #include <plat/clock-clksrc.h> -#include <plat/exynos4.h> #include <plat/pm.h> #include <mach/hardware.h>
@@ -31,6 +30,8 @@#include <mach/regs-clock.h> #include <mach/exynos4-clock.h> +#include "common.h" +static struct sleep_save exynos4210_clock_save[] = {SAVE_ITEM (S5P_CLKSRC_IMAGE ),SAVE_ITEM (S5P_CLKSRC_LCD1 ),
arch/arm/mach-exynos/clock-exynos4212.c +2 -1
@@ -23,7 +23,6 @@#include <plat/pll.h> #include <plat/s5p-clock.h> #include <plat/clock-clksrc.h> -#include <plat/exynos4.h> #include <plat/pm.h> #include <mach/hardware.h>
@@ -31,6 +30,8 @@#include <mach/regs-clock.h> #include <mach/exynos4-clock.h> +#include "common.h" +static struct sleep_save exynos4212_clock_save[] = {SAVE_ITEM (S5P_CLKSRC_IMAGE ),SAVE_ITEM (S5P_CLKDIV_IMAGE ),
arch/arm/mach-exynos/clock.c +2 -1
@@ -21,7 +21,6 @@#include <plat/pll.h> #include <plat/s5p-clock.h> #include <plat/clock-clksrc.h> -#include <plat/exynos4.h> #include <plat/pm.h> #include <mach/map.h>
@@ -29,6 +28,8 @@#include <mach/sysmmu.h> #include <mach/exynos4-clock.h> +#include "common.h" +static struct sleep_save exynos4_clock_save[] = {SAVE_ITEM (S5P_CLKDIV_LEFTBUS ),SAVE_ITEM (S5P_CLKGATE_IP_LEFTBUS ),
arch/arm/mach-exynos/common.c new file +709 -0
709 lines not on this page · raw message
arch/arm/mach-exynos/common.h new file +39 -0
@@ -0,0 +1,39 @@ +/* +* Copyright (c) 2011 Samsung Electronics Co., Ltd. +* http://www.samsung.com +* +* Common Header for EXYNOS machines +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H +#define __ARCH_ARM_MACH_EXYNOS_COMMON_H + +void exynos_init_io (struct map_desc *mach_desc,int size); +void exynos4_init_irq (void ); + +void exynos4_register_clocks (void ); +void exynos4_setup_clocks (void ); + +void exynos4210_register_clocks (void ); +void exynos4212_register_clocks (void ); + +extern struct sys_timer exynos4_timer; + +#ifdef CONFIG_ARCH_EXYNOS +extern int exynos_init (void ); +extern void exynos4_map_io (void ); +extern void exynos4_init_clocks (int xtal); +extern void exynos4_init_uarts (struct s3c2410_uartcfg *cfg,int no); + +#else +#define exynos4_init_clocks NULL +#define exynos4_init_uarts NULL +#define exynos4_map_io NULL +#define exynos_init NULL +#endif + +#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
arch/arm/mach-exynos/cpu.c deleted +0 -284
284 lines not on this page · raw message
arch/arm/mach-exynos/include/mach/map.h +1 -11
@@ -149,7 +149,6 @@#define S3C_PA_WDT EXYNOS4_PA_WATCHDOG#define S3C_PA_UART EXYNOS4_PA_UART -#define S5P_PA_CHIPID EXYNOS4_PA_CHIPID#define S5P_PA_EHCI EXYNOS4_PA_EHCI#define S5P_PA_FIMC0 EXYNOS4_PA_FIMC0#define S5P_PA_FIMC1 EXYNOS4_PA_FIMC1
@@ -166,26 +165,17 @@#define S5P_PA_ONENAND_DMA EXYNOS4_PA_ONENAND_DMA#define S5P_PA_SDO EXYNOS4_PA_SDO#define S5P_PA_SDRAM EXYNOS4_PA_SDRAM -#define S5P_PA_SROMC EXYNOS4_PA_SROMC -#define S5P_PA_SYSCON EXYNOS4_PA_SYSCON -#define S5P_PA_TIMER EXYNOS4_PA_TIMER#define S5P_PA_VP EXYNOS4_PA_VP#define SAMSUNG_PA_ADC EXYNOS4_PA_ADC#define SAMSUNG_PA_ADC1 EXYNOS4_PA_ADC1#define SAMSUNG_PA_KEYPAD EXYNOS4_PA_KEYPAD -#define EXYNOS_PA_COMBINER EXYNOS4_PA_COMBINER -#define EXYNOS_PA_GIC_CPU EXYNOS4_PA_GIC_CPU -#define EXYNOS_PA_GIC_DIST EXYNOS4_PA_GIC_DIST -#define EXYNOS_PA_PMU EXYNOS4_PA_PMU -#define EXYNOS_PA_SYSTIMER EXYNOS4_PA_SYSTIMER -/* Compatibility UART */ #define S3C_VA_UARTx (x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) -#define S5P_PA_UART (x) (S3C_PA_UART + ((x) * S3C_UART_OFFSET)) +#define S5P_PA_UART (x) (EXYNOS4_PA_UART + ((x) * S3C_UART_OFFSET))#define S5P_PA_UART0 S5P_PA_UART(0)#define S5P_PA_UART1 S5P_PA_UART(1)#define S5P_PA_UART2 S5P_PA_UART(2)
arch/arm/mach-exynos/init.c deleted +0 -42
42 lines not on this page · raw message
arch/arm/mach-exynos/irq-combiner.c deleted +0 -124
124 lines not on this page · raw message
arch/arm/mach-exynos/irq-eint.c deleted +0 -237
237 lines not on this page · raw message
arch/arm/mach-exynos/mach-armlex4210.c +3 -2
@@ -21,7 +21,6 @@#include <plat/cpu.h> #include <plat/devs.h> -#include <plat/exynos4.h> #include <plat/gpio-cfg.h> #include <plat/regs-serial.h> #include <plat/regs-srom.h>
@@ -29,6 +28,8 @@#include <mach/map.h> +#include "common.h" +/* Following are default values for UCON, ULCON and UFCON UART registers */ #define ARMLEX4210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -188,7 +189,7 @@ static void __init armlex4210_smsc911x_init(void)static void __init armlex4210_map_io (void ) { -s5p_init_io (NULL ,0 ,S5P_VA_CHIPID ); +exynos_init_io (NULL ,0 );s3c24xx_init_clocks (24000000 );s3c24xx_init_uarts (armlex4210_uartcfgs,ARRAY_SIZE (armlex4210_uartcfgs));
arch/arm/mach-exynos/mach-nuri.c +3 -2
@@ -38,7 +38,6 @@#include <plat/adc.h> #include <plat/regs-fb-v4.h> #include <plat/regs-serial.h> -#include <plat/exynos4.h> #include <plat/cpu.h> #include <plat/devs.h> #include <plat/fb.h>
@@ -55,6 +54,8 @@#include <mach/map.h> +#include "common.h" +/* Following are default values for UCON, ULCON and UFCON UART registers */ #define NURI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -1284,7 +1285,7 @@ static struct platform_device *nuri_devices[] __initdata = {static void __init nuri_map_io (void ) { -s5p_init_io (NULL ,0 ,S5P_VA_CHIPID ); +exynos_init_io (NULL ,0 );s3c24xx_init_clocks (24000000 );s3c24xx_init_uarts (nuri_uartcfgs,ARRAY_SIZE (nuri_uartcfgs)); }
arch/arm/mach-exynos/mach-origen.c +3 -2
@@ -29,7 +29,6 @@#include <plat/regs-serial.h> #include <plat/regs-fb-v4.h> -#include <plat/exynos4.h> #include <plat/cpu.h> #include <plat/devs.h> #include <plat/sdhci.h>
@@ -44,6 +43,8 @@#include <mach/map.h> +#include "common.h" +/* Following are default values for UCON, ULCON and UFCON UART registers */ #define ORIGEN_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -639,7 +640,7 @@ static void s5p_tv_setup(void)static void __init origen_map_io (void ) { -s5p_init_io (NULL ,0 ,S5P_VA_CHIPID ); +exynos_init_io (NULL ,0 );s3c24xx_init_clocks (24000000 );s3c24xx_init_uarts (origen_uartcfgs,ARRAY_SIZE (origen_uartcfgs)); }
arch/arm/mach-exynos/mach-smdk4x12.c +3 -2
@@ -28,7 +28,6 @@#include <plat/clock.h> #include <plat/cpu.h> #include <plat/devs.h> -#include <plat/exynos4.h> #include <plat/gpio-cfg.h> #include <plat/iic.h> #include <plat/keypad.h>
@@ -37,6 +36,8 @@#include <mach/map.h> +#include "common.h" +/* Following are default values for UCON, ULCON and UFCON UART registers */ #define SMDK4X12_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -250,7 +251,7 @@ static void __init smdk4x12_map_io(void) { clk_xusbxti.rate =24000000 ; -s5p_init_io (NULL ,0 ,S5P_VA_CHIPID ); +exynos_init_io (NULL ,0 );s3c24xx_init_clocks (clk_xusbxti.rate);s3c24xx_init_uarts (smdk4x12_uartcfgs,ARRAY_SIZE (smdk4x12_uartcfgs)); }
arch/arm/mach-exynos/mach-smdkv310.c +3 -2
@@ -28,7 +28,6 @@#include <plat/regs-serial.h> #include <plat/regs-srom.h> #include <plat/regs-fb-v4.h> -#include <plat/exynos4.h> #include <plat/cpu.h> #include <plat/devs.h> #include <plat/fb.h>
@@ -44,6 +43,8 @@#include <mach/map.h> +#include "common.h" +/* Following are default values for UCON, ULCON and UFCON UART registers */ #define SMDKV310_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -333,7 +334,7 @@ static void s5p_tv_setup(void)static void __init smdkv310_map_io (void ) { -s5p_init_io (NULL ,0 ,S5P_VA_CHIPID ); +exynos_init_io (NULL ,0 );s3c24xx_init_clocks (24000000 );s3c24xx_init_uarts (smdkv310_uartcfgs,ARRAY_SIZE (smdkv310_uartcfgs)); }
arch/arm/mach-exynos/mach-universal_c210.c +3 -2
@@ -28,7 +28,6 @@#include <asm/mach-types.h> #include <plat/regs-serial.h> -#include <plat/exynos4.h> #include <plat/cpu.h> #include <plat/devs.h> #include <plat/iic.h>
@@ -48,6 +47,8 @@#include <media/s5p_fimc.h> #include <media/m5mols.h> +#include "common.h" +/* Following are default values for UCON, ULCON and UFCON UART registers */ #define UNIVERSAL_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -993,7 +994,7 @@ static struct platform_device *universal_devices[] __initdata = {static void __init universal_map_io (void ) { -s5p_init_io (NULL ,0 ,S5P_VA_CHIPID ); +exynos_init_io (NULL ,0 );s3c24xx_init_clocks (24000000 );s3c24xx_init_uarts (universal_uartcfgs,ARRAY_SIZE (universal_uartcfgs)); }
arch/arm/plat-s5p/Makefile +0 -1
@@ -13,7 +13,6 @@ obj- := # Core files obj-y += dev-uart.o -obj-y += cpu.o obj-y += clock.o obj-y += irq.o obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o
arch/arm/plat-s5p/cpu.c deleted +0 -104
104 lines not on this page · raw message
arch/arm/plat-samsung/include/plat/cpu.h +0 -2
@@ -155,8 +155,6 @@ extern void s3c24xx_init_irq(void);extern void s5p_init_irq (u32 *vic,u32 num_vic);extern void s3c24xx_init_io (struct map_desc *mach_desc,int size); -extern void s5p_init_io (struct map_desc *mach_desc, -int size,void __iomem *cpuid_addr);extern void s3c24xx_init_cpu (void );extern void s3c64xx_init_cpu (void );
arch/arm/plat-samsung/include/plat/exynos4.h deleted +0 -35
@@ -1,35 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/exynos4.h -* -* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. -* http://www.samsung.com -* -* Header file for exynos4 cpu support -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -/* Common init code for EXYNOS4 related SoCs */ - -extern void exynos4_common_init_uarts (struct s3c2410_uartcfg *cfg,int no); -extern void exynos4_register_clocks (void ); -extern void exynos4210_register_clocks (void ); -extern void exynos4212_register_clocks (void ); -extern void exynos4_setup_clocks (void ); - -#ifdef CONFIG_ARCH_EXYNOS -extern int exynos_init (void ); -extern void exynos4_init_irq (void ); -extern void exynos4_map_io (void ); -extern void exynos4_init_clocks (int xtal); -extern struct sys_timer exynos4_timer; - -#define exynos4_init_uarts exynos4_common_init_uarts - -#else -#define exynos4_init_clocks NULL -#define exynos4_init_uarts NULL -#define exynos4_map_io NULL -#define exynos_init NULL -#endif
Signature · 1 line
1.7.4.4
PATCH 9/12 ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
Quoted 9 lines · Kukjin Kim
This patch introduces common.[ch] which are used only in the
arch/arm/mach-exynos/directory. Thecommon.cfile merges thecpu.c,init.c,irq-combiner.candirq-eint.cfiles which are used commonly on EXYNOS SoCs and thecommon.hfile replaces withplat/exynos4.hfile.Cc Ben Dooks <[email protected]>Cc Russell King <[email protected]>Signed-off-by Kukjin Kim <[email protected]>
It looks like there's some changes made to exynos stuff between -rc1 (which my immutable restart-cleanup branch is based upon) and the base for this patch which makes it hard to apply:
Patching 7249/1...
git apply --whitespace=fix -p1 --index --check > /tmp/pdb.2292 2>&1 exited with non-zero status: 256
error: patch failed: arch/arm/mach-exynos/cpu.c:1
error: arch/arm/mach-exynos/cpu.c: patch does not apply
Trying with GNU patch gives:
Patching 7249/1...
patch -p1 -f -EF0 -N --dry-run > /tmp/pdb.2298 2>&1 exited with non-zero status: 256 patching file arch/arm/mach-exynos/Makefile
patching file arch/arm/mach-exynos/clock-exynos4210.c
patching file arch/arm/mach-exynos/clock-exynos4212.c
patching file arch/arm/mach-exynos/clock.c
patching file arch/arm/mach-exynos/common.c
patching file arch/arm/mach-exynos/common.h
patching file arch/arm/mach-exynos/cpu.c
Hunk #1 FAILED at 1.
File arch/arm/mach-exynos/cpu.c is not empty after patch, as expected 1 out of 1 hunk FAILED -- saving rejects to file arch/arm/mach-exynos/cpu.c.rej patching file arch/arm/mach-exynos/include/mach/map.h
patching file arch/arm/mach-exynos/init.c
patching file arch/arm/mach-exynos/irq-combiner.c
patching file arch/arm/mach-exynos/irq-eint.c
patching file arch/arm/mach-exynos/mach-armlex4210.c
Hunk #1 succeeded at 20 (offset -1 lines).
Hunk #2 succeeded at 27 (offset -1 lines).
Hunk #3 succeeded at 188 (offset -1 lines).
patching file arch/arm/mach-exynos/mach-nuri.c
Hunk #1 succeeded at 37 (offset -1 lines).
Hunk #2 succeeded at 53 (offset -1 lines).
Hunk #3 succeeded at 1284 (offset -1 lines).
patching file arch/arm/mach-exynos/mach-origen.c
Hunk #1 succeeded at 28 (offset -1 lines).
Hunk #2 succeeded at 42 (offset -1 lines).
Hunk #3 succeeded at 639 (offset -1 lines).
patching file arch/arm/mach-exynos/mach-smdk4x12.c
Hunk #1 succeeded at 27 (offset -1 lines).
Hunk #2 succeeded at 35 (offset -1 lines).
Hunk #3 succeeded at 250 (offset -1 lines).
patching file arch/arm/mach-exynos/mach-smdkv310.c
Hunk #1 succeeded at 27 (offset -1 lines).
Hunk #2 succeeded at 42 (offset -1 lines).
Hunk #3 succeeded at 333 (offset -1 lines).
patching file arch/arm/mach-exynos/mach-universal_c210.c
Hunk #1 succeeded at 27 (offset -1 lines).
Hunk #2 succeeded at 46 (offset -1 lines).
Hunk #3 succeeded at 993 (offset -1 lines).
patching file arch/arm/plat-s5p/Makefile
patching file arch/arm/plat-s5p/cpu.c
patching file arch/arm/plat-samsung/include/plat/cpu.h
patching file arch/arm/plat-samsung/include/plat/exynos4.h
So I can't apply this, and this in turn means I can't provide Nicolas with a tree this evening for his arch_idle changes.
Given the proximity to Christmas, and I'm _not_ planning to work from this evening until after the new year, things will now have to just sit and wait until after the festive period.
I'll push out what I have been able to merge later this evening, but it will not include the exynos patches.
PATCH 9/12 ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
Quoted 8 lines · Russell King - ARM Linux
Quoted 6 lines · Kukjin Kim
This patch introduces common.[ch] which are used only in the
arch/arm/mach-exynos/directory. Thecommon.cfile merges thecpu.c,init.c,irq-combiner.candirq-eint.cfiles which are used commonly on EXYNOS SoCs and thecommon.hfile replaces withplat/exynos4.hfile.
Quoted 4 lines
Quoted 3 lines
Cc Ben Dooks <[email protected]>Cc Russell King <[email protected]>Signed-off-by Kukjin Kim <[email protected]>
Hi Russell,
Sorry for my late following up the restart work :(
Quoted 1 line
It looks like there's some changes made to exynos stuff between -rc1
Yes, some bug has been fixed after -rc1...
Quoted 3 lines
(which my immutable restart-cleanup branch is based upon) and the base for this patch which makes it hard to apply:
Oops, I created this based on your devel-stable as per your suggestion and I couldn't look at 'restart-cleanup' and 'restart' branches in your git, 'http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm.git' .
Quoted 56 lines
Patching 7249/1...
git apply --whitespace=fix -p1 --index --check >/tmp/pdb.22922>&1 exited with
non-zero status: 256
error: patch failed:arch/arm/mach-exynos/cpu.c:1
error:arch/arm/mach-exynos/cpu.c: patch does not applyTrying with GNU patch gives:
Patching 7249/1...
patch -p1 -f-EF0-N --dry-run >/tmp/pdb.22982>&1 exited with non-zero
status: 256
patching filearch/arm/mach-exynos/Makefile
patching filearch/arm/mach-exynos/clock-exynos4210.cpatching filearch/arm/mach-exynos/clock-exynos4212.cpatching filearch/arm/mach-exynos/clock.c
patching filearch/arm/mach-exynos/common.c
patching filearch/arm/mach-exynos/common.h
patching filearch/arm/mach-exynos/cpu.c
Hunk #1 FAILED at 1.
Filearch/arm/mach-exynos/cpu.cis not empty after patch, as expected 1 out of 1 hunk FAILED -- saving rejects to filearch/arm/mach-exynos/cpu.c.rej
patching filearch/arm/mach-exynos/include/mach/map.hpatching filearch/arm/mach-exynos/init.c
patching filearch/arm/mach-exynos/irq-combiner.c
patching filearch/arm/mach-exynos/irq-eint.c
patching filearch/arm/mach-exynos/mach-armlex4210.c
Hunk #1 succeeded at 20 (offset -1 lines).
Hunk #2 succeeded at 27 (offset -1 lines).
Hunk #3 succeeded at 188 (offset -1 lines).
patching filearch/arm/mach-exynos/mach-nuri.c
Hunk #1 succeeded at 37 (offset -1 lines).
Hunk #2 succeeded at 53 (offset -1 lines).
Hunk #3 succeeded at 1284 (offset -1 lines).
patching filearch/arm/mach-exynos/mach-origen.c
Hunk #1 succeeded at 28 (offset -1 lines).
Hunk #2 succeeded at 42 (offset -1 lines).
Hunk #3 succeeded at 639 (offset -1 lines).
patching filearch/arm/mach-exynos/mach-smdk4x12.c
Hunk #1 succeeded at 27 (offset -1 lines).
Hunk #2 succeeded at 35 (offset -1 lines).
Hunk #3 succeeded at 250 (offset -1 lines).
patching filearch/arm/mach-exynos/mach-smdkv310.c
Hunk #1 succeeded at 27 (offset -1 lines).
Hunk #2 succeeded at 42 (offset -1 lines).
Hunk #3 succeeded at 333 (offset -1 lines).
patching filearch/arm/mach-exynos/mach-universal_c210.cHunk #1 succeeded at 27 (offset -1 lines).
Hunk #2 succeeded at 46 (offset -1 lines).
Hunk #3 succeeded at 993 (offset -1 lines).
patching filearch/arm/plat-s5p/Makefile
patching filearch/arm/plat-s5p/cpu.c
patching filearch/arm/plat-samsung/include/plat/cpu.hpatching filearch/arm/plat-samsung/include/plat/exynos4.h
Quoted 3 lines
So I can't apply this, and this in turn means I can't provide Nicolas with a tree this evening for his
arch_idlechanges.
So, isn't there any required my effort for it?
Quoted 4 lines
Given the proximity to Christmas, and I'm _not_ planning to work from this evening until after the new year, things will now have to just sit and wait
until after the festive period.
Hmm...yeah...
Anyway, Russell, Merry Christmas to you and your family ;)
Quoted 3 lines
I'll push out what I have been able to merge later this evening, but it will not include the exynos patches.
How should I do for including exynos-restart? Please kindly let me know.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 9/12 ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
Quoted 8 lines · Kukjin Kim
Quoted 3 lines · Russell King - ARM Linux
It looks like there's some changes made to exynos stuff between -rc1
Yes, some bug has been fixed after -rc1...
Hi Russell,
It is not a bug fix after -rc1 in mainline and the changes are from Marc's commit db0d4db2 ("ARM: gic: allow GIC to support non-banked setups") and Axel's bug fixes on Marc's patch which are in your devel-stable branch.
If this patch is not on top of Marc's patch, you can meet conflicts when you merge the reset branch. Nevertheless, I'm sending the cleaned patch(7257/1 and 7258/1) which can be applied based on your restart-cleanup so that you can apply this easily anyway and in addition, you can apply other patches(7254/1, 7255/1 and 7256/1) as well.
I think, expected conflicts when you merge your branches can be fixed and if any problems, please let me know.
As a note, since local common.[ch] which are not based on current samsung tree have been introduced, we will meet conflicts between this series and my tree and of course, I will fix then.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 9/12 ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
Quoted 22 lines · Kukjin Kim
Quoted 8 lines · Kukjin Kim
Quoted 3 lines · Russell King - ARM Linux
It looks like there's some changes made to exynos stuff between -rc1
Yes, some bug has been fixed after -rc1...
Hi Russell,
It is not a bug fix after -rc1 in mainline and the changes are from Marc's commit
db0d4db2("ARM: gic: allow GIC to support non-banked setups") and Axel's bug fixes on Marc's patch which are in your devel-stable branch.If this patch is not on top of Marc's patch, you can meet conflicts when you merge the reset branch. Nevertheless, I'm sending the cleaned patch(7257/1 and 7258/1) which can be applied based on your restart-cleanup so that you can apply this easily anyway and in addition, you can apply other
patches(7254/1, 7255/1 and 7256/1)as well.
Quoted 6 lines
I think, expected conflicts when you merge your branches can be fixed and if any problems, please let me know.
As a note, since local common.[ch] which are not based on current samsung tree have been introduced, we will meet conflicts between this series and my tree and of course, I will fix then.
Right, so this is _still_ giving me problems. 7257/1 now applies. 7258/1 combines my patch "ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN arch/arm/mach-exynos4 XXX" with an update from you for the new common.h header, and my "ARM: restart: plat-samsung:
remove plat/reset.h and s5p_reset_hook" patch.
This is wrong - s5p_reset_hook is used by other Samsung platforms as well, and its removal can only happen after _all_ the other platforms have been converted. If I place your exynos patchs before the other Samsung patches (I'm keeping the platforms in alphabetical order) then things will break.
Please regenerate 7258/1 without my "ARM: restart: plat-samsung:
remove plat/reset.h and s5p_reset_hook" patch combined.
Thanks.
PATCH 9/12 ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
Quoted 38 lines · Russell King - ARM Linux
Quoted 5 lines · Kukjin Kim
Quoted 3 lines · Kukjin Kim
Quoted 1 line · Russell King - ARM Linux
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
It looks like there's some changes made to exynos stuff between -rc1
Yes, some bug has been fixed after -rc1...
Hi Russell,
It is not a bug fix after -rc1 in mainline and the changes are from
Marc's
Quoted 4 lines
commit
db0d4db2("ARM: gic: allow GIC to support non-banked setups") and Axel's bug fixes on Marc's patch which are in your devel-stable branch.If this patch is not on top of Marc's patch, you can meet conflicts when
you
Quoted 1 line
merge the reset branch. Nevertheless, I'm sending the cleaned
patch(7257/1
Quoted 1 line
and 7258/1) which can be applied based on your restart-cleanup so that
you
Quoted 4 lines
can apply this easily anyway and in addition, you can apply other
patches(7254/1, 7255/1 and 7256/1)as well.I think, expected conflicts when you merge your branches can be fixed
and if
Quoted 3 lines
any problems, please let me know.
As a note, since local common.[ch] which are not based on current
samsung
Quoted 1 line
tree have been introduced, we will meet conflicts between this series
and my
Quoted 1 line
tree and of course, I will fix then.
Quoted 7 lines
Right, so this is _still_ giving me problems. 7257/1 now applies. 7258/1 combines my patch "ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN
arch/arm/mach-exynos4XXX" with an update from you for the newcommon.hheader, and my "ARM: restart: plat-samsung:
removeplat/reset.hands5p_reset_hook" patch.This is wrong -
s5p_reset_hookis used by other Samsung platforms as well,
Hmm..I thought the s5p_reset_hook() is not used more on other S5P SoCs, because it has been already cleaned up for S5P64X0, S5PC100 and S5PV210. Anyway, either way ok to me :)
Quoted 7 lines
and its removal can only happen after _all_ the other platforms have been converted. If I place your exynos patchs before the other Samsung patches (I'm keeping the platforms in alphabetical order) then things will break.
Please regenerate 7258/1 without my "ARM: restart: plat-samsung:
removeplat/reset.hands5p_reset_hook" patch combined.
OK, let me do it soon.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 9/12 ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
Quoted 7 lines · Kukjin Kim
Quoted 6 lines · Russell King - ARM Linux
Right, so this is _still_ giving me problems. 7257/1 now applies. 7258/1 combines my patch "ARM: restart: exynos4: use new restart hook XXX WIP XXX WHY IS THERE NO LOCAL HEADERS IN
arch/arm/mach-exynos4XXX" with an update from you for the newcommon.hheader, and my "ARM: restart: plat-samsung:
removeplat/reset.hands5p_reset_hook" patch.
Quoted 5 lines
Quoted 1 line
This is wrong -
s5p_reset_hookis used by other Samsung platforms as well,Hmm..I thought the
s5p_reset_hook()is not used more on other S5P SoCs, because it has been already cleaned up for S5P64X0, S5PC100 and S5PV210. Anyway, either way ok to me :)
It's removed by 7252/1 (s5pv210) - what I'm saying is that 'alphabetical' means that the exynos change should come before 7252/1, and because exynos removes the s5p_reset_hook (which is shared between s5pv210 and exynos) things break.
This is exactly why I kept the change separate: it means that the ordering of the platform specific patches is irrelevant: what matters is that the ordering of platform specific patches to the common patches. It means you don't have to remember that one of the platform specific patches also touches common code and must be last.
Quoted 8 lines
Quoted 6 lines
and its removal can only happen after _all_ the other platforms have been converted. If I place your exynos patchs before the other Samsung patches (I'm keeping the platforms in alphabetical order) then things will break.
Please regenerate 7258/1 without my "ARM: restart: plat-samsung:
removeplat/reset.hands5p_reset_hook" patch combined.OK, let me do it soon.
Thanks.
PATCH 9/12 ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
Quoted 16 lines · Russell King - ARM Linux
Quoted 2 lines · Kukjin Kim
Quoted 1 line · Russell King - ARM Linux
Right, so this is _still_ giving me problems. 7257/1 now applies.
7258/1
Quoted 1 line
Quoted 1 line
combines my patch "ARM: restart: exynos4: use new restart hook XXX WIP
XXX
Quoted 1 line
Quoted 1 line
WHY IS THERE NO LOCAL HEADERS IN
arch/arm/mach-exynos4XXX" with anupdate
Quoted 1 line
Quoted 1 line
from you for the new
common.hheader, and my "ARM: restart: plat-samsung:
Quoted 3 lines
Quoted 3 lines
remove
plat/reset.hands5p_reset_hook" patch.This is wrong -
s5p_reset_hookis used by other Samsung platforms aswell,
Quoted 1 line
Quoted 9 lines
Quoted 3 lines
Hmm..I thought the
s5p_reset_hook()is not used more on other S5P SoCs, because it has been already cleaned up for S5P64X0, S5PC100 and S5PV210. Anyway, either way ok to me :)It's removed by 7252/1 (s5pv210) - what I'm saying is that 'alphabetical' means that the exynos change should come before 7252/1, and because exynos removes the
s5p_reset_hook(which is shared between s5pv210 and exynos) things break.
Ah ha :)
Quoted 6 lines
This is exactly why I kept the change separate: it means that the ordering of the platform specific patches is irrelevant: what matters is that the ordering of platform specific patches to the common patches. It means you don't have to remember that one of the platform specific patches also touches common code and must be last.
OK, I see. This approach is good.
Quoted 5 lines
Quoted 1 line
Quoted 1 line
and its removal can only happen after _all_ the other platforms have
been
Quoted 1 line
Quoted 1 line
converted. If I place your exynos patchs before the other Samsung
patches
Quoted 1 line
Quoted 1 line
(I'm keeping the platforms in alphabetical order) then things will
Quoted 8 lines
break.
Quoted 5 lines
Quoted 3 lines
Please regenerate 7258/1 without my "ARM: restart: plat-samsung:
removeplat/reset.hands5p_reset_hook" patch combined.OK, let me do it soon.
Thanks.
I sent updated one to patch system.
If any problems, please kindly let me know.
Happy New Year!
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 9/12 ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
Quoted 1 line · Kukjin Kim
If any problems, please kindly let me know.
Right, this looks better. I'm now left with one remaining bit:
arch/arm/mach-exynos/include/mach/system.h:#include <plat/system-reset.h> arch/arm/plat-s3c24xx/cpu.c:#include <plat/system-reset.h> arch/arm/mach-s3c64xx/include/mach/system.h:#include <plat/system-reset.h> arch/arm/mach-s3c2410/include/mach/system.h:#include <plat/system-reset.h>
and:
arch/arm/plat-samsung/include/plat/system-reset.h:
...
#include <plat/watchdog-reset.h>
static void arch_reset(char mode, const char *cmd)
{
arch_wdt_reset();
}I assume that with all the patches I now have merged, arch_reset() should never be called on any Samsung platform, and so the include of plat/watchdog-reset.h and call of arch_wdt_reset() can be removed in my "ARM: restart: plat-samsung: remove plat/reset.h and s5p_reset_hook" patch?
What about arch/arm/plat-s3c24xx/cpu.c's include of system-reset.h? Does that need to be replaced with watchdog-reset.h?
That then leads to "ARM: restart: remove the now empty arch_reset()" removing system-reset.h and all includes of that file?
PATCH 9/12 ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
Quoted 11 lines · Russell King - ARM Linux
Quoted 1 line · Kukjin Kim
If any problems, please kindly let me know.
Right, this looks better. I'm now left with one remaining bit:
arch/arm/mach-exynos/include/mach/system.h:#include <
plat/system-reset.h> arch/arm/plat-s3c24xx/cpu.c:#include <plat/system-reset.h> arch/arm/mach-s3c64xx/include/mach/system.h:#include <plat/system-reset.h> arch/arm/mach-s3c2410/include/mach/system.h:#include <plat/system-reset.h>
And,
arch/arm/mach-s5p64x0/include/mach/system.h:#include <plat/system-reset.h> arch/arm/mach-s5pc100/include/mach/system.h:#include <plat/system-reset.h> arch/arm/mach-s5pv210/include/mach/system.h:#include <plat/system-reset.h>
Quoted 11 lines
and:
arch/arm/plat-samsung/include/plat/system-reset.h:
...
#include <plat/watchdog-reset.h>static void
arch_reset(char mode, const char *cmd){ arch_wdt_reset(); }
Quoted 6 lines
I assume that with all the patches I now have merged,
arch_reset()should never be called on any Samsung platform, and so the include ofplat/watchdog-reset.hand call ofarch_wdt_reset()can be removed in my "ARM: restart: plat-samsung: removeplat/reset.hands5p_reset_hook" patch?
Yes, if we don't need arch_reset() anymore, we can remove them in your patch.
But I'm not sure, because happened following build error. Russell, don't we need arch_reset()?
arch/arm/kernel/process.c: In function 'arm_machine_restart':arch/arm/kernel/process.c:127: error: implicit declaration of function 'arch_reset'
Quoted 5 lines
What about arch/arm/plat-s3c24xx/cpu.c's include of
system-reset.h? Does that need to be replaced withwatchdog-reset.h?That then leads to "ARM: restart: remove the now empty
arch_reset()" removingsystem-reset.hand all includes of that file?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 9/12 ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
Quoted 46 lines · Kukjin Kim
Quoted 11 lines · Russell King - ARM Linux
Quoted 1 line · Kukjin Kim
If any problems, please kindly let me know.
Right, this looks better. I'm now left with one remaining bit:
arch/arm/mach-exynos/include/mach/system.h:#include <
plat/system-reset.h> arch/arm/plat-s3c24xx/cpu.c:#include <plat/system-reset.h> arch/arm/mach-s3c64xx/include/mach/system.h:#include <plat/system-reset.h> arch/arm/mach-s3c2410/include/mach/system.h:#include <plat/system-reset.h>And,
arch/arm/mach-s5p64x0/include/mach/system.h:#include <
plat/system-reset.h> arch/arm/mach-s5pc100/include/mach/system.h:#include <plat/system-reset.h> arch/arm/mach-s5pv210/include/mach/system.h:#include <plat/system-reset.h>Quoted 11 lines
and:
arch/arm/plat-samsung/include/plat/system-reset.h:
...
#include <plat/watchdog-reset.h>static void
arch_reset(char mode, const char *cmd){ arch_wdt_reset(); }Quoted 6 lines
I assume that with all the patches I now have merged,
arch_reset()should never be called on any Samsung platform, and so the include ofplat/watchdog-reset.hand call ofarch_wdt_reset()can be removed in my "ARM: restart: plat-samsung: removeplat/reset.hands5p_reset_hook" patch?Yes, if we don't need
arch_reset()anymore, we can remove them in your patch.But I'm not sure, because happened following build error. Russell, don't we need
arch_reset()?
arch/arm/kernel/process.c: In function 'arm_machine_restart':arch/arm/kernel/process.c:127: error: implicit declaration of function 'arch_reset'
Quoted 7 lines
Quoted 5 lines
What about arch/arm/plat-s3c24xx/cpu.c's include of
system-reset.h? Does that need to be replaced withwatchdog-reset.h?That then leads to "ARM: restart: remove the now empty
arch_reset()" removingsystem-reset.hand all includes of that file?Thanks.
Oh god, I see what you've done.
ARM: 7256/1: restart: S3C64XX: use new restart hook
--- a/arch/arm/mach-s3c64xx/include/mach/system.h +++ b/arch/arm/mach-s3c64xx/include/mach/system.h
...
-#include <plat/watchdog-reset.h>
+#include <plat/system-reset.h>
...
-static void arch_reset(char mode, const char *cmd) -{
- if (mode != 's')
- arch_wdt_reset();
-
- /* if all else fails, or mode was for soft, jump to 0 */
- soft_restart(0);
-}
So we're making everything depend on plat/system-reset.h. Why? The end result is to remove arch_reset() entirely, and making it depend on some common definition in some shared header file makes things more complicated and is error prone. How do I know when everything is fixed up as far as the shared header file goes?
It would be _far_ better if the s3c64xx changes to add the .restart method to _all_ s3c64xx platforms also removed the _contents_ and only the _contents_ of arch_reset(), leaving an empty function there.
PATCH 9/12 ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
Quoted 89 lines · Russell King - ARM Linux
Quoted 8 lines · Kukjin Kim
Quoted 7 lines · Russell King - ARM Linux
Quoted 1 line · Kukjin Kim
If any problems, please kindly let me know.
Right, this looks better. I'm now left with one remaining bit:
arch/arm/mach-exynos/include/mach/system.h:#include <plat/system-
reset.h>Quoted 2 lines
Quoted 2 lines
arch/arm/plat-s3c24xx/cpu.c:#include <
plat/system-reset.h> arch/arm/mach-s3c64xx/include/mach/system.h:#include <plat/system-
reset.h>Quoted 1 line
Quoted 1 line
arch/arm/mach-s3c2410/include/mach/system.h:#include <plat/system-
reset.h>Quoted 5 lines
Quoted 1 line
And,
arch/arm/mach-s5p64x0/include/mach/system.h:#include <plat/system-
reset.h>Quoted 1 line
arch/arm/mach-s5pc100/include/mach/system.h:#include <plat/system-
reset.h>Quoted 1 line
arch/arm/mach-s5pv210/include/mach/system.h:#include <plat/system-
reset.h>Quoted 12 lines
Quoted 12 lines
and:
arch/arm/plat-samsung/include/plat/system-reset.h:
...
#include <plat/watchdog-reset.h>static void
arch_reset(char mode, const char *cmd){ arch_wdt_reset(); }Quoted 4 lines
Quoted 4 lines
I assume that with all the patches I now have merged,
arch_reset()should never be called on any Samsung platform, and so the include ofplat/watchdog-reset.hand call ofarch_wdt_reset()can be removed in my "ARM: restart: plat-samsung: removeplat/reset.hand
s5p_reset_hook"Quoted 6 lines
Quoted 2 lines
patch?
Yes, if we don't need
arch_reset()anymore, we can remove them in your patch.But I'm not sure, because happened following build error. Russell, don't
we
Quoted 6 lines
need
arch_reset()?
arch/arm/kernel/process.c: In function 'arm_machine_restart':arch/arm/kernel/process.c:127: error: implicit declaration of function 'arch_reset'Quoted 7 lines
Quoted 5 lines
What about arch/arm/plat-s3c24xx/cpu.c's include of
system-reset.h? Does that need to be replaced withwatchdog-reset.h?That then leads to "ARM: restart: remove the now empty
arch_reset()" removingsystem-reset.hand all includes of that file?Thanks.
Oh god, I see what you've done.
ARM: 7256/1: restart: S3C64XX: use new restart hook
arch/arm/mach-s3c64xx/include/mach/system.h +1
-9-#include <plat/watchdog-reset.h> +#include <plat/system-reset.h> -static void arch_reset (char mode,const char *cmd) -{ -if (mode !='s' ) -arch_wdt_reset (); - -/* if all else fails, or mode was for soft, jump to 0 */ -soft_restart (0 ); -}So we're making everything depend on
plat/system-reset.h. Why? The end result is to removearch_reset()entirely, and making it depend on some common definition in some shared header file makes things more complicated and is error prone. How do I know when everything is fixed up as far as the shared header file goes?
Quoted 3 lines
It would be _far_ better if the s3c64xx changes to add the .restart method to _all_ s3c64xx platforms also removed the _contents_ and only the _contents_ of
arch_reset(), leaving an empty function there.
Ooooops :( I see. Let me fix.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 10/12 ARM: restart: EXYNOS: use new restart hook
In reply to Kukjin KimFrom: Russell King <[email protected]>
Hook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-exynos/common.c | 7 +---- arch/arm/mach-exynos/common.h | 2 + arch/arm/mach-exynos/include/mach/system.h | 2 - arch/arm/mach-exynos/mach-armlex4210.c | 1 + arch/arm/mach-exynos/mach-nuri.c | 1 + arch/arm/mach-exynos/mach-origen.c | 1 + arch/arm/mach-exynos/mach-smdk4x12.c | 2 + arch/arm/mach-exynos/mach-smdkv310.c | 2 + arch/arm/mach-exynos/mach-universal_c210.c | 1 + arch/arm/plat-samsung/include/plat/reset.h | 16 ----------- arch/arm/plat-samsung/include/plat/system-reset.h | 31 --------------------- 11 files changed, 11 insertions(+), 55 deletions(-) delete mode 100644 arch/arm/plat-samsung/include/plat/reset.h delete mode 100644 arch/arm/plat-samsung/include/plat/system-reset.h
arch/arm/mach-exynos/common.c +1 -6
@@ -33,7 +33,6 @@#include <plat/clock.h> #include <plat/devs.h> #include <plat/pm.h> -#include <plat/reset.h> #include <plat/sdhci.h> #include <plat/gpio-cfg.h> #include <plat/adc-core.h>
@@ -213,7 +212,7 @@ static void exynos_idle(void)local_irq_enable (); } -static void exynos4_sw_reset (void ) +void exynos4_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }
@@ -462,10 +461,6 @@ int __init exynos_init(void)/* set idle function */ pm_idle = exynos_idle; -/* set sw_reset function */ -if (soc_is_exynos4210 () ||soc_is_exynos4212 () ||soc_is_exynos4412 ()) - s5p_reset_hook = exynos4_sw_reset; -return sysdev_register (&exynos4_sysdev); }
arch/arm/mach-exynos/common.h +2 -0
@@ -21,6 +21,8 @@ void exynos4_setup_clocks(void);void exynos4210_register_clocks (void );void exynos4212_register_clocks (void ); +void exynos4_restart (char mode,const char *cmd); +extern struct sys_timer exynos4_timer;#ifdef CONFIG_ARCH_EXYNOS
arch/arm/mach-exynos/include/mach/system.h +0 -2
@@ -13,8 +13,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H __FILE__ -#include <plat/system-reset.h> -static void arch_idle (void ) {/* nothing here yet */
arch/arm/mach-exynos/mach-armlex4210.c +1 -0
@@ -215,4 +215,5 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210") .handle_irq = gic_handle_irq, .init_machine = armlex4210_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos/mach-nuri.c +1 -0
@@ -1339,4 +1339,5 @@ MACHINE_START(NURI, "NURI") .init_machine = nuri_machine_init, .timer = &exynos4_timer, .reserve = &nuri_reserve, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos/mach-origen.c +1 -0
@@ -700,4 +700,5 @@ MACHINE_START(ORIGEN, "ORIGEN") .init_machine = origen_machine_init, .timer = &exynos4_timer, .reserve = &origen_reserve, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos/mach-smdk4x12.c +2 -0
@@ -292,6 +292,7 @@ MACHINE_START(SMDK4212, "SMDK4212") .handle_irq = gic_handle_irq, .init_machine = smdk4x12_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart, MACHINE_ENDMACHINE_START (SMDK4412 ,"SMDK4412" )
@@ -303,4 +304,5 @@ MACHINE_START(SMDK4412, "SMDK4412") .handle_irq = gic_handle_irq, .init_machine = smdk4x12_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos/mach-smdkv310.c +2 -0
@@ -381,6 +381,7 @@ MACHINE_START(SMDKV310, "SMDKV310") .init_machine = smdkv310_machine_init, .timer = &exynos4_timer, .reserve = &smdkv310_reserve, + .restart = exynos4_restart, MACHINE_ENDMACHINE_START (SMDKC210 ,"SMDKC210" )
@@ -391,4 +392,5 @@ MACHINE_START(SMDKC210, "SMDKC210") .handle_irq = gic_handle_irq, .init_machine = smdkv310_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos/mach-universal_c210.c +1 -0
@@ -1064,4 +1064,5 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") .init_machine = universal_machine_init, .timer = &exynos4_timer, .reserve = &universal_reserve, + .restart = exynos4_restart,MACHINE_END
arch/arm/plat-samsung/include/plat/reset.h deleted +0 -16
@@ -1,16 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/reset.h -* -* Copyright (c) 2010 Samsung Electronics Co., Ltd. -* http://www.samsung.com/ -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#ifndef __PLAT_SAMSUNG_RESET_H -#define __PLAT_SAMSUNG_RESET_H __FILE__ - -extern void (*s5p_reset_hook)(void ); - -#endif /* __PLAT_SAMSUNG_RESET_H */
arch/arm/plat-samsung/include/plat/system-reset.h deleted +0 -31
@@ -1,31 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/system-reset.h -* -* Copyright (c) 2010 Samsung Electronics Co., Ltd. -* http://www.samsung.com -* -* Based on arch/arm/mach-s3c2410/include/mach/system-reset.h -* -* S5P - System define for arch_reset() -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#include <plat/watchdog-reset.h> - -void (*s5p_reset_hook)(void ); - -static void arch_reset (char mode,const char *cmd) -{ -/* SWRESET support in s5p_reset_hook() */ - -if (s5p_reset_hook) -s5p_reset_hook (); - -/* Perform reset using Watchdog reset -* if there is no s5p_reset_hook() -*/ - -arch_wdt_reset (); -}
Signature · 1 line
1.7.4.4
PATCH 10/12 ARM: restart: EXYNOS: use new restart hook
Quoted 220 lines · Kukjin Kim
From: Russell King <[email protected]>
Hook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>[kgene.kim at samsung.com: according to local header, updated]Signed-off-by Kukjin Kim <[email protected]>--- arch/arm/mach-exynos/common.c | 7 +---- arch/arm/mach-exynos/common.h | 2 + arch/arm/mach-exynos/include/mach/system.h | 2 - arch/arm/mach-exynos/mach-armlex4210.c | 1 + arch/arm/mach-exynos/mach-nuri.c | 1 + arch/arm/mach-exynos/mach-origen.c | 1 + arch/arm/mach-exynos/mach-smdk4x12.c | 2 + arch/arm/mach-exynos/mach-smdkv310.c | 2 + arch/arm/mach-exynos/mach-universal_c210.c | 1 + arch/arm/plat-samsung/include/plat/reset.h | 16 ----------- arch/arm/plat-samsung/include/plat/system-reset.h | 31 --------------------- 11 files changed, 11 insertions(+), 55 deletions(-) delete mode 100644 arch/arm/plat-samsung/include/plat/reset.h delete mode 100644 arch/arm/plat-samsung/include/plat/system-reset.harch/arm/mach-exynos/common.c +1
-6@@ -33,7 +33,6 @@#include <plat/clock.h> #include <plat/devs.h> #include <plat/pm.h> -#include <plat/reset.h> #include <plat/sdhci.h> #include <plat/gpio-cfg.h> #include <plat/adc-core.h> @@ -213,7 +212,7 @@ static void exynos_idle(void)local_irq_enable (); } -static void exynos4_sw_reset (void ) +void exynos4_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }@@ -462,10 +461,6 @@ int __init exynos_init(void)/* set idle function */ pm_idle = exynos_idle; -/* set sw_reset function */ -if (soc_is_exynos4210 () ||soc_is_exynos4212 () ||soc_is_exynos4412 ()) - s5p_reset_hook = exynos4_sw_reset; -return sysdev_register (&exynos4_sysdev); }arch/arm/mach-exynos/common.h +2
-0@@ -21,6 +21,8 @@ void exynos4_setup_clocks(void);void exynos4210_register_clocks (void );void exynos4212_register_clocks (void ); +void exynos4_restart (char mode,const char *cmd); +extern struct sys_timer exynos4_timer;#ifdef CONFIG_ARCH_EXYNOS arch/arm/mach-exynos/include/mach/system.h +0
-2@@ -13,8 +13,6 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H __FILE__ -#include <plat/system-reset.h> -static void arch_idle (void ) {/* nothing here yet */ arch/arm/mach-exynos/mach-armlex4210.c +1
-0@@ -215,4 +215,5 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210") .handle_irq = gic_handle_irq, .init_machine = armlex4210_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos/mach-nuri.c +1
-0@@ -1339,4 +1339,5 @@ MACHINE_START(NURI, "NURI") .init_machine = nuri_machine_init, .timer = &exynos4_timer, .reserve = &nuri_reserve, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos/mach-origen.c +1
-0@@ -700,4 +700,5 @@ MACHINE_START(ORIGEN, "ORIGEN") .init_machine = origen_machine_init, .timer = &exynos4_timer, .reserve = &origen_reserve, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos/mach-smdk4x12.c +2
-0@@ -292,6 +292,7 @@ MACHINE_START(SMDK4212, "SMDK4212") .handle_irq = gic_handle_irq, .init_machine = smdk4x12_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart, MACHINE_ENDMACHINE_START (SMDK4412 ,"SMDK4412" )@@ -303,4 +304,5 @@ MACHINE_START(SMDK4412, "SMDK4412") .handle_irq = gic_handle_irq, .init_machine = smdk4x12_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos/mach-smdkv310.c +2
-0@@ -381,6 +381,7 @@ MACHINE_START(SMDKV310, "SMDKV310") .init_machine = smdkv310_machine_init, .timer = &exynos4_timer, .reserve = &smdkv310_reserve, + .restart = exynos4_restart, MACHINE_ENDMACHINE_START (SMDKC210 ,"SMDKC210" )@@ -391,4 +392,5 @@ MACHINE_START(SMDKC210, "SMDKC210") .handle_irq = gic_handle_irq, .init_machine = smdkv310_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END arch/arm/mach-exynos/mach-universal_c210.c +1
-0@@ -1064,4 +1064,5 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") .init_machine = universal_machine_init, .timer = &exynos4_timer, .reserve = &universal_reserve, + .restart = exynos4_restart,MACHINE_END arch/arm/plat-samsung/include/plat/reset.h deleted +0
-16@@ -1,16 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/reset.h -* -* Copyright (c) 2010 Samsung Electronics Co., Ltd. -* http://www.samsung.com/ -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#ifndef __PLAT_SAMSUNG_RESET_H -#define __PLAT_SAMSUNG_RESET_H __FILE__ - -extern void (*s5p_reset_hook)(void ); - -#endif /* __PLAT_SAMSUNG_RESET_H */ arch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/system-reset.h +0
-0
samsung/include/plat/system-reset.h
deleted file mode 100644
index a448e99..0000000arch/arm/plat-samsung/include/plat/system-reset.h deleted +0
-32@@ -1,31 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/system-reset.h -* -* Copyright (c) 2010 Samsung Electronics Co., Ltd. -* http://www.samsung.com -* -* Based on arch/arm/mach-s3c2410/include/mach/system-reset.h -* -* S5P - System define for arch_reset() -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#include <plat/watchdog-reset.h> - -void (*s5p_reset_hook)(void ); - -static void arch_reset (char mode,const char *cmd) -{ -/* SWRESET support in s5p_reset_hook() */ - -if (s5p_reset_hook) -s5p_reset_hook (); - -/* Perform reset using Watchdog reset -* if there is no s5p_reset_hook() -*/ - -arch_wdt_reset (); -} --
Quoted 1 line
1.7.4.4
From: Russell King <[email protected]>
Subject: [PATCH V2 09/12] ARM: restart: EXYNOS: use new restart hook
Hook these platforms restart code into the new restart hook rather than using arch_reset().
---
Changes since v1:
- fixed the mis-deleting inclusion of <plat/system-reset.h> which includes arch_reset().
arch/arm/mach-exynos/common.c | 7 +------ arch/arm/mach-exynos/common.h | 2 ++ arch/arm/mach-exynos/mach-armlex4210.c | 1 + arch/arm/mach-exynos/mach-nuri.c | 1 + arch/arm/mach-exynos/mach-origen.c | 1 + arch/arm/mach-exynos/mach-smdk4x12.c | 2 ++ arch/arm/mach-exynos/mach-smdkv310.c | 2 ++ arch/arm/mach-exynos/mach-universal_c210.c | 1 + arch/arm/plat-samsung/include/plat/reset.h | 16 ---------------- arch/arm/plat-samsung/include/plat/system-reset.h | 16 ++++------------ 10 files changed, 15 insertions(+), 34 deletions(-) delete mode 100644 arch/arm/plat-samsung/include/plat/reset.h
arch/arm/mach-exynos/common.c +1 -6
@@ -33,7 +33,6 @@#include <plat/clock.h> #include <plat/devs.h> #include <plat/pm.h> -#include <plat/reset.h> #include <plat/sdhci.h> #include <plat/gpio-cfg.h> #include <plat/adc-core.h>
@@ -213,7 +212,7 @@ static void exynos_idle(void)local_irq_enable (); } -static void exynos4_sw_reset (void ) +void exynos4_restart (char mode,const char *cmd) {__raw_writel (0x1 ,S5P_SWRESET ); }
@@ -462,10 +461,6 @@ int __init exynos_init(void)/* set idle function */ pm_idle = exynos_idle; -/* set sw_reset function */ -if (soc_is_exynos4210 () ||soc_is_exynos4212 () ||soc_is_exynos4412 ()) - s5p_reset_hook = exynos4_sw_reset; -return sysdev_register (&exynos4_sysdev); }
arch/arm/mach-exynos/common.h +2 -0
@@ -21,6 +21,8 @@ void exynos4_setup_clocks(void);void exynos4210_register_clocks (void );void exynos4212_register_clocks (void ); +void exynos4_restart (char mode,const char *cmd); +extern struct sys_timer exynos4_timer;#ifdef CONFIG_ARCH_EXYNOS
arch/arm/mach-exynos/mach-armlex4210.c +1 -0
@@ -215,4 +215,5 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210") .handle_irq = gic_handle_irq, .init_machine = armlex4210_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos/mach-nuri.c +1 -0
@@ -1339,4 +1339,5 @@ MACHINE_START(NURI, "NURI") .init_machine = nuri_machine_init, .timer = &exynos4_timer, .reserve = &nuri_reserve, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos/mach-origen.c +1 -0
@@ -700,4 +700,5 @@ MACHINE_START(ORIGEN, "ORIGEN") .init_machine = origen_machine_init, .timer = &exynos4_timer, .reserve = &origen_reserve, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos/mach-smdk4x12.c +2 -0
@@ -292,6 +292,7 @@ MACHINE_START(SMDK4212, "SMDK4212") .handle_irq = gic_handle_irq, .init_machine = smdk4x12_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart, MACHINE_ENDMACHINE_START (SMDK4412 ,"SMDK4412" )
@@ -303,4 +304,5 @@ MACHINE_START(SMDK4412, "SMDK4412") .handle_irq = gic_handle_irq, .init_machine = smdk4x12_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos/mach-smdkv310.c +2 -0
@@ -381,6 +381,7 @@ MACHINE_START(SMDKV310, "SMDKV310") .init_machine = smdkv310_machine_init, .timer = &exynos4_timer, .reserve = &smdkv310_reserve, + .restart = exynos4_restart, MACHINE_ENDMACHINE_START (SMDKC210 ,"SMDKC210" )
@@ -391,4 +392,5 @@ MACHINE_START(SMDKC210, "SMDKC210") .handle_irq = gic_handle_irq, .init_machine = smdkv310_machine_init, .timer = &exynos4_timer, + .restart = exynos4_restart,MACHINE_END
arch/arm/mach-exynos/mach-universal_c210.c +1 -0
@@ -1064,4 +1064,5 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") .init_machine = universal_machine_init, .timer = &exynos4_timer, .reserve = &universal_reserve, + .restart = exynos4_restart,MACHINE_END
arch/arm/plat-samsung/include/plat/reset.h deleted +0 -16
@@ -1,16 +0,0 @@ -/* linux/arch/arm/plat-samsung/include/plat/reset.h -* -* Copyright (c) 2010 Samsung Electronics Co., Ltd. -* http://www.samsung.com/ -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#ifndef __PLAT_SAMSUNG_RESET_H -#define __PLAT_SAMSUNG_RESET_H __FILE__ - -extern void (*s5p_reset_hook)(void ); - -#endif /* __PLAT_SAMSUNG_RESET_H */
arch/arm/plat-samsung/include/plat/system-reset.h +4 -12
@@ -1,6 +1,6 @@/* linux/arch/arm/plat-samsung/include/plat/system-reset.h * -* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. * http://www.samsung.com * * Based on arch/arm/mach-s3c2410/include/mach/system-reset.h
@@ -14,18 +14,10 @@#include <plat/watchdog-reset.h> -void (*s5p_reset_hook)(void ); -static void arch_reset (char mode,const char *cmd) { -/* SWRESET support in s5p_reset_hook() */ - -if (s5p_reset_hook) -s5p_reset_hook (); - -/* Perform reset using Watchdog reset -* if there is no s5p_reset_hook() -*/ +if (mode !='s' ) +arch_wdt_reset (); -arch_wdt_reset (); +soft_restart (0 ); }
Signature · 7 lines
Thanks. Best regards, Kgene. -- Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 11/12 ARM: restart: S3C24XX: move SWRST based S3C platforms to machine_desc hook
In reply to Kukjin KimFrom: Heiko Stuebner <[email protected]>
S3C2412/S3C2416/S3C2443 use a special register to signal the reset to the processor and used therefore the s3c24xx_reset_hook mechanism in the s3c24xx-specific arch reset.
This patch introduces restart functions for these architectures, moves the board files to them and removes the s3c24xx_reset_hook infrastructure, as all users are gone.
--- arch/arm/mach-s3c2410/include/mach/reset.h | 22 --------------------- arch/arm/mach-s3c2410/include/mach/system-reset.h | 5 ---- arch/arm/mach-s3c2410/include/mach/system.h | 2 - arch/arm/mach-s3c2412/mach-jive.c | 2 + arch/arm/mach-s3c2412/mach-smdk2413.c | 3 ++ arch/arm/mach-s3c2412/mach-vstms.c | 1 + arch/arm/mach-s3c2412/s3c2412.c | 10 +++----- arch/arm/mach-s3c2416/mach-smdk2416.c | 1 + arch/arm/mach-s3c2416/s3c2416.c | 7 +++-- arch/arm/mach-s3c2443/mach-smdk2443.c | 1 + arch/arm/mach-s3c2443/s3c2443.c | 8 +++--- arch/arm/plat-samsung/include/plat/s3c2412.h | 3 ++ arch/arm/plat-samsung/include/plat/s3c2416.h | 2 + arch/arm/plat-samsung/include/plat/s3c2443.h | 2 + 14 files changed, 27 insertions(+), 42 deletions(-) delete mode 100644 arch/arm/mach-s3c2410/include/mach/reset.h
arch/arm/mach-s3c2410/include/mach/reset.h deleted +0 -22
@@ -1,22 +0,0 @@ -/* arch/arm/mach-s3c2410/include/mach/reset.h -* -* Copyright (c) 2007 Simtec Electronics -* Ben Dooks <[email protected]> -* http://armlinux.simtec.co.uk/ -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* S3C2410 CPU reset controls -*/ - -#ifndef __ASM_ARCH_RESET_H -#define __ASM_ARCH_RESET_H __FILE__ - -/* This allows the over-ride of the default reset code -*/ - -extern void (*s3c24xx_reset_hook)(void ); - -#endif /* __ASM_ARCH_RESET_H */
arch/arm/mach-s3c2410/include/mach/system-reset.h +0 -5
@@ -13,8 +13,6 @@#include <mach/hardware.h> #include <plat/watchdog-reset.h> -extern void (*s3c24xx_reset_hook)(void ); -static void arch_reset (char mode,const char *cmd) {
@@ -22,9 +20,6 @@ arch_reset(char mode, const char *cmd)soft_restart (0 ); } -if (s3c24xx_reset_hook) -s3c24xx_reset_hook (); -arch_wdt_reset ();/* we'll take a jump through zero as a poor second */
arch/arm/mach-s3c2410/include/mach/system.h +0 -2
@@ -15,12 +15,10 @@#include <mach/map.h> #include <mach/idle.h> -#include <mach/reset.h> #include <mach/regs-clock.h> void (*s3c24xx_idle)(void ); -void (*s3c24xx_reset_hook)(void );void s3c24xx_default_idle (void ) {
arch/arm/mach-s3c2412/mach-jive.c +2 -0
@@ -48,6 +48,7 @@#include <linux/mtd/nand_ecc.h> #include <linux/mtd/partitions.h> +#include <plat/s3c2412.h> #include <plat/gpio-cfg.h> #include <plat/clock.h> #include <plat/devs.h>
@@ -661,4 +662,5 @@ MACHINE_START(JIVE, "JIVE") .map_io = jive_map_io, .init_machine = jive_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2412_restart,MACHINE_END
arch/arm/mach-s3c2412/mach-smdk2413.c +3 -0
@@ -134,6 +134,7 @@ MACHINE_START(S3C2413, "S3C2413") .map_io = smdk2413_map_io, .init_machine = smdk2413_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2412_restart, MACHINE_ENDMACHINE_START (SMDK2412 ,"SMDK2412" )
@@ -145,6 +146,7 @@ MACHINE_START(SMDK2412, "SMDK2412") .map_io = smdk2413_map_io, .init_machine = smdk2413_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2412_restart, MACHINE_ENDMACHINE_START (SMDK2413 ,"SMDK2413" )
@@ -156,4 +158,5 @@ MACHINE_START(SMDK2413, "SMDK2413") .map_io = smdk2413_map_io, .init_machine = smdk2413_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2412_restart,MACHINE_END
arch/arm/mach-s3c2412/mach-vstms.c +1 -0
@@ -162,4 +162,5 @@ MACHINE_START(VSTMS, "VSTMS") .init_machine = vstms_init, .map_io = vstms_map_io, .timer = &s3c24xx_timer, + .restart = s3c2412_restart,MACHINE_END
arch/arm/mach-s3c2412/s3c2412.c +4 -6
@@ -32,7 +32,6 @@#include <asm/proc-fns.h> #include <asm/irq.h> -#include <mach/reset.h> #include <mach/idle.h> #include <plat/cpu-freq.h>
@@ -131,8 +130,11 @@ static void s3c2412_idle(void)cpu_do_idle (); } -static void s3c2412_hard_reset (void ) +void s3c2412_restart (char mode,const char *cmd) { +if (mode =='s' ) +soft_restart (0 ); +/* errata "Watch-dog/Software Reset Problem" specifies that * this reset must be done with the SYSCLK sourced from * EXTCLK instead of FOUT to avoid a glitch in the reset
@@ -164,10 +166,6 @@ void __init s3c2412_map_io(void) s3c24xx_idle = s3c2412_idle; -/* set custom reset hook */ - - s3c24xx_reset_hook = s3c2412_hard_reset; -/* register our io-tables */ iotable_init (s3c2412_iodesc,ARRAY_SIZE (s3c2412_iodesc));
arch/arm/mach-s3c2416/mach-smdk2416.c +1 -0
@@ -251,4 +251,5 @@ MACHINE_START(SMDK2416, "SMDK2416") .map_io = smdk2416_map_io, .init_machine = smdk2416_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2416_restart,MACHINE_END
arch/arm/mach-s3c2416/s3c2416.c +4 -3
@@ -44,7 +44,6 @@#include <asm/proc-fns.h> #include <asm/irq.h> -#include <mach/reset.h> #include <mach/idle.h> #include <mach/regs-s3c2443-clock.h>
@@ -76,8 +75,11 @@ static struct sys_device s3c2416_sysdev = { .cls = &s3c2416_sysclass, }; -static void s3c2416_hard_reset (void ) +void s3c2416_restart (char mode,const char *cmd) { +if (mode =='s' ) +soft_restart (0 ); +__raw_writel (S3C2443_SWRST_RESET ,S3C2443_SWRST ); }
@@ -85,7 +87,6 @@ int __init s3c2416_init(void) {printk (KERN_INFO "S3C2416: Initializing architecture\n" ); - s3c24xx_reset_hook = s3c2416_hard_reset;/* s3c24xx_idle = s3c2416_idle; */ /* change WDT IRQ number */
arch/arm/mach-s3c2443/mach-smdk2443.c +1 -0
@@ -145,4 +145,5 @@ MACHINE_START(SMDK2443, "SMDK2443") .map_io = smdk2443_map_io, .init_machine = smdk2443_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2443_restart,MACHINE_END
arch/arm/mach-s3c2443/s3c2443.c +4 -4
@@ -31,7 +31,6 @@#include <asm/irq.h> #include <mach/regs-s3c2443-clock.h> -#include <mach/reset.h> #include <plat/gpio-core.h> #include <plat/gpio-cfg.h>
@@ -57,8 +56,11 @@ static struct sys_device s3c2443_sysdev = { .cls = &s3c2443_sysclass, }; -static void s3c2443_hard_reset (void ) +void s3c2443_restart (char mode,const char *cmd) { +if (mode =='s' ) +soft_restart (0 ); +__raw_writel (S3C2443_SWRST_RESET ,S3C2443_SWRST ); }
@@ -66,8 +68,6 @@ int __init s3c2443_init(void) {printk ("S3C2443: Initialising architecture\n" ); - s3c24xx_reset_hook = s3c2443_hard_reset; -s3c_nand_setname ("s3c2412-nand" );s3c_fb_setname ("s3c2443-fb" );
arch/arm/plat-samsung/include/plat/s3c2412.h +3 -0
@@ -21,9 +21,12 @@ extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no);extern void s3c2412_init_clocks (int xtal);extern int s3c2412_baseclk_add (void ); + +extern void s3c2412_restart (char mode,const char *cmd);#else #define s3c2412_init_clocks NULL#define s3c2412_init_uarts NULL#define s3c2412_map_io NULL#define s3c2412_init NULL +#define s3c2412_restart NULL#endif
arch/arm/plat-samsung/include/plat/s3c2416.h +2 -0
@@ -23,9 +23,11 @@ extern void s3c2416_init_clocks(int xtal);extern int s3c2416_baseclk_add (void ); +extern void s3c2416_restart (char mode,const char *cmd);#else #define s3c2416_init_clocks NULL#define s3c2416_init_uarts NULL#define s3c2416_map_io NULL#define s3c2416_init NULL +#define s3c2416_restart NULL#endif
arch/arm/plat-samsung/include/plat/s3c2443.h +2 -0
@@ -24,11 +24,13 @@ extern void s3c2443_init_clocks(int xtal);extern int s3c2443_baseclk_add (void ); +extern void s3c2443_restart (char mode,const char *cmd);#else #define s3c2443_init_clocks NULL#define s3c2443_init_uarts NULL#define s3c2443_map_io NULL#define s3c2443_init NULL +#define s3c2443_restart NULL#endif /* common code used by s3c2443 and others.
Signature · 1 line
1.7.4.4
PATCH 12/12 ARM: restart: S3C24XX: use new restart hook
In reply to Kukjin KimHook these platforms restart code into the new restart hook rather than using arch_reset().
And adds local header file, common.h in arch/arm/mach-s3c2410/ and arch/arm/mach-s3c2440/ directories.
--- arch/arm/mach-s3c2410/common.h | 17 +++++++++++++ arch/arm/mach-s3c2410/include/mach/system-reset.h | 27 --------------------- arch/arm/mach-s3c2410/include/mach/system.h | 2 - arch/arm/mach-s3c2410/mach-amlm5900.c | 3 ++ arch/arm/mach-s3c2410/mach-bast.c | 2 + arch/arm/mach-s3c2410/mach-h1940.c | 3 ++ arch/arm/mach-s3c2410/mach-n30.c | 4 +++ arch/arm/mach-s3c2410/mach-otom.c | 3 ++ arch/arm/mach-s3c2410/mach-qt2410.c | 5 ++- arch/arm/mach-s3c2410/mach-smdk2410.c | 5 ++- arch/arm/mach-s3c2410/mach-tct_hammer.c | 3 ++ arch/arm/mach-s3c2410/mach-vr1000.c | 2 + arch/arm/mach-s3c2410/s3c2410.c | 9 +++++++ arch/arm/mach-s3c2440/common.h | 17 +++++++++++++ arch/arm/mach-s3c2440/mach-anubis.c | 3 ++ arch/arm/mach-s3c2440/mach-at2440evb.c | 3 ++ arch/arm/mach-s3c2440/mach-gta02.c | 2 + arch/arm/mach-s3c2440/mach-mini2440.c | 3 ++ arch/arm/mach-s3c2440/mach-nexcoder.c | 3 ++ arch/arm/mach-s3c2440/mach-osiris.c | 3 ++ arch/arm/mach-s3c2440/mach-rx1950.c | 3 ++ arch/arm/mach-s3c2440/mach-rx3715.c | 3 ++ arch/arm/mach-s3c2440/mach-smdk2440.c | 3 ++ arch/arm/mach-s3c2440/s3c2440.c | 9 +++++++ arch/arm/plat-s3c24xx/cpu.c | 2 - 25 files changed, 104 insertions(+), 35 deletions(-) create mode 100644 arch/arm/mach-s3c2410/common.h delete mode 100644 arch/arm/mach-s3c2410/include/mach/system-reset.h create mode 100644 arch/arm/mach-s3c2440/common.h
arch/arm/mach-s3c2410/common.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* Copyright (c) 2011 Samsung Electronics Co., Ltd. +* http://www.samsung.com +* +* Common Header for S3C2410 machines +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __ARCH_ARM_MACH_S3C2410_COMMON_H +#define __ARCH_ARM_MACH_S3C2410_COMMON_H + +void s3c2410_restart (char mode,const char *cmd); + +#endif /* __ARCH_ARM_MACH_S3C2410_COMMON_H */
arch/arm/mach-s3c2410/include/mach/system-reset.h deleted +0 -27
@@ -1,27 +0,0 @@ -/* arch/arm/mach-s3c2410/include/mach/system-reset.h -* -* Copyright (c) 2008 Simtec Electronics -* Ben Dooks <[email protected]> -* -* S3C2410 - System define for arch_reset() function -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#include <mach/hardware.h> -#include <plat/watchdog-reset.h> - -static void -arch_reset (char mode,const char *cmd) -{ -if (mode =='s' ) { -soft_restart (0 ); - } - -arch_wdt_reset (); - -/* we'll take a jump through zero as a poor second */ -soft_restart (0 ); -}
arch/arm/mach-s3c2410/include/mach/system.h +0 -2
@@ -52,5 +52,3 @@ static void arch_idle(void)else s3c24xx_default_idle (); } - -#include <mach/system-reset.h>
arch/arm/mach-s3c2410/mach-amlm5900.c +3 -0
@@ -63,6 +63,8 @@#include <linux/mtd/map.h> #include <linux/mtd/physmap.h> +#include "common.h" +static struct resource amlm5900_nor_resource = { .start =0x00000000 , .end =0x01000000 -1 ,
@@ -241,4 +243,5 @@ MACHINE_START(AML_M5900, "AML_M5900") .init_irq = s3c24xx_init_irq, .init_machine = amlm5900_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/mach-bast.c +2 -0
@@ -66,6 +66,7 @@#include "usb-simtec.h" #include "nor-simtec.h" +#include "common.h" #define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics"
@@ -662,4 +663,5 @@ MACHINE_START(BAST, "Simtec-BAST") .init_irq = s3c24xx_init_irq, .init_machine = bast_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/mach-h1940.c +3 -0
@@ -70,6 +70,8 @@#include <sound/uda1380.h> +#include "common.h" +#define H1940_LATCH ((void __force __iomem *)0xF8000000)#define H1940_PA_LATCH S3C2410_CS2
@@ -751,4 +753,5 @@ MACHINE_START(H1940, "IPAQ-H1940") .init_irq = h1940_init_irq, .init_machine = h1940_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/mach-n30.c +4 -0
@@ -51,6 +51,8 @@#include <plat/s3c2410.h> #include <plat/udc.h> +#include "common.h" +static struct map_desc n30_iodesc[]__initdata = {/* nothing here yet */ };
@@ -591,6 +593,7 @@ MACHINE_START(N30, "Acer-N30") .init_machine = n30_init, .init_irq = s3c24xx_init_irq, .map_io = n30_map_io, + .restart = s3c2410_restart, MACHINE_ENDMACHINE_START (N35 ,"Acer-N35" )
@@ -601,4 +604,5 @@ MACHINE_START(N35, "Acer-N35") .init_machine = n30_init, .init_irq = s3c24xx_init_irq, .map_io = n30_map_io, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/mach-otom.c +3 -0
@@ -38,6 +38,8 @@#include <plat/iic.h> #include <plat/cpu.h> +#include "common.h" +static struct map_desc otom11_iodesc[]__initdata = {/* Device area */ { (u32 )OTOM_VA_CS8900A_BASE ,OTOM_PA_CS8900A_BASE ,SZ_16M ,MT_DEVICE },
@@ -121,4 +123,5 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1") .init_machine = otom11_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/mach-qt2410.c +3 -2
@@ -62,6 +62,8 @@#include <plat/cpu.h> #include <plat/pm.h> +#include "common.h" +static struct map_desc qt2410_iodesc[]__initdata = { {0xe0000000 ,__phys_to_pfn (S3C2410_CS3 +0x01000000 ),SZ_1M ,MT_DEVICE } };
@@ -350,6 +352,5 @@ MACHINE_START(QT2410, "QT2410") .init_irq = s3c24xx_init_irq, .init_machine = qt2410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END - -
arch/arm/mach-s3c2410/mach-smdk2410.c +3 -2
@@ -54,6 +54,8 @@#include <plat/common-smdk.h> +#include "common.h" +static struct map_desc smdk2410_iodesc[]__initdata = {/* nothing here yet */ };
@@ -116,6 +118,5 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc .init_irq = s3c24xx_init_irq, .init_machine = smdk2410_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END - -
arch/arm/mach-s3c2410/mach-tct_hammer.c +3 -0
@@ -54,6 +54,8 @@#include <linux/mtd/map.h> #include <linux/mtd/physmap.h> +#include "common.h" +static struct resource tct_hammer_nor_resource = { .start =0x00000000 , .end =0x01000000 -1 ,
@@ -151,4 +153,5 @@ MACHINE_START(TCT_HAMMER, "TCT_HAMMER") .init_irq = s3c24xx_init_irq, .init_machine = tct_hammer_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/mach-vr1000.c +2 -0
@@ -53,6 +53,7 @@#include "usb-simtec.h" #include "nor-simtec.h" +#include "common.h" /* macros for virtual address mods for the io space entries */ #define VA_C5 (item) ((unsigned long)(item) + BAST_VAM_CS5)
@@ -405,4 +406,5 @@ MACHINE_START(VR1000, "Thorcom-VR1000") .init_machine = vr1000_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/s3c2410.c +9 -0
@@ -42,6 +42,7 @@#include <plat/clock.h> #include <plat/pll.h> #include <plat/pm.h> +#include <plat/watchdog-reset.h> #include <plat/gpio-core.h> #include <plat/gpio-cfg.h>
@@ -183,3 +184,11 @@ int __init s3c2410a_init(void) s3c2410_sysdev.cls = &s3c2410a_sysclass;return s3c2410_init (); } + +void s3c2410_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}
arch/arm/mach-s3c2440/common.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* Copyright (c) 2011 Samsung Electronics Co., Ltd. +* http://www.samsung.com +* +* Common Header for S3C2440 machines +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H +#define __ARCH_ARM_MACH_S3C2440_COMMON_H + +void s3c2440_restart (char mode,const char *cmd); + +#endif /* __ARCH_ARM_MACH_S3C2440_COMMON_H */
arch/arm/mach-s3c2440/mach-anubis.c +3 -0
@@ -55,6 +55,8 @@#include <plat/cpu.h> #include <plat/audio-simtec.h> +#include "common.h" +#define COPYRIGHT ", Copyright 2005-2009 Simtec Electronics"static struct map_desc anubis_iodesc[]__initdata = {
@@ -503,4 +505,5 @@ MACHINE_START(ANUBIS, "Simtec-Anubis") .init_machine = anubis_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-at2440evb.c +3 -0
@@ -49,6 +49,8 @@#include <plat/cpu.h> #include <plat/mci.h> +#include "common.h" +static struct map_desc at2440evb_iodesc[]__initdata = {/* Nothing here */ };
@@ -238,4 +240,5 @@ MACHINE_START(AT2440EVB, "AT2440EVB") .init_machine = at2440evb_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-gta02.c +2 -0
@@ -90,6 +90,7 @@#include <plat/iic.h> #include <plat/ts.h> +#include "common.h" static struct pcf50633 *gta02_pcf;
@@ -600,4 +601,5 @@ MACHINE_START(NEO1973_GTA02, "GTA02") .init_irq = s3c24xx_init_irq, .init_machine = gta02_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-mini2440.c +3 -0
@@ -60,6 +60,8 @@#include <sound/s3c24xx_uda134x.h> +#include "common.h" +#define MACH_MINI2440_DM9K_BASE (S3C2410_CS4 + 0x300)static struct map_desc mini2440_iodesc[]__initdata = {
@@ -681,4 +683,5 @@ MACHINE_START(MINI2440, "MINI2440") .init_machine = mini2440_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-nexcoder.c +3 -0
@@ -47,6 +47,8 @@#include <plat/devs.h> #include <plat/cpu.h> +#include "common.h" +static struct map_desc nexcoder_iodesc[]__initdata = {/* nothing here yet */ };
@@ -156,4 +158,5 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") .init_machine = nexcoder_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-osiris.c +3 -0
@@ -54,6 +54,8 @@#include <plat/devs.h> #include <plat/cpu.h> +#include "common.h" +/* onboard perihperal map */ static struct map_desc osiris_iodesc[]__initdata = {
@@ -452,4 +454,5 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS") .init_irq = s3c24xx_init_irq, .init_machine = osiris_init, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-rx1950.c +3 -0
@@ -62,6 +62,8 @@#include <sound/uda1380.h> +#include "common.h" +#define LCD_PWM_PERIOD 192960#define LCD_PWM_DUTY 127353
@@ -832,4 +834,5 @@ MACHINE_START(RX1950, "HP iPAQ RX1950") .init_irq = s3c24xx_init_irq, .init_machine = rx1950_init_machine, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-rx3715.c +3 -0
@@ -51,6 +51,8 @@#include <plat/cpu.h> #include <plat/pm.h> +#include "common.h" +static struct map_desc rx3715_iodesc[]__initdata = {/* dump ISA space somewhere unused */
@@ -224,4 +226,5 @@ MACHINE_START(RX3715, "IPAQ-RX3715") .init_irq = rx3715_init_irq, .init_machine = rx3715_init_machine, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-smdk2440.c +3 -0
@@ -47,6 +47,8 @@#include <plat/common-smdk.h> +#include "common.h" +static struct map_desc smdk2440_iodesc[]__initdata = {/* ISA IO Space map (memory space selected by A24) */
@@ -181,4 +183,5 @@ MACHINE_START(S3C2440, "SMDK2440") .map_io = smdk2440_map_io, .init_machine = smdk2440_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/s3c2440.c +9 -0
@@ -35,6 +35,7 @@#include <plat/cpu.h> #include <plat/s3c244x.h> #include <plat/pm.h> +#include <plat/watchdog-reset.h> #include <plat/gpio-core.h> #include <plat/gpio-cfg.h>
@@ -73,3 +74,11 @@ void __init s3c2440_map_io(void) s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up; s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up; } + +void s3c2440_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}
arch/arm/plat-s3c24xx/cpu.c +0 -2
@@ -38,8 +38,6 @@#include <asm/mach/arch.h> #include <asm/mach/map.h> -#include <mach/system-reset.h> -#include <mach/regs-gpio.h> #include <plat/regs-serial.h>
Signature · 1 line
1.7.4.4
PATCH 12/12 ARM: restart: S3C24XX: use new restart hook
Am Dienstag, 20. Dezember 2011, 13:48:36 schrieb Kukjin Kim:
Quoted 8 lines
Hook these platforms restart code into the new restart hook rather than using
arch_reset().
And adds local header file,common.hinarch/arm/mach-s3c2410/andarch/arm/mach-s3c2440/directories.Cc Ben Dooks <[email protected]>Cc Russell King <[email protected]>Signed-off-by Kukjin Kim <[email protected]>
just for my understanding would it not also be possible to move the function prototype to plat-samsung/include/plat/s3c2410.h and s3c244x.h?
Or should these files vanish in the long run?
Also, if you have a minute could you take a look at the [PATCH 1/8] s3c-hsudc: move platform_data struct to global header from yesterday, as Felipe Balbi would like an Ack on it.
Thanks
Heiko
Quoted 534 lines
--- arch/arm/mach-s3c2410/common.h | 17 +++++++++++++ arch/arm/mach-s3c2410/include/mach/system-reset.h | 27 --------------------- arch/arm/mach-s3c2410/include/mach/system.h | 2 - arch/arm/mach-s3c2410/mach-amlm5900.c | 3 ++ arch/arm/mach-s3c2410/mach-bast.c | 2 + arch/arm/mach-s3c2410/mach-h1940.c | 3 ++ arch/arm/mach-s3c2410/mach-n30.c | 4 +++ arch/arm/mach-s3c2410/mach-otom.c | 3 ++ arch/arm/mach-s3c2410/mach-qt2410.c | 5 ++- arch/arm/mach-s3c2410/mach-smdk2410.c | 5 ++- arch/arm/mach-s3c2410/mach-tct_hammer.c | 3 ++ arch/arm/mach-s3c2410/mach-vr1000.c | 2 + arch/arm/mach-s3c2410/s3c2410.c | 9 +++++++ arch/arm/mach-s3c2440/common.h | 17 +++++++++++++ arch/arm/mach-s3c2440/mach-anubis.c | 3 ++ arch/arm/mach-s3c2440/mach-at2440evb.c | 3 ++ arch/arm/mach-s3c2440/mach-gta02.c | 2 + arch/arm/mach-s3c2440/mach-mini2440.c | 3 ++ arch/arm/mach-s3c2440/mach-nexcoder.c | 3 ++ arch/arm/mach-s3c2440/mach-osiris.c | 3 ++ arch/arm/mach-s3c2440/mach-rx1950.c | 3 ++ arch/arm/mach-s3c2440/mach-rx3715.c | 3 ++ arch/arm/mach-s3c2440/mach-smdk2440.c | 3 ++ arch/arm/mach-s3c2440/s3c2440.c | 9 +++++++ arch/arm/plat-s3c24xx/cpu.c | 2 - 25 files changed, 104 insertions(+), 35 deletions(-) create mode 100644 arch/arm/mach-s3c2410/common.h delete mode 100644 arch/arm/mach-s3c2410/include/mach/system-reset.h create mode 100644 arch/arm/mach-s3c2440/common.h(quoted diff) +0
-0
b/arch/arm/mach-s3c2410/common.hnew file mode 100644 index 0000000..f65dc80arch/arm/mach-s3c2410/common.h new file +17
-0@@ -0,0 +1,17 @@ +/* +* Copyright (c) 2011 Samsung Electronics Co., Ltd. +* http://www.samsung.com +* +* Common Header for S3C2410 machines +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __ARCH_ARM_MACH_S3C2410_COMMON_H +#define __ARCH_ARM_MACH_S3C2410_COMMON_H + +void s3c2410_restart (char mode,const char *cmd); + +#endif /* __ARCH_ARM_MACH_S3C2410_COMMON_H */ (quoted diff) +0
-0
b/arch/arm/mach-s3c2410/include/mach/system-reset.hdeleted file mode 100644
index 1e495f3..0000000arch/arm/mach-s3c2410/include/mach/system-reset.h deleted +0
-27@@ -1,27 +0,0 @@ -/* arch/arm/mach-s3c2410/include/mach/system-reset.h -* -* Copyright (c) 2008 Simtec Electronics -* Ben Dooks <[email protected]> -* -* S3C2410 - System define for arch_reset() function -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#include <mach/hardware.h> -#include <plat/watchdog-reset.h> - -static void -arch_reset (char mode,const char *cmd) -{ -if (mode =='s' ) { -soft_restart (0 ); - } - -arch_wdt_reset (); - -/* we'll take a jump through zero as a poor second */ -soft_restart (0 ); -}(quoted diff) +0
-0
b/arch/arm/mach-s3c2410/include/mach/system.hindex eef8f24..5e215c1 100644arch/arm/mach-s3c2410/include/mach/system.h +0
-2@@ -52,5 +52,3 @@ static void arch_idle(void)else s3c24xx_default_idle (); } - -#include <mach/system-reset.h> (quoted diff) +0
-0
b/arch/arm/mach-s3c2410/mach-amlm5900.cindex 7983894..4220cc6 100644arch/arm/mach-s3c2410/mach-amlm5900.c +3
-0@@ -63,6 +63,8 @@#include <linux/mtd/map.h> #include <linux/mtd/physmap.h> +#include "common.h" +static struct resource amlm5900_nor_resource = { .start =0x00000000 , .end =0x01000000 -1 ,@@ -241,4 +243,5 @@ MACHINE_START(AML_M5900, "AML_M5900") .init_irq = s3c24xx_init_irq, .init_machine = amlm5900_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2410/mach-bast.cindex a20ae1a..c6133c6 100644arch/arm/mach-s3c2410/mach-bast.c +2
-0@@ -66,6 +66,7 @@#include "usb-simtec.h" #include "nor-simtec.h" +#include "common.h" #define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics"@@ -662,4 +663,5 @@ MACHINE_START(BAST, "Simtec-BAST") .init_irq = s3c24xx_init_irq, .init_machine = bast_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2410/mach-h1940.cindex 05a7d16..ad9d865 100644arch/arm/mach-s3c2410/mach-h1940.c +3
-0@@ -70,6 +70,8 @@#include <sound/uda1380.h> +#include "common.h" +#define H1940_LATCH ((void __force __iomem *)0xF8000000)#define H1940_PA_LATCH S3C2410_CS2@@ -751,4 +753,5 @@ MACHINE_START(H1940, "IPAQ-H1940") .init_irq = h1940_init_irq, .init_machine = h1940_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2410/mach-n30.cindex 1dc3e32..383d00c 100644arch/arm/mach-s3c2410/mach-n30.c +4
-0@@ -51,6 +51,8 @@#include <plat/s3c2410.h> #include <plat/udc.h> +#include "common.h" +static struct map_desc n30_iodesc[]__initdata = {/* nothing here yet */ };@@ -591,6 +593,7 @@ MACHINE_START(N30, "Acer-N30") .init_machine = n30_init, .init_irq = s3c24xx_init_irq, .map_io = n30_map_io, + .restart = s3c2410_restart, MACHINE_ENDMACHINE_START (N35 ,"Acer-N35" )@@ -601,4 +604,5 @@ MACHINE_START(N35, "Acer-N35") .init_machine = n30_init, .init_irq = s3c24xx_init_irq, .map_io = n30_map_io, + .restart = s3c2410_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2410/mach-otom.cindex f03f3fd..5f1e0ee 100644arch/arm/mach-s3c2410/mach-otom.c +3
-0@@ -38,6 +38,8 @@#include <plat/iic.h> #include <plat/cpu.h> +#include "common.h" +static struct map_desc otom11_iodesc[]__initdata = {/* Device area */ { (u32 )OTOM_VA_CS8900A_BASE ,OTOM_PA_CS8900A_BASE ,SZ_16M ,MT_DEVICE },@@ -121,4 +123,5 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1") .init_machine = otom11_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2410/mach-qt2410.cindex 4518521..58f2c17 100644arch/arm/mach-s3c2410/mach-qt2410.c +3
-2@@ -62,6 +62,8 @@#include <plat/cpu.h> #include <plat/pm.h> +#include "common.h" +static struct map_desc qt2410_iodesc[]__initdata = { {0xe0000000 ,__phys_to_pfn (S3C2410_CS3 +0x01000000 ),SZ_1M ,MT_DEVICE } };@@ -350,6 +352,5 @@ MACHINE_START(QT2410, "QT2410") .init_irq = s3c24xx_init_irq, .init_machine = qt2410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END - -(quoted diff) +0
-0
b/arch/arm/mach-s3c2410/mach-smdk2410.cindex 99c9dfd..bdc27e7 100644arch/arm/mach-s3c2410/mach-smdk2410.c +3
-2@@ -54,6 +54,8 @@#include <plat/common-smdk.h> +#include "common.h" +static struct map_desc smdk2410_iodesc[]__initdata = {/* nothing here yet */ };@@ -116,6 +118,5 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc .init_irq = s3c24xx_init_irq, .init_machine = smdk2410_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END - -(quoted diff) +0
-0
b/arch/arm/mach-s3c2410/mach-tct_hammer.cindex e0d0b6f..1114666 100644arch/arm/mach-s3c2410/mach-tct_hammer.c +3
-0@@ -54,6 +54,8 @@#include <linux/mtd/map.h> #include <linux/mtd/physmap.h> +#include "common.h" +static struct resource tct_hammer_nor_resource = { .start =0x00000000 , .end =0x01000000 -1 ,@@ -151,4 +153,5 @@ MACHINE_START(TCT_HAMMER, "TCT_HAMMER") .init_irq = s3c24xx_init_irq, .init_machine = tct_hammer_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2410/mach-vr1000.cindex df47e8e..cc7032b 100644arch/arm/mach-s3c2410/mach-vr1000.c +2
-0@@ -53,6 +53,7 @@#include "usb-simtec.h" #include "nor-simtec.h" +#include "common.h" /* macros for virtual address mods for the io space entries */ #define VA_C5 (item) ((unsigned long)(item) + BAST_VAM_CS5)@@ -405,4 +406,5 @@ MACHINE_START(VR1000, "Thorcom-VR1000") .init_machine = vr1000_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2410/s3c2410.cindex 3d7ebc5..c3044cd 100644arch/arm/mach-s3c2410/s3c2410.c +9
-0@@ -42,6 +42,7 @@#include <plat/clock.h> #include <plat/pll.h> #include <plat/pm.h> +#include <plat/watchdog-reset.h> #include <plat/gpio-core.h> #include <plat/gpio-cfg.h> @@ -183,3 +184,11 @@ int __init s3c2410a_init(void) s3c2410_sysdev.cls = &s3c2410a_sysclass;return s3c2410_init (); } + +void s3c2410_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}(quoted diff) +0
-0
b/arch/arm/mach-s3c2440/common.hnew file mode 100644 index 0000000..db8a98aarch/arm/mach-s3c2440/common.h new file +17
-0@@ -0,0 +1,17 @@ +/* +* Copyright (c) 2011 Samsung Electronics Co., Ltd. +* http://www.samsung.com +* +* Common Header for S3C2440 machines +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H +#define __ARCH_ARM_MACH_S3C2440_COMMON_H + +void s3c2440_restart (char mode,const char *cmd); + +#endif /* __ARCH_ARM_MACH_S3C2440_COMMON_H */ (quoted diff) +0
-0
b/arch/arm/mach-s3c2440/mach-anubis.cindex 74f92fc..121ff8d 100644arch/arm/mach-s3c2440/mach-anubis.c +3
-0@@ -55,6 +55,8 @@#include <plat/cpu.h> #include <plat/audio-simtec.h> +#include "common.h" +#define COPYRIGHT ", Copyright 2005-2009 Simtec Electronics"static struct map_desc anubis_iodesc[]__initdata = {@@ -503,4 +505,5 @@ MACHINE_START(ANUBIS, "Simtec-Anubis") .init_machine = anubis_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2440/mach-at2440evb.cindex 38887ee..b7e334f 100644arch/arm/mach-s3c2440/mach-at2440evb.c +3
-0@@ -49,6 +49,8 @@#include <plat/cpu.h> #include <plat/mci.h> +#include "common.h" +static struct map_desc at2440evb_iodesc[]__initdata = {/* Nothing here */ };@@ -238,4 +240,5 @@ MACHINE_START(AT2440EVB, "AT2440EVB") .init_machine = at2440evb_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2440/mach-gta02.cindex de1e0ff..5859e60 100644arch/arm/mach-s3c2440/mach-gta02.c +2
-0@@ -90,6 +90,7 @@#include <plat/iic.h> #include <plat/ts.h> +#include "common.h" static struct pcf50633 *gta02_pcf;@@ -600,4 +601,5 @@ MACHINE_START(NEO1973_GTA02, "GTA02") .init_irq = s3c24xx_init_irq, .init_machine = gta02_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2440/mach-mini2440.cindex 91fe0b4..437322f 100644arch/arm/mach-s3c2440/mach-mini2440.c +3
-0@@ -60,6 +60,8 @@#include <sound/s3c24xx_uda134x.h> +#include "common.h" +#define MACH_MINI2440_DM9K_BASE (S3C2410_CS4 + 0x300)static struct map_desc mini2440_iodesc[]__initdata = {@@ -681,4 +683,5 @@ MACHINE_START(MINI2440, "MINI2440") .init_machine = mini2440_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2440/mach-nexcoder.cindex 61c0bf1..40eaf84 100644arch/arm/mach-s3c2440/mach-nexcoder.c +3
-0@@ -47,6 +47,8 @@#include <plat/devs.h> #include <plat/cpu.h> +#include "common.h" +static struct map_desc nexcoder_iodesc[]__initdata = {/* nothing here yet */ };@@ -156,4 +158,5 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") .init_machine = nexcoder_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2440/mach-osiris.cindex dc142eb..e795715 100644arch/arm/mach-s3c2440/mach-osiris.c +3
-0@@ -54,6 +54,8 @@#include <plat/devs.h> #include <plat/cpu.h> +#include "common.h" +/* onboard perihperal map */ static struct map_desc osiris_iodesc[]__initdata = {@@ -452,4 +454,5 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS") .init_irq = s3c24xx_init_irq, .init_machine = osiris_init, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2440/mach-rx1950.cindex 0d3453b..1c50d3e 100644arch/arm/mach-s3c2440/mach-rx1950.c +3
-0@@ -62,6 +62,8 @@#include <sound/uda1380.h> +#include "common.h" +#define LCD_PWM_PERIOD 192960#define LCD_PWM_DUTY 127353@@ -832,4 +834,5 @@ MACHINE_START(RX1950, "HP iPAQ RX1950") .init_irq = s3c24xx_init_irq, .init_machine = rx1950_init_machine, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2440/mach-rx3715.cindex e19499c..4d20a01 100644arch/arm/mach-s3c2440/mach-rx3715.c +3
-0@@ -51,6 +51,8 @@#include <plat/cpu.h> #include <plat/pm.h> +#include "common.h" +static struct map_desc rx3715_iodesc[]__initdata = {/* dump ISA space somewhere unused */ @@ -224,4 +226,5 @@ MACHINE_START(RX3715, "IPAQ-RX3715") .init_irq = rx3715_init_irq, .init_machine = rx3715_init_machine, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2440/mach-smdk2440.cindex 36eeb41..1deb60d 100644arch/arm/mach-s3c2440/mach-smdk2440.c +3
-0@@ -47,6 +47,8 @@#include <plat/common-smdk.h> +#include "common.h" +static struct map_desc smdk2440_iodesc[]__initdata = {/* ISA IO Space map (memory space selected by A24) */ @@ -181,4 +183,5 @@ MACHINE_START(S3C2440, "SMDK2440") .map_io = smdk2440_map_io, .init_machine = smdk2440_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END (quoted diff) +0
-0
b/arch/arm/mach-s3c2440/s3c2440.cindex 37f8cc6..01a8dc8 100644arch/arm/mach-s3c2440/s3c2440.c +9
-0@@ -35,6 +35,7 @@#include <plat/cpu.h> #include <plat/s3c244x.h> #include <plat/pm.h> +#include <plat/watchdog-reset.h> #include <plat/gpio-core.h> #include <plat/gpio-cfg.h> @@ -73,3 +74,11 @@ void __init s3c2440_map_io(void) s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up; s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up; } + +void s3c2440_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}arch/arm/plat-s3c24xx/cpu.c +0
-2@@ -38,8 +38,6 @@#include <asm/mach/arch.h> #include <asm/mach/map.h> -#include <mach/system-reset.h> -#include <mach/regs-gpio.h> #include <plat/regs-serial.h>
PATCH 12/12 ARM: restart: S3C24XX: use new restart hook
Quoted 6 lines · Heiko St?bner
Am Dienstag, 20. Dezember 2011, 13:48:36 schrieb Kukjin Kim:
Quoted 5 lines
Hook these platforms restart code into the new restart hook rather than using
arch_reset().
And adds local header file,common.hinarch/arm/mach-s3c2410/andarch/arm/mach-s3c2440/directories.
Quoted 6 lines
Quoted 3 lines
Cc Ben Dooks<[email protected]>Cc Russell King<[email protected]>Signed-off-by Kukjin Kim<[email protected]>just for my understanding would it not also be possible to move the function prototype to
plat-samsung/include/plat/s3c2410.hands3c244x.h?
Hi Heiko,
Yeah, we have many choices about that and I will sort out the mach-s3c24.. directories to mach-s3c24xx or just mach-s3c...
Quoted 2 lines
Or should these files vanish in the long run?
Yes, as per Russell's suggestion, I think we don't need that and as a note, I'm working on removing plat-s3c24xx and plat-s5p, just keeping one plat-samsung.
Quoted 5 lines
Also, if you have a minute could you take a look at the [PATCH 1/8] s3c-hsudc: move
platform_datastruct to global header from yesterday, as Felipe Balbi would like an Ack on it.
Sure, let me look at that tomorrow with others.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Quoted 32 lines
Quoted 32 lines
--- arch/arm/mach-s3c2410/common.h | 17 +++++++++++++ arch/arm/mach-s3c2410/include/mach/system-reset.h | 27 --------------------- arch/arm/mach-s3c2410/include/mach/system.h | 2 - arch/arm/mach-s3c2410/mach-amlm5900.c | 3 ++ arch/arm/mach-s3c2410/mach-bast.c | 2 + arch/arm/mach-s3c2410/mach-h1940.c | 3 ++ arch/arm/mach-s3c2410/mach-n30.c | 4 +++ arch/arm/mach-s3c2410/mach-otom.c | 3 ++ arch/arm/mach-s3c2410/mach-qt2410.c | 5 ++- arch/arm/mach-s3c2410/mach-smdk2410.c | 5 ++- arch/arm/mach-s3c2410/mach-tct_hammer.c | 3 ++ arch/arm/mach-s3c2410/mach-vr1000.c | 2 + arch/arm/mach-s3c2410/s3c2410.c | 9 +++++++ arch/arm/mach-s3c2440/common.h | 17 +++++++++++++ arch/arm/mach-s3c2440/mach-anubis.c | 3 ++ arch/arm/mach-s3c2440/mach-at2440evb.c | 3 ++ arch/arm/mach-s3c2440/mach-gta02.c | 2 + arch/arm/mach-s3c2440/mach-mini2440.c | 3 ++ arch/arm/mach-s3c2440/mach-nexcoder.c | 3 ++ arch/arm/mach-s3c2440/mach-osiris.c | 3 ++ arch/arm/mach-s3c2440/mach-rx1950.c | 3 ++ arch/arm/mach-s3c2440/mach-rx3715.c | 3 ++ arch/arm/mach-s3c2440/mach-smdk2440.c | 3 ++ arch/arm/mach-s3c2440/s3c2440.c | 9 +++++++ arch/arm/plat-s3c24xx/cpu.c | 2 - 25 files changed, 104 insertions(+), 35 deletions(-)create mode 100644
arch/arm/mach-s3c2410/common.h
delete mode 100644arch/arm/mach-s3c2410/include/mach/system-reset.hcreate mode 100644arch/arm/mach-s3c2440/common.h
PATCH 12/12 ARM: restart: S3C24XX: use new restart hook
Hi Kgene,
Am Dienstag, 20. Dezember 2011, 14:34:58 schrieb Kukjin Kim:
Quoted 14 lines · Heiko St?bner
Quoted 6 lines
Am Dienstag, 20. Dezember 2011, 13:48:36 schrieb Kukjin Kim:
Quoted 5 lines
Hook these platforms restart code into the new restart hook rather than using
arch_reset().
And adds local header file,common.hinarch/arm/mach-s3c2410/andarch/arm/mach-s3c2440/directories.Quoted 6 lines
Quoted 3 lines
Cc Ben Dooks<[email protected]>Cc Russell King<[email protected]>Signed-off-by Kukjin Kim<[email protected]>just for my understanding would it not also be possible to move the function prototype to
plat-samsung/include/plat/s3c2410.hands3c244x.h?
Quoted 8 lines
Yeah, we have many choices about that and I will sort out the mach-s3c24.. directories to mach-s3c24xx or just mach-s3c...
Quoted 1 line
Or should these files vanish in the long run?
Yes, as per Russell's suggestion, I think we don't need that and as a note, I'm working on removing plat-s3c24xx and plat-s5p, just keeping one plat-samsung.
I'm currently working on introducing a power-domain for the usb-phy of the S3C2443/S3C2416/S3C2450. This is one step mimicing the work of Mark Brown to get better idle handling later on, and also again reduces the number of architecture-calls the hsudc driver does, as requested by Felipe Balbi.
Therefore I'm introducing a new s3c2443-pm-common.c. Question now is, should this move directly to plat-samsung?
Thanks
Heiko
PATCH 12/12 ARM: restart: S3C24XX: use new restart hook
Quoted 2 lines · Heiko St?bner
Therefore I'm introducing a new
s3c2443-pm-common.c. Question now is, should this move directly to plat-samsung?
If it's s3c2443 specific I'd expect it'd end up in the relevant mach directory?
PATCH 12/12 ARM: restart: S3C24XX: use new restart hook
Am Montag, 2. Januar 2012, 14:26:31 schrieb Mark Brown:
Quoted 6 lines · Heiko St?bner
Quoted 2 lines
Therefore I'm introducing a new
s3c2443-pm-common.c. Question now is, should this move directly to plat-samsung?If it's s3c2443 specific I'd expect it'd end up in the relevant mach directory?
nope, it's specific to 2443, 2416 and 2450. These three SoCs seem to share a lot of features and it seems other common code (i.e. plat-s3c24xx/s3c2443- clock.c) has got its name from the first SoC that had this feature (the S3C2443 in 2007).
Therefore I just continue this naming scheme, as I also don't have a better idea on how to identify all three of them at once.
Heiko
PATCH 12/12 ARM: restart: S3C24XX: use new restart hook
Quoted 6 lines · Heiko St?bner
Am Montag, 2. Januar 2012, 14:26:31 schrieb Mark Brown:
Quoted 4 lines · Heiko St?bner
Quoted 3 lines
Therefore I'm introducing a new
s3c2443-pm-common.c. Question now is, should this move directly to plat-samsung?
Quoted 7 lines
Quoted 2 lines
If it's s3c2443 specific I'd expect it'd end up in the relevant mach directory?
nope, it's specific to 2443, 2416 and 2450. These three SoCs seem to share a lot of features and it seems other common code (i.e. plat-s3c24xx/s3c2443-
clock.c) has got its name from the first SoC that had this feature (the S3C2443 in 2007).
Oh, right - that's not terribly clear but I guess.
PATCH 12/12 ARM: restart: S3C24XX: use new restart hook
Quoted 6 lines · Mark Brown
Quoted 4 lines · Heiko St?bner
Am Montag, 2. Januar 2012, 14:26:31 schrieb Mark Brown:
Quoted 3 lines · Heiko St?bner
Quoted 2 lines
Therefore I'm introducing a new
s3c2443-pm-common.c. Question now
is,
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
should this move directly to plat-samsung?
If it's s3c2443 specific I'd expect it'd end up in the relevant mach directory?
Quoted 8 lines
Quoted 1 line
nope, it's specific to 2443, 2416 and 2450. These three SoCs seem to
share a
Quoted 1 line
lot of features and it seems other common code (i.e. plat-
s3c24xx/s3c2443-
Quoted 2 lines
clock.c) has got its name from the first SoC that had this feature (the S3C2443 in 2007).Oh, right - that's not terribly clear but I guess.
Heiko, I think your file can be placed in plat-s3c24xx/ now and if required, I will move them into plat-samsung or just mach-s3c24xx. I mean I'm sorting out the mach-s3c2410/, mach-s3c2412/, mach-s3c2416/, mach-s3c2440/ and mach-s3c2443 directories too.
As a note, the working of one plat-samsung will be finished next time for v3.4.
Happy New Year.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 12/12 ARM: restart: S3C24XX: use new restart hook
In reply to Kukjin KimQuoted 543 lines · Kukjin Kim
Hook these platforms restart code into the new restart hook rather than using
arch_reset().
And adds local header file,common.hinarch/arm/mach-s3c2410/andarch/arm/mach-s3c2440/directories.Cc Ben Dooks <[email protected]>Cc Russell King <[email protected]>Signed-off-by Kukjin Kim <[email protected]>--- arch/arm/mach-s3c2410/common.h | 17 +++++++++++++ arch/arm/mach-s3c2410/include/mach/system-reset.h | 27 --------------------- arch/arm/mach-s3c2410/include/mach/system.h | 2 - arch/arm/mach-s3c2410/mach-amlm5900.c | 3 ++ arch/arm/mach-s3c2410/mach-bast.c | 2 + arch/arm/mach-s3c2410/mach-h1940.c | 3 ++ arch/arm/mach-s3c2410/mach-n30.c | 4 +++ arch/arm/mach-s3c2410/mach-otom.c | 3 ++ arch/arm/mach-s3c2410/mach-qt2410.c | 5 ++- arch/arm/mach-s3c2410/mach-smdk2410.c | 5 ++- arch/arm/mach-s3c2410/mach-tct_hammer.c | 3 ++ arch/arm/mach-s3c2410/mach-vr1000.c | 2 + arch/arm/mach-s3c2410/s3c2410.c | 9 +++++++ arch/arm/mach-s3c2440/common.h | 17 +++++++++++++ arch/arm/mach-s3c2440/mach-anubis.c | 3 ++ arch/arm/mach-s3c2440/mach-at2440evb.c | 3 ++ arch/arm/mach-s3c2440/mach-gta02.c | 2 + arch/arm/mach-s3c2440/mach-mini2440.c | 3 ++ arch/arm/mach-s3c2440/mach-nexcoder.c | 3 ++ arch/arm/mach-s3c2440/mach-osiris.c | 3 ++ arch/arm/mach-s3c2440/mach-rx1950.c | 3 ++ arch/arm/mach-s3c2440/mach-rx3715.c | 3 ++ arch/arm/mach-s3c2440/mach-smdk2440.c | 3 ++ arch/arm/mach-s3c2440/s3c2440.c | 9 +++++++ arch/arm/plat-s3c24xx/cpu.c | 2 - 25 files changed, 104 insertions(+), 35 deletions(-) create mode 100644 arch/arm/mach-s3c2410/common.h delete mode 100644 arch/arm/mach-s3c2410/include/mach/system-reset.h create mode 100644 arch/arm/mach-s3c2440/common.harch/arm/mach-s3c2410/common.h new file +17
-0@@ -0,0 +1,17 @@ +/* +* Copyright (c) 2011 Samsung Electronics Co., Ltd. +* http://www.samsung.com +* +* Common Header for S3C2410 machines +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __ARCH_ARM_MACH_S3C2410_COMMON_H +#define __ARCH_ARM_MACH_S3C2410_COMMON_H + +void s3c2410_restart (char mode,const char *cmd); + +#endif /* __ARCH_ARM_MACH_S3C2410_COMMON_H */ arch/arm/mach- renamed from arch/arm/mach-s3c2410/include/mach/system-reset.h +0
-0
s3c2410/include/mach/system-reset.h
deleted file mode 100644
index 1e495f3..0000000arch/arm/mach-s3c2410/include/mach/system-reset.h deleted +0
-27@@ -1,27 +0,0 @@ -/* arch/arm/mach-s3c2410/include/mach/system-reset.h -* -* Copyright (c) 2008 Simtec Electronics -* Ben Dooks <[email protected]> -* -* S3C2410 - System define for arch_reset() function -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#include <mach/hardware.h> -#include <plat/watchdog-reset.h> - -static void -arch_reset (char mode,const char *cmd) -{ -if (mode =='s' ) { -soft_restart (0 ); - } - -arch_wdt_reset (); - -/* we'll take a jump through zero as a poor second */ -soft_restart (0 ); -}arch/arm/mach-s3c2410/include/mach/system.h +0
-2@@ -52,5 +52,3 @@ static void arch_idle(void)else s3c24xx_default_idle (); } - -#include <mach/system-reset.h> arch/arm/mach-s3c2410/mach-amlm5900.c +3
-0@@ -63,6 +63,8 @@#include <linux/mtd/map.h> #include <linux/mtd/physmap.h> +#include "common.h" +static struct resource amlm5900_nor_resource = { .start =0x00000000 , .end =0x01000000 -1 ,@@ -241,4 +243,5 @@ MACHINE_START(AML_M5900, "AML_M5900") .init_irq = s3c24xx_init_irq, .init_machine = amlm5900_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END arch/arm/mach-s3c2410/mach-bast.c +2
-0@@ -66,6 +66,7 @@#include "usb-simtec.h" #include "nor-simtec.h" +#include "common.h" #define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics"@@ -662,4 +663,5 @@ MACHINE_START(BAST, "Simtec-BAST") .init_irq = s3c24xx_init_irq, .init_machine = bast_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END arch/arm/mach-s3c2410/mach-h1940.c +3
-0@@ -70,6 +70,8 @@#include <sound/uda1380.h> +#include "common.h" +#define H1940_LATCH ((void __force __iomem *)0xF8000000)#define H1940_PA_LATCH S3C2410_CS2@@ -751,4 +753,5 @@ MACHINE_START(H1940, "IPAQ-H1940") .init_irq = h1940_init_irq, .init_machine = h1940_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END arch/arm/mach-s3c2410/mach-n30.c +4
-0@@ -51,6 +51,8 @@#include <plat/s3c2410.h> #include <plat/udc.h> +#include "common.h" +static struct map_desc n30_iodesc[]__initdata = {/* nothing here yet */ };@@ -591,6 +593,7 @@ MACHINE_START(N30, "Acer-N30") .init_machine = n30_init, .init_irq = s3c24xx_init_irq, .map_io = n30_map_io, + .restart = s3c2410_restart, MACHINE_ENDMACHINE_START (N35 ,"Acer-N35" )@@ -601,4 +604,5 @@ MACHINE_START(N35, "Acer-N35") .init_machine = n30_init, .init_irq = s3c24xx_init_irq, .map_io = n30_map_io, + .restart = s3c2410_restart,MACHINE_END arch/arm/mach-s3c2410/mach-otom.c +3
-0@@ -38,6 +38,8 @@#include <plat/iic.h> #include <plat/cpu.h> +#include "common.h" +static struct map_desc otom11_iodesc[]__initdata = {/* Device area */ { (u32 )OTOM_VA_CS8900A_BASE ,OTOM_PA_CS8900A_BASE ,SZ_16M ,MT_DEVICE },@@ -121,4 +123,5 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1") .init_machine = otom11_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END arch/arm/mach-s3c2410/mach-qt2410.c +3
-2@@ -62,6 +62,8 @@#include <plat/cpu.h> #include <plat/pm.h> +#include "common.h" +static struct map_desc qt2410_iodesc[]__initdata = { {0xe0000000 ,__phys_to_pfn (S3C2410_CS3 +0x01000000 ),SZ_1M ,MT_DEVICE } };@@ -350,6 +352,5 @@ MACHINE_START(QT2410, "QT2410") .init_irq = s3c24xx_init_irq, .init_machine = qt2410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END - -arch/arm/mach-s3c2410/mach-smdk2410.c +3
-2@@ -54,6 +54,8 @@#include <plat/common-smdk.h> +#include "common.h" +static struct map_desc smdk2410_iodesc[]__initdata = {/* nothing here yet */ };@@ -116,6 +118,5 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc .init_irq = s3c24xx_init_irq, .init_machine = smdk2410_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END - -arch/arm/mach-s3c2410/mach-tct_hammer.c +3
-0@@ -54,6 +54,8 @@#include <linux/mtd/map.h> #include <linux/mtd/physmap.h> +#include "common.h" +static struct resource tct_hammer_nor_resource = { .start =0x00000000 , .end =0x01000000 -1 ,@@ -151,4 +153,5 @@ MACHINE_START(TCT_HAMMER, "TCT_HAMMER") .init_irq = s3c24xx_init_irq, .init_machine = tct_hammer_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END arch/arm/mach-s3c2410/mach-vr1000.c +2
-0@@ -53,6 +53,7 @@#include "usb-simtec.h" #include "nor-simtec.h" +#include "common.h" /* macros for virtual address mods for the io space entries */ #define VA_C5 (item) ((unsigned long)(item) + BAST_VAM_CS5)@@ -405,4 +406,5 @@ MACHINE_START(VR1000, "Thorcom-VR1000") .init_machine = vr1000_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END arch/arm/mach-s3c2410/s3c2410.c +9
-0@@ -42,6 +42,7 @@#include <plat/clock.h> #include <plat/pll.h> #include <plat/pm.h> +#include <plat/watchdog-reset.h> #include <plat/gpio-core.h> #include <plat/gpio-cfg.h> @@ -183,3 +184,11 @@ int __init s3c2410a_init(void) s3c2410_sysdev.cls = &s3c2410a_sysclass;return s3c2410_init (); } + +void s3c2410_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}arch/arm/mach-s3c2440/common.h new file +17
-0@@ -0,0 +1,17 @@ +/* +* Copyright (c) 2011 Samsung Electronics Co., Ltd. +* http://www.samsung.com +* +* Common Header for S3C2440 machines +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H +#define __ARCH_ARM_MACH_S3C2440_COMMON_H + +void s3c2440_restart (char mode,const char *cmd); + +#endif /* __ARCH_ARM_MACH_S3C2440_COMMON_H */ arch/arm/mach-s3c2440/mach-anubis.c +3
-0@@ -55,6 +55,8 @@#include <plat/cpu.h> #include <plat/audio-simtec.h> +#include "common.h" +#define COPYRIGHT ", Copyright 2005-2009 Simtec Electronics"static struct map_desc anubis_iodesc[]__initdata = {@@ -503,4 +505,5 @@ MACHINE_START(ANUBIS, "Simtec-Anubis") .init_machine = anubis_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END arch/arm/mach-s3c2440/mach-at2440evb.c +3
-0@@ -49,6 +49,8 @@#include <plat/cpu.h> #include <plat/mci.h> +#include "common.h" +static struct map_desc at2440evb_iodesc[]__initdata = {/* Nothing here */ };@@ -238,4 +240,5 @@ MACHINE_START(AT2440EVB, "AT2440EVB") .init_machine = at2440evb_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END arch/arm/mach-s3c2440/mach-gta02.c +2
-0@@ -90,6 +90,7 @@#include <plat/iic.h> #include <plat/ts.h> +#include "common.h" static struct pcf50633 *gta02_pcf;@@ -600,4 +601,5 @@ MACHINE_START(NEO1973_GTA02, "GTA02") .init_irq = s3c24xx_init_irq, .init_machine = gta02_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END arch/arm/mach-s3c2440/mach-mini2440.c +3
-0@@ -60,6 +60,8 @@#include <sound/s3c24xx_uda134x.h> +#include "common.h" +#define MACH_MINI2440_DM9K_BASE (S3C2410_CS4 + 0x300)static struct map_desc mini2440_iodesc[]__initdata = {@@ -681,4 +683,5 @@ MACHINE_START(MINI2440, "MINI2440") .init_machine = mini2440_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END arch/arm/mach-s3c2440/mach-nexcoder.c +3
-0@@ -47,6 +47,8 @@#include <plat/devs.h> #include <plat/cpu.h> +#include "common.h" +static struct map_desc nexcoder_iodesc[]__initdata = {/* nothing here yet */ };@@ -156,4 +158,5 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") .init_machine = nexcoder_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END arch/arm/mach-s3c2440/mach-osiris.c +3
-0@@ -54,6 +54,8 @@#include <plat/devs.h> #include <plat/cpu.h> +#include "common.h" +/* onboard perihperal map */ static struct map_desc osiris_iodesc[]__initdata = {@@ -452,4 +454,5 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS") .init_irq = s3c24xx_init_irq, .init_machine = osiris_init, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END arch/arm/mach-s3c2440/mach-rx1950.c +3
-0@@ -62,6 +62,8 @@#include <sound/uda1380.h> +#include "common.h" +#define LCD_PWM_PERIOD 192960#define LCD_PWM_DUTY 127353@@ -832,4 +834,5 @@ MACHINE_START(RX1950, "HP iPAQ RX1950") .init_irq = s3c24xx_init_irq, .init_machine = rx1950_init_machine, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END arch/arm/mach-s3c2440/mach-rx3715.c +3
-0@@ -51,6 +51,8 @@#include <plat/cpu.h> #include <plat/pm.h> +#include "common.h" +static struct map_desc rx3715_iodesc[]__initdata = {/* dump ISA space somewhere unused */ @@ -224,4 +226,5 @@ MACHINE_START(RX3715, "IPAQ-RX3715") .init_irq = rx3715_init_irq, .init_machine = rx3715_init_machine, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END arch/arm/mach-s3c2440/mach-smdk2440.c +3
-0@@ -47,6 +47,8 @@#include <plat/common-smdk.h> +#include "common.h" +static struct map_desc smdk2440_iodesc[]__initdata = {/* ISA IO Space map (memory space selected by A24) */ @@ -181,4 +183,5 @@ MACHINE_START(S3C2440, "SMDK2440") .map_io = smdk2440_map_io, .init_machine = smdk2440_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END arch/arm/mach-s3c2440/s3c2440.c +9
-0@@ -35,6 +35,7 @@#include <plat/cpu.h> #include <plat/s3c244x.h> #include <plat/pm.h> +#include <plat/watchdog-reset.h> #include <plat/gpio-core.h> #include <plat/gpio-cfg.h> @@ -73,3 +74,11 @@ void __init s3c2440_map_io(void) s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up; s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up; } + +void s3c2440_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}arch/arm/plat-s3c24xx/cpu.c +0
-3@@ -38,8 +38,6 @@#include <asm/mach/arch.h> #include <asm/mach/map.h> -#include <mach/system-reset.h> -#include <mach/regs-gpio.h> #include <plat/regs-serial.h> --
Quoted 1 line
1.7.4.4
From: Kukjin Kim <[email protected]>
Subject: [PATCH V2 11/12] ARM: restart: S3C24XX: use new restart hook
Hook these platforms restart code into the new restart hook rather than using arch_reset().
And adds local header file, common.h in arch/arm/mach-s3c2410/ and arch/arm/mach-s3c2440/ directories.
---
Changes since v1:
- changed inclusion of <mach/system-reset.h> to <plat/system-reset.h> which can be used commonly on Samsung SoCs.
arch/arm/mach-s3c2410/common.h | 17 +++++++++++++ arch/arm/mach-s3c2410/include/mach/system-reset.h | 27 --------------------- arch/arm/mach-s3c2410/include/mach/system.h | 2 +- arch/arm/mach-s3c2410/mach-amlm5900.c | 3 ++ arch/arm/mach-s3c2410/mach-bast.c | 2 + arch/arm/mach-s3c2410/mach-h1940.c | 3 ++ arch/arm/mach-s3c2410/mach-n30.c | 4 +++ arch/arm/mach-s3c2410/mach-otom.c | 3 ++ arch/arm/mach-s3c2410/mach-qt2410.c | 5 ++- arch/arm/mach-s3c2410/mach-smdk2410.c | 5 ++- arch/arm/mach-s3c2410/mach-tct_hammer.c | 3 ++ arch/arm/mach-s3c2410/mach-vr1000.c | 2 + arch/arm/mach-s3c2410/s3c2410.c | 9 +++++++ arch/arm/mach-s3c2440/common.h | 17 +++++++++++++ arch/arm/mach-s3c2440/mach-anubis.c | 3 ++ arch/arm/mach-s3c2440/mach-at2440evb.c | 3 ++ arch/arm/mach-s3c2440/mach-gta02.c | 2 + arch/arm/mach-s3c2440/mach-mini2440.c | 3 ++ arch/arm/mach-s3c2440/mach-nexcoder.c | 3 ++ arch/arm/mach-s3c2440/mach-osiris.c | 3 ++ arch/arm/mach-s3c2440/mach-rx1950.c | 3 ++ arch/arm/mach-s3c2440/mach-rx3715.c | 3 ++ arch/arm/mach-s3c2440/mach-smdk2440.c | 3 ++ arch/arm/mach-s3c2440/s3c2440.c | 9 +++++++ arch/arm/plat-s3c24xx/cpu.c | 3 +- arch/arm/plat-samsung/include/plat/system-reset.h | 2 +- 26 files changed, 107 insertions(+), 35 deletions(-) create mode 100644 arch/arm/mach-s3c2410/common.h delete mode 100644 arch/arm/mach-s3c2410/include/mach/system-reset.h create mode 100644 arch/arm/mach-s3c2440/common.h
arch/arm/mach-s3c2410/common.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* Copyright (c) 2011 Samsung Electronics Co., Ltd. +* http://www.samsung.com +* +* Common Header for S3C2410 machines +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __ARCH_ARM_MACH_S3C2410_COMMON_H +#define __ARCH_ARM_MACH_S3C2410_COMMON_H + +void s3c2410_restart (char mode,const char *cmd); + +#endif /* __ARCH_ARM_MACH_S3C2410_COMMON_H */
arch/arm/mach-s3c2410/include/mach/system-reset.h deleted +0 -27
@@ -1,27 +0,0 @@ -/* arch/arm/mach-s3c2410/include/mach/system-reset.h -* -* Copyright (c) 2008 Simtec Electronics -* Ben Dooks <[email protected]> -* -* S3C2410 - System define for arch_reset() function -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#include <mach/hardware.h> -#include <plat/watchdog-reset.h> - -static void -arch_reset (char mode,const char *cmd) -{ -if (mode =='s' ) { -soft_restart (0 ); - } - -arch_wdt_reset (); - -/* we'll take a jump through zero as a poor second */ -soft_restart (0 ); -}
arch/arm/mach-s3c2410/include/mach/system.h +1 -1
@@ -53,4 +53,4 @@ static void arch_idle(void)s3c24xx_default_idle (); } -#include <mach/system-reset.h> +#include <plat/system-reset.h>
arch/arm/mach-s3c2410/mach-amlm5900.c +3 -0
@@ -63,6 +63,8 @@#include <linux/mtd/map.h> #include <linux/mtd/physmap.h> +#include "common.h" +static struct resource amlm5900_nor_resource = { .start =0x00000000 , .end =0x01000000 -1 ,
@@ -241,4 +243,5 @@ MACHINE_START(AML_M5900, "AML_M5900") .init_irq = s3c24xx_init_irq, .init_machine = amlm5900_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/mach-bast.c +2 -0
@@ -66,6 +66,7 @@#include "usb-simtec.h" #include "nor-simtec.h" +#include "common.h" #define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics"
@@ -662,4 +663,5 @@ MACHINE_START(BAST, "Simtec-BAST") .init_irq = s3c24xx_init_irq, .init_machine = bast_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/mach-h1940.c +3 -0
@@ -70,6 +70,8 @@#include <sound/uda1380.h> +#include "common.h" +#define H1940_LATCH ((void __force __iomem *)0xF8000000)#define H1940_PA_LATCH S3C2410_CS2
@@ -751,4 +753,5 @@ MACHINE_START(H1940, "IPAQ-H1940") .init_irq = h1940_init_irq, .init_machine = h1940_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/mach-n30.c +4 -0
@@ -51,6 +51,8 @@#include <plat/s3c2410.h> #include <plat/udc.h> +#include "common.h" +static struct map_desc n30_iodesc[]__initdata = {/* nothing here yet */ };
@@ -591,6 +593,7 @@ MACHINE_START(N30, "Acer-N30") .init_machine = n30_init, .init_irq = s3c24xx_init_irq, .map_io = n30_map_io, + .restart = s3c2410_restart, MACHINE_ENDMACHINE_START (N35 ,"Acer-N35" )
@@ -601,4 +604,5 @@ MACHINE_START(N35, "Acer-N35") .init_machine = n30_init, .init_irq = s3c24xx_init_irq, .map_io = n30_map_io, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/mach-otom.c +3 -0
@@ -38,6 +38,8 @@#include <plat/iic.h> #include <plat/cpu.h> +#include "common.h" +static struct map_desc otom11_iodesc[]__initdata = {/* Device area */ { (u32 )OTOM_VA_CS8900A_BASE ,OTOM_PA_CS8900A_BASE ,SZ_16M ,MT_DEVICE },
@@ -121,4 +123,5 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1") .init_machine = otom11_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/mach-qt2410.c +3 -2
@@ -62,6 +62,8 @@#include <plat/cpu.h> #include <plat/pm.h> +#include "common.h" +static struct map_desc qt2410_iodesc[]__initdata = { {0xe0000000 ,__phys_to_pfn (S3C2410_CS3 +0x01000000 ),SZ_1M ,MT_DEVICE } };
@@ -350,6 +352,5 @@ MACHINE_START(QT2410, "QT2410") .init_irq = s3c24xx_init_irq, .init_machine = qt2410_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END - -
arch/arm/mach-s3c2410/mach-smdk2410.c +3 -2
@@ -54,6 +54,8 @@#include <plat/common-smdk.h> +#include "common.h" +static struct map_desc smdk2410_iodesc[]__initdata = {/* nothing here yet */ };
@@ -116,6 +118,5 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc .init_irq = s3c24xx_init_irq, .init_machine = smdk2410_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END - -
arch/arm/mach-s3c2410/mach-tct_hammer.c +3 -0
@@ -54,6 +54,8 @@#include <linux/mtd/map.h> #include <linux/mtd/physmap.h> +#include "common.h" +static struct resource tct_hammer_nor_resource = { .start =0x00000000 , .end =0x01000000 -1 ,
@@ -151,4 +153,5 @@ MACHINE_START(TCT_HAMMER, "TCT_HAMMER") .init_irq = s3c24xx_init_irq, .init_machine = tct_hammer_init, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/mach-vr1000.c +2 -0
@@ -53,6 +53,7 @@#include "usb-simtec.h" #include "nor-simtec.h" +#include "common.h" /* macros for virtual address mods for the io space entries */ #define VA_C5 (item) ((unsigned long)(item) + BAST_VAM_CS5)
@@ -405,4 +406,5 @@ MACHINE_START(VR1000, "Thorcom-VR1000") .init_machine = vr1000_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2410_restart,MACHINE_END
arch/arm/mach-s3c2410/s3c2410.c +9 -0
@@ -42,6 +42,7 @@#include <plat/clock.h> #include <plat/pll.h> #include <plat/pm.h> +#include <plat/watchdog-reset.h> #include <plat/gpio-core.h> #include <plat/gpio-cfg.h>
@@ -183,3 +184,11 @@ int __init s3c2410a_init(void) s3c2410_sysdev.cls = &s3c2410a_sysclass;return s3c2410_init (); } + +void s3c2410_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}
arch/arm/mach-s3c2440/common.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* Copyright (c) 2011 Samsung Electronics Co., Ltd. +* http://www.samsung.com +* +* Common Header for S3C2440 machines +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H +#define __ARCH_ARM_MACH_S3C2440_COMMON_H + +void s3c2440_restart (char mode,const char *cmd); + +#endif /* __ARCH_ARM_MACH_S3C2440_COMMON_H */
arch/arm/mach-s3c2440/mach-anubis.c +3 -0
@@ -55,6 +55,8 @@#include <plat/cpu.h> #include <plat/audio-simtec.h> +#include "common.h" +#define COPYRIGHT ", Copyright 2005-2009 Simtec Electronics"static struct map_desc anubis_iodesc[]__initdata = {
@@ -503,4 +505,5 @@ MACHINE_START(ANUBIS, "Simtec-Anubis") .init_machine = anubis_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-at2440evb.c +3 -0
@@ -49,6 +49,8 @@#include <plat/cpu.h> #include <plat/mci.h> +#include "common.h" +static struct map_desc at2440evb_iodesc[]__initdata = {/* Nothing here */ };
@@ -238,4 +240,5 @@ MACHINE_START(AT2440EVB, "AT2440EVB") .init_machine = at2440evb_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-gta02.c +2 -0
@@ -90,6 +90,7 @@#include <plat/iic.h> #include <plat/ts.h> +#include "common.h" static struct pcf50633 *gta02_pcf;
@@ -600,4 +601,5 @@ MACHINE_START(NEO1973_GTA02, "GTA02") .init_irq = s3c24xx_init_irq, .init_machine = gta02_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-mini2440.c +3 -0
@@ -60,6 +60,8 @@#include <sound/s3c24xx_uda134x.h> +#include "common.h" +#define MACH_MINI2440_DM9K_BASE (S3C2410_CS4 + 0x300)static struct map_desc mini2440_iodesc[]__initdata = {
@@ -681,4 +683,5 @@ MACHINE_START(MINI2440, "MINI2440") .init_machine = mini2440_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-nexcoder.c +3 -0
@@ -47,6 +47,8 @@#include <plat/devs.h> #include <plat/cpu.h> +#include "common.h" +static struct map_desc nexcoder_iodesc[]__initdata = {/* nothing here yet */ };
@@ -156,4 +158,5 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") .init_machine = nexcoder_init, .init_irq = s3c24xx_init_irq, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-osiris.c +3 -0
@@ -54,6 +54,8 @@#include <plat/devs.h> #include <plat/cpu.h> +#include "common.h" +/* onboard perihperal map */ static struct map_desc osiris_iodesc[]__initdata = {
@@ -452,4 +454,5 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS") .init_irq = s3c24xx_init_irq, .init_machine = osiris_init, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-rx1950.c +3 -0
@@ -62,6 +62,8 @@#include <sound/uda1380.h> +#include "common.h" +#define LCD_PWM_PERIOD 192960#define LCD_PWM_DUTY 127353
@@ -832,4 +834,5 @@ MACHINE_START(RX1950, "HP iPAQ RX1950") .init_irq = s3c24xx_init_irq, .init_machine = rx1950_init_machine, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-rx3715.c +3 -0
@@ -51,6 +51,8 @@#include <plat/cpu.h> #include <plat/pm.h> +#include "common.h" +static struct map_desc rx3715_iodesc[]__initdata = {/* dump ISA space somewhere unused */
@@ -224,4 +226,5 @@ MACHINE_START(RX3715, "IPAQ-RX3715") .init_irq = rx3715_init_irq, .init_machine = rx3715_init_machine, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/mach-smdk2440.c +3 -0
@@ -47,6 +47,8 @@#include <plat/common-smdk.h> +#include "common.h" +static struct map_desc smdk2440_iodesc[]__initdata = {/* ISA IO Space map (memory space selected by A24) */
@@ -181,4 +183,5 @@ MACHINE_START(S3C2440, "SMDK2440") .map_io = smdk2440_map_io, .init_machine = smdk2440_machine_init, .timer = &s3c24xx_timer, + .restart = s3c2440_restart,MACHINE_END
arch/arm/mach-s3c2440/s3c2440.c +9 -0
@@ -35,6 +35,7 @@#include <plat/cpu.h> #include <plat/s3c244x.h> #include <plat/pm.h> +#include <plat/watchdog-reset.h> #include <plat/gpio-core.h> #include <plat/gpio-cfg.h>
@@ -73,3 +74,11 @@ void __init s3c2440_map_io(void) s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up; s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up; } + +void s3c2440_restart (char mode,const char *cmd) +{ +if (mode !='s' ) +arch_wdt_reset (); + +soft_restart (0 ); +}
arch/arm/plat-s3c24xx/cpu.c +1 -2
@@ -38,10 +38,9 @@#include <asm/mach/arch.h> #include <asm/mach/map.h> -#include <mach/system-reset.h> -#include <mach/regs-gpio.h> #include <plat/regs-serial.h> +#include <plat/system-reset.h> #include <plat/cpu.h> #include <plat/devs.h>
arch/arm/plat-samsung/include/plat/system-reset.h +1 -1
@@ -5,7 +5,7 @@* * Based on arch/arm/mach-s3c2410/include/mach/system-reset.h * -* S5P - System define for arch_reset() +* System define for arch_reset() * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
Signature · 7 lines
Thanks. Best regards, Kgene. -- Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
cover ARM: restart: SAMSUNG: use new restart hook
In reply to Kukjin KimQuoted 5 lines · Kukjin Kim
This patch introduces common.[ch] in each SAMSUNG mach- directories and implements using new restart hook for Samsung stuff.
This is against on rmk/devel-stable branch.
Quoted 12 lines
[PATCH 01/12] ARM: S3C64XX: introduce arch/arm/mach-s3c64xx/common.[ch] [PATCH 02/12] ARM: restart: S3C64XX: use new restart hook [PATCH 03/12] ARM: S5P64X0: introduce arch/arm/mach-s5p64x0/common.[ch] [PATCH 04/12] ARM: restart: S5P64X0: use new restart hook [PATCH 05/12] ARM: S5PC100: introduce arch/arm/mach-s5pc100/common.[ch] [PATCH 06/12] ARM: restart: S5PC100: use new restart hook [PATCH 07/12] ARM: S5PV210: introduce arch/arm/mach-s5pv210/common.[ch] [PATCH 08/12] ARM: restart: S5PV210: use new restart hook [PATCH 09/12] ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch] [PATCH 10/12] ARM: restart: EXYNOS: use new restart hook [PATCH 11/12] ARM: restart: S3C24XX: move SWRST based S3C platforms [PATCH 12/12] ARM: restart: S3C24XX: use new restart hook
I think this series looks fine - I'd like the cleanups to be ordered before any of the other changes (so that the cleanups can be applied to the restart-cleanup branch and queued into devel-stable independently of the rest of the restart changes.)
Please submit them to the patch system in a couple of days time (to give some time for anyone to ack them.)
Thanks.
cover ARM: restart: SAMSUNG: use new restart hook
Quoted 20 lines · Russell King - ARM Linux
Quoted 5 lines · Kukjin Kim
This patch introduces common.[ch] in each SAMSUNG mach- directories and implements using new restart hook for Samsung stuff.
This is against on rmk/devel-stable branch.
Quoted 12 lines
[PATCH 01/12] ARM: S3C64XX: introduce arch/arm/mach-s3c64xx/common.[ch] [PATCH 02/12] ARM: restart: S3C64XX: use new restart hook [PATCH 03/12] ARM: S5P64X0: introduce arch/arm/mach-s5p64x0/common.[ch] [PATCH 04/12] ARM: restart: S5P64X0: use new restart hook [PATCH 05/12] ARM: S5PC100: introduce arch/arm/mach-s5pc100/common.[ch] [PATCH 06/12] ARM: restart: S5PC100: use new restart hook [PATCH 07/12] ARM: S5PV210: introduce arch/arm/mach-s5pv210/common.[ch] [PATCH 08/12] ARM: restart: S5PV210: use new restart hook [PATCH 09/12] ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch] [PATCH 10/12] ARM: restart: EXYNOS: use new restart hook [PATCH 11/12] ARM: restart: S3C24XX: move SWRST based S3C platforms [PATCH 12/12] ARM: restart: S3C24XX: use new restart hook
Quoted 6 lines
I think this series looks fine - I'd like the cleanups to be ordered before
any of the other changes (so that the cleanups can be applied to the restart-cleanup branch and queued into devel-stable independently of the rest of the restart changes.)
OK, let me re-ordered like following.
[PATCH 01/12] ARM: S3C64XX: introduce arch/arm/mach-s3c64xx/common.[ch] [PATCH 03/12] ARM: S5P64X0: introduce arch/arm/mach-s5p64x0/common.[ch] [PATCH 05/12] ARM: S5PC100: introduce arch/arm/mach-s5pc100/common.[ch] [PATCH 07/12] ARM: S5PV210: introduce arch/arm/mach-s5pv210/common.[ch] [PATCH 09/12] ARM: EXYNOS: introduce arch/arm/mach-exynos/common.[ch]
[PATCH 04/12] ARM: restart: S5P64X0: use new restart hook [PATCH 06/12] ARM: restart: S5PC100: use new restart hook [PATCH 08/12] ARM: restart: S5PV210: use new restart hook [PATCH 10/12] ARM: restart: EXYNOS: use new restart hook [PATCH 11/12] ARM: restart: S3C24XX: move SWRST based S3C platforms [PATCH 12/12] ARM: restart: S3C24XX: use new restart hook [PATCH 02/12] ARM: restart: S3C64XX: use new restart hook
Quoted 3 lines
Please submit them to the patch system in a couple of days time (to give some time for anyone to ack them.)
OK, this will be submitted to patch system on FRI and as a note, there were mis-deleting so I fixed it.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.