svn commit: r312346 - head/sys/dev/sdhci
Luiz Otavio O Souza
loos at FreeBSD.org
Tue Jan 17 17:41:15 UTC 2017
Author: loos
Date: Tue Jan 17 17:41:14 2017
New Revision: 312346
URL: https://svnweb.freebsd.org/changeset/base/312346
Log:
Set the the wp_disabled flag when asked to.
While here, add the missing new line.
MFC after: 3 days
Sponsored by: Rubicon Communications, LLC (Netgate)
Modified:
head/sys/dev/sdhci/sdhci_fdt_gpio.c
Modified: head/sys/dev/sdhci/sdhci_fdt_gpio.c
==============================================================================
--- head/sys/dev/sdhci/sdhci_fdt_gpio.c Tue Jan 17 16:20:21 2017 (r312345)
+++ head/sys/dev/sdhci/sdhci_fdt_gpio.c Tue Jan 17 17:41:14 2017 (r312346)
@@ -90,7 +90,7 @@ cd_setup(struct sdhci_fdt_gpio *gpio, ph
gpio->slot->opt |= SDHCI_NON_REMOVABLE;
gpio->cd_disabled = true;
if (bootverbose)
- device_printf(dev, "Non-removable media");
+ device_printf(dev, "Non-removable media\n");
return;
}
@@ -177,8 +177,12 @@ wp_setup(struct sdhci_fdt_gpio *gpio, ph
dev = gpio->dev;
- if (OF_hasprop(node, "wp-disable"))
+ if (OF_hasprop(node, "wp-disable")) {
+ gpio->wp_disabled = true;
+ if (bootverbose)
+ device_printf(dev, "Write protect disabled\n");
return;
+ }
if (gpio_pin_get_by_ofw_property(dev, node, "wp-gpios", &gpio->wp_pin))
return;
More information about the svn-src-all
mailing list