aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100/collie.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-sa1100/collie.c')
-rw-r--r--arch/arm/mach-sa1100/collie.c55
1 files changed, 33 insertions, 22 deletions
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index fd5652118ed1..48885b7efd6b 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -22,15 +22,17 @@
22#include <linux/tty.h> 22#include <linux/tty.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/mfd/ucb1x00.h>
25#include <linux/mtd/mtd.h> 26#include <linux/mtd/mtd.h>
26#include <linux/mtd/partitions.h> 27#include <linux/mtd/partitions.h>
27#include <linux/timer.h> 28#include <linux/timer.h>
28#include <linux/gpio.h> 29#include <linux/gpio.h>
29#include <linux/pda_power.h> 30#include <linux/pda_power.h>
30 31
32#include <video/sa1100fb.h>
33
31#include <mach/hardware.h> 34#include <mach/hardware.h>
32#include <asm/mach-types.h> 35#include <asm/mach-types.h>
33#include <asm/irq.h>
34#include <asm/page.h> 36#include <asm/page.h>
35#include <asm/setup.h> 37#include <asm/setup.h>
36#include <mach/collie.h> 38#include <mach/collie.h>
@@ -44,15 +46,12 @@
44#include <asm/mach/sharpsl_param.h> 46#include <asm/mach/sharpsl_param.h>
45#include <asm/hardware/locomo.h> 47#include <asm/hardware/locomo.h>
46#include <mach/mcp.h> 48#include <mach/mcp.h>
49#include <mach/irqs.h>
47 50
48#include "generic.h" 51#include "generic.h"
49 52
50static struct resource collie_scoop_resources[] = { 53static struct resource collie_scoop_resources[] = {
51 [0] = { 54 [0] = DEFINE_RES_MEM(0x40800000, SZ_4K),
52 .start = 0x40800000,
53 .end = 0x40800fff,
54 .flags = IORESOURCE_MEM,
55 },
56}; 55};
57 56
58static struct scoop_config collie_scoop_setup = { 57static struct scoop_config collie_scoop_setup = {
@@ -85,10 +84,14 @@ static struct scoop_pcmcia_config collie_pcmcia_config = {
85 .num_devs = 1, 84 .num_devs = 1,
86}; 85};
87 86
87static struct ucb1x00_plat_data collie_ucb1x00_data = {
88 .gpio_base = COLLIE_TC35143_GPIO_BASE,
89};
90
88static struct mcp_plat_data collie_mcp_data = { 91static struct mcp_plat_data collie_mcp_data = {
89 .mccr0 = MCCR0_ADM | MCCR0_ExtClk, 92 .mccr0 = MCCR0_ADM | MCCR0_ExtClk,
90 .sclk_rate = 9216000, 93 .sclk_rate = 9216000,
91 .gpio_base = COLLIE_TC35143_GPIO_BASE, 94 .codec_pdata = &collie_ucb1x00_data,
92}; 95};
93 96
94/* 97/*
@@ -221,16 +224,8 @@ device_initcall(collie_uart_init);
221 224
222 225
223static struct resource locomo_resources[] = { 226static struct resource locomo_resources[] = {
224 [0] = { 227 [0] = DEFINE_RES_MEM(0x40000000, SZ_8K),
225 .start = 0x40000000, 228 [1] = DEFINE_RES_IRQ(IRQ_GPIO25),
226 .end = 0x40001fff,
227 .flags = IORESOURCE_MEM,
228 },
229 [1] = {
230 .start = IRQ_GPIO25,
231 .end = IRQ_GPIO25,
232 .flags = IORESOURCE_IRQ,
233 },
234}; 229};
235 230
236static struct locomo_platform_data locomo_info = { 231static struct locomo_platform_data locomo_info = {
@@ -303,11 +298,21 @@ static struct flash_platform_data collie_flash_data = {
303}; 298};
304 299
305static struct resource collie_flash_resources[] = { 300static struct resource collie_flash_resources[] = {
306 { 301 DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M),
307 .start = SA1100_CS0_PHYS, 302};
308 .end = SA1100_CS0_PHYS + SZ_32M - 1, 303
309 .flags = IORESOURCE_MEM, 304static struct sa1100fb_mach_info collie_lcd_info = {
310 } 305 .pixclock = 171521, .bpp = 16,
306 .xres = 320, .yres = 240,
307
308 .hsync_len = 5, .vsync_len = 1,
309 .left_margin = 11, .upper_margin = 2,
310 .right_margin = 30, .lower_margin = 0,
311
312 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
313
314 .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
315 .lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2),
311}; 316};
312 317
313static void __init collie_init(void) 318static void __init collie_init(void)
@@ -341,6 +346,10 @@ static void __init collie_init(void)
341 346
342 collie_power_resource[0].start = gpio_to_irq(COLLIE_GPIO_AC_IN); 347 collie_power_resource[0].start = gpio_to_irq(COLLIE_GPIO_AC_IN);
343 collie_power_resource[0].end = gpio_to_irq(COLLIE_GPIO_AC_IN); 348 collie_power_resource[0].end = gpio_to_irq(COLLIE_GPIO_AC_IN);
349
350 sa11x0_ppc_configure_mcp();
351
352
344 platform_scoop_config = &collie_pcmcia_config; 353 platform_scoop_config = &collie_pcmcia_config;
345 354
346 ret = platform_add_devices(devices, ARRAY_SIZE(devices)); 355 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
@@ -348,6 +357,7 @@ static void __init collie_init(void)
348 printk(KERN_WARNING "collie: Unable to register LoCoMo device\n"); 357 printk(KERN_WARNING "collie: Unable to register LoCoMo device\n");
349 } 358 }
350 359
360 sa11x0_register_lcd(&collie_lcd_info);
351 sa11x0_register_mtd(&collie_flash_data, collie_flash_resources, 361 sa11x0_register_mtd(&collie_flash_data, collie_flash_resources,
352 ARRAY_SIZE(collie_flash_resources)); 362 ARRAY_SIZE(collie_flash_resources));
353 sa11x0_register_mcp(&collie_mcp_data); 363 sa11x0_register_mcp(&collie_mcp_data);
@@ -383,6 +393,7 @@ static void __init collie_map_io(void)
383 393
384MACHINE_START(COLLIE, "Sharp-Collie") 394MACHINE_START(COLLIE, "Sharp-Collie")
385 .map_io = collie_map_io, 395 .map_io = collie_map_io,
396 .nr_irqs = SA1100_NR_IRQS,
386 .init_irq = sa1100_init_irq, 397 .init_irq = sa1100_init_irq,
387 .timer = &sa1100_timer, 398 .timer = &sa1100_timer,
388 .init_machine = collie_init, 399 .init_machine = collie_init,