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 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/
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.
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 usingarch/powerpc, my understanding is thatCONFIG_XILINX_GPIOneeds 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 usingarch/ppc, I believe you just needCONFIG_XILINX_GPIOenabled.
=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.cis given without a
makefile), I wanted to try using/dev/gpio...
=20
So I added/dev/gpio0c 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 useCONFIG_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.
Quoted 3 lines
If you're using
arch/powerpc, my understanding is thatCONFIG_XILINX_GPIOneeds 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 needCONFIG_XILINX_GPIOenabled.
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: 512net_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=254xilinx_lltemac xilinx_lltemac.0: MAC address is now 0: a:35: 1: 2: 3xilinx_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=32CONFIG_MMU=yCONFIG_GENERIC_HARDIRQS=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_ARCH_HAS_ILOG2_U32=yCONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=yCONFIG_PPC=yCONFIG_PPC32=yCONFIG_GENERIC_NVRAM=yCONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_ARCH_MAY_HAVE_PC_FDC=yCONFIG_GENERIC_BUG=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_EXPERIMENTAL=yCONFIG_BROKEN_ON_SMP=yCONFIG_INIT_ENV_ARG_LIMIT=32CONFIG_LOCALVERSION=""CONFIG_LOG_BUF_SHIFT=14CONFIG_NAMESPACES=yCONFIG_CC_OPTIMIZE_FOR_SIZE=yCONFIG_SYSCTL=yCONFIG_SYSCTL_SYSCALL=yCONFIG_KALLSYMS=yCONFIG_HOTPLUG=yCONFIG_PRINTK=yCONFIG_BUG=yCONFIG_ELF_CORE=yCONFIG_COMPAT_BRK=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_ANON_INODES=yCONFIG_EPOLL=yCONFIG_SIGNALFD=yCONFIG_TIMERFD=yCONFIG_EVENTFD=yCONFIG_SHMEM=yCONFIG_VM_EVENT_COUNTERS=yCONFIG_SLAB=yCONFIG_HAVE_OPROFILE=yCONFIG_HAVE_KPROBES=yCONFIG_PROC_PAGE_MONITOR=yCONFIG_SLABINFO=yCONFIG_RT_MUTEXES=yCONFIG_BASE_SMALL=0CONFIG_BLOCK=yCONFIG_IOSCHED_NOOP=yCONFIG_DEFAULT_NOOP=yCONFIG_DEFAULT_IOSCHED="noop"CONFIG_CLASSIC_RCU=y
CONFIG_40x=yCONFIG_PPC_DCR_NATIVE=yCONFIG_PPC_DCR=yCONFIG_KEXEC=y
CONFIG_4xx=yCONFIG_XILINX_ML405=yCONFIG_IBM405_ERR77=yCONFIG_IBM405_ERR51=y
CONFIG_XILINX_MLxxx=yCONFIG_XILINX_VIRTEX_4_FX=yCONFIG_XILINX_VIRTEX=yCONFIG_XILINX_EMBED_CONFIG=yCONFIG_EMBEDDEDBOOT=yCONFIG_PPC_GEN550=yCONFIG_UART0_TTYS0=yCONFIG_NOT_COHERENT_CACHE=y CONFIG_ARCH_POPULATES_NODE_MAP=yCONFIG_HZ_300=yCONFIG_HZ=300CONFIG_PREEMPT_VOLUNTARY=y CONFIG_SELECT_MEMORY_MODEL=yCONFIG_FLATMEM_MANUAL=yCONFIG_FLATMEM=yCONFIG_FLAT_NODE_MEM_MAP=yCONFIG_SPLIT_PTLOCK_CPUS=4CONFIG_ZONE_DMA_FLAG=1CONFIG_BOUNCE=yCONFIG_VIRT_TO_BUS=yCONFIG_BINFMT_ELF=yCONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="console=ttyUL0,115200 rw root=/dev/nfs ip=bootp" CONFIG_ISA_DMA_API=yCONFIG_ZONE_DMA=yCONFIG_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=0x00400000CONFIG_NET=yCONFIG_PACKET=yCONFIG_PACKET_MMAP=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_FIB_HASH=yCONFIG_IP_PNP=yCONFIG_IP_PNP_DHCP=yCONFIG_IP_PNP_BOOTP=yCONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_STANDALONE=yCONFIG_PREVENT_FIRMWARE_BUILD=yCONFIG_BLK_DEV=yCONFIG_BLK_DEV_LOOP=yCONFIG_XILINX_SYSACE=yCONFIG_XILINX_DRIVERS=yCONFIG_NEED_XILINX_LLDMA=yCONFIG_HAVE_IDE=yCONFIG_NETDEVICES=yCONFIG_NETDEV_1000=yCONFIG_XILINX_LLTEMAC=y CONFIG_XILINX_LLTEMAC_MARVELL_88E1111_GMII=y CONFIG_INPUT=yCONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768CONFIG_VT=yCONFIG_VT_CONSOLE=yCONFIG_HW_CONSOLE=yCONFIG_SERIAL_UARTLITE=y CONFIG_SERIAL_UARTLITE_CONSOLE=yCONFIG_SERIAL_CORE=yCONFIG_SERIAL_CORE_CONSOLE=yCONFIG_UNIX98_PTYS=yCONFIG_XILINX_GPIO=yCONFIG_XILINX_HWICAP=yCONFIG_I2C=yCONFIG_I2C_BOARDINFO=yCONFIG_XILINX_IIC=yCONFIG_SSB_POSSIBLE=yCONFIG_DUMMY_CONSOLE=yCONFIG_XILINX_EDK=yCONFIG_PROC_FS=yCONFIG_PROC_KCORE=yCONFIG_PROC_SYSCTL=yCONFIG_SYSFS=yCONFIG_CONFIGFS_FS=yCONFIG_NETWORK_FILESYSTEMS=yCONFIG_NFS_FS=yCONFIG_NFS_V3=yCONFIG_ROOT_NFS=yCONFIG_LOCKD=yCONFIG_LOCKD_V4=yCONFIG_NFS_COMMON=yCONFIG_SUNRPC=yCONFIG_MSDOS_PARTITION=yCONFIG_PLIST=yCONFIG_HAS_IOMEM=yCONFIG_HAS_IOPORT=yCONFIG_HAS_DMA=yCONFIG_PRINTK_TIME=yCONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=yCONFIG_DEBUG_KERNEL=yCONFIG_DETECT_SOFTLOCKUP=yCONFIG_SCHED_DEBUG=yCONFIG_DEBUG_MUTEXES=yCONFIG_DEBUG_BUGVERBOSE=yCONFIG_DEBUG_INFO=y
Signature · 2 lines
Guillaume Dargaud http://www.gdargaud.net/
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 thatCONFIG_XILINX_GPIOneeds 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 needCONFIG_XILINX_GPIOenabled.
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: 512net_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=3D254xilinx_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=3D32CONFIG_MMU=3DyCONFIG_GENERIC_HARDIRQS=3Dy CONFIG_RWSEM_XCHGADD_ALGORITHM=3Dy CONFIG_ARCH_HAS_ILOG2_U32=3DyCONFIG_GENERIC_HWEIGHT=3Dy CONFIG_GENERIC_CALIBRATE_DELAY=3DyCONFIG_PPC=3DyCONFIG_PPC32=3DyCONFIG_GENERIC_NVRAM=3DyCONFIG_GENERIC_FIND_NEXT_BIT=3Dy CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=3Dy CONFIG_ARCH_MAY_HAVE_PC_FDC=3DyCONFIG_GENERIC_BUG=3Dy CONFIG_DEFCONFIG_LIST=3D"/lib/modules/$UNAME_RELEASE/.config" CONFIG_EXPERIMENTAL=3DyCONFIG_BROKEN_ON_SMP=3DyCONFIG_INIT_ENV_ARG_LIMIT=3D32CONFIG_LOCALVERSION=3D""CONFIG_LOG_BUF_SHIFT=3D14CONFIG_NAMESPACES=3DyCONFIG_CC_OPTIMIZE_FOR_SIZE=3DyCONFIG_SYSCTL=3DyCONFIG_SYSCTL_SYSCALL=3DyCONFIG_KALLSYMS=3DyCONFIG_HOTPLUG=3DyCONFIG_PRINTK=3DyCONFIG_BUG=3DyCONFIG_ELF_CORE=3DyCONFIG_COMPAT_BRK=3DyCONFIG_BASE_FULL=3DyCONFIG_FUTEX=3DyCONFIG_ANON_INODES=3DyCONFIG_EPOLL=3DyCONFIG_SIGNALFD=3DyCONFIG_TIMERFD=3DyCONFIG_EVENTFD=3DyCONFIG_SHMEM=3DyCONFIG_VM_EVENT_COUNTERS=3DyCONFIG_SLAB=3DyCONFIG_HAVE_OPROFILE=3DyCONFIG_HAVE_KPROBES=3DyCONFIG_PROC_PAGE_MONITOR=3DyCONFIG_SLABINFO=3DyCONFIG_RT_MUTEXES=3DyCONFIG_BASE_SMALL=3D0CONFIG_BLOCK=3DyCONFIG_IOSCHED_NOOP=3DyCONFIG_DEFAULT_NOOP=3DyCONFIG_DEFAULT_IOSCHED=3D"noop"CONFIG_CLASSIC_RCU=3Dy
CONFIG_40x=3DyCONFIG_PPC_DCR_NATIVE=3DyCONFIG_PPC_DCR=3DyCONFIG_KEXEC=3Dy
CONFIG_4xx=3DyCONFIG_XILINX_ML405=3DyCONFIG_IBM405_ERR77=3DyCONFIG_IBM405_ERR51=3Dy
CONFIG_XILINX_MLxxx=3DyCONFIG_XILINX_VIRTEX_4_FX=3DyCONFIG_XILINX_VIRTEX=3DyCONFIG_XILINX_EMBED_CONFIG=3DyCONFIG_EMBEDDEDBOOT=3DyCONFIG_PPC_GEN550=3DyCONFIG_UART0_TTYS0=3DyCONFIG_NOT_COHERENT_CACHE=3Dy CONFIG_ARCH_POPULATES_NODE_MAP=3DyCONFIG_HZ_300=3DyCONFIG_HZ=3D300CONFIG_PREEMPT_VOLUNTARY=3DyCONFIG_SELECT_MEMORY_MODEL=3DyCONFIG_FLATMEM_MANUAL=3DyCONFIG_FLATMEM=3DyCONFIG_FLAT_NODE_MEM_MAP=3DyCONFIG_SPLIT_PTLOCK_CPUS=3D4CONFIG_ZONE_DMA_FLAG=3D1CONFIG_BOUNCE=3DyCONFIG_VIRT_TO_BUS=3DyCONFIG_BINFMT_ELF=3DyCONFIG_CMDLINE_BOOL=3Dy CONFIG_CMDLINE=3D"console=3DttyUL0,115200 rw root=3D/dev/nfs ip=3Dbootp" CONFIG_ISA_DMA_API=3DyCONFIG_ZONE_DMA=3DyCONFIG_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=3D0x00400000CONFIG_NET=3DyCONFIG_PACKET=3DyCONFIG_PACKET_MMAP=3DyCONFIG_UNIX=3DyCONFIG_INET=3DyCONFIG_IP_FIB_HASH=3DyCONFIG_IP_PNP=3DyCONFIG_IP_PNP_DHCP=3DyCONFIG_IP_PNP_BOOTP=3DyCONFIG_TCP_CONG_CUBIC=3DyCONFIG_DEFAULT_TCP_CONG=3D"cubic" CONFIG_UEVENT_HELPER_PATH=3D"/sbin/hotplug" CONFIG_STANDALONE=3DyCONFIG_PREVENT_FIRMWARE_BUILD=3DyCONFIG_BLK_DEV=3DyCONFIG_BLK_DEV_LOOP=3DyCONFIG_XILINX_SYSACE=3DyCONFIG_XILINX_DRIVERS=3DyCONFIG_NEED_XILINX_LLDMA=3DyCONFIG_HAVE_IDE=3DyCONFIG_NETDEVICES=3DyCONFIG_NETDEV_1000=3DyCONFIG_XILINX_LLTEMAC=3Dy CONFIG_XILINX_LLTEMAC_MARVELL_88E1111_GMII=3Dy CONFIG_INPUT=3DyCONFIG_INPUT_MOUSEDEV=3Dy CONFIG_INPUT_MOUSEDEV_SCREEN_X=3D1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=3D768CONFIG_VT=3DyCONFIG_VT_CONSOLE=3DyCONFIG_HW_CONSOLE=3DyCONFIG_SERIAL_UARTLITE=3Dy CONFIG_SERIAL_UARTLITE_CONSOLE=3DyCONFIG_SERIAL_CORE=3DyCONFIG_SERIAL_CORE_CONSOLE=3DyCONFIG_UNIX98_PTYS=3DyCONFIG_XILINX_GPIO=3DyCONFIG_XILINX_HWICAP=3DyCONFIG_I2C=3DyCONFIG_I2C_BOARDINFO=3DyCONFIG_XILINX_IIC=3DyCONFIG_SSB_POSSIBLE=3DyCONFIG_DUMMY_CONSOLE=3DyCONFIG_XILINX_EDK=3DyCONFIG_PROC_FS=3DyCONFIG_PROC_KCORE=3DyCONFIG_PROC_SYSCTL=3DyCONFIG_SYSFS=3DyCONFIG_CONFIGFS_FS=3DyCONFIG_NETWORK_FILESYSTEMS=3DyCONFIG_NFS_FS=3DyCONFIG_NFS_V3=3DyCONFIG_ROOT_NFS=3DyCONFIG_LOCKD=3DyCONFIG_LOCKD_V4=3DyCONFIG_NFS_COMMON=3DyCONFIG_SUNRPC=3DyCONFIG_MSDOS_PARTITION=3DyCONFIG_PLIST=3DyCONFIG_HAS_IOMEM=3DyCONFIG_HAS_IOPORT=3DyCONFIG_HAS_DMA=3DyCONFIG_PRINTK_TIME=3DyCONFIG_ENABLE_WARN_DEPRECATED=3Dy CONFIG_ENABLE_MUST_CHECK=3DyCONFIG_DEBUG_KERNEL=3DyCONFIG_DETECT_SOFTLOCKUP=3DyCONFIG_SCHED_DEBUG=3DyCONFIG_DEBUG_MUTEXES=3DyCONFIG_DEBUG_BUGVERBOSE=3DyCONFIG_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.
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 thearch/ppc/platforms/4xx/xparameters/xparameters_ml405.hto 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 invirtex_devices.cmust 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/
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/ppcwill 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