I think I have answered it myself. I feel a little sheepish as the GPIO pins are not connected directly to the CS5536 and therefore can not be configure using this method. They are connected to a Super I/O (PC87366) chip that is I/O map.
On Jan 4, 2008 1:05 PM, . <[EMAIL PROTECTED]> wrote: > I have gotten the error led working in QNX 6.3 but I am unable to > figure out which > GPIO pins on the CS5536 correspond to the GPIO pins on the NET5501 board. > > Can someone enlighten to the relationship of these pins? > > This code is a very simple example of how I control the GPIO pins > (Note you must be root to use this code): > #include <hw/pci.h> > #include <hw/pci_devices.h> > #include <stdio.h> > #include <stdlib.h> > #include <sys/mman.h> > #include <sys/neutrino.h> > #include <hw/inout.h> > > int error_led(char val) { > int phdl; > void *hdl; > int gpio_addr; > unsigned long portval; > struct pci_dev_info inf; > > phdl = pci_attach(0); > if( phdl == -1) return -1; > > memset(&inf, 0, sizeof(inf)); > inf.VendorId = 0x1022; > inf.DeviceId = 0x2090; > > hdl = pci_attach_device(0, PCI_SHARE|PCI_INIT_ALL, 0, &inf); > if (hdl == NULL) return -1; > > if (pci_read_config(hdl, 0x14, 1, > sizeof(gpio_addr), &gpio_addr)!=PCI_SUCCESS) return -1; > gpio_addr &= ~1; > > ThreadCtl(_NTO_TCTL_IO, 0); > mmap_device_io(256, gpio_addr); > > portval = in32(gpio_addr); > if (val) { > portval |= 0x00000040L; > portval &= 0xFFBFFFFFL; > } else { > portval |= 0x00400000L; > portval &= 0xFFFFFFBFL; > } > out32(gpio_addr, portval); > > munmap_device_io(gpio_addr, 256); > pci_detach_device(hdl); > pci_detach(phdl); > > return 0; > > } > > On Jan 1, 2008 12:19 PM, . <[EMAIL PROTECTED]> wrote: > > I thought that this might be of some interest to some. > > I have been working with NET5501 for the passed few > > days and I have got most of the hardware functional > > in QNX (www.qnx.com). > > > > I have enclosed a sample build file to allow anyone > > else to cut to the quick. > > > > I hope this help a few people and convince others > > to use the Net5501 or QNX. > > > > These two products make one really powerful > > industrial device. > > > > serial port - configured > > ethernet - configured > > usb -configured > > compact flash - works > > harddrive - works > > PCI slot - works > > AES Security Block - no driver > > GPIO - current building driver > > > > # > > # QNX 6.3 build for Soekris Net5501 > > # > > [virtual=x86,bios_nokbd +compress] .boot = { > > startup-bios > > PATH=/proc/boot LD_LIBRARY_PATH=/proc/boot procnto > > } > > > > [+script] startup-script = { > > procmgr_symlink ../../proc/boot/libc.so.2 /usr/lib/ldqnx.so.2 > > devc-ser8250 -e -b19200 & > > reopen /dev/ser1 > > > > pci-bios & > > waitfor /dev/pci > > > > devb-eide blk auto=partition cam quiet eide slave=udma=off > > waitfor /dev/hd0 > > > > io-usb -dohci -dehci > > waitfor /dev/io-usb > > > > io-net -dvia-rhine vid=0x1106,did=0x3053,pci=0x0 -dvia-rhine > > vid=0x1106,did=0x3053,pci=0x1 -dvia-rhine > > vid=0x1106,did=0x3053,pci=0x2 -dvia-rhine > > vid=0x1106,did=0x3053,pci=0x3 -ptcpip > > waitfor /dev/io-net/en0 > > > > mount /dev/hd0t79 / > > > > pipe & > > mqueue & > > devc-pty & > > > > [+session] esh > > } > > > > [type=link] /dev/console=/dev/ser1 > > [type=link] /tmp=/dev/shmem > > > > # Standard C shared lib > > libc.so > > > > # If some one needs floating point... > > fpemu.so.2 > > > > # Disk & Filesystem Drivers > > libcam.so > > cam-disk.so > > io-blk.so > > fs-qnx4.so > > fs-cd.so > > fs-dos.so > > > > # Network Drivers > > libsocket.so.2 > > devn-via-rhine.so > > npm-tcpip.so > > > > # USB Drivers > > libusbdi.so > > devu-ehci.so > > devu-ohci.so > > > > [data=copy] > > devc-ser8250 > > pci-bios > > pci > > devb-eide > > mount > > umount > > chmod > > chown > > mkdir > > rm > > cp > > echo > > cat > > ls > > io-net > > ifconfig > > dhcp.client > > ping > > io-usb > > usb > > pipe > > mqueue > > devc-pty > > random > > esh > > slay > > pidin > > > _______________________________________________ Soekris-tech mailing list Soekris-tech@lists.soekris.com http://lists.soekris.com/mailman/listinfo/soekris-tech