diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2012-07-25 08:33:45 -0400 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2012-07-25 08:35:04 -0400 |
| commit | 8cef081c71dd4e16a01a1e63cedab21eef8b5735 (patch) | |
| tree | b5b0fb5ab09dc60dee5fc8fd8e980359abbd1b1e /include/linux/bcma | |
| parent | 3d55c29fb24286f350f04021bef2dd799e25dd20 (diff) | |
| parent | 9161c3b796a2841a9a7be3d9c9dd121269ce90e8 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fixes
The merge of the 'clk-for-linus' branch caused an automated
merge failure. Pull that in here so we can fix the problem.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/linux/bcma')
| -rw-r--r-- | include/linux/bcma/bcma.h | 39 | ||||
| -rw-r--r-- | include/linux/bcma/bcma_driver_chipcommon.h | 88 | ||||
| -rw-r--r-- | include/linux/bcma/bcma_driver_gmac_cmn.h | 100 |
3 files changed, 226 insertions, 1 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h index 8deaf6d050c3..1954a4e305a3 100644 --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <linux/bcma/bcma_driver_chipcommon.h> | 7 | #include <linux/bcma/bcma_driver_chipcommon.h> |
| 8 | #include <linux/bcma/bcma_driver_pci.h> | 8 | #include <linux/bcma/bcma_driver_pci.h> |
| 9 | #include <linux/bcma/bcma_driver_mips.h> | 9 | #include <linux/bcma/bcma_driver_mips.h> |
| 10 | #include <linux/bcma/bcma_driver_gmac_cmn.h> | ||
| 10 | #include <linux/ssb/ssb.h> /* SPROM sharing */ | 11 | #include <linux/ssb/ssb.h> /* SPROM sharing */ |
| 11 | 12 | ||
| 12 | #include "bcma_regs.h" | 13 | #include "bcma_regs.h" |
| @@ -70,6 +71,13 @@ struct bcma_host_ops { | |||
| 70 | 71 | ||
| 71 | /* Core-ID values. */ | 72 | /* Core-ID values. */ |
| 72 | #define BCMA_CORE_OOB_ROUTER 0x367 /* Out of band */ | 73 | #define BCMA_CORE_OOB_ROUTER 0x367 /* Out of band */ |
| 74 | #define BCMA_CORE_4706_CHIPCOMMON 0x500 | ||
| 75 | #define BCMA_CORE_4706_SOC_RAM 0x50E | ||
| 76 | #define BCMA_CORE_4706_MAC_GBIT 0x52D | ||
| 77 | #define BCMA_CORE_AMEMC 0x52E /* DDR1/2 memory controller core */ | ||
| 78 | #define BCMA_CORE_ALTA 0x534 /* I2S core */ | ||
| 79 | #define BCMA_CORE_4706_MAC_GBIT_COMMON 0x5DC | ||
| 80 | #define BCMA_CORE_DDR23_PHY 0x5DD | ||
| 73 | #define BCMA_CORE_INVALID 0x700 | 81 | #define BCMA_CORE_INVALID 0x700 |
| 74 | #define BCMA_CORE_CHIPCOMMON 0x800 | 82 | #define BCMA_CORE_CHIPCOMMON 0x800 |
| 75 | #define BCMA_CORE_ILINE20 0x801 | 83 | #define BCMA_CORE_ILINE20 0x801 |
| @@ -130,6 +138,36 @@ struct bcma_host_ops { | |||
| 130 | 138 | ||
| 131 | #define BCMA_MAX_NR_CORES 16 | 139 | #define BCMA_MAX_NR_CORES 16 |
| 132 | 140 | ||
| 141 | /* Chip IDs of PCIe devices */ | ||
| 142 | #define BCMA_CHIP_ID_BCM4313 0x4313 | ||
| 143 | #define BCMA_CHIP_ID_BCM43224 43224 | ||
| 144 | #define BCMA_PKG_ID_BCM43224_FAB_CSM 0x8 | ||
| 145 | #define BCMA_PKG_ID_BCM43224_FAB_SMIC 0xa | ||
| 146 | #define BCMA_CHIP_ID_BCM43225 43225 | ||
| 147 | #define BCMA_CHIP_ID_BCM43227 43227 | ||
| 148 | #define BCMA_CHIP_ID_BCM43228 43228 | ||
| 149 | #define BCMA_CHIP_ID_BCM43421 43421 | ||
| 150 | #define BCMA_CHIP_ID_BCM43428 43428 | ||
| 151 | #define BCMA_CHIP_ID_BCM43431 43431 | ||
| 152 | #define BCMA_CHIP_ID_BCM43460 43460 | ||
| 153 | #define BCMA_CHIP_ID_BCM4331 0x4331 | ||
| 154 | #define BCMA_CHIP_ID_BCM6362 0x6362 | ||
| 155 | #define BCMA_CHIP_ID_BCM4360 0x4360 | ||
| 156 | #define BCMA_CHIP_ID_BCM4352 0x4352 | ||
| 157 | |||
| 158 | /* Chip IDs of SoCs */ | ||
| 159 | #define BCMA_CHIP_ID_BCM4706 0x5300 | ||
| 160 | #define BCMA_CHIP_ID_BCM4716 0x4716 | ||
| 161 | #define BCMA_PKG_ID_BCM4716 8 | ||
| 162 | #define BCMA_PKG_ID_BCM4717 9 | ||
| 163 | #define BCMA_PKG_ID_BCM4718 10 | ||
| 164 | #define BCMA_CHIP_ID_BCM47162 47162 | ||
| 165 | #define BCMA_CHIP_ID_BCM4748 0x4748 | ||
| 166 | #define BCMA_CHIP_ID_BCM4749 0x4749 | ||
| 167 | #define BCMA_CHIP_ID_BCM5356 0x5356 | ||
| 168 | #define BCMA_CHIP_ID_BCM5357 0x5357 | ||
| 169 | #define BCMA_CHIP_ID_BCM53572 53572 | ||
| 170 | |||
| 133 | struct bcma_device { | 171 | struct bcma_device { |
| 134 | struct bcma_bus *bus; | 172 | struct bcma_bus *bus; |
| 135 | struct bcma_device_id id; | 173 | struct bcma_device_id id; |
| @@ -215,6 +253,7 @@ struct bcma_bus { | |||
| 215 | struct bcma_drv_cc drv_cc; | 253 | struct bcma_drv_cc drv_cc; |
| 216 | struct bcma_drv_pci drv_pci; | 254 | struct bcma_drv_pci drv_pci; |
| 217 | struct bcma_drv_mips drv_mips; | 255 | struct bcma_drv_mips drv_mips; |
| 256 | struct bcma_drv_gmac_cmn drv_gmac_cmn; | ||
| 218 | 257 | ||
| 219 | /* We decided to share SPROM struct with SSB as long as we do not need | 258 | /* We decided to share SPROM struct with SSB as long as we do not need |
| 220 | * any hacks for BCMA. This simplifies drivers code. */ | 259 | * any hacks for BCMA. This simplifies drivers code. */ |
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index 8bbfe31fbac8..3c80885fa829 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | #define BCMA_CC_FLASHT_NONE 0x00000000 /* No flash */ | 24 | #define BCMA_CC_FLASHT_NONE 0x00000000 /* No flash */ |
| 25 | #define BCMA_CC_FLASHT_STSER 0x00000100 /* ST serial flash */ | 25 | #define BCMA_CC_FLASHT_STSER 0x00000100 /* ST serial flash */ |
| 26 | #define BCMA_CC_FLASHT_ATSER 0x00000200 /* Atmel serial flash */ | 26 | #define BCMA_CC_FLASHT_ATSER 0x00000200 /* Atmel serial flash */ |
| 27 | #define BCMA_CC_FLASHT_NFLASH 0x00000200 | 27 | #define BCMA_CC_FLASHT_NFLASH 0x00000200 /* NAND flash */ |
| 28 | #define BCMA_CC_FLASHT_PARA 0x00000700 /* Parallel flash */ | 28 | #define BCMA_CC_FLASHT_PARA 0x00000700 /* Parallel flash */ |
| 29 | #define BCMA_CC_CAP_PLLT 0x00038000 /* PLL Type */ | 29 | #define BCMA_CC_CAP_PLLT 0x00038000 /* PLL Type */ |
| 30 | #define BCMA_PLLTYPE_NONE 0x00000000 | 30 | #define BCMA_PLLTYPE_NONE 0x00000000 |
| @@ -45,6 +45,7 @@ | |||
| 45 | #define BCMA_CC_CAP_PMU 0x10000000 /* PMU available (rev >= 20) */ | 45 | #define BCMA_CC_CAP_PMU 0x10000000 /* PMU available (rev >= 20) */ |
| 46 | #define BCMA_CC_CAP_ECI 0x20000000 /* ECI available (rev >= 20) */ | 46 | #define BCMA_CC_CAP_ECI 0x20000000 /* ECI available (rev >= 20) */ |
| 47 | #define BCMA_CC_CAP_SPROM 0x40000000 /* SPROM present */ | 47 | #define BCMA_CC_CAP_SPROM 0x40000000 /* SPROM present */ |
| 48 | #define BCMA_CC_CAP_NFLASH 0x80000000 /* NAND flash present (rev >= 35 or BCM4706?) */ | ||
| 48 | #define BCMA_CC_CORECTL 0x0008 | 49 | #define BCMA_CC_CORECTL 0x0008 |
| 49 | #define BCMA_CC_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */ | 50 | #define BCMA_CC_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */ |
| 50 | #define BCMA_CC_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */ | 51 | #define BCMA_CC_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */ |
| @@ -88,6 +89,11 @@ | |||
| 88 | #define BCMA_CC_CHIPST_4313_OTP_PRESENT 2 | 89 | #define BCMA_CC_CHIPST_4313_OTP_PRESENT 2 |
| 89 | #define BCMA_CC_CHIPST_4331_SPROM_PRESENT 2 | 90 | #define BCMA_CC_CHIPST_4331_SPROM_PRESENT 2 |
| 90 | #define BCMA_CC_CHIPST_4331_OTP_PRESENT 4 | 91 | #define BCMA_CC_CHIPST_4331_OTP_PRESENT 4 |
| 92 | #define BCMA_CC_CHIPST_4706_PKG_OPTION BIT(0) /* 0: full-featured package 1: low-cost package */ | ||
| 93 | #define BCMA_CC_CHIPST_4706_SFLASH_PRESENT BIT(1) /* 0: parallel, 1: serial flash is present */ | ||
| 94 | #define BCMA_CC_CHIPST_4706_SFLASH_TYPE BIT(2) /* 0: 8b-p/ST-s flash, 1: 16b-p/Atmal-s flash */ | ||
| 95 | #define BCMA_CC_CHIPST_4706_MIPS_BENDIAN BIT(3) /* 0: little, 1: big endian */ | ||
| 96 | #define BCMA_CC_CHIPST_4706_PCIE1_DISABLE BIT(5) /* PCIE1 enable strap pin */ | ||
| 91 | #define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */ | 97 | #define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */ |
| 92 | #define BCMA_CC_JCMD_START 0x80000000 | 98 | #define BCMA_CC_JCMD_START 0x80000000 |
| 93 | #define BCMA_CC_JCMD_BUSY 0x80000000 | 99 | #define BCMA_CC_JCMD_BUSY 0x80000000 |
| @@ -117,10 +123,58 @@ | |||
| 117 | #define BCMA_CC_JCTL_EXT_EN 2 /* Enable external targets */ | 123 | #define BCMA_CC_JCTL_EXT_EN 2 /* Enable external targets */ |
| 118 | #define BCMA_CC_JCTL_EN 1 /* Enable Jtag master */ | 124 | #define BCMA_CC_JCTL_EN 1 /* Enable Jtag master */ |
| 119 | #define BCMA_CC_FLASHCTL 0x0040 | 125 | #define BCMA_CC_FLASHCTL 0x0040 |
| 126 | /* Start/busy bit in flashcontrol */ | ||
| 127 | #define BCMA_CC_FLASHCTL_OPCODE 0x000000ff | ||
| 128 | #define BCMA_CC_FLASHCTL_ACTION 0x00000700 | ||
| 129 | #define BCMA_CC_FLASHCTL_CS_ACTIVE 0x00001000 /* Chip Select Active, rev >= 20 */ | ||
| 120 | #define BCMA_CC_FLASHCTL_START 0x80000000 | 130 | #define BCMA_CC_FLASHCTL_START 0x80000000 |
| 121 | #define BCMA_CC_FLASHCTL_BUSY BCMA_CC_FLASHCTL_START | 131 | #define BCMA_CC_FLASHCTL_BUSY BCMA_CC_FLASHCTL_START |
| 132 | /* Flashcontrol action + opcodes for ST flashes */ | ||
| 133 | #define BCMA_CC_FLASHCTL_ST_WREN 0x0006 /* Write Enable */ | ||
| 134 | #define BCMA_CC_FLASHCTL_ST_WRDIS 0x0004 /* Write Disable */ | ||
| 135 | #define BCMA_CC_FLASHCTL_ST_RDSR 0x0105 /* Read Status Register */ | ||
| 136 | #define BCMA_CC_FLASHCTL_ST_WRSR 0x0101 /* Write Status Register */ | ||
| 137 | #define BCMA_CC_FLASHCTL_ST_READ 0x0303 /* Read Data Bytes */ | ||
| 138 | #define BCMA_CC_FLASHCTL_ST_PP 0x0302 /* Page Program */ | ||
| 139 | #define BCMA_CC_FLASHCTL_ST_SE 0x02d8 /* Sector Erase */ | ||
| 140 | #define BCMA_CC_FLASHCTL_ST_BE 0x00c7 /* Bulk Erase */ | ||
| 141 | #define BCMA_CC_FLASHCTL_ST_DP 0x00b9 /* Deep Power-down */ | ||
| 142 | #define BCMA_CC_FLASHCTL_ST_RES 0x03ab /* Read Electronic Signature */ | ||
| 143 | #define BCMA_CC_FLASHCTL_ST_CSA 0x1000 /* Keep chip select asserted */ | ||
| 144 | #define BCMA_CC_FLASHCTL_ST_SSE 0x0220 /* Sub-sector Erase */ | ||
| 145 | /* Flashcontrol action + opcodes for Atmel flashes */ | ||
| 146 | #define BCMA_CC_FLASHCTL_AT_READ 0x07e8 | ||
| 147 | #define BCMA_CC_FLASHCTL_AT_PAGE_READ 0x07d2 | ||
| 148 | #define BCMA_CC_FLASHCTL_AT_STATUS 0x01d7 | ||
| 149 | #define BCMA_CC_FLASHCTL_AT_BUF1_WRITE 0x0384 | ||
| 150 | #define BCMA_CC_FLASHCTL_AT_BUF2_WRITE 0x0387 | ||
| 151 | #define BCMA_CC_FLASHCTL_AT_BUF1_ERASE_PROGRAM 0x0283 | ||
| 152 | #define BCMA_CC_FLASHCTL_AT_BUF2_ERASE_PROGRAM 0x0286 | ||
| 153 | #define BCMA_CC_FLASHCTL_AT_BUF1_PROGRAM 0x0288 | ||
| 154 | #define BCMA_CC_FLASHCTL_AT_BUF2_PROGRAM 0x0289 | ||
| 155 | #define BCMA_CC_FLASHCTL_AT_PAGE_ERASE 0x0281 | ||
| 156 | #define BCMA_CC_FLASHCTL_AT_BLOCK_ERASE 0x0250 | ||
| 157 | #define BCMA_CC_FLASHCTL_AT_BUF1_WRITE_ERASE_PROGRAM 0x0382 | ||
| 158 | #define BCMA_CC_FLASHCTL_AT_BUF2_WRITE_ERASE_PROGRAM 0x0385 | ||
| 159 | #define BCMA_CC_FLASHCTL_AT_BUF1_LOAD 0x0253 | ||
| 160 | #define BCMA_CC_FLASHCTL_AT_BUF2_LOAD 0x0255 | ||
| 161 | #define BCMA_CC_FLASHCTL_AT_BUF1_COMPARE 0x0260 | ||
| 162 | #define BCMA_CC_FLASHCTL_AT_BUF2_COMPARE 0x0261 | ||
| 163 | #define BCMA_CC_FLASHCTL_AT_BUF1_REPROGRAM 0x0258 | ||
| 164 | #define BCMA_CC_FLASHCTL_AT_BUF2_REPROGRAM 0x0259 | ||
| 122 | #define BCMA_CC_FLASHADDR 0x0044 | 165 | #define BCMA_CC_FLASHADDR 0x0044 |
| 123 | #define BCMA_CC_FLASHDATA 0x0048 | 166 | #define BCMA_CC_FLASHDATA 0x0048 |
| 167 | /* Status register bits for ST flashes */ | ||
| 168 | #define BCMA_CC_FLASHDATA_ST_WIP 0x01 /* Write In Progress */ | ||
| 169 | #define BCMA_CC_FLASHDATA_ST_WEL 0x02 /* Write Enable Latch */ | ||
| 170 | #define BCMA_CC_FLASHDATA_ST_BP_MASK 0x1c /* Block Protect */ | ||
| 171 | #define BCMA_CC_FLASHDATA_ST_BP_SHIFT 2 | ||
| 172 | #define BCMA_CC_FLASHDATA_ST_SRWD 0x80 /* Status Register Write Disable */ | ||
| 173 | /* Status register bits for Atmel flashes */ | ||
| 174 | #define BCMA_CC_FLASHDATA_AT_READY 0x80 | ||
| 175 | #define BCMA_CC_FLASHDATA_AT_MISMATCH 0x40 | ||
| 176 | #define BCMA_CC_FLASHDATA_AT_ID_MASK 0x38 | ||
| 177 | #define BCMA_CC_FLASHDATA_AT_ID_SHIFT 3 | ||
| 124 | #define BCMA_CC_BCAST_ADDR 0x0050 | 178 | #define BCMA_CC_BCAST_ADDR 0x0050 |
| 125 | #define BCMA_CC_BCAST_DATA 0x0054 | 179 | #define BCMA_CC_BCAST_DATA 0x0054 |
| 126 | #define BCMA_CC_GPIOPULLUP 0x0058 /* Rev >= 20 only */ | 180 | #define BCMA_CC_GPIOPULLUP 0x0058 /* Rev >= 20 only */ |
| @@ -280,6 +334,15 @@ | |||
| 280 | 334 | ||
| 281 | /* 4706 PMU */ | 335 | /* 4706 PMU */ |
| 282 | #define BCMA_CC_PMU4706_MAINPLL_PLL0 0 | 336 | #define BCMA_CC_PMU4706_MAINPLL_PLL0 0 |
| 337 | #define BCMA_CC_PMU6_4706_PROCPLL_OFF 4 /* The CPU PLL */ | ||
| 338 | #define BCMA_CC_PMU6_4706_PROC_P2DIV_MASK 0x000f0000 | ||
| 339 | #define BCMA_CC_PMU6_4706_PROC_P2DIV_SHIFT 16 | ||
| 340 | #define BCMA_CC_PMU6_4706_PROC_P1DIV_MASK 0x0000f000 | ||
| 341 | #define BCMA_CC_PMU6_4706_PROC_P1DIV_SHIFT 12 | ||
| 342 | #define BCMA_CC_PMU6_4706_PROC_NDIV_INT_MASK 0x00000ff8 | ||
| 343 | #define BCMA_CC_PMU6_4706_PROC_NDIV_INT_SHIFT 3 | ||
| 344 | #define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_MASK 0x00000007 | ||
| 345 | #define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_SHIFT 0 | ||
| 283 | 346 | ||
| 284 | /* ALP clock on pre-PMU chips */ | 347 | /* ALP clock on pre-PMU chips */ |
| 285 | #define BCMA_CC_PMU_ALP_CLOCK 20000000 | 348 | #define BCMA_CC_PMU_ALP_CLOCK 20000000 |
| @@ -308,6 +371,19 @@ | |||
| 308 | #define BCMA_CC_PPL_PCHI_OFF 5 | 371 | #define BCMA_CC_PPL_PCHI_OFF 5 |
| 309 | #define BCMA_CC_PPL_PCHI_MASK 0x0000003f | 372 | #define BCMA_CC_PPL_PCHI_MASK 0x0000003f |
| 310 | 373 | ||
| 374 | #define BCMA_CC_PMU_PLL_CTL0 0 | ||
| 375 | #define BCMA_CC_PMU_PLL_CTL1 1 | ||
| 376 | #define BCMA_CC_PMU_PLL_CTL2 2 | ||
| 377 | #define BCMA_CC_PMU_PLL_CTL3 3 | ||
| 378 | #define BCMA_CC_PMU_PLL_CTL4 4 | ||
| 379 | #define BCMA_CC_PMU_PLL_CTL5 5 | ||
| 380 | |||
| 381 | #define BCMA_CC_PMU1_PLL0_PC0_P1DIV_MASK 0x00f00000 | ||
| 382 | #define BCMA_CC_PMU1_PLL0_PC0_P1DIV_SHIFT 20 | ||
| 383 | |||
| 384 | #define BCMA_CC_PMU1_PLL0_PC2_NDIV_INT_MASK 0x1ff00000 | ||
| 385 | #define BCMA_CC_PMU1_PLL0_PC2_NDIV_INT_SHIFT 20 | ||
| 386 | |||
| 311 | /* BCM4331 ChipControl numbers. */ | 387 | /* BCM4331 ChipControl numbers. */ |
| 312 | #define BCMA_CHIPCTL_4331_BT_COEXIST BIT(0) /* 0 disable */ | 388 | #define BCMA_CHIPCTL_4331_BT_COEXIST BIT(0) /* 0 disable */ |
| 313 | #define BCMA_CHIPCTL_4331_SECI BIT(1) /* 0 SECI is disabled (JATG functional) */ | 389 | #define BCMA_CHIPCTL_4331_SECI BIT(1) /* 0 SECI is disabled (JATG functional) */ |
| @@ -321,9 +397,18 @@ | |||
| 321 | #define BCMA_CHIPCTL_4331_OVR_PIPEAUXPWRDOWN BIT(9) /* override core control on pipe_AuxPowerDown */ | 397 | #define BCMA_CHIPCTL_4331_OVR_PIPEAUXPWRDOWN BIT(9) /* override core control on pipe_AuxPowerDown */ |
| 322 | #define BCMA_CHIPCTL_4331_PCIE_AUXCLKEN BIT(10) /* pcie_auxclkenable */ | 398 | #define BCMA_CHIPCTL_4331_PCIE_AUXCLKEN BIT(10) /* pcie_auxclkenable */ |
| 323 | #define BCMA_CHIPCTL_4331_PCIE_PIPE_PLLDOWN BIT(11) /* pcie_pipe_pllpowerdown */ | 399 | #define BCMA_CHIPCTL_4331_PCIE_PIPE_PLLDOWN BIT(11) /* pcie_pipe_pllpowerdown */ |
| 400 | #define BCMA_CHIPCTL_4331_EXTPA_EN2 BIT(12) /* 0 ext pa disable, 1 ext pa enabled */ | ||
| 324 | #define BCMA_CHIPCTL_4331_BT_SHD0_ON_GPIO4 BIT(16) /* enable bt_shd0 at gpio4 */ | 401 | #define BCMA_CHIPCTL_4331_BT_SHD0_ON_GPIO4 BIT(16) /* enable bt_shd0 at gpio4 */ |
| 325 | #define BCMA_CHIPCTL_4331_BT_SHD1_ON_GPIO5 BIT(17) /* enable bt_shd1 at gpio5 */ | 402 | #define BCMA_CHIPCTL_4331_BT_SHD1_ON_GPIO5 BIT(17) /* enable bt_shd1 at gpio5 */ |
| 326 | 403 | ||
| 404 | /* 43224 chip-specific ChipControl register bits */ | ||
| 405 | #define BCMA_CCTRL_43224_GPIO_TOGGLE 0x8000 /* gpio[3:0] pins as btcoex or s/w gpio */ | ||
| 406 | #define BCMA_CCTRL_43224A0_12MA_LED_DRIVE 0x00F000F0 /* 12 mA drive strength */ | ||
| 407 | #define BCMA_CCTRL_43224B0_12MA_LED_DRIVE 0xF0 /* 12 mA drive strength for later 43224s */ | ||
| 408 | |||
| 409 | /* 4313 Chip specific ChipControl register bits */ | ||
| 410 | #define BCMA_CCTRL_4313_12MA_LED_DRIVE 0x00000007 /* 12 mA drive strengh for later 4313 */ | ||
| 411 | |||
| 327 | /* Data for the PMU, if available. | 412 | /* Data for the PMU, if available. |
| 328 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) | 413 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) |
| 329 | */ | 414 | */ |
| @@ -411,5 +496,6 @@ extern void bcma_chipco_chipctl_maskset(struct bcma_drv_cc *cc, | |||
| 411 | u32 offset, u32 mask, u32 set); | 496 | u32 offset, u32 mask, u32 set); |
| 412 | extern void bcma_chipco_regctl_maskset(struct bcma_drv_cc *cc, | 497 | extern void bcma_chipco_regctl_maskset(struct bcma_drv_cc *cc, |
| 413 | u32 offset, u32 mask, u32 set); | 498 | u32 offset, u32 mask, u32 set); |
| 499 | extern void bcma_pmu_spuravoid_pllupdate(struct bcma_drv_cc *cc, int spuravoid); | ||
| 414 | 500 | ||
| 415 | #endif /* LINUX_BCMA_DRIVER_CC_H_ */ | 501 | #endif /* LINUX_BCMA_DRIVER_CC_H_ */ |
diff --git a/include/linux/bcma/bcma_driver_gmac_cmn.h b/include/linux/bcma/bcma_driver_gmac_cmn.h new file mode 100644 index 000000000000..def894b83b0d --- /dev/null +++ b/include/linux/bcma/bcma_driver_gmac_cmn.h | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | #ifndef LINUX_BCMA_DRIVER_GMAC_CMN_H_ | ||
| 2 | #define LINUX_BCMA_DRIVER_GMAC_CMN_H_ | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | #define BCMA_GMAC_CMN_STAG0 0x000 | ||
| 7 | #define BCMA_GMAC_CMN_STAG1 0x004 | ||
| 8 | #define BCMA_GMAC_CMN_STAG2 0x008 | ||
| 9 | #define BCMA_GMAC_CMN_STAG3 0x00C | ||
| 10 | #define BCMA_GMAC_CMN_PARSER_CTL 0x020 | ||
| 11 | #define BCMA_GMAC_CMN_MIB_MAX_LEN 0x024 | ||
| 12 | #define BCMA_GMAC_CMN_PHY_ACCESS 0x100 | ||
| 13 | #define BCMA_GMAC_CMN_PA_DATA_MASK 0x0000ffff | ||
| 14 | #define BCMA_GMAC_CMN_PA_ADDR_MASK 0x001f0000 | ||
| 15 | #define BCMA_GMAC_CMN_PA_ADDR_SHIFT 16 | ||
| 16 | #define BCMA_GMAC_CMN_PA_REG_MASK 0x1f000000 | ||
| 17 | #define BCMA_GMAC_CMN_PA_REG_SHIFT 24 | ||
| 18 | #define BCMA_GMAC_CMN_PA_WRITE 0x20000000 | ||
| 19 | #define BCMA_GMAC_CMN_PA_START 0x40000000 | ||
| 20 | #define BCMA_GMAC_CMN_PHY_CTL 0x104 | ||
| 21 | #define BCMA_GMAC_CMN_PC_EPA_MASK 0x0000001f | ||
| 22 | #define BCMA_GMAC_CMN_PC_MCT_MASK 0x007f0000 | ||
| 23 | #define BCMA_GMAC_CMN_PC_MCT_SHIFT 16 | ||
| 24 | #define BCMA_GMAC_CMN_PC_MTE 0x00800000 | ||
| 25 | #define BCMA_GMAC_CMN_GMAC0_RGMII_CTL 0x110 | ||
| 26 | #define BCMA_GMAC_CMN_CFP_ACCESS 0x200 | ||
| 27 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA0 0x210 | ||
| 28 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA1 0x214 | ||
| 29 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA2 0x218 | ||
| 30 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA3 0x21C | ||
| 31 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA4 0x220 | ||
| 32 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA5 0x224 | ||
| 33 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA6 0x228 | ||
| 34 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA7 0x22C | ||
| 35 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK0 0x230 | ||
| 36 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK1 0x234 | ||
| 37 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK2 0x238 | ||
| 38 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK3 0x23C | ||
| 39 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK4 0x240 | ||
| 40 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK5 0x244 | ||
| 41 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK6 0x248 | ||
| 42 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK7 0x24C | ||
| 43 | #define BCMA_GMAC_CMN_CFP_ACTION_DATA 0x250 | ||
| 44 | #define BCMA_GMAC_CMN_TCAM_BIST_CTL 0x2A0 | ||
| 45 | #define BCMA_GMAC_CMN_TCAM_BIST_STATUS 0x2A4 | ||
| 46 | #define BCMA_GMAC_CMN_TCAM_CMP_STATUS 0x2A8 | ||
| 47 | #define BCMA_GMAC_CMN_TCAM_DISABLE 0x2AC | ||
| 48 | #define BCMA_GMAC_CMN_TCAM_TEST_CTL 0x2F0 | ||
| 49 | #define BCMA_GMAC_CMN_UDF_0_A3_A0 0x300 | ||
| 50 | #define BCMA_GMAC_CMN_UDF_0_A7_A4 0x304 | ||
| 51 | #define BCMA_GMAC_CMN_UDF_0_A8 0x308 | ||
| 52 | #define BCMA_GMAC_CMN_UDF_1_A3_A0 0x310 | ||
| 53 | #define BCMA_GMAC_CMN_UDF_1_A7_A4 0x314 | ||
| 54 | #define BCMA_GMAC_CMN_UDF_1_A8 0x318 | ||
| 55 | #define BCMA_GMAC_CMN_UDF_2_A3_A0 0x320 | ||
| 56 | #define BCMA_GMAC_CMN_UDF_2_A7_A4 0x324 | ||
| 57 | #define BCMA_GMAC_CMN_UDF_2_A8 0x328 | ||
| 58 | #define BCMA_GMAC_CMN_UDF_0_B3_B0 0x330 | ||
| 59 | #define BCMA_GMAC_CMN_UDF_0_B7_B4 0x334 | ||
| 60 | #define BCMA_GMAC_CMN_UDF_0_B8 0x338 | ||
| 61 | #define BCMA_GMAC_CMN_UDF_1_B3_B0 0x340 | ||
| 62 | #define BCMA_GMAC_CMN_UDF_1_B7_B4 0x344 | ||
| 63 | #define BCMA_GMAC_CMN_UDF_1_B8 0x348 | ||
| 64 | #define BCMA_GMAC_CMN_UDF_2_B3_B0 0x350 | ||
| 65 | #define BCMA_GMAC_CMN_UDF_2_B7_B4 0x354 | ||
| 66 | #define BCMA_GMAC_CMN_UDF_2_B8 0x358 | ||
| 67 | #define BCMA_GMAC_CMN_UDF_0_C3_C0 0x360 | ||
| 68 | #define BCMA_GMAC_CMN_UDF_0_C7_C4 0x364 | ||
| 69 | #define BCMA_GMAC_CMN_UDF_0_C8 0x368 | ||
| 70 | #define BCMA_GMAC_CMN_UDF_1_C3_C0 0x370 | ||
| 71 | #define BCMA_GMAC_CMN_UDF_1_C7_C4 0x374 | ||
| 72 | #define BCMA_GMAC_CMN_UDF_1_C8 0x378 | ||
| 73 | #define BCMA_GMAC_CMN_UDF_2_C3_C0 0x380 | ||
| 74 | #define BCMA_GMAC_CMN_UDF_2_C7_C4 0x384 | ||
| 75 | #define BCMA_GMAC_CMN_UDF_2_C8 0x388 | ||
| 76 | #define BCMA_GMAC_CMN_UDF_0_D3_D0 0x390 | ||
| 77 | #define BCMA_GMAC_CMN_UDF_0_D7_D4 0x394 | ||
| 78 | #define BCMA_GMAC_CMN_UDF_0_D11_D8 0x394 | ||
| 79 | |||
| 80 | struct bcma_drv_gmac_cmn { | ||
| 81 | struct bcma_device *core; | ||
| 82 | |||
| 83 | /* Drivers accessing BCMA_GMAC_CMN_PHY_ACCESS and | ||
| 84 | * BCMA_GMAC_CMN_PHY_CTL need to take that mutex first. */ | ||
| 85 | struct mutex phy_mutex; | ||
| 86 | }; | ||
| 87 | |||
| 88 | /* Register access */ | ||
| 89 | #define gmac_cmn_read16(gc, offset) bcma_read16((gc)->core, offset) | ||
| 90 | #define gmac_cmn_read32(gc, offset) bcma_read32((gc)->core, offset) | ||
| 91 | #define gmac_cmn_write16(gc, offset, val) bcma_write16((gc)->core, offset, val) | ||
| 92 | #define gmac_cmn_write32(gc, offset, val) bcma_write32((gc)->core, offset, val) | ||
| 93 | |||
| 94 | #ifdef CONFIG_BCMA_DRIVER_GMAC_CMN | ||
| 95 | extern void __devinit bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc); | ||
| 96 | #else | ||
| 97 | static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) { } | ||
| 98 | #endif | ||
| 99 | |||
| 100 | #endif /* LINUX_BCMA_DRIVER_GMAC_CMN_H_ */ | ||
