add_usb_ehci_device() don't set resource size

Antony Pavlov antonynpavlov at gmail.com
Wed Aug 24 10:30:35 EDT 2011


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



More information about the barebox mailing list