[PATCH linux 3/3] mtd: spi-nor: aspeed: fix DMA access on AST2500

Cédric Le Goater clg at kaod.org
Tue Jan 10 18:54:47 AEDT 2017


On 01/10/2017 02:05 AM, Robert Lippert wrote:
> AST2500 has additional bits in the dma_addr field.  Its easier
> to just write the full address into the register as the hardware
> will handle the masking properly.

Yes definitely, 

Reviewed-by: Cédric Le Goater <clg at kaod.org>

Not for mainline yet though.

C.

> Signed-off-by: Robert Lippert <rlippert at google.com>
> ---
> 
>  drivers/mtd/spi-nor/aspeed-smc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/spi-nor/aspeed-smc.c b/drivers/mtd/spi-nor/aspeed-smc.c
> index a8ca2ab308d7..6cf159741acd 100644
> --- a/drivers/mtd/spi-nor/aspeed-smc.c
> +++ b/drivers/mtd/spi-nor/aspeed-smc.c
> @@ -349,7 +349,7 @@ static int aspeed_smc_dma_wait(struct aspeed_smc_chip *chip)
>  }
>  
>  #define DMA_LENGTH(x) (((x) - 4) & ~0xFE000003)
> -#define DMA_ADDR(x) ((x) & ~0xE0000003)
> +#define DMA_ADDR(x) ((x) & ~0x00000003)
>  
>  static inline void aspeed_smc_chip_configure(struct aspeed_smc_chip *chip,
>  					     u32 ctl)
> 



More information about the openbmc mailing list