]> git.sur5r.net Git - u-boot/blobdiff - drivers/mmc/mmc_private.h
sunxi: Support booting from SPI flash
[u-boot] / drivers / mmc / mmc_private.h
index cfc4aca18d32c84efcb8fe8c3809201b6ec0d457..49ec022a9e9cd96ebaf9404a3de1959c4dfb245d 100644 (file)
@@ -73,6 +73,25 @@ static inline ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start,
 
 #endif /* CONFIG_SPL_BUILD */
 
+#ifdef CONFIG_MMC_TRACE
+void mmmc_trace_before_send(struct mmc *mmc, struct mmc_cmd *cmd);
+void mmmc_trace_after_send(struct mmc *mmc, struct mmc_cmd *cmd, int ret);
+void mmc_trace_state(struct mmc *mmc, struct mmc_cmd *cmd);
+#else
+static inline void mmmc_trace_before_send(struct mmc *mmc, struct mmc_cmd *cmd)
+{
+}
+
+static inline void mmmc_trace_after_send(struct mmc *mmc, struct mmc_cmd *cmd,
+                                        int ret)
+{
+}
+
+static inline void mmc_trace_state(struct mmc *mmc, struct mmc_cmd *cmd)
+{
+}
+#endif
+
 /**
  * mmc_get_next_devnum() - Get the next available MMC device number
  *
@@ -106,4 +125,15 @@ void mmc_list_add(struct mmc *mmc);
  */
 int mmc_switch_part(struct mmc *mmc, unsigned int part_num);
 
+/**
+ * mmc_switch() - Issue and MMC switch mode command
+ *
+ * @mmc:       MMC device
+ * @set:       Unused
+ * @index:     Cmdarg index
+ * @value:     Cmdarg value
+ * @return 0 if OK, -ve on error
+ */
+int mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value);
+
 #endif /* _MMC_PRIVATE_H_ */