[U-Boot-Users] Switching of LCD controller before reboot?

Hi there,
my i.MX based board does not reboot but hangs when doing "reset" (on u-boot) or "reboot" (on linux) when the internal LCD contoller is enabled. Thus I have to disable the LCD contoller before doing that.
Something else:
The AT91RM9200DK needs to "shutdown the console to avoid strange chars during reset".
So my question is: Where would be the appropriate place for stuff like that? Should we clobber cpu/arm920t/cpu.c with all the processor or board specific reset related stuff? Or would it be better to have something like
cpu_init, /* basic cpu dependent setup */ board_init, /* basic board dependent setup */ ... cpu_reset, /* basic cpu dependent reset */ board_reset, /* basic board dependent reset */ or prepare_reset
based on defines like CONFIG_BOARD_PRE_RESET or something?
Thanks.

Why you'll not use the already implemented do_reset() in cpu/arm920t/cpu.c ?
Regards -P.Broggini
-----Messaggio originale----- Da: u-boot-users-admin@lists.sourceforge.net [mailto:u-boot-users-admin@lists.sourceforge.net]Per conto di Steven Scholz Inviato: venerdi, 22. ottobre 2004 09:14 A: u-boot-users@lists.sourceforge.net Oggetto: [U-Boot-Users] Switching of LCD controller before reboot?
Hi there,
my i.MX based board does not reboot but hangs when doing "reset" (on u-boot) or "reboot" (on linux) when the internal LCD contoller is enabled. Thus I have to disable the LCD contoller before doing that.
Something else:
The AT91RM9200DK needs to "shutdown the console to avoid strange chars during reset".
So my question is: Where would be the appropriate place for stuff like that? Should we clobber cpu/arm920t/cpu.c with all the processor or board specific reset related stuff? Or would it be better to have something like
cpu_init, /* basic cpu dependent setup */ board_init, /* basic board dependent setup */
... cpu_reset, /* basic cpu dependent reset */ board_reset, /* basic board dependent reset */ or prepare_reset
based on defines like CONFIG_BOARD_PRE_RESET or something?
Thanks.
-- Steven Scholz
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users

Paolo Broggini wrote:
Why you'll not use the already implemented do_reset() in cpu/arm920t/cpu.c ?
Because I don't want to be the one that started clobbering cpu/arm920t/cpu.c with SoC specific code! IMHO Code for i.MX does not belong into cpu/arm920t/cpu.c. Neither does code for AT91RM9200. Although both are based on a ARM920T core!

I understand, that's why in my own (because it's still under development) port of U-boot for the i.MX I created a "new" cpu named imx ! ... I know, I know, it's absolutely arguable but that's the way I do it by now to avoid the problems you are facing. When I'll find some time (it's not the case for the near future) I would be pleased to help in creating a better SoC structure.
-P.Broggini
-----Messaggio originale----- Da: Steven Scholz [mailto:steven.scholz@imc-berlin.de] Inviato: venerdi, 22. ottobre 2004 15:13 A: Paolo Broggini Cc: u-boot-users@lists.sourceforge.net Oggetto: Re: R: [U-Boot-Users] Switching of LCD controller before reboot?
Paolo Broggini wrote:
Why you'll not use the already implemented do_reset() in
cpu/arm920t/cpu.c ?
Because I don't want to be the one that started clobbering cpu/arm920t/cpu.c with SoC specific code! IMHO Code for i.MX does not belong into cpu/arm920t/cpu.c. Neither does code for AT91RM9200. Although both are based on a ARM920T core!
-- Steven Scholz

Paolo Broggini wrote:
I understand, that's why in my own (because it's still under development) port of U-boot for the i.MX I created a "new" cpu named imx ! ... I know, I know, it's absolutely arguable but that's the way I do it by now to avoid the problems you are facing.
No need to argue! You could^H^H^H^H^Hshould use the i.MX port that comes with U-Boot and only change what you need instead of having a completly different und unsupported version yourself. AND: more important: Having an own (incompatible) version prevents you from giving us (the comunity) something back!
When I'll find some time (it's not the case for the near future) I would be pleased to help in creating a better SoC structure.
What don't you like about the existing SoC structure?
-- Steven

-----Messaggio originale----- Da: Steven Scholz [mailto:steven.scholz@imc-berlin.de] Inviato: venerdi, 22. ottobre 2004 15:54 A: Paolo Broggini Cc: u-boot-users@lists.sourceforge.net Oggetto: Re: R: [U-Boot-Users] Switching of LCD controller before reboot?
Paolo Broggini wrote:
I understand, that's why in my own (because it's still under
development)
port of U-boot for the i.MX I created a "new" cpu named imx ! ... I know, I know, it's absolutely arguable but that's the way
I do it by
now to avoid the problems you are facing.
No need to argue! You could^H^H^H^H^Hshould use the i.MX port that comes with U-Boot and only change what you need instead of having a completly different und unsupported version yourself.
When I started evaluating/porting U-boot for the i.MX there wasn't yet nay support for it in the official release 1.1.0.
AND: more important: Having an own (incompatible) version prevents you from giving us (the comunity) something back!
When we'll be finished with our development I'll make the necessary changes to be "compatible" (there aren't so many differences), as I said that was for me the quickest way.
When I'll find some time (it's not the case for the near
future) I would be
pleased to help in creating a better SoC structure.
What don't you like about the existing SoC structure?
The basic idea is fine, but as you said, the cpu/arm920t should contains only the code for the ARM920T and not like start.s which contains SoC specific code (S3C24x0).
-P.Broggini
-- Steven

In message NDBBJGGCBKABIDHFAMBIEEJGCEAA.pbroggini@softool.ch you wrote:
When I started evaluating/porting U-boot for the i.MX there wasn't yet nay support for it in the official release 1.1.0.
But it probably was in CVS, which is where all development is going on. Basing new work on an old official release instead of the current development version seems somewhat short-sighted to me.
When we'll be finished with our development I'll make the necessary changes to be "compatible" (there aren't so many differences), as I said that was for me the quickest way.
You only think it was. You will lose more time later than you might have saved.
The basic idea is fine, but as you said, the cpu/arm920t should contains only the code for the ARM920T and not like start.s which contains SoC specific code (S3C24x0).
Feel free suggest a patch to clean up?
Best regards,
Wolfgang Denk

In message NDBBJGGCBKABIDHFAMBIIEJFCEAA.pbroggini@softool.ch you wrote:
I understand, that's why in my own (because it's still under development) port of U-boot for the i.MX I created a "new" cpu named imx !
That's even worse, as you will duplicate all the comon code.
... I know, I know, it's absolutely arguable but that's the way I do it by now to avoid the problems you are facing. When I'll find some time (it's not the case for the near future) I would be pleased to help in creating a better SoC structure.
The structure is already in place. Please make sure to _use_ it for new code instead of going two steps back.
[Any patch to add a new imx CPU directory will be rejected for this reason.]
Best regards,
Wolfgang Denk

In message 4179076F.3050702@imc-berlin.de you wrote:
Why you'll not use the already implemented do_reset() in cpu/arm920t/cpu.c ?
Because I don't want to be the one that started clobbering cpu/arm920t/cpu.c with SoC specific code!
Then just add something like
#ifdef CONFIG_BOARD_PRE_RESET board_pre_reset() #endif
and implement this function in your board specific code.
IMHO Code for i.MX does not belong into cpu/arm920t/cpu.c. Neither does code for AT91RM9200. Although both are based on a ARM920T core!
Please feel free to submit a patch to clean up. So far your patches were usually accepted without much discussion.
Best regards,
Wolfgang Denk
participants (3)
-
Paolo Broggini
-
Steven Scholz
-
Wolfgang Denk