|
@@ -3365,3 +3365,54 @@ int omap_hwmod_shutdown(struct omap_hwmod *oh)
|
|
|
|
|
|
spin_lock_irqsave(&oh->_lock, flags);
|
|
|
_shutdown(oh);
|
|
|
+ spin_unlock_irqrestore(&oh->_lock, flags);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * omap_hwmod_enable_clocks - enable main_clk, all interface clocks
|
|
|
+ * @oh: struct omap_hwmod *oh
|
|
|
+ *
|
|
|
+ * Intended to be called by the omap_device code.
|
|
|
+ */
|
|
|
+int omap_hwmod_enable_clocks(struct omap_hwmod *oh)
|
|
|
+{
|
|
|
+ unsigned long flags;
|
|
|
+
|
|
|
+ spin_lock_irqsave(&oh->_lock, flags);
|
|
|
+ _enable_clocks(oh);
|
|
|
+ spin_unlock_irqrestore(&oh->_lock, flags);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * omap_hwmod_disable_clocks - disable main_clk, all interface clocks
|
|
|
+ * @oh: struct omap_hwmod *oh
|
|
|
+ *
|
|
|
+ * Intended to be called by the omap_device code.
|
|
|
+ */
|
|
|
+int omap_hwmod_disable_clocks(struct omap_hwmod *oh)
|
|
|
+{
|
|
|
+ unsigned long flags;
|
|
|
+
|
|
|
+ spin_lock_irqsave(&oh->_lock, flags);
|
|
|
+ _disable_clocks(oh);
|
|
|
+ spin_unlock_irqrestore(&oh->_lock, flags);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * omap_hwmod_ocp_barrier - wait for posted writes against the hwmod to complete
|
|
|
+ * @oh: struct omap_hwmod *oh
|
|
|
+ *
|
|
|
+ * Intended to be called by drivers and core code when all posted
|
|
|
+ * writes to a device must complete before continuing further
|
|
|
+ * execution (for example, after clearing some device IRQSTATUS
|
|
|
+ * register bits)
|
|
|
+ *
|
|
|
+ * XXX what about targets with multiple OCP threads?
|
|
|
+ */
|
|
|
+void omap_hwmod_ocp_barrier(struct omap_hwmod *oh)
|