Skip to content

Commit 5abd37f

Browse files
ffainellimiquelraynal
authored andcommitted
mtd: rawnand: brcmnand: BCMA controller uses command shift of 0
For some odd and unexplained reason the BCMA NAND controller, albeit revision 3.4 uses a command shift of 0 instead of 24 as it should be, quirk that. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent 8e59130 commit 5abd37f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/mtd/nand/raw/brcmnand/brcmnand.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,12 @@ static void brcmnand_wr_corr_thresh(struct brcmnand_host *host, u8 val)
916916

917917
static inline int brcmnand_cmd_shift(struct brcmnand_controller *ctrl)
918918
{
919+
/* Kludge for the BCMA-based NAND controller which does not actually
920+
* shift the command
921+
*/
922+
if (ctrl->nand_version == 0x0304 && brcmnand_non_mmio_ops(ctrl))
923+
return 0;
924+
919925
if (ctrl->nand_version < 0x0602)
920926
return 24;
921927
return 0;

0 commit comments

Comments
 (0)