Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310176
b: refs/heads/master
c: 4aa6ae3
h: refs/heads/master
v: v3
  • Loading branch information
Huang Shijie authored and David Woodhouse committed May 14, 2012
1 parent ce161ee commit e226409
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d56b9d65813dd6a184efc5e7955d7e181a853c0
refs/heads/master: 4aa6ae3ecca04d7956817170418c74861ce071de
9 changes: 5 additions & 4 deletions trunk/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <linux/mtd/gpmi-nand.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <mach/mxs.h>

#include "gpmi-nand.h"
#include "gpmi-regs.h"
Expand All @@ -37,6 +36,8 @@ struct timing_threshod timing_default_threshold = {
.max_dll_delay_in_ns = 16,
};

#define MXS_SET_ADDR 0x4
#define MXS_CLR_ADDR 0x8
/*
* Clear the bit and poll it cleared. This is usually called with
* a reset address and mask being either SFTRST(bit 31) or CLKGATE
Expand All @@ -47,7 +48,7 @@ static int clear_poll_bit(void __iomem *addr, u32 mask)
int timeout = 0x400;

/* clear the bit */
__mxs_clrl(mask, addr);
writel(mask, addr + MXS_CLR_ADDR);

/*
* SFTRST needs 3 GPMI clocks to settle, the reference manual
Expand Down Expand Up @@ -92,11 +93,11 @@ static int gpmi_reset_block(void __iomem *reset_addr, bool just_enable)
goto error;

/* clear CLKGATE */
__mxs_clrl(MODULE_CLKGATE, reset_addr);
writel(MODULE_CLKGATE, reset_addr + MXS_CLR_ADDR);

if (!just_enable) {
/* set SFTRST to reset the block */
__mxs_setl(MODULE_SFTRST, reset_addr);
writel(MODULE_SFTRST, reset_addr + MXS_SET_ADDR);
udelay(1);

/* poll CLKGATE becoming set */
Expand Down

0 comments on commit e226409

Please sign in to comment.