From: Przemyslaw Marczak <p.marczak@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 14/14] odroid: adjust gpio calls to dm gpio api
Date: Tue, 28 Oct 2014 08:27:13 +0100 [thread overview]
Message-ID: <544F4551.8080904@samsung.com> (raw)
In-Reply-To: <CAPnjgZ0vPs6rWrqvMWEV2HdoRhx966jod+1Tq+-s4VdTE2zt6A@mail.gmail.com>
Hello,
On 10/28/2014 02:13 AM, Simon Glass wrote:
> Hi,
>
> On 24 October 2014 09:45, Przemyslaw Marczak <p.marczak@samsung.com> wrote:
>> Setting gpio value before dm gpio init has no effect,
>> so now, odroid gpio settings are moved after the gpio uclass init.
>>
>> Using non-requested gpio pin cases printing error messages.
>> To avoid this, gpio_request() is added for those gpios.
>>
>> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
>> ---
>> board/samsung/odroid/odroid.c | 17 ++++++++++++++++-
>> 1 file changed, 16 insertions(+), 1 deletion(-)
>>
>> diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c
>> index 5edb250..5ce8e9f 100644
>> --- a/board/samsung/odroid/odroid.c
>> +++ b/board/samsung/odroid/odroid.c
>> @@ -355,22 +355,36 @@ static void board_clock_init(void)
>>
>> static void board_gpio_init(void)
>> {
>> + char buf[16];
>> +
>> /* eMMC Reset Pin */
>> + sprintf(buf, "eMMC Reset");
>> + gpio_request(EXYNOS4X12_GPIO_K12, buf);
>
> You can use:
>
> gpio_request(EXYNOS4X12_GPIO_K12, "eMMC Reset");
>
> Same below.
>
Ops, right! This was to easy:)
>> +
>> gpio_cfg_pin(EXYNOS4X12_GPIO_K12, S5P_GPIO_FUNC(0x1));
>> gpio_set_pull(EXYNOS4X12_GPIO_K12, S5P_GPIO_PULL_NONE);
>> gpio_set_drv(EXYNOS4X12_GPIO_K12, S5P_GPIO_DRV_4X);
>>
>> /* Enable FAN (Odroid U3) */
>> + sprintf(buf, "FAN Control");
>> + gpio_request(EXYNOS4X12_GPIO_D00, buf);
>> +
>> gpio_set_pull(EXYNOS4X12_GPIO_D00, S5P_GPIO_PULL_UP);
>> gpio_set_drv(EXYNOS4X12_GPIO_D00, S5P_GPIO_DRV_4X);
>> gpio_direction_output(EXYNOS4X12_GPIO_D00, 1);
>>
>> /* OTG Vbus output (Odroid U3+) */
>> + sprintf(buf, "OTG Vbus");
>> + gpio_request(EXYNOS4X12_GPIO_L20, buf);
>> +
>> gpio_set_pull(EXYNOS4X12_GPIO_L20, S5P_GPIO_PULL_NONE);
>> gpio_set_drv(EXYNOS4X12_GPIO_L20, S5P_GPIO_DRV_4X);
>> gpio_direction_output(EXYNOS4X12_GPIO_L20, 0);
>>
>> /* OTG INT (Odroid U3+) */
>> + sprintf(buf, "OTG INT");
>> + gpio_request(EXYNOS4X12_GPIO_X31, buf);
>> +
>> gpio_set_pull(EXYNOS4X12_GPIO_X31, S5P_GPIO_PULL_UP);
>> gpio_set_drv(EXYNOS4X12_GPIO_X31, S5P_GPIO_DRV_4X);
>> gpio_direction_input(EXYNOS4X12_GPIO_X31);
>> @@ -403,7 +417,6 @@ static void board_init_i2c(void)
>> int exynos_early_init_f(void)
>> {
>> board_clock_init();
>> - board_gpio_init();
>>
>> return 0;
>> }
>> @@ -414,6 +427,8 @@ int exynos_init(void)
>> gd->ram_size -= SZ_1M;
>> gd->bd->bi_dram[CONFIG_NR_DRAM_BANKS - 1].size -= SZ_1M;
>>
>> + board_gpio_init();
>> +
>> return 0;
>> }
>>
>> --
>> 1.9.1
>>
>
> Regards,
> Simon
>
Best regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
next prev parent reply other threads:[~2014-10-28 7:27 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 15:44 [U-Boot] [PATCH 00/14] Set of fixes for Exynos4xxx boards Przemyslaw Marczak
2014-10-24 15:44 ` [U-Boot] [PATCH 01/14] mmc: s5p: set SD detection pin as input Przemyslaw Marczak
2014-10-28 1:01 ` Simon Glass
2014-10-28 1:15 ` Simon Glass
2014-10-28 1:28 ` Simon Glass
2014-10-28 5:14 ` Jaehoon Chung
2014-10-28 7:15 ` Przemyslaw Marczak
2014-10-24 15:44 ` [U-Boot] [PATCH 02/14] exynos: common: enable generic fs operations Przemyslaw Marczak
2014-10-28 1:09 ` Simon Glass
2014-10-28 1:28 ` Simon Glass
2014-10-24 15:44 ` [U-Boot] [PATCH 03/14] exynos4/4x12: cpu: add extra gpio base addresses Przemyslaw Marczak
2014-10-28 1:10 ` Simon Glass
2014-10-28 7:22 ` Przemyslaw Marczak
2014-10-24 15:44 ` [U-Boot] [PATCH 04/14] exynos4/4x12: gpio: use gpio extra " Przemyslaw Marczak
2014-10-28 1:10 ` Simon Glass
2014-10-28 7:24 ` Przemyslaw Marczak
2014-10-24 15:45 ` [U-Boot] [PATCH 05/14] exynos4412: dts: fix bad gpio order in pinctrl Przemyslaw Marczak
2014-10-28 1:11 ` Simon Glass
2014-10-28 1:29 ` Simon Glass
2014-10-24 15:45 ` [U-Boot] [PATCH 06/14] exynos4412: dts: adjust pinctrl-uboot to changed gpio order Przemyslaw Marczak
2014-10-28 1:11 ` Simon Glass
2014-10-28 1:29 ` Simon Glass
2014-10-24 15:45 ` [U-Boot] [PATCH 07/14] exynos4210: dts: fix gpio offset in pinctrl-uboot Przemyslaw Marczak
2014-10-28 1:11 ` Simon Glass
2014-10-28 1:29 ` Simon Glass
2014-10-24 15:45 ` [U-Boot] [PATCH 08/14] universal: request soft i2c gpio Przemyslaw Marczak
2014-10-28 1:12 ` Simon Glass
2014-10-28 1:29 ` Simon Glass
2014-10-24 15:45 ` [U-Boot] [PATCH 08/14] universal: request soft i2c/spi gpio Przemyslaw Marczak
2014-10-24 15:53 ` Przemyslaw Marczak
2014-10-24 15:45 ` [U-Boot] [PATCH 09/14] universal: dts: adjust gpio numbers to new api Przemyslaw Marczak
2014-10-28 1:12 ` Simon Glass
2014-10-28 1:29 ` Simon Glass
2014-10-24 15:45 ` [U-Boot] [PATCH 10/14] trats: " Przemyslaw Marczak
2014-10-28 1:12 ` Simon Glass
2014-10-28 1:29 ` Simon Glass
2014-10-24 15:45 ` [U-Boot] [PATCH 11/14] trats2: dts: adjust gpio numbers after gpio rework Przemyslaw Marczak
2014-10-28 1:12 ` Simon Glass
2014-10-28 1:29 ` Simon Glass
2014-10-24 15:45 ` [U-Boot] [PATCH 12/14] odroid: dts: adjust sd cd-gpios for SD Card Przemyslaw Marczak
2014-10-28 1:12 ` Simon Glass
2014-10-28 1:29 ` Simon Glass
2014-10-24 15:45 ` [U-Boot] [PATCH 13/14] odroid: dts: fix name of included dtsi Przemyslaw Marczak
2014-10-28 1:12 ` Simon Glass
2014-10-28 1:29 ` Simon Glass
2014-10-24 15:45 ` [U-Boot] [PATCH 14/14] odroid: adjust gpio calls to dm gpio api Przemyslaw Marczak
2014-10-28 1:13 ` Simon Glass
2014-10-28 7:27 ` Przemyslaw Marczak [this message]
2014-10-27 9:24 ` [U-Boot] [PATCH 00/14] Set of fixes for Exynos4xxx boards Przemyslaw Marczak
2014-10-27 18:48 ` Simon Glass
2014-10-28 1:31 ` Simon Glass
2014-10-28 7:33 ` Przemyslaw Marczak
2014-10-28 16:31 ` [U-Boot] [PATCH 1/3] exynos4/4x12: cpu: add extra gpio base addresses Przemyslaw Marczak
2014-10-28 16:31 ` [U-Boot] [PATCH 2/3] exynos4/4x12: gpio: use gpio extra " Przemyslaw Marczak
2014-10-29 2:59 ` Simon Glass
2014-10-30 13:54 ` Minkyu Kang
2014-11-04 9:29 ` Przemyslaw Marczak
2014-11-04 10:50 ` Minkyu Kang
2014-10-28 16:31 ` [U-Boot] [PATCH 3/3] odroid: adjust gpio calls to dm gpio api Przemyslaw Marczak
2014-10-29 2:58 ` Simon Glass
2014-10-30 13:54 ` Minkyu Kang
2014-10-28 16:40 ` [U-Boot] [PATCH 1/3] exynos4/4x12: cpu: add extra gpio base addresses Przemyslaw Marczak
2014-10-29 2:59 ` Simon Glass
2014-10-30 13:54 ` Minkyu Kang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=544F4551.8080904@samsung.com \
--to=p.marczak@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox