Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] ARM: SAMSUNG: Cleanup resources by using macro
From: Kukjin Kim @ 2011-10-02  9:24 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds macro SAMSUNG_RES_MEM and SAMSUNG_RES_IRQ to cleanup
regarding 'struct resource'

Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 arch/arm/mach-s3c2410/include/mach/map.h  |    1 +
 arch/arm/plat-samsung/devs.c              |  670 +++++------------------------
 arch/arm/plat-samsung/include/plat/devs.h |   10 +
 3 files changed, 122 insertions(+), 559 deletions(-)

diff --git a/arch/arm/mach-s3c2410/include/mach/map.h b/arch/arm/mach-s3c2410/include/mach/map.h
index 4cf495f..78ae807 100644
--- a/arch/arm/mach-s3c2410/include/mach/map.h
+++ b/arch/arm/mach-s3c2410/include/mach/map.h
@@ -149,6 +149,7 @@
 #define S3C24XX_PA_RTC      S3C2410_PA_RTC
 #define S3C24XX_PA_ADC      S3C2410_PA_ADC
 #define S3C24XX_PA_SPI      S3C2410_PA_SPI
+#define S3C24XX_PA_SPI1		(S3C2410_PA_SPI + S3C2410_SPI1)
 #define S3C24XX_PA_SDI      S3C2410_PA_SDI
 #define S3C24XX_PA_NAND	    S3C2410_PA_NAND
 
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 83c3cf9..fc72476 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -66,16 +66,8 @@ static u64 samsung_device_dma_mask = DMA_BIT_MASK(32);
 /* AC97 */
 #ifdef CONFIG_CPU_S3C2440
 static struct resource s3c_ac97_resource[] = {
-	[0] = {
-		.start	= S3C2440_PA_AC97,
-		.end	= S3C2440_PA_AC97 + S3C2440_SZ_AC97 - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_S3C244x_AC97,
-		.end	= IRQ_S3C244x_AC97,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S3C2440, AC97, S3C2440_SZ_AC97) },
+	[1] = { SAMSUNG_RES_IRQ(S3C244x_AC97) },
 	[2] = {
 		.name	= "PCM out",
 		.start	= DMACH_PCM_OUT,
@@ -112,21 +104,9 @@ struct platform_device s3c_device_ac97 = {
 
 #ifdef CONFIG_PLAT_S3C24XX
 static struct resource s3c_adc_resource[] = {
-	[0] = {
-		.start	= S3C24XX_PA_ADC,
-		.end	= S3C24XX_PA_ADC + S3C24XX_SZ_ADC - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_TC,
-		.end	= IRQ_TC,
-		.flags	= IORESOURCE_IRQ,
-	},
-	[2] = {
-		.start	= IRQ_ADC,
-		.end	= IRQ_ADC,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C24XX, ADC, S3C24XX_SZ_ADC) },
+	[1] = { SAMSUNG_RES_IRQ(TC) },
+	[2] = { SAMSUNG_RES_IRQ(ADC) },
 };
 
 struct platform_device s3c_device_adc = {
@@ -139,21 +119,9 @@ struct platform_device s3c_device_adc = {
 
 #if defined(CONFIG_SAMSUNG_DEV_ADC)
 static struct resource s3c_adc_resource[] = {
-	[0] = {
-		.start	= SAMSUNG_PA_ADC,
-		.end	= SAMSUNG_PA_ADC + SZ_256 - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_TC,
-		.end	= IRQ_TC,
-		.flags	= IORESOURCE_IRQ,
-	},
-	[2] = {
-		.start	= IRQ_ADC,
-		.end	= IRQ_ADC,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(SAMSUNG, ADC, SZ_256) },
+	[1] = { SAMSUNG_RES_IRQ(TC) },
+	[2] = { SAMSUNG_RES_IRQ(ADC) },
 };
 
 struct platform_device s3c_device_adc = {
@@ -168,16 +136,8 @@ struct platform_device s3c_device_adc = {
 
 #ifdef CONFIG_CPU_S3C2440
 static struct resource s3c_camif_resource[] = {
-	[0] = {
-		.start	= S3C2440_PA_CAMIF,
-		.end	= S3C2440_PA_CAMIF + S3C2440_SZ_CAMIF - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_CAM,
-		.end	= IRQ_CAM,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C2440, CAMIF, S3C2440_SZ_CAMIF) },
+	[1] = { SAMSUNG_RES_IRQ(CAM) },
 };
 
 struct platform_device s3c_device_camif = {
@@ -216,26 +176,10 @@ struct platform_device samsung_asoc_idma = {
 
 #ifdef CONFIG_S3C_DEV_FB
 static struct resource s3c_fb_resource[] = {
-	[0] = {
-		.start	= S3C_PA_FB,
-		.end	= S3C_PA_FB + SZ_16K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_LCD_VSYNC,
-		.end	= IRQ_LCD_VSYNC,
-		.flags	= IORESOURCE_IRQ,
-	},
-	[2] = {
-		.start	= IRQ_LCD_FIFO,
-		.end	= IRQ_LCD_FIFO,
-		.flags	= IORESOURCE_IRQ,
-	},
-	[3] = {
-		.start	= IRQ_LCD_SYSTEM,
-		.end	= IRQ_LCD_SYSTEM,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S3C, FB, SZ_16K) },
+	[1] = { SAMSUNG_RES_IRQ(LCD_VSYNC) },
+	[2] = { SAMSUNG_RES_IRQ(LCD_FIFO) },
+	[3] = { SAMSUNG_RES_IRQ(LCD_SYSTEM) },
 };
 
 struct platform_device s3c_device_fb = {
@@ -260,16 +204,8 @@ void __init s3c_fb_set_platdata(struct s3c_fb_platdata *pd)
 
 #ifdef CONFIG_S5P_DEV_FIMC0
 static struct resource s5p_fimc0_resource[] = {
-	[0] = {
-		.start	= S5P_PA_FIMC0,
-		.end	= S5P_PA_FIMC0 + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_FIMC0,
-		.end	= IRQ_FIMC0,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S5P, FIMC0, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(FIMC0) },
 };
 
 struct platform_device s5p_device_fimc0 = {
@@ -286,16 +222,8 @@ struct platform_device s5p_device_fimc0 = {
 
 #ifdef CONFIG_S5P_DEV_FIMC1
 static struct resource s5p_fimc1_resource[] = {
-	[0] = {
-		.start	= S5P_PA_FIMC1,
-		.end	= S5P_PA_FIMC1 + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_FIMC1,
-		.end	= IRQ_FIMC1,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S5P, FIMC1, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(FIMC1) },
 };
 
 struct platform_device s5p_device_fimc1 = {
@@ -312,16 +240,8 @@ struct platform_device s5p_device_fimc1 = {
 
 #ifdef CONFIG_S5P_DEV_FIMC2
 static struct resource s5p_fimc2_resource[] = {
-	[0] = {
-		.start	= S5P_PA_FIMC2,
-		.end	= S5P_PA_FIMC2 + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_FIMC2,
-		.end	= IRQ_FIMC2,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S5P, FIMC2, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(FIMC2) },
 };
 
 struct platform_device s5p_device_fimc2 = {
@@ -338,16 +258,8 @@ struct platform_device s5p_device_fimc2 = {
 
 #ifdef CONFIG_S5P_DEV_FIMC3
 static struct resource s5p_fimc3_resource[] = {
-	[0] = {
-		.start	= S5P_PA_FIMC3,
-		.end	= S5P_PA_FIMC3 + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_FIMC3,
-		.end	= IRQ_FIMC3,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S5P, FIMC3, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(FIMC3) },
 };
 
 struct platform_device s5p_device_fimc3 = {
@@ -366,26 +278,10 @@ struct platform_device s5p_device_fimc3 = {
 
 #ifdef CONFIG_S5P_DEV_FIMD0
 static struct resource s5p_fimd0_resource[] = {
-	[0] = {
-		.start	= S5P_PA_FIMD0,
-		.end	= S5P_PA_FIMD0 + SZ_32K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_FIMD0_VSYNC,
-		.end	= IRQ_FIMD0_VSYNC,
-		.flags	= IORESOURCE_IRQ,
-	},
-	[2] = {
-		.start	= IRQ_FIMD0_FIFO,
-		.end	= IRQ_FIMD0_FIFO,
-		.flags	= IORESOURCE_IRQ,
-	},
-	[3] = {
-		.start	= IRQ_FIMD0_SYSTEM,
-		.end	= IRQ_FIMD0_SYSTEM,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S5P, FIMD0, SZ_32K) },
+	[1] = { SAMSUNG_RES_IRQ(FIMD0_VSYNC) },
+	[2] = { SAMSUNG_RES_IRQ(FIMD0_FIFO) },
+	[3] = { SAMSUNG_RES_IRQ(FIMD0_SYSTEM) },
 };
 
 struct platform_device s5p_device_fimd0 = {
@@ -424,20 +320,10 @@ void __init s3c_hwmon_set_platdata(struct s3c_hwmon_pdata *pd)
 
 /* HSMMC */
 
-#define S3C_SZ_HSMMC	0x1000
-
 #ifdef CONFIG_S3C_DEV_HSMMC
 static struct resource s3c_hsmmc_resource[] = {
-	[0] = {
-		.start	= S3C_PA_HSMMC0,
-		.end	= S3C_PA_HSMMC0 + S3C_SZ_HSMMC - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_HSMMC0,
-		.end	= IRQ_HSMMC0,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C, HSMMC0, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(HSMMC0) },
 };
 
 struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata = {
@@ -467,16 +353,8 @@ void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd)
 
 #ifdef CONFIG_S3C_DEV_HSMMC1
 static struct resource s3c_hsmmc1_resource[] = {
-	[0] = {
-		.start	= S3C_PA_HSMMC1,
-		.end	= S3C_PA_HSMMC1 + S3C_SZ_HSMMC - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_HSMMC1,
-		.end	= IRQ_HSMMC1,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C, HSMMC1, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(HSMMC1) },
 };
 
 struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata = {
@@ -508,16 +386,8 @@ void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd)
 
 #ifdef CONFIG_S3C_DEV_HSMMC2
 static struct resource s3c_hsmmc2_resource[] = {
-	[0] = {
-		.start	= S3C_PA_HSMMC2,
-		.end	= S3C_PA_HSMMC2 + S3C_SZ_HSMMC - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_HSMMC2,
-		.end	= IRQ_HSMMC2,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C, HSMMC2, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(HSMMC2) },
 };
 
 struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata = {
@@ -547,16 +417,8 @@ void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd)
 
 #ifdef CONFIG_S3C_DEV_HSMMC3
 static struct resource s3c_hsmmc3_resource[] = {
-	[0] = {
-		.start	= S3C_PA_HSMMC3,
-		.end	= S3C_PA_HSMMC3 + S3C_SZ_HSMMC - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_HSMMC3,
-		.end	= IRQ_HSMMC3,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C, HSMMC3, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(HSMMC3) },
 };
 
 struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata = {
@@ -587,16 +449,8 @@ void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd)
 /* I2C */
 
 static struct resource s3c_i2c0_resource[] = {
-	[0] = {
-		.start	= S3C_PA_IIC,
-		.end	= S3C_PA_IIC + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_IIC,
-		.end	= IRQ_IIC,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S3C, IIC, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(IIC) },
 };
 
 struct platform_device s3c_device_i2c0 = {
@@ -633,16 +487,8 @@ void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd)
 
 #ifdef CONFIG_S3C_DEV_I2C1
 static struct resource s3c_i2c1_resource[] = {
-	[0] = {
-		.start	= S3C_PA_IIC1,
-		.end	= S3C_PA_IIC1 + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_IIC1,
-		.end	= IRQ_IIC1,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S3C, IIC1, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(IIC1) },
 };
 
 struct platform_device s3c_device_i2c1 = {
@@ -671,16 +517,8 @@ void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd)
 
 #ifdef CONFIG_S3C_DEV_I2C2
 static struct resource s3c_i2c2_resource[] = {
-	[0] = {
-		.start	= S3C_PA_IIC2,
-		.end	= S3C_PA_IIC2 + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_IIC2,
-		.end	= IRQ_IIC2,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S3C, IIC2, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(IIC2) },
 };
 
 struct platform_device s3c_device_i2c2 = {
@@ -709,16 +547,8 @@ void __init s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *pd)
 
 #ifdef CONFIG_S3C_DEV_I2C3
 static struct resource s3c_i2c3_resource[] = {
-	[0] = {
-		.start	= S3C_PA_IIC3,
-		.end	= S3C_PA_IIC3 + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_IIC3,
-		.end	= IRQ_IIC3,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S3C, IIC3, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(IIC3) },
 };
 
 struct platform_device s3c_device_i2c3 = {
@@ -747,16 +577,8 @@ void __init s3c_i2c3_set_platdata(struct s3c2410_platform_i2c *pd)
 
 #ifdef CONFIG_S3C_DEV_I2C4
 static struct resource s3c_i2c4_resource[] = {
-	[0] = {
-		.start	= S3C_PA_IIC4,
-		.end	= S3C_PA_IIC4 + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_IIC4,
-		.end	= IRQ_IIC4,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S3C, IIC4, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(IIC4) },
 };
 
 struct platform_device s3c_device_i2c4 = {
@@ -785,16 +607,8 @@ void __init s3c_i2c4_set_platdata(struct s3c2410_platform_i2c *pd)
 
 #ifdef CONFIG_S3C_DEV_I2C5
 static struct resource s3c_i2c5_resource[] = {
-	[0] = {
-		.start	= S3C_PA_IIC5,
-		.end	= S3C_PA_IIC5 + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_IIC5,
-		.end	= IRQ_IIC5,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S3C, IIC5, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(IIC5) },
 };
 
 struct platform_device s3c_device_i2c5 = {
@@ -823,16 +637,8 @@ void __init s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *pd)
 
 #ifdef CONFIG_S3C_DEV_I2C6
 static struct resource s3c_i2c6_resource[] = {
-	[0] = {
-		.start	= S3C_PA_IIC6,
-		.end	= S3C_PA_IIC6 + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_IIC6,
-		.end	= IRQ_IIC6,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S3C, IIC6, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(IIC6) },
 };
 
 struct platform_device s3c_device_i2c6 = {
@@ -861,16 +667,8 @@ void __init s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *pd)
 
 #ifdef CONFIG_S3C_DEV_I2C7
 static struct resource s3c_i2c7_resource[] = {
-	[0] = {
-		.start	= S3C_PA_IIC7,
-		.end	= S3C_PA_IIC7 + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_IIC7,
-		.end	= IRQ_IIC7,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S3C, IIC7, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(IIC7) },
 };
 
 struct platform_device s3c_device_i2c7 = {
@@ -899,16 +697,8 @@ void __init s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *pd)
 
 #ifdef CONFIG_S5P_DEV_I2C_HDMIPHY
 static struct resource s5p_i2c_resource[] = {
-	[0] = {
-		.start	= S5P_PA_IIC_HDMIPHY,
-		.end	= S5P_PA_IIC_HDMIPHY + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_IIC_HDMIPHY,
-		.end	= IRQ_IIC_HDMIPHY,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S5P, IIC_HDMIPHY, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(IIC_HDMIPHY) },
 };
 
 struct platform_device s5p_device_i2c_hdmiphy = {
@@ -942,11 +732,7 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd)
 
 #ifdef CONFIG_PLAT_S3C24XX
 static struct resource s3c_iis_resource[] = {
-	[0] = {
-		.start	= S3C24XX_PA_IIS,
-		.end	= S3C24XX_PA_IIS + S3C24XX_SZ_IIS - 1,
-		.flags	= IORESOURCE_MEM,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C24XX, IIS, S3C24XX_SZ_IIS) },
 };
 
 struct platform_device s3c_device_iis = {
@@ -976,16 +762,8 @@ struct platform_device s3c2412_device_iis = {
 
 #ifdef CONFIG_SAMSUNG_DEV_IDE
 static struct resource s3c_cfcon_resource[] = {
-	[0] = {
-		.start	= SAMSUNG_PA_CFCON,
-		.end	= SAMSUNG_PA_CFCON + SZ_16K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_CFCON,
-		.end	= IRQ_CFCON,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(SAMSUNG, CFCON, SZ_16K) },
+	[1] = { SAMSUNG_RES_IRQ(CFCON) },
 };
 
 struct platform_device s3c_device_cfcon = {
@@ -1005,16 +783,8 @@ void s3c_ide_set_platdata(struct s3c_ide_platdata *pdata)
 
 #ifdef CONFIG_SAMSUNG_DEV_KEYPAD
 static struct resource samsung_keypad_resources[] = {
-	[0] = {
-		.start	= SAMSUNG_PA_KEYPAD,
-		.end	= SAMSUNG_PA_KEYPAD + 0x20 - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_KEYPAD,
-		.end	= IRQ_KEYPAD,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(SAMSUNG, KEYPAD, SZ_32) },
+	[1] = { SAMSUNG_RES_IRQ(KEYPAD) },
 };
 
 struct platform_device samsung_device_keypad = {
@@ -1040,16 +810,8 @@ void __init samsung_keypad_set_platdata(struct samsung_keypad_platdata *pd)
 
 #ifdef CONFIG_PLAT_S3C24XX
 static struct resource s3c_lcd_resource[] = {
-	[0] = {
-		.start	= S3C24XX_PA_LCD,
-		.end	= S3C24XX_PA_LCD + S3C24XX_SZ_LCD - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_LCD,
-		.end	= IRQ_LCD,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C24XX, LCD, S3C24XX_SZ_LCD) },
+	[1] = { SAMSUNG_RES_IRQ(LCD) },
 };
 
 struct platform_device s3c_device_lcd = {
@@ -1084,16 +846,8 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
 
 #ifdef CONFIG_S5P_DEV_MFC
 static struct resource s5p_mfc_resource[] = {
-	[0] = {
-		.start	= S5P_PA_MFC,
-		.end	= S5P_PA_MFC + SZ_64K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_MFC,
-		.end	= IRQ_MFC,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S5P, MFC, SZ_64K) },
+	[1] = { SAMSUNG_RES_IRQ(MFC) },
 };
 
 struct platform_device s5p_device_mfc = {
@@ -1136,16 +890,8 @@ struct platform_device s5p_device_mfc_r = {
 
 #ifdef CONFIG_S5P_DEV_CSIS0
 static struct resource s5p_mipi_csis0_resource[] = {
-	[0] = {
-		.start	= S5P_PA_MIPI_CSIS0,
-		.end	= S5P_PA_MIPI_CSIS0 + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_MIPI_CSIS0,
-		.end	= IRQ_MIPI_CSIS0,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S5P, MIPI_CSIS0, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(MIPI_CSIS0) },
 };
 
 struct platform_device s5p_device_mipi_csis0 = {
@@ -1158,16 +904,8 @@ struct platform_device s5p_device_mipi_csis0 = {
 
 #ifdef CONFIG_S5P_DEV_CSIS1
 static struct resource s5p_mipi_csis1_resource[] = {
-	[0] = {
-		.start	= S5P_PA_MIPI_CSIS1,
-		.end	= S5P_PA_MIPI_CSIS1 + SZ_4K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_MIPI_CSIS1,
-		.end	= IRQ_MIPI_CSIS1,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S5P, MIPI_CSIS1, SZ_4K) },
+	[1] = { SAMSUNG_RES_IRQ(MIPI_CSIS1) },
 };
 
 struct platform_device s5p_device_mipi_csis1 = {
@@ -1182,11 +920,7 @@ struct platform_device s5p_device_mipi_csis1 = {
 
 #ifdef CONFIG_S3C_DEV_NAND
 static struct resource s3c_nand_resource[] = {
-	[0] = {
-		.start	= S3C_PA_NAND,
-		.end	= S3C_PA_NAND + SZ_1M,
-		.flags	= IORESOURCE_MEM,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C, NAND, SZ_1M) },
 };
 
 struct platform_device s3c_device_nand = {
@@ -1291,21 +1025,9 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand)
 
 #ifdef CONFIG_S3C_DEV_ONENAND
 static struct resource s3c_onenand_resources[] = {
-	[0] = {
-		.start	= S3C_PA_ONENAND,
-		.end	= S3C_PA_ONENAND + 0x400 - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= S3C_PA_ONENAND_BUF,
-		.end	= S3C_PA_ONENAND_BUF + S3C_SZ_ONENAND_BUF - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[2] = {
-		.start	= IRQ_ONENAND,
-		.end	= IRQ_ONENAND,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S3C, ONENAND, SZ_1K) },
+	[1] = { SAMSUNG_RES_MEM(S3C, ONENAND_BUF, S3C_SZ_ONENAND_BUF) },
+	[2] = { SAMSUNG_RES_IRQ(ONENAND) },
 };
 
 struct platform_device s3c_device_onenand = {
@@ -1318,21 +1040,9 @@ struct platform_device s3c_device_onenand = {
 
 #ifdef CONFIG_S3C64XX_DEV_ONENAND1
 static struct resource s3c64xx_onenand1_resources[] = {
-	[0] = {
-		.start	= S3C64XX_PA_ONENAND1,
-		.end	= S3C64XX_PA_ONENAND1 + 0x400 - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= S3C64XX_PA_ONENAND1_BUF,
-		.end	= S3C64XX_PA_ONENAND1_BUF + S3C64XX_SZ_ONENAND1_BUF - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[2] = {
-		.start	= IRQ_ONENAND1,
-		.end	= IRQ_ONENAND1,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S3C64XX, ONENAND1, SZ_1K) },
+	[1] = { SAMSUNG_RES_MEM(S3C64XX, ONENAND1_BUF, S3C64XX_SZ_ONENAND1_BUF) },
+	[2] = { SAMSUNG_RES_IRQ(ONENAND1) },
 };
 
 struct platform_device s3c64xx_device_onenand1 = {
@@ -1351,21 +1061,9 @@ void s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata)
 
 #ifdef CONFIG_S5P_DEV_ONENAND
 static struct resource s5p_onenand_resources[] = {
-	[0] = {
-		.start	= S5P_PA_ONENAND,
-		.end	= S5P_PA_ONENAND + SZ_128K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= S5P_PA_ONENAND_DMA,
-		.end	= S5P_PA_ONENAND_DMA + SZ_8K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[2] = {
-		.start	= IRQ_ONENAND_AUDI,
-		.end	= IRQ_ONENAND_AUDI,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S5P, ONENAND, SZ_128K) },
+	[1] = { SAMSUNG_RES_MEM(S5P, ONENAND_DMA, SZ_8K) },
+	[2] = { SAMSUNG_RES_IRQ(ONENAND_AUDI) },
 };
 
 struct platform_device s5p_device_onenand = {
@@ -1380,9 +1078,7 @@ struct platform_device s5p_device_onenand = {
 
 #ifdef CONFIG_PLAT_S5P
 static struct resource s5p_pmu_resource = {
-	.start	= IRQ_PMU,
-	.end	= IRQ_PMU,
-	.flags	= IORESOURCE_IRQ,
+	SAMSUNG_RES_IRQ(PMU)
 };
 
 struct platform_device s5p_device_pmu = {
@@ -1439,21 +1135,9 @@ struct platform_device s3c_device_timer[] = {
 
 #ifdef CONFIG_PLAT_S3C24XX
 static struct resource s3c_rtc_resource[] = {
-	[0] = {
-		.start	= S3C24XX_PA_RTC,
-		.end	= S3C24XX_PA_RTC + 0xff,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_RTC,
-		.end	= IRQ_RTC,
-		.flags	= IORESOURCE_IRQ,
-	},
-	[2] = {
-		.start	= IRQ_TICK,
-		.end	= IRQ_TICK,
-		.flags	= IORESOURCE_IRQ
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C24XX, RTC, SZ_256) },
+	[1] = { SAMSUNG_RES_IRQ(RTC) },
+	[2] = { SAMSUNG_RES_IRQ(TICK) },
 };
 
 struct platform_device s3c_device_rtc = {
@@ -1466,21 +1150,9 @@ struct platform_device s3c_device_rtc = {
 
 #ifdef CONFIG_S3C_DEV_RTC
 static struct resource s3c_rtc_resource[] = {
-	[0] = {
-		.start	= S3C_PA_RTC,
-		.end	= S3C_PA_RTC + 0xff,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_RTC_ALARM,
-		.end	= IRQ_RTC_ALARM,
-		.flags	= IORESOURCE_IRQ,
-	},
-	[2] = {
-		.start	= IRQ_RTC_TIC,
-		.end	= IRQ_RTC_TIC,
-		.flags	= IORESOURCE_IRQ
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C, RTC, SZ_256) },
+	[1] = { SAMSUNG_RES_IRQ(RTC_ALARM) },
+	[2] = { SAMSUNG_RES_IRQ(RTC_TIC) },
 };
 
 struct platform_device s3c_device_rtc = {
@@ -1495,16 +1167,8 @@ struct platform_device s3c_device_rtc = {
 
 #ifdef CONFIG_PLAT_S3C24XX
 static struct resource s3c_sdi_resource[] = {
-	[0] = {
-		.start	= S3C24XX_PA_SDI,
-		.end	= S3C24XX_PA_SDI + S3C24XX_SZ_SDI - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_SDI,
-		.end	= IRQ_SDI,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C24XX, SDI, S3C24XX_SZ_SDI) },
+	[1] = { SAMSUNG_RES_IRQ(SDI) },
 };
 
 struct platform_device s3c_device_sdi = {
@@ -1525,16 +1189,8 @@ void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata)
 
 #ifdef CONFIG_PLAT_S3C24XX
 static struct resource s3c_spi0_resource[] = {
-	[0] = {
-		.start	= S3C24XX_PA_SPI,
-		.end	= S3C24XX_PA_SPI + 0x1f,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_SPI0,
-		.end	= IRQ_SPI0,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C24XX, SPI, SZ_32) },
+	[1] = { SAMSUNG_RES_IRQ(SPI0) },
 };
 
 struct platform_device s3c_device_spi0 = {
@@ -1549,16 +1205,8 @@ struct platform_device s3c_device_spi0 = {
 };
 
 static struct resource s3c_spi1_resource[] = {
-	[0] = {
-		.start	= S3C24XX_PA_SPI + S3C2410_SPI1,
-		.end	= S3C24XX_PA_SPI + S3C2410_SPI1 + 0x1f,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_SPI1,
-		.end	= IRQ_SPI1,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C24XX, SPI1, SZ_32) },
+	[1] = { SAMSUNG_RES_IRQ(SPI1) },
 };
 
 struct platform_device s3c_device_spi1 = {
@@ -1577,17 +1225,8 @@ struct platform_device s3c_device_spi1 = {
 
 #ifdef CONFIG_PLAT_S3C24XX
 static struct resource s3c_ts_resource[] = {
-	[0] = {
-		.start	= S3C24XX_PA_ADC,
-		.end	= S3C24XX_PA_ADC + S3C24XX_SZ_ADC - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_TC,
-		.end	= IRQ_TC,
-		.flags	= IORESOURCE_IRQ,
-	},
-
+	[0] = { SAMSUNG_RES_MEM(S3C24XX, ADC, S3C24XX_SZ_ADC) },
+	[1] = { SAMSUNG_RES_IRQ(TC) },
 };
 
 struct platform_device s3c_device_ts = {
@@ -1607,16 +1246,8 @@ void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_
 
 #ifdef CONFIG_SAMSUNG_DEV_TS
 static struct resource s3c_ts_resource[] = {
-	[0] = {
-		.start	= SAMSUNG_PA_ADC,
-		.end	= SAMSUNG_PA_ADC + SZ_256 - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_TC,
-		.end	= IRQ_TC,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(SAMSUNG, ADC, SZ_256) },
+	[1] = { SAMSUNG_RES_IRQ(TC) },
 };
 
 static struct s3c2410_ts_mach_info default_ts_data __initdata = {
@@ -1647,16 +1278,8 @@ void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd)
 #ifdef CONFIG_S5P_DEV_TV
 
 static struct resource s5p_hdmi_resources[] = {
-	[0] = {
-		.start	= S5P_PA_HDMI,
-		.end	= S5P_PA_HDMI + SZ_1M - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_HDMI,
-		.end	= IRQ_HDMI,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S5P, HDMI, SZ_1M) },
+	[1] = { SAMSUNG_RES_IRQ(HDMI) },
 };
 
 struct platform_device s5p_device_hdmi = {
@@ -1667,16 +1290,8 @@ struct platform_device s5p_device_hdmi = {
 };
 
 static struct resource s5p_sdo_resources[] = {
-	[0] = {
-		.start	= S5P_PA_SDO,
-		.end	= S5P_PA_SDO + SZ_64K - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_SDO,
-		.end	= IRQ_SDO,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S5P, SDO, SZ_64K) },
+	[1] = { SAMSUNG_RES_IRQ(SDO) },
 };
 
 struct platform_device s5p_device_sdo = {
@@ -1687,24 +1302,9 @@ struct platform_device s5p_device_sdo = {
 };
 
 static struct resource s5p_mixer_resources[] = {
-	[0] = {
-		.start	= S5P_PA_MIXER,
-		.end	= S5P_PA_MIXER + SZ_64K - 1,
-		.flags	= IORESOURCE_MEM,
-		.name	= "mxr"
-	},
-	[1] = {
-		.start	= S5P_PA_VP,
-		.end	= S5P_PA_VP + SZ_64K - 1,
-		.flags	= IORESOURCE_MEM,
-		.name	= "vp"
-	},
-	[2] = {
-		.start	= IRQ_MIXER,
-		.end	= IRQ_MIXER,
-		.flags	= IORESOURCE_IRQ,
-		.name	= "irq"
-	}
+	[0] = { SAMSUNG_RES_MEM(S5P, MIXER, SZ_64K) .name = "mxr" },
+	[1] = { SAMSUNG_RES_MEM(S5P, VP, SZ_64K) .name = "vp" },
+	[2] = { SAMSUNG_RES_IRQ(MIXER) .name = "irq" },
 };
 
 struct platform_device s5p_device_mixer = {
@@ -1723,16 +1323,8 @@ struct platform_device s5p_device_mixer = {
 
 #ifdef CONFIG_S3C_DEV_USB_HOST
 static struct resource s3c_usb_resource[] = {
-	[0] = {
-		.start	= S3C_PA_USBHOST,
-		.end	= S3C_PA_USBHOST + 0x100 - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_USBH,
-		.end	= IRQ_USBH,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C, USBHOST, SZ_256) },
+	[1] = { SAMSUNG_RES_IRQ(USBH) },
 };
 
 struct platform_device s3c_device_ohci = {
@@ -1766,16 +1358,8 @@ void __init s3c_ohci_set_platdata(struct s3c2410_hcd_info *info)
 
 #ifdef CONFIG_PLAT_S3C24XX
 static struct resource s3c_usbgadget_resource[] = {
-	[0] = {
-		.start	= S3C24XX_PA_USBDEV,
-		.end	= S3C24XX_PA_USBDEV + S3C24XX_SZ_USBDEV - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_USBD,
-		.end	= IRQ_USBD,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C24XX, USBDEV, S3C24XX_SZ_USBDEV) },
+	[1] = { SAMSUNG_RES_IRQ(USBD) },
 };
 
 struct platform_device s3c_device_usbgadget = {
@@ -1795,16 +1379,8 @@ void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd)
 
 #ifdef CONFIG_S5P_DEV_USB_EHCI
 static struct resource s5p_ehci_resource[] = {
-	[0] = {
-		.start	= S5P_PA_EHCI,
-		.end	= S5P_PA_EHCI + SZ_256 - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_USB_HOST,
-		.end	= IRQ_USB_HOST,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S5P, EHCI, SZ_256) },
+	[1] = { SAMSUNG_RES_IRQ(USB_HOST) },
 };
 
 struct platform_device s5p_device_ehci = {
@@ -1836,16 +1412,8 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd)
 
 #ifdef CONFIG_S3C_DEV_USB_HSOTG
 static struct resource s3c_usb_hsotg_resources[] = {
-	[0] = {
-		.start	= S3C_PA_USB_HSOTG,
-		.end	= S3C_PA_USB_HSOTG + 0x10000 - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_OTG,
-		.end	= IRQ_OTG,
-		.flags	= IORESOURCE_IRQ,
-	},
+	[0] = { SAMSUNG_RES_MEM(S3C, USB_HSOTG, SZ_16K) },
+	[1] = { SAMSUNG_RES_IRQ(OTG) },
 };
 
 struct platform_device s3c_device_usb_hsotg = {
@@ -1864,16 +1432,8 @@ struct platform_device s3c_device_usb_hsotg = {
 
 #ifdef CONFIG_PLAT_S3C24XX
 static struct resource s3c_hsudc_resource[] = {
-	[0] = {
-		.start	= S3C2416_PA_HSUDC,
-		.end	= S3C2416_PA_HSUDC + S3C2416_SZ_HSUDC - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_USBD,
-		.end	= IRQ_USBD,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C2416, HSUDC, S3C2416_SZ_HSUDC) },
+	[1] = { SAMSUNG_RES_IRQ(USBD) },
 };
 
 struct platform_device s3c_device_usb_hsudc = {
@@ -1897,16 +1457,8 @@ void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd)
 
 #ifdef CONFIG_S3C_DEV_WDT
 static struct resource s3c_wdt_resource[] = {
-	[0] = {
-		.start	= S3C_PA_WDT,
-		.end	= S3C_PA_WDT + SZ_1K,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		.start	= IRQ_WDT,
-		.end	= IRQ_WDT,
-		.flags	= IORESOURCE_IRQ,
-	}
+	[0] = { SAMSUNG_RES_MEM(S3C, WDT, SZ_1K) },
+	[1] = { SAMSUNG_RES_IRQ(WDT) },
 };
 
 struct platform_device s3c_device_wdt = {
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h
index 8f19241..8b8bd1c 100644
--- a/arch/arm/plat-samsung/include/plat/devs.h
+++ b/arch/arm/plat-samsung/include/plat/devs.h
@@ -18,6 +18,16 @@
 
 #include <linux/platform_device.h>
 
+#define SAMSUNG_RES_MEM(soc, ip, sz)			\
+		.start	= soc##_PA_##ip,		\
+		.end	= soc##_PA_##ip + sz - 1,	\
+		.flags	= IORESOURCE_MEM,
+
+#define SAMSUNG_RES_IRQ(ip)				\
+		.start	= IRQ_##ip,			\
+		.end	= IRQ_##ip,			\
+		.flags	= IORESOURCE_IRQ,
+
 struct s3c24xx_uart_resources {
 	struct resource		*resources;
 	unsigned long		 nr_resources;
-- 
1.7.1

^ permalink raw reply related

* [PATCH] ARM: EXYNOS: Add ARCH_EXYNOS and reorganize arch/arm/mach-exynos
From: Kukjin Kim @ 2011-10-02  9:25 UTC (permalink / raw)
  To: linux-arm-kernel

The arch/arm/mach-exynos4 directory (CONFIG_ARCH_EXYNOS4) has
made for plaforms based on EXYNOS4 SoCs. But since upcoming
Samsung's SoCs such as EXYNOS5 (ARM Cortex A15) can reuse most
codes in current mach-exynos4, one mach-exynos directory will
be used for them.

This patch changes to CONFIG_ARCH_EXYNOS (arch/arm/mach-exynos)
but keeps original CONFIG_ARCH_EXYNOS4 in mach-exynos/Kconfig to
avoid changing in driver side.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
NOTE: The codes for upcoming SoCs will be implemented soon.

 arch/arm/Kconfig                                   |    8 +-
 arch/arm/Makefile                                  |    2 +-
 arch/arm/configs/exynos4_defconfig                 |    7 +--
 arch/arm/{mach-exynos4 => mach-exynos}/Kconfig     |   41 +++++++++---
 arch/arm/{mach-exynos4 => mach-exynos}/Makefile    |    8 +-
 .../{mach-exynos4 => mach-exynos}/Makefile.boot    |    0
 .../clock-exynos4210.c                             |    0
 .../clock-exynos4212.c                             |    0
 arch/arm/{mach-exynos4 => mach-exynos}/clock.c     |    0
 arch/arm/{mach-exynos4 => mach-exynos}/cpu.c       |   69 +++++++++++---------
 arch/arm/{mach-exynos4 => mach-exynos}/cpuidle.c   |    0
 arch/arm/{mach-exynos4 => mach-exynos}/dev-ahci.c  |    0
 arch/arm/{mach-exynos4 => mach-exynos}/dev-audio.c |    0
 arch/arm/{mach-exynos4 => mach-exynos}/dev-dwmci.c |    0
 arch/arm/{mach-exynos4 => mach-exynos}/dev-pd.c    |    0
 .../arm/{mach-exynos4 => mach-exynos}/dev-sysmmu.c |    0
 arch/arm/{mach-exynos4 => mach-exynos}/dma.c       |    0
 arch/arm/{mach-exynos4 => mach-exynos}/headsmp.S   |    0
 arch/arm/{mach-exynos4 => mach-exynos}/hotplug.c   |    0
 .../include/mach/debug-macro.S                     |    0
 .../include/mach/dma.h                             |    0
 .../include/mach/dwmci.h                           |    0
 .../include/mach/entry-macro.S                     |    0
 .../include/mach/exynos4-clock.h                   |    0
 .../include/mach/gpio.h                            |    0
 .../include/mach/hardware.h                        |    0
 .../include/mach/io.h                              |    0
 .../include/mach/irqs.h                            |    0
 .../include/mach/map.h                             |   32 ++++++----
 .../include/mach/memory.h                          |    0
 .../include/mach/pm-core.h                         |    0
 .../include/mach/pmu.h                             |    0
 .../include/mach/regs-audss.h                      |    0
 .../include/mach/regs-clock.h                      |    0
 .../include/mach/regs-gpio.h                       |    0
 .../include/mach/regs-irq.h                        |    0
 .../include/mach/regs-mct.h                        |    0
 .../include/mach/regs-mem.h                        |    0
 .../include/mach/regs-pmu.h                        |    0
 .../include/mach/regs-sysmmu.h                     |    0
 .../include/mach/regs-usb-phy.h                    |    0
 .../include/mach/sysmmu.h                          |    0
 .../include/mach/system.h                          |    0
 .../include/mach/timex.h                           |    0
 .../include/mach/uncompress.h                      |    0
 .../include/mach/vmalloc.h                         |    0
 arch/arm/{mach-exynos4 => mach-exynos}/init.c      |    0
 .../{mach-exynos4 => mach-exynos}/irq-combiner.c   |    0
 arch/arm/{mach-exynos4 => mach-exynos}/irq-eint.c  |    0
 .../mach-armlex4210.c                              |    0
 arch/arm/{mach-exynos4 => mach-exynos}/mach-nuri.c |    0
 .../{mach-exynos4 => mach-exynos}/mach-origen.c    |    0
 .../{mach-exynos4 => mach-exynos}/mach-smdk4x12.c  |    0
 .../{mach-exynos4 => mach-exynos}/mach-smdkv310.c  |    0
 .../mach-universal_c210.c                          |    0
 arch/arm/{mach-exynos4 => mach-exynos}/mct.c       |    0
 arch/arm/{mach-exynos4 => mach-exynos}/platsmp.c   |    0
 arch/arm/{mach-exynos4 => mach-exynos}/pm.c        |    0
 arch/arm/{mach-exynos4 => mach-exynos}/pmu.c       |    0
 .../arm/{mach-exynos4 => mach-exynos}/setup-fimc.c |    0
 .../{mach-exynos4 => mach-exynos}/setup-fimd0.c    |    0
 .../arm/{mach-exynos4 => mach-exynos}/setup-i2c0.c |    0
 .../arm/{mach-exynos4 => mach-exynos}/setup-i2c1.c |    0
 .../arm/{mach-exynos4 => mach-exynos}/setup-i2c2.c |    0
 .../arm/{mach-exynos4 => mach-exynos}/setup-i2c3.c |    0
 .../arm/{mach-exynos4 => mach-exynos}/setup-i2c4.c |    0
 .../arm/{mach-exynos4 => mach-exynos}/setup-i2c5.c |    0
 .../arm/{mach-exynos4 => mach-exynos}/setup-i2c6.c |    0
 .../arm/{mach-exynos4 => mach-exynos}/setup-i2c7.c |    0
 .../{mach-exynos4 => mach-exynos}/setup-keypad.c   |    0
 .../setup-sdhci-gpio.c                             |    0
 .../{mach-exynos4 => mach-exynos}/setup-sdhci.c    |    0
 .../{mach-exynos4 => mach-exynos}/setup-usb-phy.c  |    0
 arch/arm/{mach-exynos4 => mach-exynos}/sleep.S     |    0
 arch/arm/plat-s5p/Kconfig                          |    2 +-
 arch/arm/plat-s5p/cpu.c                            |    6 +-
 arch/arm/plat-samsung/include/plat/exynos4.h       |    6 +-
 77 files changed, 104 insertions(+), 77 deletions(-)
 rename arch/arm/{mach-exynos4 => mach-exynos}/Kconfig (91%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/Makefile (89%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/Makefile.boot (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/clock-exynos4210.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/clock-exynos4212.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/clock.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/cpu.c (91%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/cpuidle.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/dev-ahci.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/dev-audio.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/dev-dwmci.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/dev-pd.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/dev-sysmmu.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/dma.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/headsmp.S (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/hotplug.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/debug-macro.S (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/dma.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/dwmci.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/entry-macro.S (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/exynos4-clock.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/gpio.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/hardware.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/io.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/irqs.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/map.h (93%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/memory.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/pm-core.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/pmu.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-audss.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-clock.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-gpio.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-irq.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-mct.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-mem.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-pmu.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-sysmmu.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-usb-phy.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/sysmmu.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/system.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/timex.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/uncompress.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/include/mach/vmalloc.h (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/init.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/irq-combiner.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/irq-eint.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/mach-armlex4210.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/mach-nuri.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/mach-origen.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/mach-smdk4x12.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/mach-smdkv310.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/mach-universal_c210.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/mct.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/platsmp.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/pm.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/pmu.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-fimc.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-fimd0.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c0.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c1.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c2.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c3.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c4.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c5.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c6.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c7.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-keypad.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-sdhci-gpio.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-sdhci.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/setup-usb-phy.c (100%)
 rename arch/arm/{mach-exynos4 => mach-exynos}/sleep.S (100%)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index bea81d0..21dbf01 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -781,8 +781,8 @@ config ARCH_S5PV210
 	help
 	  Samsung S5PV210/S5PC110 series based systems
 
-config ARCH_EXYNOS4
-	bool "Samsung EXYNOS4"
+config ARCH_EXYNOS
+	bool "SAMSUNG EXYNOS"
 	select CPU_V7
 	select ARCH_SPARSEMEM_ENABLE
 	select ARCH_HAS_HOLES_MEMORYMODEL
@@ -795,7 +795,7 @@ config ARCH_EXYNOS4
 	select HAVE_S3C2410_I2C if I2C
 	select HAVE_S3C2410_WATCHDOG if WATCHDOG
 	help
-	  Samsung EXYNOS4 series based systems
+	  Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5)
 
 config ARCH_SHARK
 	bool "Shark"
@@ -1021,7 +1021,7 @@ source "arch/arm/mach-s5pc100/Kconfig"
 
 source "arch/arm/mach-s5pv210/Kconfig"
 
-source "arch/arm/mach-exynos4/Kconfig"
+source "arch/arm/mach-exynos/Kconfig"
 
 source "arch/arm/mach-shmobile/Kconfig"
 
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 70c424e..289439e 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -177,7 +177,7 @@ machine-$(CONFIG_ARCH_S3C64XX)		:= s3c64xx
 machine-$(CONFIG_ARCH_S5P64X0)		:= s5p64x0
 machine-$(CONFIG_ARCH_S5PC100)		:= s5pc100
 machine-$(CONFIG_ARCH_S5PV210)		:= s5pv210
-machine-$(CONFIG_ARCH_EXYNOS4)		:= exynos4
+machine-$(CONFIG_ARCH_EXYNOS4)		:= exynos
 machine-$(CONFIG_ARCH_SA1100)		:= sa1100
 machine-$(CONFIG_ARCH_SHARK)		:= shark
 machine-$(CONFIG_ARCH_SHMOBILE) 	:= shmobile
diff --git a/arch/arm/configs/exynos4_defconfig b/arch/arm/configs/exynos4_defconfig
index cd40bb5..b0d3c13 100644
--- a/arch/arm/configs/exynos4_defconfig
+++ b/arch/arm/configs/exynos4_defconfig
@@ -4,10 +4,9 @@ CONFIG_KALLSYMS_ALL=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
-CONFIG_ARCH_EXYNOS4=y
+CONFIG_ARCH_EXYNOS=y
 CONFIG_S3C_LOWLEVEL_UART_PORT=1
 CONFIG_MACH_SMDKC210=y
-CONFIG_MACH_SMDKV310=y
 CONFIG_MACH_ARMLEX4210=y
 CONFIG_MACH_UNIVERSAL_C210=y
 CONFIG_MACH_NURI=y
@@ -16,7 +15,6 @@ CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
 CONFIG_SMP=y
 CONFIG_NR_CPUS=2
-CONFIG_HOTPLUG_CPU=y
 CONFIG_PREEMPT=y
 CONFIG_AEABI=y
 CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M"
@@ -61,12 +59,9 @@ CONFIG_DETECT_HUNG_TASK=y
 CONFIG_DEBUG_RT_MUTEXES=y
 CONFIG_DEBUG_SPINLOCK=y
 CONFIG_DEBUG_MUTEXES=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
 CONFIG_DEBUG_INFO=y
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
 CONFIG_DEBUG_USER=y
-CONFIG_DEBUG_ERRORS=y
 CONFIG_DEBUG_LL=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_DEBUG_S3C_UART=1
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos/Kconfig
similarity index 91%
rename from arch/arm/mach-exynos4/Kconfig
rename to arch/arm/mach-exynos/Kconfig
index 6dfde07..999989e 100644
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -1,4 +1,4 @@
-# arch/arm/mach-exynos4/Kconfig
+# arch/arm/mach-exynos/Kconfig
 #
 # Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
 #		http://www.samsung.com/
@@ -7,21 +7,42 @@
 
 # Configuration options for the EXYNOS4
 
-if ARCH_EXYNOS4
+if ARCH_EXYNOS
+
+menu "SAMSUNG EXYNOS SoCs Support"
+
+choice
+	prompt "EXYNOS System Type"
+	default ARCH_EXYNOS4
+
+config ARCH_EXYNOS4
+	bool "SAMSUNG EXYNOS4"
+	help
+	  Samsung EXYNOS4 SoCs based systems
+
+endchoice
+
+comment "EXYNOS SoCs"
 
 config CPU_EXYNOS4210
-	bool
+	bool "SAMSUNG EXYNOS4210"
+	default y
+	depends on ARCH_EXYNOS4
 	select SAMSUNG_DMADEV
 	help
 	  Enable EXYNOS4210 CPU support
 
 config SOC_EXYNOS4212
-	bool
+	bool "SAMSUNG EXYNOS4212"
+	default y
+	depends on ARCH_EXYNOS4
 	help
 	  Enable EXYNOS4212 SoC support
 
 config SOC_EXYNOS4412
-	bool
+	bool "SAMSUNG EXYNOS4412"
+	default y
+	depends on ARCH_EXYNOS4
 	help
 	  Enable EXYNOS4412 SoC support
 
@@ -119,7 +140,7 @@ config EXYNOS4_SETUP_USB_PHY
 
 # machine support
 
-menu "EXYNOS4 Machines"
+if ARCH_EXYNOS4
 
 comment "EXYNOS4210 Boards"
 
@@ -286,12 +307,11 @@ config MACH_SMDK4412
 	select MACH_SMDK4212
 	help
 	  Machine support for Samsung SMDK4412
+endif
 
-endmenu
-
-comment "Configuration for HSMMC bus width"
+if ARCH_EXYNOS4
 
-menu "Use 8-bit bus width"
+comment "Configuration for HSMMC 8-bit bus width"
 
 config EXYNOS4_SDHCI_CH0_8BIT
 	bool "Channel 0 with 8-bit bus"
@@ -304,6 +324,7 @@ config EXYNOS4_SDHCI_CH2_8BIT
 	help
 	  Support HSMMC Channel 2 8-bit bus.
 	  If selected, Channel 3 is disabled.
+endif
 
 endmenu
 
diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos/Makefile
similarity index 89%
rename from arch/arm/mach-exynos4/Makefile
rename to arch/arm/mach-exynos/Makefile
index c9b2e1f..fa715eb 100644
--- a/arch/arm/mach-exynos4/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -1,4 +1,4 @@
-# arch/arm/mach-exynos4/Makefile
+# arch/arm/mach-exynos/Makefile
 #
 # Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
 #		http://www.samsung.com/
@@ -12,8 +12,8 @@ obj-				:=
 
 # Core support for EXYNOS4 system
 
-obj-$(CONFIG_ARCH_EXYNOS4)	+= cpu.o init.o clock.o irq-combiner.o
-obj-$(CONFIG_ARCH_EXYNOS4)	+= setup-i2c0.o irq-eint.o dma.o pmu.o
+obj-$(CONFIG_ARCH_EXYNOS)	+= 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_CPU_EXYNOS4210)	+= clock-exynos4210.o
 obj-$(CONFIG_SOC_EXYNOS4212)	+= clock-exynos4212.o
 obj-$(CONFIG_PM)		+= pm.o sleep.o
@@ -39,7 +39,7 @@ obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
 
 # device support
 
-obj-y					+= dev-audio.o
+obj-$(CONFIG_ARCH_EXYNOS4)		+= dev-audio.o
 obj-$(CONFIG_EXYNOS4_DEV_AHCI)		+= dev-ahci.o
 obj-$(CONFIG_EXYNOS4_DEV_PD)		+= dev-pd.o
 obj-$(CONFIG_EXYNOS4_DEV_SYSMMU)	+= dev-sysmmu.o
diff --git a/arch/arm/mach-exynos4/Makefile.boot b/arch/arm/mach-exynos/Makefile.boot
similarity index 100%
rename from arch/arm/mach-exynos4/Makefile.boot
rename to arch/arm/mach-exynos/Makefile.boot
diff --git a/arch/arm/mach-exynos4/clock-exynos4210.c b/arch/arm/mach-exynos/clock-exynos4210.c
similarity index 100%
rename from arch/arm/mach-exynos4/clock-exynos4210.c
rename to arch/arm/mach-exynos/clock-exynos4210.c
diff --git a/arch/arm/mach-exynos4/clock-exynos4212.c b/arch/arm/mach-exynos/clock-exynos4212.c
similarity index 100%
rename from arch/arm/mach-exynos4/clock-exynos4212.c
rename to arch/arm/mach-exynos/clock-exynos4212.c
diff --git a/arch/arm/mach-exynos4/clock.c b/arch/arm/mach-exynos/clock.c
similarity index 100%
rename from arch/arm/mach-exynos4/clock.c
rename to arch/arm/mach-exynos/clock.c
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos/cpu.c
similarity index 91%
rename from arch/arm/mach-exynos4/cpu.c
rename to arch/arm/mach-exynos/cpu.c
index 5b1765b..90ec247 100644
--- a/arch/arm/mach-exynos4/cpu.c
+++ b/arch/arm/mach-exynos/cpu.c
@@ -1,4 +1,4 @@
-/* linux/arch/arm/mach-exynos4/cpu.c
+/* linux/arch/arm/mach-exynos/cpu.c
  *
  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com
@@ -40,28 +40,47 @@ extern int combiner_init(unsigned int combiner_nr, void __iomem *base,
 extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq);
 
 /* Initial IO mappings */
-static struct map_desc exynos4_iodesc[] __initdata = {
+static struct map_desc exynos_iodesc[] __initdata = {
 	{
 		.virtual	= (unsigned long)S5P_VA_SYSTIMER,
-		.pfn		= __phys_to_pfn(EXYNOS4_PA_SYSTIMER),
+		.pfn		= __phys_to_pfn(EXYNOS_PA_SYSTIMER),
 		.length		= SZ_4K,
-		.type	 	= MT_DEVICE,
-	}, {
-		.virtual	= (unsigned long)S5P_VA_CMU,
-		.pfn		= __phys_to_pfn(EXYNOS4_PA_CMU),
-		.length		= SZ_128K,
 		.type		= MT_DEVICE,
 	}, {
 		.virtual	= (unsigned long)S5P_VA_PMU,
-		.pfn		= __phys_to_pfn(EXYNOS4_PA_PMU),
+		.pfn		= __phys_to_pfn(EXYNOS_PA_PMU),
 		.length		= SZ_64K,
 		.type		= MT_DEVICE,
 	}, {
 		.virtual	= (unsigned long)S5P_VA_COMBINER_BASE,
-		.pfn		= __phys_to_pfn(EXYNOS4_PA_COMBINER),
+		.pfn		= __phys_to_pfn(EXYNOS_PA_COMBINER),
 		.length		= SZ_4K,
 		.type		= MT_DEVICE,
 	}, {
+		.virtual	= (unsigned long)S5P_VA_GIC_CPU,
+		.pfn		= __phys_to_pfn(EXYNOS_PA_GIC_CPU),
+		.length		= SZ_64K,
+		.type		= MT_DEVICE,
+	}, {
+		.virtual	= (unsigned long)S5P_VA_GIC_DIST,
+		.pfn		= __phys_to_pfn(EXYNOS_PA_GIC_DIST),
+		.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,
+	},
+};
+
+static struct map_desc exynos4_iodesc[] __initdata = {
+	{
+		.virtual	= (unsigned long)S5P_VA_CMU,
+		.pfn		= __phys_to_pfn(EXYNOS4_PA_CMU),
+		.length		= SZ_128K,
+		.type		= MT_DEVICE,
+	}, {
 		.virtual	= (unsigned long)S5P_VA_COREPERI_BASE,
 		.pfn		= __phys_to_pfn(EXYNOS4_PA_COREPERI),
 		.length		= SZ_8K,
@@ -92,11 +111,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
 		.length		= SZ_4K,
 		.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(EXYNOS4_PA_SROMC),
 		.length		= SZ_4K,
@@ -106,16 +120,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
 		.pfn		= __phys_to_pfn(EXYNOS4_PA_HSPHY),
 		.length		= SZ_4K,
 		.type		= MT_DEVICE,
-	}, {
-		.virtual	= (unsigned long)S5P_VA_GIC_CPU,
-		.pfn		= __phys_to_pfn(EXYNOS4_PA_GIC_CPU),
-		.length		= SZ_64K,
-		.type		= MT_DEVICE,
-	}, {
-		.virtual	= (unsigned long)S5P_VA_GIC_DIST,
-		.pfn		= __phys_to_pfn(EXYNOS4_PA_GIC_DIST),
-		.length		= SZ_64K,
-		.type		= MT_DEVICE,
 	},
 };
 
@@ -137,7 +141,7 @@ static struct map_desc exynos4_iodesc1[] __initdata = {
 	},
 };
 
-static void exynos4_idle(void)
+static void exynos_idle(void)
 {
 	if (!need_resched())
 		cpu_do_idle();
@@ -151,12 +155,13 @@ static void exynos4_sw_reset(void)
 }
 
 /*
- * exynos4_map_io
+ * exynos_map_io
  *
  * register the standard cpu IO areas
  */
 void __init exynos4_map_io(void)
 {
+	iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc));
 	iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc));
 
 	if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_0)
@@ -250,7 +255,6 @@ static int __init exynos4_core_init(void)
 {
 	return sysdev_class_register(&exynos4_sysclass);
 }
-
 core_initcall(exynos4_core_init);
 
 #ifdef CONFIG_CACHE_L2X0
@@ -279,15 +283,16 @@ static int __init exynos4_l2x0_cache_init(void)
 early_initcall(exynos4_l2x0_cache_init);
 #endif
 
-int __init exynos4_init(void)
+int __init exynos_init(void)
 {
-	printk(KERN_INFO "EXYNOS4: Initializing architecture\n");
+	printk(KERN_INFO "EXYNOS: Initializing architecture\n");
 
 	/* set idle function */
-	pm_idle = exynos4_idle;
+	pm_idle = exynos_idle;
 
 	/* set sw_reset function */
-	s5p_reset_hook = exynos4_sw_reset;
+	if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412())
+		s5p_reset_hook = exynos4_sw_reset;
 
 	return sysdev_register(&exynos4_sysdev);
 }
diff --git a/arch/arm/mach-exynos4/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
similarity index 100%
rename from arch/arm/mach-exynos4/cpuidle.c
rename to arch/arm/mach-exynos/cpuidle.c
diff --git a/arch/arm/mach-exynos4/dev-ahci.c b/arch/arm/mach-exynos/dev-ahci.c
similarity index 100%
rename from arch/arm/mach-exynos4/dev-ahci.c
rename to arch/arm/mach-exynos/dev-ahci.c
diff --git a/arch/arm/mach-exynos4/dev-audio.c b/arch/arm/mach-exynos/dev-audio.c
similarity index 100%
rename from arch/arm/mach-exynos4/dev-audio.c
rename to arch/arm/mach-exynos/dev-audio.c
diff --git a/arch/arm/mach-exynos4/dev-dwmci.c b/arch/arm/mach-exynos/dev-dwmci.c
similarity index 100%
rename from arch/arm/mach-exynos4/dev-dwmci.c
rename to arch/arm/mach-exynos/dev-dwmci.c
diff --git a/arch/arm/mach-exynos4/dev-pd.c b/arch/arm/mach-exynos/dev-pd.c
similarity index 100%
rename from arch/arm/mach-exynos4/dev-pd.c
rename to arch/arm/mach-exynos/dev-pd.c
diff --git a/arch/arm/mach-exynos4/dev-sysmmu.c b/arch/arm/mach-exynos/dev-sysmmu.c
similarity index 100%
rename from arch/arm/mach-exynos4/dev-sysmmu.c
rename to arch/arm/mach-exynos/dev-sysmmu.c
diff --git a/arch/arm/mach-exynos4/dma.c b/arch/arm/mach-exynos/dma.c
similarity index 100%
rename from arch/arm/mach-exynos4/dma.c
rename to arch/arm/mach-exynos/dma.c
diff --git a/arch/arm/mach-exynos4/headsmp.S b/arch/arm/mach-exynos/headsmp.S
similarity index 100%
rename from arch/arm/mach-exynos4/headsmp.S
rename to arch/arm/mach-exynos/headsmp.S
diff --git a/arch/arm/mach-exynos4/hotplug.c b/arch/arm/mach-exynos/hotplug.c
similarity index 100%
rename from arch/arm/mach-exynos4/hotplug.c
rename to arch/arm/mach-exynos/hotplug.c
diff --git a/arch/arm/mach-exynos4/include/mach/debug-macro.S b/arch/arm/mach-exynos/include/mach/debug-macro.S
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/debug-macro.S
rename to arch/arm/mach-exynos/include/mach/debug-macro.S
diff --git a/arch/arm/mach-exynos4/include/mach/dma.h b/arch/arm/mach-exynos/include/mach/dma.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/dma.h
rename to arch/arm/mach-exynos/include/mach/dma.h
diff --git a/arch/arm/mach-exynos4/include/mach/dwmci.h b/arch/arm/mach-exynos/include/mach/dwmci.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/dwmci.h
rename to arch/arm/mach-exynos/include/mach/dwmci.h
diff --git a/arch/arm/mach-exynos4/include/mach/entry-macro.S b/arch/arm/mach-exynos/include/mach/entry-macro.S
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/entry-macro.S
rename to arch/arm/mach-exynos/include/mach/entry-macro.S
diff --git a/arch/arm/mach-exynos4/include/mach/exynos4-clock.h b/arch/arm/mach-exynos/include/mach/exynos4-clock.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/exynos4-clock.h
rename to arch/arm/mach-exynos/include/mach/exynos4-clock.h
diff --git a/arch/arm/mach-exynos4/include/mach/gpio.h b/arch/arm/mach-exynos/include/mach/gpio.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/gpio.h
rename to arch/arm/mach-exynos/include/mach/gpio.h
diff --git a/arch/arm/mach-exynos4/include/mach/hardware.h b/arch/arm/mach-exynos/include/mach/hardware.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/hardware.h
rename to arch/arm/mach-exynos/include/mach/hardware.h
diff --git a/arch/arm/mach-exynos4/include/mach/io.h b/arch/arm/mach-exynos/include/mach/io.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/io.h
rename to arch/arm/mach-exynos/include/mach/io.h
diff --git a/arch/arm/mach-exynos4/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/irqs.h
rename to arch/arm/mach-exynos/include/mach/irqs.h
diff --git a/arch/arm/mach-exynos4/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
similarity index 93%
rename from arch/arm/mach-exynos4/include/mach/map.h
rename to arch/arm/mach-exynos/include/mach/map.h
index 918a979..058541d 100644
--- a/arch/arm/mach-exynos4/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -1,4 +1,4 @@
-/* linux/arch/arm/mach-exynos4/include/mach/map.h
+/* linux/arch/arm/mach-exynos/include/mach/map.h
  *
  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
  *		http://www.samsung.com/
@@ -145,39 +145,45 @@
 #define S3C_PA_IIC5			EXYNOS4_PA_IIC(5)
 #define S3C_PA_IIC6			EXYNOS4_PA_IIC(6)
 #define S3C_PA_IIC7			EXYNOS4_PA_IIC(7)
-#define SAMSUNG_PA_ADC			EXYNOS4_PA_ADC
-#define SAMSUNG_PA_ADC1			EXYNOS4_PA_ADC1
 #define S3C_PA_RTC			EXYNOS4_PA_RTC
 #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
 #define S5P_PA_FIMC2			EXYNOS4_PA_FIMC2
 #define S5P_PA_FIMC3			EXYNOS4_PA_FIMC3
+#define S5P_PA_FIMD0			EXYNOS4_PA_FIMD0
+#define S5P_PA_HDMI			EXYNOS4_PA_HDMI
+#define S5P_PA_IIC_HDMIPHY		EXYNOS4_PA_IIC_HDMIPHY
+#define S5P_PA_MFC			EXYNOS4_PA_MFC
 #define S5P_PA_MIPI_CSIS0		EXYNOS4_PA_MIPI_CSIS0
 #define S5P_PA_MIPI_CSIS1		EXYNOS4_PA_MIPI_CSIS1
-#define S5P_PA_FIMD0			EXYNOS4_PA_FIMD0
+#define S5P_PA_MIXER			EXYNOS4_PA_MIXER
 #define S5P_PA_ONENAND			EXYNOS4_PA_ONENAND
 #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_MFC			EXYNOS4_PA_MFC
 #define S5P_PA_SYSCON			EXYNOS4_PA_SYSCON
 #define S5P_PA_TIMER			EXYNOS4_PA_TIMER
-#define S5P_PA_EHCI			EXYNOS4_PA_EHCI
-
-#define S5P_PA_SDO			EXYNOS4_PA_SDO
 #define S5P_PA_VP			EXYNOS4_PA_VP
-#define S5P_PA_MIXER			EXYNOS4_PA_MIXER
-#define S5P_PA_HDMI			EXYNOS4_PA_HDMI
-#define S5P_PA_IIC_HDMIPHY		EXYNOS4_PA_IIC_HDMIPHY
 
+#define SAMSUNG_PA_ADC			EXYNOS4_PA_ADC
+#define SAMSUNG_PA_ADC1			EXYNOS4_PA_ADC1
 #define SAMSUNG_PA_KEYPAD		EXYNOS4_PA_KEYPAD
 
-/* UART */
+#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
 
-#define S3C_PA_UART			EXYNOS4_PA_UART
+/* 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_UART0			S5P_PA_UART(0)
diff --git a/arch/arm/mach-exynos4/include/mach/memory.h b/arch/arm/mach-exynos/include/mach/memory.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/memory.h
rename to arch/arm/mach-exynos/include/mach/memory.h
diff --git a/arch/arm/mach-exynos4/include/mach/pm-core.h b/arch/arm/mach-exynos/include/mach/pm-core.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/pm-core.h
rename to arch/arm/mach-exynos/include/mach/pm-core.h
diff --git a/arch/arm/mach-exynos4/include/mach/pmu.h b/arch/arm/mach-exynos/include/mach/pmu.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/pmu.h
rename to arch/arm/mach-exynos/include/mach/pmu.h
diff --git a/arch/arm/mach-exynos4/include/mach/regs-audss.h b/arch/arm/mach-exynos/include/mach/regs-audss.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/regs-audss.h
rename to arch/arm/mach-exynos/include/mach/regs-audss.h
diff --git a/arch/arm/mach-exynos4/include/mach/regs-clock.h b/arch/arm/mach-exynos/include/mach/regs-clock.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/regs-clock.h
rename to arch/arm/mach-exynos/include/mach/regs-clock.h
diff --git a/arch/arm/mach-exynos4/include/mach/regs-gpio.h b/arch/arm/mach-exynos/include/mach/regs-gpio.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/regs-gpio.h
rename to arch/arm/mach-exynos/include/mach/regs-gpio.h
diff --git a/arch/arm/mach-exynos4/include/mach/regs-irq.h b/arch/arm/mach-exynos/include/mach/regs-irq.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/regs-irq.h
rename to arch/arm/mach-exynos/include/mach/regs-irq.h
diff --git a/arch/arm/mach-exynos4/include/mach/regs-mct.h b/arch/arm/mach-exynos/include/mach/regs-mct.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/regs-mct.h
rename to arch/arm/mach-exynos/include/mach/regs-mct.h
diff --git a/arch/arm/mach-exynos4/include/mach/regs-mem.h b/arch/arm/mach-exynos/include/mach/regs-mem.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/regs-mem.h
rename to arch/arm/mach-exynos/include/mach/regs-mem.h
diff --git a/arch/arm/mach-exynos4/include/mach/regs-pmu.h b/arch/arm/mach-exynos/include/mach/regs-pmu.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/regs-pmu.h
rename to arch/arm/mach-exynos/include/mach/regs-pmu.h
diff --git a/arch/arm/mach-exynos4/include/mach/regs-sysmmu.h b/arch/arm/mach-exynos/include/mach/regs-sysmmu.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/regs-sysmmu.h
rename to arch/arm/mach-exynos/include/mach/regs-sysmmu.h
diff --git a/arch/arm/mach-exynos4/include/mach/regs-usb-phy.h b/arch/arm/mach-exynos/include/mach/regs-usb-phy.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/regs-usb-phy.h
rename to arch/arm/mach-exynos/include/mach/regs-usb-phy.h
diff --git a/arch/arm/mach-exynos4/include/mach/sysmmu.h b/arch/arm/mach-exynos/include/mach/sysmmu.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/sysmmu.h
rename to arch/arm/mach-exynos/include/mach/sysmmu.h
diff --git a/arch/arm/mach-exynos4/include/mach/system.h b/arch/arm/mach-exynos/include/mach/system.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/system.h
rename to arch/arm/mach-exynos/include/mach/system.h
diff --git a/arch/arm/mach-exynos4/include/mach/timex.h b/arch/arm/mach-exynos/include/mach/timex.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/timex.h
rename to arch/arm/mach-exynos/include/mach/timex.h
diff --git a/arch/arm/mach-exynos4/include/mach/uncompress.h b/arch/arm/mach-exynos/include/mach/uncompress.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/uncompress.h
rename to arch/arm/mach-exynos/include/mach/uncompress.h
diff --git a/arch/arm/mach-exynos4/include/mach/vmalloc.h b/arch/arm/mach-exynos/include/mach/vmalloc.h
similarity index 100%
rename from arch/arm/mach-exynos4/include/mach/vmalloc.h
rename to arch/arm/mach-exynos/include/mach/vmalloc.h
diff --git a/arch/arm/mach-exynos4/init.c b/arch/arm/mach-exynos/init.c
similarity index 100%
rename from arch/arm/mach-exynos4/init.c
rename to arch/arm/mach-exynos/init.c
diff --git a/arch/arm/mach-exynos4/irq-combiner.c b/arch/arm/mach-exynos/irq-combiner.c
similarity index 100%
rename from arch/arm/mach-exynos4/irq-combiner.c
rename to arch/arm/mach-exynos/irq-combiner.c
diff --git a/arch/arm/mach-exynos4/irq-eint.c b/arch/arm/mach-exynos/irq-eint.c
similarity index 100%
rename from arch/arm/mach-exynos4/irq-eint.c
rename to arch/arm/mach-exynos/irq-eint.c
diff --git a/arch/arm/mach-exynos4/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c
similarity index 100%
rename from arch/arm/mach-exynos4/mach-armlex4210.c
rename to arch/arm/mach-exynos/mach-armlex4210.c
diff --git a/arch/arm/mach-exynos4/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
similarity index 100%
rename from arch/arm/mach-exynos4/mach-nuri.c
rename to arch/arm/mach-exynos/mach-nuri.c
diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
similarity index 100%
rename from arch/arm/mach-exynos4/mach-origen.c
rename to arch/arm/mach-exynos/mach-origen.c
diff --git a/arch/arm/mach-exynos4/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
similarity index 100%
rename from arch/arm/mach-exynos4/mach-smdk4x12.c
rename to arch/arm/mach-exynos/mach-smdk4x12.c
diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
similarity index 100%
rename from arch/arm/mach-exynos4/mach-smdkv310.c
rename to arch/arm/mach-exynos/mach-smdkv310.c
diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
similarity index 100%
rename from arch/arm/mach-exynos4/mach-universal_c210.c
rename to arch/arm/mach-exynos/mach-universal_c210.c
diff --git a/arch/arm/mach-exynos4/mct.c b/arch/arm/mach-exynos/mct.c
similarity index 100%
rename from arch/arm/mach-exynos4/mct.c
rename to arch/arm/mach-exynos/mct.c
diff --git a/arch/arm/mach-exynos4/platsmp.c b/arch/arm/mach-exynos/platsmp.c
similarity index 100%
rename from arch/arm/mach-exynos4/platsmp.c
rename to arch/arm/mach-exynos/platsmp.c
diff --git a/arch/arm/mach-exynos4/pm.c b/arch/arm/mach-exynos/pm.c
similarity index 100%
rename from arch/arm/mach-exynos4/pm.c
rename to arch/arm/mach-exynos/pm.c
diff --git a/arch/arm/mach-exynos4/pmu.c b/arch/arm/mach-exynos/pmu.c
similarity index 100%
rename from arch/arm/mach-exynos4/pmu.c
rename to arch/arm/mach-exynos/pmu.c
diff --git a/arch/arm/mach-exynos4/setup-fimc.c b/arch/arm/mach-exynos/setup-fimc.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-fimc.c
rename to arch/arm/mach-exynos/setup-fimc.c
diff --git a/arch/arm/mach-exynos4/setup-fimd0.c b/arch/arm/mach-exynos/setup-fimd0.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-fimd0.c
rename to arch/arm/mach-exynos/setup-fimd0.c
diff --git a/arch/arm/mach-exynos4/setup-i2c0.c b/arch/arm/mach-exynos/setup-i2c0.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-i2c0.c
rename to arch/arm/mach-exynos/setup-i2c0.c
diff --git a/arch/arm/mach-exynos4/setup-i2c1.c b/arch/arm/mach-exynos/setup-i2c1.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-i2c1.c
rename to arch/arm/mach-exynos/setup-i2c1.c
diff --git a/arch/arm/mach-exynos4/setup-i2c2.c b/arch/arm/mach-exynos/setup-i2c2.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-i2c2.c
rename to arch/arm/mach-exynos/setup-i2c2.c
diff --git a/arch/arm/mach-exynos4/setup-i2c3.c b/arch/arm/mach-exynos/setup-i2c3.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-i2c3.c
rename to arch/arm/mach-exynos/setup-i2c3.c
diff --git a/arch/arm/mach-exynos4/setup-i2c4.c b/arch/arm/mach-exynos/setup-i2c4.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-i2c4.c
rename to arch/arm/mach-exynos/setup-i2c4.c
diff --git a/arch/arm/mach-exynos4/setup-i2c5.c b/arch/arm/mach-exynos/setup-i2c5.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-i2c5.c
rename to arch/arm/mach-exynos/setup-i2c5.c
diff --git a/arch/arm/mach-exynos4/setup-i2c6.c b/arch/arm/mach-exynos/setup-i2c6.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-i2c6.c
rename to arch/arm/mach-exynos/setup-i2c6.c
diff --git a/arch/arm/mach-exynos4/setup-i2c7.c b/arch/arm/mach-exynos/setup-i2c7.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-i2c7.c
rename to arch/arm/mach-exynos/setup-i2c7.c
diff --git a/arch/arm/mach-exynos4/setup-keypad.c b/arch/arm/mach-exynos/setup-keypad.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-keypad.c
rename to arch/arm/mach-exynos/setup-keypad.c
diff --git a/arch/arm/mach-exynos4/setup-sdhci-gpio.c b/arch/arm/mach-exynos/setup-sdhci-gpio.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-sdhci-gpio.c
rename to arch/arm/mach-exynos/setup-sdhci-gpio.c
diff --git a/arch/arm/mach-exynos4/setup-sdhci.c b/arch/arm/mach-exynos/setup-sdhci.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-sdhci.c
rename to arch/arm/mach-exynos/setup-sdhci.c
diff --git a/arch/arm/mach-exynos4/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c
similarity index 100%
rename from arch/arm/mach-exynos4/setup-usb-phy.c
rename to arch/arm/mach-exynos/setup-usb-phy.c
diff --git a/arch/arm/mach-exynos4/sleep.S b/arch/arm/mach-exynos/sleep.S
similarity index 100%
rename from arch/arm/mach-exynos4/sleep.S
rename to arch/arm/mach-exynos/sleep.S
diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig
index f9241a7..4e98f09 100644
--- a/arch/arm/plat-s5p/Kconfig
+++ b/arch/arm/plat-s5p/Kconfig
@@ -7,7 +7,7 @@
 
 config PLAT_S5P
 	bool
-	depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS4)
+	depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS)
 	default y
 	select ARM_VIC if !ARCH_EXYNOS4
 	select ARM_GIC if ARCH_EXYNOS4
diff --git a/arch/arm/plat-s5p/cpu.c b/arch/arm/plat-s5p/cpu.c
index 7b0a28f..a56959e 100644
--- a/arch/arm/plat-s5p/cpu.c
+++ b/arch/arm/plat-s5p/cpu.c
@@ -75,7 +75,7 @@ static struct cpu_table cpu_ids[] __initdata = {
 		.map_io		= exynos4_map_io,
 		.init_clocks	= exynos4_init_clocks,
 		.init_uarts	= exynos4_init_uarts,
-		.init		= exynos4_init,
+		.init		= exynos_init,
 		.name		= name_exynos4210,
 	}, {
 		.idcode		= EXYNOS4212_CPU_ID,
@@ -83,7 +83,7 @@ static struct cpu_table cpu_ids[] __initdata = {
 		.map_io		= exynos4_map_io,
 		.init_clocks	= exynos4_init_clocks,
 		.init_uarts	= exynos4_init_uarts,
-		.init		= exynos4_init,
+		.init		= exynos_init,
 		.name		= name_exynos4212,
 	}, {
 		.idcode		= EXYNOS4412_CPU_ID,
@@ -91,7 +91,7 @@ static struct cpu_table cpu_ids[] __initdata = {
 		.map_io		= exynos4_map_io,
 		.init_clocks	= exynos4_init_clocks,
 		.init_uarts	= exynos4_init_uarts,
-		.init		= exynos4_init,
+		.init		= exynos_init,
 		.name		= name_exynos4412,
 	},
 };
diff --git a/arch/arm/plat-samsung/include/plat/exynos4.h b/arch/arm/plat-samsung/include/plat/exynos4.h
index 20d73bf..f546e88 100644
--- a/arch/arm/plat-samsung/include/plat/exynos4.h
+++ b/arch/arm/plat-samsung/include/plat/exynos4.h
@@ -18,8 +18,8 @@ extern void exynos4210_register_clocks(void);
 extern void exynos4212_register_clocks(void);
 extern void exynos4_setup_clocks(void);
 
-#ifdef CONFIG_ARCH_EXYNOS4
-extern  int exynos4_init(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);
@@ -31,5 +31,5 @@ extern struct sys_timer exynos4_timer;
 #define exynos4_init_clocks NULL
 #define exynos4_init_uarts NULL
 #define exynos4_map_io NULL
-#define exynos4_init NULL
+#define exynos_init NULL
 #endif
-- 
1.7.1

^ permalink raw reply related

* [GIT PULL] Samsung devel-2 for v3.2
From: Kukjin Kim @ 2011-10-02  9:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd,

This is Samsung devel for v3.2. which includes consolidation work for dma-pl330 and gpio-samsung.

Please pull from:
  git://github.com/kgene/linux-samsung.git next-samsung-devel-2

And the next-samsung-devel-2 is based on v3.1-rc8 plus next-samsung-cleanup and next-samsung-board which have been sent to arm-soc
because it has many dependencies with them so if they are missed, many conflicts will be happened. As a note, I have merged Vinod's
samsung_dma tree for dma-pl330 samsung stuff from:
  git://git.infradead.org/users/vkoul/slave-dma into next/topic-dma-samsung

If any problems, please let me know.

As a note, other next-samsung-board-2, next-samsung-soc and next-samsung-devel-3 will be sent to soon :)

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

The following changes since commit bb40413ae24e3cc32bb8e949cd330a865c85e151:

  Merge branch 'next-samsung-board' into next-samsung-devel-2 (2011-09-28 21:50:01 +0900)

are available in the git repository at:

  git://github.com/kgene/linux-samsung.git next-samsung-devel-2

Ajay Kumar (5):
      ARM: S5P64X0: Add register base and IRQ for Framebuffer
      ARM: S5P64X0: Set s3c_device_fb name
      ARM: S5P64X0: Add GPIO setup for LCD
      ARM: S5P6440: Add LCD-LTE480 and enable Framebuffer support
      ARM: S5P6450: Add LCD-LTE480 and enable Framebuffer support

Alim Akhtar (3):
      ARM: EXYNOS4: register the second instance of pl330 DMAC
      ARM: S5PV210: register the second instance of pl330 DMAC
      ARM: S5PC100: register the second instance of pl330 DMAC

Boojin Kim (17):
      ARM: S5P64X0: Add the devname for DMA clock
      DMA: PL330: Add support runtime PM for PL330 DMAC
      DMA: PL330: Update PL330 DMA API driver
      DMA: PL330: Support DMA_SLAVE_CONFIG command
      DMA: PL330: Remove the start operation for handling DMA_TERMINATE_ALL command
      DMA: PL330: Add DMA_CYCLIC capability
      ARM: SAMSUNG: Update to use PL330-DMA driver
      ARM: SAMSUNG: Add common DMA operations
      ARM: EXYNOS4: Use generic DMA PL330 driver
      ARM: S5PV210: Use generic DMA PL330 driver
      ARM: S5PC100: Use generic DMA PL330 driver
      ARM: S5P64X0: Use generic DMA PL330 driver
      ARM: SAMSUNG: Remove S3C-PL330-DMA driver
      spi/s3c64xx: Add support DMA engine API
      spi/s3c64xx: Merge dma control code
      ASoC: Samsung: Update DMA interface
      ARM: SAMSUNG: Remove Samsung specific enum type for dma direction

Chanwoo Choi (1):
      ARM: EXYNOS4: Update config file of NURI to enable RTC

Giridhar Maruthy (1):
      ARM: EXYNOS4: Add PWM backlight support on ORIGEN

Guennadi Liakhovetski (1):
      dmatest: make dmatest threads freezable

Hatim Ali (1):
      ARM: EXYNOS4: Add TVOUT support for SMDKV310

Heiko Stuebner (4):
      ARM: S3C2443: Move i2s clock definitions to common code
      ARM: S3C2443: Define constant for HSSPI pclk
      ARM: S3C2416: Add HSSPI clock sourced from EPLL
      ARM: S3C2443: Add hsspi-clock from pclk and rename S3C2443 hsspi sclk

JeongHyeon Kim (1):
      ARM: EXYNOS4: Add support for ORIGEN board

Jingoo Han (1):
      ARM: EXYNOS4: Add usb ehci device to the SMDKV310

Jongpill Lee (3):
      ARM: EXYNOS4: Modify PMU register setting function
      ARM: EXYNOS4: Add PMU register definition for EXYNOS4212
      ARM: EXYNOS4: Support suspend/resume for EXYNOS4212

Kukjin Kim (18):
      Merge branch 'samsung_dma' of git://git.infradead.org/users/vkoul/slave-dma into next/topic-dma-samsung
      Merge branch 'next/topic-dma-pl330-devname-fix' into next/topic-dma-samsung
      gpio/s3c24xx: move gpio driver into drivers/gpio/
      gpio/s3c64xx: move gpio driver into drivers/gpio/
      gpio/s5p64x0: move gpio driver into drivers/gpio/
      gpio/samsung: gpio-samsung.c to support Samsung GPIOs
      ARM: SAMSUNG: Update the name of regarding Samsung GPIO
      ARM: SAMSUNG: Remove useless Samsung GPIO related CONFIGs
      Merge branch 'next/topic-plat-samsung-1' into next/topic-gpio-samsung
      Merge branch 'next/topic-s3c64xx-devel' into next-samsung-devel
      Merge branch 'next/topic-exynos4-devel' into next-samsung-devel
      Merge branch 'next/topic-dma-samsung' into next-samsung-devel
      Merge branch 'next/topic-gpio-samsung' into next-samsung-devel
      Merge branch 'next-samsung-devel' into next-samsung-devel-2
      ARM: SAMSUNG: Cleanup mach/clkdev.h
      ARM: SAMSUNG: Consolidate plat/pwm-clock.h
      ARM: SAMSUNG: Consolidate plat/pll.h
      Merge branch 'next-samsung-cleanup-2' into next-samsung-devel-2

Lothar Wa??mann (1):
      mxs-dma: enable CLKGATE before accessing registers

Marek Szyprowski (5):
      ARM: EXYNOS4: enable frame buffer on Universal C210 board
      ARM: EXYNOS4: enable frame buffer on Nuri board
      gpio/samsung: fix broken configuration for EXYNOS4 GPIO banks
      gpio/samsung: fix GPIO interrupt registration for EXYNOS4 SoCs
      gpio/samsung: correct pin configuration for S5PC100/S5PC110/EXYNOS4

Mark Brown (7):
      ARM: S3C64XX: Hook up GPIO initiated DVS on Cragganmore
      ARM: S3C64XX: Use module identification for Cragganmore system builds
      ARM: S3C64XX: Hook up some additional supplies on Cragganmore
      ARM: S3C64XX: Add devices for Kilchoman audio module on Cragganmore
      ARM: S3C64XX: Register Lowland audio device on Cragganmore
      ARM: S3C64xx: Add LDOVDD supply for CODEC on Cragganmore
      ASoC: Flush Samsung DMA on free

Nicolas Ferre (4):
      dmaengine: at_hdmac: replace spin_lock* with irqsave variants
      dmaengine: at_hdmac: improve power management routines
      dmaengine: at_hdmac: add wrappers for testing channel state
      dmaengine: at_hdmac: fix way to specify cyclic capability

Per Forlin (4):
      dmaengine/ste_dma40: add missing kernel doc for pending_queue
      dmaengine/ste_dma40: remove duplicate call to d40_pool_lli_free().
      dmaengine/ste_dma40: fix Oops due to double free of client descriptor
      dmaengine/ste_dma40: fix memory leak due to prepared descriptors

Russell King - ARM Linux (1):
      dmaengine: amba-pl08x: make filter check that the channel is owned by pl08x

Sachin Kamat (7):
      ARM: EXYNOS4: Add USB EHCI device to ORIGEN board
      ARM: EXYNOS4: Add FIMC device on ORIGEN board
      ARM: EXYNOS4: Add keypad support for ORIGEN
      ARM: EXYNOS4: Add HDMI support for ORIGEN
      ARM: EXYNOS4: Enable MFC on Samsung SMDKV310
      ARM: EXYNOS4: Add header file protection macros
      ARM: EXYNOS4: Add FIMC device on SMDKV310 board

Sascha Hauer (3):
      dmaengine i.MX SDMA: lock channel 0
      dmaengine i.MX SDMA: set firmware scripts addresses to negative value initially
      dmaengine i.MX SDMA: use request_firmware_nowait

Sylwester Nawrocki (2):
      ARM: S5PV210: Add support for NOON010PC30 sensor on GONI board
      ARM: S5PV210: UNIVERSAL_C210: Add support for M-5MOLS image sensor

Tomasz Figa (4):
      ARM: S3C64XX: Use S3C64XX_SDMA_SEL register name instead of numeric address
      ARM: S3C64XX: Save/restore S3C64XX_SDMA_SEL on suspend/resume
      ARM: S3C64XX: Save/restore S3C64XX_MODEM_MIFPCON on suspend/resume
      ARM: S3C64XX: Add support for synchronous clock operation

Tomasz Stanislawski (4):
      ARM: SAMSUNG: add i2c hdmiphy controller definitions
      ARM: S5P: add support for tv device
      ARM: EXYNOS4: enable TV support on Universal_C210 board
      ARM: S5PV210: enable TV support on GONI board

Tushar Behera (2):
      ARM: EXYNOS4: Fix sdhci card detection for ORIGEN
      ARM: EXYNOS4: Add support for secondary MMC port on ORIGEN

Vinod Koul (3):
      dmaengine: add helper function for slave_single
      dmaengine: remove struct scatterlist for header
      Merge branch 'next' into v3.1-rc4

Viresh Kumar (19):
      dmaengine/dmatest: Terminate transfers on all channels in case of error or exit
      ARM: asm/pl080.h: Protect against multiple inclusion of header file
      dmaengine/amba-pl08x: Resolve formatting issues
      dmaengine/amba-pl08x: Rearrange inclusion of header files in ascending order
      dmaengine/amba-pl08x: pass (*ptr) to sizeof() instead of (struct xyz)
      dmaengine/amba-pl08x: Complete doc comment for struct pl08x_txd
      dmaengine/amba-pl08x: Remove redundant comment and rewrite original
      dmaengine/amba-pl08x: Changing few prints to dev_dbg from dev_info
      dmaengine/amba-pl08x: support runtime PM
      dmaengine/amba-pl08x: Simplify pl08x_ensure_on()
      dmaengine/amba-pl08x: No need to check "ch->signal < 0"
      dmaengine/amba-pl08x: Schedule tasklet in case of error interrupt
      dmaengine/amba-pl08x: Get rid of pl08x_pre_boundary()
      dmaengine/amba-pl08x: max_bytes_per_lli is TRANSFER_SIZE * src_width (not MIN(width))
      dmaengine/amba-pl08x: Add prep_single_byte_llis() routine
      dmaengine/amba-pl08x: Align lli_len to max(src.width, dst.width)
      dmaengine/amba-pl08x: Choose peripheral bus as master bus
      dmaengine/amba-pl08x: Pass flow controller information with slave channel data
      dmaengine/amba-pl08x: Call pl08x_free_txd() instead of calling kfree() directly

Vladimir Zapolskiy (3):
      ARM: EXYNOS4: use dma-pl330 device name for clock
      ARM: S5PC100: use dma-pl330 device name for clock
      ARM: S5PV210: use dma-pl330 device name for clock

 arch/arm/Kconfig                                   |    3 -
 arch/arm/include/asm/hardware/pl080.h              |    4 +
 arch/arm/mach-exynos4/Kconfig                      |   34 +-
 arch/arm/mach-exynos4/clock.c                      |  220 ++-
 arch/arm/mach-exynos4/cpu.c                        |    2 +
 arch/arm/mach-exynos4/dma.c                        |  300 ++-
 arch/arm/mach-exynos4/include/mach/clkdev.h        |    7 -
 arch/arm/mach-exynos4/include/mach/dma.h           |    4 +-
 arch/arm/mach-exynos4/include/mach/i2c-hdmiphy.h   |   16 +
 arch/arm/mach-exynos4/include/mach/irqs.h          |    4 +
 arch/arm/mach-exynos4/include/mach/map.h           |   12 +
 arch/arm/mach-exynos4/include/mach/pm-core.h       |    8 +-
 arch/arm/mach-exynos4/include/mach/pmu.h           |    7 +
 arch/arm/mach-exynos4/include/mach/regs-pmu.h      |   74 +-
 arch/arm/mach-exynos4/mach-nuri.c                  |   34 +
 arch/arm/mach-exynos4/mach-origen.c                |  115 +-
 arch/arm/mach-exynos4/mach-smdkv310.c              |   49 +
 arch/arm/mach-exynos4/mach-universal_c210.c        |  312 +++-
 arch/arm/mach-exynos4/pm.c                         |    7 +
 arch/arm/mach-exynos4/pmu.c                        |  353 ++--
 arch/arm/mach-s3c2410/Kconfig                      |    1 -
 arch/arm/mach-s3c2410/include/mach/dma.h           |   20 +-
 arch/arm/mach-s3c2410/include/mach/gpio-fns.h      |   99 +-
 arch/arm/mach-s3c2410/include/mach/gpio-track.h    |    6 +-
 arch/arm/mach-s3c2410/include/mach/pm-core.h       |    2 +-
 .../mach-s3c2410/include/mach/regs-s3c2443-clock.h |    1 +
 arch/arm/mach-s3c2410/mach-h1940.c                 |    6 +-
 arch/arm/mach-s3c2410/s3c2410.c                    |    4 +-
 arch/arm/mach-s3c2412/dma.c                        |    4 +-
 arch/arm/mach-s3c2416/Kconfig                      |    1 -
 arch/arm/mach-s3c2416/clock.c                      |   29 +-
 arch/arm/mach-s3c2416/s3c2416.c                    |    4 +-
 arch/arm/mach-s3c2440/Kconfig                      |    2 -
 arch/arm/mach-s3c2440/s3c2440.c                    |    4 +-
 arch/arm/mach-s3c2440/s3c2442.c                    |    4 +-
 arch/arm/mach-s3c2443/Kconfig                      |    1 -
 arch/arm/mach-s3c2443/clock.c                      |   55 +-
 arch/arm/mach-s3c2443/s3c2443.c                    |    4 +-
 arch/arm/mach-s3c64xx/Kconfig                      |    1 +
 arch/arm/mach-s3c64xx/Makefile                     |    3 +-
 arch/arm/mach-s3c64xx/clock.c                      |   13 +-
 arch/arm/mach-s3c64xx/dma.c                        |   12 +-
 arch/arm/mach-s3c64xx/gpiolib.c                    |  290 ---
 arch/arm/mach-s3c64xx/include/mach/clkdev.h        |    7 -
 arch/arm/mach-s3c64xx/include/mach/crag6410.h      |   23 +
 arch/arm/mach-s3c64xx/include/mach/dma.h           |    8 +-
 arch/arm/mach-s3c64xx/include/mach/pll.h           |   45 -
 arch/arm/mach-s3c64xx/include/mach/pm-core.h       |    2 +-
 arch/arm/mach-s3c64xx/include/mach/pwm-clock.h     |   56 -
 arch/arm/mach-s3c64xx/include/mach/regs-sys.h      |    3 +
 arch/arm/mach-s3c64xx/mach-crag6410-module.c       |  182 ++
 arch/arm/mach-s3c64xx/mach-crag6410.c              |  106 +-
 arch/arm/mach-s3c64xx/pm.c                         |    4 +
 arch/arm/mach-s5p64x0/Kconfig                      |   14 +-
 arch/arm/mach-s5p64x0/Makefile                     |    3 +-
 arch/arm/mach-s5p64x0/clock-s5p6440.c              |   10 +-
 arch/arm/mach-s5p64x0/clock-s5p6450.c              |   10 +-
 arch/arm/mach-s5p64x0/cpu.c                        |    3 +
 arch/arm/mach-s5p64x0/dma.c                        |  269 ++-
 arch/arm/mach-s5p64x0/gpiolib.c                    |  508 ----
 arch/arm/mach-s5p64x0/include/mach/clkdev.h        |    7 -
 arch/arm/mach-s5p64x0/include/mach/dma.h           |    4 +-
 arch/arm/mach-s5p64x0/include/mach/irqs.h          |    4 +
 arch/arm/mach-s5p64x0/include/mach/map.h           |    3 +
 arch/arm/mach-s5p64x0/include/mach/pwm-clock.h     |   68 -
 arch/arm/mach-s5p64x0/include/mach/regs-gpio.h     |    4 +
 arch/arm/mach-s5p64x0/mach-smdk6440.c              |   74 +
 arch/arm/mach-s5p64x0/mach-smdk6450.c              |   75 +
 arch/arm/mach-s5p64x0/setup-fb-24bpp.c             |   29 +
 arch/arm/mach-s5pc100/Kconfig                      |    2 +-
 arch/arm/mach-s5pc100/clock.c                      |   15 +-
 arch/arm/mach-s5pc100/dma.c                        |  324 ++-
 arch/arm/mach-s5pc100/include/mach/clkdev.h        |    7 -
 arch/arm/mach-s5pc100/include/mach/dma.h           |    4 +-
 arch/arm/mach-s5pc100/include/mach/pwm-clock.h     |   56 -
 arch/arm/mach-s5pv210/Kconfig                      |    4 +-
 arch/arm/mach-s5pv210/clock.c                      |  151 +-
 arch/arm/mach-s5pv210/cpu.c                        |    4 +
 arch/arm/mach-s5pv210/dma.c                        |  317 ++-
 arch/arm/mach-s5pv210/include/mach/clkdev.h        |    7 -
 arch/arm/mach-s5pv210/include/mach/dma.h           |    4 +-
 arch/arm/mach-s5pv210/include/mach/i2c-hdmiphy.h   |   16 +
 arch/arm/mach-s5pv210/include/mach/irqs.h          |    4 +-
 arch/arm/mach-s5pv210/include/mach/map.h           |   13 +
 arch/arm/mach-s5pv210/include/mach/pm-core.h       |    2 +-
 arch/arm/mach-s5pv210/include/mach/pwm-clock.h     |   70 -
 arch/arm/mach-s5pv210/include/mach/regs-clock.h    |    3 +-
 arch/arm/mach-s5pv210/mach-goni.c                  |   62 +
 arch/arm/plat-s3c24xx/Kconfig                      |    1 -
 arch/arm/plat-s3c24xx/Makefile                     |    2 -
 arch/arm/plat-s3c24xx/dma.c                        |   10 +-
 arch/arm/plat-s3c24xx/gpio.c                       |   96 -
 arch/arm/plat-s3c24xx/gpiolib.c                    |  229 --
 arch/arm/plat-s3c24xx/include/mach/clkdev.h        |    7 -
 arch/arm/plat-s3c24xx/include/mach/pwm-clock.h     |   55 -
 arch/arm/plat-s3c24xx/include/plat/pll.h           |   62 -
 arch/arm/plat-s3c24xx/s3c2443-clock.c              |   57 +
 arch/arm/plat-s5p/Kconfig                          |   13 +-
 arch/arm/plat-s5p/Makefile                         |    2 +
 arch/arm/plat-s5p/dev-i2c-hdmiphy.c                |   59 +
 arch/arm/plat-s5p/dev-tv.c                         |   98 +
 arch/arm/plat-s5p/include/plat/pll.h               |  203 --
 arch/arm/plat-s5p/irq-gpioint.c                    |   10 +-
 arch/arm/plat-samsung/Kconfig                      |   36 +-
 arch/arm/plat-samsung/Makefile                     |    6 +-
 arch/arm/plat-samsung/dma-ops.c                    |  131 +
 arch/arm/plat-samsung/gpio-config.c                |  431 ----
 arch/arm/plat-samsung/gpio.c                       |  167 --
 arch/arm/plat-samsung/include/plat/devs.h          |    6 +
 arch/arm/plat-samsung/include/plat/dma-ops.h       |   63 +
 .../include/plat/{s3c-dma-pl330.h => dma-pl330.h}  |   24 +-
 arch/arm/plat-samsung/include/plat/dma-s3c24xx.h   |    2 +-
 arch/arm/plat-samsung/include/plat/dma.h           |   10 +-
 arch/arm/plat-samsung/include/plat/fb.h            |    7 +
 .../plat-samsung/include/plat/gpio-cfg-helpers.h   |  172 +-
 arch/arm/plat-samsung/include/plat/gpio-cfg.h      |   34 +-
 arch/arm/plat-samsung/include/plat/gpio-core.h     |   97 +-
 arch/arm/plat-samsung/include/plat/gpio-fns.h      |   98 +
 arch/arm/plat-samsung/include/plat/iic.h           |    1 +
 arch/arm/plat-samsung/include/plat/pll.h           |  323 +++
 arch/arm/plat-samsung/include/plat/pll6553x.h      |   51 -
 arch/arm/plat-samsung/include/plat/pm.h            |   10 +-
 .../mach => plat-samsung/include/plat}/pwm-clock.h |   39 +-
 .../plat-samsung/include/plat/s3c-pl330-pdata.h    |   32 -
 arch/arm/plat-samsung/include/plat/tv-core.h       |   44 +
 arch/arm/plat-samsung/pm-gpio.c                    |   72 +-
 arch/arm/plat-samsung/pm.c                         |    6 +-
 arch/arm/plat-samsung/pwm-clock.c                  |   13 +-
 arch/arm/plat-samsung/s3c-dma-ops.c                |  130 +
 arch/arm/plat-samsung/s3c-pl330.c                  | 1244 ---------
 drivers/dma/Kconfig                                |    3 +-
 drivers/dma/amba-pl08x.c                           |  455 ++--
 drivers/dma/at_hdmac.c                             |  159 +-
 drivers/dma/at_hdmac_regs.h                        |   24 +
 drivers/dma/dmatest.c                              |   23 +-
 drivers/dma/imx-sdma.c                             |   47 +-
 drivers/dma/mxs-dma.c                              |   45 +-
 drivers/dma/pl330.c                                |  229 ++-
 drivers/gpio/Kconfig                               |   16 -
 drivers/gpio/Makefile                              |    7 +-
 drivers/gpio/gpio-exynos4.c                        |  385 ---
 drivers/gpio/gpio-plat-samsung.c                   |  205 --
 drivers/gpio/gpio-s5pc100.c                        |  354 ---
 drivers/gpio/gpio-s5pv210.c                        |  287 ---
 drivers/gpio/gpio-samsung.c                        | 2688 ++++++++++++++++++++
 drivers/mmc/host/s3cmci.c                          |    6 +-
 drivers/spi/spi-s3c64xx.c                          |  175 +-
 include/linux/amba/pl08x.h                         |   14 +-
 include/linux/amba/pl330.h                         |    6 +-
 include/linux/dmaengine.h                          |   13 +-
 sound/soc/samsung/ac97.c                           |   10 +-
 sound/soc/samsung/dma.c                            |  148 +-
 sound/soc/samsung/dma.h                            |    4 +-
 153 files changed, 7418 insertions(+), 6755 deletions(-)
 delete mode 100644 arch/arm/mach-exynos4/include/mach/clkdev.h
 create mode 100644 arch/arm/mach-exynos4/include/mach/i2c-hdmiphy.h
 delete mode 100644 arch/arm/mach-s3c64xx/gpiolib.c
 delete mode 100644 arch/arm/mach-s3c64xx/include/mach/clkdev.h
 create mode 100644 arch/arm/mach-s3c64xx/include/mach/crag6410.h
 delete mode 100644 arch/arm/mach-s3c64xx/include/mach/pll.h
 delete mode 100644 arch/arm/mach-s3c64xx/include/mach/pwm-clock.h
 create mode 100644 arch/arm/mach-s3c64xx/mach-crag6410-module.c
 delete mode 100644 arch/arm/mach-s5p64x0/gpiolib.c
 delete mode 100644 arch/arm/mach-s5p64x0/include/mach/clkdev.h
 delete mode 100644 arch/arm/mach-s5p64x0/include/mach/pwm-clock.h
 create mode 100644 arch/arm/mach-s5p64x0/setup-fb-24bpp.c
 delete mode 100644 arch/arm/mach-s5pc100/include/mach/clkdev.h
 delete mode 100644 arch/arm/mach-s5pc100/include/mach/pwm-clock.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/clkdev.h
 create mode 100644 arch/arm/mach-s5pv210/include/mach/i2c-hdmiphy.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/pwm-clock.h
 delete mode 100644 arch/arm/plat-s3c24xx/gpio.c
 delete mode 100644 arch/arm/plat-s3c24xx/gpiolib.c
 delete mode 100644 arch/arm/plat-s3c24xx/include/mach/clkdev.h
 delete mode 100644 arch/arm/plat-s3c24xx/include/mach/pwm-clock.h
 delete mode 100644 arch/arm/plat-s3c24xx/include/plat/pll.h
 create mode 100644 arch/arm/plat-s5p/dev-i2c-hdmiphy.c
 create mode 100644 arch/arm/plat-s5p/dev-tv.c
 delete mode 100644 arch/arm/plat-s5p/include/plat/pll.h
 create mode 100644 arch/arm/plat-samsung/dma-ops.c
 delete mode 100644 arch/arm/plat-samsung/gpio-config.c
 delete mode 100644 arch/arm/plat-samsung/gpio.c
 create mode 100644 arch/arm/plat-samsung/include/plat/dma-ops.h
 rename arch/arm/plat-samsung/include/plat/{s3c-dma-pl330.h => dma-pl330.h} (84%)
 create mode 100644 arch/arm/plat-samsung/include/plat/gpio-fns.h
 create mode 100644 arch/arm/plat-samsung/include/plat/pll.h
 delete mode 100644 arch/arm/plat-samsung/include/plat/pll6553x.h
 rename arch/arm/{mach-exynos4/include/mach => plat-samsung/include/plat}/pwm-clock.h (68%)
 delete mode 100644 arch/arm/plat-samsung/include/plat/s3c-pl330-pdata.h
 create mode 100644 arch/arm/plat-samsung/include/plat/tv-core.h
 create mode 100644 arch/arm/plat-samsung/s3c-dma-ops.c
 delete mode 100644 arch/arm/plat-samsung/s3c-pl330.c
 delete mode 100644 drivers/gpio/gpio-exynos4.c
 delete mode 100644 drivers/gpio/gpio-plat-samsung.c
 delete mode 100644 drivers/gpio/gpio-s5pc100.c
 delete mode 100644 drivers/gpio/gpio-s5pv210.c
 create mode 100644 drivers/gpio/gpio-samsung.c

^ permalink raw reply

* [PATCH 2/2] ARM: SAMSUNG: Cleanup resources by using macro
From: Russell King - ARM Linux @ 2011-10-02 11:07 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <001e01cc80e5$1c9eb150$55dc13f0$%kim@samsung.com>

On Sun, Oct 02, 2011 at 06:24:40PM +0900, Kukjin Kim wrote:
> This patch adds macro SAMSUNG_RES_MEM and SAMSUNG_RES_IRQ to cleanup
> regarding 'struct resource'

Why not include the braces inside the macro as well?

> diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h
> index 8f19241..8b8bd1c 100644
> --- a/arch/arm/plat-samsung/include/plat/devs.h
> +++ b/arch/arm/plat-samsung/include/plat/devs.h
> @@ -18,6 +18,16 @@
>  
>  #include <linux/platform_device.h>
>  
> +#define SAMSUNG_RES_MEM(soc, ip, sz)			\
> +		.start	= soc##_PA_##ip,		\
> +		.end	= soc##_PA_##ip + sz - 1,	\
> +		.flags	= IORESOURCE_MEM,
> +
> +#define SAMSUNG_RES_IRQ(ip)				\
> +		.start	= IRQ_##ip,			\
> +		.end	= IRQ_##ip,			\
> +		.flags	= IORESOURCE_IRQ,
> +

How about using DEFINE_RES_MEM and DEFINE_RES_IRQ here?

#define SAMSUNG_RES_MEM(soc, ip, sz) DEFINE_RES_MEM(soc##_PA_##ip, sz)
#define SAMSUNG_RES_IRQ(ip) DEFINE_RES_IRQ(IRQ_##ip)

^ permalink raw reply

* [PATCH 2/7] s3c-adc: describe features via quirk constants
From: Heiko Stübner @ 2011-10-02 11:18 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <001a01cc80d6$40bf7e70$c23e7b50$%kim@samsung.com>

Hi Kgene,

Am Sonntag 02 Oktober 2011, 09:38:18 schrieb Kukjin Kim:
> How about following? I think following is also not bad...
ok, I don't claim to have the right solution, so if keeping the TYPE_xxx enum 
is better, I will do a rework of the series according to your solution and 
resend it.

Could I meanwhile interest you in the patches for the S3C2416 armclk and hsmmc  
(from 28 Sep 2011) :-) ?

Thanks
Heiko


> diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
> index ee8deef..f5c6703 100644
> --- a/arch/arm/plat-samsung/adc.c
> +++ b/arch/arm/plat-samsung/adc.c
> @@ -41,6 +41,8 @@
> 
>  enum s3c_cpu_type {
>  	TYPE_ADCV1, /* S3C24XX */
> +	TYPE_ADCV11, /* S3C2416 */
> +	TYPE_ADCV12, /* S3C2443 */
>  	TYPE_ADCV2, /* S3C64XX, S5P64X0, S5PC100 */
>  	TYPE_ADCV3, /* S5PV210, S5PC110, EXYNOS4210 */
>  };
> @@ -98,13 +100,17 @@ static inline void s3c_adc_select(struct adc_device
> *adc,
> 
>  	client->select_cb(client, 1);
> 
> -	con &= ~S3C2410_ADCCON_MUXMASK;
> +	if (cpu == TYPE_ADCV1 || cpu == TYPE_ADCV2)
> +		con &= ~S3C2410_ADCCON_MUXMASK;
>  	con &= ~S3C2410_ADCCON_STDBM;
>  	con &= ~S3C2410_ADCCON_STARTMASK;
> 
>  	if (!client->is_ts) {
>  		if (cpu == TYPE_ADCV3)
>  			writel(client->channel & 0xf, adc->regs +
> S5P_ADCMUX);
> +		elif (cpu == TYPE_ADCV12)
> +			writel(client->channel & 0xf,
> +				adc->regs + S3C2443_ADCMUX);
>  		else
>  			con |= S3C2410_ADCCON_SELMUX(client->channel);
>  	}
> @@ -293,13 +299,13 @@ static irqreturn_t s3c_adc_irq(int irq, void *pw)
> 
>  	client->nr_samples--;
> 
> -	if (cpu != TYPE_ADCV1) {
> -		/* S3C64XX/S5P ADC resolution is 12-bit */
> -		data0 &= 0xfff;
> -		data1 &= 0xfff;
> -	} else {
> +	if (cpu == TYPE_ADCV1 || cpu == TYPE_ADCV12) {
>  		data0 &= 0x3ff;
>  		data1 &= 0x3ff;
> +	} else {
> +		/* S3C2416, S3C64XX/S5P ADC resolution is 12-bit */
> +		data0 &= 0xfff;
> +		data1 &= 0xfff;
>  	}
> 
>  	if (client->convert_cb)
> @@ -320,7 +326,7 @@ static irqreturn_t s3c_adc_irq(int irq, void *pw)
>  	}
> 
>  exit:
> -	if (cpu != TYPE_ADCV1) {
> +	if (cpu == TYPE_ADCV2 || cpu == TYPE_ADCV3) {
>  		/* Clear ADC interrupt */
>  		writel(0, adc->regs + S3C64XX_ADCCLRINT);
>  	}
> @@ -332,6 +338,7 @@ static int s3c_adc_probe(struct platform_device *pdev)
>  	struct device *dev = &pdev->dev;
>  	struct adc_device *adc;
>  	struct resource *regs;
> +	enum s3c_cpu_type cpu = platform_get_device_id(pdev)->driver_data;
>  	int ret;
>  	unsigned tmp;
> 
> @@ -394,10 +401,13 @@ static int s3c_adc_probe(struct platform_device
> *pdev) clk_enable(adc->clk);
> 
>  	tmp = adc->prescale | S3C2410_ADCCON_PRSCEN;
> -	if (platform_get_device_id(pdev)->driver_data != TYPE_ADCV1) {
> -		/* Enable 12-bit ADC resolution */
> +
> +	/* Enable 12-bit ADC resolution */
> +	if (cpu == TYPE_ADCV11)
> +		tmp |= S3C2416_ADCCON_RESSEL;
> +	if (cpu == TYPE_ADCV2 || cpu == TYPE_ADCV3)
>  		tmp |= S3C64XX_ADCCON_RESSEL;
> -	}
> +
>  	writel(tmp, adc->regs + S3C2410_ADCCON);
> 
>  	dev_info(dev, "attached adc driver\n");
> @@ -464,6 +474,7 @@ static int s3c_adc_resume(struct device *dev)
>  	struct platform_device *pdev = container_of(dev,
>  			struct platform_device, dev);
>  	struct adc_device *adc = platform_get_drvdata(pdev);
> +	enum s3c_cpu_type cpu = platform_get_device_id(pdev)->driver_data;
>  	int ret;
>  	unsigned long tmp;
> 
> @@ -474,9 +485,13 @@ static int s3c_adc_resume(struct device *dev)
>  	enable_irq(adc->irq);
> 
>  	tmp = adc->prescale | S3C2410_ADCCON_PRSCEN;
> +
>  	/* Enable 12-bit ADC resolution */
> -	if (platform_get_device_id(pdev)->driver_data != TYPE_ADCV1)
> +	if (cpu == TYPE_ADCV11)
> +		tmp |= S3C2416_ADCCON_RESSEL;
> +	if (cpu == TYPE_ADCV2 || cpu == TYPE_ADCV3)
>  		tmp |= S3C64XX_ADCCON_RESSEL;
> +
>  	writel(tmp, adc->regs + S3C2410_ADCCON);
> 
>  	return 0;
> @@ -492,6 +507,12 @@ static struct platform_device_id s3c_adc_driver_ids[]
> = {
>  		.name           = "s3c24xx-adc",
>  		.driver_data    = TYPE_ADCV1,
>  	}, {
> +		.name		= "s3c2416-adc",
> +		.driver_data	= TYPE_ADCV11
> +	}, {
> +		.name		= "s3c2443-adc",
> +		.driver_data	= TYPE_ADCV12
> +	}, {
>  		.name           = "s3c64xx-adc",
>  		.driver_data    = TYPE_ADCV2,
>  	}, {
> 
> Thanks.
> 
> Best regards,
> Kgene.

^ permalink raw reply

* [PATCH 0/4] ARM: EXYNOS4: Support generic Power domain framework for EXYNOS4210
From: Rafael J. Wysocki @ 2011-10-02 11:47 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <001701cc80d2$02ee4940$08cadbc0$%kim@samsung.com>

On Sunday, October 02, 2011, Kukjin Kim wrote:
> Rafael J. Wysocki wrote:
> > 
> > On Saturday, August 13, 2011, Russell King - ARM Linux wrote:
> > > On Sat, Aug 13, 2011 at 11:24:07PM +0200, Rafael J. Wysocki wrote:
> > > > On Thursday, August 11, 2011, Chanwoo Choi wrote:
> > > > > The following patch set use the generic Power domain Framework
> instead of
> > > > > power domain code depend of Samsung SoC.
> > > > >
> > > > > Chanwoo Choi (4):
> > > > >   ARM: EXYNOS4: Support for generic I/O power domains on EXYNOS4210
> > > > >   ARM: EXYNOS4: Support for generic Clock manipulation PM callbacks
> > > > >   ARM: EXYNOS4: Delete the power-domain code depend on Samsung SoC
> > > > >   ARM: EXYNOS4: Add power domain to use generic Power domain
> Framework
> > > > >
> > > > >  arch/arm/mach-exynos4/Kconfig                      |   10 +-
> > > > >  arch/arm/mach-exynos4/Makefile                     |    4 +-
> > > > >  arch/arm/mach-exynos4/dev-pd.c                     |  139
> --------------
> > > > >  arch/arm/mach-exynos4/include/mach/pm-exynos4210.h |   52 ++++++
> > > > >  arch/arm/mach-exynos4/include/mach/regs-clock.h    |    8 +
> > > > >  arch/arm/mach-exynos4/mach-nuri.c                  |   21 ++-
> > > > >  arch/arm/mach-exynos4/mach-smdkc210.c              |   26 ++-
> > > > >  arch/arm/mach-exynos4/mach-smdkv310.c              |   23 ++-
> > > > >  arch/arm/mach-exynos4/mach-universal_c210.c        |   21 ++-
> > > > >  arch/arm/mach-exynos4/pm-exynos4210.c              |  189
> ++++++++++++++++++++
> > > > >  arch/arm/mach-exynos4/pm-runtime.c                 |   56 ++++++
> > > > >  arch/arm/plat-samsung/Kconfig                      |    8 -
> > > > >  arch/arm/plat-samsung/Makefile                     |    4 -
> > > > >  arch/arm/plat-samsung/include/plat/pd.h            |   30 ---
> > > > >  arch/arm/plat-samsung/pd.c                         |   95
> ----------
> > > > >  15 files changed, 377 insertions(+), 309 deletions(-)
> > > > >  delete mode 100644 arch/arm/mach-exynos4/dev-pd.c
> > > > >  create mode 100644
> arch/arm/mach-exynos4/include/mach/pm-exynos4210.h
> > > > >  create mode 100644 arch/arm/mach-exynos4/pm-exynos4210.c
> > > > >  create mode 100644 arch/arm/mach-exynos4/pm-runtime.c
> > > > >  delete mode 100644 arch/arm/plat-samsung/include/plat/pd.h
> > > > >  delete mode 100644 arch/arm/plat-samsung/pd.c
> > > >
> > > > The patchset looks good to me, but please note that some code it
> > > > is based on will most likely change in 3.2 due to this patchset:
> > > >
> > > > https://lkml.org/lkml/2011/8/8/420
> > >
> > > Err, isn't all that pm_clk stuff just duplicating what the clk API does?
> > 
> > I'm not sure it's duplicating anything.  Maybe it does, but it came into
> > being by moving some code that were duplicated in a few places throughout
> > the ARM and sh trees into one place.
> > 
> > > IOW, drivers _can_ (and should be) calling clk_disable() when they don't
> > > need the clock running.
> > 
> > Drivers may not know about what to do in a given situation.  For example,
> > if the system has power domains, it may be better to switch a power domain
> > off instead of or in addition to disabling the clock and the driver
> usually
> > doesn't know about that.
> > 
> Hmm... Even though each driver cannot know the given situation, the driver
> can know each own clock should be alive or not. I think, if clock gating
> (enable, disable clock) is required, it should be handled in each driver. In
> addition, the clock and power are not always one-on-one match.

If the driver is to be portable and there's no guarantee that the
clocks configuration on all systems it's supposed to be working with will
always be the same, the driver shouldn't handle clocks directly.

Thanks,
Rafael

^ permalink raw reply

* [PATCH 0/4] ARM: EXYNOS4: Support generic Power domain framework for EXYNOS4210
From: Russell King - ARM Linux @ 2011-10-02 11:48 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <201110021347.02146.rjw@sisk.pl>

On Sun, Oct 02, 2011 at 01:47:01PM +0200, Rafael J. Wysocki wrote:
> On Sunday, October 02, 2011, Kukjin Kim wrote:
> > Hmm... Even though each driver cannot know the given situation, the driver
> > can know each own clock should be alive or not. I think, if clock gating
> > (enable, disable clock) is required, it should be handled in each driver. In
> > addition, the clock and power are not always one-on-one match.
> 
> If the driver is to be portable and there's no guarantee that the
> clocks configuration on all systems it's supposed to be working with will
> always be the same, the driver shouldn't handle clocks directly.

How do these misconceptions start?

The clock API.  Drivers are supposed to get a clock (source) when they
initialize.  Drivers then enable and disable the clock as they _themselves_
require the use of that clock.

The clock enable is counted such that if there is at least one user of
the clock, it will be enabled.  It is not a forced 'off' when disable is
called - the number of enable calls must be balanced by the same number
of disable calls for the clock itself to be disabled.

Drivers are _expected_ to do this themselves.  Or the runtime PM stuff
if that's what they're doing.

^ permalink raw reply

* [PATCH v3 3/3] ARM: OMAP: TI814X: Create board support and enable build for TI8148 EVM
From: Igor Grinberg @ 2011-10-02 12:08 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317258570-30494-1-git-send-email-hemantp@ti.com>

Hi Hemant,

On 09/29/11 04:09, Hemant Pedanekar wrote:
> This patch adds minimal support and build configuration for TI8148 EVM. Also
> adds support for low level debugging on UART1 console on the EVM.
> 
> Note that existing TI8168 EVM file (board-ti8168evm.c) is updated with machine
> info for TI8148 EVM and renamed as board-ti81xxevm.c.

Should we really rename the existing file?
Shouldn't we just stick to the name of the file submitted first?
(e.g. board-ti8168evm.c) and just add the support for the new
TI8148 EVM in to the existing file?
Because, I don't see any real necessity in renaming that file.
Also, it will spare the changes in Makefile.

> 
> Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
> ---
>  arch/arm/mach-omap2/Kconfig                        |    5 ++++
>  arch/arm/mach-omap2/Makefile                       |    3 +-
>  .../{board-ti8168evm.c => board-ti81xxevm.c}       |   22 ++++++++++++++-----
>  arch/arm/plat-omap/include/plat/uncompress.h       |    3 ++
>  4 files changed, 26 insertions(+), 7 deletions(-)
>  rename arch/arm/mach-omap2/{board-ti8168evm.c => board-ti81xxevm.c} (66%)
> 
> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> index a3b9227..cc4f213 100644
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -316,6 +316,11 @@ config MACH_TI8168EVM
>  	depends on SOC_OMAPTI81XX
>  	default y
>  
> +config MACH_TI8148EVM
> +	bool "TI8148 Evaluation Module"
> +	depends on SOC_OMAPTI81XX
> +	default y
> +
>  config MACH_OMAP_4430SDP
>  	bool "OMAP 4430 SDP board"
>  	default y
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 5ee4cd6..1dc2c6b 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -239,7 +239,8 @@ obj-$(CONFIG_MACH_OMAP3517EVM)		+= board-am3517evm.o \
>  obj-$(CONFIG_MACH_CRANEBOARD)		+= board-am3517crane.o
>  
>  obj-$(CONFIG_MACH_SBC3530)		+= board-omap3stalker.o
> -obj-$(CONFIG_MACH_TI8168EVM)		+= board-ti8168evm.o
> +obj-$(CONFIG_MACH_TI8168EVM)		+= board-ti81xxevm.o
> +obj-$(CONFIG_MACH_TI8148EVM)		+= board-ti81xxevm.o
>  
>  # Platform specific device init code
>  
> diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti81xxevm.c
> similarity index 66%
> rename from arch/arm/mach-omap2/board-ti8168evm.c
> rename to arch/arm/mach-omap2/board-ti81xxevm.c
> index 7935fc9..b858921 100644
> --- a/arch/arm/mach-omap2/board-ti8168evm.c
> +++ b/arch/arm/mach-omap2/board-ti81xxevm.c
> @@ -1,5 +1,5 @@
>  /*
> - * Code for TI8168 EVM.
> + * Code for TI8168/TI8148 EVM.
>   *
>   * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
>   *
> @@ -24,15 +24,15 @@
>  #include <plat/board.h>
>  #include <plat/common.h>
>  
> -static struct omap_board_config_kernel ti8168_evm_config[] __initdata = {
> +static struct omap_board_config_kernel ti81xx_evm_config[] __initdata = {
>  };
>  
> -static void __init ti8168_evm_init(void)
> +static void __init ti81xx_evm_init(void)
>  {
>  	omap_serial_init();
>  	omap_sdrc_init(NULL, NULL);
> -	omap_board_config = ti8168_evm_config;
> -	omap_board_config_size = ARRAY_SIZE(ti8168_evm_config);
> +	omap_board_config = ti81xx_evm_config;
> +	omap_board_config_size = ARRAY_SIZE(ti81xx_evm_config);
>  }
>  
>  MACHINE_START(TI8168EVM, "ti8168evm")
> @@ -42,5 +42,15 @@ MACHINE_START(TI8168EVM, "ti8168evm")
>  	.init_early	= ti81xx_init_early,
>  	.init_irq	= ti81xx_init_irq,
>  	.timer		= &omap3_timer,
> -	.init_machine	= ti8168_evm_init,
> +	.init_machine	= ti81xx_evm_init,
> +MACHINE_END
> +
> +MACHINE_START(TI8148EVM, "ti8148evm")
> +	/* Maintainer: Texas Instruments */
> +	.atag_offset	= 0x100,
> +	.map_io		= ti81xx_map_io,
> +	.init_early	= ti81xx_init_early,
> +	.init_irq	= ti81xx_init_irq,
> +	.timer		= &omap3_timer,
> +	.init_machine	= ti81xx_evm_init,
>  MACHINE_END
> diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
> index 40336ad..8d052e7 100644
> --- a/arch/arm/plat-omap/include/plat/uncompress.h
> +++ b/arch/arm/plat-omap/include/plat/uncompress.h
> @@ -175,6 +175,9 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
>  		/* TI8168 base boards using UART3 */
>  		DEBUG_LL_TI81XX(3, ti8168evm);
>  
> +		/* TI8148 base boards using UART1 */
> +		DEBUG_LL_TI81XX(1, ti8148evm);
> +
>  	} while (0);
>  }
>  

-- 
Regards,
Igor.

^ permalink raw reply

* [PATCH 0/4] ARM: EXYNOS4: Support generic Power domain framework for EXYNOS4210
From: Rafael J. Wysocki @ 2011-10-02 13:08 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20111002114811.GU11710@n2100.arm.linux.org.uk>

On Sunday, October 02, 2011, Russell King - ARM Linux wrote:
> On Sun, Oct 02, 2011 at 01:47:01PM +0200, Rafael J. Wysocki wrote:
> > On Sunday, October 02, 2011, Kukjin Kim wrote:
> > > Hmm... Even though each driver cannot know the given situation, the driver
> > > can know each own clock should be alive or not. I think, if clock gating
> > > (enable, disable clock) is required, it should be handled in each driver. In
> > > addition, the clock and power are not always one-on-one match.
> > 
> > If the driver is to be portable and there's no guarantee that the
> > clocks configuration on all systems it's supposed to be working with will
> > always be the same, the driver shouldn't handle clocks directly.
> 
> How do these misconceptions start?
> 
> The clock API.  Drivers are supposed to get a clock (source) when they
> initialize.  Drivers then enable and disable the clock as they _themselves_
> require the use of that clock.

OK

Now think of a driver that should handle the same device on both ARM and
x86-based SoCs.  Is the clock API available on x86?

> The clock enable is counted such that if there is at least one user of
> the clock, it will be enabled.  It is not a forced 'off' when disable is
> called - the number of enable calls must be balanced by the same number
> of disable calls for the clock itself to be disabled.
> 
> Drivers are _expected_ to do this themselves.  Or the runtime PM stuff
> if that's what they're doing.

That I can agree with.

Thanks,
Rafael

^ permalink raw reply

* [PATCH 0/4] ARM: EXYNOS4: Support generic Power domain framework for EXYNOS4210
From: Russell King - ARM Linux @ 2011-10-02 13:13 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <201110021508.44083.rjw@sisk.pl>

On Sun, Oct 02, 2011 at 03:08:43PM +0200, Rafael J. Wysocki wrote:
> On Sunday, October 02, 2011, Russell King - ARM Linux wrote:
> > How do these misconceptions start?
> > 
> > The clock API.  Drivers are supposed to get a clock (source) when they
> > initialize.  Drivers then enable and disable the clock as they _themselves_
> > require the use of that clock.
> 
> OK
> 
> Now think of a driver that should handle the same device on both ARM and
> x86-based SoCs.  Is the clock API available on x86?

No one's bothered yet.

^ permalink raw reply

* [PATCH 12/11] ARM: include linux/highmem.h in uaccess functions
From: Arnd Bergmann @ 2011-10-02 13:46 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317496920-7764-1-git-send-email-arnd@arndb.de>

When highpte support is enabled, this is required to build
the kernel.
    
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
I was missing this patch at first, but now found it in the omap branch.

diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c
index 8b9b136..025f742 100644
--- a/arch/arm/lib/uaccess_with_memcpy.c
+++ b/arch/arm/lib/uaccess_with_memcpy.c
@@ -17,6 +17,7 @@
 #include <linux/sched.h>
 #include <linux/hardirq.h> /* for in_atomic() */
 #include <linux/gfp.h>
+#include <linux/highmem.h>
 #include <asm/current.h>
 #include <asm/page.h>
 

^ permalink raw reply related

* [PATCH 0/4] ARM: EXYNOS4: Support generic Power domain framework for EXYNOS4210
From: Sylwester Nawrocki @ 2011-10-02 14:09 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <001701cc80d2$02ee4940$08cadbc0$%kim@samsung.com>

On 10/02/2011 09:07 AM, Kukjin Kim wrote:
> Rafael J. Wysocki wrote:
>>
>> On Saturday, August 13, 2011, Russell King - ARM Linux wrote:
>>> On Sat, Aug 13, 2011 at 11:24:07PM +0200, Rafael J. Wysocki wrote:
>>>> On Thursday, August 11, 2011, Chanwoo Choi wrote:
>>>>> The following patch set use the generic Power domain Framework
> instead of
>>>>> power domain code depend of Samsung SoC.
>>>>>
>>>>> Chanwoo Choi (4):
>>>>>    ARM: EXYNOS4: Support for generic I/O power domains on EXYNOS4210
>>>>>    ARM: EXYNOS4: Support for generic Clock manipulation PM callbacks
>>>>>    ARM: EXYNOS4: Delete the power-domain code depend on Samsung SoC
>>>>>    ARM: EXYNOS4: Add power domain to use generic Power domain
> Framework
>>>>>
>>>>>   arch/arm/mach-exynos4/Kconfig                      |   10 +-
>>>>>   arch/arm/mach-exynos4/Makefile                     |    4 +-
>>>>>   arch/arm/mach-exynos4/dev-pd.c                     |  139
> --------------
>>>>>   arch/arm/mach-exynos4/include/mach/pm-exynos4210.h |   52 ++++++
>>>>>   arch/arm/mach-exynos4/include/mach/regs-clock.h    |    8 +
>>>>>   arch/arm/mach-exynos4/mach-nuri.c                  |   21 ++-
>>>>>   arch/arm/mach-exynos4/mach-smdkc210.c              |   26 ++-
>>>>>   arch/arm/mach-exynos4/mach-smdkv310.c              |   23 ++-
>>>>>   arch/arm/mach-exynos4/mach-universal_c210.c        |   21 ++-
>>>>>   arch/arm/mach-exynos4/pm-exynos4210.c              |  189
> ++++++++++++++++++++
>>>>>   arch/arm/mach-exynos4/pm-runtime.c                 |   56 ++++++
>>>>>   arch/arm/plat-samsung/Kconfig                      |    8 -
>>>>>   arch/arm/plat-samsung/Makefile                     |    4 -
>>>>>   arch/arm/plat-samsung/include/plat/pd.h            |   30 ---
>>>>>   arch/arm/plat-samsung/pd.c                         |   95
> ----------
>>>>>   15 files changed, 377 insertions(+), 309 deletions(-)
>>>>>   delete mode 100644 arch/arm/mach-exynos4/dev-pd.c
>>>>>   create mode 100644
> arch/arm/mach-exynos4/include/mach/pm-exynos4210.h
>>>>>   create mode 100644 arch/arm/mach-exynos4/pm-exynos4210.c
>>>>>   create mode 100644 arch/arm/mach-exynos4/pm-runtime.c
>>>>>   delete mode 100644 arch/arm/plat-samsung/include/plat/pd.h
>>>>>   delete mode 100644 arch/arm/plat-samsung/pd.c
>>>>
>>>> The patchset looks good to me, but please note that some code it
>>>> is based on will most likely change in 3.2 due to this patchset:
>>>>
>>>> https://lkml.org/lkml/2011/8/8/420
>>>
>>> Err, isn't all that pm_clk stuff just duplicating what the clk API does?
>>
>> I'm not sure it's duplicating anything.  Maybe it does, but it came into
>> being by moving some code that were duplicated in a few places throughout
>> the ARM and sh trees into one place.
>>
>>> IOW, drivers _can_ (and should be) calling clk_disable() when they don't
>>> need the clock running.
>>
>> Drivers may not know about what to do in a given situation.  For example,
>> if the system has power domains, it may be better to switch a power domain
>> off instead of or in addition to disabling the clock and the driver
> usually
>> doesn't know about that.
>>
> Hmm... Even though each driver cannot know the given situation, the driver
> can know each own clock should be alive or not. I think, if clock gating
> (enable, disable clock) is required, it should be handled in each driver. In
> addition, the clock and power are not always one-on-one match.

AFAICS the genpd API doesn't for an architecture to move the clocks' control
out from drivers, it can be decided on individual basis for each clock. 
With Chanwoo's patches at least exynos power domains and global clock gates 
for devices (S5P_CLKGATE_BLOCK) are handled through the common API.

Also, it's not quite clear to me, can't the pm_clk_* calls be used by the drivers
to control the clocks as they need ?

Last time I looked at the genpd API, an important drawback was that pm_clk_suspend/
pm_clk_resume couldn't be used in interrupt context. Now it seems the mutexes in
the core functions has been replaced with spinlocks and such limitation is gone.

I'm considering using pm_clk* calls to implement clock gating in a video codec
driver. If, for instance, frame period is 30 ms and processing in the device takes
only 10 ms, significant power savings could be achieved by turning the clocks off
for the 20 ms idle period.  


--
Thanks, 
Sylwester

^ permalink raw reply

* [PATCH 00/30] ARM/omap: omap specific randconfig fixes
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tony,

I've mentioned these patches before, and now I've managed to
go through them again and clean them enough for submission.

If nobody has any objections, I would like to send them to
Linus in the coming merge window, otherwise it would be nice
if you could pick the ones that look good to you and send
me a pull request. If any of these look like they should be
backported to stable kernels, please tell me and I'll add
a cc:stable at k.o tag.

The entire set is also available from
 git pull git://git.linaro.org/people/arnd/arm-soc.git randconfig/omap

but I have not yet pulled them into the for-next branch.

	Arnd

Arnd Bergmann (30):
  sound/omap: omap_mcpdm_remove cannot be __devexit
  video/omap: fix dependencies
  video/omap: fix build dependencies
  ARM: omap: add missing __devexit_p() annotations
  ARM: omap: enable building omap2 without omap2420/2430
  ARM: omap: fix build with CONFIG_I2C_OMAP disabled
  ARM: omap: fix visibility of omap2_mbox_iva_priv
  ARM: omap2+: fix building without i2c
  ARM: omap2: export functions used by nand driver
  ARM: omap/iommu: always provide iommu debug code
  ARM: omap2/n8x0: work around modular omap mmc
  ARM: omap4: always build omap_phy_internal
  ARM: omap2+: fix omap_hdq_init compilation
  ARM: omap2: irq.c is always needed
  usb/musb: use a Kconfig choice to pick the right DMA method
  usb/musb: HDRC depends on TWL4030_CORE for OMAP3/4
  usb/musb: allow building USB_MUSB_TUSB6010 as a module
  omap-usb: automatically select MFD_OMAP_USB_HOST
  tty/serial/omap: console can only be built-in
  media/omap_vout: disable driver for now
  sound/soc/omap: limit to omap2plus
  mfd: build twl6030 only on omap2
  ARM: omap2: select twl4030 support on boards that need it
  ARM: omap2+: ensure that one of omap2/3/4 is selected
  ARM: OMAP depends on MMU
  ARM: omap: add board autoselection
  ARM: omap: select L2X0 cache on omap4
  ARM: omap: select CPU_FREQ_TABLE where needed
  ARM: omap: select USB_ARCH_HAS_EHCI only when USB is enabled
  ARM: omap2: select ARM_AMBA for OMAP3_EMU

 arch/arm/Kconfig                           |    1 +
 arch/arm/mach-omap2/Kconfig                |   61 +++++++++++++++++++++++++-
 arch/arm/mach-omap2/Makefile               |   12 ++---
 arch/arm/mach-omap2/board-n8x0.c           |    7 ++-
 arch/arm/mach-omap2/devices.c              |   10 +++--
 arch/arm/mach-omap2/gpmc.c                 |    2 +
 arch/arm/mach-omap2/mailbox.c              |    2 +-
 arch/arm/mach-omap2/omap_hwmod_2420_data.c |    2 +-
 arch/arm/mach-omap2/omap_hwmod_2430_data.c |    2 +-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    2 +-
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |    2 +-
 arch/arm/mach-omap2/smartreflex.c          |    2 +-
 arch/arm/plat-omap/Kconfig                 |    5 ++
 arch/arm/plat-omap/dma.c                   |    2 +-
 arch/arm/plat-omap/include/plat/i2c.h      |    6 +-
 arch/arm/plat-omap/include/plat/multi.h    |    5 ++
 arch/arm/plat-omap/iommu.c                 |    2 +-
 drivers/media/video/omap/Kconfig           |    1 +
 drivers/mfd/Kconfig                        |    6 +-
 drivers/tty/serial/Kconfig                 |    2 +-
 drivers/usb/musb/Kconfig                   |   58 +++++++++++++++----------
 drivers/usb/musb/Makefile                  |   26 ++----------
 drivers/usb/musb/musb_core.c               |    3 +-
 drivers/usb/musb/musb_io.h                 |    2 +-
 drivers/usb/musb/tusb6010.c                |    1 +
 drivers/video/omap/Kconfig                 |   41 ++++++++++++++++--
 drivers/video/omap/Makefile                |   64 +++++++++++++---------------
 drivers/video/omap2/displays/Kconfig       |    7 ++-
 sound/soc/omap/Kconfig                     |    2 +-
 sound/soc/omap/mcpdm.c                     |    2 +-
 sound/soc/omap/mcpdm.h                     |    2 +-
 31 files changed, 221 insertions(+), 121 deletions(-)

-- 
1.7.5.4

^ permalink raw reply

* [PATCH 01/30] sound/omap: omap_mcpdm_remove cannot be __devexit
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

omap_mcpdm_remove is used from asoc_mcpdm_probe, which is an
initcall, and must not be discarded when HOTPLUG is disabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
---
 sound/soc/omap/mcpdm.c |    2 +-
 sound/soc/omap/mcpdm.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/omap/mcpdm.c b/sound/soc/omap/mcpdm.c
index 928f037..50e59194 100644
--- a/sound/soc/omap/mcpdm.c
+++ b/sound/soc/omap/mcpdm.c
@@ -449,7 +449,7 @@ exit:
 	return ret;
 }
 
-int __devexit omap_mcpdm_remove(struct platform_device *pdev)
+int omap_mcpdm_remove(struct platform_device *pdev)
 {
 	struct omap_mcpdm *mcpdm_ptr = platform_get_drvdata(pdev);
 
diff --git a/sound/soc/omap/mcpdm.h b/sound/soc/omap/mcpdm.h
index df3e16f..20c20a8 100644
--- a/sound/soc/omap/mcpdm.h
+++ b/sound/soc/omap/mcpdm.h
@@ -150,4 +150,4 @@ extern int omap_mcpdm_request(void);
 extern void omap_mcpdm_free(void);
 extern int omap_mcpdm_set_offset(int offset1, int offset2);
 int __devinit omap_mcpdm_probe(struct platform_device *pdev);
-int __devexit omap_mcpdm_remove(struct platform_device *pdev);
+int omap_mcpdm_remove(struct platform_device *pdev);
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 02/30] video/omap: fix dependencies
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

The lcd_2430sdp and lcd_ldp drivers depend on TWL4030, which is not
well expressed in the Kconfig. Create new configuration options for
these in order to describe the dependencies correctly.

In some cases, the driver cannot be a loadable module, so better
force it to be built-in.

While we're at it, simplify the Makefile syntax.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap/Kconfig  |   41 +++++++++++++++++++++++++---
 drivers/video/omap/Makefile |   64 ++++++++++++++++++++-----------------------
 2 files changed, 67 insertions(+), 38 deletions(-)

diff --git a/drivers/video/omap/Kconfig b/drivers/video/omap/Kconfig
index 196fa2e..bd15431 100644
--- a/drivers/video/omap/Kconfig
+++ b/drivers/video/omap/Kconfig
@@ -1,11 +1,11 @@
 config FB_OMAP
-	tristate "OMAP frame buffer support (EXPERIMENTAL)"
-	depends on FB && (OMAP2_DSS = "n")
+	bool "OMAP frame buffer support (EXPERIMENTAL)"
+	# cannot be a module if more than one LCD driver is linked in
+	depends on (FB = "y") && (OMAP2_DSS = "n")
 	depends on ARCH_OMAP1 || ARCH_OMAP2 || ARCH_OMAP3
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
-	select TWL4030_CORE if MACH_OMAP_2430SDP
 	help
           Frame buffer driver for OMAP based boards.
 
@@ -105,4 +105,37 @@ config FB_OMAP_DMA_TUNE
           answer yes. Answer no if you have a dedicated video
           memory, or don't use any of the accelerated features.
 
-
+config FB_OMAP_SOSSI
+	def_bool y
+	depends on ARCH_OMAP1
+	depends on FB_OMAP_LCDC_EXTERNAL
+
+config FB_OMAP_RFBI
+	def_bool y
+	depends on ARCH_OMAP2 || ARCH_OMAP3
+	depends on FB_OMAP_LCDC_EXTERNAL
+
+config FB_OMAP_INN1610
+	def_bool y
+	depends on ARCH_OMAP16XX
+	depends on MACH_OMAP_INNOVATOR
+
+config FB_OMAP_INN1510
+	def_bool y
+	depends on ARCH_OMAP15XX
+	depends on MACH_OMAP_INNOVATOR
+
+config FB_OMAP_OMAP3EVM
+	def_bool y
+	depends on MACH_OMAP3EVM
+	depends on TWL4030_CORE
+
+config FB_OMAP_X430SDP
+	def_bool y
+	depends on MACH_OMAP_2430SDP || MACH_OMAP_3430SDP
+	depends on TWL4030_CORE
+
+config FB_OMAP_LDP
+	def_bool y
+	depends on MACH_OMAP_LDP
+	depends on TWL4030_CORE
diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile
index 25db556..8c2cd56 100644
--- a/drivers/video/omap/Makefile
+++ b/drivers/video/omap/Makefile
@@ -4,37 +4,33 @@
 
 obj-$(CONFIG_FB_OMAP) += omapfb.o
 
-objs-yy := omapfb_main.o
-
-objs-y$(CONFIG_ARCH_OMAP1) += lcdc.o
-objs-y$(CONFIG_ARCH_OMAP2) += dispc.o
-objs-y$(CONFIG_ARCH_OMAP3) += dispc.o
-
-objs-$(CONFIG_ARCH_OMAP1)$(CONFIG_FB_OMAP_LCDC_EXTERNAL) += sossi.o
-objs-$(CONFIG_ARCH_OMAP2)$(CONFIG_FB_OMAP_LCDC_EXTERNAL) += rfbi.o
-
-objs-y$(CONFIG_FB_OMAP_LCDC_HWA742) += hwa742.o
-objs-y$(CONFIG_FB_OMAP_LCDC_BLIZZARD) += blizzard.o
-
-objs-y$(CONFIG_MACH_AMS_DELTA) += lcd_ams_delta.o
-objs-y$(CONFIG_MACH_OMAP_H4) += lcd_h4.o
-objs-y$(CONFIG_MACH_OMAP_H3) += lcd_h3.o
-objs-y$(CONFIG_MACH_OMAP_PALMTE) += lcd_palmte.o
-objs-y$(CONFIG_MACH_OMAP_PALMTT) += lcd_palmtt.o
-objs-y$(CONFIG_MACH_OMAP_PALMZ71) += lcd_palmz71.o
-objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o
-objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o
-objs-y$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o
-
-objs-y$(CONFIG_MACH_OMAP_APOLLON) += lcd_apollon.o
-objs-y$(CONFIG_MACH_OMAP_2430SDP) += lcd_2430sdp.o
-objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_2430sdp.o
-objs-y$(CONFIG_MACH_OMAP_LDP) += lcd_ldp.o
-objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o
-objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o
-objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o
-objs-y$(CONFIG_MACH_OVERO) += lcd_overo.o
-objs-y$(CONFIG_MACH_HERALD) += lcd_htcherald.o
-
-omapfb-objs := $(objs-yy)
-
+omapfb-y				+= omapfb_main.o
+
+omapfb-$(CONFIG_ARCH_OMAP1)		+= lcdc.o
+omapfb-$(CONFIG_ARCH_OMAP2)		+= dispc.o
+omapfb-$(CONFIG_ARCH_OMAP3)		+= dispc.o
+
+omapfb-$(CONFIG_FB_OMAP_SOSSI)		+= sossi.o
+omapfb-$(CONFIG_FB_OMAP_RFBI)		+= rfbi.o
+
+omapfb-$(CONFIG_FB_OMAP_LCDC_HWA742)	+= hwa742.o
+omapfb-$(CONFIG_FB_OMAP_LCDC_BLIZZARD)	+= blizzard.o
+
+omapfb-$(CONFIG_MACH_AMS_DELTA)		+= lcd_ams_delta.o
+omapfb-$(CONFIG_MACH_OMAP_H4)		+= lcd_h4.o
+omapfb-$(CONFIG_MACH_OMAP_H3)		+= lcd_h3.o
+omapfb-$(CONFIG_MACH_OMAP_PALMTE)	+= lcd_palmte.o
+omapfb-$(CONFIG_MACH_OMAP_PALMTT)	+= lcd_palmtt.o
+omapfb-$(CONFIG_MACH_OMAP_PALMZ71)	+= lcd_palmz71.o
+omapfb-$(CONFIG_FB_OMAP_INN1610)	+= lcd_inn1610.o
+omapfb-$(CONFIG_FB_OMAP_INN1510)	+= lcd_inn1510.o
+omapfb-$(CONFIG_MACH_OMAP_OSK)		+= lcd_osk.o
+
+omapfb-$(CONFIG_MACH_OMAP_APOLLON)	+= lcd_apollon.o
+omapfb-$(CONFIG_FB_OMAP_X430SDP)	+= lcd_2430sdp.o
+omapfb-$(CONFIG_FB_OMAP_LDP)		+= lcd_ldp.o
+omapfb-$(CONFIG_FB_OMAP_OMAP3EVM)	+= lcd_omap3evm.o
+omapfb-$(CONFIG_MACH_OMAP3_BEAGLE)	+= lcd_omap3beagle.o
+omapfb-$(CONFIG_FB_OMAP_LCD_MIPID)	+= lcd_mipid.o
+omapfb-$(CONFIG_MACH_OVERO)		+= lcd_overo.o
+omapfb-$(CONFIG_MACH_HERALD)		+= lcd_htcherald.o
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 03/30] video/omap: fix build dependencies
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

Four of the LCD panel drivers depend on the backlight class,
so add the dependency in Kconfig.
Selecting the BACKLIGHT_CLASS_DEVICE symbol does not generally
work since it has other dependencies.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/displays/Kconfig |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
index 609a280..8e4278c 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -19,13 +19,15 @@ config PANEL_LGPHILIPS_LB035Q02
 config PANEL_SHARP_LS037V7DW01
         tristate "Sharp LS037V7DW01 LCD Panel"
         depends on OMAP2_DSS_DPI
-        select BACKLIGHT_CLASS_DEVICE
+        depends on BACKLIGHT_CLASS_DEVICE
         help
           LCD Panel used in TI's SDP3430 and EVM boards
 
 config PANEL_NEC_NL8048HL11_01B
 	tristate "NEC NL8048HL11-01B Panel"
 	depends on OMAP2_DSS_DPI
+	depends on SPI
+	depends on BACKLIGHT_CLASS_DEVICE
 	help
 		This NEC NL8048HL11-01B panel is TFT LCD
 		used in the Zoom2/3/3630 sdp boards.
@@ -33,6 +35,7 @@ config PANEL_NEC_NL8048HL11_01B
 config PANEL_TAAL
         tristate "Taal DSI Panel"
         depends on OMAP2_DSS_DSI
+        depends on BACKLIGHT_CLASS_DEVICE
         help
           Taal DSI command mode panel from TPO.
 
@@ -45,7 +48,7 @@ config PANEL_TPO_TD043MTEA1
 config PANEL_ACX565AKM
 	tristate "ACX565AKM Panel"
 	depends on OMAP2_DSS_SDI && SPI
-	select BACKLIGHT_CLASS_DEVICE
+	depends on BACKLIGHT_CLASS_DEVICE
 	help
 	  This is the LCD panel used on Nokia N900
 endmenu
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 04/30] ARM: omap: add missing __devexit_p() annotations
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

Drivers that refer to a __devexit function in an operations
structure need to annotate that pointer with __devexit_p so
replace it with a NULL pointer when the section gets discarded.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/smartreflex.c |    2 +-
 arch/arm/plat-omap/dma.c          |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index 34c01a7..67bc6ce 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -1002,7 +1002,7 @@ static int __devexit omap_sr_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver smartreflex_driver = {
-	.remove         = omap_sr_remove,
+	.remove         = __devexit_p(omap_sr_remove),
 	.driver		= {
 		.name	= "smartreflex",
 	},
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index c22217c..f7150ba 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -2105,7 +2105,7 @@ static int __devexit omap_system_dma_remove(struct platform_device *pdev)
 
 static struct platform_driver omap_system_dma_driver = {
 	.probe		= omap_system_dma_probe,
-	.remove		= omap_system_dma_remove,
+	.remove		= __devexit_p(omap_system_dma_remove),
 	.driver		= {
 		.name	= "omap_dma_system"
 	},
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 05/30] ARM: omap: enable building omap2 without omap2420/2430
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

Kconfig allows selecting CONFIG_OMAP2 but no specific SOC, the options
being omap2420 and omap2430, but that leads to a build error when
omap3 or omap4 are also enabled and the MULTI_OMAP2 symbol is
undefined.

This adds another clause to plat/multi.h, mainly to allow all
possible randconfig combinations to build cleanly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/plat-omap/include/plat/multi.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/multi.h b/arch/arm/plat-omap/include/plat/multi.h
index 999ffba..fb7f196 100644
--- a/arch/arm/plat-omap/include/plat/multi.h
+++ b/arch/arm/plat-omap/include/plat/multi.h
@@ -82,6 +82,11 @@
 #  define OMAP_NAME omap2430
 # endif
 #endif
+#ifdef CONFIG_ARCH_OMAP2
+# ifndef OMAP_NAME
+#  define OMAP_NAME omap2
+# endif
+#endif
 #ifdef CONFIG_ARCH_OMAP3
 # ifdef OMAP_NAME
 #  undef  MULTI_OMAP2
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 06/30] ARM: omap: fix build with CONFIG_I2C_OMAP disabled
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

We must not reference omap_i2c_reset if the file defining it
does not get built.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/plat-omap/include/plat/i2c.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/i2c.h b/arch/arm/plat-omap/include/plat/i2c.h
index 7c22b9e..ae72013 100644
--- a/arch/arm/plat-omap/include/plat/i2c.h
+++ b/arch/arm/plat-omap/include/plat/i2c.h
@@ -28,6 +28,8 @@
 extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
 				 struct i2c_board_info const *info,
 				 unsigned len);
+struct omap_hwmod;
+int omap_i2c_reset(struct omap_hwmod *oh);
 #else
 static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
 				 struct i2c_board_info const *info,
@@ -35,6 +37,7 @@ static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
 {
 	return 0;
 }
+#define omap_i2c_reset NULL
 #endif
 
 /**
@@ -53,7 +56,4 @@ struct omap_i2c_dev_attr {
 void __init omap1_i2c_mux_pins(int bus_id);
 void __init omap2_i2c_mux_pins(int bus_id);
 
-struct omap_hwmod;
-int omap_i2c_reset(struct omap_hwmod *oh);
-
 #endif /* __ASM__ARCH_OMAP_I2C_H */
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 07/30] ARM: omap: fix visibility of omap2_mbox_iva_priv
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

map2_mbox_iva_priv is used on multiple omap2 socs but is hidden
in an outdated #ifdef that is specific to a single soc.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/mailbox.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 86d564a..5a2a0e4 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -257,7 +257,7 @@ struct omap_mbox mbox_dsp_info = {
 struct omap_mbox *omap3_mboxes[] = { &mbox_dsp_info, NULL };
 #endif
 
-#if defined(CONFIG_SOC_OMAP2420)
+#if defined(CONFIG_ARCH_OMAP2)
 /* IVA */
 static struct omap_mbox2_priv omap2_mbox_iva_priv = {
 	.tx_fifo = {
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 08/30] ARM: omap2+: fix building without i2c
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

A trivial typo causes build breakage when I2C is disabled
and omap_i2c_reset is set to NULL on OMAP:

omap_hwmod_44xx_data.c:2287:11: error: lvalue required as unary '&' operand

Removing the '&' character solves this.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Avinash.H.M <avinashhm@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/omap_hwmod_2420_data.c |    2 +-
 arch/arm/mach-omap2/omap_hwmod_2430_data.c |    2 +-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    2 +-
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index a015c69..3aa6c62 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -1030,7 +1030,7 @@ static struct omap_hwmod_class i2c_class = {
 	.name		= "i2c",
 	.sysc		= &i2c_sysc,
 	.rev		= OMAP_I2C_IP_VERSION_1,
-	.reset		= &omap_i2c_reset,
+	.reset		= omap_i2c_reset,
 };
 
 static struct omap_i2c_dev_attr i2c_dev_attr = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 16743c7..d9ab245 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -1079,7 +1079,7 @@ static struct omap_hwmod_class i2c_class = {
 	.name		= "i2c",
 	.sysc		= &i2c_sysc,
 	.rev		= OMAP_I2C_IP_VERSION_1,
-	.reset		= &omap_i2c_reset,
+	.reset		= omap_i2c_reset,
 };
 
 static struct omap_i2c_dev_attr i2c_dev_attr = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 25bf43b..b0a0113 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -1309,7 +1309,7 @@ static struct omap_hwmod_class i2c_class = {
 	.name	= "i2c",
 	.sysc	= &i2c_sysc,
 	.rev	= OMAP_I2C_IP_VERSION_1,
-	.reset	= &omap_i2c_reset,
+	.reset	= omap_i2c_reset,
 };
 
 static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 6201422..a6d42fc 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2284,7 +2284,7 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
 	.name	= "i2c",
 	.sysc	= &omap44xx_i2c_sysc,
 	.rev	= OMAP_I2C_IP_VERSION_2,
-	.reset	= &omap_i2c_reset,
+	.reset	= omap_i2c_reset,
 };
 
 static struct omap_i2c_dev_attr i2c_dev_attr = {
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 09/30] ARM: omap2: export functions used by nand driver
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

The omap nand driver uses the gpmc_enable_hwecc and
gpmc_calculate_ecc functions from the platform code,
but can be built as a module.

This only works if the functions are exported.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/gpmc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 130034b..4ed6880 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -882,6 +882,7 @@ int gpmc_enable_hwecc(int cs, int mode, int dev_width, int ecc_size)
 	gpmc_write_reg(GPMC_ECC_CONFIG, val);
 	return 0;
 }
+EXPORT_SYMBOL_GPL(gpmc_enable_hwecc);
 
 /**
  * gpmc_calculate_ecc - generate non-inverted ecc bytes
@@ -912,3 +913,4 @@ int gpmc_calculate_ecc(int cs, const u_char *dat, u_char *ecc_code)
 	gpmc_ecc_used = -EINVAL;
 	return 0;
 }
+EXPORT_SYMBOL_GPL(gpmc_calculate_ecc);
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 10/30] ARM: omap/iommu: always provide iommu debug code
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

The iommu module on omap contains a few functions that are
only used by the debug module. These are however only there
when the debug code is built as a module. Since it is possible
to build the debug code into the kernel, the functions should
also be provided for the built-in case.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/plat-omap/iommu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index 34fc31e..9d43ce1 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -391,7 +391,7 @@ void iommu_set_twl(struct iommu *obj, bool on)
 }
 EXPORT_SYMBOL_GPL(iommu_set_twl);
 
-#if defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE)
+#if defined(CONFIG_OMAP_IOMMU_DEBUG) || defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE)
 
 ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t bytes)
 {
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 11/30] ARM: omap2/n8x0: work around modular omap mmc
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

When the omap driver is built as a module for n8x0,
n8x0_mmc_set_power_menelaus cannot call into the driver:

arch/arm/mach-omap2/board-n8x0.c:374: undefined reference to `omap_mmc_notify_cover_event'

As a workaround, do not provide that device in this case. This needs
to be fixed properly, e.g. by converting n8x0 to be probed through the
device tree and moving that code into the driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/board-n8x0.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index e11f0c5..403325d 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -193,8 +193,9 @@ static struct omap_onenand_platform_data board_onenand_data[] = {
 };
 #endif
 
-#if defined(CONFIG_MENELAUS) &&						\
-	(defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE))
+#if defined(CONFIG_MENELAUS) && defined(CONFIG_MMC_OMAP)
+/* || defined(CONFIG_MMC_OMAP_MODULE)) */
+/* FIXME: cannot call omap_mmc_notify_cover_event for ONFIG_MMC_OMAP_MODULE */
 
 /*
  * On both N800 and N810, only the first of the two MMC controllers is in use.
-- 
1.7.5.4

^ permalink raw reply related

* [PATCH 12/30] ARM: omap4: always build omap_phy_internal
From: Arnd Bergmann @ 2011-10-02 14:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1317566760-25681-1-git-send-email-arnd@arndb.de>

The functions defined in omap_phy_internal.c are requrired on
omap4-only configurations, not just for specific boards.

twl-common.c:(.init.text+0x6b40): undefined reference to `omap4430_phy_init'
twl-common.c:(.init.text+0x6c68): undefined reference to `omap4430_phy_init'
mach-omap2/built-in.o:(.data+0x154e0): undefined reference to `omap4430_phy_init'
mach-omap2/built-in.o:(.data+0x154e4): undefined reference to `omap4430_phy_exit'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap2/Makefile |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index f343365..dc36bd4 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -242,12 +242,9 @@ obj-$(CONFIG_MACH_IGEP0020)		+= board-igep0020.o \
 obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK)	+= board-omap3touchbook.o \
 					   hsmmc.o
 obj-$(CONFIG_MACH_OMAP_4430SDP)		+= board-4430sdp.o \
-					   hsmmc.o \
-					   omap_phy_internal.o
+					   hsmmc.o
 obj-$(CONFIG_MACH_OMAP4_PANDA)		+= board-omap4panda.o \
-					   hsmmc.o \
-					   omap_phy_internal.o
-
+					   hsmmc.o
 obj-$(CONFIG_MACH_OMAP3517EVM)		+= board-am3517evm.o \
 					   omap_phy_internal.o \
 
@@ -275,6 +272,7 @@ obj-y					+= $(smc91x-m) $(smc91x-y)
 smsc911x-$(CONFIG_SMSC911X)		:= gpmc-smsc911x.o
 obj-y					+= $(smsc911x-m) $(smsc911x-y)
 obj-$(CONFIG_ARCH_OMAP4)		+= hwspinlock.o
+obj-$(CONFIG_ARCH_OMAP4)		+= omap_phy_internal.o
 
 disp-$(CONFIG_OMAP2_DSS)		:= display.o
 obj-y					+= $(disp-m) $(disp-y)
-- 
1.7.5.4

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox