Bladeren bron

waterDataStatistics alarmDataOperation.c 朱涛 commit at 2021-03-04

朱涛 4 jaren geleden
bovenliggende
commit
574a69d1b7
1 gewijzigde bestanden met toevoegingen van 51 en 0 verwijderingen
  1. 51 0
      waterDataStatistics/databaseOperation/alarmDataOperation.c

+ 51 - 0
waterDataStatistics/databaseOperation/alarmDataOperation.c

@@ -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)