[PATCH linux dev-4.7 09/12] mtd: spi-nor: aspeed: add DMA support to smc controller
Joel Stanley
joel at jms.id.au
Mon Oct 17 16:03:43 AEDT 2016
On Fri, Oct 14, 2016 at 11:08 PM, Cédric Le Goater <clg at kaod.org> wrote:
> The Aspeed FMC controller can handle transfers to the flash modules
> using DMAs. A couple of registers first need to be programmed with the
> DRAM and flash addresses and the length of the transfer. The transfer
> is then initiated using a DMA control register and an interrupt
> notifies the completion.
>
> Such transfers can replace the current IO mode in the read/write ops
> when some conditions are met on the size and the alignment. In case of
> failure, a timeout for instance, the operation is restarted using the
> IO mode.
>
> DMA support does not seem to be that efficient. So we provide some
> sysfs files for tuning and to switch it on and off (default is off)
It looks like this version only has a module parameter, and not the sysfs files.
>
> Signed-off-by: Cédric Le Goater <clg at kaod.org>
Reviewed-by: Joel Stanley <joel at jms.id.au>
> ---
> drivers/mtd/spi-nor/aspeed-smc.c | 246 ++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 243 insertions(+), 3 deletions(-)
>
> /*
> @@ -530,6 +769,7 @@ static int aspeed_smc_probe(struct platform_device *pdev)
> continue;
> }
>
> + chip->phys_base = r->start;
> /*
> * Always turn on the write enable bit in the type and settings
> * or flash configuration register to allow opcodes to be sent
> @@ -621,7 +861,7 @@ static struct platform_driver aspeed_smc_driver = {
> .probe = aspeed_smc_probe,
> .remove = aspeed_smc_remove,
> .driver = {
> - .name = KBUILD_MODNAME,
> + .name = DEVICE_NAME,
This should be in a different commit.
> .of_match_table = aspeed_smc_matches,
> }
> };
> --
> 2.7.4
>
More information about the openbmc
mailing list