Re: [patch 2.6.24-rc1] resource_len() utility function

2007-10-25 Thread David Brownell
On Thursday 25 October 2007, Alan Cox wrote: > > So you'd suggest having search utilities (as with platform_bus) > > returning resource indices not resources? > > That seems a bad idea to me I'm assuming you mean they should continue to work like they do today: return the resource. Your pseudoc

Re: [patch 2.6.24-rc1] resource_len() utility function

2007-10-25 Thread Alan Cox
> So you'd suggest having search utilities (as with platform_bus) > returning resource indices not resources? That seems a bad idea to me > Thing is, BARs are usually well defined, but when folk glue > resources together they use whatever order is convenient on > that particular platform. And di

Re: [patch 2.6.24-rc1] resource_len() utility function

2007-10-24 Thread David Brownell
On Wednesday 24 October 2007, Jeff Garzik wrote: > >> Then a dev_iomap() analogue to pci_iomap() should be pretty > >> straightforward to create. > > > > Another minor nit:  addressing the various resource types. > > The platform bus code has multiple lookup schemes. > > > > Calls like resource

Re: [patch 2.6.24-rc1] resource_len() utility function

2007-10-24 Thread Jeff Garzik
David Brownell wrote: On Wednesday 24 October 2007, Jeff Garzik wrote: With regards to resource reservation... IMO we should mimic struct pci_dev and add struct resource[] to struct device. One minor difficulty: PCI has a limit on the number of BARs, but other busses don't. It'd be better a

Re: [patch 2.6.24-rc1] resource_len() utility function

2007-10-24 Thread David Brownell
On Wednesday 24 October 2007, Jeff Garzik wrote: > With regards to resource reservation...  IMO we should mimic struct > pci_dev and add struct resource[] to struct device. One minor difficulty: PCI has a limit on the number of BARs, but other busses don't. It'd be better as a "struct resource

Re: [patch 2.6.24-rc1] resource_len() utility function

2007-10-24 Thread David Brownell
On Wednesday 24 October 2007, Alan Cox wrote: > On Wed, 24 Oct 2007 18:20:52 -0700 > David Brownell <[EMAIL PROTECTED]> wrote: > > > Add a new resource_len() function, so drivers can start using this > > instead of driver-private code for a common idiom. The call can be > > useful with at least:

Re: [patch 2.6.24-rc1] resource_len() utility function

2007-10-24 Thread Jeff Garzik
Alan Cox wrote: On Wed, 24 Oct 2007 18:20:52 -0700 David Brownell <[EMAIL PROTECTED]> wrote: Add a new resource_len() function, so drivers can start using this instead of driver-private code for a common idiom. The call can be useful with at least: - request_region(), release_region() - req

Re: [patch 2.6.24-rc1] resource_len() utility function

2007-10-24 Thread Alan Cox
On Wed, 24 Oct 2007 18:20:52 -0700 David Brownell <[EMAIL PROTECTED]> wrote: > Add a new resource_len() function, so drivers can start using this > instead of driver-private code for a common idiom. The call can be > useful with at least: > > - request_region(), release_region() > - request_me

[patch 2.6.24-rc1] resource_len() utility function

2007-10-24 Thread David Brownell
Add a new resource_len() function, so drivers can start using this instead of driver-private code for a common idiom. The call can be useful with at least: - request_region(), release_region() - request_mem_region(), release_mem_region() - ioremap() Candidate drivers include those using platf