From: Cristian Birsan <cristian.birsan@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Olimex SAM9-L9260 board support
Date: Mon, 06 Oct 2008 23:33:25 +0300 [thread overview]
Message-ID: <48EA7615.8090706@gmail.com> (raw)
In-Reply-To: <20081006184325.2A2448356976@gemini.denx.de>
Dear Wolfgang Denk,
Thank you for your quick response.
>> +#ifdef CONFIG_RESET_PHY_R
>> +void reset_phy(void)
>> +{
>> +#ifdef CONFIG_MACB
>> + /*
>> + * Initialize ethernet HW addr prior to starting Linux,
>> + * needed for nfsroot
>> + */
>> + eth_init(gd->bd);
>> +#endif
>
> Please do NOT do this. It's a violation of the U-Boot design
> principles, which clearly say that only such periphereals that are
> actually being used by U-Boot shall be initialized, and even if they
> are being used, these shall be deactivated after use.
>
> Carelessly leaving ports or devices in an initialized stated has been
> the source for problems too many times before.
>
> Don't do that.
>
The above code section is used also in other ATMEL boards like
at91sam9260ek ( /board/atmel/at91sam9260ek/at91sam9260ek.c ),
at91sam9261ek, at91sam9263ek, at91sam9rlek. This is my
first patch sent to U-Boot and I used that code as reference.
The board that i have (SAM9-L9260 from Olimex ) is close to
AT91SAM9260EK from ATMEL.
How do you think i can do this the right way?
>> +#define ROUND(A, B) (((A) + (B)) & ~((B) - 1))
>
> First I think that this is wrong (maybe you need "B-1" instead of "B"
> in the first part?), second we already have DIV_ROUND_UP defined in
> common.h so please use this.
Thanks, good catch. I will fix this and submit a new patch.
Best regards,
Cristian Birsan
next prev parent reply other threads:[~2008-10-06 20:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-06 18:03 [U-Boot] [PATCH] Olimex SAM9-L9260 board support Cristian Birsan
2008-10-06 18:43 ` Wolfgang Denk
2008-10-06 20:33 ` Cristian Birsan [this message]
2008-10-06 20:44 ` Wolfgang Denk
2008-10-07 16:35 ` Cristian Birsan
2008-10-07 18:37 ` Wolfgang Denk
2008-10-07 21:12 ` Cristian Birsan
2008-10-07 22:05 ` Cristian Birsan
2008-10-07 22:55 ` Wolfgang Denk
2008-10-10 10:24 ` Cristian Birsan
2008-10-30 23:41 ` Cristian Birsan
2008-10-31 7:00 ` Jean-Christophe PLAGNIOL-VILLARD
2008-10-31 7:05 ` Jean-Christophe PLAGNIOL-VILLARD
2008-10-31 8:23 ` Jean-Christophe PLAGNIOL-VILLARD
2008-10-31 8:48 ` Wolfgang Denk
2008-10-31 9:05 ` Jean-Christophe PLAGNIOL-VILLARD
2008-11-01 12:49 ` Cristian Birsan
2008-11-01 13:19 ` Jean-Christophe PLAGNIOL-VILLARD
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=48EA7615.8090706@gmail.com \
--to=cristian.birsan@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