diff options
Diffstat (limited to 'arch/arm/mach-omap2/pm.c')
-rw-r--r-- | arch/arm/mach-omap2/pm.c | 47 |
1 files changed, 7 insertions, 40 deletions
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 7c038ea42093..9e78261fbfba 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -26,38 +26,7 @@ | |||
26 | 26 | ||
27 | static struct omap_device_pm_latency *pm_lats; | 27 | static struct omap_device_pm_latency *pm_lats; |
28 | 28 | ||
29 | static struct device *mpu_dev; | 29 | static int _init_omap_device(char *name) |
30 | static struct device *iva_dev; | ||
31 | static struct device *l3_dev; | ||
32 | static struct device *dsp_dev; | ||
33 | |||
34 | struct device *omap2_get_mpuss_device(void) | ||
35 | { | ||
36 | WARN_ON_ONCE(!mpu_dev); | ||
37 | return mpu_dev; | ||
38 | } | ||
39 | |||
40 | struct device *omap2_get_iva_device(void) | ||
41 | { | ||
42 | WARN_ON_ONCE(!iva_dev); | ||
43 | return iva_dev; | ||
44 | } | ||
45 | |||
46 | struct device *omap2_get_l3_device(void) | ||
47 | { | ||
48 | WARN_ON_ONCE(!l3_dev); | ||
49 | return l3_dev; | ||
50 | } | ||
51 | |||
52 | struct device *omap4_get_dsp_device(void) | ||
53 | { | ||
54 | WARN_ON_ONCE(!dsp_dev); | ||
55 | return dsp_dev; | ||
56 | } | ||
57 | EXPORT_SYMBOL(omap4_get_dsp_device); | ||
58 | |||
59 | /* static int _init_omap_device(struct omap_hwmod *oh, void *user) */ | ||
60 | static int _init_omap_device(char *name, struct device **new_dev) | ||
61 | { | 30 | { |
62 | struct omap_hwmod *oh; | 31 | struct omap_hwmod *oh; |
63 | struct platform_device *pdev; | 32 | struct platform_device *pdev; |
@@ -72,8 +41,6 @@ static int _init_omap_device(char *name, struct device **new_dev) | |||
72 | __func__, name)) | 41 | __func__, name)) |
73 | return -ENODEV; | 42 | return -ENODEV; |
74 | 43 | ||
75 | *new_dev = &pdev->dev; | ||
76 | |||
77 | return 0; | 44 | return 0; |
78 | } | 45 | } |
79 | 46 | ||
@@ -82,16 +49,16 @@ static int _init_omap_device(char *name, struct device **new_dev) | |||
82 | */ | 49 | */ |
83 | static void omap2_init_processor_devices(void) | 50 | static void omap2_init_processor_devices(void) |
84 | { | 51 | { |
85 | _init_omap_device("mpu", &mpu_dev); | 52 | _init_omap_device("mpu"); |
86 | if (omap3_has_iva()) | 53 | if (omap3_has_iva()) |
87 | _init_omap_device("iva", &iva_dev); | 54 | _init_omap_device("iva"); |
88 | 55 | ||
89 | if (cpu_is_omap44xx()) { | 56 | if (cpu_is_omap44xx()) { |
90 | _init_omap_device("l3_main_1", &l3_dev); | 57 | _init_omap_device("l3_main_1"); |
91 | _init_omap_device("dsp", &dsp_dev); | 58 | _init_omap_device("dsp"); |
92 | _init_omap_device("iva", &iva_dev); | 59 | _init_omap_device("iva"); |
93 | } else { | 60 | } else { |
94 | _init_omap_device("l3_main", &l3_dev); | 61 | _init_omap_device("l3_main"); |
95 | } | 62 | } |
96 | } | 63 | } |
97 | 64 | ||