1d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 24baa9922SRussell King /* 34baa9922SRussell King * arch/arm/include/asm/hardware/dec21285.h 44baa9922SRussell King * 54baa9922SRussell King * Copyright (C) 1998 Russell King 64baa9922SRussell King * 74baa9922SRussell King * DC21285 registers 84baa9922SRussell King */ 94baa9922SRussell King #define DC21285_PCI_IACK 0x79000000 104baa9922SRussell King #define DC21285_ARMCSR_BASE 0x42000000 114baa9922SRussell King #define DC21285_PCI_TYPE_0_CONFIG 0x7b000000 124baa9922SRussell King #define DC21285_PCI_TYPE_1_CONFIG 0x7a000000 134baa9922SRussell King #define DC21285_OUTBOUND_WRITE_FLUSH 0x78000000 144baa9922SRussell King #define DC21285_FLASH 0x41000000 154baa9922SRussell King #define DC21285_PCI_IO 0x7c000000 164baa9922SRussell King #define DC21285_PCI_MEM 0x80000000 174baa9922SRussell King 184baa9922SRussell King #ifndef __ASSEMBLY__ 19a09e64fbSRussell King #include <mach/hardware.h> 204baa9922SRussell King #define DC21285_IO(x) ((volatile unsigned long *)(ARMCSR_BASE+(x))) 214baa9922SRussell King #else 224baa9922SRussell King #define DC21285_IO(x) (x) 234baa9922SRussell King #endif 244baa9922SRussell King 25*be7f3f90SArnd Bergmann /* 26*be7f3f90SArnd Bergmann * The footbridge is programmed to expose the system RAM at 0xe0000000. 27*be7f3f90SArnd Bergmann * The requirement is that the RAM isn't placed at bus address 0, which 28*be7f3f90SArnd Bergmann * would clash with VGA cards. 29*be7f3f90SArnd Bergmann */ 30*be7f3f90SArnd Bergmann #define BUS_OFFSET 0xe0000000 31*be7f3f90SArnd Bergmann 324baa9922SRussell King #define CSR_PCICMD DC21285_IO(0x0004) 334baa9922SRussell King #define CSR_CLASSREV DC21285_IO(0x0008) 344baa9922SRussell King #define CSR_PCICACHELINESIZE DC21285_IO(0x000c) 354baa9922SRussell King #define CSR_PCICSRBASE DC21285_IO(0x0010) 364baa9922SRussell King #define CSR_PCICSRIOBASE DC21285_IO(0x0014) 374baa9922SRussell King #define CSR_PCISDRAMBASE DC21285_IO(0x0018) 384baa9922SRussell King #define CSR_PCIROMBASE DC21285_IO(0x0030) 394baa9922SRussell King #define CSR_MBOX0 DC21285_IO(0x0050) 404baa9922SRussell King #define CSR_MBOX1 DC21285_IO(0x0054) 414baa9922SRussell King #define CSR_MBOX2 DC21285_IO(0x0058) 424baa9922SRussell King #define CSR_MBOX3 DC21285_IO(0x005c) 434baa9922SRussell King #define CSR_DOORBELL DC21285_IO(0x0060) 444baa9922SRussell King #define CSR_DOORBELL_SETUP DC21285_IO(0x0064) 454baa9922SRussell King #define CSR_ROMWRITEREG DC21285_IO(0x0068) 464baa9922SRussell King #define CSR_CSRBASEMASK DC21285_IO(0x00f8) 474baa9922SRussell King #define CSR_CSRBASEOFFSET DC21285_IO(0x00fc) 484baa9922SRussell King #define CSR_SDRAMBASEMASK DC21285_IO(0x0100) 494baa9922SRussell King #define CSR_SDRAMBASEOFFSET DC21285_IO(0x0104) 504baa9922SRussell King #define CSR_ROMBASEMASK DC21285_IO(0x0108) 514baa9922SRussell King #define CSR_SDRAMTIMING DC21285_IO(0x010c) 524baa9922SRussell King #define CSR_SDRAMADDRSIZE0 DC21285_IO(0x0110) 534baa9922SRussell King #define CSR_SDRAMADDRSIZE1 DC21285_IO(0x0114) 544baa9922SRussell King #define CSR_SDRAMADDRSIZE2 DC21285_IO(0x0118) 554baa9922SRussell King #define CSR_SDRAMADDRSIZE3 DC21285_IO(0x011c) 564baa9922SRussell King #define CSR_I2O_INFREEHEAD DC21285_IO(0x0120) 574baa9922SRussell King #define CSR_I2O_INPOSTTAIL DC21285_IO(0x0124) 584baa9922SRussell King #define CSR_I2O_OUTPOSTHEAD DC21285_IO(0x0128) 594baa9922SRussell King #define CSR_I2O_OUTFREETAIL DC21285_IO(0x012c) 604baa9922SRussell King #define CSR_I2O_INFREECOUNT DC21285_IO(0x0130) 614baa9922SRussell King #define CSR_I2O_OUTPOSTCOUNT DC21285_IO(0x0134) 624baa9922SRussell King #define CSR_I2O_INPOSTCOUNT DC21285_IO(0x0138) 634baa9922SRussell King #define CSR_SA110_CNTL DC21285_IO(0x013c) 644baa9922SRussell King #define SA110_CNTL_INITCMPLETE (1 << 0) 654baa9922SRussell King #define SA110_CNTL_ASSERTSERR (1 << 1) 664baa9922SRussell King #define SA110_CNTL_RXSERR (1 << 3) 674baa9922SRussell King #define SA110_CNTL_SA110DRAMPARITY (1 << 4) 684baa9922SRussell King #define SA110_CNTL_PCISDRAMPARITY (1 << 5) 694baa9922SRussell King #define SA110_CNTL_DMASDRAMPARITY (1 << 6) 704baa9922SRussell King #define SA110_CNTL_DISCARDTIMER (1 << 8) 714baa9922SRussell King #define SA110_CNTL_PCINRESET (1 << 9) 724baa9922SRussell King #define SA110_CNTL_I2O_256 (0 << 10) 734baa9922SRussell King #define SA110_CNTL_I20_512 (1 << 10) 744baa9922SRussell King #define SA110_CNTL_I2O_1024 (2 << 10) 754baa9922SRussell King #define SA110_CNTL_I2O_2048 (3 << 10) 764baa9922SRussell King #define SA110_CNTL_I2O_4096 (4 << 10) 774baa9922SRussell King #define SA110_CNTL_I2O_8192 (5 << 10) 784baa9922SRussell King #define SA110_CNTL_I2O_16384 (6 << 10) 794baa9922SRussell King #define SA110_CNTL_I2O_32768 (7 << 10) 804baa9922SRussell King #define SA110_CNTL_WATCHDOG (1 << 13) 814baa9922SRussell King #define SA110_CNTL_ROMWIDTH_UNDEF (0 << 14) 824baa9922SRussell King #define SA110_CNTL_ROMWIDTH_16 (1 << 14) 834baa9922SRussell King #define SA110_CNTL_ROMWIDTH_32 (2 << 14) 844baa9922SRussell King #define SA110_CNTL_ROMWIDTH_8 (3 << 14) 854baa9922SRussell King #define SA110_CNTL_ROMACCESSTIME(x) ((x)<<16) 864baa9922SRussell King #define SA110_CNTL_ROMBURSTTIME(x) ((x)<<20) 874baa9922SRussell King #define SA110_CNTL_ROMTRISTATETIME(x) ((x)<<24) 884baa9922SRussell King #define SA110_CNTL_XCSDIR(x) ((x)<<28) 894baa9922SRussell King #define SA110_CNTL_PCICFN (1 << 31) 904baa9922SRussell King 914baa9922SRussell King #define CSR_PCIADDR_EXTN DC21285_IO(0x0140) 924baa9922SRussell King #define CSR_PREFETCHMEMRANGE DC21285_IO(0x0144) 934baa9922SRussell King #define CSR_XBUS_CYCLE DC21285_IO(0x0148) 944baa9922SRussell King #define CSR_XBUS_IOSTROBE DC21285_IO(0x014c) 954baa9922SRussell King #define CSR_DOORBELL_PCI DC21285_IO(0x0150) 964baa9922SRussell King #define CSR_DOORBELL_SA110 DC21285_IO(0x0154) 974baa9922SRussell King #define CSR_UARTDR DC21285_IO(0x0160) 984baa9922SRussell King #define CSR_RXSTAT DC21285_IO(0x0164) 994baa9922SRussell King #define CSR_H_UBRLCR DC21285_IO(0x0168) 1004baa9922SRussell King #define CSR_M_UBRLCR DC21285_IO(0x016c) 1014baa9922SRussell King #define CSR_L_UBRLCR DC21285_IO(0x0170) 1024baa9922SRussell King #define CSR_UARTCON DC21285_IO(0x0174) 1034baa9922SRussell King #define CSR_UARTFLG DC21285_IO(0x0178) 1044baa9922SRussell King #define CSR_IRQ_STATUS DC21285_IO(0x0180) 1054baa9922SRussell King #define CSR_IRQ_RAWSTATUS DC21285_IO(0x0184) 1064baa9922SRussell King #define CSR_IRQ_ENABLE DC21285_IO(0x0188) 1074baa9922SRussell King #define CSR_IRQ_DISABLE DC21285_IO(0x018c) 1084baa9922SRussell King #define CSR_IRQ_SOFT DC21285_IO(0x0190) 1094baa9922SRussell King #define CSR_FIQ_STATUS DC21285_IO(0x0280) 1104baa9922SRussell King #define CSR_FIQ_RAWSTATUS DC21285_IO(0x0284) 1114baa9922SRussell King #define CSR_FIQ_ENABLE DC21285_IO(0x0288) 1124baa9922SRussell King #define CSR_FIQ_DISABLE DC21285_IO(0x028c) 1134baa9922SRussell King #define CSR_FIQ_SOFT DC21285_IO(0x0290) 1144baa9922SRussell King #define CSR_TIMER1_LOAD DC21285_IO(0x0300) 1154baa9922SRussell King #define CSR_TIMER1_VALUE DC21285_IO(0x0304) 1164baa9922SRussell King #define CSR_TIMER1_CNTL DC21285_IO(0x0308) 1174baa9922SRussell King #define CSR_TIMER1_CLR DC21285_IO(0x030c) 1184baa9922SRussell King #define CSR_TIMER2_LOAD DC21285_IO(0x0320) 1194baa9922SRussell King #define CSR_TIMER2_VALUE DC21285_IO(0x0324) 1204baa9922SRussell King #define CSR_TIMER2_CNTL DC21285_IO(0x0328) 1214baa9922SRussell King #define CSR_TIMER2_CLR DC21285_IO(0x032c) 1224baa9922SRussell King #define CSR_TIMER3_LOAD DC21285_IO(0x0340) 1234baa9922SRussell King #define CSR_TIMER3_VALUE DC21285_IO(0x0344) 1244baa9922SRussell King #define CSR_TIMER3_CNTL DC21285_IO(0x0348) 1254baa9922SRussell King #define CSR_TIMER3_CLR DC21285_IO(0x034c) 1264baa9922SRussell King #define CSR_TIMER4_LOAD DC21285_IO(0x0360) 1274baa9922SRussell King #define CSR_TIMER4_VALUE DC21285_IO(0x0364) 1284baa9922SRussell King #define CSR_TIMER4_CNTL DC21285_IO(0x0368) 1294baa9922SRussell King #define CSR_TIMER4_CLR DC21285_IO(0x036c) 1304baa9922SRussell King 1314baa9922SRussell King #define TIMER_CNTL_ENABLE (1 << 7) 1324baa9922SRussell King #define TIMER_CNTL_AUTORELOAD (1 << 6) 1334baa9922SRussell King #define TIMER_CNTL_DIV1 (0) 1344baa9922SRussell King #define TIMER_CNTL_DIV16 (1 << 2) 1354baa9922SRussell King #define TIMER_CNTL_DIV256 (2 << 2) 1364baa9922SRussell King #define TIMER_CNTL_CNTEXT (3 << 2) 1374baa9922SRussell King 1384baa9922SRussell King 139