* [PATCH 4/4] ARM: SAMSUNG: move the mmc platdata header file to linux/mmc/
@ 2012-02-14 5:03 Jaehoon Chung
2012-02-16 12:56 ` Kukjin Kim
0 siblings, 1 reply; 3+ messages in thread
From: Jaehoon Chung @ 2012-02-14 5:03 UTC (permalink / raw)
To: linux-mmc
Cc: linux-samsung-soc, Chris Ball, Kyungmin Park, 'kgene kim'
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin-park <kyungmin.park@samsung.com>
---
arch/arm/plat-samsung/include/plat/sdhci.h | 59 +-------------------
include/linux/mmc/sdhci-s3c.h | 84 ++++++++++++++++++++++++++++
2 files changed, 85 insertions(+), 58 deletions(-)
create mode 100644 include/linux/mmc/sdhci-s3c.h
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h
index f82f888..ffefb9b 100644
--- a/arch/arm/plat-samsung/include/plat/sdhci.h
+++ b/arch/arm/plat-samsung/include/plat/sdhci.h
@@ -18,64 +18,7 @@
#ifndef __PLAT_S3C_SDHCI_H
#define __PLAT_S3C_SDHCI_H __FILE__
-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 */
-};
-
-enum clk_types {
- S3C_SDHCI_CLK_DIV_INTERNAL, /* use mmc internal clock divider */
- S3C_SDHCI_CLK_DIV_EXTERNAL, /* use external clock divider */
-};
-
-/**
- * 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.
- * @cd_type: Type of Card Detection method (see cd_types enum above)
- * @clk_type: Type of clock divider method (see clk_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 pm_caps;
- enum cd_types cd_type;
- enum clk_types clk_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);
-};
+#include <linux/mmc/sdhci-s3c.h>
/* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform data
* @pd: The default platform data for this device.
diff --git a/include/linux/mmc/sdhci-s3c.h b/include/linux/mmc/sdhci-s3c.h
new file mode 100644
index 0000000..7dafaa4
--- /dev/null
+++ b/include/linux/mmc/sdhci-s3c.h
@@ -0,0 +1,84 @@
+/*
+ * include/linux/mmc/sdhci-s3c.h
+ *
+ * SDHCI declarations specific to Samsung platform
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * Copyright 2008 Openmoko, Inc.
+ * Copyright 2008 Simtec Electronics
+ * http://armlinux.simtec.co.uk/
+ * Ben Dooks <ben@simtec.co.uk>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef LINUX_MMC_SDHCI_S3C_H
+#define LINUX_MMC_SDHCI_S3C_H
+
+#include <linux/platform_device.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 */
+};
+
+enum clk_types {
+ S3C_SDHCI_CLK_DIV_INTERNAL, /* use mmc internal clock divider */
+ S3C_SDHCI_CLK_DIV_EXTERNAL, /* use external clock divider */
+};
+
+/**
+ * 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.
+ * @cd_type: Type of Card Detection method (see cd_types enum above)
+ * @clk_type: Type of clock divider method (see clk_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;
+ enum clk_types clk_type;
+
+ char **clocks; /* set of clock sources */
+
+ 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 /* LINUX_MMC_SDHCI_S3C_H */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 4/4] ARM: SAMSUNG: move the mmc platdata header file to linux/mmc/
2012-02-14 5:03 [PATCH 4/4] ARM: SAMSUNG: move the mmc platdata header file to linux/mmc/ Jaehoon Chung
@ 2012-02-16 12:56 ` Kukjin Kim
2012-02-16 14:45 ` Jae hoon Chung
0 siblings, 1 reply; 3+ messages in thread
From: Kukjin Kim @ 2012-02-16 12:56 UTC (permalink / raw)
To: Jaehoon Chung
Cc: linux-mmc, linux-samsung-soc, Chris Ball, Kyungmin Park,
'kgene kim'
On 02/14/12 14:03, Jaehoon Chung wrote:
>
> Signed-off-by: Jaehoon Chung<jh80.chung@samsung.com>
> Signed-off-by: Kyungmin-park<kyungmin.park@samsung.com>
> ---
> arch/arm/plat-samsung/include/plat/sdhci.h | 59 +-------------------
> include/linux/mmc/sdhci-s3c.h | 84 ++++++++++++++++++++++++++++
> 2 files changed, 85 insertions(+), 58 deletions(-)
> create mode 100644 include/linux/mmc/sdhci-s3c.h
>
Hi,
I don't agree with this.
Basically, the components(struct s3c_sdhci_platdata and some enums) you
moved here are just for platform data on each board in arch/arm/.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 4/4] ARM: SAMSUNG: move the mmc platdata header file to linux/mmc/
2012-02-16 12:56 ` Kukjin Kim
@ 2012-02-16 14:45 ` Jae hoon Chung
0 siblings, 0 replies; 3+ messages in thread
From: Jae hoon Chung @ 2012-02-16 14:45 UTC (permalink / raw)
To: Kukjin Kim
Cc: Jaehoon Chung, linux-mmc, linux-samsung-soc, Chris Ball,
Kyungmin Park
2012/2/16 Kukjin Kim <kgene.kim@samsung.com>:
> On 02/14/12 14:03, Jaehoon Chung wrote:
>>
>>
>> Signed-off-by: Jaehoon Chung<jh80.chung@samsung.com>
>> Signed-off-by: Kyungmin-park<kyungmin.park@samsung.com>
>> ---
>> arch/arm/plat-samsung/include/plat/sdhci.h | 59 +-------------------
>> include/linux/mmc/sdhci-s3c.h | 84
>> ++++++++++++++++++++++++++++
>> 2 files changed, 85 insertions(+), 58 deletions(-)
>> create mode 100644 include/linux/mmc/sdhci-s3c.h
>>
> Hi,
>
> I don't agree with this.
> Basically, the components(struct s3c_sdhci_platdata and some enums) you
> moved here are just for platform data on each board in arch/arm/.
Hi Mr. Kukjin.
I didn't think so. That components are the board specific. right?
For example, dw_mmc.h and sdhci-spear.h are included the board-data.
But that didn't locate in arch/arm/. there are linux/mmc/.
I think no problem that move to linux/mmc/.
But that's right that s3cxxx_setup_sdhci0_cfg_gpio() or
exynos_setup_sdhciX_cfg_gpio
located in arch/arm/.
That's platdata but that is also generic platdata.
That platdata structure didn't change whatever.
What's problem?
Best Regards,
Jaehoon Chung
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-16 14:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14 5:03 [PATCH 4/4] ARM: SAMSUNG: move the mmc platdata header file to linux/mmc/ Jaehoon Chung
2012-02-16 12:56 ` Kukjin Kim
2012-02-16 14:45 ` Jae hoon Chung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox