Commit cc014f3e authored by Arnd Bergmann's avatar Arnd Bergmann

mmc: sdhci-s3c: remove platform dependencies

plat/regs-sdhci.h is not used anywhere but in the sdhci-s3c
driver, so it can become a local file there and all other
inclusions removed.

plat/sdhci.h is used only to define the platform devices,
and with the exception of the platform_data structure not
needed by the driver, so we can split out the platform_data
definition instead and leave the rest to platform code.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarChris Ball <cjb@laptop.org>
parent f76da510
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/mmc/card.h> #include <linux/mmc/card.h>
#include <mach/gpio.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#include <plat/regs-sdhci.h>
#include <plat/sdhci.h> #include <plat/sdhci.h>
void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <linux/mmc/card.h> #include <linux/mmc/card.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#include <plat/regs-sdhci.h>
#include <plat/sdhci.h> #include <plat/sdhci.h>
void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <linux/mmc/card.h> #include <linux/mmc/card.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#include <plat/regs-sdhci.h>
#include <plat/sdhci.h> #include <plat/sdhci.h>
void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
......
...@@ -18,62 +18,9 @@ ...@@ -18,62 +18,9 @@
#ifndef __PLAT_S3C_SDHCI_H #ifndef __PLAT_S3C_SDHCI_H
#define __PLAT_S3C_SDHCI_H __FILE__ #define __PLAT_S3C_SDHCI_H __FILE__
#include <linux/platform_data/mmc-sdhci-s3c.h>
#include <plat/devs.h> #include <plat/devs.h>
struct platform_device;
struct mmc_host;
struct mmc_card;
struct mmc_ios;
enum cd_types {
S3C_SDHCI_CD_INTERNAL, /* use mmc internal CD line */
S3C_SDHCI_CD_EXTERNAL, /* use external callback */
S3C_SDHCI_CD_GPIO, /* use external gpio pin for CD line */
S3C_SDHCI_CD_NONE, /* no CD line, use polling to detect card */
S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */
};
/**
* struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI
* @max_width: The maximum number of data bits supported.
* @host_caps: Standard MMC host capabilities bit field.
* @host_caps2: The second standard MMC host capabilities bit field.
* @cd_type: Type of Card Detection method (see cd_types enum above)
* @ext_cd_init: Initialize external card detect subsystem. Called on
* sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL.
* notify_func argument is a callback to the sdhci-s3c driver
* that triggers the card detection event. Callback arguments:
* dev is pointer to platform device of the host controller,
* state is new state of the card (0 - removed, 1 - inserted).
* @ext_cd_cleanup: Cleanup external card detect subsystem. Called on
* sdhci-s3c driver remove when cd_type == S3C_SDHCI_CD_EXTERNAL.
* notify_func argument is the same callback as for ext_cd_init.
* @ext_cd_gpio: gpio pin used for external CD line, valid only if
* cd_type == S3C_SDHCI_CD_GPIO
* @ext_cd_gpio_invert: invert values for external CD gpio line
* @cfg_gpio: Configure the GPIO for a specific card bit-width
*
* Initialisation data specific to either the machine or the platform
* for the device driver to use or call-back when configuring gpio or
* card speed information.
*/
struct s3c_sdhci_platdata {
unsigned int max_width;
unsigned int host_caps;
unsigned int host_caps2;
unsigned int pm_caps;
enum cd_types cd_type;
int ext_cd_gpio;
bool ext_cd_gpio_invert;
int (*ext_cd_init)(void (*notify_func)(struct platform_device *,
int state));
int (*ext_cd_cleanup)(void (*notify_func)(struct platform_device *,
int state));
void (*cfg_gpio)(struct platform_device *dev, int width);
};
/* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data /* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data
* @pd: The default platform data for this device. * @pd: The default platform data for this device.
* @set: Pointer to the platform data to fill in. * @set: Pointer to the platform data to fill in.
...@@ -378,5 +325,4 @@ static inline void s3c_sdhci_setname(int id, char *name) ...@@ -378,5 +325,4 @@ static inline void s3c_sdhci_setname(int id, char *name)
break; break;
} }
} }
#endif /* __PLAT_S3C_SDHCI_H */ #endif /* __PLAT_S3C_SDHCI_H */
...@@ -180,7 +180,7 @@ config MMC_SDHCI_TEGRA ...@@ -180,7 +180,7 @@ config MMC_SDHCI_TEGRA
config MMC_SDHCI_S3C config MMC_SDHCI_S3C
tristate "SDHCI support on Samsung S3C SoC" tristate "SDHCI support on Samsung S3C SoC"
depends on MMC_SDHCI && PLAT_SAMSUNG depends on MMC_SDHCI && PLAT_SAMSUNG_SINGLE
help help
This selects the Secure Digital Host Controller Interface (SDHCI) This selects the Secure Digital Host Controller Interface (SDHCI)
often referrered to as the HSMMC block in some of the Samsung S3C often referrered to as the HSMMC block in some of the Samsung S3C
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/platform_data/mmc-sdhci-s3c.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/io.h> #include <linux/io.h>
...@@ -28,9 +29,7 @@ ...@@ -28,9 +29,7 @@
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <plat/sdhci.h> #include "sdhci-s3c-regs.h"
#include <plat/regs-sdhci.h>
#include "sdhci.h" #include "sdhci.h"
#define MAX_BUS_CLK (4) #define MAX_BUS_CLK (4)
......
#ifndef __PLATFORM_DATA_SDHCI_S3C_H
#define __PLATFORM_DATA_SDHCI_S3C_H
struct platform_device;
enum cd_types {
S3C_SDHCI_CD_INTERNAL, /* use mmc internal CD line */
S3C_SDHCI_CD_EXTERNAL, /* use external callback */
S3C_SDHCI_CD_GPIO, /* use external gpio pin for CD line */
S3C_SDHCI_CD_NONE, /* no CD line, use polling to detect card */
S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */
};
/**
* struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI
* @max_width: The maximum number of data bits supported.
* @host_caps: Standard MMC host capabilities bit field.
* @host_caps2: The second standard MMC host capabilities bit field.
* @cd_type: Type of Card Detection method (see cd_types enum above)
* @ext_cd_init: Initialize external card detect subsystem. Called on
* sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL.
* notify_func argument is a callback to the sdhci-s3c driver
* that triggers the card detection event. Callback arguments:
* dev is pointer to platform device of the host controller,
* state is new state of the card (0 - removed, 1 - inserted).
* @ext_cd_cleanup: Cleanup external card detect subsystem. Called on
* sdhci-s3c driver remove when cd_type == S3C_SDHCI_CD_EXTERNAL.
* notify_func argument is the same callback as for ext_cd_init.
* @ext_cd_gpio: gpio pin used for external CD line, valid only if
* cd_type == S3C_SDHCI_CD_GPIO
* @ext_cd_gpio_invert: invert values for external CD gpio line
* @cfg_gpio: Configure the GPIO for a specific card bit-width
*
* Initialisation data specific to either the machine or the platform
* for the device driver to use or call-back when configuring gpio or
* card speed information.
*/
struct s3c_sdhci_platdata {
unsigned int max_width;
unsigned int host_caps;
unsigned int host_caps2;
unsigned int pm_caps;
enum cd_types cd_type;
int ext_cd_gpio;
bool ext_cd_gpio_invert;
int (*ext_cd_init)(void (*notify_func)(struct platform_device *,
int state));
int (*ext_cd_cleanup)(void (*notify_func)(struct platform_device *,
int state));
void (*cfg_gpio)(struct platform_device *dev, int width);
};
#endif /* __PLATFORM_DATA_SDHCI_S3C_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment