18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * PCI Register definitions for the MIPS System Controller. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (C) 2004 MIPS Technologies, Inc. All rights reserved. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 78c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 88c2ecf20Sopenharmony_ci * for more details. 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#ifndef __ASM_MIPS_BOARDS_MSC01_IC_H 128c2ecf20Sopenharmony_ci#define __ASM_MIPS_BOARDS_MSC01_IC_H 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci/***************************************************************************** 158c2ecf20Sopenharmony_ci * Register offset addresses 168c2ecf20Sopenharmony_ci *****************************************************************************/ 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#define MSC01_IC_RST_OFS 0x00008 /* Software reset */ 198c2ecf20Sopenharmony_ci#define MSC01_IC_ENAL_OFS 0x00100 /* Int_in enable mask 31:0 */ 208c2ecf20Sopenharmony_ci#define MSC01_IC_ENAH_OFS 0x00108 /* Int_in enable mask 63:32 */ 218c2ecf20Sopenharmony_ci#define MSC01_IC_DISL_OFS 0x00120 /* Int_in disable mask 31:0 */ 228c2ecf20Sopenharmony_ci#define MSC01_IC_DISH_OFS 0x00128 /* Int_in disable mask 63:32 */ 238c2ecf20Sopenharmony_ci#define MSC01_IC_ISBL_OFS 0x00140 /* Raw int_in 31:0 */ 248c2ecf20Sopenharmony_ci#define MSC01_IC_ISBH_OFS 0x00148 /* Raw int_in 63:32 */ 258c2ecf20Sopenharmony_ci#define MSC01_IC_ISAL_OFS 0x00160 /* Masked int_in 31:0 */ 268c2ecf20Sopenharmony_ci#define MSC01_IC_ISAH_OFS 0x00168 /* Masked int_in 63:32 */ 278c2ecf20Sopenharmony_ci#define MSC01_IC_LVL_OFS 0x00180 /* Disable priority int_out */ 288c2ecf20Sopenharmony_ci#define MSC01_IC_RAMW_OFS 0x00180 /* Shadow set RAM (EI) */ 298c2ecf20Sopenharmony_ci#define MSC01_IC_OSB_OFS 0x00188 /* Raw int_out */ 308c2ecf20Sopenharmony_ci#define MSC01_IC_OSA_OFS 0x00190 /* Masked int_out */ 318c2ecf20Sopenharmony_ci#define MSC01_IC_GENA_OFS 0x00198 /* Global HW int enable */ 328c2ecf20Sopenharmony_ci#define MSC01_IC_BASE_OFS 0x001a0 /* Base address of IC_VEC */ 338c2ecf20Sopenharmony_ci#define MSC01_IC_VEC_OFS 0x001b0 /* Active int's vector address */ 348c2ecf20Sopenharmony_ci#define MSC01_IC_EOI_OFS 0x001c0 /* Enable lower level ints */ 358c2ecf20Sopenharmony_ci#define MSC01_IC_CFG_OFS 0x001c8 /* Configuration register */ 368c2ecf20Sopenharmony_ci#define MSC01_IC_TRLD_OFS 0x001d0 /* Interval timer reload val */ 378c2ecf20Sopenharmony_ci#define MSC01_IC_TVAL_OFS 0x001e0 /* Interval timer current val */ 388c2ecf20Sopenharmony_ci#define MSC01_IC_TCFG_OFS 0x001f0 /* Interval timer config */ 398c2ecf20Sopenharmony_ci#define MSC01_IC_SUP_OFS 0x00200 /* Set up int_in line 0 */ 408c2ecf20Sopenharmony_ci#define MSC01_IC_ENA_OFS 0x00800 /* Int_in enable mask 63:0 */ 418c2ecf20Sopenharmony_ci#define MSC01_IC_DIS_OFS 0x00820 /* Int_in disable mask 63:0 */ 428c2ecf20Sopenharmony_ci#define MSC01_IC_ISB_OFS 0x00840 /* Raw int_in 63:0 */ 438c2ecf20Sopenharmony_ci#define MSC01_IC_ISA_OFS 0x00860 /* Masked int_in 63:0 */ 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci/***************************************************************************** 468c2ecf20Sopenharmony_ci * Register field encodings 478c2ecf20Sopenharmony_ci *****************************************************************************/ 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci#define MSC01_IC_RST_RST_SHF 0 508c2ecf20Sopenharmony_ci#define MSC01_IC_RST_RST_MSK 0x00000001 518c2ecf20Sopenharmony_ci#define MSC01_IC_RST_RST_BIT MSC01_IC_RST_RST_MSK 528c2ecf20Sopenharmony_ci#define MSC01_IC_LVL_LVL_SHF 0 538c2ecf20Sopenharmony_ci#define MSC01_IC_LVL_LVL_MSK 0x000000ff 548c2ecf20Sopenharmony_ci#define MSC01_IC_LVL_SPUR_SHF 16 558c2ecf20Sopenharmony_ci#define MSC01_IC_LVL_SPUR_MSK 0x00010000 568c2ecf20Sopenharmony_ci#define MSC01_IC_LVL_SPUR_BIT MSC01_IC_LVL_SPUR_MSK 578c2ecf20Sopenharmony_ci#define MSC01_IC_RAMW_RIPL_SHF 0 588c2ecf20Sopenharmony_ci#define MSC01_IC_RAMW_RIPL_MSK 0x0000003f 598c2ecf20Sopenharmony_ci#define MSC01_IC_RAMW_DATA_SHF 6 608c2ecf20Sopenharmony_ci#define MSC01_IC_RAMW_DATA_MSK 0x00000fc0 618c2ecf20Sopenharmony_ci#define MSC01_IC_RAMW_ADDR_SHF 25 628c2ecf20Sopenharmony_ci#define MSC01_IC_RAMW_ADDR_MSK 0x7e000000 638c2ecf20Sopenharmony_ci#define MSC01_IC_RAMW_READ_SHF 31 648c2ecf20Sopenharmony_ci#define MSC01_IC_RAMW_READ_MSK 0x80000000 658c2ecf20Sopenharmony_ci#define MSC01_IC_RAMW_READ_BIT MSC01_IC_RAMW_READ_MSK 668c2ecf20Sopenharmony_ci#define MSC01_IC_OSB_OSB_SHF 0 678c2ecf20Sopenharmony_ci#define MSC01_IC_OSB_OSB_MSK 0x000000ff 688c2ecf20Sopenharmony_ci#define MSC01_IC_OSA_OSA_SHF 0 698c2ecf20Sopenharmony_ci#define MSC01_IC_OSA_OSA_MSK 0x000000ff 708c2ecf20Sopenharmony_ci#define MSC01_IC_GENA_GENA_SHF 0 718c2ecf20Sopenharmony_ci#define MSC01_IC_GENA_GENA_MSK 0x00000001 728c2ecf20Sopenharmony_ci#define MSC01_IC_GENA_GENA_BIT MSC01_IC_GENA_GENA_MSK 738c2ecf20Sopenharmony_ci#define MSC01_IC_CFG_DIS_SHF 0 748c2ecf20Sopenharmony_ci#define MSC01_IC_CFG_DIS_MSK 0x00000001 758c2ecf20Sopenharmony_ci#define MSC01_IC_CFG_DIS_BIT MSC01_IC_CFG_DIS_MSK 768c2ecf20Sopenharmony_ci#define MSC01_IC_CFG_SHFT_SHF 8 778c2ecf20Sopenharmony_ci#define MSC01_IC_CFG_SHFT_MSK 0x00000f00 788c2ecf20Sopenharmony_ci#define MSC01_IC_TCFG_ENA_SHF 0 798c2ecf20Sopenharmony_ci#define MSC01_IC_TCFG_ENA_MSK 0x00000001 808c2ecf20Sopenharmony_ci#define MSC01_IC_TCFG_ENA_BIT MSC01_IC_TCFG_ENA_MSK 818c2ecf20Sopenharmony_ci#define MSC01_IC_TCFG_INT_SHF 8 828c2ecf20Sopenharmony_ci#define MSC01_IC_TCFG_INT_MSK 0x00000100 838c2ecf20Sopenharmony_ci#define MSC01_IC_TCFG_INT_BIT MSC01_IC_TCFG_INT_MSK 848c2ecf20Sopenharmony_ci#define MSC01_IC_TCFG_EDGE_SHF 16 858c2ecf20Sopenharmony_ci#define MSC01_IC_TCFG_EDGE_MSK 0x00010000 868c2ecf20Sopenharmony_ci#define MSC01_IC_TCFG_EDGE_BIT MSC01_IC_TCFG_EDGE_MSK 878c2ecf20Sopenharmony_ci#define MSC01_IC_SUP_PRI_SHF 0 888c2ecf20Sopenharmony_ci#define MSC01_IC_SUP_PRI_MSK 0x00000007 898c2ecf20Sopenharmony_ci#define MSC01_IC_SUP_EDGE_SHF 8 908c2ecf20Sopenharmony_ci#define MSC01_IC_SUP_EDGE_MSK 0x00000100 918c2ecf20Sopenharmony_ci#define MSC01_IC_SUP_EDGE_BIT MSC01_IC_SUP_EDGE_MSK 928c2ecf20Sopenharmony_ci#define MSC01_IC_SUP_STEP 8 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ci/* 958c2ecf20Sopenharmony_ci * MIPS System controller interrupt register base. 968c2ecf20Sopenharmony_ci * 978c2ecf20Sopenharmony_ci */ 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci/***************************************************************************** 1008c2ecf20Sopenharmony_ci * Absolute register addresses 1018c2ecf20Sopenharmony_ci *****************************************************************************/ 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci#define MSC01_IC_RST (MSC01_IC_REG_BASE + MSC01_IC_RST_OFS) 1048c2ecf20Sopenharmony_ci#define MSC01_IC_ENAL (MSC01_IC_REG_BASE + MSC01_IC_ENAL_OFS) 1058c2ecf20Sopenharmony_ci#define MSC01_IC_ENAH (MSC01_IC_REG_BASE + MSC01_IC_ENAH_OFS) 1068c2ecf20Sopenharmony_ci#define MSC01_IC_DISL (MSC01_IC_REG_BASE + MSC01_IC_DISL_OFS) 1078c2ecf20Sopenharmony_ci#define MSC01_IC_DISH (MSC01_IC_REG_BASE + MSC01_IC_DISH_OFS) 1088c2ecf20Sopenharmony_ci#define MSC01_IC_ISBL (MSC01_IC_REG_BASE + MSC01_IC_ISBL_OFS) 1098c2ecf20Sopenharmony_ci#define MSC01_IC_ISBH (MSC01_IC_REG_BASE + MSC01_IC_ISBH_OFS) 1108c2ecf20Sopenharmony_ci#define MSC01_IC_ISAL (MSC01_IC_REG_BASE + MSC01_IC_ISAL_OFS) 1118c2ecf20Sopenharmony_ci#define MSC01_IC_ISAH (MSC01_IC_REG_BASE + MSC01_IC_ISAH_OFS) 1128c2ecf20Sopenharmony_ci#define MSC01_IC_LVL (MSC01_IC_REG_BASE + MSC01_IC_LVL_OFS) 1138c2ecf20Sopenharmony_ci#define MSC01_IC_RAMW (MSC01_IC_REG_BASE + MSC01_IC_RAMW_OFS) 1148c2ecf20Sopenharmony_ci#define MSC01_IC_OSB (MSC01_IC_REG_BASE + MSC01_IC_OSB_OFS) 1158c2ecf20Sopenharmony_ci#define MSC01_IC_OSA (MSC01_IC_REG_BASE + MSC01_IC_OSA_OFS) 1168c2ecf20Sopenharmony_ci#define MSC01_IC_GENA (MSC01_IC_REG_BASE + MSC01_IC_GENA_OFS) 1178c2ecf20Sopenharmony_ci#define MSC01_IC_BASE (MSC01_IC_REG_BASE + MSC01_IC_BASE_OFS) 1188c2ecf20Sopenharmony_ci#define MSC01_IC_VEC (MSC01_IC_REG_BASE + MSC01_IC_VEC_OFS) 1198c2ecf20Sopenharmony_ci#define MSC01_IC_EOI (MSC01_IC_REG_BASE + MSC01_IC_EOI_OFS) 1208c2ecf20Sopenharmony_ci#define MSC01_IC_CFG (MSC01_IC_REG_BASE + MSC01_IC_CFG_OFS) 1218c2ecf20Sopenharmony_ci#define MSC01_IC_TRLD (MSC01_IC_REG_BASE + MSC01_IC_TRLD_OFS) 1228c2ecf20Sopenharmony_ci#define MSC01_IC_TVAL (MSC01_IC_REG_BASE + MSC01_IC_TVAL_OFS) 1238c2ecf20Sopenharmony_ci#define MSC01_IC_TCFG (MSC01_IC_REG_BASE + MSC01_IC_TCFG_OFS) 1248c2ecf20Sopenharmony_ci#define MSC01_IC_SUP (MSC01_IC_REG_BASE + MSC01_IC_SUP_OFS) 1258c2ecf20Sopenharmony_ci#define MSC01_IC_ENA (MSC01_IC_REG_BASE + MSC01_IC_ENA_OFS) 1268c2ecf20Sopenharmony_ci#define MSC01_IC_DIS (MSC01_IC_REG_BASE + MSC01_IC_DIS_OFS) 1278c2ecf20Sopenharmony_ci#define MSC01_IC_ISB (MSC01_IC_REG_BASE + MSC01_IC_ISB_OFS) 1288c2ecf20Sopenharmony_ci#define MSC01_IC_ISA (MSC01_IC_REG_BASE + MSC01_IC_ISA_OFS) 1298c2ecf20Sopenharmony_ci 1308c2ecf20Sopenharmony_ci/* 1318c2ecf20Sopenharmony_ci * Soc-it interrupts are configurable. 1328c2ecf20Sopenharmony_ci * Every board describes its IRQ mapping with this table. 1338c2ecf20Sopenharmony_ci */ 1348c2ecf20Sopenharmony_citypedef struct msc_irqmap { 1358c2ecf20Sopenharmony_ci int im_irq; 1368c2ecf20Sopenharmony_ci int im_type; 1378c2ecf20Sopenharmony_ci int im_lvl; 1388c2ecf20Sopenharmony_ci} msc_irqmap_t; 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ci/* im_type */ 1418c2ecf20Sopenharmony_ci#define MSC01_IRQ_LEVEL 0 1428c2ecf20Sopenharmony_ci#define MSC01_IRQ_EDGE 1 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ciextern void __init init_msc_irqs(unsigned long icubase, unsigned int base, msc_irqmap_t *imp, int nirq); 1458c2ecf20Sopenharmony_ciextern void ll_msc_irq(void); 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ci#endif /* __ASM_MIPS_BOARDS_MSC01_IC_H */ 148