From: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>
To: Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
Rob Landley <rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
Kevin Hilman <khilman-l0cyMroinI0@public.gmane.org>
Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org,
linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Heiko Schocher <hs-ynQEQJNshbs@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [PATCH 1/9] ARM: davinci: uncompress.h: bail out if uart not initialized
Date: Wed, 12 Sep 2012 22:05:24 +0530 [thread overview]
Message-ID: <1347467732-1332-2-git-send-email-nsekhar@ti.com> (raw)
In-Reply-To: <1347467732-1332-1-git-send-email-nsekhar-l0cyMroinI0@public.gmane.org>
Bail out of UART access functions in uncompress.h if the uart
port is not setup. This will happen when booting from DT since
machine type matching does not work in this case. This may also
happen if a correct machine type is not setup by bootloader.
Signed-off-by: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>
---
arch/arm/mach-davinci/include/mach/uncompress.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h
index 18cfd49..3a0ff90 100644
--- a/arch/arm/mach-davinci/include/mach/uncompress.h
+++ b/arch/arm/mach-davinci/include/mach/uncompress.h
@@ -32,6 +32,9 @@ u32 *uart;
/* PORT_16C550A, in polled non-fifo mode */
static void putc(char c)
{
+ if (!uart)
+ return;
+
while (!(uart[UART_LSR] & UART_LSR_THRE))
barrier();
uart[UART_TX] = c;
@@ -39,6 +42,9 @@ static void putc(char c)
static inline void flush(void)
{
+ if (!uart)
+ return;
+
while (!(uart[UART_LSR] & UART_LSR_THRE))
barrier();
}
--
1.7.10.1
next prev parent reply other threads:[~2012-09-12 16:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 16:35 [PATCH RESEND 0/9] ARM: davinci: DT boot support for DA850 Sekhar Nori
[not found] ` <1347467732-1332-1-git-send-email-nsekhar-l0cyMroinI0@public.gmane.org>
2012-09-12 16:35 ` Sekhar Nori [this message]
2012-09-12 16:35 ` [PATCH 2/9] ARM: davinci: serial: provide API to initialze UART clocks Sekhar Nori
2012-09-12 16:35 ` [PATCH 3/9] ARM: davinci: arrange kconfig selects in alphabetical order Sekhar Nori
2012-09-12 16:35 ` [PATCH 4/9] ARM: davinci: da850: add DT boot support Sekhar Nori
2012-09-12 16:35 ` [PATCH 5/9] ARM: davinci: da850: add SoC DT data Sekhar Nori
2012-09-12 16:35 ` [PATCH 6/9] ARM: davinci: da850 evm: add " Sekhar Nori
2012-09-12 16:35 ` [PATCH 7/9] ARM: davinci: add support for am1808 based EnBW CMC board Sekhar Nori
2012-09-12 16:35 ` [PATCH 8/9] ARM: davinci: da850: generate dtbs for da850 boards Sekhar Nori
2012-09-12 16:35 ` [PATCH 9/9] ARM: davinci: da8xx defconfig: enable DT config options Sekhar Nori
2012-10-23 12:36 ` [PATCH RESEND 0/9] ARM: davinci: DT boot support for DA850 Sekhar Nori
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=1347467732-1332-2-git-send-email-nsekhar@ti.com \
--to=nsekhar-l0cymroini0@public.gmane.org \
--cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=hs-ynQEQJNshbs@public.gmane.org \
--cc=khilman-l0cyMroinI0@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.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).