Merge branch 'pm-runtime' into linux-next
[deliverable/linux.git] / arch / arm / mach-s3c64xx / mach-smdk6400.c
CommitLineData
431107ea 1/* linux/arch/arm/mach-s3c64xx/mach-smdk6400.c
2ab408e8
BD
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
774b51f8 25#include <asm/hardware/vic.h>
2ab408e8
BD
26#include <asm/mach/arch.h>
27#include <asm/mach/map.h>
28#include <asm/mach/irq.h>
29
30#include <mach/hardware.h>
31#include <mach/map.h>
32
33#include <plat/regs-serial.h>
34
2ab408e8
BD
35#include <plat/clock.h>
36#include <plat/devs.h>
37#include <plat/cpu.h>
38#include <plat/iic.h>
39
b024043b
KK
40#include "common.h"
41
2ab408e8
BD
42#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
43#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
44#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
45
46static struct s3c2410_uartcfg smdk6400_uartcfgs[] __initdata = {
47 [0] = {
48 .hwport = 0,
49 .flags = 0,
50 .ucon = 0x3c5,
51 .ulcon = 0x03,
52 .ufcon = 0x51,
53 },
54 [1] = {
55 .hwport = 1,
56 .flags = 0,
57 .ucon = 0x3c5,
58 .ulcon = 0x03,
59 .ufcon = 0x51,
60 },
61};
62
63static struct map_desc smdk6400_iodesc[] = {};
64
65static void __init smdk6400_map_io(void)
66{
67 s3c64xx_init_io(smdk6400_iodesc, ARRAY_SIZE(smdk6400_iodesc));
68 s3c24xx_init_clocks(12000000);
69 s3c24xx_init_uarts(smdk6400_uartcfgs, ARRAY_SIZE(smdk6400_uartcfgs));
70}
71
72static struct platform_device *smdk6400_devices[] __initdata = {
73 &s3c_device_hsmmc1,
74 &s3c_device_i2c0,
75};
76
77static struct i2c_board_info i2c_devs[] __initdata = {
19e3f485 78 { I2C_BOARD_INFO("wm8753", 0x1A), },
2ab408e8
BD
79 { I2C_BOARD_INFO("24c08", 0x50), },
80};
81
82static void __init smdk6400_machine_init(void)
83{
84 i2c_register_board_info(0, i2c_devs, ARRAY_SIZE(i2c_devs));
85 platform_add_devices(smdk6400_devices, ARRAY_SIZE(smdk6400_devices));
86}
87
88MACHINE_START(SMDK6400, "SMDK6400")
afdd225d 89 /* Maintainer: Ben Dooks <ben-linux@fluff.org> */
170a5908 90 .atag_offset = 0x100,
2ab408e8
BD
91
92 .init_irq = s3c6400_init_irq,
774b51f8 93 .handle_irq = vic_handle_irq,
2ab408e8
BD
94 .map_io = smdk6400_map_io,
95 .init_machine = smdk6400_machine_init,
96 .timer = &s3c24xx_timer,
ff84ded2 97 .restart = s3c64xx_restart,
2ab408e8 98MACHINE_END
This page took 0.224221 seconds and 5 git commands to generate.