s3c: mach-real6410: patches for next merge window
Subsystems (3)
v2 cover s3c: mach-real6410: patches for next merge window
Several patches adding support for mach-real6410 and main platform devices. Please see inline patches for detail description and changelogs.
---
Darius Augulis (4):
s3c: add support for mach-real6410
s3c: mach-real6410: add support for dm9000 ethernet
s3c: mach-real6410: add sdhc device support
s3c: mach-real6410: add nand support
arch/arm/mach-s3c64xx/Kconfig | 10 ++ arch/arm/mach-s3c64xx/Makefile | 1 arch/arm/mach-s3c64xx/mach-real6410.c | 193 +++++++++++++++++++++++++++++++++ 3 files changed, 204 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/mach-real6410.c
Signature · 1 line
Signature
PATCH v2 1/4 s3c: add support for mach-real6410
Add support for CoreWind Real6410 board,
based on Samsung s3c6410 processor.
---
Changelog since v1:
- Fixed errors reported by checkpatch.pl
- Spaces in indentation replaced by TABs
arch/arm/mach-s3c64xx/Kconfig | 6 ++ arch/arm/mach-s3c64xx/Makefile | 1 arch/arm/mach-s3c64xx/mach-real6410.c | 86 +++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/mach-real6410.c
arch/arm/mach-s3c64xx/Kconfig +6 -0
@@ -88,6 +88,12 @@ config MACH_ANW6410 help Machine support for the A&W6410 +config MACH_REAL6410 + bool "REAL6410" + select CPU_S3C6410 + help + Machine support for the CoreWind REAL6410 + config MACH_SMDK6410 bool "SMDK6410" select CPU_S3C6410
arch/arm/mach-s3c64xx/Makefile +1 -0
@@ -50,6 +50,7 @@ obj-$(CONFIG_PM) += irq-pm.o obj-$(CONFIG_MACH_ANW6410) += mach-anw6410.o obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o +obj-$(CONFIG_MACH_REAL6410) += mach-real6410.o obj-$(CONFIG_MACH_NCP) += mach-ncp.o obj-$(CONFIG_MACH_HMT) += mach-hmt.o obj-$(CONFIG_MACH_SMARTQ) += mach-smartq.o
arch/arm/mach-s3c64xx/mach-real6410.c new file +86 -0
86 lines not on this page · raw message
PATCH v2 2/4 s3c: mach-real6410: add support for dm9000 ethernet
In reply to Darius AugulisAdd support for dm9000 etherbet chip to mach-real6410
---
Changelog since v1:
- Fixed errors reported by checkpatch.pl
- Spaces in indentation replaced by TABs
arch/arm/mach-s3c64xx/mach-real6410.c | 103 +++++++++++++++++++++++++++------ 1 files changed, 83 insertions(+), 20 deletions(-)
arch/arm/mach-s3c64xx/mach-real6410.c +83 -20
@@ -17,6 +17,7 @@#include <linux/interrupt.h> #include <linux/list.h> #include <linux/init.h> +#include <linux/dm9000.h> #include <linux/serial_core.h> #include <linux/platform_device.h> #include <asm/mach-types.h>
@@ -24,6 +25,7 @@#include <asm/mach/map.h> #include <mach/map.h> #include <mach/s3c6410.h> +#include <mach/regs-srom.h> #include <plat/cpu.h> #include <plat/regs-serial.h>
@@ -33,35 +35,73 @@static struct s3c2410_uartcfg real6410_uartcfgs[]__initdata = { [0 ] = { - .hwport =0 , - .flags =0 , - .ucon =UCON , - .ulcon =ULCON , - .ufcon =UFCON , + .hwport =0 , + .flags =0 , + .ucon =UCON , + .ulcon =ULCON , + .ufcon =UFCON , }, [1 ] = { - .hwport =1 , - .flags =0 , - .ucon =UCON , - .ulcon =ULCON , - .ufcon =UFCON , + .hwport =1 , + .flags =0 , + .ucon =UCON , + .ulcon =ULCON , + .ufcon =UFCON , }, [2 ] = { - .hwport =2 , - .flags =0 , - .ucon =UCON , - .ulcon =ULCON , - .ufcon =UFCON , + .hwport =2 , + .flags =0 , + .ucon =UCON , + .ulcon =ULCON , + .ufcon =UFCON , }, [3 ] = { - .hwport =3 , - .flags =0 , - .ucon =UCON , - .ulcon =ULCON , - .ufcon =UFCON , + .hwport =3 , + .flags =0 , + .ucon =UCON , + .ulcon =ULCON , + .ufcon =UFCON , }, }; +/* DM9000AEP 10/100 ethernet controller */ + +static struct resource real6410_dm9k_resource[] = { + [0 ] = { + .start =S3C64XX_PA_XM0CSN1 , + .end =S3C64XX_PA_XM0CSN1 +1 , + .flags =IORESOURCE_MEM + }, + [1 ] = { + .start =S3C64XX_PA_XM0CSN1 +4 , + .end =S3C64XX_PA_XM0CSN1 +5 , + .flags =IORESOURCE_MEM + }, + [2 ] = { + .start =S3C_EINT (7 ), + .end =S3C_EINT (7 ), + .flags =IORESOURCE_IRQ |IORESOURCE_IRQ_HIGHLEVEL , + } +}; + +static struct dm9000_plat_data real6410_dm9k_pdata = { + .flags = (DM9000_PLATF_16BITONLY |DM9000_PLATF_NO_EEPROM ), +}; + +static struct platform_device real6410_device_eth = { + .name ="dm9000" , + .id =-1 , + .num_resources =ARRAY_SIZE (real6410_dm9k_resource), + .resource = real6410_dm9k_resource, + .dev = { + .platform_data = &real6410_dm9k_pdata, + }, +}; + +static struct platform_device *real6410_devices[]__initdata = { + &real6410_device_eth, +}; +static void __init real6410_map_io (void ) {s3c64xx_init_io (NULL ,0 );
@@ -71,6 +111,29 @@ static void __init real6410_map_io(void)static void __init real6410_machine_init (void ) { +u32 cs1; + +/* configure nCS1 width to 16 bits */ + + cs1 =__raw_readl (S3C64XX_SROM_BW ) & + ~(S3C64XX_SROM_BW__CS_MASK <<S3C64XX_SROM_BW__NCS1__SHIFT ); + cs1 |= ((1 <<S3C64XX_SROM_BW__DATAWIDTH__SHIFT ) | + (1 <<S3C64XX_SROM_BW__WAITENABLE__SHIFT ) | + (1 <<S3C64XX_SROM_BW__BYTEENABLE__SHIFT )) << +S3C64XX_SROM_BW__NCS1__SHIFT ; +__raw_writel (cs1,S3C64XX_SROM_BW ); + +/* set timing for nCS1 suitable for ethernet chip */ + +__raw_writel ((0 <<S3C64XX_SROM_BCX__PMC__SHIFT ) | + (6 <<S3C64XX_SROM_BCX__TACP__SHIFT ) | + (4 <<S3C64XX_SROM_BCX__TCAH__SHIFT ) | + (1 <<S3C64XX_SROM_BCX__TCOH__SHIFT ) | + (13 <<S3C64XX_SROM_BCX__TACC__SHIFT ) | + (4 <<S3C64XX_SROM_BCX__TCOS__SHIFT ) | + (0 <<S3C64XX_SROM_BCX__TACS__SHIFT ),S3C64XX_SROM_BC1 ); + +platform_add_devices (real6410_devices,ARRAY_SIZE (real6410_devices)); }MACHINE_START (REAL6410 ,"REAL6410" )
PATCH v2 3/4 s3c: mach-real6410: add sdhc device support
In reply to Darius AugulisAdd support for hsmmc0 and hsmmc1 devices support to mach-real6410
---
Changelog since v1:
- Fixed errors reported by checkpatch.pl
- Spaces in indentation replaced by TABs
arch/arm/mach-s3c64xx/Kconfig | 3 +++ arch/arm/mach-s3c64xx/mach-real6410.c | 3 +++ 2 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +3 -0
@@ -91,6 +91,9 @@ config MACH_ANW6410 config MACH_REAL6410 bool "REAL6410" select CPU_S3C6410 + select S3C_DEV_HSMMC + select S3C_DEV_HSMMC1 + select S3C64XX_SETUP_SDHCI help Machine support for the CoreWind REAL6410
arch/arm/mach-s3c64xx/mach-real6410.c +3 -0
@@ -27,6 +27,7 @@#include <mach/s3c6410.h> #include <mach/regs-srom.h> #include <plat/cpu.h> +#include <plat/devs.h> #include <plat/regs-serial.h> #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
@@ -100,6 +101,8 @@ static struct platform_device real6410_device_eth = {static struct platform_device *real6410_devices[]__initdata = { &real6410_device_eth, + &s3c_device_hsmmc0, + &s3c_device_hsmmc1, };static void __init real6410_map_io (void )
PATCH v2 4/4 s3c: mach-real6410: add nand support
In reply to Darius AugulisAdd nand device support and mtd partition table
for mach-real6410
---
Changelog since v1:
- Fixed errors reported by checkpatch.pl
- Spaces in indentation replaced by TABs
arch/arm/mach-s3c64xx/Kconfig | 1 + arch/arm/mach-s3c64xx/mach-real6410.c | 41 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 0 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +1 -0
@@ -93,6 +93,7 @@ config MACH_REAL6410 select CPU_S3C6410 select S3C_DEV_HSMMC select S3C_DEV_HSMMC1 + select S3C_DEV_NAND select S3C64XX_SETUP_SDHCI help Machine support for the CoreWind REAL6410
arch/arm/mach-s3c64xx/mach-real6410.c +41 -0
69 lines not on this page · raw message
PATCH v2 4/4 s3c: mach-real6410: add nand support
Quoted 2 lines · Darius Augulis
Add nand device support and mtd partition table
for mach-real6410
Ben, I see other three patches are merged, how about this one? There where no comments in mailing list, is it ready or not?
Quoted 101 lines
Signed-off-by Darius Augulis<[email protected]>---
Changelog since v1:
- Fixed errors reported by checkpatch.pl
- Spaces in indentation replaced by TABsarch/arm/mach-s3c64xx/Kconfig | 1 + arch/arm/mach-s3c64xx/mach-real6410.c | 41 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 0 deletions(-)arch/arm/mach-s3c64xx/Kconfig +1
-0@@ -93,6 +93,7 @@ config MACH_REAL6410 select CPU_S3C6410 select S3C_DEV_HSMMC select S3C_DEV_HSMMC1 + select S3C_DEV_NAND select S3C64XX_SETUP_SDHCI help Machine support for the CoreWind REAL6410arch/arm/mach-s3c64xx/mach-real6410.c +41
-0@@ -18,6 +18,8 @@#include <linux/list.h> #include <linux/init.h> #include <linux/dm9000.h> +#include <linux/mtd/mtd.h> +#include <linux/mtd/partitions.h> #include <linux/serial_core.h> #include <linux/platform_device.h> #include <asm/mach-types.h> @@ -28,6 +30,7 @@#include <mach/regs-srom.h> #include <plat/cpu.h> #include <plat/devs.h> +#include <plat/nand.h> #include <plat/regs-serial.h> #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)@@ -99,10 +102,46 @@ static struct platform_device real6410_device_eth = { }, }; +static struct mtd_partition real6410_nand_part[] = { + [0 ] = { + .name ="uboot" , + .size =SZ_1M , + .offset =0 , + }, + [1 ] = { + .name ="kernel" , + .size =SZ_2M , + .offset =SZ_1M , + }, + [2 ] = { + .name ="rootfs" , + .size =MTDPART_SIZ_FULL , + .offset =SZ_1M +SZ_2M , + }, +}; + +static struct s3c2410_nand_set real6410_nand_sets[] = { + [0 ] = { + .name ="nand" , + .nr_chips =1 , + .nr_partitions =ARRAY_SIZE (real6410_nand_part), + .partitions = real6410_nand_part, + }, +}; + +static struct s3c2410_platform_nand real6410_nand_info = { + .tacls =25 , + .twrph0 =55 , + .twrph1 =40 , + .nr_sets =ARRAY_SIZE (real6410_nand_sets), + .sets = real6410_nand_sets, +}; +static struct platform_device *real6410_devices[]__initdata = { &real6410_device_eth, &s3c_device_hsmmc0, &s3c_device_hsmmc1, + &s3c_device_nand, };static void __init real6410_map_io (void )@@ -116,6 +155,8 @@ static void __init real6410_machine_init(void) {u32 cs1; +s3c_nand_set_platdata (&real6410_nand_info); +/* configure nCS1 width to 16 bits */ cs1 = __raw_readl(S3C64XX_SROM_BW)&