From: daniel@caiaq.de (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pxa/zeus: Allow use of 8250-compatible UART in uncompress
Date: Thu, 10 Dec 2009 15:12:08 +0800 [thread overview]
Message-ID: <20091210071208.GL28375@buzzloop.caiaq.de> (raw)
In-Reply-To: <20091210073922.79f6e841@taxman.wild-wind.fr.eu.org>
On Thu, Dec 10, 2009 at 07:39:22AM +0100, Marc Zyngier wrote:
> Zeus console port is wired to a 8250-compatible device
> (pxa UARTs are reserved to other uses). This patch
> allows such a configuration in the uncompress sequence.
Was that tested for regressions with PXA UARTs?
I didn't, but ...
> diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h
> index 237734b..dc94a34 100644
> --- a/arch/arm/mach-pxa/include/mach/uncompress.h
> +++ b/arch/arm/mach-pxa/include/mach/uncompress.h
> @@ -13,17 +13,21 @@
> #include <mach/regs-uart.h>
> #include <asm/mach-types.h>
>
> -#define __REG(x) ((volatile unsigned long *)x)
> +#define __REG(x) ((volatile char *)x)
>
> -static volatile unsigned long *UART = FFUART;
> +static volatile char *UART = FFUART;
> +static int shift = 2;
> +static int is_pxa_uart = 1;
> +
> +#define UART_REG(x) UART[(x) << shift]
... with UART being char* now (and as UART_REG is just a macro) it will
only be 8 bits in width, and hence all logic that accesses bits beyond
that scope wil fail. Tricky casting might help here, but your
referencing that as an array, so the value will be &= 0xff.
Or did I overlook anything?
I'd say you'll need an inline function for that.
Daniel
next prev parent reply other threads:[~2009-12-10 7:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-10 6:39 [PATCH] pxa/zeus: Allow use of 8250-compatible UART in uncompress Marc Zyngier
2009-12-10 7:12 ` Daniel Mack [this message]
2009-12-10 8:09 ` Marc Zyngier
2009-12-10 8:19 ` Daniel Mack
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=20091210071208.GL28375@buzzloop.caiaq.de \
--to=daniel@caiaq.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).