ANDROID: GKI: add vendor hook for sd
Modify the timing of cmd line and data line in HS mode to improve the compatibility of SD cards that only support HS mode. Bug: 240510879 Change-Id: Ia1c98845f63b4b051d0b1db80856ee98dc5da8c1 Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
This commit is contained in:
@@ -389,6 +389,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_attach_sd);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sdhci_get_cd);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_gpio_cd_irqt);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_update_partition_status);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_sd_update_cmdline_timing);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmc_sd_update_dataline_timing);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cfg80211_set_context);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cfg80211_get_context);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mem_cgroup_id_remove);
|
||||
|
||||
@@ -1519,6 +1519,10 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
|
||||
*/
|
||||
mmc_set_clock(host, mmc_sd_get_max_clock(card));
|
||||
|
||||
trace_android_vh_mmc_sd_update_cmdline_timing(card, &err);
|
||||
if (err)
|
||||
goto free_card;
|
||||
|
||||
/*
|
||||
* Switch to wider bus (if supported).
|
||||
*/
|
||||
@@ -1530,6 +1534,10 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
|
||||
|
||||
mmc_set_bus_width(host, MMC_BUS_WIDTH_4);
|
||||
}
|
||||
|
||||
trace_android_vh_mmc_sd_update_dataline_timing(card, &err);
|
||||
if (err)
|
||||
goto free_card;
|
||||
}
|
||||
|
||||
if (!oldcard) {
|
||||
|
||||
@@ -57,6 +57,14 @@ DECLARE_HOOK(android_vh_mmc_update_partition_status,
|
||||
TP_PROTO(struct mmc_card *card),
|
||||
TP_ARGS(card));
|
||||
|
||||
DECLARE_HOOK(android_vh_mmc_sd_update_cmdline_timing,
|
||||
TP_PROTO(struct mmc_card *card, int *err),
|
||||
TP_ARGS(card, err));
|
||||
|
||||
DECLARE_HOOK(android_vh_mmc_sd_update_dataline_timing,
|
||||
TP_PROTO(struct mmc_card *card, int *err),
|
||||
TP_ARGS(card, err));
|
||||
|
||||
#endif /* _TRACE_HOOK_MMC_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
Reference in New Issue
Block a user