Req. help about SCC2 and SCC3 as ethernet.
Hello all.
I've been working on porting MontaVista Linux-2.2.13-7 kernel to our custom MPC850DE board.
Since 850DE support two ethernet interfaces at SCC2 and SCC3, we tried to make it work.
After some tweaking days, we can get serial on SMC1, port of 8xxrom-0.3.0 and Linux.
Linux comes up with default SCC2 ethernet and can mount NFS filesystem.
After such a success, we removed SCC2 and make SCC3 default ethernet ... then Linux hangs at serial_console_write.
Below are the port pin configuration of our board and code snippets from enet.c and uart.c
/*** SCC2 pin configuration ***/
Port A, 12 ---> Ether_TxD2
Port A, 13 ---> Ether_RxD2
Port A, 6 ---> Ether_TCLK2
Port A, 7 ---> Ether_RCLK2
Port C, 14 ---> RTS2 (TEN2)
Port C, 8 ---> CD2 (REN2)
Port C, 9 ---> CST2 (CLSN2)
/*** SCC3 pin configuration ***/
Port B, 30 ---> Ether_TxD3
Port B, 29 ---> Ether_RxD3
Port A, 4 ---> Ether_TCLK3
Port A, 5 ---> Ether_RCLK3
Port C, 13 ---> RTS3 (TEN3)
Port C, 4 ---> CD3 (REN3)
Port C, 5 ---> CST3 (CLSN3)
/*** SMC1 pin configuration ***/
Port B, 25 ---> SMTxD1
Port B, 24 ---> SMRxD1
/*** register set macros for SCC2, SCC3 and SMC1 from our code ***/ // Ethernet 1 for WAN side SCC3
#define PB_ENET1_RXD ((uint)0x00000004) #define PB_ENET1_TXD ((uint)0x00000002) #define PA_ENET1_TCLK ((ushort)0x0800) #define PA_ENET1_RCLK ((ushort)0x0400) #define PC_ENET1_TENA ((ushort)0x0004) #define PC_ENET1_CLSN ((ushort)0x0400) #define PC_ENET1_RENA ((ushort)0x0800)
// Ethernet 2 for Local side SCC2
#define PA_ENET2_RXD ((ushort)0x0004) #define PA_ENET2_TXD ((ushort)0x0008) #define PA_ENET2_TCLK ((ushort)0x0200) #define PA_ENET2_RCLK ((ushort)0x0100) #define PC_ENET2_TENA ((ushort)0x0002) #define PC_ENET2_CLSN ((ushort)0x0040) #define PC_ENET2_RENA ((ushort)0x0080)
// Serial SMC1
#define PB_SMC_SMTXD ((uint)0x00000040)
#define PB_SMC_SMRXD ((uint)0x00000080)
TCLK2,3 and RCLK2,3 are linked together.
Some kind people responded me that maybe it's a baud rate generator problem.
Anybody please help me.
Thanks in advance.
Have a nice day.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 1 line · Hyun-Joon Cha
After such a success, we removed SCC2 and make SCC3 default ethernet ... then Linux hangs at
serial_console_write.
How do you know that is where it stops? With SCC3, you are now trying to configure Port B, which is also used for the SMC1 configuration. Perhaps the console and kernel are working fine, and you just messed up the I/O pins for SMC1.
You will also need to make source code changes to enet.c, as it doesn't have a standard set of instructions for configuring port B as Ethernet control/data pins.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
----- Original Message -----
From: "Dan Malek" <[email protected]>
To: "Hyun-Joon Cha" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, July 27, 2000 11:00 PM
Subject: Re: Req. help about SCC2 and SCC3 as ethernet.
Quoted 1 line
How do you know that is where it stops?
We are currently using remote GDB with abatron BDI2000. In console_serial_write function, this function can't return any character....
Quoted 4 lines
With SCC3, you are now
trying to configure Port B, which is also used for the SMC1 configuration. Perhaps the console and kernel are working fine, and you just messed up the I/O pins for SMC1.
All pin assignments are correct, and during setting port B, we checked the pbpar,pbdir,pbodr also. nothing changed.
Quoted 3 lines
You will also need to make source code changes to
enet.c, as it doesn't have a standard set of instructions for configuring port B as Ethernet control/data pins.
We've changed all port configurations.
Quoted 4 lines
-- Dan
Do you have any code which enables SCC3 for ethernet on 850SAR?
Thank you
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/