lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190319022012.11051-5-thirtythreeforty@gmail.com>
Date:   Mon, 18 Mar 2019 20:20:05 -0600
From:   George Hilliard <thirtythreeforty@...il.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org,
        George Hilliard <thirtythreeforty@...il.com>
Subject: [PATCH v2 04/11] 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: George Hilliard <thirtythreeforty@...il.com>
---
 drivers/staging/mt7621-mmc/sd.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 306b3b46f7c9..4380b321bc73 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -1820,12 +1820,6 @@ static struct platform_driver mt_msdc_driver = {
 static int __init mt_msdc_init(void)
 {
 	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);
 	if (ret) {
-- 
2.21.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ