1/*
2 *  This is a direct copy of the ev96100.h file, with a global
3 * search and replace.  The numbers are the same.
4 *
5 *  The reason I'm duplicating this is so that the 64120/96100
6 * defines won't be confusing in the source code.
7 */
8#ifndef _MIPS_EV64120_H
9#define _MIPS_EV64120_H
10
11#include <asm/addrspace.h>
12
13/*
14 *   GT64120 config space base address
15 */
16#define GT64120_BASE    (KSEG1ADDR(0x14000000))
17#define MIPS_GT_BASE    GT64120_BASE
18
19/*
20 *   PCI Bus allocation
21 */
22#define GT_PCI_MEM_BASE    0x12000000
23#define GT_PCI_MEM_SIZE    0x02000000
24#define GT_PCI_IO_BASE     0x10000000
25#define GT_PCI_IO_SIZE     0x02000000
26#define GT_ISA_IO_BASE     PCI_IO_BASE
27
28/*
29 *   Duart I/O ports.
30 */
31#define EV64120_COM1_BASE_ADDR  (0x1d000000 + 0x20)
32#define EV64120_COM2_BASE_ADDR  (0x1d000000 + 0x00)
33
34
35/*
36 *   EV64120 interrupt controller register base.
37 */
38#define EV64120_ICTRL_REGS_BASE   (KSEG1ADDR(0x1f000000))
39
40/*
41 *   EV64120 UART register base.
42 */
43#define EV64120_UART0_REGS_BASE    (KSEG1ADDR(EV64120_COM1_BASE_ADDR))
44#define EV64120_UART1_REGS_BASE    (KSEG1ADDR(EV64120_COM2_BASE_ADDR))
45#define EV64120_BASE_BAUD ( 3686400 / 16 )
46
47
48/*
49 * Because of an error/peculiarity in the Galileo chip, we need to swap the
50 * bytes when running bigendian.
51 */
52
53#define GT_WRITE(ofs, data)  \
54             *(volatile u32 *)(MIPS_GT_BASE+ofs) = cpu_to_le32(data)
55#define GT_READ(ofs, data)   \
56             *data = le32_to_cpu(*(volatile u32 *)(MIPS_GT_BASE+ofs))
57
58
59#endif /* !(_MIPS_EV64120_H) */
60