2014-04-12 11:59:07 +00:00
|
|
|
--- a/drivers/mtd/nand/xway_nand.c
|
|
|
|
+++ b/drivers/mtd/nand/xway_nand.c
|
|
|
|
@@ -80,13 +80,16 @@ static void xway_reset_chip(struct nand_
|
2014-03-30 09:15:37 +00:00
|
|
|
|
|
|
|
static void xway_select_chip(struct mtd_info *mtd, int chip)
|
|
|
|
{
|
|
|
|
+ static unsigned long csflags;
|
|
|
|
|
|
|
|
switch (chip) {
|
|
|
|
case -1:
|
|
|
|
ltq_ebu_w32_mask(NAND_CON_CE, 0, EBU_NAND_CON);
|
|
|
|
ltq_ebu_w32_mask(NAND_CON_NANDM, 0, EBU_NAND_CON);
|
|
|
|
+ spin_unlock_irqrestore(&ebu_lock, csflags);
|
|
|
|
break;
|
|
|
|
case 0:
|
|
|
|
+ spin_lock_irqsave(&ebu_lock, csflags);
|
|
|
|
ltq_ebu_w32_mask(0, NAND_CON_NANDM, EBU_NAND_CON);
|
|
|
|
ltq_ebu_w32_mask(0, NAND_CON_CE, EBU_NAND_CON);
|
|
|
|
break;
|