mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 12:03:54 +02:00
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>
This commit is contained in:
parent
d917f35c33
commit
dc1f8aacc9
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user