1/* 2 * include/asm-ppc/platforms/spruce.h 3 * 4 * Definitions for IBM Spruce reference board support 5 * 6 * Authors: Matt Porter and Johnnie Peters 7 * mporter@mvista.com 8 * jpeters@mvista.com 9 * 10 * Copyright 2001 MontaVista Software Inc. 11 * 12 * This program is free software; you can redistribute it and/or modify it 13 * under the terms of the GNU General Public License as published by the 14 * Free Software Foundation; either version 2 of the License, or (at your 15 * option) any later version. 16 * 17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 20 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 24 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * You should have received a copy of the GNU General Public License along 29 * with this program; if not, write to the Free Software Foundation, Inc., 30 * 675 Mass Ave, Cambridge, MA 02139, USA. 31 */ 32 33#ifdef __KERNEL__ 34#ifndef __ASM_SPRUCE_H__ 35#define __ASM_SPRUCE_H__ 36 37#define SPRUCE_PCI_CONFIG_ADDR 0xfec00000 38#define SPRUCE_PCI_CONFIG_DATA 0xfec00004 39 40#define SPRUCE_PCI_PHY_IO_BASE 0xf8000000 41#define SPRUCE_PCI_IO_BASE SPRUCE_PCI_PHY_IO_BASE 42 43#define SPRUCE_PCI_SYS_MEM_BASE 0x00000000 44 45#define SPRUCE_PCI_LOWER_MEM 0x80000000 46#define SPRUCE_PCI_UPPER_MEM 0x9fffffff 47#define SPRUCE_PCI_LOWER_IO 0x00000000 48#define SPRUCE_PCI_UPPER_IO 0x03ffffff 49 50#define SPRUCE_ISA_IO_BASE SPRUCE_PCI_IO_BASE 51 52#define SPRUCE_MEM_SIZE 0x04000000 53#define SPRUCE_BUS_SPEED 66666667 54 55#define SPRUCE_NVRAM_BASE_ADDR 0xff800000 56#define SPRUCE_RTC_BASE_ADDR SPRUCE_NVRAM_BASE_ADDR 57 58#define KEYBOARD_IRQ 22 59#define AUX_IRQ 21 60 61unsigned char spruce_read_keyb_data(void); 62unsigned char spruce_read_keyb_status(void); 63 64#define kbd_read_input spruce_read_keyb_data 65#define kbd_read_status spruce_read_keyb_status 66#define kbd_write_output(val) *((unsigned char *)0xff810000) = (char)val 67#define kbd_write_command(val) *((unsigned char *)0xff810001) = (char)val 68 69/* 70 * Serial port defines 71 */ 72#define SPRUCE_FPGA_REG_A 0xff820000 73#define SPRUCE_UARTCLK_33M 0x02 74#define SPRUCE_UARTCLK_IS_33M(reg) (reg & SPRUCE_UARTCLK_33M) 75 76#define UART0_IO_BASE 0xff600300 77#define UART1_IO_BASE 0xff600400 78 79#define RS_TABLE_SIZE 2 80 81#define SPRUCE_BAUD_33M 33000000/64 82#define SPRUCE_BAUD_30M 30000000/64 83#define BASE_BAUD SPRUCE_BAUD_33M 84 85#define UART0_INT 3 86#define UART1_INT 4 87 88#define STD_UART_OP(num) \ 89 { 0, BASE_BAUD, 0, UART##num##_INT, \ 90 (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \ 91 iomem_base: UART##num##_IO_BASE, \ 92 io_type: SERIAL_IO_MEM}, 93 94#define SERIAL_PORT_DFNS \ 95 STD_UART_OP(0) \ 96 STD_UART_OP(1) 97 98#endif /* __ASM_SPRUCE_H__ */ 99#endif /* __KERNEL__ */ 100