Forum Discussion
Altera_Forum
Honored Contributor
21 years agoUSB kernel config
Hi,
We're using the Cypress SL811 host controller on our NIOS2 board. The kernel config option wasn't available until I edited the Kconfig file in the source tree (drivers/usb/host/Kconfig), found the appropriate option, and added <div class='quotetop'>QUOTE </div> --- Quote Start --- || (NIOS2 && USB)[/b] --- Quote End --- You guys really need to go through and update the stuff which is in there to make it available. :-) Or does this stuff only work in NIOS 1 but not NIOS2? (I haven't compiled yet.) This was the case with all USB support too, you may recall.12 Replies
- Altera_Forum
Honored Contributor
The one I spent time on is the old driver. It worked only for 2.6.5, not for 2.6.9. I am supposed to switch to the new driver, but have not got time. But with the new driver, you should have little problem.
- Altera_Forum
Honored Contributor
Ah, gotcha.
Interesting word, "should". :-) I'm trying to add the appropriate lines to set up the resource to setup.c as follows:
and then down in the setup_arch() function in arch/nios2nommu/kernel/setup.c (right before thestatic struct resource sl811_resources = { = { .start = 0x48389D0, .end = 0x48389D3, .flags = IORESOURCE_MEM, }, = { .start = 0x48389D4, .end = 0x48389D7, .flags = IORESOURCE_MEM, }, = { .start = 7, .end = 7, .flags = IORESOURCE_IRQ, } }; static void sm3k_port_power(struct device *dev, int is_on) { // see linux/usb_sl811.h } static void sm3k_hc_reset(struct device *dev) { // see linux/usb_sl811.h } struct sl811_platform_data sm3k_sl811 = { .potpg = 100, .port_power = sm3k_port_power, .reset = sm3k_hc_reset, }; static struct platform_device sl811_device = { .name = "sl811-hcd", .id = -1, .dev = { .platform_data = &sm3k_sl811, }, .num_resources = 3, .resource = sl811_resources, };
I addedprintk("Done setup_arch\n");
But when the kernel boots, I get <div class='quotetop'>QUOTE </div> --- Quote Start --- <3>sl811-hcd: failed to claim resource 0[/b] --- Quote End ---platform_device_register(&sl811_device);