Thread (18 messages) 18 messages, 5 authors, 2010-10-11
STALE5717d

[PATCH] spi: add spi_tegra driver

From: Erik Gilling <hidden>
Date: 2010-08-12 18:44:33
Also in: linux-spi

On Thu, Aug 12, 2010 at 8:24 AM, Russell King - ARM Linux
[off-list ref] wrote:
On Wed, Aug 11, 2010 at 05:31:00PM -0700, Erik Gilling wrote:
quoted
quoted
quoted
+ ? ? ? if (!request_mem_region(r->start, (r->end - r->start) + 1,
+ ? ? ? ? ? ? ? ? ? ? ? dev_name(&pdev->dev))) {
+ ? ? ? ? ? ? ? ret = -EBUSY;
+ ? ? ? ? ? ? ? goto err0;
+ ? ? ? }
I believe the platform bus does this for you already by calling
insert_resource() on all the platform bus ranges. ?See if /proc/iomem
is any different with or without this call to verify.
You're right. ?Didn't realize this
There is a big difference between what the platform bus does and what
drivers do.

The platform bus adds the resources to the resource tree as they stand
without marking them _busy_. ?This means that they can be sub-divided
and other resources registered within their range.

request_mem_region() adds resources to the resource tree marking them
busy, detecting overlapping resources and indicating whether two
drivers are trying to claim the same resource region. ?In other words,
it's a preventative measure against two device drivers accessing the
same region.

You're absolutely right to do what you're doing above, please continue
to do so.
Thanks for the explanation. I'll add it back in.

Cheers,
    Erik
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help