[U-Boot-Users] serial: polling or interrupt based?

VanBaren, Gerald (AGRE) Gerald.VanBaren at smiths-aerospace.com
Fri Sep 24 16:31:51 CEST 2004


> -----Original Message-----
> From: u-boot-users-admin at lists.sourceforge.net
> [mailto:u-boot-users-admin at lists.sourceforge.net]On Behalf Of Benjamin
> Collar
> Sent: Friday, September 24, 2004 7:55 AM
> To: ubootuser
> Subject: [U-Boot-Users] serial: polling or interrupt based?
>
>
> Hi folks
>
> I'm trying to set up the serial interface on my happy little board.
> Reading the CPU's manual (CPU is mpc852T), I'm at this section called
> SCC Initialization. I'm a bit confused, because the initialization
> procedure specifically says:
>
> ...
> 10. Write ones to SCCM register to enable interrupts
> 11. Write CICR to configure the SCC interrupt priority
> 12. Clear out any interrupts in CIPR
> 13. Write the CIMR to enable interrupts to the CPIC.
> ...
>
> However, the u-boot code writes zeros to the SCCM and doesn't touch
> CIMR. So I guess it's polling based, yes?
>
> Then the question is, do I simply skip steps 10-13? If I wanted to use
> interrupts instead of polling, what else would I need to change?
>
> On a similar note, the manual for the MPC866, in appendix H which is
> specific for MPC852T, specifies that there is no BRG1 nor BRG2. The
> u-boot hard codes wiring BRG1 to the selected SCC. Why? Even more
> important: I have to obviously change it; is there more than
> one place I
> need to change (namely, replace cp_brgc1 with cp_brgc4)?
>
> Thanks
> Ben
>
> --
> Benjamin Collar
> Siemens AG
> CT SE 2
> Embedded Linux
> 089-636-53711

Well, either Wolfgang has used up his quota of answers for the week or my email is dropping incomming again :-/.  Either way, here is an answer to your question on interrupts...

U-boot runs polled mode so yes, you should skip steps 10-13.  U-boot is polling by design (simplicity).  Adding interrupt handling to u-boot is unnecessary (in general) and undesirable.

Linux uses interrupts by design (obviously, it is necessary to do multitasking).  The good news is, u-boot (polling) will very happily start up linux which then does all the device initialization, etc. to do interrupts.  Support for the common peripherals should already exist for your CPU and board in linux.

I have not used the 8xx family so I cannot answer your BRG questions.

gvb


******************************************
The following messages are brought to you by the Lawyers' League of IdioSpeak:

******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
******************************************




More information about the U-Boot mailing list