Baud rate problems with the EST SBC8260 board
Yesterday afternoon, I pulled down the Linux 2.3 Bitkeeper tree with rsync.
rsync -avz --delete hq.fsmlabs.com::linuxppc_2_3 linuxppc_2_3
This pile of bits includes Dan Malek ([email protected]) MPC8260 port for the EST SBC8260 board. I configured the kernel, but ran into problems with arch/ppc/kernel/ppc_ksyms.c referencing things that don't exist. I remove the items that were giving me grief, but this was only a quick hack. A longer term solution would make them configureable, so they don't get in the way.
dell 110} rcsdiff -r1.1 -c arch/ppc/kernel/ppc_ksyms.c
===================================================================
RCS file: arch/ppc/kernel/RCS/ppc_ksyms.c,v retrieving revision 1.1
diff -c -r1.1 arch/ppc/kernel/ppc_ksyms.c
*** arch/ppc/kernel/ppc_ksyms.c 2000/04/26 14:26:56 1.1
--- arch/ppc/kernel/ppc_ksyms.c 2000/04/26 14:57:28
***************
*** 81,91 ****
EXPORT_SYMBOL(kernel_flag);
#endif /* __SMP__ */
- #if !defined(CONFIG_4xx) && !defined(CONFIG_8xx)
- EXPORT_SYMBOL(isa_io_base);
- EXPORT_SYMBOL(isa_mem_base);
- EXPORT_SYMBOL(pci_dram_offset);
- #endif
EXPORT_SYMBOL(ISA_DMA_THRESHOLD); EXPORT_SYMBOL(DMA_MODE_READ); EXPORT_SYMBOL(DMA_MODE_WRITE);
--- 81,86 ----
***************
*** 263,279 ****
EXPORT_SYMBOL(xmon);
#endif
EXPORT_SYMBOL(down_read_failed);
-
- extern void (*debugger)(struct pt_regs *regs);
- extern int (*debugger_bpt)(struct pt_regs *regs);
- extern int (*debugger_sstep)(struct pt_regs *regs);
- extern int (*debugger_iabr_match)(struct pt_regs *regs);
- extern int (*debugger_dabr_match)(struct pt_regs *regs);
- extern void (*debugger_fault_handler)(struct pt_regs *regs); -
- EXPORT_SYMBOL(debugger);
- EXPORT_SYMBOL(debugger_bpt);
- EXPORT_SYMBOL(debugger_sstep);
- EXPORT_SYMBOL(debugger_iabr_match);
- EXPORT_SYMBOL(debugger_dabr_match);
- EXPORT_SYMBOL(debugger_fault_handler);
--- 258,260 ----
I was able to compile and link the Linux kernel, but when I ran it on the EST SBC8260 board the baud rate appeared to be wrong. A few characters were appearing, but they appeared to be random noise.
I have a few questions concerning the serial console port configuration:
- What serial port is used for the console? I am assuming that is SMC1.
The comments in arch/ppc/mbxboot/m8260_tty.c, indicate the console is on SMC1. Who calls serial_init? It doesn't appear to get called from head_8260.S?
Are you relying on the monitor do this initialization for you?
We are using the VxWorks BSP monitor, is this what is being used by Dan Malek?
CPU: EST Corp. est8260 -- MPC8260 PowerQUICC II SBC
Version: 5.4
BSP version: 1.2/3
In
http://lists.linuxppc.org/listarcs/linuxppc-embedded/200004/msg00158.html
Dan talks about
"MontaVista has a boot rom with minimal debug support." Is this different from the VxWorks BSP monitor?
- What is the baud rate of the console port?
- What is the speed of the crystal on SBC8260 board? 25 Mhz, 33Mhz, or 50 Mhz?
- What clock multiplier are you using for the CPM?
Kernel .config file:
#
# Automatically generated make config: don't edit
#
# CONFIG_UID16 is not set
#
# Code maturity level options
#CONFIG_EXPERIMENTAL=y
#
# Platform support
#CONFIG_PPC=y
# CONFIG_6xx is not set
# CONFIG_4xx is not set
# CONFIG_PPC64 is not setCONFIG_8260=y
# CONFIG_8xx is not set
CONFIG_6xx=yCONFIG_SERIAL_CONSOLE=y
# CONFIG_ALL_PPC is not set
# CONFIG_GEMINI is not setCONFIG_EST8260=y
# CONFIG_APUS is not set
# CONFIG_ALL_PPC is not set
# CONFIG_SMP is not set
# CONFIG_ALTIVEC is not setCONFIG_MACH_SPECIFIC=y
#
# Loadable module support
#CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not setCONFIG_KMOD=y
#
# General setup
#
# CONFIG_ISA is not set
# CONFIG_SBUS is not set
# CONFIG_PCI is not setCONFIG_NET=yCONFIG_SYSCTL=yCONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not setCONFIG_KCORE_ELF=yCONFIG_BINFMT_ELF=yCONFIG_KERNEL_ELF=yCONFIG_BINFMT_MISC=y
# CONFIG_HOTPLUG is not set
# CONFIG_PCMCIA is not set
#
# Parallel port support
#
# CONFIG_PARPORT is not set
# CONFIG_VGA_CONSOLE is not set
# CONFIG_FB is not set
# CONFIG_PMAC_PBOOK is not set
# CONFIG_MAC_FLOPPY is not set
# CONFIG_MAC_SERIAL is not set
# CONFIG_ADB is not set
# CONFIG_PROC_DEVICETREE is not set
# CONFIG_BOOTX_TEXT is not set
# CONFIG_MOTOROLA_HOTSWAP is not set
#
# Plug and Play configuration
#
# CONFIG_PNP is not set
#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
#
# Additional Block Devices
#CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_LVM is not set
# CONFIG_BLK_DEV_MD is not setCONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_INITRD=y
#
# Networking options
#CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not setCONFIG_NETLINK=y
# CONFIG_RTNETLINK is not set
# CONFIG_NETLINK_DEV is not set
# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not setCONFIG_UNIX=yCONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not setCONFIG_IP_PNP=y
# CONFIG_IP_PNP_BOOTP is not setCONFIG_IP_PNP_RARP=y
# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not setCONFIG_IP_ALIAS=y
# CONFIG_SYN_COOKIES is not set
#
# (it is safe to leave these untouched)
#CONFIG_SKB_LARGE=y
# CONFIG_IPV6 is not set
# CONFIG_KHTTPD is not set
# CONFIG_ATM is not set
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_DECNET is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_BRIDGE is not set
# CONFIG_LLC is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
#
# ATA/IDE/MFM/RLL support
#
# CONFIG_IDE is not set
# CONFIG_BLK_DEV_IDE_MODES is not set
# CONFIG_BLK_DEV_HD is not set
#
# SCSI support
#
# CONFIG_SCSI is not set
#
# Network device support
#CONFIG_NETDEVICES=y
#
# ARCnet devices
#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_ETHERTAP is not set
# CONFIG_NET_SB1000 is not set
#
# Ethernet (10 or 100Mbit)
#CONFIG_NET_ETHERNET=y
# CONFIG_MACE is not set
# CONFIG_BMAC is not set
# CONFIG_GMAC is not set
# CONFIG_NCR885E is not set
# CONFIG_OAKNET is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
# CONFIG_NET_ISA is not set
# CONFIG_NET_PCI is not set
# CONFIG_NET_POCKET is not set
#
# Ethernet (1000 Mbit)
#
# CONFIG_YELLOWFIN is not set
# CONFIG_ACENIC is not set
# CONFIG_SK98LIN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set
#
# Token Ring devices
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# IrDA (infrared) support
#
# CONFIG_IRDA is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Console drivers
#
#
# Frame-buffer support
#
# CONFIG_FB is not set
#
# Character devices
#
# CONFIG_VT is not set
# CONFIG_SERIAL is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not setCONFIG_UNIX98_PTYS=yCONFIG_UNIX98_PTY_COUNT=256
#
# I2C support
#
# CONFIG_I2C is not set
#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set
#
# Joysticks
#
# CONFIG_JOYSTICK is not set
# CONFIG_QIC02_TAPE is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
#
# Video For Linux
#
# CONFIG_VIDEO_DEV is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_DRM is not set
# CONFIG_AGP is not set
#
# File systems
#
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_FAT_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_RAMFS is not set
# CONFIG_ISO9660_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_HPFS_FS is not setCONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not setCONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_ROMFS_FS is not setCONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_UDF_FS is not set
# CONFIG_UFS_FS is not set
#
# Network File Systems
#
# CONFIG_CODA_FS is not setCONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not setCONFIG_ROOT_NFS=y
# CONFIG_NFSD is not setCONFIG_SUNRPC=yCONFIG_LOCKD=y
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not setCONFIG_MSDOS_PARTITION=y
# CONFIG_NLS is not set
#
# Sound
#
# CONFIG_SOUND is not set
#
# MPC8260 Communication Options
#CONFIG_SCC_ENET=yCONFIG_SCC1_ENET=y
# CONFIG_FCC_ENET is not set
#
# USB support
#
# CONFIG_USB is not set
#
# Kernel hacking
#
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_KGDB is not set
# CONFIG_XMON is not set
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 3 lines · diekema_jon
..... I configured the kernel, but ran into
problems witharch/ppc/kernel/ppc_ksyms.creferencing things that don't exist.
You probably configured way too much into the kernel. You have to turn of almost everything but the bare essentials. Just like the 8xx, do not configure any serial ports, VTs, or things like that.
Quoted 2 lines
- What serial port is used for the console? I am assuming that is SMC1.
Yes, SMC1.
Quoted 2 lines
.... Who calls
serial_init? It doesn't appear to get called fromhead_8260.S?
The decompress_kernel in misc.c.
Quoted 1 line
Are you relying on the monitor do this initialization for you?
No.
Quoted 2 lines
We are using the VxWorks BSP monitor, is this what is being used by Dan Malek?
The MontaVista custom ROM.
Quoted 2 lines
"MontaVista has a boot rom with minimal debug support." Is this different from the VxWorks BSP monitor?
Absolutely. How could I possibly use the VxWorks monitor in any product?
Quoted 1 line
- What is the baud rate of the console port?
115200. Take a look at embed_config.c
Quoted 2 lines
- What is the speed of the crystal on SBC8260 board? 25 Mhz, 33Mhz, or 50 Mhz?
33 Mhz.
Quoted 1 line
- What clock multiplier are you using for the CPM?
I don't remember. I think it was clock mode 0010_011, which would be 133 MHz CPM and 166 MHz core. This is all pretty simple. Just pick your own clock speed and set the board descriptor in embed_config.c to match it.
Quoted 5 lines
CONFIG_IP_PNP=y
#CONFIG_IP_PNP_BOOTPis not setCONFIG_IP_PNP_RARP=y
You really ought to run BOOTP and not RARP......
Everything else looks fine. Did you build this kernel from scratch (i.e. 'make mrproper' before 'make config')?
I'll check it again....
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Quoted 6 lines
From: Dan Malek <[email protected]>
You probably configured way too much into the kernel. You have to turn of almost everything but the bare essentials. Just like the 8xx, do not configure any serial ports, VTs, or things like that.
I looked for a default EST8260 configuration file in arch/ppc/configs, but didn't find anything. Could a est8260_defconfig file be created? I am look for something that contains a valid MPC8260 Linux configuration for the EST SBC8260 board?
Dan Malek mentioned that he is using the MontaVista custom ROM (monitor). Is this monitor available? If so, under what terms? Is the GPL'ed? Does MontaVista offer it for sale, or is it part of the MontaVista Linux subscription plan?
Quoted 1 line
How could I possibly use the VxWorks monitor in any product?
EST offers the VxWorks monitor for $1500. There are no royalties, and the source code is provided except for the miiLib and motFccEnd files. The VxWorks monitor is able to boot off the network, so it is possible to pull down a Linux image and load it.
Other than the MontaVista custom ROM and the VxWorks monitor, do you know of any other options for a MPC8260 monitor? At a bare minimum we need to:
- Initialize the EST SBC8260 hardware enough to run Linux
- Automatically transfer control to a configurable address.
Options I have looked at:
- 8xxrom, http://www.solutions4linux.de/powerpc.html
This has promise, but it needs to be worked for the MPC8260
- Linux Boot Project, http://ppcboot.sourceforge.net/
The 8xxrom effort is being reborn, but the web site is only a place holder.
- Neil Russell <[email protected]> mentioned in
http://lists.linuxppc.org/cgi-bin/wilma/wilma_hiliter/linuxppc-embedded/199911/msg00089.html
that he is working on a PPC loader. I believe that Neil Russell has something that runs on a EST SBC8260 board, but it isn't available under a public license. I wonder if this changed since limon-1.1 dated 3/21/2000?
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Need CPM clock >= 100 Mhz for fast ethernet operation
In reply to Dan MalekQuoted 4 lines
From: Dan Malek <[email protected]>
Organization: Embedded Edge, LLC
Quoted 8 lines
Quoted 1 line · diekema_jon
- What clock multiplier are you using for the CPM?
I don't remember. I think it was clock mode 0010_011, which would be 133 MHz CPM and 166 MHz core. This is all pretty simple. Just pick your own clock speed and set the board descriptor in
embed_config.cto match it.
In order for fast Ethernet to work reliably, the CPM clock needs to be
Quoted 1 line
= 100 Mhz.
If the CPM clock is 66 Mhz, then about 1 of 5-20 Tx packets will get dropped. It also appears that Rx has precedence over Tx. We are guessing that the CPM runs out of cycles at 66 Mhz while trying to support fast ethernet.
dell 143} rcsdiff -r1.1 -u arch/ppc/mbxboot/embed_config.c
===================================================================
RCS file: arch/ppc/mbxboot/RCS/embed_config.c,v retrieving revision 1.1
ppc/mbxboot/embed_config.c 2000/05/02 21:57:02 renamed from ppc/mbxboot/embed_config.c 2000/04/27 13:37:13 1.1 +7 -7
@@ -25,7 +25,7 @@ */ static ushort def_enet_addr[] = { 0x0800, 0x3e26, 0x1559 }; -#if defined(CONFIG_RPXLITE) || defined(RPX_CLASSIC) +#if defined(CONFIG_RPXLITE) || defined(CONFIG_RPXCLASSIC) static void rpx_eth(bd_t *bd, u_char *cp); static void rpx_brate(bd_t *bd, u_char *cp);
@@ -236,12 +236,12 @@ * here for those people that may load the kernel with * a JTAG/COP tool and not the rom monitor. */ - bd->bi_baudrate = 115200; - bd->bi_intfreq = 200; - bd->bi_busfreq = 66; - bd->bi_cpmfreq = 66; - bd->bi_brgfreq = 33; - bd->bi_memsize = 16 * 1024 * 1024; + bd->bi_baudrate = 19200; + bd->bi_intfreq = 165; + bd->bi_busfreq = 33; + bd->bi_cpmfreq = 132; + bd->bi_brgfreq = bd->bi_cpmfreq / 2; /* BRGCLK = (CPM*2/4) */ + bd->bi_memsize = 16 * 1024 * 1024; #endif cp = (u_char *)def_enet_addr;
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Re: Need CPM clock >= 100 Mhz for fast ethernet operation
Quoted 13 lines · diekema_jon
Quoted 4 lines
From: Dan Malek <[email protected]>
Organization: Embedded Edge, LLCQuoted 8 lines
Quoted 1 line · diekema_jon
- What clock multiplier are you using for the CPM?
I don't remember. I think it was clock mode 0010_011, which would be 133 MHz CPM and 166 MHz core. This is all pretty simple. Just pick your own clock speed and set the board descriptor in
embed_config.cto match it.
Quoted 7 lines
In order for fast Ethernet to work reliably, the CPM clock needs to be
Quoted 1 line
= 100 Mhz.
If the CPM clock is 66 Mhz, then about 1 of 5-20 Tx packets will get dropped. It also appears that Rx has precedence over Tx. We are guessing that the CPM runs out of cycles at 66 Mhz while trying to support fast ethernet.
???
I didn't think the SCC could support fast ethernet at any clock speed,
thats why moto put the FEC (Fast Ethernet Controller) in the FEC, which supports fast ethernet at rates > 25Mhz (full duplex @ 40Mhz).
ron
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Re: Need CPM clock >= 100 Mhz for fast ethernet operation
In reply to diekema_jonQuoted 5 lines · diekema_jon
diff -u -r1.1
arch/ppc/mbxboot/embed_config.c* here for those people that may load the kernel with
* a JTAG/COP tool and not the rom monitor. */
Yeah, well, like the comment says, these are here for you to use when you don't initialize them in any other way. I'm not going to update the kernel sources because they will be different for everyone. I just stuffed some numbers for testing, change them to suit your needs.
You should have a boot rom, some NVRAM or I guess we could derive these numbers from the configuration registers when we know the external clock speed.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/