Re: Device tree and IRQ for chip on PCI

2008-11-17 Thread Matthias Fuchs
Hi Matteo,

> I have a chip connected on the PCI bus on an MPC512x, but if I get the
> IRQ property from the PCI chip, it is not set up by Linux.
It's not clear to me what you mean by this. 
Do you see an interrupt assigned to your pci device's PCI_INTERRUPT_LINE 
register? Check lspci output.

> The IRQ line goes directly from the chip to the MPC512x uc, so I don't
> know if I should create a separate node just to get the interrupt, or I
No. The pci node in  the DT should be ok.
Because you posted to an embedded list, I need to ask this: are you using a 
custom hardware? Does the DT fit to your board's interrupt / IDSEL routing?

Matthias

> should expect the pci functions to assign it an interrupt based on the
> PCI bus.
>
> The description for the PCI bus is like this:
> pci: [EMAIL PROTECTED] {
> interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
> interrupt-map = <
> // IDSEL 0x15 - Slot PCI
>  0xa800 0x0 0x0 0x1 &ipic 0x0 0x8
>  0xa800 0x0 0x0 0x2 &ipic 0x1 0x8
>  0xa800 0x0 0x0 0x3 &ipic 0x2 0x8
>  0xa800 0x0 0x0 0x4 &ipic 0x3 0x8
>
> >;
>
> interrupt-parent = < &ipic >;
> interrupts = <17 0x8>;
> bus-range = <0 0>;
> ranges = <0x4200 0x0 0xa000 0xa000 0x0
> 0x1000
>   0x0200 0x0 0xb000 0xb000 0x0
> 0x1000
>   0x0100 0x0 0x 0x8400 0x0
> 0x0100>;
> clock-frequency = <6600>;
> #interrupt-cells = <1>;
> #size-cells = <2>;
> #address-cells = <3>;
> reg = <0x80008500 0x100>;
> compatible = "fsl,mpc5121-pci";
> device_type = "pci";
> };

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


Re: SM722 (Lynx3DM+) framebuffer driver

2008-09-18 Thread Matthias Fuchs
Hi Nathael,

your driver seems to be the most complete framebufferdriver for this chip
I heard about :-)

Our driver is currently based on some register dumps by SMI. The chip is 
completely
setup by U-Boot. Because of it's missing generic'ness I did not dare to post it
as a patch to the U-Boot list :-) Finally we are using a stupid framebuffer 
driver
that does absolutely no 722 setup. It just represents the framebuffer driver 
interface.

I will give your driver a try.

On Wednesday 10 September 2008 13:56, Nathael Pajani wrote:
> Hi !
> I know your mail is quite old, but this might still prove useful
> and did you find a solution ?
> Do you finally have a driver ? I'm interested in whatever information you 
> have, 
> even the links to 2.4 kernel code, or code for SM712 chips. Anything at all 
> in 
> fact, so I may try to improve my driver.
> 
> I have this device (Silicon Motion SM722 Lynx3DM+) on a powerPC board from 
> ACTIS 
> Computers.
> 
> You'll find attached a patch with the SMI driver I made.
> It's not as good as it should be, be I have a usable display, being able to 
> use 
> xorg, and it's as much as I managed without a vgabios (which they provide for 
> x86 arch only).
> Note also that uboot on the board does some chip init, so this driver alone 
> may 
> not be useful if you don't already have something.
I assume that you enable access to the memory mapped register in U-Boot, right?
> 
> Note also that for my brain's sake I removed parts handling LynxEM chips from 
> the original code (which was mainly for mips VR5701-SG2 with LynxEM+).
> 
> Have fun, and thank you if you can send in some useful stuff.
> 
> 

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


Re: Reminder: removal of arch/ppc

2008-01-28 Thread Matthias Fuchs
On Saturday 26 January 2008 02:21, Josh Boyer wrote:
> > 4xx:
> > BAMBOO
> 
> Ported (mostly)
> 
> > CPCI405
> 
> Doubt this will be ported.
Of course this will be ported! I will do that in th next weeks.

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


ioremap with cache on 44x

2007-09-21 Thread Matthias Fuchs
Hi,

I want to ioremap some memory on a PCI board with caching from a 440EPx
CPU. Typically ioremap() ends in __ioremap() with the flags set to 
_PAGE_NO_CACHE.
But even without this flag, the remapped range does not use the cache.
Using a BDI2000 debugger I always see the corresponding TLBs with 
caching inhibited.

How can I access PCI memory with caching?

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


Re: PCI target implementation on AMCC PPC CPUs

2007-09-12 Thread Matthias Fuchs
Hi David,

I must admit, that the AMCC PowerPC's PCI interrupt capabilities could
be better:-) In both directions the host CPU has to do PCI
configuration cycles either to generate or acknowledge an interrupt.
The later is problematic for some OS coming from Redmond: you 
have to do pci configuration cycles from interrupt level - and
these OS do not 'like' that. 

In later designs and where possible we also switched to alternative
interrupt mechanisms (GPIO for target to host and gated flags in FPGA
registers for the other direction). Multiple interrupt sources 
are identified by messages that are written to the other sides
memory.

I think we should stop this discussion because its a little bit
off-topic on this list.

Matthias


On Tuesday 11 September 2007 19:32, David Hawkins wrote:
> Hi Matthias,
> 
> > we build a couple of PCI target designs using AMCC PowerPCs.
> > You are right that some things could be better. But ..
> > 
> > On Thursday 06 September 2007 22:26, David Hawkins wrote:
> >> There are several fundamental problems with the AMCC 440EP
> >> acting as a PCI target/slave;
> >>
> >> 2. Look in the data sheet and see if you can figure out
> >> how the host processor can generate an interrupt to
> >> the PowerPC core ... oops, you can't. That kind of
> >> makes it difficult to work with doesn't it.
> >
> > You CAN! You can generate an interrupt to the PowerPC from the host
> > CPU bei writing to the PCI command register. You have to read the user 
> > manual
> > carefully. Perhaps it not that obvious.
> 
> Really!? Someone should tell AMCC tech support then.
> When I failed to find a method (other than hooking up
> an external GPIO), I contacted them and they came to
> the same conclusion (on the 440EP anyway).
> 
> I'll look in the latest user manual to be sure ...
> 
> PPC440EP_UM2000_v1_23.pdf
> 
> p394 has their 'cheesy' implementation of PCI INTA# control;
> toggle a single bit.
> 
> Then backing up a little, p388 has the PCI command register ...
> Nope, no comment there that a write causes an interrupt to
> the PowerPC core.
> 
> Ok, so going back to the UIC in Chapter 10, p224.
> 
> Ah-ha, PCI CMD write generates an interrupt 5!
> 
> So, I stand corrected; the host can generate an interrupt to
> the PowerPC core, and the method is 'cheesier' than the PCI
> INTA# control.
> 
> And my experience with AMCC's tech support is now a notch
> lower, as even they did not offer this as a solution :)
> 
> I sure am glad I changed to a Freescale processor ;)
> 
> Cheers,
> Dave
___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


Re: PCI target implementation on AMCC PPC CPUs

2007-09-11 Thread Matthias Fuchs
Hi David,

we build a couple of PCI target designs using AMCC PowerPCs.
You are right that some things could be better. But ..

On Thursday 06 September 2007 22:26, David Hawkins wrote:
> There are several fundamental problems with the AMCC 440EP
> acting as a PCI target/slave;
> 
> 2. Look in the data sheet and see if you can figure out
> how the host processor can generate an interrupt to
> the PowerPC core ... oops, you can't. That kind of
> makes it difficult to work with doesn't it.
You CAN! You can generate an interrupt to the PowerPC from the host
CPU bei writing to the PCI command register. You have to read the user manual
carefully. Perhaps it not that obvious.

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


HIGHMEM on 440EPx board with 1GB of RAM

2007-05-23 Thread Matthias Fuchs
Hi,

I ran into some trouble with a custom 440EPx board that uses 1GB of RAM 
(SO-DIMM module). The board and kernel port is very identical to the AMCC 
sequoia board.
The kernel (recent version from Denx 2.6 repository) is configured with 
HIGHMEM support.

The most obvious problems are crashes when accessing yaffs2 partitions on NAND 
flashes. This seems to be no NAND or yaffs filesystem issue.

My problems dissapear when passing the mem= kernel parameter with mem=768M. 

In general the system is stable with the full gig of ram and e.g. not using 
yaffs. So I do not believe in a hardware issue.

Can anybody give me a hint where I should start to investigate ?

Matthias


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


Re: Perl

2006-11-24 Thread Matthias Fuchs
Hi Wolfgang,

I used FC4 ppc binaries for some testing. xlibs, xterm and python where 
the first packages I did some tests with. It was just a try to see what 
happens.

FPU emulation was the first I needed (of course). Then I switched to the ELDK 
ppc_4xxFP root filesystem. This makes it even possible to use perl with math:

bash-3.00# perl -e 'print ("sin(pi/2)=",sin(3.14/2),"\n")'
sin(pi/2)=0.99682931835
bash-3.00# perl -e 'print ("sqrt(3)=",sqrt(3),"\n")'
sqrt(3)=1.73205080756888
bash-3.00# cat /proc/cpuinfo
processor   : 0
cpu : 405GPr
clock   : 399MHz
revision: 9.81 (pvr 5091 0951)
bogomips: 495.61
machine : esd CPCI-405
plb bus clock   : 133MHz
pci bus clock   : 33MHz
bash-3.00#  

I would not recommend to use this for production. But its a good starting 
point before turning on the compiler :-)

Matthias

On Friday 24 November 2006 00:00, Wolfgang Denk wrote:
> In message <[EMAIL PROTECTED]> you 
wrote:
> > 
> > there's a quick'n'dirty way to get a perl running on your CPU.
> > Take the Fedora Core 4 ppc binary rpm (perl-5.8.6-15.ppc.rpm) and install 
it 
> > from an ELDK 4 root filesystem:
> 
> This will only work if you are running on a system where your CPU has
> a full-blown CPU,  32  bytes  cache  line  size,  and  your  run-time
> environment (all system libraries) are configured to use the FPU.
> 
> It will fail on  FPU-less  or  FPU-restricted  systems  like  MPC8xx,
> PPC4xx, or MPC85xx.
> 
> > Note: This test has been done on a PPC405. But do not forget to use a 
kernel 
> > with math emulation for this to work. 
> 
> I guess you didn't do much testing. You should try some  mathematics,
> and  you  might  be surprised what happens when your Perl binary uses
> the (emulated) FPU, while the system libraries use soft-float.
> 
> Best regards,
> 
> Wolfgang Denk
> 
> -- 
> Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
> It's all Klatchian to me.
> - Terry Pratchett & Stephen Briggs, _The Discworld Companion_
> 
> 

-- 
---
Dipl.-Ing. Matthias Fuchs esd electronic system design gmbh
http://www.esd-electronics.comVahrenwalder Str. 207
phone: +49-511-37298-0, fax: -6830165 Hannover, Germany
---

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


Re: Perl

2006-11-22 Thread Matthias Fuchs
Hi Lee,

there's a quick'n'dirty way to get a perl running on your CPU.
Take the Fedora Core 4 ppc binary rpm (perl-5.8.6-15.ppc.rpm) and install it 
from an ELDK 4 root filesystem:

bash-3.00# rpm -ihv --nodeps perl-5.8.6-15.ppc.rpm
warning: perl-5.8.6-15.ppc.rpm: Header V3 DSA signature: NOKEY, key ID 
4f2a6fd2
Preparing...### [100%]
   1:perl   ### [100%]
bash-3.00# perl -v

This is perl, v5.8.6 built for ppc-linux-thread-multi

Copyright 1987-2004, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

bash-3.00# perl -e 'print "Hello World!\n";'
Hello World!
bash-3.00#

Note: This test has been done on a PPC405. But do not forget to use a kernel 
with math emulation for this to work. 

Matthias

On Monday 13 November 2006 23:56, Lee Revell wrote:
> I've been trying to cross compile Perl for a PPC440 board and it just
> isn't happening.  Perl is probably the least amenable application to
> cross compiling I've found.
> 
> I tried the instructions in the Cross/ directory of the Perl distro but
> they don't work - "sh Configure" fails on my target because it expects a
> full C development environment, which won't fit.
> 
> Is there any easy solution?  Can someone send me a binary?
> 
> Lee 
> 
___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


Re: Need help to write I2C EEPROM device driver

2006-09-27 Thread Matthias Fuchs
On Wednesday 27 September 2006 16:11, Sachin Rane wrote:
> To access EEPROM using /dev/i2c-, which drivers I need to load?
>  
> Please confirm that I need to load following drivers:
> 1. i2c-core.ko (Core Driver)
> 2. i2c-ibm-iic.ko (Bus Driver)
> 3. i2c-dev.ko (Dev Interface driver)
That looks good.

> Do I need to load 'eeprom.ko'?
No.

> Because in one of the mail from the mailing list, it was mentioned that I 
should not load  ''eeprom.ko" to access the chip using 'dev' interface.
Either use access via /dev/i2c-x or via eeprom driver. I haven't used the 
later one so far. Using both at the same time is probably not possible.

Matthias

>  
> Thanks and Regards,
> Sachin Rane
> 
> 
> 
> From: Matthias Fuchs [mailto:[EMAIL PROTECTED]
> Sent: Wed 9/27/2006 6:21 AM
> To: linuxppc-embedded@ozlabs.org
> Cc: Sachin Rane
> Subject: Re: Need help to write I2C EEPROM device driver
> 
> 
> 
> Hi Sachin,
> 
> there is already a driver for this part in the kernel
> (drivers/i2c/chips/eeprom.c).
> 
> BTW: to do some simple reads and writes to an I2C EEPROM it is very simple 
to
> access the EEPROM via read/write/ioctl through /dev/i2c-. No driver - 
only
> userland code.
> 
> Matthias
> 
> 
> On Tuesday 26 September 2006 16:34, Sachin Rane wrote:
> > Hi,
> > 
> > I am looking for an information to write a device driver to access EEPROM 
IC
> M24C02-WBN6.
> > The EEPROM IC M24C02-WBN is present on the 'ppc440' evaluation board for
> boot strap purpose.
> 
> 
> 
___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


SM722 (Lynx3DM+) framebuffer driver

2006-09-27 Thread Matthias Fuchs
Hi,

does anyone know about a Silicon Motion SM722 framebuffer driver for recent 
2.6 kernels? I found some old and dusty code for the Silicon Motion parts but 
either only for the SM712 or for 2.4 kernels.

Is anyone using that part in a PowerPC system?

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


Re: Need help to write I2C EEPROM device driver

2006-09-27 Thread Matthias Fuchs
Hi Sachin,

there is already a driver for this part in the kernel 
(drivers/i2c/chips/eeprom.c). 

BTW: to do some simple reads and writes to an I2C EEPROM it is very simple to 
access the EEPROM via read/write/ioctl through /dev/i2c-. No driver - only 
userland code.

Matthias


On Tuesday 26 September 2006 16:34, Sachin Rane wrote:
> Hi,
>  
> I am looking for an information to write a device driver to access EEPROM IC 
M24C02-WBN6.
> The EEPROM IC M24C02-WBN is present on the 'ppc440' evaluation board for 
boot strap purpose.
___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


Re: I2C: Getting Compiation Error for application program

2006-09-21 Thread Matthias Fuchs
On Wednesday 20 September 2006 14:51, Sachin Rane wrote:
> Hi,
>  
> I am trying to compile simple program (appended), but getting lots of 
compilation error.
It's always helpful to see the compiler output. Could you post it?

> I am using Timesys Linux 2.6.13 for ppc440 evaluation board. 
>  
> Command used for compilation:
> $> gcc eeprom-client.c -o eeprom-client.o
Are you crosscompiling? Doesn't look like that...
>  
> Could you help me to find out the reason behind getting the errors?
>  
> Regards,
> Sachin Rane
>  
>  
> 
8< eeprom-client.c 
-
>  
> #include 
> #include 
> 
> int main()
> {
>  int file;
>  int adapter_nr = 0; /* probably dynamically determined */
>  char filename[20];
>  int addr = 0xA1; /* The I2C address */
You propably have to use 0x50 here. 
> 
> sprintf(filename,"/dev/i2c-%d",adapter_nr);
> if ((file = open(filename,O_RDWR)) < 0)
>{
>exit(1);
> }
>
> if (ioctl(file,I2C_SLAVE,addr) < 0)
>{
>   exit(1);
>}
>else
>   {
>   printf("\n Able to bind the adapter");
>}
>return 0;
> }

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


Re: Board Bootup and message log

2006-09-18 Thread Matthias Fuchs
On Saturday 16 September 2006 10:19, Sachin Rane wrote:
> Hi,
>  
> I want to access 'EEPROM' I2C device present on AMCC PPC440GX Evaluation 
bard.
> I have loaded following drivers:
> 1. i2c-core.ko
> 2. i2c-dev.ko
> 3. eeprom.ko
> 4. i2c-ibm_iic.ko
> The entry in the 'sysfs' got created for drivers and devices.

> As per the documentation (/usr/src/linux/Documentation/i2c/dev-interface),
> I2C adapter files gets created under "/dev/i2c-X"are with with major device 
number 89.
>  
> But in my case, the device file is not getting created under '/dev/'.
If you do not have some magic daemons running on your board that will do the 
work you have to create the /dev entries by hand.

Please do not post the same message multiple times. Also attachments are often 
not very welcome on mailing lists.

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


could linux support to configure the PLB-PCI bridge of PPC440 into adapter mode

2006-06-20 Thread Matthias Fuchs
Hello chen,

that's how we do it on our boards (a couple of 405GP(r) based adapters).
We normally hide the top meg's of RAM so that it is not used by Linux.
We setup the PLB side of the bridge to point to this RAM so that it is
accessable from the PCI side.

Matthias
> hi Matthias:
>   thank for your reply.
>   according to information you provide, i should set the proper 
> parameter of register of PPC440GX in U-BOOT(I use u-boot as 
> bootloader),such as PAE,PHCE,PISE of SDR0_XCR and BAR etc.  during the 
> time of linux kernel booting, I turn off CONFIG_PCI , let linux kernel 
> don't initialize the PCI bus as host bridge and set PLB address in 
> kernel.  then after the linux system operated, the ppc440gx could act as 
> adapter mode. does my understanding correct?   i really appreciate your 
> help.
> 
> chen



could linux support to configure the PLB-PCI bridge of PPC440 into adapter mode

2006-06-19 Thread Matthias Fuchs
Hi chen,

it's not easy to setup the PCI-to-PLB mapping in a generic way so that 
is gets into the kernel. Also it might be too late when the adapter OS 
configures the bridge. The bridge must be setup quickly after reset so 
that the host OS can assign resources to the card. The bootloader of 
your board might be a good place to setup of the adapter stuff. At least 
number and sizes of the needed address spaces should be setup early.
The PLB address can be setup or modified later (e.g. from the target OS).

> hi,now I want to use PPC440GX as PCI adapter card bridge. according to user 
> manual, the PLB-PCI bridge should be configured to Adapter mode. after 
> check some code of PCI of linux, i find the linux only support configuring 
> the PLB-PCI bridge into HOST mode. Is my understanding correct ? if the 
> normal version of linux don't support the adapter mode, could i found the 
> patch?
Probably not.

Matthias







(Sudo off topic)Simple cheap IDE intrerface for IBM 405

2003-06-26 Thread Matthias Fuchs

Hi Conn,

we attached a CompactFlash socket to the 405's external bus on our CPCI405
CompactPCI board. The board is directly supported by the linuxppc_2_4_devel 
tree.
The tree includes a driver for simple memorymapped CompactFlash cards.

Matthias


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





patch against linuxppc_2_4_devel: ppc405_wdt.c needs to be fixed

2003-06-04 Thread Matthias Fuchs

Hi Kenneth,

it seems that the 405 watchdog does not really work. It's something like a 
soft-watchdog
actually. I did not test it in a loop with irqs off.

At least my patch corrected the ioctls and I get a working software watchdog.
I wonder what happened to the 405 hardware watchdog support.

Matthias

Kenneth Johansson wrote:
> Dose the watchdog actually work ??
>
> What happens when you get into a infinite loop when interrupts are
> turned off?
>


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





patch against linuxppc_2_4_devel: ppc405_wdt.c needs to be fixed

2003-06-04 Thread Matthias Fuchs
Hi,

I noticed that the 405 watchdog driver's ioctl() for GETPERIOD and SETPERIOD
are not working correctly. The ioctls pass the watchdog timer period in 
microseconds.
The variable wdt_period stores the current period in seconds.

The attached patch fixes this behavior.

Matthias
-- next part --
An embedded and charset-unspecified text was scrubbed...
Name: ppc405_wdt.p
Url: 
http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20030604/d08dabd2/attachment.txt
 


register_serial on 405 platform

2003-03-03 Thread Matthias Fuchs

Hi,

I need to register some non-standard serial 16550 UART ports
on a 405GP platform. I noticed that the rs_table in drivers/char/serial.c
has only two entries (used by the on-chip serial ports). So I cannot understand
how I can register further ports without changing the kernel source.

Am I right, that it is currently not possible to register further serial ports
with the 2_4_devel tree on 405 platforms?

Matthias


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





Kernel crash with cardbus bridge

2003-01-15 Thread Matthias Fuchs

Hi,

I am trying to get a TI cardbus bridge running in a CompactPCI system
with a CPCI405 CompactPCI CPU. The version of the pcmcia-cs is 3.2.1.

Loading of the modules works fine. When I insert a card or start the cardmgr 
when
a card is already inserted, the kernel crashes due to an access to address 
0x6000.

Where does this damn address comes from? The PCMCIA card services are hard to 
debug, esspecially
when you did not write them :-) I think its not a bug in the card services but 
in some PCI mappings.

Did anybody got a PCI cardbus bridge working with a recent kernel with 
pcmcia-cs or kernel-builtin PCMCIA?

Any ideas would be fine.

# cardmgr -vf
Oops: machine check, sig: 7
NIP: C00CA720 XER: 2000 LR: C00CA6F8 SP: C1E57660 REGS: c1e575b0 TRAP: 0200 
   Not tainted
MSR: 9030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = c1e56000[53] 'cardmgr' Last syscall: 54
last math  last altivec 
PLB0: bear= 0x6000 acr=   0x besr=  0x0c00
PLB0 to OPB: bear= 0x00088e0c besr0= 0x besr1= 0x

GPR00:  C1E57660 C1E56000  C300A815 C300C000 0002 C1E576C8
GPR08:  C300C000  1000 24002022 10022968  
GPR16:    C00CA94C   C00CAB38 C0254000
GPR24: 0100 C1E576C8 0002 C0254044 C1E576C8 0002 C0254000 
Call backtrace:
C00CA6F8 C00CAE08 C00CB34C C00CB124 C00CCCDC C00CA998 C00CD2F0
C00CD488 C00CABEC C00CA5E4 C00CAE08 C00CB34C C00CB124 C00CCCDC
C00CFD64 C004A73C C000477C 0FF7F998 10001C9C 100035EC 10004D8C
0FECAD14 

Matthias


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





Accessing nvram rom the linux users space

2002-11-13 Thread Matthias Fuchs

Hi Mike,

you probably can check out if the "MTD Test driver using RAM" might
help you. This MTD driver uses memory mapped SRAM (or in your case NVRAM).

But all filesystem bring a huge overhead. With 32K of NVRAM you will not
have much usable place for you data in the files left.

You should consider using part of your flash for storing data in
MTD block devices with filesystems (e.g. JFFS2).

I think the mmap example for the NVRAM that I send to you is a good and efficent
solution for the NVRAM.


Matthias


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





kgdb with 2.4.20pre7 kernel on 405 target

2002-09-17 Thread Matthias Fuchs

Hi,

I am trying to use a cross gdb against a 405 target (CPCI405) using a kgdb 
kernel
on the target. The kernel is exported from bitkeeper this morning.
The host gdb for 405 is version 5.1.1 from the Denx ELDK.

When I boot my target, it stops and waits for the gdb connection. Then
I start ppc_4xx-gdb on my x86 host with vmlinux as argument.

I enter "target remote /dev/ttyS1" at the gdb prompt and get:

Remote debugging using /dev/ttyS0
0xc000d77c in breakinst ()
(gdb)

I thinks that's fine so far. Then I type "c" and my target keeps on booting. My 
gdb says:

(gdb) c
Continuing.
Can't send signals to this remote system.  SIGILL not sent.

What does this mean ? From now on I cannot interupt the target.

Is this a problem with kgdb ?

Matthias


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





[Fwd: Re: How to get rid of unused data in LKM]

2002-07-25 Thread Matthias Fuchs

Hi Dan,

that's a better idea. I think I will do that if there is no way to free
the firmware data from my module.

I found a little code snippet to do kernel file access. It does not seem to be 
that complicated.

Thanks
Matthias


> Couldn't you do a kernel file open during module_init, store the
> PCI device code and close the file?
>
> Regards,
>
> Dan


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





How to get rid of unused data in LKM

2002-07-24 Thread Matthias Fuchs

Hi,

I am writing a LKM that contains a huge constant array of data that is used
as firmware for a PCI card that is connected to the system where the LKM is 
loaded.

The module_init function writes the constant data array into the PCI card's RAM 
and triggers
a CPU on that card to jump to the firmware code. This works fine.

But after doing so, the firmware data is still wasting kernel memory on the 
host system
and is not used anymore.
How can I free that memory ? Is there a better way to handle that data ?
Currently I have a global variable in my module code:

unsigned char firmware[] = { ...,  , about 1.4 Meg, ...}

The firmware data (about 1.4 Meg) must be linked with the LKM.

Any idea ?

Matthias


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





compact flash and true IDE mode

2002-06-17 Thread Matthias Fuchs

Hi Dan,

take a look into the CPCI405 target support in the recent devel tree.
We use a mem'mapped CF card as storage device on many of our boards.

The file linux/drivers/ide/cpci405.c should be a good starting point for your 
work.

Matthias


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





unexpected bahavior with module - relocation problem ?

2002-05-08 Thread Matthias Fuchs

Hi,

I found the problem. It seems to be a problem with the insmod tool in the 
busybox
that I am using on my target (0.61pre from cvs).

Matthias


Matthias Fuchs wrote:

>
> Hi all,
>
> I got a little problem that I cannot really understand.
> I wrote a little device driver for a 405 PPC board. The driver registers
> a miscdevice.
>
> Normally all misc devices are listed under /proc/misc.
> My first attempt resulted in a /proc/misc looking like this:
>
> # cat /proc/misc
> 187  <- "test" is missing here !
> 185 gpio
>
> The code is attached. When I change the init stuff for the miscdevice
> structure
> a little bit (see below with WORKING defined), I got the expected bahavior.
>
> Is this a relocation problem when loading the module ? In the two
> version the NAME string
> sits in different segments. Is there a way to fix the problem by a
> compiler switch ? Is this a PPC issue ?
> I noticed that the Linux rtc driver uses the same code as I do, but it
> does not have the problem.
> The difference is that my code is a lkm and mot compiled into the kernel.
>
> Matthias
>
> ...
>
> #define NAME   "test"
> #define MINOR  187
>
> #ifdef WORKING
> static char name[]=NAME;
> #endif
>
> static struct file_operations my_fops =
> {
> ...
> };
>
> static struct miscdevice my_miscdev =
> {
> #ifdef WORKING
>   name:  name, // results in correct bahavior
> #else
>   name:  NAME, // results in missing module name in /proc/misc
> #endif
>   minor: MINOR,
>   fops:  &my_fops
> };
>
> int __init my_init(void)
> {
>   misc_register(&my_miscdev);
>   return 0;
> }
>
>
> void __exit my_exit(void)
> {
>   misc_deregister(&my_miscdev);
> }
>
> module_init(my_init);
> module_exit(my_exit);
>
>
>
>


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





unexpected bahavior with module - relocation problem ?

2002-05-08 Thread Matthias Fuchs

Hi all,

I got a little problem that I cannot really understand.
I wrote a little device driver for a 405 PPC board. The driver registers a 
miscdevice.

Normally all misc devices are listed under /proc/misc.
My first attempt resulted in a /proc/misc looking like this:

# cat /proc/misc
187  <- "test" is missing here !
185 gpio

The code is attached. When I change the init stuff for the miscdevice structure
a little bit (see below with WORKING defined), I got the expected bahavior.

Is this a relocation problem when loading the module ? In the two version the 
NAME string
sits in different segments. Is there a way to fix the problem by a compiler 
switch ? Is this a PPC issue ?
I noticed that the Linux rtc driver uses the same code as I do, but it does not 
have the problem.
The difference is that my code is a lkm and mot compiled into the kernel.

Matthias

...

#define NAME   "test"
#define MINOR  187

#ifdef WORKING
static char name[]=NAME;
#endif

static struct file_operations my_fops =
{
...
};

static struct miscdevice my_miscdev =
{
#ifdef WORKING
   name:  name, // results in correct bahavior
#else
   name:  NAME, // results in missing module name in /proc/misc
#endif
   minor: MINOR,
   fops:  &my_fops
};

int __init my_init(void)
{
   misc_register(&my_miscdev);
   return 0;
}


void __exit my_exit(void)
{
   misc_deregister(&my_miscdev);
}

module_init(my_init);
module_exit(my_exit);


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





I2C support for 405GP

2002-01-29 Thread Matthias Fuchs

Hello,

is anybody working on the I2C driver for the IBM 405GP ?
The driver was in the 2.4.2 Kernel from Montavista, but it dissapeared
from the devel tree a long time ago. I tried to take that old sources
and merged the i2c stuff into a more recent 2.4 devel kernel. It did not work.

This leads to some questions:

1) Is anybody currently workig on this issue ?
2) Does anybody have a local working i2c driver for the 405 ?
3) Is there a special reason why the i2c support dissapeared ?

I read sometime ago on the i2c project site, that they care about the 405
i2c driver. Is this true ?

Matthias

--
-

 _/_/_/_/   Matthias Fuchs
_/_/_/_/   Dipl.-Ing.
   _/_/_/_/   matthias.fuchs at esd-electronics.com

   _/_/_/   _/_/_/_/_/_/_/  esd electronic system design gmbh
 _/   _/  _/ _/Vahrenwalder Str. 207
_/   _/_/_/_/   _/   _/   D-30165 Hannover
_/ _/  _/   _/   Phone: +49-511-37298-0
 _/_/_/_/_/_/_/   _/_/_/Fax:   +49-511-37298-68

-


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





a MINIMAL405 submodel

2002-01-16 Thread Matthias Fuchs

Hi David,

what do you mean by a peripheral-less 405gp ? It is possible to deselect all 
OCP functions
from the kernel config. You do not need a new plattform to do this.

I am using the current 2.4.x devel tree with the CPCI405 config on a custom 
405CR board.
The 405CR does not have PCI or Ethernet. So its nearly a peripheral-less GP. I 
only had to deselect PCI and
Ethernet.

So why a new plattform ?

Matthias

--
-

 _/_/_/_/   Matthias Fuchs
_/_/_/_/   Dipl.-Ing.
   _/_/_/_/   matthias.fuchs at esd-electronics.com

   _/_/_/   _/_/_/_/_/_/_/  esd electronic system design gmbh
 _/   _/  _/ _/Vahrenwalder Str. 207
_/   _/_/_/_/   _/   _/   D-30165 Hannover
_/ _/  _/   _/   Phone: +49-511-37298-0
 _/_/_/_/_/_/_/   _/_/_/Fax:   +49-511-37298-68

-


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





filesystem for battery-buffered SRAM

2001-10-22 Thread Matthias Fuchs

Hi,

I have to setup an embedded Linux box that uses 1MB of battery buffered
SRAM to store nonvolatile data.
This memory is directly mapped into addressspace and needs no magic
things to read or write to it.

What might be the best choice for a filesystem and how can I setup a
ramdisk
at a special memory location ?
Is MTD able to access normal RAM devices (no FLASH, but SRAM) ?

Matthias


--
--

 _/_/_/_/   Matthias Fuchs
_/_/_/_/   Dipl.-Ing.
   _/_/_/_/   matthias.fuchs at esd-electronics.com

   _/_/_/   _/_/_/_/_/_/_/  esd electronic system design gmbh
 _/   _/  _/ _/Vahrenwalder Str. 207
_/   _/_/_/_/   _/   _/   D-30165 Hannover
_/ _/  _/   _/   Phone: +49-511-37298-0
 _/_/_/_/_/_/_/   _/_/_/Fax:   +49-511-37298-68

--

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





status of gdb with recent linuxppc devel kernel for 405GP

2001-10-08 Thread Matthias Fuchs

Hi,

is it currently possible to use gdb with the recent devel version of the
405GP kernel ?
It seems not, am I right ?

Some weeks ago somebody send me a patch for the old 2.4.2 kernel to get
gdb working. Is this checked in already ?

Matthias

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





simple access to mem mapped peripheral

2001-10-04 Thread Matthias Fuchs

Hi Pierre,

thanks. mmap is working fine for my problem ! I wonder why lseek'ing and
reading does not work.

Matthias


Pierre AUBERT wrote:

> I think that you can try the mmap function :
>
> int mmap_fd;
>
> /* Open the memory device and mmap the chip registers */
> if ((mmap_fd = open("/dev/mem", O_RDWR)) < 0 ) {
> perror("open(/dev/mem)");
> exit(1);
> }
> ptr = (chip_register *)mmap(NULL, CHIP_MEM_SIZE,
>   (PROT_READ|PROT_WRITE),
>   MAP_SHARED, mmap_fd, CHIP_PHYSICAL_ADDRESS);
> if ( ((int)ptr) < 0 ) {
> perror("mmap()");
> close(mmap_fd);
> exit(1);
> }
> else {
>
> /* Read and write your chip registers ... */
>
> munmap (ptr, CHIP_MEM_SIZE);
> close(mmap_fd);
> }
>

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





simple access to mem mapped peripheral

2001-10-04 Thread Matthias Fuchs

Subodh Nijsure wrote:
>
> Hello,
>
> May be try this?
>
> chip_registerbase = (unsigned
> long)ioremap_nocache(CHIP_PHYSICAL_ADDRESS,
> CHIP_MEM_SIZE);
> printk("Linux kernel Memory mapped base register %lX \n",
> chip_registerbase);
>
> Then you can read and write to your chip via *chip_registerbase
>

Sorry, but I forgot to say that I need a way to access the peripheral
from userspace without writing a
kernel module. I need it only for a simple test and therefore it does
not make sense to me to write a driver.

Of course, writing a driver is not htat dirty :-)

Matthias

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





simple access to mem mapped peripheral

2001-10-02 Thread Matthias Fuchs

Hi,

I need a "very simple" way to access a mem mapped peripheral. The device
is mem mapped at 0xf020.
I was trying /dev/mem but this dev only accesses my physical memory
chips.

My target is a ppc405gp running recent kernel 2.4.10.

Any idea ?

Matthias

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





405CR stability?

2001-05-07 Thread Matthias Fuchs

Hi Bryan,

I think you are looking for someone like me :-) I am using MontaVista
2.4.2 kernel on our 405CR custom board.
The board uses an 4MB initrd that comes from flash.

What is your problem ?

Matthias

Bryan Rittmeyer wrote:
> Is anyone successfully using the MontaVista
> kernel sources with a 405CR board? I ask because
> I am seeing strange ramdisk/filesystem-related
> problems with the 405CR that are not present
> when running the same sources on my Walnut's
> 405GP.
>
> If you are using a 405CR with an initrd, please
> let me know. I'm also curious if there are any
> commercially availible evaluation boards for the
> 405CR...

--
-----
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --

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






compiler warning

2001-03-21 Thread Matthias Fuchs

Hi,

I do not understand this compiler warning:

/tmp/ccu149sf.s: Assembler messages:
/tmp/ccu149sf.s:5: Warning: Ignoring changed section attributes for
.modinfo

It appears everytime, when I use the ppc_4xx-gcc from MontaVista.
What does it mean ? Do I have to take care aboutit ?

Matthias

--
-
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --

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






possible problem in memory management

2001-03-21 Thread Matthias Fuchs
Hi,

in the last days we noticed some strange memory problems with Monta
Vista's kernel port for the IBM405GP/CR (kernel 2.4.2 and 2.4.0). Some
userspace programs crash when calling free() and the bash shell cannot
startup because it does not get memory (see attached bootlog).

Here aresome examples:

1) While unloading a custom kernel module, we get:
Trying to vfree() nonexistent vm area (da03c000). We had no problems on
x86 architecture and 2.4.0-test2.

2) see attached bootlog.

3) When using busybox 0.50, the busybox shell crashes, when the command
buffer is free()ed. This is for example done, when you press return at
the console. I put a debug message right before the free and behind it
and only the message before the free is printed !

We are shure that these problem have something todo the 2.4.x kernel for
the 405 !

Are problems like this known and solved issues ?

Matthias
--
-----
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --
-- next part --


ppcboot 0.7.1 (Jan  8 2001 - 16:20:48)

Initializing...
  CPU:   IBM PowerPC 405GP Rev. C at 198 MHz (PLB=99, OPB=49, EBC=33 MHz)
   PCI sync clock at 33 MHz, internal PCI arbiter enabled
   16 kB I-Cache 8 kB D-Cache
  Board: ### No HW ID - assuming CPCI405
  FPGA:  cpci4052.ncd s05xlvq100 2000/11/29 14:57:32
  DRAM:  16 MB
  FLASH:  4 MB
  IDE:   Bus 0: OK
Device 0: Model: SanDisk SDCFB-64  Serial #: 213006F040  Capacity: 61.3 MB 
= 0.1 GB
  Input:  serial
  Output: serial

Hit any key to stop autoboot:  3  2  0
=> bootp
ENET Speed is 10 Mbs...
HALF duplex connection
BOOTP broadcast 1
ARP broadcast 1
TFTP from server 10.0.5.190; our IP address is 10.0.3.176
Filename '/tftpboot/pImage'. Size is 580 kB => 91000 Bytes
Load address: 0x10
Loading: 
*
done

=> bootm
## Booting Linux kernel at 0010 ...
   Image Name:   Test-Image
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:593782 Bytes = 579 kB = 0 MB
   Load Address: 
   Entry Point:  
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
--  progress:  0x200 id mach(): done
Linux version 2.4.2-mvista_010303 (frank at pc-linux-dev) (gcc version 2.95.2 
19991030 (2.95.3 prerelease/franzo)) #7 Tue Mar 20 20:43:35 CET 2001
--  progress:  0x3eab setup_arch: enter
--  progress:  0x3eab setup_arch: bootmem
--  progress:  0x3eab arch: exit
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: bootargs1=root=/dev/nfs 
ip=10.0.3.176:10.0.5.190:10.0.0.79:255.255.0.0 
nfsroot=10.0.5.190:/opt/hardhat/devkit/ppc/4xx/target
Warning: real time clock seems stuck!
Calibrating delay loop... 197.83 BogoMIPS
Memory: 14500k available (1064k kernel code, 436k data, 64k init, 0k highmem)
Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 1024 (order: 1, 8192 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
PCI: Cannot allocate resource region 0 of device 00:00.0
PCI: Cannot allocate resource region 2 of device 00:00.0
PCI: Cannot allocate resource region 3 of device 00:00.0
PCI: Cannot allocate resource region 4 of device 00:00.0
PCI: Cannot allocate resource region 5 of device 00:00.0
--  progress:  0x
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Starting kswapd v1.8
i2c-core.o: i2c core module
i2c-dev.o: i2c /dev entries driver module
i2c-core.o: driver i2c-dev dummy driver registered.
pty: 256 Unix98 ptys configured
block: queued sectors max/low 9554kB/3184kB, 64 slots per queue
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: enabling 8 loop devices
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
cpci405ide: physical address=f010
cpci405ide: mapped address=da00
ide0: CPCI405 IDE interface
hda: SanDisk SDCFB-64, ATA DISK drive
ide0 at 0xda00-0xda07,0xda0e on irq 31
hda: 125440 sectors (64 MB) w/1KiB Cache, CHS=490/8/32
Partition check:
 hda: hda1
phy speed read failed
phy duplex read failed
<5>eth0: PPC405 EMAC 10 Mbs Half duplex MAC 00:02:27:00:00:6b
Serial driver version 5.02 (2000-08-09) with M

i2c driver problem

2001-03-20 Thread Matthias Fuchs

Hi,

I have a little problem with the Linux i2c driver (IBM405CR CPU,custom
board, internal i2c port with MontaVista's hardhat Linux, kernel 2.4.0).
Here is my test programm. It tries to access a serial EEPROM (cytalyst
24WC08) with i2c address 0x101rw.

#define I2C_EEPROM_ADDR 0xa0
#define I2C_DEVICE  "/dev/i2c-0"

int i2c_test()
{
  int i;
  int result;
  int addr;
  char buffer[I2C_EEPROM_SIZE];

  /* open i2c device */
  if ((fd_i2c = open(I2C_DEVICE,O_RDWR)) < 0)
{
  perror("open i2c device: ");
  return -1;
}

  /* set i2c slave address (0xa0 for a catalyst serial eeprom 24wc08,
first bank) */
  addr = I2C_EEPROM_ADDR >> 1;

  if (ioctl(fd_i2c,I2C_SLAVE,addr) < 0)
{
  perror("ioctl I2C_SLAVE: ");
  return -1;
}

  /* write address pointer in eeprom (bank 0, first byte) */
  buffer[0]=0;
  result = write(fd_i2c,buffer,1); /* write addresse pointer */
  printf("address pointer set to 0, result=%d\n",result);

  /* read the first 64 bytes from eeprom */
  result = read(fd_i2c,buffer,64);
  printf("read %d out of 64 bytes\n",result);

  for(i=1; i<=64; i++)
{
  printf("%02x ",buffer[i-1]);
  if ((i % 32)==0)
printf("\n");
}

  close(fd_i2c);
  return 0;
}

This program outputs that a NACK is received during the transfer of the
i2c address.
Did I misunderstood the i2c driver interface ? I can access the EEPROM
from within my bootloader (ppcboot) with no problems.

My proc/bus/i2c looks ok !

Is this a bug in the i2c driver ?

Matthias
--
-
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --

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





flash writing with Linux

2001-03-19 Thread Matthias Fuchs

Hi Subodh,

Subodh Nijsure wrote:
>
> Perhaps you can take a look at mtd and use that to manage your flash.
> With mtd you can partition your flash to different devices and erase them
> selectively.
What is mtd ? Never heard of before !
>
> Once you have your flash partitioned you can simply cat a file to /dev/mtd#
> to copy new content to the flash.
That sounds nice and seems to be same like the stuff Wolfgang offered in
his 2.4.3-preX patch.

Matthias


--
-----
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --

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






losing interrupts - printk is bad

2001-03-19 Thread Matthias Fuchs

Hi,

I got a nice problem: I am working on an embedded PPC board (IBM405CR)
with a serial console (115200 baud). While I was testing some new driver
code, I made a lot of prink debugging output - as we all like to do :-)
My problem is, that I always lose some bytes on an other serial port. I
found out that printk waits until the complete format string is send
through the console. That takes about 5 ms for 40 bytes. During this
time printk blocks the interrupts !!! That means some incomming data on
the other serial port can be (and is) lost. This is a very strange
problem.

Well first would be glad to get a good workaround. Well, a 'klogd -c 1'
turn off all the debuggin and printk is much faster, but I need the
debugging output.

Second, could anybody explain t ome, what klogd is doing ? It would be
glad to get klogd read all the debugging output from the kernel and
output the data from user space (well buffered and not blocking the
whole system). It seems that klogd cannot do that, am I right ?

Matthias

--
-----
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --

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






flash writing with Linux

2001-03-16 Thread Matthias Fuchs

Hi,

does anybody know if a flash writing tool for Linux is available ?
I want to update a flash image from a running Linux. The Linux is
running from a ramdisk, so the flash can be erased and rewritten.

I think what I need are two thing: A device driver for accessing the
flash and a command line tool for erasing and writing to the flash.

Matthias
--
-
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --

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






compiling 2.4.0 for IBM405CR problem

2001-03-15 Thread Matthias Fuchs

Hi,

while building a kernel from the MontaVista sources (2.4.0) for the
IBM405CR I got these undefined references:

arch/ppc/kernel/kernel.o: In function `time_init':
/home/matthias/canbtgw/linux/linux_01.02.16/arch/ppc/kernel/time.c:326:
undefined reference to `isa_io_base'
/home/matthias/canbtgw/linux/linux_01.02.16/arch/ppc/kernel/time.c:326:
undefined reference to `isa_mem_base'
/home/matthias/canbtgw/linux/linux_01.02.16/arch/ppc/kernel/time.c:326:
undefined reference to `pci_dram_offset'
make: *** [vmlinux] Error
1

What can I do ?

Matthias
--
-----
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --

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






I2C for IBM405CR under Hardhat Linux

2001-03-15 Thread Matthias Fuchs

Hello,

I am trying to access my i2c eeprom (custom board) from MotaVista's
HardHat Linux (kernel 2.4.0-test2).

Here is a snippet from my kernel config:
#
# I2C support
#
CONFIG_I2C=y
# CONFIG_I2C_ALGOBIT is not set
# CONFIG_I2C_ALGOPCF is not set
CONFIG_I2C_CHARDEV=y

How can I enable i2c support for the 405 ? /proc/bus/i2c is empty. I
expect the 405 i2c adapter listed there ! Am I right ?

Matthias
--
-----
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --

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





4MB initrd crashes linux on 405 hardhat linux

2001-01-04 Thread Matthias Fuchs

Hello,

I want to use an initial ramdisk (4 MB) on a IBM405 board. I am using
Monta Vistas Hardhat Linux (kernel 2.4.0-test2).
I have no problems with ramdisk with up to 2MB. They are working fine !
Here are the startup messages of my kernel, when it crashes. I put some
debug messages in the source to see where it crashes. I found out that
the kernel crashes while unpacking the compressed image.

Linux version 2.4.0-test2_mvista_001126 (matthias at pc-linux-dev) (gcc
version 2.95.2 19991024 (release)) #55 Don Jan 4 18:30:
57 CET 2001
--  progress:  0x3eab setup_arch: enter
--  progress:  0x3eab setup_arch: bootmem


   -  KGDB not requested  -

--  progress:  0x3eab arch: exit
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram console=ttyS0,115200
Calibrating delay loop... 199.88 BogoMIPS
Memory: 13440k available (1096k kernel code, 520k data, 168k init)
[c000,c100]
Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 1024 (order: 1, 8192 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
--  progress:  0x
Linux NET4.0 for Linux 2.3
Based upon Swansea University Computer Society NET3.039
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
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 1024 bind 1024)
Starting kswapd v1.6
i2c-core.o: i2c core module
i2c-dev.o: i2c /dev entries driver module
i2c-core.o: driver i2c-dev dummy driver registered.
pty: 256 Unix98 ptys configured
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: registered device at major 7
loop: enabling 8 loop devices
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 50MHz system bus speed for PIO modes; override with
idebus=xx
cpci405ide: physical address=f010
cpci405ide: mapped address=da00
ide0: CPCI405 IDE interface
phy speed read failed
phy duplex read failed
<5>eth0: PPC405 EMAC 10 Mbs Half duplex MAC 00:02:27:00:00:67
do rd_image_load
do identify_ramdisk_image
RAMDISK: Compressed image found at block 0
identify_ramdisk_image done
do crd_load
do gunzip, inbuf= c0223000
flush_window ...0
copy from c0278000 to c0224000  (these are the read an write addresses
from the copy_from_user call in the ramdisk driver)
copy done
copy from c0278400 to c0224400
copy done
copy from c0278800 to c0224800
copy done
copy from c0278c00 to c0224c00
copy done
copy from c0279000 to c0276000
copy done
copy from c0279400 to c0276400
copy done
copy from c0279800 to c0276800
copy done
copy from c0279c00 to c0276c00
copy done
copy from c027a000 to c0275000
copy done
copy from c027a400 to c0275400
copy done
copy from c027a800 to c0275800
copy done
copy from c027ac00 to c0275c00
copy done
copy from c027b000 to c0274000
copy done
copy from c027b400 to c0274400
copy done
copy from c027b800 to c0274800
copy done
copy from c027bc00 to c0274c00
copy done
copy from c027c000 to c0273000
copy done
copy from c027c400 to c0273400
copy done
copy from c027c800 to c0273800
copy done
copy from c027cc00 to c0273c00
copy done
copy from c027d000 to c0272000
copy done
copy from c027d400 to c0272400
copy done
copy from c027d800 to c0272800
copy done
copy from c027dc00 to c0272c00
copy done
copy from c027e000 to c0271000
copy done
copy from c027e400 to c0271400
copy done
copy from c027e800 to c0271800
copy done
copy from c027ec00 to c0271c00
copy done
copy from c027f000 to c027
copy done
copy from c027f400 to c0270400
copy done
copy from c027f800 to c0270800
copy done
copy from c027fc00 to c0270c00
copy done
written !
flush_window ...8000
copy from c0278000 to c026e000
copy done
copy from c0278400 to c026e400
copy done
...
...
copy from c027f800 to c0dee800
copy done
copy from c027fc00 to c0deec00
copy done
written !
flush_window ...278000
copy from c0278000 to c0ded000
copy done
copy from c0278400 to c0ded400
copy done
copy from c0278800 to c0ded800
copy done
copy from c0278c00 to c0dedc00
copy done
copy from c0279000 to c0dec000
copy done
copy from c0279400 to c0dec400
copy done
copy from c0279800 to c0dec800
copy done
copy from c0279c00 to c0decc00
copy done
copy from c027a000 to c0deb000
copy done
copy from c027a400 to c0deb400
copy done
copy from c027a800 to c0deb800
copy done
copy from c027ac00 to c0debc00
copy done
NIP: C00153D4 XER: 2000 LR: C00153D0 REGS: c0219270 TRAP: 1100
MSR: 1230 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = c0218000[1] 'swapper' Last syscall: 120
last math  last altivec 
GPR00:  C0219320 C0218000 0001 9230 C0219358 C0219378
01234567
GPR08: C0218000 C0007488  C0219368  7100 
0400
GPR16:  3000 5000 0100 1000 

mount via nfs using MontaVista's Linux for IBM405

2000-12-06 Thread Matthias Fuchs

Hello Frank,

I tried the nolock option for the mount command. It does not really
work, only sometimes, not very
frequently.

Here is exactly how I do the mount:

mount -t nfs -o nolock -v 192.168.2.190:/home/matthias/canbtgw
/home/matthias

(All directories exist, mounting from other computers is working.)

Here is the output:

  nfs warning: mount version older than kernel
  192.168.2.190:/home/matthias/canbtgw on /home/matthias type nfs
(rw,nolock,addr=192.168.2.190)
... long time later ...
  VFS: Close: file count is 0
  VFS: Close: file count is 0
... long time later ...
  VFS: Close: file count is 0

... mount never returns ...

Any further idea ?

Matthias

Frank Rowand wrote:
>
> Matthias Fuchs wrote:
> >
> > Hello,
> >
> > I am trying to mount a directory from a nfs server to my IBM405GP board.
> >
> > Here are the facts:
> >
> > Kernel on our 405 board: 2.4.0-test2_mvista_001126
> > Root filesystem: target_ftest4 from MontaVista
> >
> > When I do a: mount -t nfs :/home/matthias /test on the
> > 405 board, I get this output (after some delay):
> >
> > nfs warning: mount version older than kernel
> > portmap: server localhost not responding, timed out
> > portmap: server localhost not responding, timed out
> > lockd_up: makesock failed, error=-5
> >
> > But I can still telnet to the board (it does not crash) but I cannot
> > interrupt the mount call.
> >
> > The nfs server is working properly, because I get the root filesystem
> > from the same server (with no problems).
> >
> > Has anybody a solution for this problem ?
> >
> > Matthias
> > --
>
> Add the "-o nolock" option to the mount command.
>
> -Frank
> --
> Frank Rowand 
> MontaVista Software, Inc

--
-
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --

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





mount via nfs using MontaVista's Linux for IBM405

2000-12-05 Thread Matthias Fuchs

Hello,

I am trying to mount a directory from a nfs server to my IBM405GP board.

Here are the facts:

Kernel on our 405 board: 2.4.0-test2_mvista_001126
Root filesystem: target_ftest4 from MontaVista

When I do a: mount -t nfs :/home/matthias /test on the
405 board, I get this output (after some delay):

nfs warning: mount version older than kernel
portmap: server localhost not responding, timed out
portmap: server localhost not responding, timed out
lockd_up: makesock failed, error=-5

But I can still telnet to the board (it does not crash) but I cannot
interrupt the mount call.

The nfs server is working properly, because I get the root filesystem
from the same server (with no problems).

Has anybody a solution for this problem ?

Matthias
--
-
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --

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





usb chipset

2000-08-24 Thread Matthias Fuchs

Hi,

I nearly have the same problem. I need USB support for an PPC405CR
platform ! As far as I know. only PCI USB chipsets (OHCI/UHCI) are
supported by linux. It is also a little problem to get usb host
controller other than PCI chips (I am not sure if you need a masteror
slave chip). But a solution seams to be at the horizont.
The USB host/slave chips from scanlogic (SL11H/S and SL811). I read that
softconnex will write some linux drivers for those chips. But I am sure,
not under the GPL. So it would be nice if someone would do that under
the GPL.

Matthias


Gary Swanson wrote:
>
> Hello,
>
> I hope this isn't an inappropriate newbie question, but here goes.
>
> We have been developing solutions using a PowerPC823, which has on chip
> USB support, but we are starting another development with the PowerPC
> 855, which I understand doesn't have on-chip USB support.
>
> My question is; are there external USB chipsets that we can use that are
> already supported by the 2.2.14 kernel (from the MontaVista CDK 1.2), or
> does anyone have any recommendations for a chipset that would make the
> USB support as straightforward as possible ?
>
> Thank you,
>
> Gary
>

--
-----
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --

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





making kernel for ppc405gp from montavista sources

2000-07-05 Thread Matthias Fuchs

Hello,

I downloaded the linux_tar.gz file from montavista and unpacked it ! I
copied the .config file from the same location to the kernel tree's
root. Before I did a "make mrproper".

When I run a "make dep" I got an error ! Well, I could start to check
out if there is an error in the tree, but I think that there is a
general mistake I made !

Does anybody know where the error comes from ? Here is the output of my
"make dep":

--
mfuchs at pc-matthias:~/mvista_405_linux_new/linux > make dep
make -C arch/ppc/boot fastdep
make[1]: Entering directory
`/home/mfuchs/mvista_405_linux_new/linux/arch/ppc/boot'
/home/mfuchs/mvista_405_linux_new/linux/scripts/mkdep *.[Sch] > .depend
make[1]: Leaving directory
`/home/mfuchs/mvista_405_linux_new/linux/arch/ppc/boot'
make -C arch/ppc/chrpboot fastdep
make[1]: Entering directory
`/home/mfuchs/mvista_405_linux_new/linux/arch/ppc/chrpboot'
/home/mfuchs/mvista_405_linux_new/linux/scripts/mkdep *.[Sch] > .depend
make[1]: Leaving directory
`/home/mfuchs/mvista_405_linux_new/linux/arch/ppc/chrpboot'
make -C arch/ppc/treeboot fastdep
make[1]: Entering directory
`/home/mfuchs/mvista_405_linux_new/linux/arch/ppc/treeboot'
/home/mfuchs/mvista_405_linux_new/linux/scripts/mkdep *.[Sch] > .depend
make[1]: Leaving directory
`/home/mfuchs/mvista_405_linux_new/linux/arch/ppc/treeboot'
scripts/mkdep init/*.c > .depend
scripts/mkdep `find /home/mfuchs/mvista_405_linux_new/linux/include/asm
/home/mfuchs/mvista_405_linux_new/linux/include/linux
/home/mfuchs/mvista_405_linux_new/linux/include/scsi
/home/mfuchs/mvista_405_linux_new/linux/include/net -follow -name \*.h !
-name modversions.h -print` > .hdepend
make _sfdep_kernel _sfdep_drivers _sfdep_mm _sfdep_fs _sfdep_net
_sfdep_ipc _sfdep_lib _sfdep_arch/ppc/kernel _sfdep_arch/ppc/mm
_sfdep_arch/ppc/lib _FASTDEP_ALL_SUB_DIRS="kernel drivers mm fs net ipc
lib arch/ppc/kernel arch/ppc/mm arch/ppc/lib"
make[1]: Entering directory `/home/mfuchs/mvista_405_linux_new/linux'
make -C kernel fastdep
make[2]: Entering directory
`/home/mfuchs/mvista_405_linux_new/linux/kernel'
make[2]: *** No rule to make target
`/home/mfuchs/mvista_405_linux_new/linux/include/linux/autoconf.h',
needed
by
`/home/mfuchs/mvista_405_linux_new/linux/include/linux/modules/signal.ver'.
Stop.
make[2]: Leaving directory
`/home/mfuchs/mvista_405_linux_new/linux/kernel'
make[1]: *** [_sfdep_kernel] Error 2
make[1]: Leaving directory `/home/mfuchs/mvista_405_linux_new/linux'
make: *** [dep-files] Error 2
mfuchs at pc-matthias:~/mvista_405_linux_new/linux >
------

thanks for advise
Matthias

--
-
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --

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





using ISA interrupts on MBX821

2000-06-26 Thread Matthias Fuchs

Hi,

I want to get a driver for a PC ISA card running on the MBX board under
linux.
I am using Motorola's adapter board to interface the ISA card on the MBX
board. The driver is working fine
on x86 platforms. I can also communicate to the io registers on the ISA
card.

But ... I cannot get interrupts working. The ISA card uses irq 13
(others are possible), since this is free on the MBX.
What do I have to pass to the request_irq call as interrupt number ? Is
13 ok ?

Do I have to think about any other differences concerning the PPC
platform ?

Some infos: Linux kernel 2.2.13 from Monta-Vista, no PCI support present
in kernel because of the known bug in the QSPAN.

Can anybody give me some advice ? Do I have to think about something
special on my platform ?


Matthias


--
-----
\ Matthias Fuchs \
 \ esd electronic system design Gmbh  \
  \ Vahrenwalder Stra?e 205\
   \ D-30165 Hannover   \
\ email: matthias.fuchs at esd-electronics.com  \
 \ phone: +49-511-37298-0 \
  \ fax:   +49-511-37298-68\
   --

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





Linux on MBX860 Board

2000-06-14 Thread Matthias Fuchs

Hi !

I am trying to get a Linux running on a Motorola MBX860 Board. Linux
(Hardhat distribution with Kernel 2.2.13) boots fine and everything is
ok. But only without PCI support. If I enable PCI support, booting stops
with the output below:

...
DENTRY hash table entries: 262144 (order: 9, 2097152 bytes)
Buffer-cache hash table entries: 32768 (order: 5, 131072 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.2
Based upon Swansea University Computer Society NET3.039
NET4: Unix domain sockets 1.0 for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
TCP: Hash tables configured (ehash 32768 bhash 32768)
Starting kswapd v 1.5
Kernel panic: Kernel Mode Software FPU Emulation
Rebooting in 180 seconds..<0>Kernel panic: Kernel Mode Software FPU
Emulation
Rebooting in 180 seconds..<0>Kernel panic: Kernel Mode Software FPU
Emulation

I am using the default config that came with the kernel. It seems to be
ok !
Can anybody help me ? I still have no more ideas !

Matthias Fuchs

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