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.

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>

authored by

Shawn Lin and committed by
Ulf Hansson
dc1f8aac d917f35c

+4 -10
+1 -1
drivers/mmc/host/dw_mmc-pci.c
··· 28 28 .caps = DW_MCI_CAPABILITIES, 29 29 .bus_hz = 33 * 1000 * 1000, 30 30 .detect_delay_ms = 200, 31 - .fifo_depth = 32, 32 31 }; 33 32 34 33 static int dw_mci_pci_probe(struct pci_dev *pdev, ··· 47 48 host->irq = pdev->irq; 48 49 host->irq_flags = IRQF_SHARED; 49 50 host->pdata = &pci_board_data; 51 + host->fifo_depth = 32; 50 52 51 53 ret = pcim_iomap_regions(pdev, 1 << PCI_BAR_NO, pci_name(pdev)); 52 54 if (ret)
+3 -3
drivers/mmc/host/dw_mmc.c
··· 3170 3170 if (IS_ERR(host->rstc)) 3171 3171 return ERR_CAST(host->rstc); 3172 3172 3173 - if (device_property_read_u32(dev, "fifo-depth", &pdata->fifo_depth)) 3173 + if (device_property_read_u32(dev, "fifo-depth", &host->fifo_depth)) 3174 3174 dev_info(dev, 3175 3175 "fifo-depth property not found, using value of FIFOTH register as default\n"); 3176 3176 ··· 3373 3373 * FIFO threshold settings RxMark = fifo_size / 2 - 1, 3374 3374 * Tx Mark = fifo_size / 2 DMA Size = 8 3375 3375 */ 3376 - if (!host->pdata->fifo_depth) { 3376 + if (!host->fifo_depth) { 3377 3377 /* 3378 3378 * Power-on value of RX_WMark is FIFO_DEPTH-1, but this may 3379 3379 * have been overwritten by the bootloader, just like we're ··· 3383 3383 fifo_size = mci_readl(host, FIFOTH); 3384 3384 fifo_size = 1 + ((fifo_size >> 16) & 0xfff); 3385 3385 } else { 3386 - fifo_size = host->pdata->fifo_depth; 3386 + fifo_size = host->fifo_depth; 3387 3387 } 3388 3388 host->fifo_depth = fifo_size; 3389 3389 host->fifoth_val =
-6
drivers/mmc/host/dw_mmc.h
··· 271 271 unsigned int bus_hz; /* Clock speed at the cclk_in pad */ 272 272 273 273 u32 caps; /* Capabilities */ 274 - /* 275 - * Override fifo depth. If 0, autodetect it from the FIFOTH register, 276 - * but note that this may not be reliable after a bootloader has used 277 - * it. 278 - */ 279 - unsigned int fifo_depth; 280 274 281 275 /* delay in mS before detecting cards after interrupt */ 282 276 u32 detect_delay_ms;