From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 08/11 v1] ARM: OMAP3: Add I2C and network support
Date: Fri, 26 Sep 2008 00:27:34 -0700 [thread overview]
Message-ID: <48DC8EE6.3010902@gmail.com> (raw)
In-Reply-To: <48DC866C.2080505@googlemail.com>
Dirk Behme wrote:
> Ben Warren wrote:
>> dirk.behme at googlemail.com wrote:
>>
>>> Subject: [PATCH 08/11 v1] ARM: OMAP3: Add I2C and network support
>>>
>>> From: Dirk Behme <dirk.behme@gmail.com>
>>>
>>> Add I2C and network support
>>>
>>>
>>
>> I2C and network bits are kinda unrelated, don't you think?
>> <snip>
>
> Ben: Yes, you are right ;) The OMAP3 patch is ~300k and I tried to put
> this in as less patches as possible while having no patch > 40k. This
> resulted in some more or less unrelated code in one patch. Alternative
> would be to have more than the ~11 patches at the list we already have.
>
>>> Index: u-boot_master/net/eth.c
>>> ===================================================================
>>> --- u-boot_master.orig/net/eth.c
>>> +++ u-boot_master/net/eth.c
>>> @@ -508,7 +508,7 @@ extern int emac4xx_miiphy_initialize(bd_
>>> extern int mcf52x2_miiphy_initialize(bd_t *bis);
>>> extern int ns7520_miiphy_initialize(bd_t *bis);
>>> extern int davinci_eth_miiphy_initialize(bd_t *bis);
>>> -
>>> +extern int eth_init(bd_t *bd);
>>>
>>> int eth_initialize(bd_t *bis)
>>> {
>>> @@ -532,6 +532,9 @@ int eth_initialize(bd_t *bis)
>>> #if defined(CONFIG_DRIVER_TI_EMAC)
>>> davinci_eth_miiphy_initialize(bis);
>>> #endif
>>> +#if defined(CONFIG_DRIVER_SMC911X)
>>> + eth_init(bis);
>>>
>>
>> This isn't the right place to call eth_init(). I know the namespaces
>> are pretty convoluted, but the eth_initialize() family of functions
>> are intended to do things like register devices, initialize data
>> structures etc. without actually enabling the device. eth_init()
>> enables a device. The SMC911X driver doesn' t have such a thing,
>> which is why none of the other boards that use this chip have
>> anything in this file.
>
> Mani, Steve: Any comments on this?
>
> Ben: Any hint where in existing code it is done right to take this as
> example?
>
eth_init() will get called in NetLoop() (net/net.c) whenever you send a
packet. You should never have to call it explicitly. There doesn't
appear to be a separate driver initialization for this controller.
> Thanks
>
> Dirk
regards,
Ben
prev parent reply other threads:[~2008-09-26 7:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-14 9:53 [U-Boot] [PATCH 08/11 v1] ARM: OMAP3: Add I2C and network support dirk.behme at googlemail.com
2008-09-26 6:40 ` Ben Warren
2008-09-26 6:51 ` Dirk Behme
2008-09-26 7:27 ` Ben Warren [this message]
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=48DC8EE6.3010902@gmail.com \
--to=biggerbadderben@gmail.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