Commit 79867ccf authored by Paul Mackerras's avatar Paul Mackerras

Merge bk://24.221.152.185/linux-2.5-misc

into samba.org:/home/paulus/kernel/for-linus-ppc
parents 07e51cb4 1e63878b
...@@ -22,3 +22,6 @@ CONFIG_SCC1_ENET ...@@ -22,3 +22,6 @@ CONFIG_SCC1_ENET
CONFIG_SCC2_ENET CONFIG_SCC2_ENET
Use MPC8xx serial communications controller 2 to drive Ethernet. Use MPC8xx serial communications controller 2 to drive Ethernet.
CONFIG_DCACHE_DISABLE
This option allows you to run the kernel with data cache disabled.
Say Y if you experience CPM lock-ups.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# MPC8260 Communication options # MPC8260 Communication options
# #
mainmenu_option next_comment mainmenu_option next_comment
comment 'MPC8260 Communication Options' comment 'MPC8260 CPM Options'
bool 'Enable SCC Console' CONFIG_SCC_CONSOLE bool 'Enable SCC Console' CONFIG_SCC_CONSOLE
if [ "$CONFIG_NET_ETHERNET" = "y" ]; then if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
bool 'CPM SCC Ethernet' CONFIG_SCC_ENET bool 'CPM SCC Ethernet' CONFIG_SCC_ENET
...@@ -30,4 +30,7 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then ...@@ -30,4 +30,7 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
fi fi
fi fi
fi fi
comment 'Generic MPC8260 Options'
bool 'Disable data cache' CONFIG_DCACHE_DISABLE
endmenu endmenu
...@@ -11,7 +11,11 @@ LD_ARGS = -T ../ld.script -Ttext 0x00400000 ...@@ -11,7 +11,11 @@ LD_ARGS = -T ../ld.script -Ttext 0x00400000
OBJS = ../common/crt0.o start.o main.o misc.o ../common/string.o image.o \ OBJS = ../common/crt0.o start.o main.o misc.o ../common/string.o image.o \
../common/ofcommon.o ../common/ofcommon.o
EXTRA_TARGETS := $(OBJS)
LIBS = $(TOPDIR)/lib/lib.a ../lib/zlib.a LIBS = $(TOPDIR)/lib/lib.a ../lib/zlib.a
# Utils
ADDNOTE = ../utils/addnote ADDNOTE = ../utils/addnote
PIGGYBACK = ../utils/piggyback PIGGYBACK = ../utils/piggyback
......
...@@ -15,6 +15,8 @@ CHRP_LD_ARGS = -T ../ld.script -Ttext 0x01000000 ...@@ -15,6 +15,8 @@ CHRP_LD_ARGS = -T ../ld.script -Ttext 0x01000000
COMMONOBJS = start.o misc.o ../common/string.o ../common/ofcommon.o COMMONOBJS = start.o misc.o ../common/string.o ../common/ofcommon.o
COFFOBJS = ../common/coffcrt0.o $(COMMONOBJS) coffmain.o COFFOBJS = ../common/coffcrt0.o $(COMMONOBJS) coffmain.o
CHRPOBJS = ../common/crt0.o $(COMMONOBJS) chrpmain.o CHRPOBJS = ../common/crt0.o $(COMMONOBJS) chrpmain.o
EXTRA_TARGETS := $(COFFOBJS) $(CHRPOBJS)
LIBS = $(TOPDIR)/lib/lib.a ../lib/zlib.a LIBS = $(TOPDIR)/lib/lib.a ../lib/zlib.a
MKNOTE := ../utils/mknote MKNOTE := ../utils/mknote
......
...@@ -30,6 +30,8 @@ LIBS = ../lib/zlib.a ...@@ -30,6 +30,8 @@ LIBS = ../lib/zlib.a
boot-$(CONFIG_SERIAL_CONSOLE) += ../common/ns16550.o boot-$(CONFIG_SERIAL_CONSOLE) += ../common/ns16550.o
boot-$(CONFIG_VGA_CONSOLE) += vreset.o kbd.o boot-$(CONFIG_VGA_CONSOLE) += vreset.o kbd.o
EXTRA_TARGETS := $(boot-y)
# Tools # Tools
MKPREP := ../utils/mkprep MKPREP := ../utils/mkprep
SIZE := ../utils/size SIZE := ../utils/size
......
...@@ -140,6 +140,7 @@ boot-$(CONFIG_GT64260_CONSOLE) += gt64260_tty.o ...@@ -140,6 +140,7 @@ boot-$(CONFIG_GT64260_CONSOLE) += gt64260_tty.o
boot-$(CONFIG_SERIAL) += ../common/ns16550.o boot-$(CONFIG_SERIAL) += ../common/ns16550.o
endif endif
EXTRA_TARGETS := $(boot-y)
LIBS := ../lib/zlib.a LIBS := ../lib/zlib.a
# Tools # Tools
......
...@@ -421,6 +421,7 @@ CONFIG_PARTITION_ADVANCED=y ...@@ -421,6 +421,7 @@ CONFIG_PARTITION_ADVANCED=y
CONFIG_SCC_ENET=y CONFIG_SCC_ENET=y
CONFIG_SCC1_ENET=y CONFIG_SCC1_ENET=y
# CONFIG_FEC_ENET is not set # CONFIG_FEC_ENET is not set
# CONFIG_DCACHE_DISABLE is not set
# #
# USB support # USB support
......
...@@ -1272,7 +1272,11 @@ _GLOBAL(__setup_cpu_generic) ...@@ -1272,7 +1272,11 @@ _GLOBAL(__setup_cpu_generic)
setup_common_caches: setup_common_caches:
mfspr r11,HID0 mfspr r11,HID0
andi. r0,r11,HID0_DCE andi. r0,r11,HID0_DCE
#ifdef CONFIG_DCACHE_DISABLE
ori r11,r11,HID0_ICE
#else
ori r11,r11,HID0_ICE|HID0_DCE ori r11,r11,HID0_ICE|HID0_DCE
#endif
ori r8,r11,HID0_ICFI ori r8,r11,HID0_ICFI
bne 1f /* don't invalidate the D-cache */ bne 1f /* don't invalidate the D-cache */
ori r8,r8,HID0_DCI /* unless it wasn't enabled */ ori r8,r8,HID0_DCI /* unless it wasn't enabled */
......
...@@ -88,11 +88,33 @@ typedef struct bd_info { ...@@ -88,11 +88,33 @@ typedef struct bd_info {
#define ISA_BRIDGE_INT SIU_IRQ3 /* All those PC things */ #define ISA_BRIDGE_INT SIU_IRQ3 /* All those PC things */
#define COMM_L_INT SIU_IRQ6 /* MBX Comm expansion connector pin */ #define COMM_L_INT SIU_IRQ6 /* MBX Comm expansion connector pin */
#define STOP_ABRT_INT SIU_IRQ7 /* Stop/Abort header pin */ #define STOP_ABRT_INT SIU_IRQ7 /* Stop/Abort header pin */
#endif /* !__ASSEMBLY__ */
/* CPM Ethernet through SCCx.
*
* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC1 use. The TCLK and RCLK seem unique
* to the MBX860 board. Any two of the four available clocks could be
* used, and the MPC860 cookbook manual has an example using different
* clock pins.
*/
#define PA_ENET_RXD ((ushort)0x0001)
#define PA_ENET_TXD ((ushort)0x0002)
#define PA_ENET_TCLK ((ushort)0x0200)
#define PA_ENET_RCLK ((ushort)0x0800)
#define PC_ENET_TENA ((ushort)0x0001)
#define PC_ENET_CLSN ((ushort)0x0010)
#define PC_ENET_RENA ((ushort)0x0020)
/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to
* SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
*/
#define SICR_ENET_MASK ((uint)0x000000ff)
#define SICR_ENET_CLKRT ((uint)0x0000003d)
/* The MBX uses the 8259. /* The MBX uses the 8259.
*/ */
#define NR_8259_INTS 16 #define NR_8259_INTS 16
#endif #endif /* !__ASSEMBLY__ */
#endif /* __MACH_MBX_DEFS */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
...@@ -94,11 +94,31 @@ extern bd_t m8xx_board_info; ...@@ -94,11 +94,31 @@ extern bd_t m8xx_board_info;
*/ */
#define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */ #define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */
#endif /* !__ASSEMBLY__ */
/* CPM Ethernet through SCCx.
*
* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC1 use.
*/
#define PA_ENET_RXD ((ushort)0x0001)
#define PA_ENET_TXD ((ushort)0x0002)
#define PA_ENET_TCLK ((ushort)0x0200)
#define PA_ENET_RCLK ((ushort)0x0800)
#define PB_ENET_TENA ((uint)0x00001000)
#define PC_ENET_CLSN ((ushort)0x0010)
#define PC_ENET_RENA ((ushort)0x0020)
/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to
* SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
*/
#define SICR_ENET_MASK ((uint)0x000000ff)
#define SICR_ENET_CLKRT ((uint)0x0000003d)
/* We don't use the 8259. /* We don't use the 8259.
*/ */
#define NR_8259_INTS 0 #define NR_8259_INTS 0
#endif #endif /* !__ASSEMBLY__ */
#endif /* __MACH_RPX_DEFS */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
...@@ -65,7 +65,6 @@ extern bd_t m8xx_board_info; ...@@ -65,7 +65,6 @@ extern bd_t m8xx_board_info;
#if defined(CONFIG_HTDMSOUND) #if defined(CONFIG_HTDMSOUND)
#include <platforms/rpxhiox.h> #include <platforms/rpxhiox.h>
#endif #endif
#endif /* !__ASSEMBLY__ */
/* define IO_BASE for pcmcia */ /* define IO_BASE for pcmcia */
#define _IO_BASE 0x80000000 #define _IO_BASE 0x80000000
...@@ -76,9 +75,27 @@ extern bd_t m8xx_board_info; ...@@ -76,9 +75,27 @@ extern bd_t m8xx_board_info;
# define request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id)) # define request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id))
#endif #endif
/* CPM Ethernet through SCCx.
*
* This ENET stuff is for the MPC850 with ethernet on SCC2. Some of
* this may be unique to the RPX-Lite configuration.
* Note TENA is on Port B.
*/
#define PA_ENET_RXD ((ushort)0x0004)
#define PA_ENET_TXD ((ushort)0x0008)
#define PA_ENET_TCLK ((ushort)0x0200)
#define PA_ENET_RCLK ((ushort)0x0800)
#define PB_ENET_TENA ((uint)0x00002000)
#define PC_ENET_CLSN ((ushort)0x0040)
#define PC_ENET_RENA ((ushort)0x0080)
#define SICR_ENET_MASK ((uint)0x0000ff00)
#define SICR_ENET_CLKRT ((uint)0x00003d00)
/* We don't use the 8259. /* We don't use the 8259.
*/ */
#define NR_8259_INTS 0 #define NR_8259_INTS 0
#endif #endif /* !__ASSEMBLY__ */
#endif /* __MACH_RPX_DEFS */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <asm/ppcboot.h> #include <asm/ppcboot.h>
#ifndef __ASSEMBLY__
#define SPD_IMMR_BASE 0xFFF00000 /* phys. addr of IMMR */ #define SPD_IMMR_BASE 0xFFF00000 /* phys. addr of IMMR */
#define SPD_IMAP_SIZE (64 * 1024) /* size of mapped area */ #define SPD_IMAP_SIZE (64 * 1024) /* size of mapped area */
...@@ -61,9 +62,34 @@ ...@@ -61,9 +62,34 @@
#define IDE1_CONTROL_REG_OFFSET 0x0106 #define IDE1_CONTROL_REG_OFFSET 0x0106
#define IDE1_IRQ_REG_OFFSET 0x000A /* not used */ #define IDE1_IRQ_REG_OFFSET 0x000A /* not used */
/* CPM Ethernet through SCCx.
*
* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC2 use.
*/
#define PA_ENET_MDC ((ushort)0x0001) /* PA 15 !!! */
#define PA_ENET_MDIO ((ushort)0x0002) /* PA 14 !!! */
#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */
#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
#define PC_ENET_RESET ((ushort)0x0100) /* PC 7 !!! */
/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK2) to
* SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
*/
#define SICR_ENET_MASK ((uint)0x0000ff00)
#define SICR_ENET_CLKRT ((uint)0x00002E00)
/* We don't use the 8259. /* We don't use the 8259.
*/ */
#define NR_8259_INTS 0 #define NR_8259_INTS 0
#endif /* !__ASSEMBLY__ */
#endif /* __ASM_SPD8XX_H__ */ #endif /* __ASM_SPD8XX_H__ */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
* Copyright (c) 1999,2000,2001 Wolfgang Denk (wd@denx.de) * Copyright (c) 1999,2000,2001 Wolfgang Denk (wd@denx.de)
*/ */
#ifdef __KERNEL__
#ifndef __MACH_TQM8xx_H #ifndef __MACH_TQM8xx_H
#define __MACH_TQM8xx_H #define __MACH_TQM8xx_H
...@@ -14,6 +15,7 @@ ...@@ -14,6 +15,7 @@
#include <asm/ppcboot.h> #include <asm/ppcboot.h>
#ifndef __ASSEMBLY__
#define TQM_IMMR_BASE 0xFFF00000 /* phys. addr of IMMR */ #define TQM_IMMR_BASE 0xFFF00000 /* phys. addr of IMMR */
#define TQM_IMAP_SIZE (64 * 1024) /* size of mapped area */ #define TQM_IMAP_SIZE (64 * 1024) /* size of mapped area */
...@@ -47,8 +49,106 @@ ...@@ -47,8 +49,106 @@
#define IDE0_INTERRUPT 13 #define IDE0_INTERRUPT 13
/*-----------------------------------------------------------------------
* CPM Ethernet through SCCx.
*-----------------------------------------------------------------------
*
*/
/*** TQM823L, TQM850L ***********************************************/
#if defined(CONFIG_TQM823L) || defined(CONFIG_TQM850L)
/* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC1 use.
*/
#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
* SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
*/
#define SICR_ENET_MASK ((uint)0x0000ff00)
#define SICR_ENET_CLKRT ((uint)0x00002600)
#endif /* CONFIG_TQM823L, CONFIG_TQM850L */
/*** TQM860L ********************************************************/
#ifdef CONFIG_TQM860L
/* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC1 use.
*/
#define PA_ENET_RXD ((ushort)0x0001) /* PA 15 */
#define PA_ENET_TXD ((ushort)0x0002) /* PA 14 */
#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
#define PC_ENET_TENA ((ushort)0x0001) /* PC 15 */
#define PC_ENET_CLSN ((ushort)0x0010) /* PC 11 */
#define PC_ENET_RENA ((ushort)0x0020) /* PC 10 */
/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
* SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
*/
#define SICR_ENET_MASK ((uint)0x000000ff)
#define SICR_ENET_CLKRT ((uint)0x00000026)
#endif /* CONFIG_TQM860L */
/*** FPS850L *********************************************************/
#ifdef CONFIG_FPS850L
/* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC1 use.
*/
#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
#define PC_ENET_TENA ((ushort)0x0002) /* PC 14 */
#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to
* SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
*/
#define SICR_ENET_MASK ((uint)0x0000ff00)
#define SICR_ENET_CLKRT ((uint)0x00002600)
#endif /* CONFIG_FPS850L */
/*** SM850 *********************************************************/
/* The SM850 Service Module uses SCC2 for IrDA and SCC3 for Ethernet */
#ifdef CONFIG_SM850
#define PB_ENET_RXD ((uint)0x00000004) /* PB 29 */
#define PB_ENET_TXD ((uint)0x00000002) /* PB 30 */
#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
#define PC_ENET_LBK ((ushort)0x0008) /* PC 12 */
#define PC_ENET_TENA ((ushort)0x0004) /* PC 13 */
#define PC_ENET_RENA ((ushort)0x0800) /* PC 4 */
#define PC_ENET_CLSN ((ushort)0x0400) /* PC 5 */
/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
* SCC3. Also, make sure GR3 (bit 8) and SC3 (bit 9) are zero.
*/
#define SICR_ENET_MASK ((uint)0x00FF0000)
#define SICR_ENET_CLKRT ((uint)0x00260000)
#endif /* CONFIG_SM850 */
/* We don't use the 8259. /* We don't use the 8259.
*/ */
#define NR_8259_INTS 0 #define NR_8259_INTS 0
#endif /* !__ASSEMBLY__ */
#endif /* __MACH_TQM8xx_H */ #endif /* __MACH_TQM8xx_H */
#endif /* __KERNEL__ */
...@@ -382,213 +382,6 @@ typedef struct scc_enet { ...@@ -382,213 +382,6 @@ typedef struct scc_enet {
ushort sen_taddrl; /* temp address (LSB) */ ushort sen_taddrl; /* temp address (LSB) */
} scc_enet_t; } scc_enet_t;
/*** MBX ************************************************************/
#ifdef CONFIG_MBX
/* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC1 use. The TCLK and RCLK seem unique
* to the MBX860 board. Any two of the four available clocks could be
* used, and the MPC860 cookbook manual has an example using different
* clock pins.
*/
#define PA_ENET_RXD ((ushort)0x0001)
#define PA_ENET_TXD ((ushort)0x0002)
#define PA_ENET_TCLK ((ushort)0x0200)
#define PA_ENET_RCLK ((ushort)0x0800)
#define PC_ENET_TENA ((ushort)0x0001)
#define PC_ENET_CLSN ((ushort)0x0010)
#define PC_ENET_RENA ((ushort)0x0020)
/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to
* SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
*/
#define SICR_ENET_MASK ((uint)0x000000ff)
#define SICR_ENET_CLKRT ((uint)0x0000003d)
#endif /* CONFIG_MBX */
/*** RPXLITE ********************************************************/
#ifdef CONFIG_RPXLITE
/* This ENET stuff is for the MPC850 with ethernet on SCC2. Some of
* this may be unique to the RPX-Lite configuration.
* Note TENA is on Port B.
*/
#define PA_ENET_RXD ((ushort)0x0004)
#define PA_ENET_TXD ((ushort)0x0008)
#define PA_ENET_TCLK ((ushort)0x0200)
#define PA_ENET_RCLK ((ushort)0x0800)
#define PB_ENET_TENA ((uint)0x00002000)
#define PC_ENET_CLSN ((ushort)0x0040)
#define PC_ENET_RENA ((ushort)0x0080)
#define SICR_ENET_MASK ((uint)0x0000ff00)
#define SICR_ENET_CLKRT ((uint)0x00003d00)
#endif /* CONFIG_RPXLITE */
/*** BSEIP **********************************************************/
#ifdef CONFIG_BSEIP
/* This ENET stuff is for the MPC823 with ethernet on SCC2.
* This is unique to the BSE ip-Engine board.
*/
#define PA_ENET_RXD ((ushort)0x0004)
#define PA_ENET_TXD ((ushort)0x0008)
#define PA_ENET_TCLK ((ushort)0x0100)
#define PA_ENET_RCLK ((ushort)0x0200)
#define PB_ENET_TENA ((uint)0x00002000)
#define PC_ENET_CLSN ((ushort)0x0040)
#define PC_ENET_RENA ((ushort)0x0080)
/* BSE uses port B and C bits for PHY control also.
*/
#define PB_BSE_POWERUP ((uint)0x00000004)
#define PB_BSE_FDXDIS ((uint)0x00008000)
#define PC_BSE_LOOPBACK ((ushort)0x0800)
#define SICR_ENET_MASK ((uint)0x0000ff00)
#define SICR_ENET_CLKRT ((uint)0x00002c00)
#endif /* CONFIG_BSEIP */
/*** RPXCLASSIC *****************************************************/
#ifdef CONFIG_RPXCLASSIC
/* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC1 use.
*/
#define PA_ENET_RXD ((ushort)0x0001)
#define PA_ENET_TXD ((ushort)0x0002)
#define PA_ENET_TCLK ((ushort)0x0200)
#define PA_ENET_RCLK ((ushort)0x0800)
#define PB_ENET_TENA ((uint)0x00001000)
#define PC_ENET_CLSN ((ushort)0x0010)
#define PC_ENET_RENA ((ushort)0x0020)
/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to
* SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
*/
#define SICR_ENET_MASK ((uint)0x000000ff)
#define SICR_ENET_CLKRT ((uint)0x0000003d)
#endif /* CONFIG_RPXCLASSIC */
/*** TQM823L, TQM850L ***********************************************/
#if defined(CONFIG_TQM823L) || defined(CONFIG_TQM850L)
/* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC1 use.
*/
#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
* SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
*/
#define SICR_ENET_MASK ((uint)0x0000ff00)
#define SICR_ENET_CLKRT ((uint)0x00002600)
#endif /* CONFIG_TQM823L, CONFIG_TQM850L */
/*** FPS850L *********************************************************/
#ifdef CONFIG_FPS850L
/* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC1 use.
*/
#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
#define PC_ENET_TENA ((ushort)0x0002) /* PC 14 */
#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
/* Control bits in the SICR to route TCLK (CLK2) and RCLK (CLK4) to
* SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
*/
#define SICR_ENET_MASK ((uint)0x0000ff00)
#define SICR_ENET_CLKRT ((uint)0x00002600)
#endif /* CONFIG_FPS850L */
/*** TQM860L ********************************************************/
#ifdef CONFIG_TQM860L
/* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC1 use.
*/
#define PA_ENET_RXD ((ushort)0x0001) /* PA 15 */
#define PA_ENET_TXD ((ushort)0x0002) /* PA 14 */
#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
#define PC_ENET_TENA ((ushort)0x0001) /* PC 15 */
#define PC_ENET_CLSN ((ushort)0x0010) /* PC 11 */
#define PC_ENET_RENA ((ushort)0x0020) /* PC 10 */
/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
* SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
*/
#define SICR_ENET_MASK ((uint)0x000000ff)
#define SICR_ENET_CLKRT ((uint)0x00000026)
#endif /* CONFIG_TQM860L */
/*** SPD823TS *******************************************************/
#ifdef CONFIG_SPD823TS
/* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC2 use.
*/
#define PA_ENET_MDC ((ushort)0x0001) /* PA 15 !!! */
#define PA_ENET_MDIO ((ushort)0x0002) /* PA 14 !!! */
#define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */
#define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */
#define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */
#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
#define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */
#define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */
#define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */
#define PC_ENET_RESET ((ushort)0x0100) /* PC 7 !!! */
/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK2) to
* SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero.
*/
#define SICR_ENET_MASK ((uint)0x0000ff00)
#define SICR_ENET_CLKRT ((uint)0x00002E00)
#endif /* CONFIG_SPD823TS */
/*** SM850 *********************************************************/
/* The SM850 Service Module uses SCC2 for IrDA and SCC3 for Ethernet */
#ifdef CONFIG_SM850
#define PB_ENET_RXD ((uint)0x00000004) /* PB 29 */
#define PB_ENET_TXD ((uint)0x00000002) /* PB 30 */
#define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */
#define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */
#define PC_ENET_LBK ((ushort)0x0008) /* PC 12 */
#define PC_ENET_TENA ((ushort)0x0004) /* PC 13 */
#define PC_ENET_RENA ((ushort)0x0800) /* PC 4 */
#define PC_ENET_CLSN ((ushort)0x0400) /* PC 5 */
/* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to
* SCC3. Also, make sure GR3 (bit 8) and SC3 (bit 9) are zero.
*/
#define SICR_ENET_MASK ((uint)0x00FF0000)
#define SICR_ENET_CLKRT ((uint)0x00260000)
#endif /* CONFIG_SM850 */
/*********************************************************************/
/* SCC Event register as used by Ethernet. /* SCC Event register as used by Ethernet.
*/ */
#define SCCE_ENET_GRA ((ushort)0x0080) /* Graceful stop complete */ #define SCCE_ENET_GRA ((ushort)0x0080) /* Graceful stop complete */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment