Commit 64eb131e authored by George Hilliard's avatar George Hilliard Committed by Greg Kroah-Hartman

staging: mt7621-mmc: Use pinctrl subsystem to select SDXC pin mode

The driver previously grabbed the SD pins for itself, ignoring the pin
controller.  Remove this, and allow the pinctrl subsystem to set up the
pins using the device tree mappings.  This allows this driver to work on
related devices that have a different pin controller mapping, such as
the MT7688.  The hardcoded bit index was incorrect on that device.

The driver now needs a pin controller reference in its device tree node:

	sdhci: /* ... */ {
		compatible = "ralink,mt7620-sdhci";

		pinctrl-names = "default";
		pinctrl-0 = <&sdhci_pins>;

		// ...
	};

This change could break SD controller functionality on existing devices
whose device trees do not specify a pin controller and state for the SD
node.
Signed-off-by: default avatarGeorge Hilliard <thirtythreeforty@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c62a4073
...@@ -1820,12 +1820,6 @@ static struct platform_driver mt_msdc_driver = { ...@@ -1820,12 +1820,6 @@ static struct platform_driver mt_msdc_driver = {
static int __init mt_msdc_init(void) static int __init mt_msdc_init(void)
{ {
int ret; int ret;
u32 reg;
// Set the pins for sdxc to sdxc mode
//FIXME: this should be done by pinctl and not by the sd driver
reg = readl((void __iomem *)(RALINK_SYSCTL_BASE + 0x60)) & ~(0x3 << 18);
writel(reg, (void __iomem *)(RALINK_SYSCTL_BASE + 0x60));
ret = platform_driver_register(&mt_msdc_driver); ret = platform_driver_register(&mt_msdc_driver);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment