summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-u300/mmc.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@stericsson.com>2009-08-10 12:52:40 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-08-15 15:36:28 +0100
commitdf1e0520f9434b5b771c854a13dd928727d8673a (patch)
tree5d48442a1c8e43122511fd0c73596ac3917f8483 /arch/arm/mach-u300/mmc.c
parent5ad73d07173e7b76c16bcb8b6cf64d8386019689 (diff)
downloadop-kernel-dev-df1e0520f9434b5b771c854a13dd928727d8673a.zip
op-kernel-dev-df1e0520f9434b5b771c854a13dd928727d8673a.tar.gz
ARM: 5666/1: Revamped U300 padmux API
This abstracts the hackish padmux API on the U300 platform into something more manageable. It provides a way for drivers to activate/deactivate a certain padmux setting. It will also switch the users of the old API over to using the new style, pushing muxing into the apropriate setup files. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-u300/mmc.c')
-rw-r--r--arch/arm/mach-u300/mmc.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c
index 3138d39..e66284d 100644
--- a/arch/arm/mach-u300/mmc.c
+++ b/arch/arm/mach-u300/mmc.c
@@ -22,6 +22,7 @@
#include <asm/mach/mmc.h>
#include "mmc.h"
+#include "padmux.h"
struct mmci_card_event {
struct input_dev *mmc_input;
@@ -146,6 +147,7 @@ int __devinit mmc_init(struct amba_device *adev)
{
struct mmci_card_event *mmci_card;
struct device *mmcsd_device = &adev->dev;
+ struct pmx *pmx;
int ret = 0;
mmci_card = kzalloc(sizeof(struct mmci_card_event), GFP_KERNEL);
@@ -205,6 +207,20 @@ int __devinit mmc_init(struct amba_device *adev)
input_set_drvdata(mmci_card->mmc_input, mmci_card);
+ /*
+ * Setup padmuxing for MMC. Since this must always be
+ * compiled into the kernel, pmx is never released.
+ */
+ pmx = pmx_get(mmcsd_device, U300_APP_PMX_MMC_SETTING);
+
+ if (IS_ERR(pmx))
+ pr_warning("Could not get padmux handle\n");
+ else {
+ ret = pmx_activate(mmcsd_device, pmx);
+ if (IS_ERR_VALUE(ret))
+ pr_warning("Could not activate padmuxing\n");
+ }
+
ret = gpio_register_callback(U300_GPIO_PIN_MMC_CD, mmci_callback,
mmci_card);
OpenPOWER on IntegriCloud