Michael Moedt writes: > Hello yet again. > I have a question about the ohci-isp1362 driver. > > Do you know where the dev->addr_reg and dev->data_reg are set? > They look like virtual addresses, but what addresses are they > ioremapped to? (Which file and where-abouts can I find this? I'm > having trouble finding it) > They are set from resources in the platform_device: You can either specify two IORESOURCE_MEM resources that define the phyiscal address of the ISP address port and the data port respectively or define one resource with '.start' pointing to the address port and '.end - sizeof(u16)' pointing to the data port.
My platform_device looks like this: static struct resource ohci_isp1362_resources[] = { { .name = "mem", .start = PHYS_USB_BASE + 0x0004, .end = PHYS_USB_BASE + 0x0fff, .flags = IORESOURCE_MEM, }, { .name = "mem", .start = PHYS_USB_BASE + 0x1000, .end = PHYS_USB_BASE + 0x1fff, .flags = IORESOURCE_MEM, }, { .name = "irq", .start = IRQ_GPIO(GPIO_USBHCINT), .flags = IORESOURCE_IRQ, }, { .name = "dma", .start = -1, .end = -1, .flags = IORESOURCE_DMA, }, }; static void ohci_isp1362_hw_reset(int id, int set) { // iff there should ever be more than one ISP1362 we need to change this BUG_ON(id != 0); if (set) { // Reset is active low gpio_clr_bit(GPIO_USBRESET); } else { gpio_set_bit(GPIO_USBRESET); } } static struct ohci_chip_info ohci_1362_data = { .hw_reset = ohci_isp1362_hw_reset, .clock_enable = NULL, .clock_disable = NULL, }; static struct platform_device ohci_isp1362_device = { .name = "isp1362-ohci", .id = 0, .num_resources = ARRAY_SIZE(ohci_isp1362_resources), .resource = ohci_isp1362_resources, .dev = { .platform_data = &ohci_1362_data, .dma_mask = &pxa_dma_mask, .coherent_dma_mask = 0xffffffff, } }; Lothar Wassmann ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel