tsunamireg.h revision 1781
11689SN/A/*
21689SN/A * Copyright (c) 2004-2005 The Regents of The University of Michigan
39919Ssteve.reinhardt@amd.com * All rights reserved.
41689SN/A *
51689SN/A * Redistribution and use in source and binary forms, with or without
61689SN/A * modification, are permitted provided that the following conditions are
71689SN/A * met: redistributions of source code must retain the above copyright
81689SN/A * notice, this list of conditions and the following disclaimer;
91689SN/A * redistributions in binary form must reproduce the above copyright
101689SN/A * notice, this list of conditions and the following disclaimer in the
111689SN/A * documentation and/or other materials provided with the distribution;
121689SN/A * neither the name of the copyright holders nor the names of its
131689SN/A * contributors may be used to endorse or promote products derived from
141689SN/A * this software without specific prior written permission.
151689SN/A *
161689SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
171689SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
181689SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
191689SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
201689SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
211689SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
221689SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
231689SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
241689SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
251689SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
261689SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
271689SN/A */
282665Ssaidi@eecs.umich.edu
292665Ssaidi@eecs.umich.edu/** @file
301689SN/A * List of Tsunami CSRs
311689SN/A */
322292SN/A
332292SN/A#ifndef __TSUNAMIREG_H__
341060SN/A#define __TSUNAMIREG_H__
351060SN/A
361060SN/A#define ALPHA_K0SEG_BASE  ULL(0xfffffc0000000000)
3712105Snathanael.premillieu@arm.com
381060SN/A// CChip Registers
392669Sktlim@umich.edu#define TSDEV_CC_CSR    0x00
401684SN/A#define TSDEV_CC_MTR    0x01
411717SN/A#define TSDEV_CC_MISC   0x02
429919Ssteve.reinhardt@amd.com
438232Snate@binkert.org#define TSDEV_CC_AAR0   0x04
441060SN/A#define TSDEV_CC_AAR1   0x05
451060SN/A#define TSDEV_CC_AAR2   0x06
469919Ssteve.reinhardt@amd.com#define TSDEV_CC_AAR3   0x07
479919Ssteve.reinhardt@amd.com#define TSDEV_CC_DIM0   0x08
489919Ssteve.reinhardt@amd.com#define TSDEV_CC_DIM1   0x09
499919Ssteve.reinhardt@amd.com#define TSDEV_CC_DIR0   0x0A
509919Ssteve.reinhardt@amd.com#define TSDEV_CC_DIR1   0x0B
519919Ssteve.reinhardt@amd.com#define TSDEV_CC_DRIR   0x0C
529919Ssteve.reinhardt@amd.com#define TSDEV_CC_PRBEN  0x0D
539919Ssteve.reinhardt@amd.com#define TSDEV_CC_IIC0   0x0E
549919Ssteve.reinhardt@amd.com#define TSDEV_CC_IIC1   0x0F
559919Ssteve.reinhardt@amd.com#define TSDEV_CC_MPR0   0x10
569919Ssteve.reinhardt@amd.com#define TSDEV_CC_MPR1   0x11
5712105Snathanael.premillieu@arm.com#define TSDEV_CC_MPR2   0x12
589919Ssteve.reinhardt@amd.com#define TSDEV_CC_MPR3   0x13
599919Ssteve.reinhardt@amd.com
609919Ssteve.reinhardt@amd.com#define TSDEV_CC_DIM2   0x18
619919Ssteve.reinhardt@amd.com#define TSDEV_CC_DIM3   0x19
629919Ssteve.reinhardt@amd.com#define TSDEV_CC_DIR2   0x1A
639919Ssteve.reinhardt@amd.com#define TSDEV_CC_DIR3   0x1B
6412105Snathanael.premillieu@arm.com#define TSDEV_CC_IIC2   0x1C
659919Ssteve.reinhardt@amd.com#define TSDEV_CC_IIC3   0x1D
669919Ssteve.reinhardt@amd.com
6712105Snathanael.premillieu@arm.com// BigTsunami Registers
689919Ssteve.reinhardt@amd.com#define TSDEV_CC_BDIMS  0x1000000
699919Ssteve.reinhardt@amd.com#define TSDEV_CC_BDIRS  0x2000000
7012105Snathanael.premillieu@arm.com#define TSDEV_CC_IPIQ   0x20  //0xf01a000800
719919Ssteve.reinhardt@amd.com#define TSDEV_CC_IPIR   0x21  //0xf01a000840
729919Ssteve.reinhardt@amd.com#define TSDEV_CC_ITIR   0x22  //0xf01a000880
739919Ssteve.reinhardt@amd.com
749919Ssteve.reinhardt@amd.com
759919Ssteve.reinhardt@amd.com// PChip Registers
769919Ssteve.reinhardt@amd.com#define TSDEV_PC_WSBA0      0x00
779919Ssteve.reinhardt@amd.com#define TSDEV_PC_WSBA1      0x01
789919Ssteve.reinhardt@amd.com#define TSDEV_PC_WSBA2      0x02
799919Ssteve.reinhardt@amd.com#define TSDEV_PC_WSBA3      0x03
809919Ssteve.reinhardt@amd.com#define TSDEV_PC_WSM0       0x04
819919Ssteve.reinhardt@amd.com#define TSDEV_PC_WSM1       0x05
829919Ssteve.reinhardt@amd.com#define TSDEV_PC_WSM2       0x06
839919Ssteve.reinhardt@amd.com#define TSDEV_PC_WSM3       0x07
841060SN/A#define TSDEV_PC_TBA0       0x08
851060SN/A#define TSDEV_PC_TBA1       0x09
861060SN/A#define TSDEV_PC_TBA2       0x0A
871060SN/A#define TSDEV_PC_TBA3       0x0B
881060SN/A#define TSDEV_PC_PCTL       0x0C
891060SN/A#define TSDEV_PC_PLAT       0x0D
901060SN/A#define TSDEV_PC_RES        0x0E
912292SN/A#define TSDEV_PC_PERROR     0x0F
922292SN/A#define TSDEV_PC_PERRMASK   0x10
932292SN/A#define TSDEV_PC_PERRSET    0x11
941060SN/A#define TSDEV_PC_TLBIV      0x12
951060SN/A#define TSDEV_PC_TLBIA      0x13
969919Ssteve.reinhardt@amd.com#define TSDEV_PC_PMONCTL    0x14
971060SN/A#define TSDEV_PC_PMONCNT    0x15
981060SN/A
999919Ssteve.reinhardt@amd.com#define TSDEV_PC_SPST       0x20
1009919Ssteve.reinhardt@amd.com
1019919Ssteve.reinhardt@amd.com
1029919Ssteve.reinhardt@amd.com// DChip Registers
1039919Ssteve.reinhardt@amd.com#define TSDEV_DC_DSC        0x20
1041060SN/A#define TSDEV_DC_STR        0x21
1059919Ssteve.reinhardt@amd.com#define TSDEV_DC_DREV       0x22
1061060SN/A#define TSDEV_DC_DSC2       0x23
1071060SN/A
1089919Ssteve.reinhardt@amd.com// I/O Ports
1091060SN/A#define TSDEV_PIC1_MASK     0x21
1109920Syasuko.eckert@amd.com#define TSDEV_PIC2_MASK     0xA1
1119920Syasuko.eckert@amd.com#define TSDEV_PIC1_ISR      0x20
1129920Syasuko.eckert@amd.com#define TSDEV_PIC2_ISR      0xA0
1139919Ssteve.reinhardt@amd.com#define TSDEV_PIC1_ACK      0x20
1149919Ssteve.reinhardt@amd.com#define TSDEV_PIC2_ACK      0xA0
1159919Ssteve.reinhardt@amd.com#define TSDEV_DMA1_RESET    0x0D
1169919Ssteve.reinhardt@amd.com#define TSDEV_DMA2_RESET    0xDA
1179919Ssteve.reinhardt@amd.com#define TSDEV_DMA1_MODE     0x0B
1181060SN/A#define TSDEV_DMA2_MODE     0xD6
1199919Ssteve.reinhardt@amd.com#define TSDEV_DMA1_MASK     0x0A
1209919Ssteve.reinhardt@amd.com#define TSDEV_DMA2_MASK     0xD4
1219919Ssteve.reinhardt@amd.com#define TSDEV_TMR_CTL       0x61
1229919Ssteve.reinhardt@amd.com#define TSDEV_TMR2_CTL      0x43
1239919Ssteve.reinhardt@amd.com#define TSDEV_TMR2_DATA     0x42
1249919Ssteve.reinhardt@amd.com#define TSDEV_TMR0_DATA     0x40
1251060SN/A
1261060SN/A/* Added for keyboard accesses */
1272292SN/A#define TSDEV_KBD           0x64
1282292SN/A
1299919Ssteve.reinhardt@amd.com/* Added for ATA PCI DMA */
1309919Ssteve.reinhardt@amd.com#define ATA_PCI_DMA         0x00
1312292SN/A#define ATA_PCI_DMA2        0x02
1329919Ssteve.reinhardt@amd.com#define ATA_PCI_DMA3        0x16
1339919Ssteve.reinhardt@amd.com#define ATA_PCI_DMA4        0x17
1342292SN/A#define ATA_PCI_DMA5        0x1a
1359919Ssteve.reinhardt@amd.com#define ATA_PCI_DMA6        0x11
1361060SN/A#define ATA_PCI_DMA7        0x14
1372292SN/A
1389919Ssteve.reinhardt@amd.com#define TSDEV_RTC_ADDR      0x70
1392292SN/A#define TSDEV_RTC_DATA      0x71
1409920Syasuko.eckert@amd.com
1419920Syasuko.eckert@amd.com#define PCHIP_PCI0_MEMORY       ULL(0x00000000000)
1429920Syasuko.eckert@amd.com#define PCHIP_PCI0_IO           ULL(0x001FC000000)
1432292SN/A#define TSUNAMI_UNCACHABLE_BIT  ULL(0x80000000000)
14412105Snathanael.premillieu@arm.com#define TSUNAMI_PCI0_MEMORY     TSUNAMI_UNCACHABLE_BIT + PCHIP_PCI0_MEMORY
1451060SN/A#define TSUNAMI_PCI0_IO         TSUNAMI_UNCACHABLE_BIT + PCHIP_PCI0_IO
1462292SN/A
14712105Snathanael.premillieu@arm.com
1481060SN/A// UART Defines
1499920Syasuko.eckert@amd.com#define UART_IER_RDI            0x01
15012105Snathanael.premillieu@arm.com#define UART_IER_THRI           0x02
1519920Syasuko.eckert@amd.com#define UART_IER_RLSI           0x04
1522292SN/A
15312105Snathanael.premillieu@arm.com
1541060SN/A#define UART_LSR_TEMT   0x40
1552292SN/A#define UART_LSR_THRE   0x20
15612105Snathanael.premillieu@arm.com#define UART_LSR_DR     0x01
1571060SN/A
1582292SN/A#define UART_MCR_LOOP   0x10
15912105Snathanael.premillieu@arm.com
1601060SN/A#endif // __TSUNAMIREG_H__
1619920Syasuko.eckert@amd.com