Skip to contentSkip to conversation

MPC8560 CPM2 SCC(UART) Driver CPM_UART_CONSOLE

DISCUSSION Deepak Gaur 3 participants 4 messages Sep 25, 2007 – Sep 26, 2007

lore
Share & tools
lore
#0 lore raw

Hi all,

I am writing a kernel module which is required to parse the characters received from a device attached to MPC8560 SCC2 (UART slave mode) on serial interface. This SCC is required to be configured for single-buffer, character based operation. Moreover on another SCC (SCC1 UART master mode) the board debug interface(console) is connected.

While trying to figure out CPM UART device driver interface available in file drivers/serial/cpm_uart/cpm_uart_core.c for my kernel module I found that some of the functions are available when CPM_UART_CONSOLE is enabled.

My doubt is regarding status of this flag for my hardware setup. Should this flag be enabled or not. If it is required to be enabled for supporting SCC1 then how SCC2 will be handled?

As I am a novice in this area , I shall be grateful if you please guide me in understanding this driver code.

with regards,

Deepak Gaur

#1 lore raw
Quoted 5 lines · Deepak Gaur

I am writing a kernel module which is required to parse the characters received from a device attached to MPC8560 SCC2 (UART slave mode) on serial interface. This SCC is required to be configured for single-buffer, character based operation. Moreover on another SCC (SCC1 UART master mode) the board debug interface(console) is connected.

Quoted 7 lines

While trying to figure out CPM UART device driver interface available in file drivers/serial/cpm_uart/cpm_uart_core.c for my kernel module I found that some of the functions are available when CPM_UART_CONSOLE is enabled.

My doubt is regarding status of this flag for my hardware setup. Should this flag be enabled or not. If it is required to be enabled for supporting SCC1 then how SCC2 will be handled?

That flag should only be set on the actual console. What is it that you need to do with the other port that the driver won't currently do?

-Scott

#2 lore raw
In reply to Deepak Gaur

Hello Deepak,

Quoted 7 lines · On Tue, 25 Sep 2007 17:33:59 +0630 Deepak Gaur wrote:

Hi all,

I am writing a kernel module which is required to parse the characters received from a device attached to MPC8560 SCC2 (UART slave mode) on serial interface. This SCC is required to be configured for single-buffer, character based operation. Moreover on another SCC (SCC1 UART master mode) the board debug interface(console) is connected.

Quoted 8 lines

While trying to figure out CPM UART device driver interface available in file drivers/serial/cpm_uart/cpm_uart_core.c for my kernel module I found that some of the functions are available when CPM_UART_CONSOLE is enabled.

My doubt is regarding status of this flag for my hardware setup. Should this flag be enabled or not. If it is required to be enabled for supporting SCC1 then how SCC2 will be handled?

well, console is normally initialized early, before actual uart driver, that's why those bits are hidden behind CPM_UART_CONSOLE.

I suppose you'll just have to get SCC2 uart to work and use ttyCPM1... or if you application is more specific, write another driver
using cpm_uart_core.c as a reference. But I would not recommend using CPM_UART_CONSOLE stuff - it's pretty restricted and assumes very early triggering, with plenty of stuff not initialized.

Quoted 11 lines

As I am a novice in this area , I shall be grateful if you please guide me in understanding this driver code.

with regards,

Deepak Gaur

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Signature · 1 line
Sincerely, Vitaly
#3 lore raw

CPM_UART_CONSOLE

In reply to Deepak Gaur

Hi all,

I am writing a kernel module which is required to parse the characters received from a device attached to MPC8560 SCC2 (UART slave mode) on serial interface. This SCC is required to be configured for single-buffer, character based operation. Moreover on another SCC (SCC1 UART master mode) the board debug interface(console) is connected.

While trying to figure out CPM UART device driver interface available in file (Linux ppc) ./drivers/serial/cpm_uart/cpm_uart_core.c for my kernel module I found that some of the functions are available when CPM_UART_CONSOLE is enabled.

My doubt is regarding status of this flag for my hardware setup. Should this flag be enabled or not. If it is required to be enabled for supporting SCC1 then how SCC2 will be handled?

As I am a novice in this area , I shall be grateful if you please guide me in understanding this driver code.

with regards,

Deepak Gaur