Installation on a MPC5200 based custom board
Hi all. I saw that someones trying to work on a custom board based on mpc5200. I have: * u-boot 1.2.0 * kernel 2.6.21 * arch=powerpc * custom dts based on lite5200b.dts * USB port (USB2) configured on the Ethernet port Is it necessary to combine Ethernet and usb nodes? However this is the log when a usb-storage is plugged: hub 1-0:1.0: state 7 ports 2 chg evt 0004 ppc-of-ohci f0001000.usb: GetStatus roothub.portstatus [1] = 0x00010101 CSC PPS CCS hub 1-0:1.0: port 2, status 0101, change 0001, 12 Mb/s hub 1-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x101 ppc-of-ohci f0001000.usb: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS usb 1-2: new full speed USB device using ppc-of-ohci and address 2 BUG: soft lockup detected on CPU#0! Call Trace: [C7E05A50] [C0007FD8] show_stack+0x3c/0x194 (unreliable) [C7E05A80] [C004A380] softlockup_tick+0xa4/0xd4 [C7E05AA0] [C002B998] run_local_timers+0x18/0x28 [C7E05AB0] [C002B9D8] update_process_times+0x30/0x7c [C7E05AC0] [C003FF3C] tick_sched_timer+0xb0/0x280 [C7E05B20] [C003C538] hrtimer_interrupt+0x214/0x26c [C7E05B80] [C000E744] timer_interrupt+0x88/0x354 [C7E05BF0] [C0011C04] ret_from_except+0x0/0x14 --- Exception: 901 at handle_IRQ_event+0x7c/0x1e8 LR = handle_level_irq+0x90/0x13c [C7E05CB0] [C7F15C00] 0xc7f15c00 (unreliable) [C7E05CD0] [C004C2E0] handle_level_irq+0x90/0x13c [C7E05CE0] [C0006304] do_IRQ+0x98/0xbc [C7E05CF0] [C0011C04] ret_from_except+0x0/0x14 --- Exception: 501 at schedule+0x38/0x64c LR = schedule_timeout+0x68/0xe4 [C7E05DB0] [C01A1650] usb_hcd_submit_urb+0x190/0x8a0 (unreliable) [C7E05E00] [C02389A4] schedule_timeout+0x68/0xe4 [C7E05E40] [C0238378] wait_for_completion_timeout+0x8c/0x138 [C7E05E80] [C01A2B60] usb_start_wait_urb+0x64/0x124 [C7E05EB0] [C01A2E1C] usb_control_msg+0xc4/0xf0 [C7E05EF0] [C019D0D0] hub_port_init+0x424/0x614 [C7E05F40] [C019F42C] hub_thread+0x434/0xe64 [C7E05FC0] [C0037E60] kthread+0xc0/0xfc [C7E05FF0] [C00123F8] original_kernel_thread+0x44/0x60 ppc-of-ohci f0001000.usb: OHCI Unrecoverable Error, disabled ppc-of-ohci f0001000.usb: OHCI controller state ppc-of-ohci f0001000.usb: OHCI 1.0, NO legacy support registers ppc-of-ohci f0001000.usb: control 0x093 HCFS=operational CLE CBSR=3 ppc-of-ohci f0001000.usb: cmdstatus 0x0 SOC=0 ppc-of-ohci f0001000.usb: intrstatus 0x0074 RHSC FNO UE SF ppc-of-ohci f0001000.usb: intrenable 0x801a MIE UE RD WDH ppc-of-ohci f0001000.usb: ed_controlhead 07fcc000 ppc-of-ohci f0001000.usb: ed_controlcurrent fff0 ppc-of-ohci f0001000.usb: hcca frame #ddb6 ppc-of-ohci f0001000.usb: roothub.a 02001202 POTPGT=2 NOCP NPS NDP=2(2) ppc-of-ohci f0001000.usb: roothub.b PPCM= DR= ppc-of-ohci f0001000.usb: roothub.status 8000 DRWE ppc-of-ohci f0001000.usb: roothub.portstatus [0] 0x0100 PPS ppc-of-ohci f0001000.usb: roothub.portstatus [1] 0x00030100 PESC CSC PPS ppc-of-ohci f0001000.usb: HC died; cleaning up irq 134: nobody cared (try booting with the irqpoll option) Call Trace: [C046FDF0] [C0007FD8] show_stack+0x3c/0x194 (unreliable) [C046FE20] [C004B358] __report_bad_irq+0x34/0xac [C046FE40] [C004B4AC] note_interrupt+0xdc/0x288 [C046FE70] [C004C344] handle_level_irq+0xf4/0x13c [C046FE80] [C0006304] do_IRQ+0x98/0xbc [C046FE90] [C0011C04] ret_from_except+0x0/0x14 --- Exception: 501 at schedule+0x304/0x64c LR = schedule+0x2d8/0x64c [C046FFA0] [C004A2B4] watchdog+0x4c/0x74 [C046FFC0] [C0037E60] kthread+0xc0/0xfc [C046FFF0] [C00123F8] original_kernel_thread+0x44/0x60 handlers: [c01a1008] (usb_hcd_irq+0x0/0x9c) Disabling IRQ #134 usb 1-2: khubd timed out on ep0in len=0/64 hub 1-0:1.0: cannot reset port 2 (err = -19) hub 1-0:1.0: cannot disable port 2 (err = -19) ppc-of-ohci f0001000.usb: leak ed c7fcc000 (#00) state 0 (has tds) hub 1-0:1.0: cannot reset port 2 (err = -19) hub 1-0:1.0: cannot disable port 2 (err = -19) hub 1-0:1.0: cannot reset port 2 (err = -19) hub 1-0:1.0: cannot disable port 2 (err = -19) hub 1-0:1.0: cannot reset port 2 (err = -19) hub 1-0:1.0: cannot disable port 2 (err = -19) hub 1-0:1.0: cannot disable port 2 (err = -19) hub 1-0:1.0: state 0 ports 2 chg evt 0004 Please mail me any idea... Thanks, @ngel ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Installation on a MPC5200 based custom board
Angelo wrote: Hi all. I saw that someones trying to work on a custom board based on mpc5200. I have: * u-boot 1.2.0 * kernel 2.6.21 * arch=powerpc * custom dts based on lite5200b.dts * USB port (USB2) configured on the Ethernet port Is it necessary to combine Ethernet and usb nodes? However this is the log when a usb-storage is plugged: hub 1-0:1.0: state 7 ports 2 chg evt 0004 ppc-of-ohci f0001000.usb: GetStatus roothub.portstatus [1] = 0x00010101 CSC PPS CCS hub 1-0:1.0: port 2, status 0101, change 0001, 12 Mb/s hub 1-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x101 ppc-of-ohci f0001000.usb: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS usb 1-2: new full speed USB device using ppc-of-ohci and address 2 BUG: soft lockup detected on CPU#0! Call Trace: [C7E05A50] [C0007FD8] show_stack+0x3c/0x194 (unreliable) [C7E05A80] [C004A380] softlockup_tick+0xa4/0xd4 [C7E05AA0] [C002B998] run_local_timers+0x18/0x28 [C7E05AB0] [C002B9D8] update_process_times+0x30/0x7c [C7E05AC0] [C003FF3C] tick_sched_timer+0xb0/0x280 [C7E05B20] [C003C538] hrtimer_interrupt+0x214/0x26c [C7E05B80] [C000E744] timer_interrupt+0x88/0x354 [C7E05BF0] [C0011C04] ret_from_except+0x0/0x14 --- Exception: 901 at handle_IRQ_event+0x7c/0x1e8 LR = handle_level_irq+0x90/0x13c [C7E05CB0] [C7F15C00] 0xc7f15c00 (unreliable) [C7E05CD0] [C004C2E0] handle_level_irq+0x90/0x13c [C7E05CE0] [C0006304] do_IRQ+0x98/0xbc [C7E05CF0] [C0011C04] ret_from_except+0x0/0x14 --- Exception: 501 at schedule+0x38/0x64c LR = schedule_timeout+0x68/0xe4 [C7E05DB0] [C01A1650] usb_hcd_submit_urb+0x190/0x8a0 (unreliable) [C7E05E00] [C02389A4] schedule_timeout+0x68/0xe4 [C7E05E40] [C0238378] wait_for_completion_timeout+0x8c/0x138 [C7E05E80] [C01A2B60] usb_start_wait_urb+0x64/0x124 [C7E05EB0] [C01A2E1C] usb_control_msg+0xc4/0xf0 [C7E05EF0] [C019D0D0] hub_port_init+0x424/0x614 [C7E05F40] [C019F42C] hub_thread+0x434/0xe64 [C7E05FC0] [C0037E60] kthread+0xc0/0xfc [C7E05FF0] [C00123F8] original_kernel_thread+0x44/0x60 ppc-of-ohci f0001000.usb: OHCI Unrecoverable Error, disabled ppc-of-ohci f0001000.usb: OHCI controller state ppc-of-ohci f0001000.usb: OHCI 1.0, NO legacy support registers ppc-of-ohci f0001000.usb: control 0x093 HCFS=operational CLE CBSR=3 ppc-of-ohci f0001000.usb: cmdstatus 0x0 SOC=0 ppc-of-ohci f0001000.usb: intrstatus 0x0074 RHSC FNO UE SF ppc-of-ohci f0001000.usb: intrenable 0x801a MIE UE RD WDH ppc-of-ohci f0001000.usb: ed_controlhead 07fcc000 ppc-of-ohci f0001000.usb: ed_controlcurrent fff0 ppc-of-ohci f0001000.usb: hcca frame #ddb6 ppc-of-ohci f0001000.usb: roothub.a 02001202 POTPGT=2 NOCP NPS NDP=2(2) ppc-of-ohci f0001000.usb: roothub.b PPCM= DR= ppc-of-ohci f0001000.usb: roothub.status 8000 DRWE ppc-of-ohci f0001000.usb: roothub.portstatus [0] 0x0100 PPS ppc-of-ohci f0001000.usb: roothub.portstatus [1] 0x00030100 PESC CSC PPS ppc-of-ohci f0001000.usb: HC died; cleaning up irq 134: nobody cared (try booting with the irqpoll option) Call Trace: [C046FDF0] [C0007FD8] show_stack+0x3c/0x194 (unreliable) [C046FE20] [C004B358] __report_bad_irq+0x34/0xac [C046FE40] [C004B4AC] note_interrupt+0xdc/0x288 [C046FE70] [C004C344] handle_level_irq+0xf4/0x13c [C046FE80] [C0006304] do_IRQ+0x98/0xbc [C046FE90] [C0011C04] ret_from_except+0x0/0x14 --- Exception: 501 at schedule+0x304/0x64c LR = schedule+0x2d8/0x64c [C046FFA0] [C004A2B4] watchdog+0x4c/0x74 [C046FFC0] [C0037E60] kthread+0xc0/0xfc [C046FFF0] [C00123F8] original_kernel_thread+0x44/0x60 handlers: [c01a1008] (usb_hcd_irq+0x0/0x9c) Disabling IRQ #134 usb 1-2: khubd timed out on ep0in len=0/64 hub 1-0:1.0: cannot reset port 2 (err = -19) hub 1-0:1.0: cannot disable port 2 (err = -19) ppc-of-ohci f0001000.usb: leak ed c7fcc000 (#00) state 0 (has tds) hub 1-0:1.0: cannot reset port 2 (err = -19) hub 1-0:1.0: cannot disable port 2 (err = -19) hub 1-0:1.0: cannot reset port 2 (err = -19) hub 1-0:1.0: cannot disable port 2 (err = -19) hub 1-0:1.0: cannot reset port 2 (err = -19) hub 1-0:1.0: cannot disable port 2 (err = -19) hub 1-0:1.0: cannot disable port 2 (err = -19) hub 1-0:1.0: state 0 ports 2 chg evt 0004 Please mail me any idea... Update to the latest kernel (2.6.27+) - there has been lots of work on the MPC5200 in the past three years (that's how old 2.6.21 is!) -- Gary Thomas | Consulting for the MLB Associates |Embedded world ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: R: Installation on a MPC5200 based custom board
On Freitag, 5. Dezember 2008, [EMAIL PROTECTED] wrote: Now plugging-in USB: [EMAIL PROTECTED]: ~ #[ 17.228078] hub 1-0:1.0: state 7 ports 2 chg evt 0004 [EMAIL PROTECTED]: ~ #[ 17.233798] ppc-of-ohci f0001000.usb: GetStatus roothub.portstatus [1] = 0x00010101 CSC PPS CCS [EMAIL PROTECTED]: ~ #[ 17.242776] hub 1-0:1.0: port 2, status 0101, change 0001, 12 Mb/s [EMAIL PROTECTED]: ~ #[ 17.374796] hub 1-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x101 [EMAIL PROTECTED]: ~ #[ 17.450780] ppc-of-ohci f0001000.usb: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS [EMAIL PROTECTED]: ~ #[ 17.514787] usb 1-2: new full speed USB device using ppc-of-ohci and address 2 [EMAIL PROTECTED]: ~ #[ 24.027842] usb 1-2: khubd timed out on ep0in len=0/64 [EMAIL PROTECTED]: ~ #[ 29.199841] usb 1-2: khubd timed out on ep0in len=0/64 [EMAIL PROTECTED]: ~ #[ 34.307841] usb 1-2: khubd timed out on ep0in len=0/64 [EMAIL PROTECTED]: ~ #[ 34.382786] ppc-of-ohci f0001000.usb: GetStatus roothub.portstatus [1] = 0x00100103 PRSC PPS PES CCS [EMAIL PROTECTED]: ~ #[ 34.446789] usb 1-2: device descriptor read/64, error -110 [EMAIL PROTECTED]: ~ # [EMAIL PROTECTED]: ~ #cat /proc/interrupts CPU0 134: 5689 MPC52xx Peripherals Edge ohci_hcd:usb1 139:207 MPC52xx Peripherals Edge mpc52xx_psc_uart 143: 0 MPC52xx Peripherals Edge i2c-mpc 144: 0 MPC52xx Peripherals Edge i2c-mpc BAD: 0 [EMAIL PROTECTED]: ~ # we were thinking to some problem like: http://www.nabble.com/USB-support-on-mpc5200-broken-td19658810.html or http://www.nabble.com/MPC5200-PCI-interrupt-routing-p19608472.html Sounds like a wrong or missed clock configuration. Is your CDM 48 MHz Fractional Divider Configuration Register Field Descriptions (0x0210) setup correctly? Some kernel revisions guesses and fixes the setting, some other not. Regards, Juergen -- Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Vertretung Sued/Muenchen, Germany Phone: +49-8766-939 228 | Fax: +49-5121-206917- ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: R: Installation on a MPC5200 based custom board
The attachment is from Freescale and shows how the divider works. -- Jon Smirl [EMAIL PROTECTED] fractinal_div.pdf Description: Adobe PDF document ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: R: Installation on a MPC5200 based custom board
Ok . = Case arch = powerpc I saw that cdm is modified in two fields. arch/powerpc/platforms/mpc52xx_common.c file, in function: mpc52xx_setup_cpu(void) . /* Use internal 48 Mhz */ out_8(cdm-ext_48mhz_en, 0x00); out_8(cdm-fd_enable, 0x01); if (in_be32(cdm-rstcfg) 0x40) /* Assumes 33Mhz clock */ out_be16(cdm-fd_counters, 0x0001); else out_be16(cdm-fd_counters, 0x); . and in file arch/powerpc/platforms/52xx/lite5200.c , function: void __init lite5200_calibrate_decr(void) { ppc_tb_freq = 0x1F78A40; /* hardcoded default */ /* CPU FREQUENCY FORCED TO 396 MHz VALUE */ ppc_proc_freq = 0x179A7B00; /* hardcoded default */ .. = Case arch = ppc The code is equal but obviously the path change (arch/ppc/syslib/mpc52xx_setup.c). Funtion: mpc52xx_setup_cpu(void) . /* Use internal 48 Mhz */ out_8(cdm-ext_48mhz_en, 0x00); out_8(cdm-fd_enable, 0x01); if (in_be32(cdm-rstcfg) 0x40) /* Assumes 33Mhz clock */ out_be16(cdm-fd_counters, 0x0001); else out_be16(cdm-fd_counters, 0x); . And in function: mpc52xx_calibrate_decr(void) . xlbfreq = __res.bi_busfreq; /* if bootloader didn't pass bus frequencies, calculate them */ if (xlbfreq == 0) { ... /* Compute all frequency from that CDM settings */ xlbfreq = (tbl_end - tbl_start) 8; cpufreq = (xlbfreq * core_mult[in_be32(cdm-rstcfg)0x1f])/10; ipbfreq = (in_8(cdm-ipb_clk_sel) 1) ? xlbfreq / 2 : xlbfreq; switch (in_8(cdm-pci_clk_sel) 3) { case 0: pcifreq = ipbfreq; break; case 1: pcifreq = ipbfreq / 2; break; default: pcifreq = xlbfreq / 4; break; } . = What do you think about this? Thanks in advance, @ngel --- Ven 5/12/08, Jon Smirl [EMAIL PROTECTED] ha scritto: Da: Jon Smirl [EMAIL PROTECTED] Oggetto: Re: R: Installation on a MPC5200 based custom board A: Juergen Beisert [EMAIL PROTECTED] Cc: linuxppc-dev@ozlabs.org, [EMAIL PROTECTED], Gary Thomas [EMAIL PROTECTED], [EMAIL PROTECTED] Data: Venerdì 5 dicembre 2008, 20:33 The attachment is from Freescale and shows how the divider works. -- Jon Smirl [EMAIL PROTECTED] ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Installation on a MPC5200 based custom board
On Fri, Jul 11, 2008 at 06:07:54PM -0400, Sylvain Lamontagne wrote: Greetings We are currently trying to put a Kernel 2.6.26 on a custom board based on the MPC5200 processor and the designed of the board was based on the lite5200b evaluation board. We would like to have some advice regarding the installation process for this kernel. The hardware currently work (still buggy, but work) with a kernel 2.6.23 compiled with ARCH ppc running on a U-Boot 1.1.6. For what I understand now, the ARCH ppc if kind of deprecated and we have to switch to ARCH powerpc. I'm new to the concept of device tree, do I have to modify it myself or the file wild be generated automatically ? You need to modify it yourself. I suspect that most of it will be identical to the lite5200b, but you'll need to make adjustments for things like PSC usage and PCI interrupt mappings. Should it be better for us to upgrade our version of U-Boot to 1.3.* to get the support of device tree? Currently we tried with the wrapper trick of using cuImage.lite5200b and the v1.1.6 but it doesn't seem to work. It's a good idea, but you don't need to. The cuImage target should work well after you've created a custom .dts file for your board. Also, we would like to know if we have to recompile everything on the board (U-Boot/Kernel/Busybox) since we switched ARCH from ppc to powerpc? No, you do not. We are also wondering what is the cross-compilation tools that you are using? Or do you have any good advice on a choice? Currently we are building with gcc-4.1.0-glibc-2.3.6 for ppc on an x86 host running Ubuntu 8.04 or we also have a Fedora Core 7 laptop but, I have see a kernel compilation warning regarding gcc 4.1 saying that it's known to brake the kernel. Personally, I use ELDK from Denx. Should we upgrade everything (U-Boot/Kernel/Busybox) and recreate a new Ramdisk ? No, you don't have to. Anybody know a good development tools to use with a CodeWarrior USB TAP from freescale ? The CodeWarrior IDE doesn't seems to work properly for us. I haven't used codewarrior for Linux development. The Abatron BDI-3000 works really well for me. Cheers, g. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Installation on a MPC5200 based custom board
Greetings We are currently trying to put a Kernel 2.6.26 on a custom board based on the MPC5200 processor and the designed of the board was based on the lite5200b evaluation board. We would like to have some advice regarding the installation process for this kernel. The hardware currently work (still buggy, but work) with a kernel 2.6.23 compiled with ARCH ppc running on a U-Boot 1.1.6. For what I understand now, the ARCH ppc if kind of deprecated and we have to switch to ARCH powerpc. I'm new to the concept of device tree, do I have to modify it myself or the file wild be generated automatically ? Should it be better for us to upgrade our version of U-Boot to 1.3.* to get the support of device tree? Currently we tried with the wrapper trick of using cuImage.lite5200b and the v1.1.6 but it doesn't seem to work. Also, we would like to know if we have to recompile everything on the board (U-Boot/Kernel/Busybox) since we switched ARCH from ppc to powerpc? We are also wondering what is the cross-compilation tools that you are using? Or do you have any good advice on a choice? Currently we are building with gcc-4.1.0-glibc-2.3.6 for ppc on an x86 host running Ubuntu 8.04 or we also have a Fedora Core 7 laptop but, I have see a kernel compilation warning regarding gcc 4.1 saying that it's known to brake the kernel. Should we upgrade everything (U-Boot/Kernel/Busybox) and recreate a new Ramdisk ? Anybody know a good development tools to use with a CodeWarrior USB TAP from freescale ? The CodeWarrior IDE doesn't seems to work properly for us. This is a lot of questions and they maybe unclear since I'm new to all this, but if you need any more information I can provide them. Best Regards, -- Sylvain Lamontagne Software Developer Novariant Canada Ext.: 4940 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev