summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi-nor/intel.c
diff options
context:
space:
mode:
authorBoris Brezillon <bbrezillon@kernel.org>2020-03-13 22:42:43 +0300
committerTudor Ambarus <tudor.ambarus@microchip.com>2020-03-17 10:28:03 +0300
commitaa6351877f3e8a7006d1e17f6be3e15dc12b943e (patch)
tree2958067f3e19da0da20e7ed829f26830e16ba2fa /drivers/mtd/spi-nor/intel.c
parentacb96ecd59f7fdd8b2791f225d101dfdc2ab38a9 (diff)
downloadlinux-aa6351877f3e8a7006d1e17f6be3e15dc12b943e.tar.xz
mtd: spi-nor: Move Intel bits out of core.c
Create a SPI NOR manufacturer driver for Intel chips, and move the Intel definitions outside of core.c. Signed-off-by: Boris Brezillon <bbrezillon@kernel.org> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/mtd/spi-nor/intel.c')
-rw-r--r--drivers/mtd/spi-nor/intel.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/intel.c b/drivers/mtd/spi-nor/intel.c
new file mode 100644
index 000000000000..d8196f101368
--- /dev/null
+++ b/drivers/mtd/spi-nor/intel.c
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005, Intec Automation Inc.
+ * Copyright (C) 2014, Freescale Semiconductor, Inc.
+ */
+
+#include <linux/mtd/spi-nor.h>
+
+#include "core.h"
+
+static const struct flash_info intel_parts[] = {
+ /* Intel/Numonyx -- xxxs33b */
+ { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) },
+ { "320s33b", INFO(0x898912, 0, 64 * 1024, 64, 0) },
+ { "640s33b", INFO(0x898913, 0, 64 * 1024, 128, 0) },
+};
+
+static void intel_default_init(struct spi_nor *nor)
+{
+ nor->flags |= SNOR_F_HAS_LOCK;
+}
+
+static const struct spi_nor_fixups intel_fixups = {
+ .default_init = intel_default_init,
+};
+
+const struct spi_nor_manufacturer spi_nor_intel = {
+ .name = "intel",
+ .parts = intel_parts,
+ .nparts = ARRAY_SIZE(intel_parts),
+ .fixups = &intel_fixups,
+};