Re: [PATCH] uartlite: Fix build on sparc.

From: David Miller
Date: Wed Mar 03 2010 - 11:48:02 EST


From: Grant Likely <grant.likely@xxxxxxxxxxxx>
Date: Wed, 3 Mar 2010 09:40:14 -0700

> On Wed, Mar 3, 2010 at 9:04 AM, David Miller <davem@xxxxxxxxxxxxx> wrote:
>> From: Grant Likely <grant.likely@xxxxxxxxxxxx>
>> Date: Wed, 3 Mar 2010 08:51:27 -0700
>>
>>> Or if you prefer, I could expedite my patch that moves
>>> of_address_to_resource() into common code (it's currently in my test
>>> branch).  I wasn't planning to merge it until 2.6.35, but it is pretty
>>> low risk so I'd be comfortable merging it now.
>>
>> I prefer if you deal with it this way.
>
> Hmmm... on second look my patch depends on a bunch of other stuff that
> doesn't work with sparc yet. grumble. Sorry, this isn't going to
> work yet. I'll have to block out the uartlite driver instead. In the
> mean time I'll change the Kconfig to omit uartlite on sparc.

BTW, while looking at this I can provide something similar to the
of_address_to_resource() interface on sparc but it would need
to provide the of_device pointer not the device_node one.

I precompute all of the IRQs and I/O addresses of OF nodes and stick
them into of_device->resource[] and of_device->irq[].

So if I have the of_device pointer I can just:

memset(res, op->resource[n], sizeof(*res));

as my implementation.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/