aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorsricharan <r.sricharan@ti.com>2011-02-08 03:40:45 -0500
committerSantosh Shilimkar <santosh.shilimkar@ti.com>2011-03-09 06:53:56 -0500
commit0abcf6185eb87b9e00a821513802e56200378a6a (patch)
tree6f4505bed865302a286c67088b9d0e5db117d795 /arch
parent4bb194dc9471c79caa1952ecdb31148074ac1abf (diff)
OMAP3: devices: Initialise the l3 device with the hwmod data.
The l3 interconnect device is build with all the data required to handle the error logging. The data is extracted from the hwmod database. Signed-off-by: sricharan <r.sricharan@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Benoit Cousson <b-cousson@ti.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/devices.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 2cb720b5b12e..6a320b61631e 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -36,6 +36,38 @@
36#include "mux.h" 36#include "mux.h"
37#include "control.h" 37#include "control.h"
38 38
39#define L3_MODULES_MAX_LEN 12
40
41static int __init omap3_l3_init(void)
42{
43 int l;
44 struct omap_hwmod *oh;
45 struct omap_device *od;
46 char oh_name[L3_MODULES_MAX_LEN];
47
48 /*
49 * To avoid code running on other OMAPs in
50 * multi-omap builds
51 */
52 if (!(cpu_is_omap34xx()))
53 return -ENODEV;
54
55 l = snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main");
56
57 oh = omap_hwmod_lookup(oh_name);
58
59 if (!oh)
60 pr_err("could not look up %s\n", oh_name);
61
62 od = omap_device_build("omap_l3_smx", 0, oh, NULL, 0,
63 NULL, 0, 0);
64
65 WARN(IS_ERR(od), "could not build omap_device for %s\n", oh_name);
66
67 return PTR_ERR(od);
68}
69postcore_initcall(omap3_l3_init);
70
39#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) 71#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
40 72
41static struct resource cam_resources[] = { 73static struct resource cam_resources[] = {