From f0a83701399123b0e95cc4d949fcccf9941fd190 Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Mon, 13 Apr 2009 15:03:11 +0800 Subject: [ARM] pxa: move mach/i2c.h to plat/i2c.h Signed-off-by: Paul Shen Signed-off-by: Eric Miao --- arch/arm/mach-pxa/cm-x300.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-pxa/cm-x300.c') diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index a9f48b1cb54..a97f87a90d0 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include -- cgit v1.2.3-70-g09d2 From b3992b665379c8de6f47cd0b0e5b3004d26b05be Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Thu, 4 Jun 2009 10:44:51 +0300 Subject: [ARM] pxa/cm-x300: use OBM configuration for NAND flash CM-X300 can be assembled with different NAND flashes from different manufacturers. Adding their configuration to the kernel is impractical, therefore we will use the default NAND controller settings set up by the bootloader. Signed-off-by: Mike Rapoport Signed-off-by: Eric Miao --- arch/arm/mach-pxa/cm-x300.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-pxa/cm-x300.c') diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index a97f87a90d0..5295304731f 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c @@ -265,6 +265,7 @@ static struct mtd_partition cm_x300_nand_partitions[] = { static struct pxa3xx_nand_platform_data cm_x300_nand_info = { .enable_arbiter = 1, + .keep_config = 1, .parts = cm_x300_nand_partitions, .nr_parts = ARRAY_SIZE(cm_x300_nand_partitions), }; -- cgit v1.2.3-70-g09d2 From 1858ced3f990777defda93ad10ffa81c28ddc2e2 Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Thu, 4 Jun 2009 10:44:52 +0300 Subject: [ARM] pxa/cm-x300: add rtc-v3020 device registration Signed-off-by: Mike Rapoport Signed-off-by: Eric Miao --- arch/arm/mach-pxa/cm-x300.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'arch/arm/mach-pxa/cm-x300.c') diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index 5295304731f..cd39fa22ba2 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -46,6 +47,11 @@ #define CM_X300_MMC2_IRQ IRQ_GPIO(GPIO82_MMC2_IRQ) +#define GPIO95_RTC_CS (95) +#define GPIO96_RTC_WR (96) +#define GPIO97_RTC_RD (97) +#define GPIO98_RTC_IO (98) + static mfp_cfg_t cm_x300_mfp_cfg[] __initdata = { /* LCD */ GPIO54_LCD_LDD_0, @@ -135,6 +141,12 @@ static mfp_cfg_t cm_x300_mfp_cfg[] __initdata = { GPIO85_GPIO, /* MMC WP */ GPIO99_GPIO, /* Ethernet IRQ */ + /* RTC GPIOs */ + GPIO95_GPIO, /* RTC CS */ + GPIO96_GPIO, /* RTC WR */ + GPIO97_GPIO, /* RTC RD */ + GPIO98_GPIO, /* RTC IO */ + /* Standard I2C */ GPIO21_I2C_SCL, GPIO22_I2C_SDA, @@ -442,6 +454,31 @@ static void __init cm_x300_init_i2c(void) static inline void cm_x300_init_i2c(void) {} #endif +#if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE) +struct v3020_platform_data cm_x300_v3020_pdata = { + .use_gpio = 1, + .gpio_cs = GPIO95_RTC_CS, + .gpio_wr = GPIO96_RTC_WR, + .gpio_rd = GPIO97_RTC_RD, + .gpio_io = GPIO98_RTC_IO, +}; + +static struct platform_device cm_x300_rtc_device = { + .name = "v3020", + .id = -1, + .dev = { + .platform_data = &cm_x300_v3020_pdata, + } +}; + +static void __init cm_x300_init_rtc(void) +{ + platform_device_register(&cm_x300_rtc_device); +} +#else +static inline void cm_x300_init_rtc(void) {} +#endif + static void __init cm_x300_init(void) { /* board-processor specific GPIO initialization */ @@ -454,6 +491,7 @@ static void __init cm_x300_init(void) cm_x300_init_nand(); cm_x300_init_leds(); cm_x300_init_i2c(); + cm_x300_init_rtc(); } MACHINE_START(CM_X300, "CM-X300 module") -- cgit v1.2.3-70-g09d2 From b5a5c474b037ab61930c16b7a8e42874b54e5cb8 Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Thu, 4 Jun 2009 10:44:54 +0300 Subject: [ARM] pxa/cm-x300: add .fixup method to enable second DRAM bank Signed-off-by: Mike Rapoport Signed-off-by: Eric Miao --- arch/arm/mach-pxa/cm-x300.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arch/arm/mach-pxa/cm-x300.c') diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index cd39fa22ba2..465da26591b 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -494,6 +495,18 @@ static void __init cm_x300_init(void) cm_x300_init_rtc(); } +static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags, + char **cmdline, struct meminfo *mi) +{ + mi->nr_banks = 2; + mi->bank[0].start = 0xa0000000; + mi->bank[0].node = 0; + mi->bank[0].size = (64*1024*1024); + mi->bank[1].start = 0xc0000000; + mi->bank[1].node = 0; + mi->bank[1].size = (64*1024*1024); +} + MACHINE_START(CM_X300, "CM-X300 module") .phys_io = 0x40000000, .boot_params = 0xa0000100, @@ -502,4 +515,5 @@ MACHINE_START(CM_X300, "CM-X300 module") .init_irq = pxa3xx_init_irq, .timer = &pxa_timer, .init_machine = cm_x300_init, + .fixup = cm_x300_fixup, MACHINE_END -- cgit v1.2.3-70-g09d2