summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBinbin Zhou <zhoubinbin@loongson.cn>2025-07-16 14:44:21 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2025-07-16 12:04:40 +0200
commite70821288f697ec67a7119e78d9558e82cabb36c (patch)
tree11829162c9926a66e3bf99548f5dabeddf63a5b4
parent553d38234091969bb28fd0841f92f5d8578daab7 (diff)
mmc: loongson2: Unify the function prefixes for loongson2_mmc_pdata
The function prefixes for loongson2_mmc_pdata follow two naming conventions: SoC-based and DMA-based. First, DMA-based prefixes are the preferred choice, as they clearly highlight differences, such as prepare_dma; however, for functions related to SoC, such as reorder_cmd_data, it is agreed to use the smallest SoC name as the fallback prefix, such as ls2k0500. No functional change intended. Suggested-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn> Link: https://lore.kernel.org/r/20250716064421.3823418-1-zhoubinbin@loongson.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/loongson2-mmc.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/mmc/host/loongson2-mmc.c b/drivers/mmc/host/loongson2-mmc.c
index 63d01d2cd978..da3daab5f3d6 100644
--- a/drivers/mmc/host/loongson2-mmc.c
+++ b/drivers/mmc/host/loongson2-mmc.c
@@ -594,7 +594,7 @@ static struct mmc_host_ops loongson2_mmc_ops = {
.ack_sdio_irq = loongson2_mmc_ack_sdio_irq,
};
-static const struct regmap_config ls2k1000_mmc_regmap_config = {
+static const struct regmap_config ls2k0500_mmc_regmap_config = {
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,
@@ -610,8 +610,8 @@ static int loongson2_reorder_cmd_list[] = { SD_APP_SEND_SCR, SD_APP_SEND_NUM_WR_
* However sdio controller will send these datas in usual data format,
* so we need to adjust these datas to a protocol consistent byte order.
*/
-static void loongson2_mmc_reorder_cmd_data(struct loongson2_mmc_host *host,
- struct mmc_command *cmd)
+static void ls2k0500_mmc_reorder_cmd_data(struct loongson2_mmc_host *host,
+ struct mmc_command *cmd)
{
struct scatterlist *sg;
u32 *data;
@@ -704,8 +704,8 @@ static int ls2k0500_mmc_set_external_dma(struct loongson2_mmc_host *host,
}
static struct loongson2_mmc_pdata ls2k0500_mmc_pdata = {
- .regmap_config = &ls2k1000_mmc_regmap_config,
- .reorder_cmd_data = loongson2_mmc_reorder_cmd_data,
+ .regmap_config = &ls2k0500_mmc_regmap_config,
+ .reorder_cmd_data = ls2k0500_mmc_reorder_cmd_data,
.setting_dma = ls2k0500_mmc_set_external_dma,
.prepare_dma = loongson2_mmc_prepare_external_dma,
.release_dma = loongson2_mmc_release_external_dma,
@@ -736,8 +736,8 @@ static int ls2k1000_mmc_set_external_dma(struct loongson2_mmc_host *host,
}
static struct loongson2_mmc_pdata ls2k1000_mmc_pdata = {
- .regmap_config = &ls2k1000_mmc_regmap_config,
- .reorder_cmd_data = loongson2_mmc_reorder_cmd_data,
+ .regmap_config = &ls2k0500_mmc_regmap_config,
+ .reorder_cmd_data = ls2k0500_mmc_reorder_cmd_data,
.setting_dma = ls2k1000_mmc_set_external_dma,
.prepare_dma = loongson2_mmc_prepare_external_dma,
.release_dma = loongson2_mmc_release_external_dma,
@@ -838,8 +838,8 @@ static int loongson2_mmc_prepare_internal_dma(struct loongson2_mmc_host *host,
return 0;
}
-static int loongson2_mmc_set_internal_dma(struct loongson2_mmc_host *host,
- struct platform_device *pdev)
+static int ls2k2000_mmc_set_internal_dma(struct loongson2_mmc_host *host,
+ struct platform_device *pdev)
{
host->sg_cpu = dma_alloc_coherent(&pdev->dev, PAGE_SIZE,
&host->sg_dma, GFP_KERNEL);
@@ -860,7 +860,7 @@ static struct loongson2_mmc_pdata ls2k2000_mmc_pdata = {
.regmap_config = &ls2k2000_mmc_regmap_config,
.reorder_cmd_data = ls2k2000_mmc_reorder_cmd_data,
.fix_data_timeout = ls2k2000_mmc_fix_data_timeout,
- .setting_dma = loongson2_mmc_set_internal_dma,
+ .setting_dma = ls2k2000_mmc_set_internal_dma,
.prepare_dma = loongson2_mmc_prepare_internal_dma,
.release_dma = loongson2_mmc_release_internal_dma,
};