mtd: spi-nor: macronix: Add support for mx66u1g45g

Message ID 20221109202348.93666-2-dinguyen@kernel.org
State New
Headers
Series mtd: spi-nor: macronix: Add support for mx66u1g45g |

Commit Message

Dinh Nguyen Nov. 9, 2022, 8:23 p.m. UTC
  The MX66U1G45G is the smaller sibling (128MB) of the MX66U2G45G (256MB)
that is already supported.

Tested on Intel N5X socdk board,
  - random data write, erase, read   - verified erase operations
  - random data write, read and compare  - verified write/read operations

Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@intel.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
---
 drivers/mtd/spi-nor/macronix.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

kernel test robot Nov. 10, 2022, 5:38 p.m. UTC | #1
Hi Dinh,

I love your patch! Yet something to improve:

[auto build test ERROR on mtd/spi-nor/next]
[also build test ERROR on linus/master v6.1-rc4 next-20221110]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Dinh-Nguyen/mtd-spi-nor-macronix-Add-support-for-mx66u1g45g/20221110-042536
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git spi-nor/next
patch link:    https://lore.kernel.org/r/20221109202348.93666-2-dinguyen%40kernel.org
patch subject: [PATCH] mtd: spi-nor: macronix: Add support for mx66u1g45g
config: m68k-randconfig-m031-20221110
compiler: m68k-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/068c68569fec28efdcee11c29844d3363181baf5
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Dinh-Nguyen/mtd-spi-nor-macronix-Add-support-for-mx66u1g45g/20221110-042536
        git checkout 068c68569fec28efdcee11c29844d3363181baf5
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/mtd/spi-nor/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/mtd/spi-nor/macronix.c:101:27: error: expected expression before ',' token
     101 |                 PARSE_SFDP,
         |                           ^


vim +101 drivers/mtd/spi-nor/macronix.c

    34	
    35	static const struct flash_info macronix_nor_parts[] = {
    36		/* Macronix */
    37		{ "mx25l512e",   INFO(0xc22010, 0, 64 * 1024,   1)
    38			NO_SFDP_FLAGS(SECT_4K) },
    39		{ "mx25l2005a",  INFO(0xc22012, 0, 64 * 1024,   4)
    40			NO_SFDP_FLAGS(SECT_4K) },
    41		{ "mx25l4005a",  INFO(0xc22013, 0, 64 * 1024,   8)
    42			NO_SFDP_FLAGS(SECT_4K) },
    43		{ "mx25l8005",   INFO(0xc22014, 0, 64 * 1024,  16) },
    44		{ "mx25l1606e",  INFO(0xc22015, 0, 64 * 1024,  32)
    45			NO_SFDP_FLAGS(SECT_4K) },
    46		{ "mx25l3205d",  INFO(0xc22016, 0, 64 * 1024,  64)
    47			NO_SFDP_FLAGS(SECT_4K) },
    48		{ "mx25l3255e",  INFO(0xc29e16, 0, 64 * 1024,  64)
    49			NO_SFDP_FLAGS(SECT_4K) },
    50		{ "mx25l6405d",  INFO(0xc22017, 0, 64 * 1024, 128)
    51			NO_SFDP_FLAGS(SECT_4K) },
    52		{ "mx25u2033e",  INFO(0xc22532, 0, 64 * 1024,   4)
    53			NO_SFDP_FLAGS(SECT_4K) },
    54		{ "mx25u3235f",	 INFO(0xc22536, 0, 64 * 1024,  64)
    55			NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
    56				      SPI_NOR_QUAD_READ) },
    57		{ "mx25u4035",   INFO(0xc22533, 0, 64 * 1024,   8)
    58			NO_SFDP_FLAGS(SECT_4K) },
    59		{ "mx25u8035",   INFO(0xc22534, 0, 64 * 1024,  16)
    60			NO_SFDP_FLAGS(SECT_4K) },
    61		{ "mx25u6435f",  INFO(0xc22537, 0, 64 * 1024, 128)
    62			NO_SFDP_FLAGS(SECT_4K) },
    63		{ "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256)
    64			FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_4BIT_BP)
    65			NO_SFDP_FLAGS(SECT_4K) },
    66		{ "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256) },
    67		{ "mx25r1635f",  INFO(0xc22815, 0, 64 * 1024,  32)
    68			NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
    69				      SPI_NOR_QUAD_READ) },
    70		{ "mx25r3235f",  INFO(0xc22816, 0, 64 * 1024,  64)
    71			NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
    72				      SPI_NOR_QUAD_READ) },
    73		{ "mx25u12835f", INFO(0xc22538, 0, 64 * 1024, 256)
    74			NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
    75				      SPI_NOR_QUAD_READ) },
    76		{ "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512)
    77			NO_SFDP_FLAGS(SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
    78			.fixups = &mx25l25635_fixups },
    79		{ "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512)
    80			NO_SFDP_FLAGS(SECT_4K)
    81			FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
    82		{ "mx25u51245g", INFO(0xc2253a, 0, 64 * 1024, 1024)
    83			NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
    84			FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
    85		{ "mx25v8035f",  INFO(0xc22314, 0, 64 * 1024,  16)
    86			NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
    87				      SPI_NOR_QUAD_READ) },
    88		{ "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512) },
    89		{ "mx66l51235f", INFO(0xc2201a, 0, 64 * 1024, 1024)
    90			NO_SFDP_FLAGS(SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
    91			FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
    92		{ "mx66u51235f", INFO(0xc2253a, 0, 64 * 1024, 1024)
    93			NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
    94			FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
    95		{ "mx66l1g45g",  INFO(0xc2201b, 0, 64 * 1024, 2048)
    96			NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
    97				      SPI_NOR_QUAD_READ) },
    98		{ "mx66l1g55g",  INFO(0xc2261b, 0, 64 * 1024, 2048)
    99			NO_SFDP_FLAGS(SPI_NOR_QUAD_READ) },
   100		{ "mx66u1g45g",  INFO(0xc2253b, 0, 64 * 1024, 2048)
 > 101			PARSE_SFDP,
   102			FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
   103			FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
   104		{ "mx66u2g45g",	 INFO(0xc2253c, 0, 64 * 1024, 4096)
   105			NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
   106			FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
   107	};
   108
  

Patch

diff --git a/drivers/mtd/spi-nor/macronix.c b/drivers/mtd/spi-nor/macronix.c
index d81a4cb2812b..46ba898f3dd0 100644
--- a/drivers/mtd/spi-nor/macronix.c
+++ b/drivers/mtd/spi-nor/macronix.c
@@ -97,6 +97,10 @@  static const struct flash_info macronix_nor_parts[] = {
 			      SPI_NOR_QUAD_READ) },
 	{ "mx66l1g55g",  INFO(0xc2261b, 0, 64 * 1024, 2048)
 		NO_SFDP_FLAGS(SPI_NOR_QUAD_READ) },
+	{ "mx66u1g45g",  INFO(0xc2253b, 0, 64 * 1024, 2048)
+		PARSE_SFDP,
+		FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
+		FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
 	{ "mx66u2g45g",	 INFO(0xc2253c, 0, 64 * 1024, 4096)
 		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
 		FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },