Mounting Compact Flash card under Linux on ppc823

2002-09-13 Thread Richard Jones

> In message  you wrote:
> >
> > I am using the Linux kernel from www.denx.de that has the version 2.4.4
> > (2002-08-09) with all the support for the 8xx pcmcia/direct etc... code.
> > When Linux boots (using NFS remote filesystem) it comes up and
> prints the
> > following:
> >
> > 
> > ...
> > Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.120:/ppcroot
> > nfsaddrs=19
> > 2.168.0.20:192.168.0.120 init=/bin/bash idebus=25
> > ide_setup: idebus=25PCMCIA slot B: phys mem e000...ec00 (size
> > 0c00)
> > Card ID: SST 48CF032 55LD017-A2 FW17-4C
> >  Fixed Disk Card
> >  IDE interface
> >  [silicon] [unique] [single] [sleep] [standby] [idle] [low power]
> > ...
> > 
> > ...
>
> This "more stuff deleted" would have been the interesting  part;  the
> kernel   will  tell  you  something  about  the  partition  table  it
> recognizes, or at least the device. So if you are  sure  your  device
> contains  a  valid partition table with at least one valid partition,
> you should have seen something like:
>
>   ...
>   hda: probing with STATUS(0x50) instead of ALTSTATUS(0x41)
>   hda: CF 128MB, ATA DISK drive
>   ide0 at 0xc7000320-0xc7000327,0xc3000106 on irq 13
>   hda: 250368 sectors (128 MB) w/16KiB Cache, CHS=978/8/32
>   Partition check:
>hda: hda1
>
> > and finally gives me a shell prompt.  In the above, the Kernel seems to
> > recognize the card as being an SST-based flash card.  All seems
> okay but the
> > IDE device does not appear in the /proc/devices listing.  Also, I can't
> > mount a filesystem (probably because the IDE doesn't seem to
> have installed
> > completely).  The card I am using has a DOS filesystem on it with a few
> > files that I added.  My /etc/fstab has the following entry:
> >
> > /dev/hda1   /mnt/flash  msdos   noauto,owner0 0
> >
> > Using make menuconfig, I set the following:
> > under IDE, ATA and ATAPI Block Devices:
> ><*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
> >[*]   MPC8xx IDE support
> >(8xx_PCCARD) Type of MPC8xx IDE interface
> > under File systems:
> ><*>  DOS FAT fs support
> ><*>MSDOS fs support
> ><*>  UMSDOS: Unix-like file system on top of standard MSDOS fs
> ><*>VFAT (Windows-95) fs support
> >
> > Questions:
> > - should the device really be hda1 ?
>
> Yes, most probably.
>
> > - is there something more that I forgot in my board config
> header file for
> > setting up pcmcia?
>
> No, I don't think so.
>
> My guess is that you forgot to enable any partition table support  in
> your Linux kernel. Make sure your config file contains:
>
>
>   CONFIG_IDE=y
>   CONFIG_BLK_DEV_IDE=y
>   CONFIG_BLK_DEV_IDEDISK=y
>   CONFIG_IDEDISK_MULTI_MODE=y
>   CONFIG_BLK_DEV_MPC8xx_IDE=y
>   CONFIG_BLK_DEV_IDE_MODES=y
> and
>   CONFIG_PARTITION_ADVANCED=y
>   CONFIG_MAC_PARTITION=y
>   CONFIG_MSDOS_PARTITION=y
>   CONFIG_NLS=y
>   CONFIG_NLS_DEFAULT="y"
>   CONFIG_NLS_ISO8859_1=y
>   CONFIG_NLS_ISO8859_15=y
>
> See  also  our   documentation   at   http://www.denx.de/re/DPLG.html
> especially  section  "7.  Advanced Topics" (7.3.2. PC Card Support in
> Linux).
>
> Wolfgang Denk
>

I checked these and made a couple of changes but to no avail.  Then I added
the following lines to my board configuration file that I copied from the
tqm8xx.h file:

/*
 * Definitions for IDE0 Interface
 */
#define IDE0_BASE_OFFSET  0
#define IDE0_DATA_REG_OFFSET (PCMCIA_MEM_SIZE + 0x320)
#define IDE0_ERROR_REG_OFFSET(2 * PCMCIA_MEM_SIZE + 0x320 + 1)
#define IDE0_NSECTOR_REG_OFFSET (2 * PCMCIA_MEM_SIZE + 0x320 + 2)
#define IDE0_SECTOR_REG_OFFSET  (2 * PCMCIA_MEM_SIZE + 0x320 + 3)
#define IDE0_LCYL_REG_OFFSET (2 * PCMCIA_MEM_SIZE + 0x320 + 4)
#define IDE0_HCYL_REG_OFFSET (2 * PCMCIA_MEM_SIZE + 0x320 + 5)
#define IDE0_SELECT_REG_OFFSET  (2 * PCMCIA_MEM_SIZE + 0x320 + 6)
#define IDE0_STATUS_REG_OFFSET  (2 * PCMCIA_MEM_SIZE + 0x320 + 7)
#define IDE0_CONTROL_REG_OFFSET 0x0106
#define IDE0_IRQ_REG_OFFSET  0x000A   /* not used   */

#define IDE0_INTERRUPT  13/* = SIU_LEVEL6 */


This was the clincher, the defined values I had did not have the 0x320
offsets factored in.  I also had the IDE0_INTERRUPT set to the wrong value.
Now with these changes all is well. I was able to successfully mount the
partition and see my files.

Thanks for all the help,

Richard Jones


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





FW: [linux-usb-devel] General USB Hub question and 832e question

2002-09-13 Thread Hihn Jason

FYI:

-Original Message-
From: Steve Calfee [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 12, 2002 8:42 PM
To: Hihn Jason
Subject: Re: [linux-usb-devel] General USB Hub question and 832e
question



At 10:57 PM 9/12/02 +0200, you wrote:
>I'm doing a design on a PPC 832e processor. Slave mode is known to work ok,
>but host mode is iffy. Apparently there is a issue with low-speed USB
>devices. I was wondering if anyone here could answer my question:
>
>If we were to go through a USB hub, would low-speed devices get converted
to
>high speed?
>
>Additionally your experiences with USB on the 823e (and 850) are welcome.
>
>Thank you for your time.
>
>
>

Hi I wrote a host for the 823 USB circuitry. The 823 usb stuff is just a
very marginal design and therefore a huge amount of work. A single function
host for an embedded system is reasonable, a general purpose host just will
not work with the built in circuitry. I recommend you use an external chip
for host mode.

There should not be a problem with low speed, the 823 would need to change
its bus clock from 1200 to 150. It needs to do this on a very tight
time frame, which is probably the problem..You would have to spin testing
the CPM after a SOF, so you know exactly when to change the clock. This is
just another of its marginal design features.

Hubs do not translate speeds, they prevent low speed devices from seeing
any high speed packets...SOF is sent as just a one bit pulse. The actual
data packets are just sent on through the hub at low speed. The host
actually sends the hub a special packet called a PRE PID, which tells it
and all other high speed devices that a low speed packet is coming.

Regards, Steve

__
Steve Calfee--  embedded systems consultant
stevecalfee at NOSPAMhotmail.com


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





Segmentation fault and 8260 vs 8264

2002-09-13 Thread Apostolos Meliones

Dear all,

We are working on two identical custom boards. The first one is powered by
MPC8260 (revision A.1, mask 1K22A), while in the second system MPC8260 is
replaced with MPC8264 (revision A.0, mask 2K25A). Both systems are running
Linux 2.4.7. MPC8264 is a new version of the MPC8260 PowerQuicc II
microprocessor. Actually, it is the same cpu with some ATM additions and
manufacturing technology at 0.25 microns. Quite unexpectedly, most of the
user space applications stored in our JFFS flashdisk or NFS filesystem
crash (yield a segmentation fault) when running on the 8264 board, while
working perfectly on the 8260 one.

The problem reveals from within arch/ppc/mm/fault.c. User mode accesses
cause a SIGSEGV signal from within the do_page_fault() function.

I would be grateful if someone of you guys could provide any help.

We feel that this problem might be relevant to a message posted to the list
by Ralph Blach, dated Apr 02, 2001. At that time, he asked the list about
what kind of errors are responsible for segmentation faults. Some days
later he reported himself that marking all user pages as user/read/write
in the kernel caused the segmentation faults at application layer.

What is your opinion?

Sincerely Yours

Apostol


Dr. Apostol Meliones
Ellemedia Technologies
223 Syngrou Ave., 17121, Athens, Greece
Tel: +30-10-9373095, Fax: +30-10-9370386


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





Problems with 2.4.20 and includes...

2002-09-13 Thread Steven Scholz

Hi there,

I just pulled the BITKEEPERs linuxppc_2_4_devel and have trouble building it:
...
ppc_8xx-gcc -D__KERNEL__ -I/opt/BITKEEPER/devel-2.4.20-pre6/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -I/opt/BITKEEPER/devel-2.4.20-pre6/arch/ppc -fsigned-char
-msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring   -nostdinc
-iwithprefix include -DKBUILD_BASENAME=sched  -fno-omit-frame-pointer -c -o
sched.o sched.c
In file included from /opt/BITKEEPER/devel-2.4.20-pre6/include/linux/wait.h:13,
 from /opt/BITKEEPER/devel-2.4.20-pre6/include/linux/fs.h:12,
 from
/opt/BITKEEPER/devel-2.4.20-pre6/include/linux/capability.h:17,
 from
/opt/BITKEEPER/devel-2.4.20-pre6/include/linux/binfmts.h:5,
 from /opt/BITKEEPER/devel-2.4.20-pre6/include/linux/sched.h:9,
 from /opt/BITKEEPER/devel-2.4.20-pre6/include/linux/mm.h:4,
 from sched.c:23:
/opt/BITKEEPER/devel-2.4.20-pre6/include/linux/kernel.h:10: stdarg.h: Datei oder
Verzeichnis nicht gefunden
...

scholz at pinguin:/opt/BITKEEPER/devel-2.4.20-pre6> locate stdarg.h
/opt/ELDK/ppc_8xx/usr/lib/gcc-lib/ppc-linux/2.95.3/include/stdarg.h
/opt/ELDK/usr/lib/gcc-lib/ppc-linux/2.95.3/include/stdarg.h

I am using the ELDK as build environment. 2.4.19 kernel compiled with no
problems!

I found the problem in the main Makefile:

---
@@ -261,7 +262,7 @@
 # 'kbuild_2_4_nostdinc :=' or -I/usr/include for kernel code and you are not
UML
 # then your code is broken!  KAO.

-kbuild_2_4_nostdinc:= -nostdinc -iwithprefix include
+kbuild_2_4_nostdinc:= -nostdinc $(shell $(CC) -print-search-dirs | sed -ne
's/install: \(.*\)/-I \1include/gp')
 export kbuild_2_4_nostdinc

 export CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL
---

After changing this line back to the old one (from 2.4.19) I can build the
kernel.

Could someone please explain to me what happend, why it happened and what I am
supposed to do about it (except changing this line to the old one)!?


Thanks a million,

Steven

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





Mounting Compact Flash card under Linux on ppc823

2002-09-13 Thread Rod Boyce

My only question is does /dev/hda1 exist in the device file system?

If this does not exist not amount of trying will get this to work.

Regards,
Rod Boyce

 -Original Message-
From:   Richard Jones [mailto:[EMAIL PROTECTED]
Sent:   Thursday, September 12, 2002 3:49 PM
To: linuxppc-embedded at lists.linuxppc.org
Subject:Mounting Compact Flash card under Linux on ppc823


Hello all,

I need help getting a compact flash card working on my system.

I am using a custom 823 board running ppcboot 1.1.6.  I have added support
for FAT file system here and have been able to load the linux kernel from a
compact flash card (meaning the pcmcia interface is configured and working
properly).  The problem I have is in getting Linux to recognize the IDE
interface properly and let me mount the drive.

I am using the Linux kernel from www.denx.de that has the version 2.4.4
(2002-08-09) with all the support for the 8xx pcmcia/direct etc... code.
When Linux boots (using NFS remote filesystem) it comes up and prints the
following:


...
Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.120:/ppcroot
nfsaddrs=19
2.168.0.20:192.168.0.120 init=/bin/bash idebus=25
ide_setup: idebus=25PCMCIA slot B: phys mem e000...ec00 (size
0c00)
Card ID: SST 48CF032 55LD017-A2 FW17-4C
 Fixed Disk Card
 IDE interface
 [silicon] [unique] [single] [sleep] [standby] [idle] [low power]
...

...
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 25MHz system bus speed for PIO modes
...

and finally gives me a shell prompt.  In the above, the Kernel seems to
recognize the card as being an SST-based flash card.  All seems okay but the
IDE device does not appear in the /proc/devices listing.  Also, I can't
mount a filesystem (probably because the IDE doesn't seem to have installed
completely).  The card I am using has a DOS filesystem on it with a few
files that I added.  My /etc/fstab has the following entry:

/dev/hda1   /mnt/flash  msdos   noauto,owner0 0

Using make menuconfig, I set the following:
under IDE, ATA and ATAPI Block Devices:
   <*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
   [*]   MPC8xx IDE support
   (8xx_PCCARD) Type of MPC8xx IDE interface
under File systems:
   <*>  DOS FAT fs support
   <*>MSDOS fs support
   <*>  UMSDOS: Unix-like file system on top of standard MSDOS fs
   <*>VFAT (Windows-95) fs support

Questions:
- should the device really be hda1 ?
- is there something more that I forgot in my board config header file for
setting up pcmcia?


Thanks & best regards,

Richard Jones
Nexus Technologies, Inc.
10 National Avenue
Fletcher NC 28748
(828) 681-2844 x22


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





Segmentation fault and 8260 vs 8264

2002-09-13 Thread Jean-Denis Boyer

This bug has been fixed in 2.4.11. in arch/ppc/kernel/cputable.c, line 172.

A bit was missing in the mask for the 82xx,
and the kernel could not recognized it was a 603e core.

I've got the same problem with my 8250.


Regards,

 Jean-Denis Boyer, B.Eng., Technical Leader
 Mediatrix Telecom Inc.
 4229 Garlock Street
 Sherbrooke (Qu?bec)
 J1L 2C8  CANADA
 (819)829-8749 x241


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





Kernel panic: No init found. Try passing init= option to kernel

2002-09-13 Thread zhongqx

Hello,
I want to use ramdisk instead of NFS for my linux on FADS860T which has 2M 
flash and 8M ram.I want to use eldk pakages to make ramdisk. but when i use it 
to boot linux ,it print the following message:

IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
enter ic_enable!
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 735k freed
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 56k init
Kernel panic: No init found.  Try passing init= option to kernel.


I am sure that /bin/sh exist.why linux can not execute it successfully? but 
when I use the simple-ramdisk.PPCBoot which i download frow 
file://ftp.denx.de:/pub/LinuxPPC/usr/src,it run well like following:


=>bootm 40 50
## Booting image at 0040 ...
   Image Name:   linux-2.4.18
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:525046 Bytes = 512 kB = 0 MB
   Load Address: 
   Entry Point:  
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
## Loading RAMDisk Image at 0050 ...
   Image Name:   myramdisk
   Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
   Data Size:572675 Bytes = 559 kB = 0 MB
   Load Address: 
   Entry Point:  
   Verifying Checksum ... OK
   Loading Ramdisk to 006cf000, end 0075ad03 ... OK
Linux version 2.4.18 (root at localhost.localdomain) (gcc version 2.95.3 
20010111 (
prerelease/franzo/20010111)) #2 Wed Sep 11 15:10:46 CST 2002
On node 0 totalpages: 2048
zone(0): 2048 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram
Decrementer Frequency = 18000/60
Calibrating delay loop... 47.82 BogoMIPS
Memory: 6132k available (948k kernel code, 348k data, 56k init, 0k highmem)
Dentry-cache hash table entries: 1024 (order: 1, 8192 bytes)
Inode-cache hash table entries: 512 (order: 0, 4096 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 2048 (order: 1, 8192 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
devfs: v1.10 (20020120) Richard Gooch (rgooch at atnf.csiro.au)
devfs: boot_options: 0x0
CPM UART driver version 0.03
ttyS00 at 0x0280 is a SMC
block: 64 slots per queue, batch=16
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
eth0: CPM ENET Version 0.2 on SCC1, 00:d0:93:00:12:34
eth1: FEC ENET Version 0.2, FEC irq 3, MII irq 4, addr 00:d0:93:80:12:34
loop: loaded (max 8 devices)
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
enter ic_enable!
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 559k freed
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 56k init
bash# ls
bin dev etc lib linuxrc lost+found
bash# cd bin
bash# ls
date  lssh
bash# date
Thu Jan  1 02:47:51 UTC 1970
bash# ls
date  lssh
bash# cd lib
init: lib: No such file or directory
bash# cd ..
bash# ls
bin dev etc lib linuxrc lost+found
bash# cd lib
bash# ls
ld.so.1  libcrypt.so.1libtermcap.so.2.0.8
libc-1.99.so libproc.so.1.2.6
libc.so.6libtermcap.so.2
bash# cd ..
bash# ls
bin dev etc lib linuxrc lost+found
bash#



Why Simple-ramdisk.PPCBoot is ok but My ramdisk.image is not ok,i cant find 
the diffrent from this two, ths sh program need libray all exist,why linux cant 
excute successfully?
Can someone give me help ? thank you in advanced!
Hope to get your help!

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





Mounting Compact Flash card under Linux on ppc823

2002-09-13 Thread Wolfgang Denk

In message  you wrote:
>
> I am using the Linux kernel from www.denx.de that has the version 2.4.4
> (2002-08-09) with all the support for the 8xx pcmcia/direct etc... code.
> When Linux boots (using NFS remote filesystem) it comes up and prints the
> following:
>
> 
> ...
> Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.120:/ppcroot
> nfsaddrs=19
> 2.168.0.20:192.168.0.120 init=/bin/bash idebus=25
> ide_setup: idebus=25PCMCIA slot B: phys mem e000...ec00 (size
> 0c00)
> Card ID: SST 48CF032 55LD017-A2 FW17-4C
>  Fixed Disk Card
>  IDE interface
>  [silicon] [unique] [single] [sleep] [standby] [idle] [low power]
> ...
> 
> ...

This "more stuff deleted" would have been the interesting  part;  the
kernel   will  tell  you  something  about  the  partition  table  it
recognizes, or at least the device. So if you are  sure  your  device
contains  a  valid partition table with at least one valid partition,
you should have seen something like:

...
hda: probing with STATUS(0x50) instead of ALTSTATUS(0x41)
hda: CF 128MB, ATA DISK drive
ide0 at 0xc7000320-0xc7000327,0xc3000106 on irq 13
hda: 250368 sectors (128 MB) w/16KiB Cache, CHS=978/8/32
Partition check:
 hda: hda1

> and finally gives me a shell prompt.  In the above, the Kernel seems to
> recognize the card as being an SST-based flash card.  All seems okay but the
> IDE device does not appear in the /proc/devices listing.  Also, I can't
> mount a filesystem (probably because the IDE doesn't seem to have installed
> completely).  The card I am using has a DOS filesystem on it with a few
> files that I added.  My /etc/fstab has the following entry:
>
> /dev/hda1   /mnt/flash  msdos   noauto,owner0 0
>
> Using make menuconfig, I set the following:
> under IDE, ATA and ATAPI Block Devices:
><*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
>[*]   MPC8xx IDE support
>(8xx_PCCARD) Type of MPC8xx IDE interface
> under File systems:
><*>  DOS FAT fs support
><*>MSDOS fs support
><*>  UMSDOS: Unix-like file system on top of standard MSDOS fs
><*>VFAT (Windows-95) fs support
>
> Questions:
> - should the device really be hda1 ?

Yes, most probably.

> - is there something more that I forgot in my board config header file for
> setting up pcmcia?

No, I don't think so.

My guess is that you forgot to enable any partition table support  in
your Linux kernel. Make sure your config file contains:


CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_BLK_DEV_MPC8xx_IDE=y
CONFIG_BLK_DEV_IDE_MODES=y
and
CONFIG_PARTITION_ADVANCED=y
CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="y"
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_15=y

See  also  our   documentation   at   http://www.denx.de/re/DPLG.html
especially  section  "7.  Advanced Topics" (7.3.2. PC Card Support in
Linux).

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
The following statement is not true.  The previous statement is true.

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





RamDisk

2002-09-13 Thread Aman

Hi All

I am using a PPC 440 evaluation Kit with openbios as the monitor code. I
have successfully download kernel image using the NFS. Now I want to create
a RAMDISK for the PPC 440. After which I want to download the RAMDISK and
the kernel image to the RAM. My question is, using the monitor
code(OpenBios), is it possible to download both the image ie RAMDISK and
Kernel image to the RAM.

Thanking you in advance

Regards
Aman


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