mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
Add the Marvell SDHCI controller to the list of supported devices in
sdhci_fdt. Enable the SDHCI controller, bus and devices on ARMADA38X kernel. Tested on: ClearFog Pro Reviewed by: Marcin Wojtas <mw at semihalf.com> Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D10606
This commit is contained in:
parent
98a2d78daf
commit
018101a836
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=318337
@ -63,6 +63,11 @@ device scbus
|
||||
device pass
|
||||
device da
|
||||
|
||||
# MMC/SD/SDIO Card slot support
|
||||
device mmc # mmc/sd bus
|
||||
device mmcsd # mmc/sd flash cards
|
||||
device sdhci # mmc/sd host controller
|
||||
|
||||
# SATA
|
||||
device ahci
|
||||
|
||||
|
@ -8,3 +8,4 @@ arm/mv/armada38x/armada38x_mp.c optional smp
|
||||
arm/mv/armada38x/pmsu.c standard
|
||||
arm/mv/armada38x/rtc.c standard
|
||||
arm/mv/armada38x/armada38x_pl310.c optional pl310
|
||||
dev/sdhci/sdhci_fdt.c optional sdhci
|
||||
|
@ -57,7 +57,17 @@ __FBSDID("$FreeBSD$");
|
||||
#include "mmcbr_if.h"
|
||||
#include "sdhci_if.h"
|
||||
|
||||
#define MAX_SLOTS 6
|
||||
#define MAX_SLOTS 6
|
||||
#define SDHCI_FDT_ARMADA38X 1
|
||||
#define SDHCI_FDT_GENERIC 2
|
||||
#define SDHCI_FDT_XLNX_ZY7 3
|
||||
|
||||
static struct ofw_compat_data compat_data[] = {
|
||||
{ "marvell,armada-380-sdhci", SDHCI_FDT_ARMADA38X },
|
||||
{ "sdhci_generic", SDHCI_FDT_GENERIC },
|
||||
{ "xlnx,zy7_sdhci", SDHCI_FDT_XLNX_ZY7 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
struct sdhci_fdt_softc {
|
||||
device_t dev; /* Controller device */
|
||||
@ -181,13 +191,21 @@ sdhci_fdt_probe(device_t dev)
|
||||
if (!ofw_bus_status_okay(dev))
|
||||
return (ENXIO);
|
||||
|
||||
if (ofw_bus_is_compatible(dev, "sdhci_generic")) {
|
||||
switch (ofw_bus_search_compatible(dev, compat_data)->ocd_data) {
|
||||
case SDHCI_FDT_ARMADA38X:
|
||||
sc->quirks = SDHCI_QUIRK_BROKEN_AUTO_STOP;
|
||||
device_set_desc(dev, "ARMADA38X SDHCI controller");
|
||||
break;
|
||||
case SDHCI_FDT_GENERIC:
|
||||
device_set_desc(dev, "generic fdt SDHCI controller");
|
||||
} else if (ofw_bus_is_compatible(dev, "xlnx,zy7_sdhci")) {
|
||||
break;
|
||||
case SDHCI_FDT_XLNX_ZY7:
|
||||
sc->quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK;
|
||||
device_set_desc(dev, "Zynq-7000 generic fdt SDHCI controller");
|
||||
} else
|
||||
break;
|
||||
default:
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
node = ofw_bus_get_node(dev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user