* Re: [PATCH 1/6] bootwrapper: arch/powerpc/boot code reorg
From: Paul Mackerras @ 2006-09-16 4:01 UTC (permalink / raw)
To: Mark A. Greer; +Cc: linuxppc-dev
In-Reply-To: <20060915180129.GE1884@mag.az.mvista.com>
Mark A. Greer writes:
> Yes. Whether you pass the NULL or not hinges on whether its flat tree
> or not so I made it a dt_op. What are you thinking?
There's basically only two cases: if we have a builtin flat tree, we
pass that and NULL in r5; if we don't, and we have OF, we pass NULL in
r3 and the OF entry point in r5. I think that could be handled in
main.c.
We also lost the "enforce minimum address only for 64-bit" thing in
the translation, too.
I believe that just patch 1/6 on its own won't give us a working
zImage, so we'll have to split up the changes differently when it
comes time to check this stuff in to git.
Paul.
^ permalink raw reply
* Re: [PATCH 1/7] POWERPC: Add cpm2 stuff support to the fsl_soc.c
From: Stephen Rothwell @ 2006-09-16 8:20 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20060915173857.7984.36024.stgit@localhost.localdomain>
Hi Vitaly,
Just a few nits ...
On Fri, 15 Sep 2006 21:38:57 +0400 Vitaly Bordug <vbordug@ru.mvista.com> wrote:
>
> +#ifdef CONFIG_CPM2
> +#include <asm/cpm2.h>
> +#endif
We normally don't do conditional includes, the include file should
protect its contents (if that is necessary - it usually isn't).
> + unsigned int *prop = (unsigned int*)get_property(node, "brg-frequency", &size);
get_property returns "const void *" so no cast is necessary, but prop
should be declated "const unsigned int *".
> + unsigned int *prop = (unsigned int*)get_property(node, "current-speed", &size);
Ditto.
> +static const char *fcc_regs = "fcc_regs";
> +static const char *fcc_regs_c = "fcc_regs_c";
> +static const char *fcc_pram = "fcc_pram";
I think that these could be declared as const char [].
> + model = (char *)get_property(np, "model", NULL);
> + mac_addr = (void *)get_property(np, "mac-address", NULL);
> + ph = (phandle *) get_property(np, "phy-handle", NULL);
> + phy_addr = (u32 *) get_property(phy, "reg", NULL);
> + id = (u32 *) get_property(np, "device-id", NULL);
Same comments about const and void * with respect to get_property. There
are more ...
> +static const char *scc_regs = "regs";
> +static const char *scc_pram = "pram";
const char [] ?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
^ permalink raw reply
* Board Bootup and message log
From: Sachin Rane @ 2006-09-16 8:19 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <8584FDC94AFF7640B17B8A89B23B19B34F6564@sbsserver.AlphionCorp.local>
[-- Attachment #1.1: Type: text/plain, Size: 1214 bytes --]
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.
----------------------------------------------------------------------------------------
-bash-2.05b# cd /sys/bus/i2c/devices
-bash-2.05b# ls -la *
lrwxrwxrwx 1 root root 0 Apr 6 06:42 0-0050 -> ../../../devices/platform/i2c-0/0-0050
lrwxrwxrwx 1 root root 0 Apr 6 06:42 0-0053 -> ../../../devices/platform/i2c-0/0-0053
lrwxrwxrwx 1 root root 0 Apr 6 06:42 0-0054 -> ../../../devices/platform/i2c-0/0-0054
-bash-2.05b# cat ../../../devices/platform/i2c-0/0-0050/name
eeprom
----------------------------------------------------------------------------------------
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/'.
Am I missing anything while loading the driver?
I have attached the board boot up and 'demsg' log file.
Thanks and Regards,
Sachin Rane
[-- Attachment #1.2: Type: text/html, Size: 2426 bytes --]
[-- Attachment #2: bootup_log_i2cDrivers.txt --]
[-- Type: text/plain, Size: 8536 bytes --]
U-Boot 1.1.4 (Aug 7 2006 - 20:36:40)
CPU: AMCC PowerPC 440GX Rev. F at 533.333 MHz (PLB=133, OPB=66, EBC=66 MHz)
I2C boot EEPROM enabled
Internal PCI arbiter enabled
32 kB I-Cache 32 kB D-Cache
Board: Ocotea - AMCC PPC440GX Evaluation Board
I2C: ready
DRAM: 256 MB
FLASH: 5 MB
PCI: Bus Dev VenId DevId Class Int
In: serial
Out: serial
Err: serial
Net: ppc_4xx_eth0, ppc_4xx_eth1, ppc_4xx_eth2, ppc_4xx_eth3
Sachin " ****************Read ReadMeInstructions: Uboot Environment Variable Configuration *************"
Hit any key to stop autoboot: 0
## Booting image at ffc00000 ...
Image Name: Linux-2.6.16.1
Created: 2006-08-02 19:51:26 UTC
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 931818 Bytes = 910 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Linux version 2.6.16.1 (root@linux) (gcc version 3.4.1 20040714 (TimeSys 3.4.1-7)) #3 Thu Aug 3 01:21:21 IST 2006
IBM Ocotea port (MontaVista Software, Inc. <source@mvista.com>)
Built 1 zonelists
Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.2:/opt/timesys/linux/6.1/ppc440-std/rfs ip=192.168.0.54:192.168.0.2:192.168.0.1:255.255.255.0:ocotea:eth
0::off console=ttyS0,115200
PID hash table entries: 2048 (order: 11, 32768 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 257664k available (1420k kernel code, 460k data, 112k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
PCI: Probing PCI hardware
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0x0 (irq = 0) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 1) is a 16550A
PPC 4xx OCP EMAC driver, version 3.54
mal0: initialized, 4 TX channels, 4 RX channels
zmii0: bridge in SMII mode
eth0: emac0, MAC 00:01:73:01:de:c8
eth0: found Generic MII PHY (0x01)
eth1: emac1, MAC 00:01:73:01:de:c9
eth1: found Generic MII PHY (0x02)
rgmii0: input 0 in RGMII mode
eth2: emac2, MAC 00:01:73:01:de:ca
eth2: found CIS8201 Gigabit Ethernet PHY (0x10)
rgmii0: input 1 in RGMII mode
eth3: emac3, MAC 00:01:73:01:de:cb
eth3: found CIS8201 Gigabit Ethernet PHY (0x18)
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: link is down
IP-Config: Complete:
device=eth0, addr=192.168.0.54, mask=255.255.255.0, gw=192.168.0.1,
host=ocotea, domain=, nis-domain=(none),
bootserver=192.168.0.2, rootserver=192.168.0.2, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.2
eth0: link is up, 100 FDX, pause enabled
Looking up port of RPC 100005/1 on 192.168.0.2
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 112k init
INIT: version 2.84 booting
Welcome to Distribution built using LinuxLink by TimeSys (6.1)
mounting... ramfs at /dev
Creating initial udev device nodes:
making extra nodes
udev startup is finished!
Initializing hardware... storage network audio done[ OK ]
raidautorun: failed to open /dev/md0: 6
Configuring kernel parameters: [ OK ]
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
Setting clock : Mon Apr 6 08:19:06 UTC 2015 [ OK ]
Setting hostname timesys-bsp: [ OK ]
Your system appears to have shut down uncleanly
Press Y within 1 seconds to force file system integrity check...
Remounting root filesystem in read-write mode: [ OK ]
Checking filesystems
Checking all file systems.
[ OK ]
chown: changing ownership of `/tmp/.ICE-unix': Operation not permitted
Enabling swap space: [ OK ]
INIT: Entering runlevel: 3
Entering non-interactive startup
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
Starting portmap: [ OK ]
Starting NFS statd: [ OK ]
Starting xinetd: [ OK ]
Starting crond: [ OK ]
Starting atd: [ OK ]
Starting system message bus: [ OK ]
Starting the Alphion Demo App
Starting alphiondemo
************* Alphion Demo APP Started *********************
************* This is a sample Demo to start and stop apps ********
Done
Distribution built using LinuxLink by TimeSys (6.1)
Kernel 2.6.16.1 for ppc
timesys-bsp login: root
Last login: Mon Apr 6 06:33:48 on ttyS0
-bash-2.05b# lsmod
Module Size Used by
-bash-2.05b# **************************************After L Alphion Wake after a minute .....
-bash: ********************: command not found
-bash-2.05b#
-bash-2.05b#
-bash-2.05b# ps -ax | grep alphion
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
352 ? S 0:00 /home/AlphionApps//alphiondemo
383 ttyS0 R+ 0:00 grep alphion
-bash-2.05b# kill -9 352
-bash-2.05b# ************************************* output of lsmod *************
-bash: *************************************: command not found
-bash-2.05b# ************************************* output of lsmod *************
-bash-2.05b#
-bash-2.05b#
-bash-2.05b# lsmod
Module Size Used by
-bash-2.05b#
-bash-2.05b#
-bash-2.05b#
-bash-2.05b#
-bash-2.05b#
-bash-2.05b# *************Inserting the Modules *************
-bash: *************Inserting: command not found
-bash-2.05b#
-bash-2.05b# insmod i2c-dev.ko
insmod: can't read 'i2c-dev.ko': No such file or directory
-bash-2.05b# cd /lib/modules/2.6.16.1/kernel/drivers/i2c/
-bash-2.05b# insmod i2c-dev.ko
i2c_dev: Unknown symbol i2c_check_addr
i2c_dev: Unknown symbol i2c_get_adapter
i2c_dev: Unknown symbol i2c_control
i2c_dev: Unknown symbol i2c_master_recv
i2c_dev: Unknown symbol i2c_smbus_xfer
i2c_dev: Unknown symbol i2c_register_driver
i2c_dev: Unknown symbol i2c_put_adapter
i2c_dev: Unknown symbol i2c_transfer
i2c_dev: Unknown symbol i2c_del_driver
i2c_dev: Unknown symbol i2c_master_send
insmod: error inserting 'i2c-dev.ko': -1 Unknown symbol in module
-bash-2.05b# insmod i2c-core.ko
-bash-2.05b# lsmod
Module Size Used by
i2c_core 22384 0
-bash-2.05b# insmod i2c-dev.ko
-bash-2.05b# lsmod
Module Size Used by
i2c_dev 10116 0
i2c_core 22384 1 i2c_dev
-bash-2.05b# ls
algos busses chips i2c-core.ko i2c-dev.ko
-bash-2.05b# cd chips/
-bash-2.05b# insmod
insmod insmod.static insmod_ksymoops_clean
-bash-2.05b# insmod eeprom.ko
-bash-2.05b# lsmod
Module Size Used by
eeprom 6736 0
i2c_dev 10116 0
i2c_core 22384 2 eeprom,i2c_dev
-bash-2.05b# ls
ds1337.ko eeprom.ko max6875.ko pcf8574.ko rtc8564.ko
ds1374.ko m41t00.ko pca9539.ko pcf8591.ko x1205.ko
-bash-2.05b# cd ..
-bash-2.05b# ls
algos busses chips i2c-core.ko i2c-dev.ko
-bash-2.05b# cd busses/
-bash-2.05b# ls
i2c-ali1535.ko i2c-i801.ko i2c-pca-isa.ko i2c-sis96x.ko
i2c-ali1563.ko i2c-i810.ko i2c-piix4.ko i2c-stub.ko
i2c-ali15x3.ko i2c-ibm_iic.ko i2c-prosavage.ko i2c-via.ko
i2c-amd756-s4882.ko i2c-mpc.ko i2c-savage4.ko i2c-viapro.ko
i2c-amd756.ko i2c-nforce2.ko i2c-sis5595.ko i2c-voodoo3.ko
i2c-amd8111.ko i2c-parport-light.ko i2c-sis630.ko scx200_acb.ko
-bash-2.05b# insmod 2c-ibm_iic.ko
insmod: can't read '2c-ibm_iic.ko': No such file or directory
-bash-2.05b# insmod i2c-ibm_iic.ko
-bash-2.05b# lsmod
Module Size Used by
i2c_ibm_iic 7432 0
eeprom 6736 0
i2c_dev 10116 0
i2c_core 22384 3 i2c_ibm_iic,eeprom,i2c_dev
[-- Attachment #3: dmesg_log_i2cDrivers.txt --]
[-- Type: text/plain, Size: 5791 bytes --]
-bash-2.05b# dmesg
Linux version 2.6.16.1 (root@linux) (gcc version 3.4.1 20040714 (TimeSys 3.4.1-7)) #3 Thu Aug 3 01:21:21 IST 2006
IBM Ocotea port (MontaVista Software, Inc. <source@mvista.com>)
On node 0 totalpages: 65536
DMA zone: 65536 pages, LIFO batch:15
DMA32 zone: 0 pages, LIFO batch:0
Normal zone: 0 pages, LIFO batch:0
HighMem zone: 0 pages, LIFO batch:0
Built 1 zonelists
Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.2:/opt/timesys/linux/6.1/ppc440-std/rfs ip=192.168.0.54:192.168.0.2:192.168.0.1:255.255.255.0:ocotea:eth
0::off console=ttyS0,115200
PID hash table entries: 2048 (order: 11, 32768 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 257664k available (1420k kernel code, 460k data, 112k init, 0k highmem)
Calibrating delay loop... 798.72 BogoMIPS (lpj=1597440)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
PCI: Probing PCI hardware
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0x0 (irq = 0) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 1) is a 16550A
PPC 4xx OCP EMAC driver, version 3.54
mal0: initialized, 4 TX channels, 4 RX channels
zmii0: bridge in SMII mode
eth0: emac0, MAC 00:01:73:01:de:c8
eth0: found Generic MII PHY (0x01)
eth1: emac1, MAC 00:01:73:01:de:c9
eth1: found Generic MII PHY (0x02)
rgmii0: input 0 in RGMII mode
eth2: emac2, MAC 00:01:73:01:de:ca
eth2: found CIS8201 Gigabit Ethernet PHY (0x10)
rgmii0: input 1 in RGMII mode
eth3: emac3, MAC 00:01:73:01:de:cb
eth3: found CIS8201 Gigabit Ethernet PHY (0x18)
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: link is down
IP-Config: Complete:
device=eth0, addr=192.168.0.54, mask=255.255.255.0, gw=192.168.0.1,
host=ocotea, domain=, nis-domain=(none),
bootserver=192.168.0.2, rootserver=192.168.0.2, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.2
eth0: link is up, 100 FDX, pause enabled
Looking up port of RPC 100005/1 on 192.168.0.2
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 112k init
i2c_dev: Unknown symbol i2c_check_addr
i2c_dev: Unknown symbol i2c_get_adapter
i2c_dev: Unknown symbol i2c_control
i2c_dev: Unknown symbol i2c_master_recv
i2c_dev: Unknown symbol i2c_smbus_xfer
i2c_dev: Unknown symbol i2c_register_driver
i2c_dev: Unknown symbol i2c_put_adapter
i2c_dev: Unknown symbol i2c_transfer
i2c_dev: Unknown symbol i2c_del_driver
i2c_dev: Unknown symbol i2c_master_send
i2c /dev entries driver
i2c-core: driver [dev_driver] registered
i2c-core: driver [eeprom] registered
IBM IIC driver v2.1
i2c_adapter i2c-0: adapter [IBM IIC] registered
i2c-dev: adapter [IBM IIC] registered as minor 0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x50
i2c_adapter i2c-0: master_xfer[0] W, addr=0x50, len=0
i2c_adapter i2c-0: master_xfer[0] W, addr=0x50, len=0
i2c_adapter i2c-0: client [eeprom] registered with bus id 0-0050
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x51
i2c_adapter i2c-0: master_xfer[0] W, addr=0x51, len=0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x52
i2c_adapter i2c-0: master_xfer[0] W, addr=0x52, len=0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x53
i2c_adapter i2c-0: master_xfer[0] W, addr=0x53, len=0
i2c_adapter i2c-0: master_xfer[0] W, addr=0x53, len=0
i2c_adapter i2c-0: client [eeprom] registered with bus id 0-0053
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x54
i2c_adapter i2c-0: master_xfer[0] W, addr=0x54, len=0
i2c_adapter i2c-0: master_xfer[0] W, addr=0x54, len=0
i2c_adapter i2c-0: client [eeprom] registered with bus id 0-0054
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x55
i2c_adapter i2c-0: master_xfer[0] W, addr=0x55, len=0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x56
i2c_adapter i2c-0: master_xfer[0] W, addr=0x56, len=0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x57
i2c_adapter i2c-0: master_xfer[0] W, addr=0x57, len=0
ibm-iic0: using standard (100 kHz) mode
i2c_adapter i2c-1: adapter [IBM IIC] registered
i2c-dev: adapter [IBM IIC] registered as minor 1
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x50
i2c_adapter i2c-1: master_xfer[0] W, addr=0x50, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x51
i2c_adapter i2c-1: master_xfer[0] W, addr=0x51, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x52
i2c_adapter i2c-1: master_xfer[0] W, addr=0x52, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x53
i2c_adapter i2c-1: master_xfer[0] W, addr=0x53, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x54
i2c_adapter i2c-1: master_xfer[0] W, addr=0x54, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x55
i2c_adapter i2c-1: master_xfer[0] W, addr=0x55, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x56
i2c_adapter i2c-1: master_xfer[0] W, addr=0x56, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x57
i2c_adapter i2c-1: master_xfer[0] W, addr=0x57, len=0
ibm-iic1: using standard (100 kHz) mode
^ permalink raw reply
* I2C adapter device file problem
From: Sachin Rane @ 2006-09-16 8:29 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <8584FDC94AFF7640B17B8A89B23B19B34F6569@sbsserver.AlphionCorp.local>
[-- Attachment #1.1: Type: text/plain, Size: 1219 bytes --]
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.
----------------------------------------------------------------------------------------
-bash-2.05b# cd /sys/bus/i2c/devices
-bash-2.05b# ls -la *
lrwxrwxrwx 1 root root 0 Apr 6 06:42 0-0050 -> ../../../devices/platform/i2c-0/0-0050
lrwxrwxrwx 1 root root 0 Apr 6 06:42 0-0053 -> ../../../devices/platform/i2c-0/0-0053
lrwxrwxrwx 1 root root 0 Apr 6 06:42 0-0054 -> ../../../devices/platform/i2c-0/0-0054
-bash-2.05b# cat ../../../devices/platform/i2c-0/0-0050/name
eeprom
----------------------------------------------------------------------------------------
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/'.
Am I missing anything while loading the driver?
I have attached the board boot up and 'demsg' log file.
Thanks and Regards,
Sachin Rane
[-- Attachment #1.2: Type: text/html, Size: 2671 bytes --]
[-- Attachment #2: bootup_log_i2cDrivers.txt --]
[-- Type: text/plain, Size: 8536 bytes --]
U-Boot 1.1.4 (Aug 7 2006 - 20:36:40)
CPU: AMCC PowerPC 440GX Rev. F at 533.333 MHz (PLB=133, OPB=66, EBC=66 MHz)
I2C boot EEPROM enabled
Internal PCI arbiter enabled
32 kB I-Cache 32 kB D-Cache
Board: Ocotea - AMCC PPC440GX Evaluation Board
I2C: ready
DRAM: 256 MB
FLASH: 5 MB
PCI: Bus Dev VenId DevId Class Int
In: serial
Out: serial
Err: serial
Net: ppc_4xx_eth0, ppc_4xx_eth1, ppc_4xx_eth2, ppc_4xx_eth3
Sachin " ****************Read ReadMeInstructions: Uboot Environment Variable Configuration *************"
Hit any key to stop autoboot: 0
## Booting image at ffc00000 ...
Image Name: Linux-2.6.16.1
Created: 2006-08-02 19:51:26 UTC
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 931818 Bytes = 910 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Linux version 2.6.16.1 (root@linux) (gcc version 3.4.1 20040714 (TimeSys 3.4.1-7)) #3 Thu Aug 3 01:21:21 IST 2006
IBM Ocotea port (MontaVista Software, Inc. <source@mvista.com>)
Built 1 zonelists
Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.2:/opt/timesys/linux/6.1/ppc440-std/rfs ip=192.168.0.54:192.168.0.2:192.168.0.1:255.255.255.0:ocotea:eth
0::off console=ttyS0,115200
PID hash table entries: 2048 (order: 11, 32768 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 257664k available (1420k kernel code, 460k data, 112k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
PCI: Probing PCI hardware
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0x0 (irq = 0) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 1) is a 16550A
PPC 4xx OCP EMAC driver, version 3.54
mal0: initialized, 4 TX channels, 4 RX channels
zmii0: bridge in SMII mode
eth0: emac0, MAC 00:01:73:01:de:c8
eth0: found Generic MII PHY (0x01)
eth1: emac1, MAC 00:01:73:01:de:c9
eth1: found Generic MII PHY (0x02)
rgmii0: input 0 in RGMII mode
eth2: emac2, MAC 00:01:73:01:de:ca
eth2: found CIS8201 Gigabit Ethernet PHY (0x10)
rgmii0: input 1 in RGMII mode
eth3: emac3, MAC 00:01:73:01:de:cb
eth3: found CIS8201 Gigabit Ethernet PHY (0x18)
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: link is down
IP-Config: Complete:
device=eth0, addr=192.168.0.54, mask=255.255.255.0, gw=192.168.0.1,
host=ocotea, domain=, nis-domain=(none),
bootserver=192.168.0.2, rootserver=192.168.0.2, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.2
eth0: link is up, 100 FDX, pause enabled
Looking up port of RPC 100005/1 on 192.168.0.2
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 112k init
INIT: version 2.84 booting
Welcome to Distribution built using LinuxLink by TimeSys (6.1)
mounting... ramfs at /dev
Creating initial udev device nodes:
making extra nodes
udev startup is finished!
Initializing hardware... storage network audio done[ OK ]
raidautorun: failed to open /dev/md0: 6
Configuring kernel parameters: [ OK ]
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
Setting clock : Mon Apr 6 08:19:06 UTC 2015 [ OK ]
Setting hostname timesys-bsp: [ OK ]
Your system appears to have shut down uncleanly
Press Y within 1 seconds to force file system integrity check...
Remounting root filesystem in read-write mode: [ OK ]
Checking filesystems
Checking all file systems.
[ OK ]
chown: changing ownership of `/tmp/.ICE-unix': Operation not permitted
Enabling swap space: [ OK ]
INIT: Entering runlevel: 3
Entering non-interactive startup
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
Starting portmap: [ OK ]
Starting NFS statd: [ OK ]
Starting xinetd: [ OK ]
Starting crond: [ OK ]
Starting atd: [ OK ]
Starting system message bus: [ OK ]
Starting the Alphion Demo App
Starting alphiondemo
************* Alphion Demo APP Started *********************
************* This is a sample Demo to start and stop apps ********
Done
Distribution built using LinuxLink by TimeSys (6.1)
Kernel 2.6.16.1 for ppc
timesys-bsp login: root
Last login: Mon Apr 6 06:33:48 on ttyS0
-bash-2.05b# lsmod
Module Size Used by
-bash-2.05b# **************************************After L Alphion Wake after a minute .....
-bash: ********************: command not found
-bash-2.05b#
-bash-2.05b#
-bash-2.05b# ps -ax | grep alphion
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
352 ? S 0:00 /home/AlphionApps//alphiondemo
383 ttyS0 R+ 0:00 grep alphion
-bash-2.05b# kill -9 352
-bash-2.05b# ************************************* output of lsmod *************
-bash: *************************************: command not found
-bash-2.05b# ************************************* output of lsmod *************
-bash-2.05b#
-bash-2.05b#
-bash-2.05b# lsmod
Module Size Used by
-bash-2.05b#
-bash-2.05b#
-bash-2.05b#
-bash-2.05b#
-bash-2.05b#
-bash-2.05b# *************Inserting the Modules *************
-bash: *************Inserting: command not found
-bash-2.05b#
-bash-2.05b# insmod i2c-dev.ko
insmod: can't read 'i2c-dev.ko': No such file or directory
-bash-2.05b# cd /lib/modules/2.6.16.1/kernel/drivers/i2c/
-bash-2.05b# insmod i2c-dev.ko
i2c_dev: Unknown symbol i2c_check_addr
i2c_dev: Unknown symbol i2c_get_adapter
i2c_dev: Unknown symbol i2c_control
i2c_dev: Unknown symbol i2c_master_recv
i2c_dev: Unknown symbol i2c_smbus_xfer
i2c_dev: Unknown symbol i2c_register_driver
i2c_dev: Unknown symbol i2c_put_adapter
i2c_dev: Unknown symbol i2c_transfer
i2c_dev: Unknown symbol i2c_del_driver
i2c_dev: Unknown symbol i2c_master_send
insmod: error inserting 'i2c-dev.ko': -1 Unknown symbol in module
-bash-2.05b# insmod i2c-core.ko
-bash-2.05b# lsmod
Module Size Used by
i2c_core 22384 0
-bash-2.05b# insmod i2c-dev.ko
-bash-2.05b# lsmod
Module Size Used by
i2c_dev 10116 0
i2c_core 22384 1 i2c_dev
-bash-2.05b# ls
algos busses chips i2c-core.ko i2c-dev.ko
-bash-2.05b# cd chips/
-bash-2.05b# insmod
insmod insmod.static insmod_ksymoops_clean
-bash-2.05b# insmod eeprom.ko
-bash-2.05b# lsmod
Module Size Used by
eeprom 6736 0
i2c_dev 10116 0
i2c_core 22384 2 eeprom,i2c_dev
-bash-2.05b# ls
ds1337.ko eeprom.ko max6875.ko pcf8574.ko rtc8564.ko
ds1374.ko m41t00.ko pca9539.ko pcf8591.ko x1205.ko
-bash-2.05b# cd ..
-bash-2.05b# ls
algos busses chips i2c-core.ko i2c-dev.ko
-bash-2.05b# cd busses/
-bash-2.05b# ls
i2c-ali1535.ko i2c-i801.ko i2c-pca-isa.ko i2c-sis96x.ko
i2c-ali1563.ko i2c-i810.ko i2c-piix4.ko i2c-stub.ko
i2c-ali15x3.ko i2c-ibm_iic.ko i2c-prosavage.ko i2c-via.ko
i2c-amd756-s4882.ko i2c-mpc.ko i2c-savage4.ko i2c-viapro.ko
i2c-amd756.ko i2c-nforce2.ko i2c-sis5595.ko i2c-voodoo3.ko
i2c-amd8111.ko i2c-parport-light.ko i2c-sis630.ko scx200_acb.ko
-bash-2.05b# insmod 2c-ibm_iic.ko
insmod: can't read '2c-ibm_iic.ko': No such file or directory
-bash-2.05b# insmod i2c-ibm_iic.ko
-bash-2.05b# lsmod
Module Size Used by
i2c_ibm_iic 7432 0
eeprom 6736 0
i2c_dev 10116 0
i2c_core 22384 3 i2c_ibm_iic,eeprom,i2c_dev
[-- Attachment #3: dmesg_log_i2cDrivers.txt --]
[-- Type: text/plain, Size: 5791 bytes --]
-bash-2.05b# dmesg
Linux version 2.6.16.1 (root@linux) (gcc version 3.4.1 20040714 (TimeSys 3.4.1-7)) #3 Thu Aug 3 01:21:21 IST 2006
IBM Ocotea port (MontaVista Software, Inc. <source@mvista.com>)
On node 0 totalpages: 65536
DMA zone: 65536 pages, LIFO batch:15
DMA32 zone: 0 pages, LIFO batch:0
Normal zone: 0 pages, LIFO batch:0
HighMem zone: 0 pages, LIFO batch:0
Built 1 zonelists
Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.2:/opt/timesys/linux/6.1/ppc440-std/rfs ip=192.168.0.54:192.168.0.2:192.168.0.1:255.255.255.0:ocotea:eth
0::off console=ttyS0,115200
PID hash table entries: 2048 (order: 11, 32768 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 257664k available (1420k kernel code, 460k data, 112k init, 0k highmem)
Calibrating delay loop... 798.72 BogoMIPS (lpj=1597440)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
PCI: Probing PCI hardware
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0x0 (irq = 0) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 1) is a 16550A
PPC 4xx OCP EMAC driver, version 3.54
mal0: initialized, 4 TX channels, 4 RX channels
zmii0: bridge in SMII mode
eth0: emac0, MAC 00:01:73:01:de:c8
eth0: found Generic MII PHY (0x01)
eth1: emac1, MAC 00:01:73:01:de:c9
eth1: found Generic MII PHY (0x02)
rgmii0: input 0 in RGMII mode
eth2: emac2, MAC 00:01:73:01:de:ca
eth2: found CIS8201 Gigabit Ethernet PHY (0x10)
rgmii0: input 1 in RGMII mode
eth3: emac3, MAC 00:01:73:01:de:cb
eth3: found CIS8201 Gigabit Ethernet PHY (0x18)
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: link is down
IP-Config: Complete:
device=eth0, addr=192.168.0.54, mask=255.255.255.0, gw=192.168.0.1,
host=ocotea, domain=, nis-domain=(none),
bootserver=192.168.0.2, rootserver=192.168.0.2, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.2
eth0: link is up, 100 FDX, pause enabled
Looking up port of RPC 100005/1 on 192.168.0.2
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 112k init
i2c_dev: Unknown symbol i2c_check_addr
i2c_dev: Unknown symbol i2c_get_adapter
i2c_dev: Unknown symbol i2c_control
i2c_dev: Unknown symbol i2c_master_recv
i2c_dev: Unknown symbol i2c_smbus_xfer
i2c_dev: Unknown symbol i2c_register_driver
i2c_dev: Unknown symbol i2c_put_adapter
i2c_dev: Unknown symbol i2c_transfer
i2c_dev: Unknown symbol i2c_del_driver
i2c_dev: Unknown symbol i2c_master_send
i2c /dev entries driver
i2c-core: driver [dev_driver] registered
i2c-core: driver [eeprom] registered
IBM IIC driver v2.1
i2c_adapter i2c-0: adapter [IBM IIC] registered
i2c-dev: adapter [IBM IIC] registered as minor 0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x50
i2c_adapter i2c-0: master_xfer[0] W, addr=0x50, len=0
i2c_adapter i2c-0: master_xfer[0] W, addr=0x50, len=0
i2c_adapter i2c-0: client [eeprom] registered with bus id 0-0050
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x51
i2c_adapter i2c-0: master_xfer[0] W, addr=0x51, len=0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x52
i2c_adapter i2c-0: master_xfer[0] W, addr=0x52, len=0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x53
i2c_adapter i2c-0: master_xfer[0] W, addr=0x53, len=0
i2c_adapter i2c-0: master_xfer[0] W, addr=0x53, len=0
i2c_adapter i2c-0: client [eeprom] registered with bus id 0-0053
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x54
i2c_adapter i2c-0: master_xfer[0] W, addr=0x54, len=0
i2c_adapter i2c-0: master_xfer[0] W, addr=0x54, len=0
i2c_adapter i2c-0: client [eeprom] registered with bus id 0-0054
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x55
i2c_adapter i2c-0: master_xfer[0] W, addr=0x55, len=0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x56
i2c_adapter i2c-0: master_xfer[0] W, addr=0x56, len=0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x57
i2c_adapter i2c-0: master_xfer[0] W, addr=0x57, len=0
ibm-iic0: using standard (100 kHz) mode
i2c_adapter i2c-1: adapter [IBM IIC] registered
i2c-dev: adapter [IBM IIC] registered as minor 1
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x50
i2c_adapter i2c-1: master_xfer[0] W, addr=0x50, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x51
i2c_adapter i2c-1: master_xfer[0] W, addr=0x51, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x52
i2c_adapter i2c-1: master_xfer[0] W, addr=0x52, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x53
i2c_adapter i2c-1: master_xfer[0] W, addr=0x53, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x54
i2c_adapter i2c-1: master_xfer[0] W, addr=0x54, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x55
i2c_adapter i2c-1: master_xfer[0] W, addr=0x55, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x56
i2c_adapter i2c-1: master_xfer[0] W, addr=0x56, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x57
i2c_adapter i2c-1: master_xfer[0] W, addr=0x57, len=0
ibm-iic1: using standard (100 kHz) mode
^ permalink raw reply
* Re: [PATCH 3/7] POWERPC: Move generic cpm2 stuff to powerpc
From: Stephen Rothwell @ 2006-09-16 8:36 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20060915173912.7984.40164.stgit@localhost.localdomain>
Hi Vitaly,
Seems I am in nit picking mood tonight ..
On Fri, 15 Sep 2006 21:39:12 +0400 Vitaly Bordug <vbordug@ru.mvista.com> wrote:
>
> +# Temporary hack until we have migrated to asm-powerpc
> +ifeq ($(ARCH),powerpc)
I think we normally use:
ifeq ($(CONFIG_PPC_MERGE),y)
> + if (brg < 4) {
> + bp = (uint *)&cpm2_immr->im_brgc1;
> + }
> + else {
Normally:
if (brg < 4)
bp = (uint *)&cpm2_immr->im_brgc1;
else {
> +static u_char irq_to_siureg[] = {
const ?
> +static u_char irq_to_siubit[] = {
ditto
> +int cpm2_get_irq(struct pt_regs *regs)
> +{
> + int irq;
> + unsigned long bits;
> +
> + /* For CPM2, read the SIVEC register and shift the bits down
> + * to get the irq number. */
> + bits = cpm2_immr->im_intctl.ic_sivec;
> + irq = bits >> 26;
> +
> + if (irq == 0)
> + return(-1);
> + return irq+CPM_IRQ_OFFSET;
> +}
Indentation needs fixing - we use single tab characters to indent.
> +static int cpm2_pic_host_xlate(struct irq_host *h, struct device_node *ct,
> + u32 *intspec, unsigned int intsize,
> + irq_hw_number_t *out_hwirq, unsigned int *out_flags)
> +{
> + static unsigned char map_cpm2_senses[4] = {
const ?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
^ permalink raw reply
* Re: Discontiguous Memory
From: Arnd Bergmann @ 2006-09-16 9:51 UTC (permalink / raw)
To: linuxppc-dev; +Cc: jbahr
In-Reply-To: <1158368179.14473.203.camel@localhost.localdomain>
Am Saturday 16 September 2006 02:56 schrieb Benjamin Herrenschmidt:
> =A0- A more annoying one is support for DMA since a lot of devices cannot
> DMA above 32 bits. A lot of 'sane' platforms that provide more memory
> than can be DMA'ed in 32 bits also provide an IOMMU that does page
> translation of incoming DMAs. This isn't your case however, thus you
> would have to implement some of the alternate solutions used on x86_64
> (Intel 64 bits platforms also lack an iommu). This essentially consist
> of defining a ZONE_DMA32 and possibly also using swiotlb to do bounce
> buffering for drivers that don't deal with ZONE_DMA32 yet.
On 32 bit platforms, you normally have ZONE_NORMAL for up to 4G and
ZONE_HIGHMEM beyond, so you don't need an extra ZONE_DMA32.
Arnd <><
^ permalink raw reply
* Re: [Alsa-devel] oops in snd-powermac due to snd-aoa
From: Olaf Hering @ 2006-09-16 9:56 UTC (permalink / raw)
To: Takashi Iwai; +Cc: linuxppc-dev, alsa-devel
In-Reply-To: <s5h64fzltyg.wl%tiwai@suse.de>
On Thu, Sep 07, Takashi Iwai wrote:
> At Thu, 7 Sep 2006 14:42:56 +0200,
> Olaf Hering wrote:
> >
> > I was playing with snd-aoa, maybe the driver would work on a G4/466.
> > mv /lib/modules/*/kernel/sound/ppc/snd-powermac.ko .
> > reboot
> > $insmod /lib/modules/*/kernel/sound/aoa/*/*.ko
> > alsamixer finds nothing.
> > mv snd-powermac.ko /lib/modules/*/kernel/sound/ppc/
> > $insmod snd-powermac.ko -> oops
> >
> > Using PowerMac machine description
> (snip)
> > ALSA sound/ppc/keywest.c:82: tumbler: cannot attach i2c client
> > read_audio_gpio addr 67 ret 2 av 4
> > headphone: 0, lineout: 0
> > check_audio_gpio addr 70 ret 4 av 4
> > check_audio_gpio addr 6f ret 7 av 4
> > Unable to handle kernel paging request for data at address 0x00000002
>
> Does the patch below work?
Yes, no oops, but also no sound without reboot. Thats ok.
...
ALSA sound/ppc/keywest.c:82: tumbler: cannot attach i2c client
read_audio_gpio addr 67 ret 2 av 4
headphone: 0, lineout: 0
check_audio_gpio addr 70 ret 4 av 4
check_audio_gpio addr 6f ret 7 av 4
date:~ #
date:~ # alsamixer
alsamixer: function snd_ctl_open failed for default: No such device
...
^ permalink raw reply
* Re: [PATCH 3/7] POWERPC: Move generic cpm2 stuff to powerpc
From: Dan Malek @ 2006-09-16 16:09 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20060916183607.94d6facc.sfr@canb.auug.org.au>
On Sep 16, 2006, at 4:36 AM, Stephen Rothwell wrote:
>
>> + if (brg < 4) {
>> + bp = (uint *)&cpm2_immr->im_brgc1;
>> + }
>> + else {
>
> Normally:
> if (brg < 4)
> bp = (uint *)&cpm2_immr->im_brgc1;
> else {
Sorry, I'm going to nit-pick right back. This isn't
"normal", it's just your preference. :-)
When the "else" part contains braces, the "if"
part should as well. If this get modified and
nested some day in the future, this can cause
a very subtle coding error.
No one should ever be criticized for using too
many braces, provided it is artistically pleasing.
"Normally," the if-else without braces is only
used when there are single statements on
both paths of the logic. The only exception
is the else-if that emulates a case statement
(when other exceptions also apply, see K&R).
Thanks.
-- Dan
^ permalink raw reply
* Re: [PATCH] powerpc: minor fix of numa message
From: Geoff Levand @ 2006-09-16 17:35 UTC (permalink / raw)
To: michael; +Cc: linuxppc-dev, paulus, anton
In-Reply-To: <1158282267.10020.2.camel@localhost.localdomain>
Michael Ellerman wrote:
> On Thu, 2006-09-14 at 08:17 -0700, Geoff Levand wrote:
>> This is a very minor fix that effects no current system. The NUMA startup
>> message values for 'Top of RAM' and 'Memory hole size' were reported
>> incorrectly if more than one lmb region was added.
>>
>> A comment in the lmb code states that lmb_analyze() must be called before
>> lmb_phys_mem_size().
>
> But we've already called it in early_init_devtree()?
Yes, of course you are correct. Updated patch follows.
-Geoff
This is a very minor comment change to the powerpc lbm code reflect current
usage.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
Index: cell--common--4/arch/powerpc/mm/lmb.c
===================================================================
--- cell--common--4.orig/arch/powerpc/mm/lmb.c
+++ cell--common--4/arch/powerpc/mm/lmb.c
@@ -285,7 +285,9 @@
return base;
}
-/* You must call lmb_analyze() before this. */
+/* You must call lmb_analyze() sometime before this, typcally just after
+ * adding regions.
+ */
unsigned long __init lmb_phys_mem_size(void)
{
return lmb.memory.size;
^ permalink raw reply
* Unicast DHCP OFFER?
From: Knaack Phillip-PKNAACK1 @ 2006-09-16 22:02 UTC (permalink / raw)
To: linuxppc-embedded
Greetings!
This isn't really a powerpc question, more of a general=20
Linux question, although I'm working on an embedded powerpc
target board. It's a stupid question about DHCP.
My target is running udhcpc over a wireless (not wi-fi)
interface to a remote radio which is running a dhcp relay
agent. I see the DHCP discover sent out, and I see (at the
driver level) the DHCP offer coming back. However, the=20
offer is being sent unicast directly to my (new) IP address,
which I don't know yet. As a result, the ip stack is dropping
the packet because of "no route". So I ask myself, how can I
receive a UDP packet addressed directly to me if I don't yet
know my own address? It defies logic.
And the odd part is, it works with another version of this card
on Windows, though I wouldn't be surprised if they just hacked
it up to "just work" anyway.
Because of the nature of this wireless connection, it really needs
to be unicast. I'm thinking of recognizing a UDP/DHCP packet in
the radio driver and hacking the iphdr source addr to be a broadcast,
so the raw socket in udhcpc will receive it, but this shouldn't be
necessary.
So-- how is a unicast dhcp offer supposed to work?
-Phil K
^ permalink raw reply
* Re: Discontiguous Memory
From: Benjamin Herrenschmidt @ 2006-09-16 22:50 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev, jbahr
In-Reply-To: <200609161151.41294.arnd@arndb.de>
On Sat, 2006-09-16 at 11:51 +0200, Arnd Bergmann wrote:
> Am Saturday 16 September 2006 02:56 schrieb Benjamin Herrenschmidt:
> > - A more annoying one is support for DMA since a lot of devices cannot
> > DMA above 32 bits. A lot of 'sane' platforms that provide more memory
> > than can be DMA'ed in 32 bits also provide an IOMMU that does page
> > translation of incoming DMAs. This isn't your case however, thus you
> > would have to implement some of the alternate solutions used on x86_64
> > (Intel 64 bits platforms also lack an iommu). This essentially consist
> > of defining a ZONE_DMA32 and possibly also using swiotlb to do bounce
> > buffering for drivers that don't deal with ZONE_DMA32 yet.
>
> On 32 bit platforms, you normally have ZONE_NORMAL for up to 4G and
> ZONE_HIGHMEM beyond, so you don't need an extra ZONE_DMA32.
No, in fact, it's even worse :) Your example works only on platforms
that can do 4G/4G split. On ppc32, currently, we don't (though we could
with some freescale BookE and their new instructions to load/store cross
AS), thus we have a 3G/1G split, which limits ZONE_NORMAL to about
768Mb.
So ZONE_HIGHEMEM is actually most of your memory. But you -can- DMA from
highmem and can't have memory be both HIGHMEM and ZONE_DMA32 (though I
suppose devices requesting ZONE_DMA32 will hit ZONE_NORMAL). It's a
mess...
Ben.
^ permalink raw reply
* Re: [PATCH 3/7] POWERPC: Move generic cpm2 stuff to powerpc
From: Benjamin Herrenschmidt @ 2006-09-16 22:55 UTC (permalink / raw)
To: Dan Malek; +Cc: Stephen Rothwell, Paul Mackerras, linuxppc-dev
In-Reply-To: <FF0EF221-284E-4E0A-8576-EFC7E1CE0DE4@embeddedalley.com>
On Sat, 2006-09-16 at 12:09 -0400, Dan Malek wrote:
> On Sep 16, 2006, at 4:36 AM, Stephen Rothwell wrote:
>
> >
> >> + if (brg < 4) {
> >> + bp = (uint *)&cpm2_immr->im_brgc1;
> >> + }
> >> + else {
> >
> > Normally:
> > if (brg < 4)
> > bp = (uint *)&cpm2_immr->im_brgc1;
> > else {
>
> Sorry, I'm going to nit-pick right back. This isn't
> "normal", it's just your preference. :-)
Nothing is "normal" in C coding style, it's all a matter of preference.
Not having braces around a single-line statement is indeed a preference
shared by the majority of the kernel maintainers, and thus becomes
de-facto the rule, which we can then qualify as "normal" in the context
of the linux kernel :)
> When the "else" part contains braces, the "if"
> part should as well. If this get modified and
> nested some day in the future, this can cause
> a very subtle coding error.
>
> No one should ever be criticized for using too
> many braces, provided it is artistically pleasing.
>
> "Normally," the if-else without braces is only
> used when there are single statements on
> both paths of the logic. The only exception
> is the else-if that emulates a case statement
> (when other exceptions also apply, see K&R).
>
> Thanks.
>
> -- Dan
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH 3/7] POWERPC: Move generic cpm2 stuff to powerpc
From: Stephen Rothwell @ 2006-09-16 23:08 UTC (permalink / raw)
To: Dan Malek; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <FF0EF221-284E-4E0A-8576-EFC7E1CE0DE4@embeddedalley.com>
On Sat, 16 Sep 2006 12:09:34 -0400 Dan Malek <dan@embeddedalley.com> wrote:
>
>
> On Sep 16, 2006, at 4:36 AM, Stephen Rothwell wrote:
>
> >
> >> + if (brg < 4) {
> >> + bp = (uint *)&cpm2_immr->im_brgc1;
> >> + }
> >> + else {
> >
> > Normally:
> > if (brg < 4)
> > bp = (uint *)&cpm2_immr->im_brgc1;
> > else {
>
> Sorry, I'm going to nit-pick right back. This isn't
> "normal", it's just your preference. :-)
>
> When the "else" part contains braces, the "if"
> part should as well. If this get modified and
> nested some day in the future, this can cause
> a very subtle coding error.
Not if you are consistent (and many aren't, I agree).
I was more commenting on the
}
else {
bit wich should (at worst) be
} else {
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
^ permalink raw reply
* Re: Kernel module insertion issue with kernel 2.6.15
From: Arnd Bergmann @ 2006-09-16 23:26 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <450B058B.6060806@ipinfusion.com>
On Friday 15 September 2006 21:56, Prakash Jain wrote:
> Can someone give few pointers on what could be the reasons and where to
> look to resolve this? Will appreciate your time,
If you want help with this, you need to post your module source code.
As long as people suspect you're talking about illegal or non-GPL
code, don't expect anyone to answer technical questions.
Arnd <><
^ permalink raw reply
* RE: Unicast DHCP OFFER?
From: Knaack Phillip-PKNAACK1 @ 2006-09-17 4:38 UTC (permalink / raw)
To: linuxppc-embedded
Greetings!
You should all ignore this message. I found that someone here had
modified the netif_rx code in a really stupid way. I now see how it
works.
-Phil K
-----Original Message-----
From: Knaack Phillip-PKNAACK1=20
Sent: Saturday, September 16, 2006 5:02 PM
To: 'linuxppc-embedded@ozlabs.org'
Subject: Unicast DHCP OFFER?
Greetings!
This isn't really a powerpc question, more of a general Linux question,
although I'm working on an embedded powerpc target board. It's a stupid
question about DHCP.
My target is running udhcpc over a wireless (not wi-fi) interface to a
remote radio which is running a dhcp relay agent. I see the DHCP
discover sent out, and I see (at the driver level) the DHCP offer coming
back. However, the offer is being sent unicast directly to my (new) IP
address, which I don't know yet. As a result, the ip stack is dropping
the packet because of "no route". So I ask myself, how can I receive a
UDP packet addressed directly to me if I don't yet know my own address?
It defies logic.
And the odd part is, it works with another version of this card on
Windows, though I wouldn't be surprised if they just hacked it up to
"just work" anyway.
Because of the nature of this wireless connection, it really needs to be
unicast. I'm thinking of recognizing a UDP/DHCP packet in the radio
driver and hacking the iphdr source addr to be a broadcast, so the raw
socket in udhcpc will receive it, but this shouldn't be necessary.
So-- how is a unicast dhcp offer supposed to work?
-Phil K
^ permalink raw reply
* Re: Kernel Blocked
From: David H. Lynch Jr. @ 2006-09-17 13:16 UTC (permalink / raw)
To: wei.li4; +Cc: linuxppc-embedded
In-Reply-To: <20060915155139.3u0q0lb5s0g0ww0s@webmail.mcgill.ca>
I have a Xilinx ppc405 working out of the 2.6.18-rc7 linux-2.6 git
tree - with patches for my board.
I beleive you are either just at the end of the code in
arch/ppc/boot/simple - which is mostly the initial load/decompress.
Or just started the code in arch/ppc/kernel/head_4xx.S
You ought to be able to grep "Now booting" to establish a last know
good point.
There is also a pretty good call tree in comments of
arch/ppc/platforms/4xx/xilinx_ml403.c.
While small parts are ml403 specific, much of it is generic.
However, if you have not gotten into arch/ppc/kernel/head_4xx.S then
you are not at the begining yet.
wei.li4@elf.mcgill.ca wrote:
> Hi All,
>
> First, if anyone wants to use linux 2.6.18-rc2-g73a589b5 with ppc, he
> should patch inflate.c from linux 2.6.18-rc7 to fix Uncompressing
> failure problem. But new problem is: when relocate and gunzip functions
> are finished, and 'Now booting the kernel' is shown, the system is
> halted. My bootloader is working fine with linux 2.6.13, could anyone
> tell me what the next function executes and how to check this kind of
> problem, thanks.
>
> Wei
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
--
Dave Lynch DLA Systems
Software Development: Embedded Linux
717.627.3770 dhlii@dlasys.net http://www.dlasys.net
fax: 1.253.369.9244 Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.
"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein
^ permalink raw reply
* Re: Cell - linux compatibility question
From: jschopp @ 2006-09-17 22:33 UTC (permalink / raw)
To: Donald Chiarulli; +Cc: linuxppc64-dev, cell_support, Steve Levitan
In-Reply-To: <5619A22F-A50E-4FE1-B48B-B7AEE5481542@cs.pitt.edu>
Donald Chiarulli wrote:
> Hello folks..
>
> We are about to order a 1U dual cell server from Mercury Computer, see:
>
> http://www.mc.com/products/view/index.cfm?id=96&type=boards
>
> They are offering a linux (yellow dog) from terra-soft on this
> platform based on the 2.6.14-1 kernel. I understand that your kernel
> (I assume that it is fedora core 5) is built for the blade board that
> you show on your website.
>
> Do you know anyone who has experience with porting the Cell GNU
> toolchain to this platform?
>
> Any predictions on the relative difficulty?
>
> Thanks in advance for any input you may be able to provide.
Any powerpc toolchain will work out of the box. The SPU toolchain isn't mainline fsf yet,
but I assume terra-soft bundles the SPU gnu toolchain as well. If not you can get it here:
http://www.bsc.es/projects/deepcomputing/linuxoncell/
^ permalink raw reply
* 440SPe - Linux 2.6 xilinx System ACE driver
From: agnel juni @ 2006-09-17 23:01 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]
Hello all
We are working on a 440SPe based custom board.We are trying to port the Xilinx Ssytem ACe driver onto this platform, since we need to have access to the Compact Flash to load the File system.
We validated the hardware by reading the Compact Flash through the System ACE controller from u-boot.But we find difficulties from the kernel.
We applied the system ACE driver patch onto linux-2.6.16-2.
We tried in both polling and interrupt mode.
Following are the main changes we did in the driver:
1. System ACE controller base address configuration (xparameters_ml300.h, adapter.c)
2. Endianess (xsysace_l.c)
3. IRQ (xparameters_ml300.h)
With these changes we are able to read/write to the compact flash controller.
But we see difficulties while reading the compact flash.
'Fdisk' command lists the partition details first time we run the command. While issuing the Issuing the command second time, it exits to the command prompt without displaying the partitions.
Also we coudn't succeed in mounting the system.
Could someone give us some pointers to debug in this issue.
Thanks
Junita
---------------------------------
Find out what India is talking about on - Yahoo! Answers India
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
[-- Attachment #2: Type: text/html, Size: 1566 bytes --]
^ permalink raw reply
* [PATCH] powerpc: ibmveth: Harden driver initilisation for kexec
From: Michael Ellerman @ 2006-09-18 4:31 UTC (permalink / raw)
To: jgarzik; +Cc: linuxppc-dev list, netdev@vger.kernel.org, Anton Blanchard
Hi Jeff,
This patch has been floating around for a while now, Santi originally
sent it in March: http://www.spinics.net/lists/netdev/msg00471.html
You replied saying you thought it was "bonkers", I think I explained why
it wasn't, perhaps you disagree.
I'm resending it now in the hope you can either give us more info on
your objections, or merge it.
After a kexec the ibmveth driver will fail when trying to register with
the Hypervisor because the previous kernel has not unregistered.
So if the registration fails, we unregister and then try again.
We don't unconditionally unregister, because we don't want to disturb the
regular code path for 99% of users.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Santiago Leon <santil@us.ibm.com>
---
ibmveth.c | 31 ++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)
Index: to-merge/drivers/net/ibmveth.c
===================================================================
--- to-merge.orig/drivers/net/ibmveth.c
+++ to-merge/drivers/net/ibmveth.c
@@ -437,6 +437,31 @@ static void ibmveth_cleanup(struct ibmve
&adapter->rx_buff_pool[i]);
}
+static int ibmveth_register_logical_lan(struct ibmveth_adapter *adapter,
+ union ibmveth_buf_desc rxq_desc, u64 mac_address)
+{
+ int rc, try_again = 1;
+
+ /* After a kexec the adapter will still be open, so our attempt to
+ * open it will fail. So if we get a failure we free the adapter and
+ * try again, but only once. */
+retry:
+ rc = h_register_logical_lan(adapter->vdev->unit_address,
+ adapter->buffer_list_dma, rxq_desc.desc,
+ adapter->filter_list_dma, mac_address);
+
+ if (rc != H_SUCCESS && try_again) {
+ do {
+ rc = h_free_logical_lan(adapter->vdev->unit_address);
+ } while (H_IS_LONG_BUSY(rc) || (rc == H_BUSY));
+
+ try_again = 0;
+ goto retry;
+ }
+
+ return rc;
+}
+
static int ibmveth_open(struct net_device *netdev)
{
struct ibmveth_adapter *adapter = netdev->priv;
@@ -503,11 +528,7 @@ static int ibmveth_open(struct net_devic
ibmveth_debug_printk("receive q @ 0x%p\n", adapter->rx_queue.queue_addr);
- lpar_rc = h_register_logical_lan(adapter->vdev->unit_address,
- adapter->buffer_list_dma,
- rxq_desc.desc,
- adapter->filter_list_dma,
- mac_address);
+ lpar_rc = ibmveth_register_logical_lan(adapter, rxq_desc, mac_address);
if(lpar_rc != H_SUCCESS) {
ibmveth_error_printk("h_register_logical_lan failed with %ld\n", lpar_rc);
^ permalink raw reply
* I2C adapter device file problem
From: Sachin Rane @ 2006-09-18 5:19 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <8584FDC94AFF7640B17B8A89B23B19B34F656A@sbsserver.AlphionCorp.local>
[-- Attachment #1.1: Type: text/plain, Size: 1219 bytes --]
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.
----------------------------------------------------------------------------------------
-bash-2.05b# cd /sys/bus/i2c/devices
-bash-2.05b# ls -la *
lrwxrwxrwx 1 root root 0 Apr 6 06:42 0-0050 -> ../../../devices/platform/i2c-0/0-0050
lrwxrwxrwx 1 root root 0 Apr 6 06:42 0-0053 -> ../../../devices/platform/i2c-0/0-0053
lrwxrwxrwx 1 root root 0 Apr 6 06:42 0-0054 -> ../../../devices/platform/i2c-0/0-0054
-bash-2.05b# cat ../../../devices/platform/i2c-0/0-0050/name
eeprom
----------------------------------------------------------------------------------------
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/'.
Am I missing anything while loading the driver?
I have attached the board boot up and 'demsg' log file.
Thanks and Regards,
Sachin Rane
[-- Attachment #1.2: Type: text/html, Size: 2692 bytes --]
[-- Attachment #2: bootup_log_i2cDrivers.txt --]
[-- Type: text/plain, Size: 8536 bytes --]
U-Boot 1.1.4 (Aug 7 2006 - 20:36:40)
CPU: AMCC PowerPC 440GX Rev. F at 533.333 MHz (PLB=133, OPB=66, EBC=66 MHz)
I2C boot EEPROM enabled
Internal PCI arbiter enabled
32 kB I-Cache 32 kB D-Cache
Board: Ocotea - AMCC PPC440GX Evaluation Board
I2C: ready
DRAM: 256 MB
FLASH: 5 MB
PCI: Bus Dev VenId DevId Class Int
In: serial
Out: serial
Err: serial
Net: ppc_4xx_eth0, ppc_4xx_eth1, ppc_4xx_eth2, ppc_4xx_eth3
Sachin " ****************Read ReadMeInstructions: Uboot Environment Variable Configuration *************"
Hit any key to stop autoboot: 0
## Booting image at ffc00000 ...
Image Name: Linux-2.6.16.1
Created: 2006-08-02 19:51:26 UTC
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 931818 Bytes = 910 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Linux version 2.6.16.1 (root@linux) (gcc version 3.4.1 20040714 (TimeSys 3.4.1-7)) #3 Thu Aug 3 01:21:21 IST 2006
IBM Ocotea port (MontaVista Software, Inc. <source@mvista.com>)
Built 1 zonelists
Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.2:/opt/timesys/linux/6.1/ppc440-std/rfs ip=192.168.0.54:192.168.0.2:192.168.0.1:255.255.255.0:ocotea:eth
0::off console=ttyS0,115200
PID hash table entries: 2048 (order: 11, 32768 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 257664k available (1420k kernel code, 460k data, 112k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
PCI: Probing PCI hardware
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0x0 (irq = 0) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 1) is a 16550A
PPC 4xx OCP EMAC driver, version 3.54
mal0: initialized, 4 TX channels, 4 RX channels
zmii0: bridge in SMII mode
eth0: emac0, MAC 00:01:73:01:de:c8
eth0: found Generic MII PHY (0x01)
eth1: emac1, MAC 00:01:73:01:de:c9
eth1: found Generic MII PHY (0x02)
rgmii0: input 0 in RGMII mode
eth2: emac2, MAC 00:01:73:01:de:ca
eth2: found CIS8201 Gigabit Ethernet PHY (0x10)
rgmii0: input 1 in RGMII mode
eth3: emac3, MAC 00:01:73:01:de:cb
eth3: found CIS8201 Gigabit Ethernet PHY (0x18)
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: link is down
IP-Config: Complete:
device=eth0, addr=192.168.0.54, mask=255.255.255.0, gw=192.168.0.1,
host=ocotea, domain=, nis-domain=(none),
bootserver=192.168.0.2, rootserver=192.168.0.2, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.2
eth0: link is up, 100 FDX, pause enabled
Looking up port of RPC 100005/1 on 192.168.0.2
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 112k init
INIT: version 2.84 booting
Welcome to Distribution built using LinuxLink by TimeSys (6.1)
mounting... ramfs at /dev
Creating initial udev device nodes:
making extra nodes
udev startup is finished!
Initializing hardware... storage network audio done[ OK ]
raidautorun: failed to open /dev/md0: 6
Configuring kernel parameters: [ OK ]
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
Setting clock : Mon Apr 6 08:19:06 UTC 2015 [ OK ]
Setting hostname timesys-bsp: [ OK ]
Your system appears to have shut down uncleanly
Press Y within 1 seconds to force file system integrity check...
Remounting root filesystem in read-write mode: [ OK ]
Checking filesystems
Checking all file systems.
[ OK ]
chown: changing ownership of `/tmp/.ICE-unix': Operation not permitted
Enabling swap space: [ OK ]
INIT: Entering runlevel: 3
Entering non-interactive startup
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
Starting portmap: [ OK ]
Starting NFS statd: [ OK ]
Starting xinetd: [ OK ]
Starting crond: [ OK ]
Starting atd: [ OK ]
Starting system message bus: [ OK ]
Starting the Alphion Demo App
Starting alphiondemo
************* Alphion Demo APP Started *********************
************* This is a sample Demo to start and stop apps ********
Done
Distribution built using LinuxLink by TimeSys (6.1)
Kernel 2.6.16.1 for ppc
timesys-bsp login: root
Last login: Mon Apr 6 06:33:48 on ttyS0
-bash-2.05b# lsmod
Module Size Used by
-bash-2.05b# **************************************After L Alphion Wake after a minute .....
-bash: ********************: command not found
-bash-2.05b#
-bash-2.05b#
-bash-2.05b# ps -ax | grep alphion
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
352 ? S 0:00 /home/AlphionApps//alphiondemo
383 ttyS0 R+ 0:00 grep alphion
-bash-2.05b# kill -9 352
-bash-2.05b# ************************************* output of lsmod *************
-bash: *************************************: command not found
-bash-2.05b# ************************************* output of lsmod *************
-bash-2.05b#
-bash-2.05b#
-bash-2.05b# lsmod
Module Size Used by
-bash-2.05b#
-bash-2.05b#
-bash-2.05b#
-bash-2.05b#
-bash-2.05b#
-bash-2.05b# *************Inserting the Modules *************
-bash: *************Inserting: command not found
-bash-2.05b#
-bash-2.05b# insmod i2c-dev.ko
insmod: can't read 'i2c-dev.ko': No such file or directory
-bash-2.05b# cd /lib/modules/2.6.16.1/kernel/drivers/i2c/
-bash-2.05b# insmod i2c-dev.ko
i2c_dev: Unknown symbol i2c_check_addr
i2c_dev: Unknown symbol i2c_get_adapter
i2c_dev: Unknown symbol i2c_control
i2c_dev: Unknown symbol i2c_master_recv
i2c_dev: Unknown symbol i2c_smbus_xfer
i2c_dev: Unknown symbol i2c_register_driver
i2c_dev: Unknown symbol i2c_put_adapter
i2c_dev: Unknown symbol i2c_transfer
i2c_dev: Unknown symbol i2c_del_driver
i2c_dev: Unknown symbol i2c_master_send
insmod: error inserting 'i2c-dev.ko': -1 Unknown symbol in module
-bash-2.05b# insmod i2c-core.ko
-bash-2.05b# lsmod
Module Size Used by
i2c_core 22384 0
-bash-2.05b# insmod i2c-dev.ko
-bash-2.05b# lsmod
Module Size Used by
i2c_dev 10116 0
i2c_core 22384 1 i2c_dev
-bash-2.05b# ls
algos busses chips i2c-core.ko i2c-dev.ko
-bash-2.05b# cd chips/
-bash-2.05b# insmod
insmod insmod.static insmod_ksymoops_clean
-bash-2.05b# insmod eeprom.ko
-bash-2.05b# lsmod
Module Size Used by
eeprom 6736 0
i2c_dev 10116 0
i2c_core 22384 2 eeprom,i2c_dev
-bash-2.05b# ls
ds1337.ko eeprom.ko max6875.ko pcf8574.ko rtc8564.ko
ds1374.ko m41t00.ko pca9539.ko pcf8591.ko x1205.ko
-bash-2.05b# cd ..
-bash-2.05b# ls
algos busses chips i2c-core.ko i2c-dev.ko
-bash-2.05b# cd busses/
-bash-2.05b# ls
i2c-ali1535.ko i2c-i801.ko i2c-pca-isa.ko i2c-sis96x.ko
i2c-ali1563.ko i2c-i810.ko i2c-piix4.ko i2c-stub.ko
i2c-ali15x3.ko i2c-ibm_iic.ko i2c-prosavage.ko i2c-via.ko
i2c-amd756-s4882.ko i2c-mpc.ko i2c-savage4.ko i2c-viapro.ko
i2c-amd756.ko i2c-nforce2.ko i2c-sis5595.ko i2c-voodoo3.ko
i2c-amd8111.ko i2c-parport-light.ko i2c-sis630.ko scx200_acb.ko
-bash-2.05b# insmod 2c-ibm_iic.ko
insmod: can't read '2c-ibm_iic.ko': No such file or directory
-bash-2.05b# insmod i2c-ibm_iic.ko
-bash-2.05b# lsmod
Module Size Used by
i2c_ibm_iic 7432 0
eeprom 6736 0
i2c_dev 10116 0
i2c_core 22384 3 i2c_ibm_iic,eeprom,i2c_dev
[-- Attachment #3: dmesg_log_i2cDrivers.txt --]
[-- Type: text/plain, Size: 5791 bytes --]
-bash-2.05b# dmesg
Linux version 2.6.16.1 (root@linux) (gcc version 3.4.1 20040714 (TimeSys 3.4.1-7)) #3 Thu Aug 3 01:21:21 IST 2006
IBM Ocotea port (MontaVista Software, Inc. <source@mvista.com>)
On node 0 totalpages: 65536
DMA zone: 65536 pages, LIFO batch:15
DMA32 zone: 0 pages, LIFO batch:0
Normal zone: 0 pages, LIFO batch:0
HighMem zone: 0 pages, LIFO batch:0
Built 1 zonelists
Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.2:/opt/timesys/linux/6.1/ppc440-std/rfs ip=192.168.0.54:192.168.0.2:192.168.0.1:255.255.255.0:ocotea:eth
0::off console=ttyS0,115200
PID hash table entries: 2048 (order: 11, 32768 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 257664k available (1420k kernel code, 460k data, 112k init, 0k highmem)
Calibrating delay loop... 798.72 BogoMIPS (lpj=1597440)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
PCI: Probing PCI hardware
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0x0 (irq = 0) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 1) is a 16550A
PPC 4xx OCP EMAC driver, version 3.54
mal0: initialized, 4 TX channels, 4 RX channels
zmii0: bridge in SMII mode
eth0: emac0, MAC 00:01:73:01:de:c8
eth0: found Generic MII PHY (0x01)
eth1: emac1, MAC 00:01:73:01:de:c9
eth1: found Generic MII PHY (0x02)
rgmii0: input 0 in RGMII mode
eth2: emac2, MAC 00:01:73:01:de:ca
eth2: found CIS8201 Gigabit Ethernet PHY (0x10)
rgmii0: input 1 in RGMII mode
eth3: emac3, MAC 00:01:73:01:de:cb
eth3: found CIS8201 Gigabit Ethernet PHY (0x18)
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: link is down
IP-Config: Complete:
device=eth0, addr=192.168.0.54, mask=255.255.255.0, gw=192.168.0.1,
host=ocotea, domain=, nis-domain=(none),
bootserver=192.168.0.2, rootserver=192.168.0.2, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.2
eth0: link is up, 100 FDX, pause enabled
Looking up port of RPC 100005/1 on 192.168.0.2
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 112k init
i2c_dev: Unknown symbol i2c_check_addr
i2c_dev: Unknown symbol i2c_get_adapter
i2c_dev: Unknown symbol i2c_control
i2c_dev: Unknown symbol i2c_master_recv
i2c_dev: Unknown symbol i2c_smbus_xfer
i2c_dev: Unknown symbol i2c_register_driver
i2c_dev: Unknown symbol i2c_put_adapter
i2c_dev: Unknown symbol i2c_transfer
i2c_dev: Unknown symbol i2c_del_driver
i2c_dev: Unknown symbol i2c_master_send
i2c /dev entries driver
i2c-core: driver [dev_driver] registered
i2c-core: driver [eeprom] registered
IBM IIC driver v2.1
i2c_adapter i2c-0: adapter [IBM IIC] registered
i2c-dev: adapter [IBM IIC] registered as minor 0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x50
i2c_adapter i2c-0: master_xfer[0] W, addr=0x50, len=0
i2c_adapter i2c-0: master_xfer[0] W, addr=0x50, len=0
i2c_adapter i2c-0: client [eeprom] registered with bus id 0-0050
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x51
i2c_adapter i2c-0: master_xfer[0] W, addr=0x51, len=0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x52
i2c_adapter i2c-0: master_xfer[0] W, addr=0x52, len=0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x53
i2c_adapter i2c-0: master_xfer[0] W, addr=0x53, len=0
i2c_adapter i2c-0: master_xfer[0] W, addr=0x53, len=0
i2c_adapter i2c-0: client [eeprom] registered with bus id 0-0053
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x54
i2c_adapter i2c-0: master_xfer[0] W, addr=0x54, len=0
i2c_adapter i2c-0: master_xfer[0] W, addr=0x54, len=0
i2c_adapter i2c-0: client [eeprom] registered with bus id 0-0054
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x55
i2c_adapter i2c-0: master_xfer[0] W, addr=0x55, len=0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x56
i2c_adapter i2c-0: master_xfer[0] W, addr=0x56, len=0
i2c_adapter i2c-0: found normal entry for adapter 0, addr 0x57
i2c_adapter i2c-0: master_xfer[0] W, addr=0x57, len=0
ibm-iic0: using standard (100 kHz) mode
i2c_adapter i2c-1: adapter [IBM IIC] registered
i2c-dev: adapter [IBM IIC] registered as minor 1
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x50
i2c_adapter i2c-1: master_xfer[0] W, addr=0x50, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x51
i2c_adapter i2c-1: master_xfer[0] W, addr=0x51, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x52
i2c_adapter i2c-1: master_xfer[0] W, addr=0x52, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x53
i2c_adapter i2c-1: master_xfer[0] W, addr=0x53, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x54
i2c_adapter i2c-1: master_xfer[0] W, addr=0x54, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x55
i2c_adapter i2c-1: master_xfer[0] W, addr=0x55, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x56
i2c_adapter i2c-1: master_xfer[0] W, addr=0x56, len=0
i2c_adapter i2c-1: found normal entry for adapter 1, addr 0x57
i2c_adapter i2c-1: master_xfer[0] W, addr=0x57, len=0
ibm-iic1: using standard (100 kHz) mode
^ permalink raw reply
* [POWERPC] merge iSeries i/o operations with the rest
From: Stephen Rothwell @ 2006-09-18 5:38 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
In-Reply-To: <20060905120817.e52857ee.sfr@canb.auug.org.au>
This patch changes the io operations so that they are out of line if
CONFIG_PPC_ISERIES is set (which they were anyway) and includes a
firmware feature check in that case (so we come closer to building a
combined kernel).
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/platforms/iseries/pci.c | 349 ++++++++++++++++++++++++++----
include/asm-powerpc/io.h | 155 +++++++------
include/asm-powerpc/iseries/iseries_io.h | 60 -----
3 files changed, 380 insertions(+), 184 deletions(-)
This new version produces unchanged code on pSeries and g5 etc and adds a
stack frame for a couple of the iSeries calls. I have not yet measured
the performance hit of taking the io accessors out of line, but that will
only happen in the combined kernel case (whcih we can't build yet).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index f4d427a..7677d45 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -34,6 +34,7 @@ #include <asm/machdep.h>
#include <asm/pci-bridge.h>
#include <asm/iommu.h>
#include <asm/abs_addr.h>
+#include <asm/firmware.h>
#include <asm/iseries/hv_call_xm.h>
#include <asm/iseries/mf.h>
@@ -270,46 +271,6 @@ void pcibios_fixup_resources(struct pci_
}
/*
- * I/0 Memory copy MUST use mmio commands on iSeries
- * To do; For performance, include the hv call directly
- */
-void iSeries_memset_io(volatile void __iomem *dest, char c, size_t Count)
-{
- u8 ByteValue = c;
- long NumberOfBytes = Count;
-
- while (NumberOfBytes > 0) {
- iSeries_Write_Byte(ByteValue, dest++);
- -- NumberOfBytes;
- }
-}
-EXPORT_SYMBOL(iSeries_memset_io);
-
-void iSeries_memcpy_toio(volatile void __iomem *dest, void *source, size_t count)
-{
- char *src = source;
- long NumberOfBytes = count;
-
- while (NumberOfBytes > 0) {
- iSeries_Write_Byte(*src++, dest++);
- -- NumberOfBytes;
- }
-}
-EXPORT_SYMBOL(iSeries_memcpy_toio);
-
-void iSeries_memcpy_fromio(void *dest, const volatile void __iomem *src, size_t count)
-{
- char *dst = dest;
- long NumberOfBytes = count;
-
- while (NumberOfBytes > 0) {
- *dst++ = iSeries_Read_Byte(src++);
- -- NumberOfBytes;
- }
-}
-EXPORT_SYMBOL(iSeries_memcpy_fromio);
-
-/*
* Look down the chain to find the matching Device Device
*/
static struct device_node *find_Device_Node(int bus, int devfn)
@@ -491,7 +452,7 @@ static inline struct device_node *xlate_
* iSeries_Read_Word = Read Word (16 bit)
* iSeries_Read_Long = Read Long (32 bit)
*/
-u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress)
+static u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress)
{
u64 BarOffset;
u64 dsa;
@@ -518,9 +479,8 @@ u8 iSeries_Read_Byte(const volatile void
return (u8)ret.value;
}
-EXPORT_SYMBOL(iSeries_Read_Byte);
-u16 iSeries_Read_Word(const volatile void __iomem *IoAddress)
+static u16 iSeries_Read_Word(const volatile void __iomem *IoAddress)
{
u64 BarOffset;
u64 dsa;
@@ -548,9 +508,8 @@ u16 iSeries_Read_Word(const volatile voi
return swab16((u16)ret.value);
}
-EXPORT_SYMBOL(iSeries_Read_Word);
-u32 iSeries_Read_Long(const volatile void __iomem *IoAddress)
+static u32 iSeries_Read_Long(const volatile void __iomem *IoAddress)
{
u64 BarOffset;
u64 dsa;
@@ -578,7 +537,6 @@ u32 iSeries_Read_Long(const volatile voi
return swab32((u32)ret.value);
}
-EXPORT_SYMBOL(iSeries_Read_Long);
/*
* Write MM I/O Instructions for the iSeries
@@ -587,7 +545,7 @@ EXPORT_SYMBOL(iSeries_Read_Long);
* iSeries_Write_Word = Write Word(16 bit)
* iSeries_Write_Long = Write Long(32 bit)
*/
-void iSeries_Write_Byte(u8 data, volatile void __iomem *IoAddress)
+static void iSeries_Write_Byte(u8 data, volatile void __iomem *IoAddress)
{
u64 BarOffset;
u64 dsa;
@@ -612,9 +570,8 @@ void iSeries_Write_Byte(u8 data, volatil
rc = HvCall4(HvCallPciBarStore8, dsa, BarOffset, data, 0);
} while (CheckReturnCode("WWB", DevNode, &retry, rc) != 0);
}
-EXPORT_SYMBOL(iSeries_Write_Byte);
-void iSeries_Write_Word(u16 data, volatile void __iomem *IoAddress)
+static void iSeries_Write_Word(u16 data, volatile void __iomem *IoAddress)
{
u64 BarOffset;
u64 dsa;
@@ -639,9 +596,8 @@ void iSeries_Write_Word(u16 data, volati
rc = HvCall4(HvCallPciBarStore16, dsa, BarOffset, swab16(data), 0);
} while (CheckReturnCode("WWW", DevNode, &retry, rc) != 0);
}
-EXPORT_SYMBOL(iSeries_Write_Word);
-void iSeries_Write_Long(u32 data, volatile void __iomem *IoAddress)
+static void iSeries_Write_Long(u32 data, volatile void __iomem *IoAddress)
{
u64 BarOffset;
u64 dsa;
@@ -666,4 +622,293 @@ void iSeries_Write_Long(u32 data, volati
rc = HvCall4(HvCallPciBarStore32, dsa, BarOffset, swab32(data), 0);
} while (CheckReturnCode("WWL", DevNode, &retry, rc) != 0);
}
-EXPORT_SYMBOL(iSeries_Write_Long);
+
+extern unsigned char __raw_readb(const volatile void __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES)) {
+ BUG();
+ return 0;
+ }
+ return *(volatile unsigned char __force *)addr;
+}
+EXPORT_SYMBOL(__raw_readb);
+
+extern unsigned short __raw_readw(const volatile void __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES)) {
+ BUG();
+ return 0;
+ }
+ return *(volatile unsigned short __force *)addr;
+}
+EXPORT_SYMBOL(__raw_readw);
+
+extern unsigned int __raw_readl(const volatile void __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES)) {
+ BUG();
+ return 0;
+ }
+ return *(volatile unsigned int __force *)addr;
+}
+EXPORT_SYMBOL(__raw_readl);
+
+extern unsigned long __raw_readq(const volatile void __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES)) {
+ BUG();
+ return 0;
+ }
+ return *(volatile unsigned long __force *)addr;
+}
+EXPORT_SYMBOL(__raw_readq);
+
+extern void __raw_writeb(unsigned char v, volatile void __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ BUG();
+ else
+ *(volatile unsigned char __force *)addr = v;
+}
+EXPORT_SYMBOL(__raw_writeb);
+
+extern void __raw_writew(unsigned short v, volatile void __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ BUG();
+ else
+ *(volatile unsigned short __force *)addr = v;
+}
+EXPORT_SYMBOL(__raw_writew);
+
+extern void __raw_writel(unsigned int v, volatile void __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ BUG();
+ else
+ *(volatile unsigned int __force *)addr = v;
+}
+EXPORT_SYMBOL(__raw_writel);
+
+extern void __raw_writeq(unsigned long v, volatile void __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ BUG();
+ else
+ *(volatile unsigned long __force *)addr = v;
+}
+EXPORT_SYMBOL(__raw_writeq);
+
+int in_8(const volatile unsigned char __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ return iSeries_Read_Byte(addr);
+ return __in_8(addr);
+}
+EXPORT_SYMBOL(in_8);
+
+void out_8(volatile unsigned char __iomem *addr, int val)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ iSeries_Write_Byte(val, addr);
+ else
+ __out_8(addr, val);
+}
+EXPORT_SYMBOL(out_8);
+
+int in_le16(const volatile unsigned short __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ return iSeries_Read_Word(addr);
+ return __in_le16(addr);
+}
+EXPORT_SYMBOL(in_le16);
+
+int in_be16(const volatile unsigned short __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES)) {
+ BUG();
+ return 0;
+ }
+ return __in_be16(addr);
+}
+EXPORT_SYMBOL(in_be16);
+
+void out_le16(volatile unsigned short __iomem *addr, int val)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ iSeries_Write_Word(val, addr);
+ else
+ __out_le16(addr, val);
+}
+EXPORT_SYMBOL(out_le16);
+
+void out_be16(volatile unsigned short __iomem *addr, int val)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ BUG();
+ else
+ __out_be16(addr, val);
+}
+EXPORT_SYMBOL(out_be16);
+
+unsigned in_le32(const volatile unsigned __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ return iSeries_Read_Long(addr);
+ return __in_le32(addr);
+}
+EXPORT_SYMBOL(in_le32);
+
+unsigned in_be32(const volatile unsigned __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES)) {
+ BUG();
+ return 0;
+ }
+ return __in_be32(addr);
+}
+EXPORT_SYMBOL(in_be32);
+
+void out_le32(volatile unsigned __iomem *addr, int val)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ iSeries_Write_Long(val, addr);
+ else
+ __out_le32(addr, val);
+}
+EXPORT_SYMBOL(out_le32);
+
+void out_be32(volatile unsigned __iomem *addr, int val)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ BUG();
+ else
+ __out_be32(addr, val);
+}
+EXPORT_SYMBOL(out_be32);
+
+unsigned long in_le64(const volatile unsigned long __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES)) {
+ BUG();
+ return 0;
+ }
+ return __in_le64(addr);
+}
+EXPORT_SYMBOL(in_le64);
+
+unsigned long in_be64(const volatile unsigned long __iomem *addr)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES)) {
+ BUG();
+ return 0;
+ }
+ return __in_be64(addr);
+}
+EXPORT_SYMBOL(in_be64);
+
+void out_le64(volatile unsigned long __iomem *addr, unsigned long val)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ BUG();
+ else
+ __out_le64(addr, val);
+}
+EXPORT_SYMBOL(out_le64);
+
+void out_be64(volatile unsigned long __iomem *addr, unsigned long val)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ BUG();
+ else
+ __out_be64(addr, val);
+}
+EXPORT_SYMBOL(out_be64);
+
+void memset_io(volatile void __iomem *addr, int c, unsigned long n)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES)) {
+ volatile char __iomem *d = addr;
+
+ while (n-- > 0) {
+ iSeries_Write_Byte(c, d++);
+ }
+ } else
+ eeh_memset_io(addr, c, n);
+}
+EXPORT_SYMBOL(memset_io);
+
+void memcpy_fromio(void *dest, const volatile void __iomem *src,
+ unsigned long n)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES)) {
+ char *d = dest;
+ const volatile char __iomem *s = src;
+
+ while (n-- > 0) {
+ *d++ = iSeries_Read_Byte(s++);
+ }
+ } else
+ eeh_memcpy_fromio(dest, src, n);
+}
+EXPORT_SYMBOL(memcpy_fromio);
+
+void memcpy_toio(volatile void __iomem *dest, const void *src, unsigned long n)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES)) {
+ const char *s = src;
+ volatile char __iomem *d = dest;
+
+ while (n-- > 0) {
+ iSeries_Write_Byte(*s++, d++);
+ }
+ } else
+ eeh_memcpy_toio(dest, src, n);
+}
+EXPORT_SYMBOL(memcpy_toio);
+
+void insb(unsigned long port, void *buf, int ns)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ BUG();
+ else
+ eeh_insb(port, buf, ns);
+}
+EXPORT_SYMBOL(insb);
+
+void insw(unsigned long port, void *buf, int ns)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ BUG();
+ else
+ eeh_insw_ns(port, buf, ns);
+}
+EXPORT_SYMBOL(insw);
+
+void insl(unsigned long port, void *buf, int ns)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ BUG();
+ else
+ eeh_insl_ns(port, buf, ns);
+}
+EXPORT_SYMBOL(insl);
+
+void insw_ns(unsigned long port, void *buf, int ns)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ BUG();
+ else
+ eeh_insw_ns(port, buf, ns);
+}
+EXPORT_SYMBOL(insw_ns);
+
+void insl_ns(unsigned long port, void *buf, int ns)
+{
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ BUG();
+ else
+ eeh_insl_ns(port, buf, ns);
+}
+EXPORT_SYMBOL(insl_ns);
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h
index 212428d..05575b2 100644
--- a/include/asm-powerpc/io.h
+++ b/include/asm-powerpc/io.h
@@ -20,9 +20,6 @@ #include <linux/compiler.h>
#include <asm/page.h>
#include <asm/byteorder.h>
#include <asm/paca.h>
-#ifdef CONFIG_PPC_ISERIES
-#include <asm/iseries/iseries_io.h>
-#endif
#include <asm/synch.h>
#include <asm/delay.h>
@@ -43,42 +40,59 @@ extern unsigned long isa_io_base;
extern unsigned long pci_io_base;
#ifdef CONFIG_PPC_ISERIES
-/* __raw_* accessors aren't supported on iSeries */
-#define __raw_readb(addr) { BUG(); 0; }
-#define __raw_readw(addr) { BUG(); 0; }
-#define __raw_readl(addr) { BUG(); 0; }
-#define __raw_readq(addr) { BUG(); 0; }
-#define __raw_writeb(v, addr) { BUG(); 0; }
-#define __raw_writew(v, addr) { BUG(); 0; }
-#define __raw_writel(v, addr) { BUG(); 0; }
-#define __raw_writeq(v, addr) { BUG(); 0; }
-#define readb(addr) iSeries_Read_Byte(addr)
-#define readw(addr) iSeries_Read_Word(addr)
-#define readl(addr) iSeries_Read_Long(addr)
-#define writeb(data, addr) iSeries_Write_Byte((data),(addr))
-#define writew(data, addr) iSeries_Write_Word((data),(addr))
-#define writel(data, addr) iSeries_Write_Long((data),(addr))
-#define memset_io(a,b,c) iSeries_memset_io((a),(b),(c))
-#define memcpy_fromio(a,b,c) iSeries_memcpy_fromio((a), (b), (c))
-#define memcpy_toio(a,b,c) iSeries_memcpy_toio((a), (b), (c))
-
-#define inb(addr) readb(((void __iomem *)(long)(addr)))
-#define inw(addr) readw(((void __iomem *)(long)(addr)))
-#define inl(addr) readl(((void __iomem *)(long)(addr)))
-#define outb(data,addr) writeb(data,((void __iomem *)(long)(addr)))
-#define outw(data,addr) writew(data,((void __iomem *)(long)(addr)))
-#define outl(data,addr) writel(data,((void __iomem *)(long)(addr)))
-/*
- * The *_ns versions below don't do byte-swapping.
- * Neither do the standard versions now, these are just here
- * for older code.
- */
-#define insb(port, buf, ns) _insb((u8 __iomem *)((port)+pci_io_base), (buf), (ns))
-#define insw(port, buf, ns) _insw_ns((u8 __iomem *)((port)+pci_io_base), (buf), (ns))
-#define insl(port, buf, nl) _insl_ns((u8 __iomem *)((port)+pci_io_base), (buf), (nl))
-#define insw_ns(port, buf, ns) _insw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns))
-#define insl_ns(port, buf, nl) _insl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl))
-#else
+
+extern int in_8(const volatile unsigned char __iomem *addr);
+extern void out_8(volatile unsigned char __iomem *addr, int val);
+extern int in_le16(const volatile unsigned short __iomem *addr);
+extern int in_be16(const volatile unsigned short __iomem *addr);
+extern void out_le16(volatile unsigned short __iomem *addr, int val);
+extern void out_be16(volatile unsigned short __iomem *addr, int val);
+extern unsigned in_le32(const volatile unsigned __iomem *addr);
+extern unsigned in_be32(const volatile unsigned __iomem *addr);
+extern void out_le32(volatile unsigned __iomem *addr, int val);
+extern void out_be32(volatile unsigned __iomem *addr, int val);
+extern unsigned long in_le64(const volatile unsigned long __iomem *addr);
+extern unsigned long in_be64(const volatile unsigned long __iomem *addr);
+extern void out_le64(volatile unsigned long __iomem *addr, unsigned long val);
+extern void out_be64(volatile unsigned long __iomem *addr, unsigned long val);
+
+extern unsigned char __raw_readb(const volatile void __iomem *addr);
+extern unsigned short __raw_readw(const volatile void __iomem *addr);
+extern unsigned int __raw_readl(const volatile void __iomem *addr);
+extern unsigned long __raw_readq(const volatile void __iomem *addr);
+extern void __raw_writeb(unsigned char v, volatile void __iomem *addr);
+extern void __raw_writew(unsigned short v, volatile void __iomem *addr);
+extern void __raw_writel(unsigned int v, volatile void __iomem *addr);
+extern void __raw_writeq(unsigned long v, volatile void __iomem *addr);
+
+extern void memset_io(volatile void __iomem *addr, int c, unsigned long n);
+extern void memcpy_fromio(void *dest, const volatile void __iomem *src,
+ unsigned long n);
+extern void memcpy_toio(volatile void __iomem *dest, const void *src,
+ unsigned long n);
+
+extern void insb(unsigned long port, void *buf, int ns);
+extern void insw(unsigned long port, void *buf, int ns);
+extern void insl(unsigned long port, void *buf, int ns);
+extern void insw_ns(unsigned long port, void *buf, int ns);
+extern void insl_ns(unsigned long port, void *buf, int ns);
+
+#else /* CONFIG_PPC_ISERIES */
+
+#define in_8(addr) __in_8((addr))
+#define out_8(addr, val) __out_8((addr), (val))
+#define in_le16(addr) __in_le16((addr))
+#define in_be16(addr) __in_be16((addr))
+#define out_le16(addr, val) __out_le16((addr), (val))
+#define out_be16(addr, val) __out_be16((addr), (val))
+#define in_le32(addr) __in_le32((addr))
+#define in_be32(addr) __in_be32((addr))
+#define out_le32(addr, val) __out_le32((addr), (val))
+#define out_be32(addr, val) __out_be32((addr), (val))
+#define in_le64(addr) __in_le64((addr))
+#define in_be64(addr) __in_be64((addr))
+#define out_le64(addr, val) __out_le64((addr), (val))
+#define out_be64(addr, val) __out_be64((addr), (val))
static inline unsigned char __raw_readb(const volatile void __iomem *addr)
{
@@ -112,23 +126,9 @@ static inline void __raw_writeq(unsigned
{
*(volatile unsigned long __force *)addr = v;
}
-#define readb(addr) eeh_readb(addr)
-#define readw(addr) eeh_readw(addr)
-#define readl(addr) eeh_readl(addr)
-#define readq(addr) eeh_readq(addr)
-#define writeb(data, addr) eeh_writeb((data), (addr))
-#define writew(data, addr) eeh_writew((data), (addr))
-#define writel(data, addr) eeh_writel((data), (addr))
-#define writeq(data, addr) eeh_writeq((data), (addr))
#define memset_io(a,b,c) eeh_memset_io((a),(b),(c))
#define memcpy_fromio(a,b,c) eeh_memcpy_fromio((a),(b),(c))
#define memcpy_toio(a,b,c) eeh_memcpy_toio((a),(b),(c))
-#define inb(port) eeh_inb((unsigned long)port)
-#define outb(val, port) eeh_outb(val, (unsigned long)port)
-#define inw(port) eeh_inw((unsigned long)port)
-#define outw(val, port) eeh_outw(val, (unsigned long)port)
-#define inl(port) eeh_inl((unsigned long)port)
-#define outl(val, port) eeh_outl(val, (unsigned long)port)
/*
* The insw/outsw/insl/outsl macros don't do byte-swapping.
@@ -141,12 +141,27 @@ #define insl(port, buf, nl) eeh_insl_ns(
#define insw_ns(port, buf, ns) eeh_insw_ns((port), (buf), (ns))
#define insl_ns(port, buf, nl) eeh_insl_ns((port), (buf), (nl))
-#endif
+#endif /* CONFIG_PPC_ISERIES */
#define outsb(port, buf, ns) _outsb((u8 __iomem *)((port)+pci_io_base), (buf), (ns))
#define outsw(port, buf, ns) _outsw_ns((u16 __iomem *)((port)+pci_io_base), (buf), (ns))
#define outsl(port, buf, nl) _outsl_ns((u32 __iomem *)((port)+pci_io_base), (buf), (nl))
+#define readb(addr) eeh_readb(addr)
+#define readw(addr) eeh_readw(addr)
+#define readl(addr) eeh_readl(addr)
+#define readq(addr) eeh_readq(addr)
+#define writeb(data, addr) eeh_writeb((data), (addr))
+#define writew(data, addr) eeh_writew((data), (addr))
+#define writel(data, addr) eeh_writel((data), (addr))
+#define writeq(data, addr) eeh_writeq((data), (addr))
+#define inb(port) eeh_inb((unsigned long)port)
+#define outb(val, port) eeh_outb(val, (unsigned long)port)
+#define inw(port) eeh_inw((unsigned long)port)
+#define outw(val, port) eeh_outw(val, (unsigned long)port)
+#define inl(port) eeh_inl((unsigned long)port)
+#define outl(val, port) eeh_outl(val, (unsigned long)port)
+
#define readb_relaxed(addr) readb(addr)
#define readw_relaxed(addr) readw(addr)
#define readl_relaxed(addr) readl(addr)
@@ -279,7 +294,7 @@ #define iobarrier_w() eieio()
* and should not be used directly by device drivers. Use inb/readb
* instead.
*/
-static inline int in_8(const volatile unsigned char __iomem *addr)
+static inline int __in_8(const volatile unsigned char __iomem *addr)
{
int ret;
@@ -288,14 +303,14 @@ static inline int in_8(const volatile un
return ret;
}
-static inline void out_8(volatile unsigned char __iomem *addr, int val)
+static inline void __out_8(volatile unsigned char __iomem *addr, int val)
{
__asm__ __volatile__("sync; stb%U0%X0 %1,%0"
: "=m" (*addr) : "r" (val));
get_paca()->io_sync = 1;
}
-static inline int in_le16(const volatile unsigned short __iomem *addr)
+static inline int __in_le16(const volatile unsigned short __iomem *addr)
{
int ret;
@@ -304,7 +319,7 @@ static inline int in_le16(const volatile
return ret;
}
-static inline int in_be16(const volatile unsigned short __iomem *addr)
+static inline int __in_be16(const volatile unsigned short __iomem *addr)
{
int ret;
@@ -313,21 +328,21 @@ static inline int in_be16(const volatile
return ret;
}
-static inline void out_le16(volatile unsigned short __iomem *addr, int val)
+static inline void __out_le16(volatile unsigned short __iomem *addr, int val)
{
__asm__ __volatile__("sync; sthbrx %1,0,%2"
: "=m" (*addr) : "r" (val), "r" (addr));
get_paca()->io_sync = 1;
}
-static inline void out_be16(volatile unsigned short __iomem *addr, int val)
+static inline void __out_be16(volatile unsigned short __iomem *addr, int val)
{
__asm__ __volatile__("sync; sth%U0%X0 %1,%0"
: "=m" (*addr) : "r" (val));
get_paca()->io_sync = 1;
}
-static inline unsigned in_le32(const volatile unsigned __iomem *addr)
+static inline unsigned __in_le32(const volatile unsigned __iomem *addr)
{
unsigned ret;
@@ -336,7 +351,7 @@ static inline unsigned in_le32(const vol
return ret;
}
-static inline unsigned in_be32(const volatile unsigned __iomem *addr)
+static inline unsigned __in_be32(const volatile unsigned __iomem *addr)
{
unsigned ret;
@@ -345,21 +360,21 @@ static inline unsigned in_be32(const vol
return ret;
}
-static inline void out_le32(volatile unsigned __iomem *addr, int val)
+static inline void __out_le32(volatile unsigned __iomem *addr, int val)
{
__asm__ __volatile__("sync; stwbrx %1,0,%2" : "=m" (*addr)
: "r" (val), "r" (addr));
get_paca()->io_sync = 1;
}
-static inline void out_be32(volatile unsigned __iomem *addr, int val)
+static inline void __out_be32(volatile unsigned __iomem *addr, int val)
{
__asm__ __volatile__("sync; stw%U0%X0 %1,%0"
: "=m" (*addr) : "r" (val));
get_paca()->io_sync = 1;
}
-static inline unsigned long in_le64(const volatile unsigned long __iomem *addr)
+static inline unsigned long __in_le64(const volatile unsigned long __iomem *addr)
{
unsigned long tmp, ret;
@@ -379,7 +394,7 @@ static inline unsigned long in_le64(cons
return ret;
}
-static inline unsigned long in_be64(const volatile unsigned long __iomem *addr)
+static inline unsigned long __in_be64(const volatile unsigned long __iomem *addr)
{
unsigned long ret;
@@ -388,7 +403,7 @@ static inline unsigned long in_be64(cons
return ret;
}
-static inline void out_le64(volatile unsigned long __iomem *addr, unsigned long val)
+static inline void __out_le64(volatile unsigned long __iomem *addr, unsigned long val)
{
unsigned long tmp;
@@ -406,15 +421,13 @@ static inline void out_le64(volatile uns
get_paca()->io_sync = 1;
}
-static inline void out_be64(volatile unsigned long __iomem *addr, unsigned long val)
+static inline void __out_be64(volatile unsigned long __iomem *addr, unsigned long val)
{
__asm__ __volatile__("sync; std%U0%X0 %1,%0" : "=m" (*addr) : "r" (val));
get_paca()->io_sync = 1;
}
-#ifndef CONFIG_PPC_ISERIES
#include <asm/eeh.h>
-#endif
/**
* check_signature - find BIOS signatures
@@ -430,7 +443,6 @@ static inline int check_signature(const
const unsigned char *signature, int length)
{
int retval = 0;
-#ifndef CONFIG_PPC_ISERIES
do {
if (readb(io_addr) != *signature)
goto out;
@@ -440,7 +452,6 @@ #ifndef CONFIG_PPC_ISERIES
} while (length);
retval = 1;
out:
-#endif
return retval;
}
diff --git a/include/asm-powerpc/iseries/iseries_io.h b/include/asm-powerpc/iseries/iseries_io.h
deleted file mode 100644
index f29009b..0000000
--- a/include/asm-powerpc/iseries/iseries_io.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef _ASM_POWERPC_ISERIES_ISERIES_IO_H
-#define _ASM_POWERPC_ISERIES_ISERIES_IO_H
-
-
-#ifdef CONFIG_PPC_ISERIES
-#include <linux/types.h>
-/*
- * Created by Allan Trautman on Thu Dec 28 2000.
- *
- * Remaps the io.h for the iSeries Io
- * Copyright (C) 2000 Allan H Trautman, IBM Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the:
- * Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307 USA
- *
- * Change Activity:
- * Created December 28, 2000
- * End Change Activity
- */
-
-#ifdef CONFIG_PCI
-extern u8 iSeries_Read_Byte(const volatile void __iomem * IoAddress);
-extern u16 iSeries_Read_Word(const volatile void __iomem * IoAddress);
-extern u32 iSeries_Read_Long(const volatile void __iomem * IoAddress);
-extern void iSeries_Write_Byte(u8 IoData, volatile void __iomem * IoAddress);
-extern void iSeries_Write_Word(u16 IoData, volatile void __iomem * IoAddress);
-extern void iSeries_Write_Long(u32 IoData, volatile void __iomem * IoAddress);
-
-extern void iSeries_memset_io(volatile void __iomem *dest, char x, size_t n);
-extern void iSeries_memcpy_toio(volatile void __iomem *dest, void *source,
- size_t n);
-extern void iSeries_memcpy_fromio(void *dest,
- const volatile void __iomem *source, size_t n);
-#else
-static inline u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress)
-{
- return 0xff;
-}
-
-static inline void iSeries_Write_Byte(u8 IoData,
- volatile void __iomem *IoAddress)
-{
-}
-#endif /* CONFIG_PCI */
-
-#endif /* CONFIG_PPC_ISERIES */
-#endif /* _ASM_POWERPC_ISERIES_ISERIES_IO_H */
--
1.4.2.1
^ permalink raw reply related
* Re: Board Bootup and message log
From: Matthias Fuchs @ 2006-09-18 7:18 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: Sachin Rane
In-Reply-To: <8584FDC94AFF7640B17B8A89B23B19B34F6568@sbsserver.AlphionCorp.local>
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
^ permalink raw reply
* Is -fno-omit-frame-pointer supported on powerpc?
From: Dale Farnsworth @ 2006-09-18 16:17 UTC (permalink / raw)
To: Linuxppc-dev
I found a buggy interaction between kgdb and -fno-omit-frame-pointer on
ppc that we're discussing on kgdb-bugreport.
I noticed that ppc is excluded from the list of archs on which
CONFIG_FRAME_POINTER depends (in lib/Kconfig.debug). Are there
known problems with it? Or is it just not that useful on ppc?
Thanks,
-Dale
^ permalink raw reply
* Re: Kernel module insertion issue with kernel 2.6.15
From: Prakash Jain @ 2006-09-18 18:30 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-embedded
In-Reply-To: <200609170126.26557.arnd@arndb.de>
I suspected it to be a kernel level issue (in insmod) that's why I
posted it for suggestion if someone else also has encountered it while
porting module from 2.4 to 2.6 kernel. I expected mailing list is to be
for any technical questions related to ppc-linux-kernel. I have to check
the GPL status of the module as it is a third party code (I already
mentioned it in my email).
Thanks for your words any way..
Prakash
Arnd Bergmann wrote:
>On Friday 15 September 2006 21:56, Prakash Jain wrote:
>
>
>>Can someone give few pointers on what could be the reasons and where to
>>look to resolve this? Will appreciate your time,
>>
>>
>
>If you want help with this, you need to post your module source code.
>As long as people suspect you're talking about illegal or non-GPL
>code, don't expect anyone to answer technical questions.
>
> Arnd <><
>
>
>
>
^ permalink raw reply
* problems with PLB_TEMAC & xilinx_gige driver under linux 2.4 ...
From: rimas @ 2006-09-19 0:06 UTC (permalink / raw)
To: linuxppc-embedded
Greetings,
i am having problems using the xilinx_gige driver under linux 2.4.26 running
on a Virtex-4 FX12 Mini Module board (from avnet). I am using the plb_temac
and hard_temac blocks under ISE/EDK 8.1.02.
the machine boots fine and the network interface seems to work okay but it
randomly panics sometimes (rather quickly if i'm generating network traffic):
Oops: Exception in kernel mode, sig: 4
NIP: C00DA340 XER: 20000000 LR: C00D34F8 SP: C3945B20 REGS: c3945a70 TRAP:
0700
Not tainted
MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = c3944000[52] 'telnetd' Last syscall: 4
last math 00000000 last altivec 00000000
GPR00: 00000004 C3945B20 C3944000 C02E49F4 C02E4800 00000004 00000001 C0456260
GPR08: C0177424 00000031 C50D8000 00021F03 0008C8E4 10122AA8 00000000 C01A0000
GPR16: 00000000 0000001A 00000000 C3945F18 00001032 03945BA0 00000000 C00038E0
GPR24: C0004800 00000020 C04C06E0 C01864E0 C3945BB0 0000001F 00000000 C02E49F4
Call backtrace:
C0190000 C00D34F8 C0004748 C000483C C00038E0 C00D398C C00F8094
C00EE04C C01039B0 C0104D70 C0115570 C01163A8 C010A600 C012A61C
C00E52F4 C00E5574 C003AB2C C000369C 100572BC 10005064 10005108
0FD9221C 00000000
Kernel panic: Aiee, killing interrupt handler!
In interrupt handler - not syncing
<0>Rebooting in 180 seconds..
it always causes a trap on the same instruction (c00da340) which is inside of
XTemac_IntrFifoHandler()
c00da330: 81 6a 00 28 lwz r11,40(r10)
c00da334: 0c 0b 00 00 twi 0,r11,0
c00da338: 4c 00 01 2c isync
c00da33c: 81 2a 00 20 lwz r9,32(r10)
c00da340: 0c 09 00 00 twi 0,r9,0
c00da344: 4c 00 01 2c isync
this code corresponds to two consecutive in_be32() calls
extern inline unsigned in_be32(volatile unsigned *addr)
{
unsigned ret;
__asm__ __volatile__("lwz%U1%X1 %0,%1;\n"
"twi 0,%0,0;\n"
"isync" : "=r" (ret) : "m" (*addr));
return ret;
}
resulting from this line of code:
CorePending = XTemac_mGetIpifReg(XTE_IPIER_OFFSET) &
XTemac_mGetIpifReg(XTE_IPISR_OFFSET);
i recently got a new mini module that has the later stepping of the V4FX12
part (PVR 20011470) so I got rid of the patch i had applied to disable the
caches (which was required on the earlier stepping of the part to get the
board to even boot reliably).
I still have the patch applied which sets bits 1 and 3 in the CCR0 register.
does anyone have any clue as to what's going on and what to do about it ?
this problem seems rather non-deterministic and weird, i can't help but think
its likely related to some silicon errata or something but nothing on this
page
http://www.xilinx.com/xlnx/xil_ans_display.jsp?iCountryID=1&iLanguageID=1&getPagePath=20658&BV_SessionID=@@@@0135296752.1158623889@@@@&BV_EngineID=cccdaddikmdkkifcefeceihdffhdfkf.0
seems to apply
any advice is very greatly appreciated !
-rimas
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox