[ARM] 3369/1: ep93xx: add core cirrus ep93xx support
Patch from Lennert Buytenhek
This patch adds support for the Cirrus ep93xx series of CPUs. The
ep93xx is an ARM920T based CPU with two VICs, PL010 based UARTs,
IrDA, MaverickCrunch floating point coprocessor, between 24 and 64
GPIOs, ethernet, OHCI USB and, depending on the model, pcmcia, raster
engine, graphics accelerator, IDE controller and a bunch of other
stuff.
This patch adds the core ep93xx support code, and support for the
Glomation GESBC-9312-sx and the Technologic Systems TS-72xx SBCs.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-21 01:10:13 +08:00
|
|
|
/*
|
2008-08-05 23:14:15 +08:00
|
|
|
* arch/arm/mach-ep93xx/include/mach/uncompress.h
|
[ARM] 3369/1: ep93xx: add core cirrus ep93xx support
Patch from Lennert Buytenhek
This patch adds support for the Cirrus ep93xx series of CPUs. The
ep93xx is an ARM920T based CPU with two VICs, PL010 based UARTs,
IrDA, MaverickCrunch floating point coprocessor, between 24 and 64
GPIOs, ethernet, OHCI USB and, depending on the model, pcmcia, raster
engine, graphics accelerator, IDE controller and a bunch of other
stuff.
This patch adds the core ep93xx support code, and support for the
Glomation GESBC-9312-sx and the Technologic Systems TS-72xx SBCs.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-21 01:10:13 +08:00
|
|
|
*
|
|
|
|
* Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or (at
|
|
|
|
* your option) any later version.
|
|
|
|
*/
|
|
|
|
|
2008-08-05 23:14:15 +08:00
|
|
|
#include <mach/ep93xx-regs.h>
|
[ARM] 3369/1: ep93xx: add core cirrus ep93xx support
Patch from Lennert Buytenhek
This patch adds support for the Cirrus ep93xx series of CPUs. The
ep93xx is an ARM920T based CPU with two VICs, PL010 based UARTs,
IrDA, MaverickCrunch floating point coprocessor, between 24 and 64
GPIOs, ethernet, OHCI USB and, depending on the model, pcmcia, raster
engine, graphics accelerator, IDE controller and a bunch of other
stuff.
This patch adds the core ep93xx support code, and support for the
Glomation GESBC-9312-sx and the Technologic Systems TS-72xx SBCs.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-21 01:10:13 +08:00
|
|
|
|
|
|
|
static unsigned char __raw_readb(unsigned int ptr)
|
|
|
|
{
|
|
|
|
return *((volatile unsigned char *)ptr);
|
|
|
|
}
|
|
|
|
|
2006-03-27 04:40:27 +08:00
|
|
|
static unsigned int __raw_readl(unsigned int ptr)
|
|
|
|
{
|
|
|
|
return *((volatile unsigned int *)ptr);
|
|
|
|
}
|
|
|
|
|
[ARM] 3369/1: ep93xx: add core cirrus ep93xx support
Patch from Lennert Buytenhek
This patch adds support for the Cirrus ep93xx series of CPUs. The
ep93xx is an ARM920T based CPU with two VICs, PL010 based UARTs,
IrDA, MaverickCrunch floating point coprocessor, between 24 and 64
GPIOs, ethernet, OHCI USB and, depending on the model, pcmcia, raster
engine, graphics accelerator, IDE controller and a bunch of other
stuff.
This patch adds the core ep93xx support code, and support for the
Glomation GESBC-9312-sx and the Technologic Systems TS-72xx SBCs.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-21 01:10:13 +08:00
|
|
|
static void __raw_writeb(unsigned char value, unsigned int ptr)
|
|
|
|
{
|
|
|
|
*((volatile unsigned char *)ptr) = value;
|
|
|
|
}
|
|
|
|
|
2006-03-27 04:40:27 +08:00
|
|
|
static void __raw_writel(unsigned int value, unsigned int ptr)
|
|
|
|
{
|
|
|
|
*((volatile unsigned int *)ptr) = value;
|
|
|
|
}
|
|
|
|
|
2013-07-27 01:28:27 +08:00
|
|
|
#define PHYS_UART_DATA (CONFIG_DEBUG_UART_PHYS + 0x00)
|
|
|
|
#define PHYS_UART_FLAG (CONFIG_DEBUG_UART_PHYS + 0x18)
|
2008-10-03 00:13:02 +08:00
|
|
|
#define UART_FLAG_TXFF 0x20
|
[ARM] 3369/1: ep93xx: add core cirrus ep93xx support
Patch from Lennert Buytenhek
This patch adds support for the Cirrus ep93xx series of CPUs. The
ep93xx is an ARM920T based CPU with two VICs, PL010 based UARTs,
IrDA, MaverickCrunch floating point coprocessor, between 24 and 64
GPIOs, ethernet, OHCI USB and, depending on the model, pcmcia, raster
engine, graphics accelerator, IDE controller and a bunch of other
stuff.
This patch adds the core ep93xx support code, and support for the
Glomation GESBC-9312-sx and the Technologic Systems TS-72xx SBCs.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-21 01:10:13 +08:00
|
|
|
|
2006-03-28 17:24:33 +08:00
|
|
|
static inline void putc(int c)
|
[ARM] 3369/1: ep93xx: add core cirrus ep93xx support
Patch from Lennert Buytenhek
This patch adds support for the Cirrus ep93xx series of CPUs. The
ep93xx is an ARM920T based CPU with two VICs, PL010 based UARTs,
IrDA, MaverickCrunch floating point coprocessor, between 24 and 64
GPIOs, ethernet, OHCI USB and, depending on the model, pcmcia, raster
engine, graphics accelerator, IDE controller and a bunch of other
stuff.
This patch adds the core ep93xx support code, and support for the
Glomation GESBC-9312-sx and the Technologic Systems TS-72xx SBCs.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-21 01:10:13 +08:00
|
|
|
{
|
2013-03-16 08:16:52 +08:00
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < 10000; i++) {
|
|
|
|
/* Transmit fifo not full? */
|
|
|
|
if (!(__raw_readb(PHYS_UART_FLAG) & UART_FLAG_TXFF))
|
|
|
|
break;
|
|
|
|
}
|
[ARM] 3369/1: ep93xx: add core cirrus ep93xx support
Patch from Lennert Buytenhek
This patch adds support for the Cirrus ep93xx series of CPUs. The
ep93xx is an ARM920T based CPU with two VICs, PL010 based UARTs,
IrDA, MaverickCrunch floating point coprocessor, between 24 and 64
GPIOs, ethernet, OHCI USB and, depending on the model, pcmcia, raster
engine, graphics accelerator, IDE controller and a bunch of other
stuff.
This patch adds the core ep93xx support code, and support for the
Glomation GESBC-9312-sx and the Technologic Systems TS-72xx SBCs.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-21 01:10:13 +08:00
|
|
|
|
2008-10-03 00:13:02 +08:00
|
|
|
__raw_writeb(c, PHYS_UART_DATA);
|
[ARM] 3369/1: ep93xx: add core cirrus ep93xx support
Patch from Lennert Buytenhek
This patch adds support for the Cirrus ep93xx series of CPUs. The
ep93xx is an ARM920T based CPU with two VICs, PL010 based UARTs,
IrDA, MaverickCrunch floating point coprocessor, between 24 and 64
GPIOs, ethernet, OHCI USB and, depending on the model, pcmcia, raster
engine, graphics accelerator, IDE controller and a bunch of other
stuff.
This patch adds the core ep93xx support code, and support for the
Glomation GESBC-9312-sx and the Technologic Systems TS-72xx SBCs.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-21 01:10:13 +08:00
|
|
|
}
|
|
|
|
|
2006-03-28 17:24:33 +08:00
|
|
|
static inline void flush(void)
|
[ARM] 3369/1: ep93xx: add core cirrus ep93xx support
Patch from Lennert Buytenhek
This patch adds support for the Cirrus ep93xx series of CPUs. The
ep93xx is an ARM920T based CPU with two VICs, PL010 based UARTs,
IrDA, MaverickCrunch floating point coprocessor, between 24 and 64
GPIOs, ethernet, OHCI USB and, depending on the model, pcmcia, raster
engine, graphics accelerator, IDE controller and a bunch of other
stuff.
This patch adds the core ep93xx support code, and support for the
Glomation GESBC-9312-sx and the Technologic Systems TS-72xx SBCs.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-21 01:10:13 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2006-03-27 04:40:27 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Some bootloaders don't turn off DMA from the ethernet MAC before
|
|
|
|
* jumping to linux, which means that we might end up with bits of RX
|
|
|
|
* status and packet data scribbled over the uncompressed kernel image.
|
|
|
|
* Work around this by resetting the ethernet MAC before we uncompress.
|
|
|
|
*/
|
|
|
|
#define PHYS_ETH_SELF_CTL 0x80010020
|
|
|
|
#define ETH_SELF_CTL_RESET 0x00000001
|
|
|
|
|
|
|
|
static void ethernet_reset(void)
|
|
|
|
{
|
|
|
|
unsigned int v;
|
|
|
|
|
|
|
|
/* Reset the ethernet MAC. */
|
|
|
|
v = __raw_readl(PHYS_ETH_SELF_CTL);
|
|
|
|
__raw_writel(v | ETH_SELF_CTL_RESET, PHYS_ETH_SELF_CTL);
|
|
|
|
|
|
|
|
/* Wait for reset to finish. */
|
|
|
|
while (__raw_readl(PHYS_ETH_SELF_CTL) & ETH_SELF_CTL_RESET)
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void arch_decomp_setup(void)
|
|
|
|
{
|
|
|
|
ethernet_reset();
|
|
|
|
}
|