summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2017-08-02 20:27:30 +0000
committermarius <marius@FreeBSD.org>2017-08-02 20:27:30 +0000
commitef7a71db0ed1646afa35013cd7415f5e881c7e8f (patch)
tree4a22966da40c2aca482ae38ec13ab9907ac331af
parent5e4bd0394fef6a164fcf0c3e0fb28567a989d224 (diff)
downloadFreeBSD-src-ef7a71db0ed1646afa35013cd7415f5e881c7e8f.zip
FreeBSD-src-ef7a71db0ed1646afa35013cd7415f5e881c7e8f.tar.gz
Apply the other half of merges to sdhci_imx(4) and sdhci_fsl(4) that
somehow stayed local when committing r318198, probably due to the associated tree conflicts. While at it, register the dependency of sdhci_fsl(4) on sdhci(4) and allow the former to be built.
-rw-r--r--sys/arm/freescale/imx/imx_sdhci.c13
-rw-r--r--sys/conf/files.powerpc1
-rw-r--r--sys/powerpc/mpc85xx/fsl_sdhc.c9
-rw-r--r--sys/powerpc/mpc85xx/fsl_sdhc.h5
4 files changed, 11 insertions, 17 deletions
diff --git a/sys/arm/freescale/imx/imx_sdhci.c b/sys/arm/freescale/imx/imx_sdhci.c
index c315463..b162f34 100644
--- a/sys/arm/freescale/imx/imx_sdhci.c
+++ b/sys/arm/freescale/imx/imx_sdhci.c
@@ -59,10 +59,10 @@ __FBSDID("$FreeBSD$");
#include <dev/ofw/ofw_bus_subr.h>
#include <dev/mmc/bridge.h>
-#include <dev/mmc/mmcreg.h>
-#include <dev/mmc/mmcbrvar.h>
#include <dev/sdhci/sdhci.h>
+
+#include "mmcbr_if.h"
#include "sdhci_if.h"
struct imx_sdhci_softc {
@@ -803,7 +803,6 @@ static device_method_t imx_sdhci_methods[] = {
/* Bus interface */
DEVMETHOD(bus_read_ivar, sdhci_generic_read_ivar),
DEVMETHOD(bus_write_ivar, sdhci_generic_write_ivar),
- DEVMETHOD(bus_print_child, bus_generic_print_child),
/* MMC bridge interface */
DEVMETHOD(mmcbr_update_ios, sdhci_generic_update_ios),
@@ -822,7 +821,7 @@ static device_method_t imx_sdhci_methods[] = {
DEVMETHOD(sdhci_write_4, imx_sdhci_write_4),
DEVMETHOD(sdhci_write_multi_4, imx_sdhci_write_multi_4),
- { 0, 0 }
+ DEVMETHOD_END
};
static devclass_t imx_sdhci_devclass;
@@ -833,7 +832,7 @@ static driver_t imx_sdhci_driver = {
sizeof(struct imx_sdhci_softc),
};
-DRIVER_MODULE(sdhci_imx, simplebus, imx_sdhci_driver, imx_sdhci_devclass, 0, 0);
+DRIVER_MODULE(sdhci_imx, simplebus, imx_sdhci_driver, imx_sdhci_devclass,
+ NULL, NULL);
MODULE_DEPEND(sdhci_imx, sdhci, 1, 1, 1);
-DRIVER_MODULE(mmc, sdhci_imx, mmc_driver, mmc_devclass, NULL, NULL);
-MODULE_DEPEND(sdhci_imx, mmc, 1, 1, 1);
+MMC_DECLARE_BRIDGE(sdhci_imx);
diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc
index cde5490..1f6775d 100644
--- a/sys/conf/files.powerpc
+++ b/sys/conf/files.powerpc
@@ -131,6 +131,7 @@ powerpc/mpc85xx/ds1553_bus_fdt.c optional ds1553 fdt
powerpc/mpc85xx/ds1553_core.c optional ds1553
powerpc/mpc85xx/i2c.c optional iicbus fdt
powerpc/mpc85xx/isa.c optional mpc85xx isa
+powerpc/mpc85xx/fsl_sdhc.c optional mpc85xx sdhci
powerpc/mpc85xx/lbc.c optional mpc85xx
powerpc/mpc85xx/mpc85xx.c optional mpc85xx
powerpc/mpc85xx/platform_mpc85xx.c optional mpc85xx
diff --git a/sys/powerpc/mpc85xx/fsl_sdhc.c b/sys/powerpc/mpc85xx/fsl_sdhc.c
index 5105e7e..d987ee2 100644
--- a/sys/powerpc/mpc85xx/fsl_sdhc.c
+++ b/sys/powerpc/mpc85xx/fsl_sdhc.c
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
#include <dev/mmc/bridge.h>
#include <dev/mmc/mmcreg.h>
-#include <dev/mmc/mmcvar.h>
#include <dev/mmc/mmcbrvar.h>
#include <powerpc/mpc85xx/mpc85xx.h>
@@ -112,7 +111,7 @@ static device_method_t fsl_sdhc_methods[] = {
DEVMETHOD(mmcbr_acquire_host, fsl_sdhc_acquire_host),
DEVMETHOD(mmcbr_release_host, fsl_sdhc_release_host),
- {0, 0},
+ DEVMETHOD_END
};
/* kobj_class definition */
@@ -124,9 +123,9 @@ static driver_t fsl_sdhc_driver = {
static devclass_t fsl_sdhc_devclass;
-DRIVER_MODULE(sdhci, simplebus, fsl_sdhc_driver, fsl_sdhc_devclass, 0, 0);
-DRIVER_MODULE(mmc, sdhci_fsl, mmc_driver, mmc_devclass, NULL, NULL);
-MODULE_DEPEND(sdhci_fsl, mmc, 1, 1, 1);
+DRIVER_MODULE(sdhci, simplebus, fsl_sdhc_driver, fsl_sdhc_devclass, NULL, NULL);
+MODULE_DEPEND(sdhci_fsl, sdhci, 1, 1, 1);
+MMC_DECLARE_BRIDGE(sdhci_fsl);
/*****************************************************************************
* Private methods
diff --git a/sys/powerpc/mpc85xx/fsl_sdhc.h b/sys/powerpc/mpc85xx/fsl_sdhc.h
index 9bd2e3d3..ac57c42 100644
--- a/sys/powerpc/mpc85xx/fsl_sdhc.h
+++ b/sys/powerpc/mpc85xx/fsl_sdhc.h
@@ -46,12 +46,8 @@
#include <dev/mmc/bridge.h>
#include <dev/mmc/mmcreg.h>
-#include <dev/mmc/mmcvar.h>
#include <dev/mmc/mmcbrvar.h>
-#include "mmcbr_if.h"
-
-
/*****************************************************************************
* Private defines
*****************************************************************************/
@@ -113,7 +109,6 @@ struct fsl_sdhc_softc {
#define FSL_SDHC_DMA_ALIGNMENT (4)
#define FSL_SDHC_DMA_BLOCK_SIZE FSL_SDHC_MAX_BLOCK_SIZE
-
/*
* Offsets of SD HC registers
*/
OpenPOWER on IntegriCloud