Ethoc: setting buffer memory space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Amit,

I mean how can I pass memory buffer size for platform device which uses ethoc driver.

ethoc_probe() call platform_get_resource() twice (Linux 2.6.30.5):

first

/* obtain I/O memory space */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

and

/* obtain buffer memory space */
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);

where 0 or 1 is index in my static struct resource altera3_resources[] for ex.
  So, for I/O memory space (index 0) I do

static struct resource altera3_resources[] =
{
  {
    .start = ALTERA3_ETHOC_BASE,
    .end = ALTERA3_ETHOC_BASE + 0x50,
    .flags = IORESOURCE_MEM,
  },
  {
    .start = IRQ_A3_ETHOC,
    .flags = IORESOURCE_IRQ,
  },
....
}

where ALTERA3_ETHOC_BASE is phys addr of iomem.

What should I do for set buffer memory space? If I do nothing I have message "ethoc ethoc.1 cannot obtain memory space" because platform_get_resource() doesn't find second IORESOURCE_MEM and return NULL.

Thanks,
Alex.

Tue, 27 Apr 2010 09:26:52 -0700 письмо от Amit Uttamchandani <auttamchandani@xxxxxxxxxx>:

> On Tue, Apr 27, 2010 at 08:13:57AM -0700, Alex Mach wrote:
> > Hello,
> > 
> > How can I set the buffer memory space for Ethoc driver?
> > 
> > Thanks,
> > Alex.
> > 
>  
> The ethoc driver has a 'buffer_size' parameter you can set. Currently,
> this is set to 32KB.
> 
> You can change it when loading the driver by using 'insmod ethoc
> buffer_size=0xF000' for 64KB of buffer space.


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux