]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: mmci: Don't pretend all variants to have MMCIMASK1 register
authorPatrice Chotard <patrice.chotard@st.com>
Thu, 18 Jan 2018 14:34:17 +0000 (15:34 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 18 Jan 2018 17:14:45 +0000 (18:14 +0100)
commit96aee50f1fde15700ada723545ef37d682e17f77
treeca30c33b3b63b05cd38fe3de2edd85d70a485e64
parentb52d6ce5e105e1c0d08f850510197074d3c6dabb
mmc: mmci: Don't pretend all variants to have MMCIMASK1 register

Two mask registers are used in order to select which events have to
actually generate an interrupt on each IRQ line.

It seems that in the single-IRQ case it's assumed that the IRQs lines
are simply OR-ed, while the two mask registers are still present. The
driver still programs the two mask registers separately.

However the STM32 variant has only one IRQ, and also has only one mask
register.

This patch prepares for STM32 variant support by making the driver using
only one mask register.

This patch also optimize the MMCIMASK1 mask usage by caching it into
host->mask1_reg which avoid to read it into mmci_irq().

Tested only on STM32 variant. RFT for variants other than STM32

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mmci.c
drivers/mmc/host/mmci.h