Skip to contentSkip to conversation

Using GPIO

DISCUSSION Guillaume Dargaud 5 participants 7 messages May 15, 2008 – May 19, 2008

lore
Share & tools
lore
#0 lore raw

Hello all,
I'm trying to use the Xilinx GPIO from a user program.
Since I haven't managed to compile their example (simon.c is given without a makefile), I wanted to try using /dev/gpio...

So I added
/dev/gpio0 c 666 0 0 10 185 - - -
to device_table.txt when I generated my root filesystem with buildroot, but apparently this leads nowhere as it's not visible in /proc/devices.

Is there some example or tutorial on how to use CONFIG_XILINX_GPIO ? Either as a device or as API calls...

Signature · 2 lines
Guillaume Dargaud
http://www.gdargaud.net/
#1 lore raw

Hi Guillaume,

If you're using arch/powerpc, my understanding is that CONFIG_XILINX_GPIO needs to be enabled as well as having the right info in the dts file.

Right now I'll have to defer to others to tell you what's needed in the dts file.

If you're using arch/ppc, I believe you just need CONFIG_XILINX_GPIO enabled.

When the system boots up, you see a message on the console when the GPIO driver initializes.

This is not exactly a tutorial. Hopefully this still helps,

- John

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Guillaume Dargaud
Sent: Thursday, May 15, 2008 9:35 AM
To: [email protected]
Subject: Using GPIO

Hello all,
I'm trying to use the Xilinx GPIO from a user program. Since I haven't managed to compile their example (simon.c is given without a=20
makefile), I wanted to try using /dev/gpio...

So I added
/dev/gpio0 c 666 0 0 10 185 - - -
to device_table.txt when I generated my root filesystem with buildroot, but=20
apparently this leads nowhere as it's not visible in /proc/devices.

Is there some example or tutorial on how to use CONFIG_XILINX_GPIO ? Either=20
as a device or as API calls...
--=20
Guillaume Dargaud
http://www.gdargaud.net/

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

This email and any attachments are intended for the sole use of the named=
recipient(s) and contain(s) confidential information that may be= proprietary, privileged or copyrighted under applicable law. If you are= not the intended recipient, do not read, copy, or forward this email= message or any attachments. Delete this email message and any attachments= immediately.

#2 lore raw

I don't think the GPIO driver has device tree bindings yet in the driver for ARCH=3Dpowerpc.

Steve

Quoted 2 lines

-----Original Message-----
From: linuxppc-dev-bounces+stephen.neuendorffer=3Dxilinx.com@ozlabs.org

[mailto:linuxppc-dev-

Quoted 1 line

[email protected]] On Behalf Of John

Bonesio

Quoted 9 lines

Sent: Thursday, May 15, 2008 11:39 AM
To: Guillaume Dargaud; [email protected]
Subject: RE: Using GPIO
=20
=20
Hi Guillaume,
=20
If you're using arch/powerpc, my understanding is that CONFIG_XILINX_GPIO needs to be enabled as well as having the right

info

Quoted 3 lines

in the dts file.
=20
Right now I'll have to defer to others to tell you what's needed in

the

Quoted 6 lines

dts file.
=20
If you're using arch/ppc, I believe you just need CONFIG_XILINX_GPIO enabled.
=20
When the system boots up, you see a message on the console when the

GPIO

Quoted 15 lines

driver initializes.
=20
This is not exactly a tutorial. Hopefully this still helps, =20
- John
=20
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Guillaume Dargaud
Sent: Thursday, May 15, 2008 9:35 AM
To: [email protected]
Subject: Using GPIO
=20
Hello all,

Quoted 8 lines

I'm trying to use the Xilinx GPIO from a user program. Since I haven't managed to compile their example (simon.c is given without a
makefile), I wanted to try using /dev/gpio...
=20
So I added
/dev/gpio0 c 666 0 0 10 185 - - -
to device_table.txt when I generated my root filesystem with

buildroot,

Quoted 10 lines

but
apparently this leads nowhere as it's not visible in /proc/devices. =20
Is there some example or tutorial on how to use CONFIG_XILINX_GPIO ? Either
as a device or as API calls...
--
Guillaume Dargaud
http://www.gdargaud.net/
=20

Quoted 8 lines

=20
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev
=20
=20
This email and any attachments are intended for the sole use of the

named recipient(s) and contain(s)

Quoted 1 line

confidential information that may be proprietary, privileged or

copyrighted under applicable law. If

Quoted 1 line

you are not the intended recipient, do not read, copy, or forward this

email message or any

Quoted 1 line

attachments. Delete this email message and any attachments

immediately.

Quoted 5 lines

=20
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

This email and any attachments are intended for the sole use of the named=
recipient(s) and contain(s) confidential information that may be= proprietary, privileged or copyrighted under applicable law. If you are= not the intended recipient, do not read, copy, or forward this email= message or any attachments. Delete this email message and any attachments= immediately.

#3 lore raw
In reply to John Bonesio
Quoted 3 lines

If you're using arch/powerpc, my understanding is that CONFIG_XILINX_GPIO needs to be enabled as well as having the right info in the dts file.

I'm using arch/ppc, so excuse my ignorance but what are dts files ?
I see arch/powerpc/boot/dts/ml405.dts in the kernel tree which would need some changes, but it looks like a generated file. Generated by what ?

Quoted 4 lines

If you're using arch/ppc, I believe you just need CONFIG_XILINX_GPIO enabled.
When the system boots up, you see a message on the console when the GPIO driver initializes.

That's what I'm trying to use, but there's no gpio info in the messages. Here's a copy:

Linux version 2.6.25-rc9 ([email protected]) (gcc version 4.1.2) #27 Thu May 15 18:40:17 CEST 2008 Xilinx Generic PowerPC board support package (Xilinx ML405) (Virtex-4 FX)
Entering add_active_range(0, 0, 32768) 0 entries of 256 used
Zone PFN ranges:
DMA 0 -> 32768
Normal 32768 -> 32768
Movable zone start PFN for each node
active PFN ranges
0: 0 -> 32768
On node 0 totalpages: 32768
DMA zone: 256 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 32512 pages, LIFO batch:7
Normal zone: 0 pages used for memmap
Movable zone: 0 pages used for memmap
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: console=ttyUL0,115200 rw root=/dev/nfs ip=bootp
Xilinx INTC #0 at 0x81800000 mapped to 0xFDFFF000
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 127872k available (1516k kernel code, 460k data, 80k init, 0k highmem)
Calibrating delay loop... 298.40 BogoMIPS (lpj=496640)
Mount-cache hash table entries: 512
net_namespace: 152 bytes
NET: Registered protocol family 16
Registering device uartlite:0
Registering device xsysace:0
Fixup MAC address for xilinx_lltemac:0
Registering device xilinx_lltemac:0
Registering device xilinx_iic:0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
io scheduler noop registered (default)
uartlite.0: ttyUL0 at MMIO 0x84000003 (irq = 8) is a uartlite
enabled
loop: module loaded
xsysace xsa: Xilinx SystemACE revision 1.0.12
xsysace xsa: capacity: 1014048 sectors
xsa: xsa1 xsa2
Xilinx SystemACE device driver, major=254
xilinx_lltemac xilinx_lltemac.0: MAC address is now 0: a:35: 1: 2: 3
xilinx_lltemac xilinx_lltemac.0: XLlTemac: using DMA mode.
XLlTemac: Dma base address: phy: 0x84600100, virt: 0xc9008100
XLlTemac: buffer descriptor size: 32768 (0x8000)
XLlTemac: Allocating DMA descriptors with kmalloc<6>XLlTemac: (buffer_descriptor_init) phy: 0x7ca8000, virt: 0xc7ca8000, size: 0x8000
XTemac: PHY detected at address 7.
eth0: Dropping NETIF_F_SG since no checksum feature.
xilinx_lltemac xilinx_lltemac.0: eth0: Xilinx TEMAC at 0x81C00000 mapped to 0xC9004000, irq=2
mice: PS/2 mouse device common for all mice
xilinx_iic.0 #0 at 0x81600000 mapped to 0xC9020000, irq=4
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
eth0: XLlTemac: Options: 0x3fa
eth0: XLlTemac: allocating interrupt 0 for dma mode tx.
eth0: XLlTemac: allocating interrupt 1 for dma mode rx.
eth0: XLlTemac: speed set to 100Mb/s
eth0: XLlTemac: Send Threshold = 24, Receive Threshold = 4
eth0: XLlTemac: Send Wait bound = 254, Receive Wait bound = 254
Sending BOOTP requests . OK
IP-Config: Got BOOTP answer from 192.168.1.185, my address is 192.168.1.200
IP-Config: Complete:

    device=eth0, addr=192.168.1.200, mask=255.255.255.0, gw=192.168.1.185,
    host=genepy, domain=, nis-domain=(none),
    bootserver=192.168.1.185, rootserver=192.168.1.185, 

rootpath=/media/rootfs
Looking up port of RPC 100003/2 on 192.168.1.185
Looking up port of RPC 100005/1 on 192.168.1.185
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 80k init
...and the boot proceeds fine.

And a cleaned-up .config:
CONFIG_WORD_SIZE=32
CONFIG_MMU=y
CONFIG_GENERIC_HARDIRQS=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_ARCH_HAS_ILOG2_U32=y
CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_PPC=y
CONFIG_PPC32=y
CONFIG_GENERIC_NVRAM=y
CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_GENERIC_BUG=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOG_BUF_SHIFT=14
CONFIG_NAMESPACES=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_COMPAT_BRK=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLAB=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_KPROBES=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_BLOCK=y
CONFIG_IOSCHED_NOOP=y
CONFIG_DEFAULT_NOOP=y
CONFIG_DEFAULT_IOSCHED="noop"
CONFIG_CLASSIC_RCU=y
CONFIG_40x=y
CONFIG_PPC_DCR_NATIVE=y
CONFIG_PPC_DCR=y
CONFIG_KEXEC=y
CONFIG_4xx=y
CONFIG_XILINX_ML405=y
CONFIG_IBM405_ERR77=y
CONFIG_IBM405_ERR51=y
CONFIG_XILINX_MLxxx=y
CONFIG_XILINX_VIRTEX_4_FX=y
CONFIG_XILINX_VIRTEX=y
CONFIG_XILINX_EMBED_CONFIG=y
CONFIG_EMBEDDEDBOOT=y
CONFIG_PPC_GEN550=y
CONFIG_UART0_TTYS0=y
CONFIG_NOT_COHERENT_CACHE=y CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_HZ_300=y
CONFIG_HZ=300
CONFIG_PREEMPT_VOLUNTARY=y CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_BINFMT_ELF=y
CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="console=ttyUL0,115200 rw root=/dev/nfs ip=bootp" CONFIG_ISA_DMA_API=y
CONFIG_ZONE_DMA=y
CONFIG_HIGHMEM_START=0xfe000000 CONFIG_LOWMEM_SIZE=0x30000000 CONFIG_KERNEL_START=0xc0000000 CONFIG_TASK_SIZE=0x80000000 CONFIG_CONSISTENT_START=0xff100000 CONFIG_CONSISTENT_SIZE=0x00200000 CONFIG_BOOT_LOAD=0x00400000
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_FIB_HASH=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_XILINX_SYSACE=y
CONFIG_XILINX_DRIVERS=y
CONFIG_NEED_XILINX_LLDMA=y
CONFIG_HAVE_IDE=y
CONFIG_NETDEVICES=y
CONFIG_NETDEV_1000=y
CONFIG_XILINX_LLTEMAC=y CONFIG_XILINX_LLTEMAC_MARVELL_88E1111_GMII=y CONFIG_INPUT=y
CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
CONFIG_SERIAL_UARTLITE=y CONFIG_SERIAL_UARTLITE_CONSOLE=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_XILINX_GPIO=y
CONFIG_XILINX_HWICAP=y
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_XILINX_IIC=y
CONFIG_SSB_POSSIBLE=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_XILINX_EDK=y
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
CONFIG_CONFIGFS_FS=y
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
CONFIG_MSDOS_PARTITION=y
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_PRINTK_TIME=y
CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DETECT_SOFTLOCKUP=y
CONFIG_SCHED_DEBUG=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y

Signature · 2 lines
Guillaume Dargaud
http://www.gdargaud.net/
#4 lore raw

Hi,

Dts files are not used with arch/ppc. =

In arch/ppc, the drivers that are in the system depend on the arch/ppc/platforms/4xx/xparameters/xparameters_ml405.h to setup the addresses of the devices and their configuration.

I looked at the ML405 setup in the git tree and it appears that it would need to be added to arch/ppc/syslib/virtex_devices.c. The platform data in virtex_devices.c must include the GPIO for it to be probed correctly. It should be easy for you to add the data to make it work. =

I see a GPIO in the xparameters*.h for the LEDs. =

Thanks,
John

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Guillaume Dargaud
Sent: Friday, May 16, 2008 2:16 AM
To: [email protected]
Subject: Re: Using GPIO

Quoted 2 lines

If you're using arch/powerpc, my understanding is that CONFIG_XILINX_GPIO needs to be enabled as well as having the right

info

Quoted 1 line

in the dts file.

I'm using arch/ppc, so excuse my ignorance but what are dts files ? I see arch/powerpc/boot/dts/ml405.dts in the kernel tree which would need =

some changes, but it looks like a generated file. Generated by what ?

Quoted 3 lines

If you're using arch/ppc, I believe you just need CONFIG_XILINX_GPIO enabled.
When the system boots up, you see a message on the console when the

GPIO

Quoted 1 line

driver initializes.

That's what I'm trying to use, but there's no gpio info in the messages. Here's a copy:

Linux version 2.6.25-rc9 ([email protected]) (gcc version =

4.1.2) #27 Thu May 15 18:40:17 CEST 2008
Xilinx Generic PowerPC board support package (Xilinx ML405) (Virtex-4 FX)
Entering add_active_range(0, 0, 32768) 0 entries of 256 used Zone PFN ranges:
DMA 0 -> 32768
Normal 32768 -> 32768
Movable zone start PFN for each node
active PFN ranges

    0:        0 ->    32768

On node 0 totalpages: 32768
DMA zone: 256 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 32512 pages, LIFO batch:7
Normal zone: 0 pages used for memmap
Movable zone: 0 pages used for memmap
Built 1 zonelists in Zone order, mobility grouping on. Total pages:
32512
Kernel command line: console=3DttyUL0,115200 rw root=3D/dev/nfs ip=3Dbootp Xilinx INTC #0 at 0x81800000 mapped to 0xFDFFF000
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 127872k available (1516k kernel code, 460k data, 80k init, 0k =

highmem)
Calibrating delay loop... 298.40 BogoMIPS (lpj=3D496640) Mount-cache hash table entries: 512
net_namespace: 152 bytes
NET: Registered protocol family 16
Registering device uartlite:0
Registering device xsysace:0
Fixup MAC address for xilinx_lltemac:0
Registering device xilinx_lltemac:0
Registering device xilinx_iic:0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 4096 (order: 3, 32768 bytes) TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096) TCP reno registered
io scheduler noop registered (default)
uartlite.0: ttyUL0 at MMIO 0x84000003 (irq =3D 8) is a uartlite enabled
loop: module loaded
xsysace xsa: Xilinx SystemACE revision 1.0.12
xsysace xsa: capacity: 1014048 sectors
xsa: xsa1 xsa2
Xilinx SystemACE device driver, major=3D254
xilinx_lltemac xilinx_lltemac.0: MAC address is now 0: a:35: 1: 2: 3 xilinx_lltemac xilinx_lltemac.0: XLlTemac: using DMA mode.
XLlTemac: Dma base address: phy: 0x84600100, virt: 0xc9008100
XLlTemac: buffer descriptor size: 32768 (0x8000)
XLlTemac: Allocating DMA descriptors with kmalloc<6>XLlTemac: =

(buffer_descriptor_init) phy: 0x7ca8000, virt: 0xc7ca8000, size: 0x8000
XTemac: PHY detected at address 7.
eth0: Dropping NETIF_F_SG since no checksum feature. xilinx_lltemac xilinx_lltemac.0: eth0: Xilinx TEMAC at 0x81C00000 mapped to =

0xC9004000, irq=3D2
mice: PS/2 mouse device common for all mice
xilinx_iic.0 #0 at 0x81600000 mapped to 0xC9020000, irq=3D4 TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
eth0: XLlTemac: Options: 0x3fa
eth0: XLlTemac: allocating interrupt 0 for dma mode tx.
eth0: XLlTemac: allocating interrupt 1 for dma mode rx.
eth0: XLlTemac: speed set to 100Mb/s
eth0: XLlTemac: Send Threshold =3D 24, Receive Threshold =3D 4
eth0: XLlTemac: Send Wait bound =3D 254, Receive Wait bound =3D 254 Sending BOOTP requests . OK
IP-Config: Got BOOTP answer from 192.168.1.185, my address is 192.168.1.200
IP-Config: Complete:

     device=3Deth0, addr=3D192.168.1.200, mask=3D255.255.255.0,
gw=3D192.168.1.185,
     host=3Dgenepy, domain=3D, nis-domain=3D(none),
     bootserver=3D192.168.1.185, rootserver=3D192.168.1.185, =

rootpath=3D/media/rootfs
Looking up port of RPC 100003/2 on 192.168.1.185
Looking up port of RPC 100005/1 on 192.168.1.185
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 80k init
...and the boot proceeds fine.

And a cleaned-up .config:
CONFIG_WORD_SIZE=3D32
CONFIG_MMU=3Dy
CONFIG_GENERIC_HARDIRQS=3Dy CONFIG_RWSEM_XCHGADD_ALGORITHM=3Dy CONFIG_ARCH_HAS_ILOG2_U32=3Dy
CONFIG_GENERIC_HWEIGHT=3Dy CONFIG_GENERIC_CALIBRATE_DELAY=3Dy
CONFIG_PPC=3Dy
CONFIG_PPC32=3Dy
CONFIG_GENERIC_NVRAM=3Dy
CONFIG_GENERIC_FIND_NEXT_BIT=3Dy CONFIG_SCHED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FIG_XILINX_MLxxx=3Dy
CONFIG_XILINX_VIRTEX_4_FX=3Dy
CONFIG_XILINX_VIRTEX=3Dy
CONFIG_XILINX_EMBED_CONFIG=3Dy
CONFIG_EMBEDDEDBOOT=3Dy
CONFIG_PPC_GEN550=3Dy
CONFIG_UART0_TTYS0=3Dy
CONFIG_NOT_COHERENT_CACHE=3Dy CONFIG_ARCH_POPULATES_NODE_MAP=3Dy
CONFIG_HZ_300=3Dy
CONFIG_HZ=3D300
CONFIG_PREEMPT_VOLUNTARY=3Dy
CONFIG_SELECT_MEMORY_MODEL=3Dy
CONFIG_FLATMEM_MANUAL=3Dy
CONFIG_FLATMEM=3Dy
CONFIG_FLAT_NODE_MEM_MAP=3Dy
CONFIG_SPLIT_PTLOCK_CPUS=3D4
CONFIG_ZONE_DMA_FLAG=3D1
CONFIG_BOUNCE=3Dy
CONFIG_VIRT_TO_BUS=3Dy
CONFIG_BINFMT_ELF=3Dy
CONFIG_CMDLINE_BOOL=3Dy CONFIG_CMDLINE=3D"console=3DttyUL0,115200 rw root=3D/dev/nfs ip=3Dbootp" CONFIG_ISA_DMA_API=3Dy
CONFIG_ZONE_DMA=3Dy
CONFIG_HIGHMEM_START=3D0xfe000000 CONFIG_LOWMEM_SIZE=3D0x30000000 CONFIG_KERNEL_START=3D0xc0000000 CONFIG_TASK_SIZE=3D0x80000000 CONFIG_CONSISTENT_START=3D0xff100000 CONFIG_CONSISTENT_SIZE=3D0x00200000 CONFIG_BOOT_LOAD=3D0x00400000
CONFIG_NET=3Dy
CONFIG_PACKET=3Dy
CONFIG_PACKET_MMAP=3Dy
CONFIG_UNIX=3Dy
CONFIG_INET=3Dy
CONFIG_IP_FIB_HASH=3Dy
CONFIG_IP_PNP=3Dy
CONFIG_IP_PNP_DHCP=3Dy
CONFIG_IP_PNP_BOOTP=3Dy
CONFIG_TCP_CONG_CUBIC=3Dy
CONFIG_DEFAULT_TCP_CONG=3D"cubic" CONFIG_UEVENT_HELPER_PATH=3D"/sbin/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FIG_PLIST=3Dy
CONFIG_HAS_IOMEM=3Dy
CONFIG_HAS_IOPORT=3Dy
CONFIG_HAS_DMA=3Dy
CONFIG_PRINTK_TIME=3Dy
CONFIG_ENABLE_WARN_DEPRECATED=3Dy CONFIG_ENABLE_MUST_CHECK=3Dy
CONFIG_DEBUG_KERNEL=3Dy
CONFIG_DETECT_SOFTLOCKUP=3Dy
CONFIG_SCHED_DEBUG=3Dy
CONFIG_DEBUG_MUTEXES=3Dy
CONFIG_DEBUG_BUGVERBOSE=3Dy
CONFIG_DEBUG_INFO=3Dy
-- =

Guillaume Dargaud
http://www.gdargaud.net/

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately.

#5 lore raw

Thanks for the answer,

Quoted 1 line

Dts files are not used with arch/ppc.

My question was more general, since arch/ppc will soon (?) disapear...

Quoted 3 lines

In arch/ppc, the drivers that are in the system depend on the arch/ppc/platforms/4xx/xparameters/xparameters_ml405.h to setup the addresses of the devices and their configuration.

Yes, and I've taken care to define that.

Quoted 4 lines

I looked at the ML405 setup in the git tree and it appears that it would need to be added to arch/ppc/syslib/virtex_devices.c. The platform data in virtex_devices.c must include the GPIO for it to be probed correctly. It should be easy for you to add the data to make it work.

Seems straightforward enough, but when I add the following:

// 0 is LEDS_4BIT, 1 is LEDS_POSITIONS, 2 is PUSH_BUTTONS_POSITION #define XPAR_GPIO(num) { \
.name = "xilinx_gpio", \
.id = num, \
.num_resources = 3, \

   .resource = (struct resource[]) { \
       { \
           .start = XPAR_GPIO_##num##_BASEADDR, \
           .end = XPAR_GPIO_##num##_HIGHADDR, \
           .flags = IORESOURCE_MEM, \
       }, \
       { \
           .start = XPAR_INTC_0_GPIO_##num##_VEC_ID, \
           .flags = IORESOURCE_IRQ, \
       }, \
   }, \
}
[...]
     /* GPIO instances */
#if defined(XPAR_GPIO_0_BASEADDR)
     XPAR_GPIO(0),
#endif
#if defined(XPAR_GPIO_1_BASEADDR)
     XPAR_GPIO(1),
#endif
#if defined(XPAR_GPIO_2_BASEADDR)
     XPAR_GPIO(2),

#endif

Then the boot stops right after "Uncompressing Linux...done. Now booting the kernel"

I've probably overlooked something obvious, but I'm pretty new in putting my greasy fingers on delicate kernel internals... In particular I don't know what is this .num_resources value.

Signature · 2 lines
Guillaume Dargaud
http://www.gdargaud.net/
#6 lore raw
Quoted 4 lines · On Mon, 19 May 2008 13:56:12 +0200 "Guillaume Dargaud" <[email protected]>…

Thanks for the answer,

Quoted 1 line

Dts files are not used with arch/ppc.

My question was more general, since arch/ppc will soon (?) disapear...

"Device Tree Souce" files. See lots of examples in arch/powerpc/boot/dts/. Those files are used to build the device tree binary blob for platforms that lack OpenFirmware.

josh