Re: [PATCH 09/30] mmc: sdhci-s3c: remove platform dependencies

2013-04-10 Thread Chris Ball
Hi,

On Wed, Apr 10 2013, Arnd Bergmann wrote:
> 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: Arnd Bergmann 
> Cc: linux-...@vger.kernel.org
> Cc: Chris Ball 

Acked-by: Chris Ball 

- Chris.
-- 
Chris Ball  
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 09/30] mmc: sdhci-s3c: remove platform dependencies

2013-04-10 Thread Arnd Bergmann
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: Arnd Bergmann 
Cc: linux-...@vger.kernel.org
Cc: Chris Ball 
---
 arch/arm/mach-exynos/setup-sdhci-gpio.c|  2 +-
 arch/arm/mach-s5pc100/setup-sdhci-gpio.c   |  1 -
 arch/arm/mach-s5pv210/setup-sdhci-gpio.c   |  1 -
 arch/arm/plat-samsung/include/plat/sdhci.h | 56 +-
 drivers/mmc/host/Kconfig   |  2 +-
 .../mmc/host/sdhci-s3c-regs.h  |  0
 drivers/mmc/host/sdhci-s3c.c   |  5 +-
 include/linux/platform_data/mmc-sdhci-s3c.h| 56 ++
 8 files changed, 61 insertions(+), 62 deletions(-)
 rename arch/arm/plat-samsung/include/plat/regs-sdhci.h => 
drivers/mmc/host/sdhci-s3c-regs.h (100%)
 create mode 100644 include/linux/platform_data/mmc-sdhci-s3c.h

diff --git a/arch/arm/mach-exynos/setup-sdhci-gpio.c 
b/arch/arm/mach-exynos/setup-sdhci-gpio.c
index e8d08bf..d5b98c8 100644
--- a/arch/arm/mach-exynos/setup-sdhci-gpio.c
+++ b/arch/arm/mach-exynos/setup-sdhci-gpio.c
@@ -19,8 +19,8 @@
 #include 
 #include 
 
+#include 
 #include 
-#include 
 #include 
 
 void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
diff --git a/arch/arm/mach-s5pc100/setup-sdhci-gpio.c 
b/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
index 03c02d0..6010c03 100644
--- a/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
+++ b/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
@@ -19,7 +19,6 @@
 #include 
 
 #include 
-#include 
 #include 
 
 void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
diff --git a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c 
b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
index 3e3ac05..0512ada 100644
--- a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
+++ b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
@@ -20,7 +20,6 @@
 #include 
 
 #include 
-#include 
 #include 
 
 void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h 
b/arch/arm/plat-samsung/include/plat/sdhci.h
index 5560586..ce1d0f7 100644
--- a/arch/arm/plat-samsung/include/plat/sdhci.h
+++ b/arch/arm/plat-samsung/include/plat/sdhci.h
@@ -18,62 +18,9 @@
 #ifndef __PLAT_S3C_SDHCI_H
 #define __PLAT_S3C_SDHCI_H __FILE__
 
+#include 
 #include 
 
-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 intmax_width;
-   unsigned inthost_caps;
-   unsigned inthost_caps2;
-   unsigned intpm_caps;
-   enum cd_types   cd_type;
-
-   int ext_cd_gpio;
-   boolext_cd_gpio_invert;
-   int (*ext_cd_init)(void (*notify_func)(struct platform_device *,
-  int state));
-   int (*ext_cd_cleanup)(void 

[PATCH 09/30] mmc: sdhci-s3c: remove platform dependencies

2013-04-10 Thread Arnd Bergmann
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: Arnd Bergmann a...@arndb.de
Cc: linux-...@vger.kernel.org
Cc: Chris Ball c...@laptop.org
---
 arch/arm/mach-exynos/setup-sdhci-gpio.c|  2 +-
 arch/arm/mach-s5pc100/setup-sdhci-gpio.c   |  1 -
 arch/arm/mach-s5pv210/setup-sdhci-gpio.c   |  1 -
 arch/arm/plat-samsung/include/plat/sdhci.h | 56 +-
 drivers/mmc/host/Kconfig   |  2 +-
 .../mmc/host/sdhci-s3c-regs.h  |  0
 drivers/mmc/host/sdhci-s3c.c   |  5 +-
 include/linux/platform_data/mmc-sdhci-s3c.h| 56 ++
 8 files changed, 61 insertions(+), 62 deletions(-)
 rename arch/arm/plat-samsung/include/plat/regs-sdhci.h = 
drivers/mmc/host/sdhci-s3c-regs.h (100%)
 create mode 100644 include/linux/platform_data/mmc-sdhci-s3c.h

diff --git a/arch/arm/mach-exynos/setup-sdhci-gpio.c 
b/arch/arm/mach-exynos/setup-sdhci-gpio.c
index e8d08bf..d5b98c8 100644
--- a/arch/arm/mach-exynos/setup-sdhci-gpio.c
+++ b/arch/arm/mach-exynos/setup-sdhci-gpio.c
@@ -19,8 +19,8 @@
 #include linux/mmc/host.h
 #include linux/mmc/card.h
 
+#include mach/gpio.h
 #include plat/gpio-cfg.h
-#include plat/regs-sdhci.h
 #include plat/sdhci.h
 
 void exynos4_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
diff --git a/arch/arm/mach-s5pc100/setup-sdhci-gpio.c 
b/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
index 03c02d0..6010c03 100644
--- a/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
+++ b/arch/arm/mach-s5pc100/setup-sdhci-gpio.c
@@ -19,7 +19,6 @@
 #include linux/mmc/card.h
 
 #include plat/gpio-cfg.h
-#include plat/regs-sdhci.h
 #include plat/sdhci.h
 
 void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
diff --git a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c 
b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
index 3e3ac05..0512ada 100644
--- a/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
+++ b/arch/arm/mach-s5pv210/setup-sdhci-gpio.c
@@ -20,7 +20,6 @@
 #include linux/mmc/card.h
 
 #include plat/gpio-cfg.h
-#include plat/regs-sdhci.h
 #include plat/sdhci.h
 
 void s5pv210_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h 
b/arch/arm/plat-samsung/include/plat/sdhci.h
index 5560586..ce1d0f7 100644
--- a/arch/arm/plat-samsung/include/plat/sdhci.h
+++ b/arch/arm/plat-samsung/include/plat/sdhci.h
@@ -18,62 +18,9 @@
 #ifndef __PLAT_S3C_SDHCI_H
 #define __PLAT_S3C_SDHCI_H __FILE__
 
+#include linux/platform_data/mmc-sdhci-s3c.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 intmax_width;
-   unsigned inthost_caps;
-   unsigned inthost_caps2;
-   unsigned intpm_caps;
-   enum 

Re: [PATCH 09/30] mmc: sdhci-s3c: remove platform dependencies

2013-04-10 Thread Chris Ball
Hi,

On Wed, Apr 10 2013, Arnd Bergmann wrote:
 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: Arnd Bergmann a...@arndb.de
 Cc: linux-...@vger.kernel.org
 Cc: Chris Ball c...@laptop.org

Acked-by: Chris Ball c...@laptop.org

- Chris.
-- 
Chris Ball   c...@laptop.org   http://printf.net/
One Laptop Per Child
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/