problem with watchdog/reboot MPC5200

2006-04-20 Thread Jaap-Jan Boor
Arno,

I think your problem is related to Intel Strataflash specifics.
After a write to strataflash, it remains in status mode until another
read (or reset) command is issued. This means you don't get the flash
contents when reading it, but a status bit (e.g. 0x8080 at every spot).
So when the processor start executing after a reset, it's not reading
proper instructions.

You first need to e.g. write a reset cmd (0x5050) to it or connect
the processor's hardreset line to the flash device.

Jaap-Jan

On Thu, 2006-04-20 at 11:46 +0200, Arno Geissel wrote:
 Hello all,
 
 I have a custom board based on MPC5200 processor running
 the latest linuxppc_2_4_devel.
 Everything is working fine until a flash write access is performed
 using MTD. After this a (soft) reboot stucks in mpc5xxx_restart()
 where the watchdog timer is charged and linux waits with closed
 interrupts until the MPC performs the reset. Only power off helps
 in this situation.
 It seems to me like a hardware problem, because the freescale
 MPC5200lite reference board does not run into this.
 The main difference of the custom board to the reference board
 is, that it is using 16MB Intel Strada Flash instead of AMD flash,
 which has an erase block size of 128kB.
 Has anybody else experienced such behaviour?
 
 Arno Geissel
 ___
 Linuxppc-embedded mailing list
 Linuxppc-embedded at ozlabs.org
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded
 
-- next part --
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 1513 bytes
Desc: not available
Url : 
http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060420/91c83c98/attachment.bin
 


NAND and JFFS2 supports in Linux 2.4

2006-04-11 Thread Jaap-Jan Boor
Laurent,

Take a look at the 2.4 http://www.denx.de kernel, it has NAND and jffs2
support.

Jaap-Jan

On 11-apr-2006, at 18:31, Laurent Lagrange wrote:


 Hello,

 I work on a custom 82xx board with a NAND flash :
 NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND  
 128MiB 3,3V
 8-bit)

 I have to KEEP a Linux 2.4 and can't migrate to a Linux 2.6 for  
 this board.

 This type of NAND flash and JFFS2 work fine with a Linux 2.6 but  
 with a
 Linux 2.4,
 this is a little tricky :
 Linux 2.4.18 or 2.4.25 do not support this device,
 Linux 2.4.31 seems supporting this device but JFFS2 is not adapted,
 Linux 2.4.32 does not support this device anymore.

 On www.linux-mtd.infradead.org, it seems that Linux 2.4 is no more
 supported.

 Any help would be welcome
 Thanks
 Laurent


 ___
 Linuxppc-embedded mailing list
 Linuxppc-embedded at ozlabs.org
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded

 -- 
 This message has been scanned for viruses and is believed to be clean



J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   jjboor at aimsys dot nl





How to quickly write cleanmarkers to jffs2 partitions?

2006-03-06 Thread Jaap-Jan Boor
On Fri, 2006-03-03 at 10:08 +0100, Mathieu Deschamps wrote:

 Hi,
 
 When preparing a flash partition for JFFS2, it is recommended to put 
 cleanmarkers to the erased blocks.
 This might be done my means of -j option of the flash_eraseall MTD 
 utility. Otherwise, JFFS2 will re-erase the blocks
 which contain all 0xFF and have no cleanmarker. This is an unneeded wasting 
 of 
 time.
 
 Source : http://www.linux-mtd.infradead.org/faq/jffs2.html
 
 does this may be relevant ?

This is correct, however flash_eraseall does also (as it's
name suggests, erase all flash blocks, which takes
some time on NOR flash. If you 'know' the flash is erased,
it's not needed.
I used flash_eraseall to write the cleanmarkers, but without
erasing blocks (and called that utility cleanmark)

Jaap-Jan

 
 
 
 Best Regards,
 
 
 Mathieu Deschamps.
 
 ___
 Linuxppc-embedded mailing list
 Linuxppc-embedded at ozlabs.org
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded
 
-- next part --
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 1513 bytes
Desc: not available
Url : 
http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060306/29f60e2c/attachment.bin
 


How to quickly write cleanmarkers to jffs2 partitions?

2006-03-02 Thread Jaap-Jan Boor
Hi David,

I indeed did write a small program that only writes the cleanmarkers
in all flash blocks used for jffs2. We assume (and check) all flash  
sectors
are erased already.

Jaap-Jan

On 2-mrt-2006, at 17:06, David Jander wrote:


 Hi,

 I was wondering if there is a trick or common technique I am  
 ignoring to make
 this more efficient:

 This is for a 2.4 kernel based system.
 In production we use either u-boot or a NFS mounted linux system to  
 erase
 flash and write jffs2 partitions to it. The jffs2 images are small  
 (not
 padded to full partition size to save programming time), but the  
 partitions
 are rather big (12 Mbyte in one case). Problem is that when booting  
 for the
 first time, one has to wait several minutes (during which the  
 system is more
 or less useless and busy) to get all cleanmarkers written to flash  
 by the
 jffs2 gc thread. This huge delay is rather unacceptable for  
 production, so we
 are looking for a work-around.

 One option would be to make jffs2 images that are padded to full  
 partition
 size, but that also isn't very efficient, considering the image is  
 only about
 100k in beginning and the partition is 12 Mbyte in size. That would  
 take a
 lot of time programming flash (less time than having the jffs2  
 driver fix
 this nevertheless).

 Another option is making a little program that writes cleanmarkers  
 in every
 eraseblock starting from the first completely empty one in a  
 partition before
 mounting that partition for the very first time after flashing.

 Since this seems to me like a common situation, I'd like to know if  
 anybody
 knows about a better solution, or if anybody has already dealt with  
 this
 before.

 Greetings,

 -- 
 David Jander
 Protonic Holland.
 tel.: +31 (0) 229 212928
 fax.: +31 (0) 229 210930
 Factorij 36 / 1689 AL Zwaag
 ___
 Linuxppc-embedded mailing list
 Linuxppc-embedded at ozlabs.org
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded

 -- 
 This message has been scanned for viruses and is believed to be clean



J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   jjboor at aimsys dot nl





PCI on MPC827x

2005-09-06 Thread Jaap-Jan Boor
We use it with 2.4.25. I think you should take a look at Wolfang Denx' 
2.4 kernel

Jaap-Jan

Alex Zeffertt wrote:

On Tue, 06 Sep 2005 16:45:15 +0400
Vitaly Bordug vbordug at ru.mvista.com wrote:

  

Alex Zeffertt wrote:


Hi list,

Does the linuxppc kernel support PCI on PowerQUICC II chips?  If so, in 
which patch/release was
it added?

  

The PCI bridge for 8272ADS has been added in 2.6.12-rc6. This stuff 
should work on PQ2FADS as well.


 
Thanks Vitaly.  Unfortunately we're using linux-2.4.25.

Has anybody backported the PCI bridge to 2.4?  If not, do you think it's a lot 
of work?

Alex
___
Linuxppc-embedded mailing list
Linuxppc-embedded at ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
  



-- 
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl




2.4.26 and MPC885 context switching time

2005-06-15 Thread Jaap-Jan Boor
I did once ran lmbench on a proprietry 850 based board running at  
62/31 Mhz
using 1 16-bit dram:

Context switching - times in microseconds - smaller is better
-
Host OS 2p/0K 2p/16K 2p/64K 8p/16K 8p/64K 16p/16K 16p/ 
64K
 ctxsw  ctxsw  ctxsw ctxsw  ctxsw   ctxsw
ctxsw
- - - -- -- -- -- ---  
---
testLinux 2.4.25- 259.2  234.2 302.6  304.7

This is ~ 3x faster then your 100Mhz 885...

Jaap-Jan

On 15-jun-2005, at 16:55, Schaefer-Hutter, Peter wrote:



 Hi all,

 i'm evaluating IPC on the MPC885ADS and discovered
 that the context switching times seem to be quite
 disappointing (up to 1ms). As we need to do a lot
 of IPC later on, i'm interested bringing the time
 down.

 Therefore i wonder, if there are any known problems
 with the MMU on 8xx and 2.4.2x which might explain
 that?

 Or is this the expected context switching time for
 CPU @ 100 MHz (RAM @ 50 MHz)? Suggestions for a
 benchmark program?

 Thanks!

   Peter
 ___
 Linuxppc-embedded mailing list
 Linuxppc-embedded at ozlabs.org
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded





J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   jjboor at aimsys dot nl







Dynamic libraries do not work

2005-05-27 Thread Jaap-Jan Boor
Theo,

What type of processor are you using? 8xx?
Did you build a tool-chain yourself and are
you perhaps using floating point?

Jaap-Jan

On 26-mei-2005, at 23:04, Theo Gjaltema wrote:

 Hello,

 I have a linux 2.4.20 kernel running, but the files in the ramdisk  
 fail to execute if they are dynamically build.
 The whole system stops (debuggers shows that it crashed while in an  
 erea where no flash/ram is present.
 Anyone an idea?
 There is nog difference between the use of a ramdisk or an nfs  
 mounted root filesystem.

 Greetings,
Theo.


 ___
 Linuxppc-embedded mailing list
 Linuxppc-embedded at ozlabs.org
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded



J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   jjboor at aimsys dot nl





ELDK/DENX: doesn't find iostream-lib when linking

2005-05-12 Thread Jaap-Jan Boor
Peter,

you should use g++ as compiler front end when compiling C++ programs
 compiler = ${CROSS_COMPILE}g++

best regards,

Jaap-Jan

On 12-mei-05, at 11:13, Peter Gehirnforce wrote:

 I use a makefile with dependencies:

 --
 # Makefile for simple test program
 # The CROSS_COMPILE is set globally, as well as ELDK gcc-paths

 compiler = ${CROSS_COMPILE}gcc
 simple_server_objects = ServerSocket.o Socket.o simple_server_main.o
 simple_client_objects = ClientSocket.o Socket.o simple_client_main.o


 all : Socket ServerSocket simple_server_main simple_server ClientSocket
 simple_c
 lient_main simple_client

 simple_server: $(simple_server_objects)
 $(compiler) -o simple_server $(simple_server_objects)


 simple_client: $(simple_client_objects)
 $(compiler) -o simple_client $(simple_client_objects)

 #ppc_gcc dependencies, added for compiling with ppc only!!
 Socket:
 $(compiler) -o Socket.o -c Socket.cpp

 ServerSocket: Socket.o
 $(compiler) -o ServerSocket.o -c ServerSocket.cpp

 ClientSocket: Socket.o
 $(compiler) -o ClientSocket.o -c ClientSocket.cpp

 simple_server_main: ServerSocket.o
 $(compiler) -o simple_server_main.o -c simple_server_main.cpp

 simple_client_main: ClientSocket.o
 $(compiler) -o simple_client_main.o -c simple_client_main.cpp

 clean:
 rm -f *.o simple_server simple_client
 

 The program itself is using string iostream and other STL libs with
 namespaces in use.
 It compiles for i686 on my host machine.
 BUT I had to change the Makefile!!! (that is why I posted it)
 The dependencies starting from gcc-ppc dependencies are added.
 Are they defined wrong?

 Peter

 --- Urspr?ngliche Nachricht ---
 Von: Wolfgang Denk wd at denx.de
 An: Peter Gehirnforce Gehirnmann at gmx.de
 Kopie: etux at embeddedtux.org
 Betreff: Re: ELDK/DENX: doesn't find iostream-lib when linking
 Datum: Thu, 12 May 2005 09:46:10 +0200

 In message 28918.1115882747 at www45.gmx.net you wrote:

 when compiling for ppc_6xx architecture, the linker doesn't find the
 lib's
 for iostream headers.
 Do I have to use other headers than the standard iostream ones, or 
 do
 they
 simply not exist?

 I guess this is a usage  error.  Can  you  please  provide  a  simple
 example which shows the problem?

 Best regards,

 Wolfgang Denk

 -- 
 Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
 Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
 What is research but a blind date with knowledge?  -- Will Harvey
 ___
 etux mailing list
 etux at embeddedtux.org
 http://www.embeddedtux.org/mailman/listinfo/etux


 -- 
 +++ Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS +++
 GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail
 ___
 Linuxppc-embedded mailing list
 Linuxppc-embedded at ozlabs.org
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded




[PATCH] Freescale Ethernet combined driver

2005-05-12 Thread Jaap-Jan Boor
Hi,

May be a little late (I'm trying to catch up on all mailing list mail)
but I was wondering if the io port handling functions I see now in 
these patches
should not be 'atomic'. So toggling MII pins does not interfere with 
toggling
e.g. I2C bit-bang interface pins when those pins happen to be on the 
same
port (A/B/C/D/E).

best regards,

Jaap-Jan




[PATCH] Freescale Ethernet combined driver

2005-05-12 Thread Jaap-Jan Boor
Ah, very good, thanks

Jaap-Jan

On 12-mei-05, at 12:43, Pantelis Antoniou wrote:

 Jaap-Jan

 All mii operations are done under a spinlock with interrupts disabled.

 Regards

 Pantelis




USB on 8250 PCI

2005-04-07 Thread Jaap-Jan Boor
What kernel version do you use?
In a 2.4 series kernel, you might check m8260_pcibios_fixup()
and probably set dev-irq ?

I don't know yet if this is the same in 2.6. I recently saw a lot of 
pci setup related changes in this mailing list.

Jaap-Jan

On 7-apr-05, at 8:23, Wojciech Kromer wrote:

 i still can't figure out is it a hardware or configuration problem,
 i can see all registers, drivers seems to work,
 it can detect device insert
 but there is no data transmision

 there are also no interrupts,
 i'm not sure what to write in interrupt_line in PCI config space

 any hints?

 =
 here is my dmesg part:

 ehci_hcd 00:1e.2: PCI device 1033:00e0
 ehci_hcd 00:1e.2: irq -20, pci mem c924b000
 usb.c: new USB bus registered, assigned bus number 1
 ehci_hcd 00:1e.2: ehci_start hcs_params 0x2385 dbg=0 cc=2 pcc=3 !ppc 
 ports=5
 ehci_hcd 00:1e.2: ehci_start portroute 1 0 1 0 0
 ehci_hcd 00:1e.2: ehci_start hcc_params e806 thresh 0 uframes 
 256/512/1024 park
 ehci_hcd 00:1e.2: capability 0001 at e8
 ehci_hcd 00:1e.2: reset command 080b02 park=3 ithresh=8 period=1024 
 Reset HALT
 PCI: 00:1e.2 PCI cache line size set incorrectly (0 bytes) by BIOS/FW, 
 correcting to 32
 ehci_hcd 00:1e.2: init command 010b09 park=3 ithresh=1 period=256 RUN
 ehci_hcd 00:1e.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4
 hcd.c: 00:1e.2 root hub device address 1
 usb.c: kmalloc IF c727f340, numif 1
 usb.c: new device strings: Mfr=3, Product=2, SerialNumber=1
 usb.c: USB device number 1 default language ID 0x0
 Manufacturer: Linux 2.4.19-dgt ehci_hcd
 Product: PCI device 1033:00e0
 SerialNumber: 00:1e.2
 hub.c: USB hub found
 hub.c: 5 ports detected
 hub.c: standalone hub
 hub.c: ganged power switching
 hub.c: individual port over-current protection
 hub.c: Single TT
 hub.c: TT requires at most 8 FS bit times
 hub.c: Port indicators are not supported
 hub.c: power on to power good time: 0ms
 hub.c: hub controller current requirement: 0mA
 hub.c: port removable status: R
 hub.c: local power source is good
 hub.c: no over-current condition exists
 hub.c: enabling power on all ports
 usb.c: hub driver claimed interface c727f340
 ehci_hcd 00:1e.2: GetStatus port 1 status 001803 POWER sig=j  CSC 
 CONNECT
 hub.c: port 1, portstatus 501, change 1, 480 Mb/s
 hub.c: port 1 connection change
 hub.c: port 1, portstatus 501, change 1, 480 Mb/s
 hub.c: port 1, portstatus 501, change 0, 480 Mb/s
 hub.c: port 1, portstatus 501, change 0, 480 Mb/s
 hub.c: port 1, portstatus 501, change 0, 480 Mb/s
 hub.c: port 1, portstatus 501, change 0, 480 Mb/s
 hub.c: port 1, portstatus 511, change 0, 480 Mb/s
 hub.c: port 1 of hub 1 not reset yet, waiting 10ms
 hub.c: port 1, portstatus 511, change 0, 480 Mb/s
 hub.c: port 1 of hub 1 not reset yet, waiting 10ms
 ehci_hcd 00:1e.2: port 1 full speed -- companion
 ehci_hcd 00:1e.2: GetStatus port 1 status 003801 POWER OWNER sig=j  
 CONNECT
 hub.c: port 1, portstatus 0, change 10, 12 Mb/s
 ehci_hcd 00:1e.2: free_config  devnum 0
 hub.c: port 2, portstatus 100, change 0, 12 Mb/s
 hub.c: port 3, portstatus 100, change 0, 12 Mb/s
 hub.c: port 4, portstatus 100, change 0, 12 Mb/s
 hub.c: port 5, portstatus 100, change 0, 12 Mb/s


 ___
 Linuxppc-embedded mailing list
 Linuxppc-embedded at ozlabs.org
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded




RTC with TQM823L

2005-03-17 Thread Jaap-Jan Boor
Can't you use a cpmtimer to fire every 10ms and wakeup a
high priority thread?

Jaap-Jan

On 17-mrt-05, at 8:47, Jean Nicollerat MD wrote:

 Hello,
 I need to have an interrup every 10ms in my application running in 
 linux.
 I have a PowerPC 823 on the board TQM823L LCD from denx.
 I use the ocan driver.
 I try to use the RTC modules but with the code :

   fd = open (/dev/rtc, O_RDONLY);

   if (fd ==  -1) {
   perror(/dev/rtc);
   }
   /* Turn on update interrupts (one per second) */

   retval = ioctl(fd, RTC_UIE_ON, 0);
   if (retval == -1) {
   perror(ioctl);
   //exit(errno);
   }

 I get an error message :
   ioctl : invalide argument # for then line :retval = ioctl(fd, 
 RTC_UIE_ON,
 0);

 Can somebody help ? why it is not working or a better way to get 
 function
 called each 10ms

 Thanks

 Jean

 ___
 Linuxppc-embedded mailing list
 Linuxppc-embedded at ozlabs.org
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded




Problems with MontaVista Linux on a Memec Virtex-II pro ff672 board

2005-03-17 Thread Jaap-Jan Boor
is there something printed before 'Now booting the kernel'?
If so, do the memory ranges not overlap or something?

Jaap-Jan

On 17-mrt-05, at 13:49, S. van Beek wrote:

 Hello there,
 ?
 This is our first post on this list, hi all!
 We're two Dutch students working with a Virtex-II pro ff672 board from 
 Memec with the Communications 2 module. We've compiled a simple kernel 
 wich comes with MontaVista Linux?3.1 (2.4.20) with ethernet and a 
 serial port. It mounts its root filesystem over NFS and everything 
 seems to work nicely. The next step we wanted to make was 
 adding?support for the Flash?on the com board. We added the IP to the 
 hardware and loaded the new bitstream in the FPGA. Next thing, we 
 enabled support for MTD devices in the kernel. After that, the kernel 
 did not seem to boot anymore. It stopped at the message 'Now booting 
 the kernel'. So we read some documentation about debugging. We 
 recompiled this kernel with the -g -ggdb options and removed the -O 
 (optimalization) flag. Then we did not even see the ppc boot loader 
 messages anymore when trying to boot. So we tried to compile the first 
 kernel (with only serial and ethernet support) -wich worked fine 
 before-?with debugging and it gave us the same result.. no output at 
 all.
  Can anyone give us some hints on what we can try more to find out 
 what is going wrong?
  ?
 Regards,
 Sander van Beek
 Daniel van Os
 ___
 Linuxppc-embedded mailing list
 Linuxppc-embedded at ozlabs.org
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded

J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl




Exception handling on mpc8xx cores

2004-12-08 Thread Jaap-Jan Boor
On Wed, 2004-12-08 at 05:15, Robin Gilks wrote:
 Greetings
 
 Any Freescale lurkers out there?
 
 The mpc866 manual implies that if the internal core times out an 
 external Transfer Acknowledge bus signal (by exerting the internally 
 generated Transfer Error Acknowledge signal) an exception is generated.
 
 I've tried extending the external TA signal well beyond 2040 clock 
 cycles the maximum timeout allows and I see the busses start up again 
 (indicationg that they are no longer waiting) but I don't see anything 
 on TEA and I don't get an exception thrown.
 
 Any clues? Manual error?, silicon error?, my brain error?

Did you enable the bus monitor in the SYPCR register?

Jaap-Jan

 
 Cheers
-- 
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl





problems on USB

2004-11-30 Thread Jaap-Jan Boor
Hi,

did you have a
none/proc/bus/usb  usbdevfs  defaults 0 0

entry in your fstab?

Jaap-Jan

On 30-nov-04, at 3:32, zhonglei wrote:

 hi
My system is Lite5200 with DENX Embedded Linux running on it.When I 
 tried to enable my USB port to use my u-disk,

 the problem occured.
I have enabled USB support with 'make xconfig'. The reports are as 
 follows:
 
   U-Boot 1.1.2 (Nov 12 2004 - 11:46:06)

 CPU:   MPC5200 v1.2 at 462 MHz
Bus 132 MHz, IPB 132 MHz, PCI 33 MHz
 Board: Motorola MPC5200 (IceCube)
 I2C:   85 kHz, ready
 DRAM:  64 MB
 FLASH: 16 MB
 PCI:   Bus Dev VenId DevId Class Int
 00  1a  1057  5803  0680  00
 In:serial
 Out:   serial
 Err:   serial
 Net:   FEC ETHERNET
 IDE:   Bus 0: OK
   Device 0: Model: Flash Card Firm: 2N3-0925 Ser#: CF
 Type: Removable Hard Disk
 Capacity: 123.0 MB = 0.1 GB (251904 x 512)
   Device 1: not available

 Autostarting.Press any key to abort..

 Hit any key to stop autoboot:  0
 Using FEC ETHERNET device
 TFTP from server 198.87.102.60; our IP address is 198.87.102.210
 Filename 'MPC5200/uImage'.
 Load address: 0x10
 Loading: 
 #
 ###
 ##
 done
 Bytes transferred = 857559 (d15d7 hex)
 ## Booting image at 0010 ...
Image Name:   Linux-2.4.25
Image Type:   PowerPC Linux Kernel Image (gzip compressed)
Data Size:857495 Bytes = 837.4 kB
Load Address: 
Entry Point:  
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
 Memory BAT mapping: BAT2=64Mb, BAT3=0Mb, residual: 0Mb
 Linux version 2.4.25 (root at 198.87.102.60.netdial.caribe.net) (gcc 
 version 3.2.24
 On node 0 totalpages: 16384
 zone(0): 16384 pages.
 zone(1): 0 pages.
 zone(2): 0 pages.
 Kernel command line: root=/dev/nfs rw 
 nfsroot=198.87.102.60:/home/zl/ELDK/ppc_8f
 Calibrating delay loop... 307.20 BogoMIPS
 Memory: 62212k available (1500k kernel code, 464k data, 76k init, 0k 
 highmem)
 Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
 Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
 Mount cache hash table entries: 512 (order: 0, 4096 bytes)
 Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
 Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
 POSIX conformance testing by UNIFIX
 PCI: Probing PCI hardware
 PCI: Cannot allocate resource region 0 of device 00:1a.0
 Linux NET4.0 for Linux 2.4
 Based upon Swansea University Computer Society NET3.039
 Initializing RT netlink socket
 Starting kswapd
 Journalled Block Device driver loaded
 JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
 pty: 256 Unix98 ptys configured
 ttyS0 on PSC1
 ttyS1 on PSC2
 ttyS2 on PSC3
 RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
 loop: loaded (max 8 devices)
 Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
 ide: Assuming 33MHz system bus speed for PIO modes; override with 
 idebus=xx
 Port Config is: 0x11050004
 ipb=132MHz, set clock period to 7
 GPIO config: 11050004
 ATA invalid: 0100
 ATA hostcnf: 0300
 ATA pio1   : 100a0a00
 ATA pio2   : 02040600
 XLB Arb cnf: a366
 mpc5xxx_ide: Setting up IDE interface ide0...
 ATA DMA task: 5
 Probing IDE interface ide0...
 hda: Flash Card, CFA DISK drive
 ide0 at 0xf0003a60-0xf0003a67,0xf0003a5c on irq 45
 hda: attached ide-disk driver.
 hda: 251904 sectors (129 MB) w/0KiB Cache, CHS=984/16/16
 Partition check:
  hda: hda1
 Icecube Bank 0: Found 1 x8 devices at 0x0 in 8-bit mode
 Icecube Bank 0: Found 1 x8 devices at 0x80 in 8-bit mode
  Amd/Fujitsu Extended Query Table at 0x0040
 Icecube Bank 0: CFI does not contain boot bank location. Assuming top.
 number of CFI chips: 2
 cfi_cmdset_0002: Disabling erase-suspend-program due to code 
 brokenness.
 Icecube flash bank 0: Using static image partition definition
 Creating 5 MTD partitions on Icecube Bank 0:
 0x-0x0080 : Spare
 0x0080-0x0090 : kernel
 0x0090-0x00c0 : initrd
 0x00c0-0x00f0 : jffs
 0x00f0-0x0100 : Firmware
 usb.c: registered new driver hub
 host/usb-ohci.c: USB OHCI at membase 0xf0001000, IRQ 44
 host/usb-ohci.c: usb-0, Built-In ohci
 usb.c: new USB bus registered, assigned bus number 1
 hub.c: USB hub found
 hub.c: 1 port detected
 NET4: Linux TCP/IP 1.0 for NET4.0
 eth0: Phy @ 0x0, type LXT971 (0x001378e2)
 IP Protocols: ICMP, UDP, TCP, IGMP
 IP: routing cache hash table of 512 buckets, 4Kbytes
 TCP: Hash tables configured (established 4096 bind 8192)
 eth0: config: auto-negotiation on, 100FDX, 100HDX, 10FDX, 10HDX.
 eth0: Waiting for the link to be up...
 eth0: status: link up, 100 Mbps Full Duplex, auto-negotiation complete.
 IP-Config: Complete:
   device=eth0, addr=198.87.102.210, mask=255.0.0.0, 
 gw=198.87.102.60,
  

problems on USB

2004-11-30 Thread Jaap-Jan Boor

On 30-nov-04, at 7:45, zhonglei wrote:

 hi
  thank you for your help!
  But I am not very clear about your meaning. I have a NFS mount 
 directory in my host computer. In the /home/zl/ELDK/ppc_82xx/proc(in 
 my host),there is no files in it.

that's ok, because it should only show on target the pseudo proc 
filesystem
containing runtime system information.
Do you have something in /home/zl/ELDK/ppc_82xx/etc/fstab?
if so, try the: mount -a
command on your target

Jaap-Jan


  So what can I do next?
 BestRegards
 zhonglei
 -- Original Message --
 From: Jaap-Jan Boor jjboor at aimsys.nl
 Date:  Tue, 30 Nov 2004 07:00:49 +0100

 Hi,

 did you have a
 none/proc/bus/usb  usbdevfs  defaults 0 0

 entry in your fstab?

 Jaap-Jan

 On 30-nov-04, at 3:32, zhonglei wrote:

 hi
My system is Lite5200 with DENX Embedded Linux running on it.When 
 I
 tried to enable my USB port to use my u-disk,

 the problem occured.
I have enabled USB support with 'make xconfig'. The reports are as
 follows:
 
   U-Boot 1.1.2 (Nov 12 2004 - 11:46:06)

 CPU:   MPC5200 v1.2 at 462 MHz
Bus 132 MHz, IPB 132 MHz, PCI 33 MHz
 Board: Motorola MPC5200 (IceCube)
 I2C:   85 kHz, ready
 DRAM:  64 MB
 FLASH: 16 MB
 PCI:   Bus Dev VenId DevId Class Int
 00  1a  1057  5803  0680  00
 In:serial
 Out:   serial
 Err:   serial
 Net:   FEC ETHERNET
 IDE:   Bus 0: OK
   Device 0: Model: Flash Card Firm: 2N3-0925 Ser#: CF
 Type: Removable Hard Disk
 Capacity: 123.0 MB = 0.1 GB (251904 x 512)
   Device 1: not available

 Autostarting.Press any key to abort..

 Hit any key to stop autoboot:  0
 Using FEC ETHERNET device
 TFTP from server 198.87.102.60; our IP address is 198.87.102.210
 Filename 'MPC5200/uImage'.
 Load address: 0x10
 Loading:
 #
 ###
 ##
 done
 Bytes transferred = 857559 (d15d7 hex)
 ## Booting image at 0010 ...
Image Name:   Linux-2.4.25
Image Type:   PowerPC Linux Kernel Image (gzip compressed)
Data Size:857495 Bytes = 837.4 kB
Load Address: 
Entry Point:  
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
 Memory BAT mapping: BAT2=64Mb, BAT3=0Mb, residual: 0Mb
 Linux version 2.4.25 (root at 198.87.102.60.netdial.caribe.net) (gcc
 version 3.2.24
 On node 0 totalpages: 16384
 zone(0): 16384 pages.
 zone(1): 0 pages.
 zone(2): 0 pages.
 Kernel command line: root=/dev/nfs rw
 nfsroot=198.87.102.60:/home/zl/ELDK/ppc_8f
 Calibrating delay loop... 307.20 BogoMIPS
 Memory: 62212k available (1500k kernel code, 464k data, 76k init, 0k
 highmem)
 Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
 Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
 Mount cache hash table entries: 512 (order: 0, 4096 bytes)
 Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
 Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
 POSIX conformance testing by UNIFIX
 PCI: Probing PCI hardware
 PCI: Cannot allocate resource region 0 of device 00:1a.0
 Linux NET4.0 for Linux 2.4
 Based upon Swansea University Computer Society NET3.039
 Initializing RT netlink socket
 Starting kswapd
 Journalled Block Device driver loaded
 JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
 pty: 256 Unix98 ptys configured
 ttyS0 on PSC1
 ttyS1 on PSC2
 ttyS2 on PSC3
 RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 
 blocksize
 loop: loaded (max 8 devices)
 Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
 ide: Assuming 33MHz system bus speed for PIO modes; override with
 idebus=xx
 Port Config is: 0x11050004
 ipb=132MHz, set clock period to 7
 GPIO config: 11050004
 ATA invalid: 0100
 ATA hostcnf: 0300
 ATA pio1   : 100a0a00
 ATA pio2   : 02040600
 XLB Arb cnf: a366
 mpc5xxx_ide: Setting up IDE interface ide0...
 ATA DMA task: 5
 Probing IDE interface ide0...
 hda: Flash Card, CFA DISK drive
 ide0 at 0xf0003a60-0xf0003a67,0xf0003a5c on irq 45
 hda: attached ide-disk driver.
 hda: 251904 sectors (129 MB) w/0KiB Cache, CHS=984/16/16
 Partition check:
  hda: hda1
 Icecube Bank 0: Found 1 x8 devices at 0x0 in 8-bit mode
 Icecube Bank 0: Found 1 x8 devices at 0x80 in 8-bit mode
  Amd/Fujitsu Extended Query Table at 0x0040
 Icecube Bank 0: CFI does not contain boot bank location. Assuming 
 top.
 number of CFI chips: 2
 cfi_cmdset_0002: Disabling erase-suspend-program due to code
 brokenness.
 Icecube flash bank 0: Using static image partition definition
 Creating 5 MTD partitions on Icecube Bank 0:
 0x-0x0080 : Spare
 0x0080-0x0090 : kernel
 0x0090-0x00c0 : initrd
 0x00c0-0x00f0 : jffs
 0x00f0-0x0100 : Firmware
 usb.c: registered new driver hub
 host/usb-ohci.c: USB OHCI at membase

problems on USB

2004-11-30 Thread Jaap-Jan Boor

On 30-nov-04, at 10:01, zhonglei wrote:

 It seems we are in the right track!
 This is the content of /home/zl/ELDK/ppc_82xx/etc/fstab:
 /dev/nfs/   nfs defaults0 0
 none/proc   procdefaults0 0

 And I have mount -a,but it seems nothing happend! :)

ja, now add the line:
none/proc/bus/usb  usbdevfs  defaults 0 0

to fstab, and mount -a again

after that you have the linux usb core pseudo filesystem,
in which you should find a /proc/bus/usb/devices file that
shows all usb devices.

 How can I see the files in my u-disk?

I don't know what a u-disk is, but usb sticks are normally
mounted using the scsi emulation layer.

Jaap-Jan

 -- Original Message --
 From: Jaap-Jan Boor jjboor at aimsys.nl
 Date:  Tue, 30 Nov 2004 09:13:42 +0100


 On 30-nov-04, at 7:45, zhonglei wrote:

 hi
  thank you for your help!
  But I am not very clear about your meaning. I have a NFS mount
 directory in my host computer. In the /home/zl/ELDK/ppc_82xx/proc(in
 my host),there is no files in it.

 that's ok, because it should only show on target the pseudo proc
 filesystem
 containing runtime system information.
 Do you have something in /home/zl/ELDK/ppc_82xx/etc/fstab?
 if so, try the: mount -a
 command on your target

 Jaap-Jan


  So what can I do next?
 BestRegards
 zhonglei
 -- Original Message --
 From: Jaap-Jan Boor jjboor at aimsys.nl
 Date:  Tue, 30 Nov 2004 07:00:49 +0100

 Hi,

 did you have a
 none/proc/bus/usb  usbdevfs  defaults 0 0

 entry in your fstab?

 Jaap-Jan

 On 30-nov-04, at 3:32, zhonglei wrote:

 hi
My system is Lite5200 with DENX Embedded Linux running on  
 it.When
 I
 tried to enable my USB port to use my u-disk,

 the problem occured.
I have enabled USB support with 'make xconfig'. The reports are  
 as
 follows:
 *** 
 *
   U-Boot 1.1.2 (Nov 12 2004 - 11:46:06)

 CPU:   MPC5200 v1.2 at 462 MHz
Bus 132 MHz, IPB 132 MHz, PCI 33 MHz
 Board: Motorola MPC5200 (IceCube)
 I2C:   85 kHz, ready
 DRAM:  64 MB
 FLASH: 16 MB
 PCI:   Bus Dev VenId DevId Class Int
 00  1a  1057  5803  0680  00
 In:serial
 Out:   serial
 Err:   serial
 Net:   FEC ETHERNET
 IDE:   Bus 0: OK
   Device 0: Model: Flash Card Firm: 2N3-0925 Ser#: CF
 Type: Removable Hard Disk
 Capacity: 123.0 MB = 0.1 GB (251904 x 512)
   Device 1: not available

 Autostarting.Press any key to abort..

 Hit any key to stop autoboot:  0
 Using FEC ETHERNET device
 TFTP from server 198.87.102.60; our IP address is 198.87.102.210
 Filename 'MPC5200/uImage'.
 Load address: 0x10
 Loading:
 #
 ###
 ##
 done
 Bytes transferred = 857559 (d15d7 hex)
 ## Booting image at 0010 ...
Image Name:   Linux-2.4.25
Image Type:   PowerPC Linux Kernel Image (gzip compressed)
Data Size:857495 Bytes = 837.4 kB
Load Address: 
Entry Point:  
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
 Memory BAT mapping: BAT2=64Mb, BAT3=0Mb, residual: 0Mb
 Linux version 2.4.25 (root at 198.87.102.60.netdial.caribe.net) (gcc
 version 3.2.24
 On node 0 totalpages: 16384
 zone(0): 16384 pages.
 zone(1): 0 pages.
 zone(2): 0 pages.
 Kernel command line: root=/dev/nfs rw
 nfsroot=198.87.102.60:/home/zl/ELDK/ppc_8f
 Calibrating delay loop... 307.20 BogoMIPS
 Memory: 62212k available (1500k kernel code, 464k data, 76k init,  
 0k
 highmem)
 Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
 Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
 Mount cache hash table entries: 512 (order: 0, 4096 bytes)
 Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
 Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
 POSIX conformance testing by UNIFIX
 PCI: Probing PCI hardware
 PCI: Cannot allocate resource region 0 of device 00:1a.0
 Linux NET4.0 for Linux 2.4
 Based upon Swansea University Computer Society NET3.039
 Initializing RT netlink socket
 Starting kswapd
 Journalled Block Device driver loaded
 JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
 pty: 256 Unix98 ptys configured
 ttyS0 on PSC1
 ttyS1 on PSC2
 ttyS2 on PSC3
 RAMDISK driver initialized: 16 RAM disks of 16384K size 1024
 blocksize
 loop: loaded (max 8 devices)
 Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
 ide: Assuming 33MHz system bus speed for PIO modes; override with
 idebus=xx
 Port Config is: 0x11050004
 ipb=132MHz, set clock period to 7
 GPIO config: 11050004
 ATA invalid: 0100
 ATA hostcnf: 0300
 ATA pio1   : 100a0a00
 ATA pio2   : 02040600
 XLB Arb cnf: a366
 mpc5xxx_ide: Setting up IDE interface ide0...
 ATA DMA task: 5
 Probing IDE interface ide0

Embedded Linux, pthreads and scheduling

2004-10-01 Thread Jaap-Jan Boor
Steve,

On 30-sep-04, at 19:39, Stephen Williams wrote:


 [This is probably not unique to ppc linux, but it is imbedded
 and I am running linux on an embedded pc in this case...]

 I have a multi-threaded (pthreads) application running on an
 embedded PPC. One of the threads operates a scanner video input,
 and I want to give it (and only it) high priority, so that if
 a device driver wakes it up, it is scheduled as close to now
 as possible.

 I code the thread in question to capp pthread_setschedparam
 to set its policy to SCHED_FIFO and the priority to some
 number 0. I'm using glibc-ppc_4xx-2.3.1 as packaged in the
 Denx ELDK-3.0. Can I expect this to work? Is any priority 0
 enough to get it priority over other threads, or do I need
 to give it a high (i.e. 99) priority to get past the sliding
 priorities of threads with default scheduling?

yes, if you run this program as root a priority 1 and class
SCHED_FIFO should work as expected.


 For the particular case I'm seeing, it seems to *not* have
 any effect. My interrupt handler is activated (I see on the
 scope) and in the first few cases the response is immediate,
 but sometimes the response is delayed significantly.

Possible. What kernel version do you use? In my experience
a 2.4.x kernel with O(1) scheduler, preemptible kernel patch and low
latency patch still have significant delays ( 5 ms) sometimes.
A 2.4 kernel without these patches can have much longer response times.
I didn't experiment with the 2.6 kernel on this particular
system yet but 2.6 includes the O(1) scheduler and preemtible
kernel patch.

By the way, do you not share a lock with a lower priority thread?
If the lower priority thread has the lock, your high priority
thread needs to wait until it's finished (unlocks).

Jaap-Jan

 Where
 I look for the problem may depend on whether the collective
 understanding is that the SCHED_FIFO has the effect I expect.

 -- 
 Steve WilliamsThe woods are lovely, dark and deep.
 steve at icarus.com   But I have promises to keep,
 http://www.icarus.com and lines to code before I sleep,
 http://www.picturel.com   And lines to code before I sleep.

 ___
 Linuxppc-embedded mailing list
 Linuxppc-embedded at ozlabs.org
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded




ushort fcc_fcce

2004-08-27 Thread Jaap-Jan Boor

hi,

Why is
include/asm-ppc/immap_8260.h:   ushort  fcc_fcce;

and not uint fcc_fcce, as e.g. the fcc event register
in hdlc mode uses 32 bits.

thanks,

Jaap-Jan


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





ushort fcc_fcce

2004-08-27 Thread Jaap Jan Boor

On 27-08-2004 16:53, Dan Malek dan at embeddededge.com wrote:


 On Aug 27, 2004, at 5:31 AM, Jaap-Jan Boor wrote:

 Why is
 include/asm-ppc/immap_8260.h:   ushort  fcc_fcce;

 Because in the original documentation I had under NDA
 many years ago when this was written didn't describe
 ATM nor HDLC.  It listed this as a 16-bit field for Ethernet.

 I've made a note to change it.

ok, thanks

Jaap-Jan


 Thanks.

 -- Dan





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





uart.c doesn't compile

2004-08-18 Thread Jaap-Jan Boor

Hi,

I pulled the latest linuxppc-2.5 using bk and try
to build for 8xx (FADS). It seems uart.c doesn't
build anymore for SMCs:

  CC  arch/ppc/8xx_io/uart.o
arch/ppc/8xx_io/uart.c: In function `change_speed':
arch/ppc/8xx_io/uart.c:992: warning: implicit declaration of function
`m8xx_cpm_setbrg'
arch/ppc/8xx_io/uart.c: In function `rs_8xx_init':
arch/ppc/8xx_io/uart.c:2689: error: `dp_addr' undeclared (first use in
this function)
arch/ppc/8xx_io/uart.c:2689: error: (Each undeclared identifier is
reported only once
arch/ppc/8xx_io/uart.c:2689: error: for each function it appears in.)
make[1]: *** [arch/ppc/8xx_io/uart.o] Error 1
make: *** [arch/ppc/8xx_io] Error 2

should dp_addr not be changed in dp_offset?

Jaap-Jan

--
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl


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





random ramblings on 8xx patches (long and tedious :-)

2004-07-23 Thread Jaap-Jan Boor

On Thu, 2004-07-22 at 19:35, Dan Malek wrote:
 On Jul 22, 2004, at 1:10 PM, Wells, Charles wrote:

  ... The real problem is that the
  MPC850 USB controller was designed for target-mode applications and not
  host-mode applications.

And even in target mode I see unexpected underruns, handshake timeouts
and a stucking interrupt endpoint. The software can recover from these
errors though.

 There are Linux versions of software that work fine in many
 applications.
 USB in general doesn't rate high on my list of engineering successes.

very much right. It works, we don't know why :)

 I'm never surprised when I plug something in to any kind of system
 and it doesn't work.


   -- Dan

Jaap-Jan


--
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl


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





List shutting down?

2004-07-14 Thread Jaap-Jan Boor

On 14/7/04 2:16, Jon Masters jonathan at jonmasters.org wrote:

 | See http://lists.linuxppc.org/news.html
 |
 | I'm willing to host lists on lists.infradead.org if necessary. I assume
 | it'll get sorted out some other way though.

 I have also offered publically to host them on a previous occasion.

 We can stick them up at http://www.printk.net/ if needed.


Is there already more known about the list's archive?

Thanks,

Jaap-Jan


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





Hardware interrupts routines

2004-06-16 Thread Jaap-Jan Boor

Hi,

Only when you are in kernel mode (i.e. in a driver/module)
it is possible to register for an interrupt, e.g. like
this:


#include asm/irq.h /* e.g. SIU_INT_IRQ1 for 82xx */

static void irq_handler(int irq, void *my_data,
struct pt_regs *regs)
{
/* handle the irq */

}

init()
{
int irq_flags = 0;
long my_data = 0x12345678;

request_irq(SIU_INT_IRQ1, irq_handler,
irq_flags, my irq, (void*)my_data);

}


When some user land C routine needs to be called when
your interrupt arrives, you need to make a driver
like above that wakes up your user mode program
in irq_handler. This will not give you very
good interrupt latencies however.

Jaap-Jan

On Wed, 2004-06-16 at 16:28, Garcia J?r?mie wrote:
 Hi everybody !
 As you guess I need some help... Indeed I'm a newbie in Linux embedded 
 development and I have to work on a linux ppc based board project.
 In fact, I have to adapt an existing VxWorks application to a linux 
 montavista hardhat application.
 My problem is the following : I need to find a linux equivalent routine of 
 the intConnect() VxWorks routine. You can see the man page of taht function 
 below :

 
 NAME

 intConnect( ) - connect a C routine to a hardware interrupt
 SYNOPSIS

 STATUS intConnect
 (
 VOIDFUNCPTR * vector,   /* interrupt vector to attach to */
 VOIDFUNCPTR   routine,  /* routine to be called */
 int   parameter /* parameter to be passed to routine */
 )

 DESCRIPTION

 This routine connects a specified C routine to a specified interrupt vector. 
 The address of routine is generally stored at vector so that routine is 
 called with parameter when the interrupt occurs. The routine is invoked in 
 supervisor mode at interrupt level. A proper C environment is established, 
 the necessary registers saved, and the stack set up.

 The routine can be any normal C code, except that it must not invoke certain 
 operating system functions that may block or perform I/O operations.

 This routine generally simply calls intHandlerCreate( ) and intVecSet( ). The 
 address of the handler returned by intHandlerCreate( ) is what actually goes 
 in the interrupt vector.

 This routine takes an interrupt vector as a parameter, which is the byte 
 offset into the vector table. Macros are provided to convert between 
 interrupt vectors and interrupt numbers, see intArchLib.

 

 The only hardware interrupts routine I found through my investigations is the 
 request_irq(...). But the problem is that request_irq do not allow me to pass 
 an argument to the handler... So is there a routine that allows it or is 
 there a way to adapt the request_irq() to my case.
 I thougt to declare a global variable to store my param but I use 
 multitasking. So bad way...


 Thanks a lot for helping the newbie that I am...

--
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl


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





I2C implementation on MPC8260

2004-05-05 Thread Jaap-Jan Boor

On Wed, 2004-05-05 at 11:35, Jos Beck wrote:
 Hi,

 I am trying to get some i2c devices (RTC, EEPROM) to run on an MPC8260
 with kernel version 2.4.21.
 I have seen some fragmented information in the kernel source
 documentation and on this mailing list, but it's not clear to me what
 parts I can use and what I have to write myself.

 Could anyone tell me where and how to start?

I think you need i2c-core.c, i2c-dev.c, i2c-algo-8260.c and
a driver file that set's up (board specific) i2c port settings
and irq. I think there are examples in the denx tree.
(i2c-pm826.c)

This is more or less the standard thing to do:
check the denx tree.

Jaap-Jan


 Thanks,

 Jos


--
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl


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





Spurious Interrupts.. 2.4.22 82xx platforms

2004-05-03 Thread Jaap-Jan Boor

Andrew,

Are you aware of this?
http://lists.linuxppc.org/linuxppc-embedded/200211/msg00139.html

I'm not sure of this is your problem though

Jaap-Jan

On May 2, 2004, at 17:02, Andrew Williams wrote:


 Trying to wrap my mind around where my spurrious interrupts
 are coming from.

 I've used some debug code to determine where the spurrious
 counter was being incremented, in an attempt to see the
 what/how/why. All occurences are a result of m8260_get_irq()
 returning -1 (empty SIVEC register).

 Ideas or pointers as to what might be occuring here?
 We're using an 8270.

 Can anyone reference a paper/chat/email that details the nature
 of the SIVEC/SPINRx solution in linux?


 Thanks
 Andrew



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





Recognizing compact flash in IDE mode on 8260

2004-04-28 Thread Jaap-Jan Boor

Hi,

you might check drivers/ide/ppc and either add some support sw there
or modify existing direct interface initialization, like cpci405ide.c

Jaap-Jan

On 28-apr-04, at 0:12, Dixon, Myron @ GNS wrote:


 We have a custom board that contains two PPC8260 processors.  One of
 the two

 boots from PPCBoot 1.1.5 and runs linux kernel 2.4.18. I have written
 several
 drivers to exercise our on-board hardware.  Two books that have been
 tremendous
 resources are Linux Device Drivers by Rubin  Corbet and Building
 Embedded
 Linux Systems by Yaghmour.

 We are currently booting to an NFS mounted root file system.  The next
 step
 is
 to boot to an on-board compact flash device configured in IDE mode per
 the
 Toshiba Compact Flash and MPC8260 Interface Design Guide.

 While I am a reasonbly experienced programmer, my knowledge of the
 linux
 kernel
 is limited to the two books I've cited, searching on this and other
 mailing
 lists, and the kernel source.

 We have gotten PPC Boot to recognize the compact flash device as
 follows:


   PPCBoot 1.1.5 (Apr  5 2004 - 11:25:22)

   MPC8260 Reset Status: External Soft, External Hard

   MPC8260 Clock Configuration
   - Bus-to-Core Mult 3x, VCO Div 2, 60x Bus Freq  33-100, Core Freq
 100-300
   - dfbrg 0, corecnf 0x08, busdf 4, cpmdf 1, plldf 1, pllmf 4
   - vco_out  35000, scc_clk   8750, brg_clk   8750
   - cpu_clk  21000, cpm_clk  17500, bus_clk   7000

   CPU:   MPC8260 (Rev 14, Mask B.1 4K25A) at 200.001 MHz
   Board: MAIN 8260
   DRAM: . . . Testing
   DRAM SIZE: 64 MB
   Length of PPCBOOT:  257020 bytes
   Top of RAM usable for PPCBoot at: 0400
   Reserving 256k for PPCBoot at: 03fc
   Reserving 384k for malloc() at: 03f6
   Reserving 76 Bytes for Board Info at: 03f5ff00
   Stack Pointer at: 03f5fee8
   Board info at: 03f5ff00
   Available 384k for malloc() at: 03f6
   Stack Pointer at: 03f5fee8
   MAC ADDR: 00:a0:1e:a8:7b:cf
   Now running in RAM - PPCBoot at: 03fc
   FLASH:  1 MB
   mem_malloc_init: start = 66453504  len = 393216
   *** Warning - bad CRC, using default environment

   In:serial
   Out:   serial
   Err:   serial
   Reset Ethernet PHY
   PPCBoot relocated to 03fc
   IDE:   Bus 0: OK
   Device 0: Model: LEXAR ATA FLASH Firm:  Ser#: 11303282139099090092
   Type: Removable Hard Disk
   Capacity: 30.4 MB = 0.0 GB (62336 x 512)
   -

 While booting the linux kernel to detect the compact flash device as
 ide0,
 I have attempted to use the following command line options
   idebus=66
   ide0=0xea00,0xeb00,7

 The parameters for ide0= represent the our UPM settings for chip
 selects
 CS0 and CS1 as well as the hardware IRQ7 line.
 The ide0= parameter causes the kernel to crash.
 A snap shot of this occurrence is as follows.

   - bootp
   BOOTP broadcast 1
   got BOOTP packet (src=67, dst=68, len=331 want_len=300)
   Filtering pkt = 0
   Bootfile: /tftpboot/sbc/boot/tm_boot
   Got good BOOTP
   ARP broadcast 1
   Got good ARP - start TFTP
   TFTP from server 166.20.228.230; our IP address is 166.20.228.225
   Filename '/tftpboot/sbc/boot/tm_boot'.
   Load address: 0x80
   Loading:
 *#
   ##
   done
   Bytes transferred = 586168 (8f1b8 hex)
   - bootm
   ## Booting image at 0080 ...
   Image Name:
   Created:  2004-04-27  14:56:09 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:586104 Bytes = 572 kB = 0 MB
   Load Address: 
   Entry Point:  
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
   ## Current stack ends at 0x03F5FB40 = set upper limit to 0x03F5F340
   ## cmdline at 0x03F5F240 ... 0x03F5F240
   bd address  = 0x03F5F1F0
   memstart= 0x
   memsize = 0x0400
   flashstart  = 0xFE00
   flashsize   = 0x0010
   flashoffset = 0x
   sramstart   = 0x03F6
   sramsize= 0x0006
   immr_base   = 0xF000
   bootflags   = 0x0001
   vco = 333.335 MHz
   sccfreq = 83.333 MHz
   brgfreq = 83.333 MHz
   intfreq = 200.001 MHz
   cpmfreq = 166.667 MHz
   busfreq = 66.667 MHz
   ethaddr = 00:A0:1E:A8:7B:CF
   IP addr = 166.20.228.225
   baudrate=  19200 bps
   No initrd
   ## Transferring control to Linux (at address ) ...
   Memory BAT mapping: BAT2=64Mb, BAT3=0Mb, residual: 0Mb
   Linux version 2.4.18 (mdixon at telecom2.aydin-telecom.com) (gcc
 version 2.95.3 20010315 //
 (release)) #835 Tue Apr 27 10:53:07 EDT 2004
   On node 0 totalpages: 16384

FEC support for 8260 in kernel 2.4.25

2004-04-25 Thread Jaap-Jan Boor

On 24-apr-04, at 1:23, T Michael Turney wrote:


 Hi Folks,
 This is my first posting on this list.

 I am working on a kernel port to an 8260 board that
 has all three FCCs wired up to PHYs (BCM5221).

 The first FCC is working fine, but I haven't been
 successful with getting FCC2 and FCC3 going yet.

 Is anybody out there successfully using the 2.4.x
 fcc_enet.c code with all three channels active?

I use 2, FCC1 and FCC3 on a dual port phy.
just make sure you program the gpio ports
correctly.


 Cheers,
 T.mike

 Tools Made Tough
 Project Consultant
 (o) 760.728.5401
 (c) 760.415.8792



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





C++ Memory Requirements for PowerQUICC 1

2004-04-05 Thread Jaap-Jan Boor

Hi,

It depends on your program and C++ code. You probably mention C++
libraries
because of templates. If you use a lot of different types (classes) and
STL,
a lot of templates will be instantiated for your types, which can
quickly increase
the size of your program(s) (not much unlike to macros in C).
In addition, if you abstract 'the bit' with class hierarchies, stream
io, etc.
instead of using builtin types like 'int' you can create big programs.

Jaap-Jan

On Apr 2, 2004, at 19:29, vze8n24y at verizon.net wrote:


 Hi:

 I would like to run C++ on a PowerQUICC I system that has 8 MB of RAM.
 I was told by a friend that this was not enough memory to run a C++
 program with the C++ libraries. Does anyone have experience with this?

 Regards,

 Bob Davis




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





O(1) scheduler for PPC?

2004-03-26 Thread Jaap-Jan Boor

On Thu, 25 Mar 2004, Steven Scholz wrote:


 Hi there,

 is the backport of Ingo Molnar's O(1) scheduler in the official linux-2.4.2x
 tree and is it available for the PPC?

an up-to-date patch together with the preemptible kernel and low-latency
patches for 2.4.25 are available here:

http://www.plumlocosoft.com/kernel


 Thanks,

 Steven




--
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl


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





O(1) scheduler for PPC?

2004-03-26 Thread Jaap-Jan Boor

On Fri, 26 Mar 2004, Jaap-Jan Boor wrote:


 On Thu, 25 Mar 2004, Steven Scholz wrote:

 
  Hi there,
 
  is the backport of Ingo Molnar's O(1) scheduler in the official linux-2.4.2x
  tree and is it available for the PPC?

 an up-to-date patch together with the preemptible kernel and low-latency
 patches for 2.4.25 are available here:

 http://www.plumlocosoft.com/kernel


note that, after applying the 'base' patch you need to add the
CONFIG_LOLAT option to arch/ppc/config.in and apply thew following
change in include/asm-ppc/bitopts.h

285c285
 static inline int _sched_find_first_bit(unsigned long *b)
---
 static inline int sched_find_first_bit(unsigned long *b)


Jaap-Jan

 
  Thanks,
 
  Steven
 
 
 

 --
 J.G.J. Boor Anton Philipsweg 1
 Software Engineer   1223 KZ Hilversum
 AimSys bv   tel. +31 35 689 1941
 Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl




--
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl


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





IBM 440GX, Ocotea...

2004-03-25 Thread Jaap-Jan Boor

On Mar 24, 2004, at 23:25, Tom Rini wrote:

 It seems to be a circuitous route that I don't even understand
 anymore.  Sometime stuff I check in gets there, sometimes not. :-)

 and you have never found out the conditions when something
 get's in (only when submitted at friday the 13th or something?)

 Um, yeah.  I'm hoping 2.6 will be different from 2.4 in that regard. :)

ok!

 linuxppc-2.[45] are children of the linux-2.[45] trees, and contain
 stuff that's not quite ready to go out, _but_will_be_soon_ or has been
 put in a tree for Linus/Marcelo, but they haven't pulled yet.

ok thanks (and linuxppc-2.5 should be used to get something into 2.6?)

Jaap-Jan


 --
 Tom Rini
 http://gate.crashing.org/~trini/



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





IBM 440GX, Ocotea...

2004-03-25 Thread Jaap-Jan Boor

Paul,

Much thanks for your explanation, it clarifies a lot.

Jaap-Jan

On Thu, 25 Mar 2004, Paul Mackerras wrote:


 Jaap-Jan Boor writes:

  In addition to this nice tree discussion, I've a question:
  from what 'official ppc' tree do patches eventually get into the
  official linux kernel tree(s) at kernel.org?
  only linuxppc-2.4? Or all?

 Well, the thing to understand is that there is no automatic,
 effortless way that code goes into the kernel.org trees.  Every change
 that goes in involves somebody putting together a patch against the
 current state of the official kernel.org trees, together with a
 description of what is being changed and why it is being changed, and
 sending that to Marcelo Tosatti, Andrew Morton or Linus Torvalds.

 BitKeeper can help to some extent with this, mainly by providing a way
 for us to send Marcelo/Andrew/Linus a bunch of changes in one go.  It
 doesn't, however, provide any automatic way for changes to get from
 the linuxppc-2.4 or linuxppc-2.5 trees into their trees.  The reason
 is that with BK, if you pull the changes from one tree into another
 tree, you have to take all the changes in the first tree that aren't
 in the second.  You can't pick and choose which changesets get
 transferred.  Therefore, we don't ask Marcelo/Andrew/Linus to pull
 from linuxppc-2.[45] into their trees.  There is too much stuff in
 there that isn't ready, or that I don't agree with, or that I just
 don't understand.

 I have taken on the role of ppc32 maintainer, part of which involves
 sending changes to Marcelo/Andrew/Linus.  However, doing that involves
 work on my part to identify which changes in linuxppc-2.[45] are ready
 to send, which changes logically go together, and I have to be able to
 explain the change.

 When it comes to things like the 8xx/82xx/85xx support, I rely on the
 maintainers for that area -- Tom Rini and Dan Malek -- to do that work
 of identifying sets of related changes that are suitable for inclusion
 in the official trees, and packaging them up with an explanation so
 that they can be sent upstream.  (That can be done either with patches
 or BK changesets; the amount of work required is pretty much the same
 either way.)

 Similarly, for the boot code I look to Tom and for the powermac
 support I look to Ben Herrenschmidt.  For the 4xx stuff there isn't
 really a maintainer at the moment, unfortunately, except that Matt
 Porter is looking after the 44x boards.  I look after the classic
 PowerPC core support -- exception handling, memory management, etc.,
 and to some extent the 4xx core support, and the CHRP port.

 What this boils down to is that for changes in these areas I expect
 the maintainers for those areas to be packaging up the changes with
 explanations, ready to go upstream.  Anyone is of course welcome to
 put together a patch + explanation and propose that it go upstream.
 In such cases I would ask the maintainer for that area for his
 opinion, or if there isn't a maintainer, I would ask the submitter if
 they will commit to maintaining that area of the code.  If they won't,
 I would tend to drop the patch unless it is a simple, obviously
 correct bugfix.

 One problem we have at present is that there are a number of board
 ports which don't appear to have a maintainer.  Sometimes there are
 people using those ports but noone taking responsibility for updating
 it and keeping it working as things change elsewhere in the kernel.
 Having a maintainer is a prerequisite for the board port to be sent
 upstream.

 I hope this clarifies things.  If you want the kernel.org trees to
 support your platform, then I suggest you put together the changes you
 want to see as patches and send them to me and the maintainer for the
 subarea.  Make sure that the patch comes with a good explanation of
 the change, and if you think the patch should go upstream, say so.  If
 possible make sure that the patch isn't too large.  If it is large,
 see if you can split it up into smaller patches, each of which
 contains a logically related set of changes.

 Regards,
 Paul.



--
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl


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





IBM 440GX, Ocotea...

2004-03-24 Thread Jaap-Jan Boor

On Mar 23, 2004, at 19:24, Dan Malek wrote:

 Jaap-Jan Boor wrote:

 from what 'official ppc' tree do patches eventually get into the
 official linux kernel tree(s) at kernel.org?
 only linuxppc-2.4? Or all?

 It seems to be a circuitous route that I don't even understand
 anymore.  Sometime stuff I check in gets there, sometimes not. :-)

and you have never found out the conditions when something
get's in (only when submitted at friday the 13th or something?)


 http://penguinppc.org/dev/kernel.shtml tries to explain it.


this states you should build/submit patches against kernel.org's
trees, which is quite different from linuxppc-2.[45], which is probably
Tom Rini's checkout of kernel.org's tree with all ppc patches.
Or is it?

thanks for your reply,

Jaap-Jan


   -- Dan




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




Can't set the schedual parameter of threads in linux

2004-03-11 Thread Jaap-Jan Boor

yang,

Are you running your application as root? Also, try to get/set
the pthread schedule parameters in the pthread context itself.

Jaap-Jan

On Mar 11, 2004, at 2:06, yang wrote:


 Hello,
 I encounter a problem when I transplant application.
 There is no effect to the pthread when I call
 pthread_setschedparam() function in test program,  and it's policy and
 priority are stilll zero, not what I expected, after call
 pthread_getschedparam(). The codes  is as the follow:

 #include sched.h
 #include pthread.h
 #include stdio.h
 #include stdlib.h
 #include sys/types.h
 #include linux/ipc.h
 #include linux/msg.h
 #include errno.h
 #include stddef.h
 #include string.h

 void * func()
 {
 while (1);
 return;
 }

 int main()
 {
 pthread_attr_t tattr;
 pthread_t tid;
 int policy;
 int ret;
 int newprio = 20;
 struct sched_param param;

 ret = pthread_attr_init (tattr);
 if (ret != 0)
 {
 printf(Error in init: %s\n, strerror(errno));
 }

 ret = pthread_attr_getschedparam (tattr, param);
 if (ret != 0)
 {
 printf(Error in get after init: %s\n, strerror(errno));
 }
 ret = pthread_attr_setdetachstate(tattr, PTHREAD_CREATE_DETACHED);
if (ret != 0)
 {
 printf(Error in setdea: %s\n, strerror(errno));
 }
 ret = pthread_attr_setschedpolicy(tattr, SCHED_RR);
 if (ret != 0)
 {
 printf(Error in setpolicy: %s\n, strerror(errno));
 }

 param.sched_priority = newprio;
 ret = pthread_attr_setschedparam (tattr, param);
 if (ret != 0)
 {
 printf(Error in set: %s\n, strerror(errno));
 }

 ret = pthread_create (tid, tattr, (int*) func, NULL);
 if (ret != 0)
 {
 printf(Error in create: %s\n, strerror(errno));
 }

 param.sched_priority = -1;
 ret = pthread_getschedparam (tid, policy, param);
 if (ret != 0)
 {
 printf(Error in get after create: %d %s\n, ret,
 strerror(errno));
 }

 printf(policy: %d\tpriority: %d\n, policy, param.sched_priority);

 return 0;

 }

 The output is :
 policy: 0priority: 0

 Would you like to tell me how to set the policy and priority to
 pthreads in Red Hat.? Thank you very much!
 Best regards,
  yang




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





Can't set the schedual parameter of threads in linux

2004-03-11 Thread Jaap-Jan Boor

Yang,

You are right, I don't use the pthread_[gs]etschedparam() functions.
I use in the new thread's context the
pthread_attr_getschedpolicy(tattr, policy);
pthread_attr_getschedparam(tattr, param);

functions, and then set the new priority

param.sched_priority = newpriority;
pthread_setschedparam(pthread_self(), policy, param);

Jaap-Jan

On Mar 11, 2004, at 14:10, yang wrote:

 Hi,
I did run my program as root, and the key to my problem is why
 it works well in Solaris system but not in Red Hat system.
Please copy the follow codes and run it in your system if you
 are spare and will. Thank you very much!
Best regards,
  yang


 yang,

 Are you running your application as root? Also, try to get/set
 the pthread schedule parameters in the pthread context itself.

 Jaap-Jan

 On Mar 11, 2004, at 2:06, yang wrote:


 Hello,
 I encounter a problem when I transplant application.
 There is no effect to the pthread when I call
 pthread_setschedparam() function in test program,  and it's policy
 and
 priority are stilll zero, not what I expected, after call
 pthread_getschedparam(). The codes  is as the follow:

 #include sched.h
 #include pthread.h
 #include stdio.h
 #include stdlib.h
 #include sys/types.h
 #include linux/ipc.h
 #include linux/msg.h
 #include errno.h
 #include stddef.h
 #include string.h

 void * func()
 {
 while (1);
 return;
 }

 int main()
 {
 pthread_attr_t tattr;
 pthread_t tid;
 int policy;
 int ret;
 int newprio = 20;
 struct sched_param param;

 ret = pthread_attr_init (tattr);
 if (ret != 0)
 {
 printf(Error in init: %s\n, strerror(errno));
 }

 ret = pthread_attr_getschedparam (tattr, param);
 if (ret != 0)
 {
 printf(Error in get after init: %s\n, strerror(errno));
 }
 ret = pthread_attr_setdetachstate(tattr,
 PTHREAD_CREATE_DETACHED);
if (ret != 0)
 {
 printf(Error in setdea: %s\n, strerror(errno));
 }
 ret = pthread_attr_setschedpolicy(tattr, SCHED_RR);
 if (ret != 0)
 {
 printf(Error in setpolicy: %s\n, strerror(errno));
 }

 param.sched_priority = newprio;
 ret = pthread_attr_setschedparam (tattr, param);
 if (ret != 0)
 {
 printf(Error in set: %s\n, strerror(errno));
 }

 ret = pthread_create (tid, tattr, (int*) func, NULL);
 if (ret != 0)
 {
 printf(Error in create: %s\n, strerror(errno));
 }

 param.sched_priority = -1;
 ret = pthread_getschedparam (tid, policy, param);
 if (ret != 0)
 {
 printf(Error in get after create: %d %s\n, ret,
 strerror(errno));
 }

 printf(policy: %d\tpriority: %d\n, policy,
 param.sched_priority);

 return 0;

 }

 The output is :
 policy: 0priority: 0

 Would you like to tell me how to set the policy and priority to
 pthreads in Red Hat.? Thank you very much!
 Best regards,
  yang







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





Can't set the schedual parameter of threads in linux

2004-03-11 Thread Jaap-Jan Boor

On Thu, 11 Mar 2004, Jean-Denis Boyer wrote:


 Your program logic is absolutely correct.
 I ran it in my embedded PPC environment (as root) and got the following 
 results:

 policy: 2   priority: 20

 The problem is elsewhere...

RedHat 9 uses ntpl, that is a difference.


 
  Jean-Denis Boyer, Eng.
  M5T Centre d'Excellence en T?l?coms Inc.
  4283 Garlock Street
  Sherbrooke (Qu?bec)
  J1L 2C8  CANADA
  (819)829-3972 x241
 
  -Original Message-
  From: owner-linuxppc-embedded at lists.linuxppc.org
  [mailto:owner-linuxppc-embedded at lists.linuxppc.org]On Behalf Of yang
  Sent: 10 mars, 2004 20:07
  To: linuxppc-embedded at lists.linuxppc.org
  Subject: Can't set the schedual parameter of threads in linux
 
 
 
  Hello,
  I encounter a problem when I transplant application.
  There is no effect to the pthread when I call
  pthread_setschedparam() function in test program,  and it's
  policy and priority are stilll zero, not what I expected,
  after call pthread_getschedparam(). The codes  is as the follow:
 
  #include sched.h
  #include pthread.h
  #include stdio.h
  #include stdlib.h
  #include sys/types.h
  #include linux/ipc.h
  #include linux/msg.h
  #include errno.h
  #include stddef.h
  #include string.h
 
  void * func()
  {
  while (1);
  return;
  }
 
  int main()
  {
  pthread_attr_t tattr;
  pthread_t tid;
  int policy;
  int ret;
  int newprio = 20;
  struct sched_param param;
 
  ret = pthread_attr_init (tattr);
  if (ret != 0)
  {
  printf(Error in init: %s\n, strerror(errno));
  }
 
  ret = pthread_attr_getschedparam (tattr, param);
  if (ret != 0)
  {
  printf(Error in get after init: %s\n, strerror(errno));
  }
  ret = pthread_attr_setdetachstate(tattr,
  PTHREAD_CREATE_DETACHED);
 if (ret != 0)
  {
  printf(Error in setdea: %s\n, strerror(errno));
  }
  ret = pthread_attr_setschedpolicy(tattr, SCHED_RR);
  if (ret != 0)
  {
  printf(Error in setpolicy: %s\n, strerror(errno));
  }
 
  param.sched_priority = newprio;
  ret = pthread_attr_setschedparam (tattr, param);
  if (ret != 0)
  {
  printf(Error in set: %s\n, strerror(errno));
  }
 
  ret = pthread_create (tid, tattr, (int*) func, NULL);
  if (ret != 0)
  {
  printf(Error in create: %s\n, strerror(errno));
  }
 
  param.sched_priority = -1;
  ret = pthread_getschedparam (tid, policy, param);
  if (ret != 0)
  {
  printf(Error in get after create: %d %s\n, ret,
  strerror(errno));
  }
 
  printf(policy: %d\tpriority: %d\n, policy,
  param.sched_priority);
 
  return 0;
 
  }
 
  The output is :
  policy: 0priority: 0
 
  Would you like to tell me how to set the policy and
  priority to pthreads in Red Hat.? Thank you very much!
  Best regards,
   yang
 
 




--
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl


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





MPX8xx: MMC over SPI....

2004-03-10 Thread Jaap-Jan Boor

Hi,

I agree in this with Wolfgang, I have had very bad experiences
with SPI as inter processor communication channel in the past.
And then you are in the luxury position of having 'intelligence'
(processors) on both sides which can detect and clean up the
CPM's SPI mess.

Jaap-Jan

On Wed, 2004-03-10 at 00:59, Wolfgang Denk wrote:

 I don't know your exact application,  but  it  always  gives  me  the
 creeps when I read the phrases mass storage device and SPI bus in
 the same sentence. I tend to summarize this as follows:
 mass storage device  + SPI bus = need for redesign :-)

 Best regards,

 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
 By the way, ALL software projects are done by iterative  prototyping.
 Some companies call their prototypes releases, that's all.



J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl


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





RAM Disk problems

2004-03-10 Thread Jaap-Jan Boor

Kevin,

I think I once had the same problem and it was caused by
having the kernel cmd line overwritten. You might check
that.

Jaap-Jan

On Wed, 2004-03-10 at 15:31, Kevin A. Sapp wrote:
 Hello,

 I am trying to bring up a RAM disk as the root file system.
 Most everything is working until it come's time to mount it.
 The logs are below.

 I noticed in mount_block_root the get_fs_names appears
 to returning a zero length string.

 I have tried root=/dev/ram
 root=/dev/ram0
 root=/dev/rd/0
 and combinatins with noinitrd.

 FYI. The RAM disk will be loaded by a bus master and will have
 to be persistant.

 Any suggestions?
 Thanks
 Kevin


 = bootm 10 20
 ## Booting image at 0010 ...
Image Name:   Linux-2.4.20
Image Type:   PowerPC Linux Kernel Image (gzip compressed)
Data Size:485362 Bytes = 473.10 kB
Load Address: 
Entry Point:  
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
 ## Loading RAMDisk Image at 0020 ...
Image Name:   Kevin Simple RAMDisk
Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
Data Size:1405884 Bytes =  1.3 MB
Load Address: 
Entry Point:  
Verifying Checksum ... OK
 ## initrd at 0x00200040 ... 0x003573FB (len=1405884=0x1573BC)
Loading Ramdisk to 01c27000, end 01d7e3bc ... OK
 kernel addr:
 machine_init6Memory BAT mapping: BAT2=16Mb, BAT3=8Mb, residual: 7Mb
 Linux version 2.4.20 (kevin at linux4) (gcc version 3.2.1) #258 Wed Mar 10
 07:55:32
  EST 2004
 setup arch4ADS setup arch
 On node 0 totalpages: 7936
 zone(0): 7936 pages.
 zone(1): 0 pages.
 zone(2): 0 pages.
 Kernel command line: root=/dev/ram rw console=ttyS0,9600 nobats
 ip=192.168.82.5
  console passed ttyS0:0
 Checking for registered console ttyS
  Prefered console -1
 ADS init IRQ. NR_IRQS=256
 ADS time init
 ADS calibrate decrementer. FREQ=, tb_ticks_per_jiffy=16
stdio console init
 serial_console_setup
 cons:c00ebc48 str:9600 cons-index:0 Calibrating delay loop... 132.71
 BogoMIPS
 Memory: 28828k available (828k kernel code, 288k data, 48k init, 0k highmem)
 Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
 Inode cache hash table entries: 2048 (order: 2, 16384 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: 8192 (order: 3, 32768 bytes)
 POSIX conformance testing by UNIFIX
 ADS init
 Linux NET4.0 for Linux 2.4
 Based upon Swansea University Computer Society NET3.039
 Initializing RT netlink socket
 Starting kswapd
 devfs: v1.12c (20020818) Richard Gooch (rgooch at atnf.csiro.au)
 devfs: devfs_debug: 0x0
 devfs: boot_options: 0x1
 pty: 256 Unix98 ptys configured
 RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
 loop: loaded (max 8 devices)
 *SERIAL INIT*
 MPC8260 FCC Ethernet driver
 BD rings initialised, RBASE=1B8160, TBASE=1B8360
 Created eth0
 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 2048 bind 4096)
 eth0: OPEN
 IP-Config: Guessing netmask 255.255.255.0
 IP-Config: Complete:
   device=eth0, addr=192.168.82.5, mask=255.255.255.0,
 gw=255.255.255.255,
  host=192.168.82.5, domain=, nis-domain=(none),
  bootserver=255.255.255.255, rootserver=255.255.255.255, rootpath=
 NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
 RAMDISK: Compressed image found at block 0
 Freeing initrd memory: 1372k freed
 Kernel panic: VFS: Unable to mount root fs on 01:00
  0Rebooting in 180 seconds..




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





searchplugin (off topic)

2004-03-09 Thread Jaap-Jan Boor
Hi,

For anybody interested, I've attached a
mozilla/firefox/etc. searchplugin for
this mailing list. Just put in your
browser install/searchplugins directory
and restart.

Jaap-Jan


--
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl

-- next part --
# linuxppc-embedded Sherlock for Mozilla
#
# jjboor at aimsys dot nl March 2004
#

search
   name=linuxppc-embedded
   description=LinuxPPC - Mail List Archives
   action=http://lists.linuxppc.org/results.html;
   searchForm=http://lists.linuxppc.org/results.html;
   method=GET 

input name=restrict value=linuxppc-embedded
input name=words user 

interpret

resultListStart=!-- RESULT LIST START --
resultListEnd=!-- RESULT LIST END --

resultItemStart=!-- RESULT ITEM START --
resultItemEnd=!-- RESULT ITEM END --

/search


MPX8xx: MMC over SPI....

2004-03-09 Thread Jaap-Jan Boor

On Tuesday 09 March 2004 14:18, David Jander wrote:
 Hi all,

 I know that Wolfgang Denk is going to flame me right away for this, but
 I'll do it anyway :-)
 I am going to write a SPI driver and on top of that a MMC driver for linux
 for the MPC852T, unless there is something already out there.

the SPI driver is there. It's in the Denx kernel src

Jaap-Jan

 Anyone tried this before and has some sources to share? Or pointers to
 sources?

 Greetings,

 --
 David Jander
 Protonic Holland.


--
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl


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





searchplugin

2004-03-09 Thread Jaap-Jan Boor
Hi,

Slightly off topic, but for anybody interested,
I've attached a mozilla/firefox/etc. searchplugin
for this mailing list. Just untgz it and put it in your
browser install/searchplugins directory.

Jaap-Jan

--
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl
-- next part --
A non-text attachment was scrubbed...
Name: linuxppc.tar.gz
Type: application/x-tgz
Size: 1326 bytes
Desc: not available
Url : 
http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20040309/b0888c63/attachment.bin
 


early return set_multicast

2004-03-03 Thread Jaap-Jan Boor

Hi,

does somebody know why there is an early return;
statement in the set_multicast_list() function
of 8260_io/fcc_enet.c (or cpm2_io/fcc_enet.c)?


static void
set_multicast_list(struct net_device *dev)
{
struct  fcc_enet_private *cep;
struct  dev_mc_list *dmi;
u_char  *mcptr, *tdptr;
volatile fcc_enet_t *ep;
int i, j;

cep = (struct fcc_enet_private *)dev-priv;

return;
/* Get pointer to FCC area in parameter RAM.
*/
ep = (fcc_enet_t *)dev-base_addr;

if (dev-flagsIFF_PROMISC) {
...
--

thanks,

Jaap-Jan

--
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl


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





MPC8270 PCI

2004-02-25 Thread Jaap-Jan Boor

Hi,

I've a short question regarding 82xx PCI (like 8266/8270).
As far as I understand the manual, you should always be
able to issue config cycles (config read) on the bus,
if the 60x bus is in PCI mode. Is this true? I've quite
some problems with this, and want to blame the hardware...

thanks for any info,

Jaap-Jan
AimSys b.v.

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





usb hub problem on 8270

2004-02-19 Thread Jaap-Jan Boor

Hi,

I found some time to adapt m8xxhci.c (for 823/850) to the 8270 with
limited success.
We use TOUT3 (from timer3) to DREQ0/1 to enable SOF transmitting which
works
more or less as one of my hubs is detected but after the host driver
received the hub's
device description, I get a time-out and, well that's it. Even after
resetting the 8270 and cpm
I'm unable to communicate to the hub:

m8xxhci: initializing controller
m8xxhci_setup()
usb.c: new USB bus registered, assigned bus number 1
m8xxhci_start_controller()
hp c029, immap f000, usbprmap f0008b00, usbregs f0011b60, cp
f00119c0
m8xxhci:MPC8270 mask 0
m8xxhci: USING CLK8 for USB clock!
m8xxhci: ring sizes: rx 32, tx 40
endpoint 0 0x140, epb f140
rstate f0008b08
set up tx ring @ c029
set up rx ring @ f170
tbptr 0278
usep4190208 @ f0011b64
m8xxhci: assert reset
m8xxhci: enable USB controller
m8xxhci_timer_setup()
m8xxhci: timer, intfreq 26600, busfreq , count 995
m8xxhci: timer bytes/count 1.28
m8xxhci: usb bus is idle
usb.c: kmalloc IF c026cb00, numif 1
usb.c: new device strings: Mfr=0, Product=2, SerialNumber=1
usb.c: USB device number 1 default language ID 0x0
Product: USB MPC8xx Root Hub
SerialNumber: f0011b60
hub.c: USB hub found
hub.c: 1 port detected
hub.c: standalone hub
hub.c: individual port power switching
hub.c: no over-current protection
hub.c: Port indicators are not supported
hub.c: power on to power good time: 2ms
hub.c: hub controller current requirement: 0mA
hub.c: port removable status: R
hub.c: local power source is good
hub.c: no over-current condition exists
rh_submit_urb() int pipe
hub.c: enabling power on all ports
rh_port_power(1)
usb.c: hub driver claimed interface c026cb00
m8xxhci: initializing done
idle_bus() 1; d+ one, d- zero, connect full-sp
hub.c: port 1, portstatus 101, change 1, 12 Mb/s
hub.c: port 1 connection change
hub.c: port 1, portstatus 101, change 1, 12 Mb/s
hub.c: port 1, portstatus 101, change 0, 12 Mb/s
portstatus 101, change 0, 12 Mb/s
hub.c: port 1, portstatus 101, change 0, 12 Mb/s
hub.c: port 1, portstatus 101, change 0, 12 Mb/s
rh_port_reset(1)
m8xxhci: assert reset
hub.c: port 1, portstatus 103, change 0, 12 Mb/s
hub.c: new USB device NULL-1, assigned address 2
usb.c: kmalloc IF c026cce0, numif 1
usb.c: new device strings: Mfr=0, Product=2, SerialNumber=0
usb.c: USB device number 2 default language ID 0x409
Product: Standard USB Hub
hub.c: USB hub found
hub.c: 4 ports detected
hub.c: standalone hub
hub.c: ganged power switching
hub.c: global over-current protection
hub.c: Port indicators are not supported
hub.c: power on to power good time: 100ms
hub.c: hub controller current requirement: 64mA
hub.c: port removable status: 
hub.c: local power source is good
hub.c: no over-current condition exists
hub.c: enabling power on all ports
usb.c: hub driver claimed interface c026cce0
complete_qe(qe=c02910fc,status=-110)
hub.c: nonzero status in irq -110


looking in /proc/driver/usb I see some timeouts:

USB host controller v1.2:
controller enabled
root hub port state connected, status CCS PES PPS
oe 1; bus 10 idle 1
ints: cpm 66, timer 367332, isrs 367385
   idle 66, rst 0, bsy 0, rxb 24, txb 46
errs: tx0 19, timeout 19, underrun 0
   rx  0, nak 0, stall 0, mismatch 0
comp: iso 0, intr 2, ctrl 14, bulk 0
root hub sends 1441
retransmits19
tx restarts19

frame lists: current c0294360, next c0294394
active_qe: 
current: c0294360, total_bytes 0
next: c0294394, total_bytes 0
event message:
event logging: disabled

Nothing that is connected to the hub is detected (obviously)
Does somebody has had some similar problems with 8xx? Might it be
my SOF timing which is not accurate?

thanks for any advise,

Jaap-Jan


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





EXT_DIRECT IDE Mode

2004-02-12 Thread Jaap-Jan Boor

David,

Should there not be a call to the 8xx init function between
#ifdef CONFIG_IDE_EXT_DIRECT / #endif in
driver/ide/ide.c ?
There are a lot such init calls there

Jaap-Jan



On Thu, 2004-02-12 at 19:00, DavidHo at nanometrics.ca wrote:
 The EXT_DIRECT item is already there in the configuration menu.  I thought
 it has been fully implemented in that version, until I saw the functions
 are not being called in platform_init.

 Base on your knowledge, which kernel version has this mode (MPC8xx IDE)
 fully working?

 And do you know the work involved in porting the support to 2.4.18?  I am
 gauging which is the easier route moving all the changes I have already
 made to 2.4.2x or porting the changes to 2.4.18.

 David




  I'm using a variant of the 2.4.18 kernel from timesys.
 
  The kernel is compiled with those settings.  (in your email)
 
  I had to add a call to m8xx_ide_init in m8xx-setup.c at the end of
  platform_init.
 
  I can only find these defines in ide-m8xx.c.  I am thinking there must be
  more to it than the one file.

 Hmm. 2.4.18 is pretty old. I don't know if there's support for MPC8xx IDE!

 CONFIG_IDE_EXT_DIRECT was introduced long (!) after
 CONFIG_IDE_8xx_PCCARD and CONFIG_IDE_8xx_DIRECT.

 Did you add the code for IDE_EXT_DIRECT yourself?

 Steven




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





Booting time

2004-02-10 Thread Jaap-Jan Boor

On Feb 9, 2004, at 2:44 PM, Wolfgang Denk wrote:

 For a standard system with 50 MHz CPU and 50 MHz bus  clock  I  can
 demonstrate  that  it takes not more than 3...4 seconds from power on
 until the first application process is running.

Wolfgang,

What kind of setup is that? A very small ramdisk or flash disk?
Does the (u-) boot loader do extensive ram tests?

thanks,

Jaap-Jan


 Best regards,

 Wolfgang Denk

 --
 See us @ Embedded World, Nuremberg, Feb 17 - 19,  Hall 12.0 Booth 440
 Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
 It is dangerous to be right on a subject  on  which  the  established
 authorities are wrong.-- Voltaire



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





Error encountered when make of gcc-3.3.2

2004-02-05 Thread Jaap-Jan Boor
Thamarai,

you need some patches to cross build gcc 3.x, but better
use crosstool, it includes the patches needed, both
for the compiler and glibc, and a script to build and
install everything.

http://www.kegel.com/crosstool/

Jaap-Jan

On Thu, 2004-02-05 at 07:46, Thamarai Selvan wrote:
 hi all,

 i am currently building my toolchain for powerpc i encountered the
 following error during MAKE
 could anyone help me out in this regard

 Thanks in advance

  ERROR
 
 if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
 /root/Thamarai/gcc-3.3.2/gcc/xgcc -B/root/Thamarai/gcc-3.3.2/gcc/
 -B/usr/local/powerpc-linux/bin/ -B
 /usr/local/powerpc-linux/lib/ -isystem /usr/local/powerpc-linux/include -O2
 -DIN_GCC -DCROSS_COMPIL
 E   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
 -isystem ./include  -fPIC -g
 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I. -I./.
 -I./config -I./../include  -f
 PIC -mstrict-align -DL_muldi3 -c ./libgcc2.c -o libgcc/./_muldi3.o
 In file included from tconfig.h:22,
  from libgcc2.c:36:
 config/rs6000/linux.h:89:20: signal.h: No such file or directory
 In file included from tconfig.h:22,
  from libgcc2.c:36:
 config/rs6000/linux.h:98: error: parse error before stack_t
 config/rs6000/linux.h:98: warning: no semicolon at end of struct or union
 config/rs6000/linux.h:100: error: parse error before uc_sigmask
 config/rs6000/linux.h:100: warning: type defaults to `int' in declaration
 of `uc_sigmask'
 config/rs6000/linux.h:100: warning: data definition has no type or storage
 class
 config/rs6000/linux.h:99: error: storage size of `uc_mcontext' isn't known
 make[2]: *** [libgcc/./_muldi3.o] Error 1
 make[2]: Leaving directory `/root/Thamarai/gcc-3.3.2/gcc'
 make[1]: *** [stmp-multilib] Error 2
 make[1]: Leaving directory `/root/Thamarai/gcc-3.3.2/gcc'
 make: *** [all-gcc] Error 2

  With Regards,
  Thamarai Selvan.G
  (:  91-22-27612571, 27621100 X 4115
 

  Life - endless river of dreams, smiles in the portray of an artist
 - Thams


-- next part --
--- gcc-3.3.1/gcc/config/rs6000/linux.h.orig2003-08-26 10:14:17.0 
-0500
+++ gcc-3.3.1/gcc/config/rs6000/linux.h 2003-08-26 10:22:25.0 -0500
@@ -83,82 +83,7 @@
state data appropriately.  See unwind-dw2.c for the structs.  */

 #ifdef IN_LIBGCC2
-#include signal.h
-
-/* During the 2.5 kernel series the kernel ucontext was changed, but
-   the new layout is compatible with the old one, so we just define
-   and use the old one here for simplicity and compatibility.  */
-
-struct kernel_old_ucontext {
-  unsigned long uc_flags;
-  struct ucontext  *uc_link;
-  stack_t   uc_stack;
-  struct sigcontext_struct uc_mcontext;
-  sigset_t  uc_sigmask;
-};

 enum { SIGNAL_FRAMESIZE = 64 };
 #endif

-#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)  \
-  do { \
-unsigned char *pc_ = (CONTEXT)-ra;
\
-struct sigcontext *sc_;\
-long new_cfa_; \
-int i_;\
-   \
-/* li r0, 0x; sc  (sigreturn old)  */  \
-/* li r0, 0x0077; sc  (sigreturn new)  */  \
-/* li r0, 0x; sc  (rt_sigreturn old)  */   \
-/* li r0, 0x00AC; sc  (rt_sigreturn new)  */   \
-if (*(unsigned int *) (pc_+4) != 0x4402)   \
-  break;   \
-if (*(unsigned int *) (pc_+0) == 0x3800
\
-   || *(unsigned int *) (pc_+0) == 0x3877) \
-  {
\
-   struct sigframe {   \
- char gap[SIGNAL_FRAMESIZE];   \
- struct sigcontext sigctx; \
-   } *rt_ = (CONTEXT)-cfa;\
-   sc_ = rt_-sigctx; \
-  }
\
-else if (*(unsigned int *) (pc_+0) == 0x3800   \
-|| *(unsigned int *) (pc_+0) == 0x38AC)\
-  {
\
-   struct rt_sigframe {\
- char gap[SIGNAL_FRAMESIZE];   \
- unsigned long _unused[2];

mpc 8270 usb

2004-02-04 Thread Jaap-Jan Boor

Hi,

Does anybody have some experience using the
usb controller of the cpm on the 8270?
We see quite some problems (e.g. the cpm stops
transmitting or not generating tx interrupts)

any experience would be welcome,

thanks

Jaap-Jan


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





cant't stop program

2004-01-05 Thread Jaap-Jan Boor

Hi,

I sometimes (!) see the same problem when running from serial
console. Telnet works ok. I did change in my kernel
driver/char/tty_io.c to set noctty = 0;

It seems that in shell/ash.c from busybox the call
(pgrp = tcgetpgrp(fd)) returns an error
code.

Jaap-Jan

On Mon, 2004-01-05 at 05:11, Dan Kegel wrote:
 sun-zj wrote:
  After the denk's instruction, I can run the
  linuxppc-2.4.23 on PPC8xx without too much difficulty. But when running some
  programming , I want to terminate it like I do on PC by press Ctrl+C.
  It doesn't work at all :(. It can work under the U-boot environment. I
  wonder whether this is the
  problem of Linux os Or Kermit?

 I have seem problems like that when running from serial
 console under Busybox.  I think busybox's init is buggy.
 Does the problem happen when you telnet in from another computer,
 or only on a serial console?
 - Dan



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





8270 performance

2003-12-09 Thread Jaap-Jan Boor

On 8-dec-03, at 22:11, Jean-Denis Boyer wrote:


 Ricardo,
 Jaap-Jan,

 I would expect the bogomips number
 to be somewhere near the core clock
 (like 8xx).

 Well, I think the numbers are pretty fair, assuming that the
 bogomips number
 reflect a certain amount of external memory accesses at 66
 MHz external bus
 clock.

 It has more to do with pipelining!
 Hopefully, there ain't any memory access during calibration...
 (except, of course, when the instruction cache is disabled!)

 I didn't look at the documentation, but the execution of a branch
 probably occurs later in the pipeline of a 8260 than for the 860. It
 probably looses one more cycle. The calibration relies on the
 execution speed of function __delay (arch/ppc/kernel/misc.S), which
 loops on a branch instruction 'bdnz'.

 Fortunately, the number of bogomips will increase linearly with the
 core clock.
 (These are approximations)

 For 8260:
  200MHz = 66M bdnz per second = 133BogoMips
  266= 88M = 176
  400= 133M= 266

 For 860:
  50MHz = 25M bdnz per second = 50BogoMips

Ok, that's a nice explanation, thanks!

Jaap-Jan



 Regards,
 
  Jean-Denis Boyer, Eng.
  M5T Centre d'Excellence en T?l?coms Inc.
  4283 Garlock Street
  Sherbrooke (Qu?bec)
  J1L 2C8  CANADA
  (819)829-3972 x241
 


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





busybox problem

2003-12-09 Thread Jaap-Jan Boor

hi,

rc.sh is a script so needs /bin/sh or something
do you use shared libraries? That might give
problems

Jaap-Jan

On Tue, 9 Dec 2003, AlessandroPPC wrote:


 Hi to all,

 To solve a problem with ram root filesystem Wolfgang Denk has suggestes to
 me  to use his
 SELF ramdisk image.
 I have successfully used his package.
 But I have found a problem with BusyBox init, when T have tried to
 customized the init board
 configuration.
 The problem is related to /etc/rc.sh init script, in fact editing rc.sh and
 rebuilding the ramdisk
 image the output init is the following:


   Bummer, could not run '/etc/rc.sh': No such device or directory

 Notice that /etc/rc.sh is present, is an exutable file and has root
 privileges.

 Any suggestion is appreciated.
 R.R.C.S.C.

 Thanks to all
 Regards,
 Alessandro




--
---
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl


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





mpc / linux kernel - user space

2003-12-01 Thread Jaap-Jan Boor

On Fri, 2003-11-28 at 16:42, Dan Malek wrote:
 Jaap-Jan Boor wrote:

  If you want to send a signal to user code, you can use kill_proc()
  I think.

 IMHO, trying to use signals to propagate a hardware interrupt to a
 user application is complicated and has design flaws (what happens
 if the application misses an interrupt or gets blocked for some
 reason).

Fortunately I never used it (that's the 'I think')


 A couple of other methods that I find simple and use extensively
 are multi-threading the application and then using a different
 minor ID device to wait on a read() or ioctl() to simply return.
 The driver just uses the standard sleep/wakeup mechanisms to
 synchronize with the application.

 Another, and I think most useful, method is to implement a select/poll
 entry point in the driver.  It provides the most flexibility when
 waiting for various events, plus provides a timeout should something
 fail to function properly.

Yes, especially the timeout is nice as 'this should never happen'
failures never happens except with the customer

Jaap-Jan



   -- Dan




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





mpc / linux kernel - user space

2003-11-28 Thread Jaap-Jan Boor

Hi Juergen,

What I more ment with 'signal your application process' is you have
a user thread block waiting in the read() system call of your driver
and your driver will wake up that blocking read, so the application
thread returns from read.

If you want to send a signal to user code, you can use kill_proc()
I think.

Jaap-Jan

On Thu, 2003-11-27 at 19:08, Juergen Oberhofer wrote:
 Thank you! You mean that the application should install a signal handler
 and
 the module sends on every interrupt a signal to the application process.
 Do you know, Which function does exist to send a signal? I guess, the
 module has to know the pid of the application process? How can the module
 be informed about it?
 Regards,
 Juergen

 On Thu, 27 Nov 2003, Jaap-Jan Boor wrote:

  Hi Juergen,
 
  That's normally not something you do and I don't know if it's possible.
  Application code normally communicates with your driver code using
  system
  calls (read/write). So either your appl procedure must be part
  of your module, or you must signal e.g. a user thread the timer
  interrupt happened, so the thread can execute that code.
  Hope this helps,
 
  Jaap-Jan
 
 
  On 27-nov-03, at 17:07, Juergen Oberhofer wrote:
 
  
   Hi,
  
   I have a module and an application program in user space:
  
   The Module performs the following task: at init it initializes the cpm
   timer register of the mpc823,
   such that an interrupt is generated every x microseconds. Thus, I
   installed an interrupt handling function f that handles the timer
   interrupts.
  
   My problem is that the module / the interrupt handling function should
   execute a procedure defined in the application program. How can I pass
   a
   pointer (which points to that function) from the appl.program to the
   module, such that the handler can execute this function every x
   milliseconds? I thought to create a procedure in the module that
   accepts
   a function pointer as argument. But how can I achieve, that this module
   procedure is visible to the application program? Does somebody have a
   suggestion or know another way to do it?
  
   Regards,
   Juergen
  
  
 



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





Réf. : Re: mpc / linux kernel - user space

2003-11-28 Thread Jaap-Jan Boor

On Fri, 2003-11-28 at 10:21, Aain_Devarenne%ZODIAC at zodiac.com wrote:
 Hi everybody

 I 'm pending on the same problem as Juergen,
 - How can a User Space Thread Wait for a signaling event set by KERNEL  ?

e.g. issue a read on some device driver (/dev/your driver
which will block until an interrupt has occured.
something like this:

DECLARE_WAIT_QUEUE_HEAD(mydriver_queue);

ssize_t mydriver_read(
struct file *filp,
char *buf,
size_t count,
loff_t *f_pos)
{
/* wait on interrupt */
while (1) {
   interruptible_sleep_on(mydriver_queue);
   if (signal_pending (current))  /* a signal arrived */
   return -ERESTARTSYS; /* tell the fs layer to handle it */
   else break;
}
return 0;
}

void mydriver_irqhandler(unsigned long arg)
{
wake_up_interruptible(mydriver_queue);
}

Jaap-Jan

 - Can an IOCTL return pending,  and then do a completion after the event ?
 - Can we pass an Handle by IOCTL to Kernel from user space ?

 Ps: Calling a pointeur in UserSpce seems a bit weird and unsecure !!!


 Regards Alain Devarenne




 Hi Juergen,

 That's normally not something you do and I don't know if it's possible.
 Application code normally communicates with your driver code using
 system
 calls (read/write). So either your appl procedure must be part
 of your module, or you must signal e.g. a user thread the timer
 interrupt happened, so the thread can execute that code.
 Hope this helps,

 Jaap-Jan


 On 27-nov-03, at 17:07, Juergen Oberhofer wrote:

 
  Hi,
 
  I have a module and an application program in user space:
 
  The Module performs the following task: at init it initializes the cpm
  timer register of the mpc823,
  such that an interrupt is generated every x microseconds. Thus, I
  installed an interrupt handling function f that handles the timer
  interrupts.
 
  My problem is that the module / the interrupt handling function should
  execute a procedure defined in the application program. How can I pass
  a
  pointer (which points to that function) from the appl.program to the
  module, such that the handler can execute this function every x
  milliseconds? I thought to create a procedure in the module that
  accepts
  a function pointer as argument. But how can I achieve, that this module
  procedure is visible to the application program? Does somebody have a
  suggestion or know another way to do it?
 
  Regards,
  Juergen
 
 




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





mpc / linux kernel - user space

2003-11-27 Thread Jaap-Jan Boor

Hi Juergen,

That's normally not something you do and I don't know if it's possible.
Application code normally communicates with your driver code using
system
calls (read/write). So either your appl procedure must be part
of your module, or you must signal e.g. a user thread the timer
interrupt happened, so the thread can execute that code.
Hope this helps,

Jaap-Jan


On 27-nov-03, at 17:07, Juergen Oberhofer wrote:


 Hi,

 I have a module and an application program in user space:

 The Module performs the following task: at init it initializes the cpm
 timer register of the mpc823,
 such that an interrupt is generated every x microseconds. Thus, I
 installed an interrupt handling function f that handles the timer
 interrupts.

 My problem is that the module / the interrupt handling function should
 execute a procedure defined in the application program. How can I pass
 a
 pointer (which points to that function) from the appl.program to the
 module, such that the handler can execute this function every x
 milliseconds? I thought to create a procedure in the module that
 accepts
 a function pointer as argument. But how can I achieve, that this module
 procedure is visible to the application program? Does somebody have a
 suggestion or know another way to do it?

 Regards,
 Juergen




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





Preemptive Kernel and MPC8xx ???

2003-11-26 Thread Jaap-Jan Boor

On Tue, 2003-11-25 at 09:13, Steven Scholz wrote:
 Hi,

  On Mon, 24 Nov 2003, Jaap-Jan Boor wrote:
 
 Yes I do on 2.4.20 and 2.4.22 from kernel.org. So far all seems
 to work but didn't do any measurements on it.
 (I both use the preempt and low-latency patches)
 Have you writting your own device drivers?
 How did you make them preemptable?

I didn't... I still assume the kernel will lock
e.g. the same SIU irq


 Marius Groeger wrote:
  AFAIK, you can pretty much drop the low-latency patch in favor of
  using the lock-breaking patch. It is also available from Robert Love
  at the cited home page.
 How about homemade device drivers when using the lock-breaking patch?

 Thanks!

 --
 Steven Scholz

 imc Measurement  Control   imc Me?systeme GmbH
 Voltastr. 5 Voltastr. 5
 13355 Berlin13355 Berlin
 Germany Deutschland
 fon: +49 30 467090-0Tel: 030 / 467090-0
 fax: +49 30 4631576 fax: 030 / 4631576




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





Preemptive Kernel and MPC8xx ???

2003-11-26 Thread Jaap-Jan Boor

On Wed, 2003-11-26 at 16:08, Steven Scholz wrote:
 Marius Groeger wrote:

  AFAIK, you can pretty much drop the low-latency patch in favor of
  using the lock-breaking patch. It is also available from Robert Love
  at the cited home page.

 Rob Love wrote me:

  Is it correct that your lock-break does basicly the same as Andrew Morton's
  low-latency patches? Where is the big difference?
  
   Yes, basically the same thing.  Lock-break is a version of low-latency
   that is optimized for use with the preemptive kernel.
  
   You might as well just use low-latency, as Andrew is keeping that more
   up to date.

 And that's what I noticed when looking and the download pages...

 That leaves three options:

  (a) Use only preempt-kernel
  (b) Use only low-latency
  (c) Use preempt-kernel + low-latency

 Right?

Yes, I use (c)


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





Preemptive Kernel and MPC8xx ???

2003-11-24 Thread Jaap-Jan Boor

Hi,

Yes I do on 2.4.20 and 2.4.22 from kernel.org. So far all seems
to work but didn't do any measurements on it.
(I both use the preempt and low-latency patches)

Jaap-Jan

On 23-nov-03, at 13:02, Steven Scholz wrote:


 Hi there,

 is somebody actually using the preemptive kernel patches that can be
 found at

 http://www.kernel.org/pub/linux/kernel/people/rml/preempt-kernel/v2.4/

 on MPC8xx boards?

 If so which kernel version?

 Thanks a million!

 Steven




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





Preemptive Kernel and MPC8xx ???

2003-11-24 Thread Jaap-Jan Boor

On Mon, 2003-11-24 at 09:01, Steven Scholz wrote:
 Hi,

  is somebody actually using the preemptive kernel patches ...
 
  Yes I do on 2.4.20 and 2.4.22 from kernel.org. So far all seems
  to work but didn't do any measurements on it.
 So you're using vanilla 2.4.22 on your MPC8xx board!?

yes, am I stupid?

Currently I use smc uart, scc ethernet and a modified
cpm_spi driver (from the great Denx) with interrupt handling,
my 850 board boots ok from nfsroot


  (I both use the preempt and low-latency patches)
 Sound interessting.
 Could you please give me a link to find the mentioned low-latency patches.

it comes from Andrew Morton's page
http://www.zip.com.au/~akpm/linux/schedlat.html

I you have to enable this by hand in arch/ppc/config.in (look at
arch/i386/config.in) with

bool 'Low latency scheduling' CONFIG_LOLAT
dep_bool 'Control low latency with sysctl' CONFIG_LOLAT_SYSCTL
$CONFIG_LOLAT


 Thanks,

 Steven


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





Ramdisk trivial question

2003-11-24 Thread Jaap-Jan Boor

Hi Gianfranco,

Isn't busybox a good option? A large part of your ramdisk
is filled with binaries and libraries (glibc is big)
which can be included in a single static binary (busybox)

Jaap-Jan

On Mon, 2003-11-24 at 11:25, Ing.Gianfranco Morandi wrote:
 Dear friends,

 in our project we have always used the NFS to run linux over an 8260 custom
 board. Now since the activity is almost stable we have tried to build the
 root filesystem on ramdisk. Obviously we have followed all the main rules
 which are contained into several good books, but an important choice is
 always left to the user:  what are the components of filesystem?. The
 answer to this of course depend on several factors which are not the scope
 of this e-mail.

 The question is: The ELDK 2.01 package (which is currently being used in our
 system) is too large to be fitted into a ramdisk, while the minimum
 filesystem does not allow to be used in our midrange application. Does
 anybody have or can indicate where can we find an almost complete filesystem
 scheme (for instance based on the ELDK packages)?

 Any help would be apreciated

 Many thanks

 Gianfranco




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





Preemptive Kernel and MPC8xx ???

2003-11-24 Thread Jaap-Jan Boor

On 24-nov-03, at 17:35, Marius Groeger wrote:


 On Mon, 24 Nov 2003, Jaap-Jan Boor wrote:

 Yes I do on 2.4.20 and 2.4.22 from kernel.org. So far all seems
 to work but didn't do any measurements on it.
 (I both use the preempt and low-latency patches)

 AFAIK, you can pretty much drop the low-latency patch in favor of
 using the lock-breaking patch. It is also available from Robert Love
 at the cited home page.

Yes, thanks, I know.
Is it better? I thought both low-latency and lock-break
do more or less the same.

Jaap-Jan



 Marius

 --
 Marius Groeger mgroeger at sysgo.de
 Project Manager

 SYSGO Real-Time Solutions AG | Embedded and Real-Time Software
 Am Pfaffenstein 14
 55270 Klein-Winternheim, Germany

 Voice: +49-6136-9948-0 | FAX: +49-6136-9948-10
 www.sysgo.de | www.elinos.com | www.osek.de



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





USB for mpc8270/80

2003-11-10 Thread Jaap-Jan Boor

Hi,

I need this too and am looking at the 850/823 USB host driver
which should work on the 8270 as well.

Jaap-Jan

On Mon, 2003-11-10 at 16:17, Chris Simmonds wrote:
 Hi,

 Has anyone got a USB driver for the SCC on the mpc8270/8280? Anyone
 interested in having one if one doesn't exist already?

 Chris.

 --
 Chris Simmonds2net Limited
 chris at 2net.co.uk  http://www.2net.co.uk/
 Tel:   +44 (0)1962 869003 Fax:   +44 (0)870 056 7556
 If it's not connected, it's not effective(tm)




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





linux ram size

2003-09-19 Thread Jaap-Jan Boor

Hi,

I think you just need to pass in your bd_t structure
the proper amount of ram to kernel, so it looks ppc boot
pass someting else (16MB) to the kernel.

Jaap-Jan

On Fri, 2003-09-19 at 12:51, somshekar chandrashekar kadam wrote:
 hi ,

 Ineed to know can i run my linux with 8mb of ram , what
 changes i need to do with my mpc860 linuxppc code as i see he is
 mapping 8mb and again 8mb , totally 16mb he is using , soi am not
 getting anything proper , it hangs after uncompressing the kernel
 ,i use ppcboot .
 my ram size is 8mb
 pls mail to this id

 Thanksin advance
 Somshekar
 ___
 Art meets Anesthesia; Shefali Weds Dr. Raman.
 Rediff Matchmaker strikes another interesting match !!
 Visit http://matchmaker.rediff.com?1




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





mbx860

2003-09-16 Thread Jaap-Jan Boor

look at http://www.denx.de

works great. Includes toolchain, kernel sources and supports
a range of PowerPC processors.
The MBX board is supported by the standard kernel also.

Jaap-Jan


On Tue, 2003-09-16 at 16:10, Amit.Lubovsky at infineon.com wrote:
 Hi,
 I want to run Linux on MBX860-006c,
 Could anyone please let me know from where I can get sources and tool chain
 For this task ?

 Best regards,
 Amit.




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





Unable to mount jffs2 file system

2003-06-16 Thread Jaap-Jan Boor

Rakesh,

in init/main.c you can add to root_dev_names[] your root
device (e.g. mtdblock2 0x1f02).

You have to specify somehow to use this device then, as kernel
parameter. I use root_string in arch/ppc/[mbxboot][simple]/misc.c:

char*root_string = root=/dev/mtdblock2 rw init=/linuxrc;

Jaap-Jan

Rakesh jagota wrote:

 Hi all,

 I am working on custom design board based on IBM405 PPC. I am using OpenBios
 code and Linux -2.4.17 version from montavista. I have compiled the kernel
 with JFFS2 support.

 In linux/drivers/mtd/maps/redwood.c files, we have modified the partitions as
 per our board

 Our board is having 4MB flash and 32MB sdram.

 #define WINDOW_ADDR  0xFFC0
 #define WINDOW_SIZE  0x0040

 we filled the  redwood_flash_partitions structure as below

 name: Redwood kernel, 
 ///dev/mtd0
 offset: 0x0001,
 size:   0x0011

 name: Redwood OpenBIOS Vital Product Data,
 ///dev/mtd1

 offset: 0x,
 size: 0x0001,
 mask_flags: MTD_WRITEABLE

 name: Redwood filesystem, 
 ///dev/mtd2
 offset: 0x0011,
 size: 0x002D

 name: Redwood OpenBIOS,   
 ///dev/mtd3
 offset: 0x003E,
 size: 0x0002,
 mask_flags: MTD_WRITEABLE   /* force read-only */

 i have created a jff2 image and flashed in the mtd2 block. But while booting
 i am  getting kernel panic
 ===

 kernel panic: I have no root and I want to scream

 ===

 how to tell the kernel that the root filesystems is in mtdblock2

 Thanks  Regards,

 rakesh


--
J.G.J. Boor   Anton Philipsweg 1
Software Engineer 1223 KZ Hilversum
AimSys bv tel. +31 35 689 1941
Postbus 2194, 1200 CD Hilversum   mailto:jjboor at aimsys.nl

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





MPC8270

2003-03-06 Thread Jaap-Jan Boor

Hi,

Is there already some experience with linux on the MPC8270
and it's PCI bus?

thanks,

Jaap-Jan

---
J.G.J. Boor
Lucent Technologies Nederland b.v.  Room:  BE-525
Optical Networking Group TMS Data   Phone: +31 (0)35 687 4721
Larenseweg 50, P.O. Box 1168,   Fax:   +31 (0)35 687 5976
1200 BD, Hilversum, The Netherlands mailto:jjboor at lucent.com

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





MTD problem for Intel Flash

2003-02-26 Thread Jaap-Jan Boor

Hi Shenrong,

I have the same problem. I solved it by making a rather ugly
patch. I changed the 8xx reset vector code to first put flash
in Ready state (reset the flash state machine by writing 0x5050)

Jaap-Jan


 Hi,

 I met a problem when using JFFS2/MTD with Intel CFI Flash.I mount
 JFFS2 fs on a MTD partition and copy a file to JFFS2 fs, then umount
 the JFFS2 fs and reboot the system. The bootloader(PPCBoot) crashes
 around the first instruction. I check the Flash with BDI, and find the Flash
 in
 the Status state(i.e. 0x00800080). The Intel CFI Flash is supported in file
 cfi_cmdset_0001.c. After the read/write/erase operations, the Flash is not
 reset to Ready state(what I think is for increasing the performance). This
 doesn't
 happen with AMD CFI Flash(impled in cfi_cmdset_0002.c). Even the umount
 operation(with cfi_intelext_sync() called ) won't reset the Flash to Ready
 state.
 So run from Flash after reboot won't success except Hard reset.

 I think the Flash should be reset to Ready state at least in
 cfi_intelext_sync(), which
 will be called whenever the MTD partition is closed. Maybe I have missed
 sth.
 Any ideas? Thanks.

 Shenrong




---
J.G.J. Boor
Lucent Technologies Nederland b.v.  Room:  BE-525
Optical Networking Group TMS Data   Phone: +31 (0)35 687 4721
Larenseweg 50, P.O. Box 1168,   Fax:   +31 (0)35 687 5976
1200 BD, Hilversum, The Netherlands mailto:jjboor at lucent.com


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





PowerMac vs. Intel for PowerPC Development Host

2003-02-20 Thread Jaap-Jan Boor

Brian,

I think one advantage of using a mac with linuxppc as host (I use that @ home)
is that you can use newer compiler/library versions a little bit more
easy. I wasn't able yet to cross compile gcc-3.x for ppc on Solaris host,
it worked however on the mac.

Jaap-Jan

brian.auld at adic.com wrote:

 A while back I wrote an email to this list regarding development kit
 suggestions. Based mainly on feedback from this email, I am currently moving
 in the Intel/ELDK direction.

 Out of all the feedback I received, only one person suggested developing on
 a PowerMac based Linux box, thus eliminating the need for cross-compiling. I
 have become more interested in this option as some people in our company
 have noted that cross-compiling embedded linux presented problems on past
 projects when it came to building certain 3rd party applications.

 In the Intel vs. Mac debate for a linux development host for embedded ppc
 development, if money was not an issue, would I get more PowerMac
 recommendations??

 Thanks,

 -- Brian


--
J.G.J. Boor  Room:  BE-525
Lucent Technologies Nederland b.v.   Phone: +31 35 687 4721
Optical Networking Group TMS DataFax:   +31 35 687 5976
P.O. Box 1168, 1200 BD, Hilversum, The Netherlands   mailto:jjboor at lucent.com

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





C++ Library recommendations ...

2003-01-28 Thread Jaap-Jan Boor

Jim,

I just use libstd++ coming with gnu g++, it's not too big (shared ~300k)
compared to glibc (shared ~1.2 M)

when linking statically, the linker normally only takes what you need,
so this will be less.

Jaap-Jan


 Hello,

 I have currently have some applications running with glibc/ulibc ...

 For porting purposes I would find it nice if there were some nice and
 small C++ libs supporting basic STL features (sets, vectors, lists) and
 things like iosstreams ...

 Anyone have any recommendations ...

 I believe last time I checked most C++ libs are rather large ??

 Any advice would be great ... thanks ...

 Jim




---
J.G.J. Boor
Lucent Technologies Nederland b.v.  Room:  BE-525
Optical Networking Group TMS Data   Phone: +31 (0)35 687 4721
Larenseweg 50, P.O. Box 1168,   Fax:   +31 (0)35 687 5976
1200 BD, Hilversum, The Netherlands mailto:jjboor at lucent.com


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





Lauterbach ICD In-Circuit Debugger

2003-01-22 Thread Jaap-Jan Boor


 A lot of people suggest to use the Abatron BDI2000 as debug system. I used
 the Lauterbach TRACE32-ICD system with ARM processors without MMU (no
 Linux) and it works extremely well.
 The manufacturer claims it fully supports both the MMU and the Linux kernel
 (see here for more details
 http://www.lauterbach.com/cgi-bin/docloc.pl?file=rtoslinux.pdf). Can
 anybody who used it confirm this point?

I can. You can debug the kernel and e.g. interrupts using virtual
addresses very well, you just have to specify the mapping
(e.g. for ppc map phys 0x to 0xc000)

I've not looked in detail yet to debug user processes.

Jaap-Jan


 Many thanks in advance.


 llandre




---
J.G.J. Boor
Lucent Technologies Nederland b.v.  Room:  BE-525
Optical Networking Group TMS Data   Phone: +31 (0)35 687 4721
Larenseweg 50, P.O. Box 1168,   Fax:   +31 (0)35 687 5976
1200 BD, Hilversum, The Netherlands mailto:jjboor at lucent.com


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





make menuconfig fails.

2003-01-20 Thread Jaap-Jan Boor

 I am following the instructions on penguin PPC ( HYPERLINK
 http://penguinppc.org/embedded/cross-compiling/;
 http://penguinppc.org/embedded/cross-compiling/) and I am getting an error:
 during make menuconfig

 checklist.c:24 dalog.h: no such file or directory

 I do have the file in /usr/src/linux-2.2.14/scripts/lxdialog

 My kernel sources for PPC are under /usr/linuxppc_2_4

 What am I missing?

you may have problems with your ncurses installation

Jaap-Jan

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





Serious Problem: After Uncompresseing Linux..., what's next

2002-12-23 Thread Jaap-Jan Boor


 Hi Folks,

 I think finally i have idea as to why boot process was
 failing. After uncompressing linux image, the code
 execution was aborting with an ESR value of
 0x0800, which stands for ILLEGAL INSTRUCTION.
 When i checked the instruction causing this, i figured
 that, 'tlbia' (0x2384) is the culprit. tlbia is a
 valid instruction in PPC405 instruction set.

 I still don;t understand, how come it is getting
 rejected. Am i missing anything? Can anyone please
 throw some light on this?

I don't know anything about your cpu (405) but make
sure you understand any prerequisites for the tlbia
instruction or what it's function is (may be your
instruction cache is totally invalid after this
instruction or your immu settings are not correct)

Jaap-Jan


 thanks,
 Prakash




 --- Prakash kanthi pkanthi at yahoo.com wrote:
 
  Gary,
 
  I really appreciate your help. Here is what i am
  doing. Sorry it is little long. But was necessasry.
 
  1. I have a boot loader(xrom.elf) of size around
  400KB
  which basically have menu driven tests along with an
  option to jump to linux kernel(zImage.initrd.elf).
 
  2. xrom.elf is compiled to start at 0xfffc and
  jump to 0x to have rest of functionality.
  zImage.initrd.elf is compiled to start at
  0x0040.
 
  3. I load zImage.initrd.elf first and then xrom.elf
  (xilinx tool makes sure that they are loaded to
  corresponding locations based on ELF header).
 
  4. After loading both, i start running xrom.elf and
  it
  shows up a menu in my UART terminal. I jump to linux
  (0x0040).
 
  5. I see that linux is basically reading the board
  info, setting UART, prints some boot messages onto
  it
  and then performs uncompression (gunzip function
  takes
  the rest of linux image and puts the uncompressed
  code
  starting from 0x0).
 
  6. Up untill, everything is ok. After this, control
  jumps to 0x0 and starts executing.
 
  My problems are,
 
  a. Once the uncompression process is done, i am not
  sure if the image is copied to 0x0 (i do see value
  changes in memory starting from 0x0).
  b. As uncompression process is embedded into
  zImage.initrd.elf, i do not objdump does not tell me
  which function it is going to execute after
  uncompression.
 
  Please suggest.
 
  Thanks,
  Prakash
 
 
 
 
 
  --- Gary Thomas gary at chez-thomas.org wrote:
   On Fri, 2002-12-20 at 09:48, Prakash kanthi wrote:
I do have xilinx tools and i am working with
  their
   V2P
product. I completely understands what you are
   said.
But the problem is, right after the
  uncompression
   and
cpy to 0x, i loose total control because
  i
don't have any clue what is getting executed.
   
  
   What sort of things can you do with the Xilinx
   tools?  Is
   there any way to set [hardware] breakpoints or
   single step?
  
And also, i have my boot monitor code at
   0x,
before uncompress process overwrites it. I see
   that
some of that code is getting executed after jump
   to
0x0. I reason i am overwriting 0x0 is because, i
   only
have 8MB RAM.
   
  
   8M should be plenty of RAM.
  
  
 
 
 




---
J.G.J. Boor
Lucent Technologies Nederland b.v.  Room:  BE-525
Optical Networking Group TMS Data   Phone: +31 (0)35 687 4721
Larenseweg 50, P.O. Box 1168,   Fax:   +31 (0)35 687 5976
1200 BD, Hilversum, The Netherlands mailto:jjboor at lucent.com


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





ppc_8xx-gcc 2.95.3 Monta Vista does not do ANY loop unrolling

2002-11-12 Thread Jaap-Jan Boor

Joakim,

Enable loop unrolling by default for 8xx processors is not
a good idea because of the limited instructions cache size.

I think that's also what is recommended in the ppc faq: enable
size optimization (-Os) for 8xx processors gives better performance.

For a 750 or so, it would be good to enable loop unrolling.

Jaap-Jan



 Hi

 I optimized the crc32() in JFFS2(fs/jffs2/crc.h) by manually unrolling
 the crc32 loop. This gave me a speed increase of 22% in mounting JFFS2 FS

 Later Alan Cox pointed out that my changes makes x86 run slower and it turns
 out that on x86 and a fairly new gcc will automatically unroll loops 'where 
 appropriate'

 Removed my hand coded unrolling and added -funroll-loops to the JFFS2 
 Makefile,
 I got similar results as my hand coded unrolling (a little better).

 I therefore conclude that ppc_8xx-gcc 2.95.3 from Monta Vista does not do ANY 
 unrolling
 unless you specify -funroll-loops. Doing this for the whole kernel is NOT a 
 good idea,
 it will run slower due to big increase of size.

 Now I wonder:
 Is this a gcc 2.95.3, PPC or Monta Vista limitation?

 Which compiler will do unrolling 'where appropriate' for 8xx PPC and
 Where can I get a precompiled version?

 The short term solution is to specify -funroll-loops for individual 
 files/directories.
 Obviously JFFS2 should be included, but what else?





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





ppc_8xx-gcc 2.95.3 Monta Vista does not do ANY loop unrolling

2002-11-12 Thread Jaap-Jan Boor


 Jaap-Jan,

 Yes, it's not a good ide to enable -funroll-loops for the whole
 kernel, but some functions should be unrolled anyway, like the crc32()
 function since it won't increase the size very much but will yield
 a significant speed increase.

 So maybe the right way is to identify some loops and enable unrolling on them.

yes (e.g. in fs/jffs2/Makefile)


 Where in the PPC FAQ did you read that -Os for 8xx processors?

http://penguinppc.org/embedded/howto/x1273.html#AEN1346


  Joakim

  Joakim,
 
  Enable loop unrolling by default for 8xx processors is not
  a good idea because of the limited instructions cache size.
 
  I think that's also what is recommended in the ppc faq: enable
  size optimization (-Os) for 8xx processors gives better performance.
 
  For a 750 or so, it would be good to enable loop unrolling.
 
  Jaap-Jan
 
 
  
   Hi
  
   I optimized the crc32() in JFFS2(fs/jffs2/crc.h) by manually unrolling
   the crc32 loop. This gave me a speed increase of 22% in mounting JFFS2 FS
  
   Later Alan Cox pointed out that my changes makes x86 run slower and it 
   turns
   out that on x86 and a fairly new gcc will automatically unroll loops 
   'where appropriate'
  
   Removed my hand coded unrolling and added -funroll-loops to the JFFS2 
   Makefile,
   I got similar results as my hand coded unrolling (a little better).
  
   I therefore conclude that ppc_8xx-gcc 2.95.3 from Monta Vista does not do 
   ANY unrolling
   unless you specify -funroll-loops. Doing this for the whole kernel is NOT 
   a good idea,
   it will run slower due to big increase of size.
  
   Now I wonder:
   Is this a gcc 2.95.3, PPC or Monta Vista limitation?
  
   Which compiler will do unrolling 'where appropriate' for 8xx PPC and
   Where can I get a precompiled version?
  
   The short term solution is to specify -funroll-loops for individual 
   files/directories.
   Obviously JFFS2 should be included, but what else?
  
  
  
  
 





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





ext2fs ramdisk created on Sun/SuSE does not work on PowerPC

2002-08-28 Thread Jaap-Jan Boor

 IP: routing cache hash table of 1024 buckets, 8Kbytes
 TCP: Hash tables configured (established 8192 bind 8192)
 Linux IP multicast router 0.06 plus PIM-SM
 IP-Config: Incomplete network configuration information.
 ip_conntrack (1024 buckets, 8192 max)
 ip_tables: (c)2000 Netfilter core team
 NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
 VFS: Mounted root (ext2 filesystem).
 Freeing unused kernel memory: 56k i~t
 kernel stops

Do you have any debugger attached (bdm?)

Jaap-Jan

 --
 willy


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





occasionally segmentation faults

2002-08-08 Thread Jaap-Jan Boor

Hi Wolgang,

I upgraded to gcc2.95.3 and glibc-2.2.5, same problem.

then I downloaded and installed you eldk, but still
have sometimes the segmentation fault.

My kernel is under suspicion now. I saw eldk also
contains a 2.4.4 kernel (I use 2.4.10)

Did you apply something else then the uart changes to it?

thanks,

Jaap-Jan


  I've some problems with my built cross environment
  from sparc-solaris to powerpc 8xx.
 
  I configured and built gcc2.95.2 and glibc-2.1.3
  and used that to build the file and sh utils etc.

 These versions are pretty old.

 Why don't you use our ELDK,  which  is  available  for  Solaris  host
 environment, too? It's working fine...

 See http://www.denx.de/ELDK/

 Wolfgang Denk



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