Re: pci_request_regions() failure

2010-09-09 Thread Ravi Gupta
Hi Tiejun, Thanks for the reply. Omm. Often we always disable this pref windows so please disable this window. Try use the following ways to clear PCI_PREF_MEMORY_BASE and PCI_PREF_MEMORY_LIMIT. -- pci_write_config_word(dev, PCI_PREF_MEMORY_BASE, 0);

Re: pci_request_regions() failure

2010-09-08 Thread Ravi Gupta
Hi Tiejun, Thanks for the reply. Your PCI device should be one virtual device so I think the above should be as we understood. You know 0x ~ 0x3 should not be allowed to reserved. Can you explain a little more that what do you mean by Your PCI device should be one virtual

Re: pci_request_regions() failure

2010-09-07 Thread Ravi Gupta
Regards Ravi Gupta dmesg_log Description: Binary data ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

pci_request_regions() failure

2010-09-06 Thread Ravi Gupta
Hi, I am facing a problem while requesting pci resource. I have some data that I am hopeful will help address the issue. I am currently running on a MPC837xERDB board(powerpc) with a 2.6.35 kernel. The problem is that whenever I insert the card (LatticeECP2M PCI Express Development

PCI: device not available (can't reserve [mem 0x00000000-0x0003ffff])

2010-09-01 Thread Ravi Gupta
PCI driver: Init function PCI driver: Probe function pci_skel 0001:02:00.0: device not available (can't reserve [mem 0x-0x0003]) Unable to Enable PCI device:-22 pci_skel: probe of 0001:02:00.0 failed with error -22 Thanks in advance Ravi Gupta

SPI driver for MPC837xERDB

2010-08-31 Thread Ravi Gupta
Hi all, I am new to linux device driver development. I have to develop a SPI driver for MPC8377 processor based board. Right now I don't have a that board ready(but I have the MPC837xERDB with me), so I was thinking of developing and testing it on the RDB. But in MPC837xERDB, I don't have an

SPI bitbanging driver

2010-08-26 Thread Ravi Gupta
as gpio? Thanks in advance Ravi Gupta ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: How to use mpc8xxx_gpio.c device driver

2010-08-18 Thread Ravi Gupta
to get irq number for GPIO224 [ 1812.785126] gpio: unable to register interrupt handler. insmod: error inserting './gpio.ko': -1 Invalid parameters Thanks in advance Ravi Gupta ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https

Distinguish between kernel and user space

2010-08-16 Thread Ravi Gupta
/*_GPIO_IOCTL_H_ */ Thanks in advance Ravi Gupta ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: How to use mpc8xxx_gpio.c device driver

2010-08-13 Thread Ravi Gupta
On Wed, Aug 11, 2010 at 10:15 PM, Anton Vorontsov cbouatmai...@gmail.comwrote: Hi, On Wed, Aug 11, 2010 at 06:57:16PM +0530, Ravi Gupta wrote: I am new to device driver development. I am trying to access the GPIO of MPC837xERDB eval board. I have upgraded its kernel to linux-2.6.28.9

Re: How to use mpc8xxx_gpio.c device driver

2010-08-13 Thread Ravi Gupta
GPIO API. I'm afraid I don't have much experience other than accessing it via sysfs from userspace. Ira Hi Ira, Thanks for another great reply. Now I can also access gpio memory map registers. Thanks and Regards, Ravi Gupta ___ Linuxppc-dev mailing

Re: How to use mpc8xxx_gpio.c device driver

2010-08-12 Thread Ravi Gupta
] ---[ end trace a47be794e2873cef ]--- Thanks in advance Ravi Gupta ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

DMA transfer within kernel space

2010-08-11 Thread Ravi Gupta
within kernel space(let say created through kmalloc) using DMA. Is it possible to do DMA transfer within kernel space? If yes, please provide some sample code for the same. Thanks in advance Ravi Gupta ___ Linuxppc-dev mailing list Linuxppc-dev

How to use mpc8xxx_gpio.c device driver

2010-08-11 Thread Ravi Gupta
or something else. Actually I am trying to set the GPIO pin no. 9 to active low as it is connected to a LED on board. Thanks in advance Ravi Gupta ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: How to use mpc8xxx_gpio.c device driver

2010-08-11 Thread Ravi Gupta
Also, when I try to export a gpio in sysfs echo 9 /sys/class/gpio/export It gives me an error in dmesg gpio_request: gpio-9 (sysfs) status -22 export_store: status -22 Here is a look of sysfs on my machine # ls /sys/class/gpio/ -la drwxr-xr-x4 root root0 Jan 1 00:00 .

Accessing GPIO registers on MPC8377ERDB board

2010-08-10 Thread Ravi Gupta
to active low as they are connected to leds D3, D4 and D5 resp. Thanks in advance Ravi Gupta ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

How to disable eTSEC2 in MPC837xerdb

2010-08-06 Thread Ravi Gupta
-parent = ipic; phy-handle = phy2; sleep = 0xb00 0xc000; fsl,magic-packet; }; Thanks in advance Ravi Gupta ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Booting MPC8377ERBD from NAND flash

2010-08-04 Thread Ravi Gupta
should I start. Please suggest. Thanks in advance Ravi Gupta ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: Memory Mapping Buffers smaller than page size?

2010-07-29 Thread Ravi Gupta
space page? Thanks in advance Ravi Gupta On Wed, Jul 28, 2010 at 7:51 PM, Simon Richter simon.rich...@hogyros.dewrote: Hi, On Wed, Jul 28, 2010 at 06:44:10PM +0530, Ravi Gupta wrote: I am new to linux device drivers development. I have created 16 buffers of size 256 bytes each(using

Memory Mapping Buffers smaller than page size?

2010-07-28 Thread Ravi Gupta
in user space OR i have to map them in individual pages in user space? Note, all the buffers may not be stored in continuous memory location. Thanks in advance Ravi Gupta ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org

Memory Mapping DMA Buffers in User Space

2010-07-27 Thread Ravi Gupta
, internally that DMA buffer gets memory mapped to the user space? Also what should I pass as the length parameter in the mmap() function? Thanks in advance Ravi Gupta ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org

Re: Memory Mapping a char array in User Space

2010-07-27 Thread Ravi Gupta
Hi David, Thanks for the quick reply. One more thing, in the end I have to memory map a DMA buffer allocated using pci_alloc_consisten() function to user space. * I think you should be leaving the mapping to the core VM routines.* * Furthermore, I don't think *you* should be calling

Memory Mapping a char array in User Space

2010-07-26 Thread Ravi Gupta
successfully but when I tried to read from it I get garbage value. Is there something that I am missing? Thanks in advance Ravi Gupta ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev