1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 14:11:15 +02:00

Move SPI declarations from flash.h to spi.h

As a consecuence, some of the files that used to include flash.h no
longer need to do so. For this reason, flash.h includes are also deleted
in this commit.

Change-Id: I794a71536a3b85fde39f83c802fa0f5dd8d428e0
Signed-off-by: Antonio Vázquez Blanco <antoniovazquezblanco@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/85539
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: David Reguera Garcia (Dreg) <regueragarciadavid@gmail.com>
Reviewed-by: Matti Finder <matti.finder@gmail.com>
This commit is contained in:
Antonio Vázquez Blanco
2024-12-09 10:37:28 +01:00
committed by Anastasia Klimchuk
parent 971ea27d16
commit ce825859c4
31 changed files with 18 additions and 42 deletions

View File

@ -18,7 +18,7 @@
#define __CLI_OUTPUT_H__
#include <stdarg.h>
#include <flash.h>
#include "flash.h"
extern enum flashrom_log_level verbose_screen;
extern enum flashrom_log_level verbose_logfile;

View File

@ -758,15 +758,4 @@ __attribute__((format(printf, 2, 3)));
void init_progress(struct flashctx *flash, enum flashrom_progress_stage stage, size_t total);
void update_progress(struct flashctx *flash, enum flashrom_progress_stage stage, size_t increment);
/* spi.c */
struct spi_command {
unsigned int writecnt;
unsigned int readcnt;
const unsigned char *writearr;
unsigned char *readarr;
};
#define NULL_SPI_CMD { 0, 0, NULL, NULL, }
int spi_send_command(const struct flashctx *flash, unsigned int writecnt, unsigned int readcnt, const unsigned char *writearr, unsigned char *readarr);
int spi_send_multicommand(const struct flashctx *flash, struct spi_command *cmds);
#endif /* !__FLASH_H__ */

View File

@ -23,7 +23,7 @@
#include <stdbool.h>
#include <stdint.h>
#include "flash.h" /* for chipaddr and flashctx */
#include "spi.h"
enum programmer_type {
PCI = 1, /* to detect uninitialized values */

View File

@ -16,6 +16,8 @@
#ifndef __SPI_H__
#define __SPI_H__ 1
#include "flash.h"
/*
* Contains the generic SPI headers
*/
@ -235,6 +237,16 @@
#define SPI_FLASHROM_BUG -5
#define SPI_PROGRAMMER_ERROR -6
struct spi_command {
unsigned int writecnt;
unsigned int readcnt;
const unsigned char *writearr;
unsigned char *readarr;
};
#define NULL_SPI_CMD { 0, 0, NULL, NULL, }
int spi_send_command(const struct flashctx *flash, unsigned int writecnt, unsigned int readcnt, const unsigned char *writearr, unsigned char *readarr);
int spi_send_multicommand(const struct flashctx *flash, struct spi_command *cmds);
void clear_spi_id_cache(void);
#endif /* !__SPI_H__ */