Message ID | a2843535-fbea-927b-226b-e51e49f2761d@codethink.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, 2016-06-09 at 18:45 +0100, Ben Dooks wrote: [...] > After looking at the build, it looks like this is broken > for the case of building mmci as a module. I think this is > the right fix. > > commit be3bf8f3b56d9cfb2fcba88e638ec853d0484cbb > Author: Ben Dooks <ben.dooks@codethink.co.uk> > Date: Thu Jun 9 18:42:53 2016 +0100 > > mmci: fixup module build with new mmci_qcom_dml > > Fix the module build for the mmci code if it is built as > a module and the MMC_QCOM_DML option is also set. If so > then we need to build a composite module of the two files > to ensure they link properly. > > Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> > > diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile > index af918d2..b57db76 100644 > --- a/drivers/mmc/host/Makefile > +++ b/drivers/mmc/host/Makefile > @@ -3,7 +3,8 @@ > # > > obj-$(CONFIG_MMC_ARMMMCI) += mmci.o > -obj-$(CONFIG_MMC_QCOM_DML) += mmci_qcom_dml.o > +mmci-y += mmci_core.o > +mmci-$(subst m,y,$(CONFIG_MMC_QCOM_DML)) += mmci_qcom_dml.o [...] If mmci_core.o and mmci_qcom_dml.o will always be linked together then MMC_QCOM_DML should be a boolean and you don't need any substitution here. Ben.
On 14/06/16 14:44, Ben Hutchings wrote: > On Thu, 2016-06-09 at 18:45 +0100, Ben Dooks wrote: > [...] >> After looking at the build, it looks like this is broken >> for the case of building mmci as a module. I think this is >> the right fix. >> >> commit be3bf8f3b56d9cfb2fcba88e638ec853d0484cbb >> Author: Ben Dooks <ben.dooks@codethink.co.uk> >> Date: Thu Jun 9 18:42:53 2016 +0100 >> >> mmci: fixup module build with new mmci_qcom_dml >> >> Fix the module build for the mmci code if it is built as >> a module and the MMC_QCOM_DML option is also set. If so >> then we need to build a composite module of the two files >> to ensure they link properly. >> >> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> >> >> diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile >> index af918d2..b57db76 100644 >> --- a/drivers/mmc/host/Makefile >> +++ b/drivers/mmc/host/Makefile >> @@ -3,7 +3,8 @@ >> # >> >> obj-$(CONFIG_MMC_ARMMMCI) += mmci.o >> -obj-$(CONFIG_MMC_QCOM_DML) += mmci_qcom_dml.o >> +mmci-y += mmci_core.o >> +mmci-$(subst m,y,$(CONFIG_MMC_QCOM_DML)) += mmci_qcom_dml.o > [...] > > If mmci_core.o and mmci_qcom_dml.o will always be linked together then > MMC_QCOM_DML should be a boolean and you don't need any substitution > here. I'll try and check later, I somehow thought mmci-y and mmci-m wouldn't build together.
On Thu, 2016-06-16 at 16:17 +0100, Ben Dooks wrote: > On 14/06/16 14:44, Ben Hutchings wrote: > > On Thu, 2016-06-09 at 18:45 +0100, Ben Dooks wrote: > > [...] > >> After looking at the build, it looks like this is broken > >> for the case of building mmci as a module. I think this is > >> the right fix. > >> > >> commit be3bf8f3b56d9cfb2fcba88e638ec853d0484cbb > >> Author: Ben Dooks <ben.dooks@codethink.co.uk> > >> Date: Thu Jun 9 18:42:53 2016 +0100 > >> > >> mmci: fixup module build with new mmci_qcom_dml > >> > >> Fix the module build for the mmci code if it is built as > >> a module and the MMC_QCOM_DML option is also set. If so > >> then we need to build a composite module of the two files > >> to ensure they link properly. > >> > >> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> > >> > >> diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile > >> index af918d2..b57db76 100644 > >> --- a/drivers/mmc/host/Makefile > >> +++ b/drivers/mmc/host/Makefile > >> @@ -3,7 +3,8 @@ > >> # > >> > >> obj-$(CONFIG_MMC_ARMMMCI) += mmci.o > >> -obj-$(CONFIG_MMC_QCOM_DML) += mmci_qcom_dml.o > >> +mmci-y += mmci_core.o > >> +mmci-$(subst m,y,$(CONFIG_MMC_QCOM_DML)) += mmci_qcom_dml.o > > [...] > > > > If mmci_core.o and mmci_qcom_dml.o will always be linked together then > > MMC_QCOM_DML should be a boolean and you don't need any substitution > > here. > > I'll try and check later, I somehow thought mmci-y and mmci-m wouldn't > build together. They won't; that's why you make MMC_QCOM_DML a boolean. Ben.
diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index af918d2..b57db76 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -3,7 +3,8 @@ # obj-$(CONFIG_MMC_ARMMMCI) += mmci.o -obj-$(CONFIG_MMC_QCOM_DML) += mmci_qcom_dml.o +mmci-y += mmci_core.o +mmci-$(subst m,y,$(CONFIG_MMC_QCOM_DML)) += mmci_qcom_dml.o obj-$(CONFIG_MMC_PXA) += pxamci.o obj-$(CONFIG_MMC_MXC) += mxcmmc.o obj-$(CONFIG_MMC_MXS) += mxs-mmc.o diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci_core.c similarity index 100% rename from drivers/mmc/host/mmci.c rename to drivers/mmc/host/mmci_core.c diff --git a/drivers/mmc/host/mmci_qcom_dml.h b/drivers/mmc/host/mmci_qcom_dml.h index 6e405d0..d77873d 100644 --- a/drivers/mmc/host/mmci_qcom_dml.h +++ b/drivers/mmc/host/mmci_qcom_dml.h @@ -15,7 +15,7 @@ #ifndef __MMC_QCOM_DML_H__ #define __MMC_QCOM_DML_H__ -#ifdef CONFIG_MMC_QCOM_DML +#if defined(CONFIG_MMC_QCOM_DML) || defined(CONFIG_MMC_QCOM_DML_MODULE) int dml_hw_init(struct mmci_host *host, struct device_node *np); void dml_start_xfer(struct mmci_host *host, struct mmc_data *data); #else