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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mmc-v6.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:

- dw_mmc-rockchip: Fix internal phase calculation

- pxamci: Simplify and fix ->probe() error handling

- sdhci-of-dwcmshc: Fix strbin signal delay

- wmt-sdmmc: Fix compile test default

* tag 'mmc-v6.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
mmc: dw_mmc-rockchip: Fix wrong internal phase calculate
mmc: pxamci: Simplify pxamci_probe() error handling using devm APIs
mmc: sdhci-of-dwcmshc: Change DLL_STRBIN_TAPNUM_DEFAULT to 0x4
mmc: wmt-sdmmc: fix compile test default

+22 -42
+1 -1
drivers/mmc/host/Kconfig
··· 950 950 config MMC_WMT 951 951 tristate "Wondermedia SD/MMC Host Controller support" 952 952 depends on ARCH_VT8500 || COMPILE_TEST 953 - default y 953 + default ARCH_VT8500 954 954 help 955 955 This selects support for the SD/MMC Host Controller on 956 956 Wondermedia WM8505/WM8650 based SoCs.
+2 -2
drivers/mmc/host/dw_mmc-rockchip.c
··· 42 42 */ 43 43 static int rockchip_mmc_get_internal_phase(struct dw_mci *host, bool sample) 44 44 { 45 - unsigned long rate = clk_get_rate(host->ciu_clk); 45 + unsigned long rate = clk_get_rate(host->ciu_clk) / RK3288_CLKGEN_DIV; 46 46 u32 raw_value; 47 47 u16 degrees; 48 48 u32 delay_num = 0; ··· 85 85 86 86 static int rockchip_mmc_set_internal_phase(struct dw_mci *host, bool sample, int degrees) 87 87 { 88 - unsigned long rate = clk_get_rate(host->ciu_clk); 88 + unsigned long rate = clk_get_rate(host->ciu_clk) / RK3288_CLKGEN_DIV; 89 89 u8 nineties, remainder; 90 90 u8 delay_num; 91 91 u32 raw_value;
+18 -38
drivers/mmc/host/pxamci.c
··· 652 652 host->clkrt = CLKRT_OFF; 653 653 654 654 host->clk = devm_clk_get(dev, NULL); 655 - if (IS_ERR(host->clk)) { 656 - host->clk = NULL; 657 - return PTR_ERR(host->clk); 658 - } 655 + if (IS_ERR(host->clk)) 656 + return dev_err_probe(dev, PTR_ERR(host->clk), 657 + "Failed to acquire clock\n"); 659 658 660 659 host->clkrate = clk_get_rate(host->clk); 661 660 ··· 702 703 703 704 platform_set_drvdata(pdev, mmc); 704 705 705 - host->dma_chan_rx = dma_request_chan(dev, "rx"); 706 - if (IS_ERR(host->dma_chan_rx)) { 707 - host->dma_chan_rx = NULL; 706 + host->dma_chan_rx = devm_dma_request_chan(dev, "rx"); 707 + if (IS_ERR(host->dma_chan_rx)) 708 708 return dev_err_probe(dev, PTR_ERR(host->dma_chan_rx), 709 709 "unable to request rx dma channel\n"); 710 - } 711 710 712 - host->dma_chan_tx = dma_request_chan(dev, "tx"); 713 - if (IS_ERR(host->dma_chan_tx)) { 714 - dev_err(dev, "unable to request tx dma channel\n"); 715 - ret = PTR_ERR(host->dma_chan_tx); 716 - host->dma_chan_tx = NULL; 717 - goto out; 718 - } 711 + 712 + host->dma_chan_tx = devm_dma_request_chan(dev, "tx"); 713 + if (IS_ERR(host->dma_chan_tx)) 714 + return dev_err_probe(dev, PTR_ERR(host->dma_chan_tx), 715 + "unable to request tx dma channel\n"); 719 716 720 717 if (host->pdata) { 721 718 host->detect_delay_ms = host->pdata->detect_delay_ms; 722 719 723 720 host->power = devm_gpiod_get_optional(dev, "power", GPIOD_OUT_LOW); 724 - if (IS_ERR(host->power)) { 725 - ret = PTR_ERR(host->power); 726 - dev_err(dev, "Failed requesting gpio_power\n"); 727 - goto out; 728 - } 721 + if (IS_ERR(host->power)) 722 + return dev_err_probe(dev, PTR_ERR(host->power), 723 + "Failed requesting gpio_power\n"); 729 724 730 725 /* FIXME: should we pass detection delay to debounce? */ 731 726 ret = mmc_gpiod_request_cd(mmc, "cd", 0, false, 0); 732 - if (ret && ret != -ENOENT) { 733 - dev_err(dev, "Failed requesting gpio_cd\n"); 734 - goto out; 735 - } 727 + if (ret && ret != -ENOENT) 728 + return dev_err_probe(dev, ret, "Failed requesting gpio_cd\n"); 736 729 737 730 if (!host->pdata->gpio_card_ro_invert) 738 731 mmc->caps2 |= MMC_CAP2_RO_ACTIVE_HIGH; 739 732 740 733 ret = mmc_gpiod_request_ro(mmc, "wp", 0, 0); 741 - if (ret && ret != -ENOENT) { 742 - dev_err(dev, "Failed requesting gpio_ro\n"); 743 - goto out; 744 - } 734 + if (ret && ret != -ENOENT) 735 + return dev_err_probe(dev, ret, "Failed requesting gpio_ro\n"); 736 + 745 737 if (!ret) 746 738 host->use_ro_gpio = true; 747 739 ··· 749 759 if (ret) { 750 760 if (host->pdata && host->pdata->exit) 751 761 host->pdata->exit(dev, mmc); 752 - goto out; 753 762 } 754 763 755 - return 0; 756 - 757 - out: 758 - if (host->dma_chan_rx) 759 - dma_release_channel(host->dma_chan_rx); 760 - if (host->dma_chan_tx) 761 - dma_release_channel(host->dma_chan_tx); 762 764 return ret; 763 765 } 764 766 ··· 773 791 774 792 dmaengine_terminate_all(host->dma_chan_rx); 775 793 dmaengine_terminate_all(host->dma_chan_tx); 776 - dma_release_channel(host->dma_chan_rx); 777 - dma_release_channel(host->dma_chan_tx); 778 794 } 779 795 } 780 796
+1 -1
drivers/mmc/host/sdhci-of-dwcmshc.c
··· 94 94 #define DLL_TXCLK_TAPNUM_DEFAULT 0x10 95 95 #define DLL_TXCLK_TAPNUM_90_DEGREES 0xA 96 96 #define DLL_TXCLK_TAPNUM_FROM_SW BIT(24) 97 - #define DLL_STRBIN_TAPNUM_DEFAULT 0x8 97 + #define DLL_STRBIN_TAPNUM_DEFAULT 0x4 98 98 #define DLL_STRBIN_TAPNUM_FROM_SW BIT(24) 99 99 #define DLL_STRBIN_DELAY_NUM_SEL BIT(26) 100 100 #define DLL_STRBIN_DELAY_NUM_OFFSET 16