diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-08-15 14:29:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-08-15 14:29:37 -0400 |
commit | 16698918cdb39ae0d9289741ac2a9ed179f8b8ba (patch) | |
tree | 0e4ef865526a8b5b27e939e6cb4b0d7f334e3cea /include/linux/bcma | |
parent | 1f07b62f3205f6ed41759df2892eaf433bc051a1 (diff) | |
parent | 22c5649eef0fc37532e20c14d2656b28ca708a69 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Diffstat (limited to 'include/linux/bcma')
-rw-r--r-- | include/linux/bcma/bcma_driver_chipcommon.h | 85 | ||||
-rw-r--r-- | include/linux/bcma/bcma_regs.h | 2 |
2 files changed, 87 insertions, 0 deletions
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index d323a4b4143c..3fb8bbafe5e7 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
@@ -100,6 +100,7 @@ | |||
100 | #define BCMA_CC_CHIPST_4706_SFLASH_TYPE BIT(2) /* 0: 8b-p/ST-s flash, 1: 16b-p/Atmal-s flash */ | 100 | #define BCMA_CC_CHIPST_4706_SFLASH_TYPE BIT(2) /* 0: 8b-p/ST-s flash, 1: 16b-p/Atmal-s flash */ |
101 | #define BCMA_CC_CHIPST_4706_MIPS_BENDIAN BIT(3) /* 0: little, 1: big endian */ | 101 | #define BCMA_CC_CHIPST_4706_MIPS_BENDIAN BIT(3) /* 0: little, 1: big endian */ |
102 | #define BCMA_CC_CHIPST_4706_PCIE1_DISABLE BIT(5) /* PCIE1 enable strap pin */ | 102 | #define BCMA_CC_CHIPST_4706_PCIE1_DISABLE BIT(5) /* PCIE1 enable strap pin */ |
103 | #define BCMA_CC_CHIPST_5357_NAND_BOOT BIT(4) /* NAND boot, valid for CC rev 38 and/or BCM5357 */ | ||
103 | #define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */ | 104 | #define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */ |
104 | #define BCMA_CC_JCMD_START 0x80000000 | 105 | #define BCMA_CC_JCMD_START 0x80000000 |
105 | #define BCMA_CC_JCMD_BUSY 0x80000000 | 106 | #define BCMA_CC_JCMD_BUSY 0x80000000 |
@@ -266,6 +267,29 @@ | |||
266 | #define BCMA_CC_SROM_CONTROL_SIZE_16K 0x00000004 | 267 | #define BCMA_CC_SROM_CONTROL_SIZE_16K 0x00000004 |
267 | #define BCMA_CC_SROM_CONTROL_SIZE_SHIFT 1 | 268 | #define BCMA_CC_SROM_CONTROL_SIZE_SHIFT 1 |
268 | #define BCMA_CC_SROM_CONTROL_PRESENT 0x00000001 | 269 | #define BCMA_CC_SROM_CONTROL_PRESENT 0x00000001 |
270 | /* Block 0x140 - 0x190 registers are chipset specific */ | ||
271 | #define BCMA_CC_4706_FLASHSCFG 0x18C /* Flash struct configuration */ | ||
272 | #define BCMA_CC_4706_FLASHSCFG_MASK 0x000000ff | ||
273 | #define BCMA_CC_4706_FLASHSCFG_SF1 0x00000001 /* 2nd serial flash present */ | ||
274 | #define BCMA_CC_4706_FLASHSCFG_PF1 0x00000002 /* 2nd parallel flash present */ | ||
275 | #define BCMA_CC_4706_FLASHSCFG_SF1_TYPE 0x00000004 /* 2nd serial flash type : 0 : ST, 1 : Atmel */ | ||
276 | #define BCMA_CC_4706_FLASHSCFG_NF1 0x00000008 /* 2nd NAND flash present */ | ||
277 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_MASK 0x000000f0 | ||
278 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_4MB 0x00000010 /* 4MB */ | ||
279 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_8MB 0x00000020 /* 8MB */ | ||
280 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_16MB 0x00000030 /* 16MB */ | ||
281 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_32MB 0x00000040 /* 32MB */ | ||
282 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_64MB 0x00000050 /* 64MB */ | ||
283 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_128MB 0x00000060 /* 128MB */ | ||
284 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_256MB 0x00000070 /* 256MB */ | ||
285 | /* NAND flash registers for BCM4706 (corerev = 31) */ | ||
286 | #define BCMA_CC_NFLASH_CTL 0x01A0 | ||
287 | #define BCMA_CC_NFLASH_CTL_ERR 0x08000000 | ||
288 | #define BCMA_CC_NFLASH_CONF 0x01A4 | ||
289 | #define BCMA_CC_NFLASH_COL_ADDR 0x01A8 | ||
290 | #define BCMA_CC_NFLASH_ROW_ADDR 0x01AC | ||
291 | #define BCMA_CC_NFLASH_DATA 0x01B0 | ||
292 | #define BCMA_CC_NFLASH_WAITCNT0 0x01B4 | ||
269 | /* 0x1E0 is defined as shared BCMA_CLKCTLST */ | 293 | /* 0x1E0 is defined as shared BCMA_CLKCTLST */ |
270 | #define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ | 294 | #define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ |
271 | #define BCMA_CC_UART0_DATA 0x0300 | 295 | #define BCMA_CC_UART0_DATA 0x0300 |
@@ -325,6 +349,60 @@ | |||
325 | #define BCMA_CC_PLLCTL_ADDR 0x0660 | 349 | #define BCMA_CC_PLLCTL_ADDR 0x0660 |
326 | #define BCMA_CC_PLLCTL_DATA 0x0664 | 350 | #define BCMA_CC_PLLCTL_DATA 0x0664 |
327 | #define BCMA_CC_SPROM 0x0800 /* SPROM beginning */ | 351 | #define BCMA_CC_SPROM 0x0800 /* SPROM beginning */ |
352 | /* NAND flash MLC controller registers (corerev >= 38) */ | ||
353 | #define BCMA_CC_NAND_REVISION 0x0C00 | ||
354 | #define BCMA_CC_NAND_CMD_START 0x0C04 | ||
355 | #define BCMA_CC_NAND_CMD_ADDR_X 0x0C08 | ||
356 | #define BCMA_CC_NAND_CMD_ADDR 0x0C0C | ||
357 | #define BCMA_CC_NAND_CMD_END_ADDR 0x0C10 | ||
358 | #define BCMA_CC_NAND_CS_NAND_SELECT 0x0C14 | ||
359 | #define BCMA_CC_NAND_CS_NAND_XOR 0x0C18 | ||
360 | #define BCMA_CC_NAND_SPARE_RD0 0x0C20 | ||
361 | #define BCMA_CC_NAND_SPARE_RD4 0x0C24 | ||
362 | #define BCMA_CC_NAND_SPARE_RD8 0x0C28 | ||
363 | #define BCMA_CC_NAND_SPARE_RD12 0x0C2C | ||
364 | #define BCMA_CC_NAND_SPARE_WR0 0x0C30 | ||
365 | #define BCMA_CC_NAND_SPARE_WR4 0x0C34 | ||
366 | #define BCMA_CC_NAND_SPARE_WR8 0x0C38 | ||
367 | #define BCMA_CC_NAND_SPARE_WR12 0x0C3C | ||
368 | #define BCMA_CC_NAND_ACC_CONTROL 0x0C40 | ||
369 | #define BCMA_CC_NAND_CONFIG 0x0C48 | ||
370 | #define BCMA_CC_NAND_TIMING_1 0x0C50 | ||
371 | #define BCMA_CC_NAND_TIMING_2 0x0C54 | ||
372 | #define BCMA_CC_NAND_SEMAPHORE 0x0C58 | ||
373 | #define BCMA_CC_NAND_DEVID 0x0C60 | ||
374 | #define BCMA_CC_NAND_DEVID_X 0x0C64 | ||
375 | #define BCMA_CC_NAND_BLOCK_LOCK_STATUS 0x0C68 | ||
376 | #define BCMA_CC_NAND_INTFC_STATUS 0x0C6C | ||
377 | #define BCMA_CC_NAND_ECC_CORR_ADDR_X 0x0C70 | ||
378 | #define BCMA_CC_NAND_ECC_CORR_ADDR 0x0C74 | ||
379 | #define BCMA_CC_NAND_ECC_UNC_ADDR_X 0x0C78 | ||
380 | #define BCMA_CC_NAND_ECC_UNC_ADDR 0x0C7C | ||
381 | #define BCMA_CC_NAND_READ_ERROR_COUNT 0x0C80 | ||
382 | #define BCMA_CC_NAND_CORR_STAT_THRESHOLD 0x0C84 | ||
383 | #define BCMA_CC_NAND_READ_ADDR_X 0x0C90 | ||
384 | #define BCMA_CC_NAND_READ_ADDR 0x0C94 | ||
385 | #define BCMA_CC_NAND_PAGE_PROGRAM_ADDR_X 0x0C98 | ||
386 | #define BCMA_CC_NAND_PAGE_PROGRAM_ADDR 0x0C9C | ||
387 | #define BCMA_CC_NAND_COPY_BACK_ADDR_X 0x0CA0 | ||
388 | #define BCMA_CC_NAND_COPY_BACK_ADDR 0x0CA4 | ||
389 | #define BCMA_CC_NAND_BLOCK_ERASE_ADDR_X 0x0CA8 | ||
390 | #define BCMA_CC_NAND_BLOCK_ERASE_ADDR 0x0CAC | ||
391 | #define BCMA_CC_NAND_INV_READ_ADDR_X 0x0CB0 | ||
392 | #define BCMA_CC_NAND_INV_READ_ADDR 0x0CB4 | ||
393 | #define BCMA_CC_NAND_BLK_WR_PROTECT 0x0CC0 | ||
394 | #define BCMA_CC_NAND_ACC_CONTROL_CS1 0x0CD0 | ||
395 | #define BCMA_CC_NAND_CONFIG_CS1 0x0CD4 | ||
396 | #define BCMA_CC_NAND_TIMING_1_CS1 0x0CD8 | ||
397 | #define BCMA_CC_NAND_TIMING_2_CS1 0x0CDC | ||
398 | #define BCMA_CC_NAND_SPARE_RD16 0x0D30 | ||
399 | #define BCMA_CC_NAND_SPARE_RD20 0x0D34 | ||
400 | #define BCMA_CC_NAND_SPARE_RD24 0x0D38 | ||
401 | #define BCMA_CC_NAND_SPARE_RD28 0x0D3C | ||
402 | #define BCMA_CC_NAND_CACHE_ADDR 0x0D40 | ||
403 | #define BCMA_CC_NAND_CACHE_DATA 0x0D44 | ||
404 | #define BCMA_CC_NAND_CTRL_CONFIG 0x0D48 | ||
405 | #define BCMA_CC_NAND_CTRL_STATUS 0x0D4C | ||
328 | 406 | ||
329 | /* Divider allocation in 4716/47162/5356 */ | 407 | /* Divider allocation in 4716/47162/5356 */ |
330 | #define BCMA_CC_PMU5_MAINPLL_CPU 1 | 408 | #define BCMA_CC_PMU5_MAINPLL_CPU 1 |
@@ -415,6 +493,13 @@ | |||
415 | /* 4313 Chip specific ChipControl register bits */ | 493 | /* 4313 Chip specific ChipControl register bits */ |
416 | #define BCMA_CCTRL_4313_12MA_LED_DRIVE 0x00000007 /* 12 mA drive strengh for later 4313 */ | 494 | #define BCMA_CCTRL_4313_12MA_LED_DRIVE 0x00000007 /* 12 mA drive strengh for later 4313 */ |
417 | 495 | ||
496 | /* BCM5357 ChipControl register bits */ | ||
497 | #define BCMA_CHIPCTL_5357_EXTPA BIT(14) | ||
498 | #define BCMA_CHIPCTL_5357_ANT_MUX_2O3 BIT(15) | ||
499 | #define BCMA_CHIPCTL_5357_NFLASH BIT(16) | ||
500 | #define BCMA_CHIPCTL_5357_I2S_PINS_ENABLE BIT(18) | ||
501 | #define BCMA_CHIPCTL_5357_I2CSPI_PINS_ENABLE BIT(19) | ||
502 | |||
418 | /* Data for the PMU, if available. | 503 | /* Data for the PMU, if available. |
419 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) | 504 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) |
420 | */ | 505 | */ |
diff --git a/include/linux/bcma/bcma_regs.h b/include/linux/bcma/bcma_regs.h index 5a71d5719640..a393e82bf7bf 100644 --- a/include/linux/bcma/bcma_regs.h +++ b/include/linux/bcma/bcma_regs.h | |||
@@ -11,11 +11,13 @@ | |||
11 | #define BCMA_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */ | 11 | #define BCMA_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */ |
12 | #define BCMA_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */ | 12 | #define BCMA_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */ |
13 | #define BCMA_CLKCTLST_EXTRESREQ 0x00000700 /* Mask of external resource requests */ | 13 | #define BCMA_CLKCTLST_EXTRESREQ 0x00000700 /* Mask of external resource requests */ |
14 | #define BCMA_CLKCTLST_EXTRESREQ_SHIFT 8 | ||
14 | #define BCMA_CLKCTLST_HAVEALP 0x00010000 /* ALP available */ | 15 | #define BCMA_CLKCTLST_HAVEALP 0x00010000 /* ALP available */ |
15 | #define BCMA_CLKCTLST_HAVEHT 0x00020000 /* HT available */ | 16 | #define BCMA_CLKCTLST_HAVEHT 0x00020000 /* HT available */ |
16 | #define BCMA_CLKCTLST_BP_ON_ALP 0x00040000 /* RO: running on ALP clock */ | 17 | #define BCMA_CLKCTLST_BP_ON_ALP 0x00040000 /* RO: running on ALP clock */ |
17 | #define BCMA_CLKCTLST_BP_ON_HT 0x00080000 /* RO: running on HT clock */ | 18 | #define BCMA_CLKCTLST_BP_ON_HT 0x00080000 /* RO: running on HT clock */ |
18 | #define BCMA_CLKCTLST_EXTRESST 0x07000000 /* Mask of external resource status */ | 19 | #define BCMA_CLKCTLST_EXTRESST 0x07000000 /* Mask of external resource status */ |
20 | #define BCMA_CLKCTLST_EXTRESST_SHIFT 24 | ||
19 | /* Is there any BCM4328 on BCMA bus? */ | 21 | /* Is there any BCM4328 on BCMA bus? */ |
20 | #define BCMA_CLKCTLST_4328A0_HAVEHT 0x00010000 /* 4328a0 has reversed bits */ | 22 | #define BCMA_CLKCTLST_4328A0_HAVEHT 0x00010000 /* 4328a0 has reversed bits */ |
21 | #define BCMA_CLKCTLST_4328A0_HAVEALP 0x00020000 /* 4328a0 has reversed bits */ | 23 | #define BCMA_CLKCTLST_4328A0_HAVEALP 0x00020000 /* 4328a0 has reversed bits */ |