]> Pileus Git - ~andy/linux/blob - arch/arm/mach-ux500/board-mop500.c
ARM: ux500: Remove UART support when booting without Device Tree
[~andy/linux] / arch / arm / mach-ux500 / board-mop500.c
1 /*
2  * Copyright (C) 2008-2012 ST-Ericsson
3  *
4  * Author: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
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 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/interrupt.h>
14 #include <linux/platform_device.h>
15 #include <linux/clk.h>
16 #include <linux/io.h>
17 #include <linux/platform_data/db8500_thermal.h>
18 #include <linux/amba/bus.h>
19 #include <linux/amba/pl022.h>
20 #include <linux/mfd/abx500/ab8500.h>
21 #include <linux/regulator/ab8500.h>
22 #include <linux/regulator/fixed.h>
23 #include <linux/regulator/driver.h>
24 #include <linux/mfd/tps6105x.h>
25 #include <linux/platform_data/leds-lp55xx.h>
26 #include <linux/input.h>
27 #include <linux/delay.h>
28 #include <linux/leds.h>
29 #include <linux/pinctrl/consumer.h>
30 #include <linux/platform_data/pinctrl-nomadik.h>
31 #include <linux/platform_data/dma-ste-dma40.h>
32
33 #include <asm/mach-types.h>
34
35 #include "setup.h"
36 #include "devices.h"
37 #include "irqs.h"
38
39 #include "ste-dma40-db8500.h"
40 #include "db8500-regs.h"
41 #include "devices-db8500.h"
42 #include "board-mop500.h"
43 #include "board-mop500-regulators.h"
44
45 struct ab8500_platform_data ab8500_platdata = {
46         .irq_base       = MOP500_AB8500_IRQ_BASE,
47         .regulator      = &ab8500_regulator_plat_data,
48 };
49
50 #ifdef CONFIG_STE_DMA40
51 static struct stedma40_chan_cfg ssp0_dma_cfg_rx = {
52         .mode = STEDMA40_MODE_LOGICAL,
53         .dir = DMA_DEV_TO_MEM,
54         .dev_type = DB8500_DMA_DEV8_SSP0,
55 };
56
57 static struct stedma40_chan_cfg ssp0_dma_cfg_tx = {
58         .mode = STEDMA40_MODE_LOGICAL,
59         .dir = DMA_MEM_TO_DEV,
60         .dev_type = DB8500_DMA_DEV8_SSP0,
61 };
62 #endif
63
64 struct pl022_ssp_controller ssp0_plat = {
65         .bus_id = 0,
66 #ifdef CONFIG_STE_DMA40
67         .enable_dma = 1,
68         .dma_filter = stedma40_filter,
69         .dma_rx_param = &ssp0_dma_cfg_rx,
70         .dma_tx_param = &ssp0_dma_cfg_tx,
71 #else
72         .enable_dma = 0,
73 #endif
74         /* on this platform, gpio 31,142,144,214 &
75          * 224 are connected as chip selects
76          */
77         .num_chipselect = 5,
78 };
79
80 static void __init mop500_init_machine(void)
81 {
82         struct device *parent = NULL;
83
84         platform_device_register(&db8500_prcmu_device);
85
86         parent = u8500_init_devices();
87
88         /* This board has full regulator constraints */
89         regulator_has_full_constraints();
90 }
91
92
93 static void __init snowball_init_machine(void)
94 {
95         struct device *parent = NULL;
96
97         platform_device_register(&db8500_prcmu_device);
98
99         parent = u8500_init_devices();
100
101         /* This board has full regulator constraints */
102         regulator_has_full_constraints();
103 }
104
105 static void __init hrefv60_init_machine(void)
106 {
107         struct device *parent = NULL;
108
109         platform_device_register(&db8500_prcmu_device);
110
111         parent = u8500_init_devices();
112
113         /* This board has full regulator constraints */
114         regulator_has_full_constraints();
115 }
116
117 MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
118         /* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */
119         .atag_offset    = 0x100,
120         .smp            = smp_ops(ux500_smp_ops),
121         .map_io         = u8500_map_io,
122         .init_irq       = ux500_init_irq,
123         /* we re-use nomadik timer here */
124         .init_time      = ux500_timer_init,
125         .init_machine   = mop500_init_machine,
126         .init_late      = ux500_init_late,
127         .restart        = ux500_restart,
128 MACHINE_END
129
130 MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520")
131         .atag_offset    = 0x100,
132         .map_io         = u8500_map_io,
133         .init_irq       = ux500_init_irq,
134         .init_time      = ux500_timer_init,
135         .init_machine   = mop500_init_machine,
136         .init_late      = ux500_init_late,
137         .restart        = ux500_restart,
138 MACHINE_END
139
140 MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
141         .atag_offset    = 0x100,
142         .smp            = smp_ops(ux500_smp_ops),
143         .map_io         = u8500_map_io,
144         .init_irq       = ux500_init_irq,
145         .init_time      = ux500_timer_init,
146         .init_machine   = hrefv60_init_machine,
147         .init_late      = ux500_init_late,
148         .restart        = ux500_restart,
149 MACHINE_END
150
151 MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
152         .atag_offset    = 0x100,
153         .smp            = smp_ops(ux500_smp_ops),
154         .map_io         = u8500_map_io,
155         .init_irq       = ux500_init_irq,
156         /* we re-use nomadik timer here */
157         .init_time      = ux500_timer_init,
158         .init_machine   = snowball_init_machine,
159         .init_late      = NULL,
160         .restart        = ux500_restart,
161 MACHINE_END