Add support for the SD/MMC controller found in Terasic DE10-Pro

(an Intel Stratix 10 GX/SX FPGA Development Kit).

Set the bus speed manually due to lack of clock management support.

Sponsored by:	DARPA, AFRL
This commit is contained in:
br 2019-07-30 12:51:14 +00:00
parent b594847368
commit 4eedc99e90
3 changed files with 10 additions and 0 deletions

View File

@ -189,6 +189,7 @@ device aw_mmc # Allwinner SD/MMC controller
device mmc # mmc/sd bus
device mmcsd # mmc/sd flash cards
device dwmmc
device dwmmc_altera
device rk_emmcphy
# Serial (COM) ports

View File

@ -221,6 +221,7 @@ dev/hwpmc/hwpmc_arm64.c optional hwpmc
dev/hwpmc/hwpmc_arm64_md.c optional hwpmc
dev/mbox/mbox_if.m optional soc_brcm_bcm2837
dev/mmc/host/dwmmc.c optional dwmmc fdt
dev/mmc/host/dwmmc_altera.c optional dwmmc fdt dwmmc_altera
dev/mmc/host/dwmmc_hisi.c optional dwmmc fdt soc_hisi_hi6220
dev/mmc/host/dwmmc_rockchip.c optional dwmmc fdt soc_rockchip_rk3328
dev/neta/if_mvneta_fdt.c optional neta fdt

View File

@ -66,10 +66,18 @@ static int
altera_dwmmc_attach(device_t dev)
{
struct dwmmc_softc *sc;
phandle_t root;
sc = device_get_softc(dev);
sc->hwtype = HWTYPE_ALTERA;
root = OF_finddevice("/");
if (ofw_bus_node_is_compatible(root, "altr,socfpga-stratix10")) {
sc->bus_hz = 24000000;
sc->use_pio = 1;
}
return (dwmmc_attach(dev));
}