public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephan Linz <linz@li-pro.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] microblaze: usable uart16550 for big endian systems
Date: Thu, 24 Nov 2011 19:29:40 +0100	[thread overview]
Message-ID: <1322159381.3870.195.camel@keto> (raw)
In-Reply-To: <4ECD05EF.3020005@monstr.eu>

Am Mittwoch, den 23.11.2011, 15:40 +0100 schrieb Michal Simek: 
> Hi Stephan,
> 
> >> Stephan Linz wrote:
> >>> As a result of the commit 6833260 the uart16550 driver
> >>> is broken for Microblaze big endian systems, because of
> >>> the missing 3 byte offset. Other than as described, the
> >>> U-Boot BSP does not treat properly the 3 byte offset.
> >>>
> >>> However, with the new 32 bit access to ns16550 registers
> >>> we can enable correct register access for Microblaze big
> >>> and little endian systems in the same manner.
> >> The reason why I have applied that patch is that baseaddress generation
> >> was moved to u-boot BSP out of u-boot configs.
> >>
> >> --snip--
> > 
> >> Anyway you solution looks interesting and I will test it.
> > 
> > However since commit 79df120 we can use direct 32 bit access to 8 bit
> > NS16550 registers without gap generation in ns16550.h ... we need sane
> > in_*/out_* implementation.
> > 
> 
> I have look at it and tested on BE/LE. For 32bit accesses we need to implement
> in/out_le32 functions which we don't have right now

Hi Michal,

Oh yes, of course. There are no *_le32 operations, not yet.

> that's why please remove this macro
> from your patch.
> 
> Our BSP generates/ed +3 offset that's why I prefer to mask it in the same patch
> to be sure that baseaddr is correct and compatible with old versions.
> 
> Here is patch I have used. Please add that changes to v2 patch.

I'll do it this way. Give me a little time to change and test it.
Currently I am sill working on refactoring of the LL TEMAC driver. I
hope, the refactored driver than can merge in mainline ...


Thanks,
Stephan

> diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
> index b740a28..8085130 100644
> --- a/include/configs/microblaze-generic.h
> +++ b/include/configs/microblaze-generic.h
> @@ -55,10 +55,16 @@
>   #elif XILINX_UART16550_BASEADDR
>   # define CONFIG_SYS_NS16550            1
>   # define CONFIG_SYS_NS16550_SERIAL
> +
> +#if defined(__MICROBLAZEEL__)
>   # define CONFIG_SYS_NS16550_REG_SIZE   -4
> +#else
> +# define CONFIG_SYS_NS16550_REG_SIZE   4
> +#endif
> +
>   # define CONFIG_CONS_INDEX             1
>   # define CONFIG_SYS_NS16550_COM1 \
> -                       (XILINX_UART16550_BASEADDR + 0x1000)
> +                       ((XILINX_UART16550_BASEADDR & ~0xF) + 0x1000)
>   # define CONFIG_SYS_NS16550_CLK        XILINX_UART16550_CLOCK_HZ
>   # define CONFIG_BAUDRATE       115200
> 
> 
> 

-- 
Viele Gr??e,
Stephan Linz
______________________________________________________________________________
MB-Ref: http://www.li-pro.de/xilinx_mb:mbref:start
OpenDCC: http://www.li-pro.net/opendcc.phtml
PC/M: http://www.li-pro.net/pcm.phtml
Sourceforge: http://sourceforge.net/users/slz
Gitorious: https://gitorious.org/~slz

  reply	other threads:[~2011-11-24 18:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-19 12:03 [U-Boot] [PATCH] microblaze: usable uart16550 for big endian systems Stephan Linz
2011-11-21  7:21 ` Michal Simek
2011-11-21 18:18   ` Stephan Linz
2011-11-23 14:40     ` Michal Simek
2011-11-24 18:29       ` Stephan Linz [this message]
2011-11-24 19:13         ` Michal Simek
2011-11-24 20:30           ` Stephan Linz
2011-11-25 10:28             ` Michal Simek

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=1322159381.3870.195.camel@keto \
    --to=linz@li-pro.net \
    --cc=u-boot@lists.denx.de \
    /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