18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Register definitions for IXP4xx chipset. This file contains 68c2ecf20Sopenharmony_ci * register location and bit definitions only. Platform specific 78c2ecf20Sopenharmony_ci * definitions and helper function declarations are in platform.h 88c2ecf20Sopenharmony_ci * and machine-name.h. 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * Copyright (C) 2002 Intel Corporation. 118c2ecf20Sopenharmony_ci * Copyright (C) 2003-2004 MontaVista Software, Inc. 128c2ecf20Sopenharmony_ci */ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#ifndef _ASM_ARM_IXP4XX_H_ 158c2ecf20Sopenharmony_ci#define _ASM_ARM_IXP4XX_H_ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci/* 188c2ecf20Sopenharmony_ci * IXP4xx Linux Memory Map: 198c2ecf20Sopenharmony_ci * 208c2ecf20Sopenharmony_ci * Phy Size Virt Description 218c2ecf20Sopenharmony_ci * ========================================================================= 228c2ecf20Sopenharmony_ci * 238c2ecf20Sopenharmony_ci * 0x00000000 0x10000000(max) PAGE_OFFSET System RAM 248c2ecf20Sopenharmony_ci * 258c2ecf20Sopenharmony_ci * 0x48000000 0x04000000 ioremap'd PCI Memory Space 268c2ecf20Sopenharmony_ci * 278c2ecf20Sopenharmony_ci * 0x50000000 0x10000000 ioremap'd EXP BUS 288c2ecf20Sopenharmony_ci * 298c2ecf20Sopenharmony_ci * 0xC8000000 0x00013000 0xFEF00000 On-Chip Peripherals 308c2ecf20Sopenharmony_ci * 318c2ecf20Sopenharmony_ci * 0xC0000000 0x00001000 0xFEF13000 PCI CFG 328c2ecf20Sopenharmony_ci * 338c2ecf20Sopenharmony_ci * 0xC4000000 0x00001000 0xFEF14000 EXP CFG 348c2ecf20Sopenharmony_ci * 358c2ecf20Sopenharmony_ci * 0x60000000 0x00004000 0xFEF15000 QMgr 368c2ecf20Sopenharmony_ci */ 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci/* 398c2ecf20Sopenharmony_ci * Queue Manager 408c2ecf20Sopenharmony_ci */ 418c2ecf20Sopenharmony_ci#define IXP4XX_QMGR_BASE_PHYS 0x60000000 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci/* 448c2ecf20Sopenharmony_ci * Peripheral space, including debug UART. Must be section-aligned so that 458c2ecf20Sopenharmony_ci * it can be used with the low-level debug code. 468c2ecf20Sopenharmony_ci */ 478c2ecf20Sopenharmony_ci#define IXP4XX_PERIPHERAL_BASE_PHYS 0xC8000000 488c2ecf20Sopenharmony_ci#define IXP4XX_PERIPHERAL_BASE_VIRT IOMEM(0xFEF00000) 498c2ecf20Sopenharmony_ci#define IXP4XX_PERIPHERAL_REGION_SIZE 0x00013000 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci/* 528c2ecf20Sopenharmony_ci * PCI Config registers 538c2ecf20Sopenharmony_ci */ 548c2ecf20Sopenharmony_ci#define IXP4XX_PCI_CFG_BASE_PHYS 0xC0000000 558c2ecf20Sopenharmony_ci#define IXP4XX_PCI_CFG_BASE_VIRT IOMEM(0xFEF13000) 568c2ecf20Sopenharmony_ci#define IXP4XX_PCI_CFG_REGION_SIZE 0x00001000 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci/* 598c2ecf20Sopenharmony_ci * Expansion BUS Configuration registers 608c2ecf20Sopenharmony_ci */ 618c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CFG_BASE_PHYS 0xC4000000 628c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CFG_BASE_VIRT 0xFEF14000 638c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CFG_REGION_SIZE 0x00001000 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS0_OFFSET 0x00 668c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS1_OFFSET 0x04 678c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS2_OFFSET 0x08 688c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS3_OFFSET 0x0C 698c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS4_OFFSET 0x10 708c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS5_OFFSET 0x14 718c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS6_OFFSET 0x18 728c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS7_OFFSET 0x1C 738c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CFG0_OFFSET 0x20 748c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CFG1_OFFSET 0x24 758c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CFG2_OFFSET 0x28 768c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CFG3_OFFSET 0x2C 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ci/* 798c2ecf20Sopenharmony_ci * Expansion Bus Controller registers. 808c2ecf20Sopenharmony_ci */ 818c2ecf20Sopenharmony_ci#define IXP4XX_EXP_REG(x) ((volatile u32 __iomem *)(IXP4XX_EXP_CFG_BASE_VIRT+(x))) 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS0 IXP4XX_EXP_REG(IXP4XX_EXP_CS0_OFFSET) 848c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS1 IXP4XX_EXP_REG(IXP4XX_EXP_CS1_OFFSET) 858c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS2 IXP4XX_EXP_REG(IXP4XX_EXP_CS2_OFFSET) 868c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS3 IXP4XX_EXP_REG(IXP4XX_EXP_CS3_OFFSET) 878c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS4 IXP4XX_EXP_REG(IXP4XX_EXP_CS4_OFFSET) 888c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS5 IXP4XX_EXP_REG(IXP4XX_EXP_CS5_OFFSET) 898c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS6 IXP4XX_EXP_REG(IXP4XX_EXP_CS6_OFFSET) 908c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CS7 IXP4XX_EXP_REG(IXP4XX_EXP_CS7_OFFSET) 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CFG0 IXP4XX_EXP_REG(IXP4XX_EXP_CFG0_OFFSET) 938c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CFG1 IXP4XX_EXP_REG(IXP4XX_EXP_CFG1_OFFSET) 948c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CFG2 IXP4XX_EXP_REG(IXP4XX_EXP_CFG2_OFFSET) 958c2ecf20Sopenharmony_ci#define IXP4XX_EXP_CFG3 IXP4XX_EXP_REG(IXP4XX_EXP_CFG3_OFFSET) 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci/* 998c2ecf20Sopenharmony_ci * Peripheral Space Register Region Base Addresses 1008c2ecf20Sopenharmony_ci */ 1018c2ecf20Sopenharmony_ci#define IXP4XX_UART1_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x0000) 1028c2ecf20Sopenharmony_ci#define IXP4XX_UART2_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x1000) 1038c2ecf20Sopenharmony_ci#define IXP4XX_PMU_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x2000) 1048c2ecf20Sopenharmony_ci#define IXP4XX_INTC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x3000) 1058c2ecf20Sopenharmony_ci#define IXP4XX_GPIO_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x4000) 1068c2ecf20Sopenharmony_ci#define IXP4XX_TIMER_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x5000) 1078c2ecf20Sopenharmony_ci#define IXP4XX_NPEA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x6000) 1088c2ecf20Sopenharmony_ci#define IXP4XX_NPEB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x7000) 1098c2ecf20Sopenharmony_ci#define IXP4XX_NPEC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x8000) 1108c2ecf20Sopenharmony_ci#define IXP4XX_EthB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000) 1118c2ecf20Sopenharmony_ci#define IXP4XX_EthC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000) 1128c2ecf20Sopenharmony_ci#define IXP4XX_USB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xB000) 1138c2ecf20Sopenharmony_ci/* ixp46X only */ 1148c2ecf20Sopenharmony_ci#define IXP4XX_EthA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xC000) 1158c2ecf20Sopenharmony_ci#define IXP4XX_EthB1_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xD000) 1168c2ecf20Sopenharmony_ci#define IXP4XX_EthB2_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xE000) 1178c2ecf20Sopenharmony_ci#define IXP4XX_EthB3_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xF000) 1188c2ecf20Sopenharmony_ci#define IXP4XX_TIMESYNC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x10000) 1198c2ecf20Sopenharmony_ci#define IXP4XX_I2C_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x11000) 1208c2ecf20Sopenharmony_ci#define IXP4XX_SSP_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x12000) 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ci#define IXP4XX_UART1_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x0000) 1248c2ecf20Sopenharmony_ci#define IXP4XX_UART2_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x1000) 1258c2ecf20Sopenharmony_ci#define IXP4XX_PMU_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x2000) 1268c2ecf20Sopenharmony_ci#define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000) 1278c2ecf20Sopenharmony_ci#define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000) 1288c2ecf20Sopenharmony_ci#define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000) 1298c2ecf20Sopenharmony_ci#define IXP4XX_EthB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000) 1308c2ecf20Sopenharmony_ci#define IXP4XX_EthC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000) 1318c2ecf20Sopenharmony_ci#define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000) 1328c2ecf20Sopenharmony_ci/* ixp46X only */ 1338c2ecf20Sopenharmony_ci#define IXP4XX_EthA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xC000) 1348c2ecf20Sopenharmony_ci#define IXP4XX_EthB1_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xD000) 1358c2ecf20Sopenharmony_ci#define IXP4XX_EthB2_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xE000) 1368c2ecf20Sopenharmony_ci#define IXP4XX_EthB3_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xF000) 1378c2ecf20Sopenharmony_ci#define IXP4XX_TIMESYNC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x10000) 1388c2ecf20Sopenharmony_ci#define IXP4XX_I2C_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x11000) 1398c2ecf20Sopenharmony_ci#define IXP4XX_SSP_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x12000) 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci/* 1428c2ecf20Sopenharmony_ci * Constants to make it easy to access Timer Control/Status registers 1438c2ecf20Sopenharmony_ci */ 1448c2ecf20Sopenharmony_ci#define IXP4XX_OSTS_OFFSET 0x00 /* Continious TimeStamp */ 1458c2ecf20Sopenharmony_ci#define IXP4XX_OST1_OFFSET 0x04 /* Timer 1 Timestamp */ 1468c2ecf20Sopenharmony_ci#define IXP4XX_OSRT1_OFFSET 0x08 /* Timer 1 Reload */ 1478c2ecf20Sopenharmony_ci#define IXP4XX_OST2_OFFSET 0x0C /* Timer 2 Timestamp */ 1488c2ecf20Sopenharmony_ci#define IXP4XX_OSRT2_OFFSET 0x10 /* Timer 2 Reload */ 1498c2ecf20Sopenharmony_ci#define IXP4XX_OSWT_OFFSET 0x14 /* Watchdog Timer */ 1508c2ecf20Sopenharmony_ci#define IXP4XX_OSWE_OFFSET 0x18 /* Watchdog Enable */ 1518c2ecf20Sopenharmony_ci#define IXP4XX_OSWK_OFFSET 0x1C /* Watchdog Key */ 1528c2ecf20Sopenharmony_ci#define IXP4XX_OSST_OFFSET 0x20 /* Timer Status */ 1538c2ecf20Sopenharmony_ci 1548c2ecf20Sopenharmony_ci/* 1558c2ecf20Sopenharmony_ci * Operating System Timer Register Definitions. 1568c2ecf20Sopenharmony_ci */ 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci#define IXP4XX_TIMER_REG(x) ((volatile u32 *)(IXP4XX_TIMER_BASE_VIRT+(x))) 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_ci#define IXP4XX_OSTS IXP4XX_TIMER_REG(IXP4XX_OSTS_OFFSET) 1618c2ecf20Sopenharmony_ci#define IXP4XX_OST1 IXP4XX_TIMER_REG(IXP4XX_OST1_OFFSET) 1628c2ecf20Sopenharmony_ci#define IXP4XX_OSRT1 IXP4XX_TIMER_REG(IXP4XX_OSRT1_OFFSET) 1638c2ecf20Sopenharmony_ci#define IXP4XX_OST2 IXP4XX_TIMER_REG(IXP4XX_OST2_OFFSET) 1648c2ecf20Sopenharmony_ci#define IXP4XX_OSRT2 IXP4XX_TIMER_REG(IXP4XX_OSRT2_OFFSET) 1658c2ecf20Sopenharmony_ci#define IXP4XX_OSWT IXP4XX_TIMER_REG(IXP4XX_OSWT_OFFSET) 1668c2ecf20Sopenharmony_ci#define IXP4XX_OSWE IXP4XX_TIMER_REG(IXP4XX_OSWE_OFFSET) 1678c2ecf20Sopenharmony_ci#define IXP4XX_OSWK IXP4XX_TIMER_REG(IXP4XX_OSWK_OFFSET) 1688c2ecf20Sopenharmony_ci#define IXP4XX_OSST IXP4XX_TIMER_REG(IXP4XX_OSST_OFFSET) 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ci/* 1718c2ecf20Sopenharmony_ci * Timer register values and bit definitions 1728c2ecf20Sopenharmony_ci */ 1738c2ecf20Sopenharmony_ci#define IXP4XX_OST_ENABLE 0x00000001 1748c2ecf20Sopenharmony_ci#define IXP4XX_OST_ONE_SHOT 0x00000002 1758c2ecf20Sopenharmony_ci/* Low order bits of reload value ignored */ 1768c2ecf20Sopenharmony_ci#define IXP4XX_OST_RELOAD_MASK 0x00000003 1778c2ecf20Sopenharmony_ci#define IXP4XX_OST_DISABLED 0x00000000 1788c2ecf20Sopenharmony_ci#define IXP4XX_OSST_TIMER_1_PEND 0x00000001 1798c2ecf20Sopenharmony_ci#define IXP4XX_OSST_TIMER_2_PEND 0x00000002 1808c2ecf20Sopenharmony_ci#define IXP4XX_OSST_TIMER_TS_PEND 0x00000004 1818c2ecf20Sopenharmony_ci#define IXP4XX_OSST_TIMER_WDOG_PEND 0x00000008 1828c2ecf20Sopenharmony_ci#define IXP4XX_OSST_TIMER_WARM_RESET 0x00000010 1838c2ecf20Sopenharmony_ci 1848c2ecf20Sopenharmony_ci#define IXP4XX_WDT_KEY 0x0000482E 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ci#define IXP4XX_WDT_RESET_ENABLE 0x00000001 1878c2ecf20Sopenharmony_ci#define IXP4XX_WDT_IRQ_ENABLE 0x00000002 1888c2ecf20Sopenharmony_ci#define IXP4XX_WDT_COUNT_ENABLE 0x00000004 1898c2ecf20Sopenharmony_ci 1908c2ecf20Sopenharmony_ci 1918c2ecf20Sopenharmony_ci/* 1928c2ecf20Sopenharmony_ci * Constants to make it easy to access PCI Control/Status registers 1938c2ecf20Sopenharmony_ci */ 1948c2ecf20Sopenharmony_ci#define PCI_NP_AD_OFFSET 0x00 1958c2ecf20Sopenharmony_ci#define PCI_NP_CBE_OFFSET 0x04 1968c2ecf20Sopenharmony_ci#define PCI_NP_WDATA_OFFSET 0x08 1978c2ecf20Sopenharmony_ci#define PCI_NP_RDATA_OFFSET 0x0c 1988c2ecf20Sopenharmony_ci#define PCI_CRP_AD_CBE_OFFSET 0x10 1998c2ecf20Sopenharmony_ci#define PCI_CRP_WDATA_OFFSET 0x14 2008c2ecf20Sopenharmony_ci#define PCI_CRP_RDATA_OFFSET 0x18 2018c2ecf20Sopenharmony_ci#define PCI_CSR_OFFSET 0x1c 2028c2ecf20Sopenharmony_ci#define PCI_ISR_OFFSET 0x20 2038c2ecf20Sopenharmony_ci#define PCI_INTEN_OFFSET 0x24 2048c2ecf20Sopenharmony_ci#define PCI_DMACTRL_OFFSET 0x28 2058c2ecf20Sopenharmony_ci#define PCI_AHBMEMBASE_OFFSET 0x2c 2068c2ecf20Sopenharmony_ci#define PCI_AHBIOBASE_OFFSET 0x30 2078c2ecf20Sopenharmony_ci#define PCI_PCIMEMBASE_OFFSET 0x34 2088c2ecf20Sopenharmony_ci#define PCI_AHBDOORBELL_OFFSET 0x38 2098c2ecf20Sopenharmony_ci#define PCI_PCIDOORBELL_OFFSET 0x3C 2108c2ecf20Sopenharmony_ci#define PCI_ATPDMA0_AHBADDR_OFFSET 0x40 2118c2ecf20Sopenharmony_ci#define PCI_ATPDMA0_PCIADDR_OFFSET 0x44 2128c2ecf20Sopenharmony_ci#define PCI_ATPDMA0_LENADDR_OFFSET 0x48 2138c2ecf20Sopenharmony_ci#define PCI_ATPDMA1_AHBADDR_OFFSET 0x4C 2148c2ecf20Sopenharmony_ci#define PCI_ATPDMA1_PCIADDR_OFFSET 0x50 2158c2ecf20Sopenharmony_ci#define PCI_ATPDMA1_LENADDR_OFFSET 0x54 2168c2ecf20Sopenharmony_ci 2178c2ecf20Sopenharmony_ci/* 2188c2ecf20Sopenharmony_ci * PCI Control/Status Registers 2198c2ecf20Sopenharmony_ci */ 2208c2ecf20Sopenharmony_ci#define IXP4XX_PCI_CSR(x) ((volatile u32 *)(IXP4XX_PCI_CFG_BASE_VIRT+(x))) 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_ci#define PCI_NP_AD IXP4XX_PCI_CSR(PCI_NP_AD_OFFSET) 2238c2ecf20Sopenharmony_ci#define PCI_NP_CBE IXP4XX_PCI_CSR(PCI_NP_CBE_OFFSET) 2248c2ecf20Sopenharmony_ci#define PCI_NP_WDATA IXP4XX_PCI_CSR(PCI_NP_WDATA_OFFSET) 2258c2ecf20Sopenharmony_ci#define PCI_NP_RDATA IXP4XX_PCI_CSR(PCI_NP_RDATA_OFFSET) 2268c2ecf20Sopenharmony_ci#define PCI_CRP_AD_CBE IXP4XX_PCI_CSR(PCI_CRP_AD_CBE_OFFSET) 2278c2ecf20Sopenharmony_ci#define PCI_CRP_WDATA IXP4XX_PCI_CSR(PCI_CRP_WDATA_OFFSET) 2288c2ecf20Sopenharmony_ci#define PCI_CRP_RDATA IXP4XX_PCI_CSR(PCI_CRP_RDATA_OFFSET) 2298c2ecf20Sopenharmony_ci#define PCI_CSR IXP4XX_PCI_CSR(PCI_CSR_OFFSET) 2308c2ecf20Sopenharmony_ci#define PCI_ISR IXP4XX_PCI_CSR(PCI_ISR_OFFSET) 2318c2ecf20Sopenharmony_ci#define PCI_INTEN IXP4XX_PCI_CSR(PCI_INTEN_OFFSET) 2328c2ecf20Sopenharmony_ci#define PCI_DMACTRL IXP4XX_PCI_CSR(PCI_DMACTRL_OFFSET) 2338c2ecf20Sopenharmony_ci#define PCI_AHBMEMBASE IXP4XX_PCI_CSR(PCI_AHBMEMBASE_OFFSET) 2348c2ecf20Sopenharmony_ci#define PCI_AHBIOBASE IXP4XX_PCI_CSR(PCI_AHBIOBASE_OFFSET) 2358c2ecf20Sopenharmony_ci#define PCI_PCIMEMBASE IXP4XX_PCI_CSR(PCI_PCIMEMBASE_OFFSET) 2368c2ecf20Sopenharmony_ci#define PCI_AHBDOORBELL IXP4XX_PCI_CSR(PCI_AHBDOORBELL_OFFSET) 2378c2ecf20Sopenharmony_ci#define PCI_PCIDOORBELL IXP4XX_PCI_CSR(PCI_PCIDOORBELL_OFFSET) 2388c2ecf20Sopenharmony_ci#define PCI_ATPDMA0_AHBADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_AHBADDR_OFFSET) 2398c2ecf20Sopenharmony_ci#define PCI_ATPDMA0_PCIADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_PCIADDR_OFFSET) 2408c2ecf20Sopenharmony_ci#define PCI_ATPDMA0_LENADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_LENADDR_OFFSET) 2418c2ecf20Sopenharmony_ci#define PCI_ATPDMA1_AHBADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_AHBADDR_OFFSET) 2428c2ecf20Sopenharmony_ci#define PCI_ATPDMA1_PCIADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_PCIADDR_OFFSET) 2438c2ecf20Sopenharmony_ci#define PCI_ATPDMA1_LENADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_LENADDR_OFFSET) 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ci/* 2468c2ecf20Sopenharmony_ci * PCI register values and bit definitions 2478c2ecf20Sopenharmony_ci */ 2488c2ecf20Sopenharmony_ci 2498c2ecf20Sopenharmony_ci/* CSR bit definitions */ 2508c2ecf20Sopenharmony_ci#define PCI_CSR_HOST 0x00000001 2518c2ecf20Sopenharmony_ci#define PCI_CSR_ARBEN 0x00000002 2528c2ecf20Sopenharmony_ci#define PCI_CSR_ADS 0x00000004 2538c2ecf20Sopenharmony_ci#define PCI_CSR_PDS 0x00000008 2548c2ecf20Sopenharmony_ci#define PCI_CSR_ABE 0x00000010 2558c2ecf20Sopenharmony_ci#define PCI_CSR_DBT 0x00000020 2568c2ecf20Sopenharmony_ci#define PCI_CSR_ASE 0x00000100 2578c2ecf20Sopenharmony_ci#define PCI_CSR_IC 0x00008000 2588c2ecf20Sopenharmony_ci 2598c2ecf20Sopenharmony_ci/* ISR (Interrupt status) Register bit definitions */ 2608c2ecf20Sopenharmony_ci#define PCI_ISR_PSE 0x00000001 2618c2ecf20Sopenharmony_ci#define PCI_ISR_PFE 0x00000002 2628c2ecf20Sopenharmony_ci#define PCI_ISR_PPE 0x00000004 2638c2ecf20Sopenharmony_ci#define PCI_ISR_AHBE 0x00000008 2648c2ecf20Sopenharmony_ci#define PCI_ISR_APDC 0x00000010 2658c2ecf20Sopenharmony_ci#define PCI_ISR_PADC 0x00000020 2668c2ecf20Sopenharmony_ci#define PCI_ISR_ADB 0x00000040 2678c2ecf20Sopenharmony_ci#define PCI_ISR_PDB 0x00000080 2688c2ecf20Sopenharmony_ci 2698c2ecf20Sopenharmony_ci/* INTEN (Interrupt Enable) Register bit definitions */ 2708c2ecf20Sopenharmony_ci#define PCI_INTEN_PSE 0x00000001 2718c2ecf20Sopenharmony_ci#define PCI_INTEN_PFE 0x00000002 2728c2ecf20Sopenharmony_ci#define PCI_INTEN_PPE 0x00000004 2738c2ecf20Sopenharmony_ci#define PCI_INTEN_AHBE 0x00000008 2748c2ecf20Sopenharmony_ci#define PCI_INTEN_APDC 0x00000010 2758c2ecf20Sopenharmony_ci#define PCI_INTEN_PADC 0x00000020 2768c2ecf20Sopenharmony_ci#define PCI_INTEN_ADB 0x00000040 2778c2ecf20Sopenharmony_ci#define PCI_INTEN_PDB 0x00000080 2788c2ecf20Sopenharmony_ci 2798c2ecf20Sopenharmony_ci/* 2808c2ecf20Sopenharmony_ci * Shift value for byte enable on NP cmd/byte enable register 2818c2ecf20Sopenharmony_ci */ 2828c2ecf20Sopenharmony_ci#define IXP4XX_PCI_NP_CBE_BESL 4 2838c2ecf20Sopenharmony_ci 2848c2ecf20Sopenharmony_ci/* 2858c2ecf20Sopenharmony_ci * PCI commands supported by NP access unit 2868c2ecf20Sopenharmony_ci */ 2878c2ecf20Sopenharmony_ci#define NP_CMD_IOREAD 0x2 2888c2ecf20Sopenharmony_ci#define NP_CMD_IOWRITE 0x3 2898c2ecf20Sopenharmony_ci#define NP_CMD_CONFIGREAD 0xa 2908c2ecf20Sopenharmony_ci#define NP_CMD_CONFIGWRITE 0xb 2918c2ecf20Sopenharmony_ci#define NP_CMD_MEMREAD 0x6 2928c2ecf20Sopenharmony_ci#define NP_CMD_MEMWRITE 0x7 2938c2ecf20Sopenharmony_ci 2948c2ecf20Sopenharmony_ci/* 2958c2ecf20Sopenharmony_ci * Constants for CRP access into local config space 2968c2ecf20Sopenharmony_ci */ 2978c2ecf20Sopenharmony_ci#define CRP_AD_CBE_BESL 20 2988c2ecf20Sopenharmony_ci#define CRP_AD_CBE_WRITE 0x00010000 2998c2ecf20Sopenharmony_ci 3008c2ecf20Sopenharmony_ci#define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */ 3018c2ecf20Sopenharmony_ci 3028c2ecf20Sopenharmony_ci/* "fuse" bits of IXP_EXP_CFG2 */ 3038c2ecf20Sopenharmony_ci/* All IXP4xx CPUs */ 3048c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_RCOMP (1 << 0) 3058c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_USB_DEVICE (1 << 1) 3068c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_HASH (1 << 2) 3078c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_AES (1 << 3) 3088c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_DES (1 << 4) 3098c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_HDLC (1 << 5) 3108c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_AAL (1 << 6) 3118c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_HSS (1 << 7) 3128c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_UTOPIA (1 << 8) 3138c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_NPEB_ETH0 (1 << 9) 3148c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_NPEC_ETH (1 << 10) 3158c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_RESET_NPEA (1 << 11) 3168c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_RESET_NPEB (1 << 12) 3178c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_RESET_NPEC (1 << 13) 3188c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_PCI (1 << 14) 3198c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_UTOPIA_PHY_LIMIT (3 << 16) 3208c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_XSCALE_MAX_FREQ (3 << 22) 3218c2ecf20Sopenharmony_ci#define IXP42X_FEATURE_MASK (IXP4XX_FEATURE_RCOMP | \ 3228c2ecf20Sopenharmony_ci IXP4XX_FEATURE_USB_DEVICE | \ 3238c2ecf20Sopenharmony_ci IXP4XX_FEATURE_HASH | \ 3248c2ecf20Sopenharmony_ci IXP4XX_FEATURE_AES | \ 3258c2ecf20Sopenharmony_ci IXP4XX_FEATURE_DES | \ 3268c2ecf20Sopenharmony_ci IXP4XX_FEATURE_HDLC | \ 3278c2ecf20Sopenharmony_ci IXP4XX_FEATURE_AAL | \ 3288c2ecf20Sopenharmony_ci IXP4XX_FEATURE_HSS | \ 3298c2ecf20Sopenharmony_ci IXP4XX_FEATURE_UTOPIA | \ 3308c2ecf20Sopenharmony_ci IXP4XX_FEATURE_NPEB_ETH0 | \ 3318c2ecf20Sopenharmony_ci IXP4XX_FEATURE_NPEC_ETH | \ 3328c2ecf20Sopenharmony_ci IXP4XX_FEATURE_RESET_NPEA | \ 3338c2ecf20Sopenharmony_ci IXP4XX_FEATURE_RESET_NPEB | \ 3348c2ecf20Sopenharmony_ci IXP4XX_FEATURE_RESET_NPEC | \ 3358c2ecf20Sopenharmony_ci IXP4XX_FEATURE_PCI | \ 3368c2ecf20Sopenharmony_ci IXP4XX_FEATURE_UTOPIA_PHY_LIMIT | \ 3378c2ecf20Sopenharmony_ci IXP4XX_FEATURE_XSCALE_MAX_FREQ) 3388c2ecf20Sopenharmony_ci 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_ci/* IXP43x/46x CPUs */ 3418c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_ECC_TIMESYNC (1 << 15) 3428c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_USB_HOST (1 << 18) 3438c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_NPEA_ETH (1 << 19) 3448c2ecf20Sopenharmony_ci#define IXP43X_FEATURE_MASK (IXP42X_FEATURE_MASK | \ 3458c2ecf20Sopenharmony_ci IXP4XX_FEATURE_ECC_TIMESYNC | \ 3468c2ecf20Sopenharmony_ci IXP4XX_FEATURE_USB_HOST | \ 3478c2ecf20Sopenharmony_ci IXP4XX_FEATURE_NPEA_ETH) 3488c2ecf20Sopenharmony_ci 3498c2ecf20Sopenharmony_ci/* IXP46x CPU (including IXP455) only */ 3508c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_NPEB_ETH_1_TO_3 (1 << 20) 3518c2ecf20Sopenharmony_ci#define IXP4XX_FEATURE_RSA (1 << 21) 3528c2ecf20Sopenharmony_ci#define IXP46X_FEATURE_MASK (IXP43X_FEATURE_MASK | \ 3538c2ecf20Sopenharmony_ci IXP4XX_FEATURE_NPEB_ETH_1_TO_3 | \ 3548c2ecf20Sopenharmony_ci IXP4XX_FEATURE_RSA) 3558c2ecf20Sopenharmony_ci 3568c2ecf20Sopenharmony_ci#endif 357