include/asm-arm/arch-ixp4xx/ds101.h | 87 +++++++++++++++++++++++++++++++++ include/asm-arm/arch-ixp4xx/hardware.h | 1 include/asm-arm/arch-ixp4xx/irqs.h | 7 ++ 3 files changed, 95 insertions(+) --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux-ixp4xx/include/asm-arm/arch-ixp4xx/ds101.h 2006-02-23 18:09:24.000000000 +0100 @@ -0,0 +1,87 @@ +/* + * DS101 platform specific definitions + * + * Author: Øyvind Repvik + * + * based on ixdp425.h: + * Copyright 2004 (c) MontaVista, Software, Inc. + * + * 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. + */ + +#ifndef __ASM_ARCH_HARDWARE_H__ +#error "Do not include this directly, instead #include " +#endif + +#define DS101_SCL_PIN DS101_GPIO0 +#define DS101_SDA_PIN DS101_GPIO1 +#define DS101_GPIO_BUZZ DS101_GPIO2 +#define DS101_POWER_LED DS101_GPIO3 +#define DS101_USBCOPYB_GPIO DS101_GPIO4 +#define DS101_USBCOPY_SOLID_LED DS101_GPIO4 /* The led and button share GPIO */ +#define DS101_USBCOPY_BLINK_LED DS101_GPIO5 +/* GPIO6 is unknown */ +#define DS101_POWEROFF_GPIO DS101_GPIO7 +#define DS101_POWERB_GPIO DS101_GPIO8 +#define DS101_PCI_INTC_PIN DS101_GPIO9 +#define DS101_PCI_INTB_PIN DS101_GPIO10 +#define DS101_PCI_INTA_PIN DS101_GPIO11 +#define DS101_RESETB_GPIO DS101_GPIO12 +#define DS101_STATUSOK_LED DS101_GPIO14 +#define DS101_STATUSBAD_LED DS101_GPIO15 + +#define DS101_PCI_MAX_DEV 2 +#define DS101_PCI_IRQ_LINES 3 + +#define DS101_POWERB_IRQ IRQ_IXP4XX_GPIO8 +#define DS101_RESETB_IRQ IRQ_IXP4XX_GPIO12 +#define DS101_USBCOPYB_IRQ IRQ_IXP4XX_GPIO4 + +#define DS101_GPIO_IN IXP4XX_GPIO_IN +#define DS101_GPIO_OUT IXP4XX_GPIO_OUT +#define DS101_GPIO_HIGH 1 +#define DS101_GPIO_LOW 0 + +#define DS101_GPIO_CLK0_ENABLE 0x100 +#define DS101_GPIO_CLK1_ENABLE 0x1000000 +/* GPIO */ + +#define DS101_GPIO0 0 +#define DS101_GPIO1 1 +#define DS101_GPIO2 2 +#define DS101_GPIO3 3 +#define DS101_GPIO4 4 +#define DS101_GPIO5 5 +#define DS101_GPIO6 6 +#define DS101_GPIO7 7 +#define DS101_GPIO8 8 +#define DS101_GPIO9 9 +#define DS101_GPIO10 10 +#define DS101_GPIO11 11 +#define DS101_GPIO12 12 +#define DS101_GPIO13 13 +#define DS101_GPIO14 14 +#define DS101_GPIO15 15 + +/* Stuff needed to setup the IXP expansion + * bus on the DS101 + */ + +#define DS101_EXP_RECOVERY_T(x) (((x) & 15) << 16) +#define DS101_EXP_HOLD_T(x) (((x) & 3) << 20) +#define DS101_EXP_STROBE_T(x) (((x) & 15) << 22) +#define DS101_EXP_SETUP_T(x) (((x) & 3) << 26) +#define DS101_EXP_ADDR_T(x) (((x) & 3) << 28) + +#define DS101_EXP_SZ_16M (15 << 10) +#define DS101_EXP_WR_EN (1 << 1) +#define DS101_EXP_BYTE_RD16 (1 << 6) +#define DS101_EXP_CS_EN (1 << 31) + +#define DS101_EXP_CS0_INIT (DS101_EXP_ADDR_T(1) | \ + DS101_EXP_SETUP_T(1) | DS101_EXP_STROBE_T(1) | \ + DS101_EXP_HOLD_T(1) | DS101_EXP_RECOVERY_T(1)| \ + DS101_EXP_SZ_16M | DS101_EXP_WR_EN | \ + DS101_EXP_BYTE_RD16 | DS101_EXP_CS_EN) --- linux-ixp4xx.orig/include/asm-arm/arch-ixp4xx/hardware.h 2006-02-23 18:09:14.000000000 +0100 +++ linux-ixp4xx/include/asm-arm/arch-ixp4xx/hardware.h 2006-02-23 18:09:48.000000000 +0100 @@ -47,5 +47,6 @@ extern unsigned int processor_id; #include "nslu2.h" #include "nas100d.h" #include "dsmg600.h" +#include "ds101.h" #endif /* _ASM_ARCH_HARDWARE_H */ --- linux-ixp4xx.orig/include/asm-arm/arch-ixp4xx/irqs.h 2006-02-23 18:09:14.000000000 +0100 +++ linux-ixp4xx/include/asm-arm/arch-ixp4xx/irqs.h 2006-02-23 18:09:24.000000000 +0100 @@ -108,6 +108,13 @@ #define IRQ_NAS100D_PCI_INTC IRQ_IXP4XX_GPIO9 #define IRQ_NAS100D_PCI_INTD IRQ_IXP4XX_GPIO8 #define IRQ_NAS100D_PCI_INTE IRQ_IXP4XX_GPIO7 +/* + * DS101 board IRQs + */ + +#define IRQ_DS101_PCI_INTA IRQ_IXP4XX_GPIO11 +#define IRQ_DS101_PCI_INTB IRQ_IXP4XX_GPIO10 +#define IRQ_DS101_PCI_INTC IRQ_IXP4XX_GPIO9 /* * D-Link DSM-G600 board IRQs