hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the flashrom project. |
| 3 | * |
| 4 | * Copyright (C) 2009 Carl-Daniel Hailfinger |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 15 | * Header file for flash chip drivers. Included from flash.h. |
| 16 | * As a general rule, every function listed here should take a pointer to |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 17 | * struct flashctx as first parameter. |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 18 | */ |
| 19 | |
| 20 | #ifndef __CHIPDRIVERS_H__ |
| 21 | #define __CHIPDRIVERS_H__ 1 |
| 22 | |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 23 | #include "flash.h" /* for chipaddr and flashctx */ |
Edward O'Callaghan | 9c4c9a5 | 2019-12-04 18:18:01 +1100 | [diff] [blame] | 24 | #include "writeprotect.h" /* for modifier_bits */ |
stefanct | 8de303e | 2011-08-16 12:08:22 +0000 | [diff] [blame] | 25 | |
Edward O'Callaghan | 9997445 | 2020-10-13 13:28:33 +1100 | [diff] [blame] | 26 | /* spi.c */ |
| 27 | int spi_aai_write(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); |
| 28 | int spi_chip_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); |
| 29 | int spi_chip_read(struct flashctx *flash, uint8_t *buf, unsigned int start, int unsigned len); |
| 30 | |
Edward O'Callaghan | 6bbdd32 | 2019-09-09 16:28:01 +1000 | [diff] [blame] | 31 | /* spi25.c */ |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 32 | int probe_spi_rdid(struct flashctx *flash); |
| 33 | int probe_spi_rdid4(struct flashctx *flash); |
| 34 | int probe_spi_rems(struct flashctx *flash); |
| 35 | int probe_spi_res1(struct flashctx *flash); |
| 36 | int probe_spi_res2(struct flashctx *flash); |
Nikolai Artemiev | 4702c7c | 2020-08-31 12:49:50 +1000 | [diff] [blame] | 37 | int probe_spi_res3(struct flashctx *flash); |
| 38 | int probe_spi_at25f(struct flashctx *flash); |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 39 | int spi_write_enable(struct flashctx *flash); |
| 40 | int spi_write_disable(struct flashctx *flash); |
| 41 | int spi_block_erase_20(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Edward O'Callaghan | 94934e8 | 2019-06-19 17:44:19 +1000 | [diff] [blame] | 42 | int spi_block_erase_21(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Alan Green | 1fdf13b | 2019-09-16 12:54:45 +1000 | [diff] [blame] | 43 | int spi_block_erase_50(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 44 | int spi_block_erase_52(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Edward O'Callaghan | 94934e8 | 2019-06-19 17:44:19 +1000 | [diff] [blame] | 45 | int spi_block_erase_5c(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 46 | int spi_block_erase_60(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Alan Green | 5d70973 | 2019-09-16 12:32:25 +1000 | [diff] [blame] | 47 | int spi_block_erase_62(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Alan Green | 1fdf13b | 2019-09-16 12:54:45 +1000 | [diff] [blame] | 48 | int spi_block_erase_81(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Nikolai Artemiev | 4702c7c | 2020-08-31 12:49:50 +1000 | [diff] [blame] | 49 | int spi_block_erase_c4(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 50 | int spi_block_erase_c7(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Patrick Georgi | 860875a | 2017-02-03 18:44:55 +0100 | [diff] [blame] | 51 | int spi_block_erase_d7(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
| 52 | int spi_block_erase_d8(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Nikolai Artemiev | 4702c7c | 2020-08-31 12:49:50 +1000 | [diff] [blame] | 53 | int spi_block_erase_db(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Edward O'Callaghan | 94934e8 | 2019-06-19 17:44:19 +1000 | [diff] [blame] | 54 | int spi_block_erase_dc(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Nikolai Artemiev | a66b6cd | 2020-08-31 18:07:13 +1000 | [diff] [blame] | 55 | erasefunc_t *spi_get_erasefn_from_opcode(uint8_t opcode); |
Patrick Georgi | ab8353e | 2017-02-03 18:32:01 +0100 | [diff] [blame] | 56 | int spi_chip_write_1(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 57 | int spi_nbyte_read(struct flashctx *flash, unsigned int addr, uint8_t *bytes, unsigned int len); |
| 58 | int spi_read_chunked(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len, unsigned int chunksize); |
Patrick Georgi | ab8353e | 2017-02-03 18:32:01 +0100 | [diff] [blame] | 59 | int spi_write_chunked(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len, unsigned int chunksize); |
Edward O'Callaghan | 9997445 | 2020-10-13 13:28:33 +1100 | [diff] [blame] | 60 | int spi_enter_4ba(struct flashctx *flash); |
| 61 | int spi_exit_4ba(struct flashctx *flash); |
| 62 | int spi_set_extended_address(struct flashctx *, uint8_t addr_high); |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 63 | |
Edward O'Callaghan | 71e2314 | 2019-03-03 23:08:22 +1100 | [diff] [blame] | 64 | |
| 65 | /* spi25_statusreg.c */ |
| 66 | uint8_t spi_read_status_register(const struct flashctx *flash); |
| 67 | int spi_write_status_register(const struct flashctx *flash, int status); |
| 68 | void spi_prettyprint_status_register_bit(uint8_t status, int bit); |
| 69 | int spi_prettyprint_status_register_plain(struct flashctx *flash); |
| 70 | int spi_prettyprint_status_register_default_welwip(struct flashctx *flash); |
| 71 | int spi_prettyprint_status_register_bp1_srwd(struct flashctx *flash); |
| 72 | int spi_prettyprint_status_register_bp2_srwd(struct flashctx *flash); |
| 73 | int spi_prettyprint_status_register_bp3_srwd(struct flashctx *flash); |
| 74 | int spi_prettyprint_status_register_bp4_srwd(struct flashctx *flash); |
| 75 | int spi_prettyprint_status_register_bp2_bpl(struct flashctx *flash); |
| 76 | int spi_prettyprint_status_register_bp2_tb_bpl(struct flashctx *flash); |
| 77 | int spi_disable_blockprotect(struct flashctx *flash); |
| 78 | int spi_disable_blockprotect_bp1_srwd(struct flashctx *flash); |
| 79 | int spi_disable_blockprotect_bp2_srwd(struct flashctx *flash); |
| 80 | int spi_disable_blockprotect_bp3_srwd(struct flashctx *flash); |
| 81 | int spi_disable_blockprotect_bp4_srwd(struct flashctx *flash); |
Edward O'Callaghan | 71e2314 | 2019-03-03 23:08:22 +1100 | [diff] [blame] | 82 | int spi_prettyprint_status_register_amic_a25l032(struct flashctx *flash); |
Edward O'Callaghan | 71e2314 | 2019-03-03 23:08:22 +1100 | [diff] [blame] | 83 | int spi_prettyprint_status_register_at25df(struct flashctx *flash); |
| 84 | int spi_prettyprint_status_register_at25df_sec(struct flashctx *flash); |
| 85 | int spi_prettyprint_status_register_at25f(struct flashctx *flash); |
| 86 | int spi_prettyprint_status_register_at25f512a(struct flashctx *flash); |
| 87 | int spi_prettyprint_status_register_at25f512b(struct flashctx *flash); |
| 88 | int spi_prettyprint_status_register_at25f4096(struct flashctx *flash); |
| 89 | int spi_prettyprint_status_register_at25fs010(struct flashctx *flash); |
| 90 | int spi_prettyprint_status_register_at25fs040(struct flashctx *flash); |
| 91 | int spi_prettyprint_status_register_at26df081a(struct flashctx *flash); |
| 92 | int spi_disable_blockprotect_at2x_global_unprotect(struct flashctx *flash); |
| 93 | int spi_disable_blockprotect_at2x_global_unprotect_sec(struct flashctx *flash); |
Edward O'Callaghan | 71e2314 | 2019-03-03 23:08:22 +1100 | [diff] [blame] | 94 | int spi_disable_blockprotect_at25f(struct flashctx *flash); |
| 95 | int spi_disable_blockprotect_at25f512a(struct flashctx *flash); |
| 96 | int spi_disable_blockprotect_at25f512b(struct flashctx *flash); |
| 97 | int spi_disable_blockprotect_at25fs010(struct flashctx *flash); |
| 98 | int spi_disable_blockprotect_at25fs040(struct flashctx *flash); |
| 99 | int spi_prettyprint_status_register_en25s_wp(struct flashctx *flash); |
| 100 | int spi_prettyprint_status_register_n25q(struct flashctx *flash); |
| 101 | int spi_disable_blockprotect_n25q(struct flashctx *flash); |
| 102 | int spi_prettyprint_status_register_bp2_ep_srwd(struct flashctx *flash); |
| 103 | int spi_disable_blockprotect_bp2_ep_srwd(struct flashctx *flash); |
| 104 | int spi_prettyprint_status_register_sst25(struct flashctx *flash); |
| 105 | int spi_prettyprint_status_register_sst25vf016(struct flashctx *flash); |
| 106 | int spi_prettyprint_status_register_sst25vf040b(struct flashctx *flash); |
| 107 | int spi_disable_blockprotect_sst26_global_unprotect(struct flashctx *flash); |
| 108 | |
Nikolai Artemiev | a66b6cd | 2020-08-31 18:07:13 +1000 | [diff] [blame] | 109 | /* sfdp.c */ |
| 110 | int probe_spi_sfdp(struct flashctx *flash); |
| 111 | |
hailfinger | fe7cd9e | 2011-11-04 21:35:26 +0000 | [diff] [blame] | 112 | /* opaque.c */ |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 113 | int probe_opaque(struct flashctx *flash); |
| 114 | int read_opaque(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len); |
Patrick Georgi | ab8353e | 2017-02-03 18:32:01 +0100 | [diff] [blame] | 115 | int write_opaque(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 116 | int erase_opaque(struct flashctx *flash, unsigned int blockaddr, unsigned int blocklen); |
| 117 | uint8_t read_status_opaque(const struct flashctx *flash); |
| 118 | int write_status_opaque(const struct flashctx *flash, int status); |
Duncan Laurie | 25a4ca2 | 2019-04-25 12:08:52 -0700 | [diff] [blame] | 119 | int check_access_opaque(const struct flashctx *flash, unsigned int start, unsigned int len, int read); |
hailfinger | fe7cd9e | 2011-11-04 21:35:26 +0000 | [diff] [blame] | 120 | |
Alan Green | dad2dae | 2019-09-16 15:55:08 +1000 | [diff] [blame] | 121 | /* at45db.c */ |
| 122 | int probe_spi_at45db(struct flashctx *flash); |
| 123 | int spi_prettyprint_status_register_at45db(struct flashctx *flash); |
| 124 | int spi_disable_blockprotect_at45db(struct flashctx *flash); |
| 125 | int spi_read_at45db(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len); |
| 126 | int spi_read_at45db_e8(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len); |
| 127 | int spi_write_at45db(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); |
| 128 | int spi_erase_at45db_page(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
| 129 | int spi_erase_at45db_block(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
| 130 | int spi_erase_at45db_sector(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
| 131 | int spi_erase_at45db_chip(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
| 132 | int spi_erase_at45cs_sector(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
| 133 | |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 134 | /* 82802ab.c */ |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 135 | uint8_t wait_82802ab(struct flashctx *flash); |
| 136 | int probe_82802ab(struct flashctx *flash); |
| 137 | int erase_block_82802ab(struct flashctx *flash, unsigned int page, unsigned int pagesize); |
Patrick Georgi | ab8353e | 2017-02-03 18:32:01 +0100 | [diff] [blame] | 138 | int write_82802ab(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); |
snelson | c0acbeb | 2010-03-19 18:47:06 +0000 | [diff] [blame] | 139 | void print_status_82802ab(uint8_t status); |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 140 | int unlock_28f004s5(struct flashctx *flash); |
| 141 | int unlock_lh28f008bjt(struct flashctx *flash); |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 142 | |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 143 | /* jedec.c */ |
| 144 | uint8_t oddparity(uint8_t val); |
Edward O'Callaghan | 8516471 | 2020-05-12 12:21:54 +1000 | [diff] [blame] | 145 | void toggle_ready_jedec(const struct flashctx *flash, chipaddr dst); |
| 146 | void data_polling_jedec(const struct flashctx *flash, chipaddr dst, uint8_t data); |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 147 | int probe_jedec(struct flashctx *flash); |
Stefan Tauner | 6e40088 | 2014-08-03 14:15:14 +0000 | [diff] [blame] | 148 | int probe_jedec_29gl(struct flashctx *flash); |
Patrick Georgi | ab8353e | 2017-02-03 18:32:01 +0100 | [diff] [blame] | 149 | int write_jedec(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); |
| 150 | int write_jedec_1(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 151 | int erase_sector_jedec(struct flashctx *flash, unsigned int page, unsigned int pagesize); |
| 152 | int erase_block_jedec(struct flashctx *flash, unsigned int page, unsigned int blocksize); |
| 153 | int erase_chip_block_jedec(struct flashctx *flash, unsigned int page, unsigned int blocksize); |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 154 | |
Alan Green | d793f5b | 2019-09-02 17:03:51 +1000 | [diff] [blame] | 155 | int unlock_regspace2_uniform_32k(struct flashctx *flash); |
| 156 | int unlock_regspace2_uniform_64k(struct flashctx *flash); |
| 157 | int unlock_regspace2_block_eraser_0(struct flashctx *flash); |
| 158 | int unlock_regspace2_block_eraser_1(struct flashctx *flash); |
| 159 | int printlock_regspace2_uniform_64k(struct flashctx *flash); |
| 160 | int printlock_regspace2_block_eraser_0(struct flashctx *flash); |
| 161 | int printlock_regspace2_block_eraser_1(struct flashctx *flash); |
| 162 | |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 163 | /* sst28sf040.c */ |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 164 | int erase_chip_28sf040(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
| 165 | int erase_sector_28sf040(struct flashctx *flash, unsigned int address, unsigned int sector_size); |
Patrick Georgi | ab8353e | 2017-02-03 18:32:01 +0100 | [diff] [blame] | 166 | int write_28sf040(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 167 | int unprotect_28sf040(struct flashctx *flash); |
| 168 | int protect_28sf040(struct flashctx *flash); |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 169 | |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 170 | /* sst49lfxxxc.c */ |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 171 | int erase_sector_49lfxxxc(struct flashctx *flash, unsigned int address, unsigned int sector_size); |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 172 | |
| 173 | /* sst_fwhub.c */ |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 174 | int printlock_sst_fwhub(struct flashctx *flash); |
| 175 | int unlock_sst_fwhub(struct flashctx *flash); |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 176 | |
Edward O'Callaghan | 1c5d53b | 2021-01-05 10:16:40 +1100 | [diff] [blame] | 177 | /* s25f.c */ |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 178 | int probe_spi_big_spansion(struct flashctx *flash); |
| 179 | int s25fl_block_erase(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
Edward O'Callaghan | 9c4c9a5 | 2019-12-04 18:18:01 +1100 | [diff] [blame] | 180 | int s25f_get_modifier_bits(const struct flashctx *flash, struct modifier_bits *m); |
| 181 | int s25f_set_modifier_bits(const struct flashctx *flash, struct modifier_bits *m); |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 182 | int s25fs_block_erase_d8(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
David Hendricks | 398714f | 2014-07-03 17:49:41 -0700 | [diff] [blame] | 183 | |
hailfinger | f899301 | 2010-12-05 16:33:59 +0000 | [diff] [blame] | 184 | /* w39.c */ |
Nikolai Artemiev | fc53a61 | 2020-08-31 18:02:25 +1000 | [diff] [blame] | 185 | int printlock_w39f010(struct flashctx * flash); |
| 186 | int printlock_w39l010(struct flashctx * flash); |
| 187 | int printlock_w39l020(struct flashctx * flash); |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 188 | int printlock_w39l040(struct flashctx * flash); |
| 189 | int printlock_w39v040a(struct flashctx *flash); |
| 190 | int printlock_w39v040b(struct flashctx *flash); |
| 191 | int printlock_w39v040c(struct flashctx *flash); |
| 192 | int printlock_w39v040fa(struct flashctx *flash); |
| 193 | int printlock_w39v040fb(struct flashctx *flash); |
| 194 | int printlock_w39v040fc(struct flashctx *flash); |
| 195 | int printlock_w39v080a(struct flashctx *flash); |
| 196 | int printlock_w39v080fa(struct flashctx *flash); |
| 197 | int printlock_w39v080fa_dual(struct flashctx *flash); |
Alan Green | ebbee92 | 2019-09-02 11:36:59 +1000 | [diff] [blame] | 198 | int printlock_at49f(struct flashctx *flash); |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 199 | |
| 200 | /* w29ee011.c */ |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 201 | int probe_w29ee011(struct flashctx *flash); |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 202 | |
Edward O'Callaghan | 8698744 | 2021-01-06 19:22:12 +1100 | [diff] [blame] | 203 | /* stm50.c */ |
| 204 | int erase_sector_stm50(struct flashctx *flash, unsigned int block, unsigned int blocksize); |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 205 | |
Nikolai Artemiev | 9ff517b | 2020-08-31 13:05:03 +1000 | [diff] [blame] | 206 | /* en29lv640b.c */ |
| 207 | int probe_en29lv640b(struct flashctx *flash); |
| 208 | int write_en29lv640b(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); |
| 209 | |
Louis Yung-Chieh Lo | e53fa0f | 2011-04-11 17:18:41 +0800 | [diff] [blame] | 210 | /* dummyflasher.c */ |
Souvik Ghosh | d75cd67 | 2016-06-17 14:21:39 -0700 | [diff] [blame] | 211 | int probe_variable_size(struct flashctx *flash); |
Louis Yung-Chieh Lo | e53fa0f | 2011-04-11 17:18:41 +0800 | [diff] [blame] | 212 | |
Edward O'Callaghan | a9c8100 | 2019-02-24 15:54:40 +1100 | [diff] [blame] | 213 | /* edi.c */ |
| 214 | int edi_chip_block_erase(struct flashctx *flash, unsigned int page, unsigned int size); |
| 215 | int edi_chip_write(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); |
| 216 | int edi_chip_read(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len); |
| 217 | int edi_probe_kb9012(struct flashctx *flash); |
| 218 | |
Nikolai Artemiev | 23d2d39 | 2020-08-31 13:57:37 +1000 | [diff] [blame] | 219 | /* spi95.c */ |
| 220 | int probe_spi_st95(struct flashctx *flash); |
| 221 | int spi_block_erase_emulation(struct flashctx *flash, unsigned int addr, unsigned int blocklen); |
| 222 | |
hailfinger | 088dc81 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 223 | #endif /* !__CHIPDRIVERS_H__ */ |