/****************************************************************************/12/*3* anchor.h -- Anchor CO-MEM Lite PCI host bridge part.4*5* (C) Copyright 2000, Moreton Bay (www.moreton.com.au)6*/78/****************************************************************************/9#ifndef anchor_h10#define anchor_h11/****************************************************************************/1213/*14* Define basic addressing info.15*/16#if defined(CONFIG_M5407C3)17#define COMEM_BASE 0xFFFF0000 /* Base of CO-MEM address space */18#define COMEM_IRQ 25 /* IRQ of anchor part */19#else20#define COMEM_BASE 0x80000000 /* Base of CO-MEM address space */21#define COMEM_IRQ 25 /* IRQ of anchor part */22#endif2324/****************************************************************************/2526/*27* 4-byte registers of CO-MEM, so adjust register addresses for28* easy access. Handy macro for word access too.29*/30#define LREG(a) ((a) >> 2)31#define WREG(a) ((a) >> 1)323334/*35* Define base addresses within CO-MEM Lite register address space.36*/37#define COMEM_I2O 0x0000 /* I2O registers */38#define COMEM_OPREGS 0x0400 /* Operation registers */39#define COMEM_PCIBUS 0x2000 /* Direct access to PCI bus */40#define COMEM_SHMEM 0x4000 /* Shared memory region */4142#define COMEM_SHMEMSIZE 0x4000 /* Size of shared memory */434445/*46* Define CO-MEM Registers.47*/48#define COMEM_I2OHISR 0x0030 /* I2O host interrupt status */49#define COMEM_I2OHIMR 0x0034 /* I2O host interrupt mask */50#define COMEM_I2OLISR 0x0038 /* I2O local interrupt status */51#define COMEM_I2OLIMR 0x003c /* I2O local interrupt mask */52#define COMEM_IBFPFIFO 0x0040 /* I2O inbound free/post FIFO */53#define COMEM_OBPFFIFO 0x0044 /* I2O outbound post/free FIFO */54#define COMEM_IBPFFIFO 0x0048 /* I2O inbound post/free FIFO */55#define COMEM_OBFPFIFO 0x004c /* I2O outbound free/post FIFO */5657#define COMEM_DAHBASE 0x0460 /* Direct access base address */5859#define COMEM_NVCMD 0x04a0 /* I2C serial command */60#define COMEM_NVREAD 0x04a4 /* I2C serial read */61#define COMEM_NVSTAT 0x04a8 /* I2C status */6263#define COMEM_DMALBASE 0x04b0 /* DMA local base address */64#define COMEM_DMAHBASE 0x04b4 /* DMA host base address */65#define COMEM_DMASIZE 0x04b8 /* DMA size */66#define COMEM_DMACTL 0x04bc /* DMA control */6768#define COMEM_HCTL 0x04e0 /* Host control */69#define COMEM_HINT 0x04e4 /* Host interrupt control/status */70#define COMEM_HLDATA 0x04e8 /* Host to local data mailbox */71#define COMEM_LINT 0x04f4 /* Local interrupt contole status */72#define COMEM_LHDATA 0x04f8 /* Local to host data mailbox */7374#define COMEM_LBUSCFG 0x04fc /* Local bus configuration */757677/*78* Commands and flags for use with Direct Access Register.79*/80#define COMEM_DA_IACK 0x00000000 /* Interrupt acknowledge (read) */81#define COMEM_DA_SPCL 0x00000010 /* Special cycle (write) */82#define COMEM_DA_MEMRD 0x00000004 /* Memory read cycle */83#define COMEM_DA_MEMWR 0x00000004 /* Memory write cycle */84#define COMEM_DA_IORD 0x00000002 /* I/O read cycle */85#define COMEM_DA_IOWR 0x00000002 /* I/O write cycle */86#define COMEM_DA_CFGRD 0x00000006 /* Configuration read cycle */87#define COMEM_DA_CFGWR 0x00000006 /* Configuration write cycle */8889#define COMEM_DA_ADDR(a) ((a) & 0xffffe000)9091#define COMEM_DA_OFFSET(a) ((a) & 0x00001fff)929394/*95* The PCI bus will be limited in what slots will actually be used.96* Define valid device numbers for different boards.97*/98#if defined(CONFIG_M5407C3)99#define COMEM_MINDEV 14 /* Minimum valid DEVICE */100#define COMEM_MAXDEV 14 /* Maximum valid DEVICE */101#define COMEM_BRIDGEDEV 15 /* Slot bridge is in */102#else103#define COMEM_MINDEV 0 /* Minimum valid DEVICE */104#define COMEM_MAXDEV 3 /* Maximum valid DEVICE */105#endif106107#define COMEM_MAXPCI (COMEM_MAXDEV+1) /* Maximum PCI devices */108109110/****************************************************************************/111#endif /* anchor_h */112113114