aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2012-09-13 02:57:56 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-09-29 10:55:18 -0400
commitd37e02d8f3a892b57738f1c1431779d5939214d1 (patch)
treefde851a10fb36607c90a9abd992d3b18cb7a2e8a /drivers/mtd/nand/gpmi-nand/gpmi-lib.c
parentae70ba2d6078d60c527c93076133accf59becaf8 (diff)
mtd: gpmi: add a new field for HW_GPMI_CTRL1
add the WRN_DLY_SEL field for HW_GPMI_CTRL1. This field is used as delay for gpmi write strobe. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/gpmi-nand/gpmi-lib.c')
-rw-r--r--drivers/mtd/nand/gpmi-nand/gpmi-lib.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
index 41e905dfc399..2d1f77c0527e 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
@@ -731,6 +731,7 @@ return_results:
731 hw->use_half_periods = dll_use_half_periods; 731 hw->use_half_periods = dll_use_half_periods;
732 hw->sample_delay_factor = sample_delay_factor; 732 hw->sample_delay_factor = sample_delay_factor;
733 hw->device_busy_timeout = GPMI_DEFAULT_BUSY_TIMEOUT; 733 hw->device_busy_timeout = GPMI_DEFAULT_BUSY_TIMEOUT;
734 hw->wrn_dly_sel = BV_GPMI_CTRL1_WRN_DLY_SEL_4_TO_8NS;
734 735
735 /* Return success. */ 736 /* Return success. */
736 return 0; 737 return 0;
@@ -769,6 +770,11 @@ void gpmi_begin(struct gpmi_nand_data *this)
769 770
770 /* [3] The following code is to set the HW_GPMI_CTRL1. */ 771 /* [3] The following code is to set the HW_GPMI_CTRL1. */
771 772
773 /* Set the WRN_DLY_SEL */
774 writel(BM_GPMI_CTRL1_WRN_DLY_SEL, gpmi_regs + HW_GPMI_CTRL1_CLR);
775 writel(BF_GPMI_CTRL1_WRN_DLY_SEL(hw.wrn_dly_sel),
776 gpmi_regs + HW_GPMI_CTRL1_SET);
777
772 /* DLL_ENABLE must be set to 0 when setting RDN_DELAY or HALF_PERIOD. */ 778 /* DLL_ENABLE must be set to 0 when setting RDN_DELAY or HALF_PERIOD. */
773 writel(BM_GPMI_CTRL1_DLL_ENABLE, gpmi_regs + HW_GPMI_CTRL1_CLR); 779 writel(BM_GPMI_CTRL1_DLL_ENABLE, gpmi_regs + HW_GPMI_CTRL1_CLR);
774 780