Hi,

Anyone using cambria board patch and USB?

https://svn.openwrt.org/openwrt/trunk/target/linux/ixp4xx/patches-2.6.26/190-cambria_support.patch


or specifically  linux/drivers/usb/host/ehci-ixp4xx.c?


I'm trying to get the EHCI working on a board based on the intel IXP435 development board. I enabled the platform device
with the attached patch.

Right now I'm at the point where i have  " hub 1-0:1.0: 0 ports
detected"..      I'm hoping someone here can give me suggestions to help
debug this.   Or if anyone knows of working patches for this board.



[42949541.270000] ehci_hcd: block sizes: qh 128 qtd 96 itd 160 sitd 96
[42949541.270000] ehci_hcd_init trying platform_driver_register()
driver='ixp4xx-ehci'
[42949541.270000] platform_driver_register()
[42949541.270000] driver_register=ixp4xx-ehci
[42949541.270000] bus: 'platform': add driver ixp4xx-ehci
[42949541.270000] bus: 'platform': driver_probe_device: matched device
ixp4xx-ehci.0 with driver ixp4xx-ehci
[42949541.270000] bus: 'platform': really_probe: probing driver
ixp4xx-ehci with device ixp4xx-ehci.0
[42949541.270000] ixp4xx_ehci_probe()
[42949541.270000] ixp4xx-ehci ixp4xx-ehci.0: IXP4XX EHCI Host Controller
[42949541.270000] device: 'usb_host1': device_add
[42949541.280000] drivers/usb/core/inode.c: creating file 'devices'
[42949541.280000] drivers/usb/core/inode.c: creating file '001'
[42949541.280000] ixp4xx-ehci ixp4xx-ehci.0: new USB bus registered,
assigned bus number 1
[42949541.280000] ixp4xx_ehci_init()
[42949541.280000] ixp4xx-ehci ixp4xx-ehci.0: reset command 000002
(park)=0 ithresh=0 period=1024 Reset HALT
[42949541.280000] ixp4xx-ehci ixp4xx-ehci.0: irq 32, io mem 0xcd000000
[42949541.280000] ixp4xx-ehci ixp4xx-ehci.0: reset command 000002
(park)=0 ithresh=0 period=1024 Reset HALT
[42949541.280000] ixp4xx-ehci ixp4xx-ehci.0: init command 010001
(park)=0 ithresh=1 period=1024 RUN
[42949541.300000] ixp4xx-ehci ixp4xx-ehci.0: USB 0.0 started, EHCI 0.00,
driver 10 Dec 2004
[42949541.300000] usb usb1: default language 0x0409
[42949541.300000] device: 'usb1': device_add
[42949541.300000] bus: 'usb': add device usb1
[42949541.300000] usb usb1: uevent
[42949541.300000] bus: 'usb': driver_probe_device: matched device usb1
with driver usb
[42949541.300000] bus: 'usb': really_probe: probing driver usb with
device usb1
[42949541.300000] usb usb1: usb_probe_device
[42949541.300000] usb usb1: configuration #1 chosen from 1 choice
[42949541.300000] usb usb1: adding 1-0:1.0 (config #1, interface 0)
[42949541.300000] device: '1-0:1.0': device_add
[42949541.300000] bus: 'usb': add device 1-0:1.0
[42949541.300000] usb 1-0:1.0: uevent
[42949541.310000] bus: 'usb': driver_probe_device: matched device
1-0:1.0 with driver hub
[42949541.310000] bus: 'usb': really_probe: probing driver hub with
device 1-0:1.0
[42949541.310000] hub 1-0:1.0: usb_probe_interface
[42949541.310000] hub 1-0:1.0: usb_probe_interface - got id
[42949541.310000] hub 1-0:1.0: USB hub found
[42949541.310000] hub 1-0:1.0: 0 ports detected
[42949541.310000] hub 1-0:1.0: standalone hub
[42949541.310000] hub 1-0:1.0: no power switching (usb 1.0)
[42949541.310000] hub 1-0:1.0: individual port over-current protection
[42949541.310000] hub 1-0:1.0: Single TT
[42949541.310000] hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
[42949541.310000] hub 1-0:1.0: power on to power good time: 20ms
[42949541.310000] hub 1-0:1.0: local power source is good
[42949541.310000] hub 1-0:1.0: trying to enable port power on
non-switchable hub
[42949541.420000] driver: '1-0:1.0': driver_bound: bound to device 'hub'
[42949541.420000] bus: 'usb': really_probe: bound device 1-0:1.0 to
driver hub
[42949541.420000] device class 'usb_endpoint': registering
[42949541.420000] hub 1-0:1.0: state 7 ports 0 chg 0000 evt 0000
[42949541.420000] device: 'usbdev1.1_ep81': device_add
[42949541.430000] drivers/usb/core/inode.c: creating file '001'
[42949541.430000] driver: 'usb1': driver_bound: bound to device 'usb'
[42949541.430000] bus: 'usb': really_probe: bound device usb1 to driver usb
[42949541.430000] device: 'usbdev1.1_ep00': device_add
[42949541.430000] usb usb1: New USB device found, idVendor=1d6b,
idProduct=0002
[42949541.430000] usb usb1: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[42949541.430000] usb usb1: Product: IXP4XX EHCI Host Controller
[42949541.430000] usb usb1: Manufacturer: Linux 2.6.26 ehci_hcd
[42949541.430000] usb usb1: SerialNumber: ixp4xx-ehci.0
[42949541.430000] driver: 'ixp4xx-ehci.0': driver_bound: bound to device
'ixp4xx-ehci'
[42949541.430000] bus: 'platform': really_probe: bound device
ixp4xx-ehci.0 to driver ixp4xx-ehci
[42949541.430000] bus: 'platform': driver_probe_device: matched device
ixp4xx-ehci.1 with driver ixp4xx-ehci
[42949541.430000] bus: 'platform': really_probe: probing driver
ixp4xx-ehci with device ixp4xx-ehci.1
[42949541.430000] ixp4xx_ehci_probe()
[42949541.430000] ixp4xx-ehci ixp4xx-ehci.1: IXP4XX EHCI Host Controller
[42949541.430000] device: 'usb_host2': device_add
[42949541.440000] drivers/usb/core/inode.c: creating file '002'
[42949541.440000] ixp4xx-ehci ixp4xx-ehci.1: new USB bus registered,
assigned bus number 2
[42949541.440000] ixp4xx_ehci_init()
[42949541.440000] ixp4xx-ehci ixp4xx-ehci.1: reset command 000002
(park)=0 ithresh=0 period=1024 Reset HALT
[42949541.440000] ixp4xx-ehci ixp4xx-ehci.1: irq 33, io mem 0xce000000
[42949541.440000] ixp4xx-ehci ixp4xx-ehci.1: reset command 000002
(park)=0 ithresh=0 period=1024 Reset HALT
[42949541.440000] ixp4xx-ehci ixp4xx-ehci.1: init command 010001
(park)=0 ithresh=1 period=1024 RUN
[42949541.460000] ixp4xx-ehci ixp4xx-ehci.1: USB 0.0 started, EHCI 0.00,
driver 10 Dec 2004
[42949541.460000] usb usb2: default language 0x0409
[42949541.460000] device: 'usb2': device_add
[42949541.460000] bus: 'usb': add device usb2
[42949541.460000] usb usb2: uevent
[42949541.460000] bus: 'usb': driver_probe_device: matched device usb2
with driver usb
[42949541.460000] bus: 'usb': really_probe: probing driver usb with
device usb2
[42949541.460000] usb usb2: usb_probe_device
[42949541.460000] usb usb2: configuration #1 chosen from 1 choice
[42949541.460000] usb usb2: adding 2-0:1.0 (config #1, interface 0)
[42949541.460000] device: '2-0:1.0': device_add
[42949541.460000] bus: 'usb': add device 2-0:1.0
[42949541.460000] usb 2-0:1.0: uevent
[42949541.470000] bus: 'usb': driver_probe_device: matched device
2-0:1.0 with driver hub
[42949541.470000] bus: 'usb': really_probe: probing driver hub with
device 2-0:1.0
[42949541.470000] hub 2-0:1.0: usb_probe_interface
[42949541.470000] hub 2-0:1.0: usb_probe_interface - got id
[42949541.470000] hub 2-0:1.0: USB hub found
[42949541.470000] hub 2-0:1.0: 0 ports detected
[42949541.470000] hub 2-0:1.0: standalone hub
[42949541.470000] hub 2-0:1.0: no power switching (usb 1.0)
[42949541.470000] hub 2-0:1.0: individual port over-current protection
[42949541.470000] hub 2-0:1.0: Single TT
[42949541.470000] hub 2-0:1.0: TT requires at most 8 FS bit times (666 ns)
[42949541.470000] hub 2-0:1.0: power on to power good time: 20ms
[42949541.470000] hub 2-0:1.0: local power source is good
[42949541.470000] hub 2-0:1.0: trying to enable port power on
non-switchable hub
[42949541.580000] driver: '2-0:1.0': driver_bound: bound to device 'hub'
[42949541.580000] bus: 'usb': really_probe: bound device 2-0:1.0 to
driver hub
[42949541.580000] device: 'usbdev2.1_ep81': device_add
[42949541.580000] hub 2-0:1.0: state 7 ports 0 chg 0000 evt 0000
[42949541.580000] drivers/usb/core/inode.c: creating file '001'
[42949541.580000] driver: 'usb2': driver_bound: bound to device 'usb'
[42949541.580000] bus: 'usb': really_probe: bound device usb2 to driver usb
[42949541.580000] device: 'usbdev2.1_ep00': device_add
[42949541.590000] usb usb2: New USB device found, idVendor=1d6b,
idProduct=0002
[42949541.590000] usb usb2: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[42949541.590000] usb usb2: Product: IXP4XX EHCI Host Controller
[42949541.590000] usb usb2: Manufacturer: Linux 2.6.26 ehci_hcd
[42949541.590000] usb usb2: SerialNumber: ixp4xx-ehci.1
[42949541.590000] driver: 'ixp4xx-ehci.1': driver_bound: bound to device
'ixp4xx-ehci'
[42949541.590000] bus: 'platform': really_probe: bound device
ixp4xx-ehci.1 to driver ixp4xx-ehci
[42949541.600000] ehci_hcd_init  platform_driver_register() returned=0
[42949541.600000] driver_register=ehci_hcd
[42949541.600000] bus: 'pci': add driver ehci_hcd
[42949541.610000] ehci_hcd_init  pci_register_driver() returned=0
[42949541.610000] ehci_hcd_init  returning=0
[42949580.230000] Initializing USB Mass Storage driver...
[42949580.230000] driver_register=usb-storage
[42949580.230000] bus: 'usb': add driver usb-storage
[42949580.240000] usbcore: registered new interface driver usb-storage
[42949580.240000] USB Mass Storage support registered.



Thanks.
--
Karl

--- linux-2.6.26.orig/arch/arm/mach-ixp4xx/ixdp425-setup.c	2008-07-13 23:51:29.000000000 +0200
+++ linux-2.6.26/arch/arm/mach-ixp4xx/ixdp425-setup.c	2008-07-30 13:26:45.000000000 +0200
@@ -134,6 +134,57 @@ static struct platform_device ixdp425_i2
 	},
 };
 
+static struct resource ixdp435_usb0_resources[] = {
+	{
+	.start	= 0xCD000000, /* Note took this number from cambria opwnwrt patch. TODO define this */
+	.end	= 0xCD000300,
+	.flags	= IORESOURCE_MEM,
+	},
+	{
+	.start	= 32,
+	.flags	= IORESOURCE_IRQ,
+	},
+};
+
+
+static struct resource ixdp435_usb1_resources[] = {
+	{
+		.start	= 0xCE000000,
+		.end	= 0xCE000300,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= 33,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static u64 ehci_dma_mask = ~(u32)0;
+
+static struct platform_device ixdp435_usb0_device =  {
+	.name		= "ixp4xx-ehci",
+	.id		= 0,
+	.resource	= ixdp435_usb0_resources,
+	.num_resources	= ARRAY_SIZE(ixdp435_usb0_resources),
+	.dev = {
+		.dma_mask		= &ehci_dma_mask,
+		.coherent_dma_mask	= 0xffffffff,
+	},
+};
+
+
+static struct platform_device ixdp435_usb1_device = {
+	.name		= "ixp4xx-ehci",
+	.id		= 1,
+	.resource	= ixdp435_usb1_resources,
+	.num_resources	= ARRAY_SIZE(ixdp435_usb1_resources),
+	.dev = {
+		.dma_mask		= &ehci_dma_mask,
+		.coherent_dma_mask	= 0xffffffff,
+	},
+};
+
+
 static struct resource ixdp425_uart_resources[] = {
 	{
 		.start		= IXP4XX_UART1_BASE_PHYS,
@@ -241,6 +292,8 @@ static void __init ixdp425_init(void)
 	if (cpu_is_ixp43x()) {
 		ixdp425_uart.num_resources = 1;
 		ixdp425_uart_data[1].flags = 0;
+		platform_device_register(&ixdp435_usb0_device);
+		platform_device_register(&ixdp435_usb1_device);
 	}
 
 	platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices));

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to