Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: spinand: toshiba: Rename function name to change suffix and prefix (8Gbit)

The suffix was changed from "G" to "J" to classify between 1st generation
and 2nd generation serial NAND devices (which now belong to the Kioxia
brand).
As reference that's
1st generation device of 1Gbit product is "TC58CVG0S3HRAIG"
2nd generation device of 1Gbit product is "TC58CVG0S3HRAIJ".

The 8Gbit type "TH58CxG3S0HRAIJ" is new to Kioxia's serial NAND lineup and
the prefix was changed from "TC58" to "TH58".

Thus the functions were renamed from tc58cxgxsx_*() to tx58cxgxsxraix_*().

Signed-off-by: Yoshio Furuyama <ytc-mb-yfuruyama7@kioxia.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/0dedd9869569a17625822dba87878254d253ba0e.1584949601.git.ytc-mb-yfuruyama7@kioxia.com

authored by

Yoshio Furuyama and committed by
Miquel Raynal
6b49e58d 19301d54

+30 -30
+30 -30
drivers/mtd/nand/spi/toshiba.c
··· 26 26 static SPINAND_OP_VARIANTS(update_cache_variants, 27 27 SPINAND_PROG_LOAD(false, 0, NULL, 0)); 28 28 29 - static int tc58cxgxsx_ooblayout_ecc(struct mtd_info *mtd, int section, 30 - struct mtd_oob_region *region) 29 + static int tx58cxgxsxraix_ooblayout_ecc(struct mtd_info *mtd, int section, 30 + struct mtd_oob_region *region) 31 31 { 32 32 if (section > 0) 33 33 return -ERANGE; ··· 38 38 return 0; 39 39 } 40 40 41 - static int tc58cxgxsx_ooblayout_free(struct mtd_info *mtd, int section, 42 - struct mtd_oob_region *region) 41 + static int tx58cxgxsxraix_ooblayout_free(struct mtd_info *mtd, int section, 42 + struct mtd_oob_region *region) 43 43 { 44 44 if (section > 0) 45 45 return -ERANGE; ··· 51 51 return 0; 52 52 } 53 53 54 - static const struct mtd_ooblayout_ops tc58cxgxsx_ooblayout = { 55 - .ecc = tc58cxgxsx_ooblayout_ecc, 56 - .free = tc58cxgxsx_ooblayout_free, 54 + static const struct mtd_ooblayout_ops tx58cxgxsxraix_ooblayout = { 55 + .ecc = tx58cxgxsxraix_ooblayout_ecc, 56 + .free = tx58cxgxsxraix_ooblayout_free, 57 57 }; 58 58 59 - static int tc58cxgxsx_ecc_get_status(struct spinand_device *spinand, 60 - u8 status) 59 + static int tx58cxgxsxraix_ecc_get_status(struct spinand_device *spinand, 60 + u8 status) 61 61 { 62 62 struct nand_device *nand = spinand_to_nand(spinand); 63 63 u8 mbf = 0; ··· 96 96 97 97 static const struct spinand_info toshiba_spinand_table[] = { 98 98 /* 3.3V 1Gb */ 99 - SPINAND_INFO("TC58CVG0S3", 99 + SPINAND_INFO("TC58CVG0S3HRAIG", 100 100 SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xC2), 101 101 NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1), 102 102 NAND_ECCREQ(8, 512), ··· 104 104 &write_cache_variants, 105 105 &update_cache_variants), 106 106 0, 107 - SPINAND_ECCINFO(&tc58cxgxsx_ooblayout, 108 - tc58cxgxsx_ecc_get_status)), 107 + SPINAND_ECCINFO(&tx58cxgxsxraix_ooblayout, 108 + tx58cxgxsxraix_ecc_get_status)), 109 109 /* 3.3V 2Gb */ 110 - SPINAND_INFO("TC58CVG1S3", 110 + SPINAND_INFO("TC58CVG1S3HRAIG", 111 111 SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xCB), 112 112 NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1), 113 113 NAND_ECCREQ(8, 512), ··· 115 115 &write_cache_variants, 116 116 &update_cache_variants), 117 117 0, 118 - SPINAND_ECCINFO(&tc58cxgxsx_ooblayout, 119 - tc58cxgxsx_ecc_get_status)), 118 + SPINAND_ECCINFO(&tx58cxgxsxraix_ooblayout, 119 + tx58cxgxsxraix_ecc_get_status)), 120 120 /* 3.3V 4Gb */ 121 - SPINAND_INFO("TC58CVG2S0", 121 + SPINAND_INFO("TC58CVG2S0HRAIG", 122 122 SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xCD), 123 123 NAND_MEMORG(1, 4096, 256, 64, 2048, 40, 1, 1, 1), 124 124 NAND_ECCREQ(8, 512), ··· 126 126 &write_cache_variants, 127 127 &update_cache_variants), 128 128 0, 129 - SPINAND_ECCINFO(&tc58cxgxsx_ooblayout, 130 - tc58cxgxsx_ecc_get_status)), 129 + SPINAND_ECCINFO(&tx58cxgxsxraix_ooblayout, 130 + tx58cxgxsxraix_ecc_get_status)), 131 131 /* 3.3V 4Gb */ 132 - SPINAND_INFO("TC58CVG2S0", 132 + SPINAND_INFO("TC58CVG2S0HRAIJ", 133 133 SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xED), 134 134 NAND_MEMORG(1, 4096, 256, 64, 2048, 40, 1, 1, 1), 135 135 NAND_ECCREQ(8, 512), ··· 137 137 &write_cache_variants, 138 138 &update_cache_variants), 139 139 0, 140 - SPINAND_ECCINFO(&tc58cxgxsx_ooblayout, 141 - tc58cxgxsx_ecc_get_status)), 140 + SPINAND_ECCINFO(&tx58cxgxsxraix_ooblayout, 141 + tx58cxgxsxraix_ecc_get_status)), 142 142 /* 1.8V 1Gb */ 143 - SPINAND_INFO("TC58CYG0S3", 143 + SPINAND_INFO("TC58CYG0S3HRAIG", 144 144 SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xB2), 145 145 NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1), 146 146 NAND_ECCREQ(8, 512), ··· 148 148 &write_cache_variants, 149 149 &update_cache_variants), 150 150 0, 151 - SPINAND_ECCINFO(&tc58cxgxsx_ooblayout, 152 - tc58cxgxsx_ecc_get_status)), 151 + SPINAND_ECCINFO(&tx58cxgxsxraix_ooblayout, 152 + tx58cxgxsxraix_ecc_get_status)), 153 153 /* 1.8V 2Gb */ 154 - SPINAND_INFO("TC58CYG1S3", 154 + SPINAND_INFO("TC58CYG1S3HRAIG", 155 155 SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xBB), 156 156 NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1), 157 157 NAND_ECCREQ(8, 512), ··· 159 159 &write_cache_variants, 160 160 &update_cache_variants), 161 161 0, 162 - SPINAND_ECCINFO(&tc58cxgxsx_ooblayout, 163 - tc58cxgxsx_ecc_get_status)), 162 + SPINAND_ECCINFO(&tx58cxgxsxraix_ooblayout, 163 + tx58cxgxsxraix_ecc_get_status)), 164 164 /* 1.8V 4Gb */ 165 - SPINAND_INFO("TC58CYG2S0", 165 + SPINAND_INFO("TC58CYG2S0HRAIG", 166 166 SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xBD), 167 167 NAND_MEMORG(1, 4096, 256, 64, 2048, 40, 1, 1, 1), 168 168 NAND_ECCREQ(8, 512), ··· 170 170 &write_cache_variants, 171 171 &update_cache_variants), 172 172 0, 173 - SPINAND_ECCINFO(&tc58cxgxsx_ooblayout, 174 - tc58cxgxsx_ecc_get_status)), 173 + SPINAND_ECCINFO(&tx58cxgxsxraix_ooblayout, 174 + tx58cxgxsxraix_ecc_get_status)), 175 175 }; 176 176 177 177 static const struct spinand_manufacturer_ops toshiba_spinand_manuf_ops = {