From: myuboot@fastmail.fm
To: "Sergei Shtylyov" <sshtylyov@ru.mvista.com>,
"Shmulik Ladkani" <jungoshmulik@gmail.com>
Cc: "Florian Fainelli" <florian@openwrt.org>,
linux-kernel@vger.kernel.org,
"linux-mips" <linux-mips@linux-mips.org>,
shmulik@jungo.com
Subject: Re: serial port 8250 messed up after coverting from little endian to big endian on kernel 2.6.31
Date: Wed, 28 Oct 2009 14:36:15 -0500 [thread overview]
Message-ID: <1256758575.4093.1342456105@webmail.messagingengine.com> (raw)
In-Reply-To: <4AE82520.4090607@ru.mvista.com>
Sergei, Shmulik,
Thanks a lot for your suggestions. I was using UPIO_MEM since I was not
aware of the difference between UPIO_MEM and UPIO_MEM32.
I just tried UPIO_MEM32 without adding a offset of 3. But the result is
bad - after the kernel initializes the serial console, the console print
out messes up. The early printk is fine because the u-boot initialises
the serial port fine.
How I tried UPIO_MEM32 is in platform.c changing the iotype to
UPIO_MEM32 in the uart_port structure and passing the structure to
early_serial_setup. What I did is the same as in
arch/mips/ar7/platform.c.
In 8250.c I removed the offset I added to mem_serial_out and
mem_serial_in.
Did I miss anything? Thanks again for your help.
On Wed, 28 Oct 2009 14:04 +0300, "Sergei Shtylyov"
<sshtylyov@ru.mvista.com> wrote:
> Hello.
>
> Shmulik Ladkani 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.
> >
>
> He wouldn't have to add 3 to the register addresses then.
>
> > 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.
> >
>
> Both may be a problem for big endian.
>
> > Maybe you should try UPIO_MEM (assuming hardware allows byte access).
>
> Contrarywise, I think he now has UPIO_MEM and needs to try UPIO_MEM32.
>
> WBR, Sergei
>
>
next prev parent reply other threads:[~2009-10-28 19:36 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-16 23:23 2.6.31 kernel for mips compile failure - war.h:12:17: error: war.h: No such file or directory myuboot
2009-10-16 23:41 ` myuboot
2009-10-16 23:50 ` David Daney
2009-10-19 23:49 ` myuboot
2009-10-19 23:56 ` serial port 8250 messed up after coverting from little endian to big endian on kernel 2.6.31 myuboot
2009-10-20 6:17 ` Florian Fainelli
2009-10-20 15:52 ` myuboot
2009-10-27 20:40 ` myuboot
2009-10-28 8:35 ` Shmulik Ladkani
2009-10-28 11:04 ` Sergei Shtylyov
2009-10-28 19:36 ` myuboot [this message]
2009-10-29 8:26 ` Shmulik Ladkani
2009-11-02 23:54 ` myuboot
2009-12-04 1:52 ` PIR OFFSET for AR7 myuboot
2009-12-04 16:03 ` Thomas Bogendoerfer
2009-12-04 17:30 ` myuboot
2009-11-11 0:22 ` Kernel panic - not syncing: Attempted to kill init! myuboot
2009-11-11 7:45 ` Gaye Abdoulaye Walsimou
2009-11-11 15:48 ` myuboot
2009-11-17 0:21 ` problem bring up initramfs and busybox myuboot
2009-11-17 9:33 ` Ralf Baechle
2009-11-17 17:39 ` myuboot
2009-11-17 17:48 ` Florian Fainelli
2009-11-17 21:09 ` myuboot
2010-01-19 19:51 ` loadable kernel module link failure - endianness incompatible with that of the selected emulation myuboot
2010-01-19 23:47 ` David Daney
2010-01-20 16:10 ` myuboot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1256758575.4093.1342456105@webmail.messagingengine.com \
--to=myuboot@fastmail.fm \
--cc=florian@openwrt.org \
--cc=jungoshmulik@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=shmulik@jungo.com \
--cc=sshtylyov@ru.mvista.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox