aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/devices.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 16:46:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 16:46:56 -0400
commit7b6181e06841f5ad15c4ff708b967b4db65a64de (patch)
treebdfcf5b74b692f76581156e452d268b64c795200 /arch/arm/mach-omap1/devices.c
parent72e58063d63c5f0a7bf65312f1e3a5ed9bb5c2ff (diff)
parentbc487fb341af05120bccb9f59ce76302391dcc77 (diff)
Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (163 commits) omap: complete removal of machine_desc.io_pg_offst and .phys_io omap: UART: fix wakeup registers for OMAP24xx UART2 omap: Fix spotty MMC voltages ASoC: OMAP4: MCPDM: Remove unnecessary include of plat/control.h serial: omap-serial: fix signess error OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish omap: dma: Fix buffering disable bit setting for omap24xx omap: serial: Fix the boot-up crash/reboot without CONFIG_PM OMAP3: PM: fix scratchpad memory accesses for off-mode omap4: pandaboard: enable the ehci port on pandaboard omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set omap4: pandaboard: remove unused hsmmc definition OMAP: McBSP: Remove null omap44xx ops comment OMAP: McBSP: Swap CLKS source definition OMAP: McBSP: Fix CLKR and FSR signal muxing OMAP2+: clock: reduce the amount of standard debugging while disabling unused clocks OMAP: control: move plat-omap/control.h to mach-omap2/control.h OMAP: split plat-omap/common.c OMAP: McBSP: implement functional clock switching via clock framework OMAP: McBSP: implement McBSP CLKR and FSR signal muxing via mach-omap2/mcbsp.c ... Fixed up trivial conflicts in arch/arm/mach-omap2/ {board-zoom-peripherals.c,devices.c} as per Tony
Diffstat (limited to 'arch/arm/mach-omap1/devices.c')
-rw-r--r--arch/arm/mach-omap1/devices.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index b583121b04b9..ea0d80a89da7 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -9,6 +9,7 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/dma-mapping.h>
12#include <linux/module.h> 13#include <linux/module.h>
13#include <linux/kernel.h> 14#include <linux/kernel.h>
14#include <linux/init.h> 15#include <linux/init.h>
@@ -192,6 +193,48 @@ static inline void omap_init_spi100k(void)
192} 193}
193#endif 194#endif
194 195
196
197#define OMAP1_CAMERA_BASE 0xfffb6800
198#define OMAP1_CAMERA_IOSIZE 0x1c
199
200static struct resource omap1_camera_resources[] = {
201 [0] = {
202 .start = OMAP1_CAMERA_BASE,
203 .end = OMAP1_CAMERA_BASE + OMAP1_CAMERA_IOSIZE - 1,
204 .flags = IORESOURCE_MEM,
205 },
206 [1] = {
207 .start = INT_CAMERA,
208 .flags = IORESOURCE_IRQ,
209 },
210};
211
212static u64 omap1_camera_dma_mask = DMA_BIT_MASK(32);
213
214static struct platform_device omap1_camera_device = {
215 .name = "omap1-camera",
216 .id = 0, /* This is used to put cameras on this interface */
217 .dev = {
218 .dma_mask = &omap1_camera_dma_mask,
219 .coherent_dma_mask = DMA_BIT_MASK(32),
220 },
221 .num_resources = ARRAY_SIZE(omap1_camera_resources),
222 .resource = omap1_camera_resources,
223};
224
225void __init omap1_camera_init(void *info)
226{
227 struct platform_device *dev = &omap1_camera_device;
228 int ret;
229
230 dev->dev.platform_data = info;
231
232 ret = platform_device_register(dev);
233 if (ret)
234 dev_err(&dev->dev, "unable to register device: %d\n", ret);
235}
236
237
195/*-------------------------------------------------------------------------*/ 238/*-------------------------------------------------------------------------*/
196 239
197static inline void omap_init_sti(void) {} 240static inline void omap_init_sti(void) {}
@@ -258,3 +301,30 @@ static int __init omap1_init_devices(void)
258} 301}
259arch_initcall(omap1_init_devices); 302arch_initcall(omap1_init_devices);
260 303
304#if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
305
306static struct resource wdt_resources[] = {
307 {
308 .start = 0xfffeb000,
309 .end = 0xfffeb07F,
310 .flags = IORESOURCE_MEM,
311 },
312};
313
314static struct platform_device omap_wdt_device = {
315 .name = "omap_wdt",
316 .id = -1,
317 .num_resources = ARRAY_SIZE(wdt_resources),
318 .resource = wdt_resources,
319};
320
321static int __init omap_init_wdt(void)
322{
323 if (!cpu_is_omap16xx())
324 return;
325
326 platform_device_register(&omap_wdt_device);
327 return 0;
328}
329subsys_initcall(omap_init_wdt);
330#endif