From: Vinod Koul <vkoul@kernel.org>
To: Angelo Dureghello <angelo@sysam.it>
Cc: dmaengine@vger.kernel.org, linux-m68k@vger.kernel.org
Subject: [v5,2/2] dmaengine: fsl-edma: add ColdFire mcf5441x edma support
Date: Thu, 28 Jun 2018 11:53:41 +0530 [thread overview]
Message-ID: <20180628062341.GQ22377@vkoul-mobl> (raw)
On 22-06-18, 11:44, Angelo Dureghello wrote:
> obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o
> obj-$(CONFIG_FSL_DMA) += fsldma.o
> obj-$(CONFIG_FSL_EDMA) += fsl-edma.o fsl-edma-common.o
> +obj-$(CONFIG_MCF_EDMA) += mcf-edma.o fsl-edma-common.o
that makes kernel have two copies of common.o one in thsi driver and one
in previous one why not do:
CONFIG_FSL_COMMON += fsl-edma-common.o
CONFIG_FSL_EDMA += fsl-edma.o
CONFIG_MCF_EDMA += mcf-edma.o
and you select CONFIG_FSL_COMMON in both FSL and MCF Kconfig?
> +// SPDX-License-Identifier: GPL-2.0
> +// Copyright (c) 2013-2014 Freescale Semiconductor, Inc
> +// Copyright (c) 2017 Sysam, Angelo Dureghello <angelo@sysam.it>
> +/*
> + * drivers/dma/mcf-edma.c
> + *
> + * Driver for the Freescale ColdFire 64-ch eDMA implementation,
> + * derived from drivers/dma/fsl-edma.c.
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
> + */
again, no need for text
> +static irqreturn_t mcf_edma_tx_handler(int irq, void *dev_id)
> +{
> + struct fsl_edma_engine *mcf_edma = dev_id;
> + struct edma_regs *regs = &mcf_edma->regs;
> + unsigned int ch;
> + struct fsl_edma_chan *mcf_chan;
> + u64 intmap;
> +
> + intmap = ioread32(regs->inth);
> + intmap <<= 32;
> + intmap |= ioread32(regs->intl);
> + if (!intmap)
> + return IRQ_NONE;
> +
> + for (ch = 0; ch < mcf_edma->n_chans; ch++) {
> + if (intmap & (0x1 << ch)) {
intmap & BIT(ch)
> +static irqreturn_t mcf_edma_err_handler(int irq, void *dev_id)
> +{
> + struct fsl_edma_engine *mcf_edma = dev_id;
> + struct edma_regs *regs = &mcf_edma->regs;
> + unsigned int err, ch;
> +
> + err = ioread32(regs->errl);
> + if (!err)
> + return IRQ_NONE;
> +
> + for (ch = 0; ch < (EDMA_CHANNELS / 2); ch++) {
> + if (err & (0x1 << ch)) {
here as well
> +static int mcf_edma_remove(struct platform_device *pdev)
> +{
> + struct fsl_edma_engine *mcf_edma = platform_get_drvdata(pdev);
> +
> + fsl_edma_cleanup_vchan(&mcf_edma->dma_dev);
> + dma_async_device_unregister(&mcf_edma->dma_dev);
at this point your irqs are still registered and running. You vchan
tasklet maybe still pending to be eecuted and can be scheduled again
> +static int __init mcf_edma_init(void)
> +{
> + return platform_driver_register(&mcf_edma_driver);
> +}
> +subsys_initcall(mcf_edma_init);
why subsys_initcall?
next reply other threads:[~2018-06-28 6:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-28 6:23 Vinod Koul [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-07-01 13:11 [v5,2/2] dmaengine: fsl-edma: add ColdFire mcf5441x edma support Vinod Koul
2018-06-30 21:06 Geert Uytterhoeven
2018-06-30 13:42 Angelo Dureghello
2018-06-29 5:15 Vinod Koul
2018-06-28 16:56 Angelo Dureghello
2018-06-28 11:09 Vinod Koul
2018-06-28 7:43 Geert Uytterhoeven
2018-06-28 7:29 Vinod Koul
2018-06-28 6:50 Geert Uytterhoeven
2018-06-22 9:44 Angelo Dureghello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180628062341.GQ22377@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=angelo@sysam.it \
--cc=dmaengine@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox