This patch inludes the architecture support headers. And also a boot time ID stub for the loader. diff -Naur linux-2.6.16/arch/arm/Kconfig linux-2.6.16.ks8695/arch/arm/Kconfig diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/debug-macro.S linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/debug-macro.S --- linux-2.6.16/include/asm-arm/arch-ks8695/debug-macro.S 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/debug-macro.S 2006-02-17 11:57:24.000000000 +1000 @@ -0,0 +1,37 @@ +/* + * linux/include/asm-arm/arch-ks8695/debug-macro.S + * + * Debugging macro include header + * + * Copyright (C) 1994-1999 Russell King + * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks + * (C) Copyright 2006 Greg Ungerer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +.macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + moveq \rx, #0x03000000 @ 0x03ffe000 + orreq \rx, \rx, #0x00ff0000 + movne \rx, #0xff000000 @ 0xff00e000 + orr \rx, \rx, #0x0000e000 +.endm + +.macro senduart,rd,rx + str \rd, [\rx, #0x4] +.endm + +.macro waituart,rd,rx +1: ldr \rd, [\rx, #0x14] + and \rd, \rd, #0x40 @ check TEMT bit + teq \rd, #0x40 + bne 1b +.endm + +.macro busyuart,rd,rx +.endm + diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/dma.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/dma.h --- linux-2.6.16/include/asm-arm/arch-ks8695/dma.h 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/dma.h 2006-02-20 13:39:13.000000000 +1000 @@ -0,0 +1,26 @@ +/* + * linux/include/asm-arm/arch-ks8695/dma.h + * + * Copyright (C) 1997,1998 Russell King + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __ASM_ARCH_DMA_H +#define __ASM_ARCH_DMA_H + +#define MAX_DMA_CHANNELS 0 +#define MAX_DMA_ADDRESS 0xffffffff + +#endif /* __ASM_ARCH_DMA_H */ diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/entry-macro.S linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/entry-macro.S --- linux-2.6.16/include/asm-arm/arch-ks8695/entry-macro.S 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/entry-macro.S 2006-02-20 10:39:00.000000000 +1000 @@ -0,0 +1,28 @@ +/* + * include/asm-arm/arch-ks8695/entry-macro.S + * + * Low-level IRQ helper macros for KS8695 based platforms + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +.macro disable_fiq +.endm + + +.macro get_irqnr_and_base, irqnr, irqstat, base, tmp + ldr \irqnr, =KS8695_IO_VIRT+KS8695_INT_MASK_STATUS + ldr \irqstat, [\irqnr] @ get masked status + + mov \irqnr, #0 +1001: tst \irqstat, #1 + bne 1002f + add \irqnr, \irqnr, #1 + mov \irqstat, \irqstat, lsr #1 + cmp \irqnr, #32 + bcc 1001b +1002: @ EQ will be set if we reach +.endm + diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/hardware.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/hardware.h --- linux-2.6.16/include/asm-arm/arch-ks8695/hardware.h 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/hardware.h 2006-03-15 00:22:13.000000000 +1000 @@ -0,0 +1,38 @@ +/* + * linux/include/asm-arm/arch-ks8695/hardware.h + * + * This file contains the hardware definitions of the KS8695. + * + * Copyright (C) 2002 Micrel Inc. + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __ASM_ARCH_HARDWARE_H +#define __ASM_ARCH_HARDWARE_H + +/* + * Virtual memory mapping of the KS8695 internal register area. + * This is a static mapping, set up early in kernel startup. + */ +#define KS8695_IO_VIRT 0xFF000000 +#define KS8695_REG(x) (KS8695_IO_VIRT + (x)) + +#define pcibios_assign_all_busses() 1 +#define PCIBIOS_MIN_IO 0x00000100 +#define PCIBIOS_MIN_MEM 0x00010000 +#define PCI_MEMORY_VADDR KS8695P_PCIBG_MEM_BASE +#define PCI_IO_VADDR KS8695P_PCIBG_IO_BASE + +#endif /* __ASM_ARCH_HARDWARE_H */ diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/io.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/io.h --- linux-2.6.16/include/asm-arm/arch-ks8695/io.h 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/io.h 2006-03-15 00:22:13.000000000 +1000 @@ -0,0 +1,31 @@ +/* + * linux/include/asm-arm/arch-ks8695/io.h + * + * Copyright (C) 1999 ARM Limited + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __ASM_ARCH_IO_H +#define __ASM_ARCH_IO_H + +#include + +#define IO_SPACE_LIMIT 0xffffffff + +#define __io(a) (a) +#define __mem_pci(a) ((unsigned long) (a)) +#define __mem_isa(a) ((unsigned long) (a)) + +#endif /* __ASM_ARCH_IO_H */ diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/irqs.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/irqs.h --- linux-2.6.16/include/asm-arm/arch-ks8695/irqs.h 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/irqs.h 2006-03-15 00:22:13.000000000 +1000 @@ -0,0 +1,98 @@ +/* + * linux/include/asm-arm/arch-ks8695/irqs.h + * + * Copyright (C) 1999 ARM Limited + * Copyright (C) 2000 Deep Blue Solutions Ltd. + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __ASM_ARCH_IRQS_H +#define __ASM_ARCH_IRQS_H 1 + +/* + * IRQ definitions + */ +#define KS8695_INT_EXT_INT0 2 +#define KS8695_INT_EXT_INT1 3 +#define KS8695_INT_EXT_INT2 4 +#define KS8695_INT_EXT_INT3 5 +#define KS8695_INT_TIMERINT0 6 +#define KS8695_INT_TIMERINT1 7 +#define KS8695_INT_UART_TX 8 +#define KS8695_INT_UART_RX 9 +#define KS8695_INT_UART_LINE_ERR 10 +#define KS8695_INT_UART_MODEMS 11 +#define KS8695_INT_LAN_STOP_RX 12 +#define KS8695_INT_LAN_STOP_TX 13 +#define KS8695_INT_LAN_BUF_RX_STATUS 14 +#define KS8695_INT_LAN_BUF_TX_STATUS 15 +#define KS8695_INT_LAN_RX_STATUS 16 +#define KS8695_INT_LAN_TX_STATUS 17 +#define KS8695_INT_HPAN_STOP_RX 18 +#define KS8695_INT_HPNA_STOP_TX 19 +#define KS8695_INT_HPNA_BUF_RX_STATUS 20 +#define KS8695_INT_HPNA_BUF_TX_STATUS 21 +#define KS8695_INT_HPNA_RX_STATUS 22 +#define KS8695_INT_HPNA_TX_STATUS 23 +#define KS8695_INT_BUS_ERROR 24 +#define KS8695_INT_WAN_STOP_RX 25 +#define KS8695_INT_WAN_STOP_TX 26 +#define KS8695_INT_WAN_BUF_RX_STATUS 27 +#define KS8695_INT_WAN_BUF_TX_STATUS 28 +#define KS8695_INT_WAN_RX_STATUS 29 +#define KS8695_INT_WAN_TX_STATUS 30 + +#define KS8695_INT_UART KS8695_INT_UART_TX + +/* + * IRQ bit masks + */ +#define KS8695_INTMASK_EXT_INT0 (1 << KS8695_INT_EXT_INT0) +#define KS8695_INTMASK_EXT_INT1 (1 << KS8695_INT_EXT_INT1) +#define KS8695_INTMASK_EXT_INT2 (1 << KS8695_INT_EXT_INT2) +#define KS8695_INTMASK_EXT_INT3 (1 << KS8695_INT_EXT_INT3) +#define KS8695_INTMASK_TIMERINT0 (1 << KS8695_INT_TIMERINT0) +#define KS8695_INTMASK_TIMERINT1 (1 << KS8695_INT_TIMERINT1) +#define KS8695_INTMASK_UART_TX (1 << KS8695_INT_UART_TX) +#define KS8695_INTMASK_UART_RX (1 << KS8695_INT_UART_RX) +#define KS8695_INTMASK_UART_LINE_ERR (1 << KS8695_INT_UART_LINE_ERR) +#define KS8695_INTMASK_UART_MODEMS (1 << KS8695_INT_UART_MODEMS) +#define KS8695_INTMASK_LAN_STOP_RX (1 << KS8695_INT_LAN_STOP_RX) +#define KS8695_INTMASK_LAN_STOP_TX (1 << KS8695_INT_LAN_STOP_TX) +#define KS8695_INTMASK_LAN_BUF_RX_STATUS (1 << KS8695_INT_LAN_BUF_RX_STATUS) +#define KS8695_INTMASK_LAN_BUF_TX_STATUS (1 << KS8695_INT_LAN_BUF_TX_STATUS) +#define KS8695_INTMASK_LAN_RX_STATUS (1 << KS8695_INT_LAN_RX_STATUS) +#define KS8695_INTMASK_LAN_TX_STATUS (1 << KS8695_INT_LAN_RX_STATUS) +#define KS8695_INTMASK_HPAN_STOP_RX (1 << KS8695_INT_HPAN_STOP_RX) +#define KS8695_INTMASK_HPNA_STOP_TX (1 << KS8695_INT_HPNA_STOP_TX) +#define KS8695_INTMASK_HPNA_BUF_RX_STATUS (1 << KS8695_INT_HPNA_BUF_RX_STATUS) +#define KS8695_INTMAKS_HPNA_BUF_TX_STATUS (1 << KS8695_INT_HPNA_BUF_TX_STATUS) +#define KS8695_INTMASK_HPNA_RX_STATUS (1 << KS8695_INT_HPNA_RX_STATUS) +#define KS8695_INTMASK_HPNA_TX_STATUS (1 << KS8695_INT_HPNA_TX_STATUS) +#define KS8695_INTMASK_BUS_ERROR (1 << KS8695_INT_BUS_ERROR) +#define KS8695_INTMASK_WAN_STOP_RX (1 << KS8695_INT_WAN_STOP_RX) +#define KS8695_INTMASK_WAN_STOP_TX (1 << KS8695_INT_WAN_STOP_TX) +#define KS8695_INTMASK_WAN_BUF_RX_STATUS (1 << KS8695_INT_WAN_BUF_RX_STATUS) +#define KS8695_INTMASK_WAN_BUF_TX_STATUS (1 << KS8695_INT_WAN_BUF_TX_STATUS) +#define KS8695_INTMASK_WAN_RX_STATUS (1 << KS8695_INT_WAN_RX_STATUS) +#define KS8695_INTMASK_WAN_TX_STATUS (1 << KS8695_INT_WAN_TX_STATUS) + +#define KS8695_SC_VALID_INT 0xFFFFFFFF + + +#define NR_IRQS (32) + +#endif /* __ASM_ARCH_IRQS_H */ diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/ks8695-pci.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/ks8695-pci.h --- linux-2.6.16/include/asm-arm/arch-ks8695/ks8695-pci.h 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/ks8695-pci.h 2006-03-22 22:51:21.000000000 +1000 @@ -0,0 +1,68 @@ +/* + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __ASM_ARCH_PLATFORM_PCI_H +#define __ASM_ARCH_PLATFORM_PCI_H 1 + +/* PCI memory related defines */ +#define KS8695P_PCIBG_MEM_BASE 0x60000000 /* memory base for bridge*/ +#define KS8695P_PCI_MEM_BASE 0x60000000UL/* memory base in PCI space */ +#define KS8695P_PCI_MEM_SIZE 0x20000000UL/* 512M, can be extended */ +#define KS8695P_PCI_MEM_MASK 0xE0000000 /* 512M */ + +/* PCI IO related defines */ +#define KS8695P_PCIBG_IO_BASE 0x10000000 /* io base for bridge */ +#define KS8695P_PCI_IO_BASE 0x10000000 +#define KS8695P_PCI_IO_SIZE 0x00010000 /* 64K */ +#define KS8695P_PCI_IO_MASK 0xFF800000 /* 64K range */ + +/* new registers specific to KS8695P */ +/* PCI related */ +#define KS8695_CRCFID 0x2000 +#define KS8695_CRCFCS 0x2004 +#define KS8695_CRCFRV 0x2008 +#define KS8695_CRCFLT 0x200c +#define KS8695_CRCBMA 0x2010 +#define KS8695_CRCBA0 0x2014 +#define KS8695_CRCSID 0x202c +#define KS8695_CRCFIT 0x203c + +/* bridge configuration related registers */ +#define KS8695_PBCA 0x2100 +#define KS8695_PBCD 0x2104 + +/* bridge mode related registers */ +#define KS8695_PBM 0x2200 +#define KS8695_PBCS 0x2204 +#define KS8695_PMBA 0x2208 +#define KS8695_PMBAC 0x220c +#define KS8695_PMBAM 0x2210 +#define KS8695_PMBAT 0x2214 +#define KS8695_PIOBA 0x2218 +#define KS8695_PIOBAC 0x221c +#define KS8695_PIOBAM 0x2220 +#define KS8695_PIOBAT 0x2224 + +/* bits for registers */ +/* 0x2200 */ +#define PBM_BRIDGE_MODE 0x80000000 + +/* 0x2204 */ +#define PBCS_SW_RESET 0x80000000 + +/* 0x220c */ +#define PMBAC_TRANS_ENABLE 0x80000000 + +#endif /* __ASM_ARCH_PLATFORM_PCI_H */ diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/ks8695-regs.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/ks8695-regs.h --- linux-2.6.16/include/asm-arm/arch-ks8695/ks8695-regs.h 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/ks8695-regs.h 2006-03-22 22:51:21.000000000 +1000 @@ -0,0 +1,341 @@ +/* + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __ASM_ARCH_KS8695_REGS_H +#define __ASM_ARCH_KS8695_REGS_H 1 + +/* Physical IO address space of KS8695 internal peripheral registers */ +#define KS8695_IO_BASE 0x03FF0000 +#define KS8695_IO_SIZE 0x00010000 + +#define KS8695_SYSTEN_CONFIG 0x00 +#define KS8695_SYSTEN_BUS_CLOCK 0x04 + +/* bus clock definitions*/ +#define KS8695_BUS_CLOCK_125MHZ 0x0 +#define KS8695_BUS_CLOCK_100MHZ 0x1 +#define KS8695_BUS_CLOCK_62MHZ 0x2 +#define KS8695_BUS_CLOCK_50MHZ 0x3 +#define KS8695_BUS_CLOCK_41MHZ 0x4 +#define KS8695_BUS_CLOCK_33MHZ 0x5 +#define KS8695_BUS_CLOCK_31MHZ 0x6 +#define KS8695_BUS_CLOCK_25MHZ 0x7 + +/* i/o control registers offset difinitions */ +#define KS8695_IO_CTRL0 0x4000 +#define KS8695_IO_CTRL1 0x4004 +#define KS8695_IO_CTRL2 0x4008 +#define KS8695_IO_CTRL3 0x400C + +/* memory control registers offset difinitions */ +#define KS8695_MEM_CTRL0 0x4010 +#define KS8695_MEM_CTRL1 0x4014 +#define KS8695_MEM_CTRL2 0x4018 +#define KS8695_MEM_CTRL3 0x401C +#define KS8695_MEM_GENERAL 0x4020 +#define KS8695_SDRAM_CTRL0 0x4030 +#define KS8695_SDRAM_CTRL1 0x4034 +#define KS8695_SDRAM_GENERAL 0x4038 +#define KS8695_SDRAM_BUFFER 0x403C +#define KS8695_SDRAM_REFRESH 0x4040 + +/* WAN control registers offset difinitions */ +#define KS8695_WAN_DMA_TX 0x6000 +#define KS8695_WAN_DMA_RX 0x6004 +#define KS8695_WAN_DMA_TX_START 0x6008 +#define KS8695_WAN_DMA_RX_START 0x600C +#define KS8695_WAN_TX_LIST 0x6010 +#define KS8695_WAN_RX_LIST 0x6014 +#define KS8695_WAN_MAC_LOW 0x6018 +#define KS8695_WAN_MAC_HIGH 0x601C +#define KS8695_WAN_MAC_ELOW 0x6080 +#define KS8695_WAN_MAC_EHIGH 0x6084 + +/* LAN control registers offset difinitions */ +#define KS8695_LAN_DMA_TX 0x8000 +#define KS8695_LAN_DMA_RX 0x8004 +#define KS8695_LAN_DMA_TX_START 0x8008 +#define KS8695_LAN_DMA_RX_START 0x800C +#define KS8695_LAN_TX_LIST 0x8010 +#define KS8695_LAN_RX_LIST 0x8014 +#define KS8695_LAN_MAC_LOW 0x8018 +#define KS8695_LAN_MAC_HIGH 0x801C +#define KS8695_LAN_MAC_ELOW 0X8080 +#define KS8695_LAN_MAC_EHIGH 0X8084 + +/* HPNA control registers offset difinitions */ +#define KS8695_HPNA_DMA_TX 0xA000 +#define KS8695_HPNA_DMA_RX 0xA004 +#define KS8695_HPNA_DMA_TX_START 0xA008 +#define KS8695_HPNA_DMA_RX_START 0xA00C +#define KS8695_HPNA_TX_LIST 0xA010 +#define KS8695_HPNA_RX_LIST 0xA014 +#define KS8695_HPNA_MAC_LOW 0xA018 +#define KS8695_HPNA_MAC_HIGH 0xA01C +#define KS8695_HPNA_MAC_ELOW 0xA080 +#define KS8695_HPNA_MAC_EHIGH 0xA084 + +/* UART control registers offset difinitions */ +#define KS8695_UART_RX_BUFFER 0xE000 +#define KS8695_UART_TX_HOLDING 0xE004 + +#define KS8695_UART_FIFO_CTRL 0xE008 +#define KS8695_UART_FIFO_TRIG01 0x00 +#define KS8695_UART_FIFO_TRIG04 0x80 +#define KS8695_UART_FIFO_TXRST 0x03 +#define KS8695_UART_FIFO_RXRST 0x02 +#define KS8695_UART_FIFO_FEN 0x01 + +#define KS8695_UART_LINE_CTRL 0xE00C +#define KS8695_UART_LINEC_BRK 0x40 +#define KS8695_UART_LINEC_EPS 0x10 +#define KS8695_UART_LINEC_PEN 0x08 +#define KS8695_UART_LINEC_STP2 0x04 +#define KS8695_UART_LINEC_WLEN8 0x03 +#define KS8695_UART_LINEC_WLEN7 0x02 +#define KS8695_UART_LINEC_WLEN6 0x01 +#define KS8695_UART_LINEC_WLEN5 0x00 + +#define KS8695_UART_MODEM_CTRL 0xE010 +#define KS8695_UART_MODEMC_RTS 0x02 +#define KS8695_UART_MODEMC_DTR 0x01 + +#define KS8695_UART_LINE_STATUS 0xE014 +#define KS8695_UART_LINES_TXFE 0x20 +#define KS8695_UART_LINES_BE 0x10 +#define KS8695_UART_LINES_FE 0x08 +#define KS8695_UART_LINES_PE 0x04 +#define KS8695_UART_LINES_OE 0x02 +#define KS8695_UART_LINES_RXFE 0x01 +#define KS8695_UART_LINES_ANY (KS8695_UART_LINES_OE | \ + KS8695_UART_LINES_BE | \ + KS8695_UART_LINES_PE | \ + KS8695_UART_LINES_FE) + +#define KS8695_UART_MODEM_STATUS 0xE018 +#define KS8695_UART_MODEM_DCD 0x80 +#define KS8695_UART_MODEM_DSR 0x20 +#define KS8695_UART_MODEM_CTS 0x10 +#define KS8695_UART_MODEM_DDCD 0x08 +#define KS8695_UART_MODEM_DDSR 0x02 +#define KS8695_UART_MODEM_DCTS 0x01 +#define KS8695_UART_MODEM_ANY 0xFF + +#define KS8695_UART_DIVISOR 0xE01C +#define KS8695_UART_STATUS 0xE020 + +/* Interrupt controlller registers offset difinitions */ +#define KS8695_INT_CONTL 0xE200 +#define KS8695_INT_ENABLE 0xE204 +#define KS8695_INT_ENABLE_MODEM 0x0800 +#define KS8695_INT_ENABLE_ERR 0x0400 +#define KS8695_INT_ENABLE_RX 0x0200 +#define KS8695_INT_ENABLE_TX 0x0100 +#define KS8695_INT_UART_MASK 0x0f00 + +#define KS8695_INT_STATUS 0xE208 +#define KS8695_INT_WAN_PRIORITY 0xE20C +#define KS8695_INT_HPNA_PRIORITY 0xE210 +#define KS8695_INT_LAN_PRIORITY 0xE214 +#define KS8695_INT_TIMER_PRIORITY 0xE218 +#define KS8695_INT_UART_PRIORITY 0xE21C +#define KS8695_INT_EXT_PRIORITY 0xE220 +#define KS8695_INT_CHAN_PRIORITY 0xE224 +#define KS8695_INT_BUSERROR_PRO 0xE228 +#define KS8695_INT_MASK_STATUS 0xE22C +#define KS8695_FIQ_PEND_PRIORITY 0xE230 +#define KS8695_IRQ_PEND_PRIORITY 0xE234 + +/* timer registers offset difinitions */ +#define KS8695_TIMER_CTRL 0xE400 +#define KS8695_TIMER1 0xE404 +#define KS8695_TIMER0 0xE408 +#define KS8695_TIMER1_PCOUNT 0xE40C +#define KS8695_TIMER0_PCOUNT 0xE410 + +/* GPIO registers offset difinitions */ +#define KS8695_GPIO_MODE 0xE600 +#define KS8695_GPIO_CTRL 0xE604 +#define KS8695_GPIO_DATA 0xE608 + +/* SWITCH registers offset difinitions */ +#define KS8695_SWITCH_CTRL0 0xE800 +#define KS8695_SWITCH_CTRL1 0xE804 +#define KS8695_SWITCH_PORT1 0xE808 +#define KS8695_SWITCH_PORT2 0xE80C +#define KS8695_SWITCH_PORT3 0xE810 +#define KS8695_SWITCH_PORT4 0xE814 +#define KS8695_SWITCH_PORT5 0xE818 +#define KS8695_SWITCH_LUE_CTRL 0xE824 +#define KS8695_SWITCH_LUE_HIGH 0xE828 +#define KS8695_SWITCH_LUE_LOW 0xE82C + +/* some differences between the KS8695(X) and KS8695P */ +#ifdef CONFIG_PCI +#define KS8695_SWITCH_AUTO0 0xE848 +#define KS8695_SWITCH_AUTO1 0xE84C +#define KS8695_SWITCH_ADVANCED 0xE860 +#define KS8695_DSCP_HIGH 0xE864 +#define KS8695_DSCP_LOW 0xE868 +#define KS8695_SWITCH_MAC_HIGH 0xE86C +#define KS8695_SWITCH_MAC_LOW 0xE870 +#define KS8695_LAN12_POWERMAGR 0xE874 +#define KS8695_LAN34_POWERMAGR 0xE878 +#else +#define KS8695_SWITCH_AUTO0 0xE81C +#define KS8695_SWITCH_AUTO1 0xE820 +#define KS8695_SWITCH_ADVANCED 0xE830 +#define KS8695_DSCP_HIGH 0xE834 +#define KS8695_DSCP_LOW 0xE838 +#define KS8695_SWITCH_MAC_HIGH 0xE83C +#define KS8695_SWITCH_MAC_LOW 0xE840 +#define KS8695_LAN12_POWERMAGR 0xE84C +#define KS8695_LAN34_POWERMAGR 0xE850 +#endif + +/* miscellaneours registers difinitions */ +#define KS8695_MANAGE_COUNTER 0xE844 +#define KS8695_MANAGE_DATA 0xE848 + +#define KS8695_DEVICE_ID 0xEA00 +#define KS8695_REVISION_ID 0xEA04 + +#define KS8695_MISC_CONTROL 0xEA08 +#define KS8695_WAN_CONTROL 0xEA0C +#define KS8695_WAN_POWERMAGR 0xEA10 +#define KS8695_WAN_PHY_CONTROL 0xEA14 +#define KS8695_WAN_PHY_STATUS 0xEA18 + + +/* + * The following are all new in the KS8695P. + */ +#ifdef CONFIG_PCI + +/* most bit definition are same as KS8695, except few new bits */ +#define KS8695_SEC0 0xE800 +#define KS8695_SEC1 0xE804 + +/* new bits */ +#define KS8695_SEC0_BACKOFF_EN 0x80000000 +#define KS8695_SEC0_FRAME_LEN_CHECK 0x00020000 +#define KS8695_SEC0_DMA_HALF_DUPLEX 0x00000010 + +/* new bits */ +#define KS8695_SEC1_NO_IEEE_AN 0x00000800 +#define KS8695_SEC1_TPID_MODE 0x00000400 +#define KS8695_SEC1_NO_TX_8021X_FLOW_CTRL 0x00000080 +#define KS8695_SEC1_NO_RX_8021X_FLOW_CTRL 0x00000040 +#define KS8695_SEC1_HUGE_PACKET 0x00000020 +#define KS8695_SEC1_8021Q_VLAN_EN 0x00000010 +#define KS8695_SEC1_MII_10BT 0x00000002 +#define KS8695_SEC1_NULL_VID 0x00000001 + +/* Port 1-4 and 5 Configuration Register Set 1 */ +#define KS8695_SEP1C1 0xE80C +#define KS8695_SEP2C1 0xE818 +#define KS8695_SEP3C1 0xE824 +#define KS8695_SEP4C1 0xE830 +#define KS8695_SEP5C1 0xE83C + +/* Port 1-4 and 5 Configuration Register Set 2 */ +#define KS8695_SEP1C2 0xE810 +#define KS8695_SEP2C2 0xE81C +#define KS8695_SEP3C2 0xE828 +#define KS8695_SEP4C2 0xE834 +#define KS8695_SEP5C2 0xE840 + +#define KS8695_SEPC2_VLAN_FILTER 0x10000000 +#define KS8695_SEPC2_DISCARD_NON_PVID 0x08000000 +#define KS8695_SEPC2_FORCE_FLOW_CTRL 0x04000000 +#define KS8695_SEPC2_BACK_PRESSURE_EN 0x02000000 + +#define KS8695_SEPC2_TX_H_RATECTRL_MASK 0x00FFF000 +#define KS8695_SEPC2_TX_L_RATECTRL_MASK 0x00000FFF + +/* Port 1-4 and 5 Configuration Register Set 3 */ +#define KS8695_SEP1C3 0xE814 +#define KS8695_SEP2C3 0xE820 +#define KS8695_SEP3C3 0xE82C +#define KS8695_SEP4C3 0xE838 +#define KS8695_SEP5C3 0xE844 + +#define KS8695_SEPC3_RX_H_RATECTRL_MASK 0xFFF00000 +#define KS8695_SEPC3_RX_L_RATECTRL_MASK 0x000FFF00 +#define KS8695_SEPC3_RX_DIF_RATECTRL_EN 0x00000080 +#define KS8695_SEPC3_RX_L_RATECTRL_EN 0x00000040 +#define KS8695_SEPC3_RX_H_RATECTRL_EN 0x00000020 +#define KS8695_SEPC3_RX_L_RATEFLOW_EN 0x00000010 +#define KS8695_SEPC3_RX_H_RATEFLOW_EN 0x00000008 +#define KS8695_SEPC3_TX_DIF_RATECTRL_EN 0x00000004 +#define KS8695_SEPC3_TX_L_RATECTRL_EN 0x00000002 +#define KS8695_SEPC3_TX_H_RATECTRL_EN 0x00000001 + +/* Port auto negotiation related registers */ +#define KS8695_SEP12AN 0xE848 +#define KS8695_SEP34AN 0xE84C + +/* Indirect Access Control register */ +#define KS8695_SEIAC 0xE850 +#define KS8695_SEIADH2 0xE854 +#define KS8695_SEIADH1 0xE858 +#define KS8695_SEIADL 0xE85C + +#define KS8695_SEIAC_READ 0x00001000 +#define KS8695_SEIAC_WRITE 0x00000000 +#define KS8695_SEIAC_TAB_STATIC 0x00000000 +#define KS8695_SEIAC_TAB_VLAN 0x00000400 +#define KS8695_SEIAC_TAB_DYNAMIC 0x00000800 +#define KS8695_SEIAC_TAB_MIB 0x00000C00 +#define KS8695_SEIAC_INDEX_MASK 0x000003FF + +/* Advanced Feature Control register */ +#define KS8695_SEAFC 0xE860 +#define KS8695_SEDSCPH 0xE864 +#define KS8695_SEDSCPL 0xE868 +#define KS8695_SEMAH 0xE86C +#define KS8695_SEMAL 0xE870 + +/* LAN PHY power management related registers */ +#define KS8695_LPPM12 0xE874 +#define KS8695_LPPM34 0xE878 + +/* new bits */ +#define KS8695_LPPM_PHY_LOOPBACK 0x4000 +#define KS8695_LPPM_RMT_LOOPBACK 0x2000 +#define KS8695_LPPM_PHY_ISOLATE 0x1000 +#define KS8695_LPPM_SOFT_RESET 0x0800 +#define KS8695_LPPM_FORCE_LINK 0x0400 + +/* new bits */ +#define KS8695_LPPM_PHY_LOOPBACK 0x4000 +#define KS8695_LPPM_RMT_LOOPBACK 0x2000 +#define KS8695_LPPM_PHY_ISOLATE 0x1000 +#define KS8695_LPPM_SOFT_RESET 0x0800 +#define KS8695_LPPM_FORCE_LINK 0x0400 + +/* Digital Testing Status and Control Registers */ +#define KS8695_SEDTS 0xE87C +#define KS8695_SEATCS 0xE880 + +/* new bits for WAN PHY Power mangement register */ +#define KS8695_WPPM_PHY_LOOPBACK 0x00004000 +#define KS8695_WPPM_RMT_LOOPBACK 0x00002000 +#define KS8695_WPPM_PHY_ISOLATION 0x00001000 +#define KS8695_WPPM_FORCE_LINK 0x00000400 + +#endif /* CONFIG_PCI */ + +#endif /* __ASM_ARCH_KS8695_REGS_H */ diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/memory.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/memory.h --- linux-2.6.16/include/asm-arm/arch-ks8695/memory.h 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/memory.h 2006-03-22 23:45:56.000000000 +1000 @@ -0,0 +1,44 @@ +/* + * linux/include/asm-arm/arch-ks8695/memory.h + * + * Copyright (C) 2002 Micrel Inc. + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + +#include +#include +#include + +/* + * All the current machines based on this I know of have RAM based at + * address 0. Lets deal with any that don't if/when we hit them. + */ +#define PHYS_OFFSET UL(0x00000000) + +/* + * Virtual view <-> DMA view memory address translations + * virt_to_bus: Used to translate the virtual address to an + * address suitable to be passed to set_dma_addr + * bus_to_virt: Used to convert an address for DMA operations + * to an address that the kernel can use. + * On KS8695, physical and bus address are same for dram + */ +#define __virt_to_bus(x) ((x) - PAGE_OFFSET + KS8695P_PCI_MEM_BASE) +#define __bus_to_virt(x) ((x) - KS8695P_PCI_MEM_BASE + PAGE_OFFSET) + +#endif /* __ASM_ARCH_MEMORY_H */ diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/param.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/param.h --- linux-2.6.16/include/asm-arm/arch-ks8695/param.h 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/param.h 2006-02-20 13:39:13.000000000 +1000 @@ -0,0 +1,20 @@ +/* + * linux/include/asm-arm/arch-ks8695/param.h + * + * Copyright (C) 1999 ARM Limited + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/system.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/system.h --- linux-2.6.16/include/asm-arm/arch-ks8695/system.h 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/system.h 2006-02-21 10:07:50.000000000 +1000 @@ -0,0 +1,48 @@ +/* + * linux/include/asm-arm/arch-ks8695/system.h + * + * Copyright (C) 2002 Micrel Inc. + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __ASM_ARCH_SYSTEM_H +#define __ASM_ARCH_SYSTEM_H + +#include +#include + +static void arch_idle(void) +{ + /* + * This should do all the clock switching + * and wait for interrupt tricks + */ + cpu_do_idle(); +} + +static inline void arch_reset(char mode) +{ + unsigned int val; + + /* To reset, use the watchdog timer */ + val = __raw_readl(KS8695_REG(KS8695_TIMER_CTRL)) & 0x02; + __raw_writel(val, KS8695_REG(KS8695_TIMER_CTRL)); + val = (10 << 8) | 0xFF; + __raw_writel(val, KS8695_REG(KS8695_TIMER0)); + val = __raw_readl(KS8695_REG(KS8695_TIMER_CTRL)) | 0x01; + __raw_writel(val, KS8695_REG(KS8695_TIMER_CTRL)); +} + +#endif /* __ASM_ARCH_SYSTEM_H */ diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/timex.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/timex.h --- linux-2.6.16/include/asm-arm/arch-ks8695/timex.h 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/timex.h 2006-03-15 22:44:05.000000000 +1000 @@ -0,0 +1,26 @@ +/* + * linux/include/asm-arm/arch-ks8695/timex.h + * + * Copyright (C) 1999 ARM Limited + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __ASM_ARCH_TIMEX_H +#define __ASM_ARCH_TIMEX_H 1 + +#define CLOCK_TICK_RATE (25000000) + +#endif /* __ASM_ARCH_TIMEX_H */ diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/uncompress.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/uncompress.h --- linux-2.6.16/include/asm-arm/arch-ks8695/uncompress.h 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/uncompress.h 2006-03-15 00:22:13.000000000 +1000 @@ -0,0 +1,60 @@ +/* + * linux/include/asm-arm/arch-ks8695/uncompress.h + * + * Copyright (C) 1999 ARM Limited + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +/* + * These access routines operate on the physical address space. + */ +static inline unsigned int ks8695_getreg(unsigned int r) +{ + return *((unsigned int *) (KS8695_IO_BASE + r)); +} + +static inline void ks8695_setreg(unsigned int r, unsigned int v) +{ + *((unsigned int *) (KS8695_IO_BASE + r)) = v; +} + +static void putc(char c) +{ + while ((ks8695_getreg(KS8695_UART_LINE_STATUS) & KS8695_UART_LINES_TXFE) == 0) + ; + + ks8695_setreg(KS8695_UART_TX_HOLDING, c); +} + + +static void putstr(const char *s) +{ + while (*s) { + putc(*s); + if (*s == '\n') + putc('\r'); + s++; + } +} + +/* + * nothing to do + */ +#define arch_decomp_setup() + +#define arch_decomp_wdog() diff -Naur linux-2.6.16/include/asm-arm/arch-ks8695/vmalloc.h linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/vmalloc.h --- linux-2.6.16/include/asm-arm/arch-ks8695/vmalloc.h 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/include/asm-arm/arch-ks8695/vmalloc.h 2006-02-20 13:39:13.000000000 +1000 @@ -0,0 +1,26 @@ +/* + * linux/include/asm-arm/arch-ks8695/vmalloc.h + * + * Copyright (C) 2000 Russell King. + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __ASM_ARCH_VMALLOC_H +#define __ASM_ARCH_VMALLOC_H 1 + +#define VMALLOC_END (PAGE_OFFSET + 0x10000000) + +#endif /* __ASM_ARCH_VMALLOC_H */ diff -Naur linux-2.6.16/arch/arm/boot/compressed/head-ks8695.S linux-2.6.16.ks8695/arch/arm/boot/compressed/head-ks8695.S --- linux-2.6.16/arch/arm/boot/compressed/head-ks8695.S 1970-01-01 10:00:00.000000000 +1000 +++ linux-2.6.16.ks8695/arch/arm/boot/compressed/head-ks8695.S 2006-03-20 13:55:24.000000000 +1000 @@ -0,0 +1,5 @@ +#include + + .section ".start", "ax" + mov r7, #(MACH_TYPE_KS8695 & 0xff) + orr r7, r7, #(MACH_TYPE_KS8695 & 0xff00) diff -Naur linux-2.6.16/arch/arm/boot/compressed/Makefile linux-2.6.16.ks8695/arch/arm/boot/compressed/Makefile --- linux-2.6.16/arch/arm/boot/compressed/Makefile 2006-03-20 15:53:29.000000000 +1000 +++ linux-2.6.16.ks8695/arch/arm/boot/compressed/Makefile 2006-03-21 17:07:45.000000000 +1000 @@ -46,6 +46,10 @@ OBJS += head-sharpsl.o endif +ifeq ($(CONFIG_ARCH_KS8695),y) +OBJS += head-ks8695.o +endif + ifeq ($(CONFIG_ARCH_AT91RM9200),y) OBJS += head-at91rm9200.o endif ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php