Skip to contentSkip to conversation

SCC or SMC for console ?

DISCUSSION Laurent Pinchart 3 participants 6 messages Feb 14, 2002 – Feb 15, 2002

lore
Share & tools
lore
#0 lore raw

Hi everybody,

I'm developping a board based on a MPC860T.

I need 4 serial ports at runtime, and was wondering if I should rather use 2SMC + 2SCC or 4 SCC (or 1SMC + 3SCC).

I need a console, but no hardware flow control (which would force the use of SCC).

Thanks for your help.

Laurent Pinchart

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 2 lines · Laurent Pinchart

I need 4 serial ports at runtime, and was wondering if I should rather use 2SMC + 2SCC or 4 SCC (or 1SMC + 3SCC).

Always use SCCs for real work and the SMC for console and other low speed things (like connected to low bit rate TDM).

The SMCs require a large amount of CPM software overhead, so not only are they relatively slow devices, they also steal cycles from other peripherals.

Is one of your serial ports in the example above the console? If you need four ports not including the console that can be a little more challenging. Carefully investigate the I/O pin multiplexing to ensure you can get the SMC2 I/O, as that is one of the first ones stolen for other uses.

Have fun!

	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 8 lines
Quoted 5 lines

I need 4 serial ports at runtime, and was wondering if I should rather use 2SMC + 2SCC or 4 SCC (or 1SMC + 3SCC).

Always use SCCs for real work and the SMC for console and other low speed things (like connected to low bit rate TDM).

4 SCC then, and 1 SMC for console. Both SMC1 and SMC2 I/Os are available on the design (I only need serial ports + FEC ethernet).

I'd like to use 2 serial ports for RS232 (should be really straightforward), and the other 2 for RS485 (with of course no flow control). Is there something I should know ?

Laurent Pinchart

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#3 lore raw
In reply to Laurent Pinchart

Dear Laurent,

Quoted 3 lines · in message <[email protected]> you wrote:

I need 4 serial ports at runtime, and was wondering if I should rather use 2SMC + 2SCC or 4 SCC (or 1SMC + 3SCC).

Assuming that you need Ethernet: if you can use the FEC for Ethernet, that it does not matter much; otherwise I'd recommend to use 2SMC + 2SCC or 1SMC + 3SCC so that you have at east one SCC left for Ethernet.

Quoted 2 lines

I need a console, but no hardware flow control (which would force the use of SCC).

Should be no problem. The kernel on our FTP server was tested with 6 serial ports on a MPC860, with HW flow controll on all SCC's. The only problem in such a configuration is that you have only 4 BRG's so two ports have to share the baudrate with another port.

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] See us @ Embedded Systems Nuremberg, Feb 19-21, Hall 12 K01 (with TQ)

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#4 lore raw
Quoted 6 lines

Should be no problem. The kernel on our FTP server was tested with 6 serial ports on a MPC860, with HW flow controll on all SCC's.

Reading arch/ppc/8xx_io/uart.c, I found out that all the flow control related code was surrounded by false #if #endif. It seems that there is no flow control at all on either the SMC or SCC serial ports in UART mode. Is there a patch somewhere to implement flow control, or is it still missing ? I was wondering what to do with CD/DTR/DSR (as Linux only support RTS/CTS flow control for now), and had hoped to find an answer in the source code...

Laurent Pinchart

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#5 lore raw
Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 4 lines

Should be no problem. The kernel on our FTP server was tested with 6 serial ports on a MPC860, with HW flow controll on all SCC's.

Reading arch/ppc/8xx_io/uart.c, I found out that all the flow control related code was surrounded by false #if #endif. It seems that there is

You're reading the wrong code, it seems.

Get the sources from ftp://ftp.denx.de/pub/LinuxPPC/usr/src/ You will find a lot of CONFIG_UART_CTS_CONTROL_SCCx, CONFIG_UART_RTS_CONTROL_SCCx, CONFIG_UART_CD_CONTROL_SCCx, and CONFIG_UART_DTR_CONTROL_SCCx stuff there.

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] See us @ Embedded Systems Nuremberg, Feb 19-21, Hall 12 K01 (with TQ)

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/