diff options
author | Ben Dooks <ben-linux@fluff.org> | 2009-03-24 12:09:06 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-05-07 06:04:57 -0400 |
commit | 2ab408e8759ad4b2a9bad3647838acd648d2c10c (patch) | |
tree | 2c05f326a6856023bf19009f57840de869e6278e /arch/arm/mach-s3c6400 | |
parent | c07f87f22ecc94201893b7a25430b7f5d5fd6de8 (diff) |
[ARM] SMDK6400: Initial machine support for SMDK6400
Add minimial support for the SMDK6400 board to test
the S3C6400 support.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c6400')
-rw-r--r-- | arch/arm/mach-s3c6400/Kconfig | 9 | ||||
-rw-r--r-- | arch/arm/mach-s3c6400/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c6400/mach-smdk6400.c | 96 |
3 files changed, 109 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c6400/Kconfig b/arch/arm/mach-s3c6400/Kconfig index 6da82b5c09ba..da87f2df103f 100644 --- a/arch/arm/mach-s3c6400/Kconfig +++ b/arch/arm/mach-s3c6400/Kconfig | |||
@@ -6,3 +6,12 @@ | |||
6 | # Licensed under GPLv2 | 6 | # Licensed under GPLv2 |
7 | 7 | ||
8 | # Currently nothing here, this will be added later | 8 | # Currently nothing here, this will be added later |
9 | |||
10 | # machine support | ||
11 | |||
12 | config MACH_SMDK6400 | ||
13 | bool "SMDK6400" | ||
14 | select CPU_S3C6410 | ||
15 | select S3C_DEV_HSMMC | ||
16 | help | ||
17 | Machine support for the Samsung SMDK6400 | ||
diff --git a/arch/arm/mach-s3c6400/Makefile b/arch/arm/mach-s3c6400/Makefile index 8f397db25b87..82cb48a2c2b0 100644 --- a/arch/arm/mach-s3c6400/Makefile +++ b/arch/arm/mach-s3c6400/Makefile | |||
@@ -13,3 +13,7 @@ obj- := | |||
13 | # Core support for S3C6400 system | 13 | # Core support for S3C6400 system |
14 | 14 | ||
15 | obj-n += blank.o | 15 | obj-n += blank.o |
16 | |||
17 | # Machine support | ||
18 | |||
19 | obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o | ||
diff --git a/arch/arm/mach-s3c6400/mach-smdk6400.c b/arch/arm/mach-s3c6400/mach-smdk6400.c new file mode 100644 index 000000000000..d020a2ac5b59 --- /dev/null +++ b/arch/arm/mach-s3c6400/mach-smdk6400.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* linux/arch/arm/mach-s3c6400/mach-smdk6400.c | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/types.h> | ||
14 | #include <linux/interrupt.h> | ||
15 | #include <linux/list.h> | ||
16 | #include <linux/timer.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/serial_core.h> | ||
19 | #include <linux/platform_device.h> | ||
20 | #include <linux/i2c.h> | ||
21 | #include <linux/io.h> | ||
22 | |||
23 | #include <asm/mach-types.h> | ||
24 | |||
25 | #include <asm/mach/arch.h> | ||
26 | #include <asm/mach/map.h> | ||
27 | #include <asm/mach/irq.h> | ||
28 | |||
29 | #include <mach/hardware.h> | ||
30 | #include <mach/map.h> | ||
31 | |||
32 | #include <plat/regs-serial.h> | ||
33 | |||
34 | #include <plat/s3c6400.h> | ||
35 | #include <plat/clock.h> | ||
36 | #include <plat/devs.h> | ||
37 | #include <plat/cpu.h> | ||
38 | #include <plat/iic.h> | ||
39 | |||
40 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK | ||
41 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | ||
42 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE | ||
43 | |||
44 | static struct s3c2410_uartcfg smdk6400_uartcfgs[] __initdata = { | ||
45 | [0] = { | ||
46 | .hwport = 0, | ||
47 | .flags = 0, | ||
48 | .ucon = 0x3c5, | ||
49 | .ulcon = 0x03, | ||
50 | .ufcon = 0x51, | ||
51 | }, | ||
52 | [1] = { | ||
53 | .hwport = 1, | ||
54 | .flags = 0, | ||
55 | .ucon = 0x3c5, | ||
56 | .ulcon = 0x03, | ||
57 | .ufcon = 0x51, | ||
58 | }, | ||
59 | }; | ||
60 | |||
61 | static struct map_desc smdk6400_iodesc[] = {}; | ||
62 | |||
63 | static void __init smdk6400_map_io(void) | ||
64 | { | ||
65 | s3c64xx_init_io(smdk6400_iodesc, ARRAY_SIZE(smdk6400_iodesc)); | ||
66 | s3c24xx_init_clocks(12000000); | ||
67 | s3c24xx_init_uarts(smdk6400_uartcfgs, ARRAY_SIZE(smdk6400_uartcfgs)); | ||
68 | } | ||
69 | |||
70 | static struct platform_device *smdk6400_devices[] __initdata = { | ||
71 | &s3c_device_hsmmc1, | ||
72 | &s3c_device_i2c0, | ||
73 | }; | ||
74 | |||
75 | static struct i2c_board_info i2c_devs[] __initdata = { | ||
76 | { I2C_BOARD_INFO("WM8753", 0x1A), }, | ||
77 | { I2C_BOARD_INFO("24c08", 0x50), }, | ||
78 | }; | ||
79 | |||
80 | static void __init smdk6400_machine_init(void) | ||
81 | { | ||
82 | i2c_register_board_info(0, i2c_devs, ARRAY_SIZE(i2c_devs)); | ||
83 | platform_add_devices(smdk6400_devices, ARRAY_SIZE(smdk6400_devices)); | ||
84 | } | ||
85 | |||
86 | MACHINE_START(SMDK6400, "SMDK6400") | ||
87 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | ||
88 | .phys_io = S3C_PA_UART & 0xfff00000, | ||
89 | .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, | ||
90 | .boot_params = S3C64XX_PA_SDRAM + 0x100, | ||
91 | |||
92 | .init_irq = s3c6400_init_irq, | ||
93 | .map_io = smdk6400_map_io, | ||
94 | .init_machine = smdk6400_machine_init, | ||
95 | .timer = &s3c24xx_timer, | ||
96 | MACHINE_END | ||