Thanks for your interest. :)<div class="gmail_extra"><br><div class="gmail_quote">2012/11/20 Tushar Behera <span dir="ltr"><<a href="mailto:tushar.behera@linaro.org" target="_blank">tushar.behera@linaro.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On 11/19/2012 10:54 PM, <a href="mailto:chlrbgh0@gmail.com">chlrbgh0@gmail.com</a> wrote:<br>
> From: Kyuho Choi <<a href="mailto:kh.choi@insignal.co.kr">kh.choi@insignal.co.kr</a>><br>
><br>
> This patch add support for Insignal ORIGEN4QUAD board.<br>
> ORIGEN4QUAD board based on Samsung Exynos4412 SoC.<br>
><br>
> Signed-off-by: Kyuho Choi <<a href="mailto:kh.choi@insignal.co.kr">kh.choi@insignal.co.kr</a>><br>
> ---<br>
> arch/arm/mach-exynos/Kconfig | 1 +<br>
> arch/arm/mach-exynos/mach-origen.c | 74 +++++++++++++++++++++++++++--------<br>
> 2 files changed, 58 insertions(+), 17 deletions(-)<br>
><br>
<br>
</div>Since Origen and Origen4Quad boards have different peripherals<br>
(different pmic chip, touch/audio on different I2C bus etc.), how do you<br>
plan to add them to mach-origen.c?<br>
<div class=""><div class="h5"><br></div></div></blockquote><div>As your mentioned, PMIC setup code will be added for Origen4Quad board.<br></div><div><br></div><div>IMHO, Origen and Origen4Quad board has differential form SoC type.<br>
</div><div>Thus I modified machine initial code from "mach-origen.c" source. It separate Origenboard and Origen4Quad board from SoC type.</div><div><br></div><div>- Common initialize features(Origen and Origen4Quad shared features)</div>
<div>- Origenboard dependant features</div><div>- Origen4Quad board dependant features</div><div><br></div><div>So, code to initialize the peripherals will be added to each area.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5"><br>
> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig<br>
> index bb3b09a..0b8ccd3 100644<br>
> --- a/arch/arm/mach-exynos/Kconfig<br>
> +++ b/arch/arm/mach-exynos/Kconfig<br>
> @@ -324,6 +324,7 @@ config MACH_NURI<br>
> config MACH_ORIGEN<br>
> bool "ORIGEN"<br>
> select CPU_EXYNOS4210<br>
> + select SOC_EXYNOS4412<br>
> select EXYNOS4_DEV_USB_OHCI<br>
> select EXYNOS4_SETUP_FIMD0<br>
> select EXYNOS4_SETUP_SDHCI<br>
> diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c<br>
> index e6f4191..2839724 100644<br>
> --- a/arch/arm/mach-exynos/mach-origen.c<br>
> +++ b/arch/arm/mach-exynos/mach-origen.c<br>
> @@ -1,6 +1,6 @@<br>
> /* linux/arch/arm/mach-exynos4/mach-origen.c<br>
> *<br>
> - * Copyright (c) 2011 Insignal Co., Ltd.<br>
> + * Copyright (c) 2011-2012 Insignal Co., Ltd.<br>
> * <a href="http://www.insignal.co.kr/" target="_blank">http://www.insignal.co.kr/</a><br>
> *<br>
> * This program is free software; you can redistribute it and/or modify<br>
> @@ -771,19 +771,36 @@ static void __init origen_reserve(void)<br>
> s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);<br>
> }<br>
><br>
> -static void __init origen_machine_init(void)<br>
> +static int __init origen4quad_i2c_init(void)<br>
> {<br>
> - origen_power_init();<br>
> + /*<br>
> + * Origen4Quad has weaknees drive strength in i2c channel 3.<br>
> + * thus here setup i2c3's drvstr for Origen4Quad.<br>
> + */<br>
> + s5p_gpio_set_drvstr(EXYNOS4_GPA1(2), 3);<br>
> + s5p_gpio_set_drvstr(EXYNOS4_GPA1(3), 3);<br>
> + return 0;<br>
> +}<br>
><br>
> - s3c_i2c0_set_platdata(NULL);<br>
> - i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs));<br>
> +static int __init origen4quad_usb_init(void)<br>
> +{<br>
> + /* USB HUB controller's hub reset pin setup for Origen4Quad. */<br>
> + gpio_request(EXYNOS4_GPX3(5), "GPX3");<br>
> + gpio_direction_output(EXYNOS4_GPX3(5), 1);<br>
> + gpio_set_value(EXYNOS4_GPX3(5), S3C_GPIO_PULL_UP);<br>
> + gpio_free(EXYNOS4_GPX3(5));<br>
> + return 0;<br>
> +}<br>
><br>
> +static void __init origen_machine_init(void)<br>
> +{<br>
> /*<br>
> - * Since sdhci instance 2 can contain a bootable media,<br>
> - * sdhci instance 0 is registered after instance 2.<br>
> + * Common initialize code for ORIGEN and Origen4Quad.<br>
> */<br>
> + s3c_i2c0_set_platdata(NULL);<br>
> + i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs));<br>
> +<br>
> s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata);<br>
> - s3c_sdhci0_set_platdata(&origen_hsmmc0_pdata);<br>
><br>
> origen_ehci_init();<br>
> origen_ohci_init();<br>
> @@ -793,22 +810,45 @@ static void __init origen_machine_init(void)<br>
> s5p_i2c_hdmiphy_set_platdata(NULL);<br>
> s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0);<br>
><br>
> -#ifdef CONFIG_DRM_EXYNOS<br>
> - s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;<br>
> - exynos4_fimd0_gpio_setup_24bpp();<br>
> -#else<br>
> - s5p_fimd0_set_platdata(&origen_lcd_pdata);<br>
> -#endif<br>
> + pwm_add_table(origen_pwm_lookup, ARRAY_SIZE(origen_pwm_lookup));<br>
><br>
> platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices));<br>
><br>
> - pwm_add_table(origen_pwm_lookup, ARRAY_SIZE(origen_pwm_lookup));<br>
> - samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data);<br>
> + if (!soc_is_exynos4210()) {<br>
> + /*<br>
> + * In case of soc_is_4210(),<br>
> + * Machine initialize for Origen.<br>
> + */<br>
><br>
> - origen_bt_setup();<br>
> + origen_power_init();<br>
> +<br>
> + /*<br>
> + * Since sdhci instance 2 can contain a bootable media,<br>
> + * sdhci instance 0 is registered after instance 2.<br>
> + */<br>
> + s3c_sdhci0_set_platdata(&origen_hsmmc0_pdata);<br>
> +<br>
> +#ifdef CONFIG_DRM_EXYNOS<br>
> + s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;<br>
> + exynos4_fimd0_gpio_setup_24bpp();<br>
> +#else<br>
> + s5p_fimd0_set_platdata(&origen_lcd_pdata);<br>
> +#endif<br>
> + samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data);<br>
> +<br>
> + origen_bt_setup();<br>
> + } else{<br>
> + /*<br>
> + * In case of soc_is_4412(),<br>
> + * Machine initialize for Origen4Quad.<br>
> + */<br>
> + origen4quad_i2c_init();<br>
> + origen4quad_usb_init();<br>
> + }<br>
> }<br>
><br>
> MACHINE_START(ORIGEN, "ORIGEN")<br>
> + /* Maintainer: Kyuho Choi <<a href="mailto:kh.choi@insignal.co.kr">kh.choi@insignal.co.kr</a>> */<br>
> /* Maintainer: JeongHyeon Kim <<a href="mailto:jhkim@insignal.co.kr">jhkim@insignal.co.kr</a>> */<br>
> .atag_offset = 0x100,<br>
> .smp = smp_ops(exynos_smp_ops),<br>
><br>
<br>
<br>
--<br>
</div></div><span class=""><font color="#888888">Tushar Behera<br>
</font></span></blockquote></div><br></div>