All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
	Michael Trimarchi <michael@amarulasolutions.com>,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>
Subject: [PATCH v5 01/44] mtd: Drop unused kb9202_nand driver
Date: Wed, 22 Feb 2023 09:33:42 -0700	[thread overview]
Message-ID: <20230222163425.2043934-2-sjg@chromium.org> (raw)
In-Reply-To: <20230222163425.2043934-1-sjg@chromium.org>

This is not used since time out of mind.

Drop the driver and Kconfig option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Michael Trimarchi <michael@amarulasolutions.com>
---

(no changes since v1)

 drivers/mtd/nand/raw/Makefile      |   1 -
 drivers/mtd/nand/raw/kb9202_nand.c | 134 -----------------------------
 2 files changed, 135 deletions(-)
 delete mode 100644 drivers/mtd/nand/raw/kb9202_nand.c

diff --git a/drivers/mtd/nand/raw/Makefile b/drivers/mtd/nand/raw/Makefile
index 666323e2219..add2b4cf655 100644
--- a/drivers/mtd/nand/raw/Makefile
+++ b/drivers/mtd/nand/raw/Makefile
@@ -56,7 +56,6 @@ obj-$(CONFIG_NAND_DENALI) += denali.o
 obj-$(CONFIG_NAND_DENALI_DT) += denali_dt.o
 obj-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
 obj-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_nand.o
-obj-$(CONFIG_NAND_KB9202) += kb9202_nand.o
 obj-$(CONFIG_NAND_KIRKWOOD) += kirkwood_nand.o
 obj-$(CONFIG_NAND_KMETER1) += kmeter1_nand.o
 obj-$(CONFIG_NAND_LPC32XX_MLC) += lpc32xx_nand_mlc.o
diff --git a/drivers/mtd/nand/raw/kb9202_nand.c b/drivers/mtd/nand/raw/kb9202_nand.c
deleted file mode 100644
index 9d26532c780..00000000000
--- a/drivers/mtd/nand/raw/kb9202_nand.c
+++ /dev/null
@@ -1,134 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2006
- * KwikByte <kb9200_dev@kwikbyte.com>
- *
- * (C) Copyright 2009
- * Matthias Kaehlcke <matthias@kaehlcke.net>
- */
-
-#include <common.h>
-#include <linux/mtd/rawnand.h>
-#include <asm/io.h>
-#include <asm/arch/AT91RM9200.h>
-#include <asm/arch/hardware.h>
-
-#include <nand.h>
-
-/*
- *      hardware specific access to control-lines
- */
-
-#define MASK_ALE        (1 << 22)       /* our ALE is A22 */
-#define MASK_CLE        (1 << 21)       /* our CLE is A21 */
-
-#define KB9202_NAND_NCE (1 << 28) /* EN* on D28 */
-#define KB9202_NAND_BUSY (1 << 29) /* RB* on D29 */
-
-#define KB9202_SMC2_NWS (1 << 2)
-#define KB9202_SMC2_TDF (1 << 8)
-#define KB9202_SMC2_RWSETUP (1 << 24)
-#define KB9202_SMC2_RWHOLD (1 << 29)
-
-/*
- *	Board-specific function to access device control signals
- */
-static void kb9202_nand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
-{
-	struct nand_chip *this = mtd_to_nand(mtd);
-
-	if (ctrl & NAND_CTRL_CHANGE) {
-		ulong IO_ADDR_W = (ulong) this->IO_ADDR_W;
-
-		/* clear ALE and CLE bits */
-		IO_ADDR_W &= ~(MASK_ALE | MASK_CLE);
-
-		if (ctrl & NAND_CLE)
-			IO_ADDR_W |= MASK_CLE;
-
-		if (ctrl & NAND_ALE)
-			IO_ADDR_W |= MASK_ALE;
-
-		this->IO_ADDR_W = (void *) IO_ADDR_W;
-
-		if (ctrl & NAND_NCE)
-			writel(KB9202_NAND_NCE, AT91C_PIOC_CODR);
-		else
-			writel(KB9202_NAND_NCE, AT91C_PIOC_SODR);
-	}
-
-	if (cmd != NAND_CMD_NONE)
-		writeb(cmd, this->IO_ADDR_W);
-}
-
-
-/*
- * Board-specific function to access the device ready signal.
- */
-static int kb9202_nand_ready(struct mtd_info *mtd)
-{
-	return readl(AT91C_PIOC_PDSR) & KB9202_NAND_BUSY;
-}
-
-
-/*
- * Board-specific NAND init.  Copied from include/linux/mtd/nand.h for reference.
- *
- * struct nand_chip - NAND Private Flash Chip Data
- * @IO_ADDR_R:		[BOARDSPECIFIC] address to read the 8 I/O lines of the flash device
- * @IO_ADDR_W:		[BOARDSPECIFIC] address to write the 8 I/O lines of the flash device
- * @hwcontrol:		[BOARDSPECIFIC] hardwarespecific function for accesing control-lines
- * @dev_ready:		[BOARDSPECIFIC] hardwarespecific function for accesing device ready/busy line
- *			If set to NULL no access to ready/busy is available and the ready/busy information
- *			is read from the chip status register
- * @enable_hwecc:	[BOARDSPECIFIC] function to enable (reset) hardware ecc generator. Must only
- *			be provided if a hardware ECC is available
- * @eccmode:		[BOARDSPECIFIC] mode of ecc, see defines
- * @chip_delay:		[BOARDSPECIFIC] chip dependent delay for transfering data from array to read regs (tR)
- * @options:		[BOARDSPECIFIC] various chip options. They can partly be set to inform nand_scan about
- *			special functionality. See the defines for further explanation
-*/
-/*
- * This routine initializes controller and GPIOs.
- */
-int board_nand_init(struct nand_chip *nand)
-{
-	unsigned int value;
-
-	nand->ecc.mode = NAND_ECC_SOFT;
-	nand->cmd_ctrl = kb9202_nand_hwcontrol;
-	nand->dev_ready = kb9202_nand_ready;
-
-	/* in case running outside of bootloader */
-	writel(1 << AT91C_ID_PIOC, AT91C_PMC_PCER);
-
-	/* setup nand flash access (allow ample margin) */
-	/* 4 wait states, 1 setup, 1 hold, 1 float for 8-bit device */
-	writel(AT91C_SMC2_WSEN | KB9202_SMC2_NWS | KB9202_SMC2_TDF |
-		AT91C_SMC2_DBW_8 | KB9202_SMC2_RWSETUP | KB9202_SMC2_RWHOLD,
-		AT91C_SMC_CSR3);
-
-	/* enable internal NAND controller */
-	value = readl(AT91C_EBI_CSA);
-	value |= AT91C_EBI_CS3A_SMC_SmartMedia;
-	writel(value, AT91C_EBI_CSA);
-
-	/* enable SMOE/SMWE */
-	writel(AT91C_PC1_BFRDY_SMOE | AT91C_PC3_BFBAA_SMWE, AT91C_PIOC_ASR);
-	writel(AT91C_PC1_BFRDY_SMOE | AT91C_PC3_BFBAA_SMWE, AT91C_PIOC_PDR);
-	writel(AT91C_PC1_BFRDY_SMOE | AT91C_PC3_BFBAA_SMWE, AT91C_PIOC_OER);
-
-	/* set NCE to high */
-	writel(KB9202_NAND_NCE, AT91C_PIOC_SODR);
-
-	/* disable output on pin connected to the busy line of the NAND */
-	writel(KB9202_NAND_BUSY, AT91C_PIOC_ODR);
-
-	/* enable the PIO to control NCE and BUSY */
-	writel(KB9202_NAND_NCE | KB9202_NAND_BUSY, AT91C_PIOC_PER);
-
-	/* enable output for NCE */
-	writel(KB9202_NAND_NCE, AT91C_PIOC_OER);
-
-	return (0);
-}
-- 
2.39.2.637.g21b0678d19-goog


  reply	other threads:[~2023-02-22 16:37 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22 16:33 [PATCH v5 00/44] More tidy-ups of Kconfig options Simon Glass
2023-02-22 16:33 ` Simon Glass [this message]
2023-03-03 23:41   ` [PATCH v5 01/44] mtd: Drop unused kb9202_nand driver Tom Rini
2023-02-22 16:33 ` [PATCH v5 02/44] mtd: Drop unused CONFIG_ONENAND_U_BOOT Simon Glass
2023-03-03 23:41   ` Tom Rini
2023-02-22 16:33 ` [PATCH v5 03/44] sh4: Drop unused twl6030 driver Simon Glass
2023-03-03 23:41   ` Tom Rini
2023-02-22 16:33 ` [PATCH v5 04/44] moveconfig: Update to detect / correct missing SPL Kconfigs Simon Glass
2023-02-22 16:33 ` [PATCH v5 05/44] bootstd: Disable QFW bootmeth in SPL Simon Glass
2023-03-03 23:41   ` Tom Rini
2023-02-22 16:33 ` [PATCH v5 06/44] Correct SPL uses of ARCH_MVEBU Simon Glass
2023-02-22 16:33 ` [PATCH v5 07/44] Correct SPL uses of DISPLAY_AER_FULL Simon Glass
2023-03-03 23:41   ` Tom Rini
2023-02-22 16:33 ` [PATCH v5 08/44] Correct SPL uses of MULTIPLEXER Simon Glass
2023-03-03 23:41   ` Tom Rini
2023-02-22 16:33 ` [PATCH v5 09/44] Correct SPL use of PG_WCOM_UBOOT_UPDATE_SUPPORTED Simon Glass
2023-03-03 23:41   ` Tom Rini
2023-02-22 16:33 ` [PATCH v5 10/44] Correct SPL uses of PHY_FIXED Simon Glass
2023-03-03 23:41   ` Tom Rini
2023-02-22 16:33 ` [PATCH v5 11/44] boot: Add Kconfigs for BOOTMETH_VBE_REQUEST Simon Glass
2023-03-03 23:41   ` Tom Rini
2023-02-22 16:33 ` [PATCH v5 12/44] Correct SPL use of DM_RNG Simon Glass
2023-03-03 23:41   ` Tom Rini
2023-02-22 16:33 ` [PATCH v5 13/44] lib: Add a Kconfig for SPL_BZIP2 Simon Glass
2023-03-03 23:41   ` Tom Rini
2023-02-22 16:33 ` [PATCH v5 14/44] moveconfig: Various minor improvements Simon Glass
2023-02-22 16:33 ` [PATCH v5 15/44] sandbox: Expand size for VPL image Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:33 ` [PATCH v5 16/44] event: Add Kconfig options for SPL Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:33 ` [PATCH v5 17/44] bootstd: Correct 'VPL' typo Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:33 ` [PATCH v5 18/44] env: Avoid checking ENV_IS_IN when env disabled Simon Glass
2023-03-02 17:25   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 19/44] env: Allow VPL environment to be nowhere Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 20/44] lib: Add VPL options for SHA1 and SHA256 Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 21/44] x86: Use string functions for all 32-bit builds Simon Glass
2023-03-02 20:37   ` Tom Rini
2023-03-15 14:05     ` Simon Glass
2023-02-22 16:34 ` [PATCH v5 22/44] lib: Fix build condition for tiny-printf Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 23/44] sandbox: Tidy up RTC options Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 24/44] sandbox: Use the generic VPL option to enable VPL Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 25/44] sandbox: Tidy up I2C options Simon Glass
2023-02-23  5:43   ` Heiko Schocher
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 26/44] fixdep: Add support for VPL Simon Glass
2023-02-22 16:34 ` [PATCH v5 27/44] fixdep: Refactor to make testing easier Simon Glass
2023-02-22 16:34 ` [PATCH v5 28/44] fixdep: Add some tests for parse_config_line() Simon Glass
2023-02-22 16:34 ` [PATCH v5 29/44] test: Add SPL versions of the TEST_KCONFIG options Simon Glass
2023-02-22 16:34 ` [PATCH v5 30/44] lib: Add an SPL config for LIB_UUID Simon Glass
2023-02-23  6:14   ` Heinrich Schuchardt
2023-02-23 23:07     ` Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 31/44] test: Tidy up sandbox handling in test-main Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 32/44] x86: Fix up use of X86_32BIT_INIT and X86_64 options Simon Glass
2023-03-03 14:50   ` Tom Rini
2023-03-06 17:53     ` Simon Glass
2023-02-22 16:34 ` [PATCH v5 33/44] Add VPL options for BLOBLIST Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 34/44] rockchip: Avoid checking environment without ENV_SUPPORT Simon Glass
2023-02-23 16:16   ` Quentin Schulz
2023-02-22 16:34 ` [PATCH v5 35/44] freescale: Drop old pre-DM_ETH code Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 36/44] imx: Use SATA instead of CMD_SATA Simon Glass
2023-02-22 16:43   ` Baruch Siach
2023-02-22 19:16     ` Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 37/44] net: Add an SPL config for atheros Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 38/44] freescale: Fix odd use of ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE Simon Glass
2023-03-02 20:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 39/44] serial: Support ns16550 driver in TPL Simon Glass
2023-03-03 23:42   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 40/44] dm: Add a TPL symbol for simple-bus Simon Glass
2023-03-03 23:43   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 41/44] x86: coral: Add missing TPL options Simon Glass
2023-03-03 23:43   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 42/44] power: wandboard: Add a missing CONFIG Simon Glass
2023-03-03 23:43   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 43/44] venice: Simplify conditions for network init Simon Glass
2023-03-03 23:43   ` Tom Rini
2023-02-22 16:34 ` [PATCH v5 44/44] command: Don't allow commands in SPL Simon Glass
2023-03-02 20:30   ` Tom Rini
2023-03-03 23:43   ` Tom Rini
2023-03-03 23:43 ` [PATCH v5 00/44] More tidy-ups of Kconfig options Tom Rini
2023-03-06 18:20   ` Simon Glass
2023-03-11 15:28     ` Tom Rini
2023-03-11 19:34       ` Simon Glass

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=20230222163425.2043934-2-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=michael@amarulasolutions.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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.