Skip to contentSkip to conversation

serial: polling or interrupt based?

U-Boot-Users Benjamin Collar 2 participants 4 messages Sep 24, 2004 – Sep 29, 2004

lore
Share & tools
lore
#0 lore raw

Hi again

OK, I've answered one of my questions: I can change cp_brgc1 to cp_brgc4, and of course the other change I have to make is changing sicr so it uses brgc4 as well. It doesn't *appear* that other changes are necessary.

Thank you all for the answers regarding interrupts vs. polling.

Hard-coding brgc1 seems to me--bear in mind that my experience with bootloaders is about .00004--like a bad idea. Is there any interest in making brg selection more flexible, or is it sufficient, when I send the patch for my board, that I use #ifdefs to do it the way I need?

Thanks
Ben

Signature · 5 lines
Benjamin Collar
Siemens AG
CT SE 2
Embedded Linux
089-636-53711
#1 lore raw
Quoted 5 lines · In message <1096040007.3318.73.camel@mhpajh5c> you wrote:

Hard-coding brgc1 seems to me--bear in mind that my experience with bootloaders is about .00004--like a bad idea. Is there any interest in making brg selection more flexible, or is it sufficient, when I send the patch for my board, that I use #ifdefs to do it the way I need?

The general rule is: never touch a running system.

Please explain which problem you are trying to fix. As mentioned before, there are existing ports of both the MPC852 and MPC866 which run just fine with the code as is, you I'm not really sure which problem you're trying to fix.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Philosophy is a game with objectives and no rules.
Mathematics is a game with rules and no objectives.
#2 lore raw
Quoted 9 lines · Wolfgang Denk
Quoted 5 lines · In message <1096040007.3318.73.camel@mhpajh5c> you wrote:

Hard-coding brgc1 seems to me--bear in mind that my experience with bootloaders is about .00004--like a bad idea. Is there any interest in making brg selection more flexible, or is it sufficient, when I send the patch for my board, that I use #ifdefs to do it the way I need?

The general rule is: never touch a running system.

Ah, but my system wouldn't run so I had to touch something, somewhere.

Quoted 5 lines

Please explain which problem you are trying to fix. As mentioned before, there are existing ports of both the MPC852 and MPC866 which run just fine with the code as is, you I'm not really sure which problem you're trying to fix.

The problem is easy to explain: the MPC852T has only brgc3 and 4; it also has only scc3 and 4. mpc8xx's serial.c hard codes assignment to brgc1 and also wires brgc1 to the selected SCC; these commands won't work for me. That's what I'm trying to "fix" or not fix, as the case may be. My question was, should I just use ifdefs for my board there in that file, or should I make something fancier?

Sincerely
Ben

Quoted 3 lines

Best regards,

Wolfgang Denk

Signature · 5 lines
Benjamin Collar
Siemens AG
CT SE 2
Embedded Linux
089-636-53711
#3 lore raw
Quoted 3 lines · In message <1096463859.8295.4.camel@mhpajh5c> you wrote:

The problem is easy to explain: the MPC852T has only brgc3 and 4; it also has only scc3 and 4. mpc8xx's serial.c hard codes assignment to

It also has the SMC ports, right?

Why don;t you use SMC1 for console? :-)

Quoted 4 lines

brgc1 and also wires brgc1 to the selected SCC; these commands won't work for me. That's what I'm trying to "fix" or not fix, as the case may be. My question was, should I just use ifdefs for my board there in that file, or should I make something fancier?

If you change it, then please in such a way that _all_ boards using this CPU and a SCC port for console will work, i. e. fix the scc_*() functions in "cpu/mpc8xx/serial.c"; test for CONFIG_MPC852 or so...

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"Security is mostly a superstition. It does not  exist  in  nature...
Life is either a daring adventure or nothing."         - Helen Keller