From owner-freebsd-arm@FreeBSD.ORG Wed Oct 9 03:46:06 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9E5CAFFF; Wed, 9 Oct 2013 03:46:06 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-ie0-x22c.google.com (mail-ie0-x22c.google.com [IPv6:2607:f8b0:4001:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 514A82691; Wed, 9 Oct 2013 03:46:06 +0000 (UTC) Received: by mail-ie0-f172.google.com with SMTP id x13so601922ief.3 for ; Tue, 08 Oct 2013 20:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XtPZjy/1Kwi1+I8ftpQBlTONEY+W3VhrfZUhref5kuQ=; b=FFBMfBWMWGvwMn2N9AI8c0husmATBnDS/SBcR7X13cddLZayBKLCHvS6JO77VZZbQg yZ4T5p68EirtdDmLOIudABIAyEpugh43Fu+qXGZjAbt/VPhJNCiAyJEXeDoPJEU/ruHt wiTwp+8VhV/wk/eQVQm+EvU+BZ1OunJOHvhuy0IvgcUxTLYTiY3FtrFMN3laXQLw+7Zp kMdjRg7lng2WRouuhNbsID82+oAR+OQEA8vJEan7DAR8GUaxpwXntQJX9gD3wFc8Pef1 P2yJdNfxyeK1VRrh5kEEOdLp40vedc08Oi3V2FAn/CN9iyhAsc2fvhW6G66tfpsOVLWQ gLVQ== MIME-Version: 1.0 X-Received: by 10.50.147.65 with SMTP id ti1mr690562igb.12.1381290365554; Tue, 08 Oct 2013 20:46:05 -0700 (PDT) Received: by 10.64.18.14 with HTTP; Tue, 8 Oct 2013 20:46:05 -0700 (PDT) In-Reply-To: References: Date: Wed, 9 Oct 2013 11:46:05 +0800 Message-ID: Subject: Re: Changes to UART ns8250 From: Ganbold Tsagaankhuu To: Zbigniew Bodek Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-arm@freebsd.org" , freebsd-current@freebsd.org, freebsd-embedded@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Oct 2013 03:46:06 -0000 On Tue, Oct 8, 2013 at 9:58 AM, Ganbold Tsagaankhuu wrote: > Zbigniew, > > > On Tue, Oct 8, 2013 at 3:54 AM, Zbigniew Bodek wrote: > >> Hello. >> >> I would like to present a patch for ns8250 serial that I would like to >> commit in the near future (if there are no objections). >> >> The patch is fixing newest DesignWare UART with busy detection. >> During frequency divisors configuration when UART is busy transferring or >> receiving data, line control register manipulation will not take effect. >> Therefore, we will not set divisor latch access bit and we will corrupt >> LCR >> instead of configuring divisors. >> It is necessary to wait until UART finishes all transfers to proceed with >> the configuration. >> >> This was detected on Armada XP as UART fails on this issue 100/100 >> attempts. >> The patch was tested by kevlo@ and me and it works on our Armada XP - >> based >> systems. >> >> Please send your comment or remarks if there are any. >> > > I'm trying your patch on r254983. > Tried on 2 boards (Cubieboard2 (Allwinner A20 SoC - dual Cortex A7) and > Radxa Rock (Rockchip RK3188 - Quad Cortex A9)). Both seem to have some sort > of DesignWare uart. > > 1. It works fine on Cubieboard2. Uart dmesg is like: > > uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 33 on simplebus0 > > uart0: console (115200,n,8,1) > > 2. No any printing on screen in case of Radxa Rock. Without your patch > uart dmesg is like: > > uart0: <16650 or compatible> mem 0x20064000-0x200643ff irq 68 on > simplebus0 > uart0: console (115200,n,8,1) > > In case of RK3188 SoC, it seems booting FreeBSD kernel seems very fragile, > not sure yet what is causing the problem. > Even with stock ns8250 some version later than r254983 didn't show/print > anything on serial console few days ago. > Only thing so far I know is this r254983 (with some patch) works in my > case on RK3188 SoC based board. > Zbigniew, Just tried again your patch on RK30xx board. I was able to see boot messages on screen. This uart detected as: ... uart0: <16650 or compatible> mem 0x20064000-0x200643ff irq 68 on simplebus0 uart0: console (115200,n,8,1) uart0: fast interrupt ... Can you show me your uart detection log? It seems this DW uart of RK30xx is different than DW uart of A10/A20. Boot simply stops printing "start_init: trying /sbin/init". thanks, Ganbold > > thanks, > > Ganbold > > > > >> >> Best regards >> Zbigniew Bodek >> >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org >> " >> > >