* [U-Boot-Users] [PATCH] fix system config overwrite @ MPC834x
@ 2008-04-17 17:28 Andre Schwarz
2008-04-17 20:56 ` Kim Phillips
0 siblings, 1 reply; 6+ messages in thread
From: Andre Schwarz @ 2008-04-17 17:28 UTC (permalink / raw)
To: u-boot
Kim,
during 83xx setup the "System I/O configuration register high" gets
overwritten
with user defined value if CFG_SICRH is defined.
Regarding to the MPC834x manual (Table 5-28 reve.1) bits 28+29 of SICRH
must keep
their reset value regardless of configuration.
On my board (using RGMII) those bits are set after reset - yet it's
unclear where they come from.
The patch keeps both bits on MPC834x.
Cheers,
Andre
Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
--
cpu/mpc83xx/cpu_init.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/cpu/mpc83xx/cpu_init.c b/cpu/mpc83xx/cpu_init.c
index fba5b02..66cc1c2 100644
--- a/cpu/mpc83xx/cpu_init.c
+++ b/cpu/mpc83xx/cpu_init.c
@@ -59,6 +59,8 @@ static void config_qe_ioports(void)
*/
void cpu_init_f (volatile immap_t * im)
{
+ u32 tmp_sicrh = 0;
+
/* Pointer is writable since we allocated a register for it */
gd = (gd_t *) (CFG_INIT_RAM_ADDR + CFG_GBL_DATA_OFFSET);
@@ -181,7 +183,11 @@ void cpu_init_f (volatile immap_t * im)
/* System General Purpose Register */
#ifdef CFG_SICRH
- im->sysconf.sicrh = CFG_SICRH;
+#ifdef CONFIG_MPC834X
+ /* regarding to MPC34x manual rev.1 bits 28..29 must be preserved */
+ tmp_sicrh = im->sysconf.sicrh & 0x0000000C;
+#endif
+ im->sysconf.sicrh = CFG_SICRH | tmp_sicrh;
#endif
#ifdef CFG_SICRL
im->sysconf.sicrl = CFG_SICRL;
MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090
Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
^ permalink raw reply related [flat|nested] 6+ messages in thread* [U-Boot-Users] [PATCH] fix system config overwrite @ MPC834x
2008-04-17 17:28 [U-Boot-Users] [PATCH] fix system config overwrite @ MPC834x Andre Schwarz
@ 2008-04-17 20:56 ` Kim Phillips
2008-04-18 8:48 ` Andre Schwarz
0 siblings, 1 reply; 6+ messages in thread
From: Kim Phillips @ 2008-04-17 20:56 UTC (permalink / raw)
To: u-boot
On Thu, 17 Apr 2008 19:28:17 +0200
Andre Schwarz <andre.schwarz@matrix-vision.de> wrote:
> Kim,
>
Hello Andre,
I can't apply this:
Applying fix system config overwrite @ MPC834x
error: patch failed: cpu/mpc83xx/cpu_init.c:59
error: cpu/mpc83xx/cpu_init.c: patch does not apply
Patch failed at 0001.
When you have resolved this problem run "git-am --resolved".
If you would prefer to skip this patch, instead run "git-am --skip".
> during 83xx setup the "System I/O configuration register high" gets
> overwritten
> with user defined value if CFG_SICRH is defined.
>
> Regarding to the MPC834x manual (Table 5-28 reve.1) bits 28+29 of SICRH
> must keep
> their reset value regardless of configuration.
>
> On my board (using RGMII) those bits are set after reset - yet it's
> unclear where they come from.
>
> The patch keeps both bits on MPC834x.
>
>
> Cheers,
> Andre
>
> Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
> --
fyi, commit message text you don't want applied in the tree history
(such as "Kim," and "Cheers, Andre") goes here, below the '---' line.
> /* System General Purpose Register */
> #ifdef CFG_SICRH
> - im->sysconf.sicrh = CFG_SICRH;
> +#ifdef CONFIG_MPC834X
> + /* regarding to MPC34x manual rev.1 bits 28..29 must be preserved */
> + tmp_sicrh = im->sysconf.sicrh & 0x0000000C;
> +#endif
> + im->sysconf.sicrh = CFG_SICRH | tmp_sicrh;
> #endif
also, can you extend the ifdef to include CONFIG_MPC8313 in addition to
the MPC834X? That's the only other one that could use this fix.
Thanks,
Kim
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] [PATCH] fix system config overwrite @ MPC834x
2008-04-17 20:56 ` Kim Phillips
@ 2008-04-18 8:48 ` Andre Schwarz
2008-04-18 16:20 ` Kim Phillips
0 siblings, 1 reply; 6+ messages in thread
From: Andre Schwarz @ 2008-04-18 8:48 UTC (permalink / raw)
To: u-boot
Kim,
doing a git-pull gives "Already up-to-date."
The patch is produced with "git-diff --patch-with-stat
cpu/mpc83xx/cpu_init.c"
Am I doing anything wrong ?
Since all my patches have problems in getting applied there's obviously
a problem on my side ...
regards,
Andre
Kim Phillips schrieb:
> On Thu, 17 Apr 2008 19:28:17 +0200
> Andre Schwarz <andre.schwarz@matrix-vision.de> wrote:
>
>
>> Kim,
>>
>>
> Hello Andre,
>
> I can't apply this:
>
> Applying fix system config overwrite @ MPC834x
> error: patch failed: cpu/mpc83xx/cpu_init.c:59
> error: cpu/mpc83xx/cpu_init.c: patch does not apply
> Patch failed at 0001.
> When you have resolved this problem run "git-am --resolved".
> If you would prefer to skip this patch, instead run "git-am --skip".
>
>
>> during 83xx setup the "System I/O configuration register high" gets
>> overwritten
>> with user defined value if CFG_SICRH is defined.
>>
>> Regarding to the MPC834x manual (Table 5-28 reve.1) bits 28+29 of SICRH
>> must keep
>> their reset value regardless of configuration.
>>
>> On my board (using RGMII) those bits are set after reset - yet it's
>> unclear where they come from.
>>
>> The patch keeps both bits on MPC834x.
>>
>>
>> Cheers,
>> Andre
>>
>> Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
>> --
>>
>
> fyi, commit message text you don't want applied in the tree history
> (such as "Kim," and "Cheers, Andre") goes here, below the '---' line.
>
>
>> /* System General Purpose Register */
>> #ifdef CFG_SICRH
>> - im->sysconf.sicrh = CFG_SICRH;
>> +#ifdef CONFIG_MPC834X
>> + /* regarding to MPC34x manual rev.1 bits 28..29 must be preserved */
>> + tmp_sicrh = im->sysconf.sicrh & 0x0000000C;
>> +#endif
>> + im->sysconf.sicrh = CFG_SICRH | tmp_sicrh;
>> #endif
>>
>
> also, can you extend the ifdef to include CONFIG_MPC8313 in addition to
> the MPC834X? That's the only other one that could use this fix.
>
> Thanks,
>
> Kim
>
MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090
Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080418/d3ae38e5/attachment.htm
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] [PATCH] fix system config overwrite @ MPC834x
2008-04-18 8:48 ` Andre Schwarz
@ 2008-04-18 16:20 ` Kim Phillips
2008-04-18 18:31 ` André Schwarz
2008-04-19 12:55 ` Jerry Van Baren
0 siblings, 2 replies; 6+ messages in thread
From: Kim Phillips @ 2008-04-18 16:20 UTC (permalink / raw)
To: u-boot
On Fri, 18 Apr 2008 10:48:51 +0200
Andre Schwarz <andre.schwarz@matrix-vision.de> wrote:
> Kim,
>
> doing a git-pull gives "Already up-to-date."
> The patch is produced with "git-diff --patch-with-stat
> cpu/mpc83xx/cpu_init.c"
using git-commit and git-format-patch is recommended, but that's
probably not the problem here. Have you followed the instructions for
Thunderbird in linux-2.6/Documentation/email-clients.txt? You can test
by using git-am on patches you email yourself.
Kim
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] [PATCH] fix system config overwrite @ MPC834x
2008-04-18 16:20 ` Kim Phillips
@ 2008-04-18 18:31 ` André Schwarz
2008-04-19 12:55 ` Jerry Van Baren
1 sibling, 0 replies; 6+ messages in thread
From: André Schwarz @ 2008-04-18 18:31 UTC (permalink / raw)
To: u-boot
Thanks - I'll give it another try on monday.
Cheers,
Andr?
Kim Phillips wrote:
> On Fri, 18 Apr 2008 10:48:51 +0200
> Andre Schwarz <andre.schwarz@matrix-vision.de> wrote:
>
>
>> Kim,
>>
>> doing a git-pull gives "Already up-to-date."
>> The patch is produced with "git-diff --patch-with-stat
>> cpu/mpc83xx/cpu_init.c"
>>
>
> using git-commit and git-format-patch is recommended, but that's
> probably not the problem here. Have you followed the instructions for
> Thunderbird in linux-2.6/Documentation/email-clients.txt? You can test
> by using git-am on patches you email yourself.
>
> Kim
>
MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090
Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080418/6a56cc61/attachment.htm
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot-Users] [PATCH] fix system config overwrite @ MPC834x
2008-04-18 16:20 ` Kim Phillips
2008-04-18 18:31 ` André Schwarz
@ 2008-04-19 12:55 ` Jerry Van Baren
1 sibling, 0 replies; 6+ messages in thread
From: Jerry Van Baren @ 2008-04-19 12:55 UTC (permalink / raw)
To: u-boot
Kim Phillips wrote:
> On Fri, 18 Apr 2008 10:48:51 +0200
> Andre Schwarz <andre.schwarz@matrix-vision.de> wrote:
>
>> Kim,
>>
>> doing a git-pull gives "Already up-to-date."
>> The patch is produced with "git-diff --patch-with-stat
>> cpu/mpc83xx/cpu_init.c"
>
> using git-commit and git-format-patch is recommended, but that's
> probably not the problem here. Have you followed the instructions for
> Thunderbird in linux-2.6/Documentation/email-clients.txt? You can test
> by using git-am on patches you email yourself.
>
> Kim
Hi Andre,
Another thing I do when something I think should work doesn't is to make
a fresh clone of the git repository, apply my new patch to it, and
regenerate the patch from that. Sometimes I get confused as to the
state of my working directory, what has been applied to it, what I've
pulled from, etc. (I used to be really sharp, but then I discovered
beer and the edges are a little duller now.)
FWIIW, I keep a local pristine copy of the denx.de master repository
(and others I am interested in), doing a nightly pull in a cron job.
This allows me to make a new working clone of what should be a clean
repository without hammering denx.de. Worst case, I hammer denx.de
occasionally. :-/
Best regards,
gvb
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-04-19 12:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-17 17:28 [U-Boot-Users] [PATCH] fix system config overwrite @ MPC834x Andre Schwarz
2008-04-17 20:56 ` Kim Phillips
2008-04-18 8:48 ` Andre Schwarz
2008-04-18 16:20 ` Kim Phillips
2008-04-18 18:31 ` André Schwarz
2008-04-19 12:55 ` Jerry Van Baren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox