• Alessandro Zummo's avatar
    [ARM] 3140/1: NSLU2 machine support · a7918f39
    Alessandro Zummo authored
    Patch from Alessandro Zummo
    
    This patch adds support for the LinkSys NSLU2 running with
    both big and little-endian kernels. The LinkSys NSLU2 is
    a cost engineered ARM, XScale 420 based system similar to
    the the Intel IXDP425 evaluation board. It uses the
    IXP4XX ARCH.
    
    While this patch applies independently of other patches
    the resultant kernel requires further patches to successfully
    use onboard devices, including the onboard flash. Since these
    patches are independent of this one they will be submitted
    separately.
    
    A defconfig is not included here because not all of
    the required drivers are actually in the kernel.
    We intend to provide one as soon as the patches
    will be incorporated in mainstream.
    
    This patch is the combined work of nslu2-linux.org
    Signed-off-by: default avatarJohn Bowler <jbowler@acm.org>
    Signed-off-by: default avatarAlessandro Zummo <a.zummo@towertech.it>
    Signed-off-by: default avatarDeepak Saxena <dsaxena@plexity.net>
    Signed-off-by: default avatarLennert Buytenhek <buytenh@wantstofly.org>
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    a7918f39
nslu2.h 2.32 KB
/*
 * include/asm-arm/arch-ixp4xx/nslu2.h
 *
 * NSLU2 platform specific definitions
 *
 * Author: Mark Rakes <mrakes AT mac.com>
 * Maintainers: http://www.nslu2-linux.org
 *
 * 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 <asm/hardware.h>"
#endif

#define NSLU2_FLASH_BASE	IXP4XX_EXP_BUS_CS0_BASE_PHYS
#define NSLU2_FLASH_SIZE	IXP4XX_EXP_BUS_CSX_REGION_SIZE

#define NSLU2_SDA_PIN		7
#define NSLU2_SCL_PIN		6

/*
 * NSLU2 PCI IRQs
 */
#define NSLU2_PCI_MAX_DEV	3
#define NSLU2_PCI_IRQ_LINES	3


/* PCI controller GPIO to IRQ pin mappings */
#define NSLU2_PCI_INTA_PIN	11
#define NSLU2_PCI_INTB_PIN	10
#define NSLU2_PCI_INTC_PIN	9
#define NSLU2_PCI_INTD_PIN	8


/* NSLU2 Timer */
#define NSLU2_FREQ 66000000
#define NSLU2_CLOCK_TICK_RATE (((NSLU2_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
#define NSLU2_CLOCK_TICKS_PER_USEC ((NSLU2_CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC)

/* GPIO */

#define NSLU2_GPIO0		0
#define NSLU2_GPIO1		1
#define NSLU2_GPIO2		2
#define NSLU2_GPIO3		3
#define NSLU2_GPIO4		4
#define NSLU2_GPIO5		5
#define NSLU2_GPIO6		6
#define NSLU2_GPIO7		7
#define NSLU2_GPIO8		8
#define NSLU2_GPIO9		9
#define NSLU2_GPIO10		10
#define NSLU2_GPIO11		11
#define NSLU2_GPIO12		12
#define NSLU2_GPIO13		13
#define NSLU2_GPIO14		14
#define NSLU2_GPIO15		15

/* Buttons */

#define NSLU2_PB_GPIO		NSLU2_GPIO5
#define NSLU2_PO_GPIO		NSLU2_GPIO8	/* power off */
#define NSLU2_RB_GPIO		NSLU2_GPIO12

#define NSLU2_PB_IRQ		IRQ_IXP4XX_GPIO5
#define NSLU2_RB_IRQ		IRQ_IXP4XX_GPIO12

#define NSLU2_PB_BM		(1L << NSLU2_PB_GPIO)
#define NSLU2_PO_BM		(1L << NSLU2_PO_GPIO)
#define NSLU2_RB_BM		(1L << NSLU2_RB_GPIO)

/* Buzzer */

#define NSLU2_GPIO_BUZZ		4
#define NSLU2_BZ_BM		(1L << NSLU2_GPIO_BUZZ)
/* LEDs */

#define NSLU2_LED_RED		NSLU2_GPIO0
#define NSLU2_LED_GRN		NSLU2_GPIO1

#define NSLU2_LED_RED_BM	(1L << NSLU2_LED_RED)
#define NSLU2_LED_GRN_BM	(1L << NSLU2_LED_GRN)

#define NSLU2_LED_DISK1		NSLU2_GPIO2
#define NSLU2_LED_DISK2		NSLU2_GPIO3

#define NSLU2_LED_DISK1_BM	(1L << NSLU2_GPIO2)
#define NSLU2_LED_DISK2_BM	(1L << NSLU2_GPIO3)