
On 13 November 2013 15:04, Rajeshwari Birje rajeshwari.birje@gmail.comwrote:
Hi Minkyu Kang,
Thank you for comments.
On Wed, Nov 13, 2013 at 8:31 AM, Minkyu Kang promsoft@gmail.com wrote:
Dear Rajeshwari S Shinde,
On 29 October 2013 16:23, Rajeshwari S Shinde <rajeshwari.s@samsung.com wrote:
Adds code in pinmux and gpio framework to support Exynos5420.
Signed-off-by: Naveen Krishna Chatradhi ch.naveen@samsung.com Signed-off-by: Akshay Saraswat akshay.s@samsung.com Signed-off-by: Rajeshwari S Shinde rajeshwari.s@samsung.com Acked-by: Simon Glass sjg@chromium.org
Changes in V2: - None Changes in V3: - None Changes in V4: - Added correct calculation of gpio based addresses. Changes in V5: - None Changes in V6: - None arch/arm/cpu/armv7/exynos/pinmux.c | 241 +++++++++++++++++++++++++++++- arch/arm/include/asm/arch-exynos/gpio.h | 143 ++++++++++++++++-- arch/arm/include/asm/arch-exynos/periph.h | 3 + 3 files changed, 372 insertions(+), 15 deletions(-)
diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c index 8002bce..417ecae 100644 --- a/arch/arm/cpu/armv7/exynos/pinmux.c +++ b/arch/arm/cpu/armv7/exynos/pinmux.c @@ -46,6 +46,41 @@ static void exynos5_uart_config(int peripheral) } }
+static void exynos5420_uart_config(int peripheral) +{
struct exynos5420_gpio_part1 *gpio1 =
(struct exynos5420_gpio_part1
*)samsung_get_base_gpio_part1();
struct s5p_gpio_bank *bank;
int i, start, count;
switch (peripheral) {
case PERIPH_ID_UART0:
bank = &gpio1->a0;
start = 0;
count = 4;
break;
case PERIPH_ID_UART1:
bank = &gpio1->a0;
start = 4;
count = 4;
break;
case PERIPH_ID_UART2:
bank = &gpio1->a1;
start = 0;
count = 4;
break;
case PERIPH_ID_UART3:
bank = &gpio1->a1;
start = 4;
count = 2;
break;
}
please add blank line.
will correct this
for (i = start; i < start + count; i++) {
s5p_gpio_set_pull(bank, i, GPIO_PULL_NONE);
s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
}
+}
static int exynos5_mmc_config(int peripheral, int flags) { struct exynos5_gpio_part1 *gpio1 = @@ -101,6 +136,70 @@ static int exynos5_mmc_config(int peripheral, int flags) return 0; }
+static int exynos5420_mmc_config(int peripheral, int flags) +{
struct exynos5420_gpio_part3 *gpio3 =
(struct exynos5420_gpio_part3
*)samsung_get_base_gpio_part3();
struct s5p_gpio_bank *bank = NULL, *bank_ext = NULL;
int i, start = 0, gpio_func = 0;
I think we don' have to set to 0 to start and gpio_func.
Will remove gpio_func, but if I dont set start to 0 I get following error:
pinmux.c: In function ‘exynos_pinmux_config’: pinmux.c:173:20: warning: ‘start’ may be used uninitialized in this function [-Wmaybe-uninitialized] pinmux.c:145:9: note: ‘start’ was declared here
because you missing start = 0 at MMC2. Actually I like to set values explicitly at every conditions instead of initial value. It looks more clearly.
Thanks, Minkyu Kang.