Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0de8369 authored by Shawn Guo's avatar Shawn Guo Committed by Chris Ball
Browse files

mmc: sdhci: change sdhci-pltfm into a module



There are a couple of problems left from the sdhci pltfm and OF
consolidation changes.

* When building more than one sdhci-pltfm based drivers in the same
  image, linker will give multiple definition error on the sdhci-pltfm
  helper functions.  For example right now, building sdhci-of-esdhc
  and sdhci-of-hlwd together is a valid combination from Kconfig view.

* With the current build method, there is error with building the
  drivers as module, but module installation fails with modprobe.

The patch fixes above problems by changing sdhci-pltfm into a module.
To avoid EXPORT_SYMBOL on so many big endian IO accessors, it moves
these accessors into sdhci-pltfm.h as the 'static inline' functions.
As a result, sdhci.h needs to be included in sdhci-pltfm.h, and in
turn can be removed from individual drivers which already include
sdhci-pltfm.h.

Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 100e9186
Loading
Loading
Loading
Loading
+29 −8
Original line number Diff line number Diff line
@@ -81,19 +81,32 @@ config MMC_RICOH_MMC

	  If unsure, say Y.

config MMC_SDHCI_OF_ESDHC
	bool "SDHCI OF support for the Freescale eSDHC controller"
config MMC_SDHCI_PLTFM
	tristate "SDHCI platform and OF driver helper"
	depends on MMC_SDHCI
	help
	  This selects the common helper functions support for Secure Digital
	  Host Controller Interface based platform and OF drivers.

	  If you have a controller with this interface, say Y or M here.

	  If unsure, say N.

config MMC_SDHCI_OF_ESDHC
	tristate "SDHCI OF support for the Freescale eSDHC controller"
	depends on MMC_SDHCI_PLTFM
	depends on PPC_OF
	select MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER
	help
	  This selects the Freescale eSDHC controller support.

	  If you have a controller with this interface, say Y or M here.

	  If unsure, say N.

config MMC_SDHCI_OF_HLWD
	bool "SDHCI OF support for the Nintendo Wii SDHCI controllers"
	depends on MMC_SDHCI
	tristate "SDHCI OF support for the Nintendo Wii SDHCI controllers"
	depends on MMC_SDHCI_PLTFM
	depends on PPC_OF
	select MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER
	help
@@ -101,43 +114,51 @@ config MMC_SDHCI_OF_HLWD
	  found in the "Hollywood" chipset of the Nintendo Wii video game
	  console.

	  If you have a controller with this interface, say Y or M here.

	  If unsure, say N.

config MMC_SDHCI_CNS3XXX
	tristate "SDHCI support on the Cavium Networks CNS3xxx SoC"
	depends on ARCH_CNS3XXX
	depends on MMC_SDHCI
	depends on MMC_SDHCI_PLTFM
	help
	  This selects the SDHCI support for CNS3xxx System-on-Chip devices.

	  If you have a controller with this interface, say Y or M here.

	  If unsure, say N.

config MMC_SDHCI_ESDHC_IMX
	tristate "SDHCI platform support for the Freescale eSDHC i.MX controller"
	depends on ARCH_MX25 || ARCH_MX35 || ARCH_MX5
	depends on MMC_SDHCI
	depends on MMC_SDHCI_PLTFM
	select MMC_SDHCI_IO_ACCESSORS
	help
	  This selects the Freescale eSDHC controller support on the platform
	  bus, found on platforms like mx35/51.

	  If you have a controller with this interface, say Y or M here.

	  If unsure, say N.

config MMC_SDHCI_DOVE
	tristate "SDHCI support on Marvell's Dove SoC"
	depends on ARCH_DOVE
	depends on MMC_SDHCI
	depends on MMC_SDHCI_PLTFM
	select MMC_SDHCI_IO_ACCESSORS
	help
	  This selects the Secure Digital Host Controller Interface in
	  Marvell's Dove SoC.

	  If you have a controller with this interface, say Y or M here.

	  If unsure, say N.

config MMC_SDHCI_TEGRA
	tristate "SDHCI platform support for the Tegra SD/MMC Controller"
	depends on ARCH_TEGRA
	depends on MMC_SDHCI
	depends on MMC_SDHCI_PLTFM
	select MMC_SDHCI_IO_ACCESSORS
	help
	  This selects the Tegra SD/MMC controller. If you have a Tegra
+1 −6
Original line number Diff line number Diff line
@@ -44,18 +44,13 @@ obj-$(CONFIG_MMC_JZ4740) += jz4740_mmc.o
obj-$(CONFIG_MMC_VUB300)	+= vub300.o
obj-$(CONFIG_MMC_USHC)		+= ushc.o

obj-$(CONFIG_MMC_SDHCI_PLTFM)		+= sdhci-pltfm.o
obj-$(CONFIG_MMC_SDHCI_CNS3XXX)		+= sdhci-cns3xxx.o
sdhci-cns3xxx-objs			:= sdhci-pltfm.o
obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX)	+= sdhci-esdhc-imx.o
sdhci-esdhc-imx-objs			:= sdhci-pltfm.o
obj-$(CONFIG_MMC_SDHCI_DOVE)		+= sdhci-dove.o
sdhci-dove-objs				:= sdhci-pltfm.o
obj-$(CONFIG_MMC_SDHCI_TEGRA)		+= sdhci-tegra.o
sdhci-tegra-objs			:= sdhci-pltfm.o
obj-$(CONFIG_MMC_SDHCI_OF_ESDHC)	+= sdhci-of-esdhc.o
sdhci-of-esdhc-objs			:= sdhci-pltfm.o
obj-$(CONFIG_MMC_SDHCI_OF_HLWD)		+= sdhci-of-hlwd.o
sdhci-of-hlwd-objs			:= sdhci-pltfm.o

ifeq ($(CONFIG_CB710_DEBUG),y)
	CFLAGS-cb710-mmc	+= -DDEBUG
+0 −1
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
#include <linux/device.h>
#include <linux/mmc/host.h>
#include <mach/cns3xxx.h>
#include "sdhci.h"
#include "sdhci-pltfm.h"

static unsigned int sdhci_cns3xxx_get_max_clk(struct sdhci_host *host)
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include <linux/io.h>
#include <linux/mmc/host.h>

#include "sdhci.h"
#include "sdhci-pltfm.h"

static u16 sdhci_dove_readw(struct sdhci_host *host, int reg)
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include <linux/mmc/sdio.h>
#include <mach/hardware.h>
#include <mach/esdhc.h>
#include "sdhci.h"
#include "sdhci-pltfm.h"
#include "sdhci-esdhc.h"

Loading