All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John Linn" <John.Linn@xilinx.com>
To: "Guillaume Dargaud" <dargaud@lpsc.in2p3.fr>, <linuxppc-dev@ozlabs.org>
Subject: RE: Using GPIO
Date: Fri, 16 May 2008 10:17:10 -0600	[thread overview]
Message-ID: <20080516161713.9DAAD708056@mail93-wa4.bigfish.com> (raw)
In-Reply-To: <032c01c8b72d$0555cea0$ad289e86@LPSC0173W>

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: linuxppc-dev-bounces+john.linn=3Dxilinx.com@ozlabs.org
[mailto:linuxppc-dev-bounces+john.linn=3Dxilinx.com@ozlabs.org] On Behalf
Of Guillaume Dargaud
Sent: Friday, May 16, 2008 2:16 AM
To: linuxppc-dev@ozlabs.org
Subject: Re: Using GPIO

> 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 ?

> 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 (someone@somewhere.in.summertime) (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_NO_NO_OMIT_FRAME_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=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/hotplug"
CONFI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LIST=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
Linuxppc-dev@ozlabs.org
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.

  reply	other threads:[~2008-05-16 16:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-15 16:35 Using GPIO Guillaume Dargaud
2008-05-15 18:39 ` John Bonesio
2008-05-15 18:56   ` Stephen Neuendorffer
2008-05-16  8:15   ` Guillaume Dargaud
2008-05-16 16:17     ` John Linn [this message]
2008-05-19 11:56       ` Guillaume Dargaud
2008-05-19 13:42         ` Josh Boyer
  -- strict thread matches above, loose matches on Subject: below --
2008-05-19 15:23 Guillaume Dargaud
2008-06-06  7:51 Ludovic Desroches
2008-06-06 16:09 ` Guillaume Dargaud

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080516161713.9DAAD708056@mail93-wa4.bigfish.com \
    --to=john.linn@xilinx.com \
    --cc=dargaud@lpsc.in2p3.fr \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.