Re: [patch v6 0/4] Cypress c67x00 (EZ-Host/EZ-OTG) support
> "alf" == alf scherer <[EMAIL PROTECTED]> writes: alf> Hello Peter, alf> Hello Alan, alf> I have got the HPE-mini FPGA embedded development board running alf> a LEON3-SPARC Snapgear-linux with a 2.6.21 kernel. The Cypress alf> cy7c67300 is directly connected to an Altera Cylcone II FPGA in alf> HPI mode. Ok. Any particular reason why you're stuck with 2.6.21? The kernel HCD interface has changed a bit since then, so you'l have to fix that up. alf> First, I was very glad to find a c67x00 driver for 2.6, but I alf> need to do some porting stuff back to 2.6.21/SPARC, that alf> should'nt be a big deal. However, while reading the code back alf> and forth , I was just wondering how and where the alf> "pdev->dev.platform_data" gets allocated as it is referenced in alf> function c67x00_drv_probe() without the alf> platform_device_add_data() beeing called anywhere before. I've alf> browsed through the drivers/base-code where all platform-driver alf> specific stuff is done, but I really wasn't able to see where alf> this allocation happens. Can you give me a hint where to look alf> at? In your platform code like for other platform devices, E.G.: static struct resource c67x00_resources[] = { [0] = { .start = 0x8400, .end= 0x840f, .flags = IORESOURCE_MEM, }, [1] = { .start = 3, .end= 3, .flags = IORESOURCE_IRQ, }, }; static struct c67x00_platform_data c67x00_data = { .sie_config = C67X00_SIE1_HOST | C67X00_SIE2_PERIPHERAL_B, .hpi_regstep= 0x02, /* A0 not connected on 16bit bus */ }; static struct platform_device c67x00_dev = { .name = "c67x00", .id = 0, .num_resources = ARRAY_SIZE(c67x00_resources), .resource = c67x00_resources, .dev.platform_data = &c67x00_data, }; And the c67x00_dev structure is then registerred with the platform bus with platform_add_devices() or similar. -- Bye, Peter Korsgaard - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch v6 0/4] Cypress c67x00 (EZ-Host/EZ-OTG) support
> "alf" == alf scherer <[EMAIL PROTECTED]> writes: alf> Actually, the LEON3-soft CPU vendor only supports 2.6.21, so for alf> that reason I'm kind stuck. I could try to add LEON3 alf> hardware-specific support to the latest linux release, but that alf> would actually be more work than just porting the c67x00 back to alf> 2.6.21. I've already adopted the code to 2.6.21 kernel HCD. Ok. alf> I see, thanks for the hint! BTW, do you plan to add alf> peripheral-mode support to the driver? If so, I'd be eager to alf> help you with development and testing. Yes, see patch 4 in the patch series you are replying to. -- Bye, Peter Korsgaard - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch v6 0/4] Cypress c67x00 (EZ-Host/EZ-OTG) support
Hello Peter, Hello Alan, I have got the HPE-mini FPGA embedded development board running a LEON3-SPARC Snapgear-linux with a 2.6.21 kernel. The Cypress cy7c67300 is directly connected to an Altera Cylcone II FPGA in HPI mode. First, I was very glad to find a c67x00 driver for 2.6, but I need to do some porting stuff back to 2.6.21/SPARC, that should'nt be a big deal. However, while reading the code back and forth , I was just wondering how and where the "pdev->dev.platform_data" gets allocated as it is referenced in function c67x00_drv_probe() without the platform_device_add_data() beeing called anywhere before. I've browsed through the drivers/base-code where all platform-driver specific stuff is done, but I really wasn't able to see where this allocation happens. Can you give me a hint where to look at? Thanks! alf scherer Peter Korsgaard schrieb: The Cypress c67x00 (EZ-Host/EZ-OTG) controllers are multi-role low/fullspeed USB controllers. This patch series implements a HCD driver and shows the work-in-progress status of a gadget driver. I believe patch 1..3 are ready, and I would like to see them queued up for 2.6.25. Changes since v5: - Merged c67x00_ll_{get,set}_siemsg() into c67x00_ll_fetch_siemsg(). - Fix for interrupt race condition at probe time (reported by Grant) Changes since v4: - Addressed Grant's comments (c67x00_dev->c67x00_hcd_dev, label indent) - Moved c67x00_ll_set_ep_{ctrl,packet_size}_reg() to patch 4 as they are only needed for gadget support. - Added c67x00_ prefix to struct lcp_int_data Changes since v3: - Lots of cleanups: checkpatch, interrupt handling, c67x00_ prefixes, .. - The dummy platform_device's created per serial engine are gone. - Gadget driver (WIP) -- Bye, Peter Korsgaard - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch v6 0/4] Cypress c67x00 (EZ-Host/EZ-OTG) support
"alf" == alf scherer <[EMAIL PROTECTED]> writes: alf> Hello Peter, alf> Hello Alan, alf> I have got the HPE-mini FPGA embedded development board running alf> a LEON3-SPARC Snapgear-linux with a 2.6.21 kernel. The Cypress alf> cy7c67300 is directly connected to an Altera Cylcone II FPGA in alf> HPI mode. Ok. Any particular reason why you're stuck with 2.6.21? The kernel HCD interface has changed a bit since then, so you'l have to fix that up. Actually, the LEON3-soft CPU vendor only supports 2.6.21, so for that reason I'm kind stuck. I could try to add LEON3 hardware-specific support to the latest linux release, but that would actually be more work than just porting the c67x00 back to 2.6.21. I've already adopted the code to 2.6.21 kernel HCD. alf> First, I was very glad to find a c67x00 driver for 2.6, but I alf> need to do some porting stuff back to 2.6.21/SPARC, that alf> should'nt be a big deal. However, while reading the code back alf> and forth , I was just wondering how and where the alf> "pdev->dev.platform_data" gets allocated as it is referenced in alf> function c67x00_drv_probe() without the alf> platform_device_add_data() beeing called anywhere before. I've alf> browsed through the drivers/base-code where all platform-driver alf> specific stuff is done, but I really wasn't able to see where alf> this allocation happens. Can you give me a hint where to look alf> at? In your platform code like for other platform devices, E.G.: static struct resource c67x00_resources[] = { [0] = { .start = 0x8400, .end= 0x840f, .flags = IORESOURCE_MEM, }, [1] = { .start = 3, .end= 3, .flags = IORESOURCE_IRQ, }, }; static struct c67x00_platform_data c67x00_data = { .sie_config = C67X00_SIE1_HOST | C67X00_SIE2_PERIPHERAL_B, .hpi_regstep= 0x02, /* A0 not connected on 16bit bus */ }; static struct platform_device c67x00_dev = { .name = "c67x00", .id = 0, .num_resources = ARRAY_SIZE(c67x00_resources), .resource = c67x00_resources, .dev.platform_data = &c67x00_data, }; And the c67x00_dev structure is then registerred with the platform bus with platform_add_devices() or similar. I see, thanks for the hint! BTW, do you plan to add peripheral-mode support to the driver? If so, I'd be eager to help you with development and testing. Bye Alf - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch v6 0/4] Cypress c67x00 (EZ-Host/EZ-OTG) support
David Brownell schrieb: On Monday 04 February 2008, you wrote: Ok. Any particular reason why you're stuck with 2.6.21? The kernel HCD interface has changed a bit since then, so you'l have to fix that up. Actually, the LEON3-soft CPU I though that was basically SPARC? yes, basically thats SPARC v8 vendor only supports 2.6.21, ... so this would be purely an issue of needing a board support patch? That sort of stuff ought to be easy to forward-port. Much easier than getting all the HCD level changes right. Wasn't digging into it too much, but there is quite some LEON3 specific support stuff that requires some rework to support a later kernel, that includes stuff like support for the AMBA bus, ethernet device drivers (GRETH, OpenCores Eth), i2c support, LEON3 specific PROM/serial console support, power management, etc. Well, maybe you're right, maybe its not that difficult to easily add support for a later kernel version. I'll might give it try when I have some spare time left, thanks. so for that reason I'm kind stuck. I could try to add LEON3 hardware-specific support to the latest linux release, but that would actually be more work than just porting the c67x00 back to 2.6.21. I've already adopted the code to 2.6.21 kernel HCD. - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html