From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] omap3evm: Update ethernet reset sequence for Rev.G board
Date: Mon, 27 Jun 2011 09:47:29 +0300 [thread overview]
Message-ID: <4E082781.7040209@compulab.co.il> (raw)
In-Reply-To: <B85A65D85D7EB246BE421B3FB0FBB593024D6C312C@dbde02.ent.ti.com>
On 06/27/11 08:06, Premi, Sanjeev wrote:
>> -----Original Message-----
>> From: Premi, Sanjeev
>> Sent: Thursday, June 23, 2011 4:48 PM
>> To: Premi, Sanjeev; Igor Grinberg
>> Cc: Govindarajan, Sriramakrishnan; u-boot at lists.denx.de
>> Subject: RE: [U-Boot] [PATCH 2/3] omap3evm: Update ethernet
>> reset sequence for Rev.G board
>>
>>> -----Original Message-----
>>> From: u-boot-bounces at lists.denx.de
>>> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Premi, Sanjeev
>>> Sent: Thursday, June 23, 2011 4:43 PM
>>> To: Igor Grinberg
>>> Cc: Govindarajan, Sriramakrishnan; u-boot at lists.denx.de
>>> Subject: Re: [U-Boot] [PATCH 2/3] omap3evm: Update ethernet
>>> reset sequence for Rev.G board
>>>
>>>> -----Original Message-----
>>>> From: Igor Grinberg [mailto:grinberg at compulab.co.il]
>>>> Sent: Thursday, June 23, 2011 2:38 PM
>>>> To: Premi, Sanjeev
>>>> Cc: u-boot at lists.denx.de; Govindarajan, Sriramakrishnan
>>>> Subject: Re: [U-Boot] [PATCH 2/3] omap3evm: Update ethernet
>>>> reset sequence for Rev.G board
>>>>
>>>> Hi Sanjeev,
>>>>
>>>> On 06/22/11 22:24, Sanjeev Premi wrote:
>>>>> From: Sriramakrishnan <srk@ti.com>
>>>>>
>>>>> The GPIO pin used for resetting the external LAN chip has
>>>>> changed for Rev.G board.
>>>>>
>>>>> Signed-off-by: Sriramakrishnan <srk@ti.com>
>>>>> Signed-off-by: Sanjeev Premi <premi@ti.com>
>>>>> ---
>>>>> board/ti/evm/evm.c | 27 ++++++++++++++++++---------
>>>>> 1 files changed, 18 insertions(+), 9 deletions(-)
>>>>>
> [snip]...[snip]
>
>>>>> + /* Send a pulse on the GPIO pin */
>>>>> + writel(pin, &gpio_base->setdataout);
>>>>> udelay(1);
>>>>> - writel(GPIO0, &gpio3_base->cleardataout);
>>>>> + writel(pin, &gpio_base->cleardataout);
>>>>> udelay(1);
>>>>> - writel(GPIO0, &gpio3_base->setdataout);
>>>>> + writel(pin, &gpio_base->setdataout);
>>>> Why keep messing with the gpio registers?
>>>> Why not use gpio framework?
>>>> Though it is omap specific, but it will be much cleaner then
>>>> the above.
>>> [sp] I guess the intent was to keep code similar. But yes,
>>> gpio framework can be used.
>>>
>> [sp] Sorry, mail went earlier than I wanted :(
>>
>> The only issue is that I couln't see gpio framework for omap.
>> Let me dig further...
>>
> [sp] Implementing GPIO for OMAP would be a long task. It should be
> done for long term; but is it necessary pre-condition for the
> patch?
There is no need to implement GPIO for OMAP. It is already there,
you just need to use it instead of writing directly to the GPIO registers.
You can find all the implementation in: arch/arm/cpu/armv7/omap3/gpio.c
and the header is: arch/arm/include/asm/arch-omap3/gpio.h
All you need is to include the header, request the appropriate gpio,
send the pulse and maybe (if you don't need it anymore) free that gpio.
This is not hard or long at all.
--
Regards,
Igor.
next prev parent reply other threads:[~2011-06-27 6:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-22 19:24 [U-Boot] [PATCH 0/3] omap3evm: Generic ethernet fixes Sanjeev Premi
2011-06-22 19:24 ` [U-Boot] [PATCH 1/3] omap3evm: eth: split function setup_net_chip Sanjeev Premi
2011-07-28 13:29 ` Wolfgang Denk
2011-06-22 19:24 ` [U-Boot] [PATCH 2/3] omap3evm: Update ethernet reset sequence for Rev.G board Sanjeev Premi
2011-06-23 9:07 ` Igor Grinberg
2011-06-23 11:12 ` Premi, Sanjeev
2011-06-23 11:18 ` Premi, Sanjeev
2011-06-27 5:06 ` Premi, Sanjeev
2011-06-27 6:47 ` Igor Grinberg [this message]
2011-06-27 10:43 ` Premi, Sanjeev
2011-07-28 13:32 ` Wolfgang Denk
2011-06-22 19:24 ` [U-Boot] [PATCH 3/3] omap3evm: eth: Include functions only when necessary Sanjeev Premi
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=4E082781.7040209@compulab.co.il \
--to=grinberg@compulab.co.il \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.