14 #include <linux/kernel.h>
15 #include <linux/types.h>
17 #include <linux/list.h>
21 #include <linux/slab.h>
30 #include <asm/system_misc.h>
47 #define NUC900_FLASH_BASE 0xA0000000
48 #define NUC900_FLASH_SIZE 0x400000
49 #define SPIOFFSET 0x200
50 #define SPIOREG_SIZE 0x100
54 .name =
"NOR Partition 1 for kernel (960K)",
59 .name =
"NOR Partition 2 for image (1M)",
64 .name =
"NOR Partition 3 for user (2M)",
72 .parts = nuc900_flash_partitions,
73 .nr_parts =
ARRAY_SIZE(nuc900_flash_partitions),
76 static struct resource nuc900_flash_resources[] = {
85 .name =
"physmap-flash",
88 .platform_data = &nuc900_flash_data,
90 .resource = nuc900_flash_resources,
91 .num_resources =
ARRAY_SIZE(nuc900_flash_resources),
96 static struct resource nuc900_usb_ehci_resource[] = {
109 static u64 nuc900_device_usb_ehci_dmamask = 0xffffffff
UL;
112 .name =
"nuc900-ehci",
114 .num_resources =
ARRAY_SIZE(nuc900_usb_ehci_resource),
115 .resource = nuc900_usb_ehci_resource,
117 .dma_mask = &nuc900_device_usb_ehci_dmamask,
118 .coherent_dma_mask = 0xffffffff
UL
124 static struct resource nuc900_usb_ohci_resource[] = {
137 static u64 nuc900_device_usb_ohci_dmamask = 0xffffffff
UL;
139 .name =
"nuc900-ohci",
141 .num_resources =
ARRAY_SIZE(nuc900_usb_ohci_resource),
142 .resource = nuc900_usb_ohci_resource,
144 .dma_mask = &nuc900_device_usb_ohci_dmamask,
145 .coherent_dma_mask = 0xffffffff
UL
151 static struct resource nuc900_usbgadget_resource[] = {
165 .name =
"nuc900-usbgadget",
167 .num_resources =
ARRAY_SIZE(nuc900_usbgadget_resource),
168 .resource = nuc900_usbgadget_resource,
173 static struct resource nuc900_emc_resource[] = {
191 static u64 nuc900_device_emc_dmamask = 0xffffffff
UL;
193 .name =
"nuc900-emc",
195 .num_resources =
ARRAY_SIZE(nuc900_emc_resource),
196 .resource = nuc900_emc_resource,
198 .dma_mask = &nuc900_device_emc_dmamask,
199 .coherent_dma_mask = 0xffffffff
UL
217 static struct resource nuc900_spi_resource[] = {
231 .name =
"nuc900-spi",
233 .num_resources =
ARRAY_SIZE(nuc900_spi_resource),
234 .resource = nuc900_spi_resource,
236 .platform_data = &nuc900_spiflash_data,
242 static struct mtd_partition nuc900_spi_flash_partitions[] = {
244 .name =
"bootloader(spi)",
252 .parts = nuc900_spi_flash_partitions,
253 .nr_parts =
ARRAY_SIZE(nuc900_spi_flash_partitions),
259 .modalias =
"m25p80",
260 .max_speed_hz = 20000000,
263 .platform_data = &nuc900_spi_flash_data,
270 static struct resource nuc900_wdt_resource[] = {
284 .name =
"nuc900-wdt",
286 .num_resources =
ARRAY_SIZE(nuc900_wdt_resource),
287 .resource = nuc900_wdt_resource,
301 static struct resource nuc900_rtc_resource[] = {
315 .name =
"nuc900-rtc",
317 .num_resources =
ARRAY_SIZE(nuc900_rtc_resource),
318 .resource = nuc900_rtc_resource,
323 static struct resource nuc900_ts_resource[] = {
339 .resource = nuc900_ts_resource,
340 .num_resources =
ARRAY_SIZE(nuc900_ts_resource),
345 static struct resource nuc900_fmi_resource[] = {
359 .name =
"nuc900-fmi",
361 .num_resources =
ARRAY_SIZE(nuc900_fmi_resource),
362 .resource = nuc900_fmi_resource,
367 static int nuc900_keymap[] = {
390 .keymap = nuc900_keymap,
395 .keymap_data = &nuc900_map_data,
400 static struct resource nuc900_kpi_resource[] = {
415 .name =
"nuc900-kpi",
417 .num_resources =
ARRAY_SIZE(nuc900_kpi_resource),
418 .resource = nuc900_kpi_resource,
443 .devctl = 0x060800c0,
444 .fbctrl = 0x00a000a0,
450 #if defined(CONFIG_GPM1040A0_320X240)
451 .displays = &nuc900_lcd_info[0],
453 .displays = nuc900_lcd_info,
456 .default_display = 0,
457 .gpio_dir = 0x00000004,
458 .gpio_dir_mask = 0xFFFFFFFD,
459 .gpio_data = 0x00000004,
460 .gpio_data_mask = 0xFFFFFFFD,
463 static struct resource nuc900_lcd_resource[] = {
476 static u64 nuc900_device_lcd_dmamask = -1;
478 .name =
"nuc900-lcd",
480 .num_resources =
ARRAY_SIZE(nuc900_lcd_resource),
481 .resource = nuc900_lcd_resource,
483 .dma_mask = &nuc900_device_lcd_dmamask,
484 .coherent_dma_mask = -1,
485 .platform_data = &nuc900_fb_info,
490 static u64 nuc900_device_audio_dmamask = -1;
491 static struct resource nuc900_ac97_resource[] = {
506 .name =
"nuc900-ac97",
508 .num_resources =
ARRAY_SIZE(nuc900_ac97_resource),
509 .resource = nuc900_ac97_resource,
511 .dma_mask = &nuc900_device_audio_dmamask,
512 .coherent_dma_mask = -1,
520 &nuc900_flash_device,
521 &nuc900_device_usb_ehci,
522 &nuc900_device_usb_ohci,
523 &nuc900_device_usbgadget,