linux-mips
[Top] [All Lists]

Re: problem bring up initramfs and busybox

To: "Florian Fainelli" <florian@openwrt.org>
Subject: Re: problem bring up initramfs and busybox
From: myuboot@fastmail.fm
Date: Fri, 04 Dec 2009 18:18:29 -0600
Cc: "David VomLehn" <dvomlehn@cisco.com>, "Chris Dearman" <chris@mips.com>, "linux-mips" <linux-mips@linux-mips.org>
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:from:to:cc:mime-version:content-transfer-encoding:content-type:references:subject:in-reply-to:date; s=smtpout; bh=1AAkkxUWuwkBGwvzJVA+0drXT/I=; b=jENwqKROUpPXGe+PvLbzjso4uEApXbe/rUSd33z3clT5hAEPYBy2KZzwq19czVZCJfwEQpN0Yv+YqKw4j5SIq0/4azfe+BNUP7K4+yGp3w5A1z3hyizmMxs299IdvR9NZN9zCuUUI7z58oSL4Er/4DpnS9yo7SpObt6G4vi3mJo=
In-reply-to: <200911260945.59751.florian@openwrt.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1255735395.30097.1340523469@webmail.messagingengine.com> <20091118010351.GA21728@dvomlehn-lnx2.corp.sa.net> <1259195053.31777.1347090923@webmail.messagingengine.com> <200911260945.59751.florian@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
Finally, I figured out the problem. The main issue is in file irq.c, in
which the register starting at CHNL_OFFSET() is not set correctly in big
endian mode. With that problem, even though the serial port 8250 is
generating interrupt,  the interrupt controller blocks it.

In  big endian mode, the value written at line 
writel(i, REG(CHNL_OFFSET(i)));

should be 
writel(i << 24, REG(CHNL_OFFSET(i)));

I suspect this problem is applicable to AR7 running in big endian mode
since my board is almost the same to AR7. I am attaching a patch for
anyone's reference. Thanks to Florian, Kevin, Chris and Ralf for your
advise.

Best regards, Andrew



On Thu, 26 Nov 2009 09:45 +0100, "Florian Fainelli"
<florian@openwrt.org> wrote:
> Hi Andrew.
> 
> Le jeudi 26 novembre 2009 01:24:13, myuboot@fastmail.fm a écrit :
> > On Tue, 17 Nov 2009 20:03 -0500, "David VomLehn" <dvomlehn@cisco.com>
> > 
> > wrote:
> > > On Tue, Nov 17, 2009 at 06:58:35PM -0600, myuboot@fastmail.fm wrote:
> > > > On Wed, 18 Nov 2009 01:39 +0100, "Florian Fainelli"
> > > >
> > > > <florian@openwrt.org> wrote:
> > > > > -------------------------------
> > > >
> > > > Actually I already got this patch for the board in little endian mode,
> > > > and it is still there for the big endian mode. And this is one of the
> > > > place I have been wondering if that needs to be changed for big endian.
> > >
> > > It sounds like you've done a good job getting the bootloader and kernel
> > > to work, so this may be a silly suggestion, but are you sure your root
> > > filesystem and busybox are little-endian? It would be an easy mistake to
> > > make...
> > >
> > > > thanks. Andrew
> > >
> > > David VL
> > 
> > I have some clue on this issue now. It seems there is some problem with
> > the serial console operating in interrupt mode. If the 8250 is in
> > polling mode(set the IRQ for the 8250 serial port to 0), the output on
> > the console is fine. But with 8250 in interrupt mode, 8250 serial driver
> > does not receive any interrupt in serial8250_interrupt(). The same board
> > works just fine when operating in little endian mode with interruption.
> > I probably need to change something in IRQ initialization for big
> > endian. I will post my solution when I can get it to work. In the
> > meantime, any suggestion will be welcome.
> 
> Do you need that patch to work in little-endian: 
> https://dev.openwrt.org/browser/trunk/target/linux/ar7/patches-2.6.30/500-
> serial_kludge.patch ? If so, you are likely to need it in big-endian too
> since 
> it works around a silicon issue.
> -- 
> Best regards, Florian Fainelli
> Email: florian@openwrt.org
> Web: http://openwrt.org
> IRC: [florian] on irc.freenode.net
> -------------------------------

Attachment: irq.patch
Description: Text Data

<Prev in Thread] Current Thread [Next in Thread>
  • Re: problem bring up initramfs and busybox, myuboot <=