diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2012-08-08 13:10:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-08-10 15:27:00 -0400 |
commit | 3213e1a570783ca3a41d025cede4a27b18bc24c9 (patch) | |
tree | 4e459e161800410fee83e0ff5ee17d208308e9b3 | |
parent | 8dd4372e2a462081b92b38af18accb427fa2d554 (diff) |
bcma: add (mostly) NAND defines
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-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 3c80885fa82..fcb06fb284e 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
@@ -94,6 +94,7 @@ | |||
94 | #define BCMA_CC_CHIPST_4706_SFLASH_TYPE BIT(2) /* 0: 8b-p/ST-s flash, 1: 16b-p/Atmal-s flash */ | 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 */ | 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 */ | 96 | #define BCMA_CC_CHIPST_4706_PCIE1_DISABLE BIT(5) /* PCIE1 enable strap pin */ |
97 | #define BCMA_CC_CHIPST_5357_NAND_BOOT BIT(4) /* NAND boot, valid for CC rev 38 and/or BCM5357 */ | ||
97 | #define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */ | 98 | #define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */ |
98 | #define BCMA_CC_JCMD_START 0x80000000 | 99 | #define BCMA_CC_JCMD_START 0x80000000 |
99 | #define BCMA_CC_JCMD_BUSY 0x80000000 | 100 | #define BCMA_CC_JCMD_BUSY 0x80000000 |
@@ -260,6 +261,29 @@ | |||
260 | #define BCMA_CC_SROM_CONTROL_SIZE_16K 0x00000004 | 261 | #define BCMA_CC_SROM_CONTROL_SIZE_16K 0x00000004 |
261 | #define BCMA_CC_SROM_CONTROL_SIZE_SHIFT 1 | 262 | #define BCMA_CC_SROM_CONTROL_SIZE_SHIFT 1 |
262 | #define BCMA_CC_SROM_CONTROL_PRESENT 0x00000001 | 263 | #define BCMA_CC_SROM_CONTROL_PRESENT 0x00000001 |
264 | /* Block 0x140 - 0x190 registers are chipset specific */ | ||
265 | #define BCMA_CC_4706_FLASHSCFG 0x18C /* Flash struct configuration */ | ||
266 | #define BCMA_CC_4706_FLASHSCFG_MASK 0x000000ff | ||
267 | #define BCMA_CC_4706_FLASHSCFG_SF1 0x00000001 /* 2nd serial flash present */ | ||
268 | #define BCMA_CC_4706_FLASHSCFG_PF1 0x00000002 /* 2nd parallel flash present */ | ||
269 | #define BCMA_CC_4706_FLASHSCFG_SF1_TYPE 0x00000004 /* 2nd serial flash type : 0 : ST, 1 : Atmel */ | ||
270 | #define BCMA_CC_4706_FLASHSCFG_NF1 0x00000008 /* 2nd NAND flash present */ | ||
271 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_MASK 0x000000f0 | ||
272 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_4MB 0x00000010 /* 4MB */ | ||
273 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_8MB 0x00000020 /* 8MB */ | ||
274 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_16MB 0x00000030 /* 16MB */ | ||
275 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_32MB 0x00000040 /* 32MB */ | ||
276 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_64MB 0x00000050 /* 64MB */ | ||
277 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_128MB 0x00000060 /* 128MB */ | ||
278 | #define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_256MB 0x00000070 /* 256MB */ | ||
279 | /* NAND flash registers for BCM4706 (corerev = 31) */ | ||
280 | #define BCMA_CC_NFLASH_CTL 0x01A0 | ||
281 | #define BCMA_CC_NFLASH_CTL_ERR 0x08000000 | ||
282 | #define BCMA_CC_NFLASH_CONF 0x01A4 | ||
283 | #define BCMA_CC_NFLASH_COL_ADDR 0x01A8 | ||
284 | #define BCMA_CC_NFLASH_ROW_ADDR 0x01AC | ||
285 | #define BCMA_CC_NFLASH_DATA 0x01B0 | ||
286 | #define BCMA_CC_NFLASH_WAITCNT0 0x01B4 | ||
263 | /* 0x1E0 is defined as shared BCMA_CLKCTLST */ | 287 | /* 0x1E0 is defined as shared BCMA_CLKCTLST */ |
264 | #define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ | 288 | #define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ |
265 | #define BCMA_CC_UART0_DATA 0x0300 | 289 | #define BCMA_CC_UART0_DATA 0x0300 |
@@ -319,6 +343,60 @@ | |||
319 | #define BCMA_CC_PLLCTL_ADDR 0x0660 | 343 | #define BCMA_CC_PLLCTL_ADDR 0x0660 |
320 | #define BCMA_CC_PLLCTL_DATA 0x0664 | 344 | #define BCMA_CC_PLLCTL_DATA 0x0664 |
321 | #define BCMA_CC_SPROM 0x0800 /* SPROM beginning */ | 345 | #define BCMA_CC_SPROM 0x0800 /* SPROM beginning */ |
346 | /* NAND flash MLC controller registers (corerev >= 38) */ | ||
347 | #define BCMA_CC_NAND_REVISION 0x0C00 | ||
348 | #define BCMA_CC_NAND_CMD_START 0x0C04 | ||
349 | #define BCMA_CC_NAND_CMD_ADDR_X 0x0C08 | ||
350 | #define BCMA_CC_NAND_CMD_ADDR 0x0C0C | ||
351 | #define BCMA_CC_NAND_CMD_END_ADDR 0x0C10 | ||
352 | #define BCMA_CC_NAND_CS_NAND_SELECT 0x0C14 | ||
353 | #define BCMA_CC_NAND_CS_NAND_XOR 0x0C18 | ||
354 | #define BCMA_CC_NAND_SPARE_RD0 0x0C20 | ||
355 | #define BCMA_CC_NAND_SPARE_RD4 0x0C24 | ||
356 | #define BCMA_CC_NAND_SPARE_RD8 0x0C28 | ||
357 | #define BCMA_CC_NAND_SPARE_RD12 0x0C2C | ||
358 | #define BCMA_CC_NAND_SPARE_WR0 0x0C30 | ||
359 | #define BCMA_CC_NAND_SPARE_WR4 0x0C34 | ||
360 | #define BCMA_CC_NAND_SPARE_WR8 0x0C38 | ||
361 | #define BCMA_CC_NAND_SPARE_WR12 0x0C3C | ||
362 | #define BCMA_CC_NAND_ACC_CONTROL 0x0C40 | ||
363 | #define BCMA_CC_NAND_CONFIG 0x0C48 | ||
364 | #define BCMA_CC_NAND_TIMING_1 0x0C50 | ||
365 | #define BCMA_CC_NAND_TIMING_2 0x0C54 | ||
366 | #define BCMA_CC_NAND_SEMAPHORE 0x0C58 | ||
367 | #define BCMA_CC_NAND_DEVID 0x0C60 | ||
368 | #define BCMA_CC_NAND_DEVID_X 0x0C64 | ||
369 | #define BCMA_CC_NAND_BLOCK_LOCK_STATUS 0x0C68 | ||
370 | #define BCMA_CC_NAND_INTFC_STATUS 0x0C6C | ||
371 | #define BCMA_CC_NAND_ECC_CORR_ADDR_X 0x0C70 | ||
372 | #define BCMA_CC_NAND_ECC_CORR_ADDR 0x0C74 | ||
373 | #define BCMA_CC_NAND_ECC_UNC_ADDR_X 0x0C78 | ||
374 | #define BCMA_CC_NAND_ECC_UNC_ADDR 0x0C7C | ||
375 | #define BCMA_CC_NAND_READ_ERROR_COUNT 0x0C80 | ||
376 | #define BCMA_CC_NAND_CORR_STAT_THRESHOLD 0x0C84 | ||
377 | #define BCMA_CC_NAND_READ_ADDR_X 0x0C90 | ||
378 | #define BCMA_CC_NAND_READ_ADDR 0x0C94 | ||
379 | #define BCMA_CC_NAND_PAGE_PROGRAM_ADDR_X 0x0C98 | ||
380 | #define BCMA_CC_NAND_PAGE_PROGRAM_ADDR 0x0C9C | ||
381 | #define BCMA_CC_NAND_COPY_BACK_ADDR_X 0x0CA0 | ||
382 | #define BCMA_CC_NAND_COPY_BACK_ADDR 0x0CA4 | ||
383 | #define BCMA_CC_NAND_BLOCK_ERASE_ADDR_X 0x0CA8 | ||
384 | #define BCMA_CC_NAND_BLOCK_ERASE_ADDR 0x0CAC | ||
385 | #define BCMA_CC_NAND_INV_READ_ADDR_X 0x0CB0 | ||
386 | #define BCMA_CC_NAND_INV_READ_ADDR 0x0CB4 | ||
387 | #define BCMA_CC_NAND_BLK_WR_PROTECT 0x0CC0 | ||
388 | #define BCMA_CC_NAND_ACC_CONTROL_CS1 0x0CD0 | ||
389 | #define BCMA_CC_NAND_CONFIG_CS1 0x0CD4 | ||
390 | #define BCMA_CC_NAND_TIMING_1_CS1 0x0CD8 | ||
391 | #define BCMA_CC_NAND_TIMING_2_CS1 0x0CDC | ||
392 | #define BCMA_CC_NAND_SPARE_RD16 0x0D30 | ||
393 | #define BCMA_CC_NAND_SPARE_RD20 0x0D34 | ||
394 | #define BCMA_CC_NAND_SPARE_RD24 0x0D38 | ||
395 | #define BCMA_CC_NAND_SPARE_RD28 0x0D3C | ||
396 | #define BCMA_CC_NAND_CACHE_ADDR 0x0D40 | ||
397 | #define BCMA_CC_NAND_CACHE_DATA 0x0D44 | ||
398 | #define BCMA_CC_NAND_CTRL_CONFIG 0x0D48 | ||
399 | #define BCMA_CC_NAND_CTRL_STATUS 0x0D4C | ||
322 | 400 | ||
323 | /* Divider allocation in 4716/47162/5356 */ | 401 | /* Divider allocation in 4716/47162/5356 */ |
324 | #define BCMA_CC_PMU5_MAINPLL_CPU 1 | 402 | #define BCMA_CC_PMU5_MAINPLL_CPU 1 |
@@ -409,6 +487,13 @@ | |||
409 | /* 4313 Chip specific ChipControl register bits */ | 487 | /* 4313 Chip specific ChipControl register bits */ |
410 | #define BCMA_CCTRL_4313_12MA_LED_DRIVE 0x00000007 /* 12 mA drive strengh for later 4313 */ | 488 | #define BCMA_CCTRL_4313_12MA_LED_DRIVE 0x00000007 /* 12 mA drive strengh for later 4313 */ |
411 | 489 | ||
490 | /* BCM5357 ChipControl register bits */ | ||
491 | #define BCMA_CHIPCTL_5357_EXTPA BIT(14) | ||
492 | #define BCMA_CHIPCTL_5357_ANT_MUX_2O3 BIT(15) | ||
493 | #define BCMA_CHIPCTL_5357_NFLASH BIT(16) | ||
494 | #define BCMA_CHIPCTL_5357_I2S_PINS_ENABLE BIT(18) | ||
495 | #define BCMA_CHIPCTL_5357_I2CSPI_PINS_ENABLE BIT(19) | ||
496 | |||
412 | /* Data for the PMU, if available. | 497 | /* Data for the PMU, if available. |
413 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) | 498 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) |
414 | */ | 499 | */ |
diff --git a/include/linux/bcma/bcma_regs.h b/include/linux/bcma/bcma_regs.h index 5a71d571964..a393e82bf7b 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 */ |