Skip to content

Commit 42f5c96

Browse files
AaronDotKexyBiscuit
authored andcommitted
UPSTREAM: 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 <[email protected]> Signed-off-by: Binbin Zhou <[email protected]> Reviewed-by: Huacai Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]> (cherry picked from commit e708212) Signed-off-by: Kexy Biscuit <[email protected]>
1 parent 44f2047 commit 42f5c96

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

drivers/mmc/host/loongson2-mmc.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ static struct mmc_host_ops loongson2_mmc_ops = {
594594
.ack_sdio_irq = loongson2_mmc_ack_sdio_irq,
595595
};
596596

597-
static const struct regmap_config ls2k1000_mmc_regmap_config = {
597+
static const struct regmap_config ls2k0500_mmc_regmap_config = {
598598
.reg_bits = 32,
599599
.val_bits = 32,
600600
.reg_stride = 4,
@@ -610,8 +610,8 @@ static int loongson2_reorder_cmd_list[] = { SD_APP_SEND_SCR, SD_APP_SEND_NUM_WR_
610610
* However sdio controller will send these datas in usual data format,
611611
* so we need to adjust these datas to a protocol consistent byte order.
612612
*/
613-
static void loongson2_mmc_reorder_cmd_data(struct loongson2_mmc_host *host,
614-
struct mmc_command *cmd)
613+
static void ls2k0500_mmc_reorder_cmd_data(struct loongson2_mmc_host *host,
614+
struct mmc_command *cmd)
615615
{
616616
struct scatterlist *sg;
617617
u32 *data;
@@ -704,8 +704,8 @@ static int ls2k0500_mmc_set_external_dma(struct loongson2_mmc_host *host,
704704
}
705705

706706
static struct loongson2_mmc_pdata ls2k0500_mmc_pdata = {
707-
.regmap_config = &ls2k1000_mmc_regmap_config,
708-
.reorder_cmd_data = loongson2_mmc_reorder_cmd_data,
707+
.regmap_config = &ls2k0500_mmc_regmap_config,
708+
.reorder_cmd_data = ls2k0500_mmc_reorder_cmd_data,
709709
.setting_dma = ls2k0500_mmc_set_external_dma,
710710
.prepare_dma = loongson2_mmc_prepare_external_dma,
711711
.release_dma = loongson2_mmc_release_external_dma,
@@ -736,8 +736,8 @@ static int ls2k1000_mmc_set_external_dma(struct loongson2_mmc_host *host,
736736
}
737737

738738
static struct loongson2_mmc_pdata ls2k1000_mmc_pdata = {
739-
.regmap_config = &ls2k1000_mmc_regmap_config,
740-
.reorder_cmd_data = loongson2_mmc_reorder_cmd_data,
739+
.regmap_config = &ls2k0500_mmc_regmap_config,
740+
.reorder_cmd_data = ls2k0500_mmc_reorder_cmd_data,
741741
.setting_dma = ls2k1000_mmc_set_external_dma,
742742
.prepare_dma = loongson2_mmc_prepare_external_dma,
743743
.release_dma = loongson2_mmc_release_external_dma,
@@ -838,8 +838,8 @@ static int loongson2_mmc_prepare_internal_dma(struct loongson2_mmc_host *host,
838838
return 0;
839839
}
840840

841-
static int loongson2_mmc_set_internal_dma(struct loongson2_mmc_host *host,
842-
struct platform_device *pdev)
841+
static int ls2k2000_mmc_set_internal_dma(struct loongson2_mmc_host *host,
842+
struct platform_device *pdev)
843843
{
844844
host->sg_cpu = dma_alloc_coherent(&pdev->dev, PAGE_SIZE,
845845
&host->sg_dma, GFP_KERNEL);
@@ -860,7 +860,7 @@ static struct loongson2_mmc_pdata ls2k2000_mmc_pdata = {
860860
.regmap_config = &ls2k2000_mmc_regmap_config,
861861
.reorder_cmd_data = ls2k2000_mmc_reorder_cmd_data,
862862
.fix_data_timeout = ls2k2000_mmc_fix_data_timeout,
863-
.setting_dma = loongson2_mmc_set_internal_dma,
863+
.setting_dma = ls2k2000_mmc_set_internal_dma,
864864
.prepare_dma = loongson2_mmc_prepare_internal_dma,
865865
.release_dma = loongson2_mmc_release_internal_dma,
866866
};

0 commit comments

Comments
 (0)