For long time you insist to use the S5P prefix, but it's changed to each SoC name. anyway good move. On Wed, Sep 1, 2010 at 4:09 PM, Kukjin Kim <kgene.kim@xxxxxxxxxxx> wrote: > This patch moves some initial maps from plat-s5p to machine, > so that can merge mach-s5p6440 and mach-s5p6450. > > Signed-off-by: Kukjin Kim <kgene.kim@xxxxxxxxxxx> > --- > arch/arm/mach-s5p6440/cpu.c | 37 ++++++++++++++++++++++++++--- > arch/arm/mach-s5p6440/include/mach/map.h | 7 +----- > arch/arm/mach-s5p6442/cpu.c | 27 +++++++++++++++++++-- > arch/arm/mach-s5p6442/include/mach/map.h | 6 ----- > arch/arm/mach-s5pc100/cpu.c | 25 +++++++++++++++++++- > arch/arm/mach-s5pc100/include/mach/map.h | 11 +++----- > arch/arm/mach-s5pv210/cpu.c | 22 +++++++++++++++++- > arch/arm/mach-s5pv210/include/mach/map.h | 8 ------ > arch/arm/mach-s5pv310/cpu.c | 26 ++++++++++++++------ > arch/arm/plat-s5p/cpu.c | 22 ----------------- > 10 files changed, 125 insertions(+), 66 deletions(-) > > diff --git a/arch/arm/mach-s5p6440/cpu.c b/arch/arm/mach-s5p6440/cpu.c > index 526f33a..a3c33d9 100644 > --- a/arch/arm/mach-s5p6440/cpu.c > +++ b/arch/arm/mach-s5p6440/cpu.c > @@ -1,7 +1,7 @@ > /* linux/arch/arm/mach-s5p6440/cpu.c > * > - * Copyright (c) 2009 Samsung Electronics Co., Ltd. > - * http://www.samsung.com/ > + * Copyright (c) 2009-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 > @@ -39,6 +39,32 @@ > #include <plat/s5p6440.h> > #include <plat/adc-core.h> > > +/* Initial IO mappings */ > + > +static struct map_desc s5p6440_iodesc[] __initdata = { > + { > + .virtual = (unsigned long)S5P_VA_GPIO, > + .pfn = __phys_to_pfn(S5P6440_PA_GPIO), > + .length = SZ_4K, > + .type = MT_DEVICE, > + }, { > + .virtual = (unsigned long)VA_VIC0, > + .pfn = __phys_to_pfn(S5P6440_PA_VIC0), > + .length = SZ_16K, > + .type = MT_DEVICE, > + }, { > + .virtual = (unsigned long)VA_VIC1, > + .pfn = __phys_to_pfn(S5P6440_PA_VIC1), > + .length = SZ_16K, > + .type = MT_DEVICE, > + }, { > + .virtual = (unsigned long)S3C_VA_UART, > + .pfn = __phys_to_pfn(S3C_PA_UART), > + .length = SZ_512K, Yes it's just move to each SoCs. but It's too big some SoCs which has 0x400 offset. I think 8K is enough to cover uart. > + .type = MT_DEVICE, > + } > +}; > + > static void s5p6440_idle(void) > { > unsigned long val; > @@ -54,15 +80,18 @@ static void s5p6440_idle(void) > local_irq_enable(); > } > > -/* s5p6440_map_io > +/* > + * s5p6440_map_io > * > * register the standard cpu IO areas > -*/ > + */ > > void __init s5p6440_map_io(void) > { > /* initialize any device information early */ > s3c_adc_setname("s3c64xx-adc"); > + > + iotable_init(s5p6440_iodesc, ARRAY_SIZE(s5p6440_iodesc)); > } > > void __init s5p6440_init_clocks(int xtal) > diff --git a/arch/arm/mach-s5p6440/include/mach/map.h b/arch/arm/mach-s5p6440/include/mach/map.h > index 6cc5cbc..11d31fe 100644 > --- a/arch/arm/mach-s5p6440/include/mach/map.h > +++ b/arch/arm/mach-s5p6440/include/mach/map.h > @@ -24,23 +24,18 @@ > #define S5P_PA_SYSCON S5P6440_PA_SYSCON > > #define S5P6440_PA_GPIO (0xE0308000) > -#define S5P_PA_GPIO S5P6440_PA_GPIO > > #define S5P6440_PA_VIC0 (0xE4000000) > -#define S5P_PA_VIC0 S5P6440_PA_VIC0 > +#define S5P6440_PA_VIC1 (0xE4100000) > > #define S5P6440_PA_PDMA 0xE9000000 > > -#define S5P6440_PA_VIC1 (0xE4100000) > -#define S5P_PA_VIC1 S5P6440_PA_VIC1 > - > #define S5P6440_PA_TIMER (0xEA000000) > #define S5P_PA_TIMER S5P6440_PA_TIMER > > #define S5P6440_PA_RTC (0xEA100000) > > #define S5P6440_PA_WDT (0xEA200000) > -#define S5P_PA_WDT S5P6440_PA_WDT > > #define S5P6440_PA_UART (0xEC000000) > > diff --git a/arch/arm/mach-s5p6442/cpu.c b/arch/arm/mach-s5p6442/cpu.c > index a48fb55..d3ab268 100644 > --- a/arch/arm/mach-s5p6442/cpu.c > +++ b/arch/arm/mach-s5p6442/cpu.c > @@ -1,7 +1,7 @@ > /* linux/arch/arm/mach-s5p6442/cpu.c > * > * Copyright (c) 2010 Samsung Electronics Co., Ltd. > - * http://www.samsung.com/ > + * 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 > @@ -47,10 +47,30 @@ static struct map_desc s5p6442_iodesc[] __initdata = { > .length = SZ_16K, > .type = MT_DEVICE, > }, { > + .virtual = (unsigned long)S5P_VA_GPIO, > + .pfn = __phys_to_pfn(S5P6442_PA_GPIO), > + .length = SZ_4K, > + .type = MT_DEVICE, > + }, { > + .virtual = (unsigned long)VA_VIC0, > + .pfn = __phys_to_pfn(S5P6442_PA_VIC0), > + .length = SZ_16K, > + .type = MT_DEVICE, > + }, { > + .virtual = (unsigned long)VA_VIC1, > + .pfn = __phys_to_pfn(S5P6442_PA_VIC1), > + .length = SZ_16K, > + .type = MT_DEVICE, > + }, { > .virtual = (unsigned long)VA_VIC2, > .pfn = __phys_to_pfn(S5P6442_PA_VIC2), > .length = SZ_16K, > .type = MT_DEVICE, > + }, { > + .virtual = (unsigned long)S3C_VA_UART, > + .pfn = __phys_to_pfn(S3C_PA_UART), > + .length = SZ_512K, > + .type = MT_DEVICE, > } > }; > > @@ -62,10 +82,11 @@ static void s5p6442_idle(void) > local_irq_enable(); > } > > -/* s5p6442_map_io > +/* > + * s5p6442_map_io > * > * register the standard cpu IO areas > -*/ > + */ > > void __init s5p6442_map_io(void) > { > diff --git a/arch/arm/mach-s5p6442/include/mach/map.h b/arch/arm/mach-s5p6442/include/mach/map.h > index 281d256..31fb2e6 100644 > --- a/arch/arm/mach-s5p6442/include/mach/map.h > +++ b/arch/arm/mach-s5p6442/include/mach/map.h > @@ -23,16 +23,10 @@ > #define S5P_PA_SYSCON S5P6442_PA_SYSCON > > #define S5P6442_PA_GPIO (0xE0200000) > -#define S5P_PA_GPIO S5P6442_PA_GPIO > > #define S5P6442_PA_VIC0 (0xE4000000) > -#define S5P_PA_VIC0 S5P6442_PA_VIC0 > - > #define S5P6442_PA_VIC1 (0xE4100000) > -#define S5P_PA_VIC1 S5P6442_PA_VIC1 > - > #define S5P6442_PA_VIC2 (0xE4200000) > -#define S5P_PA_VIC2 S5P6442_PA_VIC2 > > #define S5P6442_PA_MDMA 0xE8000000 > #define S5P6442_PA_PDMA 0xE9000000 > diff --git a/arch/arm/mach-s5pc100/cpu.c b/arch/arm/mach-s5pc100/cpu.c > index 251c92a..d13552c 100644 > --- a/arch/arm/mach-s5pc100/cpu.c > +++ b/arch/arm/mach-s5pc100/cpu.c > @@ -1,5 +1,8 @@ > /* linux/arch/arm/mach-s5pc100/cpu.c > * > + * Copyright (c) 2010 Samsung Electronics Co., Ltd. > + * http://www.samsung.com > + * > * Copyright 2009 Samsung Electronics Co. > * Byungho Min <bhmin@xxxxxxxxxxx> > * > @@ -56,11 +59,31 @@ static struct map_desc s5pc100_iodesc[] __initdata = { > .length = SZ_16K, > .type = MT_DEVICE, > }, { > + .virtual = (unsigned long)S5P_VA_GPIO, > + .pfn = __phys_to_pfn(S5PC100_PA_GPIO), > + .length = SZ_4K, > + .type = MT_DEVICE, > + }, { > + .virtual = (unsigned long)VA_VIC0, > + .pfn = __phys_to_pfn(S5PC100_PA_VIC0), > + .length = SZ_16K, > + .type = MT_DEVICE, > + }, { > + .virtual = (unsigned long)VA_VIC1, > + .pfn = __phys_to_pfn(S5PC100_PA_VIC1), > + .length = SZ_16K, > + .type = MT_DEVICE, > + }, { > .virtual = (unsigned long)VA_VIC2, > - .pfn = __phys_to_pfn(S5P_PA_VIC2), > + .pfn = __phys_to_pfn(S5PC100_PA_VIC2), > .length = SZ_16K, > .type = MT_DEVICE, > }, { > + .virtual = (unsigned long)S3C_VA_UART, > + .pfn = __phys_to_pfn(S3C_PA_UART), > + .length = SZ_512K, > + .type = MT_DEVICE, > + }, { > .virtual = (unsigned long)S5PC100_VA_OTHERS, > .pfn = __phys_to_pfn(S5PC100_PA_OTHERS), > .length = SZ_4K, > diff --git a/arch/arm/mach-s5pc100/include/mach/map.h b/arch/arm/mach-s5pc100/include/mach/map.h > index 01b9134..8751ef4 100644 > --- a/arch/arm/mach-s5pc100/include/mach/map.h > +++ b/arch/arm/mach-s5pc100/include/mach/map.h > @@ -44,19 +44,16 @@ > #define S5PC100_PA_OTHERS (0xE0200000) > #define S5PC100_VA_OTHERS (S3C_VA_SYS + 0x10000) > > -#define S5P_PA_GPIO (0xE0300000) > +#define S5PC100_PA_GPIO (0xE0300000) > #define S5PC1XX_VA_GPIO S3C_ADDR(0x00500000) > > /* Interrupt */ > -#define S5PC100_PA_VIC (0xE4000000) > +#define S5PC100_PA_VIC0 (0xE4000000) > +#define S5PC100_PA_VIC1 (0xE4100000) > +#define S5PC100_PA_VIC2 (0xE4200000) > #define S5PC100_VA_VIC S3C_VA_IRQ > -#define S5PC100_PA_VIC_OFFSET 0x100000 > #define S5PC100_VA_VIC_OFFSET 0x10000 > -#define S5PC1XX_PA_VIC(x) (S5PC100_PA_VIC + ((x) * S5PC100_PA_VIC_OFFSET)) > #define S5PC1XX_VA_VIC(x) (S5PC100_VA_VIC + ((x) * S5PC100_VA_VIC_OFFSET)) > -#define S5P_PA_VIC0 S5PC1XX_PA_VIC(0) > -#define S5P_PA_VIC1 S5PC1XX_PA_VIC(1) > -#define S5P_PA_VIC2 S5PC1XX_PA_VIC(2) > > > #define S5PC100_PA_ONENAND (0xE7100000) > diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c > index b9f4d67..00f9ca1 100644 > --- a/arch/arm/mach-s5pv210/cpu.c > +++ b/arch/arm/mach-s5pv210/cpu.c > @@ -1,7 +1,7 @@ > /* linux/arch/arm/mach-s5pv210/cpu.c > * > * Copyright (c) 2010 Samsung Electronics Co., Ltd. > - * http://www.samsung.com/ > + * 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 > @@ -50,6 +50,21 @@ static struct map_desc s5pv210_iodesc[] __initdata = { > .length = SZ_1M, > .type = MT_DEVICE, > }, { > + .virtual = (unsigned long)S5P_VA_GPIO, > + .pfn = __phys_to_pfn(S5PV210_PA_GPIO), > + .length = SZ_4K, > + .type = MT_DEVICE, > + }, { > + .virtual = (unsigned long)VA_VIC0, > + .pfn = __phys_to_pfn(S5PV210_PA_VIC0), > + .length = SZ_16K, > + .type = MT_DEVICE, > + }, { > + .virtual = (unsigned long)VA_VIC1, > + .pfn = __phys_to_pfn(S5PV210_PA_VIC1), > + .length = SZ_16K, > + .type = MT_DEVICE, > + }, { > .virtual = (unsigned long)VA_VIC2, > .pfn = __phys_to_pfn(S5PV210_PA_VIC2), > .length = SZ_16K, > @@ -60,6 +75,11 @@ static struct map_desc s5pv210_iodesc[] __initdata = { > .length = SZ_16K, > .type = MT_DEVICE, > }, { > + .virtual = (unsigned long)S3C_VA_UART, > + .pfn = __phys_to_pfn(S3C_PA_UART), > + .length = SZ_512K, > + .type = MT_DEVICE, > + }, { > .virtual = (unsigned long)S5P_VA_SROMC, > .pfn = __phys_to_pfn(S5PV210_PA_SROMC), > .length = SZ_4K, > diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-s5pv210/include/mach/map.h > index dd4fb6b..cc50541 100644 > --- a/arch/arm/mach-s5pv210/include/mach/map.h > +++ b/arch/arm/mach-s5pv210/include/mach/map.h > @@ -26,7 +26,6 @@ > #define S5P_PA_SYSCON S5PV210_PA_SYSCON > > #define S5PV210_PA_GPIO (0xE0200000) > -#define S5P_PA_GPIO S5PV210_PA_GPIO > > /* SPI */ > #define S5PV210_PA_SPI0 0xE1300000 > @@ -72,16 +71,9 @@ > #define S5PV210_PA_HSMMC(x) (0xEB000000 + ((x) * 0x100000)) > > #define S5PV210_PA_VIC0 (0xF2000000) > -#define S5P_PA_VIC0 S5PV210_PA_VIC0 > - > #define S5PV210_PA_VIC1 (0xF2100000) > -#define S5P_PA_VIC1 S5PV210_PA_VIC1 > - > #define S5PV210_PA_VIC2 (0xF2200000) > -#define S5P_PA_VIC2 S5PV210_PA_VIC2 > - > #define S5PV210_PA_VIC3 (0xF2300000) > -#define S5P_PA_VIC3 S5PV210_PA_VIC3 > > #define S5PV210_PA_SDRAM (0x20000000) > #define S5P_PA_SDRAM S5PV210_PA_SDRAM > diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c > index e5b261a..3b9c872 100644 > --- a/arch/arm/mach-s5pv310/cpu.c > +++ b/arch/arm/mach-s5pv310/cpu.c > @@ -31,9 +31,14 @@ extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq); > /* Initial IO mappings */ > static struct map_desc s5pv310_iodesc[] __initdata = { > { > - .virtual = (unsigned long)S5P_VA_COREPERI_BASE, > - .pfn = __phys_to_pfn(S5PV310_PA_COREPERI), > - .length = SZ_8K, > + .virtual = (unsigned long)S5P_VA_SYSRAM, > + .pfn = __phys_to_pfn(S5PV310_PA_SYSRAM), > + .length = SZ_4K, > + .type = MT_DEVICE, > + }, { > + .virtual = (unsigned long)S5P_VA_CMU, > + .pfn = __phys_to_pfn(S5PV310_PA_CMU), > + .length = SZ_128K, > .type = MT_DEVICE, > }, { > .virtual = (unsigned long)S5P_VA_COMBINER_BASE, > @@ -41,19 +46,24 @@ static struct map_desc s5pv310_iodesc[] __initdata = { > .length = SZ_4K, > .type = MT_DEVICE, > }, { > + .virtual = (unsigned long)S5P_VA_COREPERI_BASE, > + .pfn = __phys_to_pfn(S5PV310_PA_COREPERI), > + .length = SZ_8K, > + .type = MT_DEVICE, > + }, { > .virtual = (unsigned long)S5P_VA_L2CC, > .pfn = __phys_to_pfn(S5PV310_PA_L2CC), > .length = SZ_4K, > .type = MT_DEVICE, > }, { > - .virtual = (unsigned long)S5P_VA_SYSRAM, > - .pfn = __phys_to_pfn(S5PV310_PA_SYSRAM), > + .virtual = (unsigned long)S5P_VA_GPIO, > + .pfn = __phys_to_pfn(S5PV310_PA_GPIO), > .length = SZ_4K, > .type = MT_DEVICE, > }, { > - .virtual = (unsigned long)S5P_VA_CMU, > - .pfn = __phys_to_pfn(S5PV310_PA_CMU), > - .length = SZ_128K, > + .virtual = (unsigned long)S3C_VA_UART, > + .pfn = __phys_to_pfn(S3C_PA_UART), > + .length = SZ_512K, > .type = MT_DEVICE, > }, > }; > diff --git a/arch/arm/plat-s5p/cpu.c b/arch/arm/plat-s5p/cpu.c > index b07a078..57f08ee 100644 > --- a/arch/arm/plat-s5p/cpu.c > +++ b/arch/arm/plat-s5p/cpu.c > @@ -89,33 +89,11 @@ static struct map_desc s5p_iodesc[] __initdata = { > .length = SZ_64K, > .type = MT_DEVICE, > }, { > - .virtual = (unsigned long)S3C_VA_UART, > - .pfn = __phys_to_pfn(S3C_PA_UART), > - .length = SZ_512K, > - .type = MT_DEVICE, > -#ifdef CONFIG_ARM_VIC > - }, { > - .virtual = (unsigned long)VA_VIC0, > - .pfn = __phys_to_pfn(S5P_PA_VIC0), > - .length = SZ_16K, > - .type = MT_DEVICE, > - }, { > - .virtual = (unsigned long)VA_VIC1, > - .pfn = __phys_to_pfn(S5P_PA_VIC1), > - .length = SZ_16K, > - .type = MT_DEVICE, > -#endif > - }, { > .virtual = (unsigned long)S3C_VA_TIMER, > .pfn = __phys_to_pfn(S5P_PA_TIMER), > .length = SZ_16K, > .type = MT_DEVICE, > }, { > - .virtual = (unsigned long)S5P_VA_GPIO, > - .pfn = __phys_to_pfn(S5P_PA_GPIO), > - .length = SZ_4K, > - .type = MT_DEVICE, > - }, { > .virtual = (unsigned long)S3C_VA_WATCHDOG, > .pfn = __phys_to_pfn(S3C_PA_WDT), > .length = SZ_4K, > -- > 1.6.2.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html