SMDK2416: Select MACH_SMDK, S3C_DEV_NAND, S3C_DEV_USB_HOST
Subsystems (2)
PATCH 1/10 SMDK2416: Select MACH_SMDK, S3C_DEV_NAND, S3C_DEV_USB_HOST
Enable compilation of platform devices and initialization code used in SMDK2416 board file.
--- arch/arm/mach-s3c2416/Kconfig | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/mach-s3c2416/Kconfig +3 -0
@@ -35,9 +35,12 @@ menu "S3C2416 Machines" config MACH_SMDK2416 bool "SMDK2416" select CPU_S3C2416 + select MACH_SMDK select S3C_DEV_FB select S3C_DEV_HSMMC select S3C_DEV_HSMMC1 + select S3C_DEV_NAND + select S3C_DEV_USB_HOST select S3C2416_PM if PM help Say Y here if you are using an SMDK2416
Signature · 1 line
1.7.2.3
PATCH 2/10 ARM S3C2416: Add address map and clock definitions for HSMMC0
Define maps for HSMMC devices.
S3C2443 has one HSMMC device with base address 0x4A800000. S3C2416 has HSMMC0 at 0x4AC00000 and HSMMC1 at 0x4A800000.
So suppose that S3C2443 has only HSMMC1.
Define clock for hsmmc0 device and register it.
--- arch/arm/mach-s3c2410/include/mach/irqs.h | 4 ++-- arch/arm/mach-s3c2410/include/mach/map.h | 4 ++-- .../mach-s3c2410/include/mach/regs-s3c2443-clock.h | 1 + arch/arm/mach-s3c2416/clock.c | 18 +++++++++++++----- arch/arm/mach-s3c2443/Kconfig | 2 +- arch/arm/mach-s3c2443/clock.c | 4 ++-- arch/arm/mach-s3c2443/mach-smdk2443.c | 2 +- arch/arm/plat-s3c24xx/s3c2443-clock.c | 2 +- 8 files changed, 23 insertions(+), 14 deletions(-)
arch/arm/mach-s3c2410/include/mach/irqs.h +2 -2
@@ -152,8 +152,8 @@#define IRQ_S3C2416_HSMMC0 S3C2410_IRQ(21)/* S3C2416/S3C2450 */ -#define IRQ_HSMMC0 IRQ_S3C2443_HSMMC -#define IRQ_HSMMC1 IRQ_S3C2416_HSMMC0 +#define IRQ_HSMMC0 IRQ_S3C2416_HSMMC0 +#define IRQ_HSMMC1 IRQ_S3C2443_HSMMC#define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14)#define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15)
arch/arm/mach-s3c2410/include/mach/map.h +2 -2
@@ -112,8 +112,8 @@#define S3C_PA_IIC S3C2410_PA_IIC#define S3C_PA_UART S3C24XX_PA_UART#define S3C_PA_USBHOST S3C2410_PA_USBHOST -#define S3C_PA_HSMMC0 S3C2443_PA_HSMMC -#define S3C_PA_HSMMC1 S3C2416_PA_HSMMC0 +#define S3C_PA_HSMMC0 S3C2416_PA_HSMMC0 +#define S3C_PA_HSMMC1 S3C2443_PA_HSMMC#define S3C_PA_WDT S3C2410_PA_WATCHDOG#define S3C_PA_NAND S3C24XX_PA_NAND
arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h +1 -0
@@ -86,6 +86,7 @@#define S3C2443_HCLKCON_LCDC (1<<9)#define S3C2443_HCLKCON_USBH (1<<11)#define S3C2443_HCLKCON_USBD (1<<12) +#define S3C2416_HCLKCON_HSMMC0 (1<<15)#define S3C2443_HCLKCON_HSMMC (1<<16)#define S3C2443_HCLKCON_CFC (1<<17)#define S3C2443_HCLKCON_SSMC (1<<18)
arch/arm/mach-s3c2416/clock.c +13 -5
@@ -38,12 +38,11 @@ static unsigned int armdiv[8] = { [7] = 8, }; -/* ID to hardware numbering, 0 is HSMMC1, 1 is HSMMC0 */ static struct clksrc_clk hsmmc_div[] = { [0 ] = { .clk = { .name ="hsmmc-div" , - .id =1 , + .id =0 , .parent = &clk_esysclk.clk, }, .reg_div = { .reg =S3C2416_CLKDIV2 , .size =2 , .shift =6 },
@@ -51,7 +50,7 @@ static struct clksrc_clk hsmmc_div[] = { [1] = { .clk = { .name = "hsmmc-div", - .id = 0, + .id = 1, .parent = &clk_esysclk.clk, }, .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 },
@@ -61,7 +60,7 @@ static struct clksrc_clk hsmmc_div[] = {static struct clksrc_clk hsmmc_mux[] = { [0 ] = { .clk = { - .id =1 , + .id =0 , .name ="hsmmc-if" , .ctrlbit = (1 <<6 ), .enable = s3c2443_clkcon_enable_s,
@@ -77,7 +76,7 @@ static struct clksrc_clk hsmmc_mux[] = { }, [1] = { .clk = { - .id = 0, + .id = 1, .name = "hsmmc-if", .ctrlbit = (1 << 12), .enable = s3c2443_clkcon_enable_s,
@@ -93,6 +92,13 @@ static struct clksrc_clk hsmmc_mux[] = { }, }; +static struct clk hsmmc0_clk = { + .name ="hsmmc" , + .id =0 , + .parent = &clk_h, + .enable = s3c2443_clkcon_enable_h, + .ctrlbit =S3C2416_HCLKCON_HSMMC0 , +};static inline unsigned int s3c2416_fclk_div (unsigned long clkcon0) {
@@ -130,6 +136,8 @@ void __init s3c2416_init_clocks(int xtal)for (ptr =0 ; ptr <ARRAY_SIZE (clksrcs); ptr++)s3c_register_clksrc (clksrcs[ptr],1 ); +s3c24xx_register_clock (&hsmmc0_clk); +s3c_pwmclk_init (); }
arch/arm/mach-s3c2443/Kconfig +1 -1
@@ -24,7 +24,7 @@ config MACH_SMDK2443 bool "SMDK2443" select CPU_S3C2443 select MACH_SMDK - select S3C_DEV_HSMMC + select S3C_DEV_HSMMC1 help Say Y here if you are using an SMDK2443
arch/arm/mach-s3c2443/clock.c +2 -2
@@ -196,7 +196,7 @@ static struct clksrc_clk clk_hsspi = {static struct clksrc_clk clk_hsmmc_div = { .clk = { .name ="hsmmc-div" , - .id =-1 , + .id =1 , .parent = &clk_esysclk.clk, }, .reg_div = { .reg =S3C2443_CLKDIV1 , .size =2 , .shift =6 },
@@ -231,7 +231,7 @@ static int s3c2443_enable_hsmmc(struct clk *clk, int enable)static struct clk clk_hsmmc = { .name ="hsmmc-if" , - .id =-1 , + .id =1 , .parent = &clk_hsmmc_div.clk, .enable = s3c2443_enable_hsmmc, .ops = &(struct clk_ops ) {
arch/arm/mach-s3c2443/mach-smdk2443.c +1 -1
@@ -105,7 +105,7 @@ static struct s3c2410_uartcfg smdk2443_uartcfgs[] __initdata = {static struct platform_device *smdk2443_devices[]__initdata = { &s3c_device_wdt, &s3c_device_i2c0, - &s3c_device_hsmmc0, + &s3c_device_hsmmc1, #ifdef CONFIG_SND_SOC_SMDK2443_WM9710 &s3c_device_ac97, #endif
arch/arm/plat-s3c24xx/s3c2443-clock.c +1 -1
@@ -271,7 +271,7 @@ static struct clk init_clocks[] = { .ctrlbit = S3C2443_HCLKCON_DMA5, }, { .name = "hsmmc", - .id = 0, + .id = 1, .parent = &clk_h, .enable = s3c2443_clkcon_enable_h, .ctrlbit = S3C2443_HCLKCON_HSMMC,
Signature · 1 line
1.7.2.3
PATCH 2/10 ARM S3C2416: Add address map and clock definitions for HSMMC0
Quoted 4 lines · Yauhen Kharuzhy
Define maps for HSMMC devices.
S3C2443 has one HSMMC device with base address
0x4A800000.
Hmm...according to data sheet, there are two SD/MMC on S3C2443. The base address of channel 0 is 0x4A800000 and channel 1 is 0x5A000000. So, need to update your patch.
Quoted 4 lines
S3C2416 has HSMMC0 at
0x4AC00000and HSMMC1 at0x4A800000.So suppose that S3C2443 has only HSMMC1.
Hmm...
Quoted 3 lines
Define clock for hsmmc0 device and register it.
Signed-off-by Yauhen Kharuzhy <[email protected]>
I meant you used different here so asked...anyway...
Quoted 5 lines
--- arch/arm/mach-s3c2410/include/mach/irqs.h | 4 ++-- arch/arm/mach-s3c2410/include/mach/map.h | 4 ++-- .../mach-s3c2410/include/mach/regs-s3c2443-clock.h | 1 + arch/arm/mach-s3c2416/clock.c | 18
+++++++++++++-----
Quoted 17 lines
arch/arm/mach-s3c2443/Kconfig | 2 +- arch/arm/mach-s3c2443/clock.c | 4 ++-- arch/arm/mach-s3c2443/mach-smdk2443.c | 2 +- arch/arm/plat-s3c24xx/s3c2443-clock.c | 2 +- 8 files changed, 23 insertions(+), 14 deletions(-)arch/arm/mach- renamed from arch/arm/mach-s3c2410/include/mach/irqs.h +0
-0
s3c2410/include/mach/irqs.h
index 11bb0f0..e5a68ea 100644arch/arm/mach-s3c2410/include/mach/irqs.h +0
-0@@ -152,8 +152,8 @@#define IRQ_S3C2416_HSMMC0 S3C2410_IRQ(21)/* S3C2416/S3C2450 */
arch/arm/mach-s3c2410/include/mach/irqs.h line 156
Quoted 4 lines
arch/arm/mach-s3c2410/include/mach/irqs.h +2
-2-#define IRQ_HSMMC0 IRQ_S3C2443_HSMMC -#define IRQ_HSMMC1 IRQ_S3C2416_HSMMC0 +#define IRQ_HSMMC0 IRQ_S3C2416_HSMMC0 +#define IRQ_HSMMC1 IRQ_S3C2443_HSMMC
Hmm...yeah, IRQ_HSMMC0 is (21) and IRQ_HSMMC1 is (20).
Quoted 8 lines
#define
IRQ_S3C2443_LCD1S3C2410_IRQSUB(14)
#defineIRQ_S3C2443_LCD2S3C2410_IRQSUB(15)arch/arm/mach- renamed from arch/arm/mach-s3c2410/include/mach/map.h +0
-0
s3c2410/include/mach/map.h
index cd3983a..25bbf5a 100644
arch/arm/mach-s3c2410/include/mach/map.h line 116
Quoted 7 lines
arch/arm/mach-s3c2410/include/mach/map.h +2
-2@@ -112,8 +112,8 @@#define S3C_PA_IIC S3C2410_PA_IIC#define S3C_PA_UART S3C24XX_PA_UART#define S3C_PA_USBHOST S3C2410_PA_USBHOST -#define S3C_PA_HSMMC0 S3C2443_PA_HSMMC -#define S3C_PA_HSMMC1 S3C2416_PA_HSMMC0 +#define S3C_PA_HSMMC0 S3C2416_PA_HSMMC0 +#define S3C_PA_HSMMC1 S3C2443_PA_HSMMC
Please refer to my previous comment.
S3C2443 has 2 channel.
arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h line 89
Quoted 13 lines
arch/arm/mach-s3c2410/include/mach/map.h +0
-0#define S3C_PA_WDT S3C2410_PA_WATCHDOG#define S3C_PA_NAND S3C24XX_PA_NANDarch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h +1
-0@@ -86,6 +86,7 @@#define S3C2443_HCLKCON_LCDC (1<<9)#define S3C2443_HCLKCON_USBH (1<<11)#define S3C2443_HCLKCON_USBD (1<<12) +#define S3C2416_HCLKCON_HSMMC0 (1<<15)
Right.
arch/arm/mach-s3c2416/clock.c static unsigned int armdiv[8] = { · line 41
Quoted 12 lines
arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h +0
-0#define S3C2443_HCLKCON_HSMMC (1<<16)#define S3C2443_HCLKCON_CFC (1<<17)#define S3C2443_HCLKCON_SSMC (1<<18)arch/arm/mach-s3c2416/clock.c +0
-1@@ -38,12 +38,11 @@ static unsigned int armdiv[8] = { [7] = 8, }; -/* ID to hardware numbering, 0 is HSMMC1, 1 is HSMMC0 */
Why remove?
arch/arm/mach-s3c2416/clock.c static unsigned int armdiv[8] = {
Quoted 9 lines
arch/arm/mach-s3c2416/clock.c +1
-1static struct clksrc_clk hsmmc_div[] = { [0 ] = { .clk = { .name ="hsmmc-div" , - .id =1 , + .id =0 , .parent = &clk_esysclk.clk, }, .reg_div = { .reg =S3C2416_CLKDIV2 , .size =2 , .shift =6
},
arch/arm/mach-s3c2416/clock.c static struct clksrc_clk hsmmc_div[] = { · line 56
Quoted 9 lines
arch/arm/mach-s3c2416/clock.c +1
-1@@ -51,7 +50,7 @@ static struct clksrc_clk hsmmc_div[] = { [1] = { .clk = { .name = "hsmmc-div", - .id = 0, + .id = 1, .parent = &clk_esysclk.clk, }, .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6
},
Quoted 46 lines
arch/arm/mach-s3c2416/clock.c +11
-2@@ -61,7 +60,7 @@ static struct clksrc_clk hsmmc_div[] = {static struct clksrc_clk hsmmc_mux[] = { [0 ] = { .clk = { - .id =1 , + .id =0 , .name ="hsmmc-if" , .ctrlbit = (1 <<6 ), .enable = s3c2443_clkcon_enable_s,@@ -77,7 +76,7 @@ static struct clksrc_clk hsmmc_mux[] = { }, [1] = { .clk = { - .id = 0, + .id = 1, .name = "hsmmc-if", .ctrlbit = (1 << 12), .enable = s3c2443_clkcon_enable_s,@@ -93,6 +92,13 @@ static struct clksrc_clk hsmmc_mux[] = { }, }; +static struct clk hsmmc0_clk = { + .name ="hsmmc" , + .id =0 , + .parent = &clk_h, + .enable = s3c2443_clkcon_enable_h, + .ctrlbit =S3C2416_HCLKCON_HSMMC0 , +};static inline unsigned int s3c2416_fclk_div (unsigned long clkcon0) {@@ -130,6 +136,8 @@ void __init s3c2416_init_clocks(int xtal)for (ptr =0 ; ptr <ARRAY_SIZE (clksrcs); ptr++)s3c_register_clksrc (clksrcs[ptr],1 ); +s3c24xx_register_clock (&hsmmc0_clk); +s3c_pwmclk_init (); }arch/arm/mach-s3c2443/Kconfig +0
-0
arch/arm/mach-s3c2443/Kconfig config MACH_SMDK2443 · line 27
Quoted 5 lines
arch/arm/mach-s3c2443/Kconfig +1
-1@@ -24,7 +24,7 @@ config MACH_SMDK2443 bool "SMDK2443" select CPU_S3C2443 select MACH_SMDK - select S3C_DEV_HSMMC + select S3C_DEV_HSMMC1
Please check S3C2443's HSMMC...
Quoted 47 lines
arch/arm/mach-s3c2443/Kconfig +0
-0help Say Y here if you are using an SMDK2443arch/arm/mach-s3c2443/clock.c +2
-2@@ -196,7 +196,7 @@ static struct clksrc_clk clk_hsspi = {static struct clksrc_clk clk_hsmmc_div = { .clk = { .name ="hsmmc-div" , - .id =-1 , + .id =1 , .parent = &clk_esysclk.clk, }, .reg_div = { .reg =S3C2443_CLKDIV1 , .size =2 , .shift =6 },@@ -231,7 +231,7 @@ static int s3c2443_enable_hsmmc(struct clk *clk, int enable) static struct clk clk_hsmmc = { .name ="hsmmc-if" , - .id =-1 , + .id =1 , .parent = &clk_hsmmc_div.clk, .enable = s3c2443_enable_hsmmc,arch/arm/mach-s3c2443/clock.c +0
-0.ops = &(struct clk_ops) {arch/arm/mach- renamed from arch/arm/mach-s3c2443/mach-smdk2443.c +0
-0
s3c2443/mach-smdk2443.c
index 4337f0a..d3b2922 100644arch/arm/mach-s3c2443/mach-smdk2443.c +1
-1@@ -105,7 +105,7 @@ static struct s3c2410_uartcfg smdk2443_uartcfgs[] __initdata = {static struct platform_device *smdk2443_devices[]__initdata = { &s3c_device_wdt, &s3c_device_i2c0, - &s3c_device_hsmmc0, + &s3c_device_hsmmc1, #ifdef CONFIG_SND_SOC_SMDK2443_WM9710 &s3c_device_ac97,#endif
arch/arm/plat- renamed from arch/arm/plat-s3c24xx/s3c2443-clock.c +0
-0
s3c24xx/s3c2443-clock.c
index 461f070..82f2d4a 100644
arch/arm/plat-s3c24xx/s3c2443-clock.c static struct clk init_clocks[] = {
Quoted 9 lines
arch/arm/plat-s3c24xx/s3c2443-clock.c +1
-2@@ -271,7 +271,7 @@ static struct clk init_clocks[] = { .ctrlbit = S3C2443_HCLKCON_DMA5, }, { .name = "hsmmc", - .id = 0, + .id = 1, .parent = &clk_h, .enable = s3c2443_clkcon_enable_h, .ctrlbit = S3C2443_HCLKCON_HSMMC, --
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 2/10 ARM S3C2416: Add address map and clock definitions for HSMMC0
Quoted 9 lines · Kukjin Kim
Quoted 4 lines · Yauhen Kharuzhy
Define maps for HSMMC devices.
S3C2443 has one HSMMC device with base address
0x4A800000.Hmm...according to data sheet, there are two SD/MMC on S3C2443. The base address of channel 0 is
0x4A800000and channel 1 is0x5A000000. So, need to update your patch.
No. 0x5A000000 is old-style SD Interface, HSMMC is SDHCI. They are handled by different drivers.
Quoted 88 lines
Quoted 5 lines
S3C2416 has HSMMC0 at
0x4AC00000and HSMMC1 at0x4A800000.So suppose that S3C2443 has only HSMMC1.
Hmm...
Quoted 3 lines
Define clock for hsmmc0 device and register it.
Signed-off-by Yauhen Kharuzhy <[email protected]>I meant you used different here so asked...anyway...
Quoted 5 lines
--- arch/arm/mach-s3c2410/include/mach/irqs.h | 4 ++-- arch/arm/mach-s3c2410/include/mach/map.h | 4 ++-- .../mach-s3c2410/include/mach/regs-s3c2443-clock.h | 1 + arch/arm/mach-s3c2416/clock.c | 18+++++++++++++-----
Quoted 17 lines
arch/arm/mach-s3c2443/Kconfig | 2 +- arch/arm/mach-s3c2443/clock.c | 4 ++-- arch/arm/mach-s3c2443/mach-smdk2443.c | 2 +- arch/arm/plat-s3c24xx/s3c2443-clock.c | 2 +- 8 files changed, 23 insertions(+), 14 deletions(-)arch/arm/mach- renamed from arch/arm/mach-s3c2410/include/mach/irqs.h +0
-0
s3c2410/include/mach/irqs.h
index 11bb0f0..e5a68ea 100644arch/arm/mach-s3c2410/include/mach/irqs.h +0
-0@@ -152,8 +152,8 @@#define IRQ_S3C2416_HSMMC0 S3C2410_IRQ(21)/* S3C2416/S3C2450 */
arch/arm/mach-s3c2410/include/mach/irqs.h line 156
Quoted 4 lines
arch/arm/mach-s3c2410/include/mach/irqs.h +2
-2-#define IRQ_HSMMC0 IRQ_S3C2443_HSMMC -#define IRQ_HSMMC1 IRQ_S3C2416_HSMMC0 +#define IRQ_HSMMC0 IRQ_S3C2416_HSMMC0 +#define IRQ_HSMMC1 IRQ_S3C2443_HSMMCHmm...yeah,
IRQ_HSMMC0is (21) andIRQ_HSMMC1is (20).Quoted 8 lines
#define
IRQ_S3C2443_LCD1S3C2410_IRQSUB(14)
#defineIRQ_S3C2443_LCD2S3C2410_IRQSUB(15)arch/arm/mach- renamed from arch/arm/mach-s3c2410/include/mach/map.h +0
-0
s3c2410/include/mach/map.h
index cd3983a..25bbf5a 100644arch/arm/mach-s3c2410/include/mach/map.h line 116
Quoted 7 lines
arch/arm/mach-s3c2410/include/mach/map.h +2
-2@@ -112,8 +112,8 @@#define S3C_PA_IIC S3C2410_PA_IIC#define S3C_PA_UART S3C24XX_PA_UART#define S3C_PA_USBHOST S3C2410_PA_USBHOST -#define S3C_PA_HSMMC0 S3C2443_PA_HSMMC -#define S3C_PA_HSMMC1 S3C2416_PA_HSMMC0 +#define S3C_PA_HSMMC0 S3C2416_PA_HSMMC0 +#define S3C_PA_HSMMC1 S3C2443_PA_HSMMCPlease refer to my previous comment.
S3C2443 has 2 channel.arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h line 89
Quoted 13 lines
arch/arm/mach-s3c2410/include/mach/map.h +0
-0#define S3C_PA_WDT S3C2410_PA_WATCHDOG#define S3C_PA_NAND S3C24XX_PA_NANDarch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h +1
-0@@ -86,6 +86,7 @@#define S3C2443_HCLKCON_LCDC (1<<9)#define S3C2443_HCLKCON_USBH (1<<11)#define S3C2443_HCLKCON_USBD (1<<12) +#define S3C2416_HCLKCON_HSMMC0 (1<<15)Right.
Quoted 11 lines
arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h +0
-0#define S3C2443_HCLKCON_HSMMC (1<<16)#define S3C2443_HCLKCON_CFC (1<<17)#define S3C2443_HCLKCON_SSMC (1<<18)arch/arm/mach-s3c2416/clock.c +0
-0@@ -38,12 +38,11 @@ static unsigned int armdiv[8] = { [7] = 8, };
Quoted 3 lines
arch/arm/mach-s3c2416/clock.c static unsigned int armdiv[8] = { · line 41
Quoted 1 line
arch/arm/mach-s3c2416/clock.c +0
-1-/* ID to hardware numbering, 0 is HSMMC1, 1 is HSMMC0 */ Why remove?
Now 0 is HSMMC0 and 1 is HSMMC1. I think that this should be obviously without comment.
Quoted 132 lines
arch/arm/mach-s3c2416/clock.c static unsigned int armdiv[8] = {
Quoted 10 lines
arch/arm/mach-s3c2416/clock.c +1
-1static struct clksrc_clk hsmmc_div[] = { [0 ] = { .clk = { .name ="hsmmc-div" , - .id =1 , + .id =0 , .parent = &clk_esysclk.clk, }, .reg_div = { .reg =S3C2416_CLKDIV2 , .size =2 , .shift =6 },
arch/arm/mach-s3c2416/clock.c static struct clksrc_clk hsmmc_div[] = { · line 56
Quoted 9 lines
arch/arm/mach-s3c2416/clock.c +1
-1@@ -51,7 +50,7 @@ static struct clksrc_clk hsmmc_div[] = { [1] = { .clk = { .name = "hsmmc-div", - .id = 0, + .id = 1, .parent = &clk_esysclk.clk, }, .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6},
Quoted 46 lines
arch/arm/mach-s3c2416/clock.c +11
-2@@ -61,7 +60,7 @@ static struct clksrc_clk hsmmc_div[] = {static struct clksrc_clk hsmmc_mux[] = { [0 ] = { .clk = { - .id =1 , + .id =0 , .name ="hsmmc-if" , .ctrlbit = (1 <<6 ), .enable = s3c2443_clkcon_enable_s,@@ -77,7 +76,7 @@ static struct clksrc_clk hsmmc_mux[] = { }, [1] = { .clk = { - .id = 0, + .id = 1, .name = "hsmmc-if", .ctrlbit = (1 << 12), .enable = s3c2443_clkcon_enable_s,@@ -93,6 +92,13 @@ static struct clksrc_clk hsmmc_mux[] = { }, }; +static struct clk hsmmc0_clk = { + .name ="hsmmc" , + .id =0 , + .parent = &clk_h, + .enable = s3c2443_clkcon_enable_h, + .ctrlbit =S3C2416_HCLKCON_HSMMC0 , +};static inline unsigned int s3c2416_fclk_div (unsigned long clkcon0) {@@ -130,6 +136,8 @@ void __init s3c2416_init_clocks(int xtal)for (ptr =0 ; ptr <ARRAY_SIZE (clksrcs); ptr++)s3c_register_clksrc (clksrcs[ptr],1 ); +s3c24xx_register_clock (&hsmmc0_clk); +s3c_pwmclk_init (); }arch/arm/mach-s3c2443/Kconfig +0
-0arch/arm/mach-s3c2443/Kconfig config MACH_SMDK2443 · line 27
Quoted 5 lines
arch/arm/mach-s3c2443/Kconfig +1
-1@@ -24,7 +24,7 @@ config MACH_SMDK2443 bool "SMDK2443" select CPU_S3C2443 select MACH_SMDK - select S3C_DEV_HSMMC + select S3C_DEV_HSMMC1Please check S3C2443's HSMMC...
Quoted 56 lines
arch/arm/mach-s3c2443/Kconfig +0
-0help Say Y here if you are using an SMDK2443arch/arm/mach-s3c2443/clock.c +2
-2@@ -196,7 +196,7 @@ static struct clksrc_clk clk_hsspi = {static struct clksrc_clk clk_hsmmc_div = { .clk = { .name ="hsmmc-div" , - .id =-1 , + .id =1 , .parent = &clk_esysclk.clk, }, .reg_div = { .reg =S3C2443_CLKDIV1 , .size =2 , .shift =6 },@@ -231,7 +231,7 @@ static int s3c2443_enable_hsmmc(struct clk *clk, int enable) static struct clk clk_hsmmc = { .name ="hsmmc-if" , - .id =-1 , + .id =1 , .parent = &clk_hsmmc_div.clk, .enable = s3c2443_enable_hsmmc,arch/arm/mach-s3c2443/clock.c +0
-0.ops = &(struct clk_ops) {arch/arm/mach- renamed from arch/arm/mach-s3c2443/mach-smdk2443.c +0
-0
s3c2443/mach-smdk2443.c
index 4337f0a..d3b2922 100644arch/arm/mach-s3c2443/mach-smdk2443.c +1
-1@@ -105,7 +105,7 @@ static struct s3c2410_uartcfg smdk2443_uartcfgs[] __initdata = {static struct platform_device *smdk2443_devices[]__initdata = { &s3c_device_wdt, &s3c_device_i2c0, - &s3c_device_hsmmc0, + &s3c_device_hsmmc1, #ifdef CONFIG_SND_SOC_SMDK2443_WM9710 &s3c_device_ac97,#endif
arch/arm/plat- renamed from arch/arm/plat-s3c24xx/s3c2443-clock.c +0
-0
s3c24xx/s3c2443-clock.c
index 461f070..82f2d4a 100644arch/arm/plat-s3c24xx/s3c2443-clock.c +1
-2@@ -271,7 +271,7 @@ static struct clk init_clocks[] = { .ctrlbit = S3C2443_HCLKCON_DMA5, }, { .name = "hsmmc", - .id = 0, + .id = 1, .parent = &clk_h, .enable = s3c2443_clkcon_enable_h, .ctrlbit = S3C2443_HCLKCON_HSMMC, --
Signature · 5 lines
Yauhen Kharuzhy jekhor _at_ gmail.com JID: jek at jabber.ru A: No Q: Should I quote below my post?
PATCH 2/10 ARM S3C2416: Add address map and clock definitions for HSMMC0
Quoted 6 lines · Yauhen Kharuzhy
Quoted 4 lines · Kukjin Kim
Quoted 3 lines · Yauhen Kharuzhy
Define maps for HSMMC devices.
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
S3C2443 has one HSMMC device with base address
0x4A800000.Hmm...according to data sheet, there are two SD/MMC on S3C2443. The base address of channel 0 is
0x4A800000and channel 1 is0x5A000000. So, need to update your patch.No.
0x5A000000is old-style SD Interface, HSMMC is SDHCI. They are handled by different drivers.
Hi Yauhen,
Beginning next week, I will continue to review this and your other following patches.
- [PATCH] ARM S3C24XX: Fix compilation of PM code for S3C2416
- [PATCH v2] ARM: S3C2416: Add platform helpers for setup SDHCI
It's late here ;-)
Quoted 10 lines
Quoted 10 lines
Quoted 5 lines
S3C2416 has HSMMC0 at
0x4AC00000and HSMMC1 at0x4A800000.So suppose that S3C2443 has only HSMMC1.
Hmm...
Quoted 3 lines
Define clock for hsmmc0 device and register it.
Signed-off-by Yauhen Kharuzhy <[email protected]>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 3/10 ARM: S3C2416: Add platform helpers for setup SDHCI
In reply to Yauhen KharuzhySamsung S3C2416 has two SDHCI controllers compatible with other Samsung's SoCs (S3C64XX, S5PC100 etc...).
Add required platform setup code that the devices can be used with sdhci-s3c driver.
--- arch/arm/mach-s3c2416/Kconfig | 12 +++++ arch/arm/mach-s3c2416/Makefile | 4 ++ arch/arm/mach-s3c2416/s3c2416.c | 5 ++ arch/arm/mach-s3c2416/setup-sdhci-gpio.c | 58 ++++++++++++++++++++++++++ arch/arm/mach-s3c2416/setup-sdhci.c | 62 ++++++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/sdhci.h | 35 ++++++++++++++++ 6 files changed, 176 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s3c2416/setup-sdhci-gpio.c create mode 100644 arch/arm/mach-s3c2416/setup-sdhci.c
arch/arm/mach-s3c2416/Kconfig +12 -0
@@ -30,6 +30,17 @@ config S3C2416_PM help Internal config node to apply S3C2416 power management +config S3C2416_SETUP_SDHCI + bool + select S3C2416_SETUP_SDHCI_GPIO + help + Internal helper functions for S3C2416 based SDHCI systems + +config S3C2416_SETUP_SDHCI_GPIO + bool + help + Common setup code for SDHCI gpio. + menu "S3C2416 Machines" config MACH_SMDK2416
@@ -41,6 +52,7 @@ config MACH_SMDK2416 select S3C_DEV_HSMMC1 select S3C_DEV_NAND select S3C_DEV_USB_HOST + select S3C2416_SETUP_SDHCI select S3C2416_PM if PM help Say Y here if you are using an SMDK2416
arch/arm/mach-s3c2416/Makefile +4 -0
@@ -14,6 +14,10 @@ obj-$(CONFIG_CPU_S3C2416) += irq.o obj-$(CONFIG_S3C2416_PM) += pm.o #obj-$(CONFIG_S3C2416_DMA) += dma.o +# Device setup +obj-$(CONFIG_S3C2416_SETUP_SDHCI) += setup-sdhci.o +obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o + # Machine support obj-$(CONFIG_MACH_SMDK2416) += mach-smdk2416.o
arch/arm/mach-s3c2416/s3c2416.c +5 -0
@@ -53,6 +53,7 @@#include <plat/s3c2416.h> #include <plat/devs.h> #include <plat/cpu.h> +#include <plat/sdhci.h> #include <plat/iic-core.h> #include <plat/fb-core.h>
@@ -115,6 +116,10 @@ void __init s3c2416_map_io(void) s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_updown; s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_updown; +/* initialize device information early */ +s3c2416_default_sdhci0 (); +s3c2416_default_sdhci1 (); +iotable_init (s3c2416_iodesc,ARRAY_SIZE (s3c2416_iodesc)); }
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +58 -0
58 lines not on this page · raw message
arch/arm/mach-s3c2416/setup-sdhci.c new file +62 -0
62 lines not on this page · raw message
arch/arm/plat-samsung/include/plat/sdhci.h +35 -0
@@ -121,6 +121,8 @@ extern void s5pv310_setup_sdhci0_cfg_gpio(struct platform_device *, int w);extern void s5pv310_setup_sdhci1_cfg_gpio (struct platform_device *,int w);extern void s5pv310_setup_sdhci2_cfg_gpio (struct platform_device *,int w);extern void s5pv310_setup_sdhci3_cfg_gpio (struct platform_device *,int w); +extern void s3c2416_setup_sdhci0_cfg_gpio (struct platform_device *,int w); +extern void s3c2416_setup_sdhci1_cfg_gpio (struct platform_device *,int w);/* S3C64XX SDHCI setup */
@@ -299,6 +301,39 @@ static inline void s5pv210_default_sdhci3(void) { }#endif /* CONFIG_S5PV210_SETUP_SDHCI */ +/* S3C2416 SDHCI setup */ +#ifdef CONFIG_S3C2416_SETUP_SDHCI +extern char *s3c2416_hsmmc_clksrcs[4 ]; + +extern void s3c2416_setup_sdhci_cfg_card (struct platform_device *dev, +void __iomem *r, +struct mmc_ios *ios, +struct mmc_card *card); + +#ifdef CONFIG_S3C_DEV_HSMMC +static inline void s3c2416_default_sdhci0 (void ) +{ + s3c_hsmmc0_def_platdata.clocks = s3c2416_hsmmc_clksrcs; + s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio; + s3c_hsmmc0_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; +} +#else +static inline void s3c2416_default_sdhci0 (void ) { } +#endif /* CONFIG_S3C_DEV_HSMMC */ + +#ifdef CONFIG_S3C_DEV_HSMMC1 +static inline void s3c2416_default_sdhci1 (void ) +{ + s3c_hsmmc1_def_platdata.clocks = s3c2416_hsmmc_clksrcs; + s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio; + s3c_hsmmc1_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; +} +#else +static inline void s3c2416_default_sdhci1 (void ) { } +#endif /* CONFIG_S3C_DEV_HSMMC1 */ + +#endif /* CONFIG_S3C2416_SETUP_SDHCI */ +/* S5PV310 SDHCI setup */ #ifdef CONFIG_S5PV310_SETUP_SDHCI extern char *s5pv310_hsmmc_clksrcs[4 ];
Signature · 1 line
1.7.2.3
PATCH 3/10 ARM: S3C2416: Add platform helpers for setup SDHCI
Quoted 7 lines · Yauhen Kharuzhy
Samsung S3C2416 has two SDHCI controllers compatible with other Samsung's SoCs (S3C64XX, S5PC100 etc...).
Add required platform setup code that the devices can be used with sdhci-s3c driver.
Quoted 6 lines
Signed-off-by Yauhen Kharuzhy <[email protected]>--- arch/arm/mach-s3c2416/Kconfig | 12 +++++ arch/arm/mach-s3c2416/Makefile | 4 ++ arch/arm/mach-s3c2416/s3c2416.c | 5 ++ arch/arm/mach-s3c2416/setup-sdhci-gpio.c | 58
++++++++++++++++++++++++++
Review
Quoted 38 lines
arch/arm/mach-s3c2416/setup-sdhci.c | 62 ++++++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/sdhci.h | 35 ++++++++++++++++ 6 files changed, 176 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s3c2416/setup-sdhci-gpio.c create mode 100644 arch/arm/mach-s3c2416/setup-sdhci.carch/arm/mach-s3c2416/Kconfig +12
-0@@ -30,6 +30,17 @@ config S3C2416_PM help Internal config node to apply S3C2416 power management +config S3C2416_SETUP_SDHCI + bool + select S3C2416_SETUP_SDHCI_GPIO + help + Internal helper functions for S3C2416 based SDHCI systems + +config S3C2416_SETUP_SDHCI_GPIO + bool + help + Common setup code for SDHCI gpio. + menu "S3C2416 Machines" config MACH_SMDK2416@@ -41,6 +52,7 @@ config MACH_SMDK2416 select S3C_DEV_HSMMC1 select S3C_DEV_NAND select S3C_DEV_USB_HOST + select S3C2416_SETUP_SDHCI select S3C2416_PM if PM help Say Y here if you are using an SMDK2416(quoted diff) +0
-0
b/arch/arm/mach-s3c2416/Makefile
Quoted 56 lines
index ef038d6..7b805b2 100644
arch/arm/mach-s3c2416/Makefile +4
-0@@ -14,6 +14,10 @@ obj-$(CONFIG_CPU_S3C2416) += irq.o obj-$(CONFIG_S3C2416_PM) += pm.o #obj-$(CONFIG_S3C2416_DMA) += dma.o +# Device setup +obj-$(CONFIG_S3C2416_SETUP_SDHCI) += setup-sdhci.o +obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o + # Machine support obj-$(CONFIG_MACH_SMDK2416) += mach-smdk2416.oarch/arm/mach- renamed from arch/arm/mach-s3c2416/s3c2416.c +0
-0
s3c2416/s3c2416.c
index 63f39cd..ba7fd87 100644arch/arm/mach-s3c2416/s3c2416.c +5
-0@@ -53,6 +53,7 @@#include <plat/s3c2416.h> #include <plat/devs.h> #include <plat/cpu.h> +#include <plat/sdhci.h> #include <plat/iic-core.h> #include <plat/fb-core.h> @@ -115,6 +116,10 @@ void __init s3c2416_map_io(void) s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_updown; s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_updown; +/* initialize device information early */ +s3c2416_default_sdhci0 (); +s3c2416_default_sdhci1 (); +iotable_init (s3c2416_iodesc,ARRAY_SIZE (s3c2416_iodesc)); }arch/arm/mach- renamed from arch/arm/mach-s3c2416/setup-sdhci-gpio.c +0
-0
s3c2416/setup-sdhci-gpio.c
new file mode 100644
index 0000000..68ac523arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +11
-0@@ -0,0 +1,58 @@ +/* linux/arch/arm/plat-s3c2416/setup-sdhci-gpio.c +* +* Copyright 2010 Promwad Innovation Company +* Yauhen Kharuzhy <[email protected]> +* +* S3C2416 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC) +* +* Based on mach-s3c64xx/setup-sdhci-gpio.c +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as
arch/arm/mach-s3c2416/setup-sdhci-gpio.c line 21
Quoted 10 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +10
-0+* published by the Free Software Foundation. +*/ + +#include <linux/kernel.h> +#include <linux/types.h> +#include <linux/interrupt.h> +#include <linux/platform_device.h> +#include <linux/io.h> + +#include <mach/gpio.h>
Should be <linux/gpio.h>
arch/arm/mach-s3c2416/setup-sdhci-gpio.c
Quoted 4 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +4
-0+#include <mach/regs-gpio.h> +#include <plat/gpio-cfg.h> + +void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *dev, int
width)
arch/arm/mach-s3c2416/setup-sdhci-gpio.c line 37
Quoted 12 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +12
-0+{ +unsigned int gpio; +unsigned int end; + + end =S3C2410_GPE (7 + width); + +/* Set all the necessary GPE pins to special-function 0 */ +for (gpio =S3C2410_GPE (5 ); gpio < end; gpio++) { +s3c_gpio_cfgpin (gpio,S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (gpio,S3C_GPIO_PULL_NONE ); + } +}
Following is better.
+void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) +{
+ s3c_gpio_cfgrange_nopull(S3C2410_GPE(5), 2 + width,S3C_GPIO_SFN(2));
+}
arch/arm/mach-s3c2416/setup-sdhci-gpio.c line 39
Quoted 2 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +2
-0+ +void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *dev, int
width)
Quoted 9 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +9
-0+{ +unsigned int gpio; +unsigned int end; + + end =S3C2410_GPL (0 + width); + +/* Set all the necessary GPG pins to special-function 0 */ +for (gpio =S3C2410_GPL (0 ); gpio < end; gpio++) { +s3c_gpio_cfgpin (gpio,S3C_GPIO_SFN (2 ));
arch/arm/mach-s3c2416/setup-sdhci-gpio.c line 58
Quoted 10 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +10
-0+s3c_gpio_setpull (gpio,S3C_GPIO_PULL_NONE ); + } + +s3c_gpio_cfgpin (S3C2410_GPL (8 ),S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (S3C2410_GPL (8 ),S3C_GPIO_PULL_NONE ); +s3c_gpio_cfgpin (S3C2410_GPL (9 ),S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (S3C2410_GPL (9 ),S3C_GPIO_PULL_NONE ); +} + +
no need 2 empty lines.
Same...how about following?
+void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) +{
+ s3c_gpio_cfgrange_nopull(S3C2410_GPL(0), width, S3C_GPIO_SFN(2));
+ s3c_gpio_cfgrange_nopull(S3C2410_GPL(8), 2, S3C_GPIO_SFN(2));
+}
Quoted 59 lines
arch/arm/mach- renamed from arch/arm/mach-s3c2416/setup-sdhci.c +0
-0
s3c2416/setup-sdhci.c
new file mode 100644
index 0000000..345ddd1arch/arm/mach-s3c2416/setup-sdhci.c new file +52
-0@@ -0,0 +1,62 @@ +/* linux/arch/arm/mach-s3c2416/setup-sdhci.c +* +* Copyright 2010 Promwad Innovation Company +* Yauhen Kharuzhy <[email protected]> +* +* S3C2416 - Helper functions for settign up SDHCI device(s) (HSMMC) +* +* Based on mach-s3c64xx/setup-sdhci.c +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#include <linux/kernel.h> +#include <linux/types.h> +#include <linux/interrupt.h> +#include <linux/platform_device.h> +#include <linux/io.h> + +#include <linux/mmc/card.h> +#include <linux/mmc/host.h> + +#include <plat/regs-sdhci.h> +#include <plat/sdhci.h> + +/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */ + +char *s3c2416_hsmmc_clksrcs[4 ] = { + [0 ] ="hsmmc" , + [1 ] ="hsmmc" , + [2 ] ="hsmmc-if" , +/* [3] = "48m", - note not successfully used yet */ +}; + +void s3c2416_setup_sdhci_cfg_card (struct platform_device *dev, +void __iomem *r, +struct mmc_ios *ios, +struct mmc_card *card) +{ +u32 ctrl2, ctrl3; + + ctrl2 =readl (r +S3C_SDHCI_CONTROL2 ); + ctrl2 &=S3C_SDHCI_CTRL2_SELBASECLK_MASK ; + ctrl2 |= (S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR | +S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK | +S3C_SDHCI_CTRL2_ENFBCLKRX | +S3C_SDHCI_CTRL2_DFCNT_NONE | +S3C_SDHCI_CTRL2_ENCLKOUTHOLD ); + +if (ios->clock <25 *1000000 ) + ctrl3 = (S3C_SDHCI_CTRL3_FCSEL3 |
arch/arm/mach-s3c2416/setup-sdhci.c line 62
Quoted 10 lines
arch/arm/mach-s3c2416/setup-sdhci.c new file +10
-0+S3C_SDHCI_CTRL3_FCSEL2 | +S3C_SDHCI_CTRL3_FCSEL1 | + S3C_SDHCI_CTRL3_FCSEL0); + else + ctrl3 = (S3C_SDHCI_CTRL3_FCSEL1 |S3C_SDHCI_CTRL3_FCSEL0 ); + +writel (ctrl2, r +S3C_SDHCI_CONTROL2 ); +writel (ctrl3, r +S3C_SDHCI_CONTROL3 ); +} +
no need last 1 empty line.
arch/arm/plat-samsung/include/plat/sdhci.h extern void s5pv310_setup_sdhci0_cfg_gpio(struct · line 122
Quoted 8 lines
arch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/sdhci.h +0
-0
samsung/include/plat/sdhci.h
index 85853f8..81d801e 100644arch/arm/plat-samsung/include/plat/sdhci.h +0
-0@@ -121,6 +121,8 @@ extern void s5pv310_setup_sdhci0_cfg_gpio(struct platform_device *, int w); extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int
w);
arch/arm/plat-samsung/include/plat/sdhci.h extern void s5pv310_setup_sdhci0_cfg_gpio(struct · line 123
Quoted 1 line
arch/arm/plat-samsung/include/plat/sdhci.h +0
-0extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int
w);
arch/arm/plat-samsung/include/plat/sdhci.h extern void s5pv310_setup_sdhci0_cfg_gpio(struct · line 124
Quoted 1 line
arch/arm/plat-samsung/include/plat/sdhci.h +0
-0extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int
w);
arch/arm/plat-samsung/include/plat/sdhci.h extern void s5pv310_setup_sdhci0_cfg_gpio(struct · line 125
Quoted 1 line
arch/arm/plat-samsung/include/plat/sdhci.h +1
-0+extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int
w);
arch/arm/plat-samsung/include/plat/sdhci.h extern void s5pv310_setup_sdhci0_cfg_gpio(struct · line 126
Quoted 1 line
arch/arm/plat-samsung/include/plat/sdhci.h +1
-0+extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int
w);
Quoted 16 lines
arch/arm/plat-samsung/include/plat/sdhci.h +9
-0/* S3C64XX SDHCI setup */ @@ -299,6 +301,39 @@ static inline void s5pv210_default_sdhci3(void) { }#endif /* CONFIG_S5PV210_SETUP_SDHCI */ +/* S3C2416 SDHCI setup */ +#ifdef CONFIG_S3C2416_SETUP_SDHCI +extern char *s3c2416_hsmmc_clksrcs[4 ]; + +extern void s3c2416_setup_sdhci_cfg_card (struct platform_device *dev, +void __iomem *r, +struct mmc_ios *ios, +struct mmc_card *card); +
arch/arm/plat-samsung/include/plat/sdhci.h static inline void s5pv210_default_sdhci3(void) { } · line 322
Quoted 10 lines
arch/arm/plat-samsung/include/plat/sdhci.h +10
-0+#ifdef CONFIG_S3C_DEV_HSMMC +static inline void s3c2416_default_sdhci0 (void ) +{ + s3c_hsmmc0_def_platdata.clocks = s3c2416_hsmmc_clksrcs; + s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio; + s3c_hsmmc0_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; +} +#else +static inline void s3c2416_default_sdhci0 (void ) { } +#endif /* CONFIG_S3C_DEV_HSMMC */
+static inline void s3c2416_default_sdhci0(void)
+{
+#ifdef CONFIG_S3C_DEV_HSMMC
+ s3c_hsmmc0_def_platdata.clocks = s3c2416_hsmmc_clksrcs;
+ s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio;
+ s3c_hsmmc0_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card;
+#endif
+}
And please move this before s3c6400_setup_...
arch/arm/plat-samsung/include/plat/sdhci.h static inline void s5pv210_default_sdhci3(void) { } · line 334
Quoted 12 lines
arch/arm/plat-samsung/include/plat/sdhci.h +12
-0+ +#ifdef CONFIG_S3C_DEV_HSMMC1 +static inline void s3c2416_default_sdhci1 (void ) +{ + s3c_hsmmc1_def_platdata.clocks = s3c2416_hsmmc_clksrcs; + s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio; + s3c_hsmmc1_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; +} +#else +static inline void s3c2416_default_sdhci1 (void ) { } +#endif /* CONFIG_S3C_DEV_HSMMC1 */ +
+static inline void s3c2416_default_sdhci1(void)
+{
+#ifdef CONFIG_S3C_DEV_HSMMC1
+ s3c_hsmmc1_def_platdata.clocks = s3c2416_hsmmc_clksrcs;
+ s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio;
+ s3c_hsmmc1_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card;
+#endif
+}
arch/arm/plat-samsung/include/plat/sdhci.h static inline void s5pv210_default_sdhci3(void) { }
Quoted 6 lines
arch/arm/plat-samsung/include/plat/sdhci.h +2
-1+#endif /* CONFIG_S3C2416_SETUP_SDHCI */ +/* S5PV310 SDHCI setup */ #ifdef CONFIG_S5PV310_SETUP_SDHCI extern char *s5pv310_hsmmc_clksrcs[4 ]; --
And there was no error on board?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 3/10 ARM: S3C2416: Add platform helpers for setup SDHCI
Quoted 146 lines · Kukjin Kim
Quoted 7 lines · Yauhen Kharuzhy
Samsung S3C2416 has two SDHCI controllers compatible with other Samsung's SoCs (S3C64XX, S5PC100 etc...).
Add required platform setup code that the devices can be used with sdhci-s3c driver.
Quoted 6 lines
Signed-off-by Yauhen Kharuzhy <[email protected]>--- arch/arm/mach-s3c2416/Kconfig | 12 +++++ arch/arm/mach-s3c2416/Makefile | 4 ++ arch/arm/mach-s3c2416/s3c2416.c | 5 ++ arch/arm/mach-s3c2416/setup-sdhci-gpio.c | 58++++++++++++++++++++++++++
Review
Quoted 38 lines
arch/arm/mach-s3c2416/setup-sdhci.c | 62 ++++++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/sdhci.h | 35 ++++++++++++++++ 6 files changed, 176 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s3c2416/setup-sdhci-gpio.c create mode 100644 arch/arm/mach-s3c2416/setup-sdhci.carch/arm/mach-s3c2416/Kconfig +12
-0@@ -30,6 +30,17 @@ config S3C2416_PM help Internal config node to apply S3C2416 power management +config S3C2416_SETUP_SDHCI + bool + select S3C2416_SETUP_SDHCI_GPIO + help + Internal helper functions for S3C2416 based SDHCI systems + +config S3C2416_SETUP_SDHCI_GPIO + bool + help + Common setup code for SDHCI gpio. + menu "S3C2416 Machines" config MACH_SMDK2416@@ -41,6 +52,7 @@ config MACH_SMDK2416 select S3C_DEV_HSMMC1 select S3C_DEV_NAND select S3C_DEV_USB_HOST + select S3C2416_SETUP_SDHCI select S3C2416_PM if PM help Say Y here if you are using an SMDK2416(quoted diff) +0
-0b/arch/arm/mach-s3c2416/Makefile
Quoted 56 lines
index ef038d6..7b805b2 100644
arch/arm/mach-s3c2416/Makefile +4
-0@@ -14,6 +14,10 @@ obj-$(CONFIG_CPU_S3C2416) += irq.o obj-$(CONFIG_S3C2416_PM) += pm.o #obj-$(CONFIG_S3C2416_DMA) += dma.o +# Device setup +obj-$(CONFIG_S3C2416_SETUP_SDHCI) += setup-sdhci.o +obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o + # Machine support obj-$(CONFIG_MACH_SMDK2416) += mach-smdk2416.oarch/arm/mach- renamed from arch/arm/mach-s3c2416/s3c2416.c +0
-0
s3c2416/s3c2416.c
index 63f39cd..ba7fd87 100644arch/arm/mach-s3c2416/s3c2416.c +5
-0@@ -53,6 +53,7 @@#include <plat/s3c2416.h> #include <plat/devs.h> #include <plat/cpu.h> +#include <plat/sdhci.h> #include <plat/iic-core.h> #include <plat/fb-core.h> @@ -115,6 +116,10 @@ void __init s3c2416_map_io(void) s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_updown; s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_updown; +/* initialize device information early */ +s3c2416_default_sdhci0 (); +s3c2416_default_sdhci1 (); +iotable_init (s3c2416_iodesc,ARRAY_SIZE (s3c2416_iodesc)); }arch/arm/mach- renamed from arch/arm/mach-s3c2416/setup-sdhci-gpio.c +0
-0
s3c2416/setup-sdhci-gpio.c
new file mode 100644
index 0000000..68ac523arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +11
-0@@ -0,0 +1,58 @@ +/* linux/arch/arm/plat-s3c2416/setup-sdhci-gpio.c +* +* Copyright 2010 Promwad Innovation Company +* Yauhen Kharuzhy <[email protected]> +* +* S3C2416 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC) +* +* Based on mach-s3c64xx/setup-sdhci-gpio.c +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as arch/arm/mach-s3c2416/setup-sdhci-gpio.c line 21
Quoted 10 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +10
-0+* published by the Free Software Foundation. +*/ + +#include <linux/kernel.h> +#include <linux/types.h> +#include <linux/interrupt.h> +#include <linux/platform_device.h> +#include <linux/io.h> + +#include <mach/gpio.h> Should be <
linux/gpio.h>arch/arm/mach-s3c2416/setup-sdhci-gpio.c
Quoted 4 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +4
-0+#include <mach/regs-gpio.h> +#include <plat/gpio-cfg.h> + +void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *dev, intwidth)
arch/arm/mach-s3c2416/setup-sdhci-gpio.c line 37
Quoted 12 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +12
-0+{ +unsigned int gpio; +unsigned int end; + + end =S3C2410_GPE (7 + width); + +/* Set all the necessary GPE pins to special-function 0 */ +for (gpio =S3C2410_GPE (5 ); gpio < end; gpio++) { +s3c_gpio_cfgpin (gpio,S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (gpio,S3C_GPIO_PULL_NONE ); + } +}Following is better.
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +3
-0+void s3c2416_setup_sdhci0_cfg_gpio (struct platform_device *dev,int width) +{ + s3c_gpio_cfgrange_nopull(S3C2410_GPE(5), 2 + width,
Quoted 2 lines
S3C_GPIO_SFN(2));
+}
Hmm... Cool GPIO helpers. Thanks for pointing me to them :)
Quoted 182 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c line 39
Quoted 3 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +2
-0+ +void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *dev, intwidth)
Quoted 9 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +9
-0+{ +unsigned int gpio; +unsigned int end; + + end =S3C2410_GPL (0 + width); + +/* Set all the necessary GPG pins to special-function 0 */ +for (gpio =S3C2410_GPL (0 ); gpio < end; gpio++) { +s3c_gpio_cfgpin (gpio,S3C_GPIO_SFN (2 ));arch/arm/mach-s3c2416/setup-sdhci-gpio.c line 58
Quoted 10 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +10
-0+s3c_gpio_setpull (gpio,S3C_GPIO_PULL_NONE ); + } + +s3c_gpio_cfgpin (S3C2410_GPL (8 ),S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (S3C2410_GPL (8 ),S3C_GPIO_PULL_NONE ); +s3c_gpio_cfgpin (S3C2410_GPL (9 ),S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (S3C2410_GPL (9 ),S3C_GPIO_PULL_NONE ); +} + +no need 2 empty lines.
Same...how about following?
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +5
-0+void s3c2416_setup_sdhci1_cfg_gpio (struct platform_device *dev,int width) +{ +s3c_gpio_cfgrange_nopull (S3C2410_GPL (0 ), width,S3C_GPIO_SFN (2 )); +s3c_gpio_cfgrange_nopull (S3C2410_GPL (8 ),2 ,S3C_GPIO_SFN (2 )); +}Quoted 60 lines
arch/arm/mach- renamed from arch/arm/mach-s3c2416/setup-sdhci.c +0
-0
s3c2416/setup-sdhci.c
new file mode 100644
index 0000000..345ddd1arch/arm/mach-s3c2416/setup-sdhci.c new file +52
-0@@ -0,0 +1,62 @@ +/* linux/arch/arm/mach-s3c2416/setup-sdhci.c +* +* Copyright 2010 Promwad Innovation Company +* Yauhen Kharuzhy <[email protected]> +* +* S3C2416 - Helper functions for settign up SDHCI device(s) (HSMMC) +* +* Based on mach-s3c64xx/setup-sdhci.c +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#include <linux/kernel.h> +#include <linux/types.h> +#include <linux/interrupt.h> +#include <linux/platform_device.h> +#include <linux/io.h> + +#include <linux/mmc/card.h> +#include <linux/mmc/host.h> + +#include <plat/regs-sdhci.h> +#include <plat/sdhci.h> + +/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */ + +char *s3c2416_hsmmc_clksrcs[4 ] = { + [0 ] ="hsmmc" , + [1 ] ="hsmmc" , + [2 ] ="hsmmc-if" , +/* [3] = "48m", - note not successfully used yet */ +}; + +void s3c2416_setup_sdhci_cfg_card (struct platform_device *dev, +void __iomem *r, +struct mmc_ios *ios, +struct mmc_card *card) +{ +u32 ctrl2, ctrl3; + + ctrl2 =readl (r +S3C_SDHCI_CONTROL2 ); + ctrl2 &=S3C_SDHCI_CTRL2_SELBASECLK_MASK ; + ctrl2 |= (S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR | +S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK | +S3C_SDHCI_CTRL2_ENFBCLKRX | +S3C_SDHCI_CTRL2_DFCNT_NONE | +S3C_SDHCI_CTRL2_ENCLKOUTHOLD ); + +if (ios->clock <25 *1000000 ) + ctrl3 = (S3C_SDHCI_CTRL3_FCSEL3 |arch/arm/mach-s3c2416/setup-sdhci.c line 62
Quoted 10 lines
arch/arm/mach-s3c2416/setup-sdhci.c new file +10
-0+S3C_SDHCI_CTRL3_FCSEL2 | +S3C_SDHCI_CTRL3_FCSEL1 | + S3C_SDHCI_CTRL3_FCSEL0); + else + ctrl3 = (S3C_SDHCI_CTRL3_FCSEL1 |S3C_SDHCI_CTRL3_FCSEL0 ); + +writel (ctrl2, r +S3C_SDHCI_CONTROL2 ); +writel (ctrl3, r +S3C_SDHCI_CONTROL3 ); +} +no need last 1 empty line.
arch/arm/plat-samsung/include/plat/sdhci.h extern void s5pv310_setup_sdhci0_cfg_gpio(struct · line 122
Quoted 8 lines
arch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/sdhci.h +0
-0
samsung/include/plat/sdhci.h
index 85853f8..81d801e 100644arch/arm/plat-samsung/include/plat/sdhci.h +0
-0@@ -121,6 +121,8 @@ extern void s5pv310_setup_sdhci0_cfg_gpio(struct platform_device *, int w); extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, intw);
arch/arm/plat-samsung/include/plat/sdhci.h extern void s5pv310_setup_sdhci0_cfg_gpio(struct · line 123
Quoted 1 line
arch/arm/plat-samsung/include/plat/sdhci.h +0
-0extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, intw);
arch/arm/plat-samsung/include/plat/sdhci.h extern void s5pv310_setup_sdhci0_cfg_gpio(struct · line 124
Quoted 1 line
arch/arm/plat-samsung/include/plat/sdhci.h +0
-0extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, intw);
arch/arm/plat-samsung/include/plat/sdhci.h extern void s5pv310_setup_sdhci0_cfg_gpio(struct · line 125
Quoted 1 line
arch/arm/plat-samsung/include/plat/sdhci.h +1
-0+extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, intw);
arch/arm/plat-samsung/include/plat/sdhci.h extern void s5pv310_setup_sdhci0_cfg_gpio(struct · line 126
Quoted 1 line
arch/arm/plat-samsung/include/plat/sdhci.h +1
-0+extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, intw);
Quoted 26 lines
arch/arm/plat-samsung/include/plat/sdhci.h +19
-0/* S3C64XX SDHCI setup */ @@ -299,6 +301,39 @@ static inline void s5pv210_default_sdhci3(void) { }#endif /* CONFIG_S5PV210_SETUP_SDHCI */ +/* S3C2416 SDHCI setup */ +#ifdef CONFIG_S3C2416_SETUP_SDHCI +extern char *s3c2416_hsmmc_clksrcs[4 ]; + +extern void s3c2416_setup_sdhci_cfg_card (struct platform_device *dev, +void __iomem *r, +struct mmc_ios *ios, +struct mmc_card *card); + +#ifdef CONFIG_S3C_DEV_HSMMC +static inline void s3c2416_default_sdhci0 (void ) +{ + s3c_hsmmc0_def_platdata.clocks = s3c2416_hsmmc_clksrcs; + s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio; + s3c_hsmmc0_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; +} +#else +static inline void s3c2416_default_sdhci0 (void ) { } +#endif /* CONFIG_S3C_DEV_HSMMC */ arch/arm/plat-samsung/include/plat/sdhci.h +8
-0+static inline void s3c2416_default_sdhci0 (void ) +{ +#ifdef CONFIG_S3C_DEV_HSMMC + s3c_hsmmc0_def_platdata.clocks = s3c2416_hsmmc_clksrcs; + s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio; + s3c_hsmmc0_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; +#endif +}And please move this before
s3c6400_setup_...Quoted 12 lines
arch/arm/plat-samsung/include/plat/sdhci.h +12
-0+ +#ifdef CONFIG_S3C_DEV_HSMMC1 +static inline void s3c2416_default_sdhci1 (void ) +{ + s3c_hsmmc1_def_platdata.clocks = s3c2416_hsmmc_clksrcs; + s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio; + s3c_hsmmc1_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; +} +#else +static inline void s3c2416_default_sdhci1 (void ) { } +#endif /* CONFIG_S3C_DEV_HSMMC1 */ +arch/arm/plat-samsung/include/plat/sdhci.h +8
-0+static inline void s3c2416_default_sdhci1 (void ) +{ +#ifdef CONFIG_S3C_DEV_HSMMC1 + s3c_hsmmc1_def_platdata.clocks = s3c2416_hsmmc_clksrcs; + s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio; + s3c_hsmmc1_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; +#endif +}
Quoted 8 lines
arch/arm/plat-samsung/include/plat/sdhci.h static inline void s5pv210_default_sdhci3(void) { }
Quoted 6 lines
arch/arm/plat-samsung/include/plat/sdhci.h +2
-1+#endif /* CONFIG_S3C2416_SETUP_SDHCI */ +/* S5PV310 SDHCI setup */ #ifdef CONFIG_S5PV310_SETUP_SDHCI extern char *s5pv310_hsmmc_clksrcs[4 ]; --And there was no error on board?
No. Both channels works good on my board.
OK. Will fix and re-send this patch.
Signature · 5 lines
Yauhen Kharuzhy jekhor _at_ gmail.com JID: jek at jabber.ru A: No Q: Should I quote below my post?
PATCH v2 1/1 ARM: S3C2416: Add platform helpers for setup SDHCI
In reply to Kukjin KimSamsung S3C2416 has two SDHCI controllers compatible with other Samsung's SoCs (S3C64XX, S5PC100 etc...).
Add required platform setup code that the devices can be used with sdhci-s3c driver.
--- arch/arm/mach-s3c2416/Kconfig | 12 +++++ arch/arm/mach-s3c2416/Makefile | 4 ++ arch/arm/mach-s3c2416/s3c2416.c | 5 ++ arch/arm/mach-s3c2416/setup-sdhci-gpio.c | 34 +++++++++++++++ arch/arm/mach-s3c2416/setup-sdhci.c | 61 ++++++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/sdhci.h | 30 ++++++++++++++ 6 files changed, 146 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s3c2416/setup-sdhci-gpio.c create mode 100644 arch/arm/mach-s3c2416/setup-sdhci.c
arch/arm/mach-s3c2416/Kconfig +12 -0
@@ -30,6 +30,17 @@ config S3C2416_PM help Internal config node to apply S3C2416 power management +config S3C2416_SETUP_SDHCI + bool + select S3C2416_SETUP_SDHCI_GPIO + help + Internal helper functions for S3C2416 based SDHCI systems + +config S3C2416_SETUP_SDHCI_GPIO + bool + help + Common setup code for SDHCI gpio. + menu "S3C2416 Machines" config MACH_SMDK2416
@@ -41,6 +52,7 @@ config MACH_SMDK2416 select S3C_DEV_HSMMC1 select S3C_DEV_NAND select S3C_DEV_USB_HOST + select S3C2416_SETUP_SDHCI select S3C2416_PM if PM help Say Y here if you are using an SMDK2416
arch/arm/mach-s3c2416/Makefile +4 -0
@@ -14,6 +14,10 @@ obj-$(CONFIG_CPU_S3C2416) += irq.o obj-$(CONFIG_S3C2416_PM) += pm.o #obj-$(CONFIG_S3C2416_DMA) += dma.o +# Device setup +obj-$(CONFIG_S3C2416_SETUP_SDHCI) += setup-sdhci.o +obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o + # Machine support obj-$(CONFIG_MACH_SMDK2416) += mach-smdk2416.o
arch/arm/mach-s3c2416/s3c2416.c +5 -0
@@ -53,6 +53,7 @@#include <plat/s3c2416.h> #include <plat/devs.h> #include <plat/cpu.h> +#include <plat/sdhci.h> #include <plat/iic-core.h> #include <plat/fb-core.h>
@@ -115,6 +116,10 @@ void __init s3c2416_map_io(void) s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_updown; s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_updown; +/* initialize device information early */ +s3c2416_default_sdhci0 (); +s3c2416_default_sdhci1 (); +iotable_init (s3c2416_iodesc,ARRAY_SIZE (s3c2416_iodesc)); }
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +34 -0
@@ -0,0 +1,34 @@ +/* linux/arch/arm/plat-s3c2416/setup-sdhci-gpio.c +* +* Copyright 2010 Promwad Innovation Company +* Yauhen Kharuzhy <[email protected]> +* +* S3C2416 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC) +* +* Based on mach-s3c64xx/setup-sdhci-gpio.c +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#include <linux/kernel.h> +#include <linux/types.h> +#include <linux/interrupt.h> +#include <linux/platform_device.h> +#include <linux/io.h> +#include <linux/gpio.h> + +#include <mach/regs-gpio.h> +#include <plat/gpio-cfg.h> + +void s3c2416_setup_sdhci0_cfg_gpio (struct platform_device *dev,int width) +{ +s3c_gpio_cfgrange_nopull (S3C2410_GPE (5 ),2 + width,S3C_GPIO_SFN (2 )); +} + +void s3c2416_setup_sdhci1_cfg_gpio (struct platform_device *dev,int width) +{ +s3c_gpio_cfgrange_nopull (S3C2410_GPL (0 ), width,S3C_GPIO_SFN (2 )); +s3c_gpio_cfgrange_nopull (S3C2410_GPL (8 ),2 ,S3C_GPIO_SFN (2 )); +}
arch/arm/mach-s3c2416/setup-sdhci.c new file +61 -0
61 lines not on this page · raw message
arch/arm/plat-samsung/include/plat/sdhci.h +30 -0
@@ -107,6 +107,8 @@ extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata;/* Helper function availablity */ +extern void s3c2416_setup_sdhci0_cfg_gpio (struct platform_device *,int w); +extern void s3c2416_setup_sdhci1_cfg_gpio (struct platform_device *,int w);extern void s3c64xx_setup_sdhci0_cfg_gpio (struct platform_device *,int w);extern void s3c64xx_setup_sdhci1_cfg_gpio (struct platform_device *,int w);extern void s5pc100_setup_sdhci0_cfg_gpio (struct platform_device *,int w);
@@ -122,6 +124,34 @@ extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int w);extern void s5pv310_setup_sdhci2_cfg_gpio (struct platform_device *,int w);extern void s5pv310_setup_sdhci3_cfg_gpio (struct platform_device *,int w); +/* S3C2416 SDHCI setup */ +#ifdef CONFIG_S3C2416_SETUP_SDHCI +extern char *s3c2416_hsmmc_clksrcs[4 ]; + +extern void s3c2416_setup_sdhci_cfg_card (struct platform_device *dev, +void __iomem *r, +struct mmc_ios *ios, +struct mmc_card *card); +#endif /* CONFIG_S3C2416_SETUP_SDHCI */ + +static inline void s3c2416_default_sdhci0 (void ) +{ +#ifdef CONFIG_S3C_DEV_HSMMC + s3c_hsmmc0_def_platdata.clocks = s3c2416_hsmmc_clksrcs; + s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio; + s3c_hsmmc0_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; +#endif /* CONFIG_S3C_DEV_HSMMC */ +} + +static inline void s3c2416_default_sdhci1 (void ) +{ +#ifdef CONFIG_S3C_DEV_HSMMC1 + s3c_hsmmc1_def_platdata.clocks = s3c2416_hsmmc_clksrcs; + s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio; + s3c_hsmmc1_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; +#endif /* CONFIG_S3C_DEV_HSMMC1 */ +} +/* S3C64XX SDHCI setup */ #ifdef CONFIG_S3C64XX_SETUP_SDHCI
Signature · 1 line
1.7.2.3
PATCH v2 1/1 ARM: S3C2416: Add platform helpers for setup SDHCI
2010/12/1 Yauhen Kharuzhy <[email protected]>:
Quoted 7 lines
Samsung S3C2416 has two SDHCI controllers compatible with other Samsung's SoCs (S3C64XX, S5PC100 etc...).
Add required platform setup code that the devices can be used with sdhci-s3c driver.
Signed-off-by Yauhen Kharuzhy <[email protected]>
ping?
Signature · 5 lines
Best regards, ? ? Yauhen Kharuzhy? ?? jekhor_(at)_gmail.com A: No Q: Should I quote below my post?
PATCH v2 1/1 ARM: S3C2416: Add platform helpers for setup SDHCI
In reply to Yauhen KharuzhyReview
Quoted 51 lines · Yauhen Kharuzhy
Samsung S3C2416 has two SDHCI controllers compatible with other Samsung's SoCs (S3C64XX, S5PC100 etc...).
Add required platform setup code that the devices can be used with sdhci-s3c driver.
Signed-off-by Yauhen Kharuzhy <[email protected]>--- arch/arm/mach-s3c2416/Kconfig | 12 +++++ arch/arm/mach-s3c2416/Makefile | 4 ++ arch/arm/mach-s3c2416/s3c2416.c | 5 ++ arch/arm/mach-s3c2416/setup-sdhci-gpio.c | 34 +++++++++++++++ arch/arm/mach-s3c2416/setup-sdhci.c | 61 ++++++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/sdhci.h | 30 ++++++++++++++ 6 files changed, 146 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s3c2416/setup-sdhci-gpio.c create mode 100644 arch/arm/mach-s3c2416/setup-sdhci.carch/arm/mach-s3c2416/Kconfig +12
-0@@ -30,6 +30,17 @@ config S3C2416_PM help Internal config node to apply S3C2416 power management +config S3C2416_SETUP_SDHCI + bool + select S3C2416_SETUP_SDHCI_GPIO + help + Internal helper functions for S3C2416 based SDHCI systems + +config S3C2416_SETUP_SDHCI_GPIO + bool + help + Common setup code for SDHCI gpio. + menu "S3C2416 Machines" config MACH_SMDK2416@@ -41,6 +52,7 @@ config MACH_SMDK2416 select S3C_DEV_HSMMC1 select S3C_DEV_NAND select S3C_DEV_USB_HOST + select S3C2416_SETUP_SDHCI select S3C2416_PM if PM help Say Y here if you are using an SMDK2416(quoted diff) +0
-0
b/arch/arm/mach-s3c2416/Makefile
Quoted 60 lines
index ef038d6..7b805b2 100644
arch/arm/mach-s3c2416/Makefile +4
-0@@ -14,6 +14,10 @@ obj-$(CONFIG_CPU_S3C2416) += irq.o obj-$(CONFIG_S3C2416_PM) += pm.o #obj-$(CONFIG_S3C2416_DMA) += dma.o +# Device setup +obj-$(CONFIG_S3C2416_SETUP_SDHCI) += setup-sdhci.o +obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o + # Machine support obj-$(CONFIG_MACH_SMDK2416) += mach-smdk2416.oarch/arm/mach- renamed from arch/arm/mach-s3c2416/s3c2416.c +0
-0
s3c2416/s3c2416.c
index 63f39cd..ba7fd87 100644arch/arm/mach-s3c2416/s3c2416.c +5
-0@@ -53,6 +53,7 @@#include <plat/s3c2416.h> #include <plat/devs.h> #include <plat/cpu.h> +#include <plat/sdhci.h> #include <plat/iic-core.h> #include <plat/fb-core.h> @@ -115,6 +116,10 @@ void __init s3c2416_map_io(void) s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_updown; s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_updown; +/* initialize device information early */ +s3c2416_default_sdhci0 (); +s3c2416_default_sdhci1 (); +iotable_init (s3c2416_iodesc,ARRAY_SIZE (s3c2416_iodesc)); }arch/arm/mach- renamed from arch/arm/mach-s3c2416/setup-sdhci-gpio.c +0
-0
s3c2416/setup-sdhci-gpio.c
new file mode 100644
index 0000000..f65cb3earch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +15
-0@@ -0,0 +1,34 @@ +/* linux/arch/arm/plat-s3c2416/setup-sdhci-gpio.c +* +* Copyright 2010 Promwad Innovation Company +* Yauhen Kharuzhy <[email protected]> +* +* S3C2416 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC) +* +* Based on mach-s3c64xx/setup-sdhci-gpio.c +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#include <linux/kernel.h>
arch/arm/mach-s3c2416/setup-sdhci-gpio.c line 25
Quoted 10 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +10
-0+#include <linux/types.h> +#include <linux/interrupt.h> +#include <linux/platform_device.h> +#include <linux/io.h> +#include <linux/gpio.h> + +#include <mach/regs-gpio.h> +#include <plat/gpio-cfg.h> + +void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *dev, int
width)
arch/arm/mach-s3c2416/setup-sdhci-gpio.c line 27
Quoted 2 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +2
-0+{ + s3c_gpio_cfgrange_nopull(S3C2410_GPE(5), 2 + width,
S3C_GPIO_SFN(2));
arch/arm/mach-s3c2416/setup-sdhci-gpio.c
Quoted 3 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +3
-0+} + +void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *dev, int
width)
arch/arm/plat-samsung/include/plat/sdhci.h extern struct s3c_sdhci_platdata
Quoted 78 lines
arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file +4
-0+{ +s3c_gpio_cfgrange_nopull (S3C2410_GPL (0 ), width,S3C_GPIO_SFN (2 )); +s3c_gpio_cfgrange_nopull (S3C2410_GPL (8 ),2 ,S3C_GPIO_SFN (2 )); +}arch/arm/mach- renamed from arch/arm/mach-s3c2416/setup-sdhci.c +0
-0
s3c2416/setup-sdhci.c
new file mode 100644
index 0000000..f09e38farch/arm/mach-s3c2416/setup-sdhci.c new file +61
-0@@ -0,0 +1,61 @@ +/* linux/arch/arm/mach-s3c2416/setup-sdhci.c +* +* Copyright 2010 Promwad Innovation Company +* Yauhen Kharuzhy <[email protected]> +* +* S3C2416 - Helper functions for settign up SDHCI device(s) (HSMMC) +* +* Based on mach-s3c64xx/setup-sdhci.c +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#include <linux/kernel.h> +#include <linux/types.h> +#include <linux/interrupt.h> +#include <linux/platform_device.h> +#include <linux/io.h> + +#include <linux/mmc/card.h> +#include <linux/mmc/host.h> + +#include <plat/regs-sdhci.h> +#include <plat/sdhci.h> + +/* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */ + +char *s3c2416_hsmmc_clksrcs[4 ] = { + [0 ] ="hsmmc" , + [1 ] ="hsmmc" , + [2 ] ="hsmmc-if" , +/* [3] = "48m", - note not successfully used yet */ +}; + +void s3c2416_setup_sdhci_cfg_card (struct platform_device *dev, +void __iomem *r, +struct mmc_ios *ios, +struct mmc_card *card) +{ +u32 ctrl2, ctrl3; + + ctrl2 =readl (r +S3C_SDHCI_CONTROL2 ); + ctrl2 &=S3C_SDHCI_CTRL2_SELBASECLK_MASK ; + ctrl2 |= (S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR | +S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK | +S3C_SDHCI_CTRL2_ENFBCLKRX | +S3C_SDHCI_CTRL2_DFCNT_NONE | +S3C_SDHCI_CTRL2_ENCLKOUTHOLD ); + +if (ios->clock <25 *1000000 ) + ctrl3 = (S3C_SDHCI_CTRL3_FCSEL3 | +S3C_SDHCI_CTRL3_FCSEL2 | +S3C_SDHCI_CTRL3_FCSEL1 | +S3C_SDHCI_CTRL3_FCSEL0 ); +else + ctrl3 = (S3C_SDHCI_CTRL3_FCSEL1 |S3C_SDHCI_CTRL3_FCSEL0 ); + +writel (ctrl2, r +S3C_SDHCI_CONTROL2 ); +writel (ctrl3, r +S3C_SDHCI_CONTROL3 ); +}arch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/sdhci.h +0
-0
samsung/include/plat/sdhci.h
index 85853f8..87e621c 100644arch/arm/plat-samsung/include/plat/sdhci.h +0
-0@@ -107,6 +107,8 @@ extern struct s3c_sdhci_platdata
s3c_hsmmc3_def_platdata;
arch/arm/plat-samsung/include/plat/sdhci.h extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata;
Quoted 4 lines
arch/arm/plat-samsung/include/plat/sdhci.h +1
-0/* Helper function availablity */ +extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int
w);
arch/arm/plat-samsung/include/plat/sdhci.h extern struct s3c_sdhci_platdata · line 110
Quoted 1 line
arch/arm/plat-samsung/include/plat/sdhci.h +1
-0+extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int
w);
arch/arm/plat-samsung/include/plat/sdhci.h extern struct s3c_sdhci_platdata · line 111
Quoted 1 line
arch/arm/plat-samsung/include/plat/sdhci.h +0
-0extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int
w);
arch/arm/plat-samsung/include/plat/sdhci.h extern struct s3c_sdhci_platdata · line 112
Quoted 1 line
arch/arm/plat-samsung/include/plat/sdhci.h +0
-0extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int
w);
arch/arm/plat-samsung/include/plat/sdhci.h extern struct s3c_sdhci_platdata · line 113
Quoted 1 line
arch/arm/plat-samsung/include/plat/sdhci.h +0
-0extern void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *, int
w);
arch/arm/plat-samsung/include/plat/sdhci.h extern void s5pv310_setup_sdhci1_cfg_gpio(struct · line 125
Quoted 3 lines
arch/arm/plat-samsung/include/plat/sdhci.h +0
-0@@ -122,6 +124,34 @@ extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int w); extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int
w);
arch/arm/plat-samsung/include/plat/sdhci.h extern void s5pv310_setup_sdhci1_cfg_gpio(struct · line 126
Quoted 1 line
arch/arm/plat-samsung/include/plat/sdhci.h +0
-0extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int
w);
Quoted 23 lines
arch/arm/plat-samsung/include/plat/sdhci.h +22
-0+/* S3C2416 SDHCI setup */ +#ifdef CONFIG_S3C2416_SETUP_SDHCI +extern char *s3c2416_hsmmc_clksrcs[4 ]; + +extern void s3c2416_setup_sdhci_cfg_card (struct platform_device *dev, +void __iomem *r, +struct mmc_ios *ios, +struct mmc_card *card); +#endif /* CONFIG_S3C2416_SETUP_SDHCI */ + +static inline void s3c2416_default_sdhci0 (void ) +{ +#ifdef CONFIG_S3C_DEV_HSMMC + s3c_hsmmc0_def_platdata.clocks = s3c2416_hsmmc_clksrcs; + s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio; + s3c_hsmmc0_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; +#endif /* CONFIG_S3C_DEV_HSMMC */ +} + +static inline void s3c2416_default_sdhci1 (void ) +{ +#ifdef CONFIG_S3C_DEV_HSMMC1
arch/arm/plat-samsung/include/plat/sdhci.h extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int w);
Quoted 10 lines
arch/arm/plat-samsung/include/plat/sdhci.h +6
-1+ s3c_hsmmc1_def_platdata.clocks = s3c2416_hsmmc_clksrcs; + s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio; + s3c_hsmmc1_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; +#endif /* CONFIG_S3C_DEV_HSMMC1 */ +} +/* S3C64XX SDHCI setup */ #ifdef CONFIG_S3C64XX_SETUP_SDHCI --
Sorry, it's late review. I came back from some kind of education just now.
Anyway, looks ok to me but __raw_readl/__raw_writel is better instead of just readl/writel.
Because basically no need memory barrier between memory operation in there.
So if you don't mind, will apply with modifying.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 4/10 ARM: S3C2416: Add support of SD/MMC card detect on SMDK2416
In reply to Yauhen KharuzhyEnable card detect by GPIO pin on hsmmc1 device (SD0 on SMDK2416 board) and enable card polling on hsmmc0 (SD1).
--- arch/arm/mach-s3c2416/mach-smdk2416.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
arch/arm/mach-s3c2416/mach-smdk2416.c +16 -0
@@ -46,6 +46,7 @@#include <plat/devs.h> #include <plat/cpu.h> #include <plat/nand.h> +#include <plat/sdhci.h> #include <plat/regs-fb-v4.h> #include <plat/fb.h>
@@ -159,6 +160,18 @@ static struct s3c_fb_platdata smdk2416_fb_platdata = { .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, }; +static struct s3c_sdhci_platdata smdk2416_hsmmc0_pdata__initdata = { + .max_width =4 , + .cd_type =S3C_SDHCI_CD_GPIO , + .ext_cd_gpio =S3C2410_GPF (1 ), + .ext_cd_gpio_invert =1 , +}; + +static struct s3c_sdhci_platdata smdk2416_hsmmc1_pdata__initdata = { + .max_width =4 , + .cd_type =S3C_SDHCI_CD_NONE , +}; +static struct platform_device *smdk2416_devices[]__initdata = { &s3c_device_fb, &s3c_device_wdt,
@@ -180,6 +193,9 @@ static void __init smdk2416_machine_init(void)s3c_i2c0_set_platdata (NULL );s3c_fb_set_platdata (&smdk2416_fb_platdata); +s3c_sdhci0_set_platdata (&smdk2416_hsmmc0_pdata); +s3c_sdhci1_set_platdata (&smdk2416_hsmmc1_pdata); +gpio_request (S3C2410_GPB (4 ),"USBHost Power" );gpio_direction_output (S3C2410_GPB (4 ),1 );
Signature · 1 line
1.7.2.3
PATCH 5/10 ARM S3C2443: Select properly ARM core type
In reply to Yauhen KharuzhyFrom: Yauhen Kharuzhy <[email protected]>
Select ARM920T core when compiling kernel for s3c2443.
--- arch/arm/mach-s3c2443/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-s3c2443/Kconfig +1 -0
@@ -5,6 +5,7 @@ config CPU_S3C2443 bool depends on ARCH_S3C2410 + select CPU_ARM920T select S3C2443_DMA if S3C2410_DMA select CPU_LLSERIAL_S3C2440 select SAMSUNG_CLKSRC
Signature · 1 line
1.7.2.3
PATCH 5/10 ARM S3C2443: Select properly ARM core type
Quoted 3 lines · Yauhen Kharuzhy
From: Yauhen Kharuzhy <[email protected]>
Your e-mail changed?
Quoted 12 lines
Select ARM920T core when compiling kernel for s3c2443.
Signed-off-by Yauhen Kharuzhy <[email protected]>--- arch/arm/mach-s3c2443/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/arm/mach-s3c2443/Kconfig +0
-0
arch/arm/mach-s3c2443/Kconfig
Quoted 8 lines
arch/arm/mach-s3c2443/Kconfig +1
-1@@ -5,6 +5,7 @@ config CPU_S3C2443 bool depends on ARCH_S3C2410 + select CPU_ARM920T select S3C2443_DMA if S3C2410_DMA select CPU_LLSERIAL_S3C2440 select SAMSUNG_CLKSRC --
This is ok to me.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 5/10 ARM S3C2443: Select properly ARM core type
Quoted 5 lines · Kukjin Kim
Quoted 3 lines · Yauhen Kharuzhy
From: Yauhen Kharuzhy <[email protected]>
Your e-mail changed?
No, above is my e-mail at my primary job. I use it for patches which were made for my employer.
Quoted 31 lines
Quoted 12 lines
Select ARM920T core when compiling kernel for s3c2443.
Signed-off-by Yauhen Kharuzhy <[email protected]>--- arch/arm/mach-s3c2443/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/arm/mach-s3c2443/Kconfig +0
-0arch/arm/mach-s3c2443/Kconfig
Quoted 8 lines
arch/arm/mach-s3c2443/Kconfig +1
-1@@ -5,6 +5,7 @@ config CPU_S3C2443 bool depends on ARCH_S3C2410 + select CPU_ARM920T select S3C2443_DMA if S3C2410_DMA select CPU_LLSERIAL_S3C2440 select SAMSUNG_CLKSRC --This is ok to me.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Signature · 5 lines
Yauhen Kharuzhy jekhor _at_ gmail.com JID: jek at jabber.ru A: No Q: Should I quote below my post?
PATCH 5/10 ARM S3C2443: Select properly ARM core type
In reply to Yauhen KharuzhyQuoted 5 lines · Yauhen Kharuzhy
From: Yauhen Kharuzhy <[email protected]>
Select ARM920T core when compiling kernel for s3c2443.
Signed-off-by Yauhen Kharuzhy <[email protected]>
ok, applied.
PATCH 6/10 ARM S3C24XX: Compile NAND device definition for SMDK boards
In reply to Yauhen KharuzhyFrom: Yauhen Kharuzhy <[email protected]>
Common SMDK code uses s3c_device_nand, but doesn't select it in Kconfig.
--- arch/arm/plat-s3c24xx/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/plat-s3c24xx/Kconfig +1 -0
@@ -155,6 +155,7 @@ config S3C2412_IOTIMING config MACH_SMDK bool + select S3C_DEV_NAND help Common machine code for SMDK2410 and SMDK2440
Signature · 1 line
1.7.2.3
PATCH 6/10 ARM S3C24XX: Compile NAND device definition for SMDK boards
Quoted 1 line · Yauhen Kharuzhy
Hi,
Quoted 4 lines
From: Yauhen Kharuzhy <[email protected]>
Common SMDK code uses
s3c_device_nand, but doesn't select it inKconfig.
Yeah, you're right. The common-smdk.c uses "s3c_device_nand" of "plat-samsung/dev-nand.c".
But now the CONFIG_S3C_DEV_NAND already selected in CONFIG_PLAT_S3C24XX...
So I think this is useless...however, we need to sort dependencies of Kconfig for S3C24XX out.
Quoted 10 lines
Signed-off-by Yauhen Kharuzhy <[email protected]>--- arch/arm/plat-s3c24xx/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/arm/plat-s3c24xx/Kconfig +0
-0
arch/arm/plat-s3c24xx/Kconfig config S3C2412_IOTIMING
Quoted 8 lines
arch/arm/plat-s3c24xx/Kconfig +1
-1@@ -155,6 +155,7 @@ config S3C2412_IOTIMING config MACH_SMDK bool + select S3C_DEV_NAND help Common machine code for SMDK2410 and SMDK2440 --
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 6/10 ARM S3C24XX: Compile NAND device definition for SMDK boards
Quoted 6 lines · Kukjin Kim
Quoted 1 line · Yauhen Kharuzhy
Hi,
Quoted 2 lines
From: Yauhen Kharuzhy <[email protected]>
Quoted 8 lines
Quoted 2 lines
Common SMDK code uses
s3c_device_nand, but doesn't select it inKconfig.Yeah, you're right. The
common-smdk.cuses "s3c_device_nand" of "plat-samsung/dev-nand.c".
But now theCONFIG_S3C_DEV_NANDalready selected inCONFIG_PLAT_S3C24XX...So I think this is useless...however, we need to sort dependencies of
Kconfigfor S3C24XX out.
OK. It was my rebased old patch and I didn't check necessity of it.
Quoted 30 lines
Quoted 11 lines
Signed-off-by Yauhen Kharuzhy <[email protected]>--- arch/arm/plat-s3c24xx/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/arm/plat-s3c24xx/Kconfig +0
-0arch/arm/plat-s3c24xx/Kconfig config S3C2412_IOTIMING
Quoted 8 lines
arch/arm/plat-s3c24xx/Kconfig +1
-1@@ -155,6 +155,7 @@ config S3C2412_IOTIMING config MACH_SMDK bool + select S3C_DEV_NAND help Common machine code for SMDK2410 and SMDK2440 --Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Signature · 5 lines
Yauhen Kharuzhy jekhor _at_ gmail.com JID: jek at jabber.ru A: No Q: Should I quote below my post?
PATCH 6/10 ARM S3C24XX: Compile NAND device definition for SMDK boards
Quoted 2 lines · Yauhen Kharuzhy
Quoted 2 lines
Quoted 2 lines
Common SMDK code uses
s3c_device_nand, but doesn't select it in
Kconfig.
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Yeah, you're right. The
common-smdk.cuses "s3c_device_nand" of "plat-samsung/dev-nand.c".
But now theCONFIG_S3C_DEV_NANDalready selected in
CONFIG_PLAT_S3C24XX...
Quoted 1 line
Quoted 1 line
Oh, it's typo :-(
commit 7f4145abcee3e48d9f01cca16baa0f21e4b55e21
Author: Kukjin Kim <[email protected]> Date: Fri Dec 3 21:22:42 2010 +0900
ARM: S3C24XX: Fix CONFIG_S3C_DEV_NAND Kconfig entry
Should be CONFIG_S3C_DEV_NAND instead of CONFIG_S3C_DEVICE_NAND.
arch/arm/plat-s3c24xx/Kconfig +1 -1
@@ -8,7 +8,7 @@ config PLAT_S3C24XX default y select NO_IOPORT select ARCH_REQUIRE_GPIOLIB - select S3C_DEVICE_NAND + select S3C_DEV_NAND select S3C_GPIO_CFG_S3C24XX help Base platform code for any Samsung S3C24XX device
Quoted 3 lines
Quoted 2 lines
So I think this is useless...however, we need to sort dependencies of
Kconfigfor S3C24XX out.OK. It was my rebased old patch and I didn't check necessity of it.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 6/10 ARM S3C24XX: Compile NAND device definition for SMDK boards
Quoted 39 lines · Kukjin Kim
Quoted 2 lines · Yauhen Kharuzhy
Quoted 2 lines
Quoted 2 lines
Common SMDK code uses
s3c_device_nand, but doesn't select it in
Kconfig.Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Yeah, you're right. The
common-smdk.cuses "s3c_device_nand" of "plat-samsung/dev-nand.c".
But now theCONFIG_S3C_DEV_NANDalready selected in
CONFIG_PLAT_S3C24XX...Quoted 1 line
Quoted 1 line
Oh, it's typo :-(
commit
7f4145abcee3e48d9f01cca16baa0f21e4b55e21Author: Kukjin Kim <[email protected]> Date: Fri Dec 3 21:22:42 2010 +0900ARM: S3C24XX: Fix
CONFIG_S3C_DEV_NANDKconfigentryShould be
CONFIG_S3C_DEV_NANDinstead ofCONFIG_S3C_DEVICE_NAND.Cc Ben Dooks <[email protected]>Signed-off-by Kukjin Kim <[email protected]>arch/arm/plat-s3c24xx/Kconfig +1
-1@@ -8,7 +8,7 @@ config PLAT_S3C24XX default y select NO_IOPORT select ARCH_REQUIRE_GPIOLIB - select S3C_DEVICE_NAND + select S3C_DEV_NAND select S3C_GPIO_CFG_S3C24XX help Base platform code for any Samsung S3C24XX device
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
So I think this is useless...however, we need to sort dependencies of
Kconfigfor S3C24XX out.OK. It was my rebased old patch and I didn't check necessity of it.
Hmm... But this selects S3C_DEVICE_NAND for all S3C24XX boards. Theoretically S3C24XX board without NAND can exist, and compiled-in nand platform device will be overhead.
Signature · 5 lines
Yauhen Kharuzhy jekhor _at_ gmail.com JID: jek at jabber.ru A: No Q: Should I quote below my post?
PATCH 7/10 ARM S3C2443: Implement GPIO pull-up/down configuration methods
In reply to Yauhen KharuzhyFrom: Yauhen Kharuzhy <[email protected]>
S3C2443 has two-bits pull-up/pull-down configuration fields in GPIO registers, but values are differ from other SoCs with two-bits configuration. gpio-cfg-helpers.h already has prototypes for s3c2443-style pull-up/down methods, so implement them.
--- arch/arm/mach-s3c2443/Kconfig | 1 + arch/arm/mach-s3c2443/s3c2443.c | 7 +++ arch/arm/plat-samsung/Kconfig | 6 +++ arch/arm/plat-samsung/gpio-config.c | 42 ++++++++++++++++++++ .../plat-samsung/include/plat/gpio-cfg-helpers.h | 2 +- 5 files changed, 57 insertions(+), 1 deletions(-)
arch/arm/mach-s3c2443/Kconfig +1 -0
@@ -10,6 +10,7 @@ config CPU_S3C2443 select CPU_LLSERIAL_S3C2440 select SAMSUNG_CLKSRC select S3C2443_CLOCK + select S3C_GPIO_PULL_S3C2443 help Support for the S3C2443 SoC from the S3C24XX line
arch/arm/mach-s3c2443/s3c2443.c +7 -0
@@ -16,6 +16,7 @@#include <linux/list.h> #include <linux/timer.h> #include <linux/init.h> +#include <linux/gpio.h> #include <linux/platform_device.h> #include <linux/serial_core.h> #include <linux/sysdev.h>
@@ -32,6 +33,9 @@#include <mach/regs-s3c2443-clock.h> #include <mach/reset.h> +#include <plat/gpio-core.h> +#include <plat/gpio-cfg.h> +#include <plat/gpio-cfg-helpers.h> #include <plat/s3c2443.h> #include <plat/devs.h> #include <plat/cpu.h>
@@ -86,6 +90,9 @@ void __init s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no)void __init s3c2443_map_io (void ) { + s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_s3c2443; + s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_s3c2443; +iotable_init (s3c2443_iodesc,ARRAY_SIZE (s3c2443_iodesc)); }
arch/arm/plat-samsung/Kconfig +6 -0
@@ -95,6 +95,12 @@ config S3C_GPIO_PULL_UPDOWN help Internal configuration to enable the correct GPIO pull helper +config S3C_GPIO_PULL_S3C2443 + bool + select S3C_GPIO_PULL_UPDOWN + help + Internal configuration to enable the correct GPIO pull helper for S3C2443-style GPIO + config S3C_GPIO_PULL_DOWN bool help
arch/arm/plat-samsung/gpio-config.c +42 -0
48 lines not on this page · raw message
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +1 -1
@@ -233,7 +233,7 @@ extern int s3c_gpio_setpull_s3c2443(struct s3c_gpio_chip *chip,* This helper function reads the state of the pull-{up,down} resistor for the * given GPIO in the same case as s3c_gpio_setpull_upown. */ -extern s3c_gpio_pull_t s3c_gpio_getpull_s3c24xx (struct s3c_gpio_chip *chip, +extern s3c_gpio_pull_t s3c_gpio_getpull_s3c2443 (struct s3c_gpio_chip *chip,unsigned int off);#endif /* __PLAT_GPIO_CFG_HELPERS_H */
Signature · 1 line
1.7.2.3
PATCH 7/10 ARM S3C2443: Implement GPIO pull-up/down configuration methods
arch/arm/mach-s3c2443/s3c2443.c void __init s3c2443_init_uarts(struct s3c2410_uartcfg
Quoted 54 lines · Yauhen Kharuzhy
From: Yauhen Kharuzhy <[email protected]>
S3C2443 has two-bits pull-up/pull-down configuration fields in GPIO registers, but values are differ from other SoCs with two-bits configuration.
gpio-cfg-helpers.halready has prototypes for s3c2443-style pull-up/down methods, so implement them.Signed-off-by Yauhen Kharuzhy <[email protected]>--- arch/arm/mach-s3c2443/Kconfig | 1 + arch/arm/mach-s3c2443/s3c2443.c | 7 +++ arch/arm/plat-samsung/Kconfig | 6 +++ arch/arm/plat-samsung/gpio-config.c | 42 ++++++++++++++++++++ .../plat-samsung/include/plat/gpio-cfg-helpers.h | 2 +- 5 files changed, 57 insertions(+), 1 deletions(-)arch/arm/mach-s3c2443/Kconfig +1
-0@@ -10,6 +10,7 @@ config CPU_S3C2443 select CPU_LLSERIAL_S3C2440 select SAMSUNG_CLKSRC select S3C2443_CLOCK + select S3C_GPIO_PULL_S3C2443 help Support for the S3C2443 SoC from the S3C24XX linearch/arm/mach- renamed from arch/arm/mach-s3c2443/s3c2443.c +0
-0
s3c2443/s3c2443.c
index 33d18dd..e6a28ba 100644arch/arm/mach-s3c2443/s3c2443.c +4
-0@@ -16,6 +16,7 @@#include <linux/list.h> #include <linux/timer.h> #include <linux/init.h> +#include <linux/gpio.h> #include <linux/platform_device.h> #include <linux/serial_core.h> #include <linux/sysdev.h> @@ -32,6 +33,9 @@#include <mach/regs-s3c2443-clock.h> #include <mach/reset.h> +#include <plat/gpio-core.h> +#include <plat/gpio-cfg.h> +#include <plat/gpio-cfg-helpers.h> #include <plat/s3c2443.h> #include <plat/devs.h> #include <plat/cpu.h> @@ -86,6 +90,9 @@ void __init s3c2443_init_uarts(struct s3c2410_uartcfg
*cfg,
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h extern int s3c_gpio_setpull_s3c2443(struct
Quoted 89 lines
arch/arm/mach-s3c2443/s3c2443.c +3
-0int no)void __init s3c2443_map_io (void ) { + s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_s3c2443; + s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_s3c2443; +iotable_init (s3c2443_iodesc,ARRAY_SIZE (s3c2443_iodesc)); }arch/arm/plat-samsung/Kconfig +5
-0@@ -95,6 +95,12 @@ config S3C_GPIO_PULL_UPDOWN help Internal configuration to enable the correct GPIO pull helper +config S3C_GPIO_PULL_S3C2443 + bool + select S3C_GPIO_PULL_UPDOWN + help + Internal configuration to enable the correct GPIO pull helper forS3C2443-style GPIO
arch/arm/plat-samsung/Kconfig +1
-0+ config S3C_GPIO_PULL_DOWN bool helparch/arm/plat- renamed from arch/arm/plat-samsung/gpio-config.c +0
-0
samsung/gpio-config.c
index b732b77..6eeb20b 100644arch/arm/plat-samsung/gpio-config.c +42
-0@@ -278,6 +278,48 @@ s3c_gpio_pull_t s3c_gpio_getpull_updown(struct s3c_gpio_chip *chip, pup &=0x3 ; return (__force s3c_gpio_pull_t)pup; } + +#ifdef CONFIG_S3C_GPIO_PULL_S3C2443 +int s3c_gpio_setpull_s3c2443 (struct s3c_gpio_chip *chip, +unsigned int off,s3c_gpio_pull_t pull) +{ +switch (pull) { +case S3C_GPIO_PULL_NONE : + pull =0x01 ; +break ; +case S3C_GPIO_PULL_UP : + pull =0x00 ; +break ; +case S3C_GPIO_PULL_DOWN : + pull =0x02 ; +break ; + } +return s3c_gpio_setpull_updown (chip, off, pull); +} + +s3c_gpio_pull_t s3c_gpio_getpull_s3c2443 (struct s3c_gpio_chip *chip, +unsigned int off) +{ +s3c_gpio_pull_t pull; + + pull =s3c_gpio_getpull_updown (chip, off); + +switch (pull) { +case 0x00 : + pull =S3C_GPIO_PULL_UP ; +break ; +case 0x01 : +case 0x03 : + pull =S3C_GPIO_PULL_NONE ; +break ; +case 0x02 : + pull =S3C_GPIO_PULL_DOWN ; +break ; + } + +return pull; +} +#endif #endif #ifdef
CONFIG_S3C_GPIO_PULL_UParch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +0
-0@@ -233,7 +233,7 @@ extern int s3c_gpio_setpull_s3c2443(struct
s3c_gpio_chip
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h extern int s3c_gpio_setpull_s3c2443(struct · line 234
Quoted 2 lines
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +0
-0*chip, * This helper function reads the state of the pull-{up,down} resistor
for
Quoted 4 lines
the
* given GPIO in the same case ass3c_gpio_setpull_upown.
*/
-externs3c_gpio_pull_ts3c_gpio_getpull_s3c24xx(structs3c_gpio_chip
*chip,
Quoted 1 line
+extern
s3c_gpio_pull_ts3c_gpio_getpull_s3c2443(structs3c_gpio_chip
*chip,
Quoted 4 lines
unsigned int off);
#endif /*
__PLAT_GPIO_CFG_HELPERS_H*/
--
You're right. Looks ok to me.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 8/10 ARM SAMSUNG: Don't export __init functions to modules
In reply to Yauhen KharuzhyThere are few functions marked as __init, but exported to modules in devices declaration files.
s3c_nand_set_platdata() and s3c24xx_ts_set_platdata() are used only by boards init code now, so remove EXPORT_SYMBOL() for them.
--- arch/arm/plat-s3c24xx/devs.c | 1 - arch/arm/plat-samsung/dev-nand.c | 2 -- 2 files changed, 0 insertions(+), 3 deletions(-)
arch/arm/plat-s3c24xx/devs.c +0 -1
@@ -194,7 +194,6 @@ void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_memcpy (&s3c2410ts_info, hard_s3c2410ts_info,sizeof (struct s3c2410_ts_mach_info )); s3c_device_ts.dev.platform_data = &s3c2410ts_info; } -EXPORT_SYMBOL (s3c24xx_ts_set_platdata);/* USB Device (Gadget)*/
arch/arm/plat-samsung/dev-nand.c +0 -2
@@ -126,5 +126,3 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand) s3c_device_nand.dev.platform_data = npd; } - -EXPORT_SYMBOL_GPL (s3c_nand_set_platdata);
Signature · 1 line
1.7.2.3
PATCH 9/10 ARM S3C2412: Fix typo in CONFIG_CPU_S3C2412_ONLY definition
In reply to Yauhen KharuzhyDependency on (CPU_S3C2416 is not selected) was defined as "!CPU_2416", instead of "!CPU_S3C2416". Fix it.
--- arch/arm/mach-s3c2412/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-s3c2412/Kconfig +1 -1
@@ -16,7 +16,7 @@ config CPU_S3C2412 config CPU_S3C2412_ONLY bool depends on ARCH_S3C2410 && !CPU_S3C2400 && !CPU_S3C2410 && \ - !CPU_2416 && !CPU_S3C2440 && !CPU_S3C2442 && \ + !CPU_S3C2416 && !CPU_S3C2440 && !CPU_S3C2442 && \ !CPU_S3C2443 && CPU_S3C2412 default y if CPU_S3C2412
Signature · 1 line
1.7.2.3
PATCH 9/10 ARM S3C2412: Fix typo in CONFIG_CPU_S3C2412_ONLY definition
Quoted 14 lines · Yauhen Kharuzhy
Dependency on (
CPU_S3C2416is not selected) was defined as "!CPU_2416", instead of "!CPU_S3C2416". Fix it.Signed-off-by Yauhen Kharuzhy <[email protected]>--- arch/arm/mach-s3c2412/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-s3c2412/Kconfig +0
-0
arch/arm/mach-s3c2412/Kconfig config CPU_S3C2412
Quoted 9 lines
arch/arm/mach-s3c2412/Kconfig +1
-2@@ -16,7 +16,7 @@ config CPU_S3C2412 config CPU_S3C2412_ONLY bool depends on ARCH_S3C2410 && !CPU_S3C2400 && !CPU_S3C2410 && \ - !CPU_2416 && !CPU_S3C2440 && !CPU_S3C2442 && \ + !CPU_S3C2416 && !CPU_S3C2440 && !CPU_S3C2442 && \ !CPU_S3C2443 && CPU_S3C2412 default y if CPU_S3C2412 --
Yeah, looks ok to me.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 9/10 ARM S3C2412: Fix typo in CONFIG_CPU_S3C2412_ONLY definition
In reply to Yauhen KharuzhyQuoted 2 lines · Yauhen Kharuzhy
Dependency on (
CPU_S3C2416is not selected) was defined as "!CPU_2416", instead of "!CPU_S3C2416". Fix it.
ok, applied.
PATCH 1/10 SMDK2416: Select MACH_SMDK, S3C_DEV_NAND, S3C_DEV_USB_HOST
In reply to Yauhen KharuzhyQuoted 14 lines · Yauhen Kharuzhy
Enable compilation of platform devices and initialization code used in SMDK2416 board file.
Signed-off-by Yauhen Kharuzhy <[email protected]>--- arch/arm/mach-s3c2416/Kconfig | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)arch/arm/mach-s3c2416/Kconfig +0
-0
arch/arm/mach-s3c2416/Kconfig menu "S3C2416 Machines" · line 38
Quoted 4 lines
arch/arm/mach-s3c2416/Kconfig +1
-0@@ -35,9 +35,12 @@ menu "S3C2416 Machines" config MACH_SMDK2416 bool "SMDK2416" select CPU_S3C2416 + select MACH_SMDK
No need to add this here.
According to mach-s3c2416/Kconfig, CPU_S3C2416 depends on ARCH_S3C2410. Actually only selected it when selected ARCH_S3C24XX...
But I think need to sort out selection for S3C24XX in Kconfig.
arch/arm/mach-s3c2416/Kconfig menu "S3C2416 Machines" · line 43
Quoted 5 lines
arch/arm/mach-s3c2416/Kconfig +2
-0select S3C_DEV_FB select S3C_DEV_HSMMC select S3C_DEV_HSMMC1 + select S3C_DEV_NAND + select S3C_DEV_USB_HOST
Probably, did you test NAND and USB_HOST on board?
arch/arm/mach-s3c2416/Kconfig menu "S3C2416 Machines"
Quoted 4 lines
arch/arm/mach-s3c2416/Kconfig +0
-1select S3C2416_PM if PM help Say Y here if you are using an SMDK2416 --
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/10 SMDK2416: Select MACH_SMDK, S3C_DEV_NAND, S3C_DEV_USB_HOST
Quoted 10 lines · Kukjin Kim
Quoted 9 lines · Yauhen Kharuzhy
Enable compilation of platform devices and initialization code used in SMDK2416 board file.
Signed-off-by Yauhen Kharuzhy <[email protected]>--- arch/arm/mach-s3c2416/Kconfig | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Quoted 11 lines
arch/arm/mach-s3c2416/Kconfig menu "S3C2416 Machines" · line 38
Quoted 9 lines
arch/arm/mach-s3c2416/Kconfig +1
-0@@ -35,9 +35,12 @@ menu "S3C2416 Machines" config MACH_SMDK2416 bool "SMDK2416" select CPU_S3C2416 + select MACH_SMDKNo need to add this here.
SMDK2416 board code uses generic SMDK code, so it should be compiled also.
Quoted 2 lines
According to mach-s3c2416/Kconfig,
CPU_S3C2416depends onARCH_S3C2410. Actually only selected it when selectedARCH_S3C24XX...
Can you clarify this?
Quoted 10 lines
But I think need to sort out selection for S3C24XX in
Kconfig.arch/arm/mach-s3c2416/Kconfig menu "S3C2416 Machines" · line 43
Quoted 5 lines
arch/arm/mach-s3c2416/Kconfig +2
-0select S3C_DEV_FB select S3C_DEV_HSMMC select S3C_DEV_HSMMC1 + select S3C_DEV_NAND + select S3C_DEV_USB_HOSTProbably, did you test NAND and
USB_HOSTon board?
Yes, but one year ago. I don't have access to SMDK2416 anymore and usually test my patches on another S3C2416 board (e-book reader prototype).
Without selection of S3C_DEV_NAND & S3C_DEV_USB_HOST mach-smdk2416.c doesn't compile, so we should either enable this platform devices definitions, either remove this devices from board file.
Quoted 5 lines
Quoted 5 lines
arch/arm/mach-s3c2416/Kconfig +0
-1select S3C2416_PM if PM help Say Y here if you are using an SMDK2416 --
Signature · 5 lines
Yauhen Kharuzhy jekhor _at_ gmail.com JID: jek at jabber.ru A: No Q: Should I quote below my post?
PATCH 1/10 SMDK2416: Select MACH_SMDK, S3C_DEV_NAND, S3C_DEV_USB_HOST
Quoted 9 lines · Yauhen Kharuzhy
Quoted 8 lines
arch/arm/mach-s3c2416/Kconfig menu "S3C2416 Machines" · line 38
Quoted 6 lines
arch/arm/mach-s3c2416/Kconfig +1
-0@@ -35,9 +35,12 @@ menu "S3C2416 Machines" config MACH_SMDK2416 bool "SMDK2416" select CPU_S3C2416 + select MACH_SMDKNo need to add this here.
Quoted 3 lines
SMDK2416 board code uses generic SMDK code, so it should be compiled also.
Yeah, I was confused. You're right.
If there is no 'MACH_SMDK', happened following error with only S3C2416 arch/arm/mach-s3c2416/built-in.o: In function `smdk2416_machine_init':arch/arm/mach-s3c2416/mach-smdk2416.c:193: undefined reference to `smdk_machine_init'
Quoted 10 lines
Quoted 7 lines
arch/arm/mach-s3c2416/Kconfig menu "S3C2416 Machines" · line 43
Quoted 5 lines
arch/arm/mach-s3c2416/Kconfig +2
-0select S3C_DEV_FB select S3C_DEV_HSMMC select S3C_DEV_HSMMC1 + select S3C_DEV_NAND + select S3C_DEV_USB_HOSTProbably, did you test NAND and
USB_HOSTon board?Yes, but one year ago. I don't have access to SMDK2416 anymore and usually test my patches on another S3C2416 board (e-book reader prototype).
(Added Banajit in To)
Banajit, could you please test this on SMDK2416?
Quoted 4 lines
Without selection of
S3C_DEV_NAND&S3C_DEV_USB_HOSTmach-smdk2416.cdoesn't compile, so we should either enable this platform devices definitions, either remove this devices from board file.
Yes, if there is no 'S3C_DEV_USB_HOST', happened following error. arch/arm/mach-s3c2416/built-in.o:(.init.data+0x48): undefined reference to `s3c_device_ohci'
But I couldn't find 's3c_device_nand' device in mach-smdk2416.c and any regarding NAND build failure.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/10 SMDK2416: Select MACH_SMDK, S3C_DEV_NAND, S3C_DEV_USB_HOST
Quoted 39 lines · Kukjin Kim
Quoted 9 lines · Yauhen Kharuzhy
Quoted 8 lines
arch/arm/mach-s3c2416/Kconfig menu "S3C2416 Machines" · line 38
Quoted 6 lines
arch/arm/mach-s3c2416/Kconfig +1
-0@@ -35,9 +35,12 @@ menu "S3C2416 Machines" config MACH_SMDK2416 bool "SMDK2416" select CPU_S3C2416 + select MACH_SMDKNo need to add this here.
Quoted 3 lines
SMDK2416 board code uses generic SMDK code, so it should be compiled also.
Yeah, I was confused. You're right.
If there is no '
MACH_SMDK', happened following error with only S3C2416arch/arm/mach-s3c2416/built-in.o: In function `smdk2416_machine_init':arch/arm/mach-s3c2416/mach-smdk2416.c:193: undefined reference to `smdk_machine_init'Quoted 10 lines
Quoted 7 lines
arch/arm/mach-s3c2416/Kconfig menu "S3C2416 Machines" · line 43
Quoted 5 lines
arch/arm/mach-s3c2416/Kconfig +2
-0select S3C_DEV_FB select S3C_DEV_HSMMC select S3C_DEV_HSMMC1 + select S3C_DEV_NAND + select S3C_DEV_USB_HOSTProbably, did you test NAND and
USB_HOSTon board?Yes, but one year ago. I don't have access to SMDK2416 anymore and usually test my patches on another S3C2416 board (e-book reader prototype).
(Added Banajit in To)
Banajit, could you please test this on SMDK2416?
Quoted 4 lines
Without selection of
S3C_DEV_NAND&S3C_DEV_USB_HOSTmach-smdk2416.cdoesn't compile, so we should either enable this platform devices definitions, either remove this devices from board file.
Quoted 6 lines
Yes, if there is no '
S3C_DEV_USB_HOST', happened following error. arch/arm/mach-s3c2416/built-in.o:(.init.data+0x48): undefined reference to `s3c_device_ohci'But I couldn't find '
s3c_device_nand' device inmach-smdk2416.cand any regarding NAND build failure.
s3c_device_nand is used by arch/arm/plat-samsung/common-smdk.c
Signature · 5 lines
Yauhen Kharuzhy jekhor _at_ gmail.com JID: jek at jabber.ru A: No Q: Should I quote below my post?
PATCH 1/10 SMDK2416: Select MACH_SMDK, S3C_DEV_NAND, S3C_DEV_USB_HOST
Quoted 29 lines · Yauhen Kharuzhy
Quoted 27 lines · Kukjin Kim
Quoted 9 lines · Yauhen Kharuzhy
Quoted 8 lines
arch/arm/mach-s3c2416/Kconfig menu "S3C2416 Machines" · line 38
Quoted 6 lines
arch/arm/mach-s3c2416/Kconfig +1
-0@@ -35,9 +35,12 @@ menu "S3C2416 Machines" config MACH_SMDK2416 bool "SMDK2416" select CPU_S3C2416 + select MACH_SMDKNo need to add this here.
Quoted 3 lines
SMDK2416 board code uses generic SMDK code, so it should be compiled also.
Yeah, I was confused. You're right.
If there is no '
MACH_SMDK', happened following error with only S3C2416arch/arm/mach-s3c2416/built-in.o: In function `smdk2416_machine_init':arch/arm/mach-s3c2416/mach-smdk2416.c:193: undefined reference to `smdk_machine_init'Quoted 7 lines
Quoted 7 lines
arch/arm/mach-s3c2416/Kconfig menu "S3C2416 Machines" · line 43
Quoted 5 lines
arch/arm/mach-s3c2416/Kconfig +2
-0select S3C_DEV_FB select S3C_DEV_HSMMC select S3C_DEV_HSMMC1 + select S3C_DEV_NAND + select S3C_DEV_USB_HOSTProbably, did you test NAND and
USB_HOSTon board?
Quoted 15 lines
Quoted 1 line
Quoted 1 line
Yes, but one year ago. I don't have access to SMDK2416 anymore and
usually
Quoted 13 lines
Quoted 2 lines
test my patches on another S3C2416 board (e-book reader prototype).
(Added Banajit in To)
Banajit, could you please test this on SMDK2416?
Quoted 4 lines
Without selection of
S3C_DEV_NAND&S3C_DEV_USB_HOSTmach-smdk2416.cdoesn't compile, so we should either enable this platform devices definitions, either remove this devices from board file.Yes, if there is no '
S3C_DEV_USB_HOST', happened following error. arch/arm/mach-s3c2416/built-in.o:(.init.data+0x48): undefined reference
to
Quoted 6 lines
Quoted 4 lines
`s3c_device_ohci'
But I couldn't find '
s3c_device_nand' device inmach-smdk2416.cand any regarding NAND build failure.
s3c_device_nandis used byarch/arm/plat-samsung/common-smdk.c
plat-s3c24xx/common-smdk.c
Its failure is from typo :-(
You can find my patch for it in other my reply.
As a note, I will continue to review in next week.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/10 SMDK2416: Select MACH_SMDK, S3C_DEV_NAND, S3C_DEV_USB_HOST
In reply to Yauhen KharuzhyQuoted 2 lines · Yauhen Kharuzhy
Enable compilation of platform devices and initialization code used in SMDK2416 board file.
ok, will apply.