[PATCH] mtd/nand/fsl_elbc_nand: workaround for hangs on MPC837X

Scott Wood scottwood at freescale.com
Sat Mar 29 05:53:57 EST 2008


Anton Vorontsov wrote:
> @@ -495,6 +495,16 @@ static void fsl_elbc_write_buf(struct mtd_info *mtd, const u8 *buf, int len)
>  	}
>  
>  	memcpy_toio(&ctrl->addr[ctrl->index], buf, len);
> +#ifdef CONFIG_PPC_MPC837x
> +	/*
> +	 * This is workaround for the weird elbc hangs on the MPC837X CPUs,
> +	 * Scott Wood says: "...perhaps difference in how long it takes a
> +	 * write to make it through the localbus compared to a write to IMMR
> +	 * is causing problems, and sync isn't helping for some reason."
> +	 * Reading back the last byte helps though.
> +	 */
> +	in_8(&ctrl->addr[ctrl->index] + len - 1);
> +#endif

Let's do it regardless of chip -- odds are the issue exists on all 
implementations, and it's just a function of what frequencies things are 
running at.

-Scott



More information about the Linuxppc-dev mailing list