From 15ba400ebb9d958afb3d2a7aa079a56e9ad2fe7a Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Tue, 16 Jun 2009 07:42:20 +0000 Subject: sh: Add support mtd mapping for highlander Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Paul Mundt --- arch/sh/boards/mach-highlander/setup.c | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'arch/sh/boards/mach-highlander/setup.c') diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c index 20fe72c515d5..df054e54bab3 100644 --- a/arch/sh/boards/mach-highlander/setup.c +++ b/arch/sh/boards/mach-highlander/setup.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -178,6 +179,53 @@ static struct platform_device ax88796_device = { .resource = ax88796_resources, }; +static struct mtd_partition nor_flash_partitions[] = { + { + .name = "loader", + .offset = 0x00000000, + .size = 512 * 1024, + }, + { + .name = "bootenv", + .offset = MTDPART_OFS_APPEND, + .size = 512 * 1024, + }, + { + .name = "kernel", + .offset = MTDPART_OFS_APPEND, + .size = 4 * 1024 * 1024, + }, + { + .name = "data", + .offset = MTDPART_OFS_APPEND, + .size = MTDPART_SIZ_FULL, + }, +}; + +static struct physmap_flash_data nor_flash_data = { + .width = 4, + .parts = nor_flash_partitions, + .nr_parts = ARRAY_SIZE(nor_flash_partitions), +}; + +/* This config is flash board for mass production. */ +static struct resource nor_flash_resources[] = { + [0] = { + .start = PA_NORFLASH_ADDR, + .end = PA_NORFLASH_ADDR + PA_NORFLASH_SIZE - 1, + .flags = IORESOURCE_MEM, + } +}; + +static struct platform_device nor_flash_device = { + .name = "physmap-flash", + .dev = { + .platform_data = &nor_flash_data, + }, + .num_resources = ARRAY_SIZE(nor_flash_resources), + .resource = nor_flash_resources, +}; + static struct resource smbus_resources[] = { [0] = { .start = PA_SMCR, @@ -209,6 +257,7 @@ static struct platform_device *r7780rp_devices[] __initdata = { &m66592_usb_peripheral_device, &heartbeat_device, &smbus_device, + &nor_flash_device, #ifndef CONFIG_SH_R7780RP &ax88796_device, #endif -- cgit v1.2.3 From 39f4490c70eae62cfed62081243110607069d3f9 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Tue, 16 Jun 2009 07:44:10 +0000 Subject: sh: Revised clock function in highlander Clock function was changed, but highlander used old function. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Paul Mundt --- arch/sh/boards/mach-highlander/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/sh/boards/mach-highlander/setup.c') diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c index df054e54bab3..dd297d87f934 100644 --- a/arch/sh/boards/mach-highlander/setup.c +++ b/arch/sh/boards/mach-highlander/setup.c @@ -296,9 +296,10 @@ device_initcall(r7780rp_devices_setup); /* * Platform specific clocks */ -static void ivdr_clk_enable(struct clk *clk) +static int ivdr_clk_enable(struct clk *clk) { ctrl_outw(ctrl_inw(PA_IVDRCTL) | (1 << IVDR_CK_ON), PA_IVDRCTL); + return 0; } static void ivdr_clk_disable(struct clk *clk) -- cgit v1.2.3 From 6239b20d1ba60810c122390e79f968ccb69908a6 Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Tue, 26 May 2009 09:33:05 +0000 Subject: sh: highlander: add platform data for r8a66597-hcd and remove redundant parameter for r8a66597-hcd. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Paul Mundt --- arch/sh/boards/mach-highlander/setup.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'arch/sh/boards/mach-highlander/setup.c') diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c index 20fe72c515d5..920ea76abac8 100644 --- a/arch/sh/boards/mach-highlander/setup.c +++ b/arch/sh/boards/mach-highlander/setup.c @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include #include #include @@ -27,18 +29,21 @@ #include #include +static struct r8a66597_platdata r8a66597_data = { + .xtal = R8A66597_PLATDATA_XTAL_12MHZ, + .vif = 1, +}; + static struct resource r8a66597_usb_host_resources[] = { [0] = { - .name = "r8a66597_hcd", .start = 0xA4200000, .end = 0xA42000FF, .flags = IORESOURCE_MEM, }, [1] = { - .name = "r8a66597_hcd", .start = IRQ_EXT1, /* irq number */ .end = IRQ_EXT1, - .flags = IORESOURCE_IRQ, + .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, }, }; @@ -48,6 +53,7 @@ static struct platform_device r8a66597_usb_host_device = { .dev = { .dma_mask = NULL, /* don't use dma */ .coherent_dma_mask = 0xffffffff, + .platform_data = &r8a66597_data, }, .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), .resource = r8a66597_usb_host_resources, -- cgit v1.2.3