hardware.h 1.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/*
 * arch/xtensa/platform/xtavnet/include/platform/hardware.h
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 2006 Tensilica Inc.
 */

/*
 * This file contains the hardware configuration of the XTAVNET boards.
 */

15 16
#include <asm/types.h>

17 18 19 20 21
#ifndef __XTENSA_XTAVNET_HARDWARE_H
#define __XTENSA_XTAVNET_HARDWARE_H

/* Memory configuration. */

22
#define PLATFORM_DEFAULT_MEM_START __XTENSA_UL(CONFIG_DEFAULT_MEM_START)
23 24 25

/* Interrupt configuration. */

M
Max Filippov 已提交
26
#define PLATFORM_NR_IRQS	0
27 28 29

/* Default assignment of LX60 devices to external interrupts. */

M
Max Filippov 已提交
30
#ifdef CONFIG_XTENSA_MX
31 32
#define DUART16552_INTNUM	XCHAL_EXTINT3_NUM
#define OETH_IRQ		XCHAL_EXTINT4_NUM
M
Max Filippov 已提交
33
#define C67X00_IRQ		XCHAL_EXTINT8_NUM
34 35 36
#else
#define DUART16552_INTNUM	XCHAL_EXTINT0_NUM
#define OETH_IRQ		XCHAL_EXTINT1_NUM
M
Max Filippov 已提交
37
#define C67X00_IRQ		XCHAL_EXTINT5_NUM
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
#endif

/*
 *  Device addresses and parameters.
 */

/* UART */
#define DUART16552_PADDR	(XCHAL_KIO_PADDR + 0x0D050020)

/* Misc. */
#define XTFPGA_FPGAREGS_VADDR	IOADDR(0x0D020000)
/* Clock frequency in Hz (read-only):  */
#define XTFPGA_CLKFRQ_VADDR	(XTFPGA_FPGAREGS_VADDR + 0x04)
/* Setting of 8 DIP switches:  */
#define DIP_SWITCHES_VADDR	(XTFPGA_FPGAREGS_VADDR + 0x0C)
/* Software reset (write 0xdead):  */
#define XTFPGA_SWRST_VADDR	(XTFPGA_FPGAREGS_VADDR + 0x10)

/*  OpenCores Ethernet controller:  */
				/* regs + RX/TX descriptors */
#define OETH_REGS_PADDR		(XCHAL_KIO_PADDR + 0x0D030000)
#define OETH_REGS_SIZE		0x1000
#define OETH_SRAMBUFF_PADDR	(XCHAL_KIO_PADDR + 0x0D800000)

				/* 5*rx buffs + 5*tx buffs */
#define OETH_SRAMBUFF_SIZE	(5 * 0x600 + 5 * 0x600)

65 66
#define C67X00_PADDR		(XCHAL_KIO_PADDR + 0x0D0D0000)
#define C67X00_SIZE		0x10
M
Max Filippov 已提交
67

68
#endif /* __XTENSA_XTAVNET_HARDWARE_H */