mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* 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

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