[Top] [All Lists]

Re: serial port 8250 messed up after coverting from little endian to big

Subject: Re: serial port 8250 messed up after coverting from little endian to big endian on kernel 2.6.31
From: Shmulik Ladkani <>
Date: Wed, 28 Oct 2009 10:35:51 +0200
Cc: "Florian Fainelli" <>,, "linux-mips" <>,
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=Lklh86wFZNHZnYXxZT5UQb4VrFOb2pavYSIEKm4dtcU=; b=cxV2EtQrhCOKXvSpO38lpwdLIK/+l4yJJALkC62PadGpL6UO/iIVHIPx7gcPH80PWm NUm36eTXK/N0b/yhNAFzfSivcKnaoaKxCdUxp8HLjBQFsPVd856KjGSMBorc2beRuTxX ysmyanFFCU+KAPTBJQSK/2Sws/tcCUfsxpYI0=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=waA70LkxkcQAnjDKZEexB7fdW0fn64BGDuAm1OALqd7q1ybc9Zz9x034kA1SLnBbFH 7Hs5DqrTLxlpFZcXtZ4ytluFcoje13zmU3D2w8pREmRGlcCi2RCY+J13GYwlMCLiQrXC nDaYiShDhSfNqsUjCoLqKP+W60pIa5u/hHiMw=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <>
On Tue, 27 Oct 2009 15:40:13 -0500 wrote:
> Thanks, Florian. I found the cause of the problem. My board is 32 bit
> based, so each serial port register is 32bit even only 8 bit is used. So
> when the board is switched endianess, I need to change the address
> offset to access the same registers.
> For example, original RHR register address is 0x8001000 with little
> endian mode. With big endian, I need to access it as 0x8001003.

I assume your uart_port's iotype is defined as UPIO_MEM32.
UPIO_MEM32 makes 8250 access serial registers using readl/writel (which might
be a problem for big-endian), while UPIO_MEM makes 8250 access the registers
using readb/writeb.
Maybe you should try UPIO_MEM (assuming hardware allows byte access).

Shmulik Ladkani         Jungo Ltd.

<Prev in Thread] Current Thread [Next in Thread>