mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
Fix compilation for CONFIG_INTERNAL=no
CONFIG_INTERNAL implies Super I/O support and NEED_PCI. NEED_PCI is only used to guard PCI stuff which may be needed for external PCI-based programmers. That way, using #if NEED_PCI can be avoided inside #if CONFIG_INTERNAL. Corresponding to flashrom svn r1326. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
This commit is contained in:
parent
60b83f98a8
commit
c422484b84
@ -30,6 +30,11 @@
|
|||||||
/* Change this to #define if you want to test without a serial implementation */
|
/* Change this to #define if you want to test without a serial implementation */
|
||||||
#undef FAKE_COMMUNICATION
|
#undef FAKE_COMMUNICATION
|
||||||
|
|
||||||
|
struct buspirate_spispeeds {
|
||||||
|
const char *name;
|
||||||
|
const int speed;
|
||||||
|
};
|
||||||
|
|
||||||
#ifndef FAKE_COMMUNICATION
|
#ifndef FAKE_COMMUNICATION
|
||||||
static int buspirate_serialport_setup(char *dev)
|
static int buspirate_serialport_setup(char *dev)
|
||||||
{
|
{
|
||||||
|
30
programmer.h
30
programmer.h
@ -239,7 +239,7 @@ int rpci_write_long(struct pci_dev *dev, int reg, uint32_t data);
|
|||||||
void print_supported_pcidevs(const struct pcidev_status *devs);
|
void print_supported_pcidevs(const struct pcidev_status *devs);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_INTERNAL
|
#if CONFIG_INTERNAL == 1
|
||||||
/* board_enable.c */
|
/* board_enable.c */
|
||||||
void w836xx_ext_enter(uint16_t port);
|
void w836xx_ext_enter(uint16_t port);
|
||||||
void w836xx_ext_leave(uint16_t port);
|
void w836xx_ext_leave(uint16_t port);
|
||||||
@ -262,6 +262,7 @@ int processor_flash_enable(void);
|
|||||||
void *physmap(const char *descr, unsigned long phys_addr, size_t len);
|
void *physmap(const char *descr, unsigned long phys_addr, size_t len);
|
||||||
void *physmap_try_ro(const char *descr, unsigned long phys_addr, size_t len);
|
void *physmap_try_ro(const char *descr, unsigned long phys_addr, size_t len);
|
||||||
void physunmap(void *virt_addr, size_t len);
|
void physunmap(void *virt_addr, size_t len);
|
||||||
|
#if CONFIG_INTERNAL == 1
|
||||||
int setup_cpu_msr(int cpu);
|
int setup_cpu_msr(int cpu);
|
||||||
void cleanup_cpu_msr(void);
|
void cleanup_cpu_msr(void);
|
||||||
|
|
||||||
@ -277,7 +278,6 @@ void dmi_init(void);
|
|||||||
int dmi_match(const char *pattern);
|
int dmi_match(const char *pattern);
|
||||||
|
|
||||||
/* internal.c */
|
/* internal.c */
|
||||||
#if NEED_PCI == 1
|
|
||||||
struct superio {
|
struct superio {
|
||||||
uint16_t vendor;
|
uint16_t vendor;
|
||||||
uint16_t port;
|
uint16_t port;
|
||||||
@ -287,6 +287,8 @@ extern struct superio superios[];
|
|||||||
extern int superio_count;
|
extern int superio_count;
|
||||||
#define SUPERIO_VENDOR_NONE 0x0
|
#define SUPERIO_VENDOR_NONE 0x0
|
||||||
#define SUPERIO_VENDOR_ITE 0x1
|
#define SUPERIO_VENDOR_ITE 0x1
|
||||||
|
#endif
|
||||||
|
#if NEED_PCI == 1
|
||||||
struct pci_dev *pci_dev_find_filter(struct pci_filter filter);
|
struct pci_dev *pci_dev_find_filter(struct pci_filter filter);
|
||||||
struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t class);
|
struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t class);
|
||||||
struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device);
|
struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device);
|
||||||
@ -491,28 +493,21 @@ void print_supported_usbdevs(const struct usbdev_status *devs);
|
|||||||
int rayer_spi_init(void);
|
int rayer_spi_init(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* mcp6x_spi.c */
|
|
||||||
#if CONFIG_INTERNAL == 1
|
|
||||||
#if defined(__i386__) || defined(__x86_64__)
|
|
||||||
int mcp6x_spi_init(int want_spi);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* bitbang_spi.c */
|
/* bitbang_spi.c */
|
||||||
int bitbang_spi_init(const struct bitbang_spi_master *master, int halfperiod);
|
int bitbang_spi_init(const struct bitbang_spi_master *master, int halfperiod);
|
||||||
int bitbang_spi_shutdown(const struct bitbang_spi_master *master);
|
int bitbang_spi_shutdown(const struct bitbang_spi_master *master);
|
||||||
|
|
||||||
/* buspirate_spi.c */
|
/* buspirate_spi.c */
|
||||||
struct buspirate_spispeeds {
|
#if CONFIG_BUSPIRATE_SPI == 1
|
||||||
const char *name;
|
|
||||||
const int speed;
|
|
||||||
};
|
|
||||||
int buspirate_spi_init(void);
|
int buspirate_spi_init(void);
|
||||||
int buspirate_spi_shutdown(void);
|
int buspirate_spi_shutdown(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* dediprog.c */
|
/* dediprog.c */
|
||||||
|
#if CONFIG_DEDIPROG == 1
|
||||||
int dediprog_init(void);
|
int dediprog_init(void);
|
||||||
int dediprog_shutdown(void);
|
int dediprog_shutdown(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* flashrom.c */
|
/* flashrom.c */
|
||||||
struct decode_sizes {
|
struct decode_sizes {
|
||||||
@ -593,7 +588,6 @@ extern uint32_t ichspi_bbar;
|
|||||||
int ich_init_spi(struct pci_dev *dev, uint32_t base, void *rcrb,
|
int ich_init_spi(struct pci_dev *dev, uint32_t base, void *rcrb,
|
||||||
int ich_generation);
|
int ich_generation);
|
||||||
int via_init_spi(struct pci_dev *dev);
|
int via_init_spi(struct pci_dev *dev);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* it85spi.c */
|
/* it85spi.c */
|
||||||
int it85xx_spi_init(struct superio s);
|
int it85xx_spi_init(struct superio s);
|
||||||
@ -605,23 +599,25 @@ void exit_conf_mode_ite(uint16_t port);
|
|||||||
void probe_superio_ite(void);
|
void probe_superio_ite(void);
|
||||||
int init_superio_ite(void);
|
int init_superio_ite(void);
|
||||||
|
|
||||||
|
/* mcp6x_spi.c */
|
||||||
|
int mcp6x_spi_init(int want_spi);
|
||||||
|
|
||||||
/* sb600spi.c */
|
/* sb600spi.c */
|
||||||
#if CONFIG_INTERNAL == 1
|
|
||||||
int sb600_probe_spi(struct pci_dev *dev);
|
int sb600_probe_spi(struct pci_dev *dev);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* wbsio_spi.c */
|
/* wbsio_spi.c */
|
||||||
#if CONFIG_INTERNAL == 1
|
|
||||||
int wbsio_check_for_spi(void);
|
int wbsio_check_for_spi(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* serprog.c */
|
/* serprog.c */
|
||||||
|
#if CONFIG_SERPROG == 1
|
||||||
int serprog_init(void);
|
int serprog_init(void);
|
||||||
int serprog_shutdown(void);
|
int serprog_shutdown(void);
|
||||||
void serprog_chip_writeb(uint8_t val, chipaddr addr);
|
void serprog_chip_writeb(uint8_t val, chipaddr addr);
|
||||||
uint8_t serprog_chip_readb(const chipaddr addr);
|
uint8_t serprog_chip_readb(const chipaddr addr);
|
||||||
void serprog_chip_readn(uint8_t *buf, const chipaddr addr, size_t len);
|
void serprog_chip_readn(uint8_t *buf, const chipaddr addr, size_t len);
|
||||||
void serprog_delay(int delay);
|
void serprog_delay(int delay);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* serial.c */
|
/* serial.c */
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user