From: linux@prisktech.co.nz (Tony Prisk)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm: vt8500: Fix build warning in uncompress.h [for 3.7]
Date: Mon, 08 Oct 2012 10:21:09 +1300 [thread overview]
Message-ID: <1349644869.19187.8.camel@gitbox> (raw)
In-Reply-To: <1349643405-27943-1-git-send-email-linux@prisktech.co.nz>
On Mon, 2012-10-08 at 09:56 +1300, Tony Prisk wrote:
> This removes a build-time warning in uncompress.h due to incorrectly
> cast values being passed to readb/writeb.
>
> Removed arm/io.h and readb/writeb. Read/write directly to the serial
> port with a volatile pointer.
>
> Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
> ---
> arch/arm/mach-vt8500/include/mach/uncompress.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-vt8500/include/mach/uncompress.h b/arch/arm/mach-vt8500/include/mach/uncompress.h
> index bb9e2d2..8c49d28 100644
> --- a/arch/arm/mach-vt8500/include/mach/uncompress.h
> +++ b/arch/arm/mach-vt8500/include/mach/uncompress.h
> @@ -15,15 +15,15 @@
> *
> */
>
> -#define UART0_PHYS 0xd8200000
> -#include <asm/io.h>
> +#define UART0_PHYS 0xf8200000
> +#define UART0_ADDR(x) *(volatile unsigned char *)(UART0_PHYS + x)
>
> static void putc(const char c)
> {
> - while (readb(UART0_PHYS + 0x1c) & 0x2)
> + while (UART0_ADDR(0x1c) & 0x2)
> /* Tx busy, wait and poll */;
>
> - writeb(c, UART0_PHYS);
> + UART0_ADDR(0) = c;
> }
>
> static void flush(void)
Blah - had a senior moment. Don't know why I changed the address because
I believe this is called before paging is set up so it should be the
actual physical address of the UART.
Regards
Tony P
prev parent reply other threads:[~2012-10-07 21:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-07 20:56 [PATCH v2] arm: vt8500: Fix build warning in uncompress.h [for 3.7] Tony Prisk
2012-10-07 21:21 ` Tony Prisk [this message]
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=1349644869.19187.8.camel@gitbox \
--to=linux@prisktech.co.nz \
--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).