aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-02-22 07:16:09 -0500
committerChris Ball <cjb@laptop.org>2012-03-27 12:20:02 -0400
commite23cd53c799694d0dc1d6a66370201ad9c181bae (patch)
treedd8bf6b3e353656b08c6e5441a6e3a52f28dbaf3 /drivers/mmc
parente3f1adb63cfa6f6ef6b4e63a546e13210c5f3cb2 (diff)
mmc: tmio_mmc: do not enable card hotplug interrupts, if unused
If TMIO MMC is used in polling mode, or the card is non-removable, or card-detection is performed, using an external interrupt, there is no need to enable controller native card hotplug interrupts. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/tmio_mmc_pio.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index e21988901c3..5444d533322 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -304,6 +304,7 @@ static int tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command
304{ 304{
305 struct mmc_data *data = host->data; 305 struct mmc_data *data = host->data;
306 int c = cmd->opcode; 306 int c = cmd->opcode;
307 u32 irq_mask = TMIO_MASK_CMD;
307 308
308 /* Command 12 is handled by hardware */ 309 /* Command 12 is handled by hardware */
309 if (cmd->opcode == 12 && !cmd->arg) { 310 if (cmd->opcode == 12 && !cmd->arg) {
@@ -339,7 +340,9 @@ static int tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command
339 c |= TRANSFER_READ; 340 c |= TRANSFER_READ;
340 } 341 }
341 342
342 tmio_mmc_enable_mmc_irqs(host, TMIO_MASK_CMD); 343 if (!host->native_hotplug)
344 irq_mask &= ~(TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT);
345 tmio_mmc_enable_mmc_irqs(host, irq_mask);
343 346
344 /* Fire off the command */ 347 /* Fire off the command */
345 sd_ctrl_write32(host, CTL_ARG_REG, cmd->arg); 348 sd_ctrl_write32(host, CTL_ARG_REG, cmd->arg);
@@ -963,6 +966,8 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host,
963 irq_mask |= TMIO_MASK_READOP; 966 irq_mask |= TMIO_MASK_READOP;
964 if (!_host->chan_tx) 967 if (!_host->chan_tx)
965 irq_mask |= TMIO_MASK_WRITEOP; 968 irq_mask |= TMIO_MASK_WRITEOP;
969 if (!_host->native_hotplug)
970 irq_mask &= ~(TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT);
966 971
967 tmio_mmc_enable_mmc_irqs(_host, irq_mask); 972 tmio_mmc_enable_mmc_irqs(_host, irq_mask);
968 973