• Stefan Roese's avatar
    dmaengine: altera: Use macros instead of structs to describe the registers · 6084fc2e
    Stefan Roese authored
    This patch moves from a struct declaration for the DMA controller
    registers to macros with offests to the base address. This is mainly
    done to remove the sparse warnings, since the function parameter of
    ioread32/iowrite32 is "void __iomem *" instead of a pointer to struct
    members. With this patch applied, no sparse warning is seen anymore.
    
    Please note that the struct for the descriptors is still kept in place,
    as the code largely accesses the struct members as internal variables
    before the complete struct is copied into the descriptor FIFO of the
    DMA controller.
    
    Additionally this patch also removes two warnings "variable xxx set but
    not used" seen when compiling with "W=1". The registers need to be read
    to flush the response FIFO, but nothing needs to be done with them. So
    the code is correct here and the warning is a false one.
    Signed-off-by: default avatarStefan Roese <sr@denx.de>
    Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
    6084fc2e
altera-msgdma.c 24.6 KB