diff options
| author | Chris Metcalf <cmetcalf@tilera.com> | 2012-04-07 16:53:03 -0400 |
|---|---|---|
| committer | Chris Metcalf <cmetcalf@tilera.com> | 2012-07-11 16:04:58 -0400 |
| commit | bce5bbbb23f780a792be7e594af7cd4b4aae1cd4 (patch) | |
| tree | d140d8badb0ed24f4ccc2f89266772ae6836f0f3 /arch/tile/include | |
| parent | 10104a1ad670889adc1ae3779df968db621b5dbd (diff) | |
arch/tile: provide kernel support for the tilegx TRIO shim
Provide kernel support for the tilegx "Transaction I/O" (TRIO) on-chip
hardware. This hardware implements the PCIe interface for tilegx;
the driver changes to use TRIO for PCIe are in a subsequent commit.
The change is layered on top of the tilegx GXIO IORPC subsystem.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/include')
| -rw-r--r-- | arch/tile/include/arch/trio.h | 72 | ||||
| -rw-r--r-- | arch/tile/include/arch/trio_constants.h | 36 | ||||
| -rw-r--r-- | arch/tile/include/arch/trio_def.h | 41 | ||||
| -rw-r--r-- | arch/tile/include/arch/trio_pcie_intfc.h | 229 | ||||
| -rw-r--r-- | arch/tile/include/arch/trio_pcie_intfc_def.h | 32 | ||||
| -rw-r--r-- | arch/tile/include/arch/trio_pcie_rc.h | 156 | ||||
| -rw-r--r-- | arch/tile/include/arch/trio_pcie_rc_def.h | 24 | ||||
| -rw-r--r-- | arch/tile/include/arch/trio_shm.h | 125 | ||||
| -rw-r--r-- | arch/tile/include/arch/trio_shm_def.h | 19 | ||||
| -rw-r--r-- | arch/tile/include/gxio/iorpc_trio.h | 97 | ||||
| -rw-r--r-- | arch/tile/include/gxio/trio.h | 298 | ||||
| -rw-r--r-- | arch/tile/include/hv/drv_trio_intf.h | 195 |
12 files changed, 1324 insertions, 0 deletions
diff --git a/arch/tile/include/arch/trio.h b/arch/tile/include/arch/trio.h new file mode 100644 index 000000000000..d3000a871a21 --- /dev/null +++ b/arch/tile/include/arch/trio.h | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2012 Tilera Corporation. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License | ||
| 6 | * as published by the Free Software Foundation, version 2. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, but | ||
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
| 11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | /* Machine-generated file; do not edit. */ | ||
| 16 | |||
| 17 | #ifndef __ARCH_TRIO_H__ | ||
| 18 | #define __ARCH_TRIO_H__ | ||
| 19 | |||
| 20 | #include <arch/abi.h> | ||
| 21 | #include <arch/trio_def.h> | ||
| 22 | |||
| 23 | #ifndef __ASSEMBLER__ | ||
| 24 | |||
| 25 | /* | ||
| 26 | * Tile PIO Region Configuration - CFG Address Format. | ||
| 27 | * This register describes the address format for PIO accesses when the | ||
| 28 | * associated region is setup with TYPE=CFG. | ||
| 29 | */ | ||
| 30 | |||
| 31 | __extension__ | ||
| 32 | typedef union | ||
| 33 | { | ||
| 34 | struct | ||
| 35 | { | ||
| 36 | #ifndef __BIG_ENDIAN__ | ||
| 37 | /* Register Address (full byte address). */ | ||
| 38 | uint_reg_t reg_addr : 12; | ||
| 39 | /* Function Number */ | ||
| 40 | uint_reg_t fn : 3; | ||
| 41 | /* Device Number */ | ||
| 42 | uint_reg_t dev : 5; | ||
| 43 | /* BUS Number */ | ||
| 44 | uint_reg_t bus : 8; | ||
| 45 | /* Config Type: 0 for access to directly-attached device. 1 otherwise. */ | ||
| 46 | uint_reg_t type : 1; | ||
| 47 | /* Reserved. */ | ||
| 48 | uint_reg_t __reserved_0 : 1; | ||
| 49 | /* | ||
| 50 | * MAC select. This must match the configuration in | ||
| 51 | * TILE_PIO_REGION_SETUP.MAC. | ||
| 52 | */ | ||
| 53 | uint_reg_t mac : 2; | ||
| 54 | /* Reserved. */ | ||
| 55 | uint_reg_t __reserved_1 : 32; | ||
| 56 | #else /* __BIG_ENDIAN__ */ | ||
| 57 | uint_reg_t __reserved_1 : 32; | ||
| 58 | uint_reg_t mac : 2; | ||
| 59 | uint_reg_t __reserved_0 : 1; | ||
| 60 | uint_reg_t type : 1; | ||
| 61 | uint_reg_t bus : 8; | ||
| 62 | uint_reg_t dev : 5; | ||
| 63 | uint_reg_t fn : 3; | ||
| 64 | uint_reg_t reg_addr : 12; | ||
| 65 | #endif | ||
| 66 | }; | ||
| 67 | |||
| 68 | uint_reg_t word; | ||
| 69 | } TRIO_TILE_PIO_REGION_SETUP_CFG_ADDR_t; | ||
| 70 | #endif /* !defined(__ASSEMBLER__) */ | ||
| 71 | |||
| 72 | #endif /* !defined(__ARCH_TRIO_H__) */ | ||
diff --git a/arch/tile/include/arch/trio_constants.h b/arch/tile/include/arch/trio_constants.h new file mode 100644 index 000000000000..628b045436b8 --- /dev/null +++ b/arch/tile/include/arch/trio_constants.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2012 Tilera Corporation. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License | ||
| 6 | * as published by the Free Software Foundation, version 2. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, but | ||
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
| 11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | |||
| 16 | #ifndef __ARCH_TRIO_CONSTANTS_H__ | ||
| 17 | #define __ARCH_TRIO_CONSTANTS_H__ | ||
| 18 | |||
| 19 | #define TRIO_NUM_ASIDS 16 | ||
| 20 | #define TRIO_NUM_TLBS_PER_ASID 16 | ||
| 21 | |||
| 22 | #define TRIO_NUM_TPIO_REGIONS 8 | ||
| 23 | #define TRIO_LOG2_NUM_TPIO_REGIONS 3 | ||
| 24 | |||
| 25 | #define TRIO_NUM_MAP_MEM_REGIONS 16 | ||
| 26 | #define TRIO_LOG2_NUM_MAP_MEM_REGIONS 4 | ||
| 27 | #define TRIO_NUM_MAP_SQ_REGIONS 8 | ||
| 28 | #define TRIO_LOG2_NUM_MAP_SQ_REGIONS 3 | ||
| 29 | |||
| 30 | #define TRIO_LOG2_NUM_SQ_FIFO_ENTRIES 6 | ||
| 31 | |||
| 32 | #define TRIO_NUM_PUSH_DMA_RINGS 32 | ||
| 33 | |||
| 34 | #define TRIO_NUM_PULL_DMA_RINGS 32 | ||
| 35 | |||
| 36 | #endif /* __ARCH_TRIO_CONSTANTS_H__ */ | ||
diff --git a/arch/tile/include/arch/trio_def.h b/arch/tile/include/arch/trio_def.h new file mode 100644 index 000000000000..e80500317dc4 --- /dev/null +++ b/arch/tile/include/arch/trio_def.h | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2012 Tilera Corporation. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License | ||
| 6 | * as published by the Free Software Foundation, version 2. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, but | ||
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
| 11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | /* Machine-generated file; do not edit. */ | ||
| 16 | |||
| 17 | #ifndef __ARCH_TRIO_DEF_H__ | ||
| 18 | #define __ARCH_TRIO_DEF_H__ | ||
| 19 | #define TRIO_CFG_REGION_ADDR__REG_SHIFT 0 | ||
| 20 | #define TRIO_CFG_REGION_ADDR__INTFC_SHIFT 16 | ||
| 21 | #define TRIO_CFG_REGION_ADDR__INTFC_VAL_TRIO 0x0 | ||
| 22 | #define TRIO_CFG_REGION_ADDR__INTFC_VAL_MAC_INTERFACE 0x1 | ||
| 23 | #define TRIO_CFG_REGION_ADDR__INTFC_VAL_MAC_STANDARD 0x2 | ||
| 24 | #define TRIO_CFG_REGION_ADDR__INTFC_VAL_MAC_PROTECTED 0x3 | ||
| 25 | #define TRIO_CFG_REGION_ADDR__MAC_SEL_SHIFT 18 | ||
| 26 | #define TRIO_CFG_REGION_ADDR__PROT_SHIFT 20 | ||
| 27 | #define TRIO_PIO_REGIONS_ADDR__REGION_SHIFT 32 | ||
| 28 | #define TRIO_MAP_MEM_REG_INT0 0x1000000000 | ||
| 29 | #define TRIO_MAP_MEM_REG_INT1 0x1000000008 | ||
| 30 | #define TRIO_MAP_MEM_REG_INT2 0x1000000010 | ||
| 31 | #define TRIO_MAP_MEM_REG_INT3 0x1000000018 | ||
| 32 | #define TRIO_MAP_MEM_REG_INT4 0x1000000020 | ||
| 33 | #define TRIO_MAP_MEM_REG_INT5 0x1000000028 | ||
| 34 | #define TRIO_MAP_MEM_REG_INT6 0x1000000030 | ||
| 35 | #define TRIO_MAP_MEM_REG_INT7 0x1000000038 | ||
| 36 | #define TRIO_MAP_MEM_LIM__ADDR_SHIFT 12 | ||
| 37 | #define TRIO_MAP_MEM_SETUP__ORDER_MODE_VAL_UNORDERED 0x0 | ||
| 38 | #define TRIO_MAP_MEM_SETUP__ORDER_MODE_VAL_STRICT 0x1 | ||
| 39 | #define TRIO_MAP_MEM_SETUP__ORDER_MODE_VAL_REL_ORD 0x2 | ||
| 40 | #define TRIO_TILE_PIO_REGION_SETUP_CFG_ADDR__MAC_SHIFT 30 | ||
| 41 | #endif /* !defined(__ARCH_TRIO_DEF_H__) */ | ||
diff --git a/arch/tile/include/arch/trio_pcie_intfc.h b/arch/tile/include/arch/trio_pcie_intfc.h new file mode 100644 index 000000000000..0487fdb9d581 --- /dev/null +++ b/arch/tile/include/arch/trio_pcie_intfc.h | |||
| @@ -0,0 +1,229 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2012 Tilera Corporation. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License | ||
| 6 | * as published by the Free Software Foundation, version 2. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, but | ||
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
| 11 | * NON INFRINGEMENT. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | /* Machine-generated file; do not edit. */ | ||
| 16 | |||
| 17 | #ifndef __ARCH_TRIO_PCIE_INTFC_H__ | ||
