This is needed to make room for a bugfix on p1_p2_rdb_pc. A sync is used
before the final write to LSOR that initiates the transaction, to ensure
all the other set up has been completed.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
if (large) {
fmr |= FMR_ECCM;
if (large) {
fmr |= FMR_ECCM;
- out_be32(®s->fcr, (NAND_CMD_READ0 << FCR_CMD0_SHIFT) |
- (NAND_CMD_READSTART << FCR_CMD1_SHIFT));
- out_be32(®s->fir,
- (FIR_OP_CW0 << FIR_OP0_SHIFT) |
- (FIR_OP_CA << FIR_OP1_SHIFT) |
- (FIR_OP_PA << FIR_OP2_SHIFT) |
- (FIR_OP_CW1 << FIR_OP3_SHIFT) |
- (FIR_OP_RBW << FIR_OP4_SHIFT));
+ __raw_writel((NAND_CMD_READ0 << FCR_CMD0_SHIFT) |
+ (NAND_CMD_READSTART << FCR_CMD1_SHIFT),
+ ®s->fcr);
+ __raw_writel(
+ (FIR_OP_CW0 << FIR_OP0_SHIFT) |
+ (FIR_OP_CA << FIR_OP1_SHIFT) |
+ (FIR_OP_PA << FIR_OP2_SHIFT) |
+ (FIR_OP_CW1 << FIR_OP3_SHIFT) |
+ (FIR_OP_RBW << FIR_OP4_SHIFT),
+ ®s->fir);
- out_be32(®s->fcr, NAND_CMD_READ0 << FCR_CMD0_SHIFT);
- out_be32(®s->fir,
- (FIR_OP_CW0 << FIR_OP0_SHIFT) |
- (FIR_OP_CA << FIR_OP1_SHIFT) |
- (FIR_OP_PA << FIR_OP2_SHIFT) |
- (FIR_OP_RBW << FIR_OP3_SHIFT));
+ __raw_writel(NAND_CMD_READ0 << FCR_CMD0_SHIFT, ®s->fcr);
+ __raw_writel(
+ (FIR_OP_CW0 << FIR_OP0_SHIFT) |
+ (FIR_OP_CA << FIR_OP1_SHIFT) |
+ (FIR_OP_PA << FIR_OP2_SHIFT) |
+ (FIR_OP_RBW << FIR_OP3_SHIFT),
+ ®s->fir);
- out_be32(®s->fbcr, 0);
- clrsetbits_be32(®s->bank[0].br, BR_DECC, BR_DECC_CHK_GEN);
+ __raw_writel(0, ®s->fbcr);
while (pos < uboot_size) {
int i = 0;
while (pos < uboot_size) {
int i = 0;
- out_be32(®s->fbar, offs >> block_shift);
+ __raw_writel(offs >> block_shift, ®s->fbar);
do {
int j;
unsigned int page_offs = (offs & (block_size - 1)) << 1;
do {
int j;
unsigned int page_offs = (offs & (block_size - 1)) << 1;
- out_be32(®s->ltesr, ~0);
- out_be32(®s->lteatr, 0);
- out_be32(®s->fpar, page_offs);
- out_be32(®s->fmr, fmr);
- out_be32(®s->lsor, 0);
+ __raw_writel(~0, ®s->ltesr);
+ __raw_writel(0, ®s->lteatr);
+ __raw_writel(page_offs, ®s->fpar);
+ __raw_writel(fmr, ®s->fmr);
+ sync();
+ __raw_writel(0, ®s->lsor);
nand_wait();
page_offs %= WINDOW_SIZE;
nand_wait();
page_offs %= WINDOW_SIZE;