blob: 4d641cc88a4a4e136ae67eacae9825c74c2b1fad [file] [log] [blame]
Nico Huber6bd4f102026-02-22 23:28:13 +01001/*
2 * This file is part of the flashrom project.
3 *
4 * Copyright (C) 2015 Paul Kocialkowski <contact@paulk.fr>
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; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#ifndef __CHIPDRIVERS_EDI_H__
18#define __CHIPDRIVERS_EDI_H__ 1
19
20#include <stdint.h>
21
22struct flashprog_flashctx;
Nico Huberf3113ac2026-02-21 12:50:19 +010023struct master_common;
24struct bus_probe;
Nico Huberdae90222026-03-09 20:36:56 +010025struct flashchip;
Nico Huberf3113ac2026-02-21 12:50:19 +010026
Nico Huberdae90222026-03-09 20:36:56 +010027struct found_id *probe_edi(const struct bus_probe *, const struct master_common *, const struct flashchip *chip);
Nico Huber6bd4f102026-02-22 23:28:13 +010028
29int edi_chip_block_erase(struct flashprog_flashctx *, unsigned int page, unsigned int size);
30int edi_chip_write(struct flashprog_flashctx *, const uint8_t *buf, unsigned int start, unsigned int len);
31int edi_chip_read(struct flashprog_flashctx *, uint8_t *buf, unsigned int start, unsigned int len);
Nico Huber4af02fe2026-02-21 12:29:26 +010032int edi_prepare(struct flashprog_flashctx *, enum preparation_steps);
Nico Huber6bd4f102026-02-22 23:28:13 +010033
34#endif /* !__CHIPDRIVERS_EDI_H__ */