From 42ff4cf957b695250534e540375e23507c722327 Mon Sep 17 00:00:00 2001 From: wanzongshun Date: Fri, 17 Jul 2009 14:42:33 +0100 Subject: [ARM] 5610/1: Add fmi resource define for w90p910 platform Add fmi resource define for w90p910 platform. Signed-off-by: Wan ZongShun Signed-off-by: Russell King --- arch/arm/mach-w90x900/mach-w90p910evb.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'arch/arm/mach-w90x900/mach-w90p910evb.c') diff --git a/arch/arm/mach-w90x900/mach-w90p910evb.c b/arch/arm/mach-w90x900/mach-w90p910evb.c index 7a62bd348e8..3b9fa312d9f 100644 --- a/arch/arm/mach-w90x900/mach-w90p910evb.c +++ b/arch/arm/mach-w90x900/mach-w90p910evb.c @@ -228,6 +228,28 @@ struct platform_device w90x900_device_usbgadget = { }; EXPORT_SYMBOL(w90x900_device_usbgadget); +/* FMI Device */ + +static struct resource w90p910_fmi_resource[] = { + [0] = { + .start = W90X900_PA_FMI, + .end = W90X900_PA_FMI + W90X900_SZ_FMI - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_FMI, + .end = IRQ_FMI, + .flags = IORESOURCE_IRQ, + } +}; + +static struct platform_device w90p910_device_fmi = { + .name = "w90p910-fmi", + .id = -1, + .num_resources = ARRAY_SIZE(w90p910_fmi_resource), + .resource = w90p910_fmi_resource, +}; + static struct map_desc w90p910_iodesc[] __initdata = { }; @@ -242,6 +264,7 @@ static struct platform_device *w90p910evb_dev[] __initdata = { &w90x900_device_rtc, &w90x900_device_kpi, &w90x900_device_usbgadget, + &w90p910_device_fmi, }; static void __init w90p910evb_map_io(void) -- cgit v1.2.3 From 768db4e04b4c969cf3a9e81a79a10af6468ca56d Mon Sep 17 00:00:00 2001 From: wanzongshun Date: Thu, 23 Jul 2009 08:47:57 +0100 Subject: [ARM] 5616/1: Add mac resource define for w90p910 mac driver Add mac resource define for w90p910 mac driver. Signed-off-by: Wan ZongShun Signed-off-by: Russell King --- arch/arm/mach-w90x900/mach-w90p910evb.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'arch/arm/mach-w90x900/mach-w90p910evb.c') diff --git a/arch/arm/mach-w90x900/mach-w90p910evb.c b/arch/arm/mach-w90x900/mach-w90p910evb.c index 3b9fa312d9f..2e56d84c632 100644 --- a/arch/arm/mach-w90x900/mach-w90p910evb.c +++ b/arch/arm/mach-w90x900/mach-w90p910evb.c @@ -250,6 +250,38 @@ static struct platform_device w90p910_device_fmi = { .resource = w90p910_fmi_resource, }; +/* MAC device */ + +static struct resource w90x900_emc_resource[] = { + [0] = { + .start = W90X900_PA_EMC, + .end = W90X900_PA_EMC + W90X900_SZ_EMC - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_EMCTX, + .end = IRQ_EMCTX, + .flags = IORESOURCE_IRQ, + }, + [2] = { + .start = IRQ_EMCRX, + .end = IRQ_EMCRX, + .flags = IORESOURCE_IRQ, + } +}; + +static u64 w90x900_device_emc_dmamask = 0xffffffffUL; +static struct platform_device w90p910_device_emc = { + .name = "w90p910-emc", + .id = -1, + .num_resources = ARRAY_SIZE(w90x900_emc_resource), + .resource = w90x900_emc_resource, + .dev = { + .dma_mask = &w90x900_device_emc_dmamask, + .coherent_dma_mask = 0xffffffffUL + } +}; + static struct map_desc w90p910_iodesc[] __initdata = { }; @@ -265,6 +297,7 @@ static struct platform_device *w90p910evb_dev[] __initdata = { &w90x900_device_kpi, &w90x900_device_usbgadget, &w90p910_device_fmi, + &w90p910_device_emc, }; static void __init w90p910evb_map_io(void) -- cgit v1.2.3 From c16d5d5657294e782d505efd00bbf2452d6aa0ca Mon Sep 17 00:00:00 2001 From: wanzongshun Date: Thu, 23 Jul 2009 08:51:46 +0100 Subject: [ARM] 5618/1: Add spi resource define for w90p910 spi driver Add spi resource define for w90p910 spi driver. Signed-off-by: Wan ZongShun Signed-off-by: Russell King --- arch/arm/mach-w90x900/mach-w90p910evb.c | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) (limited to 'arch/arm/mach-w90x900/mach-w90p910evb.c') diff --git a/arch/arm/mach-w90x900/mach-w90p910evb.c b/arch/arm/mach-w90x900/mach-w90p910evb.c index 2e56d84c632..3e3a267b2dd 100644 --- a/arch/arm/mach-w90x900/mach-w90p910evb.c +++ b/arch/arm/mach-w90x900/mach-w90p910evb.c @@ -20,7 +20,13 @@ #include #include #include + #include +#include +#include + +#include +#include #include #include @@ -35,6 +41,8 @@ #define W90P910_FLASH_BASE 0xA0000000 #define W90P910_FLASH_SIZE 0x400000 +#define SPIOFFSET 0x200 +#define SPIOREG_SIZE 0x100 static struct mtd_partition w90p910_flash_partitions[] = { { @@ -282,6 +290,56 @@ static struct platform_device w90p910_device_emc = { } }; +/* SPI device */ + +static struct resource w90p910_spi_resource[] = { + [0] = { + .start = W90X900_PA_I2C + SPIOFFSET, + .end = W90X900_PA_I2C + SPIOFFSET + SPIOREG_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_SSP, + .end = IRQ_SSP, + .flags = IORESOURCE_IRQ, + } +}; + +static struct platform_device w90p910_device_spi = { + .name = "w90p910-spi", + .id = -1, + .num_resources = ARRAY_SIZE(w90p910_spi_resource), + .resource = w90p910_spi_resource, +}; + +/* spi device, spi flash info */ + +static struct mtd_partition w90p910_spi_flash_partitions[] = { + { + .name = "bootloader(spi)", + .size = 0x0100000, + .offset = 0, + }, +}; + +static struct flash_platform_data w90p910_spi_flash_data = { + .name = "m25p80", + .parts = w90p910_spi_flash_partitions, + .nr_parts = ARRAY_SIZE(w90p910_spi_flash_partitions), + .type = "w25x16", +}; + +static struct spi_board_info w90p910_spi_board_info[] __initdata = { + { + .modalias = "m25p80", + .max_speed_hz = 20000000, + .bus_num = 0, + .chip_select = 1, + .platform_data = &w90p910_spi_flash_data, + .mode = SPI_MODE_0, + }, +}; + static struct map_desc w90p910_iodesc[] __initdata = { }; @@ -298,6 +356,7 @@ static struct platform_device *w90p910evb_dev[] __initdata = { &w90x900_device_usbgadget, &w90p910_device_fmi, &w90p910_device_emc, + &w90p910_device_spi, }; static void __init w90p910evb_map_io(void) @@ -309,6 +368,8 @@ static void __init w90p910evb_map_io(void) static void __init w90p910evb_init(void) { platform_add_devices(w90p910evb_dev, ARRAY_SIZE(w90p910evb_dev)); + spi_register_board_info(w90p910_spi_board_info, + ARRAY_SIZE(w90p910_spi_board_info)); } MACHINE_START(W90P910EVB, "W90P910EVB") -- cgit v1.2.3 From 897bd6a363770ced6b78f6ae8882325c7590ed8b Mon Sep 17 00:00:00 2001 From: wanzongshun Date: Fri, 31 Jul 2009 02:29:45 +0100 Subject: ARM: 5633/1: Add wdt resource for w90p910 platform Add wdt resource for w90p910 platform. Signed-off-by: Wan ZongShun Signed-off-by: Russell King --- arch/arm/mach-w90x900/mach-w90p910evb.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'arch/arm/mach-w90x900/mach-w90p910evb.c') diff --git a/arch/arm/mach-w90x900/mach-w90p910evb.c b/arch/arm/mach-w90x900/mach-w90p910evb.c index 3e3a267b2dd..117578aed68 100644 --- a/arch/arm/mach-w90x900/mach-w90p910evb.c +++ b/arch/arm/mach-w90x900/mach-w90p910evb.c @@ -340,6 +340,28 @@ static struct spi_board_info w90p910_spi_board_info[] __initdata = { }, }; +/* WDT Device */ + +static struct resource w90p910_wdt_resource[] = { + [0] = { + .start = W90X900_PA_TIMER, + .end = W90X900_PA_TIMER + W90X900_SZ_TIMER - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_WDT, + .end = IRQ_WDT, + .flags = IORESOURCE_IRQ, + } +}; + +static struct platform_device w90p910_device_wdt = { + .name = "w90p910-wdt", + .id = -1, + .num_resources = ARRAY_SIZE(w90p910_wdt_resource), + .resource = w90p910_wdt_resource, +}; + static struct map_desc w90p910_iodesc[] __initdata = { }; @@ -357,6 +379,7 @@ static struct platform_device *w90p910evb_dev[] __initdata = { &w90p910_device_fmi, &w90p910_device_emc, &w90p910_device_spi, + &w90p910_device_wdt, }; static void __init w90p910evb_map_io(void) -- cgit v1.2.3 From 35c9221acb133ecc9abd701a1fb6fa909d177a77 Mon Sep 17 00:00:00 2001 From: wanzongshun Date: Fri, 21 Aug 2009 07:07:46 +0100 Subject: ARM: 5682/1: Add cpu.c and dev.c and modify some files of w90p910 platform Add the cpu.c and dev.c and modify w90p910 platform to apply to use the common API(provided by cpu.c and dev.c) at the same time, I renamed all w90x900 to nuc900 in every c file of w90x900 platform and touchscreen's driver name. Signed-off-by: Wan ZongShun Signed-off-by: Russell King --- arch/arm/mach-w90x900/mach-w90p910evb.c | 407 -------------------------------- 1 file changed, 407 deletions(-) delete mode 100644 arch/arm/mach-w90x900/mach-w90p910evb.c (limited to 'arch/arm/mach-w90x900/mach-w90p910evb.c') diff --git a/arch/arm/mach-w90x900/mach-w90p910evb.c b/arch/arm/mach-w90x900/mach-w90p910evb.c deleted file mode 100644 index 117578aed68..00000000000 --- a/arch/arm/mach-w90x900/mach-w90p910evb.c +++ /dev/null @@ -1,407 +0,0 @@ -/* - * linux/arch/arm/mach-w90x900/mach-w90p910evb.c - * - * Based on mach-s3c2410/mach-smdk2410.c by Jonas Dietsche - * - * Copyright (C) 2008 Nuvoton technology corporation. - * - * Wan ZongShun - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation;version 2 of the License. - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include "cpu.h" -/*w90p910 evb norflash driver data */ - -#define W90P910_FLASH_BASE 0xA0000000 -#define W90P910_FLASH_SIZE 0x400000 -#define SPIOFFSET 0x200 -#define SPIOREG_SIZE 0x100 - -static struct mtd_partition w90p910_flash_partitions[] = { - { - .name = "NOR Partition 1 for kernel (960K)", - .size = 0xF0000, - .offset = 0x10000, - }, - { - .name = "NOR Partition 2 for image (1M)", - .size = 0x100000, - .offset = 0x100000, - }, - { - .name = "NOR Partition 3 for user (2M)", - .size = 0x200000, - .offset = 0x00200000, - } -}; - -static struct physmap_flash_data w90p910_flash_data = { - .width = 2, - .parts = w90p910_flash_partitions, - .nr_parts = ARRAY_SIZE(w90p910_flash_partitions), -}; - -static struct resource w90p910_flash_resources[] = { - { - .start = W90P910_FLASH_BASE, - .end = W90P910_FLASH_BASE + W90P910_FLASH_SIZE - 1, - .flags = IORESOURCE_MEM, - } -}; - -static struct platform_device w90p910_flash_device = { - .name = "physmap-flash", - .id = 0, - .dev = { - .platform_data = &w90p910_flash_data, - }, - .resource = w90p910_flash_resources, - .num_resources = ARRAY_SIZE(w90p910_flash_resources), -}; - -/* USB EHCI Host Controller */ - -static struct resource w90x900_usb_ehci_resource[] = { - [0] = { - .start = W90X900_PA_USBEHCIHOST, - .end = W90X900_PA_USBEHCIHOST + W90X900_SZ_USBEHCIHOST - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_USBH, - .end = IRQ_USBH, - .flags = IORESOURCE_IRQ, - } -}; - -static u64 w90x900_device_usb_ehci_dmamask = 0xffffffffUL; - -struct platform_device w90x900_device_usb_ehci = { - .name = "w90x900-ehci", - .id = -1, - .num_resources = ARRAY_SIZE(w90x900_usb_ehci_resource), - .resource = w90x900_usb_ehci_resource, - .dev = { - .dma_mask = &w90x900_device_usb_ehci_dmamask, - .coherent_dma_mask = 0xffffffffUL - } -}; -EXPORT_SYMBOL(w90x900_device_usb_ehci); - -/* USB OHCI Host Controller */ - -static struct resource w90x900_usb_ohci_resource[] = { - [0] = { - .start = W90X900_PA_USBOHCIHOST, - .end = W90X900_PA_USBOHCIHOST + W90X900_SZ_USBOHCIHOST - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_USBH, - .end = IRQ_USBH, - .flags = IORESOURCE_IRQ, - } -}; - -static u64 w90x900_device_usb_ohci_dmamask = 0xffffffffUL; -struct platform_device w90x900_device_usb_ohci = { - .name = "w90x900-ohci", - .id = -1, - .num_resources = ARRAY_SIZE(w90x900_usb_ohci_resource), - .resource = w90x900_usb_ohci_resource, - .dev = { - .dma_mask = &w90x900_device_usb_ohci_dmamask, - .coherent_dma_mask = 0xffffffffUL - } -}; -EXPORT_SYMBOL(w90x900_device_usb_ohci); - -/*TouchScreen controller*/ - -static struct resource w90x900_ts_resource[] = { - [0] = { - .start = W90X900_PA_ADC, - .end = W90X900_PA_ADC + W90X900_SZ_ADC-1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_ADC, - .end = IRQ_ADC, - .flags = IORESOURCE_IRQ, - }, -}; - -struct platform_device w90x900_device_ts = { - .name = "w90x900-ts", - .id = -1, - .resource = w90x900_ts_resource, - .num_resources = ARRAY_SIZE(w90x900_ts_resource), -}; -EXPORT_SYMBOL(w90x900_device_ts); - -/* RTC controller*/ - -static struct resource w90x900_rtc_resource[] = { - [0] = { - .start = W90X900_PA_RTC, - .end = W90X900_PA_RTC + 0xff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_RTC, - .end = IRQ_RTC, - .flags = IORESOURCE_IRQ, - }, -}; - -struct platform_device w90x900_device_rtc = { - .name = "w90x900-rtc", - .id = -1, - .num_resources = ARRAY_SIZE(w90x900_rtc_resource), - .resource = w90x900_rtc_resource, -}; -EXPORT_SYMBOL(w90x900_device_rtc); - -/* KPI controller*/ - -static struct resource w90x900_kpi_resource[] = { - [0] = { - .start = W90X900_PA_KPI, - .end = W90X900_PA_KPI + W90X900_SZ_KPI - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_KPI, - .end = IRQ_KPI, - .flags = IORESOURCE_IRQ, - } - -}; - -struct platform_device w90x900_device_kpi = { - .name = "w90x900-kpi", - .id = -1, - .num_resources = ARRAY_SIZE(w90x900_kpi_resource), - .resource = w90x900_kpi_resource, -}; -EXPORT_SYMBOL(w90x900_device_kpi); - -/* USB Device (Gadget)*/ - -static struct resource w90x900_usbgadget_resource[] = { - [0] = { - .start = W90X900_PA_USBDEV, - .end = W90X900_PA_USBDEV + W90X900_SZ_USBDEV - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_USBD, - .end = IRQ_USBD, - .flags = IORESOURCE_IRQ, - } -}; - -struct platform_device w90x900_device_usbgadget = { - .name = "w90x900-usbgadget", - .id = -1, - .num_resources = ARRAY_SIZE(w90x900_usbgadget_resource), - .resource = w90x900_usbgadget_resource, -}; -EXPORT_SYMBOL(w90x900_device_usbgadget); - -/* FMI Device */ - -static struct resource w90p910_fmi_resource[] = { - [0] = { - .start = W90X900_PA_FMI, - .end = W90X900_PA_FMI + W90X900_SZ_FMI - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_FMI, - .end = IRQ_FMI, - .flags = IORESOURCE_IRQ, - } -}; - -static struct platform_device w90p910_device_fmi = { - .name = "w90p910-fmi", - .id = -1, - .num_resources = ARRAY_SIZE(w90p910_fmi_resource), - .resource = w90p910_fmi_resource, -}; - -/* MAC device */ - -static struct resource w90x900_emc_resource[] = { - [0] = { - .start = W90X900_PA_EMC, - .end = W90X900_PA_EMC + W90X900_SZ_EMC - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_EMCTX, - .end = IRQ_EMCTX, - .flags = IORESOURCE_IRQ, - }, - [2] = { - .start = IRQ_EMCRX, - .end = IRQ_EMCRX, - .flags = IORESOURCE_IRQ, - } -}; - -static u64 w90x900_device_emc_dmamask = 0xffffffffUL; -static struct platform_device w90p910_device_emc = { - .name = "w90p910-emc", - .id = -1, - .num_resources = ARRAY_SIZE(w90x900_emc_resource), - .resource = w90x900_emc_resource, - .dev = { - .dma_mask = &w90x900_device_emc_dmamask, - .coherent_dma_mask = 0xffffffffUL - } -}; - -/* SPI device */ - -static struct resource w90p910_spi_resource[] = { - [0] = { - .start = W90X900_PA_I2C + SPIOFFSET, - .end = W90X900_PA_I2C + SPIOFFSET + SPIOREG_SIZE - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_SSP, - .end = IRQ_SSP, - .flags = IORESOURCE_IRQ, - } -}; - -static struct platform_device w90p910_device_spi = { - .name = "w90p910-spi", - .id = -1, - .num_resources = ARRAY_SIZE(w90p910_spi_resource), - .resource = w90p910_spi_resource, -}; - -/* spi device, spi flash info */ - -static struct mtd_partition w90p910_spi_flash_partitions[] = { - { - .name = "bootloader(spi)", - .size = 0x0100000, - .offset = 0, - }, -}; - -static struct flash_platform_data w90p910_spi_flash_data = { - .name = "m25p80", - .parts = w90p910_spi_flash_partitions, - .nr_parts = ARRAY_SIZE(w90p910_spi_flash_partitions), - .type = "w25x16", -}; - -static struct spi_board_info w90p910_spi_board_info[] __initdata = { - { - .modalias = "m25p80", - .max_speed_hz = 20000000, - .bus_num = 0, - .chip_select = 1, - .platform_data = &w90p910_spi_flash_data, - .mode = SPI_MODE_0, - }, -}; - -/* WDT Device */ - -static struct resource w90p910_wdt_resource[] = { - [0] = { - .start = W90X900_PA_TIMER, - .end = W90X900_PA_TIMER + W90X900_SZ_TIMER - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_WDT, - .end = IRQ_WDT, - .flags = IORESOURCE_IRQ, - } -}; - -static struct platform_device w90p910_device_wdt = { - .name = "w90p910-wdt", - .id = -1, - .num_resources = ARRAY_SIZE(w90p910_wdt_resource), - .resource = w90p910_wdt_resource, -}; - -static struct map_desc w90p910_iodesc[] __initdata = { -}; - -/*Here should be your evb resourse,such as LCD*/ - -static struct platform_device *w90p910evb_dev[] __initdata = { - &w90p910_serial_device, - &w90p910_flash_device, - &w90x900_device_usb_ehci, - &w90x900_device_usb_ohci, - &w90x900_device_ts, - &w90x900_device_rtc, - &w90x900_device_kpi, - &w90x900_device_usbgadget, - &w90p910_device_fmi, - &w90p910_device_emc, - &w90p910_device_spi, - &w90p910_device_wdt, -}; - -static void __init w90p910evb_map_io(void) -{ - w90p910_map_io(w90p910_iodesc, ARRAY_SIZE(w90p910_iodesc)); - w90p910_init_clocks(); -} - -static void __init w90p910evb_init(void) -{ - platform_add_devices(w90p910evb_dev, ARRAY_SIZE(w90p910evb_dev)); - spi_register_board_info(w90p910_spi_board_info, - ARRAY_SIZE(w90p910_spi_board_info)); -} - -MACHINE_START(W90P910EVB, "W90P910EVB") - /* Maintainer: Wan ZongShun */ - .phys_io = W90X900_PA_UART, - .io_pg_offst = (((u32)W90X900_VA_UART) >> 18) & 0xfffc, - .boot_params = 0, - .map_io = w90p910evb_map_io, - .init_irq = w90x900_init_irq, - .init_machine = w90p910evb_init, - .timer = &w90x900_timer, -MACHINE_END -- cgit v1.2.3