* add_usb_ehci_device() don't set resource size
@ 2011-08-24 14:30 Antony Pavlov
2011-08-24 16:27 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Antony Pavlov @ 2011-08-24 14:30 UTC (permalink / raw)
To: barebox
Hi!
add_usb_ehci_device() don't set resource size, it only set start address:
struct device_d *add_usb_ehci_device(int id, resource_size_t hccr,
resource_size_t hcor, void *pdata)
{
struct device_d *dev;
dev = alloc_device("ehci", id, pdata);
dev->resource = xzalloc(sizeof(struct resource) * 2);
dev->num_resources = 2;
dev->resource[0].start = hccr;
dev->resource[0].flags = IORESOURCE_MEM;
dev->resource[1].start = hcor;
dev->resource[1].flags = IORESOURCE_MEM;
register_device(dev);
return dev;
}
So on my Tegra board I have this:
toshiba ac100> / devinfo ehci0
resources:
num : 0
start : 0xc5000100
size : 0x00000000
^^^^^^^^^^
num : 1
start : 0xc5000140
size : 0x00000000
^^^^^^^^^^
driver: ehci
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: add_usb_ehci_device() don't set resource size
2011-08-24 14:30 add_usb_ehci_device() don't set resource size Antony Pavlov
@ 2011-08-24 16:27 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2011-08-24 16:27 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
On Wed, Aug 24, 2011 at 06:30:35PM +0400, Antony Pavlov wrote:
> Hi!
>
> add_usb_ehci_device() don't set resource size, it only set start address:
Yeah, the resource size is barely handled in barebox. Even if they
exist, most if not all drivers do not check it.
> So on my Tegra board I have this:
>
> toshiba ac100> / devinfo ehci0
> resources:
> num : 0
> start : 0xc5000100
> size : 0x00000000
> ^^^^^^^^^^
> num : 1
> start : 0xc5000140
> size : 0x00000000
> ^^^^^^^^^^
This does not look good, patches welcome.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-24 16:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-24 14:30 add_usb_ehci_device() don't set resource size Antony Pavlov
2011-08-24 16:27 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox