Path: blob/master/arch/arm/mach-ixp2000/include/mach/ixdp2x00.h
10820 views
/*1* arch/arm/mach-ixp2000/include/mach/ixdp2x00.h2*3* Register and other defines for IXDP2[48]00 platforms4*5* Original Author: Naeem Afzal <[email protected]>6* Maintainer: Deepak Saxena <[email protected]>7*8* Copyright (C) 2002 Intel Corp.9* Copyright (C) 2003-2004 MontaVista Software, Inc.10*11* This program is free software; you can redistribute it and/or modify it12* under the terms of the GNU General Public License as published by the13* Free Software Foundation; either version 2 of the License, or (at your14* option) any later version.15*/16#ifndef _IXDP2X00_H_17#define _IXDP2X00_H_1819/*20* On board CPLD memory map21*/22#define IXDP2X00_PHYS_CPLD_BASE 0xc700000023#define IXDP2X00_VIRT_CPLD_BASE 0xfe00000024#define IXDP2X00_CPLD_SIZE 0x00100000252627#define IXDP2X00_CPLD_REG(x) \28(volatile unsigned long *)(IXDP2X00_VIRT_CPLD_BASE | x)2930/*31* IXDP2400 CPLD registers32*/33#define IXDP2400_CPLD_SYSLED IXDP2X00_CPLD_REG(0x0)34#define IXDP2400_CPLD_DISP_DATA IXDP2X00_CPLD_REG(0x4)35#define IXDP2400_CPLD_CLOCK_SPEED IXDP2X00_CPLD_REG(0x8)36#define IXDP2400_CPLD_INT_STAT IXDP2X00_CPLD_REG(0xc)37#define IXDP2400_CPLD_REV IXDP2X00_CPLD_REG(0x10)38#define IXDP2400_CPLD_SYS_CLK_M IXDP2X00_CPLD_REG(0x14)39#define IXDP2400_CPLD_SYS_CLK_N IXDP2X00_CPLD_REG(0x18)40#define IXDP2400_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x48)4142/*43* IXDP2800 CPLD registers44*/45#define IXDP2800_CPLD_INT_STAT IXDP2X00_CPLD_REG(0x0)46#define IXDP2800_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x140)474849#define IXDP2X00_GPIO_I2C_ENABLE 0x0250#define IXDP2X00_GPIO_SCL 0x0751#define IXDP2X00_GPIO_SDA 0x065253/*54* PCI devfns for on-board devices. We need these to be able to55* properly translate IRQs and for device removal.56*/57#define IXDP2400_SLAVE_ENET_DEVFN 0x18 /* Bus 1 */58#define IXDP2400_MASTER_ENET_DEVFN 0x20 /* Bus 1 */59#define IXDP2400_MEDIA_DEVFN 0x28 /* Bus 1 */60#define IXDP2400_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */6162#define IXDP2800_SLAVE_ENET_DEVFN 0x20 /* Bus 1 */63#define IXDP2800_MASTER_ENET_DEVFN 0x18 /* Bus 1 */64#define IXDP2800_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */6566#define IXDP2X00_P2P_DEVFN 0x20 /* Bus 0 */67#define IXDP2X00_21555_DEVFN 0x30 /* Bus 0 */68#define IXDP2X00_SLAVE_NPU_DEVFN 0x28 /* Bus 1 */69#define IXDP2X00_PMC_DEVFN 0x38 /* Bus 1 */70#define IXDP2X00_MASTER_NPU_DEVFN 0x38 /* Bus 1 */7172#ifndef __ASSEMBLY__73/*74* The master NPU is always PCI master.75*/76static inline unsigned int ixdp2x00_master_npu(void)77{78return !!ixp2000_is_pcimaster();79}8081/*82* Helper functions used by ixdp2400 and ixdp2800 specific code83*/84void ixdp2x00_init_irq(volatile unsigned long*, volatile unsigned long *, unsigned long);85void ixdp2x00_slave_pci_postinit(void);86void ixdp2x00_init_machine(void);87void ixdp2x00_map_io(void);8889#endif9091#endif /*_IXDP2X00_H_ */929394