aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa
diff options
context:
space:
mode:
authorJing Huang <huangj@brocade.com>2010-07-08 22:54:39 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 13:04:15 -0400
commitdf2a52a6c8c4995e0bec0b739ddb2f51664837dd (patch)
tree7599da343cb246d041cda0f9b38794859a077aeb /drivers/scsi/bfa
parent9aeb6802ddc06b66fc1a58a882fa54bba37040b3 (diff)
[SCSI] bfa: fix chip and memory initialization
Clear PSS memory reset that is set as part of power-on-reset (pci reset). Complete PMM memory reset before BISTR start. Clear EDRAM BISTR start bit after fixed delay. BISTR DONE bit status is not getting set. Use a fixed 1ms delay for BISTR now. Expose PMM IT memory definitions to host. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa')
-rw-r--r--drivers/scsi/bfa/bfa_ioc_ct.c25
-rw-r--r--drivers/scsi/bfa/include/bfi/bfi_ctreg.h3
2 files changed, 28 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc_ct.c b/drivers/scsi/bfa/bfa_ioc_ct.c
index 17bd1513b34e..68f027da001e 100644
--- a/drivers/scsi/bfa/bfa_ioc_ct.c
+++ b/drivers/scsi/bfa/bfa_ioc_ct.c
@@ -376,10 +376,35 @@ bfa_ioc_ct_pll_init(struct bfa_ioc_s *ioc)
376 bfa_reg_write(ioc->ioc_regs.app_pll_fast_ctl_reg, pll_fclk | 376 bfa_reg_write(ioc->ioc_regs.app_pll_fast_ctl_reg, pll_fclk |
377 __APP_PLL_425_ENABLE); 377 __APP_PLL_425_ENABLE);
378 378
379 /**
380 * PSS memory reset is asserted at power-on-reset. Need to clear
381 * this before running EDRAM BISTR
382 */
383 if (ioc->cna) {
384 bfa_reg_write((rb + PMM_1T_RESET_REG_P0), __PMM_1T_RESET_P);
385 bfa_reg_write((rb + PMM_1T_RESET_REG_P1), __PMM_1T_RESET_P);
386 }
387
388 r32 = bfa_reg_read((rb + PSS_CTL_REG));
389 r32 &= ~__PSS_LMEM_RESET;
390 bfa_reg_write((rb + PSS_CTL_REG), r32);
391 bfa_os_udelay(1000);
392
393 if (ioc->cna) {
394 bfa_reg_write((rb + PMM_1T_RESET_REG_P0), 0);
395 bfa_reg_write((rb + PMM_1T_RESET_REG_P1), 0);
396 }
397
379 bfa_reg_write((rb + MBIST_CTL_REG), __EDRAM_BISTR_START); 398 bfa_reg_write((rb + MBIST_CTL_REG), __EDRAM_BISTR_START);
380 bfa_os_udelay(1000); 399 bfa_os_udelay(1000);
381 r32 = bfa_reg_read((rb + MBIST_STAT_REG)); 400 r32 = bfa_reg_read((rb + MBIST_STAT_REG));
382 bfa_trc(ioc, r32); 401 bfa_trc(ioc, r32);
402
403 /**
404 * Clear BISTR
405 */
406 bfa_reg_write((rb + MBIST_CTL_REG), 0);
407
383 /* 408 /*
384 * release semaphore. 409 * release semaphore.
385 */ 410 */
diff --git a/drivers/scsi/bfa/include/bfi/bfi_ctreg.h b/drivers/scsi/bfa/include/bfi/bfi_ctreg.h
index 57a8497105af..c0ef5a93b797 100644
--- a/drivers/scsi/bfa/include/bfi/bfi_ctreg.h
+++ b/drivers/scsi/bfa/include/bfi/bfi_ctreg.h
@@ -455,6 +455,9 @@ enum {
455#define __PSS_LPU0_RAM_ERR 0x00000001 455#define __PSS_LPU0_RAM_ERR 0x00000001
456#define ERR_SET_REG 0x00018818 456#define ERR_SET_REG 0x00018818
457#define __PSS_ERR_STATUS_SET 0x003fffff 457#define __PSS_ERR_STATUS_SET 0x003fffff
458#define PMM_1T_RESET_REG_P0 0x0002381c
459#define __PMM_1T_RESET_P 0x00000001
460#define PMM_1T_RESET_REG_P1 0x00023c1c
458#define HQM_QSET0_RXQ_DRBL_P0 0x00038000 461#define HQM_QSET0_RXQ_DRBL_P0 0x00038000
459#define __RXQ0_ADD_VECTORS_P 0x80000000 462#define __RXQ0_ADD_VECTORS_P 0x80000000
460#define __RXQ0_STOP_P 0x40000000 463#define __RXQ0_STOP_P 0x40000000