All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: Julian Braha <julianbraha@gmail.com>
Cc: vkoul@kernel.org, Frank.Li@kernel.org, dave.jiang@intel.com,
	peng.fan@nxp.com, rosenp@gmail.com, dmaengine@vger.kernel.org
Subject: Re: [PATCH v4] dmaengine: ppc4xx: remove dead 440SP code
Date: Thu, 3 Dec 2026 11:54:01 -0600	[thread overview]
Message-ID: <axGsuWpgtMyWF7Ur@SMW015318> (raw)
In-Reply-To: <20261203173623.2525466-1-julianbraha@gmail.com>

On Thu, Dec 03, 2026 at 05:36:23PM +0000, Julian Braha wrote:
> The 440SP config option can never be enabled, making all references to it
> dead code.
>
> The only board using CONFIG_440SP was IBM LUAN, which was commented out by
> commit f65573314e4e ("[POWERPC] Re-organize Kconfig code for 4xx in
> arch/powerpc") then removed by commit ff5f483f3091 ("powerpc: 4xx: remove
> commented out Kconfig entries").
>
> Let's remove support for 440SP from the PPC4xx ADMA driver. Remove the
> 440SP cases for the RAID-6 polynomial and the DMA descriptor fields.
>
> This dead code was found by kconfirm, a static analysis tool for Kconfig.
>
> Signed-off-by: Julian Braha <julianbraha@gmail.com>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

> Changes since v3:
> - limit changes to dmaengine-only (Vinod)
>
> Link to v3:
> https://lore.kernel.org/all/20260901152341.1219343-1-julianbraha@gmail.com/
>
> Changes since v2:
> - cleaned up preprocessor condition
>
> Link to v2:
> https://lore.kernel.org/all/20260901150645.1199097-1-julianbraha@gmail.com/
>
> Changes since v1:
> - added historic details to description
>
> Link to v1:
> https://lore.kernel.org/all/20260816125615.985387-1-julianbraha@gmail.com/
> ---
>  drivers/dma/Kconfig       | 2 +-
>  drivers/dma/ppc4xx/adma.c | 9 ---------
>  drivers/dma/ppc4xx/adma.h | 2 +-
>  drivers/dma/ppc4xx/dma.h  | 9 ---------
>  4 files changed, 2 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
> index 01f96a8257e5..01171b8106fc 100644
> --- a/drivers/dma/Kconfig
> +++ b/drivers/dma/Kconfig
> @@ -77,7 +77,7 @@ config AMBA_PL08X
>
>  config AMCC_PPC440SPE_ADMA
>  	tristate "AMCC PPC440SPe ADMA support"
> -	depends on 440SPe || 440SP
> +	depends on 440SPe
>  	select DMA_ENGINE
>  	select DMA_ENGINE_RAID
>  	select ARCH_HAS_ASYNC_TX_FIND_CHANNEL
> diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
> index 9e8b3e2956b4..3e43d6b0f7d1 100644
> --- a/drivers/dma/ppc4xx/adma.c
> +++ b/drivers/dma/ppc4xx/adma.c
> @@ -4338,14 +4338,9 @@ static ssize_t poly_show(struct device_driver *dev, char *buf)
>  	ssize_t size = 0;
>  	u32 reg;
>
> -#ifdef CONFIG_440SP
> -	/* 440SP has fixed polynomial */
> -	reg = 0x4d;
> -#else
>  	reg = dcr_read(ppc440spe_mq_dcr_host, DCRN_MQ0_CFBHL);
>  	reg >>= MQ0_CFBHL_POLY;
>  	reg &= 0xFF;
> -#endif
>
>  	size = sysfs_emit(buf, "PPC440SP(e) RAID-6 driver "
>  			"uses 0x1%02x polynomial.\n", reg);
> @@ -4357,10 +4352,6 @@ static ssize_t poly_store(struct device_driver *dev, const char *buf,
>  {
>  	unsigned long reg, val;
>  	int err;
> -#ifdef CONFIG_440SP
> -	/* 440SP uses default 0x14D polynomial only */
> -	return -EINVAL;
> -#endif
>
>  	if (!count || count > 6)
>  		return -EINVAL;
> diff --git a/drivers/dma/ppc4xx/adma.h b/drivers/dma/ppc4xx/adma.h
> index f8a5d7c1fb40..0ec35382d274 100644
> --- a/drivers/dma/ppc4xx/adma.h
> +++ b/drivers/dma/ppc4xx/adma.h
> @@ -19,7 +19,7 @@
>  #define tx_to_ppc440spe_adma_slot(tx) \
>  		container_of(tx, struct ppc440spe_adma_desc_slot, async_tx)
>
> -/* Default polynomial (for 440SP is only available) */
> +/* Default polynomial */
>  #define PPC440SPE_DEFAULT_POLY	0x4d
>
>  #define PPC440SPE_ADMA_ENGINES_NUM	(XOR_ENGINES_NUM + DMA_ENGINES_NUM)
> diff --git a/drivers/dma/ppc4xx/dma.h b/drivers/dma/ppc4xx/dma.h
> index b5725481bfa6..17cbb2d1ee1c 100644
> --- a/drivers/dma/ppc4xx/dma.h
> +++ b/drivers/dma/ppc4xx/dma.h
> @@ -70,20 +70,11 @@
>
>  #define DMA_CUED_XOR_BASE	(0x10000000)
>  #define DMA_CUED_XOR_HB		(0x00000008)
> -
> -#ifdef CONFIG_440SP
> -#define DMA_CUED_MULT1_OFF	0
> -#define DMA_CUED_MULT2_OFF	8
> -#define DMA_CUED_MULT3_OFF	16
> -#define DMA_CUED_REGION_OFF	24
> -#define DMA_CUED_XOR_WIN_MSK	(0xFC000000)
> -#else
>  #define DMA_CUED_MULT1_OFF	2
>  #define DMA_CUED_MULT2_OFF	10
>  #define DMA_CUED_MULT3_OFF	18
>  #define DMA_CUED_REGION_OFF	26
>  #define DMA_CUED_XOR_WIN_MSK	(0xF0000000)
> -#endif
>
>  #define DMA_CUED_REGION_MSK	0x3
>  #define DMA_RXOR123		0x0
> --
> 2.56.1
>

      reply	other threads:[~2026-12-03 17:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 17:36 [PATCH v4] dmaengine: ppc4xx: remove dead 440SP code Julian Braha
2026-12-03 17:54 ` Frank Li [this message]

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=axGsuWpgtMyWF7Ur@SMW015318 \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@kernel.org \
    --cc=dave.jiang@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=julianbraha@gmail.com \
    --cc=peng.fan@nxp.com \
    --cc=rosenp@gmail.com \
    --cc=vkoul@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.