drivers/mtd/nand/edb7312.c
PATCH 1/1 drivers/mtd/nand/edb7312.c
Hi,
I'm attaching a fix for edb7312.c. Thomas (the author of the relevant code to fix) recommended to post it here.
The patch ensures that the current code (kernel 2.6.22) uses the bits like the code prior to the refactoring. The variable "bits" is employed in a useful way now.
Can you help integrating it into mainline or should I put it into bugzilla.kernel.org?
Thanks,
Signature · 9 lines
Roland Stigge PHILOSYS Software GmbH Edisonstr. 6 85716 Unterschleißheim Tel.: 089-321407-14 Fax: 089-321407-12 email: [email protected] [email protected] [email protected] www: http://www.philosys.de/
Fix refactoring of hwcontrol
Signed-off-by Roland Stigge <[email protected]>
edb7312.c renamed from edb7312.c.orig +5 -5
@@ -74,7 +74,7 @@/* * hardware specific access to control-lines * -* NAND_NCE: bit 0 -> bit 7 +* NAND_NCE: bit 0 -> bit 6 (bit 7 = 1) * NAND_CLE: bit 1 -> bit 4 * NAND_ALE: bit 2 -> bit 5 */
@@ -83,12 +83,12 @@struct nand_chip *chip = mtd->priv;if (ctrl &NAND_CTRL_CHANGE ) { -unsigned char bits; +unsigned char bits =0x80 ; - bits = (ctrl & (NAND_CLE |NAND_ALE )) <<3 ; - bits = (ctrl &NAND_NCE ) <<7 ; + bits |= (ctrl & (NAND_CLE |NAND_ALE )) <<3 ; + bits |= (ctrl &NAND_NCE ) ?0x00 :0x40 ; -clps_writeb ((clps_readb (ep7312_pxdr) &0xB0 ) |0x10 , +clps_writeb ((clps_readb (ep7312_pxdr) &0xF0 ) | bits, ep7312_pxdr); }if (cmd !=NAND_CMD_NONE )