162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * arch/arm/include/asm/hardware/dec21285.h 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 1998 Russell King 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * DC21285 registers 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci#define DC21285_PCI_IACK 0x79000000 1062306a36Sopenharmony_ci#define DC21285_ARMCSR_BASE 0x42000000 1162306a36Sopenharmony_ci#define DC21285_PCI_TYPE_0_CONFIG 0x7b000000 1262306a36Sopenharmony_ci#define DC21285_PCI_TYPE_1_CONFIG 0x7a000000 1362306a36Sopenharmony_ci#define DC21285_OUTBOUND_WRITE_FLUSH 0x78000000 1462306a36Sopenharmony_ci#define DC21285_FLASH 0x41000000 1562306a36Sopenharmony_ci#define DC21285_PCI_IO 0x7c000000 1662306a36Sopenharmony_ci#define DC21285_PCI_MEM 0x80000000 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci#ifndef __ASSEMBLY__ 1962306a36Sopenharmony_ci#include <mach/hardware.h> 2062306a36Sopenharmony_ci#define DC21285_IO(x) ((volatile unsigned long *)(ARMCSR_BASE+(x))) 2162306a36Sopenharmony_ci#else 2262306a36Sopenharmony_ci#define DC21285_IO(x) (x) 2362306a36Sopenharmony_ci#endif 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci/* 2662306a36Sopenharmony_ci * The footbridge is programmed to expose the system RAM at 0xe0000000. 2762306a36Sopenharmony_ci * The requirement is that the RAM isn't placed at bus address 0, which 2862306a36Sopenharmony_ci * would clash with VGA cards. 2962306a36Sopenharmony_ci */ 3062306a36Sopenharmony_ci#define BUS_OFFSET 0xe0000000 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci#define CSR_PCICMD DC21285_IO(0x0004) 3362306a36Sopenharmony_ci#define CSR_CLASSREV DC21285_IO(0x0008) 3462306a36Sopenharmony_ci#define CSR_PCICACHELINESIZE DC21285_IO(0x000c) 3562306a36Sopenharmony_ci#define CSR_PCICSRBASE DC21285_IO(0x0010) 3662306a36Sopenharmony_ci#define CSR_PCICSRIOBASE DC21285_IO(0x0014) 3762306a36Sopenharmony_ci#define CSR_PCISDRAMBASE DC21285_IO(0x0018) 3862306a36Sopenharmony_ci#define CSR_PCIROMBASE DC21285_IO(0x0030) 3962306a36Sopenharmony_ci#define CSR_MBOX0 DC21285_IO(0x0050) 4062306a36Sopenharmony_ci#define CSR_MBOX1 DC21285_IO(0x0054) 4162306a36Sopenharmony_ci#define CSR_MBOX2 DC21285_IO(0x0058) 4262306a36Sopenharmony_ci#define CSR_MBOX3 DC21285_IO(0x005c) 4362306a36Sopenharmony_ci#define CSR_DOORBELL DC21285_IO(0x0060) 4462306a36Sopenharmony_ci#define CSR_DOORBELL_SETUP DC21285_IO(0x0064) 4562306a36Sopenharmony_ci#define CSR_ROMWRITEREG DC21285_IO(0x0068) 4662306a36Sopenharmony_ci#define CSR_CSRBASEMASK DC21285_IO(0x00f8) 4762306a36Sopenharmony_ci#define CSR_CSRBASEOFFSET DC21285_IO(0x00fc) 4862306a36Sopenharmony_ci#define CSR_SDRAMBASEMASK DC21285_IO(0x0100) 4962306a36Sopenharmony_ci#define CSR_SDRAMBASEOFFSET DC21285_IO(0x0104) 5062306a36Sopenharmony_ci#define CSR_ROMBASEMASK DC21285_IO(0x0108) 5162306a36Sopenharmony_ci#define CSR_SDRAMTIMING DC21285_IO(0x010c) 5262306a36Sopenharmony_ci#define CSR_SDRAMADDRSIZE0 DC21285_IO(0x0110) 5362306a36Sopenharmony_ci#define CSR_SDRAMADDRSIZE1 DC21285_IO(0x0114) 5462306a36Sopenharmony_ci#define CSR_SDRAMADDRSIZE2 DC21285_IO(0x0118) 5562306a36Sopenharmony_ci#define CSR_SDRAMADDRSIZE3 DC21285_IO(0x011c) 5662306a36Sopenharmony_ci#define CSR_I2O_INFREEHEAD DC21285_IO(0x0120) 5762306a36Sopenharmony_ci#define CSR_I2O_INPOSTTAIL DC21285_IO(0x0124) 5862306a36Sopenharmony_ci#define CSR_I2O_OUTPOSTHEAD DC21285_IO(0x0128) 5962306a36Sopenharmony_ci#define CSR_I2O_OUTFREETAIL DC21285_IO(0x012c) 6062306a36Sopenharmony_ci#define CSR_I2O_INFREECOUNT DC21285_IO(0x0130) 6162306a36Sopenharmony_ci#define CSR_I2O_OUTPOSTCOUNT DC21285_IO(0x0134) 6262306a36Sopenharmony_ci#define CSR_I2O_INPOSTCOUNT DC21285_IO(0x0138) 6362306a36Sopenharmony_ci#define CSR_SA110_CNTL DC21285_IO(0x013c) 6462306a36Sopenharmony_ci#define SA110_CNTL_INITCMPLETE (1 << 0) 6562306a36Sopenharmony_ci#define SA110_CNTL_ASSERTSERR (1 << 1) 6662306a36Sopenharmony_ci#define SA110_CNTL_RXSERR (1 << 3) 6762306a36Sopenharmony_ci#define SA110_CNTL_SA110DRAMPARITY (1 << 4) 6862306a36Sopenharmony_ci#define SA110_CNTL_PCISDRAMPARITY (1 << 5) 6962306a36Sopenharmony_ci#define SA110_CNTL_DMASDRAMPARITY (1 << 6) 7062306a36Sopenharmony_ci#define SA110_CNTL_DISCARDTIMER (1 << 8) 7162306a36Sopenharmony_ci#define SA110_CNTL_PCINRESET (1 << 9) 7262306a36Sopenharmony_ci#define SA110_CNTL_I2O_256 (0 << 10) 7362306a36Sopenharmony_ci#define SA110_CNTL_I20_512 (1 << 10) 7462306a36Sopenharmony_ci#define SA110_CNTL_I2O_1024 (2 << 10) 7562306a36Sopenharmony_ci#define SA110_CNTL_I2O_2048 (3 << 10) 7662306a36Sopenharmony_ci#define SA110_CNTL_I2O_4096 (4 << 10) 7762306a36Sopenharmony_ci#define SA110_CNTL_I2O_8192 (5 << 10) 7862306a36Sopenharmony_ci#define SA110_CNTL_I2O_16384 (6 << 10) 7962306a36Sopenharmony_ci#define SA110_CNTL_I2O_32768 (7 << 10) 8062306a36Sopenharmony_ci#define SA110_CNTL_WATCHDOG (1 << 13) 8162306a36Sopenharmony_ci#define SA110_CNTL_ROMWIDTH_UNDEF (0 << 14) 8262306a36Sopenharmony_ci#define SA110_CNTL_ROMWIDTH_16 (1 << 14) 8362306a36Sopenharmony_ci#define SA110_CNTL_ROMWIDTH_32 (2 << 14) 8462306a36Sopenharmony_ci#define SA110_CNTL_ROMWIDTH_8 (3 << 14) 8562306a36Sopenharmony_ci#define SA110_CNTL_ROMACCESSTIME(x) ((x)<<16) 8662306a36Sopenharmony_ci#define SA110_CNTL_ROMBURSTTIME(x) ((x)<<20) 8762306a36Sopenharmony_ci#define SA110_CNTL_ROMTRISTATETIME(x) ((x)<<24) 8862306a36Sopenharmony_ci#define SA110_CNTL_XCSDIR(x) ((x)<<28) 8962306a36Sopenharmony_ci#define SA110_CNTL_PCICFN (1 << 31) 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci#define CSR_PCIADDR_EXTN DC21285_IO(0x0140) 9262306a36Sopenharmony_ci#define CSR_PREFETCHMEMRANGE DC21285_IO(0x0144) 9362306a36Sopenharmony_ci#define CSR_XBUS_CYCLE DC21285_IO(0x0148) 9462306a36Sopenharmony_ci#define CSR_XBUS_IOSTROBE DC21285_IO(0x014c) 9562306a36Sopenharmony_ci#define CSR_DOORBELL_PCI DC21285_IO(0x0150) 9662306a36Sopenharmony_ci#define CSR_DOORBELL_SA110 DC21285_IO(0x0154) 9762306a36Sopenharmony_ci#define CSR_UARTDR DC21285_IO(0x0160) 9862306a36Sopenharmony_ci#define CSR_RXSTAT DC21285_IO(0x0164) 9962306a36Sopenharmony_ci#define CSR_H_UBRLCR DC21285_IO(0x0168) 10062306a36Sopenharmony_ci#define CSR_M_UBRLCR DC21285_IO(0x016c) 10162306a36Sopenharmony_ci#define CSR_L_UBRLCR DC21285_IO(0x0170) 10262306a36Sopenharmony_ci#define CSR_UARTCON DC21285_IO(0x0174) 10362306a36Sopenharmony_ci#define CSR_UARTFLG DC21285_IO(0x0178) 10462306a36Sopenharmony_ci#define CSR_IRQ_STATUS DC21285_IO(0x0180) 10562306a36Sopenharmony_ci#define CSR_IRQ_RAWSTATUS DC21285_IO(0x0184) 10662306a36Sopenharmony_ci#define CSR_IRQ_ENABLE DC21285_IO(0x0188) 10762306a36Sopenharmony_ci#define CSR_IRQ_DISABLE DC21285_IO(0x018c) 10862306a36Sopenharmony_ci#define CSR_IRQ_SOFT DC21285_IO(0x0190) 10962306a36Sopenharmony_ci#define CSR_FIQ_STATUS DC21285_IO(0x0280) 11062306a36Sopenharmony_ci#define CSR_FIQ_RAWSTATUS DC21285_IO(0x0284) 11162306a36Sopenharmony_ci#define CSR_FIQ_ENABLE DC21285_IO(0x0288) 11262306a36Sopenharmony_ci#define CSR_FIQ_DISABLE DC21285_IO(0x028c) 11362306a36Sopenharmony_ci#define CSR_FIQ_SOFT DC21285_IO(0x0290) 11462306a36Sopenharmony_ci#define CSR_TIMER1_LOAD DC21285_IO(0x0300) 11562306a36Sopenharmony_ci#define CSR_TIMER1_VALUE DC21285_IO(0x0304) 11662306a36Sopenharmony_ci#define CSR_TIMER1_CNTL DC21285_IO(0x0308) 11762306a36Sopenharmony_ci#define CSR_TIMER1_CLR DC21285_IO(0x030c) 11862306a36Sopenharmony_ci#define CSR_TIMER2_LOAD DC21285_IO(0x0320) 11962306a36Sopenharmony_ci#define CSR_TIMER2_VALUE DC21285_IO(0x0324) 12062306a36Sopenharmony_ci#define CSR_TIMER2_CNTL DC21285_IO(0x0328) 12162306a36Sopenharmony_ci#define CSR_TIMER2_CLR DC21285_IO(0x032c) 12262306a36Sopenharmony_ci#define CSR_TIMER3_LOAD DC21285_IO(0x0340) 12362306a36Sopenharmony_ci#define CSR_TIMER3_VALUE DC21285_IO(0x0344) 12462306a36Sopenharmony_ci#define CSR_TIMER3_CNTL DC21285_IO(0x0348) 12562306a36Sopenharmony_ci#define CSR_TIMER3_CLR DC21285_IO(0x034c) 12662306a36Sopenharmony_ci#define CSR_TIMER4_LOAD DC21285_IO(0x0360) 12762306a36Sopenharmony_ci#define CSR_TIMER4_VALUE DC21285_IO(0x0364) 12862306a36Sopenharmony_ci#define CSR_TIMER4_CNTL DC21285_IO(0x0368) 12962306a36Sopenharmony_ci#define CSR_TIMER4_CLR DC21285_IO(0x036c) 13062306a36Sopenharmony_ci 13162306a36Sopenharmony_ci#define TIMER_CNTL_ENABLE (1 << 7) 13262306a36Sopenharmony_ci#define TIMER_CNTL_AUTORELOAD (1 << 6) 13362306a36Sopenharmony_ci#define TIMER_CNTL_DIV1 (0) 13462306a36Sopenharmony_ci#define TIMER_CNTL_DIV16 (1 << 2) 13562306a36Sopenharmony_ci#define TIMER_CNTL_DIV256 (2 << 2) 13662306a36Sopenharmony_ci#define TIMER_CNTL_CNTEXT (3 << 2) 13762306a36Sopenharmony_ci 13862306a36Sopenharmony_ci 139