Skip to contentSkip to conversation

Switching of LCD controller before reboot?

U-Boot-Users Steven Scholz 3 participants 9 messages Oct 22, 2004

lore
Share & tools
lore
#0 lore raw

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.

Signature · 1 line
Steven Scholz
#1 lore raw

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

Why you'll not use the already implemented do_reset() in cpu/arm920t/cpu.c ?

Regards
-P.Broggini

Quoted 58 lines

-----Messaggio originale-----
Da: u-boot-users-admin at lists.sourceforge.net [mailto:u-boot-users-admin at lists.sourceforge.net]Per conto di Steven Scholz
Inviato: venerdi, 22. ottobre 2004 09:14
A: u-boot-users at 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 at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

#2 lore raw

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

Quoted 1 line · Paolo Broggini

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!

Signature · 1 line
Steven Scholz
#3 lore raw

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

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

Quoted 25 lines

-----Messaggio originale-----
Da: Steven Scholz [mailto:steven.scholz at imc-berlin.de]
Inviato: venerdi, 22. ottobre 2004 15:13
A: Paolo Broggini
Cc: u-boot-users at lists.sourceforge.net
Oggetto: Re: R: [U-Boot-Users] Switching of LCD controller before reboot?

Quoted 1 line · Paolo Broggini

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

#4 lore raw

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

Quoted 6 lines · Paolo Broggini

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!

Quoted 3 lines

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

#5 lore raw

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

Quoted 17 lines

-----Messaggio originale-----
Da: Steven Scholz [mailto:steven.scholz at imc-berlin.de]
Inviato: venerdi, 22. ottobre 2004 15:54
A: Paolo Broggini
Cc: u-boot-users at lists.sourceforge.net
Oggetto: Re: R: [U-Boot-Users] Switching of LCD controller before reboot?

Quoted 1 line · Paolo Broggini

I understand, that's why in my own (because it's still under

development)

Quoted 3 lines

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

Quoted 8 lines

I do it by

Quoted 2 lines

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.

Quoted 3 lines

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.

Quoted 6 lines
Quoted 2 lines

When I'll find some time (it's not the case for the near

future) I would be

Quoted 2 lines

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

Quoted 4 lines

--
Steven

#8 lore raw

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

In reply to Steven Scholz
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 2 lines

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.

Quoted 2 lines

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

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"You shouldn't make my toaster angry." - Household security explained
in "Johnny Quest"
#7 lore raw

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

In reply to Paolo Broggini
Quoted 4 lines · In message <[email protected]> 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.

Quoted 6 lines

... 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

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Commitment, n.:      Commitment can be illustrated by a breakfast
of ham and eggs. The chicken was involved, the pig was committed.
#6 lore raw

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

In reply to Paolo Broggini
Quoted 4 lines · In message <[email protected]> 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.

Quoted 4 lines

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.

Quoted 4 lines

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

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
That said, there may be good reasons for what you did beyond obsequi-
ous sycophantic parody. Perhaps you might be so kind as to elucidate.
         -- Tom Christiansen in <[email protected]>