diff options
Diffstat (limited to 'arch/mips/include/asm/octeon/cvmx-gpio-defs.h')
| -rw-r--r-- | arch/mips/include/asm/octeon/cvmx-gpio-defs.h | 74 |
1 files changed, 50 insertions, 24 deletions
diff --git a/arch/mips/include/asm/octeon/cvmx-gpio-defs.h b/arch/mips/include/asm/octeon/cvmx-gpio-defs.h index 5fdd6ba48a05..395564e8d1f0 100644 --- a/arch/mips/include/asm/octeon/cvmx-gpio-defs.h +++ b/arch/mips/include/asm/octeon/cvmx-gpio-defs.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Contact: support@caviumnetworks.com | 4 | * Contact: support@caviumnetworks.com |
| 5 | * This file is part of the OCTEON SDK | 5 | * This file is part of the OCTEON SDK |
| 6 | * | 6 | * |
| 7 | * Copyright (c) 2003-2008 Cavium Networks | 7 | * Copyright (c) 2003-2010 Cavium Networks |
| 8 | * | 8 | * |
| 9 | * This file is free software; you can redistribute it and/or modify | 9 | * This file is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License, Version 2, as | 10 | * it under the terms of the GNU General Public License, Version 2, as |
| @@ -28,29 +28,22 @@ | |||
| 28 | #ifndef __CVMX_GPIO_DEFS_H__ | 28 | #ifndef __CVMX_GPIO_DEFS_H__ |
| 29 | #define __CVMX_GPIO_DEFS_H__ | 29 | #define __CVMX_GPIO_DEFS_H__ |
| 30 | 30 | ||
| 31 | #define CVMX_GPIO_BIT_CFGX(offset) \ | 31 | #define CVMX_GPIO_BIT_CFGX(offset) (CVMX_ADD_IO_SEG(0x0001070000000800ull) + ((offset) & 15) * 8) |
| 32 | CVMX_ADD_IO_SEG(0x0001070000000800ull + (((offset) & 15) * 8)) | 32 | #define CVMX_GPIO_BOOT_ENA (CVMX_ADD_IO_SEG(0x00010700000008A8ull)) |
| 33 | #define CVMX_GPIO_BOOT_ENA \ | 33 | #define CVMX_GPIO_CLK_GENX(offset) (CVMX_ADD_IO_SEG(0x00010700000008C0ull) + ((offset) & 3) * 8) |
| 34 | CVMX_ADD_IO_SEG(0x00010700000008A8ull) | 34 | #define CVMX_GPIO_CLK_QLMX(offset) (CVMX_ADD_IO_SEG(0x00010700000008E0ull) + ((offset) & 1) * 8) |
| 35 | #define CVMX_GPIO_CLK_GENX(offset) \ | 35 | #define CVMX_GPIO_DBG_ENA (CVMX_ADD_IO_SEG(0x00010700000008A0ull)) |
| 36 | CVMX_ADD_IO_SEG(0x00010700000008C0ull + (((offset) & 3) * 8)) | 36 | #define CVMX_GPIO_INT_CLR (CVMX_ADD_IO_SEG(0x0001070000000898ull)) |
| 37 | #define CVMX_GPIO_DBG_ENA \ | 37 | #define CVMX_GPIO_RX_DAT (CVMX_ADD_IO_SEG(0x0001070000000880ull)) |
| 38 | CVMX_ADD_IO_SEG(0x00010700000008A0ull) | 38 | #define CVMX_GPIO_TX_CLR (CVMX_ADD_IO_SEG(0x0001070000000890ull)) |
| 39 | #define CVMX_GPIO_INT_CLR \ | 39 | #define CVMX_GPIO_TX_SET (CVMX_ADD_IO_SEG(0x0001070000000888ull)) |
| 40 | CVMX_ADD_IO_SEG(0x0001070000000898ull) | 40 | #define CVMX_GPIO_XBIT_CFGX(offset) (CVMX_ADD_IO_SEG(0x0001070000000900ull) + ((offset) & 31) * 8 - 8*16) |
| 41 | #define CVMX_GPIO_RX_DAT \ | ||
| 42 | CVMX_ADD_IO_SEG(0x0001070000000880ull) | ||
| 43 | #define CVMX_GPIO_TX_CLR \ | ||
| 44 | CVMX_ADD_IO_SEG(0x0001070000000890ull) | ||
| 45 | #define CVMX_GPIO_TX_SET \ | ||
| 46 | CVMX_ADD_IO_SEG(0x0001070000000888ull) | ||
| 47 | #define CVMX_GPIO_XBIT_CFGX(offset) \ | ||
| 48 | CVMX_ADD_IO_SEG(0x0001070000000900ull + (((offset) & 31) * 8) - 8 * 16) | ||
| 49 | 41 | ||
| 50 | union cvmx_gpio_bit_cfgx { | 42 | union cvmx_gpio_bit_cfgx { |
| 51 | uint64_t u64; | 43 | uint64_t u64; |
| 52 | struct cvmx_gpio_bit_cfgx_s { | 44 | struct cvmx_gpio_bit_cfgx_s { |
| 53 | uint64_t reserved_15_63:49; | 45 | uint64_t reserved_17_63:47; |
| 46 | uint64_t synce_sel:2; | ||
| 54 | uint64_t clk_gen:1; | 47 | uint64_t clk_gen:1; |
| 55 | uint64_t clk_sel:2; | 48 | uint64_t clk_sel:2; |
| 56 | uint64_t fil_sel:4; | 49 | uint64_t fil_sel:4; |
| @@ -73,12 +66,24 @@ union cvmx_gpio_bit_cfgx { | |||
| 73 | struct cvmx_gpio_bit_cfgx_cn30xx cn38xx; | 66 | struct cvmx_gpio_bit_cfgx_cn30xx cn38xx; |
| 74 | struct cvmx_gpio_bit_cfgx_cn30xx cn38xxp2; | 67 | struct cvmx_gpio_bit_cfgx_cn30xx cn38xxp2; |
| 75 | struct cvmx_gpio_bit_cfgx_cn30xx cn50xx; | 68 | struct cvmx_gpio_bit_cfgx_cn30xx cn50xx; |
| 76 | struct cvmx_gpio_bit_cfgx_s cn52xx; | 69 | struct cvmx_gpio_bit_cfgx_cn52xx { |
| 77 | struct cvmx_gpio_bit_cfgx_s cn52xxp1; | 70 | uint64_t reserved_15_63:49; |
| 78 | struct cvmx_gpio_bit_cfgx_s cn56xx; | 71 | uint64_t clk_gen:1; |
| 79 | struct cvmx_gpio_bit_cfgx_s cn56xxp1; | 72 | uint64_t clk_sel:2; |
| 73 | uint64_t fil_sel:4; | ||
| 74 | uint64_t fil_cnt:4; | ||
| 75 | uint64_t int_type:1; | ||
| 76 | uint64_t int_en:1; | ||
| 77 | uint64_t rx_xor:1; | ||
| 78 | uint64_t tx_oe:1; | ||
| 79 | } cn52xx; | ||
| 80 | struct cvmx_gpio_bit_cfgx_cn52xx cn52xxp1; | ||
| 81 | struct cvmx_gpio_bit_cfgx_cn52xx cn56xx; | ||
| 82 | struct cvmx_gpio_bit_cfgx_cn52xx cn56xxp1; | ||
| 80 | struct cvmx_gpio_bit_cfgx_cn30xx cn58xx; | 83 | struct cvmx_gpio_bit_cfgx_cn30xx cn58xx; |
| 81 | struct cvmx_gpio_bit_cfgx_cn30xx cn58xxp1; | 84 | struct cvmx_gpio_bit_cfgx_cn30xx cn58xxp1; |
| 85 | struct cvmx_gpio_bit_cfgx_s cn63xx; | ||
| 86 | struct cvmx_gpio_bit_cfgx_s cn63xxp1; | ||
| 82 | }; | 87 | }; |
| 83 | 88 | ||
| 84 | union cvmx_gpio_boot_ena { | 89 | union cvmx_gpio_boot_ena { |
| @@ -103,6 +108,19 @@ union cvmx_gpio_clk_genx { | |||
| 103 | struct cvmx_gpio_clk_genx_s cn52xxp1; | 108 | struct cvmx_gpio_clk_genx_s cn52xxp1; |
| 104 | struct cvmx_gpio_clk_genx_s cn56xx; | 109 | struct cvmx_gpio_clk_genx_s cn56xx; |
| 105 | struct cvmx_gpio_clk_genx_s cn56xxp1; | 110 | struct cvmx_gpio_clk_genx_s cn56xxp1; |
| 111 | struct cvmx_gpio_clk_genx_s cn63xx; | ||
| 112 | struct cvmx_gpio_clk_genx_s cn63xxp1; | ||
| 113 | }; | ||
| 114 | |||
| 115 | union cvmx_gpio_clk_qlmx { | ||
| 116 | uint64_t u64; | ||
| 117 | struct cvmx_gpio_clk_qlmx_s { | ||
| 118 | uint64_t reserved_3_63:61; | ||
| 119 | uint64_t div:1; | ||
| 120 | uint64_t lane_sel:2; | ||
| 121 | } s; | ||
| 122 | struct cvmx_gpio_clk_qlmx_s cn63xx; | ||
| 123 | struct cvmx_gpio_clk_qlmx_s cn63xxp1; | ||
| 106 | }; | 124 | }; |
| 107 | 125 | ||
| 108 | union cvmx_gpio_dbg_ena { | 126 | union cvmx_gpio_dbg_ena { |
| @@ -133,6 +151,8 @@ union cvmx_gpio_int_clr { | |||
| 133 | struct cvmx_gpio_int_clr_s cn56xxp1; | 151 | struct cvmx_gpio_int_clr_s cn56xxp1; |
| 134 | struct cvmx_gpio_int_clr_s cn58xx; | 152 | struct cvmx_gpio_int_clr_s cn58xx; |
| 135 | struct cvmx_gpio_int_clr_s cn58xxp1; | 153 | struct cvmx_gpio_int_clr_s cn58xxp1; |
| 154 | struct cvmx_gpio_int_clr_s cn63xx; | ||
| 155 | struct cvmx_gpio_int_clr_s cn63xxp1; | ||
| 136 | }; | 156 | }; |
| 137 | 157 | ||
| 138 | union cvmx_gpio_rx_dat { | 158 | union cvmx_gpio_rx_dat { |
| @@ -155,6 +175,8 @@ union cvmx_gpio_rx_dat { | |||
| 155 | struct cvmx_gpio_rx_dat_cn38xx cn56xxp1; | 175 | struct cvmx_gpio_rx_dat_cn38xx cn56xxp1; |
| 156 | struct cvmx_gpio_rx_dat_cn38xx cn58xx; | 176 | struct cvmx_gpio_rx_dat_cn38xx cn58xx; |
| 157 | struct cvmx_gpio_rx_dat_cn38xx cn58xxp1; | 177 | struct cvmx_gpio_rx_dat_cn38xx cn58xxp1; |
| 178 | struct cvmx_gpio_rx_dat_cn38xx cn63xx; | ||
| 179 | struct cvmx_gpio_rx_dat_cn38xx cn63xxp1; | ||
| 158 | }; | 180 | }; |
| 159 | 181 | ||
| 160 | union cvmx_gpio_tx_clr { | 182 | union cvmx_gpio_tx_clr { |
| @@ -177,6 +199,8 @@ union cvmx_gpio_tx_clr { | |||
| 177 | struct cvmx_gpio_tx_clr_cn38xx cn56xxp1; | 199 | struct cvmx_gpio_tx_clr_cn38xx cn56xxp1; |
| 178 | struct cvmx_gpio_tx_clr_cn38xx cn58xx; | 200 | struct cvmx_gpio_tx_clr_cn38xx cn58xx; |
| 179 | struct cvmx_gpio_tx_clr_cn38xx cn58xxp1; | 201 | struct cvmx_gpio_tx_clr_cn38xx cn58xxp1; |
| 202 | struct cvmx_gpio_tx_clr_cn38xx cn63xx; | ||
| 203 | struct cvmx_gpio_tx_clr_cn38xx cn63xxp1; | ||
| 180 | }; | 204 | }; |
| 181 | 205 | ||
| 182 | union cvmx_gpio_tx_set { | 206 | union cvmx_gpio_tx_set { |
| @@ -199,6 +223,8 @@ union cvmx_gpio_tx_set { | |||
| 199 | struct cvmx_gpio_tx_set_cn38xx cn56xxp1; | 223 | struct cvmx_gpio_tx_set_cn38xx cn56xxp1; |
| 200 | struct cvmx_gpio_tx_set_cn38xx cn58xx; | 224 | struct cvmx_gpio_tx_set_cn38xx cn58xx; |
| 201 | struct cvmx_gpio_tx_set_cn38xx cn58xxp1; | 225 | struct cvmx_gpio_tx_set_cn38xx cn58xxp1; |
| 226 | struct cvmx_gpio_tx_set_cn38xx cn63xx; | ||
| 227 | struct cvmx_gpio_tx_set_cn38xx cn63xxp1; | ||
| 202 | }; | 228 | }; |
| 203 | 229 | ||
| 204 | union cvmx_gpio_xbit_cfgx { | 230 | union cvmx_gpio_xbit_cfgx { |
