Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Binbin Zhou and committed by
Ulf Hansson
e7082128 553d3823

+10 -10
+10 -10
drivers/mmc/host/loongson2-mmc.c
··· 594 594 .ack_sdio_irq = loongson2_mmc_ack_sdio_irq, 595 595 }; 596 596 597 - static const struct regmap_config ls2k1000_mmc_regmap_config = { 597 + static const struct regmap_config ls2k0500_mmc_regmap_config = { 598 598 .reg_bits = 32, 599 599 .val_bits = 32, 600 600 .reg_stride = 4, ··· 610 610 * However sdio controller will send these datas in usual data format, 611 611 * so we need to adjust these datas to a protocol consistent byte order. 612 612 */ 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) 615 615 { 616 616 struct scatterlist *sg; 617 617 u32 *data; ··· 704 704 } 705 705 706 706 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, 709 709 .setting_dma = ls2k0500_mmc_set_external_dma, 710 710 .prepare_dma = loongson2_mmc_prepare_external_dma, 711 711 .release_dma = loongson2_mmc_release_external_dma, ··· 736 736 } 737 737 738 738 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, 741 741 .setting_dma = ls2k1000_mmc_set_external_dma, 742 742 .prepare_dma = loongson2_mmc_prepare_external_dma, 743 743 .release_dma = loongson2_mmc_release_external_dma, ··· 838 838 return 0; 839 839 } 840 840 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) 843 843 { 844 844 host->sg_cpu = dma_alloc_coherent(&pdev->dev, PAGE_SIZE, 845 845 &host->sg_dma, GFP_KERNEL); ··· 860 860 .regmap_config = &ls2k2000_mmc_regmap_config, 861 861 .reorder_cmd_data = ls2k2000_mmc_reorder_cmd_data, 862 862 .fix_data_timeout = ls2k2000_mmc_fix_data_timeout, 863 - .setting_dma = loongson2_mmc_set_internal_dma, 863 + .setting_dma = ls2k2000_mmc_set_internal_dma, 864 864 .prepare_dma = loongson2_mmc_prepare_internal_dma, 865 865 .release_dma = loongson2_mmc_release_internal_dma, 866 866 };