dlm: Handle application limited situations properly.
[linux-2.6.git] / arch / arm / mach-omap2 / emu.c
blob9c442e290ccbf9523a03f6d00d22b6dd1ab51243
1 /*
2 * emu.c
4 * ETM and ETB CoreSight components' resources as found in OMAP3xxx.
6 * Copyright (C) 2009 Nokia Corporation.
7 * Alexander Shishkin
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/types.h>
17 #include <linux/module.h>
18 #include <linux/device.h>
19 #include <linux/amba/bus.h>
20 #include <linux/io.h>
21 #include <linux/clk.h>
22 #include <linux/err.h>
24 MODULE_LICENSE("GPL");
25 MODULE_AUTHOR("Alexander Shishkin");
27 /* Cortex CoreSight components within omap3xxx EMU */
28 #define ETM_BASE (L4_EMU_34XX_PHYS + 0x10000)
29 #define DBG_BASE (L4_EMU_34XX_PHYS + 0x11000)
30 #define ETB_BASE (L4_EMU_34XX_PHYS + 0x1b000)
31 #define DAPCTL (L4_EMU_34XX_PHYS + 0x1d000)
33 static struct amba_device omap3_etb_device = {
34 .dev = {
35 .init_name = "etb",
37 .res = {
38 .start = ETB_BASE,
39 .end = ETB_BASE + SZ_4K - 1,
40 .flags = IORESOURCE_MEM,
42 .periphid = 0x000bb907,
45 static struct amba_device omap3_etm_device = {
46 .dev = {
47 .init_name = "etm",
49 .res = {
50 .start = ETM_BASE,
51 .end = ETM_BASE + SZ_4K - 1,
52 .flags = IORESOURCE_MEM,
54 .periphid = 0x102bb921,
57 static int __init emu_init(void)
59 if (!cpu_is_omap34xx())
60 return -ENODEV;
62 amba_device_register(&omap3_etb_device, &iomem_resource);
63 amba_device_register(&omap3_etm_device, &iomem_resource);
65 return 0;
68 subsys_initcall(emu_init);