diff mbox

ARM: EXYNOS4: Add USB EHCI device to Origen

Message ID 1313564420-862-1-git-send-email-sachin.kamat@linaro.org
State Accepted
Headers show

Commit Message

Sachin Kamat Aug. 17, 2011, 7 a.m. UTC
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos4/Kconfig       |    2 ++
 arch/arm/mach-exynos4/mach-origen.c |   17 +++++++++++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

Comments

Kukjin Kim Aug. 31, 2011, 12:30 a.m. UTC | #1
Sachin Kamat wrote:
> 
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  arch/arm/mach-exynos4/Kconfig       |    2 ++
>  arch/arm/mach-exynos4/mach-origen.c |   17 +++++++++++++++++
>  2 files changed, 19 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index 3ab0f18..fba97a4 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -189,8 +189,10 @@ config MACH_NURI
>  config MACH_ORIGEN
>  	bool "ORIGEN"
>  	select CPU_EXYNOS4210
> +	select S5P_DEV_USB_EHCI
>  	select S3C_DEV_RTC
>  	select S3C_DEV_WDT
> +	select EXYNOS4_SETUP_USB_PHY

If possible, please keep the ordering :(

>  	select S3C_DEV_HSMMC2
>  	select EXYNOS4_SETUP_SDHCI
>  	help
> diff --git a/arch/arm/mach-exynos4/mach-origen.c
b/arch/arm/mach-exynos4/mach-
> origen.c
> index ed59f86..d101756 100644
> --- a/arch/arm/mach-exynos4/mach-origen.c
> +++ b/arch/arm/mach-exynos4/mach-origen.c
> @@ -24,6 +24,8 @@
>  #include <plat/devs.h>
>  #include <plat/sdhci.h>
>  #include <plat/iic.h>
> +#include <plat/ehci.h>
> +#include <plat/clock.h>
> 
>  #include <mach/map.h>
> 
> @@ -79,10 +81,21 @@ static struct s3c_sdhci_platdata origen_hsmmc2_pdata
> __initdata = {
>  	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
>  };
> 
> +/* USB EHCI */
> +static struct s5p_ehci_platdata origen_ehci_pdata;
> +
> +static void __init origen_ehci_init(void)
> +{
> +	struct s5p_ehci_platdata *pdata = &origen_ehci_pdata;
> +
> +	s5p_ehci_set_platdata(pdata);
> +}
> +
>  static struct platform_device *origen_devices[] __initdata = {
>  	&s3c_device_hsmmc2,
>  	&s3c_device_rtc,
>  	&s3c_device_wdt,
> +	&s5p_device_ehci,
>  };
> 
>  static void __init origen_map_io(void)
> @@ -95,6 +108,10 @@ static void __init origen_map_io(void)
>  static void __init origen_machine_init(void)
>  {
>  	s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata);
> +
> +	origen_ehci_init();
> +	clk_xusbxti.rate = 24000000;
> +
>  	platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices));
>  }
> 
> --
> 1.7.4.1

OK, will apply with re-ordering as per my comments.
Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
diff mbox

Patch

diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
index 3ab0f18..fba97a4 100644
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@ -189,8 +189,10 @@  config MACH_NURI
 config MACH_ORIGEN
 	bool "ORIGEN"
 	select CPU_EXYNOS4210
+	select S5P_DEV_USB_EHCI
 	select S3C_DEV_RTC
 	select S3C_DEV_WDT
+	select EXYNOS4_SETUP_USB_PHY
 	select S3C_DEV_HSMMC2
 	select EXYNOS4_SETUP_SDHCI
 	help
diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c
index ed59f86..d101756 100644
--- a/arch/arm/mach-exynos4/mach-origen.c
+++ b/arch/arm/mach-exynos4/mach-origen.c
@@ -24,6 +24,8 @@ 
 #include <plat/devs.h>
 #include <plat/sdhci.h>
 #include <plat/iic.h>
+#include <plat/ehci.h>
+#include <plat/clock.h>
 
 #include <mach/map.h>
 
@@ -79,10 +81,21 @@  static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = {
 	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
 };
 
+/* USB EHCI */
+static struct s5p_ehci_platdata origen_ehci_pdata;
+
+static void __init origen_ehci_init(void)
+{
+	struct s5p_ehci_platdata *pdata = &origen_ehci_pdata;
+
+	s5p_ehci_set_platdata(pdata);
+}
+
 static struct platform_device *origen_devices[] __initdata = {
 	&s3c_device_hsmmc2,
 	&s3c_device_rtc,
 	&s3c_device_wdt,
+	&s5p_device_ehci,
 };
 
 static void __init origen_map_io(void)
@@ -95,6 +108,10 @@  static void __init origen_map_io(void)
 static void __init origen_machine_init(void)
 {
 	s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata);
+
+	origen_ehci_init();
+	clk_xusbxti.rate = 24000000;
+
 	platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices));
 }