• Uwe Kleine-König's avatar
    mtd: mxc-nand: Allow to use column addresses different from 0 · c4ca3997
    Uwe Kleine-König authored
    The mxc-nand controller works pagewise and so usually only sends
    commands to the flash chip with column == 0. A request with column != 0
    from the upper layer is then fulfilled by indexing appropriately into the
    device's RAM buffer.
    
    To be able to access the ONFI marker at offset 0x20 in reply to the
    READID command however it's invalid to read 32 bytes starting from
    column 0.
    
    So let the function used to send the address cycles send the column
    address actually passed instead of 0 and fix all callers to pass 0
    instead appropriately. Also add some warnings in case this patch changes
    the drivers semantics.
    Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
    c4ca3997
mxc_nand.c 42.3 KB