diff options
| author | Shawn Lin <shawn.lin@rock-chips.com> | 2026-01-06 05:16:58 +0300 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2026-02-23 14:06:54 +0300 |
| commit | dc1f8aacc9941150be504048a46dd94c111717bc (patch) | |
| tree | a93bfe4fab1ac84b26509a59b525c7ea3673f982 | |
| parent | d917f35c33fd0abe49f5a93a85489d96b8a9af3b (diff) | |
| download | linux-dc1f8aacc9941150be504048a46dd94c111717bc.tar.xz | |
mmc: dw_mmc: Remove fifo_depth from struct dw_mci_board
struct dw_mci already keeps one, so remove it from struct dw_mci_board.
Now, as dw_mmc-pci still provide struct dw_mci_board, so host->fifo_depth
will not be overwritten.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
| -rw-r--r-- | drivers/mmc/host/dw_mmc-pci.c | 2 | ||||
| -rw-r--r-- | drivers/mmc/host/dw_mmc.c | 6 | ||||
| -rw-r--r-- | drivers/mmc/host/dw_mmc.h | 6 |
3 files changed, 4 insertions, 10 deletions
diff --git a/drivers/mmc/host/dw_mmc-pci.c b/drivers/mmc/host/dw_mmc-pci.c index 24f403693711..89ad4993e4e1 100644 --- a/drivers/mmc/host/dw_mmc-pci.c +++ b/drivers/mmc/host/dw_mmc-pci.c @@ -28,7 +28,6 @@ static struct dw_mci_board pci_board_data = { .caps = DW_MCI_CAPABILITIES, .bus_hz = 33 * 1000 * 1000, .detect_delay_ms = 200, - .fifo_depth = 32, }; static int dw_mci_pci_probe(struct pci_dev *pdev, @@ -48,6 +47,7 @@ static int dw_mci_pci_probe(struct pci_dev *pdev, host->irq = pdev->irq; host->irq_flags = IRQF_SHARED; host->pdata = &pci_board_data; + host->fifo_depth = 32; ret = pcim_iomap_regions(pdev, 1 << PCI_BAR_NO, pci_name(pdev)); if (ret) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 4a0b9a6b45f1..98549a260e37 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -3170,7 +3170,7 @@ static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host) if (IS_ERR(host->rstc)) return ERR_CAST(host->rstc); - if (device_property_read_u32(dev, "fifo-depth", &pdata->fifo_depth)) + if (device_property_read_u32(dev, "fifo-depth", &host->fifo_depth)) dev_info(dev, "fifo-depth property not found, using value of FIFOTH register as default\n"); @@ -3373,7 +3373,7 @@ int dw_mci_probe(struct dw_mci *host) * FIFO threshold settings RxMark = fifo_size / 2 - 1, * Tx Mark = fifo_size / 2 DMA Size = 8 */ - if (!host->pdata->fifo_depth) { + if (!host->fifo_depth) { /* * Power-on value of RX_WMark is FIFO_DEPTH-1, but this may * have been overwritten by the bootloader, just like we're @@ -3383,7 +3383,7 @@ int dw_mci_probe(struct dw_mci *host) fifo_size = mci_readl(host, FIFOTH); fifo_size = 1 + ((fifo_size >> 16) & 0xfff); } else { - fifo_size = host->pdata->fifo_depth; + fifo_size = host->fifo_depth; } host->fifo_depth = fifo_size; host->fifoth_val = diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h index 3cac7ce7c070..bc82d1df75f0 100644 --- a/drivers/mmc/host/dw_mmc.h +++ b/drivers/mmc/host/dw_mmc.h @@ -271,12 +271,6 @@ struct dw_mci_board { unsigned int bus_hz; /* Clock speed at the cclk_in pad */ u32 caps; /* Capabilities */ - /* - * Override fifo depth. If 0, autodetect it from the FIFOTH register, - * but note that this may not be reliable after a bootloader has used - * it. - */ - unsigned int fifo_depth; /* delay in mS before detecting cards after interrupt */ u32 detect_delay_ms; |
