blob: 2968fb235f95504b800b9fe2dd3f28d40ed68ed8 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* linux/arch/arm/mach-s3c2410/mach-bast.c
2 *
3 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * http://www.simtec.co.uk/products/EB2410ITX/
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
Linus Torvalds1da177e2005-04-16 15:20:36 -070011*/
12
13#include <linux/kernel.h>
14#include <linux/types.h>
15#include <linux/interrupt.h>
16#include <linux/list.h>
17#include <linux/timer.h>
18#include <linux/init.h>
Russell Kingd052d1b2005-10-29 19:07:23 +010019#include <linux/platform_device.h>
Ben Dooksd97a6662005-06-23 21:56:47 +010020#include <linux/dm9000.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070021
22#include <asm/mach/arch.h>
23#include <asm/mach/map.h>
24#include <asm/mach/irq.h>
25
26#include <asm/arch/bast-map.h>
27#include <asm/arch/bast-irq.h>
28#include <asm/arch/bast-cpld.h>
29
30#include <asm/hardware.h>
31#include <asm/io.h>
32#include <asm/irq.h>
33#include <asm/mach-types.h>
34
35//#include <asm/debug-ll.h>
36#include <asm/arch/regs-serial.h>
37#include <asm/arch/regs-gpio.h>
38#include <asm/arch/regs-mem.h>
Ben Dooksd97a6662005-06-23 21:56:47 +010039#include <asm/arch/regs-lcd.h>
Ben Dooks58c8d572005-10-28 15:31:46 +010040
Linus Torvalds1da177e2005-04-16 15:20:36 -070041#include <asm/arch/nand.h>
Ben Dooks1fcf8442005-08-03 19:49:16 +010042#include <asm/arch/iic.h>
Ben Dooks58c8d572005-10-28 15:31:46 +010043#include <asm/arch/fb.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070044
45#include <linux/mtd/mtd.h>
46#include <linux/mtd/nand.h>
47#include <linux/mtd/nand_ecc.h>
48#include <linux/mtd/partitions.h>
49
Ben Dooks65cc3372005-07-18 10:24:32 +010050#include <linux/serial_8250.h>
51
Linus Torvalds1da177e2005-04-16 15:20:36 -070052#include "clock.h"
53#include "devs.h"
54#include "cpu.h"
55#include "usb-simtec.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070056
57#define COPYRIGHT ", (c) 2004-2005 Simtec Electronics"
58
59/* macros for virtual address mods for the io space entries */
60#define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5)
61#define VA_C4(item) ((unsigned long)(item) + BAST_VAM_CS4)
62#define VA_C3(item) ((unsigned long)(item) + BAST_VAM_CS3)
63#define VA_C2(item) ((unsigned long)(item) + BAST_VAM_CS2)
64
65/* macros to modify the physical addresses for io space */
66
Ben Dooks1d23b652005-11-08 19:15:31 +000067#define PA_CS2(item) (__phys_to_pfn((item) + S3C2410_CS2))
68#define PA_CS3(item) (__phys_to_pfn((item) + S3C2410_CS3))
69#define PA_CS4(item) (__phys_to_pfn((item) + S3C2410_CS4))
70#define PA_CS5(item) (__phys_to_pfn((item) + S3C2410_CS5))
Linus Torvalds1da177e2005-04-16 15:20:36 -070071
72static struct map_desc bast_iodesc[] __initdata = {
73 /* ISA IO areas */
Ben Dooks1d23b652005-11-08 19:15:31 +000074 {
75 .virtual = (u32)S3C24XX_VA_ISA_BYTE,
76 .pfn = PA_CS2(BAST_PA_ISAIO),
77 .length = SZ_16M,
78 .type = MT_DEVICE,
79 }, {
80 .virtual = (u32)S3C24XX_VA_ISA_WORD,
81 .pfn = PA_CS3(BAST_PA_ISAIO),
82 .length = SZ_16M,
83 .type = MT_DEVICE,
84 },
Linus Torvalds1da177e2005-04-16 15:20:36 -070085 /* bast CPLD control registers, and external interrupt controls */
Ben Dooks1d23b652005-11-08 19:15:31 +000086 {
87 .virtual = (u32)BAST_VA_CTRL1,
88 .pfn = __phys_to_pfn(BAST_PA_CTRL1),
89 .length = SZ_1M,
90 .type = MT_DEVICE,
91 }, {
92 .virtual = (u32)BAST_VA_CTRL2,
93 .pfn = __phys_to_pfn(BAST_PA_CTRL2),
94 .length = SZ_1M,
95 .type = MT_DEVICE,
96 }, {
97 .virtual = (u32)BAST_VA_CTRL3,
98 .pfn = __phys_to_pfn(BAST_PA_CTRL3),
99 .length = SZ_1M,
100 .type = MT_DEVICE,
101 }, {
102 .virtual = (u32)BAST_VA_CTRL4,
103 .pfn = __phys_to_pfn(BAST_PA_CTRL4),
104 .length = SZ_1M,
105 .type = MT_DEVICE,
106 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700107 /* PC104 IRQ mux */
Ben Dooks1d23b652005-11-08 19:15:31 +0000108 {
109 .virtual = (u32)BAST_VA_PC104_IRQREQ,
110 .pfn = __phys_to_pfn(BAST_PA_PC104_IRQREQ),
111 .length = SZ_1M,
112 .type = MT_DEVICE,
113 }, {
114 .virtual = (u32)BAST_VA_PC104_IRQRAW,
115 .pfn = __phys_to_pfn(BAST_PA_PC104_IRQRAW),
116 .length = SZ_1M,
117 .type = MT_DEVICE,
118 }, {
119 .virtual = (u32)BAST_VA_PC104_IRQMASK,
120 .pfn = __phys_to_pfn(BAST_PA_PC104_IRQMASK),
121 .length = SZ_1M,
122 .type = MT_DEVICE,
123 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700124
125 /* peripheral space... one for each of fast/slow/byte/16bit */
126 /* note, ide is only decoded in word space, even though some registers
127 * are only 8bit */
128
129 /* slow, byte */
130 { VA_C2(BAST_VA_ISAIO), PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
131 { VA_C2(BAST_VA_ISAMEM), PA_CS2(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700132 { VA_C2(BAST_VA_SUPERIO), PA_CS2(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700133 { VA_C2(BAST_VA_IDEPRI), PA_CS3(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE },
134 { VA_C2(BAST_VA_IDESEC), PA_CS3(BAST_PA_IDESEC), SZ_1M, MT_DEVICE },
135 { VA_C2(BAST_VA_IDEPRIAUX), PA_CS3(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE },
136 { VA_C2(BAST_VA_IDESECAUX), PA_CS3(BAST_PA_IDESECAUX), SZ_1M, MT_DEVICE },
137
138 /* slow, word */
139 { VA_C3(BAST_VA_ISAIO), PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
140 { VA_C3(BAST_VA_ISAMEM), PA_CS3(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700141 { VA_C3(BAST_VA_SUPERIO), PA_CS3(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700142 { VA_C3(BAST_VA_IDEPRI), PA_CS3(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE },
143 { VA_C3(BAST_VA_IDESEC), PA_CS3(BAST_PA_IDESEC), SZ_1M, MT_DEVICE },
144 { VA_C3(BAST_VA_IDEPRIAUX), PA_CS3(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE },
145 { VA_C3(BAST_VA_IDESECAUX), PA_CS3(BAST_PA_IDESECAUX), SZ_1M, MT_DEVICE },
146
147 /* fast, byte */
148 { VA_C4(BAST_VA_ISAIO), PA_CS4(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
149 { VA_C4(BAST_VA_ISAMEM), PA_CS4(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150 { VA_C4(BAST_VA_SUPERIO), PA_CS4(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700151 { VA_C4(BAST_VA_IDEPRI), PA_CS5(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE },
152 { VA_C4(BAST_VA_IDESEC), PA_CS5(BAST_PA_IDESEC), SZ_1M, MT_DEVICE },
153 { VA_C4(BAST_VA_IDEPRIAUX), PA_CS5(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE },
154 { VA_C4(BAST_VA_IDESECAUX), PA_CS5(BAST_PA_IDESECAUX), SZ_1M, MT_DEVICE },
155
156 /* fast, word */
157 { VA_C5(BAST_VA_ISAIO), PA_CS5(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
158 { VA_C5(BAST_VA_ISAMEM), PA_CS5(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700159 { VA_C5(BAST_VA_SUPERIO), PA_CS5(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700160 { VA_C5(BAST_VA_IDEPRI), PA_CS5(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE },
161 { VA_C5(BAST_VA_IDESEC), PA_CS5(BAST_PA_IDESEC), SZ_1M, MT_DEVICE },
162 { VA_C5(BAST_VA_IDEPRIAUX), PA_CS5(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE },
163 { VA_C5(BAST_VA_IDESECAUX), PA_CS5(BAST_PA_IDESECAUX), SZ_1M, MT_DEVICE },
164};
165
166#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
167#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
168#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
169
170static struct s3c24xx_uart_clksrc bast_serial_clocks[] = {
171 [0] = {
172 .name = "uclk",
173 .divisor = 1,
174 .min_baud = 0,
175 .max_baud = 0,
176 },
177 [1] = {
178 .name = "pclk",
179 .divisor = 1,
180 .min_baud = 0,
Ben Dooksb526bf22005-11-16 15:05:12 +0000181 .max_baud = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700182 }
183};
184
185
Ben Dooks66a9b492006-06-18 23:04:05 +0100186static struct s3c2410_uartcfg bast_uartcfgs[] __initdata = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700187 [0] = {
188 .hwport = 0,
189 .flags = 0,
190 .ucon = UCON,
191 .ulcon = ULCON,
192 .ufcon = UFCON,
193 .clocks = bast_serial_clocks,
Ben Dooksb526bf22005-11-16 15:05:12 +0000194 .clocks_size = ARRAY_SIZE(bast_serial_clocks),
Linus Torvalds1da177e2005-04-16 15:20:36 -0700195 },
196 [1] = {
197 .hwport = 1,
198 .flags = 0,
199 .ucon = UCON,
200 .ulcon = ULCON,
201 .ufcon = UFCON,
202 .clocks = bast_serial_clocks,
Ben Dooksb526bf22005-11-16 15:05:12 +0000203 .clocks_size = ARRAY_SIZE(bast_serial_clocks),
Linus Torvalds1da177e2005-04-16 15:20:36 -0700204 },
205 /* port 2 is not actually used */
206 [2] = {
207 .hwport = 2,
208 .flags = 0,
209 .ucon = UCON,
210 .ulcon = ULCON,
211 .ufcon = UFCON,
212 .clocks = bast_serial_clocks,
Ben Dooksb526bf22005-11-16 15:05:12 +0000213 .clocks_size = ARRAY_SIZE(bast_serial_clocks),
Linus Torvalds1da177e2005-04-16 15:20:36 -0700214 }
215};
216
217/* NOR Flash on BAST board */
218
219static struct resource bast_nor_resource[] = {
220 [0] = {
221 .start = S3C2410_CS1 + 0x4000000,
222 .end = S3C2410_CS1 + 0x4000000 + (32*1024*1024) - 1,
223 .flags = IORESOURCE_MEM,
224 }
225};
226
227static struct platform_device bast_device_nor = {
228 .name = "bast-nor",
229 .id = -1,
230 .num_resources = ARRAY_SIZE(bast_nor_resource),
231 .resource = bast_nor_resource,
232};
233
234/* NAND Flash on BAST board */
235
236
237static int smartmedia_map[] = { 0 };
238static int chip0_map[] = { 1 };
239static int chip1_map[] = { 2 };
240static int chip2_map[] = { 3 };
241
Ben Dooks9f693d72005-10-12 19:58:07 +0100242static struct mtd_partition bast_default_nand_part[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700243 [0] = {
244 .name = "Boot Agent",
245 .size = SZ_16K,
Ben Dooksb526bf22005-11-16 15:05:12 +0000246 .offset = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700247 },
248 [1] = {
249 .name = "/boot",
250 .size = SZ_4M - SZ_16K,
251 .offset = SZ_16K,
252 },
253 [2] = {
254 .name = "user",
255 .offset = SZ_4M,
256 .size = MTDPART_SIZ_FULL,
257 }
258};
259
260/* the bast has 4 selectable slots for nand-flash, the three
261 * on-board chip areas, as well as the external SmartMedia
262 * slot.
263 *
264 * Note, there is no current hot-plug support for the SmartMedia
265 * socket.
266*/
267
268static struct s3c2410_nand_set bast_nand_sets[] = {
269 [0] = {
270 .name = "SmartMedia",
271 .nr_chips = 1,
272 .nr_map = smartmedia_map,
273 .nr_partitions = ARRAY_SIZE(bast_default_nand_part),
Ben Dooksb526bf22005-11-16 15:05:12 +0000274 .partitions = bast_default_nand_part,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700275 },
276 [1] = {
277 .name = "chip0",
278 .nr_chips = 1,
279 .nr_map = chip0_map,
280 .nr_partitions = ARRAY_SIZE(bast_default_nand_part),
Ben Dooksb526bf22005-11-16 15:05:12 +0000281 .partitions = bast_default_nand_part,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700282 },
283 [2] = {
284 .name = "chip1",
285 .nr_chips = 1,
286 .nr_map = chip1_map,
287 .nr_partitions = ARRAY_SIZE(bast_default_nand_part),
Ben Dooksb526bf22005-11-16 15:05:12 +0000288 .partitions = bast_default_nand_part,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700289 },
290 [3] = {
291 .name = "chip2",
292 .nr_chips = 1,
293 .nr_map = chip2_map,
294 .nr_partitions = ARRAY_SIZE(bast_default_nand_part),
Ben Dooksb526bf22005-11-16 15:05:12 +0000295 .partitions = bast_default_nand_part,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700296 }
297};
298
299static void bast_nand_select(struct s3c2410_nand_set *set, int slot)
300{
301 unsigned int tmp;
302
303 slot = set->nr_map[slot] & 3;
304
305 pr_debug("bast_nand: selecting slot %d (set %p,%p)\n",
306 slot, set, set->nr_map);
307
308 tmp = __raw_readb(BAST_VA_CTRL2);
309 tmp &= BAST_CPLD_CTLR2_IDERST;
310 tmp |= slot;
311 tmp |= BAST_CPLD_CTRL2_WNAND;
312
313 pr_debug("bast_nand: ctrl2 now %02x\n", tmp);
314
315 __raw_writeb(tmp, BAST_VA_CTRL2);
316}
317
318static struct s3c2410_platform_nand bast_nand_info = {
Ben Dooksb048dbf2005-10-20 23:21:19 +0100319 .tacls = 30,
320 .twrph0 = 60,
321 .twrph1 = 60,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700322 .nr_sets = ARRAY_SIZE(bast_nand_sets),
323 .sets = bast_nand_sets,
324 .select_chip = bast_nand_select,
325};
326
Ben Dooksd97a6662005-06-23 21:56:47 +0100327/* DM9000 */
328
329static struct resource bast_dm9k_resource[] = {
330 [0] = {
331 .start = S3C2410_CS5 + BAST_PA_DM9000,
332 .end = S3C2410_CS5 + BAST_PA_DM9000 + 3,
Ben Dooksb526bf22005-11-16 15:05:12 +0000333 .flags = IORESOURCE_MEM,
Ben Dooksd97a6662005-06-23 21:56:47 +0100334 },
335 [1] = {
336 .start = S3C2410_CS5 + BAST_PA_DM9000 + 0x40,
337 .end = S3C2410_CS5 + BAST_PA_DM9000 + 0x40 + 0x3f,
Ben Dooksb526bf22005-11-16 15:05:12 +0000338 .flags = IORESOURCE_MEM,
Ben Dooksd97a6662005-06-23 21:56:47 +0100339 },
340 [2] = {
341 .start = IRQ_DM9000,
342 .end = IRQ_DM9000,
Ben Dooksb526bf22005-11-16 15:05:12 +0000343 .flags = IORESOURCE_IRQ,
Ben Dooksd97a6662005-06-23 21:56:47 +0100344 }
345
346};
347
348/* for the moment we limit ourselves to 16bit IO until some
349 * better IO routines can be written and tested
350*/
351
Ben Dooks9f693d72005-10-12 19:58:07 +0100352static struct dm9000_plat_data bast_dm9k_platdata = {
Ben Dooksb526bf22005-11-16 15:05:12 +0000353 .flags = DM9000_PLATF_16BITONLY,
Ben Dooksd97a6662005-06-23 21:56:47 +0100354};
355
356static struct platform_device bast_device_dm9k = {
357 .name = "dm9000",
358 .id = 0,
359 .num_resources = ARRAY_SIZE(bast_dm9k_resource),
360 .resource = bast_dm9k_resource,
361 .dev = {
362 .platform_data = &bast_dm9k_platdata,
363 }
364};
365
Ben Dooks65cc3372005-07-18 10:24:32 +0100366/* serial devices */
367
368#define SERIAL_BASE (S3C2410_CS2 + BAST_PA_SUPERIO)
369#define SERIAL_FLAGS (UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SHARE_IRQ)
370#define SERIAL_CLK (1843200)
371
372static struct plat_serial8250_port bast_sio_data[] = {
373 [0] = {
374 .mapbase = SERIAL_BASE + 0x2f8,
375 .irq = IRQ_PCSERIAL1,
376 .flags = SERIAL_FLAGS,
377 .iotype = UPIO_MEM,
378 .regshift = 0,
379 .uartclk = SERIAL_CLK,
380 },
381 [1] = {
382 .mapbase = SERIAL_BASE + 0x3f8,
383 .irq = IRQ_PCSERIAL2,
384 .flags = SERIAL_FLAGS,
385 .iotype = UPIO_MEM,
386 .regshift = 0,
387 .uartclk = SERIAL_CLK,
388 },
389 { }
390};
391
392static struct platform_device bast_sio = {
393 .name = "serial8250",
Russell King6df29de2005-09-08 16:04:41 +0100394 .id = PLAT8250_DEV_PLATFORM,
Ben Dooks65cc3372005-07-18 10:24:32 +0100395 .dev = {
396 .platform_data = &bast_sio_data,
397 },
398};
Linus Torvalds1da177e2005-04-16 15:20:36 -0700399
Ben Dooks1fcf8442005-08-03 19:49:16 +0100400/* we have devices on the bus which cannot work much over the
401 * standard 100KHz i2c bus frequency
402*/
403
404static struct s3c2410_platform_i2c bast_i2c_info = {
405 .flags = 0,
406 .slave_addr = 0x10,
407 .bus_freq = 100*1000,
408 .max_freq = 130*1000,
409};
410
Ben Dooks58c8d572005-10-28 15:31:46 +0100411
412static struct s3c2410fb_mach_info __initdata bast_lcd_info = {
413 .width = 640,
414 .height = 480,
415
416 .xres = {
417 .min = 320,
418 .max = 1024,
419 .defval = 640,
420 },
421
422 .yres = {
423 .min = 240,
424 .max = 600,
425 .defval = 480,
426 },
427
428 .bpp = {
429 .min = 4,
430 .max = 16,
431 .defval = 8,
432 },
433
434 .regs = {
435 .lcdcon1 = 0x00000176,
436 .lcdcon2 = 0x1d77c7c2,
437 .lcdcon3 = 0x013a7f13,
438 .lcdcon4 = 0x00000057,
439 .lcdcon5 = 0x00014b02,
440 }
441};
442
Linus Torvalds1da177e2005-04-16 15:20:36 -0700443/* Standard BAST devices */
444
445static struct platform_device *bast_devices[] __initdata = {
446 &s3c_device_usb,
447 &s3c_device_lcd,
448 &s3c_device_wdt,
449 &s3c_device_i2c,
450 &s3c_device_iis,
451 &s3c_device_rtc,
452 &s3c_device_nand,
Ben Dooksd97a6662005-06-23 21:56:47 +0100453 &bast_device_nor,
454 &bast_device_dm9k,
Ben Dooks65cc3372005-07-18 10:24:32 +0100455 &bast_sio,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700456};
457
458static struct clk *bast_clocks[] = {
459 &s3c24xx_dclk0,
460 &s3c24xx_dclk1,
461 &s3c24xx_clkout0,
462 &s3c24xx_clkout1,
463 &s3c24xx_uclk,
464};
465
466static struct s3c24xx_board bast_board __initdata = {
467 .devices = bast_devices,
468 .devices_count = ARRAY_SIZE(bast_devices),
469 .clocks = bast_clocks,
Ben Dooksb526bf22005-11-16 15:05:12 +0000470 .clocks_count = ARRAY_SIZE(bast_clocks),
Linus Torvalds1da177e2005-04-16 15:20:36 -0700471};
472
Ben Dooks5fe10ab2005-09-20 17:24:33 +0100473static void __init bast_map_io(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700474{
475 /* initialise the clocks */
476
477 s3c24xx_dclk0.parent = NULL;
478 s3c24xx_dclk0.rate = 12*1000*1000;
479
480 s3c24xx_dclk1.parent = NULL;
481 s3c24xx_dclk1.rate = 24*1000*1000;
482
483 s3c24xx_clkout0.parent = &s3c24xx_dclk0;
484 s3c24xx_clkout1.parent = &s3c24xx_dclk1;
485
486 s3c24xx_uclk.parent = &s3c24xx_clkout1;
487
488 s3c_device_nand.dev.platform_data = &bast_nand_info;
Ben Dooks1fcf8442005-08-03 19:49:16 +0100489 s3c_device_i2c.dev.platform_data = &bast_i2c_info;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700490
491 s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
492 s3c24xx_init_clocks(0);
493 s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
494 s3c24xx_set_board(&bast_board);
495 usb_simtec_init();
496}
497
Ben Dooks58c8d572005-10-28 15:31:46 +0100498static void __init bast_init(void)
499{
500 s3c24xx_fb_set_platdata(&bast_lcd_info);
501}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700502
503MACHINE_START(BAST, "Simtec-BAST")
Russell Kinge9dea0c2005-07-03 17:38:58 +0100504 /* Maintainer: Ben Dooks <ben@simtec.co.uk> */
Russell Kinge9dea0c2005-07-03 17:38:58 +0100505 .phys_io = S3C2410_PA_UART,
506 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
507 .boot_params = S3C2410_SDRAM_PA + 0x100,
Ben Dooksf705b1a2005-06-29 11:09:15 +0100508 .map_io = bast_map_io,
509 .init_irq = s3c24xx_init_irq,
Ben Dooks58c8d572005-10-28 15:31:46 +0100510 .init_machine = bast_init,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700511 .timer = &s3c24xx_timer,
512MACHINE_END