From patchwork Thu Jun 24 13:31:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Thomas X-Patchwork-Id: 56792 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id EF2EBB72F0 for ; Thu, 24 Jun 2010 23:31:36 +1000 (EST) Received: from mail.chez-thomas.org (hermes.mlbassoc.com [76.76.67.137]) by ozlabs.org (Postfix) with ESMTP id 14229B6F16 for ; Thu, 24 Jun 2010 23:31:29 +1000 (EST) Received: by mail.chez-thomas.org (Postfix, from userid 999) id 1688716606B5; Thu, 24 Jun 2010 07:31:28 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on hermes.chez-thomas.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=4.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 Received: from hermes.chez-thomas.org (hermes_local [192.168.1.101]) by mail.chez-thomas.org (Postfix) with ESMTP id B27041660695; Thu, 24 Jun 2010 07:31:26 -0600 (MDT) Message-ID: <4C235E2E.2040801@mlbassoc.com> Date: Thu, 24 Jun 2010 07:31:26 -0600 From: Gary Thomas User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc11 Thunderbird/3.0.4 MIME-Version: 1.0 To: linuxppc-dev@lists.ozlabs.org Subject: Re: Continuing UCC UART woes References: <4C2355A3.8000708@mlbassoc.com> In-Reply-To: <4C2355A3.8000708@mlbassoc.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org On 06/24/2010 06:54 AM, Gary Thomas wrote: > I thought I had this working, but it seems to only work for UCC3. > Sadly, I can't get it to work on UCC4/UCC5/UCC8 at all. > > Starting with UCC4, I have: > /* ttyQE0 (UCC4) */ > serial_qe0: serial@3200 { > device_type = "serial"; > compatible = "ucc_uart"; > cell-index = <4>; > reg = <0x3200 0x200>; > interrupts = <35>; > interrupt-parent = <&qeic>; > port-number = <0>; > rx-clock-name = "brg9"; > tx-clock-name = "brg10"; > soft-uart; > }; > > With this setup, I can receive characters from the device, but > no characters ever go out. Same behaviour as before - the output > descriptors get filled, but no action seems to be taken, no interrupts, > etc. Except randomly there will be output! For example, if I > connect to the port with minicom, what I type is received by /dev/ttyQE2. > On some rare occasions, what I type is also echoed back, but when > this happens, it's only the first couple of characters, then nothing. > > I verified that the CMXUCR registers are being set per the DTS > as well as the BRG registers. They all look correct: > > ucc_set_qe_mux_rxtx - CMX: 0x000a0000 > > root@ppc_target:~ stty qe_setbrg - BRG: fddfd660 = 0x000106b6, CLK = 132000000, RATE = 9600, > MULTIPLIER = 16 > qe_setbrg - BRG: fddfd664 = 0x000106b5, CLK = 132000000, RATE = 9600, > MULTIPLIER = 1 > qe_setbrg - BRG: fddfd660 = 0x000101aa, CLK = 132000000, RATE = 38400, > MULTIPLIER = 16 > qe_setbrg - BRG: fddfd664 = 0x00011ada, CLK = 132000000, RATE = 38400, > MULTIPLIER = 1 > > I've also tried this on UCC5 & UCC8 which show the identical > behaviour - input works, output does not. I've tried running > with only a single soft UART (UCC4) as well as having all three > configured. No changes seen. > > At this point, I'm using the stock driver from 2.6.33.3 > > One thing I noticed is that the firmware patch seems quite old. > I got the firmware package from http://opensource.freescale.com/firmware/ > We were also told (by FreeScale) to look at > https://www.freescale.com/webapp/Download?colCode=QERAMPKG > > Looking at these two packages, it's unclear that they match. Certainly > the dates are very different: > > [gthomas@hermes 8358]$ ls -l fsl_qe_ucode QERAMPKG > fsl_qe_ucode: > total 16 > -rw-rw-r-- 1 gthomas gthomas 5940 2007-12-10 14:39 > fsl_qe_ucode_uart_8360_21.bin > -rw-r--r-- 1 gthomas gthomas 7892 2007-11-30 10:14 license.txt > > QERAMPKG: > total 972 > -rw-rw-r-- 1 gthomas gthomas 132915 2009-04-07 14:04 > SlowProtocols_8323rev11.c > -rw-rw-r-- 1 gthomas gthomas 455446 2009-09-16 15:44 > Soft_UART_Microcode_Rel_0_1_2.pdf > -rw-rw-r-- 1 gthomas gthomas 29379 2009-09-16 15:49 > Soft_UART_mpc8360_r2.0.h > -rw-rw-r-- 1 gthomas gthomas 29379 2009-09-16 15:14 > Soft_UART_mpc8360_r2.1.h > -rw-rw-r-- 1 gthomas gthomas 29379 2009-09-16 15:14 > Soft_UART_mpc8568_r1.1.h > -rw-rw-r-- 1 gthomas gthomas 105457 2009-09-16 16:00 SWUART_8360rev20.c > -rw-rw-r-- 1 gthomas gthomas 34689 2009-09-16 15:32 SWUART_8360rev20.srx > -rw-rw-r-- 1 gthomas gthomas 105318 2009-09-16 15:59 SWUART_8360rev21.c > -rw-rw-r-- 1 gthomas gthomas 34689 2009-09-16 15:14 SWUART_8360rev21.srx > > Any ideas what I'm doing wrong? BTW, I tried converting the Soft_UART_mpc8360_r2.1.h file to the firmware format. I had to fiddle with the conversion program a bit because the firmware has version 0.1.2, but I ended up with a new firmware file. Here's the change I made: $ diff -u make_qe_firmware.py* No change in behaviour :-( --- make_qe_firmware.py 2010-06-24 07:19:31.000000000 -0600 +++ make_qe_firmware.py~ 2010-06-24 07:15:54.000000000 -0600 @@ -260,7 +260,7 @@ print "Unknown SOC model\n" exit(1) -if not ucode_major and not ucode_minor: +if not ucode_major: print "Unknown microcode version\n" exit(1)