diff options
Diffstat (limited to 'arch/arm/plat-omap/include/plat/omap_device.h')
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_device.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h index ee405b36df4b..12c5b0c345bf 100644 --- a/arch/arm/plat-omap/include/plat/omap_device.h +++ b/arch/arm/plat-omap/include/plat/omap_device.h | |||
@@ -68,7 +68,7 @@ extern struct device omap_device_parent; | |||
68 | * | 68 | * |
69 | */ | 69 | */ |
70 | struct omap_device { | 70 | struct omap_device { |
71 | struct platform_device pdev; | 71 | struct platform_device *pdev; |
72 | struct omap_hwmod **hwmods; | 72 | struct omap_hwmod **hwmods; |
73 | struct omap_device_pm_latency *pm_lats; | 73 | struct omap_device_pm_latency *pm_lats; |
74 | u32 dev_wakeup_lat; | 74 | u32 dev_wakeup_lat; |
@@ -88,25 +88,20 @@ int omap_device_shutdown(struct platform_device *pdev); | |||
88 | 88 | ||
89 | /* Core code interface */ | 89 | /* Core code interface */ |
90 | 90 | ||
91 | int omap_device_count_resources(struct omap_device *od); | 91 | struct platform_device *omap_device_build(const char *pdev_name, int pdev_id, |
92 | int omap_device_fill_resources(struct omap_device *od, struct resource *res); | ||
93 | |||
94 | struct omap_device *omap_device_build(const char *pdev_name, int pdev_id, | ||
95 | struct omap_hwmod *oh, void *pdata, | 92 | struct omap_hwmod *oh, void *pdata, |
96 | int pdata_len, | 93 | int pdata_len, |
97 | struct omap_device_pm_latency *pm_lats, | 94 | struct omap_device_pm_latency *pm_lats, |
98 | int pm_lats_cnt, int is_early_device); | 95 | int pm_lats_cnt, int is_early_device); |
99 | 96 | ||
100 | struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, | 97 | struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id, |
101 | struct omap_hwmod **oh, int oh_cnt, | 98 | struct omap_hwmod **oh, int oh_cnt, |
102 | void *pdata, int pdata_len, | 99 | void *pdata, int pdata_len, |
103 | struct omap_device_pm_latency *pm_lats, | 100 | struct omap_device_pm_latency *pm_lats, |
104 | int pm_lats_cnt, int is_early_device); | 101 | int pm_lats_cnt, int is_early_device); |
105 | 102 | ||
106 | int omap_device_register(struct omap_device *od); | ||
107 | int omap_early_device_register(struct omap_device *od); | ||
108 | |||
109 | void __iomem *omap_device_get_rt_va(struct omap_device *od); | 103 | void __iomem *omap_device_get_rt_va(struct omap_device *od); |
104 | struct device *omap_device_get_by_hwmod_name(const char *oh_name); | ||
110 | 105 | ||
111 | /* OMAP PM interface */ | 106 | /* OMAP PM interface */ |
112 | int omap_device_align_pm_lat(struct platform_device *pdev, | 107 | int omap_device_align_pm_lat(struct platform_device *pdev, |
@@ -122,11 +117,6 @@ int omap_device_enable_hwmods(struct omap_device *od); | |||
122 | int omap_device_disable_clocks(struct omap_device *od); | 117 | int omap_device_disable_clocks(struct omap_device *od); |
123 | int omap_device_enable_clocks(struct omap_device *od); | 118 | int omap_device_enable_clocks(struct omap_device *od); |
124 | 119 | ||
125 | static inline void omap_device_disable_idle_on_suspend(struct omap_device *od) | ||
126 | { | ||
127 | od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND; | ||
128 | } | ||
129 | |||
130 | /* | 120 | /* |
131 | * Entries should be kept in latency order ascending | 121 | * Entries should be kept in latency order ascending |
132 | * | 122 | * |
@@ -157,6 +147,17 @@ struct omap_device_pm_latency { | |||
157 | #define OMAP_DEVICE_LATENCY_AUTO_ADJUST BIT(1) | 147 | #define OMAP_DEVICE_LATENCY_AUTO_ADJUST BIT(1) |
158 | 148 | ||
159 | /* Get omap_device pointer from platform_device pointer */ | 149 | /* Get omap_device pointer from platform_device pointer */ |
160 | #define to_omap_device(x) container_of((x), struct omap_device, pdev) | 150 | static inline struct omap_device *to_omap_device(struct platform_device *pdev) |
151 | { | ||
152 | return pdev ? pdev->archdata.od : NULL; | ||
153 | } | ||
154 | |||
155 | static inline | ||
156 | void omap_device_disable_idle_on_suspend(struct platform_device *pdev) | ||
157 | { | ||
158 | struct omap_device *od = to_omap_device(pdev); | ||
159 | |||
160 | od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND; | ||
161 | } | ||
161 | 162 | ||
162 | #endif | 163 | #endif |