@@ -212,7 +212,35 @@ struct sd_ext_reg {
struct sd_uhs2_config {
u32 node_id;
- /* TODO: Extend with more register configs. */
+
+ u32 dap;
+ u32 gap;
+ u32 n_fcu;
+ u32 maxblk_len;
+ u8 n_lanes;
+ u8 dadr_len;
+ u8 app_type;
+ u8 phy_minor_rev;
+ u8 phy_major_rev;
+ u8 can_hibernate;
+ u8 n_lss_sync;
+ u8 n_lss_dir;
+ u8 link_minor_rev;
+ u8 link_major_rev;
+ u8 dev_type;
+ u8 n_data_gap;
+
+ u32 n_fcu_set;
+ u32 maxblk_len_set;
+ u8 n_lanes_set;
+ u8 speed_range_set;
+ u8 n_lss_sync_set;
+ u8 n_lss_dir_set;
+ u8 n_data_gap_set;
+ u8 pwrctrl_mode_set;
+ u8 max_retry_set;
+
+ u8 cfg_complete;
};
struct sdio_cccr {
@@ -2,6 +2,7 @@
/*
* linux/include/linux/mmc/core.h
*/
+
#ifndef LINUX_MMC_CORE_H
#define LINUX_MMC_CORE_H
@@ -96,7 +96,37 @@ struct mmc_clk_phase_map {
};
struct sd_uhs2_caps {
- /* TODO: Add UHS-II capabilities for the host. */
+ int flags;
+#define MMC_UHS2_SUPPORT (1 << 0)
+#define MMC_UHS2_INITIALIZED (1 << 1)
+#define MMC_UHS2_2L_HD (1 << 2)
+#define MMC_UHS2_APP_CMD (1 << 3)
+#define MMC_UHS2_SPEED_B (1 << 4)
+#define MMC_SUPPORT_ADMA3 (1 << 5)
+
+ u32 dap;
+ u32 gap;
+ u32 maxblk_len;
+ u32 n_fcu;
+ u8 n_lanes;
+ u8 addr64;
+ u8 card_type;
+ u8 phy_rev;
+ u8 speed_range;
+ u8 can_hibernate;
+ u8 n_lss_sync;
+ u8 n_lss_dir;
+ u8 link_rev;
+ u8 host_type;
+ u8 n_data_gap;
+
+ u32 maxblk_len_set;
+ u32 n_fcu_set;
+ u8 n_lanes_set;
+ u8 n_lss_sync_set;
+ u8 n_lss_dir_set;
+ u8 n_data_gap_set;
+ u8 max_retry_set;
};
struct mmc_host;
@@ -145,7 +175,6 @@ struct mmc_host_ops {
*/
int (*uhs2_set_ios)(struct mmc_host *host, struct mmc_ios *ios);
-
/*
* Return values for the get_ro callback should be:
* 0 for a read/write card
@@ -210,6 +239,14 @@ struct mmc_host_ops {
/* Initialize an SD express card, mandatory for MMC_CAP2_SD_EXP. */
int (*init_sd_express)(struct mmc_host *host, struct mmc_ios *ios);
+
+ /* UHS2 interfaces */
+ /*
+ * Every host controller can assign its own actions to set up their
+ * controller.
+ */
+ int (*uhs2_host_operation)(struct mmc_host *host,
+ enum uhs2_action act);
};
struct mmc_cqe_ops {