Thread (12 messages) 12 messages, 6 authors, 2012-10-26

Re: [PATCH] gianfar_ptp: use iomem, not ioports resource tree in probe

flat view

From: Tabi Timur-B04825 <hidden>
Date: 2012-10-24 17:59:42

On Wed, Oct 24, 2012 at 10:21 AM, Paul Gortmaker
[off-list ref] wrote:
From: Wei Yang <redacted>

When using a 36 bit dtb file, the driver complains "resource busy".

Investigating the source of the message leads one to the
gianfar_ptp_probe function.

Since the type of the device resource requested in this function
is IORESOURCE_MEM, it should use "iomem_resource" instead of
"ioports_resource".
I can't comment on this patch, since I didn't write the driver, but I
am confused on one thing.  Why is the driver using platform_xxx calls
to get data?  Why isn't it using of_xxx calls to read properties from
the device tree?  For example, why is it using

	etsects->irq = platform_get_irq(dev, 0);

to get the IRQ?  Shouldn't it do this instead:

	etsects->irq = irq_of_parse_and_map(node, 0);

-- 
Timur Tabi
Linux kernel developer at Freescale
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help