From: <gerg@snapgear.com>
To: linux-m68k@vger.kernel.org, uclinux-dev@uclinux.org
Cc: Greg Ungerer <gerg@uclinux.org>
Subject: [PATCH 11/23] m68knommu: make 54xx UART platform addressing consistent
Date: Thu, 23 Feb 2012 14:34:43 +1000 [thread overview]
Message-ID: <1329971695-2203-12-git-send-email-gerg@snapgear.com> (raw)
In-Reply-To: <1329971695-2203-1-git-send-email-gerg@snapgear.com>
From: Greg Ungerer <gerg@uclinux.org>
If we make all UART addressing consistent across all ColdFire family members
then we will be able to remove the duplicated plaform data and use a single
setup for all.
So modify the ColdFire 54xx UART addressing so that:
. UARTs are numbered from 0 up
. base addresses are absolute (not relative to MBAR peripheral register)
. use a common name for IRQs used
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/include/asm/m54xxsim.h | 16 ++++++++++------
arch/m68k/platform/54xx/config.c | 16 ++++++++--------
2 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/arch/m68k/include/asm/m54xxsim.h b/arch/m68k/include/asm/m54xxsim.h
index 1ed8bfb..ae56b88 100644
--- a/arch/m68k/include/asm/m54xxsim.h
+++ b/arch/m68k/include/asm/m54xxsim.h
@@ -31,16 +31,20 @@
/*
* UART module.
*/
-#define MCFUART_BASE1 0x8600 /* Base address of UART1 */
-#define MCFUART_BASE2 0x8700 /* Base address of UART2 */
-#define MCFUART_BASE3 0x8800 /* Base address of UART3 */
-#define MCFUART_BASE4 0x8900 /* Base address of UART4 */
+#define MCFUART_BASE0 (MCF_MBAR + 0x8600) /* Base address UART0 */
+#define MCFUART_BASE1 (MCF_MBAR + 0x8700) /* Base address UART1 */
+#define MCFUART_BASE2 (MCF_MBAR + 0x8800) /* Base address UART2 */
+#define MCFUART_BASE3 (MCF_MBAR + 0x8900) /* Base address UART3 */
/*
* Define system peripheral IRQ usage.
*/
-#define MCF_IRQ_TIMER (64 + 54) /* Slice Timer 0 */
-#define MCF_IRQ_PROFILER (64 + 53) /* Slice Timer 1 */
+#define MCF_IRQ_TIMER (MCFINT_VECBASE + 54) /* Slice Timer 0 */
+#define MCF_IRQ_PROFILER (MCFINT_VECBASE + 53) /* Slice Timer 1 */
+#define MCF_IRQ_UART0 (MCFINT_VECBASE + 35)
+#define MCF_IRQ_UART1 (MCFINT_VECBASE + 34)
+#define MCF_IRQ_UART2 (MCFINT_VECBASE + 33)
+#define MCF_IRQ_UART3 (MCFINT_VECBASE + 32)
/*
* Generic GPIO support
diff --git a/arch/m68k/platform/54xx/config.c b/arch/m68k/platform/54xx/config.c
index ee04354..8a63283 100644
--- a/arch/m68k/platform/54xx/config.c
+++ b/arch/m68k/platform/54xx/config.c
@@ -29,20 +29,20 @@
static struct mcf_platform_uart m54xx_uart_platform[] = {
{
- .mapbase = MCF_MBAR + MCFUART_BASE1,
- .irq = 64 + 35,
+ .mapbase = MCFUART_BASE0,
+ .irq = MCF_IRQ_UART0,
},
{
- .mapbase = MCF_MBAR + MCFUART_BASE2,
- .irq = 64 + 34,
+ .mapbase = MCFUART_BASE1,
+ .irq = MCF_IRQ_UART1,
},
{
- .mapbase = MCF_MBAR + MCFUART_BASE3,
- .irq = 64 + 33,
+ .mapbase = MCFUART_BASE2,
+ .irq = MCF_IRQ_UART2,
},
{
- .mapbase = MCF_MBAR + MCFUART_BASE4,
- .irq = 64 + 32,
+ .mapbase = MCFUART_BASE3,
+ .irq = MCF_IRQ_UART3,
},
};
--
1.7.0.4
next prev parent reply other threads:[~2012-02-23 4:34 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 4:34 [PATCH 00/23] m68knommu: clean up and merge common ColdFire UART code gerg
2012-02-23 4:34 ` [PATCH 01/23] m68knommu: make 5206 UART platform addressing consistent gerg
2012-02-23 4:34 ` [PATCH 02/23] m68knommu: make 520x " gerg
2012-02-23 4:34 ` [PATCH 03/23] m68knommu: make 523x " gerg
2012-02-23 4:34 ` [PATCH 04/23] m68knommu: make 5249 " gerg
2012-02-23 4:34 ` [PATCH 05/23] m68knommu: make 5272 " gerg
2012-02-23 4:34 ` [PATCH 06/23] m68knommu: make 527x " gerg
2012-02-23 4:34 ` [PATCH 07/23] m68knommu: make 5307 " gerg
2012-02-23 4:34 ` [PATCH 08/23] m68knommu: make 528x " gerg
2012-02-23 4:34 ` [PATCH 09/23] m68knommu: make 532x " gerg
2012-02-23 4:34 ` [PATCH 10/23] m68knommu: make 5407 " gerg
2012-02-23 4:34 ` gerg [this message]
2012-02-23 4:34 ` [PATCH 12/23] m68knommu: simplify the 5206 UART setup code gerg
2012-02-23 4:34 ` [PATCH 13/23] m68knommu: simplify the 520x " gerg
2012-02-23 4:34 ` [PATCH 14/23] m68knommu: simplify the 5249 " gerg
2012-02-23 4:34 ` [PATCH 15/23] m68knommu: simplify the 5272 " gerg
2012-02-23 4:34 ` [PATCH 16/23] m68knommu: simplify the 527x " gerg
2012-02-23 4:34 ` [PATCH 17/23] m68knommu: simplify the 528x " gerg
2012-02-23 4:34 ` [PATCH 18/23] m68knommu: simplify the 5307 " gerg
2012-02-23 4:34 ` [PATCH 19/23] m68knommu: simplify the 532x " gerg
2012-02-23 4:34 ` [PATCH 20/23] m68knommu: simplify the 5407 " gerg
2012-02-23 4:34 ` [PATCH 21/23] m68knommu: simplify the 54xx " gerg
2012-02-23 4:34 ` [PATCH 22/23] m68knommu: merge common ColdFire UART platform " gerg
2012-02-23 4:34 ` [PATCH 23/23] m68knommu: merge common ColdFire UART IRQ setup gerg
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=1329971695-2203-12-git-send-email-gerg@snapgear.com \
--to=gerg@snapgear.com \
--cc=gerg@uclinux.org \
--cc=linux-m68k@vger.kernel.org \
--cc=uclinux-dev@uclinux.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