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: Move detect_delay_ms from struct dw_mci_board to struct dw_mci

Now, as dw_mmc-pci still provide struct dw_mci_board, so host->detect_delay_ms
will not be overwritten. So it's fine to move it.

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
d3fcd636 dc1f8aac

+5 -6
+1 -1
drivers/mmc/host/dw_mmc-pci.c
··· 27 27 static struct dw_mci_board pci_board_data = { 28 28 .caps = DW_MCI_CAPABILITIES, 29 29 .bus_hz = 33 * 1000 * 1000, 30 - .detect_delay_ms = 200, 31 30 }; 32 31 33 32 static int dw_mci_pci_probe(struct pci_dev *pdev, ··· 47 48 host->irq_flags = IRQF_SHARED; 48 49 host->pdata = &pci_board_data; 49 50 host->fifo_depth = 32; 51 + host->detect_delay_ms = 200; 50 52 51 53 ret = pcim_iomap_regions(pdev, 1 << PCI_BAR_NO, pci_name(pdev)); 52 54 if (ret)
+2 -2
drivers/mmc/host/dw_mmc.c
··· 2688 2688 static void dw_mci_handle_cd(struct dw_mci *host) 2689 2689 { 2690 2690 mmc_detect_change(host->mmc, 2691 - msecs_to_jiffies(host->pdata->detect_delay_ms)); 2691 + msecs_to_jiffies(host->detect_delay_ms)); 2692 2692 } 2693 2693 2694 2694 static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) ··· 3175 3175 "fifo-depth property not found, using value of FIFOTH register as default\n"); 3176 3176 3177 3177 device_property_read_u32(dev, "card-detect-delay", 3178 - &pdata->detect_delay_ms); 3178 + &host->detect_delay_ms); 3179 3179 3180 3180 device_property_read_u32(dev, "data-addr", &host->data_addr_override); 3181 3181
+2 -3
drivers/mmc/host/dw_mmc.h
··· 132 132 * @clk_old: The last clock value that was requested from core. 133 133 * @pdev: platform_device registered 134 134 * @rstc: Reset controller for this host. 135 + * @detect_delay_ms: Delay in mS before detecting cards after interrupt. 135 136 * 136 137 * Locking 137 138 * ======= ··· 254 253 unsigned int clk_old; 255 254 struct platform_device *pdev; 256 255 struct reset_control *rstc; 256 + u32 detect_delay_ms; 257 257 }; 258 258 259 259 /* DMA ops for Internal/External DMAC interface */ ··· 273 271 unsigned int bus_hz; /* Clock speed at the cclk_in pad */ 274 272 275 273 u32 caps; /* Capabilities */ 276 - 277 - /* delay in mS before detecting cards after interrupt */ 278 - u32 detect_delay_ms; 279 274 }; 280 275 281 276 /* Support for longer data read timeout */