| Carl-Daniel Hailfinger | 5d5c072 | 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 | * |
| Carl-Daniel Hailfinger | 5d5c072 | 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 |
| Carl-Daniel Hailfinger | 63fd902 | 2011-12-14 22:25:15 +0000 | [diff] [blame] | 17 | * struct flashctx as first parameter. |
| Carl-Daniel Hailfinger | 5d5c072 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 18 | */ |
| 19 | |
| 20 | #ifndef __CHIPDRIVERS_H__ |
| 21 | #define __CHIPDRIVERS_H__ 1 |
| 22 | |
| Carl-Daniel Hailfinger | 63fd902 | 2011-12-14 22:25:15 +0000 | [diff] [blame] | 23 | #include "flash.h" /* for chipaddr and flashctx */ |
| Stefan Tauner | a63c7c4 | 2011-08-16 12:08:22 +0000 | [diff] [blame] | 24 | |
| Carl-Daniel Hailfinger | 532c717 | 2011-11-04 21:35:26 +0000 | [diff] [blame] | 25 | /* opaque.c */ |
| Carl-Daniel Hailfinger | 63fd902 | 2011-12-14 22:25:15 +0000 | [diff] [blame] | 26 | int probe_opaque(struct flashctx *flash); |
| 27 | int read_opaque(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len); |
| Mark Marshall | f20b7be | 2014-05-09 21:16:21 +0000 | [diff] [blame] | 28 | int write_opaque(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); |
| Carl-Daniel Hailfinger | 63fd902 | 2011-12-14 22:25:15 +0000 | [diff] [blame] | 29 | int erase_opaque(struct flashctx *flash, unsigned int blockaddr, unsigned int blocklen); |
| Carl-Daniel Hailfinger | 532c717 | 2011-11-04 21:35:26 +0000 | [diff] [blame] | 30 | |
| Carl-Daniel Hailfinger | 5d5c072 | 2009-12-14 03:32:24 +0000 | [diff] [blame] | 31 | #endif /* !__CHIPDRIVERS_H__ */ |