cleanup
[linux-2.4.21-pre4.git] / arch / ppc / platforms / ebony.h
1 /*
2  * arch/ppc/platforms/ebony.h
3  *
4  * Ebony board definitions
5  *
6  * Matt Porter <mporter@mvista.com>
7  *
8  * Copyright 2002 MontaVista Software Inc.
9  *
10  * This program is free software; you can redistribute  it and/or modify it
11  * under  the terms of  the GNU General Public License as published by the
12  * Free Software Foundation;  either version 2 of the  License, or (at your
13  * option) any later version.
14  *
15  *  05/07/02 - Armin
16  *  removed IIC_PORT_DFNS 
17  */
18
19 #ifdef __KERNEL__
20 #ifndef __ASM_EBONY_H__
21 #define __ASM_EBONY_H__
22
23 #include <linux/config.h>
24 #include <platforms/ibm440gp.h>
25
26 /* F/W TLB mapping used in bootloader glue to reset EMAC */
27 #define EBONY_EMAC0_MR0         0xE0000800
28
29 /* Macros to get at Ebony VPD info */
30 #define EBONY_VPD_BASE          0x00000001fffffe00
31 #define EBONY_VPD_SIZE          0x24
32 #define EBONY_NA0_OFFSET        0x0c
33 #define EBONY_NA1_OFFSET        0x18
34 #define EBONY_NA0_ADDR(base)    (base + EBONY_NA0_OFFSET)
35 #define EBONY_NA1_ADDR(base)    (base + EBONY_NA1_OFFSET)
36
37 /* Default clock rates for Rev. B and Rev. C silicon */
38 #define EBONY_440GP_RB_SYSCLK   33000000
39 #define EBONY_440GP_RC_SYSCLK   400000000
40
41 /* RTC/NVRAM location */
42 #define EBONY_RTC_ADDR          0x0000000148000000
43 #define EBONY_RTC_SIZE          0x2000
44
45 /* Flash */
46 #define EBONY_FPGA_ADDR         0x0000000148300000
47 #define EBONY_BOOT_SMALL_FLASH(x)       (x & 0x20)
48 #define EBONY_ONBRD_FLASH_EN(x)         (x & 0x02)
49 #define EBONY_FLASH_SEL(x)              (x & 0x01)
50 #define EBONY_SMALL_FLASH_LOW1  0x00000001ff800000
51 #define EBONY_SMALL_FLASH_LOW2  0x00000001ff880000
52 #define EBONY_SMALL_FLASH_HIGH1 0x00000001fff00000
53 #define EBONY_SMALL_FLASH_HIGH2 0x00000001fff80000
54 #define EBONY_SMALL_FLASH_SIZE  0x80000
55 #define EBONY_LARGE_FLASH_LOW   0x00000001ff800000
56 #define EBONY_LARGE_FLASH_HIGH  0x00000001ffc00000
57 #define EBONY_LARGE_FLASH_SIZE  0x400000
58
59 #define EBONY_SMALL_FLASH_BASE  0x00000001fff80000
60 #define EBONY_LARGE_FLASH_BASE  0x00000001ff800000
61
62 /*
63  * Serial port defines
64  */
65 #define RS_TABLE_SIZE   2
66
67 /* OpenBIOS defined UART mappings, used before early_serial_setup */
68 #define UART0_IO_BASE   (u8 *) 0xE0000200
69 #define UART1_IO_BASE   (u8 *) 0xE0000300
70
71 #define BASE_BAUD       33000000/3/16
72 #define UART0_INT       0
73 #define UART1_INT       1
74
75 #define STD_UART_OP(num)                                        \
76         { 0, BASE_BAUD, 0, UART##num##_INT,                     \
77                 (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST),        \
78                 iomem_base: UART##num##_IO_BASE,                \
79                 io_type: SERIAL_IO_MEM},
80
81 #define SERIAL_PORT_DFNS        \
82         STD_UART_OP(0)          \
83         STD_UART_OP(1)
84
85 /* USB keyboard support */
86 #define kbd_read_input()        0
87 #define kbd_read_status()       0
88 #define kbd_write_output(val)   {}
89 #define kbd_write_command(val)  {}
90
91 /* PCI support */
92 #define EBONY_PCI_LOWER_IO      0x00000000
93 #define EBONY_PCI_UPPER_IO      0x0000ffff
94 #define EBONY_PCI_LOWER_MEM     0x80000000
95 #define EBONY_PCI_UPPER_MEM     0xffffefff
96
97 #define EBONY_PCI_CFGREGS_BASE  0x000000020ec00000
98 #define EBONY_PCI_CFGA_PLB32    0x0ec00000
99 #define EBONY_PCI_CFGD_PLB32    0x0ec00004
100
101 #define EBONY_PCI_IO_BASE       0x0000000208000000
102 #define EBONY_PCI_IO_SIZE       0x00010000
103 #define EBONY_PCI_MEM_OFFSET    0x00000000
104
105 #endif                          /* __ASM_EBONY_H__ */
106 #endif                          /* __KERNEL__ */