13 #include <linux/kernel.h>
14 #include <linux/types.h>
16 #include <linux/list.h>
21 #include <linux/serial_core.h>
25 #include <linux/i2c.h>
38 #include <mach/hardware.h>
44 #include <mach/regs-gpio.h>
45 #include <mach/regs-mem.h>
46 #include <mach/regs-lcd.h>
60 #include <plat/clock.h>
70 #define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics"
73 #define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5)
74 #define VA_C4(item) ((unsigned long)(item) + BAST_VAM_CS4)
75 #define VA_C3(item) ((unsigned long)(item) + BAST_VAM_CS3)
76 #define VA_C2(item) ((unsigned long)(item) + BAST_VAM_CS2)
80 #define PA_CS2(item) (__phys_to_pfn((item) + S3C2410_CS2))
81 #define PA_CS3(item) (__phys_to_pfn((item) + S3C2410_CS3))
82 #define PA_CS4(item) (__phys_to_pfn((item) + S3C2410_CS4))
83 #define PA_CS5(item) (__phys_to_pfn((item) + S3C2410_CS5))
163 #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
164 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
165 #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
208 #define bast_pm_suspend NULL
209 #define bast_pm_resume NULL
217 static int smartmedia_map[] = { 0 };
218 static int chip0_map[] = { 1 };
219 static int chip1_map[] = { 2 };
220 static int chip2_map[] = { 3 };
222 static struct mtd_partition __initdata bast_default_nand_part[] = {
224 .name =
"Boot Agent",
250 .name =
"SmartMedia",
252 .nr_map = smartmedia_map,
254 .nr_partitions =
ARRAY_SIZE(bast_default_nand_part),
255 .partitions = bast_default_nand_part,
261 .nr_partitions =
ARRAY_SIZE(bast_default_nand_part),
262 .partitions = bast_default_nand_part,
269 .nr_partitions =
ARRAY_SIZE(bast_default_nand_part),
270 .partitions = bast_default_nand_part,
277 .nr_partitions =
ARRAY_SIZE(bast_default_nand_part),
278 .partitions = bast_default_nand_part,
286 slot =
set->nr_map[
slot] & 3;
288 pr_debug(
"bast_nand: selecting slot %d (set %p,%p)\n",
289 slot,
set,
set->nr_map);
296 pr_debug(
"bast_nand: ctrl2 now %02x\n", tmp);
306 .sets = bast_nand_sets,
307 .select_chip = bast_nand_select,
312 static struct resource bast_dm9k_resource[] = {
330 .num_resources =
ARRAY_SIZE(bast_dm9k_resource),
331 .resource = bast_dm9k_resource,
333 .platform_data = &bast_dm9k_platdata,
339 #define SERIAL_BASE (S3C2410_CS2 + BAST_PA_SUPERIO)
340 #define SERIAL_FLAGS (UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SHARE_IRQ)
341 #define SERIAL_CLK (1843200)
364 .name =
"serial8250",
367 .platform_data = &bast_sio_data,
378 .frequency = 100*1000,
390 static struct resource bast_asix_resource[] = {
399 .num_resources =
ARRAY_SIZE(bast_asix_resource),
400 .resource = bast_asix_resource,
402 .platform_data = &bast_asix_platdata
408 static struct resource bast_asixpp_resource[] = {
414 .name =
"ax88796-pp",
416 .num_resources =
ARRAY_SIZE(bast_asixpp_resource),
417 .resource = bast_asixpp_resource,
439 .lcdcon5 = 0x00014b02,
457 .lcdcon5 = 0x00014b02,
475 .lcdcon5 = 0x00014b02,
483 .displays = bast_lcd_info,
485 .default_display = 1,
503 .name =
"lcd-contrast",
509 .name =
"led-feedback",
515 .name =
"lcd-feedback",
545 static struct clk *bast_clocks[] __initdata = {
564 static void __init bast_map_io(
void)
588 static void __init bast_init(
void)
611 .atag_offset = 0x100,
612 .map_io = bast_map_io,
614 .init_machine = bast_init,