Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/bonito Update to rev 1.48 from Algorithmics; a...
details: https://anonhg.NetBSD.org/src/rev/6363107117a1
branches: trunk
changeset: 535433:6363107117a1
user: simonb <simonb%NetBSD.org@localhost>
date: Sun Aug 18 16:00:33 2002 +0000
description:
Update to rev 1.48 from Algorithmics; adds BONITO64 register definitions.
diffstat:
sys/arch/mips/bonito/bonitoreg.h | 106 ++++++++++++++++++++++++++------------
1 files changed, 73 insertions(+), 33 deletions(-)
diffs (253 lines):
diff -r 4ee04f062072 -r 6363107117a1 sys/arch/mips/bonito/bonitoreg.h
--- a/sys/arch/mips/bonito/bonitoreg.h Sun Aug 18 15:57:55 2002 +0000
+++ b/sys/arch/mips/bonito/bonitoreg.h Sun Aug 18 16:00:33 2002 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: bonitoreg.h,v 1.4 2002/01/09 02:35:29 thorpej Exp $ */
+/* $NetBSD: bonitoreg.h,v 1.5 2002/08/18 16:00:33 simonb Exp $ */
/*
- * Bonito Register Map
+ * Bonito Register Map
* Copyright (c) 1999 Algorithmics Ltd
*
* Algorithmics gives permission for anyone to use and modify this file
@@ -10,13 +10,13 @@
*
* Updated copies of this and other files can be found at
* ftp://ftp.algor.co.uk/pub/bonito/
- *
+ *
* Users of the Bonito controller are warmly recommended to contribute
* any useful changes back to Algorithmics (mail to
* bonito%algor.co.uk@localhost).
*/
-/* Revision 1.40 autogenerated on 08/14/99 17:37:43 */
+/* Revision 1.48 autogenerated on 08/17/99 15:20:01 */
#ifndef _BONITO_H_
@@ -26,32 +26,35 @@
#define BONITO_BOOT_BASE 0x1fc00000
#define BONITO_BOOT_SIZE 0x00100000
-#define BONITO_BOOT_TOP (BOOT_BASE+BOOT_SIZE-1)
+#define BONITO_BOOT_TOP (BONITO_BOOT_BASE+BONITO_BOOT_SIZE-1)
#define BONITO_FLASH_BASE 0x1c000000
#define BONITO_FLASH_SIZE 0x03000000
-#define BONITO_FLASH_TOP (FLASH_BASE+FLASH_SIZE-1)
+#define BONITO_FLASH_TOP (BONITO_FLASH_BASE+BONITO_FLASH_SIZE-1)
#define BONITO_SOCKET_BASE 0x1f800000
#define BONITO_SOCKET_SIZE 0x00400000
-#define BONITO_SOCKET_TOP (SOCKET_BASE+SOCKET_SIZE-1)
+#define BONITO_SOCKET_TOP (BONITO_SOCKET_BASE+BONITO_SOCKET_SIZE-1)
#define BONITO_REG_BASE 0x1fe00000
#define BONITO_REG_SIZE 0x00040000
-#define BONITO_REG_TOP (REG_BASE+REG_SIZE-1)
+#define BONITO_REG_TOP (BONITO_REG_BASE+BONITO_REG_SIZE-1)
#define BONITO_DEV_BASE 0x1ff00000
#define BONITO_DEV_SIZE 0x00100000
-#define BONITO_DEV_TOP (DEV_BASE+DEV_SIZE-1)
+#define BONITO_DEV_TOP (BONITO_DEV_BASE+BONITO_DEV_SIZE-1)
#define BONITO_PCILO_BASE 0x10000000
#define BONITO_PCILO_SIZE 0x0c000000
-#define BONITO_PCILO_TOP (PCILO_BASE+PCILO_SIZE-1)
+#define BONITO_PCILO_TOP (BONITO_PCILO_BASE+BONITO_PCILO_SIZE-1)
+#define BONITO_PCILO0_BASE 0x10000000
+#define BONITO_PCILO1_BASE 0x14000000
+#define BONITO_PCILO2_BASE 0x18000000
#define BONITO_PCIHI_BASE 0x20000000
#define BONITO_PCIHI_SIZE 0x20000000
-#define BONITO_PCIHI_TOP (PCIHI_BASE+PCIHI_SIZE-1)
+#define BONITO_PCIHI_TOP (BONITO_PCIHI_BASE+BONITO_PCIHI_SIZE-1)
#define BONITO_PCIIO_BASE 0x1fd00000
#define BONITO_PCIIO_SIZE 0x00100000
-#define BONITO_PCIIO_TOP (PCIIO_BASE+PCIIO_SIZE-1)
+#define BONITO_PCIIO_TOP (BONITO_PCIIO_BASE+BONITO_PCIIO_SIZE-1)
#define BONITO_PCICFG_BASE 0x1fe80000
#define BONITO_PCICFG_SIZE 0x00080000
-#define BONITO_PCICFG_TOP (PCICFG_BASE+PCICFG_SIZE-1)
-
+#define BONITO_PCICFG_TOP (BONITO_PCICFG_BASE+BONITO_PCICFG_SIZE-1)
+
/* Bonito Register Bases */
@@ -61,15 +64,16 @@
/* PCI Configuration Registers */
-#define BONITO_PCIDID BONITO(BONITO_PCICONFIGBASE + 0x00)
-#define BONITO_PCICMD BONITO(BONITO_PCICONFIGBASE + 0x04)
-#define BONITO_PCICLASS BONITO(BONITO_PCICONFIGBASE + 0x08)
-#define BONITO_PCILTIMER BONITO(BONITO_PCICONFIGBASE + 0x0c)
-#define BONITO_PCIBASE0 BONITO(BONITO_PCICONFIGBASE + 0x10)
-#define BONITO_PCIBASE1 BONITO(BONITO_PCICONFIGBASE + 0x14)
-#define BONITO_PCIBASE2 BONITO(BONITO_PCICONFIGBASE + 0x18)
-#define BONITO_PCIEXPRBASE BONITO(BONITO_PCICONFIGBASE + 0x30)
-#define BONITO_PCIINT BONITO(BONITO_PCICONFIGBASE + 0x3c)
+#define BONITO_PCI_REG(x) BONITO(BONITO_PCICONFIGBASE + (x))
+#define BONITO_PCIDID BONITO_PCI_REG(0x00)
+#define BONITO_PCICMD BONITO_PCI_REG(0x04)
+#define BONITO_PCICLASS BONITO_PCI_REG(0x08)
+#define BONITO_PCILTIMER BONITO_PCI_REG(0x0c)
+#define BONITO_PCIBASE0 BONITO_PCI_REG(0x10)
+#define BONITO_PCIBASE1 BONITO_PCI_REG(0x14)
+#define BONITO_PCIBASE2 BONITO_PCI_REG(0x18)
+#define BONITO_PCIEXPRBASE BONITO_PCI_REG(0x30)
+#define BONITO_PCIINT BONITO_PCI_REG(0x3c)
#define BONITO_PCICMD_PERR_CLR 0x80000000
#define BONITO_PCICMD_SERR_CLR 0x40000000
@@ -99,6 +103,7 @@
#define BONITO_BONPONCFG_ROMCS0SAMP 0x00010000
#define BONITO_BONPONCFG_CPUBIGEND 0x00004000
#define BONITO_BONPONCFG_CPUPARITY 0x00002000
+#define BONITO_BONPONCFG_BURSTORDER 0x00001000
#define BONITO_BONPONCFG_CPUTYPE 0x00000007
#define BONITO_BONPONCFG_CPUTYPE_SHIFT 0
#define BONITO_BONPONCFG_PCIRESET_OUT 0x00000008
@@ -120,7 +125,8 @@
/* Other Bonito configuration */
-#define BONITO_BONGENCFG BONITO(BONITO_REGBASE + 0x04)
+#define BONITO_BONGENCFG_OFFSET 0x4
+#define BONITO_BONGENCFG BONITO(BONITO_REGBASE + BONITO_BONGENCFG_OFFSET)
#define BONITO_BONGENCFG_DEBUGMODE 0x00000001
#define BONITO_BONGENCFG_SNOOPEN 0x00000002
@@ -139,8 +145,9 @@
#define BONITO_BONGENCFG_PCIQUEUE 0x00001000
#define BONITO_BONGENCFG_CACHESTOP 0x00002000
#define BONITO_BONGENCFG_MSTRBYTESWAP 0x00004000
-#define BONITO_BONGENCFG_NOTIMEOUT 0x00008000
+#define BONITO_BONGENCFG_BUSERREN 0x00008000
#define BONITO_BONGENCFG_NORETRYTIMEOUT 0x00010000
+#define BONITO_BONGENCFG_SHORTCOPYTIMEOUT 0x00020000
/* 2. IO & IDE configuration */
@@ -157,10 +164,11 @@
#define BONITO_PCIMAP_CFG BONITO(BONITO_REGBASE + 0x18)
/* 5. ICU & GPIO regs */
-
+
/* GPIO Regs - r/w */
-#define BONITO_GPIODATA BONITO(BONITO_REGBASE + 0x1c)
+#define BONITO_GPIODATA_OFFSET 0x1c
+#define BONITO_GPIODATA BONITO(BONITO_REGBASE + BONITO_GPIODATA_OFFSET)
#define BONITO_GPIOIE BONITO(BONITO_REGBASE + 0x20)
/* ICU Configuration Regs - r/w */
@@ -178,6 +186,10 @@
/* PCI mail boxes */
+#define BONITO_PCIMAIL0_OFFSET 0x40
+#define BONITO_PCIMAIL1_OFFSET 0x44
+#define BONITO_PCIMAIL2_OFFSET 0x48
+#define BONITO_PCIMAIL3_OFFSET 0x4c
#define BONITO_PCIMAIL0 BONITO(BONITO_REGBASE + 0x40)
#define BONITO_PCIMAIL1 BONITO(BONITO_REGBASE + 0x44)
#define BONITO_PCIMAIL2 BONITO(BONITO_REGBASE + 0x48)
@@ -199,7 +211,7 @@
*/
/* 7. IDE DMA & Copier */
-
+
#define BONITO_CONFIGBASE 0x000
#define BONITO_BONITOBASE 0x100
#define BONITO_LDMABASE 0x200
@@ -227,9 +239,11 @@
#define BONITO_IDECOPDADDR_DMA_DADDR_SHIFT 2
#define BONITO_IDECOPPADDR_DMA_PADDR 0xfffffffc
#define BONITO_IDECOPPADDR_DMA_PADDR_SHIFT 2
-#define BONITO_IDECOPGO_DMA_SIZE 0x0000ffff
+#define BONITO_IDECOPGO_DMA_SIZE 0x0000fffe
#define BONITO_IDECOPGO_DMA_SIZE_SHIFT 0
#define BONITO_IDECOPGO_DMA_WRITE 0x00010000
+#define BONITO_IDECOPGO_DMAWCOUNT 0x000f0000
+#define BONITO_IDECOPGO_DMAWCOUNT_SHIFT 16
#define BONITO_IDECOPCTRL_DMA_STARTBIT 0x80000000
#define BONITO_IDECOPCTRL_DMA_RSTBIT 0x40000000
@@ -259,9 +273,15 @@
#define BONITO_SDCFG_EXTPRECH 0x00040000
#define BONITO_SDCFG_EXTRASWIDTH 0x00180000
#define BONITO_SDCFG_EXTRASWIDTH_SHIFT 19
-#define BONITO_SDCFG_DRAMRESET 0x00200000
+#define BONITO_SDCFG_DRAMMODESET 0x00200000
#define BONITO_SDCFG_DRAMEXTREGS 0x00400000
-#define BONITO_SDCFG_DRAMCSFLIP 0x00800000
+#define BONITO_SDCFG_DRAMPARITY 0x00800000
+#define BONITO_SDCFG_DRAMBURSTLEN 0x03000000
+#define BONITO_SDCFG_DRAMBURSTLEN_SHIFT 24
+#define BONITO_SDCFG_DRAMMODESET_DONE 0x80000000
+
+#define BONITO_SDCFG_DRAMRFSHMULT 0xfc000000
+#define BONITO_SDCFG_DRAMRFSHMULT_SHIFT 26
/* PCI Cache - pciCacheCtrl */
@@ -295,6 +315,9 @@
#define BONITO_IODEVCFG_DMAON_IDE_SHIFT 16
#define BONITO_IODEVCFG_DMAOFF_IDE 0x01e00000
#define BONITO_IODEVCFG_DMAOFF_IDE_SHIFT 21
+#define BONITO_IODEVCFG_EPROMSPLIT 0x02000000
+#define BONITO_IODEVCFG_CPUCLOCKPERIOD 0xfc000000
+#define BONITO_IODEVCFG_CPUCLOCKPERIOD_SHIFT 26
/* gpio */
#define BONITO_GPIO_GPIOW 0x000003ff
@@ -337,10 +360,15 @@
#define BONITO_PCIMAP_PCIMAP_LO2 0x0003f000
#define BONITO_PCIMAP_PCIMAP_LO2_SHIFT 12
#define BONITO_PCIMAP_PCIMAP_2 0x00040000
-#define BONITO_PCIMAP_WIN(WIN,ADDR) ((((ADDR)>>26) & BONITO_PCIMAP_PCIMAP_LO0) << (WIN)*6)
+#define BONITO_PCIMAP_WIN(WIN,ADDR) ((((ADDR)>>26) & BONITO_PCIMAP_PCIMAP_LO0) << ((WIN)*6))
+
+#define BONITO_PCIMAP_WINSIZE (1<<26)
+#define BONITO_PCIMAP_WINOFFSET(ADDR) ((ADDR) & (BONITO_PCIMAP_WINSIZE - 1))
+#define BONITO_PCIMAP_WINBASE(ADDR) ((ADDR) << 26)
/* pcimembaseCfg */
+#define BONITO_PCIMEMBASECFG_MASK 0xf0000000
#define BONITO_PCIMEMBASECFG_MEMBASE0_MASK 0x0000001f
#define BONITO_PCIMEMBASECFG_MEMBASE0_MASK_SHIFT 0
#define BONITO_PCIMEMBASECFG_MEMBASE0_TRANS 0x000003e0
@@ -356,12 +384,23 @@
#define BONITO_PCIMEMBASECFG_MEMBASE1_IO 0x00800000
#define BONITO_PCIMEMBASECFG_ASHIFT 23
+#define BONITO_PCIMEMBASECFG_AMASK 0x007fffff
#define BONITO_PCIMEMBASECFGSIZE(WIN,SIZE) (((~((SIZE)-1))>>(BONITO_PCIMEMBASECFG_ASHIFT-BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK)
#define BONITO_PCIMEMBASECFGBASE(WIN,BASE) (((BASE)>>(BONITO_PCIMEMBASECFG_ASHIFT-BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS_SHIFT)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS)
+#define BONITO_PCIMEMBASECFG_SIZE(WIN,CFG) (((((~(CFG)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK)) << (BONITO_PCIMEMBASECFG_ASHIFT - BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT)) |
BONITO_PCIMEMBASECFG_AMASK)
+
+#define BONITO_PCIMEMBASECFG_ADDRMASK(WIN,CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT)
+#define BONITO_PCIMEMBASECFG_ADDRMASK(WIN,CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT)
+#define BONITO_PCIMEMBASECFG_ADDRTRANS(WIN,CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT)
+
+#define BONITO_PCITOPHYS(WIN,ADDR,CFG) ( \
+ (((ADDR) & (~(BONITO_PCIMEMBASECFG_MASK))) & (~(BONITO_PCIMEMBASECFG_ADDRMASK(WIN,CFG)))) | \
+ (BONITO_PCIMEMBASECFG_ADDRTRANS(WIN,CFG)) \
+ )
/* PCIMAP Cfg */
-#define BONITO_PCIMAPCFG_TYPE1 0x00010000
+#define BONITO_PCIMAPCFG_TYPE1 0x00010000
/* PCICmd */
@@ -369,4 +408,5 @@
#define BONITO_PCICMD_MSTREN 0x00000004
+#define BONITO_TIMERCFG BONITO(BONITO_REGBASE + 0x60)
#endif /* _BONITO_H_ */
Home |
Main Index |
Thread Index |
Old Index