[PATCH] mtd: rawnand: marvell: select target before setting up data interface

Daniel Mack daniel at zonque.org
Mon Apr 1 08:29:12 PDT 2019


Hi Boris,

On 30/3/2019 7:20 PM, Boris Brezillon wrote:
> On Mon, 25 Mar 2019 17:21:42 +0100
> Daniel Mack <daniel at zonque.org> wrote:

>> I can't quite make sense of that yet, all I know is that calling
>> marvell_nfc_select_target() with -1 from
>> marvell_nfc_setup_data_interface() makes the driver functional again. Hmm.
> 
> Can you try with the following diff applied?
> --->8---
> diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
> index f38e5c1b87e4..e8eccf6afc8f 100644
> --- a/drivers/mtd/nand/raw/marvell_nand.c
> +++ b/drivers/mtd/nand/raw/marvell_nand.c
> @@ -722,9 +722,6 @@ static void marvell_nfc_select_target(struct nand_chip *chip,
>         struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
>         u32 ndcr_generic;
>  
> -       if (chip == nfc->selected_chip && die_nr == marvell_nand->selected_die)
> -               return;
> -
>         writel_relaxed(marvell_nand->ndtr0, nfc->regs + NDTR0);
>         writel_relaxed(marvell_nand->ndtr1, nfc->regs + NDTR1);

Yes, this works. Thanks a lot!

Do you want to submit a patch for that? You can have my

  Tested-by: Daniel Mack <daniel at zonque.org>


Best regards,
Daniel





More information about the linux-mtd mailing list