Re: Device tree for c67x00
From: Jorge Sánchez de Nova <hidden>
Date: 2009-07-06 12:38:28
Hi, ok, so I have managed to give it some OF support in a preliminary way(see patch). But now, I am facing serious problems which I am finding difficult to tackle. I understand that maybe these problems have to do partially or entirely to the Xilinx ML403. Let me explain myself: First of all, I don't know of anyone else who has used it for the ML403 with the XPS_EPC , so there might be some particularities I should specifically take care of. First of all, I see a resetting problem. When I load the kernel with my board from a powered off state to a powered on state it behaves differently that if I just to try to load the kernel again with the board powered on (see ERROR 1 below). I have seen that the reset line in the c67300 is connected to the fpga and for sure, to take care of it one would need to do it through a third gpio line outside. This would be to make a hard reset. Looking at this old specific driver that I have found for kernel 2.4.20 ( http://www.sysf.physto.se/~attila/ATLAS/Digitizer/Testbench/System_ISE_SoftMAC/linux/software/uClinux-2.4.x/drivers/usb/cy7c67300/<http://www.sysf.physto.se/%7Eattila/ATLAS/Digitizer/Testbench/System_ISE_SoftMAC/linux/software/uClinux-2.4.x/drivers/usb/cy7c67300/>) I see that the hard resets are common using the ugly gpio method. With the board on, if I reload the fpga programming and kernel image into memory and set the PC to run properly, it gives different errors. Sometimes ERROR2 and some other times ERROR3. When ERROR2, the processor halts when calling WARN_ON(!res) and in the second, the interrupt handler keeps writing to the output endlessly. I have added some printks to trace the problem and the OF support is simply a rewriting of the normal platform_driver registration. Any ideas? Jorge -- ERROR 1 (just after power on-- Generic platform RAM MTD, (c) 2004 Simtec Electronics usbmon: debugfs is not available C67X00_DBG:c67x00_of_probe() - Request memory region C67X00_DBG:c67x00_of_probe() - Allocating data structs C67X00_DBG:c67x00_of_probe() - Configuring c67x00 device C67X00_DBG:c67x00_of_probe() - Configure platform data based on the device-tree data C67X00_DBG:c67x00_of_probe() - hpi.regstep: 2 C67X00_DBG:c67x00_of_probe() - SIE_config: 1 C67X00_DBG:c67x00_of_probe() - SIE_config: 21 C67X00_DBG:c67x00_of_probe() - Low-level initizalization C67X00_DBG:c67x00_ll_hpi_reg_init(): Reg:324 written=0x00 ; read: 0 C67X00_DBG:c67x00_ll_hpi_reg_init(): Reg:328 written=0x00 ; read: 0 C67X00_DBG:c67x00_of_probe() - Registering IRQ C67X00_DBG:c67x00_of_probe() - Trying to register IRQ:17 @ 17 C67X00_DBG:c67x00_irq() - Handling IRQ number 57005 �����;�L�=?� : Not all interrupts handled! status = 0xdead C67X00_DBG:c67x00_irq() - Handling IRQ number 57005 C67X00_DBG:c67x00_of_probe() - Low-level reset C67X00_DBG:c67x00_ll_reset() - Send mbox C67X00_DBG:c67x00_ll_reset() - recv_msg C67X00_DBG:ll_recv_msg() - calling wait_for_completion_timeout C67X00_DBG:ll_recv_msg() res=5000 C67X00_DBG:c67x00_ll_reset() - done recv_msg C67X00_DBG:c67x00_of_probe() - Configuring SIEs C67X00_DBG:ll_recv_msg() - calling wait_for_completion_timeout C67X00_DBG:ll_recv_msg() res=5000 ����� : SIE 0 not set to host mode ����� : Cypress C67X00 Host Controller Unable to handle kernel paging request for data at address 0x00000002 Faulting instruction address: 0xc0012654 Oops: Kernel access of bad area, sig: 11 [#1] PREEMPT Xilinx Virtex Modules linked in: NIP: c0012654 LR: c01c8ca0 CTR: c01fa0e4 REGS: c381db90 TRAP: 0300 Not tainted (2.6.29.4) MSR: 00029030 <EE,ME,CE,IR,DR> CR: 35039055 XER: a000004b DEAR: 00000002, ESR: 00000000 TASK = c381a000[1] 'swapper' THREAD: c381c000 GPR00: 00000002 c381dc40 c381a000 00000002 00000001 00000000 fffffffe ffffffff GPR08: 00000000 00000008 00000003 c380a0b1 35039059 ffffffff ffffffff ffffffff GPR16: ffffffff ffffffff ffffffff ffffffff ffffffff c398fee0 c035bdc4 c0360acc GPR24: 00000000 00000000 c380a000 c03cac98 00000001 c385a84c 000000d0 c385a84c NIP [c0012654] strlen+0x4/0x18 LR [c01c8ca0] kobject_get_path+0x34/0xe0 Call Trace: [c381dc40] [c01c91fc] add_uevent_var+0x74/0xf4 (unreliable) [c381dc60] [c01fa190] dev_uevent+0xac/0x210 [c381dc80] [c01c94a8] kobject_uevent_env+0x22c/0x454 [c381dcd0] [c01fb164] device_add+0x39c/0x594 [c381dd20] [c01fb418] device_create_vargs+0x8c/0xd0 [c381dd50] [c01fb49c] device_create+0x40/0x50 [c381dd80] [c0219fc0] usb_add_hcd+0x140/0x6d4 [c381ddb0] [c022daac] c67x00_hcd_probe+0x120/0x1f0 [c381ddd0] [c022c88c] c67x00_probe_sie+0xcc/0xe0 [c381dde0] [c02f43a4] c67x00_of_probe+0x3fc/0x458 [c381de50] [c0258a88] of_platform_device_probe+0x5c/0x84 [c381de70] [c01fdb8c] driver_probe_device+0xbc/0x1f4 [c381de90] [c01fdd68] __driver_attach+0xa4/0xa8 [c381deb0] [c01fce78] bus_for_each_dev+0x5c/0x98 [c381dee0] [c01fd990] driver_attach+0x24/0x34 [c381def0] [c01fd798] bus_add_driver+0x1d0/0x250 [c381df20] [c01fe0b4] driver_register+0x5c/0x150 [c381df40] [c0258950] of_register_driver+0x54/0x70 [c381df50] [c03aaa8c] c67x00_init+0x34/0x8c [c381df60] [c000236c] do_one_initcall+0x34/0x1a4 [c381dfd0] [c0393170] kernel_init+0x90/0xfc [c381dff0] [c000fa24] kernel_thread+0x4c/0x68 Instruction dump: 4d820020 7ca903a6 38a3ffff 3884ffff 8c650001 2c830000 8c040001 7c601851 4d860020 4102ffec 4e800020 3883ffff <8c040001> 2c000000 4082fff8 7c632050 ---[ end trace f8500dd73d54b5fd ]--- Kernel panic - not syncing: Attempted to kill init! Rebooting in 180 seconds.. -- ERROR 2 (with the board already on, just reprogramming fpga, kernel and booting again)-- Generic platform RAM MTD, (c) 2004 Simtec Electronics usbmon: debugfs is not available C67X00_DBG:c67x00_of_probe() - Request memory region C67X00_DBG:c67x00_of_probe() - Allocating data structs C67X00_DBG:c67x00_of_probe() - Configuring c67x00 device C67X00_DBG:c67x00_of_probe() - Configure platform data based on the device-tree data C67X00_DBG:c67x00_of_probe() - hpi.regstep: 2 C67X00_DBG:c67x00_of_probe() - SIE_config: 1 C67X00_DBG:c67x00_of_probe() - SIE_config: 21 C67X00_DBG:c67x00_of_probe() - Low-level initizalization C67X00_DBG:c67x00_ll_hpi_reg_init(): Reg:324 written=0x00 ; read: 0 C67X00_DBG:c67x00_ll_hpi_reg_init(): Reg:328 written=0x00 ; read: 0 C67X00_DBG:c67x00_of_probe() - Registering IRQ C67X00_DBG:c67x00_of_probe() - Trying to register IRQ:17 @ 17 C67X00_DBG:c67x00_of_probe() - Low-level reset C67X00_DBG:c67x00_ll_reset() - Send mbox C67X00_DBG:c67x00_ll_reset() - recv_msg C67X00_DBG:ll_recv_msg() - calling wait_for_completion_timeout C67X00_DBG:ll_recv_msg() res=0 --> Here the processor halts when in call to WARN_ON(!res); -- ERROR 3: gets stuck in the interrupt handler -- �����;�L�=?� : Not all interrupts handled! status = 0x0148 C67X00_DBG:c67x00_irq() - Handling IRQ number 328 2009/6/29 Peter Korsgaard [off-list ref]
quoted
quoted
quoted
quoted
quoted
"Jorge" == Jorge Sánchez de Nova [off-list ref] writes:Jorge> Hi, Jorge> It doesn't work at all since it doesn't load anything. I have Jorge> looked at the driver and there is apparently no openfirmware Jorge> support for it, so maybe the dts info won't work without Jorge> it. Am I wrong? Does this means that the c67x00 needs OF Jorge> support to work in this configuration? How can I make it Jorge> otherwise? Yes, the c67x00 driver doesn't currently have any OF bindings. Either you can add it, or simply manually create the struct platform_device in your board file (or scan the DT in your board file and fill in the correct base address / interrupt number from it). Remember that arch/powerpc uses virtual interrupt numbers if you're going to fill in the platform_device by hand. -- Bye, Peter Korsgaard
Attachments
- c67x00_of.patch [text/x-patch] 8957 bytes · preview