blob: cad2e05eddf781e2429c2afc143626ce563d7f59 [file] [log] [blame]
Kyungmin Park87c41222009-03-11 11:05:55 +09001/*
Ben Dooks431107e2010-01-26 10:11:04 +09002 * linux/arch/arm/mach-s3c64xx/mach-ncp.c
Kyungmin Park87c41222009-03-11 11:05:55 +09003 *
4 * Copyright (C) 2008-2009 Samsung Electronics
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
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/io.h>
21#include <linux/i2c.h>
22#include <linux/fb.h>
23#include <linux/gpio.h>
24#include <linux/delay.h>
25
26#include <video/platform_lcd.h>
27
Jamie Iles774b51f2011-11-04 01:10:04 +000028#include <asm/hardware/vic.h>
Kyungmin Park87c41222009-03-11 11:05:55 +090029#include <asm/mach/arch.h>
30#include <asm/mach/map.h>
31#include <asm/mach/irq.h>
32
33#include <mach/hardware.h>
Kyungmin Park87c41222009-03-11 11:05:55 +090034#include <mach/map.h>
35
36#include <asm/irq.h>
37#include <asm/mach-types.h>
38
39#include <plat/regs-serial.h>
40#include <plat/iic.h>
41#include <plat/fb.h>
42
Kyungmin Park87c41222009-03-11 11:05:55 +090043#include <plat/clock.h>
44#include <plat/devs.h>
45#include <plat/cpu.h>
Ajay Kumar49965e62011-07-21 01:23:19 +090046#include <plat/regs-fb-v4.h>
Kyungmin Park87c41222009-03-11 11:05:55 +090047
Kukjin Kimb024043b2011-12-22 23:27:42 +010048#include "common.h"
49
Kyungmin Park87c41222009-03-11 11:05:55 +090050#define UCON S3C2410_UCON_DEFAULT
51#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE
52#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
53
54static struct s3c2410_uartcfg ncp_uartcfgs[] __initdata = {
55 /* REVISIT: NCP uses only serial 1, 2 */
56 [0] = {
57 .hwport = 0,
58 .flags = 0,
59 .ucon = UCON,
60 .ulcon = ULCON,
61 .ufcon = UFCON,
62 },
63 [1] = {
64 .hwport = 1,
65 .flags = 0,
66 .ucon = UCON,
67 .ulcon = ULCON,
68 .ufcon = UFCON,
69 },
70 [2] = {
71 .hwport = 2,
72 .flags = 0,
73 .ucon = UCON,
74 .ulcon = ULCON,
75 .ufcon = UFCON,
76 },
77};
78
79static struct platform_device *ncp_devices[] __initdata = {
80 &s3c_device_hsmmc1,
81 &s3c_device_i2c0,
82};
83
Marek Szyprowski4d4e2bc2009-06-24 08:05:43 +020084static struct map_desc ncp_iodesc[] __initdata = {};
Kyungmin Park87c41222009-03-11 11:05:55 +090085
86static void __init ncp_map_io(void)
87{
88 s3c64xx_init_io(ncp_iodesc, ARRAY_SIZE(ncp_iodesc));
89 s3c24xx_init_clocks(12000000);
90 s3c24xx_init_uarts(ncp_uartcfgs, ARRAY_SIZE(ncp_uartcfgs));
91}
92
93static void __init ncp_machine_init(void)
94{
95 s3c_i2c0_set_platdata(NULL);
96
97 platform_add_devices(ncp_devices, ARRAY_SIZE(ncp_devices));
98}
99
100MACHINE_START(NCP, "NCP")
101 /* Maintainer: Samsung Electronics */
Nicolas Pitre170a5902011-07-05 22:38:17 -0400102 .atag_offset = 0x100,
Kyungmin Park87c41222009-03-11 11:05:55 +0900103 .init_irq = s3c6410_init_irq,
Jamie Iles774b51f2011-11-04 01:10:04 +0000104 .handle_irq = vic_handle_irq,
Kyungmin Park87c41222009-03-11 11:05:55 +0900105 .map_io = ncp_map_io,
106 .init_machine = ncp_machine_init,
Shawn Guocc8f2522012-04-26 21:08:52 +0800107 .init_late = s3c64xx_init_late,
Kyungmin Park87c41222009-03-11 11:05:55 +0900108 .timer = &s3c24xx_timer,
Kukjin Kimff84ded2012-01-03 14:03:30 +0100109 .restart = s3c64xx_restart,
Kyungmin Park87c41222009-03-11 11:05:55 +0900110MACHINE_END