meta-asrock: Generalize MMC/SDHCI reset quirk

As it turns out, e3c256d4i isn't the only board with this problem,
so move the u-boot config fragment to meta-common and make it available
via an override.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I7182a6a1dd12603fec1d0633edc60d018285914f
diff --git a/meta-asrock/meta-common/recipes-bsp/u-boot/files/disable-mmc-sdhci.cfg b/meta-asrock/meta-common/recipes-bsp/u-boot/files/disable-mmc-sdhci.cfg
new file mode 100644
index 0000000..83f2a31
--- /dev/null
+++ b/meta-asrock/meta-common/recipes-bsp/u-boot/files/disable-mmc-sdhci.cfg
@@ -0,0 +1,5 @@
+# Needed as a bug workaround -- due to (apparently) a missing pull-up resistor
+# on the reset lines of some ASRock boards, u-boot switching the pinctrl when
+# it binds its mmc driver blips the line and resets the host; disabling the
+# driver (which isn't needed on those platforms) prevents that.
+CONFIG_MMC_SDHCI_ASPEED=n
diff --git a/meta-asrock/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend b/meta-asrock/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
new file mode 100644
index 0000000..a4d89c0
--- /dev/null
+++ b/meta-asrock/meta-common/recipes-bsp/u-boot/u-boot-aspeed-sdk_%.bbappend
@@ -0,0 +1 @@
+require u-boot-common-aspeed-sdk.inc
diff --git a/meta-asrock/meta-common/recipes-bsp/u-boot/u-boot-common-aspeed-sdk.inc b/meta-asrock/meta-common/recipes-bsp/u-boot/u-boot-common-aspeed-sdk.inc
new file mode 100644
index 0000000..fd129d2
--- /dev/null
+++ b/meta-asrock/meta-common/recipes-bsp/u-boot/u-boot-common-aspeed-sdk.inc
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI:append:asrock-mmc-sdhci-reset-quirk = " file://disable-mmc-sdhci.cfg"
diff --git a/meta-asrock/meta-common/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend b/meta-asrock/meta-common/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend
new file mode 100644
index 0000000..a4d89c0
--- /dev/null
+++ b/meta-asrock/meta-common/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_%.bbappend
@@ -0,0 +1 @@
+require u-boot-common-aspeed-sdk.inc
diff --git a/meta-asrock/meta-e3c256d4i/conf/machine/e3c256d4i.conf b/meta-asrock/meta-e3c256d4i/conf/machine/e3c256d4i.conf
index d86a973..1196537 100644
--- a/meta-asrock/meta-e3c256d4i/conf/machine/e3c256d4i.conf
+++ b/meta-asrock/meta-e3c256d4i/conf/machine/e3c256d4i.conf
@@ -19,3 +19,5 @@
 
 VIRTUAL-RUNTIME_obmc-inventory-manager = "entity-manager"
 VIRTUAL-RUNTIME_obmc-sensors-hwmon = "dbus-sensors"
+
+MACHINEOVERRIDES =. "asrock-mmc-sdhci-reset-quirk:"
diff --git a/meta-asrock/meta-e3c256d4i/recipes-bsp/u-boot/files/e3c256d4i.cfg b/meta-asrock/meta-e3c256d4i/recipes-bsp/u-boot/files/e3c256d4i.cfg
index 8bbe1b2..a2874d0 100644
--- a/meta-asrock/meta-e3c256d4i/recipes-bsp/u-boot/files/e3c256d4i.cfg
+++ b/meta-asrock/meta-e3c256d4i/recipes-bsp/u-boot/files/e3c256d4i.cfg
@@ -1,9 +1,3 @@
-# Needed as a bug workaround -- due to (apparently) a missing pull-up resistor
-# on the reset line, u-boot switching the pinctrl when it binds its mmc driver
-# glitches the line and resets the host; disabling the driver (which we don't
-# need) prevents that.
-CONFIG_MMC_SDHCI_ASPEED=n
-
 # Unfortunately the host needs access to the ast2500 Super-IO in order to
 # configure the UART for its serial console
 CONFIG_ASPEED_ALLOW_DANGEROUS_BACKDOORS=y