On Thu, Apr 2, 2009 at 4:47 PM, Lakshmana Reddy <rvlreddy.tech@xxxxxxxxx> wrote: > Thanks Peter! > > The patch is to support ICH10 in kernel versions. > > Actually, I need a help to find out how to access a GPIO reg in ICH family > (say 8/9 in existing 2.6.23 version) under linux. > it would be great if any pointers to the sources in the kernel currently > doing it. > > Thanks in advance !! > Briefly, I think u can navigate to include/linux/pci_ids.h and get whatever symbol u need: #define PCI_DEVICE_ID_INTEL_TGP_LPC 0x27bc #define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd #define PCI_DEVICE_ID_INTEL_ICH7_17 0x27da #define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd #define PCI_DEVICE_ID_INTEL_ICH7_20 0x27de #define PCI_DEVICE_ID_INTEL_ICH7_21 0x27df and subsequently can just do the pci_get_device() to return structure pointer, and then pci_read_config_dword(), pci_write_config_dword() to do the device initialization (besides the linux driver model initialization). I/O will be done through (if it is port I/O) inl() and outl() API. for example see drivers/char/sonypi.c. > > > On 4/2/09, Peter Teoh <htmldeveloper@xxxxxxxxx> wrote: >> >> On Wed, Apr 1, 2009 at 8:09 PM, Lakshmana Reddy <rvlreddy.tech@xxxxxxxxx> >> wrote: >> > Hi, >> > >> > I was trying toggle one of the GPIO pins on ICH10 chipset (Intel >> > southbridge), but couldn't find the relevant GPIO source in linux >> > 2.6.23. >> > Can somebody shed some light on relevant sources in linux to access the >> > GPIO >> > address. >> > >> > From the datasheet I see there is a GPIOBASE which is LPC config >> > register, >> > so technically mapping the GPIOBASE + offset would give me access to the >> > required GPIO reg. >> > I looked at "arch/i386", boot related code.. couldnt find the any place >> > these GPIOBASE getting configured. >> > Unlike for other embedded platform (arm/mips), i386/x-86 doesn't have >> > its >> > own "gpio" sources. >> > >> > Any help is greatly appreciated. >> > Thanks in advance. >> > >> > Lakshmana >> > >> >> this is for 2.6.25: >> >> http://www.gossamer-threads.com/lists/linux/kernel/878036 >> >> and this is for 2.6.24: >> >> >> http://fixunix.com/kernel/335692-patch-2-6-24-pci_ids-patch-intel-ich10-deviceids.html >> >> perhaps u reused these changes for 2.6.23? >> >> >> -- >> Regards, >> >> Peter Teoh > > -- Regards, Peter Teoh -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ